import{_ as bn,x as Br,o as U,m as nr,I as f1,e as sn,d as de,J as Ls,i as br,z as Wo,a as ae,j as Qt,y as nd,K as si,L as id,M as T4,N as p1,k as _s,O as hs,P as D4,g as m1,Q as g1,R as O4,S as N4,U as sd,c as Z,F as ra,r as b1,n as Le,t as Ru,B as L4,b as ge,V as go,p as Vi,q as _4,W as z4,C as na,s as R4,u as I4,w as Nr}from"./main-D6qyxymd.js";const B4={props:{content:{type:Object,required:!0},wwElementState:{type:Object,required:!0}},setup(t){const{getIcon:e}=wwLib.useIcons(),{hasLink:r,tag:n,properties:i}=wwLib.wwElement.useLink(),s=sn(null),o=de(()=>t.wwElementState.props.icon||t.content.icon),a=de(()=>t.wwElementState.props.color||t.content.color),l=de(()=>` `);return Ls(async()=>{try{s.value=await e(o.value)}catch{s.value=null}}),{getIcon:e,iconText:s,hasLink:r,tag:n,properties:i,color:a,placeholder:l}},computed:{iconHTML(){return this.iconText||this.placeholder},style(){return{"--icon-color":this.color}}}};function F4(t,e,r,n,i,s){return U(),Br(f1(n.hasLink?n.tag:"div"),nr({innerHTML:s.iconHTML},n.properties,{style:s.style,class:["ww-icon",{"-link":n.hasLink}]}),null,16,["innerHTML","style","class"])}const FM=bn(B4,[["render",F4],["__scopeId","data-v-ec5c837b"]]),P4={center:"center",right:"flex-end",left:"flex-start",justify:"center"},H4={props:{content:{type:Object,required:!0},wwFrontState:{type:Object,required:!0},wwElementState:{type:Object,required:!0}},emits:["update:content","update:content:effect","change-menu-visibility","change-borders-style","add-state","remove-state","trigger-event"],setup(t){const{hasLink:e,tag:r,properties:n}=wwLib.wwElement.useLink({isDisabled:de(()=>t.content.disabled)});return{hasLink:e,linkTag:r,properties:n}},data(){return{isReallyFocused:!1,isReallyActive:!1}},computed:{buttonStyle(){return{justifyContent:P4[this.content["_ww-text_textAlign"]]||"center"}},isEditing(){return!1},tag(){return this.isEditing?"div":this.hasLink?this.linkTag:this.content.buttonType==="submit"||this.content.buttonType==="reset"||this.content.buttonType==="button"?"button":"div"},buttonType(){return this.isEditing||this.hasLink?"":this.content.buttonType==="submit"||this.content.buttonType==="reset"||this.content.buttonType==="button"?this.content.buttonType:""},text(){return this.wwElementState.props.text},isFocused(){return this.isReallyFocused},isActive(){return this.isReallyActive}},watch:{"content.disabled":{immediate:!0,handler(t){t?this.$emit("add-state","disabled"):this.$emit("remove-state","disabled")}},isReallyFocused(t,e){t&&!e?this.$emit("trigger-event",{name:"focus"}):!t&&e&&this.$emit("trigger-event",{name:"blur"})},isFocused:{immediate:!0,handler(t){t?this.$emit("add-state","focus"):this.$emit("remove-state","focus")}},isActive:{immediate:!0,handler(t){t?this.$emit("add-state","active"):this.$emit("remove-state","active")}}},methods:{onBlur(){this.isReallyFocused=!1},onActivate(t){this.isReallyActive=!0;const e=t.type;this.$emit("trigger-event",{name:e,event:t})},onDeactivate(t){this.isReallyActive=!1;const e=t.type;this.$emit("trigger-event",{name:e,event:t})},onTouchActivate(){this.isReallyActive=!0},onTouchDeactivate(){this.isReallyActive=!1},onMouseActivate(){this.isReallyActive=!0},onMouseDeactivate(){this.isReallyActive=!1},onKeyActivate(){this.isReallyActive=!0},onKeyDeactivate(){this.isReallyActive=!1},onKeyDown(t){this.$emit("trigger-event",{name:"keydown",event:t})},onKeyUp(t){this.$emit("trigger-event",{name:"keyup",event:t})}}};function q4(t,e,r,n,i,s){const o=br("wwElement",!0),a=br("wwText");return U(),Br(f1(s.tag),nr({class:["ww-button",{button:s.tag,"-link":n.hasLink&&!s.isEditing,active:s.isActive}],type:s.buttonType,style:s.buttonStyle,"data-ww-flag":"btn-"+r.content.buttonType,disabled:r.content.disabled},n.properties,{onFocus:e[0]||(e[0]=l=>i.isReallyFocused=!0),onBlur:e[1]||(e[1]=l=>s.onBlur(l)),onMousedown:s.onMouseActivate,onMouseup:s.onMouseDeactivate,onMouseleave:s.onMouseDeactivate,onTouchstart:s.onTouchActivate,onTouchend:s.onTouchDeactivate,onTouchcancel:s.onTouchDeactivate,onKeydown:[si(s.onKeyActivate,["enter"]),si(s.onKeyActivate,["space"]),s.onKeyDown],onKeyup:[si(s.onKeyDeactivate,["enter"]),si(s.onKeyDeactivate,["space"]),s.onKeyUp]}),{default:Wo(()=>[r.content.hasLeftIcon&&r.content.leftIcon?(U(),Br(o,nd(nr({key:0},r.content.leftIcon)),null,16)):ae("",!0),Qt(a,{tag:"span",text:s.text},null,8,["text"]),r.content.hasRightIcon&&r.content.rightIcon?(U(),Br(o,nd(nr({key:1},r.content.rightIcon)),null,16)):ae("",!0)]),_:1},16,["class","type","style","data-ww-flag","disabled","onMousedown","onMouseup","onMouseleave","onTouchstart","onTouchend","onTouchcancel","onKeydown","onKeyup"])}const PM=bn(H4,[["render",q4],["__scopeId","data-v-cbcbcea4"]]),V4={props:{content:{type:Object,required:!0},wwElementState:{type:Object,required:!0}},emits:["update:content:effect","update:content","element-event"],setup(){const{hasLink:t,tag:e,properties:r}=wwLib.wwElement.useLink(),n=wwLib.wwElement.useBackgroundVideo();return{hasLink:t,properties:r,backgroundVideo:n,tag:e}},computed:{children(){return!this.content.children||!Array.isArray(this.content.children)?[]:this.content.children},isFixed(){return this.wwElementState.props.isFixed},noDropzone(){return this.wwElementState.props.noDropzone},isEditing(){return!1}},methods:{onElementClick(t){let e=t.currentTarget.dataset.wwFlexboxIndex,r=parseInt(e);isNaN(r)&&(r=0),this.$emit("element-event",{type:"click",index:r})}}};function $4(t,e,r,n,i,s){const o=br("wwSimpleLayout"),a=br("wwBackgroundVideo"),l=br("wwElement",!0),u=br("wwLayout");return s.noDropzone?(U(),Br(o,nr({key:0,tag:n.tag,class:"ww-flexbox","ww-responsive":"wwLayoutSlot"},n.properties,{class:{"-link":n.hasLink&&!s.isEditing}}),{default:Wo(()=>[id(t.$slots,"default",{},void 0,!0)]),_:3},16,["tag","class"])):(U(),Br(u,nr({key:1,class:"ww-flexbox",path:"children",direction:r.content.direction,"disable-edit":s.isFixed,"ww-responsive":"wwLayout",tag:n.tag},n.properties,{class:{"-link":n.hasLink&&!s.isEditing}}),{header:Wo(()=>[n.backgroundVideo?(U(),Br(a,{key:0,video:n.backgroundVideo},null,8,["video"])):ae("",!0),s.noDropzone?ae("",!0):id(t.$slots,"default",{key:1},void 0,!0)]),default:Wo(({item:c,index:d,itemStyle:h})=>[Qt(l,nr(c,{"extra-style":h,class:"ww-flexbox__object","ww-responsive":`wwobject-${d}`,"data-ww-flexbox-index":d,onClick:s.onElementClick}),null,16,["extra-style","ww-responsive","data-ww-flexbox-index","onClick"])]),_:3},16,["direction","disable-edit","tag","class"]))}const HM=bn(V4,[["render",$4],["__scopeId","data-v-14f7a5a5"]]);function ht(t){this.content=t}ht.prototype={constructor:ht,find:function(t){for(var e=0;e>1}};ht.from=function(t){if(t instanceof ht)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new ht(e)};function y1(t,e,r){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;let i=t.child(n),s=e.child(n);if(i==s){r+=i.nodeSize;continue}if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)r++;return r}if(i.content.size||s.content.size){let o=y1(i.content,s.content,r+1);if(o!=null)return o}r+=i.nodeSize}}function v1(t,e,r,n){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:r,b:n};let o=t.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){r-=l,n-=l;continue}if(!o.sameMarkup(a))return{a:r,b:n};if(o.isText&&o.text!=a.text){let u=0,c=Math.min(o.text.length,a.text.length);for(;ue&&n(l,i+a,s||null,o)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,r-c),n,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,r,n,i){let s="",o=!0;return this.nodesBetween(e,r,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,r-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&n&&(o?o=!1:s+=n),s+=u},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let r=this.lastChild,n=e.firstChild,i=this.content.slice(),s=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),s=1);se)for(let s=0,o=0;oe&&((or)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,r-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,r-o-1))),n.push(a),i+=a.nodeSize),o=l}return new R(n,i)}cutByIndex(e,r){return e==r?R.empty:e==0&&r==this.content.length?this:new R(this.content.slice(e,r))}replaceChild(e,r){let n=this.content[e];if(n==r)return this;let i=this.content.slice(),s=this.size+r.nodeSize-n.nodeSize;return i[e]=r,new R(i,s)}addToStart(e){return new R([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new R(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let r=0;rthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,n=0;;r++){let i=this.child(r),s=n+i.nodeSize;if(s>=e)return s==e?bo(r+1,s):bo(r,n);n=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,r){if(!r)return R.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new R(r.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return R.empty;let r,n=0;for(let i=0;ithis.type.rank&&(r||(r=e.slice(0,i)),r.push(this),n=!0),r&&r.push(s)}}return r||(r=e.slice()),n||r.push(this),r}removeFromSet(e){for(let r=0;rn.type.rank-i.type.rank),r}};we.none=[];class sa extends Error{}class V{constructor(e,r,n){this.content=e,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,r){let n=k1(this.content,e+this.openStart,r);return n&&new V(n,this.openStart,this.openEnd)}removeBetween(e,r){return new V(x1(this.content,e+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,r){if(!r)return V.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new V(R.fromJSON(e,r.content),n,i)}static maxOpen(e,r=!0){let n=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=e.lastChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.lastChild)i++;return new V(e,n,i)}}V.empty=new V(R.empty,0,0);function x1(t,e,r){let{index:n,offset:i}=t.findIndex(e),s=t.maybeChild(n),{index:o,offset:a}=t.findIndex(r);if(i==e||s.isText){if(a!=r&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(n!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(n,s.copy(x1(s.content,e-i-1,r-i-1)))}function k1(t,e,r,n){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return n&&!n.canReplace(i,i,r)?null:t.cut(0,e).append(r).append(t.cut(e));let a=k1(o.content,e-s-1,r,o);return a&&t.replaceChild(i,o.copy(a))}function j4(t,e,r){if(r.openStart>t.depth)throw new sa("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new sa("Inconsistent open depths");return w1(t,e,r,0)}function w1(t,e,r,n){let i=t.index(n),s=t.node(n);if(i==e.index(n)&&n=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function ys(t,e,r,n){let i=(e||t).node(r),s=0,o=e?e.index(r):i.childCount;t&&(s=t.index(r),t.depth>r?s++:t.textOffset&&(ci(t.nodeAfter,n),s++));for(let a=s;ai&&Fl(t,e,i+1),o=n.depth>i&&Fl(r,n,i+1),a=[];return ys(null,t,i,a),s&&o&&e.index(i)==r.index(i)?(S1(s,o),ci(di(s,C1(t,e,r,n,i+1)),a)):(s&&ci(di(s,oa(t,e,i+1)),a),ys(e,r,i,a),o&&ci(di(o,oa(r,n,i+1)),a)),ys(n,null,i,a),new R(a)}function oa(t,e,r){let n=[];if(ys(null,t,r,n),t.depth>r){let i=Fl(t,e,r+1);ci(di(i,oa(t,e,r+1)),n)}return ys(e,null,r,n),new R(n)}function W4(t,e){let r=e.depth-t.openStart,i=e.node(r).copy(t.content);for(let s=r-1;s>=0;s--)i=e.node(s).copy(R.from(i));return{start:i.resolveNoCache(t.openStart+r),end:i.resolveNoCache(i.content.size-t.openEnd-r)}}class zs{constructor(e,r,n){this.pos=e,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,r=this.index(this.depth);if(r==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(r);return n?e.child(r).cut(n):i}get nodeBefore(){let e=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(e).cut(0,r):e==0?null:this.parent.child(e-1)}posAtIndex(e,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let s=0;s0;r--)if(this.start(r)<=e&&this.end(r)>=e)return r;return 0}blockRange(e=this,r){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!r||r(this.node(n))))return new aa(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&r<=e.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,s=r;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),u=s-l;if(n.push(o,a,i+l),!u||(o=o.child(a),o.isText))break;s=u-1,i+=l+1}return new zs(r,n,s)}static resolveCached(e,r){let n=od.get(e);if(n)for(let s=0;se&&this.nodesBetween(e,r,s=>(n.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),A1(this.marks,e)}contentMatchAt(e){let r=this.type.contentMatch.matchFragment(this.content,0,e);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(e,r,n=R.empty,i=0,s=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,s),a=o&&o.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=i;lr.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(r=>r.toJSON())),e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(e.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(r.text,n)}let i=R.fromJSON(e,r.content),s=e.nodeType(r.type).create(r.attrs,i,n);return s.type.checkAttrs(s.attrs),s}};Bn.prototype.text=void 0;let J4=class Hl extends Bn{constructor(e,r,n,i){if(super(e,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):A1(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,r){return this.text.slice(e,r)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Hl(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Hl(this.type,this.attrs,e,this.marks)}cut(e=0,r=this.text.length){return e==0&&r==this.text.length?this:this.withText(this.text.slice(e,r))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function A1(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class gi{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,r){let n=new Y4(e,r);if(n.next==null)return gi.empty;let i=M1(n);n.next&&n.err("Unexpected trailing text");let s=n3(r3(i));return i3(s,n),s}matchType(e){for(let r=0;ru.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function r(n){e.push(n);for(let i=0;i{let s=i+(n.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(n.next[o].next);return s}).join(` `)}}gi.empty=new gi(!0);class Y4{constructor(e,r){this.string=e,this.nodeTypes=r,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.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function M1(t){let e=[];do e.push(Z4(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Z4(t){let e=[];do e.push(X4(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function X4(t){let e=t3(t);for(;;)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("{"))e=Q4(t,e);else break;return e}function ad(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Q4(t,e){let r=ad(t),n=r;return t.eat(",")&&(t.next!="}"?n=ad(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function e3(t,e){let r=t.nodeTypes,n=r[e];if(n)return[n];let i=[];for(let s in r){let o=r[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function t3(t){if(t.eat("(")){let e=M1(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=e3(t,t.next).map(r=>(t.inline==null?t.inline=r.isInline:t.inline!=r.isInline&&t.err("Mixing inline and block content"),{type:"name",value:r}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function r3(t){let e=[[]];return i(s(t,0),r()),e;function r(){return e.push([])-1}function n(o,a,l){let u={term:l,to:a};return e[o].push(u),u}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(s(u,a)),[]);if(o.type=="seq")for(let l=0;;l++){let u=s(o.exprs[l],a);if(l==o.exprs.length-1)return u;i(u,a=r())}else if(o.type=="star"){let l=r();return n(a,l),i(s(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=r();return i(s(o.expr,a),l),i(s(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let u=0;u{t[o].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c{u||i.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=e[n.join(",")]=new gi(n.indexOf(t.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:D1(this.attrs,e)}create(e=null,r,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Bn(this,this.computeAttrs(e),R.from(r),we.setFrom(n))}createChecked(e=null,r,n){return r=R.from(r),this.checkContent(r),new Bn(this,this.computeAttrs(e),r,we.setFrom(n))}createAndFill(e=null,r,n){if(e=this.computeAttrs(e),r=R.from(r),r.size){let o=this.contentMatch.fillBefore(r);if(!o)return null;r=o.append(r)}let i=this.contentMatch.matchFragment(r),s=i&&i.fillBefore(R.empty,!0);return s?new Bn(this,e,r.append(s),we.setFrom(n)):null}validContent(e){let r=this.contentMatch.matchFragment(e);if(!r||!r.validEnd)return!1;for(let n=0;n-1}allowsMarks(e){if(this.markSet==null)return!0;for(let r=0;rn[s]=new L1(s,r,o));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function s3(t,e,r){let n=r.split("|");return i=>{let s=i===null?"null":typeof i;if(n.indexOf(s)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${t}, got ${s}`)}}class o3{constructor(e,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?s3(e,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class t0{constructor(e,r,n,i){this.name=e,this.rank=r,this.schema=n,this.spec=i,this.attrs=N1(e,i.attrs),this.excluded=null;let s=T1(this.attrs);this.instance=s?new we(this,s):null}create(e=null){return!e&&this.instance?this.instance:new we(this,D1(this.attrs,e))}static compile(e,r){let n=Object.create(null),i=0;return e.forEach((s,o)=>n[s]=new t0(s,i++,r,o)),n}removeFromSet(e){for(var r=0;r-1}}class Iu{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let i in e)r[i]=e[i];r.nodes=ht.from(e.nodes),r.marks=ht.from(e.marks||{}),this.nodes=ud.compile(this.spec.nodes,this),this.marks=t0.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=n[o]||(n[o]=gi.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?cd(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:cd(this,o.split(" "))}this.nodeFromJSON=i=>Bn.fromJSON(this,i),this.markFromJSON=i=>we.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,r=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ud){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(r,n,i)}text(e,r){let n=this.nodes.text;return new J4(n,n.defaultAttrs,e,we.setFrom(r))}mark(e,r){return typeof e=="string"&&(e=this.marks[e]),e.create(r)}nodeType(e){let r=this.nodes[e];if(!r)throw new RangeError("Unknown node type: "+e);return r}}function cd(t,e){let r=[];for(let n=0;n-1)&&r.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return r}function a3(t){return t.tag!=null}function l3(t){return t.style!=null}class an{constructor(e,r){this.schema=e,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(i=>{if(a3(i))this.tags.push(i);else if(l3(i)){let s=/[^=]*/.exec(i.style)[0];n.indexOf(s)<0&&n.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,r={}){let n=new hd(this,r,!1);return n.addAll(e,we.none,r.from,r.to),n.finish()}parseSlice(e,r={}){let n=new hd(this,r,!0);return n.addAll(e,we.none,r.from,r.to),V.maxOpen(n.finish())}matchTag(e,r,n){for(let i=n?this.tags.indexOf(n)+1:0;ie.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=r))){if(o.getAttrs){let l=o.getAttrs(r);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let r=[];function n(i){let s=i.priority==null?50:i.priority,o=0;for(;o{n(o=fd(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{n(o=fd(o)),o.node||o.ignore||o.mark||(o.node=i)})}return r}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new an(e,an.schemaRules(e)))}}const _1={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},u3={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},z1={ol:!0,ul:!0},Rs=1,ql=2,vs=4;function dd(t,e,r){return e!=null?(e?Rs:0)|(e==="full"?ql:0):t&&t.whitespace=="pre"?Rs|ql:r&~vs}class yo{constructor(e,r,n,i,s,o){this.type=e,this.attrs=r,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=we.none,this.match=s||(o&vs?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(R.from(e));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Rs)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let r=R.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(R.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!_1.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class hd{constructor(e,r,n){this.parser=e,this.options=r,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=r.topNode,s,o=dd(null,r.preserveWhitespace,0)|(n?vs:0);i?s=new yo(i.type,i.attrs,we.none,!0,r.topMatch||i.type.contentMatch,o):n?s=new yo(null,null,we.none,!0,null,o):s=new yo(e.schema.topNodeType,null,we.none,!0,null,o),this.nodes=[s],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,r){e.nodeType==3?this.addTextNode(e,r):e.nodeType==1&&this.addElement(e,r)}addTextNode(e,r){let n=e.nodeValue,i=this.top,s=i.options&ql?"full":this.localPreserveWS||(i.options&Rs)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(s)if(s==="full")n=n.replace(/\r\n?/g,` `);else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=n.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(u)):r=r.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return r}addElementByRule(e,r,n,i){let s,o;if(r.node)if(o=this.parser.schema.nodes[r.node],o.isLeaf)this.insertNode(o.create(r.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,r.attrs||null,n,r.preserveWhitespace);l&&(s=!0,n=l)}else{let l=this.parser.schema.marks[r.mark];n=n.concat(l.create(r.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(r.getContent)this.findInside(e),r.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof r.contentElement=="string"?l=e.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(e):r.contentElement&&(l=r.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}s&&this.sync(a)&&this.open--}addAll(e,r,n,i){let s=n||0;for(let o=n?e.childNodes[n]:e.firstChild,a=i==null?null:e.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,r);this.findAtPoint(e,s)}findPlace(e,r,n){let i,s;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+a)&&(i=u,s=l,!u.length))break;if(l.solid){if(n)break;a+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(u.type):pd(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new yo(e,r,l,i,null,a)),this.open++,n}closeExtra(e=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].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 r=this.open;r>=0;r--){if(this.nodes[r]==e)return this.open=r,!0;this.localPreserveWS&&(this.nodes[r].options|=Rs)}return!1}get currentPos(){this.closeExtra();let e=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;r&&e++}return e}findAtPoint(e,r){if(this.find)for(let n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let r=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let u=r[a];if(u==""){if(a==r.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:n&&l>=s?n.node(l-s).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return o(r.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let r=e.depth;r>=0;r--){let n=e.node(r).contentMatchAt(e.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function c3(t){for(let e=t.firstChild,r=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&z1.hasOwnProperty(n)&&r?(r.appendChild(e),e=r):n=="li"?r=e:n&&(r=null)}}function d3(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function fd(t){let e={};for(let r in t)e[r]=t[r];return e}function pd(t,e){let r=e.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(t))continue;let s=[],o=a=>{s.push(a);for(let l=0;l{if(s.length||o.marks.length){let a=0,l=0;for(;a=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,r);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(e,r,n={}){let i=this.marks[e.type.name];return i&&Uo(z0(n),i(e,r),null,e.attrs)}static renderSpec(e,r,n=null,i){return Uo(e,r,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Si(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let r=md(e.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(e){return md(e.marks)}}function md(t){let e={};for(let r in t){let n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function z0(t){return t.document||window.document}const gd=new WeakMap;function h3(t){let e=gd.get(t);return e===void 0&&gd.set(t,e=f3(t)),e}function f3(t){let e=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i-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 o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let a,l=r?t.createElementNS(r,i):t.createElement(i),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=Uo(t,h,r,n);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const R1=65535,I1=Math.pow(2,16);function p3(t,e){return t+e*I1}function bd(t){return t&R1}function m3(t){return(t-(t&R1))/I1}const B1=1,F1=2,Ko=4,P1=8;class Vl{constructor(e,r,n){this.pos=e,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&P1)>0}get deletedBefore(){return(this.delInfo&(B1|Ko))>0}get deletedAfter(){return(this.delInfo&(F1|Ko))>0}get deletedAcross(){return(this.delInfo&Ko)>0}}class $t{constructor(e,r=!1){if(this.ranges=e,this.inverted=r,!e.length&&$t.empty)return $t.empty}recover(e){let r=0,n=bd(e);if(!this.inverted)for(let i=0;ie)break;let u=this.ranges[a+s],c=this.ranges[a+o],d=l+u;if(e<=d){let h=u?e==l?-1:e==d?1:r:r,f=l+i+(h<0?0:c);if(n)return f;let p=e==(r<0?l:d)?null:p3(a/3,e-l),b=e==l?F1:e==d?B1:Ko;return(r<0?e!=l:e!=d)&&(b|=P1),new Vl(f,b,p)}i+=c-u}return n?e+i:new Vl(e+i,0,null)}touches(e,r){let n=0,i=bd(r),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;ae)break;let u=this.ranges[a+s],c=l+u;if(e<=c&&a==i*3)return!0;n+=this.ranges[a+o]-u}return!1}forEach(e){let r=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,s=0;i=0;r--){let i=e.getMirror(r);this.appendMap(e._maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let e=new Is;return e.appendMappingInverted(this),e}map(e,r=1){if(this.mirror)return this._map(e,r,!0);for(let n=this.from;ns&&l!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),r.openStart,r.openEnd);return Xe.fromReplace(e,this.from,this.to,s)}invert(){return new Lr(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Ln(r.pos,n.pos,this.mark)}merge(e){return e instanceof Ln&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ln(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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ln(r.from,r.to,e.markFromJSON(r.mark))}}vt.jsonID("addMark",Ln);class Lr extends vt{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=new V(Bu(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),r.openStart,r.openEnd);return Xe.fromReplace(e,this.from,this.to,n)}invert(){return new Ln(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Lr(r.pos,n.pos,this.mark)}merge(e){return e instanceof Lr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Lr(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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Lr(r.from,r.to,e.markFromJSON(r.mark))}}vt.jsonID("removeMark",Lr);class _n extends vt{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return Xe.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return Xe.fromReplace(e,this.pos,this.pos+1,new V(R.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;in.pos?null:new ut(r.pos,n.pos,i,s,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,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ut(r.from,r.to,r.gapFrom,r.gapTo,V.fromJSON(e,r.slice),r.insert,!!r.structure)}}vt.jsonID("replaceAround",ut);function $l(t,e,r){let n=t.resolve(e),i=r-e,s=n.depth;for(;i>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,i--;if(i>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function g3(t,e,r,n){let i=[],s=[],o,a;t.doc.nodesBetween(e,r,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!n.isInSet(d)&&c.type.allowsMarkType(n.type)){let h=Math.max(u,e),f=Math.min(u+l.nodeSize,r),p=n.addToSet(d);for(let b=0;bt.step(l)),s.forEach(l=>t.step(l))}function b3(t,e,r,n){let i=[],s=0;t.doc.nodesBetween(e,r,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(n instanceof t0){let u=o.marks,c;for(;c=n.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let u=Math.min(a+o.nodeSize,r);for(let c=0;ct.step(new Lr(o.from,o.to,o.style)))}function Fu(t,e,r,n=r.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l=0;l--)t.step(o[l])}function y3(t,e,r){return(e==0||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function rs(t){let r=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,i=0,s=0;;--n){let o=t.$from.node(n),a=t.$from.index(n)+i,l=t.$to.indexAfter(n)-s;if(nr;p--)b||n.index(p)>0?(b=!0,c=R.from(n.node(p).copy(c)),d++):l--;let h=R.empty,f=0;for(let p=s,b=!1;p>r;p--)b||i.after(p+1)=0;o--){if(n.size){let a=r[o].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=R.from(r[o].type.create(r[o].attrs,n))}let i=e.start,s=e.end;t.step(new ut(i,s,i,s,new V(n,0,0),r.length,!0))}function S3(t,e,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,r,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&C3(t.doc,t.mapping.slice(s).map(a),n)){let u=null;if(n.schema.linebreakReplacement){let f=n.whitespace=="pre",p=!!n.contentMatch.matchType(n.schema.linebreakReplacement);f&&!p?u=!1:!f&&p&&(u=!0)}u===!1&&q1(t,o,a,s),Fu(t,t.mapping.slice(s).map(a,1),n,void 0,u===null);let c=t.mapping.slice(s),d=c.map(a,1),h=c.map(a+o.nodeSize,1);return t.step(new ut(d,h,d+1,h-1,new V(R.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&H1(t,o,a,s),!1}})}function H1(t,e,r,n){e.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=t.mapping.slice(n).map(r+1+s+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function q1(t,e,r,n){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(n).map(r+1+s);t.replaceWith(o,o+1,e.type.schema.text(` `))}})}function C3(t,e,r){let n=t.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}function A3(t,e,r,n,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");r||(r=s.type);let o=r.create(n,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,o);if(!r.validContent(s.content))throw new RangeError("Invalid content for node type "+r.name);t.step(new ut(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new V(R.from(o),0,0),1,!0))}function ln(t,e,r=1,n){let i=t.resolve(e),s=i.depth-r,o=n&&n[n.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=r-2;u>s;u--,c--){let d=i.node(u),h=i.index(u);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=n&&n[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let b=n&&n[c]||d;if(!d.canReplace(h+1,d.childCount)||!b.type.validContent(f))return!1}let a=i.indexAfter(s),l=n&&n[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function M3(t,e,r=1,n){let i=t.doc.resolve(e),s=R.empty,o=R.empty;for(let a=i.depth,l=i.depth-r,u=r-1;a>l;a--,u--){s=R.from(i.node(a).copy(s));let c=n&&n[u];o=R.from(c?c.type.create(c.attrs,o):i.node(a).copy(o))}t.step(new at(e,e,new V(s.append(o),r,r),!0))}function Wn(t,e){let r=t.resolve(e),n=r.index();return V1(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function E3(t,e){e.content.size||t.type.compatibleContent(e.type);let r=t.contentMatchAt(t.childCount),{linebreakReplacement:n}=t.type.schema;for(let i=0;i0?(s=n.node(i+1),a++,o=n.node(i).maybeChild(a)):(s=n.node(i).maybeChild(a-1),o=n.node(i+1)),s&&!s.isTextblock&&V1(s,o)&&n.node(i).canReplace(a,a+1))return e;if(i==0)break;e=r<0?n.before(i):n.after(i)}}function T3(t,e,r){let n=null,{linebreakReplacement:i}=t.doc.type.schema,s=t.doc.resolve(e-r),o=s.node().type;if(i&&o.inlineContent){let c=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);c&&!d?n=!1:!c&&d&&(n=!0)}let a=t.steps.length;if(n===!1){let c=t.doc.resolve(e+r);q1(t,c.node(),c.before(),a)}o.inlineContent&&Fu(t,e+r-1,o,s.node().contentMatchAt(s.index()),n==null);let l=t.mapping.slice(a),u=l.map(e-r);if(t.step(new at(u,l.map(e+r,-1),V.empty,!0)),n===!0){let c=t.doc.resolve(u);H1(t,c.node(),c.before(),t.steps.length)}return t}function D3(t,e,r){let n=t.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),r))return e;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let s=n.index(i);if(n.node(i).canReplaceWith(s,s,r))return n.before(i+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let s=n.indexAfter(i);if(n.node(i).canReplaceWith(s,s,r))return n.after(i+1);if(s=0;o--){let a=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(a>0?1:0),u=n.node(o),c=!1;if(s==1)c=u.canReplace(l,l,i);else{let d=u.contentMatchAt(l).findWrapping(i.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?n.pos:a<0?n.before(o+1):n.after(o+1)}return null}function n0(t,e,r=e,n=V.empty){if(e==r&&!n.size)return null;let i=t.resolve(e),s=t.resolve(r);return j1(i,s,n)?new at(e,r,n):new O3(i,s,n).fit()}function j1(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}class O3{constructor(e,r,n){this.$from=e,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=R.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=R.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new V(s,o,a);return e>-1?new ut(n.pos,e,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new at(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,i=this.unplaced.openEnd;n1&&(i=0),s.type.spec.isolating&&i<=n){e=n;break}r=s.content}for(let r=1;r<=2;r++)for(let n=r==1?e:this.unplaced.openStart;n>=0;n--){let i,s=null;n?(s=I0(this.unplaced.content,n-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(r==1&&(o?u.matchType(o.type)||(d=u.fillBefore(R.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:a,parent:s,inject:d};if(r==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:e,openStart:r,openEnd:n}=this.unplaced,i=I0(e,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new V(e,r+1,Math.max(n,i.size+r>=e.size-n?r+1:0)),!0)}dropNode(){let{content:e,openStart:r,openEnd:n}=this.unplaced,i=I0(e,r);if(i.childCount<=1&&r>0){let s=e.size-r<=r+i.size;this.unplaced=new V(fs(e,r-1,1),r-1,s?r-1:n)}else this.unplaced=new V(fs(e,r,1),r,n)}placeNodes({sliceDepth:e,frontierDepth:r,parent:n,inject:i,wrap:s}){for(;this.depth>r;)this.closeFrontierNode();if(s)for(let b=0;b1||l==0||b.content.size)&&(d=y,c.push(W1(b.mark(h.allowedMarks(b.marks)),u==1?l:0,u==a.childCount?f:-1)))}let p=u==a.childCount;p||(f=-1),this.placed=ps(this.placed,r,R.from(c)),this.frontier[r].match=d,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,y=a;b1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(e){e:for(let r=Math.min(this.depth,e.depth);r>=0;r--){let{match:n,type:i}=this.frontier[r],s=r=0;a--){let{match:l,type:u}=this.frontier[a],c=B0(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:r,fit:o,move:s?e.doc.resolve(e.after(r+1)):e}}}}close(e){let r=this.findCloseLevel(e);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=ps(this.placed,r.depth,r.fit)),e=r.move;for(let n=r.depth+1;n<=e.depth;n++){let i=e.node(n),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(n));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,r=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=ps(this.placed,this.depth,R.from(e.create(r,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(R.empty,!0);r.childCount&&(this.placed=ps(this.placed,this.frontier.length,r))}}function fs(t,e,r){return e==0?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(fs(t.firstChild.content,e-1,r)))}function ps(t,e,r){return e==0?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(ps(t.lastChild.content,e-1,r)))}function I0(t,e){for(let r=0;r1&&(n=n.replaceChild(0,W1(n.firstChild,e-1,n.childCount==1?r-1:0))),e>0&&(n=t.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(t.type.contentMatch.matchFragment(n).fillBefore(R.empty,!0)))),t.copy(n)}function B0(t,e,r,n,i){let s=t.node(e),o=i?t.indexAfter(e):t.index(e);if(o==s.childCount&&!r.compatibleContent(s.type))return null;let a=n.fillBefore(s.content,!0,o);return a&&!N3(r,s.content,o)?a:null}function N3(t,e,r){for(let n=r;n0;h--,f--){let p=i.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(h)>-1?a=h:i.before(h)==f&&o.splice(1,0,-h)}let l=o.indexOf(a),u=[],c=n.openStart;for(let h=n.content,f=0;;f++){let p=h.firstChild;if(u.push(p),f==n.openStart)break;h=p.content}for(let h=c-1;h>=0;h--){let f=u[h],p=L3(f.type);if(p&&!f.sameMarkup(i.node(Math.abs(a)-1)))c=h;else if(p||!f.type.isTextblock)break}for(let h=n.openStart;h>=0;h--){let f=(h+c+1)%(n.openStart+1),p=u[f];if(p)for(let b=0;b=0&&(t.replace(e,r,n),!(t.steps.length>d));h--){let f=o[h];f<0||(e=i.before(f),r=s.after(f))}}function U1(t,e,r,n,i){if(en){let s=i.contentMatchAt(0),o=s.fillBefore(t).append(t);t=o.append(s.matchFragment(o).fillBefore(R.empty,!0))}return t}function z3(t,e,r,n){if(!n.isInline&&e==r&&t.doc.resolve(e).parent.content.size){let i=D3(t.doc,e,n.type);i!=null&&(e=r=i)}t.replaceRange(e,r,new V(R.from(n),0,0))}function R3(t,e,r){let n=t.doc.resolve(e),i=t.doc.resolve(r),s=K1(n,i);for(let o=0;o0&&(l||n.node(a-1).canReplace(n.index(a-1),i.indexAfter(a-1))))return t.delete(n.before(a),i.after(a))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(e-n.start(o)==n.depth-o&&r>n.end(o)&&i.end(o)-r!=i.depth-o&&n.start(o-1)==i.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),i.index(o-1)))return t.delete(n.before(o),r);t.delete(e,r)}function K1(t,e){let r=[],n=Math.min(t.depth,e.depth);for(let i=n;i>=0;i--){let s=t.start(i);if(se.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&r.push(i)}return r}class Fi extends vt{constructor(e,r,n){super(),this.pos=e,this.attr=r,this.value=n}apply(e){let r=e.nodeAt(this.pos);if(!r)return Xe.fail("No node at attribute step's position");let n=Object.create(null);for(let s in r.attrs)n[s]=r.attrs[s];n[this.attr]=this.value;let i=r.type.create(n,null,r.marks);return Xe.fromReplace(e,this.pos,this.pos+1,new V(R.from(i),0,r.isLeaf?0:1))}getMap(){return $t.empty}invert(e){return new Fi(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new Fi(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Fi(r.pos,r.attr,r.value)}}vt.jsonID("attr",Fi);class Bs extends vt{constructor(e,r){super(),this.attr=e,this.value=r}apply(e){let r=Object.create(null);for(let i in e.attrs)r[i]=e.attrs[i];r[this.attr]=this.value;let n=e.type.create(r,e.content,e.marks);return Xe.ok(n)}getMap(){return $t.empty}invert(e){return new Bs(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Bs(r.attr,r.value)}}vt.jsonID("docAttr",Bs);let $i=class extends Error{};$i=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r};$i.prototype=Object.create(Error.prototype);$i.prototype.constructor=$i;$i.prototype.name="TransformError";class Hu{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Is}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let r=this.maybeStep(e);if(r.failed)throw new $i(r.failed);return this}maybeStep(e){let r=e.apply(this.doc);return r.failed||this.addStep(e,r.doc),r}get docChanged(){return this.steps.length>0}addStep(e,r){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=r}replace(e,r=e,n=V.empty){let i=n0(this.doc,e,r,n);return i&&this.step(i),this}replaceWith(e,r,n){return this.replace(e,r,new V(R.from(n),0,0))}delete(e,r){return this.replace(e,r,V.empty)}insert(e,r){return this.replaceWith(e,e,r)}replaceRange(e,r,n){return _3(this,e,r,n),this}replaceRangeWith(e,r,n){return z3(this,e,r,n),this}deleteRange(e,r){return R3(this,e,r),this}lift(e,r){return v3(this,e,r),this}join(e,r=1){return T3(this,e,r),this}wrap(e,r){return w3(this,e,r),this}setBlockType(e,r=e,n,i=null){return S3(this,e,r,n,i),this}setNodeMarkup(e,r,n=null,i){return A3(this,e,r,n,i),this}setNodeAttribute(e,r,n){return this.step(new Fi(e,r,n)),this}setDocAttribute(e,r){return this.step(new Bs(e,r)),this}addNodeMark(e,r){return this.step(new _n(e,r)),this}removeNodeMark(e,r){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(r instanceof we)r.isInSet(n.marks)&&this.step(new bi(e,r));else{let i=n.marks,s,o=[];for(;s=r.isInSet(i);)o.push(new bi(e,s)),i=s.removeFromSet(i);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,r=1,n){return M3(this,e,r,n),this}addMark(e,r,n){return g3(this,e,r,n),this}removeMark(e,r,n){return b3(this,e,r,n),this}clearIncompatible(e,r,n){return Fu(this,e,r,n),this}}const F0=Object.create(null);class ne{constructor(e,r,n){this.$anchor=e,this.$head=r,this.ranges=n||[new G1(e.min(r),e.max(r))]}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 r=0;r=0;s--){let o=r<0?Li(e.node(0),e.node(s),e.before(s+1),e.index(s),r,n):Li(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,r,n);if(o)return o}return null}static near(e,r=1){return this.findFrom(e,r)||this.findFrom(e,-r)||new Ut(e.node(0))}static atStart(e){return Li(e,e,0,0,1)||new Ut(e)}static atEnd(e){return Li(e,e,e.content.size,e.childCount,-1)||new Ut(e)}static fromJSON(e,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=F0[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in F0)throw new RangeError("Duplicate use of selection JSON ID "+e);return F0[e]=r,r.prototype.jsonID=e,r}getBookmark(){return ee.between(this.$anchor,this.$head).getBookmark()}}ne.prototype.visible=!0;class G1{constructor(e,r){this.$from=e,this.$to=r}}let vd=!1;function xd(t){!vd&&!t.parent.inlineContent&&(vd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ee extends ne{constructor(e,r=e){xd(e),xd(r),super(e,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,r){let n=e.resolve(r.map(this.head));if(!n.parent.inlineContent)return ne.near(n);let i=e.resolve(r.map(this.anchor));return new ee(i.parent.inlineContent?i:n,n)}replace(e,r=V.empty){if(super.replace(e,r),r==V.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof ee&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new i0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ee(e.resolve(r.anchor),e.resolve(r.head))}static create(e,r,n=r){let i=e.resolve(r);return new this(i,n==r?i:e.resolve(n))}static between(e,r,n){let i=e.pos-r.pos;if((!n||i)&&(n=i>=0?1:-1),!r.parent.inlineContent){let s=ne.findFrom(r,n,!0)||ne.findFrom(r,-n,!0);if(s)r=s.$head;else return ne.near(r,n)}return e.parent.inlineContent||(i==0?e=r:(e=(ne.findFrom(e,-n,!0)||ne.findFrom(e,n,!0)).$anchor,e.pos0?0:1);i>0?o=0;o+=i){let a=e.child(o);if(a.isAtom){if(!s&&X.isSelectable(a))return X.create(t,r-(i<0?a.nodeSize:0))}else{let l=Li(t,a,r+i,i<0?a.childCount:0,i,s);if(l)return l}r+=a.nodeSize*i}return null}function kd(t,e,r){let n=t.steps.length-1;if(n{o==null&&(o=c)}),t.setSelection(ne.near(t.doc.resolve(o),r))}const wd=1,vo=2,Sd=4;class B3 extends Hu{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.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=vo,this}ensureMarks(e){return we.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&vo)>0}addStep(e,r){super.addStep(e,r),this.updated=this.updated&~vo,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,r=!0){let n=this.selection;return r&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||we.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,r,n){let i=this.doc.type.schema;if(r==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(n==null&&(n=r),!e)return this.deleteRange(r,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(r);s=n==r?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(e,s)),!this.selection.empty&&this.selection.to==r+e.length&&this.setSelection(ne.near(this.selection.$to)),this}}setMeta(e,r){return this.meta[typeof e=="string"?e:e.key]=r,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|=Sd,this}get scrolledIntoView(){return(this.updated&Sd)>0}}function Cd(t,e){return!e||!t?t:t.bind(e)}class ms{constructor(e,r,n){this.name=e,this.init=Cd(r.init,n),this.apply=Cd(r.apply,n)}}const F3=[new ms("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new ms("selection",{init(t,e){return t.selection||ne.atStart(e.doc)},apply(t){return t.selection}}),new ms("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,r,n){return n.selection.$cursor?t.storedMarks:null}}),new ms("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class P0{constructor(e,r){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=F3.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new ms(n.key,n.spec.state,n))})}}class Ii{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,r=-1){for(let n=0;nn.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[n],s=i.spec.state;s&&s.toJSON&&(r[n]=s.toJSON.call(i,this[i.key]))}return r}static fromJSON(e,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new P0(e.schema,e.plugins),s=new Ii(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=Bn.fromJSON(e.schema,r.doc);else if(o.name=="selection")s.selection=ne.fromJSON(s.doc,r.selection);else if(o.name=="storedMarks")r.storedMarks&&(s.storedMarks=r.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){s[o.name]=u.fromJSON.call(l,e,r[a],s);return}}s[o.name]=o.init(e,s)}}),s}}function J1(t,e,r){for(let n in t){let i=t[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=J1(i,e,{})),r[n]=i}return r}class Ve{constructor(e){this.spec=e,this.props={},e.props&&J1(e.props,this,this.props),this.key=e.key?e.key.key:Y1("plugin")}getState(e){return e[this.key]}}const H0=Object.create(null);function Y1(t){return t in H0?t+"$"+ ++H0[t]:(H0[t]=0,t+"$")}class Je{constructor(e="key"){this.key=Y1(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ft=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},ji=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let jl=null;const rn=function(t,e,r){let n=jl||(jl=document.createRange());return n.setEnd(t,r??t.nodeValue.length),n.setStart(t,e||0),n},P3=function(){jl=null},yi=function(t,e,r,n){return r&&(Ad(t,e,r,n,-1)||Ad(t,e,r,n,1))},H3=/^(img|br|input|textarea|hr)$/i;function Ad(t,e,r,n,i){for(var s;;){if(t==r&&e==n)return!0;if(e==(i<0?0:tr(t))){let o=t.parentNode;if(!o||o.nodeType!=1||eo(t)||H3.test(t.nodeName)||t.contentEditable=="false")return!1;e=ft(t)+(i<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else t=o,e=i<0?tr(t):0}else return!1}}function tr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function q3(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=tr(t)}else if(t.parentNode&&!eo(t))e=ft(t),t=t.parentNode;else return null}}function V3(t,e){for(;;){if(t.nodeType==3&&e2),er=Wi||(Pr?/Mac/.test(Pr.platform):!1),U3=Pr?/Win/.test(Pr.platform):!1,on=/Android \d/.test(Un),to=!!Md&&"webkitFontSmoothing"in Md.documentElement.style,K3=to?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function G3(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 Yr(t,e){return typeof t=="number"?t:t[e]}function J3(t){let e=t.getBoundingClientRect(),r=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*r,top:e.top,bottom:e.top+t.clientHeight*n}}function Ed(t,e,r){let n=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let o=r||t.dom;o;){if(o.nodeType!=1){o=ji(o);continue}let a=o,l=a==s.body,u=l?G3(s):J3(a),c=0,d=0;if(e.topu.bottom-Yr(n,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+Yr(i,"top")-u.top:e.bottom-u.bottom+Yr(i,"bottom")),e.leftu.right-Yr(n,"right")&&(c=e.right-u.right+Yr(i,"right")),c||d)if(l)s.defaultView.scrollBy(c,d);else{let f=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let b=a.scrollLeft-f,y=a.scrollTop-p;e={left:e.left-b,top:e.top-y,right:e.right-b,bottom:e.bottom-y}}let h=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(h))break;o=h=="absolute"?o.offsetParent:ji(o)}}function Y3(t){let e=t.dom.getBoundingClientRect(),r=Math.max(0,e.top),n,i;for(let s=(e.left+e.right)/2,o=r+1;o=r-20){n=a,i=l.top;break}}return{refDOM:n,refTop:i,stack:Q1(t.dom)}}function Q1(t){let e=[],r=t.ownerDocument;for(let n=t;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),t!=r);n=ji(n));return e}function Z3({refDOM:t,refTop:e,stack:r}){let n=t?t.getBoundingClientRect().top:0;ep(r,n==0?0:n-e)}function ep(t,e){for(let r=0;r=a){o=Math.max(p.bottom,o),a=Math.min(p.top,a);let b=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=c,u={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!r&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!r&&l&&(r=l,i=u,n=0),r&&r.nodeType==3?Q3(r,i):!r||n&&r.nodeType==1?{node:t,offset:s}:tp(r,i)}function Q3(t,e){let r=t.nodeValue.length,n=document.createRange();for(let i=0;i=(s.left+s.right)/2?1:0)}}return{node:t,offset:0}}function Vu(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function e6(t,e){let r=t.parentNode;return r&&/^li$/i.test(r.nodeName)&&e.left(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(n,i,s)}function r6(t,e,r,n){let i=-1;for(let s=e,o=!1;s!=t.dom;){let a=t.docView.nearestDesc(s,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>n.left||l.top>n.top?i=a.posBefore:(!o&&l.right-1?i:t.docView.posFromDOM(e,r,-1)}function rp(t,e,r){let n=t.childNodes.length;if(n&&r.tope.top&&i++}let u;to&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(a=r6(t,n,i,e))}a==null&&(a=t6(t,o,e));let l=t.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Td(t){return t.top=0&&i==n.nodeValue.length?(l--,c=1):r<0?l--:u++,ls(Sn(rn(n,l,u),c),c<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(r<0||i==tr(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return q0(l.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(r<0||i==tr(n))){let l=n.childNodes[i-1],u=l.nodeType==3?rn(l,tr(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return ls(Sn(u,1),!1)}if(s==null&&i=0)}function ls(t,e){if(t.width==0)return t;let r=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:r,right:r}}function q0(t,e){if(t.height==0)return t;let r=e?t.top:t.bottom;return{top:r,bottom:r,left:t.left,right:t.right}}function ip(t,e,r){let n=t.state,i=t.root.activeElement;n!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return r()}finally{n!=e&&t.updateState(n),i!=t.dom&&i&&i.focus()}}function s6(t,e,r){let n=e.selection,i=r=="up"?n.$from:n.$to;return ip(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=np(t,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=rn(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(r=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}const o6=/[\u0590-\u08ac]/;function a6(t,e,r){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,s=!i,o=i==n.parent.content.size,a=t.domSelection();return a?!o6.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?s:o:ip(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",r,"character");let f=n.depth?t.docView.domAfterPos(n.before()):t.dom,{focusNode:p,focusOffset:b}=t.domSelectionRange(),y=p&&!f.contains(p.nodeType==1?p:p.parentNode)||l==p&&u==b;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return h!=null&&(a.caretBidiLevel=h),y}):n.pos==n.start()||n.pos==n.end()}let Dd=null,Od=null,Nd=!1;function l6(t,e,r){return Dd==e&&Od==r?Nd:(Dd=e,Od=r,Nd=r=="up"||r=="down"?s6(t,e,r):a6(t,e,r))}const sr=0,Ld=1,oi=2,Hr=3;class ro{constructor(e,r,n,i){this.parent=e,this.children=r,this.dom=n,this.contentDOM=i,this.dirty=sr,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,r,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let r=0;rft(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&r==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,r=!1){for(let n=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!r||s.node))if(n&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))n=!1;else return s}}getDesc(e){let r=e.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(e,r,n){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,r,n)}return-1}descAt(e){for(let r=0,n=0;re||o instanceof op){i=e-s;break}s=a}if(i)return this.children[n].domFromPos(i-this.children[n].border,r);for(let s;n&&!(s=this.children[n-1]).size&&s instanceof sp&&s.side>=0;n--);if(r<=0){let s,o=!0;for(;s=n?this.children[n-1]:null,!(!s||s.dom.parentNode==this.contentDOM);n--,o=!1);return s&&r&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,r):{node:this.contentDOM,offset:s?ft(s.dom)+1:0}}else{let s,o=!0;for(;s=n=c&&r<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,r,c);e=o;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=ft(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(u>r||a==this.children.length-1)){r=u;for(let c=a+1;cp&&or){let p=a;a=l,l=p}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,r){for(let n=0,i=0;i=n:en){let a=n+s.border,l=o-s.border;if(e>=a&&r<=l){this.dirty=e==n||r==o?oi:Ld,e==a&&r==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Hr:s.markDirty(e-a,r-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?oi:Hr}n=o}this.dirty=oi}markParentsDirty(){let e=1;for(let r=this.parent;r;r=r.parent,e++){let n=e==1?oi:Ld;r.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!r.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=r,this.widget=r,s=this}matchesWidget(e){return this.dirty==sr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let r=this.widget.spec.stopEvent;return r?r(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 u6 extends ro{constructor(e,r,n,i){super(e,[],r,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(e,r){return e!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class vi extends ro{constructor(e,r,n,i,s){super(e,[],n,i),this.mark=r,this.spec=s}static create(e,r,n,i){let s=i.nodeViews[r.type.name],o=s&&s(r,i,n);return(!o||!o.dom)&&(o=Si.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new vi(e,r,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Hr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Hr&&this.mark.eq(e)}markDirty(e,r){if(super.markDirty(e,r),this.dirty!=sr){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(s=Jl(s,0,e,n));for(let a=0;a{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,i),c=u&&u.dom,d=u&&u.contentDOM;if(r.isText){if(!c)c=document.createTextNode(r.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Si.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!d&&!r.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),r.type.spec.draggable&&(c.draggable=!0));let h=c;return c=up(c,n,r),u?l=new c6(e,r,n,i,c,d||null,h,u,s,o+1):r.isText?new o0(e,r,n,i,c,h,s):new Pn(e,r,n,i,c,d||null,h,s,o+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 r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>R.empty)}return e}matchesNode(e,r,n){return this.dirty==sr&&e.eq(this.node)&&la(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,r){let n=this.node.inlineContent,i=r,s=e.composing?this.localCompositionInfo(e,r):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new h6(this,o&&o.node,e);m6(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,n,e):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?we.none:this.node.child(c).marks,n,e),l.placeWidget(u,e,i)},(u,c,d,h)=>{l.syncToMarks(u.marks,n,e);let f;l.findNodeMatch(u,c,d,h)||a&&e.state.selection.from>i&&e.state.selection.to-1&&l.updateNodeAt(u,c,d,f,e)||l.updateNextNode(u,c,d,e,h,i)||l.addNode(u,c,d,e,i),i+=u.nodeSize}),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==oi)&&(o&&this.protectLocalComposition(e,o),ap(this.contentDOM,this.children,e),Wi&&g6(this.dom))}localCompositionInfo(e,r){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof ee)||nr+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=b6(this.node.content,o,n-r,i-r);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:r,pos:n,text:i}){if(this.getDesc(r))return;let s=r;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new u6(this,s,r,i);e.input.compositionNodes.push(o),this.children=Jl(this.children,n,n+i.length,e,o)}update(e,r,n,i){return this.dirty==Hr||!e.sameMarkup(this.node)?!1:(this.updateInner(e,r,n,i),!0)}updateInner(e,r,n,i){this.updateOuterDeco(r),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=sr}updateOuterDeco(e){if(la(e,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=lp(this.dom,this.nodeDOM,Gl(this.outerDeco,this.node,r),Gl(e,this.node,r)),this.dom!=n&&(n.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 _d(t,e,r,n,i){up(n,e,t);let s=new Pn(void 0,t,e,r,n,n,n,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class o0 extends Pn{constructor(e,r,n,i,s,o,a){super(e,r,n,i,s,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,r,n,i){return this.dirty==Hr||this.dirty!=sr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=sr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=sr,!0)}inParent(){let e=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,r,n){return e==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(e,r,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,r,n){let i=this.node.cut(e,r),s=document.createTextNode(i.text);return new o0(this.parent,i,this.outerDeco,this.innerDeco,s,s,n)}markDirty(e,r){super.markDirty(e,r),this.dom!=this.nodeDOM&&(e==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=Hr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class op extends ro{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==sr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class c6 extends Pn{constructor(e,r,n,i,s,o,a,l,u,c){super(e,r,n,i,s,o,a,u,c),this.spec=l}update(e,r,n,i){if(this.dirty==Hr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,r,n);return s&&this.updateInner(e,r,n,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,r,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,r,n,i){this.spec.setSelection?this.spec.setSelection(e,r,n.root):super.setSelection(e,r,n,i)}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 ap(t,e,r){let n=t.firstChild,i=!1;for(let s=0;s>1,o=Math.min(s,e.length);for(;i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=vi.create(this.top,e[s],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(e,r,n,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,r,n))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(n){let u=r.children[n-1];if(u instanceof vi)r=u,n=u.children.length;else{a=u,n--;break}}else{if(r==e)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function p6(t,e){return t.type.side-e.type.side}function m6(t,e,r,n){let i=e.locals(t),s=0;if(i.length==0){for(let u=0;us;)a.push(i[o++]);let p=s+h.nodeSize;if(h.isText){let y=p;o!y.inline):a.slice();n(h,b,e.forChild(s,h),f),s=p}}function g6(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 b6(t,e,r,n){for(let i=0,s=0;i=r){if(s>=n&&l.slice(n-e.length-a,n-a)==e)return n-e.length;let u=a=0&&u+e.length+a>=r)return a+u;if(r==n&&l.length>=n+e.length-a&&l.slice(n-a,n-a+e.length)==e)return n}}return-1}function Jl(t,e,r,n,i){let s=[];for(let o=0,a=0;o=r||c<=e?s.push(l):(ur&&s.push(l.slice(r-u,l.size,n)))}return s}function $u(t,e=null){let r=t.domSelectionRange(),n=t.state.doc;if(!r.focusNode)return null;let i=t.docView.nearestDesc(r.focusNode),s=i&&i.size==0,o=t.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(o<0)return null;let a=n.resolve(o),l,u;if(s0(r)){for(l=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&X.isSelectable(d)&&i.parent&&!(d.isInline&&$3(r.focusNode,r.focusOffset,i.dom))){let h=i.posBefore;u=new X(o==h?a:n.resolve(h))}}else{if(r instanceof t.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let d=o,h=o;for(let f=0;f{(r.anchorNode!=n||r.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!cp(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function v6(t){let e=t.domSelection();if(!e)return;let r=t.cursorWrapper.dom,n=r.nodeName=="IMG";n?e.collapse(r.parentNode,ft(r)+1):e.collapse(r,0),!n&&!t.state.selection.visible&&It&&Fn<=11&&(r.disabled=!0,r.disabled=!1)}function dp(t,e){if(e instanceof X){let r=t.docView.descAt(e.from);r!=t.lastSelectedViewDesc&&(Fd(t),r&&r.selectNode(),t.lastSelectedViewDesc=r)}else Fd(t)}function Fd(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ju(t,e,r,n){return t.someProp("createSelectionBetween",i=>i(t,e,r))||ee.between(e,r,n)}function Pd(t){return t.editable&&!t.hasFocus()?!1:hp(t)}function hp(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 x6(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),r=t.domSelectionRange();return yi(e.node,e.offset,r.anchorNode,r.anchorOffset)}function Yl(t,e){let{$anchor:r,$head:n}=t.selection,i=e>0?r.max(n):r.min(n),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&ne.findFrom(s,e)}function Cn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Hd(t,e,r){let n=t.state.selection;if(n instanceof ee)if(r.indexOf("s")>-1){let{$head:i}=n,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return Cn(t,new ee(n.$anchor,o))}else if(n.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Yl(t.state,e);return i&&i instanceof X?Cn(t,i):!1}else if(!(er&&r.indexOf("m")>-1)){let i=n.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=t.docView.descAt(a))&&!o.contentDOM?X.isSelectable(s)?Cn(t,new X(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):to?Cn(t,new ee(t.state.doc.resolve(e<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(n instanceof X&&n.node.isInline)return Cn(t,new ee(e>0?n.$to:n.$from));{let i=Yl(t.state,e);return i?Cn(t,i):!1}}}function ua(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ks(t,e){let r=t.pmViewDesc;return r&&r.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Ti(t,e){return e<0?k6(t):w6(t)}function k6(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let i,s,o=!1;for(ir&&r.nodeType==1&&n0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(ks(a,-1))i=r,s=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(fp(r))break;{let a=r.previousSibling;for(;a&&ks(a,-1);)i=r.parentNode,s=ft(a),a=a.previousSibling;if(a)r=a,n=ua(r);else{if(r=r.parentNode,r==t.dom)break;n=0}}}o?Zl(t,r,n):i&&Zl(t,i,s)}function w6(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let i=ua(r),s,o;for(;;)if(n{t.state==i&&un(t)},50)}function qd(t,e){let r=t.state.doc.resolve(e);if(!(bt||U3)&&r.parent.inlineContent){let i=t.coordsAtPos(e);if(e>r.start()){let s=t.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Vd(t,e,r){let n=t.state.selection;if(n instanceof ee&&!n.empty||r.indexOf("s")>-1||er&&r.indexOf("m")>-1)return!1;let{$from:i,$to:s}=n;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=Yl(t.state,e);if(o&&o instanceof X)return Cn(t,o)}if(!i.parent.inlineContent){let o=e<0?i:s,a=n instanceof Ut?ne.near(o,e):ne.findFrom(o,e);return a?Cn(t,a):!1}return!1}function $d(t,e){if(!(t.state.selection instanceof ee))return!0;let{$head:r,$anchor:n,empty:i}=t.state.selection;if(!r.sameParent(n))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){let o=t.state.tr;return e<0?o.delete(r.pos-s.nodeSize,r.pos):o.delete(r.pos,r.pos+s.nodeSize),t.dispatch(o),!0}return!1}function jd(t,e,r){t.domObserver.stop(),e.contentEditable=r,t.domObserver.start()}function A6(t){if(!Et||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:r}=t.domSelectionRange();if(e&&e.nodeType==1&&r==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;jd(t,n,"true"),setTimeout(()=>jd(t,n,"false"),20)}return!1}function M6(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function E6(t,e){let r=e.keyCode,n=M6(e);if(r==8||er&&r==72&&n=="c")return $d(t,-1)||Ti(t,-1);if(r==46&&!e.shiftKey||er&&r==68&&n=="c")return $d(t,1)||Ti(t,1);if(r==13||r==27)return!0;if(r==37||er&&r==66&&n=="c"){let i=r==37?qd(t,t.state.selection.from)=="ltr"?-1:1:-1;return Hd(t,i,n)||Ti(t,i)}else if(r==39||er&&r==70&&n=="c"){let i=r==39?qd(t,t.state.selection.from)=="ltr"?1:-1:1;return Hd(t,i,n)||Ti(t,i)}else{if(r==38||er&&r==80&&n=="c")return Vd(t,-1,n)||Ti(t,-1);if(r==40||er&&r==78&&n=="c")return A6(t)||Vd(t,1,n)||Ti(t,1);if(n==(er?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function Wu(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let r=[],{content:n,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,s--;let f=n.firstChild;r.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let o=t.someProp("clipboardSerializer")||Si.fromSchema(t.state.schema),a=vp(),l=a.createElement("div");l.appendChild(o.serializeFragment(n,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=yp[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=a.createElement(c[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(r)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,` `);return{dom:l,text:h,slice:e}}function pp(t,e,r,n,i){let s=i.parent.type.spec.code,o,a;if(!r&&!e)return null;let l=!!e&&(n||s||!r);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,s||n,t)}),s)return a=new V(R.from(t.state.schema.text(e.replace(/\r\n?/g,` `))),0,0),t.someProp("transformPasted",h=>{a=h(a,t,!0)}),a;let d=t.someProp("clipboardTextParser",h=>h(e,i,n,t));if(d)a=d;else{let h=i.marks(),{schema:f}=t.state,p=Si.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(b=>{let y=o.appendChild(document.createElement("p"));b&&y.appendChild(p.serializeNode(f.text(b,h)))})}}else t.someProp("transformPastedHTML",d=>{r=d(r,t)}),o=N6(r),to&&L6(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||an.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||c),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!T6.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)a=_6(Wd(a,+c[1],+c[2]),c[4]);else if(a=V.maxOpen(D6(a.content,i),!0),a.openStart||a.openEnd){let d=0,h=0;for(let f=a.content.firstChild;d{a=d(a,t,l)}),a}const T6=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function D6(t,e){if(t.childCount<2)return t;for(let r=e.depth;r>=0;r--){let i=e.node(r).contentMatchAt(e.index(r)),s,o=[];if(t.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),u;if(!l)return o=null;if(u=o.length&&s.length&&gp(l,s,a,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=bp(o[o.length-1],s.length));let c=mp(a,l);o.push(c),i=i.matchType(c.type),s=l}}),o)return R.from(o)}return t}function mp(t,e,r=0){for(let n=e.length-1;n>=r;n--)t=e[n].create(null,R.from(t));return t}function gp(t,e,r,n,i){if(i1&&(s=0),i=r&&(a=e<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(R.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function Wd(t,e,r){return er})),$0.createHTML(t)):t}function N6(t){let e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let r=vp().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(t),i;if((i=n&&yp[n[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>"").reverse().join("")),r.innerHTML=O6(t),i)for(let s=0;s=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;i=R.from(l.create(n[a+1],i)),s++,o++}return new V(i,s,o)}const Tt={},Dt={},z6={touchstart:!0,touchmove:!0};class R6{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function I6(t){for(let e in Tt){let r=Tt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=n=>{F6(t,n)&&!Uu(t,n)&&(t.editable||!(n.type in Dt))&&r(t,n)},z6[e]?{passive:!0}:void 0)}Et&&t.dom.addEventListener("input",()=>null),Ql(t)}function zn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function B6(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Ql(t){t.someProp("handleDOMEvents",e=>{for(let r in e)t.input.eventHandlers[r]||t.dom.addEventListener(r,t.input.eventHandlers[r]=n=>Uu(t,n))})}function Uu(t,e){return t.someProp("handleDOMEvents",r=>{let n=r[e.type];return n?n(t,e)||e.defaultPrevented:!1})}function F6(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let r=e.target;r!=t.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(e))return!1;return!0}function P6(t,e){!Uu(t,e)&&Tt[e.type]&&(t.editable||!(e.type in Dt))&&Tt[e.type](t,e)}Dt.keydown=(t,e)=>{let r=e;if(t.input.shiftKey=r.keyCode==16||r.shiftKey,!kp(t,r)&&(t.input.lastKeyCode=r.keyCode,t.input.lastKeyCodeTime=Date.now(),!(on&&bt&&r.keyCode==13)))if(r.keyCode!=229&&t.domObserver.forceFlush(),Wi&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();t.input.lastIOSEnter=n,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==n&&(t.someProp("handleKeyDown",i=>i(t,ni(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",n=>n(t,r))||E6(t,r)?r.preventDefault():zn(t,"key")};Dt.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Dt.keypress=(t,e)=>{let r=e;if(kp(t,r)||!r.charCode||r.ctrlKey&&!r.altKey||er&&r.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,r))){r.preventDefault();return}let n=t.state.selection;if(!(n instanceof ee)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(r.charCode),s=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,n.$from.pos,n.$to.pos,i,s))&&t.dispatch(s()),r.preventDefault()}};function a0(t){return{left:t.clientX,top:t.clientY}}function H6(t,e){let r=e.x-t.clientX,n=e.y-t.clientY;return r*r+n*n<100}function Ku(t,e,r,n,i){if(n==-1)return!1;let s=t.state.doc.resolve(n);for(let o=s.depth+1;o>0;o--)if(t.someProp(e,a=>o>s.depth?a(t,r,s.nodeAfter,s.before(o),i,!0):a(t,r,s.node(o),s.before(o),i,!1)))return!0;return!1}function Pi(t,e,r){if(t.focused||t.focus(),t.state.selection.eq(e))return;let n=t.state.tr.setSelection(e);n.setMeta("pointer",!0),t.dispatch(n)}function q6(t,e){if(e==-1)return!1;let r=t.state.doc.resolve(e),n=r.nodeAfter;return n&&n.isAtom&&X.isSelectable(n)?(Pi(t,new X(r)),!0):!1}function V6(t,e){if(e==-1)return!1;let r=t.state.selection,n,i;r instanceof X&&(n=r.node);let s=t.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(X.isSelectable(a)){n&&r.$from.depth>0&&o>=r.$from.depth&&s.before(r.$from.depth+1)==r.$from.pos?i=s.before(r.$from.depth):i=s.before(o);break}}return i!=null?(Pi(t,X.create(t.state.doc,i)),!0):!1}function $6(t,e,r,n,i){return Ku(t,"handleClickOn",e,r,n)||t.someProp("handleClick",s=>s(t,e,n))||(i?V6(t,r):q6(t,r))}function j6(t,e,r,n){return Ku(t,"handleDoubleClickOn",e,r,n)||t.someProp("handleDoubleClick",i=>i(t,e,n))}function W6(t,e,r,n){return Ku(t,"handleTripleClickOn",e,r,n)||t.someProp("handleTripleClick",i=>i(t,e,n))||U6(t,r,n)}function U6(t,e,r){if(r.button!=0)return!1;let n=t.state.doc;if(e==-1)return n.inlineContent?(Pi(t,ee.create(n,0,n.content.size)),!0):!1;let i=n.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)Pi(t,ee.create(n,a+1,a+1+o.content.size));else if(X.isSelectable(o))Pi(t,X.create(n,a));else continue;return!0}}function Gu(t){return ca(t)}const xp=er?"metaKey":"ctrlKey";Tt.mousedown=(t,e)=>{let r=e;t.input.shiftKey=r.shiftKey;let n=Gu(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&H6(r,t.input.lastClick)&&!r[xp]&&t.input.lastClick.button==r.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:s,button:r.button};let o=t.posAtCoords(a0(r));o&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new K6(t,o,r,!!n)):(s=="doubleClick"?j6:W6)(t,o.pos,o.inside,r)?r.preventDefault():zn(t,"pointer"))};class K6{constructor(e,r,n,i){this.view=e,this.pos=r,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[xp],this.allowDefault=n.shiftKey;let s,o;if(r.inside>-1)s=e.state.doc.nodeAt(r.inside),o=r.inside;else{let c=e.state.doc.resolve(r.pos);s=c.parent,o=c.depth?c.before():0}const a=i?null:n.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=e.state;(n.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof X&&u.from<=o&&u.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ir&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),zn(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>un(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(a0(e))),this.updateAllowDefault(e),this.allowDefault||!r?zn(this.view,"pointer"):$6(this.view,r.pos,r.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Et&&this.mightDrag&&!this.mightDrag.node.isAtom||bt&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(Pi(this.view,ne.near(this.view.state.doc.resolve(r.pos))),e.preventDefault()):zn(this.view,"pointer")}move(e){this.updateAllowDefault(e),zn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Tt.touchstart=t=>{t.input.lastTouch=Date.now(),Gu(t),zn(t,"pointer")};Tt.touchmove=t=>{t.input.lastTouch=Date.now(),zn(t,"pointer")};Tt.contextmenu=t=>Gu(t);function kp(t,e){return t.composing?!0:Et&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const G6=on?5e3:-1;Dt.compositionstart=Dt.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,r=e.selection.$to;if(e.selection instanceof ee&&(e.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||r.marks(),ca(t,!0),t.markCursor=null;else if(ca(t,!e.selection.empty),ir&&e.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=t.domSelectionRange();for(let i=n.focusNode,s=n.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}t.input.composing=!0}wp(t,G6)};Dt.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,wp(t,20))};function wp(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ca(t),e))}function Sp(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Y6());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function J6(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let r=q3(e.focusNode,e.focusOffset),n=V3(e.focusNode,e.focusOffset);if(r&&n&&r!=n){let i=n.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(r==s||n==s)return s;if(!i||!i.isText(n.nodeValue))return n;if(t.input.compositionNode==n){let o=r.pmViewDesc;if(!(!o||!o.isText(r.nodeValue)))return n}}return r||n}function Y6(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function ca(t,e=!1){if(!(on&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Sp(t),e||t.docView&&t.docView.dirty){let r=$u(t),n=t.state.selection;return r&&!r.eq(n)?t.dispatch(t.state.tr.setSelection(r)):(t.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Z6(t,e){if(!t.dom.parentNode)return;let r=t.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),t.focus()},50)}const Fs=It&&Fn<15||Wi&&K3<604;Tt.copy=Dt.cut=(t,e)=>{let r=e,n=t.state.selection,i=r.type=="cut";if(n.empty)return;let s=Fs?null:r.clipboardData,o=n.content(),{dom:a,text:l}=Wu(t,o);s?(r.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):Z6(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function X6(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Q6(t,e){if(!t.dom.parentNode)return;let r=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,n=t.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),n.parentNode&&n.parentNode.removeChild(n),r?Ps(t,n.value,null,i,e):Ps(t,n.textContent,n.innerHTML,i,e)},50)}function Ps(t,e,r,n,i){let s=pp(t,e,r,n,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,s||V.empty)))return!0;if(!s)return!1;let o=X6(s),a=o?t.state.tr.replaceSelectionWith(o,n):t.state.tr.replaceSelection(s);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Cp(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let r=t.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}Dt.paste=(t,e)=>{let r=e;if(t.composing&&!on)return;let n=Fs?null:r.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;n&&Ps(t,Cp(n),n.getData("text/html"),i,r)?r.preventDefault():Q6(t,r)};class Ap{constructor(e,r,n){this.slice=e,this.move=r,this.node=n}}const eg=er?"altKey":"ctrlKey";function Mp(t,e){let r=t.someProp("dragCopies",n=>!n(e));return r??!e[eg]}Tt.dragstart=(t,e)=>{let r=e,n=t.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(a0(r)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof X?i.to-1:i.to))){if(n&&n.mightDrag)o=X.create(t.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let d=t.docView.nearestDesc(r.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(o=X.create(t.state.doc,d.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:u,slice:c}=Wu(t,a);(!r.dataTransfer.files.length||!bt||X1>120)&&r.dataTransfer.clearData(),r.dataTransfer.setData(Fs?"Text":"text/html",l.innerHTML),r.dataTransfer.effectAllowed="copyMove",Fs||r.dataTransfer.setData("text/plain",u),t.dragging=new Ap(c,Mp(t,r),o)};Tt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Dt.dragover=Dt.dragenter=(t,e)=>e.preventDefault();Dt.drop=(t,e)=>{let r=e,n=t.dragging;if(t.dragging=null,!r.dataTransfer)return;let i=t.posAtCoords(a0(r));if(!i)return;let s=t.state.doc.resolve(i.pos),o=n&&n.slice;o?t.someProp("transformPasted",p=>{o=p(o,t,!1)}):o=pp(t,Cp(r.dataTransfer),Fs?null:r.dataTransfer.getData("text/html"),!1,s);let a=!!(n&&Mp(t,r));if(t.someProp("handleDrop",p=>p(t,r,o||V.empty,a))){r.preventDefault();return}if(!o)return;r.preventDefault();let l=o?$1(t.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let u=t.state.tr;if(a){let{node:p}=n;p?p.replace(u):u.deleteSelection()}let c=u.mapping.map(l),d=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,o.content.firstChild):u.replaceRange(c,c,o),u.doc.eq(h))return;let f=u.doc.resolve(c);if(d&&X.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new X(f));else{let p=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((b,y,x,S)=>p=S),u.setSelection(ju(t,f,u.doc.resolve(p)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};Tt.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&un(t)},20))};Tt.blur=(t,e)=>{let r=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),r.relatedTarget&&t.dom.contains(r.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Tt.beforeinput=(t,e)=>{if(bt&&on&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,ni(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in Dt)Tt[t]=Dt[t];function Hs(t,e){if(t==e)return!0;for(let r in t)if(t[r]!==e[r])return!1;for(let r in e)if(!(r in t))return!1;return!0}class da{constructor(e,r){this.toDOM=e,this.spec=r||hi,this.side=this.spec.side||0}map(e,r,n,i){let{pos:s,deleted:o}=e.mapResult(r.from+i,this.side<0?-1:1);return o?null:new rt(s-n,s-n,this)}valid(){return!0}eq(e){return this==e||e instanceof da&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Hs(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Hn{constructor(e,r){this.attrs=e,this.spec=r||hi}map(e,r,n,i){let s=e.map(r.from+i,this.spec.inclusiveStart?-1:1)-n,o=e.map(r.to+i,this.spec.inclusiveEnd?1:-1)-n;return s>=o?null:new rt(s,o,this)}valid(e,r){return r.from=e&&(!s||s(a.spec))&&n.push(a.copy(a.from+i,a.to+i))}for(let o=0;oe){let a=this.children[o]+1;this.children[o+2].findInner(e-a,r-a,n,i+a,s)}}map(e,r,n){return this==gt||e.maps.length==0?this:this.mapInner(e,r,0,0,n||hi)}mapInner(e,r,n,i,s){let o;for(let a=0;a{let u=l+n,c;if(c=Tp(r,a,u)){for(i||(i=this.children.slice());sa&&d.to=e){this.children[a]==e&&(n=this.children[a+2]);break}let s=e+1,o=s+r.content.size;for(let a=0;as&&l.type instanceof Hn){let u=Math.max(s,l.from)-s,c=Math.min(o,l.to)-s;ui.map(e,r,hi));return Tn.from(n)}forChild(e,r){if(r.isLeaf)return ze.empty;let n=[];for(let i=0;ir instanceof ze)?e:e.reduce((r,n)=>r.concat(n instanceof ze?n:n.members),[]))}}forEachSet(e){for(let r=0;r{let y=b-p-(f-h);for(let x=0;xS+c-d)continue;let M=a[x]+c-d;f>=M?a[x+1]=h<=M?-2:-1:h>=c&&y&&(a[x]+=y,a[x+1]+=y)}d+=y}),c=r.maps[u].map(c,-1)}let l=!1;for(let u=0;u=n.content.size){l=!0;continue}let h=r.map(t[u+1]+s,-1),f=h-i,{index:p,offset:b}=n.content.findIndex(d),y=n.maybeChild(p);if(y&&b==d&&b+y.nodeSize==f){let x=a[u+2].mapInner(r,y,c+1,t[u]+s+1,o);x!=gt?(a[u]=d,a[u+1]=f,a[u+2]=x):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=rg(a,t,e,r,i,s,o),c=ha(u,n,0,o);e=c.local;for(let d=0;dr&&o.to{let u=Tp(t,a,l+r);if(u){s=!0;let c=ha(u,a,r+l+1,n);c!=gt&&i.push(l,l+a.nodeSize,c)}});let o=Ep(s?Dp(t):t,-r).sort(fi);for(let a=0;a0;)e++;t.splice(e,0,r)}function j0(t){let e=[];return t.someProp("decorations",r=>{let n=r(t.state);n&&n!=gt&&e.push(n)}),t.cursorWrapper&&e.push(ze.create(t.state.doc,[t.cursorWrapper.deco])),Tn.from(e)}const ng={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ig=It&&Fn<=11;class sg{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class og{constructor(e,r){this.view=e,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new sg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),ig&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,ng)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let r=0;rthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Pd(this.view)){if(this.suppressingSelectionUpdates)return un(this.view);if(It&&Fn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&yi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let r=new Set,n;for(let s=e.focusNode;s;s=ji(s))r.add(s);for(let s=e.anchorNode;s;s=ji(s))if(r.has(s)){n=s;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Pd(e)&&!this.ignoreSelectionChange(n),s=-1,o=-1,a=!1,l=[];if(e.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,h]=c;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of c){let f=h.parentNode;f&&f.nodeName=="LI"&&(!d||ug(e,d)!=f)&&h.remove()}}}let u=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||i)&&(s>-1&&(e.docView.markDirty(s,o),ag(e)),this.handleDOMChange(s,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||un(e),this.currentSelection.set(n))}registerMutation(e,r){if(r.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;ci;y--){let x=n.childNodes[y-1],S=x.pmViewDesc;if(x.nodeName=="BR"&&!S){s=y;break}if(!S||S.size)break}let d=t.state.doc,h=t.someProp("domParser")||an.fromSchema(t.state.schema),f=d.resolve(o),p=null,b=h.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:s,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:dg,context:f});if(u&&u[0].pos!=null){let y=u[0].pos,x=u[1]&&u[1].pos;x==null&&(x=y),p={anchor:y+o,head:x+o}}return{doc:b,sel:p,from:o,to:a}}function dg(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Et&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(t.parentNode.lastChild==t||Et&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const hg=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function fg(t,e,r,n,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let O=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=$u(t,O);if(I&&!t.state.selection.eq(I)){if(bt&&on&&t.input.lastKeyCode===13&&Date.now()-100$(t,ni(13,"Enter"))))return;let _=t.state.tr.setSelection(I);O=="pointer"?_.setMeta("pointer",!0):O=="key"&&_.scrollIntoView(),s&&_.setMeta("composition",s),t.dispatch(_)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(r);e=o.before(a+1),r=t.state.doc.resolve(r).after(a+1);let l=t.state.selection,u=cg(t,e,r),c=t.state.doc,d=c.slice(u.from,u.to),h,f;t.input.lastKeyCode===8&&Date.now()-100Date.now()-225||on)&&i.some(O=>O.nodeType==1&&!hg.test(O.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",O=>O(t,ni(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(n&&l instanceof ee&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let O=Zd(t,t.state.doc,u.sel);if(O&&!O.eq(t.state.selection)){let I=t.state.tr.setSelection(O);s&&I.setMeta("composition",s),t.dispatch(I)}}return}t.state.selection.fromt.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?p.start=t.state.selection.from:p.endA=t.state.selection.to-2&&t.state.selection.to<=u.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),It&&Fn<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let b=u.doc.resolveNoCache(p.start-u.from),y=u.doc.resolveNoCache(p.endB-u.from),x=c.resolve(p.start),S=b.sameParent(y)&&b.parent.inlineContent&&x.end()>=p.endA;if((Wi&&t.input.lastIOSEnter>Date.now()-225&&(!S||i.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!S&&b.posO(t,ni(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&mg(c,p.start,p.endA,b,y)&&t.someProp("handleKeyDown",O=>O(t,ni(8,"Backspace")))){on&&bt&&t.domObserver.suppressSelectionUpdates();return}bt&&p.endB==p.start&&(t.input.lastChromeDelete=Date.now()),on&&!S&&b.start()!=y.start()&&y.parentOffset==0&&b.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,y=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(O){return O(t,ni(13,"Enter"))})},20));let M=p.start,w=p.endA,T=O=>{let I=O||t.state.tr.replace(M,w,u.doc.slice(p.start-u.from,p.endB-u.from));if(u.sel){let _=Zd(t,I.doc,u.sel);_&&!(bt&&t.composing&&_.empty&&(p.start!=p.endB||t.input.lastChromeDeleteun(t),20));let O=T(t.state.tr.delete(M,w)),I=c.resolve(p.start).marksAcross(c.resolve(p.endA));I&&O.ensureMarks(I),t.dispatch(O)}else if(p.endA==p.endB&&(D=pg(b.parent.content.cut(b.parentOffset,y.parentOffset),x.parent.content.cut(x.parentOffset,p.endA-x.start())))){let O=T(t.state.tr);D.type=="add"?O.addMark(M,w,D.mark):O.removeMark(M,w,D.mark),t.dispatch(O)}else if(b.parent.child(b.index()).isText&&b.index()==y.index()-(y.textOffset?0:1)){let O=b.parent.textBetween(b.parentOffset,y.parentOffset),I=()=>T(t.state.tr.insertText(O,M,w));t.someProp("handleTextInput",_=>_(t,M,w,O,I))||t.dispatch(I())}else t.dispatch(T());else t.dispatch(T())}function Zd(t,e,r){return Math.max(r.anchor,r.head)>e.content.size?null:ju(t,e.resolve(r.anchor),e.resolve(r.head))}function pg(t,e){let r=t.firstChild.marks,n=e.firstChild.marks,i=r,s=n,o,a,l;for(let c=0;cc.mark(a.addToSet(c.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cr||W0(o,!0,!1)0&&(e||t.indexAfter(n)==t.node(n).childCount);)n--,i++,e=!1;if(r){let s=t.node(n).maybeChild(t.indexAfter(n));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function gg(t,e,r,n,i){let s=t.findDiffStart(e,r);if(s==null)return null;let{a:o,b:a}=t.findDiffEnd(e,r+t.size,r+e.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,s&&s=a?s-n:0;s-=l,s&&s=56320&&e<=57343&&r>=55296&&r<=56319}class Op{constructor(e,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new R6,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(nh),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=th(this),eh(this),this.nodeViews=rh(this),this.docView=_d(this.state.doc,Qd(this),j0(this),this.dom,this),this.domObserver=new og(this,(n,i,s,o)=>fg(this,n,i,s,o)),this.domObserver.start(),I6(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let r in e)this._props[r]=e[r];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ql(this);let r=this._props;this._props=e,e.plugins&&(e.plugins.forEach(nh),this.directPlugins=e.plugins),this.updateStateInner(e.state,r)}setProps(e){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in e)r[n]=e[n];this.update(r)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,r){var n;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(Sp(this),o=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=r.plugins;if(a||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=rh(this);yg(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(a||r.handleDOMEvents!=this._props.handleDOMEvents)&&Ql(this),this.editable=th(this),eh(this);let l=j0(this),u=Qd(this),c=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,u,l);(d||!e.selection.eq(i.selection))&&(o=!0);let h=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&Y3(this);if(o){this.domObserver.stop();let f=d&&(It||bt)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&bg(i.selection,e.selection);if(d){let p=bt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=J6(this)),(s||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=_d(e.doc,u,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&x6(this))?un(this,f):(dp(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&Z3(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof X){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&Ed(this,r.getBoundingClientRect(),e)}else Ed(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r0&&this.state.doc.nodeAt(s))==n.node&&(i=s)}this.dragging=new Ap(e.slice,e.move,i<0?void 0:X.create(this.state.doc,i))}someProp(e,r){let n=this._props&&this._props[e],i;if(n!=null&&(i=r?r(n):n))return i;for(let o=0;or.ownerDocument.getSelection()),this._root=r}return e||document}updateRoot(){this._root=null}posAtCoords(e){return n6(this,e)}coordsAtPos(e,r=1){return np(this,e,r)}domAtPos(e,r=0){return this.docView.domFromPos(e,r)}nodeDOM(e){let r=this.docView.descAt(e);return r?r.nodeDOM:null}posAtDOM(e,r,n=-1){let i=this.docView.posFromDOM(e,r,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,r){return l6(this,r||this.state,e)}pasteHTML(e,r){return Ps(this,"",e,!1,r||new ClipboardEvent("paste"))}pasteText(e,r){return Ps(this,e,null,!0,r||new ClipboardEvent("paste"))}serializeForClipboard(e){return Wu(this,e)}destroy(){this.docView&&(B6(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],j0(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,P3())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return P6(this,e)}domSelectionRange(){let e=this.domSelection();return e?Et&&this.root.nodeType===11&&j3(this.dom.ownerDocument)==this.dom&&lg(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Op.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function Qd(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(t.state)),r)for(let n in r)n=="class"?e.class+=" "+r[n]:n=="style"?e.style=(e.style?e.style+";":"")+r[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(r[n]))}),e.translate||(e.translate="no"),[rt.node(0,t.state.doc.content.size,e)]}function eh(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:rt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function th(t){return!t.someProp("editable",e=>e(t.state)===!1)}function bg(t,e){let r=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(r)!=e.$anchor.start(r)}function rh(t){let e=Object.create(null);function r(n){for(let i in n)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=n[i])}return t.someProp("nodeViews",r),t.someProp("markViews",r),e}function yg(t,e){let r=0,n=0;for(let i in t){if(t[i]!=e[i])return!0;r++}for(let i in e)n++;return r!=n}function nh(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var hn={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:"'"},fa={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},vg=typeof navigator<"u"&&/Mac/.test(navigator.platform),xg=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var pt=0;pt<10;pt++)hn[48+pt]=hn[96+pt]=String(pt);for(var pt=1;pt<=24;pt++)hn[pt+111]="F"+pt;for(var pt=65;pt<=90;pt++)hn[pt]=String.fromCharCode(pt+32),fa[pt]=String.fromCharCode(pt);for(var U0 in hn)fa.hasOwnProperty(U0)||(fa[U0]=hn[U0]);function Np(t){var e=vg&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||xg&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",r=!e&&t.key||(t.shiftKey?fa:hn)[t.keyCode]||t.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const kg=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),wg=typeof navigator<"u"&&/Win/.test(navigator.platform);function Sg(t){let e=t.split(/-(?!$)/),r=e[e.length-1];r=="Space"&&(r=" ");let n,i,s,o;for(let a=0;at.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function _p(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("backward",t):r.parentOffset>0)?null:r}const zp=(t,e,r)=>{let n=_p(t,r);if(!n)return!1;let i=Xu(n);if(!i){let o=n.blockRange(),a=o&&rs(o);return a==null?!1:(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if($p(t,i,e,-1))return!0;if(n.parent.content.size==0&&(Ui(s,"end")||X.isSelectable(s)))for(let o=n.depth;;o--){let a=n0(t.doc,n.before(o),n.after(o),V.empty);if(a&&a.slice.size1)break}return s.isAtom&&i.depth==n.depth-1?(e&&e(t.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},Mg=(t,e,r)=>{let n=_p(t,r);if(!n)return!1;let i=Xu(n);return i?Rp(t,i,e):!1},Eg=(t,e,r)=>{let n=Bp(t,r);if(!n)return!1;let i=Qu(n);return i?Rp(t,i,e):!1};function Rp(t,e,r){let n=e.nodeBefore,i=n,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=n0(t.doc,s,l,V.empty);if(!u||u.from!=s||u instanceof at&&u.slice.size>=l-s)return!1;if(r){let c=t.tr.step(u);c.setSelection(ee.create(c.doc,s)),r(c.scrollIntoView())}return!0}function Ui(t,e,r=!1){for(let n=t;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const Ip=(t,e,r)=>{let{$head:n,empty:i}=t.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",t):n.parentOffset>0)return!1;s=Xu(n)}let o=s&&s.nodeBefore;return!o||!X.isSelectable(o)?!1:(e&&e(t.tr.setSelection(X.create(t.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function Xu(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 Bp(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("forward",t):r.parentOffset{let n=Bp(t,r);if(!n)return!1;let i=Qu(n);if(!i)return!1;let s=i.nodeAfter;if($p(t,i,e,1))return!0;if(n.parent.content.size==0&&(Ui(s,"start")||X.isSelectable(s))){let o=n0(t.doc,n.before(),n.after(),V.empty);if(o&&o.slice.size{let{$head:n,empty:i}=t.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",t):n.parentOffset=0;e--){let r=t.node(e);if(t.index(e)+1{let r=t.selection,n=r instanceof X,i;if(n){if(r.node.isTextblock||!Wn(t.doc,r.from))return!1;i=r.from}else if(i=r0(t.doc,r.from,-1),i==null)return!1;if(e){let s=t.tr.join(i);n&&s.setSelection(X.create(s.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Dg=(t,e)=>{let r=t.selection,n;if(r instanceof X){if(r.node.isTextblock||!Wn(t.doc,r.to))return!1;n=r.to}else if(n=r0(t.doc,r.to,1),n==null)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0},Og=(t,e)=>{let{$from:r,$to:n}=t.selection,i=r.blockRange(n),s=i&&rs(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},Hp=(t,e)=>{let{$head:r,$anchor:n}=t.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(e&&e(t.tr.insertText(` `).scrollIntoView()),!0)};function ec(t){for(let e=0;e{let{$head:r,$anchor:n}=t.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),s=r.indexAfter(-1),o=ec(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let a=r.after(),l=t.tr.replaceWith(a,a,o.createAndFill());l.setSelection(ne.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},qp=(t,e)=>{let r=t.selection,{$from:n,$to:i}=r;if(r instanceof Ut||n.parent.inlineContent||i.parent.inlineContent)return!1;let s=ec(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!n.parentOffset&&i.index(){let{$cursor:r}=t.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let s=r.before();if(ln(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let n=r.blockRange(),i=n&&rs(n);return i==null?!1:(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)};function Lg(t){return(e,r)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof X&&e.selection.node.isBlock)return!n.parentOffset||!ln(e.doc,n.pos)?!1:(r&&r(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let s=[],o,a,l=!1,u=!1;for(let f=n.depth;;f--)if(n.node(f).isBlock){l=n.end(f)==n.pos+(n.depth-f),u=n.start(f)==n.pos-(n.depth-f),a=ec(n.node(f-1).contentMatchAt(n.indexAfter(f-1))),s.unshift(l&&a?{type:a}:null),o=f;break}else{if(f==1)return!1;s.unshift(null)}let c=e.tr;(e.selection instanceof ee||e.selection instanceof Ut)&&c.deleteSelection();let d=c.mapping.map(n.pos),h=ln(c.doc,d,s.length,s);if(h||(s[0]=a?{type:a}:null,h=ln(c.doc,d,s.length,s)),!h)return!1;if(c.split(d,s.length,s),!l&&u&&n.node(o).type!=a){let f=c.mapping.map(n.before(o)),p=c.doc.resolve(f);a&&n.node(o-1).canReplaceWith(p.index(),p.index()+1,a)&&c.setNodeMarkup(c.mapping.map(n.before(o)),a)}return r&&r(c.scrollIntoView()),!0}}const _g=Lg(),zg=(t,e)=>{let{$from:r,to:n}=t.selection,i,s=r.sharedDepth(n);return s==0?!1:(i=r.before(s),e&&e(t.tr.setSelection(X.create(t.doc,i))),!0)};function Rg(t,e,r){let n=e.nodeBefore,i=e.nodeAfter,s=e.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&e.parent.canReplace(s-1,s)?(r&&r(t.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||Wn(t.doc,e.pos))?!1:(r&&r(t.tr.join(e.pos).scrollIntoView()),!0)}function $p(t,e,r,n){let i=e.nodeBefore,s=e.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&Rg(t,e,r))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(r){let f=e.pos+s.nodeSize,p=R.empty;for(let x=o.length-1;x>=0;x--)p=R.from(o[x].create(null,p));p=R.from(i.copy(p));let b=t.tr.step(new ut(e.pos-1,f,e.pos,f,new V(p,1,0),o.length,!0)),y=b.doc.resolve(f+2*o.length);y.nodeAfter&&y.nodeAfter.type==i.type&&Wn(b.doc,y.pos)&&b.join(y.pos),r(b.scrollIntoView())}return!0}let c=s.type.spec.isolating||n>0&&l?null:ne.findFrom(e,1),d=c&&c.$from.blockRange(c.$to),h=d&&rs(d);if(h!=null&&h>=e.depth)return r&&r(t.tr.lift(d,h).scrollIntoView()),!0;if(u&&Ui(s,"start",!0)&&Ui(i,"end")){let f=i,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let b=s,y=1;for(;!b.isTextblock;b=b.firstChild)y++;if(f.canReplace(f.childCount,f.childCount,b.content)){if(r){let x=R.empty;for(let M=p.length-1;M>=0;M--)x=R.from(p[M].copy(x));let S=t.tr.step(new ut(e.pos-p.length,e.pos+s.nodeSize,e.pos+y,e.pos+s.nodeSize-y,new V(x,p.length,0),0,!0));r(S.scrollIntoView())}return!0}}return!1}function jp(t){return function(e,r){let n=e.selection,i=t<0?n.$from:n.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(r&&r(e.tr.setSelection(ee.create(e.doc,t<0?i.start(s):i.end(s)))),!0):!1}}const Ig=jp(-1),Bg=jp(1);function Fg(t,e=null){return function(r,n){let{$from:i,$to:s}=r.selection,o=i.blockRange(s),a=o&&Pu(o,t,e);return a?(n&&n(r.tr.wrap(o,a).scrollIntoView()),!0):!1}}function ih(t,e=null){return function(r,n){let i=!1;for(let s=0;s{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let c=r.doc.resolve(u),d=c.index();i=c.parent.canReplaceWith(d,d+1,t)}})}if(!i)return!1;if(n){let s=r.tr;for(let o=0;o=2&&e.$from.node(e.depth-1).type.compatibleContent(r)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);s=new aa(l,l,e.depth),e.endIndex=0;c--)s=R.from(r[c].type.create(r[c].attrs,s));t.step(new ut(e.start-(n?2:0),e.end,e.start,e.end,new V(s,0,0),r.length,!0));let o=0;for(let c=0;co.childCount>0&&o.firstChild.type==t);return s?r?n.node(s.depth-1).type==t?$g(e,r,t,s):jg(e,r,s):!0:!1}}function $g(t,e,r,n){let i=t.tr,s=n.end,o=n.$to.end(n.depth);sb;p--)f-=i.child(p).nodeSize,n.delete(f-1,f+1);let s=n.doc.resolve(r.start),o=s.nodeAfter;if(n.mapping.map(r.end)!=r.start+s.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==i.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(a?0:1),c+1,o.content.append(l?R.empty:R.from(i))))return!1;let d=s.pos,h=d+o.nodeSize;return n.step(new ut(d-(a?1:0),h+(l?1:0),d+1,h-1,new V((a?R.empty:R.from(i.copy(R.empty))).append(l?R.empty:R.from(i.copy(R.empty))),a?0:1,l?0:1),a?0:1)),e(n.scrollIntoView()),!0}function Wg(t){return function(e,r){let{$from:n,$to:i}=e.selection,s=n.blockRange(i,u=>u.childCount>0&&u.firstChild.type==t);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=t)return!1;if(r){let u=l.lastChild&&l.lastChild.type==a.type,c=R.from(u?t.create():null),d=new V(R.from(t.create(null,R.from(a.type.create(null,c)))),u?3:1,0),h=s.start,f=s.end;r(e.tr.step(new ut(h-(u?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function l0(t){const{state:e,transaction:r}=t;let{selection:n}=r,{doc:i}=r,{storedMarks:s}=r;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return n},get doc(){return i},get tr(){return n=r.selection,i=r.doc,s=r.storedMarks,r}}}class u0{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:r,state:n}=this,{view:i}=r,{tr:s}=n,o=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>{const d=l(...c)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a=[],l=!!e,u=e||s.tr,c=()=>(!l&&r&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(u),a.every(h=>h===!0)),d={...Object.fromEntries(Object.entries(n).map(([h,f])=>[h,(...b)=>{const y=this.buildProps(u,r),x=f(...b)(y);return a.push(x),d}])),run:c};return d}createCan(e){const{rawCommands:r,state:n}=this,i=!1,s=e||n.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...c)=>u(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(e,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a={tr:e,editor:i,view:o,state:l0({state:s,transaction:e}),dispatch:r?()=>{}:void 0,chain:()=>this.createChain(e,r),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)(a)]))}};return a}}class Ug{constructor(){this.callbacks={}}on(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),this}emit(e,...r){const n=this.callbacks[e];return n&&n.forEach(i=>i.apply(this,r)),this}off(e,r){const n=this.callbacks[e];return n&&(r?this.callbacks[e]=n.filter(i=>i!==r):delete this.callbacks[e]),this}once(e,r){const n=(...i)=>{this.off(e,n),r.apply(this,i)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}}function J(t,e,r){return t.config[e]===void 0&&t.parent?J(t.parent,e,r):typeof t.config[e]=="function"?t.config[e].bind({...r,parent:t.parent?J(t.parent,e,r):null}):t.config[e]}function c0(t){const e=t.filter(i=>i.type==="extension"),r=t.filter(i=>i.type==="node"),n=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:r,markExtensions:n}}function Wp(t){const e=[],{nodeExtensions:r,markExtensions:n}=c0(t),i=[...r,...n],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:i},l=J(o,"addGlobalAttributes",a);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([h,f])=>{e.push({type:d,name:h,attribute:{...s,...f}})})})})}),i.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=J(o,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([c,d])=>{const h={...s,...d};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),h!=null&&h.isRequired&&(h==null?void 0:h.default)===void 0&&delete h.default,e.push({type:o.name,name:c,attribute:h})})}),e}function dt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Se(...t){return t.filter(e=>!!e).reduce((e,r)=>{const n={...e};return Object.entries(r).forEach(([i,s])=>{if(!n[i]){n[i]=s;return}if(i==="class"){const a=s?String(s).split(" "):[],l=n[i]?n[i].split(" "):[],u=a.filter(c=>!l.includes(c));n[i]=[...l,...u].join(" ")}else if(i==="style"){const a=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],l=n[i]?n[i].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{const[d,h]=c.split(":").map(f=>f.trim());u.set(d,h)}),a.forEach(c=>{const[d,h]=c.split(":").map(f=>f.trim());u.set(d,h)}),n[i]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else n[i]=s}),n},{})}function eu(t,e){return e.filter(r=>r.type===t.type.name).filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(t.attrs)||{}:{[r.name]:t.attrs[r.name]}).reduce((r,n)=>Se(r,n),{})}function Up(t){return typeof t=="function"}function pe(t,e=void 0,...r){return Up(t)?e?t.bind(e)(...r):t(...r):t}function Kg(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Gg(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function sh(t,e){return"style"in t?t:{...t,getAttrs:r=>{const n=t.getAttrs?t.getAttrs(r):t.attrs;if(n===!1)return!1;const i=e.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(r):Gg(r.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...n,...i}}}}function oh(t){return Object.fromEntries(Object.entries(t).filter(([e,r])=>e==="attrs"&&Kg(r)?!1:r!=null))}function Jg(t,e){var r;const n=Wp(t),{nodeExtensions:i,markExtensions:s}=c0(t),o=(r=i.find(u=>J(u,"topNode")))===null||r===void 0?void 0:r.name,a=Object.fromEntries(i.map(u=>{const c=n.filter(x=>x.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},h=t.reduce((x,S)=>{const M=J(S,"extendNodeSchema",d);return{...x,...M?M(u):{}}},{}),f=oh({...h,content:pe(J(u,"content",d)),marks:pe(J(u,"marks",d)),group:pe(J(u,"group",d)),inline:pe(J(u,"inline",d)),atom:pe(J(u,"atom",d)),selectable:pe(J(u,"selectable",d)),draggable:pe(J(u,"draggable",d)),code:pe(J(u,"code",d)),whitespace:pe(J(u,"whitespace",d)),linebreakReplacement:pe(J(u,"linebreakReplacement",d)),defining:pe(J(u,"defining",d)),isolating:pe(J(u,"isolating",d)),attrs:Object.fromEntries(c.map(x=>{var S;return[x.name,{default:(S=x==null?void 0:x.attribute)===null||S===void 0?void 0:S.default}]}))}),p=pe(J(u,"parseHTML",d));p&&(f.parseDOM=p.map(x=>sh(x,c)));const b=J(u,"renderHTML",d);b&&(f.toDOM=x=>b({node:x,HTMLAttributes:eu(x,c)}));const y=J(u,"renderText",d);return y&&(f.toText=y),[u.name,f]})),l=Object.fromEntries(s.map(u=>{const c=n.filter(y=>y.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},h=t.reduce((y,x)=>{const S=J(x,"extendMarkSchema",d);return{...y,...S?S(u):{}}},{}),f=oh({...h,inclusive:pe(J(u,"inclusive",d)),excludes:pe(J(u,"excludes",d)),group:pe(J(u,"group",d)),spanning:pe(J(u,"spanning",d)),code:pe(J(u,"code",d)),attrs:Object.fromEntries(c.map(y=>{var x;return[y.name,{default:(x=y==null?void 0:y.attribute)===null||x===void 0?void 0:x.default}]}))}),p=pe(J(u,"parseHTML",d));p&&(f.parseDOM=p.map(y=>sh(y,c)));const b=J(u,"renderHTML",d);return b&&(f.toDOM=y=>b({mark:y,HTMLAttributes:eu(y,c)})),[u.name,f]}));return new Iu({topNode:o,nodes:a,marks:l})}function G0(t,e){return e.nodes[t]||e.marks[t]||null}function ah(t,e){return Array.isArray(e)?e.some(r=>(typeof r=="string"?r:r.name)===t.name):e}function no(t,e){const r=Si.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}const Yg=(t,e=500)=>{let r="";const n=t.parentOffset;return t.parent.nodesBetween(Math.max(0,n-e),n,(i,s,o,a)=>{var l,u;const c=((u=(l=i.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";r+=i.isAtom&&!i.isText?c:c.slice(0,Math.max(0,n-s))}),r};function rc(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class d0{constructor(e){this.find=e.find,this.handler=e.handler}}const Zg=(t,e)=>{if(rc(e))return e.exec(t);const r=e(t);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=t,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function xo(t){var e;const{editor:r,from:n,to:i,text:s,rules:o,plugin:a}=t,{view:l}=r;if(l.composing)return!1;const u=l.state.doc.resolve(n);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(h=>h.type.spec.code))return!1;let c=!1;const d=Yg(u)+s;return o.forEach(h=>{if(c)return;const f=Zg(d,h.find);if(!f)return;const p=l.state.tr,b=l0({state:l.state,transaction:p}),y={from:n-(f[0].length-s.length),to:i},{commands:x,chain:S,can:M}=new u0({editor:r,state:b});h.handler({state:b,range:y,match:f,commands:x,chain:S,can:M})===null||!p.steps.length||(p.setMeta(a,{transform:p,from:n,to:i,text:s}),l.dispatch(p),c=!0)}),c}function Xg(t){const{editor:e,rules:r}=t,n=new Ve({state:{init(){return null},apply(i,s,o){const a=i.getMeta(n);if(a)return a;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=no(R.from(c),o.schema);const{from:d}=l,h=d+c.length;xo({editor:e,from:d,to:h,text:c,rules:r,plugin:n})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return xo({editor:e,from:s,to:o,text:a,rules:r,plugin:n})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&xo({editor:e,from:s.pos,to:s.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?xo({editor:e,from:o.pos,to:o.pos,text:` `,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function Qg(t){return Object.prototype.toString.call(t).slice(8,-1)}function ko(t){return Qg(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function h0(t,e){const r={...t};return ko(t)&&ko(e)&&Object.keys(e).forEach(n=>{ko(e[n])&&ko(t[n])?r[n]=h0(t[n],e[n]):r[n]=e[n]}),r}class mt{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(J(this,"addOptions",{name:this.name}))),this.storage=pe(J(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new mt(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>h0(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new mt(e);return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=pe(J(r,"addOptions",{name:r.name})),r.storage=pe(J(r,"addStorage",{name:r.name,options:r.options})),r}static handleExit({editor:e,mark:r}){const{tr:n}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===r.name))return!1;const l=o.find(u=>(u==null?void 0:u.type.name)===r.name);return l&&n.removeStoredMark(l),n.insertText(" ",i.pos),e.view.dispatch(n),!0}return!1}}function e5(t){return typeof t=="number"}class t5{constructor(e){this.find=e.find,this.handler=e.handler}}const r5=(t,e,r)=>{if(rc(e))return[...t.matchAll(e)];const n=e(t,r);return n?n.map(i=>{const s=[i.text];return s.index=i.index,s.input=t,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function n5(t){const{editor:e,state:r,from:n,to:i,rule:s,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:u,can:c}=new u0({editor:e,state:r}),d=[];return r.doc.nodesBetween(n,i,(f,p)=>{if(!f.isTextblock||f.type.spec.code)return;const b=Math.max(n,p),y=Math.min(i,p+f.content.size),x=f.textBetween(b-p,y-p,void 0,"");r5(x,s.find,o).forEach(M=>{if(M.index===void 0)return;const w=b+M.index+1,T=w+M[0].length,D={from:r.tr.mapping.map(w),to:r.tr.mapping.map(T)},O=s.handler({state:r,range:D,match:M,commands:l,chain:u,can:c,pasteEvent:o,dropEvent:a});d.push(O)})}),d.every(f=>f!==null)}let wo=null;const i5=t=>{var e;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=r.clipboardData)===null||e===void 0||e.setData("text/html",t),r};function s5(t){const{editor:e,rules:r}=t;let n=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:c,from:d,to:h,rule:f,pasteEvt:p})=>{const b=c.tr,y=l0({state:c,transaction:b});if(!(!n5({editor:e,state:y,from:Math.max(d-1,0),to:h.b-1,rule:f,pasteEvent:p,dropEvent:a})||!b.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,b}};return r.map(c=>new Ve({view(d){const h=p=>{var b;n=!((b=d.dom.parentElement)===null||b===void 0)&&b.contains(p.target)?d.dom.parentElement:null,n&&(wo=e)},f=()=>{wo&&(wo=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(d,h)=>{if(s=n===d.dom.parentElement,a=h,!s){const f=wo;f!=null&&f.isEditable&&setTimeout(()=>{const p=f.state.selection;p&&f.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,h)=>{var f;const p=(f=h.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return o=h,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,h,f)=>{const p=d[0],b=p.getMeta("uiEvent")==="paste"&&!i,y=p.getMeta("uiEvent")==="drop"&&!s,x=p.getMeta("applyPasteRules"),S=!!x;if(!b&&!y&&!S)return;if(S){let{text:T}=x;typeof T=="string"?T=T:T=no(R.from(T),f.schema);const{from:D}=x,O=D+T.length,I=i5(T);return l({rule:c,state:f,from:D,to:{b:O},pasteEvt:I})}const M=h.doc.content.findDiffStart(f.doc.content),w=h.doc.content.findDiffEnd(f.doc.content);if(!(!e5(M)||!w||M===w.b))return l({rule:c,state:f,from:M,to:w,pasteEvt:o})}}))}function o5(t){const e=t.filter((r,n)=>t.indexOf(r)!==n);return Array.from(new Set(e))}class Bi{constructor(e,r){this.splittableMarks=[],this.editor=r,this.extensions=Bi.resolve(e),this.schema=Jg(this.extensions,r),this.setupExtensions()}static resolve(e){const r=Bi.sort(Bi.flatten(e)),n=o5(r.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),r}static flatten(e){return e.map(r=>{const n={name:r.name,options:r.options,storage:r.storage},i=J(r,"addExtensions",n);return i?[r,...this.flatten(i())]:r}).flat(10)}static sort(e){return e.sort((n,i)=>{const s=J(n,"priority")||100,o=J(i,"priority")||100;return s>o?-1:s{const n={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:G0(r.name,this.schema)},i=J(r,"addCommands",n);return i?{...e,...i()}:e},{})}get plugins(){const{editor:e}=this,r=Bi.sort([...this.extensions].reverse()),n=[],i=[],s=r.map(o=>{const a={name:o.name,options:o.options,storage:o.storage,editor:e,type:G0(o.name,this.schema)},l=[],u=J(o,"addKeyboardShortcuts",a);let c={};if(o.type==="mark"&&J(o,"exitable",a)&&(c.ArrowRight=()=>mt.handleExit({editor:e,mark:o})),u){const b=Object.fromEntries(Object.entries(u()).map(([y,x])=>[y,()=>x({editor:e})]));c={...c,...b}}const d=Ag(c);l.push(d);const h=J(o,"addInputRules",a);ah(o,e.options.enableInputRules)&&h&&n.push(...h());const f=J(o,"addPasteRules",a);ah(o,e.options.enablePasteRules)&&f&&i.push(...f());const p=J(o,"addProseMirrorPlugins",a);if(p){const b=p();l.push(...b)}return l}).flat();return[Xg({editor:e,rules:n}),...s5({editor:e,rules:i}),...s]}get attributes(){return Wp(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:r}=c0(this.extensions);return Object.fromEntries(r.filter(n=>!!J(n,"addNodeView")).map(n=>{const i=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:e,type:dt(n.name,this.schema)},o=J(n,"addNodeView",s);if(!o)return[];const a=(l,u,c,d,h)=>{const f=eu(l,i);return o()({node:l,view:u,getPos:c,decorations:d,innerDecorations:h,editor:e,extension:n,HTMLAttributes:f})};return[n.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var r;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:G0(e.name,this.schema)};e.type==="mark"&&(!((r=pe(J(e,"keepOnSplit",n)))!==null&&r!==void 0)||r)&&this.splittableMarks.push(e.name);const i=J(e,"onBeforeCreate",n),s=J(e,"onCreate",n),o=J(e,"onUpdate",n),a=J(e,"onSelectionUpdate",n),l=J(e,"onTransaction",n),u=J(e,"onFocus",n),c=J(e,"onBlur",n),d=J(e,"onDestroy",n);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}}class Ke{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(J(this,"addOptions",{name:this.name}))),this.storage=pe(J(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ke(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>h0(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new Ke({...this.config,...e});return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=pe(J(r,"addOptions",{name:r.name})),r.storage=pe(J(r,"addStorage",{name:r.name,options:r.options})),r}}function Kp(t,e,r){const{from:n,to:i}=e,{blockSeparator:s=` `,textSerializers:o={}}=r||{};let a="";return t.nodesBetween(n,i,(l,u,c,d)=>{var h;l.isBlock&&u>n&&(a+=s);const f=o==null?void 0:o[l.type.name];if(f)return c&&(a+=f({node:l,pos:u,parent:c,index:d,range:e})),!1;l.isText&&(a+=(h=l==null?void 0:l.text)===null||h===void 0?void 0:h.slice(Math.max(n,u)-u,i-u))}),a}function Gp(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,r])=>[e,r.spec.toText]))}const Jp=Ke.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Ve({key:new Je("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:r}=t,{doc:n,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),a=Math.max(...s.map(c=>c.$to.pos)),l=Gp(r);return Kp(n,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),a5=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var r;t.isDestroyed||(e.dom.blur(),(r=window==null?void 0:window.getSelection())===null||r===void 0||r.removeAllRanges())}),!0),l5=(t=!1)=>({commands:e})=>e.setContent("",t),u5=()=>({state:t,tr:e,dispatch:r})=>{const{selection:n}=e,{ranges:i}=n;return r&&i.forEach(({$from:s,$to:o})=>{t.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:c}=e,d=u.resolve(c.map(l)),h=u.resolve(c.map(l+a.nodeSize)),f=d.blockRange(h);if(!f)return;const p=rs(f);if(a.type.isTextblock){const{defaultType:b}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(f.start,b)}(p||p===0)&&e.lift(f,p)})}),!0},c5=t=>e=>t(e),d5=()=>({state:t,dispatch:e})=>qp(t,e),h5=(t,e)=>({editor:r,tr:n})=>{const{state:i}=r,s=i.doc.slice(t.from,t.to);n.deleteRange(t.from,t.to);const o=n.mapping.map(e);return n.insert(o,s.content),n.setSelection(new ee(n.doc.resolve(Math.max(o-1,0)))),!0},f5=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,n=r.$anchor.node();if(n.content.size>0)return!1;const i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===n.type){if(e){const a=i.before(s),l=i.after(s);t.delete(a,l).scrollIntoView()}return!0}return!1},p5=t=>({tr:e,state:r,dispatch:n})=>{const i=dt(t,r.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(n){const l=s.before(o),u=s.after(o);e.delete(l,u).scrollIntoView()}return!0}return!1},m5=t=>({tr:e,dispatch:r})=>{const{from:n,to:i}=t;return r&&e.delete(n,i),!0},g5=()=>({state:t,dispatch:e})=>Zu(t,e),b5=()=>({commands:t})=>t.keyboardShortcut("Enter"),y5=()=>({state:t,dispatch:e})=>Ng(t,e);function pa(t,e,r={strict:!0}){const n=Object.keys(e);return n.length?n.every(i=>r.strict?e[i]===t[i]:rc(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function Yp(t,e,r={}){return t.find(n=>n.type===e&&pa(Object.fromEntries(Object.keys(r).map(i=>[i,n.attrs[i]])),r))}function lh(t,e,r={}){return!!Yp(t,e,r)}function nc(t,e,r){var n;if(!t||!e)return;let i=t.parent.childAfter(t.parentOffset);if((!i.node||!i.node.marks.some(c=>c.type===e))&&(i=t.parent.childBefore(t.parentOffset)),!i.node||!i.node.marks.some(c=>c.type===e)||(r=r||((n=i.node.marks[0])===null||n===void 0?void 0:n.attrs),!Yp([...i.node.marks],e,r)))return;let o=i.index,a=t.start()+i.offset,l=o+1,u=a+i.node.nodeSize;for(;o>0&&lh([...t.parent.child(o-1).marks],e,r);)o-=1,a-=t.parent.child(o).nodeSize;for(;l({tr:r,state:n,dispatch:i})=>{const s=Kn(t,n.schema),{doc:o,selection:a}=r,{$from:l,from:u,to:c}=a;if(i){const d=nc(l,s,e);if(d&&d.from<=u&&d.to>=c){const h=ee.create(o,d.from,d.to);r.setSelection(h)}}return!0},x5=t=>e=>{const r=typeof t=="function"?t(e):t;for(let n=0;n({editor:r,view:n,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};const o=()=>{(ic()||k5())&&n.dom.focus(),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),e!=null&&e.scrollIntoView&&r.commands.scrollIntoView())})};if(n.hasFocus()&&t===null||t===!1)return!0;if(s&&t===null&&!Zp(r.state.selection))return o(),!0;const a=Xp(i.doc,t)||r.state.selection,l=r.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},S5=(t,e)=>r=>t.every((n,i)=>e(n,{...r,index:i})),C5=(t,e)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},t,e),Qp=t=>{const e=t.childNodes;for(let r=e.length-1;r>=0;r-=1){const n=e[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?t.removeChild(n):n.nodeType===1&&Qp(n)}return t};function So(t){const e=`${t}`,r=new window.DOMParser().parseFromString(e,"text/html").body;return Qp(r)}function qs(t,e,r){if(t instanceof Bn||t instanceof R)return t;r={slice:!0,parseOptions:{},...r};const n=typeof t=="object"&&t!==null,i=typeof t=="string";if(n)try{if(Array.isArray(t)&&t.length>0)return R.fromArray(t.map(a=>e.nodeFromJSON(a)));const o=e.nodeFromJSON(t);return r.errorOnInvalidContent&&o.check(),o}catch(s){if(r.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),qs("",e,r)}if(i){if(r.errorOnInvalidContent){let o=!1,a="";const l=new Iu({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(r.slice?an.fromSchema(l).parseSlice(So(t),r.parseOptions):an.fromSchema(l).parse(So(t),r.parseOptions),r.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=an.fromSchema(e);return r.slice?s.parseSlice(So(t),r.parseOptions).content:s.parse(So(t),r.parseOptions)}return qs("",e,r)}function A5(t,e,r){const n=t.steps.length-1;if(n{o===0&&(o=c)}),t.setSelection(ne.near(t.doc.resolve(o),r))}const M5=t=>!("type"in t),E5=(t,e,r)=>({tr:n,dispatch:i,editor:s})=>{var o;if(i){r={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};let a;const l=y=>{s.emit("contentError",{editor:s,error:y,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...r.parseOptions};if(!r.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{qs(e,s.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(y){l(y)}try{a=qs(e,s.schema,{parseOptions:u,errorOnInvalidContent:(o=r.errorOnInvalidContent)!==null&&o!==void 0?o:s.options.enableContentCheck})}catch(y){return l(y),!1}let{from:c,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,f=!0;if((M5(a)?a:[a]).forEach(y=>{y.check(),h=h?y.isText&&y.marks.length===0:!1,f=f?y.isBlock:!1}),c===d&&f){const{parent:y}=n.doc.resolve(c);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(c-=1,d+=1)}let b;if(h){if(Array.isArray(e))b=e.map(y=>y.text||"").join("");else if(e instanceof R){let y="";e.forEach(x=>{x.text&&(y+=x.text)}),b=y}else typeof e=="object"&&e&&e.text?b=e.text:b=e;n.insertText(b,c,d)}else b=a,n.replaceWith(c,d,b);r.updateSelection&&A5(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:c,text:b}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:c,text:b})}return!0},T5=()=>({state:t,dispatch:e})=>Tg(t,e),D5=()=>({state:t,dispatch:e})=>Dg(t,e),O5=()=>({state:t,dispatch:e})=>zp(t,e),N5=()=>({state:t,dispatch:e})=>Fp(t,e),L5=()=>({state:t,dispatch:e,tr:r})=>{try{const n=r0(t.doc,t.selection.$from.pos,-1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},_5=()=>({state:t,dispatch:e,tr:r})=>{try{const n=r0(t.doc,t.selection.$from.pos,1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},z5=()=>({state:t,dispatch:e})=>Mg(t,e),R5=()=>({state:t,dispatch:e})=>Eg(t,e);function em(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function I5(t){const e=t.split(/-(?!$)/);let r=e[e.length-1];r==="Space"&&(r=" ");let n,i,s,o;for(let a=0;a({editor:e,view:r,tr:n,dispatch:i})=>{const s=I5(t).split(/-(?!$)/),o=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{r.someProp("handleKeyDown",u=>u(r,a))});return l==null||l.steps.forEach(u=>{const c=u.map(n.mapping);c&&i&&n.maybeStep(c)}),!0};function Vs(t,e,r={}){const{from:n,to:i,empty:s}=t.selection,o=e?dt(e,t.schema):null,a=[];t.doc.nodesBetween(n,i,(d,h)=>{if(d.isText)return;const f=Math.max(n,h),p=Math.min(i,h+d.nodeSize);a.push({node:d,from:f,to:p})});const l=i-n,u=a.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>pa(d.node.attrs,r,{strict:!1}));return s?!!u.length:u.reduce((d,h)=>d+h.to-h.from,0)>=l}const F5=(t,e={})=>({state:r,dispatch:n})=>{const i=dt(t,r.schema);return Vs(r,i,e)?Og(r,n):!1},P5=()=>({state:t,dispatch:e})=>Vp(t,e),H5=t=>({state:e,dispatch:r})=>{const n=dt(t,e.schema);return Vg(n)(e,r)},q5=()=>({state:t,dispatch:e})=>Hp(t,e);function f0(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function uh(t,e){const r=typeof e=="string"?[e]:e;return Object.keys(t).reduce((n,i)=>(r.includes(i)||(n[i]=t[i]),n),{})}const V5=(t,e)=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=f0(typeof t=="string"?t:t.name,n.schema);return a?(a==="node"&&(s=dt(t,n.schema)),a==="mark"&&(o=Kn(t,n.schema)),i&&r.selection.ranges.forEach(l=>{n.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,c)=>{s&&s===u.type&&r.setNodeMarkup(c,void 0,uh(u.attrs,e)),o&&u.marks.length&&u.marks.forEach(d=>{o===d.type&&r.addMark(c,c+u.nodeSize,o.create(uh(d.attrs,e)))})})}),!0):!1},$5=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),j5=()=>({tr:t,dispatch:e})=>{if(e){const r=new Ut(t.doc);t.setSelection(r)}return!0},W5=()=>({state:t,dispatch:e})=>Ip(t,e),U5=()=>({state:t,dispatch:e})=>Pp(t,e),K5=()=>({state:t,dispatch:e})=>zg(t,e),G5=()=>({state:t,dispatch:e})=>Bg(t,e),J5=()=>({state:t,dispatch:e})=>Ig(t,e);function tu(t,e,r={},n={}){return qs(t,e,{slice:!1,parseOptions:r,errorOnInvalidContent:n.errorOnInvalidContent})}const Y5=(t,e=!1,r={},n={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{var l,u;const{doc:c}=s;if(r.preserveWhitespace!=="full"){const d=tu(t,i.schema,r,{errorOnInvalidContent:(l=n.errorOnInvalidContent)!==null&&l!==void 0?l:i.options.enableContentCheck});return o&&s.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!e),!0}return o&&s.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:(u=n.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck})};function sc(t,e){const r=Kn(e,t.schema),{from:n,to:i,empty:s}=t.selection,o=[];s?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(n,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===r.name);return a?{...a.attrs}:{}}function Z5(t,e){const r=new Hu(t);return e.forEach(n=>{n.steps.forEach(i=>{r.step(i)})}),r}function X5(t){for(let e=0;e{r(i)&&n.push({node:i,pos:s})}),n}function tm(t,e){for(let r=t.depth;r>0;r-=1){const n=t.node(r);if(e(n))return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:n}}}function oc(t){return e=>tm(e.$from,t)}function e7(t,e){const r={from:0,to:t.content.size};return Kp(t,r,e)}function t7(t,e){const r=dt(e,t.schema),{from:n,to:i}=t.selection,s=[];t.doc.nodesBetween(n,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===r.name);return o?{...o.attrs}:{}}function rm(t,e){const r=f0(typeof e=="string"?e:e.name,t.schema);return r==="node"?t7(t,e):r==="mark"?sc(t,e):{}}function r7(t,e=JSON.stringify){const r={};return t.filter(n=>{const i=e(n);return Object.prototype.hasOwnProperty.call(r,i)?!1:r[i]=!0})}function n7(t){const e=r7(t);return e.length===1?e:e.filter((r,n)=>!e.filter((s,o)=>o!==n).some(s=>r.oldRange.from>=s.oldRange.from&&r.oldRange.to<=s.oldRange.to&&r.newRange.from>=s.newRange.from&&r.newRange.to<=s.newRange.to))}function nm(t){const{mapping:e,steps:r}=t,n=[];return e.maps.forEach((i,s)=>{const o=[];if(i.ranges.length)i.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=r[s];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const u=e.slice(s).map(a,-1),c=e.slice(s).map(l),d=e.invert().map(u,-1),h=e.invert().map(c);n.push({oldRange:{from:d,to:h},newRange:{from:u,to:c}})})}),n7(n)}function ac(t,e,r){const n=[];return t===e?r.resolve(t).marks().forEach(i=>{const s=r.resolve(t),o=nc(s,i.type);o&&n.push({mark:i,...o})}):r.nodesBetween(t,e,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||n.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),n}function Go(t,e,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const i=t.find(s=>s.type===e&&s.name===n);return i?i.attribute.keepOnSplit:!1}))}function ru(t,e,r={}){const{empty:n,ranges:i}=t.selection,s=e?Kn(e,t.schema):null;if(n)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>pa(d.attrs,r,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:d,$to:h})=>{const f=d.pos,p=h.pos;t.doc.nodesBetween(f,p,(b,y)=>{if(!b.isText&&!b.marks.length)return;const x=Math.max(f,y),S=Math.min(p,y+b.nodeSize),M=S-x;o+=M,a.push(...b.marks.map(w=>({mark:w,from:x,to:S})))})}),o===0)return!1;const l=a.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>pa(d.mark.attrs,r,{strict:!1})).reduce((d,h)=>d+h.to-h.from,0),u=a.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,h)=>d+h.to-h.from,0);return(l>0?l+u:l)>=o}function i7(t,e,r={}){if(!e)return Vs(t,null,r)||ru(t,null,r);const n=f0(e,t.schema);return n==="node"?Vs(t,e,r):n==="mark"?ru(t,e,r):!1}function ch(t,e){const{nodeExtensions:r}=c0(e),n=r.find(o=>o.name===t);if(!n)return!1;const i={name:n.name,options:n.options,storage:n.storage},s=pe(J(n,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function p0(t,{checkChildren:e=!0,ignoreWhitespace:r=!1}={}){var n;if(r){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((n=t.text)!==null&&n!==void 0?n:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(s=>{i!==!1&&(p0(s,{ignoreWhitespace:r,checkChildren:e})||(i=!1))}),i}return!1}function s7(t){return t instanceof X}function o7(t,e,r){var n;const{selection:i}=e;let s=null;if(Zp(i)&&(s=i.$cursor),s){const a=(n=t.storedMarks)!==null&&n!==void 0?n:s.marks();return!!r.isInSet(a)||!a.some(l=>l.type.excludes(r))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(r):!1;return t.doc.nodesBetween(a.pos,l.pos,(c,d,h)=>{if(u)return!1;if(c.isInline){const f=!h||h.type.allowsMarkType(r),p=!!r.isInSet(c.marks)||!c.marks.some(b=>b.type.excludes(r));u=f&&p}return!u}),u})}const a7=(t,e={})=>({tr:r,state:n,dispatch:i})=>{const{selection:s}=r,{empty:o,ranges:a}=s,l=Kn(t,n.schema);if(i)if(o){const u=sc(n,l);r.addStoredMark(l.create({...u,...e}))}else a.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;n.doc.nodesBetween(c,d,(h,f)=>{const p=Math.max(f,c),b=Math.min(f+h.nodeSize,d);h.marks.find(x=>x.type===l)?h.marks.forEach(x=>{l===x.type&&r.addMark(p,b,l.create({...x.attrs,...e}))}):r.addMark(p,b,l.create(e))})});return o7(n,r,l)},l7=(t,e)=>({tr:r})=>(r.setMeta(t,e),!0),u7=(t,e={})=>({state:r,dispatch:n,chain:i})=>{const s=dt(t,r.schema);let o;return r.selection.$anchor.sameParent(r.selection.$head)&&(o=r.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:a})=>ih(s,{...o,...e})(r)?!0:a.clearNodes()).command(({state:a})=>ih(s,{...o,...e})(a,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},c7=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,i=li(t,0,n.content.size),s=X.create(n,i);e.setSelection(s)}return!0},d7=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,{from:i,to:s}=typeof t=="number"?{from:t,to:t}:t,o=ee.atStart(n).from,a=ee.atEnd(n).to,l=li(i,o,a),u=li(s,o,a),c=ee.create(n,l,u);e.setSelection(c)}return!0},h7=t=>({state:e,dispatch:r})=>{const n=dt(t,e.schema);return Wg(n)(e,r)};function dh(t,e){const r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(r){const n=r.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(n)}}const f7=({keepMarks:t=!0}={})=>({tr:e,state:r,dispatch:n,editor:i})=>{const{selection:s,doc:o}=e,{$from:a,$to:l}=s,u=i.extensionManager.attributes,c=Go(u,a.node().type.name,a.node().attrs);if(s instanceof X&&s.node.isBlock)return!a.parentOffset||!ln(o,a.pos)?!1:(n&&(t&&dh(r,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,h=a.depth===0?void 0:X5(a.node(-1).contentMatchAt(a.indexAfter(-1)));let f=d&&h?[{type:h,attrs:c}]:void 0,p=ln(e.doc,e.mapping.map(a.pos),1,f);if(!f&&!p&&ln(e.doc,e.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(p=!0,f=h?[{type:h,attrs:c}]:void 0),n){if(p&&(s instanceof ee&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,f),h&&!d&&!a.parentOffset&&a.parent.type!==h)){const b=e.mapping.map(a.before()),y=e.doc.resolve(b);a.node(-1).canReplaceWith(y.index(),y.index()+1,h)&&e.setNodeMarkup(e.mapping.map(a.before()),h)}t&&dh(r,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},p7=(t,e={})=>({tr:r,state:n,dispatch:i,editor:s})=>{var o;const a=dt(t,n.schema),{$from:l,$to:u}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const d=l.node(-1);if(d.type!==a)return!1;const h=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let x=R.empty;const S=l.index(-1)?1:l.index(-2)?2:3;for(let I=l.depth-S;I>=l.depth-3;I-=1)x=R.from(l.node(I).copy(x));const M=l.indexAfter(-1){if(O>-1)return!1;I.isTextblock&&I.content.size===0&&(O=_+1)}),O>-1&&r.setSelection(ee.near(r.doc.resolve(O))),r.scrollIntoView()}return!0}const f=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,p={...Go(h,d.type.name,d.attrs),...e},b={...Go(h,l.node().type.name,l.node().attrs),...e};r.delete(l.pos,u.pos);const y=f?[{type:a,attrs:p},{type:f,attrs:b}]:[{type:a,attrs:p}];if(!ln(r.doc,l.pos,2))return!1;if(i){const{selection:x,storedMarks:S}=n,{splittableMarks:M}=s.extensionManager,w=S||x.$to.parentOffset&&x.$from.marks();if(r.split(l.pos,2,y).scrollIntoView(),!w||!i)return!0;const T=w.filter(D=>M.includes(D.type.name));r.ensureMarks(T)}return!0},J0=(t,e)=>{const r=oc(o=>o.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const i=t.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&Wn(t.doc,r.pos)&&t.join(r.pos),!0},Y0=(t,e)=>{const r=oc(o=>o.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const i=t.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&Wn(t.doc,n)&&t.join(n),!0},m7=(t,e,r,n={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:u,can:c})=>{const{extensions:d,splittableMarks:h}=i.extensionManager,f=dt(t,o.schema),p=dt(e,o.schema),{selection:b,storedMarks:y}=o,{$from:x,$to:S}=b,M=x.blockRange(S),w=y||b.$to.parentOffset&&b.$from.marks();if(!M)return!1;const T=oc(D=>ch(D.type.name,d))(b);if(M.depth>=1&&T&&M.depth-T.depth<=1){if(T.node.type===f)return u.liftListItem(p);if(ch(T.node.type.name,d)&&f.validContent(T.node.content)&&a)return l().command(()=>(s.setNodeMarkup(T.pos,f),!0)).command(()=>J0(s,f)).command(()=>Y0(s,f)).run()}return!r||!w||!a?l().command(()=>c().wrapInList(f,n)?!0:u.clearNodes()).wrapInList(f,n).command(()=>J0(s,f)).command(()=>Y0(s,f)).run():l().command(()=>{const D=c().wrapInList(f,n),O=w.filter(I=>h.includes(I.type.name));return s.ensureMarks(O),D?!0:u.clearNodes()}).wrapInList(f,n).command(()=>J0(s,f)).command(()=>Y0(s,f)).run()},g7=(t,e={},r={})=>({state:n,commands:i})=>{const{extendEmptyMarkRange:s=!1}=r,o=Kn(t,n.schema);return ru(n,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},b7=(t,e,r={})=>({state:n,commands:i})=>{const s=dt(t,n.schema),o=dt(e,n.schema),a=Vs(n,s,r);let l;return n.selection.$anchor.sameParent(n.selection.$head)&&(l=n.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...r})},y7=(t,e={})=>({state:r,commands:n})=>{const i=dt(t,r.schema);return Vs(r,i,e)?n.lift(i):n.wrapIn(i,e)},v7=()=>({state:t,dispatch:e})=>{const r=t.plugins;for(let n=0;n=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,t.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},x7=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,{empty:n,ranges:i}=r;return n||e&&i.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},k7=(t,e={})=>({tr:r,state:n,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=r,l=Kn(t,n.schema),{$from:u,empty:c,ranges:d}=a;if(!i)return!0;if(c&&o){let{from:h,to:f}=a;const p=(s=u.marks().find(y=>y.type===l))===null||s===void 0?void 0:s.attrs,b=nc(u,l,p);b&&(h=b.from,f=b.to),r.removeMark(h,f,l)}else d.forEach(h=>{r.removeMark(h.$from.pos,h.$to.pos,l)});return r.removeStoredMark(l),!0},w7=(t,e={})=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=f0(typeof t=="string"?t:t.name,n.schema);return a?(a==="node"&&(s=dt(t,n.schema)),a==="mark"&&(o=Kn(t,n.schema)),i&&r.selection.ranges.forEach(l=>{const u=l.$from.pos,c=l.$to.pos;let d,h,f,p;r.selection.empty?n.doc.nodesBetween(u,c,(b,y)=>{s&&s===b.type&&(f=Math.max(y,u),p=Math.min(y+b.nodeSize,c),d=y,h=b)}):n.doc.nodesBetween(u,c,(b,y)=>{y=u&&y<=c&&(s&&s===b.type&&r.setNodeMarkup(y,void 0,{...b.attrs,...e}),o&&b.marks.length&&b.marks.forEach(x=>{if(o===x.type){const S=Math.max(y,u),M=Math.min(y+b.nodeSize,c);r.addMark(S,M,o.create({...x.attrs,...e}))}}))}),h&&(d!==void 0&&r.setNodeMarkup(d,void 0,{...h.attrs,...e}),o&&h.marks.length&&h.marks.forEach(b=>{o===b.type&&r.addMark(f,p,o.create({...b.attrs,...e}))}))}),!0):!1},S7=(t,e={})=>({state:r,dispatch:n})=>{const i=dt(t,r.schema);return Fg(i,e)(r,n)},C7=(t,e={})=>({state:r,dispatch:n})=>{const i=dt(t,r.schema);return Pg(i,e)(r,n)};var A7=Object.freeze({__proto__:null,blur:a5,clearContent:l5,clearNodes:u5,command:c5,createParagraphNear:d5,cut:h5,deleteCurrentNode:f5,deleteNode:p5,deleteRange:m5,deleteSelection:g5,enter:b5,exitCode:y5,extendMarkRange:v5,first:x5,focus:w5,forEach:S5,insertContent:C5,insertContentAt:E5,joinBackward:O5,joinDown:D5,joinForward:N5,joinItemBackward:L5,joinItemForward:_5,joinTextblockBackward:z5,joinTextblockForward:R5,joinUp:T5,keyboardShortcut:B5,lift:F5,liftEmptyBlock:P5,liftListItem:H5,newlineInCode:q5,resetAttributes:V5,scrollIntoView:$5,selectAll:j5,selectNodeBackward:W5,selectNodeForward:U5,selectParentNode:K5,selectTextblockEnd:G5,selectTextblockStart:J5,setContent:Y5,setMark:a7,setMeta:l7,setNode:u7,setNodeSelection:c7,setTextSelection:d7,sinkListItem:h7,splitBlock:f7,splitListItem:p7,toggleList:m7,toggleMark:g7,toggleNode:b7,toggleWrap:y7,undoInputRule:v7,unsetAllMarks:x7,unsetMark:k7,updateAttributes:w7,wrapIn:S7,wrapInList:C7});const im=Ke.create({name:"commands",addCommands(){return{...A7}}}),sm=Ke.create({name:"drop",addProseMirrorPlugins(){return[new Ve({key:new Je("tiptapDrop"),props:{handleDrop:(t,e,r,n)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:r,moved:n})}}})]}}),om=Ke.create({name:"editable",addProseMirrorPlugins(){return[new Ve({key:new Je("editable"),props:{editable:()=>this.editor.options.editable}})]}}),am=new Je("focusEvents"),lm=Ke.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Ve({key:am,props:{handleDOMEvents:{focus:(e,r)=>{t.isFocused=!0;const n=t.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1},blur:(e,r)=>{t.isFocused=!1;const n=t.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1}}}})]}}),um=Ke.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:h,parent:f}=d,p=d.parent.isTextblock&&h>0?a.doc.resolve(h-1):d,b=p.parent.type.spec.isolating,y=d.pos-d.parentOffset,x=b&&p.parent.childCount===1?y===d.pos:ne.atStart(u).from===h;return!c||!f.type.isTextblock||f.textContent.length||!x||x&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},s={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ic()||em()?s:i},addProseMirrorPlugins(){return[new Ve({key:new Je("clearDocument"),appendTransaction:(t,e,r)=>{if(t.some(b=>b.getMeta("composition")))return;const n=t.some(b=>b.docChanged)&&!e.doc.eq(r.doc),i=t.some(b=>b.getMeta("preventClearDocument"));if(!n||i)return;const{empty:s,from:o,to:a}=e.selection,l=ne.atStart(e.doc).from,u=ne.atEnd(e.doc).to;if(s||!(o===l&&a===u)||!p0(r.doc))return;const h=r.tr,f=l0({state:r,transaction:h}),{commands:p}=new u0({editor:this.editor,state:f});if(p.clearNodes(),!!h.steps.length)return h}})]}}),cm=Ke.create({name:"paste",addProseMirrorPlugins(){return[new Ve({key:new Je("tiptapPaste"),props:{handlePaste:(t,e,r)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:r})}}})]}}),dm=Ke.create({name:"tabindex",addProseMirrorPlugins(){return[new Ve({key:new Je("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var M7=Object.freeze({__proto__:null,ClipboardTextSerializer:Jp,Commands:im,Drop:sm,Editable:om,FocusEvents:lm,Keymap:um,Paste:cm,Tabindex:dm,focusEventsPluginKey:am});class ii{get name(){return this.node.type.name}constructor(e,r,n=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=r,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(e);return new ii(r,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ii(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ii(e,this.editor)}get children(){const e=[];return this.node.content.forEach((r,n)=>{const i=r.isBlock&&!r.isTextblock,s=r.isAtom&&!r.isText,o=this.pos+n+(s?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(o);if(!i&&a.depth<=this.depth)return;const l=new ii(a,this.editor,i,i?r:null);i&&(l.actualDepth=this.depth+1),e.push(new ii(a,this.editor,i,i?r:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,r={}){let n=null,i=this.parent;for(;i&&!n;){if(i.node.type.name===e)if(Object.keys(r).length>0){const s=i.node.attrs,o=Object.keys(r);for(let a=0;a{n&&i.length>0||(o.node.type.name===e&&s.every(l=>r[l]===o.node.attrs[l])&&i.push(o),!(n&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,r,n))))}),i}setAttribute(e){const{tr:r}=this.editor.state;r.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(r)}}const E7=`.ProseMirror { position: relative; } .ProseMirror { word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ } .ProseMirror [contenteditable="false"] { white-space: normal; } .ProseMirror [contenteditable="false"] [contenteditable="true"] { white-space: pre-wrap; } .ProseMirror pre { white-space: pre-wrap; } img.ProseMirror-separator { display: inline !important; border: none !important; margin: 0 !important; width: 0 !important; height: 0 !important; } .ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; margin: 0; } .ProseMirror-gapcursor:after { content: ""; display: block; position: absolute; top: -2px; width: 20px; border-top: 1px solid black; animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; } @keyframes ProseMirror-cursor-blink { to { visibility: hidden; } } .ProseMirror-hideselection *::selection { background: transparent; } .ProseMirror-hideselection *::-moz-selection { background: transparent; } .ProseMirror-hideselection * { caret-color: transparent; } .ProseMirror-focused .ProseMirror-gapcursor { display: block; } .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 }`;function T7(t,e,r){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}let D7=class extends Ug{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:n,moved:i})=>this.options.onDrop(r,n,i)),this.on("paste",({event:r,slice:n})=>this.options.onPaste(r,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=T7(E7,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,r=!0){this.setOptions({editable:e}),r&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,r){const n=Up(r)?r(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;const r=this.state.plugins;let n=r;if([].concat(e).forEach(s=>{const o=typeof s=="string"?`${s}$`:s.key;n=n.filter(a=>!a.key.startsWith(o))}),r.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var e,r;const i=[...this.options.enableCoreExtensions?[om,Jp.configure({blockSeparator:(r=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),im,lm,um,dm,sm,cm].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new Bi(i,this)}createCommandManager(){this.commandManager=new u0({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let r;try{r=tu(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),r=tu(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=Xp(r,this.options.autofocus);this.view=new Op(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Ii.create({doc:r,selection:n||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();const s=this.view.dom;s.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(o=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(o)});return}const r=this.state.apply(e),n=!this.state.selection.eq(r.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:r}),this.view.updateState(r),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),s=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),s&&this.emit("blur",{editor:this,event:s.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return rm(this.state,e)}isActive(e,r){const n=typeof e=="string"?e:null,i=typeof e=="string"?r:e;return i7(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return no(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:r=` `,textSerializers:n={}}=e||{};return e7(this.state.doc,{blockSeparator:r,textSerializers:{...Gp(this.schema),...n}})}get isEmpty(){return p0(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(e,r))||null}$nodes(e,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(e,r))||null}$pos(e){const r=this.state.doc.resolve(e);return new ii(r,this)}get $doc(){return this.$pos(0)}};function Ki(t){return new d0({find:t.find,handler:({state:e,range:r,match:n})=>{const i=pe(t.getAttributes,void 0,n);if(i===!1||i===null)return null;const{tr:s}=e,o=n[n.length-1],a=n[0];if(o){const l=a.search(/\S/),u=r.from+a.indexOf(o),c=u+o.length;if(ac(r.from,r.to,e.doc).filter(f=>f.mark.type.excluded.find(b=>b===t.type&&b!==f.mark.type)).filter(f=>f.to>u).length)return null;cr.from&&s.delete(r.from+l,u);const h=r.from+l+o.length;s.addMark(r.from+l,h,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function hm(t){return new d0({find:t.find,handler:({state:e,range:r,match:n})=>{const i=pe(t.getAttributes,void 0,n)||{},{tr:s}=e,o=r.from;let a=r.to;const l=t.type.create(i);if(n[1]){const u=n[0].lastIndexOf(n[1]);let c=o+u;c>a?c=a:a=c+n[1].length;const d=n[0][n[0].length-1];s.insertText(d,o+n[0].length-1),s.replaceWith(c,a,l)}else if(n[0]){const u=t.type.isInline?o:o-1;s.insert(u,t.type.create(i)).delete(s.mapping.map(o),s.mapping.map(a))}s.scrollIntoView()}})}function nu(t){return new d0({find:t.find,handler:({state:e,range:r,match:n})=>{const i=e.doc.resolve(r.from),s=pe(t.getAttributes,void 0,n)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(r.from,r.to).setBlockType(r.from,r.from,t.type,s)}})}function Gi(t){return new d0({find:t.find,handler:({state:e,range:r,match:n,chain:i})=>{const s=pe(t.getAttributes,void 0,n)||{},o=e.tr.delete(r.from,r.to),l=o.doc.resolve(r.from).blockRange(),u=l&&Pu(l,t.type,s);if(!u)return null;if(o.wrap(l,u),t.keepMarks&&t.editor){const{selection:d,storedMarks:h}=e,{splittableMarks:f}=t.editor.extensionManager,p=h||d.$to.parentOffset&&d.$from.marks();if(p){const b=p.filter(y=>f.includes(y.type.name));o.ensureMarks(b)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}const c=o.doc.resolve(r.from-1).nodeBefore;c&&c.type===t.type&&Wn(o.doc,r.from-1)&&(!t.joinPredicate||t.joinPredicate(n,c))&&o.join(r.from-1)}})}let ye=class iu{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(J(this,"addOptions",{name:this.name}))),this.storage=pe(J(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new iu(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>h0(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new iu(e);return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=pe(J(r,"addOptions",{name:r.name})),r.storage=pe(J(r,"addStorage",{name:r.name,options:r.options})),r}};function xi(t){return new t5({find:t.find,handler:({state:e,range:r,match:n,pasteEvent:i})=>{const s=pe(t.getAttributes,void 0,n,i);if(s===!1||s===null)return null;const{tr:o}=e,a=n[n.length-1],l=n[0];let u=r.to;if(a){const c=l.search(/\S/),d=r.from+l.indexOf(a),h=d+a.length;if(ac(r.from,r.to,e.doc).filter(p=>p.mark.type.excluded.find(y=>y===t.type&&y!==p.mark.type)).filter(p=>p.to>d).length)return null;hr.from&&o.delete(r.from+c,d),u=r.from+c+a.length,o.addMark(r.from+c,u,t.type.create(s||{})),o.removeStoredMark(t.type)}}})}function O7(t,e){const{selection:r}=t,{$from:n}=r;if(r instanceof X){const s=n.index();return n.parent.canReplaceWith(s,s+1,e)}let i=n.depth;for(;i>=0;){const s=n.index(i);if(n.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}function N7(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var Bt="top",ar="bottom",lr="right",Ft="left",lc="auto",io=[Bt,ar,lr,Ft],Ji="start",$s="end",L7="clippingParents",fm="viewport",us="popper",_7="reference",hh=io.reduce(function(t,e){return t.concat([e+"-"+Ji,e+"-"+$s])},[]),pm=[].concat(io,[lc]).reduce(function(t,e){return t.concat([e,e+"-"+Ji,e+"-"+$s])},[]),z7="beforeRead",R7="read",I7="afterRead",B7="beforeMain",F7="main",P7="afterMain",H7="beforeWrite",q7="write",V7="afterWrite",$7=[z7,R7,I7,B7,F7,P7,H7,q7,V7];function qr(t){return t?(t.nodeName||"").toLowerCase():null}function Kt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ki(t){var e=Kt(t).Element;return t instanceof e||t instanceof Element}function or(t){var e=Kt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function uc(t){if(typeof ShadowRoot>"u")return!1;var e=Kt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function j7(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},s=e.elements[r];!or(s)||!qr(s)||(Object.assign(s.style,n),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function W7(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],s=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),a=o.reduce(function(l,u){return l[u]="",l},{});!or(i)||!qr(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(l){i.removeAttribute(l)}))})}}const mm={name:"applyStyles",enabled:!0,phase:"write",fn:j7,effect:W7,requires:["computeStyles"]};function Fr(t){return t.split("-")[0]}var pi=Math.max,ma=Math.min,Yi=Math.round;function su(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function gm(){return!/^((?!chrome|android).)*safari/i.test(su())}function Zi(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,s=1;e&&or(t)&&(i=t.offsetWidth>0&&Yi(n.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Yi(n.height)/t.offsetHeight||1);var o=ki(t)?Kt(t):window,a=o.visualViewport,l=!gm()&&r,u=(n.left+(l&&a?a.offsetLeft:0))/i,c=(n.top+(l&&a?a.offsetTop:0))/s,d=n.width/i,h=n.height/s;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function cc(t){var e=Zi(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function bm(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&uc(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fn(t){return Kt(t).getComputedStyle(t)}function U7(t){return["table","td","th"].indexOf(qr(t))>=0}function Gn(t){return((ki(t)?t.ownerDocument:t.document)||window.document).documentElement}function m0(t){return qr(t)==="html"?t:t.assignedSlot||t.parentNode||(uc(t)?t.host:null)||Gn(t)}function fh(t){return!or(t)||fn(t).position==="fixed"?null:t.offsetParent}function K7(t){var e=/firefox/i.test(su()),r=/Trident/i.test(su());if(r&&or(t)){var n=fn(t);if(n.position==="fixed")return null}var i=m0(t);for(uc(i)&&(i=i.host);or(i)&&["html","body"].indexOf(qr(i))<0;){var s=fn(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function so(t){for(var e=Kt(t),r=fh(t);r&&U7(r)&&fn(r).position==="static";)r=fh(r);return r&&(qr(r)==="html"||qr(r)==="body"&&fn(r).position==="static")?e:r||K7(t)||e}function dc(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ws(t,e,r){return pi(t,ma(e,r))}function G7(t,e,r){var n=ws(t,e,r);return n>r?r:n}function ym(){return{top:0,right:0,bottom:0,left:0}}function vm(t){return Object.assign({},ym(),t)}function xm(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var J7=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,vm(typeof e!="number"?e:xm(e,io))};function Y7(t){var e,r=t.state,n=t.name,i=t.options,s=r.elements.arrow,o=r.modifiersData.popperOffsets,a=Fr(r.placement),l=dc(a),u=[Ft,lr].indexOf(a)>=0,c=u?"height":"width";if(!(!s||!o)){var d=J7(i.padding,r),h=cc(s),f=l==="y"?Bt:Ft,p=l==="y"?ar:lr,b=r.rects.reference[c]+r.rects.reference[l]-o[l]-r.rects.popper[c],y=o[l]-r.rects.reference[l],x=so(s),S=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,M=b/2-y/2,w=d[f],T=S-h[c]-d[p],D=S/2-h[c]/2+M,O=ws(w,D,T),I=l;r.modifiersData[n]=(e={},e[I]=O,e.centerOffset=O-D,e)}}function Z7(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||bm(e.elements.popper,i)&&(e.elements.arrow=i))}const X7={name:"arrow",enabled:!0,phase:"main",fn:Y7,effect:Z7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xi(t){return t.split("-")[1]}var Q7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function e8(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:Yi(r*i)/i||0,y:Yi(n*i)/i||0}}function ph(t){var e,r=t.popper,n=t.popperRect,i=t.placement,s=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=o.x,f=h===void 0?0:h,p=o.y,b=p===void 0?0:p,y=typeof c=="function"?c({x:f,y:b}):{x:f,y:b};f=y.x,b=y.y;var x=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),M=Ft,w=Bt,T=window;if(u){var D=so(r),O="clientHeight",I="clientWidth";if(D===Kt(r)&&(D=Gn(r),fn(D).position!=="static"&&a==="absolute"&&(O="scrollHeight",I="scrollWidth")),D=D,i===Bt||(i===Ft||i===lr)&&s===$s){w=ar;var _=d&&D===T&&T.visualViewport?T.visualViewport.height:D[O];b-=_-n.height,b*=l?1:-1}if(i===Ft||(i===Bt||i===ar)&&s===$s){M=lr;var $=d&&D===T&&T.visualViewport?T.visualViewport.width:D[I];f-=$-n.width,f*=l?1:-1}}var z=Object.assign({position:a},u&&Q7),j=c===!0?e8({x:f,y:b},Kt(r)):{x:f,y:b};if(f=j.x,b=j.y,l){var G;return Object.assign({},z,(G={},G[w]=S?"0":"",G[M]=x?"0":"",G.transform=(T.devicePixelRatio||1)<=1?"translate("+f+"px, "+b+"px)":"translate3d("+f+"px, "+b+"px, 0)",G))}return Object.assign({},z,(e={},e[w]=S?b+"px":"",e[M]=x?f+"px":"",e.transform="",e))}function t8(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,s=r.adaptive,o=s===void 0?!0:s,a=r.roundOffsets,l=a===void 0?!0:a,u={placement:Fr(e.placement),variation:Xi(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ph(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ph(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const r8={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:t8,data:{}};var Co={passive:!0};function n8(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,s=i===void 0?!0:i,o=n.resize,a=o===void 0?!0:o,l=Kt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&u.forEach(function(c){c.addEventListener("scroll",r.update,Co)}),a&&l.addEventListener("resize",r.update,Co),function(){s&&u.forEach(function(c){c.removeEventListener("scroll",r.update,Co)}),a&&l.removeEventListener("resize",r.update,Co)}}const i8={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:n8,data:{}};var s8={left:"right",right:"left",bottom:"top",top:"bottom"};function Jo(t){return t.replace(/left|right|bottom|top/g,function(e){return s8[e]})}var o8={start:"end",end:"start"};function mh(t){return t.replace(/start|end/g,function(e){return o8[e]})}function hc(t){var e=Kt(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function fc(t){return Zi(Gn(t)).left+hc(t).scrollLeft}function a8(t,e){var r=Kt(t),n=Gn(t),i=r.visualViewport,s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;var u=gm();(u||!u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a+fc(t),y:l}}function l8(t){var e,r=Gn(t),n=hc(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=pi(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=pi(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-n.scrollLeft+fc(t),l=-n.scrollTop;return fn(i||r).direction==="rtl"&&(a+=pi(r.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function pc(t){var e=fn(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function km(t){return["html","body","#document"].indexOf(qr(t))>=0?t.ownerDocument.body:or(t)&&pc(t)?t:km(m0(t))}function Ss(t,e){var r;e===void 0&&(e=[]);var n=km(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),s=Kt(n),o=i?[s].concat(s.visualViewport||[],pc(n)?n:[]):n,a=e.concat(o);return i?a:a.concat(Ss(m0(o)))}function ou(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function u8(t,e){var r=Zi(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function gh(t,e,r){return e===fm?ou(a8(t,r)):ki(e)?u8(e,r):ou(l8(Gn(t)))}function c8(t){var e=Ss(m0(t)),r=["absolute","fixed"].indexOf(fn(t).position)>=0,n=r&&or(t)?so(t):t;return ki(n)?e.filter(function(i){return ki(i)&&bm(i,n)&&qr(i)!=="body"}):[]}function d8(t,e,r,n){var i=e==="clippingParents"?c8(t):[].concat(e),s=[].concat(i,[r]),o=s[0],a=s.reduce(function(l,u){var c=gh(t,u,n);return l.top=pi(c.top,l.top),l.right=ma(c.right,l.right),l.bottom=ma(c.bottom,l.bottom),l.left=pi(c.left,l.left),l},gh(t,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function wm(t){var e=t.reference,r=t.element,n=t.placement,i=n?Fr(n):null,s=n?Xi(n):null,o=e.x+e.width/2-r.width/2,a=e.y+e.height/2-r.height/2,l;switch(i){case Bt:l={x:o,y:e.y-r.height};break;case ar:l={x:o,y:e.y+e.height};break;case lr:l={x:e.x+e.width,y:a};break;case Ft:l={x:e.x-r.width,y:a};break;default:l={x:e.x,y:e.y}}var u=i?dc(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(s){case Ji:l[u]=l[u]-(e[c]/2-r[c]/2);break;case $s:l[u]=l[u]+(e[c]/2-r[c]/2);break}}return l}function js(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,s=r.strategy,o=s===void 0?t.strategy:s,a=r.boundary,l=a===void 0?L7:a,u=r.rootBoundary,c=u===void 0?fm:u,d=r.elementContext,h=d===void 0?us:d,f=r.altBoundary,p=f===void 0?!1:f,b=r.padding,y=b===void 0?0:b,x=vm(typeof y!="number"?y:xm(y,io)),S=h===us?_7:us,M=t.rects.popper,w=t.elements[p?S:h],T=d8(ki(w)?w:w.contextElement||Gn(t.elements.popper),l,c,o),D=Zi(t.elements.reference),O=wm({reference:D,element:M,placement:i}),I=ou(Object.assign({},M,O)),_=h===us?I:D,$={top:T.top-_.top+x.top,bottom:_.bottom-T.bottom+x.bottom,left:T.left-_.left+x.left,right:_.right-T.right+x.right},z=t.modifiersData.offset;if(h===us&&z){var j=z[i];Object.keys($).forEach(function(G){var ce=[lr,ar].indexOf(G)>=0?1:-1,le=[Bt,ar].indexOf(G)>=0?"y":"x";$[G]+=j[le]*ce})}return $}function h8(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,s=r.rootBoundary,o=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?pm:l,c=Xi(n),d=c?a?hh:hh.filter(function(p){return Xi(p)===c}):io,h=d.filter(function(p){return u.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,b){return p[b]=js(t,{placement:b,boundary:i,rootBoundary:s,padding:o})[Fr(b)],p},{});return Object.keys(f).sort(function(p,b){return f[p]-f[b]})}function f8(t){if(Fr(t)===lc)return[];var e=Jo(t);return[mh(t),e,mh(e)]}function p8(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,s=i===void 0?!0:i,o=r.altAxis,a=o===void 0?!0:o,l=r.fallbackPlacements,u=r.padding,c=r.boundary,d=r.rootBoundary,h=r.altBoundary,f=r.flipVariations,p=f===void 0?!0:f,b=r.allowedAutoPlacements,y=e.options.placement,x=Fr(y),S=x===y,M=l||(S||!p?[Jo(y)]:f8(y)),w=[y].concat(M).reduce(function(kt,Ze){return kt.concat(Fr(Ze)===lc?h8(e,{placement:Ze,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:b}):Ze)},[]),T=e.rects.reference,D=e.rects.popper,O=new Map,I=!0,_=w[0],$=0;$=0,le=ce?"width":"height",Q=js(e,{placement:z,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),me=ce?G?lr:Ft:G?ar:Bt;T[le]>D[le]&&(me=Jo(me));var be=Jo(me),et=[];if(s&&et.push(Q[j]<=0),a&&et.push(Q[me]<=0,Q[be]<=0),et.every(function(kt){return kt})){_=z,I=!1;break}O.set(z,et)}if(I)for(var De=p?3:1,Ye=function(Ze){var Nt=w.find(function(wt){var it=O.get(wt);if(it)return it.slice(0,Ze).every(function(Vt){return Vt})});if(Nt)return _=Nt,"break"},Ce=De;Ce>0;Ce--){var xt=Ye(Ce);if(xt==="break")break}e.placement!==_&&(e.modifiersData[n]._skip=!0,e.placement=_,e.reset=!0)}}const m8={name:"flip",enabled:!0,phase:"main",fn:p8,requiresIfExists:["offset"],data:{_skip:!1}};function bh(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function yh(t){return[Bt,lr,ar,Ft].some(function(e){return t[e]>=0})}function g8(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=js(e,{elementContext:"reference"}),a=js(e,{altBoundary:!0}),l=bh(o,n),u=bh(a,i,s),c=yh(l),d=yh(u);e.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const b8={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:g8};function y8(t,e,r){var n=Fr(t),i=[Ft,Bt].indexOf(n)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Ft,lr].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function v8(t){var e=t.state,r=t.options,n=t.name,i=r.offset,s=i===void 0?[0,0]:i,o=pm.reduce(function(c,d){return c[d]=y8(d,e.rects,s),c},{}),a=o[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=o}const x8={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:v8};function k8(t){var e=t.state,r=t.name;e.modifiersData[r]=wm({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const w8={name:"popperOffsets",enabled:!0,phase:"read",fn:k8,data:{}};function S8(t){return t==="x"?"y":"x"}function C8(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,s=i===void 0?!0:i,o=r.altAxis,a=o===void 0?!1:o,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,d=r.padding,h=r.tether,f=h===void 0?!0:h,p=r.tetherOffset,b=p===void 0?0:p,y=js(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),x=Fr(e.placement),S=Xi(e.placement),M=!S,w=dc(x),T=S8(w),D=e.modifiersData.popperOffsets,O=e.rects.reference,I=e.rects.popper,_=typeof b=="function"?b(Object.assign({},e.rects,{placement:e.placement})):b,$=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),z=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(D){if(s){var G,ce=w==="y"?Bt:Ft,le=w==="y"?ar:lr,Q=w==="y"?"height":"width",me=D[w],be=me+y[ce],et=me-y[le],De=f?-I[Q]/2:0,Ye=S===Ji?O[Q]:I[Q],Ce=S===Ji?-I[Q]:-O[Q],xt=e.elements.arrow,kt=f&&xt?cc(xt):{width:0,height:0},Ze=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ym(),Nt=Ze[ce],wt=Ze[le],it=ws(0,O[Q],kt[Q]),Vt=M?O[Q]/2-De-it-Nt-$.mainAxis:Ye-it-Nt-$.mainAxis,St=M?-O[Q]/2+De+it+wt+$.mainAxis:Ce+it+wt+$.mainAxis,wr=e.elements.arrow&&so(e.elements.arrow),se=wr?w==="y"?wr.clientTop||0:wr.clientLeft||0:0,Oe=(G=z==null?void 0:z[w])!=null?G:0,Ae=me+Vt-Oe-se,st=me+St-Oe,Me=ws(f?ma(be,Ae):be,me,f?pi(et,st):et);D[w]=Me,j[w]=Me-me}if(a){var Ee,Ne=w==="x"?Bt:Ft,ue=w==="x"?ar:lr,tt=D[T],Sr=T==="y"?"height":"width",Yn=tt+y[Ne],dr=tt-y[ue],Jr=[Bt,Ft].indexOf(x)!==-1,Cr=(Ee=z==null?void 0:z[T])!=null?Ee:0,hr=Jr?Yn:tt-O[Sr]-I[Sr]-Cr+$.altAxis,Zn=Jr?tt+O[Sr]+I[Sr]-Cr-$.altAxis:dr,Ar=f&&Jr?G7(hr,tt,Zn):ws(f?hr:Yn,tt,f?Zn:dr);D[T]=Ar,j[T]=Ar-tt}e.modifiersData[n]=j}}const A8={name:"preventOverflow",enabled:!0,phase:"main",fn:C8,requiresIfExists:["offset"]};function M8(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function E8(t){return t===Kt(t)||!or(t)?hc(t):M8(t)}function T8(t){var e=t.getBoundingClientRect(),r=Yi(e.width)/t.offsetWidth||1,n=Yi(e.height)/t.offsetHeight||1;return r!==1||n!==1}function D8(t,e,r){r===void 0&&(r=!1);var n=or(e),i=or(e)&&T8(e),s=Gn(e),o=Zi(t,i,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((qr(e)!=="body"||pc(s))&&(a=E8(e)),or(e)?(l=Zi(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=fc(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function O8(t){var e=new Map,r=new Set,n=[];t.forEach(function(s){e.set(s.name,s)});function i(s){r.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!r.has(a)){var l=e.get(a);l&&i(l)}}),n.push(s)}return t.forEach(function(s){r.has(s.name)||i(s)}),n}function N8(t){var e=O8(t);return $7.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function L8(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function _8(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var vh={placement:"bottom",modifiers:[],strategy:"absolute"};function xh(){for(var t=arguments.length,e=new Array(t),r=0;r-1}function Em(t,e){return typeof t=="function"?t.apply(void 0,e):t}function kh(t,e){if(e===0)return t;var r;return function(n){clearTimeout(r),r=setTimeout(function(){t(n)},e)}}function P8(t){return t.split(/\s+/).filter(Boolean)}function zi(t){return[].concat(t)}function wh(t,e){t.indexOf(e)===-1&&t.push(e)}function H8(t){return t.filter(function(e,r){return t.indexOf(e)===r})}function q8(t){return t.split("-")[0]}function ga(t){return[].slice.call(t)}function Sh(t){return Object.keys(t).reduce(function(e,r){return t[r]!==void 0&&(e[r]=t[r]),e},{})}function Cs(){return document.createElement("div")}function g0(t){return["Element","Fragment"].some(function(e){return mc(t,e)})}function V8(t){return mc(t,"NodeList")}function $8(t){return mc(t,"MouseEvent")}function j8(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function W8(t){return g0(t)?[t]:V8(t)?ga(t):Array.isArray(t)?t:ga(document.querySelectorAll(t))}function X0(t,e){t.forEach(function(r){r&&(r.style.transitionDuration=e+"ms")})}function Ch(t,e){t.forEach(function(r){r&&r.setAttribute("data-state",e)})}function U8(t){var e,r=zi(t),n=r[0];return n!=null&&(e=n.ownerDocument)!=null&&e.body?n.ownerDocument:document}function K8(t,e){var r=e.clientX,n=e.clientY;return t.every(function(i){var s=i.popperRect,o=i.popperState,a=i.props,l=a.interactiveBorder,u=q8(o.placement),c=o.modifiersData.offset;if(!c)return!0;var d=u==="bottom"?c.top.y:0,h=u==="top"?c.bottom.y:0,f=u==="right"?c.left.x:0,p=u==="left"?c.right.x:0,b=s.top-n+d>l,y=n-s.bottom-h>l,x=s.left-r+f>l,S=r-s.right-p>l;return b||y||x||S})}function Q0(t,e,r){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[n](i,r)})}function Ah(t,e){for(var r=e;r;){var n;if(t.contains(r))return!0;r=r.getRootNode==null||(n=r.getRootNode())==null?void 0:n.host}return!1}var Dr={isTouch:!1},Mh=0;function G8(){Dr.isTouch||(Dr.isTouch=!0,window.performance&&document.addEventListener("mousemove",Tm))}function Tm(){var t=performance.now();t-Mh<20&&(Dr.isTouch=!1,document.removeEventListener("mousemove",Tm)),Mh=t}function J8(){var t=document.activeElement;if(j8(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Y8(){document.addEventListener("touchstart",G8,ri),window.addEventListener("blur",J8)}var Z8=typeof window<"u"&&typeof document<"u",X8=Z8?!!window.msCrypto:!1,Q8={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},eb={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},yr=Object.assign({appendTo:Mm,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Q8,eb),tb=Object.keys(yr),rb=function(e){var r=Object.keys(e);r.forEach(function(n){yr[n]=e[n]})};function Dm(t){var e=t.plugins||[],r=e.reduce(function(n,i){var s=i.name,o=i.defaultValue;if(s){var a;n[s]=t[s]!==void 0?t[s]:(a=yr[s])!=null?a:o}return n},{});return Object.assign({},t,r)}function nb(t,e){var r=e?Object.keys(Dm(Object.assign({},yr,{plugins:e}))):tb,n=r.reduce(function(i,s){var o=(t.getAttribute("data-tippy-"+s)||"").trim();if(!o)return i;if(s==="content")i[s]=o;else try{i[s]=JSON.parse(o)}catch{i[s]=o}return i},{});return n}function Eh(t,e){var r=Object.assign({},e,{content:Em(e.content,[t])},e.ignoreAttributes?{}:nb(t,e.plugins));return r.aria=Object.assign({},yr.aria,r.aria),r.aria={expanded:r.aria.expanded==="auto"?e.interactive:r.aria.expanded,content:r.aria.content==="auto"?e.interactive?null:"describedby":r.aria.content},r}var ib=function(){return"innerHTML"};function au(t,e){t[ib()]=e}function Th(t){var e=Cs();return t===!0?e.className=Cm:(e.className=Am,g0(t)?e.appendChild(t):au(e,t)),e}function Dh(t,e){g0(e.content)?(au(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?au(t,e.content):t.textContent=e.content)}function lu(t){var e=t.firstElementChild,r=ga(e.children);return{box:e,content:r.find(function(n){return n.classList.contains(Sm)}),arrow:r.find(function(n){return n.classList.contains(Cm)||n.classList.contains(Am)}),backdrop:r.find(function(n){return n.classList.contains(F8)})}}function Om(t){var e=Cs(),r=Cs();r.className=B8,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=Cs();n.className=Sm,n.setAttribute("data-state","hidden"),Dh(n,t.props),e.appendChild(r),r.appendChild(n),i(t.props,t.props);function i(s,o){var a=lu(e),l=a.box,u=a.content,c=a.arrow;o.theme?l.setAttribute("data-theme",o.theme):l.removeAttribute("data-theme"),typeof o.animation=="string"?l.setAttribute("data-animation",o.animation):l.removeAttribute("data-animation"),o.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?l.setAttribute("role",o.role):l.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&Dh(u,t.props),o.arrow?c?s.arrow!==o.arrow&&(l.removeChild(c),l.appendChild(Th(o.arrow))):l.appendChild(Th(o.arrow)):c&&l.removeChild(c)}return{popper:e,onUpdate:i}}Om.$$tippy=!0;var sb=1,Ao=[],el=[];function ob(t,e){var r=Eh(t,Object.assign({},yr,Dm(Sh(e)))),n,i,s,o=!1,a=!1,l=!1,u=!1,c,d,h,f=[],p=kh(Ae,r.interactiveDebounce),b,y=sb++,x=null,S=H8(r.plugins),M={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:y,reference:t,popper:Cs(),popperInstance:x,props:r,state:M,plugins:S,clearDelayTimeouts:hr,setProps:Zn,setContent:Ar,show:fr,hide:pr,hideWithInteractivity:Lt,enable:Jr,disable:Cr,unmount:Xn,destroy:vn};if(!r.render)return w;var T=r.render(w),D=T.popper,O=T.onUpdate;D.setAttribute("data-tippy-root",""),D.id="tippy-"+w.id,w.popper=D,t._tippy=w,D._tippy=w;var I=S.map(function(L){return L.fn(w)}),_=t.hasAttribute("aria-expanded");return wr(),De(),me(),be("onCreate",[w]),r.showOnCreate&&Yn(),D.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),D.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&ce().addEventListener("mousemove",p)}),w;function $(){var L=w.props.touch;return Array.isArray(L)?L:[L,0]}function z(){return $()[0]==="hold"}function j(){var L;return!!((L=w.props.render)!=null&&L.$$tippy)}function G(){return b||t}function ce(){var L=G().parentNode;return L?U8(L):document}function le(){return lu(D)}function Q(L){return w.state.isMounted&&!w.state.isVisible||Dr.isTouch||c&&c.type==="focus"?0:Z0(w.props.delay,L?0:1,yr.delay)}function me(L){L===void 0&&(L=!1),D.style.pointerEvents=w.props.interactive&&!L?"":"none",D.style.zIndex=""+w.props.zIndex}function be(L,Y,oe){if(oe===void 0&&(oe=!0),I.forEach(function(ve){ve[L]&&ve[L].apply(ve,Y)}),oe){var Te;(Te=w.props)[L].apply(Te,Y)}}function et(){var L=w.props.aria;if(L.content){var Y="aria-"+L.content,oe=D.id,Te=zi(w.props.triggerTarget||t);Te.forEach(function(ve){var Ct=ve.getAttribute(Y);if(w.state.isVisible)ve.setAttribute(Y,Ct?Ct+" "+oe:oe);else{var Yt=Ct&&Ct.replace(oe,"").trim();Yt?ve.setAttribute(Y,Yt):ve.removeAttribute(Y)}})}}function De(){if(!(_||!w.props.aria.expanded)){var L=zi(w.props.triggerTarget||t);L.forEach(function(Y){w.props.interactive?Y.setAttribute("aria-expanded",w.state.isVisible&&Y===G()?"true":"false"):Y.removeAttribute("aria-expanded")})}}function Ye(){ce().removeEventListener("mousemove",p),Ao=Ao.filter(function(L){return L!==p})}function Ce(L){if(!(Dr.isTouch&&(l||L.type==="mousedown"))){var Y=L.composedPath&&L.composedPath()[0]||L.target;if(!(w.props.interactive&&Ah(D,Y))){if(zi(w.props.triggerTarget||t).some(function(oe){return Ah(oe,Y)})){if(Dr.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else be("onClickOutside",[w,L]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),a=!0,setTimeout(function(){a=!1}),w.state.isMounted||Nt())}}}function xt(){l=!0}function kt(){l=!1}function Ze(){var L=ce();L.addEventListener("mousedown",Ce,!0),L.addEventListener("touchend",Ce,ri),L.addEventListener("touchstart",kt,ri),L.addEventListener("touchmove",xt,ri)}function Nt(){var L=ce();L.removeEventListener("mousedown",Ce,!0),L.removeEventListener("touchend",Ce,ri),L.removeEventListener("touchstart",kt,ri),L.removeEventListener("touchmove",xt,ri)}function wt(L,Y){Vt(L,function(){!w.state.isVisible&&D.parentNode&&D.parentNode.contains(D)&&Y()})}function it(L,Y){Vt(L,Y)}function Vt(L,Y){var oe=le().box;function Te(ve){ve.target===oe&&(Q0(oe,"remove",Te),Y())}if(L===0)return Y();Q0(oe,"remove",d),Q0(oe,"add",Te),d=Te}function St(L,Y,oe){oe===void 0&&(oe=!1);var Te=zi(w.props.triggerTarget||t);Te.forEach(function(ve){ve.addEventListener(L,Y,oe),f.push({node:ve,eventType:L,handler:Y,options:oe})})}function wr(){z()&&(St("touchstart",Oe,{passive:!0}),St("touchend",st,{passive:!0})),P8(w.props.trigger).forEach(function(L){if(L!=="manual")switch(St(L,Oe),L){case"mouseenter":St("mouseleave",st);break;case"focus":St(X8?"focusout":"blur",Me);break;case"focusin":St("focusout",Me);break}})}function se(){f.forEach(function(L){var Y=L.node,oe=L.eventType,Te=L.handler,ve=L.options;Y.removeEventListener(oe,Te,ve)}),f=[]}function Oe(L){var Y,oe=!1;if(!(!w.state.isEnabled||Ee(L)||a)){var Te=((Y=c)==null?void 0:Y.type)==="focus";c=L,b=L.currentTarget,De(),!w.state.isVisible&&$8(L)&&Ao.forEach(function(ve){return ve(L)}),L.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||o)&&w.props.hideOnClick!==!1&&w.state.isVisible?oe=!0:Yn(L),L.type==="click"&&(o=!oe),oe&&!Te&&dr(L)}}function Ae(L){var Y=L.target,oe=G().contains(Y)||D.contains(Y);if(!(L.type==="mousemove"&&oe)){var Te=Sr().concat(D).map(function(ve){var Ct,Yt=ve._tippy,Ai=(Ct=Yt.popperInstance)==null?void 0:Ct.state;return Ai?{popperRect:ve.getBoundingClientRect(),popperState:Ai,props:r}:null}).filter(Boolean);K8(Te,L)&&(Ye(),dr(L))}}function st(L){var Y=Ee(L)||w.props.trigger.indexOf("click")>=0&&o;if(!Y){if(w.props.interactive){w.hideWithInteractivity(L);return}dr(L)}}function Me(L){w.props.trigger.indexOf("focusin")<0&&L.target!==G()||w.props.interactive&&L.relatedTarget&&D.contains(L.relatedTarget)||dr(L)}function Ee(L){return Dr.isTouch?z()!==L.type.indexOf("touch")>=0:!1}function Ne(){ue();var L=w.props,Y=L.popperOptions,oe=L.placement,Te=L.offset,ve=L.getReferenceClientRect,Ct=L.moveTransition,Yt=j()?lu(D).arrow:null,Ai=ve?{getBoundingClientRect:ve,contextElement:ve.contextElement||G()}:t,rd={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(po){var Mi=po.state;if(j()){var E4=le(),L0=E4.box;["placement","reference-hidden","escaped"].forEach(function(mo){mo==="placement"?L0.setAttribute("data-placement",Mi.placement):Mi.attributes.popper["data-popper-"+mo]?L0.setAttribute("data-"+mo,""):L0.removeAttribute("data-"+mo)}),Mi.attributes.popper={}}}},Qn=[{name:"offset",options:{offset:Te}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ct}},rd];j()&&Yt&&Qn.push({name:"arrow",options:{element:Yt,padding:3}}),Qn.push.apply(Qn,(Y==null?void 0:Y.modifiers)||[]),w.popperInstance=I8(Ai,D,Object.assign({},Y,{placement:oe,onFirstUpdate:h,modifiers:Qn}))}function ue(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function tt(){var L=w.props.appendTo,Y,oe=G();w.props.interactive&&L===Mm||L==="parent"?Y=oe.parentNode:Y=Em(L,[oe]),Y.contains(D)||Y.appendChild(D),w.state.isMounted=!0,Ne()}function Sr(){return ga(D.querySelectorAll("[data-tippy-root]"))}function Yn(L){w.clearDelayTimeouts(),L&&be("onTrigger",[w,L]),Ze();var Y=Q(!0),oe=$(),Te=oe[0],ve=oe[1];Dr.isTouch&&Te==="hold"&&ve&&(Y=ve),Y?n=setTimeout(function(){w.show()},Y):w.show()}function dr(L){if(w.clearDelayTimeouts(),be("onUntrigger",[w,L]),!w.state.isVisible){Nt();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(L.type)>=0&&o)){var Y=Q(!1);Y?i=setTimeout(function(){w.state.isVisible&&w.hide()},Y):s=requestAnimationFrame(function(){w.hide()})}}function Jr(){w.state.isEnabled=!0}function Cr(){w.hide(),w.state.isEnabled=!1}function hr(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(s)}function Zn(L){if(!w.state.isDestroyed){be("onBeforeUpdate",[w,L]),se();var Y=w.props,oe=Eh(t,Object.assign({},Y,Sh(L),{ignoreAttributes:!0}));w.props=oe,wr(),Y.interactiveDebounce!==oe.interactiveDebounce&&(Ye(),p=kh(Ae,oe.interactiveDebounce)),Y.triggerTarget&&!oe.triggerTarget?zi(Y.triggerTarget).forEach(function(Te){Te.removeAttribute("aria-expanded")}):oe.triggerTarget&&t.removeAttribute("aria-expanded"),De(),me(),O&&O(Y,oe),w.popperInstance&&(Ne(),Sr().forEach(function(Te){requestAnimationFrame(Te._tippy.popperInstance.forceUpdate)})),be("onAfterUpdate",[w,L])}}function Ar(L){w.setProps({content:L})}function fr(){var L=w.state.isVisible,Y=w.state.isDestroyed,oe=!w.state.isEnabled,Te=Dr.isTouch&&!w.props.touch,ve=Z0(w.props.duration,0,yr.duration);if(!(L||Y||oe||Te)&&!G().hasAttribute("disabled")&&(be("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,j()&&(D.style.visibility="visible"),me(),Ze(),w.state.isMounted||(D.style.transition="none"),j()){var Ct=le(),Yt=Ct.box,Ai=Ct.content;X0([Yt,Ai],0)}h=function(){var Qn;if(!(!w.state.isVisible||u)){if(u=!0,D.offsetHeight,D.style.transition=w.props.moveTransition,j()&&w.props.animation){var N0=le(),po=N0.box,Mi=N0.content;X0([po,Mi],ve),Ch([po,Mi],"visible")}et(),De(),wh(el,w),(Qn=w.popperInstance)==null||Qn.forceUpdate(),be("onMount",[w]),w.props.animation&&j()&&it(ve,function(){w.state.isShown=!0,be("onShown",[w])})}},tt()}}function pr(){var L=!w.state.isVisible,Y=w.state.isDestroyed,oe=!w.state.isEnabled,Te=Z0(w.props.duration,1,yr.duration);if(!(L||Y||oe)&&(be("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,u=!1,o=!1,j()&&(D.style.visibility="hidden"),Ye(),Nt(),me(!0),j()){var ve=le(),Ct=ve.box,Yt=ve.content;w.props.animation&&(X0([Ct,Yt],Te),Ch([Ct,Yt],"hidden"))}et(),De(),w.props.animation?j()&&wt(Te,w.unmount):w.unmount()}}function Lt(L){ce().addEventListener("mousemove",p),wh(Ao,p),p(L)}function Xn(){w.state.isVisible&&w.hide(),w.state.isMounted&&(ue(),Sr().forEach(function(L){L._tippy.unmount()}),D.parentNode&&D.parentNode.removeChild(D),el=el.filter(function(L){return L!==w}),w.state.isMounted=!1,be("onHidden",[w]))}function vn(){w.state.isDestroyed||(w.clearDelayTimeouts(),w.unmount(),se(),delete t._tippy,w.state.isDestroyed=!0,be("onDestroy",[w]))}}function oo(t,e){e===void 0&&(e={});var r=yr.plugins.concat(e.plugins||[]);Y8();var n=Object.assign({},e,{plugins:r}),i=W8(t),s=i.reduce(function(o,a){var l=a&&ob(a,n);return l&&o.push(l),o},[]);return g0(t)?s[0]:s}oo.defaultProps=yr;oo.setDefaultProps=rb;oo.currentInput=Dr;Object.assign({},mm,{effect:function(e){var r=e.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow)}});oo.setDefaultProps({render:Om});function Oh(t){return O4((e,r)=>({get(){return e(),t},set(n){t=n,requestAnimationFrame(()=>{requestAnimationFrame(()=>{r()})})}}))}class ab extends D7{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=Oh(this.view.state),this.reactiveExtensionStorage=Oh(this.extensionStorage),this.on("beforeTransaction",({nextState:r})=>{this.reactiveState.value=r,this.reactiveExtensionStorage.value=this.extensionStorage}),g1(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,r){const n=super.registerPlugin(e,r);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(e){const r=super.unregisterPlugin(e);return this.reactiveState&&r&&(this.reactiveState.value=r),r}}const lb=T4({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=sn(),r=D4();return Ls(()=>{const n=t.editor;n&&n.options.element&&e.value&&_s(()=>{if(!e.value||!n.options.element.firstChild)return;const i=hs(e.value);e.value.append(...n.options.element.childNodes),n.contentComponent=r.ctx._,r&&(n.appContext={...r.appContext,provides:r.provides}),n.setOptions({element:i}),n.createNodeViews()})}),m1(()=>{const n=t.editor;if(!n||(n.isDestroyed||n.view.setProps({nodeViews:{}}),n.contentComponent=null,n.appContext=null,!n.options.element.firstChild))return;const i=document.createElement("div");i.append(...n.options.element.childNodes),n.setOptions({element:i})}),{rootEl:e}},render(){return p1("div",{ref:t=>{this.rootEl=t}})}});class ub{constructor(e,{props:r={},editor:n}){this.editor=n,this.component=g1(e),this.el=document.createElement("div"),this.props=N4(r),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var e,r,n,i;return!((r=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||r===void 0)&&r.exposed?this.renderedComponent.vNode.component.exposed:(i=(n=this.renderedComponent.vNode)===null||n===void 0?void 0:n.component)===null||i===void 0?void 0:i.proxy}renderComponent(){let e=p1(this.component,this.props);return this.editor.appContext&&(e.appContext=this.editor.appContext),typeof document<"u"&&this.el&&sd(e,this.el),{vNode:e,destroy:()=>{this.el&&sd(null,this.el),this.el=null,e=null},el:this.el?this.el.firstElementChild:null}}updateProps(e={}){Object.entries(e).forEach(([r,n])=>{this.props[r]=n}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}const cb=/^\s*>\s$/,db=ye.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Gi({find:cb,type:this.type})]}}),hb=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,fb=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,pb=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,mb=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,gb=mt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ki({find:hb,type:this.type}),Ki({find:pb,type:this.type})]},addPasteRules(){return[xi({find:fb,type:this.type}),xi({find:mb,type:this.type})]}}),bb="listItem",Nh="textStyle",Lh=/^\s*([-+*])\s$/,yb=ye.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(bb,this.editor.getAttributes(Nh)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Gi({find:Lh,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Gi({find:Lh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Nh),editor:this.editor})),[t]}}),vb=/(^|[^`])`([^`]+)`(?!`)/,xb=/(^|[^`])`([^`]+)`(?!`)/g,kb=mt.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ki({find:vb,type:this.type})]},addPasteRules(){return[xi({find:xb,type:this.type})]}}),wb=/^```([a-z]+)?[\s\n]$/,Sb=/^~~~([a-z]+)?[\s\n]$/,Cb=ye.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:r}=this.options,s=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(o=>o.startsWith(r)).map(o=>o.replace(r,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Se(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,r=e.pos===1;return!t||e.parent.type.name!==this.name?!1:r||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:r}=e,{$from:n,empty:i}=r;if(!i||n.parent.type!==this.type)return!1;const s=n.parentOffset===n.parent.nodeSize-2,o=n.parent.textContent.endsWith(` `);return!s||!o?!1:t.chain().command(({tr:a})=>(a.delete(n.pos-2,n.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:r,doc:n}=e,{$from:i,empty:s}=r;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:n.nodeAt(a)?t.commands.command(({tr:u})=>(u.setSelection(ne.near(n.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[nu({find:wb,type:this.type,getAttributes:t=>({language:t[1]})}),nu({find:Sb,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Ve({key:new Je("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const r=e.clipboardData.getData("text/plain"),n=e.clipboardData.getData("vscode-editor-data"),i=n?JSON.parse(n):void 0,s=i==null?void 0:i.mode;if(!r||!s)return!1;const{tr:o,schema:a}=t.state,l=a.text(r.replace(/\r\n?/g,` `));return o.replaceSelectionWith(this.type.create({language:s},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(ee.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),Ab=ye.create({name:"doc",topNode:!0,content:"block+"});function Mb(t={}){return new Ve({view(e){return new Eb(e,t)}})}class Eb{constructor(e,r){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:r})=>this.editorView.dom.removeEventListener(e,r))}update(e,r){this.cursorPos!=null&&r.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),r=!e.parent.inlineContent,n,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,a=s.height/i.offsetHeight;if(r){let d=e.nodeBefore,h=e.nodeAfter;if(d||h){let f=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(f){let p=f.getBoundingClientRect(),b=d?p.bottom:p.top;d&&h&&(b=(b+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*a;n={left:p.left,right:p.right,top:b-y,bottom:b+y}}}}if(!n){let d=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*o;n={left:d.left-h,right:d.left+h,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),h=d.width/l.offsetWidth,f=d.height/l.offsetHeight;u=d.left-l.scrollLeft*h,c=d.top-l.scrollTop*f}this.element.style.left=(n.left-u)/o+"px",this.element.style.top=(n.top-c)/a+"px",this.element.style.width=(n.right-n.left)/o+"px",this.element.style.height=(n.bottom-n.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),i=n&&n.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,r,e):i;if(r&&!s){let o=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=$1(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const Tb=Ke.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Mb(this.options)]}});class We extends ne{constructor(e){super(e,e)}map(e,r){let n=e.resolve(r.map(this.head));return We.valid(n)?new We(n):ne.near(n)}content(){return V.empty}eq(e){return e instanceof We&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new We(e.resolve(r.pos))}getBookmark(){return new gc(this.anchor)}static valid(e){let r=e.parent;if(r.isTextblock||!Db(e)||!Ob(e))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let i=r.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,r,n=!1){e:for(;;){if(!n&&We.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(r>0?e.indexAfter(o)0){s=a.child(r>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=r;let l=e.doc.resolve(i);if(We.valid(l))return l}for(;;){let o=r>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!X.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*r),n=!1;continue e}break}s=o,i+=r;let a=e.doc.resolve(i);if(We.valid(a))return a}return null}}}We.prototype.visible=!1;We.findFrom=We.findGapCursorFrom;ne.jsonID("gapcursor",We);class gc{constructor(e){this.pos=e}map(e){return new gc(e.map(this.pos))}resolve(e){let r=e.resolve(this.pos);return We.valid(r)?new We(r):ne.near(r)}}function Nm(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function Db(t){for(let e=t.depth;e>=0;e--){let r=t.index(e),n=t.node(e);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||Nm(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Ob(t){for(let e=t.depth;e>=0;e--){let r=t.indexAfter(e),n=t.node(e);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||Nm(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Nb(){return new Ve({props:{decorations:Rb,createSelectionBetween(t,e,r){return e.pos==r.pos&&We.valid(r)?new We(r):null},handleClick:_b,handleKeyDown:Lb,handleDOMEvents:{beforeinput:zb}}})}const Lb=Lp({ArrowLeft:Mo("horiz",-1),ArrowRight:Mo("horiz",1),ArrowUp:Mo("vert",-1),ArrowDown:Mo("vert",1)});function Mo(t,e){const r=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,i,s){let o=n.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof ee){if(!s.endOfTextblock(r)||a.depth==0)return!1;l=!1,a=n.doc.resolve(e>0?a.after():a.before())}let u=We.findGapCursorFrom(a,e,l);return u?(i&&i(n.tr.setSelection(new We(u))),!0):!1}}function _b(t,e,r){if(!t||!t.editable)return!1;let n=t.state.doc.resolve(e);if(!We.valid(n))return!1;let i=t.posAtCoords({left:r.clientX,top:r.clientY});return i&&i.inside>-1&&X.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new We(n))),!0)}function zb(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof We))return!1;let{$from:r}=t.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(t.state.schema.nodes.text);if(!n)return!1;let i=R.empty;for(let o=n.length-1;o>=0;o--)i=R.from(n[o].createAndFill(null,i));let s=t.state.tr.replace(r.pos,r.pos,new V(i,0,0));return s.setSelection(ee.near(s.doc.resolve(r.pos+1))),t.dispatch(s),!1}function Rb(t){if(!(t.selection instanceof We))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ze.create(t.doc,[rt.widget(t.selection.head,e,{key:"gapcursor"})])}const Ib=Ke.create({name:"gapCursor",addProseMirrorPlugins(){return[Nb()]},extendNodeSchema(t){var e;const r={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=pe(J(t,"allowGapCursor",r)))!==null&&e!==void 0?e:null}}}),Bb=ye.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Se(this.options.HTMLAttributes,t)]},renderText(){return` `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:r,editor:n})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=r;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=n.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&o){const d=l.filter(h=>a.includes(h.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Fb=ye.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Se(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>nu({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var ba=200,ct=function(){};ct.prototype.append=function(e){return e.length?(e=ct.from(e),!this.length&&e||e.length=r?ct.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,r))};ct.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};ct.prototype.forEach=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(e,r,n,0):this.forEachInvertedInner(e,r,n,0)};ct.prototype.map=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},r,n),i};ct.from=function(e){return e instanceof ct?e:e&&e.length?new Lm(e):ct.empty};var Lm=(function(t){function e(n){t.call(this),this.values=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,a){for(var l=s;l=o;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=ba)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=ba)return new e(i.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e})(ct);ct.empty=new Lm([]);var Pb=(function(t){function e(r,n){t.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.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(n){return na&&this.right.forEachInner(n,Math.max(i-a,0),Math.min(this.length,s)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,s,o){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(n,i-a,Math.max(s,a)-a,o+a)===!1||s=s?this.right.slice(n-s,i-s):this.left.slice(n,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(ct);const Hb=500;class gr{constructor(e,r){this.items=e,this.eventCount=r}popEvent(e,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,s;r&&(i=this.remapping(n,this.items.length),s=i.maps.length);let o=e.tr,a,l,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){i||(i=this.remapping(n,h+1),s=i.maps.length),s--,c.push(d);return}if(i){c.push(new Mr(d.map));let f=d.step.map(i.slice(s)),p;f&&o.maybeStep(f).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],u.push(new Mr(p,void 0,void 0,u.length+c.length))),s--,p&&i.appendMap(p,s)}else o.maybeStep(d.step);if(d.selection)return a=i?d.selection.map(i.slice(s)):d.selection,l=new gr(this.items.slice(0,n).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,r,n,i){let s=[],o=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;cVb&&(a=qb(a,u),o-=u),new gr(a.append(s),o)}remapping(e,r){let n=new Is;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,o)},e,r),n}addMaps(e){return this.eventCount==0?this:new gr(this.items.append(e.map(r=>new Mr(r))),this.eventCount)}rebased(e,r){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-r),s=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=r;this.items.forEach(h=>{let f=s.getMirror(--l);if(f==null)return;o=Math.min(o,f);let p=s.maps[f];if(h.step){let b=e.steps[f].invert(e.docs[f]),y=h.selection&&h.selection.map(s.slice(l+1,f));y&&a++,n.push(new Mr(p,b,y))}else n.push(new Mr(p))},i);let u=[];for(let h=r;hHb&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let e=0;return this.items.forEach(r=>{r.step||e++}),e}compress(e=this.items.length){let r=this.remapping(0,e),n=r.maps.length,i=[],s=0;return this.items.forEach((o,a)=>{if(a>=e)i.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(r.slice(n)),u=l&&l.getMap();if(n--,u&&r.appendMap(u,n),l){let c=o.selection&&o.selection.map(r.slice(n));c&&s++;let d=new Mr(u.invert(),l,c),h,f=i.length-1;(h=i.length&&i[f].merge(d))?i[f]=h:i.push(d)}}else o.map&&n--},this.items.length,0),new gr(ct.from(i.reverse()),s)}}gr.empty=new gr(ct.empty,0);function qb(t,e){let r;return t.forEach((n,i)=>{if(n.selection&&e--==0)return r=i,!1}),t.slice(r)}class Mr{constructor(e,r,n,i){this.map=e,this.step=r,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let r=e.step.merge(this.step);if(r)return new Mr(r.getMap().invert(),r,this.selection)}}}class An{constructor(e,r,n,i,s){this.done=e,this.undone=r,this.prevRanges=n,this.prevTime=i,this.prevComposition=s}}const Vb=20;function $b(t,e,r,n){let i=r.getMeta(mi),s;if(i)return i.historyState;r.getMeta(Ub)&&(t=new An(t.done,t.undone,null,0,-1));let o=r.getMeta("appendedTransaction");if(r.steps.length==0)return t;if(o&&o.getMeta(mi))return o.getMeta(mi).redo?new An(t.done.addTransform(r,void 0,n,Yo(e)),t.undone,_h(r.mapping.maps),t.prevTime,t.prevComposition):new An(t.done,t.undone.addTransform(r,void 0,n,Yo(e)),null,t.prevTime,t.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=r.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(r.time||0)-n.newGroupDelay||!jb(r,t.prevRanges)),u=o?tl(t.prevRanges,r.mapping):_h(r.mapping.maps);return new An(t.done.addTransform(r,l?e.selection.getBookmark():void 0,n,Yo(e)),gr.empty,u,r.time,a??t.prevComposition)}else return(s=r.getMeta("rebased"))?new An(t.done.rebased(r,s),t.undone.rebased(r,s),tl(t.prevRanges,r.mapping),t.prevTime,t.prevComposition):new An(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),tl(t.prevRanges,r.mapping),t.prevTime,t.prevComposition)}function jb(t,e){if(!e)return!1;if(!t.docChanged)return!0;let r=!1;return t.mapping.maps[0].forEach((n,i)=>{for(let s=0;s=e[s]&&(r=!0)}),r}function _h(t){let e=[];for(let r=t.length-1;r>=0&&e.length==0;r--)t[r].forEach((n,i,s,o)=>e.push(s,o));return e}function tl(t,e){if(!t)return null;let r=[];for(let n=0;n{let i=mi.getState(r);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(n){let s=Wb(i,r,t);s&&n(e?s.scrollIntoView():s)}return!0}}const zm=_m(!1,!0),Rm=_m(!0,!0),Gb=Ke.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>zm(t,e),redo:()=>({state:t,dispatch:e})=>Rm(t,e)}},addProseMirrorPlugins(){return[Kb(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Jb=ye.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Se(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!O7(e,e.schema.nodes[this.name]))return!1;const{selection:r}=e,{$from:n,$to:i}=r,s=t();return n.parentOffset===0?s.insertContentAt({from:Math.max(n.pos-1,0),to:i.pos},{type:this.name}):s7(r)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:o,dispatch:a})=>{var l;if(a){const{$to:u}=o.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?o.setSelection(ee.create(o.doc,u.pos+1)):u.nodeAfter.isBlock?o.setSelection(X.create(o.doc,u.pos)):o.setSelection(ee.create(o.doc,u.pos));else{const d=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(o.insert(c,d),o.setSelection(ee.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[hm({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Yb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Zb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Xb=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Qb=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,e9=mt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ki({find:Yb,type:this.type}),Ki({find:Xb,type:this.type})]},addPasteRules(){return[xi({find:Zb,type:this.type}),xi({find:Qb,type:this.type})]}}),t9=ye.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Se(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),r9="listItem",Rh="textStyle",Ih=/^(\d+)\.\s$/,n9=ye.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...r}=t;return e===1?["ol",Se(this.options.HTMLAttributes,r),0]:["ol",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(r9,this.editor.getAttributes(Rh)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Gi({find:Ih,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Gi({find:Ih,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Rh)}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1],editor:this.editor})),[t]}}),i9=ye.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),s9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,o9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,a9=mt.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ki({find:s9,type:this.type})]},addPasteRules(){return[xi({find:o9,type:this.type})]}}),l9=ye.create({name:"text",group:"inline"}),u9=Ke.create({name:"starterKit",addExtensions(){var t,e,r,n,i,s,o,a,l,u,c,d,h,f,p,b,y,x;const S=[];return this.options.bold!==!1&&S.push(gb.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&S.push(db.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&S.push(yb.configure((r=this.options)===null||r===void 0?void 0:r.bulletList)),this.options.code!==!1&&S.push(kb.configure((n=this.options)===null||n===void 0?void 0:n.code)),this.options.codeBlock!==!1&&S.push(Cb.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&S.push(Ab.configure((s=this.options)===null||s===void 0?void 0:s.document)),this.options.dropcursor!==!1&&S.push(Tb.configure((o=this.options)===null||o===void 0?void 0:o.dropcursor)),this.options.gapcursor!==!1&&S.push(Ib.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&S.push(Bb.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&S.push(Fb.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&S.push(Gb.configure((c=this.options)===null||c===void 0?void 0:c.history)),this.options.horizontalRule!==!1&&S.push(Jb.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&S.push(e9.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&S.push(t9.configure((f=this.options)===null||f===void 0?void 0:f.listItem)),this.options.orderedList!==!1&&S.push(n9.configure((p=this.options)===null||p===void 0?void 0:p.orderedList)),this.options.paragraph!==!1&&S.push(i9.configure((b=this.options)===null||b===void 0?void 0:b.paragraph)),this.options.strike!==!1&&S.push(a9.configure((y=this.options)===null||y===void 0?void 0:y.strike)),this.options.text!==!1&&S.push(l9.configure((x=this.options)===null||x===void 0?void 0:x.text)),S}});function c9(t){var e;const{char:r,allowSpaces:n,allowedPrefixes:i,startOfLine:s,$position:o}=t,a=N7(r),l=new RegExp(`\\s${a}$`),u=s?"^":"",c=n?new RegExp(`${u}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${u}(?:^)?${a}[^\\s${a}]*`,"gm"),d=((e=o.nodeBefore)===null||e===void 0?void 0:e.isText)&&o.nodeBefore.text;if(!d)return null;const h=o.pos-d.length,f=Array.from(d.matchAll(c)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const p=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(p);if(i!==null&&!b)return null;const y=h+f.index;let x=y+f[0].length;return n&&l.test(d.slice(x-1,x+1))&&(f[0]+=" ",x+=1),y=o.pos?{range:{from:y,to:x},query:f[0].slice(r.length),text:f[0]}:null}const d9=new Je("suggestion");function h9({pluginKey:t=d9,editor:e,char:r="@",allowSpaces:n=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:o="span",decorationClass:a="suggestion",command:l=()=>null,items:u=()=>[],render:c=()=>({}),allow:d=()=>!0,findSuggestionMatch:h=c9}){let f;const p=c==null?void 0:c(),b=new Ve({key:t,view(){return{update:async(y,x)=>{var S,M,w,T,D,O,I;const _=(S=this.key)===null||S===void 0?void 0:S.getState(x),$=(M=this.key)===null||M===void 0?void 0:M.getState(y.state),z=_.active&&$.active&&_.range.from!==$.range.from,j=!_.active&&$.active,G=_.active&&!$.active,ce=!j&&!G&&_.query!==$.query,le=j||z&&ce,Q=ce||z,me=G||z&&ce;if(!le&&!Q&&!me)return;const be=me&&!le?_:$,et=y.dom.querySelector(`[data-decoration-id="${be.decorationId}"]`);f={editor:e,range:be.range,query:be.query,text:be.text,items:[],command:De=>l({editor:e,range:be.range,props:De}),decorationNode:et,clientRect:et?()=>{var De;const{decorationId:Ye}=(De=this.key)===null||De===void 0?void 0:De.getState(e.state),Ce=y.dom.querySelector(`[data-decoration-id="${Ye}"]`);return(Ce==null?void 0:Ce.getBoundingClientRect())||null}:null},le&&((w=p==null?void 0:p.onBeforeStart)===null||w===void 0||w.call(p,f)),Q&&((T=p==null?void 0:p.onBeforeUpdate)===null||T===void 0||T.call(p,f)),(Q||le)&&(f.items=await u({editor:e,query:be.query})),me&&((D=p==null?void 0:p.onExit)===null||D===void 0||D.call(p,f)),Q&&((O=p==null?void 0:p.onUpdate)===null||O===void 0||O.call(p,f)),le&&((I=p==null?void 0:p.onStart)===null||I===void 0||I.call(p,f))},destroy:()=>{var y;f&&((y=p==null?void 0:p.onExit)===null||y===void 0||y.call(p,f))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(y,x,S,M){const{isEditable:w}=e,{composing:T}=e.view,{selection:D}=y,{empty:O,from:I}=D,_={...x};if(_.composing=T,w&&(O||e.view.composing)){(Ix.range.to)&&!T&&!x.composing&&(_.active=!1);const $=h({char:r,allowSpaces:n,allowedPrefixes:i,startOfLine:s,$position:D.$from}),z=`id_${Math.floor(Math.random()*4294967295)}`;$&&d({editor:e,state:M,range:$.range,isActive:x.active})?(_.active=!0,_.decorationId=x.decorationId?x.decorationId:z,_.range=$.range,_.query=$.query,_.text=$.text):_.active=!1}else _.active=!1;return _.active||(_.decorationId=null,_.range={from:0,to:0},_.query=null,_.text=null),_}},props:{handleKeyDown(y,x){var S;const{active:M,range:w}=b.getState(y.state);return M&&((S=p==null?void 0:p.onKeyDown)===null||S===void 0?void 0:S.call(p,{view:y,event:x,range:w}))||!1},decorations(y){const{active:x,range:S,decorationId:M}=b.getState(y);return x?ze.create(y.doc,[rt.inline(S.from,S.to,{nodeName:o,class:a,"data-decoration-id":M})]):null}}});return b}const f9=new Je("mention"),p9=ye.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderText({options:t,node:e}){var r;return`${t.suggestion.char}${(r=e.attrs.label)!==null&&r!==void 0?r:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e}){var r;return["span",Se(this.HTMLAttributes,t.HTMLAttributes),`${t.suggestion.char}${(r=e.attrs.label)!==null&&r!==void 0?r:e.attrs.id}`]},suggestion:{char:"@",pluginKey:f9,command:({editor:t,range:e,props:r})=>{var n,i,s;const o=t.view.state.selection.$to.nodeAfter;((n=o==null?void 0:o.text)===null||n===void 0?void 0:n.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:r},{type:"text",text:" "}]).run(),(s=(i=t.view.dom.ownerDocument.defaultView)===null||i===void 0?void 0:i.getSelection())===null||s===void 0||s.collapseToEnd()},allow:({state:t,range:e})=>{const r=t.doc.resolve(e.from),n=t.schema.nodes[this.name];return!!r.parent.type.contentMatch.matchType(n)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Se({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})];const r={...this.options};r.HTMLAttributes=Se({"data-type":this.name},this.options.HTMLAttributes,e);const n=this.options.renderHTML({options:r,node:t});return typeof n=="string"?["span",Se({"data-type":this.name},this.options.HTMLAttributes,e),n]:n},renderText({node:t}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:t})):this.options.renderText({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let r=!1;const{selection:n}=e,{empty:i,anchor:s}=n;return i?(e.doc.nodesBetween(s-1,s,(o,a)=>{if(o.type.name===this.name)return r=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",a,a+o.nodeSize),!1}),r):!1})}},addProseMirrorPlugins(){return[h9({editor:this.editor,...this.options.suggestion})]}}),m9=mt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const r=sc(t,this.type);return Object.entries(r).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),g9=Ke.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),b9="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",y9="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",uu="numeric",cu="ascii",du="alpha",As="asciinumeric",gs="alphanumeric",hu="domain",Im="emoji",v9="scheme",x9="slashscheme",nl="whitespace";function k9(t,e){return t in e||(e[t]=[]),e[t]}function ui(t,e,r){e[uu]&&(e[As]=!0,e[gs]=!0),e[cu]&&(e[As]=!0,e[du]=!0),e[As]&&(e[gs]=!0),e[du]&&(e[gs]=!0),e[gs]&&(e[hu]=!0),e[Im]&&(e[hu]=!0);for(const n in e){const i=k9(n,r);i.indexOf(t)<0&&i.push(t)}}function w9(t,e){const r={};for(const n in e)e[n].indexOf(t)>=0&&(r[n]=!0);return r}function Rt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Rt.groups={};Rt.prototype={accepts(){return!!this.t},go(t){const e=this,r=e.j[t];if(r)return r;for(let n=0;nt.ta(e,r,n,i),$e=(t,e,r,n,i)=>t.tr(e,r,n,i),Bh=(t,e,r,n,i)=>t.ts(e,r,n,i),P=(t,e,r,n,i)=>t.tt(e,r,n,i),en="WORD",fu="UWORD",Bm="ASCIINUMERICAL",Fm="ALPHANUMERICAL",Ws="LOCALHOST",pu="TLD",mu="UTLD",Zo="SCHEME",Ri="SLASH_SCHEME",bc="NUM",gu="WS",yc="NL",Ms="OPENBRACE",Es="CLOSEBRACE",ya="OPENBRACKET",va="CLOSEBRACKET",xa="OPENPAREN",ka="CLOSEPAREN",wa="OPENANGLEBRACKET",Sa="CLOSEANGLEBRACKET",Ca="FULLWIDTHLEFTPAREN",Aa="FULLWIDTHRIGHTPAREN",Ma="LEFTCORNERBRACKET",Ea="RIGHTCORNERBRACKET",Ta="LEFTWHITECORNERBRACKET",Da="RIGHTWHITECORNERBRACKET",Oa="FULLWIDTHLESSTHAN",Na="FULLWIDTHGREATERTHAN",La="AMPERSAND",_a="APOSTROPHE",za="ASTERISK",Mn="AT",Ra="BACKSLASH",Ia="BACKTICK",Ba="CARET",Dn="COLON",vc="COMMA",Fa="DOLLAR",Er="DOT",Pa="EQUALS",xc="EXCLAMATION",Xt="HYPHEN",Ts="PERCENT",Ha="PIPE",qa="PLUS",Va="POUND",Ds="QUERY",kc="QUOTE",Pm="FULLWIDTHMIDDLEDOT",wc="SEMI",Tr="SLASH",Os="TILDE",$a="UNDERSCORE",Hm="EMOJI",ja="SYM";var qm=Object.freeze({__proto__:null,ALPHANUMERICAL:Fm,AMPERSAND:La,APOSTROPHE:_a,ASCIINUMERICAL:Bm,ASTERISK:za,AT:Mn,BACKSLASH:Ra,BACKTICK:Ia,CARET:Ba,CLOSEANGLEBRACKET:Sa,CLOSEBRACE:Es,CLOSEBRACKET:va,CLOSEPAREN:ka,COLON:Dn,COMMA:vc,DOLLAR:Fa,DOT:Er,EMOJI:Hm,EQUALS:Pa,EXCLAMATION:xc,FULLWIDTHGREATERTHAN:Na,FULLWIDTHLEFTPAREN:Ca,FULLWIDTHLESSTHAN:Oa,FULLWIDTHMIDDLEDOT:Pm,FULLWIDTHRIGHTPAREN:Aa,HYPHEN:Xt,LEFTCORNERBRACKET:Ma,LEFTWHITECORNERBRACKET:Ta,LOCALHOST:Ws,NL:yc,NUM:bc,OPENANGLEBRACKET:wa,OPENBRACE:Ms,OPENBRACKET:ya,OPENPAREN:xa,PERCENT:Ts,PIPE:Ha,PLUS:qa,POUND:Va,QUERY:Ds,QUOTE:kc,RIGHTCORNERBRACKET:Ea,RIGHTWHITECORNERBRACKET:Da,SCHEME:Zo,SEMI:wc,SLASH:Tr,SLASH_SCHEME:Ri,SYM:ja,TILDE:Os,TLD:pu,UNDERSCORE:$a,UTLD:mu,UWORD:fu,WORD:en,WS:gu});const Zr=/[a-z]/,cs=new RegExp("\\p{L}","u"),il=new RegExp("\\p{Emoji}","u"),Xr=/\d/,sl=/\s/,Fh="\r",ol=` `,S9="️",C9="‍",al="";let Eo=null,To=null;function A9(t=[]){const e={};Rt.groups=e;const r=new Rt;Eo==null&&(Eo=Ph(b9)),To==null&&(To=Ph(y9)),P(r,"'",_a),P(r,"{",Ms),P(r,"}",Es),P(r,"[",ya),P(r,"]",va),P(r,"(",xa),P(r,")",ka),P(r,"<",wa),P(r,">",Sa),P(r,"(",Ca),P(r,")",Aa),P(r,"「",Ma),P(r,"」",Ea),P(r,"『",Ta),P(r,"』",Da),P(r,"<",Oa),P(r,">",Na),P(r,"&",La),P(r,"*",za),P(r,"@",Mn),P(r,"`",Ia),P(r,"^",Ba),P(r,":",Dn),P(r,",",vc),P(r,"$",Fa),P(r,".",Er),P(r,"=",Pa),P(r,"!",xc),P(r,"-",Xt),P(r,"%",Ts),P(r,"|",Ha),P(r,"+",qa),P(r,"#",Va),P(r,"?",Ds),P(r,'"',kc),P(r,"/",Tr),P(r,";",wc),P(r,"~",Os),P(r,"_",$a),P(r,"\\",Ra),P(r,"・",Pm);const n=$e(r,Xr,bc,{[uu]:!0});$e(n,Xr,n);const i=$e(n,Zr,Bm,{[As]:!0}),s=$e(n,cs,Fm,{[gs]:!0}),o=$e(r,Zr,en,{[cu]:!0});$e(o,Xr,i),$e(o,Zr,o),$e(i,Xr,i),$e(i,Zr,i);const a=$e(r,cs,fu,{[du]:!0});$e(a,Zr),$e(a,Xr,s),$e(a,cs,a),$e(s,Xr,s),$e(s,Zr),$e(s,cs,s);const l=P(r,ol,yc,{[nl]:!0}),u=P(r,Fh,gu,{[nl]:!0}),c=$e(r,sl,gu,{[nl]:!0});P(r,al,c),P(u,ol,l),P(u,al,c),$e(u,sl,c),P(c,Fh),P(c,ol),$e(c,sl,c),P(c,al,c);const d=$e(r,il,Hm,{[Im]:!0});P(d,"#"),$e(d,il,d),P(d,S9,d);const h=P(d,C9);P(h,"#"),$e(h,il,d);const f=[[Zr,o],[Xr,i]],p=[[Zr,null],[cs,a],[Xr,s]];for(let b=0;bb[0]>y[0]?1:-1);for(let b=0;b=0?S[hu]=!0:Zr.test(y)?Xr.test(y)?S[As]=!0:S[cu]=!0:S[uu]=!0,Bh(r,y,y,S)}return Bh(r,"localhost",Ws,{ascii:!0}),r.jd=new Rt(ja),{start:r,tokens:Object.assign({groups:e},qm)}}function Vm(t,e){const r=M9(e.replace(/[A-Z]/g,a=>a.toLowerCase())),n=r.length,i=[];let s=0,o=0;for(;o=0&&(d+=r[o].length,h++),u+=r[o].length,s+=r[o].length,o++;s-=d,o-=h,u-=d,i.push({t:c.t,v:e.slice(s-u,s),s:s-u,e:s})}return i}function M9(t){const e=[],r=t.length;let n=0;for(;n56319||n+1===r||(s=t.charCodeAt(n+1))<56320||s>57343?t[n]:t.slice(n,n+2);e.push(o),n+=o.length}return e}function xn(t,e,r,n,i){let s;const o=e.length;for(let a=0;a=0;)s++;if(s>0){e.push(r.join(""));for(let o=parseInt(t.substring(n,n+s),10);o>0;o--)r.pop();n+=s}else r.push(t[n]),n++}return e}const Us={defaultProtocol:"http",events:null,format:Hh,formatHref:Hh,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Sc(t,e=null){let r=Object.assign({},Us);t&&(r=Object.assign(r,t instanceof Sc?t.o:t));const n=r.ignoreTags,i=[];for(let s=0;sr?n.substring(0,r)+"…":n},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Us.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,r=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",r,this),i=t.get("tagName",r,e),s=this.toFormattedString(t),o={},a=t.get("className",r,e),l=t.get("target",r,e),u=t.get("rel",r,e),c=t.getObj("attributes",r,e),d=t.getObj("events",r,e);return o.href=n,a&&(o.class=a),l&&(o.target=l),u&&(o.rel=u),c&&Object.assign(o,c),{tagName:i,attributes:o,content:s,eventListeners:d}}};function b0(t,e){class r extends $m{constructor(i,s){super(i,s),this.t=t}}for(const n in e)r.prototype[n]=e[n];return r.t=t,r}const qh=b0("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Vh=b0("text"),E9=b0("nl"),Do=b0("url",{isLink:!0,toHref(t=Us.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Ws&&t[1].t===Dn}}),Zt=t=>new Rt(t);function T9({groups:t}){const e=t.domain.concat([La,za,Mn,Ra,Ia,Ba,Fa,Pa,Xt,bc,Ts,Ha,qa,Va,Tr,ja,Os,$a]),r=[_a,Dn,vc,Er,xc,Ts,Ds,kc,wc,wa,Sa,Ms,Es,va,ya,xa,ka,Ca,Aa,Ma,Ea,Ta,Da,Oa,Na],n=[La,_a,za,Ra,Ia,Ba,Fa,Pa,Xt,Ms,Es,Ts,Ha,qa,Va,Ds,Tr,ja,Os,$a],i=Zt(),s=P(i,Os);fe(s,n,s),fe(s,t.domain,s);const o=Zt(),a=Zt(),l=Zt();fe(i,t.domain,o),fe(i,t.scheme,a),fe(i,t.slashscheme,l),fe(o,n,s),fe(o,t.domain,o);const u=P(o,Mn);P(s,Mn,u),P(a,Mn,u),P(l,Mn,u);const c=P(s,Er);fe(c,n,s),fe(c,t.domain,s);const d=Zt();fe(u,t.domain,d),fe(d,t.domain,d);const h=P(d,Er);fe(h,t.domain,d);const f=Zt(qh);fe(h,t.tld,f),fe(h,t.utld,f),P(u,Ws,f);const p=P(d,Xt);P(p,Xt,p),fe(p,t.domain,d),fe(f,t.domain,d),P(f,Er,h),P(f,Xt,p);const b=P(f,Dn);fe(b,t.numeric,qh);const y=P(o,Xt),x=P(o,Er);P(y,Xt,y),fe(y,t.domain,o),fe(x,n,s),fe(x,t.domain,o);const S=Zt(Do);fe(x,t.tld,S),fe(x,t.utld,S),fe(S,t.domain,o),fe(S,n,s),P(S,Er,x),P(S,Xt,y),P(S,Mn,u);const M=P(S,Dn),w=Zt(Do);fe(M,t.numeric,w);const T=Zt(Do),D=Zt();fe(T,e,T),fe(T,r,D),fe(D,e,T),fe(D,r,D),P(S,Tr,T),P(w,Tr,T);const O=P(a,Dn),I=P(l,Dn),_=P(I,Tr),$=P(_,Tr);fe(a,t.domain,o),P(a,Er,x),P(a,Xt,y),fe(l,t.domain,o),P(l,Er,x),P(l,Xt,y),fe(O,t.domain,T),P(O,Tr,T),P(O,Ds,T),fe($,t.domain,T),fe($,e,T),P($,Tr,T);const z=[[Ms,Es],[ya,va],[xa,ka],[wa,Sa],[Ca,Aa],[Ma,Ea],[Ta,Da],[Oa,Na]];for(let j=0;j=0&&h++,i++,c++;if(h<0)i-=c,i0&&(s.push(ll(Vh,e,o)),o=[]),i-=h,c-=h;const f=d.t,p=r.slice(i-c,i);s.push(ll(f,e,p))}}return o.length>0&&s.push(ll(Vh,e,o)),s}function ll(t,e,r){const n=r[0].s,i=r[r.length-1].e,s=e.slice(n,i);return new t(s,r)}const O9=typeof console<"u"&&console&&console.warn||(()=>{}),N9="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Fe={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function L9(){return Rt.groups={},Fe.scanner=null,Fe.parser=null,Fe.tokenQueue=[],Fe.pluginQueue=[],Fe.customSchemes=[],Fe.initialized=!1,Fe}function $h(t,e=!1){if(Fe.initialized&&O9(`linkifyjs: already initialized - will not register custom scheme "${t}" ${N9}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" 3. "-" cannot repeat`);Fe.customSchemes.push([t,e])}function _9(){Fe.scanner=A9(Fe.customSchemes);for(let t=0;t{const i=e.some(u=>u.docChanged)&&!r.doc.eq(n.doc),s=e.some(u=>u.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=n,a=Z5(r.doc,[...e]);if(nm(a).forEach(({newRange:u})=>{const c=Q5(n.doc,u,f=>f.isTextblock);let d,h;if(c.length>1?(d=c[0],h=n.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):c.length&&n.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(d=c[0],h=n.doc.textBetween(d.pos,u.to,void 0," ")),d&&h){const f=h.split(" ").filter(x=>x!=="");if(f.length<=0)return!1;const p=f[f.length-1],b=d.pos+h.lastIndexOf(p);if(!p)return!1;const y=Cc(p).map(x=>x.toObject(t.defaultProtocol));if(!z9(y))return!1;y.filter(x=>x.isLink).map(x=>({...x,from:b+x.start+1,to:b+x.end+1})).filter(x=>n.schema.marks.code?!n.doc.rangeHasMark(x.from,x.to,n.schema.marks.code):!0).filter(x=>t.validate(x.value)).forEach(x=>{ac(x.from,x.to,n.doc).some(S=>S.mark.type===t.type)||o.addMark(x.from,x.to,t.type.create({href:x.href}))})}}),!!o.steps.length)return o}})}function I9(t){return new Ve({key:new Je("handleClickLink"),props:{handleClick:(e,r,n)=>{var i,s;if(n.button!==0||!e.editable)return!1;let o=n.target;const a=[];for(;o.nodeName!=="DIV";)a.push(o),o=o.parentNode;if(!a.find(h=>h.nodeName==="A"))return!1;const l=rm(e.state,t.type.name),u=n.target,c=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,d=(s=u==null?void 0:u.target)!==null&&s!==void 0?s:l.target;return u&&c?(window.open(c,d),!0):!1}}})}function B9(t){return new Ve({key:new Je("handlePasteLink"),props:{handlePaste:(e,r,n)=>{const{state:i}=e,{selection:s}=i,{empty:o}=s;if(o)return!1;let a="";n.content.forEach(u=>{a+=u.textContent});const l=jm(a,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:(t.editor.commands.setMark(t.type,{href:l.href}),!0)}}})}const F9=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function jh(t,e){const r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{const i=typeof n=="string"?n:n.scheme;i&&r.push(i)}),!t||t.replace(F9,"").match(new RegExp(`^(?:(?:${r.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}const P9=mt.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(t=>{if(typeof t=="string"){$h(t);return}$h(t.scheme,t.optionalSlashes)})},onDestroy(){L9()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!jh(e,this.options.protocols)?!1:null}}]},renderHTML({HTMLAttributes:t}){return jh(t.href,this.options.protocols)?["a",Se(this.options.HTMLAttributes,t),0]:["a",Se(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[xi({find:t=>{const e=[];if(t){const{validate:r}=this.options,n=jm(t).filter(i=>i.isLink&&r(i.value));n.length&&n.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];return this.options.autolink&&t.push(R9({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&t.push(I9({type:this.type})),this.options.linkOnPaste&&t.push(B9({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),H9=Ke.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Ve({key:new Je("placeholder"),props:{decorations:({doc:t,selection:e})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!r)return null;const s=this.editor.isEmpty;return t.descendants((o,a)=>{const l=n>=a&&n<=a+o.nodeSize,u=!o.isLeaf&&p0(o);if((l||!this.options.showOnlyCurrent)&&u){const c=[this.options.emptyNodeClass];s&&c.push(this.options.emptyEditorClass);const d=rt.node(a,a+o.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:a,hasAnchor:l}):this.options.placeholder});i.push(d)}return this.options.includeChildren}),ze.create(t,i)}}})]}}),q9=mt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),V9=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,$9=ye.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Se(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[hm({find:V9,type:this.type,getAttributes:t=>{const[,,e,r,n]=t;return{src:r,alt:e,title:n}}})]}}),j9=/^\s*(\[([( |x])?\])\s$/,W9=ye.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Se(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:r,editor:n})=>{const i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");return s.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!n.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:c}=u.target;n.isEditable&&typeof r=="function"&&n.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:d})=>{const h=r();if(typeof h!="number")return!1;const f=d.doc.nodeAt(h);return d.setNodeMarkup(h,void 0,{...f==null?void 0:f.attrs,checked:c}),!0}).run(),!n.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,c)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,c])=>{i.setAttribute(u,c)}),i.dataset.checked=t.attrs.checked,t.attrs.checked&&a.setAttribute("checked","checked"),s.append(a,o),i.append(s,l),Object.entries(e).forEach(([u,c])=>{i.setAttribute(u,c)}),{dom:i,contentDOM:l,update:u=>u.type!==this.type?!1:(i.dataset.checked=u.attrs.checked,u.attrs.checked?a.setAttribute("checked","checked"):a.removeAttribute("checked"),!0)}}},addInputRules(){return[Gi({find:j9,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),U9=Ke.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign||this.options.defaultAlignment;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${t.textAlign}`}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(r=>e.updateAttributes(r,{textAlign:t})).every(r=>r):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),K9=ye.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Se(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),G9=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),J9=typeof navigator<"u"&&/Win/.test(navigator.platform);function Y9(t){let e=t.split(/-(?!$)/),r=e[e.length-1];r=="Space"&&(r=" ");let n,i,s,o;for(let a=0;at.get(e),yu=(e,r)=>(t.set(e,r),r)}else{const t=[];let r=0;bu=n=>{for(let i=0;i(r==10&&(r=0),t[r++]=n,t[r++]=i)}var Ue=class{constructor(t,e,r,n){this.width=t,this.height=e,this.map=r,this.problems=n}findCell(t){for(let e=0;e=r){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:x-M});break}const w=i+M*e;for(let T=0;Tn&&(s+=u.attrs.colspan)}}for(let o=0;o1&&(r=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function ty(t,e,r){t.problems||(t.problems=[]);const n={};for(let i=0;i0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function ny(t){for(let e=t.depth;e>0;e--){const r=t.node(e).type.spec.tableRole;if(r==="cell"||r==="header_cell")return t.node(e)}return null}function xr(t){const e=t.selection.$head;for(let r=e.depth;r>0;r--)if(e.node(r).type.spec.tableRole=="row")return!0;return!1}function y0(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const r=ns(e.$head)||iy(e.$head);if(r)return r;throw new RangeError(`No cell found around position ${e.head}`)}function iy(t){for(let e=t.nodeAfter,r=t.pos;e;e=e.firstChild,r++){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return t.doc.resolve(r)}for(let e=t.nodeBefore,r=t.pos;e;e=e.lastChild,r--){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return t.doc.resolve(r-e.nodeSize)}}function vu(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function sy(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Ac(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Wm(t,e,r){const n=t.node(-1),i=Ue.get(n),s=t.start(-1),o=i.nextCell(t.pos-s,e,r);return o==null?null:t.node(0).resolve(s+o)}function wi(t,e,r=1){const n={...t,colspan:t.colspan-r};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(e,r),n.colwidth.some(i=>i>0)||(n.colwidth=null)),n}function Um(t,e,r=1){const n={...t,colspan:t.colspan+r};if(n.colwidth){n.colwidth=n.colwidth.slice();for(let i=0;ic!=r.pos-s);l.unshift(r.pos-s);const u=l.map(c=>{const d=n.nodeAt(c);if(!d)throw RangeError(`No cell with offset ${c} found`);const h=s+c+1;return new G1(a.resolve(h),a.resolve(h+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=r}map(e,r){const n=e.resolve(r.map(this.$anchorCell.pos)),i=e.resolve(r.map(this.$headCell.pos));if(vu(n)&&vu(i)&&Ac(n,i)){const s=this.$anchorCell.node(-1)!=n.node(-1);return s&&this.isRowSelection()?tn.rowSelection(n,i):s&&this.isColSelection()?tn.colSelection(n,i):new tn(n,i)}return ee.between(n,i)}content(){const e=this.$anchorCell.node(-1),r=Ue.get(e),n=this.$anchorCell.start(-1),i=r.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),s={},o=[];for(let l=i.top;l0||y>0){let x=p.attrs;if(b>0&&(x=wi(x,0,b)),y>0&&(x=wi(x,x.colspan-y,y)),f.lefti.bottom){const x={...p.attrs,rowspan:Math.min(f.bottom,i.bottom)-Math.max(f.top,i.top)};f.top0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=r+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,i)==this.$headCell.node(-1).childCount}static colSelection(e,r=e){const n=e.node(-1),i=Ue.get(n),s=e.start(-1),o=i.findCell(e.pos-s),a=i.findCell(r.pos-s),l=e.node(0);return o.top<=a.top?(o.top>0&&(e=l.resolve(s+i.map[o.left])),a.bottom0&&(r=l.resolve(s+i.map[a.left])),o.bottom0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,a=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,a)==r.width}eq(e){return e instanceof tn&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,r=e){const n=e.node(-1),i=Ue.get(n),s=e.start(-1),o=i.findCell(e.pos-s),a=i.findCell(r.pos-s),l=e.node(0);return o.left<=a.left?(o.left>0&&(e=l.resolve(s+i.map[o.top*i.width])),a.right0&&(r=l.resolve(s+i.map[a.top*i.width])),o.right{e.push(rt.node(n,n+r.nodeSize,{class:"selectedCell"}))}),ze.create(t.doc,e)}function uy({$from:t,$to:e}){if(t.pos==e.pos||t.pos=0&&!(t.after(i+1)=0&&!(e.before(s+1)>e.start(s));s--,n--);return r==n&&/row|table/.test(t.node(i).type.spec.tableRole)}function cy({$from:t,$to:e}){let r,n;for(let i=t.depth;i>0;i--){const s=t.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}for(let i=e.depth;i>0;i--){const s=e.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}return r!==n&&e.parentOffset===0}function dy(t,e,r){const n=(e||t).selection,i=(e||t).doc;let s,o;if(n instanceof X&&(o=n.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")s=Ie.create(i,n.from);else if(o=="row"){const a=i.resolve(n.from+1);s=Ie.rowSelection(a,a)}else if(!r){const a=Ue.get(n.node),l=n.from+1,u=l+a.map[a.width*a.height-1];s=Ie.create(i,l+1,u)}}else n instanceof ee&&uy(n)?s=ee.create(i,n.from):n instanceof ee&&cy(n)&&(s=ee.create(i,n.$from.start(),n.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var hy=new Je("fix-tables");function Gm(t,e,r,n){const i=t.childCount,s=e.childCount;e:for(let o=0,a=0;o{i.type.spec.tableRole=="table"&&(r=fy(t,i,s,r))};return e?e.doc!=t.doc&&Gm(e.doc,t.doc,0,n):t.doc.descendants(n),r}function fy(t,e,r,n){const i=Ue.get(e);if(!i.problems)return n;n||(n=t.tr);const s=[];for(let l=0;l0){let f="cell";c.firstChild&&(f=c.firstChild.type.spec.tableRole);const p=[];for(let y=0;y0?-1:0;oy(e,n,i+s)&&(s=i==0||i==e.width?null:0);for(let o=0;o0&&i0&&e.map[a-1]==l||i0?-1:0;yy(e,n,i+l)&&(l=i==0||i==e.height?null:0);for(let u=0,c=e.width*i;u0&&i0&&d==e.map[c-e.width]){const h=r.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(a).map(d+n),null,{...h,rowspan:h.rowspan-1}),u+=h.colspan-1}else if(i0&&r[s]==r[s-1]||n.right0&&r[i]==r[i-t]||n.bottomr[n.type.spec.tableRole])(t,e)}function Cy(t){return(e,r)=>{var n;const i=e.selection;let s,o;if(i instanceof Ie){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;s=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(s=ny(i.$from),!s)return!1;o=(n=ns(i.$from))==null?void 0:n.pos}if(s==null||o==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(r){let a=s.attrs;const l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const c=Vr(e),d=e.tr;for(let f=0;f{o.attrs[t]!==e&&s.setNodeMarkup(a,null,{...o.attrs,[t]:e})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),n(s)}return!0}}function My(t){return function(e,r){if(!xr(e))return!1;if(r){const n=yt(e.schema),i=Vr(e),s=e.tr,o=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=o.map(l=>i.table.nodeAt(l));for(let l=0;l{const p=f+s.tableStart,b=o.doc.nodeAt(p);b&&o.setNodeMarkup(p,h,b.attrs)}),n(o)}return!0}}Ks("row",{useDeprecatedLogic:!0});Ks("column",{useDeprecatedLogic:!0});var Ey=Ks("cell",{useDeprecatedLogic:!0});function Ty(t,e){if(e<0){const r=t.nodeBefore;if(r)return t.pos-r.nodeSize;for(let n=t.index(-1)-1,i=t.before();n>=0;n--){const s=t.node(-1).child(n),o=s.lastChild;if(o)return i-1-o.nodeSize;i-=s.nodeSize}}else{if(t.index()0;n--)if(r.node(n).type.spec.tableRole=="table")return e&&e(t.tr.delete(r.before(n),r.after(n)).scrollIntoView()),!0;return!1}function Oo(t,e){const r=t.selection;if(!(r instanceof Ie))return!1;if(e){const n=t.tr,i=yt(t.schema).cell.createAndFill().content;r.forEachCell((s,o)=>{s.content.eq(i)||n.replace(n.mapping.map(o+1),n.mapping.map(o+s.nodeSize-1),new V(i,0,0))}),n.docChanged&&e(n)}return!0}function Oy(t){if(!t.size)return null;let{content:e,openStart:r,openEnd:n}=t;for(;e.childCount==1&&(r>0&&n>0||e.child(0).type.spec.tableRole=="table");)r--,n--,e=e.child(0).content;const i=e.child(0),s=i.type.spec.tableRole,o=i.type.schema,a=[];if(s=="row")for(let l=0;l=0;o--){const{rowspan:a,colspan:l}=s.child(o).attrs;for(let u=i;u=e.length&&e.push(R.empty),r[i]n&&(h=h.type.createChecked(wi(h.attrs,h.attrs.colspan,c+h.attrs.colspan-n),h.content)),u.push(h),c+=h.attrs.colspan;for(let f=1;fi&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),l.push(d)}s.push(R.from(l))}r=s,e=i}return{width:t,height:e,rows:r}}function _y(t,e,r,n,i,s,o){const a=t.doc.type.schema,l=yt(a);let u,c;if(i>e.width)for(let d=0,h=0;de.height){const d=[];for(let p=0,b=(e.height-1)*e.width;p=e.width?!1:r.nodeAt(e.map[b+p]).type==l.header_cell;d.push(y?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const h=l.row.create(null,R.from(d)),f=[];for(let p=e.height;p{if(!i)return!1;const s=r.selection;if(s instanceof Ie)return Xo(r,n,ne.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const o=Xm(i,t,e);if(o==null)return!1;if(t=="horiz")return Xo(r,n,ne.near(r.doc.resolve(s.head+e),e));{const a=r.doc.resolve(o),l=Wm(a,t,e);let u;return l?u=ne.near(l,1):e<0?u=ne.near(r.doc.resolve(a.before(-1)),-1):u=ne.near(r.doc.resolve(a.after(-1)),1),Xo(r,n,u)}}}function Lo(t,e){return(r,n,i)=>{if(!i)return!1;const s=r.selection;let o;if(s instanceof Ie)o=s;else{const l=Xm(i,t,e);if(l==null)return!1;o=new Ie(r.doc.resolve(l))}const a=Wm(o.$headCell,t,e);return a?Xo(r,n,new Ie(o.$anchorCell,a)):!1}}function Ry(t,e){const r=t.state.doc,n=ns(r.resolve(e));return n?(t.dispatch(t.state.tr.setSelection(new Ie(n))),!0):!1}function Iy(t,e,r){if(!xr(t.state))return!1;let n=Oy(r);const i=t.state.selection;if(i instanceof Ie){n||(n={width:1,height:1,rows:[R.from(xu(yt(t.state.schema).cell,r))]});const s=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),a=Ue.get(s).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return n=Ly(n,a.right-a.left,a.bottom-a.top),Xh(t.state,t.dispatch,o,a,n),!0}else if(n){const s=y0(t.state),o=s.start(-1);return Xh(t.state,t.dispatch,o,Ue.get(s.node(-1)).findCell(s.pos-o),n),!0}else return!1}function By(t,e){var r;if(e.ctrlKey||e.metaKey)return;const n=Qh(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof Ie)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&n&&(i=ns(t.state.selection.$anchor))!=null&&((r=cl(t,e))==null?void 0:r.pos)!=i.pos)s(i,e),e.preventDefault();else if(!n)return;function s(l,u){let c=cl(t,u);const d=On.getState(t.state)==null;if(!c||!Ac(l,c))if(d)c=l;else return;const h=new Ie(l,c);if(d||!t.state.selection.eq(h)){const f=t.state.tr.setSelection(h);d&&f.setMeta(On,l.pos),t.dispatch(f)}}function o(){t.root.removeEventListener("mouseup",o),t.root.removeEventListener("dragstart",o),t.root.removeEventListener("mousemove",a),On.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(On,-1))}function a(l){const u=l,c=On.getState(t.state);let d;if(c!=null)d=t.state.doc.resolve(c);else if(Qh(t,u.target)!=n&&(d=cl(t,e),!d))return o();d&&s(d,u)}t.root.addEventListener("mouseup",o),t.root.addEventListener("dragstart",o),t.root.addEventListener("mousemove",a)}function Xm(t,e,r){if(!(t.state.selection instanceof ee))return null;const{$head:n}=t.state.selection;for(let i=n.depth-1;i>=0;i--){const s=n.node(i);if((r<0?n.index(i):n.indexAfter(i))!=(r<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const a=n.before(i),l=e=="vert"?r>0?"down":"up":r>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function Qh(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function cl(t,e){const r=t.posAtCoords({left:e.clientX,top:e.clientY});return r&&r?ns(t.state.doc.resolve(r.pos)):null}var Fy=class{constructor(e,r){this.node=e,this.defaultCellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${r}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ku(e,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,ku(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function ku(t,e,r,n,i,s){var o;let a=0,l=!0,u=e.firstChild;const c=t.firstChild;if(c){for(let d=0,h=0;dnew n(h,r,f)),new Hy(-1,!1)},apply(o,a){return a.apply(o)}},props:{attributes:o=>{const a=jt.getState(o);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,a)=>{qy(o,a,t,i)},mouseleave:o=>{Vy(o)},mousedown:(o,a)=>{$y(o,a,e,r)}},decorations:o=>{const a=jt.getState(o);if(a&&a.activeHandle>-1)return Gy(o,a.activeHandle)},nodeViews:{}}});return s}var Hy=class Qo{constructor(e,r){this.activeHandle=e,this.dragging=r}apply(e){const r=this,n=e.getMeta(jt);if(n&&n.setHandle!=null)return new Qo(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new Qo(r.activeHandle,n.setDragging);if(r.activeHandle>-1&&e.docChanged){let i=e.mapping.map(r.activeHandle,-1);return vu(e.doc.resolve(i))||(i=-1),new Qo(i,r.dragging)}return r}};function qy(t,e,r,n){if(!t.editable)return;const i=jt.getState(t.state);if(i&&!i.dragging){const s=Wy(e.target);let o=-1;if(s){const{left:a,right:l}=s.getBoundingClientRect();e.clientX-a<=r?o=ef(t,e,"left",r):l-e.clientX<=r&&(o=ef(t,e,"right",r))}if(o!=i.activeHandle){if(!n&&o!==-1){const a=t.state.doc.resolve(o),l=a.node(-1),u=Ue.get(l),c=a.start(-1);if(u.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==u.width-1)return}Qm(t,o)}}}function Vy(t){if(!t.editable)return;const e=jt.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Qm(t,-1)}function $y(t,e,r,n){var i;if(!t.editable)return!1;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,o=jt.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const a=t.state.doc.nodeAt(o.activeHandle),l=jy(t,o.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(jt,{setDragging:{startX:e.clientX,startWidth:l}}));function u(d){s.removeEventListener("mouseup",u),s.removeEventListener("mousemove",c);const h=jt.getState(t.state);h!=null&&h.dragging&&(Uy(t,h.activeHandle,tf(h.dragging,d,r)),t.dispatch(t.state.tr.setMeta(jt,{setDragging:null})))}function c(d){if(!d.which)return u(d);const h=jt.getState(t.state);if(h&&h.dragging){const f=tf(h.dragging,d,r);rf(t,h.activeHandle,f,n)}}return rf(t,o.activeHandle,l,n),s.addEventListener("mouseup",u),s.addEventListener("mousemove",c),e.preventDefault(),!0}function jy(t,e,{colspan:r,colwidth:n}){const i=n&&n[n.length-1];if(i)return i;const s=t.domAtPos(e);let a=s.node.childNodes[s.offset].offsetWidth,l=r;if(n)for(let u=0;u{const n=t.nodes[r];n.spec.tableRole&&(e[n.spec.tableRole]=n)}),t.cached.tableNodeTypes=e,e}function Qy(t,e,r,n,i){const s=Xy(t),o=[],a=[];for(let u=0;u{const{selection:e}=t.state;if(!ev(e))return!1;let r=0;const n=tm(e.ranges[0].$from,s=>s.type.name==="table");return n==null||n.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(r+=1)}),r===e.ranges.length?(t.commands.deleteTable(),!0):!1},tv=ye.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Yy,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:r,tableWidth:n,tableMinWidth:i}=Zy(t,this.options.cellMinWidth);return["table",Se(this.options.HTMLAttributes,e,{style:n?`width: ${n}`:`min-width: ${i}`}),r,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:r=!0}={})=>({tr:n,dispatch:i,editor:s})=>{const o=Qy(s.schema,t,e,r);if(i){const a=n.selection.from+1;n.replaceSelectionWith(o).scrollIntoView().setSelection(ee.near(n.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>py(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>my(t,e),deleteColumn:()=>({state:t,dispatch:e})=>by(t,e),addRowBefore:()=>({state:t,dispatch:e})=>vy(t,e),addRowAfter:()=>({state:t,dispatch:e})=>xy(t,e),deleteRow:()=>({state:t,dispatch:e})=>wy(t,e),deleteTable:()=>({state:t,dispatch:e})=>Dy(t,e),mergeCells:()=>({state:t,dispatch:e})=>Uh(t,e),splitCell:()=>({state:t,dispatch:e})=>Kh(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Ks("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Ks("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Ey(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Uh(t,e)?!0:Kh(t,e),setCellAttribute:(t,e)=>({state:r,dispatch:n})=>Ay(t,e)(r,n),goToNextCell:()=>({state:t,dispatch:e})=>Jh(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>Jh(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Jm(t),!0),setCellSelection:t=>({tr:e,dispatch:r})=>{if(r){const n=Ie.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:_o,"Mod-Backspace":_o,Delete:_o,"Mod-Delete":_o}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Py({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Jy({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:pe(J(t,"tableRole",e))}}}),rv=ye.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Se(this.options.HTMLAttributes,t),0]}}),nv=ye.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Se(this.options.HTMLAttributes,t),0]}}),iv=ye.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Se(this.options.HTMLAttributes,t),0]}});class zt{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new zt(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}let vr=class e2{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new e2(r,zt.range(this,e))}};class H{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,s,o=r&&r.loc;if(o&&o.start<=o.end){var a=o.lexer.input;i=o.start,s=o.end,i===a.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=a.slice(i,s).replace(/[^]/g,"$&̲"),u;i>15?u="…"+a.slice(i-15,i):u=a.slice(0,i);var c;s+15":">","<":"<",'"':""","'":"'"},uv=/[&><"']/g;function cv(t){return String(t).replace(uv,e=>lv[e])}var t2=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},dv=function(e){var r=t2(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},hv=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},fv=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},ke={deflt:sv,escape:cv,hyphenate:av,getBaseElem:t2,isCharacterBox:dv,protocolFromUrl:fv},ea={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function pv(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Mc{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in ea)if(ea.hasOwnProperty(r)){var n=ea[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:pv(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new H("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=ke.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class kn{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return Or[mv[this.id]]}sub(){return Or[gv[this.id]]}fracNum(){return Or[bv[this.id]]}fracDen(){return Or[yv[this.id]]}cramp(){return Or[vv[this.id]]}text(){return Or[xv[this.id]]}isTight(){return this.size>=2}}var Ec=0,Wa=1,Hi=2,cn=3,Gs=4,rr=5,Qi=6,Mt=7,Or=[new kn(Ec,0,!1),new kn(Wa,0,!0),new kn(Hi,1,!1),new kn(cn,1,!0),new kn(Gs,2,!1),new kn(rr,2,!0),new kn(Qi,3,!1),new kn(Mt,3,!0)],mv=[Gs,rr,Gs,rr,Qi,Mt,Qi,Mt],gv=[rr,rr,rr,rr,Mt,Mt,Mt,Mt],bv=[Hi,cn,Gs,rr,Qi,Mt,Qi,Mt],yv=[cn,cn,rr,rr,Mt,Mt,Mt,Mt],vv=[Wa,Wa,cn,cn,rr,rr,Mt,Mt],xv=[Ec,Wa,Hi,cn,Hi,cn,Hi,cn],re={DISPLAY:Or[Ec],TEXT:Or[Hi],SCRIPT:Or[Gs],SCRIPTSCRIPT:Or[Qi]},wu=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function kv(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}var ta=[];wu.forEach(t=>t.blocks.forEach(e=>ta.push(...e)));function r2(t){for(var e=0;e=ta[e]&&t<=ta[e+1])return!0;return!1}var Di=80,wv=function(e,r){return"M95,"+(622+e+r)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+e/2.075+" -"+e+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+e)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Sv=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+e/2.084+" -"+e+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+e)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Cv=function(e,r){return"M983 "+(10+e+r)+` l`+e/3.13+" -"+e+` c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Av=function(e,r){return"M424,"+(2398+e+r)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+e)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+` h400000v`+(40+e)+"h-400000z"},Mv=function(e,r){return"M473,"+(2713+e+r)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},Ev=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},Tv=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+` H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},Dv=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=wv(r,Di);break;case"sqrtSize1":i=Sv(r,Di);break;case"sqrtSize2":i=Cv(r,Di);break;case"sqrtSize3":i=Av(r,Di);break;case"sqrtSize4":i=Mv(r,Di);break;case"sqrtTall":i=Tv(r,Di,n)}return i},Ov=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},of={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Nv=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, -36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class ao{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(e).join("")}}var _r={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},zo={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},af={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Lv(t,e){_r[t]=e}function Tc(t,e,r){if(!_r[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=_r[e][n];if(!i&&t[0]in af&&(n=af[t[0]].charCodeAt(0),i=_r[e][n]),!i&&r==="text"&&r2(n)&&(i=_r[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var dl={};function _v(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!dl[e]){var r=dl[e]={cssEmPerMu:zo.quad[e]/18};for(var n in zo)zo.hasOwnProperty(n)&&(r[n]=zo[n][e])}return dl[e]}var zv=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],lf=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],uf=function(e,r){return r.size<2?e:zv[e-1][r.size-1]};class nn{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||nn.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=lf[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new nn(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:uf(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:lf[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=uf(nn.BASESIZE,e);return this.size===r&&this.textSize===nn.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==nn.BASESIZE?["sizing","reset-size"+this.size,"size"+nn.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=_v(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}nn.BASESIZE=6;var Su={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Rv={ex:!0,em:!0,mu:!0},n2=function(e){return typeof e!="string"&&(e=e.unit),e in Su||e in Rv||e==="ex"},qe=function(e,r){var n;if(e.unit in Su)n=Su[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new H("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},q=function(e){return+e.toFixed(4)+"em"},qn=function(e){return e.filter(r=>r).join(" ")},i2=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},s2=function(e){var r=document.createElement(e);r.className=qn(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var s=0;s/=\x00-\x1f]/,o2=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+ke.escape(qn(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=ke.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+ke.escape(n)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(Iv.test(s))throw new H("Invalid attribute name '"+s+"'");r+=" "+s+'="'+ke.escape(this.attributes[s])+'"'}r+=">";for(var o=0;o",r};class lo{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,i2.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return s2.call(this,"span")}toMarkup(){return o2.call(this,"span")}}class Dc{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,i2.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return s2.call(this,"a")}toMarkup(){return o2.call(this,"a")}}class Bv{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=''+ke.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=q(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=qn(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=ke.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+ke.escape(n)+'"');var s=ke.escape(this.text);return e?(r+=">",r+=s,r+="",r):s}}class pn{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}}class Cu{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e=" but got "+String(t)+".")}var Hv={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qv={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Be={math:{},text:{}};function m(t,e,r,n,i,s){Be[t][i]={font:e,group:r,replace:n},s&&n&&(Be[t][n]=Be[t][i])}var g="math",B="text",v="main",C="ams",Pe="accent-token",K="bin",Ot="close",is="inner",te="mathord",Qe="op-token",Jt="open",v0="punct",A="rel",yn="spacing",E="textord";m(g,v,A,"≡","\\equiv",!0);m(g,v,A,"≺","\\prec",!0);m(g,v,A,"≻","\\succ",!0);m(g,v,A,"∼","\\sim",!0);m(g,v,A,"⊥","\\perp");m(g,v,A,"⪯","\\preceq",!0);m(g,v,A,"⪰","\\succeq",!0);m(g,v,A,"≃","\\simeq",!0);m(g,v,A,"∣","\\mid",!0);m(g,v,A,"≪","\\ll",!0);m(g,v,A,"≫","\\gg",!0);m(g,v,A,"≍","\\asymp",!0);m(g,v,A,"∥","\\parallel");m(g,v,A,"⋈","\\bowtie",!0);m(g,v,A,"⌣","\\smile",!0);m(g,v,A,"⊑","\\sqsubseteq",!0);m(g,v,A,"⊒","\\sqsupseteq",!0);m(g,v,A,"≐","\\doteq",!0);m(g,v,A,"⌢","\\frown",!0);m(g,v,A,"∋","\\ni",!0);m(g,v,A,"∝","\\propto",!0);m(g,v,A,"⊢","\\vdash",!0);m(g,v,A,"⊣","\\dashv",!0);m(g,v,A,"∋","\\owns");m(g,v,v0,".","\\ldotp");m(g,v,v0,"⋅","\\cdotp");m(g,v,E,"#","\\#");m(B,v,E,"#","\\#");m(g,v,E,"&","\\&");m(B,v,E,"&","\\&");m(g,v,E,"ℵ","\\aleph",!0);m(g,v,E,"∀","\\forall",!0);m(g,v,E,"ℏ","\\hbar",!0);m(g,v,E,"∃","\\exists",!0);m(g,v,E,"∇","\\nabla",!0);m(g,v,E,"♭","\\flat",!0);m(g,v,E,"ℓ","\\ell",!0);m(g,v,E,"♮","\\natural",!0);m(g,v,E,"♣","\\clubsuit",!0);m(g,v,E,"℘","\\wp",!0);m(g,v,E,"♯","\\sharp",!0);m(g,v,E,"♢","\\diamondsuit",!0);m(g,v,E,"ℜ","\\Re",!0);m(g,v,E,"♡","\\heartsuit",!0);m(g,v,E,"ℑ","\\Im",!0);m(g,v,E,"♠","\\spadesuit",!0);m(g,v,E,"§","\\S",!0);m(B,v,E,"§","\\S");m(g,v,E,"¶","\\P",!0);m(B,v,E,"¶","\\P");m(g,v,E,"†","\\dag");m(B,v,E,"†","\\dag");m(B,v,E,"†","\\textdagger");m(g,v,E,"‡","\\ddag");m(B,v,E,"‡","\\ddag");m(B,v,E,"‡","\\textdaggerdbl");m(g,v,Ot,"⎱","\\rmoustache",!0);m(g,v,Jt,"⎰","\\lmoustache",!0);m(g,v,Ot,"⟯","\\rgroup",!0);m(g,v,Jt,"⟮","\\lgroup",!0);m(g,v,K,"∓","\\mp",!0);m(g,v,K,"⊖","\\ominus",!0);m(g,v,K,"⊎","\\uplus",!0);m(g,v,K,"⊓","\\sqcap",!0);m(g,v,K,"∗","\\ast");m(g,v,K,"⊔","\\sqcup",!0);m(g,v,K,"◯","\\bigcirc",!0);m(g,v,K,"∙","\\bullet",!0);m(g,v,K,"‡","\\ddagger");m(g,v,K,"≀","\\wr",!0);m(g,v,K,"⨿","\\amalg");m(g,v,K,"&","\\And");m(g,v,A,"⟵","\\longleftarrow",!0);m(g,v,A,"⇐","\\Leftarrow",!0);m(g,v,A,"⟸","\\Longleftarrow",!0);m(g,v,A,"⟶","\\longrightarrow",!0);m(g,v,A,"⇒","\\Rightarrow",!0);m(g,v,A,"⟹","\\Longrightarrow",!0);m(g,v,A,"↔","\\leftrightarrow",!0);m(g,v,A,"⟷","\\longleftrightarrow",!0);m(g,v,A,"⇔","\\Leftrightarrow",!0);m(g,v,A,"⟺","\\Longleftrightarrow",!0);m(g,v,A,"↦","\\mapsto",!0);m(g,v,A,"⟼","\\longmapsto",!0);m(g,v,A,"↗","\\nearrow",!0);m(g,v,A,"↩","\\hookleftarrow",!0);m(g,v,A,"↪","\\hookrightarrow",!0);m(g,v,A,"↘","\\searrow",!0);m(g,v,A,"↼","\\leftharpoonup",!0);m(g,v,A,"⇀","\\rightharpoonup",!0);m(g,v,A,"↙","\\swarrow",!0);m(g,v,A,"↽","\\leftharpoondown",!0);m(g,v,A,"⇁","\\rightharpoondown",!0);m(g,v,A,"↖","\\nwarrow",!0);m(g,v,A,"⇌","\\rightleftharpoons",!0);m(g,C,A,"≮","\\nless",!0);m(g,C,A,"","\\@nleqslant");m(g,C,A,"","\\@nleqq");m(g,C,A,"⪇","\\lneq",!0);m(g,C,A,"≨","\\lneqq",!0);m(g,C,A,"","\\@lvertneqq");m(g,C,A,"⋦","\\lnsim",!0);m(g,C,A,"⪉","\\lnapprox",!0);m(g,C,A,"⊀","\\nprec",!0);m(g,C,A,"⋠","\\npreceq",!0);m(g,C,A,"⋨","\\precnsim",!0);m(g,C,A,"⪹","\\precnapprox",!0);m(g,C,A,"≁","\\nsim",!0);m(g,C,A,"","\\@nshortmid");m(g,C,A,"∤","\\nmid",!0);m(g,C,A,"⊬","\\nvdash",!0);m(g,C,A,"⊭","\\nvDash",!0);m(g,C,A,"⋪","\\ntriangleleft");m(g,C,A,"⋬","\\ntrianglelefteq",!0);m(g,C,A,"⊊","\\subsetneq",!0);m(g,C,A,"","\\@varsubsetneq");m(g,C,A,"⫋","\\subsetneqq",!0);m(g,C,A,"","\\@varsubsetneqq");m(g,C,A,"≯","\\ngtr",!0);m(g,C,A,"","\\@ngeqslant");m(g,C,A,"","\\@ngeqq");m(g,C,A,"⪈","\\gneq",!0);m(g,C,A,"≩","\\gneqq",!0);m(g,C,A,"","\\@gvertneqq");m(g,C,A,"⋧","\\gnsim",!0);m(g,C,A,"⪊","\\gnapprox",!0);m(g,C,A,"⊁","\\nsucc",!0);m(g,C,A,"⋡","\\nsucceq",!0);m(g,C,A,"⋩","\\succnsim",!0);m(g,C,A,"⪺","\\succnapprox",!0);m(g,C,A,"≆","\\ncong",!0);m(g,C,A,"","\\@nshortparallel");m(g,C,A,"∦","\\nparallel",!0);m(g,C,A,"⊯","\\nVDash",!0);m(g,C,A,"⋫","\\ntriangleright");m(g,C,A,"⋭","\\ntrianglerighteq",!0);m(g,C,A,"","\\@nsupseteqq");m(g,C,A,"⊋","\\supsetneq",!0);m(g,C,A,"","\\@varsupsetneq");m(g,C,A,"⫌","\\supsetneqq",!0);m(g,C,A,"","\\@varsupsetneqq");m(g,C,A,"⊮","\\nVdash",!0);m(g,C,A,"⪵","\\precneqq",!0);m(g,C,A,"⪶","\\succneqq",!0);m(g,C,A,"","\\@nsubseteqq");m(g,C,K,"⊴","\\unlhd");m(g,C,K,"⊵","\\unrhd");m(g,C,A,"↚","\\nleftarrow",!0);m(g,C,A,"↛","\\nrightarrow",!0);m(g,C,A,"⇍","\\nLeftarrow",!0);m(g,C,A,"⇏","\\nRightarrow",!0);m(g,C,A,"↮","\\nleftrightarrow",!0);m(g,C,A,"⇎","\\nLeftrightarrow",!0);m(g,C,A,"△","\\vartriangle");m(g,C,E,"ℏ","\\hslash");m(g,C,E,"▽","\\triangledown");m(g,C,E,"◊","\\lozenge");m(g,C,E,"Ⓢ","\\circledS");m(g,C,E,"®","\\circledR");m(B,C,E,"®","\\circledR");m(g,C,E,"∡","\\measuredangle",!0);m(g,C,E,"∄","\\nexists");m(g,C,E,"℧","\\mho");m(g,C,E,"Ⅎ","\\Finv",!0);m(g,C,E,"⅁","\\Game",!0);m(g,C,E,"‵","\\backprime");m(g,C,E,"▲","\\blacktriangle");m(g,C,E,"▼","\\blacktriangledown");m(g,C,E,"■","\\blacksquare");m(g,C,E,"⧫","\\blacklozenge");m(g,C,E,"★","\\bigstar");m(g,C,E,"∢","\\sphericalangle",!0);m(g,C,E,"∁","\\complement",!0);m(g,C,E,"ð","\\eth",!0);m(B,v,E,"ð","ð");m(g,C,E,"╱","\\diagup");m(g,C,E,"╲","\\diagdown");m(g,C,E,"□","\\square");m(g,C,E,"□","\\Box");m(g,C,E,"◊","\\Diamond");m(g,C,E,"¥","\\yen",!0);m(B,C,E,"¥","\\yen",!0);m(g,C,E,"✓","\\checkmark",!0);m(B,C,E,"✓","\\checkmark");m(g,C,E,"ℶ","\\beth",!0);m(g,C,E,"ℸ","\\daleth",!0);m(g,C,E,"ℷ","\\gimel",!0);m(g,C,E,"ϝ","\\digamma",!0);m(g,C,E,"ϰ","\\varkappa");m(g,C,Jt,"┌","\\@ulcorner",!0);m(g,C,Ot,"┐","\\@urcorner",!0);m(g,C,Jt,"└","\\@llcorner",!0);m(g,C,Ot,"┘","\\@lrcorner",!0);m(g,C,A,"≦","\\leqq",!0);m(g,C,A,"⩽","\\leqslant",!0);m(g,C,A,"⪕","\\eqslantless",!0);m(g,C,A,"≲","\\lesssim",!0);m(g,C,A,"⪅","\\lessapprox",!0);m(g,C,A,"≊","\\approxeq",!0);m(g,C,K,"⋖","\\lessdot");m(g,C,A,"⋘","\\lll",!0);m(g,C,A,"≶","\\lessgtr",!0);m(g,C,A,"⋚","\\lesseqgtr",!0);m(g,C,A,"⪋","\\lesseqqgtr",!0);m(g,C,A,"≑","\\doteqdot");m(g,C,A,"≓","\\risingdotseq",!0);m(g,C,A,"≒","\\fallingdotseq",!0);m(g,C,A,"∽","\\backsim",!0);m(g,C,A,"⋍","\\backsimeq",!0);m(g,C,A,"⫅","\\subseteqq",!0);m(g,C,A,"⋐","\\Subset",!0);m(g,C,A,"⊏","\\sqsubset",!0);m(g,C,A,"≼","\\preccurlyeq",!0);m(g,C,A,"⋞","\\curlyeqprec",!0);m(g,C,A,"≾","\\precsim",!0);m(g,C,A,"⪷","\\precapprox",!0);m(g,C,A,"⊲","\\vartriangleleft");m(g,C,A,"⊴","\\trianglelefteq");m(g,C,A,"⊨","\\vDash",!0);m(g,C,A,"⊪","\\Vvdash",!0);m(g,C,A,"⌣","\\smallsmile");m(g,C,A,"⌢","\\smallfrown");m(g,C,A,"≏","\\bumpeq",!0);m(g,C,A,"≎","\\Bumpeq",!0);m(g,C,A,"≧","\\geqq",!0);m(g,C,A,"⩾","\\geqslant",!0);m(g,C,A,"⪖","\\eqslantgtr",!0);m(g,C,A,"≳","\\gtrsim",!0);m(g,C,A,"⪆","\\gtrapprox",!0);m(g,C,K,"⋗","\\gtrdot");m(g,C,A,"⋙","\\ggg",!0);m(g,C,A,"≷","\\gtrless",!0);m(g,C,A,"⋛","\\gtreqless",!0);m(g,C,A,"⪌","\\gtreqqless",!0);m(g,C,A,"≖","\\eqcirc",!0);m(g,C,A,"≗","\\circeq",!0);m(g,C,A,"≜","\\triangleq",!0);m(g,C,A,"∼","\\thicksim");m(g,C,A,"≈","\\thickapprox");m(g,C,A,"⫆","\\supseteqq",!0);m(g,C,A,"⋑","\\Supset",!0);m(g,C,A,"⊐","\\sqsupset",!0);m(g,C,A,"≽","\\succcurlyeq",!0);m(g,C,A,"⋟","\\curlyeqsucc",!0);m(g,C,A,"≿","\\succsim",!0);m(g,C,A,"⪸","\\succapprox",!0);m(g,C,A,"⊳","\\vartriangleright");m(g,C,A,"⊵","\\trianglerighteq");m(g,C,A,"⊩","\\Vdash",!0);m(g,C,A,"∣","\\shortmid");m(g,C,A,"∥","\\shortparallel");m(g,C,A,"≬","\\between",!0);m(g,C,A,"⋔","\\pitchfork",!0);m(g,C,A,"∝","\\varpropto");m(g,C,A,"◀","\\blacktriangleleft");m(g,C,A,"∴","\\therefore",!0);m(g,C,A,"∍","\\backepsilon");m(g,C,A,"▶","\\blacktriangleright");m(g,C,A,"∵","\\because",!0);m(g,C,A,"⋘","\\llless");m(g,C,A,"⋙","\\gggtr");m(g,C,K,"⊲","\\lhd");m(g,C,K,"⊳","\\rhd");m(g,C,A,"≂","\\eqsim",!0);m(g,v,A,"⋈","\\Join");m(g,C,A,"≑","\\Doteq",!0);m(g,C,K,"∔","\\dotplus",!0);m(g,C,K,"∖","\\smallsetminus");m(g,C,K,"⋒","\\Cap",!0);m(g,C,K,"⋓","\\Cup",!0);m(g,C,K,"⩞","\\doublebarwedge",!0);m(g,C,K,"⊟","\\boxminus",!0);m(g,C,K,"⊞","\\boxplus",!0);m(g,C,K,"⋇","\\divideontimes",!0);m(g,C,K,"⋉","\\ltimes",!0);m(g,C,K,"⋊","\\rtimes",!0);m(g,C,K,"⋋","\\leftthreetimes",!0);m(g,C,K,"⋌","\\rightthreetimes",!0);m(g,C,K,"⋏","\\curlywedge",!0);m(g,C,K,"⋎","\\curlyvee",!0);m(g,C,K,"⊝","\\circleddash",!0);m(g,C,K,"⊛","\\circledast",!0);m(g,C,K,"⋅","\\centerdot");m(g,C,K,"⊺","\\intercal",!0);m(g,C,K,"⋒","\\doublecap");m(g,C,K,"⋓","\\doublecup");m(g,C,K,"⊠","\\boxtimes",!0);m(g,C,A,"⇢","\\dashrightarrow",!0);m(g,C,A,"⇠","\\dashleftarrow",!0);m(g,C,A,"⇇","\\leftleftarrows",!0);m(g,C,A,"⇆","\\leftrightarrows",!0);m(g,C,A,"⇚","\\Lleftarrow",!0);m(g,C,A,"↞","\\twoheadleftarrow",!0);m(g,C,A,"↢","\\leftarrowtail",!0);m(g,C,A,"↫","\\looparrowleft",!0);m(g,C,A,"⇋","\\leftrightharpoons",!0);m(g,C,A,"↶","\\curvearrowleft",!0);m(g,C,A,"↺","\\circlearrowleft",!0);m(g,C,A,"↰","\\Lsh",!0);m(g,C,A,"⇈","\\upuparrows",!0);m(g,C,A,"↿","\\upharpoonleft",!0);m(g,C,A,"⇃","\\downharpoonleft",!0);m(g,v,A,"⊶","\\origof",!0);m(g,v,A,"⊷","\\imageof",!0);m(g,C,A,"⊸","\\multimap",!0);m(g,C,A,"↭","\\leftrightsquigarrow",!0);m(g,C,A,"⇉","\\rightrightarrows",!0);m(g,C,A,"⇄","\\rightleftarrows",!0);m(g,C,A,"↠","\\twoheadrightarrow",!0);m(g,C,A,"↣","\\rightarrowtail",!0);m(g,C,A,"↬","\\looparrowright",!0);m(g,C,A,"↷","\\curvearrowright",!0);m(g,C,A,"↻","\\circlearrowright",!0);m(g,C,A,"↱","\\Rsh",!0);m(g,C,A,"⇊","\\downdownarrows",!0);m(g,C,A,"↾","\\upharpoonright",!0);m(g,C,A,"⇂","\\downharpoonright",!0);m(g,C,A,"⇝","\\rightsquigarrow",!0);m(g,C,A,"⇝","\\leadsto");m(g,C,A,"⇛","\\Rrightarrow",!0);m(g,C,A,"↾","\\restriction");m(g,v,E,"‘","`");m(g,v,E,"$","\\$");m(B,v,E,"$","\\$");m(B,v,E,"$","\\textdollar");m(g,v,E,"%","\\%");m(B,v,E,"%","\\%");m(g,v,E,"_","\\_");m(B,v,E,"_","\\_");m(B,v,E,"_","\\textunderscore");m(g,v,E,"∠","\\angle",!0);m(g,v,E,"∞","\\infty",!0);m(g,v,E,"′","\\prime");m(g,v,E,"△","\\triangle");m(g,v,E,"Γ","\\Gamma",!0);m(g,v,E,"Δ","\\Delta",!0);m(g,v,E,"Θ","\\Theta",!0);m(g,v,E,"Λ","\\Lambda",!0);m(g,v,E,"Ξ","\\Xi",!0);m(g,v,E,"Π","\\Pi",!0);m(g,v,E,"Σ","\\Sigma",!0);m(g,v,E,"Υ","\\Upsilon",!0);m(g,v,E,"Φ","\\Phi",!0);m(g,v,E,"Ψ","\\Psi",!0);m(g,v,E,"Ω","\\Omega",!0);m(g,v,E,"A","Α");m(g,v,E,"B","Β");m(g,v,E,"E","Ε");m(g,v,E,"Z","Ζ");m(g,v,E,"H","Η");m(g,v,E,"I","Ι");m(g,v,E,"K","Κ");m(g,v,E,"M","Μ");m(g,v,E,"N","Ν");m(g,v,E,"O","Ο");m(g,v,E,"P","Ρ");m(g,v,E,"T","Τ");m(g,v,E,"X","Χ");m(g,v,E,"¬","\\neg",!0);m(g,v,E,"¬","\\lnot");m(g,v,E,"⊤","\\top");m(g,v,E,"⊥","\\bot");m(g,v,E,"∅","\\emptyset");m(g,C,E,"∅","\\varnothing");m(g,v,te,"α","\\alpha",!0);m(g,v,te,"β","\\beta",!0);m(g,v,te,"γ","\\gamma",!0);m(g,v,te,"δ","\\delta",!0);m(g,v,te,"ϵ","\\epsilon",!0);m(g,v,te,"ζ","\\zeta",!0);m(g,v,te,"η","\\eta",!0);m(g,v,te,"θ","\\theta",!0);m(g,v,te,"ι","\\iota",!0);m(g,v,te,"κ","\\kappa",!0);m(g,v,te,"λ","\\lambda",!0);m(g,v,te,"μ","\\mu",!0);m(g,v,te,"ν","\\nu",!0);m(g,v,te,"ξ","\\xi",!0);m(g,v,te,"ο","\\omicron",!0);m(g,v,te,"π","\\pi",!0);m(g,v,te,"ρ","\\rho",!0);m(g,v,te,"σ","\\sigma",!0);m(g,v,te,"τ","\\tau",!0);m(g,v,te,"υ","\\upsilon",!0);m(g,v,te,"ϕ","\\phi",!0);m(g,v,te,"χ","\\chi",!0);m(g,v,te,"ψ","\\psi",!0);m(g,v,te,"ω","\\omega",!0);m(g,v,te,"ε","\\varepsilon",!0);m(g,v,te,"ϑ","\\vartheta",!0);m(g,v,te,"ϖ","\\varpi",!0);m(g,v,te,"ϱ","\\varrho",!0);m(g,v,te,"ς","\\varsigma",!0);m(g,v,te,"φ","\\varphi",!0);m(g,v,K,"∗","*",!0);m(g,v,K,"+","+");m(g,v,K,"−","-",!0);m(g,v,K,"⋅","\\cdot",!0);m(g,v,K,"∘","\\circ",!0);m(g,v,K,"÷","\\div",!0);m(g,v,K,"±","\\pm",!0);m(g,v,K,"×","\\times",!0);m(g,v,K,"∩","\\cap",!0);m(g,v,K,"∪","\\cup",!0);m(g,v,K,"∖","\\setminus",!0);m(g,v,K,"∧","\\land");m(g,v,K,"∨","\\lor");m(g,v,K,"∧","\\wedge",!0);m(g,v,K,"∨","\\vee",!0);m(g,v,E,"√","\\surd");m(g,v,Jt,"⟨","\\langle",!0);m(g,v,Jt,"∣","\\lvert");m(g,v,Jt,"∥","\\lVert");m(g,v,Ot,"?","?");m(g,v,Ot,"!","!");m(g,v,Ot,"⟩","\\rangle",!0);m(g,v,Ot,"∣","\\rvert");m(g,v,Ot,"∥","\\rVert");m(g,v,A,"=","=");m(g,v,A,":",":");m(g,v,A,"≈","\\approx",!0);m(g,v,A,"≅","\\cong",!0);m(g,v,A,"≥","\\ge");m(g,v,A,"≥","\\geq",!0);m(g,v,A,"←","\\gets");m(g,v,A,">","\\gt",!0);m(g,v,A,"∈","\\in",!0);m(g,v,A,"","\\@not");m(g,v,A,"⊂","\\subset",!0);m(g,v,A,"⊃","\\supset",!0);m(g,v,A,"⊆","\\subseteq",!0);m(g,v,A,"⊇","\\supseteq",!0);m(g,C,A,"⊈","\\nsubseteq",!0);m(g,C,A,"⊉","\\nsupseteq",!0);m(g,v,A,"⊨","\\models");m(g,v,A,"←","\\leftarrow",!0);m(g,v,A,"≤","\\le");m(g,v,A,"≤","\\leq",!0);m(g,v,A,"<","\\lt",!0);m(g,v,A,"→","\\rightarrow",!0);m(g,v,A,"→","\\to");m(g,C,A,"≱","\\ngeq",!0);m(g,C,A,"≰","\\nleq",!0);m(g,v,yn," ","\\ ");m(g,v,yn," ","\\space");m(g,v,yn," ","\\nobreakspace");m(B,v,yn," ","\\ ");m(B,v,yn," "," ");m(B,v,yn," ","\\space");m(B,v,yn," ","\\nobreakspace");m(g,v,yn,null,"\\nobreak");m(g,v,yn,null,"\\allowbreak");m(g,v,v0,",",",");m(g,v,v0,";",";");m(g,C,K,"⊼","\\barwedge",!0);m(g,C,K,"⊻","\\veebar",!0);m(g,v,K,"⊙","\\odot",!0);m(g,v,K,"⊕","\\oplus",!0);m(g,v,K,"⊗","\\otimes",!0);m(g,v,E,"∂","\\partial",!0);m(g,v,K,"⊘","\\oslash",!0);m(g,C,K,"⊚","\\circledcirc",!0);m(g,C,K,"⊡","\\boxdot",!0);m(g,v,K,"△","\\bigtriangleup");m(g,v,K,"▽","\\bigtriangledown");m(g,v,K,"†","\\dagger");m(g,v,K,"⋄","\\diamond");m(g,v,K,"⋆","\\star");m(g,v,K,"◃","\\triangleleft");m(g,v,K,"▹","\\triangleright");m(g,v,Jt,"{","\\{");m(B,v,E,"{","\\{");m(B,v,E,"{","\\textbraceleft");m(g,v,Ot,"}","\\}");m(B,v,E,"}","\\}");m(B,v,E,"}","\\textbraceright");m(g,v,Jt,"{","\\lbrace");m(g,v,Ot,"}","\\rbrace");m(g,v,Jt,"[","\\lbrack",!0);m(B,v,E,"[","\\lbrack",!0);m(g,v,Ot,"]","\\rbrack",!0);m(B,v,E,"]","\\rbrack",!0);m(g,v,Jt,"(","\\lparen",!0);m(g,v,Ot,")","\\rparen",!0);m(B,v,E,"<","\\textless",!0);m(B,v,E,">","\\textgreater",!0);m(g,v,Jt,"⌊","\\lfloor",!0);m(g,v,Ot,"⌋","\\rfloor",!0);m(g,v,Jt,"⌈","\\lceil",!0);m(g,v,Ot,"⌉","\\rceil",!0);m(g,v,E,"\\","\\backslash");m(g,v,E,"∣","|");m(g,v,E,"∣","\\vert");m(B,v,E,"|","\\textbar",!0);m(g,v,E,"∥","\\|");m(g,v,E,"∥","\\Vert");m(B,v,E,"∥","\\textbardbl");m(B,v,E,"~","\\textasciitilde");m(B,v,E,"\\","\\textbackslash");m(B,v,E,"^","\\textasciicircum");m(g,v,A,"↑","\\uparrow",!0);m(g,v,A,"⇑","\\Uparrow",!0);m(g,v,A,"↓","\\downarrow",!0);m(g,v,A,"⇓","\\Downarrow",!0);m(g,v,A,"↕","\\updownarrow",!0);m(g,v,A,"⇕","\\Updownarrow",!0);m(g,v,Qe,"∐","\\coprod");m(g,v,Qe,"⋁","\\bigvee");m(g,v,Qe,"⋀","\\bigwedge");m(g,v,Qe,"⨄","\\biguplus");m(g,v,Qe,"⋂","\\bigcap");m(g,v,Qe,"⋃","\\bigcup");m(g,v,Qe,"∫","\\int");m(g,v,Qe,"∫","\\intop");m(g,v,Qe,"∬","\\iint");m(g,v,Qe,"∭","\\iiint");m(g,v,Qe,"∏","\\prod");m(g,v,Qe,"∑","\\sum");m(g,v,Qe,"⨂","\\bigotimes");m(g,v,Qe,"⨁","\\bigoplus");m(g,v,Qe,"⨀","\\bigodot");m(g,v,Qe,"∮","\\oint");m(g,v,Qe,"∯","\\oiint");m(g,v,Qe,"∰","\\oiiint");m(g,v,Qe,"⨆","\\bigsqcup");m(g,v,Qe,"∫","\\smallint");m(B,v,is,"…","\\textellipsis");m(g,v,is,"…","\\mathellipsis");m(B,v,is,"…","\\ldots",!0);m(g,v,is,"…","\\ldots",!0);m(g,v,is,"⋯","\\@cdots",!0);m(g,v,is,"⋱","\\ddots",!0);m(g,v,E,"⋮","\\varvdots");m(B,v,E,"⋮","\\varvdots");m(g,v,Pe,"ˊ","\\acute");m(g,v,Pe,"ˋ","\\grave");m(g,v,Pe,"¨","\\ddot");m(g,v,Pe,"~","\\tilde");m(g,v,Pe,"ˉ","\\bar");m(g,v,Pe,"˘","\\breve");m(g,v,Pe,"ˇ","\\check");m(g,v,Pe,"^","\\hat");m(g,v,Pe,"⃗","\\vec");m(g,v,Pe,"˙","\\dot");m(g,v,Pe,"˚","\\mathring");m(g,v,te,"","\\@imath");m(g,v,te,"","\\@jmath");m(g,v,E,"ı","ı");m(g,v,E,"ȷ","ȷ");m(B,v,E,"ı","\\i",!0);m(B,v,E,"ȷ","\\j",!0);m(B,v,E,"ß","\\ss",!0);m(B,v,E,"æ","\\ae",!0);m(B,v,E,"œ","\\oe",!0);m(B,v,E,"ø","\\o",!0);m(B,v,E,"Æ","\\AE",!0);m(B,v,E,"Œ","\\OE",!0);m(B,v,E,"Ø","\\O",!0);m(B,v,Pe,"ˊ","\\'");m(B,v,Pe,"ˋ","\\`");m(B,v,Pe,"ˆ","\\^");m(B,v,Pe,"˜","\\~");m(B,v,Pe,"ˉ","\\=");m(B,v,Pe,"˘","\\u");m(B,v,Pe,"˙","\\.");m(B,v,Pe,"¸","\\c");m(B,v,Pe,"˚","\\r");m(B,v,Pe,"ˇ","\\v");m(B,v,Pe,"¨",'\\"');m(B,v,Pe,"˝","\\H");m(B,v,Pe,"◯","\\textcircled");var a2={"--":!0,"---":!0,"``":!0,"''":!0};m(B,v,E,"–","--",!0);m(B,v,E,"–","\\textendash");m(B,v,E,"—","---",!0);m(B,v,E,"—","\\textemdash");m(B,v,E,"‘","`",!0);m(B,v,E,"‘","\\textquoteleft");m(B,v,E,"’","'",!0);m(B,v,E,"’","\\textquoteright");m(B,v,E,"“","``",!0);m(B,v,E,"“","\\textquotedblleft");m(B,v,E,"”","''",!0);m(B,v,E,"”","\\textquotedblright");m(g,v,E,"°","\\degree",!0);m(B,v,E,"°","\\degree");m(B,v,E,"°","\\textdegree",!0);m(g,v,E,"£","\\pounds");m(g,v,E,"£","\\mathsterling",!0);m(B,v,E,"£","\\pounds");m(B,v,E,"£","\\textsterling",!0);m(g,C,E,"✠","\\maltese");m(B,C,E,"✠","\\maltese");var df='0123456789/@."';for(var hl=0;hl0)return mr(s,u,i,r,o.concat(c));if(l){var d,h;if(l==="boldsymbol"){var f=jv(s,i,r,o,n);d=f.fontName,h=[f.fontClass]}else a?(d=c2[l].fontName,h=[l]):(d=Fo(l,r.fontWeight,r.fontShape),h=[l,r.fontWeight,r.fontShape]);if(x0(s,d,i).metrics)return mr(s,d,i,r,o.concat(h));if(a2.hasOwnProperty(s)&&d.slice(0,10)==="Typewriter"){for(var p=[],b=0;b{if(qn(t.classes)!==qn(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},Kv=t=>{for(var e=0;er&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},_t=function(e,r,n,i){var s=new lo(e,r,n,i);return Oc(s),s},l2=(t,e,r,n)=>new lo(t,e,r,n),Gv=function(e,r,n){var i=_t([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=q(i.height),i.maxFontSize=1,i},Jv=function(e,r,n,i){var s=new Dc(e,r,n,i);return Oc(s),s},u2=function(e){var r=new ao(e);return Oc(r),r},Yv=function(e,r){return e instanceof ao?_t([],[e],r):e},Zv=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,s=i,o=1;o{var r=_t(["mspace"],[],e),n=qe(t,e);return r.style.marginRight=q(n),r},Fo=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var s;return r==="textbf"&&n==="textit"?s="BoldItalic":r==="textbf"?s="Bold":r==="textit"?s="Italic":s="Regular",i+"-"+s},c2={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},d2={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ex=function(e,r){var[n,i,s]=d2[e],o=new Vn(n),a=new pn([o],{width:q(i),height:q(s),style:"width:"+q(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=l2(["overlay"],[a],r);return l.height=s,l.style.height=q(s),l.style.width=q(i),l},N={fontMap:c2,makeSymbol:mr,mathsym:$v,makeSpan:_t,makeSvgSpan:l2,makeLineSpan:Gv,makeAnchor:Jv,makeFragment:u2,wrapFragment:Yv,makeVList:Xv,makeOrd:Wv,makeGlue:Qv,staticSvg:ex,svgData:d2,tryCombineChars:Kv},He={number:3,unit:"mu"},ti={number:4,unit:"mu"},Qr={number:5,unit:"mu"},tx={mord:{mop:He,mbin:ti,mrel:Qr,minner:He},mop:{mord:He,mop:He,mrel:Qr,minner:He},mbin:{mord:ti,mop:ti,mopen:ti,minner:ti},mrel:{mord:Qr,mop:Qr,mopen:Qr,minner:Qr},mopen:{},mclose:{mop:He,mbin:ti,mrel:Qr,minner:He},mpunct:{mord:He,mop:He,mrel:Qr,mopen:He,mclose:He,mpunct:He,minner:He},minner:{mord:He,mop:He,mbin:ti,mrel:Qr,mopen:He,mpunct:He,minner:He}},rx={mord:{mop:He},mop:{mord:He,mop:He},mbin:{},mrel:{},mopen:{},mclose:{mop:He},mpunct:{},minner:{mop:He}},h2={},Ka={},Ga={};function W(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:o}=t,a={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l{var y=b.classes[0],x=p.classes[0];y==="mbin"&&ix.includes(x)?b.classes[0]="mord":x==="mbin"&&nx.includes(y)&&(p.classes[0]="mord")},{node:d},h,f),gf(s,(p,b)=>{var y=Mu(b),x=Mu(p),S=y&&x?p.hasClass("mtight")?rx[y][x]:tx[y][x]:null;if(S)return N.makeGlue(S,u)},{node:d},h,f),s},gf=function t(e,r,n,i,s){i&&e.push(i);for(var o=0;oh=>{e.splice(d+1,0,h),o++})(o)}i&&e.pop()},f2=function(e){return e instanceof ao||e instanceof Dc||e instanceof lo&&e.hasClass("enclosing")?e:null},ax=function t(e,r){var n=f2(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},Mu=function(e,r){return e?(r&&(e=ax(e,r)),ox[e.classes[0]]||null):null},Js=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return mn(r.concat(n))},xe=function(e,r,n){if(!e)return mn();if(Ka[e.type]){var i=Ka[e.type](e,r);if(n&&r.size!==n.size){i=mn(r.sizingClasses(n),[i],r);var s=r.sizeMultiplier/n.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new H("Got group of unknown type: '"+e.type+"'")};function Po(t,e){var r=mn(["base"],t,e),n=mn(["strut"]);return n.style.height=q(r.height+r.depth),r.depth&&(n.style.verticalAlign=q(-r.depth)),r.children.unshift(n),r}function Eu(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=nt(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var s=[],o=[],a=0;a0&&(s.push(Po(o,e)),o=[]),s.push(n[a]));o.length>0&&s.push(Po(o,e));var u;r?(u=Po(nt(r,e,!0)),u.classes=["tag"],s.push(u)):i&&s.push(i);var c=mn(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),u){var d=u.children[0];d.style.height=q(c.height+c.depth),c.depth&&(d.style.verticalAlign=q(-c.depth))}return c}function p2(t){return new ao(t)}class Wt{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=qn(this.classes));for(var n=0;n0&&(e+=' class ="'+ke.escape(qn(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}}class zr{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ke.escape(this.toText())}toText(){return this.text}}class lx{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",q(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var F={MathNode:Wt,TextNode:zr,SpaceNode:lx,newDocumentFragment:p2},cr=function(e,r,n){return Be[r][e]&&Be[r][e].replace&&e.charCodeAt(0)!==55349&&!(a2.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Be[r][e].replace),new F.TextNode(e)},Nc=function(e){return e.length===1?e[0]:new F.MathNode("mrow",e)},Lc=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var s=e.text;if(["\\imath","\\jmath"].includes(s))return null;Be[i][s]&&Be[i][s].replace&&(s=Be[i][s].replace);var o=N.fontMap[n].fontName;return Tc(s,o,i)?N.fontMap[n].variant:null};function gl(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof zr&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof zr&&r.text===","}else return!1}var qt=function(e,r,n){if(e.length===1){var i=_e(e[0],r);return n&&i instanceof Wt&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],o,a=0;a=1&&(o.type==="mn"||gl(o))){var u=l.children[0];u instanceof Wt&&u.type==="mn"&&(u.children=[...o.children,...u.children],s.pop())}else if(o.type==="mi"&&o.children.length===1){var c=o.children[0];if(c instanceof zr&&c.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof zr&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),s.pop())}}}s.push(l),o=l}return s},$n=function(e,r,n){return Nc(qt(e,r,n))},_e=function(e,r){if(!e)return new F.MathNode("mrow");if(Ga[e.type]){var n=Ga[e.type](e,r);return n}else throw new H("Got group of unknown type: '"+e.type+"'")};function bf(t,e,r,n,i){var s=qt(t,r),o;s.length===1&&s[0]instanceof Wt&&["mrow","mtable"].includes(s[0].type)?o=s[0]:o=new F.MathNode("mrow",s);var a=new F.MathNode("annotation",[new F.TextNode(e)]);a.setAttribute("encoding","application/x-tex");var l=new F.MathNode("semantics",[o,a]),u=new F.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var c=i?"katex":"katex-mathml";return N.makeSpan([c],[u])}var m2=function(e){return new nn({style:e.displayMode?re.DISPLAY:re.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},g2=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=N.makeSpan(n,[e])}return e},ux=function(e,r,n){var i=m2(n),s;if(n.output==="mathml")return bf(e,r,i,n.displayMode,!0);if(n.output==="html"){var o=Eu(e,i);s=N.makeSpan(["katex"],[o])}else{var a=bf(e,r,i,n.displayMode,!1),l=Eu(e,i);s=N.makeSpan(["katex"],[a,l])}return g2(s,n)},cx=function(e,r,n){var i=m2(n),s=Eu(e,i),o=N.makeSpan(["katex"],[s]);return g2(o,n)},dx={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},hx=function(e){var r=new F.MathNode("mo",[new F.TextNode(dx[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},fx={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},px=function(e){return e.type==="ordgroup"?e.body.length:1},mx=function(e,r){function n(){var a=4e5,l=e.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(l)){var u=e,c=px(u.base),d,h,f;if(c>5)l==="widehat"||l==="widecheck"?(d=420,a=2364,f=.42,h=l+"4"):(d=312,a=2340,f=.34,h="tilde4");else{var p=[1,1,2,2,3,3][c];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][p],d=[0,239,300,360,420][p],f=[0,.24,.3,.3,.36,.42][p],h=l+p):(a=[0,600,1033,2339,2340][p],d=[0,260,286,306,312][p],f=[0,.26,.286,.3,.306,.34][p],h="tilde"+p)}var b=new Vn(h),y=new pn([b],{width:"100%",height:q(f),viewBox:"0 0 "+a+" "+d,preserveAspectRatio:"none"});return{span:N.makeSvgSpan([],[y],r),minWidth:0,height:f}}else{var x=[],S=fx[l],[M,w,T]=S,D=T/1e3,O=M.length,I,_;if(O===1){var $=S[3];I=["hide-tail"],_=[$]}else if(O===2)I=["halfarrow-left","halfarrow-right"],_=["xMinYMin","xMaxYMin"];else if(O===3)I=["brace-left","brace-center","brace-right"],_=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+O+" children.");for(var z=0;z0&&(i.style.minWidth=q(s)),i},gx=function(e,r,n,i,s){var o,a=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(o=N.makeSpan(["stretchy",r],[],s),r==="fbox"){var l=s.color&&s.getColor();l&&(o.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new Cu({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new Cu({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new pn(u,{width:"100%",height:q(a)});o=N.makeSvgSpan([],[c],s)}return o.height=a,o.style.height=q(a),o},gn={encloseSpan:gx,mathMLnode:hx,svgSpan:mx};function he(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function _c(t){var e=k0(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function k0(t){return t&&(t.type==="atom"||qv.hasOwnProperty(t.type))?t:null}var zc=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=he(t.base,"accent"),r=n.base,t.base=r,i=Pv(xe(t,e)),t.base=n):(n=he(t,"accent"),r=n.base);var s=xe(r,e.havingCrampedStyle()),o=n.isShifty&&ke.isCharacterBox(r),a=0;if(o){var l=ke.getBaseElem(r),u=xe(l,e.havingCrampedStyle());a=cf(u).skew}var c=n.label==="\\c",d=c?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),h;if(n.isStretchy)h=gn.svgSpan(n,e),h=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+q(2*a)+")",marginLeft:q(2*a)}:void 0}]},e);else{var f,p;n.label==="\\vec"?(f=N.staticSvg("vec",e),p=N.svgData.vec[1]):(f=N.makeOrd({mode:n.mode,text:n.label},e,"textord"),f=cf(f),f.italic=0,p=f.width,c&&(d+=f.depth)),h=N.makeSpan(["accent-body"],[f]);var b=n.label==="\\textcircled";b&&(h.classes.push("accent-full"),d=s.height);var y=a;b||(y-=p/2),h.style.left=q(y),n.label==="\\textcircled"&&(h.style.top=".2em"),h=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:h}]},e)}var x=N.makeSpan(["mord","accent"],[h],e);return i?(i.children[0]=x,i.height=Math.max(x.height,i.height),i.classes[0]="mord",i):x},b2=(t,e)=>{var r=t.isStretchy?gn.mathMLnode(t.label):new F.MathNode("mo",[cr(t.label,t.mode)]),n=new F.MathNode("mover",[_e(t.base,e),r]);return n.setAttribute("accent","true"),n},bx=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));W({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=Ja(e[0]),n=!bx.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:zc,mathmlBuilder:b2});W({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:zc,mathmlBuilder:b2});W({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=xe(t.base,e),n=gn.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,s=N.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return N.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(t,e)=>{var r=gn.mathMLnode(t.label),n=new F.MathNode("munder",[_e(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var Ho=t=>{var e=new F.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};W({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=N.wrapFragment(xe(t.body,n,e),e),s=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var o;t.below&&(n=e.havingStyle(r.sub()),o=N.wrapFragment(xe(t.below,n,e),e),o.classes.push(s+"-arrow-pad"));var a=gn.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*a.height,u=-e.fontMetrics().axisHeight-.5*a.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(u-=i.depth);var c;if(o){var d=-e.fontMetrics().axisHeight+o.height+.5*a.height+.111;c=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:a,shift:l},{type:"elem",elem:o,shift:d}]},e)}else c=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:a,shift:l}]},e);return c.children[0].children[0].children[1].classes.push("svg-align"),N.makeSpan(["mrel","x-arrow"],[c],e)},mathmlBuilder(t,e){var r=gn.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=Ho(_e(t.body,e));if(t.below){var s=Ho(_e(t.below,e));n=new F.MathNode("munderover",[r,s,i])}else n=new F.MathNode("mover",[r,i])}else if(t.below){var o=Ho(_e(t.below,e));n=new F.MathNode("munder",[r,o])}else n=Ho(),n=new F.MathNode("mover",[r,n]);return n}});var yx=N.makeSpan;function y2(t,e){var r=nt(t.body,e,!0);return yx([t.mclass],r,e)}function v2(t,e){var r,n=qt(t.body,e);return t.mclass==="minner"?r=new F.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new F.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new F.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}W({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Ge(i),isCharacterBox:ke.isCharacterBox(i)}},htmlBuilder:y2,mathmlBuilder:v2});var w0=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};W({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:w0(e[0]),body:Ge(e[1]),isCharacterBox:ke.isCharacterBox(e[1])}}});W({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],s=e[0],o;n!=="\\stackrel"?o=w0(i):o="mrel";var a={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ge(i)},l={type:"supsub",mode:s.mode,base:a,sup:n==="\\underset"?null:s,sub:n==="\\underset"?s:null};return{type:"mclass",mode:r.mode,mclass:o,body:[l],isCharacterBox:ke.isCharacterBox(l)}},htmlBuilder:y2,mathmlBuilder:v2});W({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:w0(e[0]),body:Ge(e[0])}},htmlBuilder(t,e){var r=nt(t.body,e,!0),n=N.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=qt(t.body,e),n=new F.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var vx={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},yf=()=>({type:"styling",body:[],mode:"math",style:"display"}),vf=t=>t.type==="textord"&&t.text==="@",xx=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function kx(t,e,r){var n=vx[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:n,mode:"math",family:"rel"},o=r.callFunction("\\Big",[s],[]),a=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[i,o,a]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function wx(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new H("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],s=0;s-1))if("<>AV".indexOf(u)>-1)for(var d=0;d<2;d++){for(var h=!0,f=l+1;fAV=|." after @',o[l]);var p=kx(u,c,t),b={type:"styling",body:[p],mode:"math",style:"display"};n.push(b),a=yf()}s%2===0?n.push(a):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var y=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}W({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=N.wrapFragment(xe(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=q(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new F.MathNode("mrow",[_e(t.label,e)]);return r=new F.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new F.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});W({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=N.wrapFragment(xe(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new F.MathNode("mrow",[_e(t.fragment,e)])}});W({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=he(e[0],"ordgroup"),i=n.body,s="",o=0;o=1114111)throw new H("\\@char with invalid code point "+s);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});var x2=(t,e)=>{var r=nt(t.body,e.withColor(t.color),!1);return N.makeFragment(r)},k2=(t,e)=>{var r=qt(t.body,e.withColor(t.color)),n=new F.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};W({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=he(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:Ge(i)}},htmlBuilder:x2,mathmlBuilder:k2});W({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=he(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var s=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:s}},htmlBuilder:x2,mathmlBuilder:k2});W({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:i&&he(i,"size").value}},htmlBuilder(t,e){var r=N.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=q(qe(t.size,e)))),r},mathmlBuilder(t,e){var r=new F.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",q(qe(t.size,e)))),r}});var Tu={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},w2=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new H("Expected a control sequence",t);return e},Sx=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},S2=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};W({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(Tu[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=Tu[n.text]),he(e.parseFunction(),"internal");throw new H("Invalid token after macro prefix",n)}});W({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new H("Expected a control sequence",n);for(var s=0,o,a=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),a[s].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new H('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new H('Argument number "'+n.text+'" out of order');s++,a.push([])}else{if(n.text==="EOF")throw new H("Expected a macro definition");a[s].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return o&&l.unshift(o),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:a},r===Tu[r]),{type:"internal",mode:e.mode}}});W({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=w2(e.gullet.popToken());e.gullet.consumeSpaces();var i=Sx(e);return S2(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});W({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=w2(e.gullet.popToken()),i=e.gullet.popToken(),s=e.gullet.popToken();return S2(e,n,s,r==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var bs=function(e,r,n){var i=Be.math[e]&&Be.math[e].replace,s=Tc(i||e,r,n);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return s},Rc=function(e,r,n,i){var s=n.havingBaseStyle(r),o=N.makeSpan(i.concat(s.sizingClasses(n)),[e],n),a=s.sizeMultiplier/n.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=s.sizeMultiplier,o},C2=function(e,r,n){var i=r.havingBaseStyle(n),s=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=q(s),e.height-=s,e.depth+=s},Cx=function(e,r,n,i,s,o){var a=N.makeSymbol(e,"Main-Regular",s,i),l=Rc(a,r,i,o);return n&&C2(l,i,r),l},Ax=function(e,r,n,i){return N.makeSymbol(e,"Size"+r+"-Regular",n,i)},A2=function(e,r,n,i,s,o){var a=Ax(e,r,s,i),l=Rc(N.makeSpan(["delimsizing","size"+r],[a],i),re.TEXT,i,o);return n&&C2(l,i,re.TEXT),l},bl=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=N.makeSpan(["delimsizinginner",i],[N.makeSpan([],[N.makeSymbol(e,r,n)])]);return{type:"elem",elem:s}},yl=function(e,r,n){var i=_r["Size4-Regular"][e.charCodeAt(0)]?_r["Size4-Regular"][e.charCodeAt(0)][4]:_r["Size1-Regular"][e.charCodeAt(0)][4],s=new Vn("inner",Ov(e,Math.round(1e3*r))),o=new pn([s],{width:q(i),height:q(r),style:"width:"+q(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),a=N.makeSvgSpan([],[o],n);return a.height=r,a.style.height=q(r),a.style.width=q(i),{type:"elem",elem:a}},Du=.008,qo={type:"kern",size:-1*Du},Mx=["|","\\lvert","\\rvert","\\vert"],Ex=["\\|","\\lVert","\\rVert","\\Vert"],M2=function(e,r,n,i,s,o){var a,l,u,c,d="",h=0;a=u=c=e,l=null;var f="Size1-Regular";e==="\\uparrow"?u=c="⏐":e==="\\Uparrow"?u=c="‖":e==="\\downarrow"?a=u="⏐":e==="\\Downarrow"?a=u="‖":e==="\\updownarrow"?(a="\\uparrow",u="⏐",c="\\downarrow"):e==="\\Updownarrow"?(a="\\Uparrow",u="‖",c="\\Downarrow"):Mx.includes(e)?(u="∣",d="vert",h=333):Ex.includes(e)?(u="∥",d="doublevert",h=556):e==="["||e==="\\lbrack"?(a="⎡",u="⎢",c="⎣",f="Size4-Regular",d="lbrack",h=667):e==="]"||e==="\\rbrack"?(a="⎤",u="⎥",c="⎦",f="Size4-Regular",d="rbrack",h=667):e==="\\lfloor"||e==="⌊"?(u=a="⎢",c="⎣",f="Size4-Regular",d="lfloor",h=667):e==="\\lceil"||e==="⌈"?(a="⎡",u=c="⎢",f="Size4-Regular",d="lceil",h=667):e==="\\rfloor"||e==="⌋"?(u=a="⎥",c="⎦",f="Size4-Regular",d="rfloor",h=667):e==="\\rceil"||e==="⌉"?(a="⎤",u=c="⎥",f="Size4-Regular",d="rceil",h=667):e==="("||e==="\\lparen"?(a="⎛",u="⎜",c="⎝",f="Size4-Regular",d="lparen",h=875):e===")"||e==="\\rparen"?(a="⎞",u="⎟",c="⎠",f="Size4-Regular",d="rparen",h=875):e==="\\{"||e==="\\lbrace"?(a="⎧",l="⎨",c="⎩",u="⎪",f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(a="⎫",l="⎬",c="⎭",u="⎪",f="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(a="⎧",c="⎩",u="⎪",f="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(a="⎫",c="⎭",u="⎪",f="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(a="⎧",c="⎭",u="⎪",f="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(a="⎫",c="⎩",u="⎪",f="Size4-Regular");var p=bs(a,f,s),b=p.height+p.depth,y=bs(u,f,s),x=y.height+y.depth,S=bs(c,f,s),M=S.height+S.depth,w=0,T=1;if(l!==null){var D=bs(l,f,s);w=D.height+D.depth,T=2}var O=b+M+w,I=Math.max(0,Math.ceil((r-O)/(T*x))),_=O+I*T*x,$=i.fontMetrics().axisHeight;n&&($*=i.sizeMultiplier);var z=_/2-$,j=[];if(d.length>0){var G=_-b-M,ce=Math.round(_*1e3),le=Nv(d,Math.round(G*1e3)),Q=new Vn(d,le),me=(h/1e3).toFixed(3)+"em",be=(ce/1e3).toFixed(3)+"em",et=new pn([Q],{width:me,height:be,viewBox:"0 0 "+h+" "+ce}),De=N.makeSvgSpan([],[et],i);De.height=ce/1e3,De.style.width=me,De.style.height=be,j.push({type:"elem",elem:De})}else{if(j.push(bl(c,f,s)),j.push(qo),l===null){var Ye=_-b-M+2*Du;j.push(yl(u,Ye,i))}else{var Ce=(_-b-M-w)/2+2*Du;j.push(yl(u,Ce,i)),j.push(qo),j.push(bl(l,f,s)),j.push(qo),j.push(yl(u,Ce,i))}j.push(qo),j.push(bl(a,f,s))}var xt=i.havingBaseStyle(re.TEXT),kt=N.makeVList({positionType:"bottom",positionData:z,children:j},xt);return Rc(N.makeSpan(["delimsizing","mult"],[kt],xt),re.TEXT,i,o)},vl=80,xl=.08,kl=function(e,r,n,i,s){var o=Dv(e,i,n),a=new Vn(e,o),l=new pn([a],{width:"400em",height:q(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return N.makeSvgSpan(["hide-tail"],[l],s)},Tx=function(e,r){var n=r.havingBaseSizing(),i=O2("\\surd",e*n.sizeMultiplier,D2,n),s=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),a,l=0,u=0,c=0,d;return i.type==="small"?(c=1e3+1e3*o+vl,e<1?s=1:e<1.4&&(s=.7),l=(1+o+xl)/s,u=(1+o)/s,a=kl("sqrtMain",l,c,o,r),a.style.minWidth="0.853em",d=.833/s):i.type==="large"?(c=(1e3+vl)*Ns[i.size],u=(Ns[i.size]+o)/s,l=(Ns[i.size]+o+xl)/s,a=kl("sqrtSize"+i.size,l,c,o,r),a.style.minWidth="1.02em",d=1/s):(l=e+o+xl,u=e+o,c=Math.floor(1e3*e+o)+vl,a=kl("sqrtTall",l,c,o,r),a.style.minWidth="0.742em",d=1.056),a.height=u,a.style.height=q(l),{span:a,advanceWidth:d,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*s}},E2=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Dx=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],T2=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ns=[0,1.2,1.8,2.4,3],Ox=function(e,r,n,i,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),E2.includes(e)||T2.includes(e))return A2(e,r,!1,n,i,s);if(Dx.includes(e))return M2(e,Ns[r],!1,n,i,s);throw new H("Illegal delimiter: '"+e+"'")},Nx=[{type:"small",style:re.SCRIPTSCRIPT},{type:"small",style:re.SCRIPT},{type:"small",style:re.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Lx=[{type:"small",style:re.SCRIPTSCRIPT},{type:"small",style:re.SCRIPT},{type:"small",style:re.TEXT},{type:"stack"}],D2=[{type:"small",style:re.SCRIPTSCRIPT},{type:"small",style:re.SCRIPT},{type:"small",style:re.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],_x=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},O2=function(e,r,n,i){for(var s=Math.min(2,3-i.style.size),o=s;or)return n[o]}return n[n.length-1]},N2=function(e,r,n,i,s,o){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var a;T2.includes(e)?a=Nx:E2.includes(e)?a=D2:a=Lx;var l=O2(e,r,a,i);return l.type==="small"?Cx(e,l.style,n,i,s,o):l.type==="large"?A2(e,l.size,n,i,s,o):M2(e,r,n,i,s,o)},zx=function(e,r,n,i,s,o){var a=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,c=Math.max(r-a,n+a),d=Math.max(c/500*l,2*c-u);return N2(e,d,!0,i,s,o)},dn={sqrtImage:Tx,sizedDelim:Ox,sizeToMaxHeight:Ns,customSizedDelim:N2,leftRightDelim:zx},xf={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Rx=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function S0(t,e){var r=k0(t);if(r&&Rx.includes(r.text))return r;throw r?new H("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new H("Invalid delimiter type '"+t.type+"'",t)}W({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=S0(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:xf[t.funcName].size,mclass:xf[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?N.makeSpan([t.mclass]):dn.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(cr(t.delim,t.mode));var r=new F.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=q(dn.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function kf(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}W({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new H("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:S0(e[0],t).text,color:r}}});W({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=S0(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=he(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:s.delim,rightColor:s.color}},htmlBuilder:(t,e)=>{kf(t);for(var r=nt(t.body,e,!0,["mopen","mclose"]),n=0,i=0,s=!1,o=0;o{kf(t);var r=qt(t.body,e);if(t.left!=="."){var n=new F.MathNode("mo",[cr(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new F.MathNode("mo",[cr(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return Nc(r)}});W({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=S0(e[0],t);if(!t.parser.leftrightDepth)throw new H("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=Js(e,[]);else{r=dn.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?cr("|","text"):cr(t.delim,t.mode),n=new F.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Ic=(t,e)=>{var r=N.wrapFragment(xe(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,s,o=0,a=ke.isCharacterBox(t.body);if(n==="sout")s=N.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/i,o=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=qe({number:.6,unit:"pt"},e),u=qe({number:.35,unit:"ex"},e),c=e.havingBaseSizing();i=i/c.sizeMultiplier;var d=r.height+r.depth+l+u;r.style.paddingLeft=q(d/2+l);var h=Math.floor(1e3*d*i),f=Ev(h),p=new pn([new Vn("phase",f)],{width:"400em",height:q(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});s=N.makeSvgSpan(["hide-tail"],[p],e),s.style.height=q(d),o=r.depth+l+u}else{/cancel/.test(n)?a||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var b=0,y=0,x=0;/box/.test(n)?(x=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),b=e.fontMetrics().fboxsep+(n==="colorbox"?0:x),y=b):n==="angl"?(x=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),b=4*x,y=Math.max(0,.25-r.depth)):(b=a?.2:0,y=b),s=gn.encloseSpan(r,n,b,y,e),/fbox|boxed|fcolorbox/.test(n)?(s.style.borderStyle="solid",s.style.borderWidth=q(x)):n==="angl"&&x!==.049&&(s.style.borderTopWidth=q(x),s.style.borderRightWidth=q(x)),o=r.depth+y,t.backgroundColor&&(s.style.backgroundColor=t.backgroundColor,t.borderColor&&(s.style.borderColor=t.borderColor))}var S;if(t.backgroundColor)S=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:r,shift:0}]},e);else{var M=/cancel|phase/.test(n)?["svg-align"]:[];S=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:M}]},e)}return/cancel/.test(n)&&(S.height=r.height,S.depth=r.depth),/cancel/.test(n)&&!a?N.makeSpan(["mord","cancel-lap"],[S],e):N.makeSpan(["mord"],[S],e)},Bc=(t,e)=>{var r=0,n=new F.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[_e(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};W({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,s=he(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,body:o}},htmlBuilder:Ic,mathmlBuilder:Bc});W({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,s=he(e[0],"color-token").color,o=he(e[1],"color-token").color,a=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,borderColor:s,body:a}},htmlBuilder:Ic,mathmlBuilder:Bc});W({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});W({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:Ic,mathmlBuilder:Bc});W({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var L2={};function $r(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:o}=t,a={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var e=t.parser.settings;if(!e.displayMode)throw new H("{"+t.envName+"} can be used only in display mode.")};function Fc(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function Jn(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:s,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:u,emptySingleRow:c,maxNumCols:d,leqno:h}=e;if(t.gullet.beginGroup(),u||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){var f=t.gullet.expandMacroAsText("\\arraystretch");if(f==null)o=1;else if(o=parseFloat(f),!o||o<0)throw new H("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var p=[],b=[p],y=[],x=[],S=l!=null?[]:void 0;function M(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function w(){S&&(t.gullet.macros.get("\\df@tag")?(S.push(t.subparse([new vr("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):S.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(M(),x.push(wf(t));;){var T=t.parseExpression(!1,u?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),T={type:"ordgroup",mode:t.mode,body:T},r&&(T={type:"styling",mode:t.mode,style:r,body:[T]}),p.push(T);var D=t.fetch().text;if(D==="&"){if(d&&p.length===d){if(u||a)throw new H("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(D==="\\end"){w(),p.length===1&&T.type==="styling"&&T.body[0].body.length===0&&(b.length>1||!c)&&b.pop(),x.length0&&(M+=.25),u.push({pos:M,isDashed:Ne[ue]})}for(w(o[0]),n=0;n0&&(z+=S,ONe))for(n=0;n=a)){var wt=void 0;(i>0||e.hskipBeforeAndAfter)&&(wt=ke.deflt(Ce.pregap,h),wt!==0&&(le=N.makeSpan(["arraycolsep"],[]),le.style.width=q(wt),ce.push(le)));var it=[];for(n=0;n0){for(var se=N.makeLineSpan("hline",r,c),Oe=N.makeLineSpan("hdashline",r,c),Ae=[{type:"elem",elem:l,shift:0}];u.length>0;){var st=u.pop(),Me=st.pos-j;st.isDashed?Ae.push({type:"elem",elem:Oe,shift:Me}):Ae.push({type:"elem",elem:se,shift:Me})}l=N.makeVList({positionType:"individualShift",children:Ae},r)}if(me.length===0)return N.makeSpan(["mord"],[l],r);var Ee=N.makeVList({positionType:"individualShift",children:me},r);return Ee=N.makeSpan(["tag"],[Ee],r),N.makeFragment([l,Ee])},Ix={c:"center ",l:"left ",r:"right "},Wr=function(e,r){for(var n=[],i=new F.MathNode("mtd",[],["mtr-glue"]),s=new F.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var p=e.cols,b="",y=!1,x=0,S=p.length;p[0].type==="separator"&&(h+="top ",x=1),p[p.length-1].type==="separator"&&(h+="bottom ",S-=1);for(var M=x;M0?"left ":"",h+=I[I.length-1].length>0?"right ":"";for(var _=1;_-1?"alignat":"align",s=e.envName==="split",o=Jn(e.parser,{cols:n,addJot:!0,autoTag:s?void 0:Fc(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),a,l=0,u={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var c="",d=0;d0&&f&&(y=1),n[p]={type:"align",align:b,pregap:y,postgap:0}}return o.colSeparationType=f?"align":"alignat",o};$r({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=k0(e[0]),n=r?[e[0]]:he(e[0],"ordgroup").body,i=n.map(function(o){var a=_c(o),l=a.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new H("Unknown column alignment: "+l,o)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Jn(t.parser,s,Pc(t.envName))},htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new H("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var s=Jn(t.parser,n,Pc(t.envName)),o=Math.max(0,...s.body.map(a=>a.length));return s.cols=new Array(o).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=Jn(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=k0(e[0]),n=r?[e[0]]:he(e[0],"ordgroup").body,i=n.map(function(o){var a=_c(o),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new H("Unknown column alignment: "+l,o)});if(i.length>1)throw new H("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=Jn(t.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new H("{subarray} can contain only one column");return s},htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=Jn(t.parser,e,Pc(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:z2,htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){["gather","gather*"].includes(t.envName)&&C0(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Fc(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Jn(t.parser,e,"display")},htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:z2,htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){C0(t);var e={autoTag:Fc(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Jn(t.parser,e,"display")},htmlBuilder:jr,mathmlBuilder:Wr});$r({type:"array",names:["CD"],props:{numArgs:0},handler(t){return C0(t),wx(t.parser)},htmlBuilder:jr,mathmlBuilder:Wr});k("\\nonumber","\\gdef\\@eqnsw{0}");k("\\notag","\\nonumber");W({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new H(t.funcName+" valid only within array environment")}});var Sf=L2;W({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new H("Invalid environment name",i);for(var s="",o=0;o{var r=t.font,n=e.withFont(r);return xe(t.body,n)},I2=(t,e)=>{var r=t.font,n=e.withFont(r);return _e(t.body,n)},Cf={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};W({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=Ja(e[0]),s=n;return s in Cf&&(s=Cf[s]),{type:"font",mode:r.mode,font:s.slice(1),body:i}},htmlBuilder:R2,mathmlBuilder:I2});W({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=ke.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:w0(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});W({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:s}=r,o=r.parseExpression(!0,i),a="math"+n.slice(1);return{type:"font",mode:s,font:a,body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:R2,mathmlBuilder:I2});var B2=(t,e)=>{var r=e;return t==="display"?r=r.id>=re.SCRIPT.id?r.text():re.DISPLAY:t==="text"&&r.size===re.DISPLAY.size?r=re.TEXT:t==="script"?r=re.SCRIPT:t==="scriptscript"&&(r=re.SCRIPTSCRIPT),r},Hc=(t,e)=>{var r=B2(t.size,e.style),n=r.fracNum(),i=r.fracDen(),s;s=e.havingStyle(n);var o=xe(t.numer,s,e);if(t.continued){var a=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;o.height=o.height0?p=3*h:p=7*h,b=e.fontMetrics().denom1):(d>0?(f=e.fontMetrics().num2,p=h):(f=e.fontMetrics().num3,p=3*h),b=e.fontMetrics().denom2);var y;if(c){var S=e.fontMetrics().axisHeight;f-o.depth-(S+.5*d){var r=new F.MathNode("mfrac",[_e(t.numer,e),_e(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=qe(t.barSize,e);r.setAttribute("linethickness",q(n))}var i=B2(t.size,e.style);if(i.size!==e.style.size){r=new F.MathNode("mstyle",[r]);var s=i.size===re.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",s),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var o=[];if(t.leftDelim!=null){var a=new F.MathNode("mo",[new F.TextNode(t.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),o.push(a)}if(o.push(r),t.rightDelim!=null){var l=new F.MathNode("mo",[new F.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return Nc(o)}return r};W({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=e[1],o,a=null,l=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,a="(",l=")";break;case"\\\\bracefrac":o=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:s,hasBarLine:o,leftDelim:a,rightDelim:l,size:u,barSize:null}},htmlBuilder:Hc,mathmlBuilder:qc});W({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});W({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});var Af=["display","text","script","scriptscript"],Mf=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};W({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],s=Ja(e[0]),o=s.type==="atom"&&s.family==="open"?Mf(s.text):null,a=Ja(e[1]),l=a.type==="atom"&&a.family==="close"?Mf(a.text):null,u=he(e[2],"size"),c,d=null;u.isBlank?c=!0:(d=u.value,c=d.number>0);var h="auto",f=e[3];if(f.type==="ordgroup"){if(f.body.length>0){var p=he(f.body[0],"textord");h=Af[Number(p.text)]}}else f=he(f,"textord"),h=Af[Number(f.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:c,barSize:d,leftDelim:o,rightDelim:l,size:h}},htmlBuilder:Hc,mathmlBuilder:qc});W({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:he(e[0],"size").value,token:i}}});W({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],s=hv(he(e[1],"infix").size),o=e[2],a=s.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Hc,mathmlBuilder:qc});var F2=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?xe(t.sup,e.havingStyle(r.sup()),e):xe(t.sub,e.havingStyle(r.sub()),e),i=he(t.base,"horizBrace")):i=he(t,"horizBrace");var s=xe(i.base,e.havingBaseStyle(re.DISPLAY)),o=gn.svgSpan(i,e),a;if(i.isOver?(a=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),a.children[0].children[0].children[1].classes.push("svg-align")):(a=N.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),a.children[0].children[0].children[0].classes.push("svg-align")),n){var l=N.makeSpan(["mord",i.isOver?"mover":"munder"],[a],e);i.isOver?a=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):a=N.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return N.makeSpan(["mord",i.isOver?"mover":"munder"],[a],e)},Bx=(t,e)=>{var r=gn.mathMLnode(t.label);return new F.MathNode(t.isOver?"mover":"munder",[_e(t.base,e),r])};W({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:F2,mathmlBuilder:Bx});W({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=he(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:Ge(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=nt(t.body,e,!1);return N.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=$n(t.body,e);return r instanceof Wt||(r=new Wt("mrow",[r])),r.setAttribute("href",t.href),r}});W({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=he(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],s=0;s{var{parser:r,funcName:n,token:i}=t,s=he(e[0],"raw").string,o=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var a,l={};switch(n){case"\\htmlClass":l.class=s,a={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,a={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,a={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var u=s.split(","),c=0;c{var r=nt(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=N.makeSpan(n,r,e);for(var s in t.attributes)s!=="class"&&t.attributes.hasOwnProperty(s)&&i.setAttribute(s,t.attributes[s]);return i},mathmlBuilder:(t,e)=>$n(t.body,e)});W({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:Ge(e[0]),mathml:Ge(e[1])}},htmlBuilder:(t,e)=>{var r=nt(t.html,e,!1);return N.makeFragment(r)},mathmlBuilder:(t,e)=>$n(t.mathml,e)});var wl=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new H("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!n2(n))throw new H("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};W({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},a="";if(r[0])for(var l=he(r[0],"raw").string,u=l.split(","),c=0;c{var r=qe(t.height,e),n=0;t.totalheight.number>0&&(n=qe(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=qe(t.width,e));var s={height:q(r+n)};i>0&&(s.width=q(i)),n>0&&(s.verticalAlign=q(-n));var o=new Bv(t.src,t.alt,s);return o.height=r,o.depth=n,o},mathmlBuilder:(t,e)=>{var r=new F.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=qe(t.height,e),i=0;if(t.totalheight.number>0&&(i=qe(t.totalheight,e)-n,r.setAttribute("valign",q(-i))),r.setAttribute("height",q(n+i)),t.width.number>0){var s=qe(t.width,e);r.setAttribute("width",q(s))}return r.setAttribute("src",t.src),r}});W({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=he(e[0],"size");if(r.settings.strict){var s=n[1]==="m",o=i.value.unit==="mu";s?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return N.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=qe(t.dimension,e);return new F.SpaceNode(r)}});W({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=N.makeSpan([],[xe(t.body,e)]),r=N.makeSpan(["inner"],[r],e)):r=N.makeSpan(["inner"],[xe(t.body,e)]);var n=N.makeSpan(["fix"],[]),i=N.makeSpan([t.alignment],[r,n],e),s=N.makeSpan(["strut"]);return s.style.height=q(i.height+i.depth),i.depth&&(s.style.verticalAlign=q(-i.depth)),i.children.unshift(s),i=N.makeSpan(["thinbox"],[i],e),N.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new F.MathNode("mpadded",[_e(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});W({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var s=r==="\\("?"\\)":"$",o=n.parseExpression(!1,s);return n.expect(s),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:o}}});W({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new H("Mismatched "+t.funcName)}});var Ef=(t,e)=>{switch(e.style.size){case re.DISPLAY.size:return t.display;case re.TEXT.size:return t.text;case re.SCRIPT.size:return t.script;case re.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};W({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:Ge(e[0]),text:Ge(e[1]),script:Ge(e[2]),scriptscript:Ge(e[3])}},htmlBuilder:(t,e)=>{var r=Ef(t,e),n=nt(r,e,!1);return N.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=Ef(t,e);return $n(r,e)}});var P2=(t,e,r,n,i,s,o)=>{t=N.makeSpan([],[t]);var a=r&&ke.isCharacterBox(r),l,u;if(e){var c=xe(e,n.havingStyle(i.sup()),n);u={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(r){var d=xe(r,n.havingStyle(i.sub()),n);l={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)}}var h;if(u&&l){var f=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+o;h=N.makeVList({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:q(-s)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:q(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var p=t.height-o;h=N.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:q(-s)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(u){var b=t.depth+o;h=N.makeVList({positionType:"bottom",positionData:b,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:q(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var y=[h];if(l&&s!==0&&!a){var x=N.makeSpan(["mspace"],[],n);x.style.marginRight=q(s),y.unshift(x)}return N.makeSpan(["mop","op-limits"],y,n)},H2=["\\smallint"],ss=(t,e)=>{var r,n,i=!1,s;t.type==="supsub"?(r=t.sup,n=t.sub,s=he(t.base,"op"),i=!0):s=he(t,"op");var o=e.style,a=!1;o.size===re.DISPLAY.size&&s.symbol&&!H2.includes(s.name)&&(a=!0);var l;if(s.symbol){var u=a?"Size2-Regular":"Size1-Regular",c="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(c=s.name.slice(1),s.name=c==="oiint"?"\\iint":"\\iiint"),l=N.makeSymbol(s.name,u,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),c.length>0){var d=l.italic,h=N.staticSvg(c+"Size"+(a?"2":"1"),e);l=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:a?.08:0}]},e),s.name="\\"+c,l.classes.unshift("mop"),l.italic=d}}else if(s.body){var f=nt(s.body,e,!0);f.length===1&&f[0]instanceof ur?(l=f[0],l.classes[0]="mop"):l=N.makeSpan(["mop"],f,e)}else{for(var p=[],b=1;b{var r;if(t.symbol)r=new Wt("mo",[cr(t.name,t.mode)]),H2.includes(t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Wt("mo",qt(t.body,e));else{r=new Wt("mi",[new zr(t.name.slice(1))]);var n=new Wt("mo",[cr("⁡","text")]);t.parentIsSupSub?r=new Wt("mrow",[r,n]):r=p2([r,n])}return r},Fx={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};W({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=Fx[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:ss,mathmlBuilder:uo});W({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ge(n)}},htmlBuilder:ss,mathmlBuilder:uo});var Px={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};W({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ss,mathmlBuilder:uo});W({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ss,mathmlBuilder:uo});W({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=Px[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ss,mathmlBuilder:uo});var q2=(t,e)=>{var r,n,i=!1,s;t.type==="supsub"?(r=t.sup,n=t.sub,s=he(t.base,"operatorname"),i=!0):s=he(t,"operatorname");var o;if(s.body.length>0){for(var a=s.body.map(d=>{var h=d.text;return typeof h=="string"?{type:"textord",mode:d.mode,text:h}:d}),l=nt(a,e.withFont("mathrm"),!0),u=0;u{for(var r=qt(t.body,e.withFont("mathrm")),n=!0,i=0;ic.toText()).join("");r=[new F.TextNode(a)]}var l=new F.MathNode("mi",r);l.setAttribute("mathvariant","normal");var u=new F.MathNode("mo",[cr("⁡","text")]);return t.parentIsSupSub?new F.MathNode("mrow",[l,u]):F.newDocumentFragment([l,u])};W({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:Ge(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:q2,mathmlBuilder:Hx});k("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Ci({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?N.makeFragment(nt(t.body,e,!1)):N.makeSpan(["mord"],nt(t.body,e,!0),e)},mathmlBuilder(t,e){return $n(t.body,e,!0)}});W({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=xe(t.body,e.havingCrampedStyle()),n=N.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,s=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return N.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(t,e){var r=new F.MathNode("mo",[new F.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new F.MathNode("mover",[_e(t.body,e),r]);return n.setAttribute("accent","true"),n}});W({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:Ge(n)}},htmlBuilder:(t,e)=>{var r=nt(t.body,e.withPhantom(),!1);return N.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=qt(t.body,e);return new F.MathNode("mphantom",r)}});W({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=N.makeSpan([],[xe(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=qt(Ge(t.body),e),n=new F.MathNode("mphantom",r),i=new F.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});W({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=N.makeSpan(["inner"],[xe(t.body,e.withPhantom())]),n=N.makeSpan(["fix"],[]);return N.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=qt(Ge(t.body),e),n=new F.MathNode("mphantom",r),i=new F.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});W({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=he(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=xe(t.body,e),n=qe(t.dy,e);return N.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new F.MathNode("mpadded",[_e(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});W({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});W({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],s=he(e[0],"size"),o=he(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&he(i,"size").value,width:s.value,height:o.value}},htmlBuilder(t,e){var r=N.makeSpan(["mord","rule"],[],e),n=qe(t.width,e),i=qe(t.height,e),s=t.shift?qe(t.shift,e):0;return r.style.borderRightWidth=q(n),r.style.borderTopWidth=q(i),r.style.bottom=q(s),r.width=n,r.height=i+s,r.depth=-s,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=qe(t.width,e),n=qe(t.height,e),i=t.shift?qe(t.shift,e):0,s=e.color&&e.getColor()||"black",o=new F.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",q(r)),o.setAttribute("height",q(n));var a=new F.MathNode("mpadded",[o]);return i>=0?a.setAttribute("height",q(i)):(a.setAttribute("height",q(i)),a.setAttribute("depth",q(-i))),a.setAttribute("voffset",q(i)),a}});function V2(t,e,r){for(var n=nt(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,s=0;s{var r=e.havingSize(t.size);return V2(t.body,r,e)};W({type:"sizing",names:Tf,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,s=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:Tf.indexOf(n)+1,body:s}},htmlBuilder:qx,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=qt(t.body,r),i=new F.MathNode("mstyle",n);return i.setAttribute("mathsize",q(r.sizeMultiplier)),i}});W({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,s=!1,o=r[0]&&he(r[0],"ordgroup");if(o)for(var a="",l=0;l{var r=N.makeSpan([],[xe(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new F.MathNode("mpadded",[_e(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});W({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],s=e[0];return{type:"sqrt",mode:n.mode,body:s,index:i}},htmlBuilder(t,e){var r=xe(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=N.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,s=i;e.style.idr.height+r.depth+o&&(o=(o+d-r.height-r.depth)/2);var h=l.height-r.height-o-u;r.style.paddingLeft=q(c);var f=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+h)},{type:"elem",elem:l},{type:"kern",size:u}]},e);if(t.index){var p=e.havingStyle(re.SCRIPTSCRIPT),b=xe(t.index,p,e),y=.6*(f.height-f.depth),x=N.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:b}]},e),S=N.makeSpan(["root"],[x]);return N.makeSpan(["mord","sqrt"],[S,f],e)}else return N.makeSpan(["mord","sqrt"],[f],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new F.MathNode("mroot",[_e(r,e),_e(n,e)]):new F.MathNode("msqrt",[_e(r,e)])}});var Df={display:re.DISPLAY,text:re.TEXT,script:re.SCRIPT,scriptscript:re.SCRIPTSCRIPT};W({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,s=i.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:o,body:s}},htmlBuilder(t,e){var r=Df[t.style],n=e.havingStyle(r).withFont("");return V2(t.body,n,e)},mathmlBuilder(t,e){var r=Df[t.style],n=e.havingStyle(r),i=qt(t.body,n),s=new F.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=o[t.style];return s.setAttribute("scriptlevel",a[0]),s.setAttribute("displaystyle",a[1]),s}});var Vx=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===re.DISPLAY.size||n.alwaysHandleSupSub);return i?ss:null}else if(n.type==="operatorname"){var s=n.alwaysHandleSupSub&&(r.style.size===re.DISPLAY.size||n.limits);return s?q2:null}else{if(n.type==="accent")return ke.isCharacterBox(n.base)?zc:null;if(n.type==="horizBrace"){var o=!e.sub;return o===n.isOver?F2:null}else return null}else return null};Ci({type:"supsub",htmlBuilder(t,e){var r=Vx(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:s}=t,o=xe(n,e),a,l,u=e.fontMetrics(),c=0,d=0,h=n&&ke.isCharacterBox(n);if(i){var f=e.havingStyle(e.style.sup());a=xe(i,f,e),h||(c=o.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(s){var p=e.havingStyle(e.style.sub());l=xe(s,p,e),h||(d=o.depth+p.fontMetrics().subDrop*p.sizeMultiplier/e.sizeMultiplier)}var b;e.style===re.DISPLAY?b=u.sup1:e.style.cramped?b=u.sup3:b=u.sup2;var y=e.sizeMultiplier,x=q(.5/u.ptPerEm/y),S=null;if(l){var M=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(o instanceof ur||M)&&(S=q(-o.italic))}var w;if(a&&l){c=Math.max(c,b,a.depth+.25*u.xHeight),d=Math.max(d,u.sub2);var T=u.defaultRuleThickness,D=4*T;if(c-a.depth-(l.height-d)0&&(c+=O,d-=O)}var I=[{type:"elem",elem:l,shift:d,marginRight:x,marginLeft:S},{type:"elem",elem:a,shift:-c,marginRight:x}];w=N.makeVList({positionType:"individualShift",children:I},e)}else if(l){d=Math.max(d,u.sub1,l.height-.8*u.xHeight);var _=[{type:"elem",elem:l,marginLeft:S,marginRight:x}];w=N.makeVList({positionType:"shift",positionData:d,children:_},e)}else if(a)c=Math.max(c,b,a.depth+.25*u.xHeight),w=N.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:a,marginRight:x}]},e);else throw new Error("supsub must have either sup or sub.");var $=Mu(o,"right")||"mord";return N.makeSpan([$],[o,N.makeSpan(["msupsub"],[w])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var s=[_e(t.base,e)];t.sub&&s.push(_e(t.sub,e)),t.sup&&s.push(_e(t.sup,e));var o;if(r)o=n?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&e.style===re.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(e.style===re.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===re.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===re.DISPLAY)?o="munder":o="msub"}else{var a=t.base;a&&a.type==="op"&&a.limits&&(e.style===re.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||e.style===re.DISPLAY)?o="mover":o="msup"}return new F.MathNode(o,s)}});Ci({type:"atom",htmlBuilder(t,e){return N.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new F.MathNode("mo",[cr(t.text,t.mode)]);if(t.family==="bin"){var n=Lc(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});var $2={mi:"italic",mn:"normal",mtext:"normal"};Ci({type:"mathord",htmlBuilder(t,e){return N.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new F.MathNode("mi",[cr(t.text,t.mode,e)]),n=Lc(t,e)||"italic";return n!==$2[r.type]&&r.setAttribute("mathvariant",n),r}});Ci({type:"textord",htmlBuilder(t,e){return N.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=cr(t.text,t.mode,e),n=Lc(t,e)||"normal",i;return t.mode==="text"?i=new F.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new F.MathNode("mn",[r]):t.text==="\\prime"?i=new F.MathNode("mo",[r]):i=new F.MathNode("mi",[r]),n!==$2[i.type]&&i.setAttribute("mathvariant",n),i}});var Sl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Cl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ci({type:"spacing",htmlBuilder(t,e){if(Cl.hasOwnProperty(t.text)){var r=Cl[t.text].className||"";if(t.mode==="text"){var n=N.makeOrd(t,e,"textord");return n.classes.push(r),n}else return N.makeSpan(["mspace",r],[N.mathsym(t.text,t.mode,e)],e)}else{if(Sl.hasOwnProperty(t.text))return N.makeSpan(["mspace",Sl[t.text]],[],e);throw new H('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(Cl.hasOwnProperty(t.text))r=new F.MathNode("mtext",[new F.TextNode(" ")]);else{if(Sl.hasOwnProperty(t.text))return new F.MathNode("mspace");throw new H('Unknown type of space "'+t.text+'"')}return r}});var Of=()=>{var t=new F.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Ci({type:"tag",mathmlBuilder(t,e){var r=new F.MathNode("mtable",[new F.MathNode("mtr",[Of(),new F.MathNode("mtd",[$n(t.body,e)]),Of(),new F.MathNode("mtd",[$n(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var Nf={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Lf={"\\textbf":"textbf","\\textmd":"textmd"},$x={"\\textit":"textit","\\textup":"textup"},_f=(t,e)=>{var r=t.font;if(r){if(Nf[r])return e.withTextFontFamily(Nf[r]);if(Lf[r])return e.withTextFontWeight(Lf[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape($x[r])};W({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:Ge(i),font:n}},htmlBuilder(t,e){var r=_f(t,e),n=nt(t.body,r,!0);return N.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=_f(t,e);return $n(t.body,r)}});W({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=xe(t.body,e),n=N.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,s=N.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return N.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(t,e){var r=new F.MathNode("mo",[new F.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new F.MathNode("munder",[_e(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});W({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=xe(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return N.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new F.MathNode("mpadded",[_e(t.body,e)],["vcenter"])}});W({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new H("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=zf(t),n=[],i=e.havingStyle(e.style.text()),s=0;st.body.replace(/ /g,t.star?"␣":" "),Rn=h2,j2=`[ \r ]`,jx="\\\\[a-zA-Z@]+",Wx="\\\\[^\uD800-\uDFFF]",Ux="("+jx+")"+j2+"*",Kx=`\\\\( |[ \r ]+ ?)[ \r ]*`,Ou="[̀-ͯ]",Gx=new RegExp(Ou+"+$"),Jx="("+j2+"+)|"+(Kx+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Ou+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Ou+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Ux)+("|"+Wx+")");class Rf{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(Jx,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new vr("EOF",new zt(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new H("Unexpected character: '"+e[r]+"'",new vr(e[r],new zt(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=e.indexOf(` `,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new vr(i,new zt(this,r,this.tokenRegex.lastIndex))}}class Yx{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new H("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var Zx=_2;k("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});k("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});k("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});k("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});k("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});k("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");k("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var If={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};k("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new H("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=If[e.text],n==null||n>=r)throw new H("Invalid base-"+r+" digit "+e.text);for(var i;(i=If[t.future().text])!=null&&i{var i=t.consumeArg().tokens;if(i.length!==1)throw new H("\\newcommand's first argument must be a macro name");var s=i[0].text,o=t.isDefined(s);if(o&&!e)throw new H("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!r)throw new H("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var a=0;if(i=t.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",u=t.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new H("Invalid number of arguments: "+l);a=parseInt(l),i=t.consumeArg().tokens}return o&&n||t.macros.set(s,{tokens:i,numArgs:a}),""};k("\\newcommand",t=>Vc(t,!1,!0,!1));k("\\renewcommand",t=>Vc(t,!0,!1,!1));k("\\providecommand",t=>Vc(t,!0,!0,!0));k("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});k("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});k("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Rn[r],Be.math[r],Be.text[r]),""});k("\\bgroup","{");k("\\egroup","}");k("~","\\nobreakspace");k("\\lq","`");k("\\rq","'");k("\\aa","\\r a");k("\\AA","\\r A");k("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");k("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");k("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");k("ℬ","\\mathscr{B}");k("ℰ","\\mathscr{E}");k("ℱ","\\mathscr{F}");k("ℋ","\\mathscr{H}");k("ℐ","\\mathscr{I}");k("ℒ","\\mathscr{L}");k("ℳ","\\mathscr{M}");k("ℛ","\\mathscr{R}");k("ℭ","\\mathfrak{C}");k("ℌ","\\mathfrak{H}");k("ℨ","\\mathfrak{Z}");k("\\Bbbk","\\Bbb{k}");k("·","\\cdotp");k("\\llap","\\mathllap{\\textrm{#1}}");k("\\rlap","\\mathrlap{\\textrm{#1}}");k("\\clap","\\mathclap{\\textrm{#1}}");k("\\mathstrut","\\vphantom{(}");k("\\underbar","\\underline{\\text{#1}}");k("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');k("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");k("\\ne","\\neq");k("≠","\\neq");k("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");k("∉","\\notin");k("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");k("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");k("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");k("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");k("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");k("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");k("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");k("⟂","\\perp");k("‼","\\mathclose{!\\mkern-0.8mu!}");k("∌","\\notni");k("⌜","\\ulcorner");k("⌝","\\urcorner");k("⌞","\\llcorner");k("⌟","\\lrcorner");k("©","\\copyright");k("®","\\textregistered");k("️","\\textregistered");k("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');k("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');k("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');k("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');k("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");k("⋮","\\vdots");k("\\varGamma","\\mathit{\\Gamma}");k("\\varDelta","\\mathit{\\Delta}");k("\\varTheta","\\mathit{\\Theta}");k("\\varLambda","\\mathit{\\Lambda}");k("\\varXi","\\mathit{\\Xi}");k("\\varPi","\\mathit{\\Pi}");k("\\varSigma","\\mathit{\\Sigma}");k("\\varUpsilon","\\mathit{\\Upsilon}");k("\\varPhi","\\mathit{\\Phi}");k("\\varPsi","\\mathit{\\Psi}");k("\\varOmega","\\mathit{\\Omega}");k("\\substack","\\begin{subarray}{c}#1\\end{subarray}");k("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");k("\\boxed","\\fbox{$\\displaystyle{#1}$}");k("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");k("\\implies","\\DOTSB\\;\\Longrightarrow\\;");k("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");k("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");k("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Bf={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};k("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in Bf?e=Bf[r]:(r.slice(0,4)==="\\not"||r in Be.math&&["bin","rel"].includes(Be.math[r].group))&&(e="\\dotsb"),e});var $c={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};k("\\dotso",function(t){var e=t.future().text;return e in $c?"\\ldots\\,":"\\ldots"});k("\\dotsc",function(t){var e=t.future().text;return e in $c&&e!==","?"\\ldots\\,":"\\ldots"});k("\\cdots",function(t){var e=t.future().text;return e in $c?"\\@cdots\\,":"\\@cdots"});k("\\dotsb","\\cdots");k("\\dotsm","\\cdots");k("\\dotsi","\\!\\cdots");k("\\dotsx","\\ldots\\,");k("\\DOTSI","\\relax");k("\\DOTSB","\\relax");k("\\DOTSX","\\relax");k("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");k("\\,","\\tmspace+{3mu}{.1667em}");k("\\thinspace","\\,");k("\\>","\\mskip{4mu}");k("\\:","\\tmspace+{4mu}{.2222em}");k("\\medspace","\\:");k("\\;","\\tmspace+{5mu}{.2777em}");k("\\thickspace","\\;");k("\\!","\\tmspace-{3mu}{.1667em}");k("\\negthinspace","\\!");k("\\negmedspace","\\tmspace-{4mu}{.2222em}");k("\\negthickspace","\\tmspace-{5mu}{.277em}");k("\\enspace","\\kern.5em ");k("\\enskip","\\hskip.5em\\relax");k("\\quad","\\hskip1em\\relax");k("\\qquad","\\hskip2em\\relax");k("\\tag","\\@ifstar\\tag@literal\\tag@paren");k("\\tag@paren","\\tag@literal{({#1})}");k("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new H("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});k("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");k("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");k("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");k("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");k("\\newline","\\\\\\relax");k("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var W2=q(_r["Main-Regular"][84][1]-.7*_r["Main-Regular"][65][1]);k("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+W2+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");k("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+W2+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");k("\\hspace","\\@ifstar\\@hspacer\\@hspace");k("\\@hspace","\\hskip #1\\relax");k("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");k("\\ordinarycolon",":");k("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");k("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');k("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');k("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');k("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');k("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');k("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');k("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');k("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');k("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');k("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');k("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');k("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');k("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');k("∷","\\dblcolon");k("∹","\\eqcolon");k("≔","\\coloneqq");k("≕","\\eqqcolon");k("⩴","\\Coloneqq");k("\\ratio","\\vcentcolon");k("\\coloncolon","\\dblcolon");k("\\colonequals","\\coloneqq");k("\\coloncolonequals","\\Coloneqq");k("\\equalscolon","\\eqqcolon");k("\\equalscoloncolon","\\Eqqcolon");k("\\colonminus","\\coloneq");k("\\coloncolonminus","\\Coloneq");k("\\minuscolon","\\eqcolon");k("\\minuscoloncolon","\\Eqcolon");k("\\coloncolonapprox","\\Colonapprox");k("\\coloncolonsim","\\Colonsim");k("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");k("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");k("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");k("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");k("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");k("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");k("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");k("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");k("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");k("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");k("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");k("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");k("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");k("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");k("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");k("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");k("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");k("\\nleqq","\\html@mathml{\\@nleqq}{≰}");k("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");k("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");k("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");k("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");k("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");k("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");k("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");k("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");k("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");k("\\imath","\\html@mathml{\\@imath}{ı}");k("\\jmath","\\html@mathml{\\@jmath}{ȷ}");k("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");k("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");k("⟦","\\llbracket");k("⟧","\\rrbracket");k("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");k("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");k("⦃","\\lBrace");k("⦄","\\rBrace");k("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");k("⦵","\\minuso");k("\\darr","\\downarrow");k("\\dArr","\\Downarrow");k("\\Darr","\\Downarrow");k("\\lang","\\langle");k("\\rang","\\rangle");k("\\uarr","\\uparrow");k("\\uArr","\\Uparrow");k("\\Uarr","\\Uparrow");k("\\N","\\mathbb{N}");k("\\R","\\mathbb{R}");k("\\Z","\\mathbb{Z}");k("\\alef","\\aleph");k("\\alefsym","\\aleph");k("\\Alpha","\\mathrm{A}");k("\\Beta","\\mathrm{B}");k("\\bull","\\bullet");k("\\Chi","\\mathrm{X}");k("\\clubs","\\clubsuit");k("\\cnums","\\mathbb{C}");k("\\Complex","\\mathbb{C}");k("\\Dagger","\\ddagger");k("\\diamonds","\\diamondsuit");k("\\empty","\\emptyset");k("\\Epsilon","\\mathrm{E}");k("\\Eta","\\mathrm{H}");k("\\exist","\\exists");k("\\harr","\\leftrightarrow");k("\\hArr","\\Leftrightarrow");k("\\Harr","\\Leftrightarrow");k("\\hearts","\\heartsuit");k("\\image","\\Im");k("\\infin","\\infty");k("\\Iota","\\mathrm{I}");k("\\isin","\\in");k("\\Kappa","\\mathrm{K}");k("\\larr","\\leftarrow");k("\\lArr","\\Leftarrow");k("\\Larr","\\Leftarrow");k("\\lrarr","\\leftrightarrow");k("\\lrArr","\\Leftrightarrow");k("\\Lrarr","\\Leftrightarrow");k("\\Mu","\\mathrm{M}");k("\\natnums","\\mathbb{N}");k("\\Nu","\\mathrm{N}");k("\\Omicron","\\mathrm{O}");k("\\plusmn","\\pm");k("\\rarr","\\rightarrow");k("\\rArr","\\Rightarrow");k("\\Rarr","\\Rightarrow");k("\\real","\\Re");k("\\reals","\\mathbb{R}");k("\\Reals","\\mathbb{R}");k("\\Rho","\\mathrm{P}");k("\\sdot","\\cdot");k("\\sect","\\S");k("\\spades","\\spadesuit");k("\\sub","\\subset");k("\\sube","\\subseteq");k("\\supe","\\supseteq");k("\\Tau","\\mathrm{T}");k("\\thetasym","\\vartheta");k("\\weierp","\\wp");k("\\Zeta","\\mathrm{Z}");k("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");k("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");k("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");k("\\bra","\\mathinner{\\langle{#1}|}");k("\\ket","\\mathinner{|{#1}\\rangle}");k("\\braket","\\mathinner{\\langle{#1}\\rangle}");k("\\Bra","\\left\\langle#1\\right|");k("\\Ket","\\left|#1\\right\\rangle");var U2=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.consumeArg().tokens,o=e.macros.get("|"),a=e.macros.get("\\|");e.macros.beginGroup();var l=d=>h=>{t&&(h.macros.set("|",o),i.length&&h.macros.set("\\|",a));var f=d;if(!d&&i.length){var p=h.future();p.text==="|"&&(h.popToken(),f=!0)}return{tokens:f?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var u=e.consumeArg().tokens,c=e.expandTokens([...s,...u,...r]);return e.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};k("\\bra@ket",U2(!1));k("\\bra@set",U2(!0));k("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");k("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");k("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");k("\\angln","{\\angl n}");k("\\blue","\\textcolor{##6495ed}{#1}");k("\\orange","\\textcolor{##ffa500}{#1}");k("\\pink","\\textcolor{##ff00af}{#1}");k("\\red","\\textcolor{##df0030}{#1}");k("\\green","\\textcolor{##28ae7b}{#1}");k("\\gray","\\textcolor{gray}{#1}");k("\\purple","\\textcolor{##9d38bd}{#1}");k("\\blueA","\\textcolor{##ccfaff}{#1}");k("\\blueB","\\textcolor{##80f6ff}{#1}");k("\\blueC","\\textcolor{##63d9ea}{#1}");k("\\blueD","\\textcolor{##11accd}{#1}");k("\\blueE","\\textcolor{##0c7f99}{#1}");k("\\tealA","\\textcolor{##94fff5}{#1}");k("\\tealB","\\textcolor{##26edd5}{#1}");k("\\tealC","\\textcolor{##01d1c1}{#1}");k("\\tealD","\\textcolor{##01a995}{#1}");k("\\tealE","\\textcolor{##208170}{#1}");k("\\greenA","\\textcolor{##b6ffb0}{#1}");k("\\greenB","\\textcolor{##8af281}{#1}");k("\\greenC","\\textcolor{##74cf70}{#1}");k("\\greenD","\\textcolor{##1fab54}{#1}");k("\\greenE","\\textcolor{##0d923f}{#1}");k("\\goldA","\\textcolor{##ffd0a9}{#1}");k("\\goldB","\\textcolor{##ffbb71}{#1}");k("\\goldC","\\textcolor{##ff9c39}{#1}");k("\\goldD","\\textcolor{##e07d10}{#1}");k("\\goldE","\\textcolor{##a75a05}{#1}");k("\\redA","\\textcolor{##fca9a9}{#1}");k("\\redB","\\textcolor{##ff8482}{#1}");k("\\redC","\\textcolor{##f9685d}{#1}");k("\\redD","\\textcolor{##e84d39}{#1}");k("\\redE","\\textcolor{##bc2612}{#1}");k("\\maroonA","\\textcolor{##ffbde0}{#1}");k("\\maroonB","\\textcolor{##ff92c6}{#1}");k("\\maroonC","\\textcolor{##ed5fa6}{#1}");k("\\maroonD","\\textcolor{##ca337c}{#1}");k("\\maroonE","\\textcolor{##9e034e}{#1}");k("\\purpleA","\\textcolor{##ddd7ff}{#1}");k("\\purpleB","\\textcolor{##c6b9fc}{#1}");k("\\purpleC","\\textcolor{##aa87ff}{#1}");k("\\purpleD","\\textcolor{##7854ab}{#1}");k("\\purpleE","\\textcolor{##543b78}{#1}");k("\\mintA","\\textcolor{##f5f9e8}{#1}");k("\\mintB","\\textcolor{##edf2df}{#1}");k("\\mintC","\\textcolor{##e0e5cc}{#1}");k("\\grayA","\\textcolor{##f6f7f7}{#1}");k("\\grayB","\\textcolor{##f0f1f2}{#1}");k("\\grayC","\\textcolor{##e3e5e6}{#1}");k("\\grayD","\\textcolor{##d6d8da}{#1}");k("\\grayE","\\textcolor{##babec2}{#1}");k("\\grayF","\\textcolor{##888d93}{#1}");k("\\grayG","\\textcolor{##626569}{#1}");k("\\grayH","\\textcolor{##3b3e40}{#1}");k("\\grayI","\\textcolor{##21242c}{#1}");k("\\kaBlue","\\textcolor{##314453}{#1}");k("\\kaGreen","\\textcolor{##71B307}{#1}");var K2={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Xx{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new Yx(Zx,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Rf(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new vr("EOF",n.loc)),this.pushTokens(i),new vr("",zt.range(r,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),s,o=0,a=0;do{if(s=this.popToken(),r.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new H("Extra }",s)}else if(s.text==="EOF")throw new H("Unexpected end of input in a macro argument, expected '"+(e&&n?e[a]:"}")+"'",s);if(e&&n)if((o===0||o===1&&e[a]==="{")&&s.text===e[a]){if(++a,a===e.length){r.splice(-a,a);break}}else a=0}while(o!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:s}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new H("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new H("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new H("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var s=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var a=s.length-1;a>=0;--a){var l=s[a];if(l.text==="#"){if(a===0)throw new H("Incomplete placeholder at end of macro body",l);if(l=s[--a],l.text==="#")s.splice(a+1,1);else if(/^[1-9]$/.test(l.text))s.splice(a,2,...o[+l.text-1]);else throw new H("Not a valid argument number",l)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new vr(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var s=0;if(i.indexOf("#")!==-1)for(var o=i.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var a=new Rf(i,this.settings),l=[],u=a.lex();u.text!=="EOF";)l.push(u),u=a.lex();l.reverse();var c={tokens:l,numArgs:s};return c}return i}isDefined(e){return this.macros.has(e)||Rn.hasOwnProperty(e)||Be.math.hasOwnProperty(e)||Be.text.hasOwnProperty(e)||K2.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Rn.hasOwnProperty(e)&&!Rn[e].primitive}}var Ff=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Vo=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Al={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Pf={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class A0{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Xx(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new H("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new vr("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(A0.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&Rn[i.text]&&Rn[i.text].infix)break;var s=this.parseAtom(r);if(s){if(s.type==="internal")continue}else break;n.push(s)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var a=Be[this.mode][r].group,l=zt.range(e),u;if(Hv.hasOwnProperty(a)){var c=a;u={type:"atom",mode:this.mode,family:c,loc:l,text:r}}else u={type:a,mode:this.mode,loc:l,text:r};o=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(r2(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:zt.range(e),text:r};else return null;if(this.consume(),s)for(var d=0;d{o=Math.min(o,l.newRange.from-1,l.oldRange.from-1),a=Math.max(a,l.newRange.to+1,l.oldRange.to+1)});else if(n.selectionSet){const{$from:l,$to:u}=i.selection,{$from:c,$to:d}=t.selection;o=Math.min(l.depth===0?0:l.before(),c.depth===0?0:c.before()),a=Math.max(u.depth===0?a:u.after(),d.depth===0?a:d.after())}return{minFrom:Math.max(o,0),maxTo:Math.min(a,s)}}const ok=t=>{const{regex:e,katexOptions:r={},editor:n,shouldRender:i}=t;return new Ve({key:new Je("mathematics"),state:{init(){return{decorations:void 0,isEditable:void 0}},apply(s,o,a,l){if(!s.docChanged&&!s.selectionSet&&o.decorations)return o;const u=(o.decorations||ze.empty).map(s.mapping,s.doc),{selection:c}=l,d=n.isEditable,h=[],{minFrom:f,maxTo:p}=sk(l,o,d,s,a);l.doc.nodesBetween(f,p,(y,x)=>{const S=i(l,x,y);if(y.isText&&y.text&&S){let M;for(;M=e.exec(y.text);){const w=x+M.index,T=w+M[0].length,D=M.slice(1).find(Boolean);if(D){const O=c.from-c.to,I=c.anchor>=w&&c.anchor<=T,_=c.from>=w&&c.to<=T,$=O===0&&I||_;if(u.find(w,T,z=>$===z.isEditing&&D===z.content&&d===z.isEditable&&r===z.katexOptions).length)continue;h.push(rt.inline(w,T,{class:$&&d?"Tiptap-mathematics-editor":"Tiptap-mathematics-editor Tiptap-mathematics-editor--hidden",style:!$||!d?"display: inline-block; height: 0; opacity: 0; overflow: hidden; position: absolute; width: 0;":void 0},{content:D,isEditable:d,isEditing:$,katexOptions:r})),(!d||!$)&&h.push(rt.widget(w,()=>{const z=document.createElement("span");z.classList.add("Tiptap-mathematics-render"),d&&z.classList.add("Tiptap-mathematics-render--editable");try{ik.render(D,z,r)}catch{z.innerHTML=D}return z},{content:D,isEditable:d,isEditing:$,katexOptions:r}))}}}});const b=h.flatMap(y=>u.find(y.from,y.to));return{decorations:u.remove(b).add(s.doc,h),isEditable:d}}},props:{decorations(s){var o,a;return(a=(o=this.getState(s))===null||o===void 0?void 0:o.decorations)!==null&&a!==void 0?a:ze.empty}}})},ak=(t,e)=>!(t.doc.resolve(e).parent.type.name==="codeBlock");Ke.create({name:"Mathematics",addOptions(){return{regex:/\$([^\$]*)\$/gi,katexOptions:void 0,shouldRender:ak}},addProseMirrorPlugins(){return[ok({...this.options,editor:this.editor})]}});const lk={props:{items:{type:Array,required:!0},command:{type:Function,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:t}){switch(t.key){case"ArrowUp":return this.upHandler(),!0;case"ArrowDown":return this.downHandler(),!0;case"Enter":return this.enterHandler(),!0;default:return!1}},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(t){const e=this.items[t];e&&this.command({id:e.id,label:e.label})}}},uk={class:"items"},ck=["onClick"],dk={key:1,class:"item"};function hk(t,e,r,n,i,s){return U(),Z("div",uk,[r.items.length?(U(!0),Z(ra,{key:0},b1(r.items,(o,a)=>(U(),Z("button",{class:Le(["item",{"is-selected":a===i.selectedIndex}]),key:a,onClick:l=>s.selectItem(a)},Ru(o.label),11,ck))),128)):(U(),Z("div",dk,"No result"))])}const fk=bn(lk,[["render",hk],["__scopeId","data-v-2bd74470"]]),pk={render:()=>{let t,e;return{onStart:r=>{t=new ub(fk,{props:r,editor:r.editor}),r.clientRect&&(e=oo("body",{getReferenceClientRect:r.clientRect,appendTo:()=>wwLib.getFrontDocument().body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(r){t.updateProps(r),r.clientRect&&e[0].setProps({getReferenceClientRect:r.clientRect})},onKeyDown(r){return r.event.key==="Escape"?(e[0].hide(),!0):t.ref&&t.ref.onKeyDown(r)},onExit(){e[0].destroy(),t.destroy()}}}},Hf={};function mk(t){let e=Hf[t];if(e)return e;e=Hf[t]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);e.push(n)}for(let r=0;r=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),s+=6;continue}}if((a&248)===240&&s+91114111?i+="����":(d-=65536,i+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),s+=9;continue}}i+="�"}return i})}es.defaultChars=";/?:@&=+$,#";es.componentChars="";const qf={};function gk(t){let e=qf[t];if(e)return e;e=qf[t]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?e.push(n):e.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r"u"&&(r=!0);const n=gk(e);let i="";for(let s=0,o=t.length;s=55296&&a<=57343){if(a>=55296&&a<=56319&&s+1=56320&&l<=57343){i+=encodeURIComponent(t[s]+t[s+1]),s++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(t[s])}return i}co.defaultChars=";/?:@&=+$,-_.!~*'()#";co.componentChars="-_.!~*'()";function Uc(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function Ya(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const bk=/^([a-z0-9.+-]+:)/i,yk=/:[0-9]*$/,vk=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,xk=["<",">",'"',"`"," ","\r",` `," "],kk=["{","}","|","\\","^","`"].concat(xk),wk=["'"].concat(kk),Vf=["%","/","?",";","#"].concat(wk),$f=["/","?","#"],Sk=255,jf=/^[+a-z0-9A-Z_-]{0,63}$/,Ck=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Wf={javascript:!0,"javascript:":!0},Uf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Kc(t,e){if(t&&t instanceof Ya)return t;const r=new Ya;return r.parse(t,e),r}Ya.prototype.parse=function(t,e){let r,n,i,s=t;if(s=s.trim(),!e&&t.split("#").length===1){const u=vk.exec(s);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let o=bk.exec(s);if(o&&(o=o[0],r=o.toLowerCase(),this.protocol=o,s=s.substr(o.length)),(e||o||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=s.substr(0,2)==="//",i&&!(o&&Wf[o])&&(s=s.substr(2),this.slashes=!0)),!Wf[o]&&(i||o&&!Uf[o])){let u=-1;for(let p=0;p<$f.length;p++)n=s.indexOf($f[p]),n!==-1&&(u===-1||n127?S+="x":S+=x[M];if(!S.match(jf)){const M=p.slice(0,b),w=p.slice(b+1),T=x.match(Ck);T&&(M.push(T[1]),w.unshift(T[2])),w.length&&(s=w.join(".")+s),this.hostname=M.join(".");break}}}}this.hostname.length>Sk&&(this.hostname=""),f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=s.indexOf("#");a!==-1&&(this.hash=s.substr(a),s=s.slice(0,a));const l=s.indexOf("?");return l!==-1&&(this.search=s.substr(l),s=s.slice(0,l)),s&&(this.pathname=s),Uf[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ya.prototype.parseHost=function(t){let e=yk.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const Ak=Object.freeze(Object.defineProperty({__proto__:null,decode:es,encode:co,format:Uc,parse:Kc},Symbol.toStringTag,{value:"Module"})),Y2=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Z2=/[\0-\x1F\x7F-\x9F]/,Mk=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Gc=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,X2=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Q2=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Ek=Object.freeze(Object.defineProperty({__proto__:null,Any:Y2,Cc:Z2,Cf:Mk,P:Gc,S:X2,Z:Q2},Symbol.toStringTag,{value:"Module"})),Tk=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),Dk=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var Ml;const Ok=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Nk=(Ml=String.fromCodePoint)!==null&&Ml!==void 0?Ml:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Lk(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=Ok.get(t))!==null&&e!==void 0?e:t}var lt;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(lt||(lt={}));const _k=32;var In;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(In||(In={}));function Nu(t){return t>=lt.ZERO&&t<=lt.NINE}function zk(t){return t>=lt.UPPER_A&&t<=lt.UPPER_F||t>=lt.LOWER_A&&t<=lt.LOWER_F}function Rk(t){return t>=lt.UPPER_A&&t<=lt.UPPER_Z||t>=lt.LOWER_A&&t<=lt.LOWER_Z||Nu(t)}function Ik(t){return t===lt.EQUALS||Rk(t)}var ot;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(ot||(ot={}));var Nn;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Nn||(Nn={}));class Bk{constructor(e,r,n){this.decodeTree=e,this.emitCodePoint=r,this.errors=n,this.state=ot.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Nn.Strict}startEntity(e){this.decodeMode=e,this.state=ot.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,r){switch(this.state){case ot.EntityStart:return e.charCodeAt(r)===lt.NUM?(this.state=ot.NumericStart,this.consumed+=1,this.stateNumericStart(e,r+1)):(this.state=ot.NamedEntity,this.stateNamedEntity(e,r));case ot.NumericStart:return this.stateNumericStart(e,r);case ot.NumericDecimal:return this.stateNumericDecimal(e,r);case ot.NumericHex:return this.stateNumericHex(e,r);case ot.NamedEntity:return this.stateNamedEntity(e,r)}}stateNumericStart(e,r){return r>=e.length?-1:(e.charCodeAt(r)|_k)===lt.LOWER_X?(this.state=ot.NumericHex,this.consumed+=1,this.stateNumericHex(e,r+1)):(this.state=ot.NumericDecimal,this.stateNumericDecimal(e,r))}addToNumericResult(e,r,n,i){if(r!==n){const s=n-r;this.result=this.result*Math.pow(i,s)+parseInt(e.substr(r,s),i),this.consumed+=s}}stateNumericHex(e,r){const n=r;for(;r>14;for(;r>14,s!==0){if(o===lt.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Nn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:r,decodeTree:n}=this,i=(n[r]&In.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[e]&~In.VALUE_LENGTH:i[e+1],n),r===3&&this.emitCodePoint(i[e+2],n),n}end(){var e;switch(this.state){case ot.NamedEntity:return this.result!==0&&(this.decodeMode!==Nn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ot.NumericDecimal:return this.emitNumericEntity(0,2);case ot.NumericHex:return this.emitNumericEntity(0,3);case ot.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ot.EntityStart:return 0}}}function e4(t){let e="";const r=new Bk(t,n=>e+=Nk(n));return function(i,s){let o=0,a=0;for(;(a=i.indexOf("&",a))>=0;){e+=i.slice(o,a),r.startEntity(s);const u=r.write(i,a+1);if(u<0){o=a+r.end();break}o=a+u,a=u===0?o+1:o}const l=e+i.slice(o);return e="",l}}function Fk(t,e,r,n){const i=(e&In.BRANCH_LENGTH)>>7,s=e&In.JUMP_TABLE;if(i===0)return s!==0&&n===s?r:-1;if(s){const l=n-s;return l<0||l>=i?-1:t[r+l]-1}let o=r,a=o+i-1;for(;o<=a;){const l=o+a>>>1,u=t[l];if(un)a=l-1;else return t[l+i]}return-1}const Pk=e4(Tk);e4(Dk);function t4(t,e=Nn.Legacy){return Pk(t,e)}function Hk(t){return Object.prototype.toString.call(t)}function Jc(t){return Hk(t)==="[object String]"}const qk=Object.prototype.hasOwnProperty;function Vk(t,e){return qk.call(t,e)}function M0(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){t[n]=r[n]})}}),t}function r4(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}function Yc(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function Za(t){if(t>65535){t-=65536;const e=55296+(t>>10),r=56320+(t&1023);return String.fromCharCode(e,r)}return String.fromCharCode(t)}const n4=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,$k=/&([a-z#][a-z0-9]{1,31});/gi,jk=new RegExp(n4.source+"|"+$k.source,"gi"),Wk=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Uk(t,e){if(e.charCodeAt(0)===35&&Wk.test(e)){const n=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Yc(n)?Za(n):t}const r=t4(t);return r!==t?r:t}function Kk(t){return t.indexOf("\\")<0?t:t.replace(n4,"$1")}function ts(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(jk,function(e,r,n){return r||Uk(e,n)})}const Gk=/[&<>"]/,Jk=/[&<>"]/g,Yk={"&":"&","<":"<",">":">",'"':"""};function Zk(t){return Yk[t]}function jn(t){return Gk.test(t)?t.replace(Jk,Zk):t}const Xk=/[.?*+^$[\]\\(){}|-]/g;function Qk(t){return t.replace(Xk,"\\$&")}function Re(t){switch(t){case 9:case 32:return!0}return!1}function Ys(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Zs(t){return Gc.test(t)||X2.test(t)}function Xs(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function E0(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const ew={mdurl:Ak,ucmicro:Ek},tw=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:r4,assign:M0,escapeHtml:jn,escapeRE:Qk,fromCodePoint:Za,has:Vk,isMdAsciiPunct:Xs,isPunctChar:Zs,isSpace:Re,isString:Jc,isValidEntityCode:Yc,isWhiteSpace:Ys,lib:ew,normalizeReference:E0,unescapeAll:ts,unescapeMd:Kk},Symbol.toStringTag,{value:"Module"}));function rw(t,e,r){let n,i,s,o;const a=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos32))return s;if(n===41){if(o===0)break;o--}i++}return e===i||o!==0||(s.str=ts(t.slice(e,i)),s.pos=i,s.ok=!0),s}function iw(t,e,r,n){let i,s=e;const o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)o.str=n.str,o.marker=n.marker;else{if(s>=r)return o;let a=t.charCodeAt(s);if(a!==34&&a!==39&&a!==40)return o;e++,s++,a===40&&(a=41),o.marker=a}for(;s"+jn(s.content)+""};Ur.code_block=function(t,e,r,n,i){const s=t[e];return""+jn(t[e].content)+` `};Ur.fence=function(t,e,r,n,i){const s=t[e],o=s.info?ts(s.info).trim():"";let a="",l="";if(o){const c=o.split(/(\s+)/g);a=c[0],l=c.slice(2).join("")}let u;if(r.highlight?u=r.highlight(s.content,a,l)||jn(s.content):u=jn(s.content),u.indexOf("${u} `}return`
${u}
`};Ur.image=function(t,e,r,n,i){const s=t[e];return s.attrs[s.attrIndex("alt")][1]=i.renderInlineAsText(s.children,r,n),i.renderToken(t,e,r)};Ur.hardbreak=function(t,e,r){return r.xhtmlOut?`
`:`
`};Ur.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?`
`:`
`:` `};Ur.text=function(t,e){return jn(t[e].content)};Ur.html_block=function(t,e){return t[e].content};Ur.html_inline=function(t,e){return t[e].content};function as(){this.rules=M0({},Ur)}as.prototype.renderAttrs=function(e){let r,n,i;if(!e.attrs)return"";for(i="",r=0,n=e.attrs.length;r `:">",s};as.prototype.renderInline=function(t,e,r){let n="";const i=this.rules;for(let s=0,o=t.length;s=0&&(n=this.attrs[r][1]),n};kr.prototype.attrJoin=function(e,r){const n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};function i4(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}i4.prototype.Token=kr;const ow=/\r\n?|\n/g,aw=/\0/g;function lw(t){let e;e=t.src.replace(ow,` `),e=e.replace(aw,"�"),t.src=e}function uw(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function cw(t){const e=t.tokens;for(let r=0,n=e.length;r\s]/i.test(t)}function hw(t){return/^<\/a\s*>/i.test(t)}function fw(t){const e=t.tokens;if(t.md.options.linkify)for(let r=0,n=e.length;r=0;o--){const a=i[o];if(a.type==="link_close"){for(o--;i[o].level!==a.level&&i[o].type!=="link_open";)o--;continue}if(a.type==="html_inline"&&(dw(a.content)&&s>0&&s--,hw(a.content)&&s++),!(s>0)&&a.type==="text"&&t.md.linkify.test(a.content)){const l=a.content;let u=t.md.linkify.match(l);const c=[];let d=a.level,h=0;u.length>0&&u[0].index===0&&o>0&&i[o-1].type==="text_special"&&(u=u.slice(1));for(let f=0;fh){const T=new t.Token("text","",0);T.content=l.slice(h,x),T.level=d,c.push(T)}const S=new t.Token("link_open","a",1);S.attrs=[["href",b]],S.level=d++,S.markup="linkify",S.info="auto",c.push(S);const M=new t.Token("text","",0);M.content=y,M.level=d,c.push(M);const w=new t.Token("link_close","a",-1);w.level=--d,w.markup="linkify",w.info="auto",c.push(w),h=u[f].lastIndex}if(h=0;r--){const n=t[r];n.type==="text"&&!e&&(n.content=n.content.replace(mw,bw)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function vw(t){let e=0;for(let r=t.length-1;r>=0;r--){const n=t[r];n.type==="text"&&!e&&s4.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function xw(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(pw.test(t.tokens[e].content)&&yw(t.tokens[e].children),s4.test(t.tokens[e].content)&&vw(t.tokens[e].children))}const kw=/['"]/,Kf=/['"]/g,Gf="’";function $o(t,e,r){return t.slice(0,e)+r+t.slice(e+1)}function ww(t,e){let r;const n=[];for(let i=0;i=0&&!(n[r].level<=o);r--);if(n.length=r+1,s.type!=="text")continue;let a=s.content,l=0,u=a.length;e:for(;l=0)p=a.charCodeAt(c.index-1);else for(r=i-1;r>=0&&!(t[r].type==="softbreak"||t[r].type==="hardbreak");r--)if(t[r].content){p=t[r].content.charCodeAt(t[r].content.length-1);break}let b=32;if(l=48&&p<=57&&(h=d=!1),d&&h&&(d=y,h=x),!d&&!h){f&&(s.content=$o(s.content,c.index,Gf));continue}if(h)for(r=n.length-1;r>=0;r--){let w=n[r];if(n[r].level=0;e--)t.tokens[e].type!=="inline"||!kw.test(t.tokens[e].content)||ww(t.tokens[e].children,t)}function Cw(t){let e,r;const n=t.tokens,i=n.length;for(let s=0;s0&&this.level++,this.tokens.push(n),n};Kr.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Kr.prototype.skipEmptyLines=function(e){for(let r=this.lineMax;er;)if(!Re(this.src.charCodeAt(--e)))return e+1;return e};Kr.prototype.skipChars=function(e,r){for(let n=this.src.length;en;)if(r!==this.src.charCodeAt(--e))return e+1;return e};Kr.prototype.getLines=function(e,r,n,i){if(e>=r)return"";const s=new Array(r-e);for(let o=0,a=e;an?s[o]=new Array(l-n+1).join(" ")+this.src.slice(c,d):s[o]=this.src.slice(c,d)}return s.join("")};Kr.prototype.Token=kr;const Aw=65536;function Tl(t,e){const r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}function Jf(t){const e=[],r=t.length;let n=0,i=t.charCodeAt(n),s=!1,o=0,a="";for(;nr)return!1;let i=e+1;if(t.sCount[i]=4)return!1;let s=t.bMarks[i]+t.tShift[i];if(s>=t.eMarks[i])return!1;const o=t.src.charCodeAt(s++);if(o!==124&&o!==45&&o!==58||s>=t.eMarks[i])return!1;const a=t.src.charCodeAt(s++);if(a!==124&&a!==45&&a!==58&&!Re(a)||o===45&&Re(a))return!1;for(;s=4)return!1;u=Jf(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const d=u.length;if(d===0||d!==c.length)return!1;if(n)return!0;const h=t.parentType;t.parentType="table";const f=t.md.block.ruler.getRules("blockquote"),p=t.push("table_open","table",1),b=[e,0];p.map=b;const y=t.push("thead_open","thead",1);y.map=[e,e+1];const x=t.push("tr_open","tr",1);x.map=[e,e+1];for(let w=0;w=4||(u=Jf(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),M+=d-u.length,M>Aw))break;if(i===e+2){const D=t.push("tbody_open","tbody",1);D.map=S=[e+2,0]}const T=t.push("tr_open","tr",1);T.map=[i,i+1];for(let D=0;D=4){n++,i=n;continue}break}t.line=i;const s=t.push("code_block","code",0);return s.content=t.getLines(e,i,4+t.blkIndent,!1)+` `,s.map=[e,t.line],!0}function Tw(t,e,r,n){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||i+3>s)return!1;const o=t.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let a=i;i=t.skipChars(i,o);let l=i-a;if(l<3)return!1;const u=t.src.slice(a,i),c=t.src.slice(i,s);if(o===96&&c.indexOf(String.fromCharCode(o))>=0)return!1;if(n)return!0;let d=e,h=!1;for(;d++,!(d>=r||(i=a=t.bMarks[d]+t.tShift[d],s=t.eMarks[d],i=4)&&(i=t.skipChars(i,o),!(i-a=4||t.src.charCodeAt(i)!==62)return!1;if(n)return!0;const a=[],l=[],u=[],c=[],d=t.md.block.ruler.getRules("blockquote"),h=t.parentType;t.parentType="blockquote";let f=!1,p;for(p=e;p=s)break;if(t.src.charCodeAt(i++)===62&&!M){let T=t.sCount[p]+1,D,O;t.src.charCodeAt(i)===32?(i++,T++,O=!1,D=!0):t.src.charCodeAt(i)===9?(D=!0,(t.bsCount[p]+T)%4===3?(i++,T++,O=!1):O=!0):D=!1;let I=T;for(a.push(t.bMarks[p]),t.bMarks[p]=i;i=s,l.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(D?1:0),u.push(t.sCount[p]),t.sCount[p]=I-T,c.push(t.tShift[p]),t.tShift[p]=i-t.bMarks[p];continue}if(f)break;let w=!1;for(let T=0,D=d.length;T";const x=[e,0];y.map=x,t.md.block.tokenize(t,e,p);const S=t.push("blockquote_close","blockquote",-1);S.markup=">",t.lineMax=o,t.parentType=h,x[1]=t.line;for(let M=0;M=4)return!1;let s=t.bMarks[e]+t.tShift[e];const o=t.src.charCodeAt(s++);if(o!==42&&o!==45&&o!==95)return!1;let a=1;for(;s=n)return-1;let s=t.src.charCodeAt(i++);if(s<48||s>57)return-1;for(;;){if(i>=n)return-1;if(s=t.src.charCodeAt(i++),s>=48&&s<=57){if(i-r>=10)return-1;continue}if(s===41||s===46)break;return-1}return i=4||t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(c=!0);let d,h,f;if((f=Zf(t,l))>=0){if(d=!0,o=t.bMarks[l]+t.tShift[l],h=Number(t.src.slice(o,f-1)),c&&h!==1)return!1}else if((f=Yf(t,l))>=0)d=!1;else return!1;if(c&&t.skipSpaces(f)>=t.eMarks[l])return!1;if(n)return!0;const p=t.src.charCodeAt(f-1),b=t.tokens.length;d?(a=t.push("ordered_list_open","ol",1),h!==1&&(a.attrs=[["start",h]])):a=t.push("bullet_list_open","ul",1);const y=[l,0];a.map=y,a.markup=String.fromCharCode(p);let x=!1;const S=t.md.block.ruler.getRules("list"),M=t.parentType;for(t.parentType="list";l=i?O=1:O=T-w,O>4&&(O=1);const I=w+O;a=t.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const _=[l,0];a.map=_,d&&(a.info=t.src.slice(o,f-1));const $=t.tight,z=t.tShift[l],j=t.sCount[l],G=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=I,t.tight=!0,t.tShift[l]=D-t.bMarks[l],t.sCount[l]=T,D>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,l,r,!0),(!t.tight||x)&&(u=!1),x=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=G,t.tShift[l]=z,t.sCount[l]=j,t.tight=$,a=t.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),l=t.line,_[1]=l,l>=r||t.sCount[l]=4)break;let ce=!1;for(let le=0,Q=S.length;le=4||t.src.charCodeAt(i)!==91)return!1;function a(S){const M=t.lineMax;if(S>=M||t.isEmpty(S))return null;let w=!1;if(t.sCount[S]-t.blkIndent>3&&(w=!0),t.sCount[S]<0&&(w=!0),!w){const O=t.md.block.ruler.getRules("reference"),I=t.parentType;t.parentType="reference";let _=!1;for(let $=0,z=O.length;$"u"&&(t.env.references={}),typeof t.env.references[x]>"u"&&(t.env.references[x]={title:y,href:d}),t.line=o),!0):!1}const zw=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Rw="[a-zA-Z_:][a-zA-Z0-9:._-]*",Iw="[^\"'=<>`\\x00-\\x20]+",Bw="'[^']*'",Fw='"[^"]*"',Pw="(?:"+Iw+"|"+Bw+"|"+Fw+")",Hw="(?:\\s+"+Rw+"(?:\\s*=\\s*"+Pw+")?)",o4="<[A-Za-z][A-Za-z0-9\\-]*"+Hw+"*\\s*\\/?>",a4="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",qw="",Vw="<[?][\\s\\S]*?[?]>",$w="]*>",jw="",Ww=new RegExp("^(?:"+o4+"|"+a4+"|"+qw+"|"+Vw+"|"+$w+"|"+jw+")"),Uw=new RegExp("^(?:"+o4+"|"+a4+")"),Oi=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Uw.source+"\\s*$"),/^$/,!1]];function Kw(t,e,r,n){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(i)!==60)return!1;let o=t.src.slice(i,s),a=0;for(;a=4)return!1;let o=t.src.charCodeAt(i);if(o!==35||i>=s)return!1;let a=1;for(o=t.src.charCodeAt(++i);o===35&&i6||ii&&Re(t.src.charCodeAt(l-1))&&(s=l),t.line=e+1;const u=t.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[e,t.line];const c=t.push("inline","",0);c.content=t.src.slice(i,s).trim(),c.map=[e,t.line],c.children=[];const d=t.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function Jw(t,e,r){const n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const i=t.parentType;t.parentType="paragraph";let s=0,o,a=e+1;for(;a3)continue;if(t.sCount[a]>=t.blkIndent){let f=t.bMarks[a]+t.tShift[a];const p=t.eMarks[a];if(f=p))){s=o===61?1:2;break}}if(t.sCount[a]<0)continue;let h=!1;for(let f=0,p=n.length;f3||t.sCount[s]<0)continue;let u=!1;for(let c=0,d=n.length;c=r||t.sCount[o]=s){t.line=r;break}const l=t.line;let u=!1;for(let c=0;c=t.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");t.tight=!a,t.isEmpty(t.line-1)&&(a=!0),o=t.line,o0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n};ho.prototype.scanDelims=function(t,e){const r=this.posMax,n=this.src.charCodeAt(t),i=t>0?this.src.charCodeAt(t-1):32;let s=t;for(;s0)return!1;const r=t.pos,n=t.posMax;if(r+3>n||t.src.charCodeAt(r)!==58||t.src.charCodeAt(r+1)!==47||t.src.charCodeAt(r+2)!==47)return!1;const i=t.pending.match(Qw);if(!i)return!1;const s=i[1],o=t.md.linkify.matchAtStart(t.src.slice(r-s.length));if(!o)return!1;let a=o.url;if(a.length<=s.length)return!1;a=a.replace(/\*+$/,"");const l=t.md.normalizeLink(a);if(!t.md.validateLink(l))return!1;if(!e){t.pending=t.pending.slice(0,-s.length);const u=t.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";const c=t.push("text","",0);c.content=t.md.normalizeLinkText(a);const d=t.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return t.pos+=a.length-s.length,!0}function tS(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==10)return!1;const n=t.pending.length-1,i=t.posMax;if(!e)if(n>=0&&t.pending.charCodeAt(n)===32)if(n>=1&&t.pending.charCodeAt(n-1)===32){let s=n-1;for(;s>=1&&t.pending.charCodeAt(s-1)===32;)s--;t.pending=t.pending.slice(0,s),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r?@[]^_`{|}~-".split("").forEach(function(t){Xc[t.charCodeAt(0)]=1});function rS(t,e){let r=t.pos;const n=t.posMax;if(t.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let i=t.src.charCodeAt(r);if(i===10){for(e||t.push("hardbreak","br",0),r++;r=55296&&i<=56319&&r+1=56320&&a<=57343&&(s+=t.src[r+1],r++)}const o="\\"+s;if(!e){const a=t.push("text_special","",0);i<256&&Xc[i]!==0?a.content=s:a.content=o,a.markup=o,a.info="escape"}return t.pos=r+1,!0}function nS(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==96)return!1;const i=r;r++;const s=t.posMax;for(;r=0;n--){const i=e[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const s=e[i.end],o=n>0&&e[n-1].end===i.end+1&&e[n-1].marker===i.marker&&e[n-1].token===i.token-1&&e[i.end+1].token===s.token+1,a=String.fromCharCode(i.marker),l=t.tokens[i.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?a+a:a,l.content="";const u=t.tokens[s.token];u.type=o?"strong_close":"em_close",u.tag=o?"strong":"em",u.nesting=-1,u.markup=o?a+a:a,u.content="",o&&(t.tokens[e[n-1].token].content="",t.tokens[e[i.end+1].token].content="",n--)}}function aS(t){const e=t.tokens_meta,r=t.tokens_meta.length;Qf(t,t.delimiters);for(let n=0;n=d)return!1;if(l=p,i=t.md.helpers.parseLinkDestination(t.src,p,t.posMax),i.ok){for(o=t.md.normalizeLink(i.str),t.md.validateLink(o)?p=i.pos:o="",l=p;p=d||t.src.charCodeAt(p)!==41)&&(u=!0),p++}if(u){if(typeof t.env.references>"u")return!1;if(p=0?n=t.src.slice(l,p++):p=f+1):p=f+1,n||(n=t.src.slice(h,f)),s=t.env.references[E0(n)],!s)return t.pos=c,!1;o=s.href,a=s.title}if(!e){t.pos=h,t.posMax=f;const b=t.push("link_open","a",1),y=[["href",o]];b.attrs=y,a&&y.push(["title",a]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=p,t.posMax=d,!0}function uS(t,e){let r,n,i,s,o,a,l,u,c="";const d=t.pos,h=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;const f=t.pos+2,p=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(p<0)return!1;if(s=p+1,s=h)return!1;for(u=s,a=t.md.helpers.parseLinkDestination(t.src,s,t.posMax),a.ok&&(c=t.md.normalizeLink(a.str),t.md.validateLink(c)?s=a.pos:c=""),u=s;s=h||t.src.charCodeAt(s)!==41)return t.pos=d,!1;s++}else{if(typeof t.env.references>"u")return!1;if(s=0?i=t.src.slice(u,s++):s=p+1):s=p+1,i||(i=t.src.slice(f,p)),o=t.env.references[E0(i)],!o)return t.pos=d,!1;c=o.href,l=o.title}if(!e){n=t.src.slice(f,p);const b=[];t.md.inline.parse(n,t.md,t.env,b);const y=t.push("image","img",0),x=[["src",c],["alt",""]];y.attrs=x,y.children=b,y.content=n,l&&x.push(["title",l])}return t.pos=s,t.posMax=h,!0}const cS=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,dS=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function hS(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==60)return!1;const n=t.pos,i=t.posMax;for(;;){if(++r>=i)return!1;const o=t.src.charCodeAt(r);if(o===60)return!1;if(o===62)break}const s=t.src.slice(n+1,r);if(dS.test(s)){const o=t.md.normalizeLink(s);if(!t.md.validateLink(o))return!1;if(!e){const a=t.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const l=t.push("text","",0);l.content=t.md.normalizeLinkText(s);const u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=s.length+2,!0}if(cS.test(s)){const o=t.md.normalizeLink("mailto:"+s);if(!t.md.validateLink(o))return!1;if(!e){const a=t.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const l=t.push("text","",0);l.content=t.md.normalizeLinkText(s);const u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=s.length+2,!0}return!1}function fS(t){return/^\s]/i.test(t)}function pS(t){return/^<\/a\s*>/i.test(t)}function mS(t){const e=t|32;return e>=97&&e<=122}function gS(t,e){if(!t.md.options.html)return!1;const r=t.posMax,n=t.pos;if(t.src.charCodeAt(n)!==60||n+2>=r)return!1;const i=t.src.charCodeAt(n+1);if(i!==33&&i!==63&&i!==47&&!mS(i))return!1;const s=t.src.slice(n).match(Ww);if(!s)return!1;if(!e){const o=t.push("html_inline","",0);o.content=s[0],fS(o.content)&&t.linkLevel++,pS(o.content)&&t.linkLevel--}return t.pos+=s[0].length,!0}const bS=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,yS=/^&([a-z][a-z0-9]{1,31});/i;function vS(t,e){const r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==38||r+1>=n)return!1;if(t.src.charCodeAt(r+1)===35){const s=t.src.slice(r).match(bS);if(s){if(!e){const o=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),a=t.push("text_special","",0);a.content=Yc(o)?Za(o):Za(65533),a.markup=s[0],a.info="entity"}return t.pos+=s[0].length,!0}}else{const s=t.src.slice(r).match(yS);if(s){const o=t4(s[0]);if(o!==s[0]){if(!e){const a=t.push("text_special","",0);a.content=o,a.markup=s[0],a.info="entity"}return t.pos+=s[0].length,!0}}}return!1}function e1(t){const e={},r=t.length;if(!r)return;let n=0,i=-2;const s=[];for(let o=0;ol;u-=s[u]+1){const d=t[u];if(d.marker===a.marker&&d.open&&d.end<0){let h=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(h=!0),!h){const f=u>0&&!t[u-1].open?s[u-1]+1:0;s[o]=o-u+f,s[u]=f,a.open=!1,d.end=o,d.close=!1,c=-1,i=-2;break}}}c!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function xS(t){const e=t.tokens_meta,r=t.tokens_meta.length;e1(t.delimiters);for(let n=0;n0&&n++,i[e].type==="text"&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;o||t.pos++,s[e]=t.pos};fo.prototype.tokenize=function(t){const e=this.ruler.getRules(""),r=e.length,n=t.posMax,i=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(o){if(t.pos>=n)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};fo.prototype.parse=function(t,e,r,n){const i=new this.State(t,e,r,n);this.tokenize(i);const s=this.ruler2.getRules(""),o=s.length;for(let a=0;a|$))",e.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function Lu(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){t[n]=r[n]})}),t}function D0(t){return Object.prototype.toString.call(t)}function SS(t){return D0(t)==="[object String]"}function CS(t){return D0(t)==="[object Object]"}function AS(t){return D0(t)==="[object RegExp]"}function t1(t){return D0(t)==="[object Function]"}function MS(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const c4={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function ES(t){return Object.keys(t||{}).reduce(function(e,r){return e||c4.hasOwnProperty(r)},!1)}const TS={"http:":{validate:function(t,e,r){const n=t.slice(e);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,r){const n=t.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){const n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},DS="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",OS="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function NS(t){t.__index__=-1,t.__text_cache__=""}function LS(t){return function(e,r){const n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}function r1(){return function(t,e){e.normalize(t)}}function Xa(t){const e=t.re=wS(t.__opts__),r=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||r.push(DS),r.push(e.src_xn),e.src_tlds=r.join("|");function n(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const i=[];t.__compiled__={};function s(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(t.__schemas__).forEach(function(a){const l=t.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(t.__compiled__[a]=u,CS(l)){AS(l.validate)?u.validate=LS(l.validate):t1(l.validate)?u.validate=l.validate:s(a,l),t1(l.normalize)?u.normalize=l.normalize:l.normalize?s(a,l):u.normalize=r1();return}if(SS(l)){i.push(a);return}s(a,l)}),i.forEach(function(a){t.__compiled__[t.__schemas__[a]]&&(t.__compiled__[a].validate=t.__compiled__[t.__schemas__[a]].validate,t.__compiled__[a].normalize=t.__compiled__[t.__schemas__[a]].normalize)}),t.__compiled__[""]={validate:null,normalize:r1()};const o=Object.keys(t.__compiled__).filter(function(a){return a.length>0&&t.__compiled__[a]}).map(MS).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+o+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+o+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),NS(t)}function _S(t,e){const r=t.__index__,n=t.__last_index__,i=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=i,this.text=i,this.url=i}function _u(t,e){const r=new _S(t,e);return t.__compiled__[r.schema].normalize(r,t),r}function Gt(t,e){if(!(this instanceof Gt))return new Gt(t,e);e||ES(t)&&(e=t,t={}),this.__opts__=Lu({},c4,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Lu({},TS,t),this.__compiled__={},this.__tlds__=OS,this.__tlds_replaced__=!1,this.re={},Xa(this)}Gt.prototype.add=function(e,r){return this.__schemas__[e]=r,Xa(this),this};Gt.prototype.set=function(e){return this.__opts__=Lu(this.__opts__,e),this};Gt.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let r,n,i,s,o,a,l,u,c;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(r=l.exec(e))!==null;)if(s=this.testSchemaAt(e,r[2],l.lastIndex),s){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(i=e.match(this.re.email_fuzzy))!==null&&(o=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0};Gt.prototype.pretest=function(e){return this.re.pretest.test(e)};Gt.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0};Gt.prototype.match=function(e){const r=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(r.push(_u(this,n)),n=this.__last_index__);let i=n?e.slice(n):e;for(;this.test(i);)r.push(_u(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};Gt.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const r=this.re.schema_at_start.exec(e);if(!r)return null;const n=this.testSchemaAt(e,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,_u(this,0)):null};Gt.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,i,s){return n!==s[i-1]}).reverse(),Xa(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Xa(this),this)};Gt.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};Gt.prototype.onCompile=function(){};const qi=2147483647,Rr=36,Qc=1,Qs=26,zS=38,RS=700,d4=72,h4=128,f4="-",IS=/^xn--/,BS=/[^\0-\x7F]/,FS=/[\x2E\u3002\uFF0E\uFF61]/g,PS={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Nl=Rr-Qc,Ir=Math.floor,Ll=String.fromCharCode;function En(t){throw new RangeError(PS[t])}function HS(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}function p4(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(FS,".");const i=t.split("."),s=HS(i,e).join(".");return n+s}function m4(t){const e=[];let r=0;const n=t.length;for(;r=55296&&i<=56319&&rString.fromCodePoint(...t),VS=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:Rr},n1=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},g4=function(t,e,r){let n=0;for(t=r?Ir(t/RS):t>>1,t+=Ir(t/e);t>Nl*Qs>>1;n+=Rr)t=Ir(t/Nl);return Ir(n+(Nl+1)*t/(t+zS))},b4=function(t){const e=[],r=t.length;let n=0,i=h4,s=d4,o=t.lastIndexOf(f4);o<0&&(o=0);for(let a=0;a=128&&En("not-basic"),e.push(t.charCodeAt(a));for(let a=o>0?o+1:0;a=r&&En("invalid-input");const h=VS(t.charCodeAt(a++));h>=Rr&&En("invalid-input"),h>Ir((qi-n)/c)&&En("overflow"),n+=h*c;const f=d<=s?Qc:d>=s+Qs?Qs:d-s;if(hIr(qi/p)&&En("overflow"),c*=p}const u=e.length+1;s=g4(n-l,u,l==0),Ir(n/u)>qi-i&&En("overflow"),i+=Ir(n/u),n%=u,e.splice(n++,0,i)}return String.fromCodePoint(...e)},y4=function(t){const e=[];t=m4(t);const r=t.length;let n=h4,i=0,s=d4;for(const l of t)l<128&&e.push(Ll(l));const o=e.length;let a=o;for(o&&e.push(f4);a=n&&cIr((qi-i)/u)&&En("overflow"),i+=(l-n)*u,n=l;for(const c of t)if(cqi&&En("overflow"),c===n){let d=i;for(let h=Rr;;h+=Rr){const f=h<=s?Qc:h>=s+Qs?Qs:h-s;if(d=0))try{e.hostname=v4.toASCII(e.hostname)}catch{}return co(Uc(e))}function QS(t){const e=Kc(t,!0);if(e.hostname&&(!e.protocol||x4.indexOf(e.protocol)>=0))try{e.hostname=v4.toUnicode(e.hostname)}catch{}return es(Uc(e),es.defaultChars+"%")}function Ht(t,e){if(!(this instanceof Ht))return new Ht(t,e);e||Jc(t)||(e=t||{},t="default"),this.inline=new fo,this.block=new T0,this.core=new Zc,this.renderer=new as,this.linkify=new Gt,this.validateLink=ZS,this.normalizeLink=XS,this.normalizeLinkText=QS,this.utils=tw,this.helpers=M0({},sw),this.options={},this.configure(t),e&&this.set(e)}Ht.prototype.set=function(t){return M0(this.options,t),this};Ht.prototype.configure=function(t){const e=this;if(Jc(t)){const r=t;if(t=GS[r],!t)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)}),this};Ht.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(t,!0))},this),r=r.concat(this.inline.ruler2.enable(t,!0));const n=t.filter(function(i){return r.indexOf(i)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};Ht.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(t,!0))},this),r=r.concat(this.inline.ruler2.disable(t,!0));const n=t.filter(function(i){return r.indexOf(i)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};Ht.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};Ht.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");const r=new this.core.State(t,this,e);return this.core.process(r),r.tokens};Ht.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};Ht.prototype.parseInline=function(t,e){const r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens};Ht.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const eC=new Iu({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(t){return["h"+t.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>({params:t.getAttribute("data-params")||""})}],toDOM(t){return["pre",t.attrs.params?{"data-params":t.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1,tight:t.hasAttribute("data-tight")}}}],toDOM(t){return["ol",{start:t.attrs.order==1?null:t.attrs.order,"data-tight":t.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:t=>({tight:t.hasAttribute("data-tight")})}],toDOM(t){return["ul",{"data-tight":t.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(t){return{src:t.getAttribute("src"),title:t.getAttribute("title"),alt:t.getAttribute("alt")}}}],toDOM(t){return["img",t.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:t=>t.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name=="strong"},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(t){return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM(t){return["a",t.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function tC(t,e){if(t.isText&&e.isText&&we.sameSet(t.marks,e.marks))return t.withText(t.text+e.text)}class rC{constructor(e,r){this.schema=e,this.tokenHandlers=r,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:we.none}]}top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return;let r=this.top(),n=r.content,i=n[n.length-1],s=this.schema.text(e,r.marks),o;i&&(o=tC(i,s))?n[n.length-1]=o:n.push(s)}openMark(e){let r=this.top();r.marks=e.addToSet(r.marks)}closeMark(e){let r=this.top();r.marks=e.removeFromSet(r.marks)}parseTokens(e){for(let r=0;r{o.openNode(s,ds(i,a,l,u)),o.addText(i1(a.content)),o.closeNode()}:(r[n+"_open"]=(o,a,l,u)=>o.openNode(s,ds(i,a,l,u)),r[n+"_close"]=o=>o.closeNode())}else if(i.node){let s=t.nodeType(i.node);r[n]=(o,a,l,u)=>o.addNode(s,ds(i,a,l,u))}else if(i.mark){let s=t.marks[i.mark];_l(i,n)?r[n]=(o,a,l,u)=>{o.openMark(s.create(ds(i,a,l,u))),o.addText(i1(a.content)),o.closeMark(s)}:(r[n+"_open"]=(o,a,l,u)=>o.openMark(s.create(ds(i,a,l,u))),r[n+"_close"]=o=>o.closeMark(s))}else if(i.ignore)_l(i,n)?r[n]=zl:(r[n+"_open"]=zl,r[n+"_close"]=zl);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(i))}return r.text=(n,i)=>n.addText(i.content),r.inline=(n,i)=>n.parseTokens(i.children),r.softbreak=r.softbreak||(n=>n.addText(" ")),r}let iC=class{constructor(e,r,n){this.schema=e,this.tokenizer=r,this.tokens=n,this.tokenHandlers=nC(e,n)}parse(e,r={}){let n=new rC(this.schema,this.tokenHandlers),i;n.parseTokens(this.tokenizer.parse(e,r));do i=n.closeNode();while(n.stack.length);return i||this.schema.topNodeType.createAndFill()}};function s1(t,e){for(;++e({tight:s1(e,r)})},ordered_list:{block:"ordered_list",getAttrs:(t,e,r)=>({order:+t.attrGet("start")||1,tight:s1(e,r)})},heading:{block:"heading",getAttrs:t=>({level:+t.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:t=>({params:t.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:t=>({src:t.attrGet("src"),title:t.attrGet("title")||null,alt:t.children[0]&&t.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:t=>({href:t.attrGet("href"),title:t.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});const sC={open:"",close:"",mixable:!0};let oC=class{constructor(e,r,n={}){this.nodes=e,this.marks=r,this.options=n}serialize(e,r={}){r=Object.assign({},this.options,r);let n=new k4(this.nodes,this.marks,r);return n.renderContent(e),n.out}};const Gr=new oC({blockquote(t,e){t.wrapBlock("> ",null,e,()=>t.renderContent(e))},code_block(t,e){const r=e.textContent.match(/`{3,}/gm),n=r?r.sort().slice(-1)[0]+"`":"```";t.write(n+(e.attrs.params||"")+` `),t.text(e.textContent,!1),t.write(` `),t.write(n),t.closeBlock(e)},heading(t,e){t.write(t.repeat("#",e.attrs.level)+" "),t.renderInline(e,!1),t.closeBlock(e)},horizontal_rule(t,e){t.write(e.attrs.markup||"---"),t.closeBlock(e)},bullet_list(t,e){t.renderList(e," ",()=>(e.attrs.bullet||"*")+" ")},ordered_list(t,e){let r=e.attrs.order||1,n=String(r+e.childCount-1).length,i=t.repeat(" ",n+2);t.renderList(e,i,s=>{let o=String(r+s);return t.repeat(" ",n-o.length)+o+". "})},list_item(t,e){t.renderContent(e)},paragraph(t,e){t.renderInline(e),t.closeBlock(e)},image(t,e){t.write("!["+t.esc(e.attrs.alt||"")+"]("+e.attrs.src.replace(/[\(\)]/g,"\\$&")+(e.attrs.title?' "'+e.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(t,e,r,n){for(let i=n+1;i":"]("+e.attrs.href.replace(/[\(\)"]/g,"\\$&")+(e.attrs.title?` "${e.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(t,e,r,n){return o1(r.child(n),-1)},close(t,e,r,n){return o1(r.child(n-1),1)},escape:!1}});function o1(t,e){let r=/`+/g,n,i=0;if(t.isText)for(;n=r.exec(t.text);)i=Math.max(i,n[0].length);let s=i>0&&e>0?" `":"`";for(let o=0;o0&&e<0&&(s+=" "),s}function aC(t,e,r){if(t.attrs.title||!/^\w+:/.test(t.attrs.href))return!1;let n=e.child(r);return!n.isText||n.text!=t.attrs.href||n.marks[n.marks.length-1]!=t?!1:r==e.childCount-1||!t.isInSet(e.child(r+1).marks)}let k4=class{constructor(e,r,n){this.nodes=e,this.marks=r,this.options=n,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(e=2){if(this.closed){if(this.atBlank()||(this.out+=` `),e>1){let r=this.delim,n=/\s+$/.exec(r);n&&(r=r.slice(0,r.length-n[0].length));for(let i=1;ithis.render(r,e,i))}renderInline(e,r=!0){this.atBlockStart=r;let n=[],i="",s=(o,a,l)=>{let u=o?o.marks:[];o&&o.type.name===this.options.hardBreakNodeName&&(u=u.filter(b=>{if(l+1==e.childCount)return!1;let y=e.child(l+1);return b.isInSet(y.marks)&&(!y.isText||/\S/.test(y.text))}));let c=i;if(i="",o&&o.isText&&u.some(b=>{let y=this.getMark(b.type.name);return y&&y.expelEnclosingWhitespace&&!b.isInSet(n)})){let[b,y,x]=/^(\s*)(.*)$/m.exec(o.text);y&&(c+=y,o=x?o.withText(x):null,o||(u=n))}if(o&&o.isText&&u.some(b=>{let y=this.getMark(b.type.name);return y&&y.expelEnclosingWhitespace&&(l==e.childCount-1||!b.isInSet(e.child(l+1).marks))})){let[b,y,x]=/^(.*?)(\s*)$/m.exec(o.text);x&&(i=x,o=y?o.withText(y):null,o||(u=n))}let d=u.length?u[u.length-1]:null,h=d&&this.getMark(d.type.name).escape===!1,f=u.length-(h?1:0);e:for(let b=0;bx?u=u.slice(0,x).concat(y).concat(u.slice(x,b)).concat(u.slice(b+1,f)):x>b&&(u=u.slice(0,b).concat(u.slice(b+1,x)).concat(y).concat(u.slice(x,f)));continue e}}}let p=0;for(;p0&&(this.atBlockStart=!1)};e.forEach(s),s(null,0,e.childCount),this.atBlockStart=!1}renderList(e,r,n){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let i=typeof e.attrs.tight<"u"?e.attrs.tight:this.options.tightLists,s=this.inTightList;this.inTightList=i,e.forEach((o,a,l)=>{l&&i&&this.flushClose(1),this.wrapBlock(r,n(l),e,()=>this.render(o,e,l))}),this.inTightList=s}esc(e,r=!1){return e=e.replace(/[`*\\~\[\]_]/g,(n,i)=>n=="_"&&i>0&&i+1])/,"\\$&").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 r=e.indexOf('"')==-1?'""':e.indexOf("'")==-1?"''":"()";return r[0]+e+r[1]}repeat(e,r){let n="";for(let i=0;i=0;S--)if(b[S].level===x)return S;return-1}function s(b,y){return d(b[y])&&h(b[y-1])&&f(b[y-2])&&p(b[y])}function o(b,y){if(b.children.unshift(a(b,y)),b.children[1].content=b.children[1].content.slice(3),b.content=b.content.slice(3),e)if(r){b.children.pop();var x="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);b.children[0].content=b.children[0].content.slice(0,-1)+' id="'+x+'">',b.children.push(c(b.content,x,y))}else b.children.unshift(l(y)),b.children.push(u(y))}function a(b,y){var x=new y("html_inline","",0),S=t?' disabled="" ':"";return b.content.indexOf("[ ] ")===0?x.content='':(b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0)&&(x.content=''),x}function l(b){var y=new b("html_inline","",0);return y.content="",y}function c(b,y,x){var S=new x("html_inline","",0);return S.content='",S.attrs=[{for:y}],S}function d(b){return b.type==="inline"}function h(b){return b.type==="paragraph_open"}function f(b){return b.type==="list_item_open"}function p(b){return b.content.indexOf("[ ] ")===0||b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0}return Rl}var uC=lC();const cC=L4(uC);var dC=Object.defineProperty,hC=(t,e,r)=>e in t?dC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Qa=(t,e,r)=>(hC(t,typeof e!="symbol"?e+"":e,r),r);const fC=Ke.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:t=>t.getAttribute("data-tight")==="true"||!t.querySelector("p"),renderHTML:t=>({class:t.tight?this.options.tightClass:null,"data-tight":t.tight?"true":null})}}}]},addCommands(){var t=this;return{toggleTight:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return r=>{let{editor:n,commands:i}=r;function s(o){if(!n.isActive(o))return!1;const a=n.getAttributes(o);return i.updateAttributes(o,{tight:e??!(a!=null&&a.tight)})}return t.options.listTypes.some(o=>s(o))}}}}}),l1=Ht();function w4(t,e){return l1.inline.State.prototype.scanDelims.call({src:t,posMax:t.length}),new l1.inline.State(t,null,null,[]).scanDelims(e,!0)}function S4(t,e,r,n){let i=t.substring(0,r)+t.substring(r+e.length);return i=i.substring(0,r+n)+e+i.substring(r+n),i}function pC(t,e,r,n){let i=r,s=t;for(;ir&&!w4(s,i).can_close;)s=S4(s,e,i,-1),i--;return{text:s,from:r,to:i}}function gC(t,e,r,n){let i={text:t,from:r,to:n};return i=pC(i.text,e,i.from,i.to),i=mC(i.text,e,i.from,i.to),i.to-i.from) (<\/.*?>)$/);return i?[i[1],i[2]]:null}function ed(t){const e=`${t}`;return new window.DOMParser().parseFromString(e,"text/html").body}function yC(t){return t==null?void 0:t.replace(//g,">")}function vC(t){const e=t.parentElement,r=e.cloneNode();for(;e.firstChild&&e.firstChild!==t;)r.appendChild(e.firstChild);r.childNodes.length>0&&e.parentElement.insertBefore(r,e),e.parentElement.insertBefore(t,e),e.childNodes.length===0&&e.remove()}function xC(t){const e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}const O0=ye.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(t,e,r){this.editor.storage.markdown.options.html?t.write(kC(e,r)):(console.warn(`Tiptap Markdown: "${e.type.name}" node is only available in html mode`),t.write(`[${e.type.name}]`)),e.isBlock&&t.closeBlock(e)},parse:{}}}}});function kC(t,e){const r=t.type.schema,n=no(R.from(t),r);return t.isBlock&&(e instanceof R||e.type.name===r.topNodeType.name)?wC(n):n}function wC(t){const r=ed(t).firstElementChild;return r.innerHTML=r.innerHTML.trim()?` ${r.innerHTML} `:` `,r.outerHTML}const SC=ye.create({name:"blockquote"}),CC=SC.extend({addStorage(){return{markdown:{serialize:Gr.nodes.blockquote,parse:{}}}}}),AC=ye.create({name:"bulletList"}),A4=AC.extend({addStorage(){return{markdown:{serialize(t,e){return t.renderList(e," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),MC=ye.create({name:"codeBlock"}),EC=MC.extend({addStorage(){return{markdown:{serialize(t,e){t.write("```"+(e.attrs.language||"")+` `),t.text(e.textContent,!1),t.ensureNewLine(),t.write("```"),t.closeBlock(e)},parse:{setup(t){var e;t.set({langPrefix:(e=this.options.languageClassPrefix)!==null&&e!==void 0?e:"language-"})},updateDOM(t){t.innerHTML=t.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}}}}),TC=ye.create({name:"hardBreak"}),M4=TC.extend({addStorage(){return{markdown:{serialize(t,e,r,n){for(let i=n+1;i0&&e.child(r-n-1).type.name===t.type.name;n++);return n}const PC=BC.extend({addStorage(){return{markdown:{serialize(t,e,r,n){const i=e.attrs.start||1,s=String(i+e.childCount-1).length,o=t.repeat(" ",s+2),l=FC(e,r,n)%2?") ":". ";t.renderList(e,o,u=>{const c=String(i+u);return t.repeat(" ",s-c.length)+c+l})},parse:{}}}}}),HC=ye.create({name:"paragraph"}),qC=HC.extend({addStorage(){return{markdown:{serialize:Gr.nodes.paragraph,parse:{}}}}});function Il(t){var e,r;return(e=t==null||(r=t.content)===null||r===void 0?void 0:r.content)!==null&&e!==void 0?e:[]}const VC=ye.create({name:"table"}),$C=VC.extend({addStorage(){return{markdown:{serialize(t,e,r){if(!jC(e)){O0.storage.markdown.serialize.call(this,t,e,r);return}t.inTable=!0,e.forEach((n,i,s)=>{if(t.write("| "),n.forEach((o,a,l)=>{l&&t.write(" | ");const u=o.firstChild;u.textContent.trim()&&t.renderInline(u)}),t.write(" |"),t.ensureNewLine(),!s){const o=Array.from({length:n.childCount}).map(()=>"---").join(" | ");t.write(`| ${o} |`),t.ensureNewLine()}}),t.closeBlock(e),t.inTable=!1},parse:{}}}}});function c1(t){return t.attrs.colspan>1||t.attrs.rowspan>1}function jC(t){const e=Il(t),r=e[0],n=e.slice(1);return!(Il(r).some(i=>i.type.name!=="tableHeader"||c1(i)||i.childCount>1)||n.some(i=>Il(i).some(s=>s.type.name==="tableHeader"||c1(s)||s.childCount>1)))}const WC=ye.create({name:"taskItem"}),UC=WC.extend({addStorage(){return{markdown:{serialize(t,e){const r=e.attrs.checked?"[x]":"[ ]";t.write(`${r} `),t.renderContent(e)},parse:{updateDOM(t){[...t.querySelectorAll(".task-list-item")].forEach(e=>{const r=e.querySelector("input");e.setAttribute("data-type","taskItem"),r&&(e.setAttribute("data-checked",r.checked),r.remove())})}}}}}}),KC=ye.create({name:"taskList"}),GC=KC.extend({addStorage(){return{markdown:{serialize:A4.storage.markdown.serialize,parse:{setup(t){t.use(cC)},updateDOM(t){[...t.querySelectorAll(".contains-task-list")].forEach(e=>{e.setAttribute("data-type","taskList")})}}}}}}),JC=ye.create({name:"text"}),YC=JC.extend({addStorage(){return{markdown:{serialize(t,e){t.text(yC(e.text))},parse:{}}}}}),ZC=mt.create({name:"bold"}),XC=ZC.extend({addStorage(){return{markdown:{serialize:Gr.marks.strong,parse:{}}}}}),QC=mt.create({name:"code"}),eA=QC.extend({addStorage(){return{markdown:{serialize:Gr.marks.code,parse:{}}}}}),tA=mt.create({name:"italic"}),rA=tA.extend({addStorage(){return{markdown:{serialize:Gr.marks.em,parse:{}}}}}),nA=mt.create({name:"link"}),iA=nA.extend({addStorage(){return{markdown:{serialize:Gr.marks.link,parse:{}}}}}),sA=mt.create({name:"strike"}),oA=sA.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),aA=[CC,A4,EC,M4,OC,LC,O0,zC,IC,PC,qC,$C,UC,GC,YC,XC,eA,C4,rA,iA,oA];function e0(t){var e,r;const n=(e=t.storage)===null||e===void 0?void 0:e.markdown,i=(r=aA.find(s=>s.name===t.name))===null||r===void 0?void 0:r.storage.markdown;return n||i?{...i,...n}:null}class lA{constructor(e){Qa(this,"editor",null),this.editor=e}serialize(e){const r=new bC(this.nodes,this.marks,{hardBreakNodeName:M4.name});return r.renderContent(e),r.out}get nodes(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(r=>[r,this.serializeNode(O0)])),...Object.fromEntries((e=this.editor.extensionManager.extensions.filter(r=>r.type==="node"&&this.serializeNode(r)).map(r=>[r.name,this.serializeNode(r)]))!==null&&e!==void 0?e:[])}}get marks(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(r=>[r,this.serializeMark(C4)])),...Object.fromEntries((e=this.editor.extensionManager.extensions.filter(r=>r.type==="mark"&&this.serializeMark(r)).map(r=>[r.name,this.serializeMark(r)]))!==null&&e!==void 0?e:[])}}serializeNode(e){var r;return(r=e0(e))===null||r===void 0||(r=r.serialize)===null||r===void 0?void 0:r.bind({editor:this.editor,options:e.options})}serializeMark(e){var r;const n=(r=e0(e))===null||r===void 0?void 0:r.serialize;return n?{...n,open:typeof n.open=="function"?n.open.bind({editor:this.editor,options:e.options}):n.open,close:typeof n.close=="function"?n.close.bind({editor:this.editor,options:e.options}):n.close}:null}}class uA{constructor(e,r){Qa(this,"editor",null),Qa(this,"md",null);let{html:n,linkify:i,breaks:s}=r;this.editor=e,this.md=this.withPatchedRenderer(Ht({html:n,linkify:i,breaks:s}))}parse(e){let{inline:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string"){this.editor.extensionManager.extensions.forEach(s=>{var o;return(o=e0(s))===null||o===void 0||(o=o.parse)===null||o===void 0||(o=o.setup)===null||o===void 0?void 0:o.call({editor:this.editor,options:s.options},this.md)});const n=this.md.render(e),i=ed(n);return this.editor.extensionManager.extensions.forEach(s=>{var o;return(o=e0(s))===null||o===void 0||(o=o.parse)===null||o===void 0||(o=o.updateDOM)===null||o===void 0?void 0:o.call({editor:this.editor,options:s.options},i)}),this.normalizeDOM(i,{inline:r,content:e}),i.innerHTML}return e}normalizeDOM(e,r){let{inline:n,content:i}=r;return this.normalizeBlocks(e),e.querySelectorAll("*").forEach(s=>{var o;((o=s.nextSibling)===null||o===void 0?void 0:o.nodeType)===Node.TEXT_NODE&&!s.closest("pre")&&(s.nextSibling.textContent=s.nextSibling.textContent.replace(/^\n/,""))}),n&&this.normalizeInline(e,i),e}normalizeBlocks(e){const n=Object.values(this.editor.schema.nodes).filter(i=>i.isBlock).map(i=>{var s;return(s=i.spec.parseDOM)===null||s===void 0?void 0:s.map(o=>o.tag)}).flat().filter(Boolean).join(",");n&&[...e.querySelectorAll(n)].forEach(i=>{i.parentElement.matches("p")&&vC(i)})}normalizeInline(e,r){var n;if((n=e.firstElementChild)!==null&&n!==void 0&&n.matches("p")){var i,s,o,a;const l=e.firstElementChild,{nextElementSibling:u}=l,c=(i=(s=r.match(/^\s+/))===null||s===void 0?void 0:s[0])!==null&&i!==void 0?i:"",d=u?"":(o=(a=r.match(/\s+$/))===null||a===void 0?void 0:a[0])!==null&&o!==void 0?o:"";if(r.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}xC(l),e.innerHTML=`${c}${e.innerHTML}${d}`}}withPatchedRenderer(e){const r=n=>function(){const i=n(...arguments);return i===` `?i:i[i.length-1]===` `?i.slice(0,-1):i};return e.renderer.rules.hardbreak=r(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=r(e.renderer.rules.softbreak),e.renderer.rules.fence=r(e.renderer.rules.fence),e.renderer.rules.code_block=r(e.renderer.rules.code_block),e.renderer.renderToken=r(e.renderer.renderToken.bind(e.renderer)),e}}const cA=Ke.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new Ve({key:new Je("markdownClipboard"),props:{clipboardTextParser:(t,e,r)=>{if(r||!this.options.transformPastedText)return null;const n=this.editor.storage.markdown.parser.parse(t,{inline:!0});return an.fromSchema(this.editor.schema).parseSlice(ed(n),{preserveWhitespace:!0,context:e})},clipboardTextSerializer:t=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(t.content):null}})]}}),dA=Ke.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){const t=M7.Commands.config.addCommands();return{setContent:(e,r,n)=>i=>t.setContent(i.editor.storage.markdown.parser.parse(e),r,n)(i),insertContentAt:(e,r,n)=>i=>t.insertContentAt(e,i.editor.storage.markdown.parser.parse(r,{inline:!0}),n)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new uA(this.editor,this.options),serializer:new lA(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[fC.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),cA.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}}),hA={name:"TableIcon",props:{icon:{type:String,required:!0}},data:()=>({TableIconsEnum:{TABLE_INSERT:"table-insert",ROW_INSERT_BEFORE:"row-insert-before",ROW_INSERT_AFTER:"row-insert-after",ROW_DELETE:"row-delete",COLUMN_INSERT_BEFORE:"column-insert-before",COLUMN_INSERT_AFTER:"column-insert-after",COLUMN_DELETE:"column-delete",TABLE_DELETE:"table-delete"}})},fA={key:0,class:"icon",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pA={key:1,class:"icon",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mA={key:2,class:"icon",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},gA={key:3,class:"icon",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},bA={key:4,class:"icon",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yA={key:5,class:"icon",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vA={key:6,class:"icon",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xA={key:7,class:"icon",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kA(t,e,r,n,i,s){return U(),Z("div",null,[r.icon==t.TableIconsEnum.TABLE_INSERT?(U(),Z("svg",fA,e[0]||(e[0]=[ge("circle",{cx:"23",cy:"23",r:"7",fill:"currentColor"},null,-1),ge("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 1C1.34315 1 0 2.34315 0 4V26C0 27.6569 1.34315 29 3 29H16.2917C15.7549 28.4003 15.2974 27.7281 14.9355 27H11V20H14.5121C14.7638 19.2879 15.1025 18.617 15.5155 18H11V12H17L17 16.2917C17.5997 15.7549 18.2719 15.2974 19 14.9355V12H26V14.5121C26.7121 14.7638 27.383 15.1025 28 15.5155V4C28 2.34315 26.6569 1 25 1H3ZM2 4C2 3.44772 2.44772 3 3 3H9V10H2V4ZM11 10V3L17 3V10H11ZM9 20V27H3C2.44772 27 2 26.5523 2 26V20H9ZM9 18H2V12H9V18ZM19 10H26V4C26 3.44772 25.5523 3 25 3H19V10Z",fill:"currentColor"},null,-1),ge("line",{x1:"19",y1:"23",x2:"27",y2:"23",stroke:"white","stroke-width":"2"},null,-1),ge("line",{x1:"23",y1:"27",x2:"23",y2:"19",stroke:"white","stroke-width":"2"},null,-1)]))):r.icon==t.TableIconsEnum.ROW_INSERT_BEFORE?(U(),Z("svg",pA,e[1]||(e[1]=[go('',6)]))):r.icon==t.TableIconsEnum.ROW_INSERT_AFTER?(U(),Z("svg",mA,e[2]||(e[2]=[go('',6)]))):r.icon==t.TableIconsEnum.COLUMN_INSERT_BEFORE?(U(),Z("svg",gA,e[3]||(e[3]=[go('',6)]))):r.icon==t.TableIconsEnum.COLUMN_INSERT_AFTER?(U(),Z("svg",bA,e[4]||(e[4]=[go('',6)]))):r.icon==t.TableIconsEnum.ROW_DELETE?(U(),Z("svg",yA,e[5]||(e[5]=[ge("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 16L2 6L26 6L26 12.0703C26.7528 12.5057 27.4281 13.0604 28 13.7084L28 6C28 4.89543 27.1046 4 26 4L2 4C0.895431 4 1.5627e-07 4.89543 1.43099e-07 6L2.38498e-08 16C1.06779e-08 17.1046 0.895431 18 2 18L14.0619 18C14.149 17.3014 14.3262 16.6307 14.5815 16L2 16Z",fill:"currentColor"},null,-1),ge("circle",{cx:"22",cy:"19",r:"7",transform:"rotate(-90 22 19)",fill:"currentColor"},null,-1),ge("line",{x1:"26",y1:"19",x2:"18",y2:"19",stroke:"white","stroke-width":"2"},null,-1)]))):r.icon==t.TableIconsEnum.COLUMN_DELETE?(U(),Z("svg",vA,e[6]||(e[6]=[ge("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 3H24V27H17.9297C17.4943 27.7528 16.9396 28.4281 16.2916 29H24C25.1046 29 26 28.1046 26 27V3C26 1.89543 25.1046 1 24 1H14C12.8954 1 12 1.89543 12 3V15.0619C12.6986 15.149 13.3693 15.3262 14 15.5815L14 3Z",fill:"currentColor"},null,-1),ge("circle",{cx:"11",cy:"23",r:"7",fill:"currentColor"},null,-1),ge("line",{x1:"7",y1:"23",x2:"15",y2:"23",stroke:"white","stroke-width":"2"},null,-1)]))):r.icon==t.TableIconsEnum.TABLE_DELETE?(U(),Z("svg",xA,e[7]||(e[7]=[ge("circle",{cx:"23",cy:"23",r:"7",fill:"currentColor"},null,-1),ge("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 1C1.34315 1 0 2.34315 0 4V26C0 27.6569 1.34315 29 3 29H16.2917C15.7549 28.4003 15.2974 27.7281 14.9355 27H11V20H14.5121C14.7638 19.2879 15.1025 18.617 15.5155 18H11V12H17L17 16.2917C17.5997 15.7549 18.2719 15.2974 19 14.9355V12H26V14.5121C26.7121 14.7638 27.383 15.1025 28 15.5155V4C28 2.34315 26.6569 1 25 1H3ZM2 4C2 3.44772 2.44772 3 3 3H9V10H2V4ZM11 10V3L17 3V10H11ZM9 20V27H3C2.44772 27 2 26.5523 2 26V20H9ZM9 18H2V12H9V18ZM19 10H26V4C26 3.44772 25.5523 3 25 3H19V10Z",fill:"currentColor"},null,-1),ge("line",{x1:"19",y1:"23",x2:"27",y2:"23",stroke:"white","stroke-width":"2"},null,-1)]))):ae("",!0)])}const wA=bn(hA,[["render",kA]]);function zu(t,e){return e.type==="mention"?(t.push(e.attrs.id),t):e.content?e.content.reduce(zu,t):t}const Ni={p:0,h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},SA={components:{EditorContent:lb,TableIcon:wA},props:{content:{type:Object,required:!0},uid:{type:String,required:!0},wwElementState:{type:Object,required:!0},useForm:{type:Boolean,default:!0}},emits:["trigger-event","update:content:effect","update:sidepanel-content"],setup(t,{emit:e}){const{value:r,setValue:n}=wwLib.wwVariable.useComponentVariable({uid:t.uid,name:"value",type:"string",defaultValue:de(()=>String(t.content.initialValue||""))}),{value:i,setValue:s}=wwLib.wwVariable.useComponentVariable({uid:t.uid,name:"mentions",type:"array",defaultValue:[],readonly:!0}),{value:o,setValue:a}=wwLib.wwVariable.useComponentVariable({uid:t.uid,name:"states",type:"object",defaultValue:{},readonly:!0}),l=wwLib.wwUtils.getUid(),u=na("_wwForm:useForm",()=>{}),c=de(()=>t.content.fieldName),d=de(()=>t.content.validation),h=de(()=>t.content.customValidation);return u(r,{fieldName:c,validation:d,customValidation:h},{elementState:t.wwElementState,emit:e,sidepanelFormPath:"form"}),{variableValue:r,setValue:n,variableMentions:i,setMentions:s,states:o,setStates:a,randomUid:l}},data:()=>({richEditor:null,loading:!1,iconHTMLs:{}}),watch:{"content.initialValue"(t){t!==this.getContent()&&(this.richEditor.commands.setContent(t),this.setValue(t)),this.$emit("trigger-event",{name:"initValueChange",event:{value:t}}),this.isReadonly&&this.handleOnUpdate()},isEditable(t){this.richEditor.setEditable(t)},variableValue(t,e){t!==this.getContent()&&this.richEditor.commands.setContent(t),t!==this.getContent()&&this.setValue(this.getContent())},isReadonly:{immediate:!0,handler(t){t?this.$emit("add-state","readonly"):this.$emit("remove-state","readonly")}},editorStates:{deep:!0,immediate:!0,handler(t){this.setStates(t)}}},computed:{isEditing(){return!1},editorStates(){return this.richEditor?{textType:Object.keys(Ni).find(t=>Ni[t]===this.currentTextType),textColor:this.currentColor,bold:this.richEditor.isActive("bold"),italic:this.richEditor.isActive("italic"),underline:this.richEditor.isActive("underline"),strike:this.richEditor.isActive("strike"),bulletList:this.richEditor.isActive("bulletList"),orderedList:this.richEditor.isActive("orderedList"),checkList:this.richEditor.isActive("taskList"),link:this.richEditor.isActive("link"),codeBlock:this.richEditor.isActive("codeBlock"),blockquote:this.richEditor.isActive("blockquote"),textAlign:this.richEditor.isActive({textAlign:"left"})?"left":this.richEditor.isActive({textAlign:"center"})?"center":this.richEditor.isActive({textAlign:"right"})?"right":this.richEditor.isActive({textAlign:"justify"})?"justify":!1,table:this.richEditor.isActive("table"),inlineMath:!1,blockMath:!1}:{}},currentColor(){var t,e,r;return(t=this.richEditor.getAttributes("textStyle"))!=null&&t.color?(e=this.richEditor.getAttributes("textStyle"))==null?void 0:e.color:this.richEditor.isActive("link")?this.content.a.color:this.richEditor.isActive("codeBlock")?this.content.code.color:this.richEditor.isActive("blockquote")?this.content.blockquote.color:(r=this.content[Object.keys(Ni).find(n=>Ni[n]===this.currentTextType)])==null?void 0:r.color},mentionList(){const t=wwLib.wwCollection.getCollectionData(this.content.mentionList);return Array.isArray(t)?t.map(e=>({id:wwLib.resolveObjectPropertyPath(e,this.content.mentionIdPath||"id")||"",label:wwLib.resolveObjectPropertyPath(e,this.content.mentionLabelPath||"label")||""})):[]},mentionListLength(){return!this.content.mentionListLength||isNaN(this.content.mentionListLength)?5:this.content.mentionListLength},isReadonly(){return this.wwElementState.props.readonly===void 0?this.content.readonly:this.wwElementState.props.readonly},isEditable(){return!this.isReadonly&&this.content.editable},hideMenu(){return this.content.hideMenu||this.isReadonly},menu(){return{textType:this.content.parameterTextType??!0,bold:this.content.parameterBold??!0,italic:this.content.parameterItalic??!0,underline:this.content.parameterUnderline??!0,strike:this.content.parameterStrike??!0,alignLeft:this.content.parameterAlignLeft??!1,alignCenter:this.content.parameterAlignCenter??!1,alignRight:this.content.parameterAlignRight??!1,alignJustify:this.content.parameterAlignJustify??!1,textColor:this.content.parameterTextColor??!0,bulletList:this.content.parameterBulletList??!0,orderedList:this.content.parameterOrderedList??!0,taskList:this.content.parameterTaskList??!1,table:this.content.parameterTable??!1,link:this.content.parameterLink??!0,image:this.content.parameterImage??!1,codeBlock:this.content.parameterCodeBlock??!0,blockquote:this.content.parameterQuote??!0,inlineMath:this.content.parameterInlineMath??!1,blockMath:this.content.parameterBlockMath??!1,undo:this.content.parameterUndo??!0,redo:this.content.parameterRedo??!0}},editorConfig(){var t;return{placeholder:wwLib.wwLang.getText(this.content.placeholder),autofocus:this.content.autofocus,image:{inline:(t=this.content.img)==null?void 0:t.inline,allowBase64:!0},mention:{enabled:this.content.enableMention,list:this.mentionList,allowSpaces:this.content.mentionAllowSpaces,char:this.content.mentionChar}}},currentTextType:{get(){const t=this.textTypeOptions.find(e=>e.active);return t?t.value:0},set(t){this.setTag(t)}},textTypeOptions(){return this.richEditor?[{label:"Paragraph",value:0,active:this.richEditor.isActive("paragraph")},{label:"Heading 1",value:1,active:this.richEditor.isActive("heading",{level:1})},{label:"Heading 2",value:2,active:this.richEditor.isActive("heading",{level:2})},{label:"Heading 3",value:3,active:this.richEditor.isActive("heading",{level:3})},{label:"Heading 4",value:4,active:this.richEditor.isActive("heading",{level:4})},{label:"Heading 5",value:5,active:this.richEditor.isActive("heading",{level:5})},{label:"Heading 6",value:6,active:this.richEditor.isActive("heading",{level:6})}]:[]},menuStyles(){return{"--menu-color":this.content.menuColor,"flex-wrap":this.content.wrapMenu?"wrap":"nowrap"}},richStyles(){var t,e,r,n,i,s,o,a,l,u,c,d;return{display:"flex",flex:1,overflow:"auto","--h1-fontSize":this.content.h1.fontSize,"--h1-fontFamily":this.content.h1.fontFamily,"--h1-fontWeight":this.content.h1.fontWeight,"--h1-textAlign":this.content.h1.textAlign,"--h1-color":this.content.h1.color,"--h1-lineHeight":this.content.h1.lineHeight,"--h1-margin-top":this.content.h1.marginTop,"--h1-margin-bottom":this.content.h1.marginBottom,"--h2-fontSize":this.content.h2.fontSize,"--h2-fontFamily":this.content.h2.fontFamily,"--h2-fontWeight":this.content.h2.fontWeight,"--h2-textAlign":this.content.h2.textAlign,"--h2-color":this.content.h2.color,"--h2-lineHeight":this.content.h2.lineHeight,"--h2-margin-top":this.content.h2.marginTop,"--h2-margin-bottom":this.content.h2.marginBottom,"--h3-fontSize":this.content.h3.fontSize,"--h3-fontFamily":this.content.h3.fontFamily,"--h3-fontWeight":this.content.h3.fontWeight,"--h3-textAlign":this.content.h3.textAlign,"--h3-color":this.content.h3.color,"--h3-lineHeight":this.content.h3.lineHeight,"--h3-margin-top":this.content.h3.marginTop,"--h3-margin-bottom":this.content.h3.marginBottom,"--h4-fontSize":this.content.h4.fontSize,"--h4-fontFamily":this.content.h4.fontFamily,"--h4-fontWeight":this.content.h4.fontWeight,"--h4-textAlign":this.content.h4.textAlign,"--h4-color":this.content.h4.color,"--h4-lineHeight":this.content.h4.lineHeight,"--h4-margin-top":this.content.h4.marginTop,"--h4-margin-bottom":this.content.h4.marginBottom,"--h5-fontSize":this.content.h5.fontSize,"--h5-fontFamily":this.content.h5.fontFamily,"--h5-fontWeight":this.content.h5.fontWeight,"--h5-textAlign":this.content.h5.textAlign,"--h5-color":this.content.h5.color,"--h5-lineHeight":this.content.h5.lineHeight,"--h5-margin-top":this.content.h5.marginTop,"--h5-margin-bottom":this.content.h5.marginBottom,"--h6-fontSize":this.content.h6.fontSize,"--h6-fontFamily":this.content.h6.fontFamily,"--h6-fontWeight":this.content.h6.fontWeight,"--h6-textAlign":this.content.h6.textAlign,"--h6-color":this.content.h6.color,"--h6-lineHeight":this.content.h6.lineHeight,"--h6-margin-top":this.content.h6.marginTop,"--h6-margin-bottom":this.content.h6.marginBottom,"--p-fontSize":this.content.p.fontSize,"--p-fontFamily":this.content.p.fontFamily,"--p-fontWeight":this.content.p.fontWeight,"--p-textAlign":this.content.p.textAlign,"--p-color":this.content.p.color,"--p-lineHeight":this.content.p.lineHeight,"--p-margin-top":this.content.p.marginTop,"--p-margin-bottom":this.content.p.marginBottom,"--mention-fontSize":this.content.mention.fontSize,"--mention-fontFamily":this.content.mention.fontFamily,"--mention-fontWeight":this.content.mention.fontWeight,"--mention-color":this.content.mention.color,"--mention-borderSize":this.content.mention.borderSize,"--mention-border-radius":this.content.mention.borderRadius,"--a-fontSize":this.content.a.fontSize,"--a-fontFamily":this.content.a.fontFamily,"--a-fontWeight":this.content.a.fontWeight,"--a-textAlign":this.content.a.textAlign,"--a-color":this.content.a.color,"--a-lineHeight":this.content.a.lineHeight,"--a-underline":this.content.a.isUnderline?"underline":"none","--blockquote-color":this.content.blockquote.color,"--blockquote-border-color":this.content.blockquote.borderColor,"--blockquote-margin-top":this.content.blockquote.marginTop,"--blockquote-margin-bottom":this.content.blockquote.marginBottom,"--code-color":this.content.code.color,"--code-bg-color":this.content.code.bgColor,"--code-border-radius":this.content.code.borderRadius,"--code-padding-y":this.content.code.paddingY,"--code-padding-x":this.content.code.paddingX,"--code-font-size":this.content.code.fontSize,"--img-max-width":(t=this.content.img)==null?void 0:t.maxWidth,"--img-max-height":(e=this.content.img)==null?void 0:e.maxHeight,"--checkbox-color":(r=this.content.checkbox)==null?void 0:r.color,"--table-border-color":((n=this.content.table)==null?void 0:n.borderColor)||"#C7C7C7","--table-border-width":((i=this.content.table)==null?void 0:i.borderWidth)||"1px","--table-header-bg-color":((s=this.content.table)==null?void 0:s.headerBgColor)||"#f5f5f5","--table-header-color":((o=this.content.table)==null?void 0:o.headerColor)||"#000","--table-pair-cell-bg-color":((a=this.content.table)==null?void 0:a.pairCellBgColor)||"#fff","--table-odd-cell-bg-color":((l=this.content.table)==null?void 0:l.oddCellBgColor)||"#FDFDFD","--table-cell-color":((u=this.content.table)==null?void 0:u.cellColor)||"#000","--table-cell-padding-x":((c=this.content.table)==null?void 0:c.cellPaddingX)||"8px","--table-cell-padding-y":((d=this.content.table)==null?void 0:d.cellPaddingY)||"6px"}},delay(){return wwLib.wwUtils.getLengthUnit(this.content.debounceDelay)[0]}},methods:{async loadIcons(){try{const{getIcon:t}=wwLib.useIcons(),e=["lucide/bold","lucide/italic","lucide/underline","lucide/strikethrough","lucide/align-left","lucide/align-center","lucide/align-right","lucide/align-justify","lucide/palette","lucide/list","lucide/list-ordered","lucide/list-checks","lucide/link","lucide/image","lucide/code","lucide/quote","lucide/square-function","lucide/sigma","lucide/undo","lucide/redo"],r=await Promise.all(e.map(async n=>{try{return await t(n)||null}catch{return null}}));this.iconHTMLs={bold:r[0],italic:r[1],underline:r[2],strikethrough:r[3],"align-left":r[4],"align-center":r[5],"align-right":r[6],"align-justify":r[7],palette:r[8],list:r[9],"list-ordered":r[10],"check-square":r[11],link:r[12],image:r[13],code:r[14],quote:r[15],"square-function":r[16],sigma:r[17],undo:r[18],redo:r[19]}}catch{this.iconHTMLs={}}},loadEditor(){this.loading||(this.loading=!0,this.richEditor&&this.richEditor.destroy(),this.richEditor=new ab({content:String(this.content.initialValue||""),editable:this.isEditable,autofocus:this.editorConfig.autofocus,onFocus:({editor:t,event:e})=>{this.$emit("trigger-event",{name:"focus",event:{editor:t,event:e}})},onBlur:({editor:t,event:e})=>{this.$emit("trigger-event",{name:"blur",event:{editor:t,event:e}})},extensions:[u9,P9.configure({HTMLAttributes:{rel:"noopener noreferrer"}}),m9,g9,q9,tv.configure({resizable:!0}),rv,nv,iv,K9,W9.configure({nested:!0}),U9.configure({types:["heading","paragraph"]}),H9.configure({placeholder:this.editorConfig.placeholder}),dA.configure({breaks:!0}),$9.configure({...this.editorConfig.image}),this.editorConfig.mention.enabled&&p9.configure({HTMLAttributes:{class:"mention"},suggestion:{items:({query:t})=>this.editorConfig.mention.list.filter(({label:e})=>e.toLowerCase().startsWith(t.toLowerCase())).slice(0,this.mentionListLength),render:pk.render,allowSpaces:this.editorConfig.mention.allowSpaces,char:this.editorConfig.mention.char}})],onCreate:()=>{this.setValue(this.getContent()),this.setMentions(this.richEditor.getJSON().content.reduce(zu,[]))},onUpdate:this.handleOnUpdate,editorProps:{handleClickOn:(t,e,r)=>{r.type.name==="mention"&&this.$emit("trigger-event",{name:"mention:click",event:{mention:{id:r.attrs.id,label:r.attrs.label}}})}}}),this.loading=!1)},handleOnUpdate(){let t=this.getContent();this.variableValue!==t&&(this.setValue(t),this.content.debounce?(this.isDebouncing=!0,this.debounce&&clearTimeout(this.debounce),this.debounce=setTimeout(()=>{this.$emit("trigger-event",{name:"change",event:{value:this.variableValue}}),this.isDebouncing=!1},this.delay)):this.$emit("trigger-event",{name:"change",event:{value:this.variableValue}}),this.setMentions(this.richEditor.getJSON().content.reduce(zu,[])))},setLink(t){if(this.richEditor.isActive("link")){this.richEditor.chain().focus().unsetLink().run();return}const e=this.richEditor.getAttributes("link").href,r=t??window.prompt("URL",e);if(r!==null){if(r===""){this.richEditor.chain().focus().extendMarkRange("link").unsetLink().run();return}this.richEditor.chain().focus().extendMarkRange("link").setLink({href:r}).run()}},setImage(t,e="",r=""){if(this.content.customMenu)this.richEditor.commands.setImage({src:t,alt:e,title:r});else{let n;if(n=wwLib.getFrontWindow().prompt("Image URL"),!n)return;this.richEditor.chain().focus().setImage({src:n}).run()}},focusEditor(){this.richEditor.chain().focus().run()},setTag(t){typeof t=="string"&&(t=t.toLocaleLowerCase().trim(),t in Ni&&(t=Ni[t])),t===0&&this.richEditor.chain().focus().setParagraph().run(),t!==0&&this.richEditor.chain().focus().toggleHeading({level:Number(t)}).run()},toggleUnderline(){this.richEditor.chain().focus().toggleMark("underline").run()},toggleBold(){this.richEditor.chain().focus().toggleBold().run()},toggleItalic(){this.richEditor.chain().focus().toggleItalic().run()},toggleUnderline(){this.richEditor.chain().focus().toggleUnderline().run()},toggleStrike(){this.richEditor.chain().focus().toggleStrike().run()},setTextAlign(t){this.richEditor.chain().focus().setTextAlign(t).run()},setColor(t){this.richEditor.chain().focus().setColor(t).run()},toggleBulletList(){this.richEditor.chain().focus().toggleBulletList().run()},toggleOrderedList(){this.richEditor.chain().focus().toggleOrderedList().run()},toggleTaskList(){this.richEditor.chain().focus().toggleTaskList().run()},toggleCodeBlock(){this.richEditor.chain().focus().toggleCodeBlock().run()},toggleBlockquote(){this.richEditor.chain().focus().toggleBlockquote().run()},undo(){this.richEditor.chain().undo().run()},redo(){this.richEditor.chain().redo().run()},getContent(){return this.content.output==="markdown"?this.richEditor.storage.markdown.getMarkdown():this.richEditor.getHTML()},insertTable(){this.richEditor.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},insertRow(t){t==="before"?this.richEditor.chain().focus().addRowBefore().run():this.richEditor.chain().focus().addRowAfter().run()},insertColumn(t){t==="before"?this.richEditor.chain().focus().addColumnBefore().run():this.richEditor.chain().focus().addColumnAfter().run()},deleteRow(){this.richEditor.chain().focus().deleteRow().run()},deleteColumn(){this.richEditor.chain().focus().deleteColumn().run()},deleteTable(){this.richEditor.chain().focus().deleteTable().run()}},mounted(){this.loadEditor(),this.loadIcons()},beforeUnmount(){this.richEditor&&this.richEditor.destroy()}},CA=["disabled"],AA=["value"],MA={key:1,class:"separator"},EA=["disabled"],TA=["innerHTML"],DA=["disabled"],OA=["innerHTML"],NA=["disabled"],LA=["innerHTML"],_A=["disabled"],zA=["innerHTML"],RA={key:6,class:"separator"},IA=["disabled"],BA=["innerHTML"],FA=["disabled"],PA=["innerHTML"],HA=["disabled"],qA=["innerHTML"],VA=["disabled"],$A=["innerHTML"],jA={key:11,class:"separator"},WA=["for"],UA=["innerHTML"],KA=["id","value","disabled"],GA={key:13,class:"separator"},JA=["disabled"],YA=["innerHTML"],ZA=["disabled"],XA=["innerHTML"],QA=["disabled"],eM=["innerHTML"],tM={key:17,class:"separator"},rM=["disabled"],nM=["disabled"],iM=["disabled"],sM=["disabled"],oM=["disabled"],aM=["disabled"],lM=["disabled"],uM=["disabled"],cM={key:26,class:"separator"},dM=["disabled"],hM=["innerHTML"],fM=["disabled"],pM=["innerHTML"],mM=["disabled"],gM=["innerHTML"],bM=["disabled"],yM=["innerHTML"],vM=["disabled"],xM=["innerHTML"],kM=["disabled"],wM=["innerHTML"],SM={key:33,class:"separator"},CM=["disabled"],AM=["innerHTML"],MM=["disabled"],EM=["innerHTML"];function TM(t,e,r,n,i,s){const o=br("table-icon"),a=br("wwElement",!0),l=br("editor-content");return U(),Z("div",{class:Le(["ww-rich-text",{"-readonly":s.isReadonly,editing:s.isEditing}]),"data-capture":""},[t.richEditor?(U(),Z(ra,{key:0},[!s.hideMenu&&!r.content.customMenu?(U(),Z("div",{key:0,class:"ww-rich-text__menu native-menu",style:Vi(s.menuStyles)},[s.menu.textType?_4((U(),Z("select",{key:0,id:"rich-size","onUpdate:modelValue":e[0]||(e[0]=u=>s.currentTextType=u),disabled:!s.isEditable},[(U(!0),Z(ra,null,b1(s.textTypeOptions,u=>(U(),Z("option",{key:u.value,value:u.value},Ru(u.label),9,AA))),128))],8,CA)),[[z4,s.currentTextType]]):ae("",!0),s.menu.textType?(U(),Z("span",MA)):ae("",!0),s.menu.bold?(U(),Z("button",{key:2,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("bold")}]),onClick:e[1]||(e[1]=(...u)=>s.toggleBold&&s.toggleBold(...u)),disabled:!s.isEditable,title:"Bold"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.bold},null,8,TA)],10,EA)):ae("",!0),s.menu.italic?(U(),Z("button",{key:3,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("italic")}]),onClick:e[2]||(e[2]=(...u)=>s.toggleItalic&&s.toggleItalic(...u)),disabled:!s.isEditable,title:"Italic"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.italic},null,8,OA)],10,DA)):ae("",!0),s.menu.underline?(U(),Z("button",{key:4,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("underline")}]),onClick:e[3]||(e[3]=(...u)=>s.toggleUnderline&&s.toggleUnderline(...u)),disabled:!s.isEditable,title:"Underline"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.underline},null,8,LA)],10,NA)):ae("",!0),s.menu.strike?(U(),Z("button",{key:5,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("strike")}]),onClick:e[4]||(e[4]=(...u)=>s.toggleStrike&&s.toggleStrike(...u)),disabled:!s.isEditable,title:"Strikethrough"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.strikethrough},null,8,zA)],10,_A)):ae("",!0),s.menu.bold||s.menu.italic||s.menu.underline||s.menu.strike?(U(),Z("span",RA)):ae("",!0),s.menu.alignLeft?(U(),Z("button",{key:7,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive({textAlign:"left"})}]),onClick:e[5]||(e[5]=u=>s.setTextAlign("left")),disabled:!s.isEditable,title:"Align left"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs["align-left"]},null,8,BA)],10,IA)):ae("",!0),s.menu.alignCenter?(U(),Z("button",{key:8,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive({textAlign:"center"})}]),onClick:e[6]||(e[6]=u=>s.setTextAlign("center")),disabled:!s.isEditable,title:"Align center"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs["align-center"]},null,8,PA)],10,FA)):ae("",!0),s.menu.alignRight?(U(),Z("button",{key:9,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive({textAlign:"right"})}]),onClick:e[7]||(e[7]=u=>s.setTextAlign("right")),disabled:!s.isEditable,title:"Align right"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs["align-right"]},null,8,qA)],10,HA)):ae("",!0),s.menu.alignJustify?(U(),Z("button",{key:10,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive({textAlign:"justify"})}]),onClick:e[8]||(e[8]=u=>s.setTextAlign("justify")),disabled:!s.isEditable,title:"Align justify"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs["align-justify"]},null,8,$A)],10,VA)):ae("",!0),s.menu.alignLeft||s.menu.alignCenter||s.menu.alignRight||s.menu.alignJustify?(U(),Z("span",jA)):ae("",!0),s.menu.textColor?(U(),Z("label",{key:12,class:"ww-rich-text__menu-item",for:`rich-color-${n.randomUid}`,onClick:e[10]||(e[10]=u=>t.richEditor.commands.focus()),title:"Text color"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.palette},null,8,UA),ge("input",{id:`rich-color-${n.randomUid}`,type:"color",onInput:e[9]||(e[9]=u=>s.setColor(u.target.value)),value:t.richEditor.getAttributes("textStyle").color,style:{display:"none"},disabled:!s.isEditable},null,40,KA)],8,WA)):ae("",!0),s.menu.textColor?(U(),Z("span",GA)):ae("",!0),s.menu.bulletList?(U(),Z("button",{key:14,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("bulletList")}]),onClick:e[11]||(e[11]=(...u)=>s.toggleBulletList&&s.toggleBulletList(...u)),disabled:!s.isEditable,title:"Bullet list"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.list},null,8,YA)],10,JA)):ae("",!0),s.menu.orderedList?(U(),Z("button",{key:15,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("orderedList")}]),onClick:e[12]||(e[12]=(...u)=>s.toggleOrderedList&&s.toggleOrderedList(...u)),disabled:!s.isEditable,title:"Ordered list"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs["list-ordered"]},null,8,XA)],10,ZA)):ae("",!0),s.menu.taskList?(U(),Z("button",{key:16,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("taskList")}]),onClick:e[13]||(e[13]=(...u)=>s.toggleTaskList&&s.toggleTaskList(...u)),disabled:!s.isEditable},[ge("div",{class:"icon",innerHTML:t.iconHTMLs["check-square"]},null,8,eM)],10,QA)):ae("",!0),s.menu.table?(U(),Z("span",tM)):ae("",!0),s.menu.table?(U(),Z("button",{key:18,type:"button",class:Le(["ww-rich-text__menu-item",{"is-highlighted":t.richEditor.isActive("table")}]),onClick:e[14]||(e[14]=(...u)=>s.insertTable&&s.insertTable(...u)),disabled:!s.isEditable},[Qt(o,{icon:"table-insert"})],10,rM)):ae("",!0),s.menu.table&&t.richEditor.isActive("table")?(U(),Z("button",{key:19,type:"button",class:Le(["ww-rich-text__menu-item",{"is-highlighted":t.richEditor.isActive("table")}]),onClick:e[15]||(e[15]=u=>s.insertRow("before")),disabled:!s.isEditable},[Qt(o,{icon:"row-insert-before"})],10,nM)):ae("",!0),s.menu.table&&t.richEditor.isActive("table")?(U(),Z("button",{key:20,type:"button",class:Le(["ww-rich-text__menu-item",{"is-highlighted":t.richEditor.isActive("table")}]),onClick:e[16]||(e[16]=u=>s.insertRow("after")),disabled:!s.isEditable},[Qt(o,{icon:"row-insert-after"})],10,iM)):ae("",!0),s.menu.table&&t.richEditor.isActive("table")?(U(),Z("button",{key:21,type:"button",class:Le(["ww-rich-text__menu-item",{"is-highlighted":t.richEditor.isActive("table")}]),onClick:e[17]||(e[17]=u=>s.insertColumn("before")),disabled:!s.isEditable},[Qt(o,{icon:"column-inster-before"})],10,sM)):ae("",!0),s.menu.table&&t.richEditor.isActive("table")?(U(),Z("button",{key:22,type:"button",class:Le(["ww-rich-text__menu-item",{"is-highlighted":t.richEditor.isActive("table")}]),onClick:e[18]||(e[18]=u=>s.insertColumn("after")),disabled:!s.isEditable},[Qt(o,{icon:"column-insert-after"})],10,oM)):ae("",!0),s.menu.table&&t.richEditor.isActive("table")?(U(),Z("button",{key:23,type:"button",class:Le(["ww-rich-text__menu-item",{"is-highlighted":t.richEditor.isActive("table")}]),onClick:e[19]||(e[19]=(...u)=>s.deleteRow&&s.deleteRow(...u)),disabled:!s.isEditable},[Qt(o,{icon:"row-delete"})],10,aM)):ae("",!0),s.menu.table&&t.richEditor.isActive("table")?(U(),Z("button",{key:24,type:"button",class:Le(["ww-rich-text__menu-item",{"is-highlighted":t.richEditor.isActive("table")}]),onClick:e[20]||(e[20]=(...u)=>s.deleteColumn&&s.deleteColumn(...u)),disabled:!s.isEditable},[Qt(o,{icon:"column-delete"})],10,lM)):ae("",!0),s.menu.table&&t.richEditor.isActive("table")?(U(),Z("button",{key:25,type:"button",class:Le(["ww-rich-text__menu-item",{"is-highlighted":t.richEditor.isActive("table")}]),onClick:e[21]||(e[21]=(...u)=>s.deleteTable&&s.deleteTable(...u)),disabled:!s.isEditable},[Qt(o,{icon:"table-delete"})],10,uM)):ae("",!0),s.menu.bulletList||s.menu.orderedList||s.menu.taskList?(U(),Z("span",cM)):ae("",!0),s.menu.link?(U(),Z("button",{key:27,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("link")}]),onClick:e[22]||(e[22]=u=>s.setLink()),disabled:!s.isEditable},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.link},null,8,hM)],10,dM)):ae("",!0),s.menu.image?(U(),Z("button",{key:28,type:"button",class:"ww-rich-text__menu-item",onClick:e[23]||(e[23]=u=>s.setImage()),disabled:!s.isEditable},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.image},null,8,pM)],8,fM)):ae("",!0),s.menu.codeBlock?(U(),Z("button",{key:29,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("codeBlock")}]),onClick:e[24]||(e[24]=(...u)=>s.toggleCodeBlock&&s.toggleCodeBlock(...u)),disabled:!s.isEditable},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.code},null,8,gM)],10,mM)):ae("",!0),s.menu.blockquote?(U(),Z("button",{key:30,type:"button",class:Le(["ww-rich-text__menu-item",{"is-active":t.richEditor.isActive("blockquote")}]),onClick:e[25]||(e[25]=(...u)=>s.toggleBlockquote&&s.toggleBlockquote(...u)),disabled:!s.isEditable,title:"Blockquote"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.quote},null,8,yM)],10,bM)):ae("",!0),s.menu.inlineMath?(U(),Z("button",{key:31,type:"button",class:"ww-rich-text__menu-item",onClick:e[26]||(e[26]=u=>t.insertInlineMath()),disabled:!s.isEditable,title:"Inline math"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs["square-function"]},null,8,xM)],8,vM)):ae("",!0),s.menu.blockMath?(U(),Z("button",{key:32,type:"button",class:"ww-rich-text__menu-item",onClick:e[27]||(e[27]=u=>t.insertBlockMath()),disabled:!s.isEditable,title:"Block math"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.sigma},null,8,wM)],8,kM)):ae("",!0),s.menu.link||s.menu.image||s.menu.codeBlock||s.menu.blockquote||s.menu.inlineMath||s.menu.blockMath?(U(),Z("span",SM)):ae("",!0),s.menu.undo?(U(),Z("button",{key:34,type:"button",class:"ww-rich-text__menu-item",onClick:e[28]||(e[28]=(...u)=>s.undo&&s.undo(...u)),disabled:!s.isEditable,title:"Undo"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.undo},null,8,AM)],8,CM)):ae("",!0),s.menu.redo?(U(),Z("button",{key:35,type:"button",class:"ww-rich-text__menu-item",onClick:e[29]||(e[29]=(...u)=>s.redo&&s.redo(...u)),disabled:!s.isEditable,title:"Redo"},[ge("div",{class:"icon",innerHTML:t.iconHTMLs.redo},null,8,EM)],8,MM)):ae("",!0)],4)):r.content.customMenu?(U(),Br(a,nr({key:1,class:"ww-rich-text__menu"},r.content.customMenuElement),null,16)):ae("",!0),Qt(l,{class:"ww-rich-text__input",editor:t.richEditor,style:Vi(s.richStyles)},null,8,["editor","style"])],64)):ae("",!0)],2)}const UM=bn(SA,[["render",TM]]);function DM(){function t(n,i){switch(n){case"fade":return"fade-transition";case"slide-in":switch(i){default:return"slide-in-left-transition";case"left":return"slide-in-left-transition";case"right":return"slide-in-right-transition";case"top":return"slide-in-top-transition";case"bottom":return"slide-in-bottom-transition"}case"zoom":return"zoom-transition";default:return""}}function e(n,i,s,o){const a={position:"fixed"};switch(n){case"left":a.left=0,a["--align-items"]="flex-start";break;case"right":a.right=0,a["--align-items"]="flex-end";break;case"custom":a.left=s,a["--align-items"]="flex-start";break;default:a.left="50%",a["--translate-x"]="-50%",a["--align-items"]="center";break}switch(i){case"top":a.top=0,a["--justify-content"]="flex-start";break;case"bottom":a.bottom=0,a["--justify-content"]="flex-end";break;case"custom":a.top=o,a["--justify-content"]="flex-start";break;default:a.top="50%",a["--translate-y"]="-50%",a["--justify-content"]="center";break}return a}function r(n){const i={position:"fixed"};switch(n){case"left":Object.assign(i,{height:"100dvh",top:0,bottom:0,left:0});break;case"right":Object.assign(i,{height:"100dvh",top:0,bottom:0,right:0});break;case"top":Object.assign(i,{width:"100dvw",top:0,left:0,right:0,"--content-flow":"column"});break;case"bottom":Object.assign(i,{width:"100dvw",bottom:0,left:0,right:0,"--content-flow":"column"});break}return i}return{getModalStyle:e,getSheetStyle:r,getTransitionName:t}}const td={props:{content:{type:Object,required:!0},uid:{type:String,required:!0}},events:[],setup(t,{emit:e}){const r=na("_wwPopupStacked",!1),n=de(()=>!1),{getModalStyle:i,getSheetStyle:s}=DM();Ls(()=>{t.content.preventScroll&&!n.value&&!hs(r)?wwLib.getFrontDocument().documentElement.classList.add("ww-dialog-open"):wwLib.getFrontDocument().documentElement.classList.remove("ww-dialog-open")});const o=de(()=>t.content.animationDuration+"ms"),a=de(()=>t.content.animationEasing),l=de(()=>{let d={};switch(t.content.type){case"modal":d=i(t.content.sideModal,t.content.align,t.content.customPositionX,t.content.customPositionY);break;case"sheet":d=s(t.content.sideSheet);break}return d}),u=na("_wwLocalContext",null);function c(d){var h,f,p;n.value||d.key==="Escape"&&t.content.escClose&&((p=(f=(h=hs(u))==null?void 0:h.methods)==null?void 0:f.popup)==null||p.close.method())}return Ls(()=>{t.content.escClose&&!r?wwLib.getFrontDocument().addEventListener("keydown",c):wwLib.getFrontDocument().removeEventListener("keydown",c)}),m1(()=>{wwLib.getFrontDocument().removeEventListener("keydown",c),wwLib.getFrontDocument().documentElement.classList.remove("ww-dialog-open")}),{dialogStyle:l,animationClasses:de(()=>({"fade-animation":t.content.animation==="fade","zoomin-animation":t.content.animation==="zoom","slideDown-animation":t.content.animation==="slide-in"&&t.content.slideInDirection==="bottom","slideUp-animation":t.content.animation==="slide-in"&&t.content.slideInDirection==="top","slideLeft-animation":t.content.animation==="slide-in"&&t.content.slideInDirection==="left","slideRight-animation":t.content.animation==="slide-in"&&t.content.slideInDirection==="right"})),animationDuration:o,animationEasing:a,onRootClick:()=>{var d,h,f;n.value||t.content.overlay&&t.content.overlayClickCloses&&((f=(h=(d=hs(u))==null?void 0:d.methods)==null?void 0:h.popup)==null||f.close.method())},onCloseInterceptorClick:d=>{var h,f,p;n.value||(d.stopPropagation(),t.content.clickOutsideCloses&&((p=(f=(h=hs(u))==null?void 0:h.methods)==null?void 0:f.popup)==null||p.close.method()))},onInterceptorClick:d=>{n.value||t.content.preventInteractionsOutside&&(d.stopPropagation(),d.preventDefault())},isEditing:n,isStacked:r}}},d1=()=>{I4(t=>({"7e2415f7":t.content.overlayBackgroundColor,"1fa8899b":t.animationDuration,"6267cef2":t.animationEasing}))},h1=td.setup;td.setup=h1?(t,e)=>(d1(),h1(t,e)):d1;function OM(t,e,r,n,i,s){const o=br("wwLayout");return n.isStacked?(U(),Br(o,{key:1,path:"children",role:"dialog"})):(U(),Z("div",{key:0,class:Le(["ww-dialog",[{overlay:r.content.overlay,"no-overlay":!r.content.overlay,transform:!r.content.overlay,"-modal":r.content.type==="modal","-editing":n.isEditing},!r.content.overlay&&n.animationClasses]]),style:Vi(!r.content.overlay&&n.dialogStyle),onClick:e[1]||(e[1]=R4((...a)=>n.onRootClick&&n.onRootClick(...a),["self"]))},[r.content.overlay?ae("",!0):(U(),Z(ra,{key:0},[r.content.clickOutsideCloses?(U(),Z("div",{key:0,onClick:e[0]||(e[0]=(...a)=>n.onCloseInterceptorClick&&n.onCloseInterceptorClick(...a)),class:"interceptor"})):ae("",!0)],64)),Qt(o,{path:"children",class:Le(["content",[{transform:r.content.overlay,"-modal":r.content.type==="modal"},r.content.overlay&&n.animationClasses]]),role:"dialog",style:Vi(r.content.overlay&&n.dialogStyle)},null,8,["style","class"])],6))}const KM=bn(td,[["render",OM],["__scopeId","data-v-605c1e6a"]]),NM={props:{content:{type:Object,required:!0},wwElementState:{type:Object,required:!0}},emits:["update-content","update:content:effect"],setup(){const{hasLink:t,tag:e,properties:r}=wwLib.wwElement.useLink();return{hasLink:t,linkTag:e,properties:r}},computed:{tag(){return this.hasLink?this.linkTag:this.content.tag},text(){return this.wwElementState.props.text},isEditing(){return!1}},methods:{}};function LM(t,e,r,n,i,s){const o=br("wwText");return U(),Br(o,nr({tag:s.tag,text:s.text},n.properties,{class:{"-link":n.hasLink&&!s.isEditing}}),null,16,["tag","text","class"])}const GM=bn(NM,[["render",LM],["__scopeId","data-v-7b4f8102"]]);function _M(t,e){const r=sn(!1),n=sn(!1),i=sn(null);let s=null;const o=sn(""),a=de(()=>Object.keys(t.wwElementState.props).includes("type")?t.wwElementState.props.type:t.content.type);function l(z){if(a.value!=="decimal")return z;if(z==null||z==="")return"";const j=`${z}`.replace(",","."),G=t.content.precision,ce=G.includes(".")?G.split(".")[1].length:0;return Number(j).toFixed(ce)}function u(z){return z===""||z===null||z===void 0?"":a.value==="decimal"||a.value==="number"?isNaN(parseFloat(z))?z:parseFloat(z):z}const c=de(()=>{const z=t.content.value===void 0?"":t.content.value;return a.value==="decimal"||a.value==="number"?u(z):z}),{value:d,setValue:h}=wwLib.wwVariable.useComponentVariable({uid:t.uid,name:"value",type:de(()=>["decimal","number","currency"].includes(a.value)?"number":"string"),defaultValue:c});Nr(d,z=>{_s(()=>{o.value=d.value}),r.value||(o.value=a.value==="decimal"?l(z):String(z??""))},{immediate:!0}),Nr(c,()=>{h(c.value)});const f=de(()=>t.content?t.content.type==="password"?t.content.displayPassword?"text":"password":t.content.type==="decimal"?"number":t.content.type:"text"),p=de(()=>t.wwElementState.props.readonly===void 0?t.content.readonly:t.wwElementState.props.readonly),b=de(()=>{const z={...wwLib.wwUtils.getTextStyleFromContent(t.content),"--placeholder-color":t.content.placeholderColor};return delete z.whiteSpaceCollapse,delete z.whiteSpace,z}),y=de(()=>a.value==="date"?t.content.minDate:t.content.min),x=de(()=>a.value==="date"?t.content.maxDate:t.content.max),S=de(()=>["decimal","number"].includes(a.value)?t.content.step:a.value==="time"&&t.content.timePrecision||1),M=de(()=>!r.value&&f.value==="number"?"any":S.value),w=de(()=>wwLib.wwUtils.getLengthUnit(t.content.debounceDelay)[0]);function T(z){if(a.value==="decimal"&&o.value!==""){const j=u(o.value),G=l(j);o.value=G,h(parseFloat(G)),j!==d.value&&e("trigger-event",{name:"change",event:{domEvent:z,value:j}})}}function D(z){const j=z.target.value;o.value=j;let G;if(f.value==="number"&&(j===0||j&&j.length))try{G=parseFloat(j),isNaN(G)&&(G=j)}catch{G=j}else G=j;G!==d.value&&(h(G),t.content.debounce?(n.value=!0,s&&clearTimeout(s),s=setTimeout(()=>{e("trigger-event",{name:"change",event:{domEvent:z,value:G}}),e("element-event",{type:"change",value:{domEvent:z,value:G}}),n.value=!1},w.value)):(e("trigger-event",{name:"change",event:{domEvent:z,value:G}}),e("element-event",{type:"change",value:{domEvent:z,value:G}})))}function O(z){T(z),r.value=!1}function I(){p.value||i.value&&i.value.focus()}function _(){i.value&&i.value.select()}Nr(r,(z,j)=>{z&&!j?e("trigger-event",{name:"focus"}):!z&&j&&e("trigger-event",{name:"blur"})});const $=de(()=>r.value);return Nr($,z=>{e(z?"add-state":"remove-state","focus")},{immediate:!0}),Nr(p,z=>{e(z?"add-state":"remove-state","readonly")},{immediate:!0}),{inputRef:i,variableValue:d,displayValue:o,isReallyFocused:r,isDebouncing:n,type:a,step:S,inputType:f,isReadonly:p,style:b,min:y,max:x,stepAttribute:M,handleManualInput:D,focusInput:I,selectInput:_,onBlur:O,isFocused:$,setValue:h}}function zM(t,{variableValue:e}={}){const r=de(()=>t.content.type==="currency"),n=de(()=>t.content.type==="currency"&&t.content.currencyShowSymbol),i=de(()=>t.content.currencySymbol||"$"),s=de(()=>t.content.currencySymbolPosition||"prefix"),o=de(()=>t.content.currencyDecimalPlaces??2),a=de(()=>t.content.currencyDecimalSeparator||"."),l=de(()=>t.content.currencyThousandsSeparator??","),u=sn(null),c=sn(""),{value:d,setValue:h}=wwLib.wwVariable.useComponentVariable({uid:t.uid,name:"formatted value",isActive:r}),f=de(()=>({left:s.value==="prefix"?t.content.currencySymbolPadding??"0px":"auto",right:s.value==="suffix"?t.content.currencySymbolPadding??"0px":"auto",fontSize:t.content.currencySymbolFontSize||"inherit",color:t.content.currencySymbolColor||"inherit"})),p=()=>{if(!e.value)return"";const M=S(e.value);d.value!==M&&h(M)},b=()=>{if(!e.value)return"";const M=S(e.value);d.value!==M&&h(M)},y=async()=>{await _s(),n.value&&u.value&&(c.value={[`padding-${s.value==="prefix"?"left":"right"}`]:`${t.content.currencySymbolPadding}`})},x=(M,w)=>{if(!M)return"";let T=M.replace(/\D/g,"");if(!w)return T;let D="";for(let O=0;O0&&(T.length-O)%3===0&&(D+=w),D+=T[O];return D},S=(M,w={})=>{const{padZeros:T=!0,includeSymbol:D=!0}=w;if(M==null||M==="")return"";let O=M.toString();const I=i.value;s.value==="prefix"&&O.startsWith(I)?O=O.substring(I.length):s.value==="suffix"&&O.endsWith(I)&&(O=O.substring(0,O.length-I.length));let _=-1;a.value&&O.includes(a.value)?_=O.lastIndexOf(a.value):_=Math.max(O.lastIndexOf("."),O.lastIndexOf(","));let $="",z="";_>=0?($=O.substring(0,_),z=O.substring(_+1),z=z.replace(/\D/g,""),T?z=z.padEnd(o.value,"0").substring(0,o.value):z=z.substring(0,o.value)):($=O,z=T?"0".repeat(o.value):"");const j=$.replace(/\D/g,"");$=x(j,l.value);let G=$;return(z||_>=0&&!T||T&&o.value>0)&&(G+=a.value+z),D&&n.value&&i.value&&(s.value==="prefix"?G=i.value+G:G=G+i.value),G};return Nr([n,()=>t.content.currencySymbol,()=>t.content.currencySymbolPosition,()=>t.content.currencySymbolPadding],async()=>{r.value&&await y()}),Nr([()=>t.content.currencyDecimalPlaces,()=>t.content.currencyDecimalSeparator,()=>t.content.currencyThousandsSeparator],async()=>{if(r.value){const M=S(e.value);d.value!==M&&h(M)}}),Ls(async()=>{if(r.value){const M=S(e.value);d.value!==M&&h(M),await _s(),await y()}},{immediate:!0}),{isCurrencyType:r,showCurrencySymbol:n,currencySymbol:i,symbolPosition:s,decimalPlaces:o,decimalSeparator:a,thousandsSeparator:l,currencySymbolRef:u,currencyInputStyle:c,currencySymbolStyle:f,updateCurrencyInputStyle:y,onCurrencyBlur:p,onCurrencyFocus:b,formattedCurrencyValue:d,formatCurrency:S}}const RM={props:{content:{type:Object,required:!0},uid:{type:String,required:!0},wwElementState:{type:Object,required:!0}},emits:["element-event","trigger-event","add-state","remove-state","update:content:effect","update:sidepanel-content"],setup(t,{emit:e}){const r=de(()=>!1),{inputRef:n,variableValue:i,displayValue:s,isReallyFocused:o,isDebouncing:a,type:l,step:u,inputType:c,isReadonly:d,style:h,min:f,max:p,stepAttribute:b,handleManualInput:y,focusInput:x,selectInput:S,onBlur:M,setValue:w}=_M(t,e),T=de(()=>wwLib.wwUtils.getLengthUnit(t.content.debounceDelay)[0]),{showCurrencySymbol:D,currencySymbol:O,currencySymbolRef:I,currencySymbolStyle:_,currencyInputStyle:$,symbolPosition:z,onCurrencyBlur:j,onCurrencyFocus:G,formattedCurrencyValue:ce,formatCurrency:le}=zM(t,{variableValue:i}),Q=sn("");let me=!1,be=null;Nr([()=>t.content.type,()=>t.content.value,i],([se,Oe,Ae],[st,Me,Ee])=>{const Ne=Oe??Ae,ue=Oe!==Me&&Oe!==void 0&&Oe!==null;if(se==="currency"&&(!me||ue))if(Ne!=null&&Ne!==""){const tt=le(Ne,{padZeros:!0,includeSymbol:!1});Q.value!==tt&&(Q.value=tt),ue&&(me=!1)}else Q.value!==""&&(Q.value="")},{immediate:!0});function et(se){const Oe=t.content.currencyDecimalSeparator||".",Ae=t.content.currencyDecimalPlaces??2;if(!([8,9,27,13,46].indexOf(se.keyCode)!==-1||se.keyCode===65&&se.ctrlKey===!0||se.keyCode===67&&se.ctrlKey===!0||se.keyCode===86&&se.ctrlKey===!0||se.keyCode===88&&se.ctrlKey===!0||se.keyCode>=35&&se.keyCode<=40)&&!(se.key===Oe&&!se.target.value.includes(Oe))){if(/^[0-9]$/.test(se.key)){const st=se.target.value,Me=se.target.selectionStart,Ee=st.indexOf(Oe);if(Ee>=0&&Me>Ee&&st.substring(Ee+1).length>=Ae){se.preventDefault();return}return}se.preventDefault()}}function De(se){if(t.content.type!=="currency")return;me=!1;const Ae=se.target.value,st=t.content.currencyDecimalSeparator||".",Me=t.content.currencyDecimalPlaces??2;if(Ae&&Me>0){const Ee=Ae.split(st),Ne=Ee[0];let ue=Ee[1]||"";ue.lengthNe&&(hr=hr.substring(0,Ne));const Zn=Cr+(hr?"."+hr:""),Ar=Zn===""?"":parseFloat(Zn)||0;Cr&&Me&&(Cr=Cr.replace(/\B(?=(\d{3})+(?!\d))/g,Me));let fr=Cr;(Jr.length>1||Ae.includes(Ee))&&(fr+=Ee+hr),Ae.length,fr.length;let pr;if(st>=Ae.length)pr=fr.length;else{const Xn=Ae.substring(0,st).replace(new RegExp(`[^\\d${Ee.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`,"g"),"");let vn=0;pr=0;for(let L=0;L{Oe.selectionStart!==pr&&Oe.setSelectionRange(pr,pr)}),t.content.debounce?(a.value=!0,be&&clearTimeout(be),be=setTimeout(()=>{e("trigger-event",{name:"change",event:{domEvent:se,value:Ar}}),e("element-event",{type:"change",value:{domEvent:se,value:Ar}}),a.value=!1},T.value)):(e("trigger-event",{name:"change",event:{domEvent:se,value:Ar}}),e("element-event",{type:"change",value:{domEvent:se,value:Ar}}))}const Ce=na("_wwForm:useForm",()=>{}),xt=de(()=>t.content.fieldName),kt=de(()=>t.content.validation),Ze=de(()=>t.content.customValidation),Nt=de(()=>t.content.required);Ce(i,{fieldName:xt,validation:kt,customValidation:Ze,required:Nt,initialValue:de(()=>t.content.value)},{elementState:t.wwElementState,emit:e,sidepanelFormPath:"form",setValue:w});const wt=de(()=>({...t.wwElementState.props.attributes,key:"ww-input-basic-"+u.value,value:t.content.type==="currency"?Q.value:s.value,type:c.value,name:t.wwElementState.name,readonly:d.value||r.value,required:t.content.required,autocomplete:t.content.autocomplete?"on":"off",placeholder:wwLib.wwLang.getText(t.content.placeholder),style:h.value,min:f.value,max:p.value,step:b.value})),it=de(()=>({...t.wwElementState.props.attributes,value:s.value,type:t.content.type,name:t.wwElementState.name,readonly:d.value||r.value,required:t.content.required,placeholder:wwLib.wwLang.getText(t.content.placeholder),rows:t.content.rows,style:[h.value,{resize:t.content.resize?"":"none"}]})),Vt=de(()=>({hideArrows:t.content.hideArrows&&c.value==="number","date-placeholder":t.content.type==="date"&&!i.value,"-readonly":d.value,editing:r.value}));function St(){e("trigger-event",{name:"onEnterKey",event:{value:i.value}})}function wr(se){if(t.content.type==="color"&&(d.value||r.value))return se.preventDefault(),se.stopPropagation(),!1}return Nr(()=>t.content.value,se=>{e("trigger-event",{name:"initValueChange",event:{value:se}})}),Nr([()=>t.content.currencyThousandsSeparator,()=>t.content.currencyDecimalSeparator,()=>t.content.currencyDecimalPlaces],()=>{if(t.content.type==="currency"&&Q.value){const se=t.content.currencyThousandsSeparator??",",Oe=t.content.currencyDecimalSeparator||".",Ae=t.content.currencyDecimalPlaces??2;if(se===Oe){console.warn("⚠️ Warning: Thousands separator and decimal separator are the same:",se);return}let Ee=(i.value||0).toString().split("."),Ne=Ee[0]||"",ue=Ee[1]||"";Ne&&se&&(Ne=Ne.replace(/\B(?=(\d{3})+(?!\d))/g,se)),Ae>0&&(ue.lengthAe&&(ue=ue.substring(0,Ae)),(ue||Ee.length>1)&&(Ne+=Oe+ue)),Q.value!==Ne&&(Q.value=Ne)}}),{inputRef:n,isReallyFocused:o,isDebouncing:a,type:l,step:u,inputType:c,isReadonly:d,style:h,isEditing:r,min:f,max:p,stepAttribute:b,handleManualInput:y,focusInput:x,selectInput:S,onBlur:M,inputBindings:wt,textareaBindings:it,inputClasses:Vt,onEnter:St,handleColorInputClick:wr,handleCurrencyInput:Ye,handleCurrencyKeydown:et,handleCurrencyBlur:De,currencyDisplayValue:Q,showCurrencySymbol:D,currencySymbolStyle:_,currencySymbol:O,currencySymbolRef:I,currencyInputStyle:$,onCurrencyBlur:j,onCurrencyFocus:G,formattedCurrencyValue:ce,symbolPosition:z}}};function IM(t,e,r,n,i,s){return r.content.type=="currency"?(U(),Z("div",{key:0,onClick:e[5]||(e[5]=(...o)=>n.focusInput&&n.focusInput(...o))},[ge("div",{class:Le(["input-currency-wrapper",{"has-currency-symbol":n.showCurrencySymbol}]),style:Vi({"flex-direction":`${n.symbolPosition=="prefix"?"row":"row-reverse"}`})},[n.showCurrencySymbol?(U(),Z("span",{key:0,ref:"currencySymbolRef",class:"currency-symbol",style:Vi([n.currencySymbolStyle,{padding:n.style.padding}])},Ru(n.currencySymbol),5)):ae("",!0),ge("input",nr({ref:"inputRef"},n.inputBindings,{class:["ww-input-basic currency-type",[n.inputClasses]],style:n.showCurrencySymbol?n.currencyInputStyle:{},type:"text",onInput:e[0]||(e[0]=(...o)=>n.handleCurrencyInput&&n.handleCurrencyInput(...o)),onKeydown:e[1]||(e[1]=(...o)=>n.handleCurrencyKeydown&&n.handleCurrencyKeydown(...o)),onBlur:e[2]||(e[2]=o=>{n.isReallyFocused=!1,n.handleCurrencyBlur(o),n.onCurrencyBlur()}),onFocus:e[3]||(e[3]=()=>{n.isReallyFocused=!0,n.onCurrencyFocus()}),onKeyup:e[4]||(e[4]=si((...o)=>n.onEnter&&n.onEnter(...o),["enter"]))}),null,16)],6)])):r.content.type=="textarea"?(U(),Z("textarea",nr({key:1,ref:"inputRef"},n.textareaBindings,{class:["ww-input-basic",{editing:n.isEditing}],onInput:e[6]||(e[6]=(...o)=>n.handleManualInput&&n.handleManualInput(...o)),onFocus:e[7]||(e[7]=o=>n.isReallyFocused=!0),onBlur:e[8]||(e[8]=(...o)=>n.onBlur&&n.onBlur(...o)),onKeyup:e[9]||(e[9]=si((...o)=>n.onEnter&&n.onEnter(...o),["enter"]))}),null,16)):(U(),Z("input",nr({key:2,ref:"inputRef"},n.inputBindings,{class:["ww-input-basic",[n.inputClasses]],onInput:e[10]||(e[10]=(...o)=>n.handleManualInput&&n.handleManualInput(...o)),onBlur:e[11]||(e[11]=(...o)=>n.onBlur&&n.onBlur(...o)),onFocus:e[12]||(e[12]=o=>n.isReallyFocused=!0),onClick:e[13]||(e[13]=(...o)=>n.handleColorInputClick&&n.handleColorInputClick(...o)),onKeyup:e[14]||(e[14]=si((...o)=>n.onEnter&&n.onEnter(...o),["enter"]))}),null,16))}const JM=bn(RM,[["render",IM],["__scopeId","data-v-71f82519"]]);export{PM as a,HM as b,UM as c,KM as d,FM as e,GM as f,JM as g};