reactjs-tiptap-editor 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- "use strict";const _u=require("react"),uC=require("react-dom");function It(n){this.content=n}It.prototype={constructor:It,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new It(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new It(t)},addToStart:function(n,e){return new It([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new It(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new It(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=It.from(n),n.size?new It(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=It.from(n),n.size?new It(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=It.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};It.from=function(n){if(n instanceof It)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new It(e)};function QS(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=QS(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function qS(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),c=s.nodeSize;if(s==a){t-=c,r-=c;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let f=0,p=Math.min(s.text.length,a.text.length);for(;f<p&&s.text[s.text.length-f-1]==a.text[a.text.length-f-1];)f++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let f=qS(s.content,a.content,t-1,r-1);if(f)return f}t-=c,r-=c}}class W{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let c=this.content[s],f=a+c.nodeSize;if(f>e&&r(c,i+a,o||null,s)!==!1&&c.content.size){let p=a+1;c.nodesBetween(Math.max(0,e-p),Math.min(c.content.size,t-p),r,i+p)}a=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,c)=>{let f=a.isText?a.text.slice(Math.max(e,c)-c,t-c):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&f||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=f},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new W(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],c=s+a.nodeSize;c>e&&((s<e||c>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=c}return new W(r,i)}cutByIndex(e,t){return e==t?W.empty:e==0&&t==this.content.length?this:new W(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new W(i,o)}addToStart(e){return new W([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new W(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return QS(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return qS(this,e,t,r)}findIndex(e,t=-1){if(e==0)return Af(0,e);if(e==this.size)return Af(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||t>0?Af(r+1,s):Af(r,i);i=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,t){if(!t)return W.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new W(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return W.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new W(t||e,r)}static from(e){if(!e)return W.empty;if(e instanceof W)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new W([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}W.empty=new W([],0);const jp={index:0,offset:0};function Af(n,e){return jp.index=n,jp.offset=e,jp}function md(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!md(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!md(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}class _e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&md(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return _e.none;if(e instanceof _e)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}}_e.none=[];class yd extends Error{}class ee{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=tw(this.content,e+this.openStart,t);return r&&new ee(r,this.openStart,this.openEnd)}removeBetween(e,t){return new ee(ew(this.content,e+this.openStart,t+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,t){if(!t)return ee.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ee(W.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new ee(e,r,i)}}ee.empty=new ee(W.empty,0,0);function ew(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(ew(o.content,e-i-1,t-i-1)))}function tw(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return n.cut(0,e).append(t).append(n.cut(e));let a=tw(s.content,e-o-1,t);return a&&n.replaceChild(i,s.copy(a))}function fC(n,e,t){if(t.openStart>n.depth)throw new yd("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new yd("Inconsistent open depths");return nw(n,e,t,0)}function nw(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=nw(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return Hs(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=dC(t,n);return Hs(o,iw(n,s,a,e,r))}else return Hs(o,vd(n,e,r))}function rw(n,e){if(!e.type.compatibleContent(n.type))throw new yd("Cannot join "+e.type.name+" onto "+n.type.name)}function Hg(n,e,t){let r=n.node(t);return rw(r,e.node(t)),r}function Ws(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Zc(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(Ws(n.nodeAfter,r),o++));for(let a=o;a<s;a++)Ws(i.child(a),r);e&&e.depth==t&&e.textOffset&&Ws(e.nodeBefore,r)}function Hs(n,e){return n.type.checkContent(e),n.copy(e)}function iw(n,e,t,r,i){let o=n.depth>i&&Hg(n,e,i+1),s=r.depth>i&&Hg(t,r,i+1),a=[];return Zc(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(rw(o,s),Ws(Hs(o,iw(n,e,t,r,i+1)),a)):(o&&Ws(Hs(o,vd(n,e,i+1)),a),Zc(e,t,i,a),s&&Ws(Hs(s,vd(t,r,i+1)),a)),Zc(r,null,i,a),new W(a)}function vd(n,e,t){let r=[];if(Zc(null,n,t,r),n.depth>t){let i=Hg(n,e,t+1);Ws(Hs(i,vd(n,e,t+1)),r)}return Zc(e,null,t,r),new W(r)}function dC(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(W.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class uu{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _e.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new fu(this,e,r);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<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:c}=s.content.findIndex(o),f=o-c;if(r.push(s,a,i+c),!f||(s=s.child(a),s.isText))break;o=f-1,i+=c+1}return new uu(t,r,o)}static resolveCached(e,t){let r=hv.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else hv.set(e,r=new hC);let i=r.elts[r.i]=uu.resolve(e,t);return r.i=(r.i+1)%pC,i}}class hC{constructor(){this.elts=[],this.i=0}}const pC=12,hv=new WeakMap;class fu{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const gC=Object.create(null);class mr{constructor(e,t,r,i=_e.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||W.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&md(this.attrs,t||e.defaultAttrs||gC)&&_e.sameSet(this.marks,r||_e.none)}copy(e=null){return e==this.content?this:new mr(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new mr(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return ee.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),f=i.node(s).content.cut(i.pos-a,o.pos-a);return new ee(f,i.depth-s,o.depth-s)}replace(e,t,r){return fC(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return uu.resolveCached(this,e)}resolveNoCache(e){return uu.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.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()+")"),ow(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=W.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let c=i;c<o;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_e.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=W.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}mr.prototype.text=void 0;class bd extends mr{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ow(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new bd(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new bd(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ow(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Xs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mC(e,t);if(r.next==null)return Xs.empty;let i=sw(r);r.next&&r.err("Unexpected trailing text");let o=kC(xC(i));return CC(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,a){let c=s.matchFragment(e,r);if(c&&(!t||c.validEnd))return W.from(a.map(f=>f.createAndFill()));for(let f=0;f<s.next.length;f++){let{type:p,next:m}=s.next[f];if(!(p.isText||p.hasRequiredAttrs())&&i.indexOf(m)==-1){i.push(m);let S=o(m,a.concat(p));if(S)return S}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:c}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||c.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
2
- `)}}Xs.empty=new Xs(!0);class mC{constructor(e,t){this.string=e,this.nodeTypes=t,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 sw(n){let e=[];do e.push(yC(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function yC(n){let e=[];do e.push(vC(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function vC(n){let e=wC(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=bC(n,e);else break;return e}function pv(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function bC(n,e){let t=pv(n),r=t;return n.eat(",")&&(n.next!="}"?r=pv(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function SC(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function wC(n){if(n.eat("(")){let e=sw(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=SC(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function xC(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,a,c){let f={term:c,to:a};return e[s].push(f),f}function i(s,a){s.forEach(c=>c.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((c,f)=>c.concat(o(f,a)),[]);if(s.type=="seq")for(let c=0;;c++){let f=o(s.exprs[c],a);if(c==s.exprs.length-1)return f;i(f,a=t())}else if(s.type=="star"){let c=t();return r(a,c),i(o(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=t();return i(o(s.expr,a),c),i(o(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let c=a;for(let f=0;f<s.min;f++){let p=t();i(o(s.expr,c),p),c=p}if(s.max==-1)i(o(s.expr,c),c);else for(let f=s.min;f<s.max;f++){let p=t();r(c,p),i(o(s.expr,c),p),c=p}return[r(c)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function lw(n,e){return e-n}function gv(n,e){let t=[];return r(e),t.sort(lw);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:a,to:c}=o[s];!a&&t.indexOf(c)==-1&&r(c)}}}function kC(n){let e=Object.create(null);return t(gv(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:a,to:c})=>{if(!a)return;let f;for(let p=0;p<i.length;p++)i[p][0]==a&&(f=i[p][1]);gv(n,c).forEach(p=>{f||i.push([a,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let o=e[r.join(",")]=new Xs(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(lw);o.next.push({type:i[s][0],next:e[a.join(",")]||t(a)})}return o}}function CC(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:c,next:f}=i.next[a];s.push(c.name),o&&!(c.isText||c.hasRequiredAttrs())&&(o=!1),r.indexOf(f)==-1&&r.push(f)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function aw(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function cw(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function uw(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in n){let o=n[i];o.validate&&o.validate(e[i])}}function fw(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new TC(n,r,e[r]);return t}let mv=class dw{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=fw(e,r.attrs),this.defaultAttrs=aw(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Xs.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-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:cw(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new mr(this,this.computeAttrs(e),W.from(t),_e.setFrom(r))}createChecked(e=null,t,r){return t=W.from(t),this.checkContent(t),new mr(this,this.computeAttrs(e),t,_e.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=W.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(W.empty,!0);return o?new mr(this,e,t.append(o),_e.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){uw(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:_e.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new dw(o,t,s));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function EC(n,e,t){let r=t.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class TC{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?EC(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Eh{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=fw(e,i.attrs),this.excluded=null;let o=aw(this.attrs);this.instance=o?new _e(this,o):null}create(e=null){return!e&&this.instance?this.instance:new _e(this,cw(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Eh(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){uw(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class RC{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=It.from(e.nodes),t.marks=It.from(e.marks||{}),this.nodes=mv.compile(this.spec.nodes,this),this.marks=Eh.compile(this.spec.marks,this);let r=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 o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=Xs.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?yv(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:yv(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof mv){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(t,r,i)}text(e,t){let r=this.nodes.text;return new bd(r,r.defaultAttrs,e,_e.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return mr.fromJSON(this,e)}markFromJSON(e){return _e.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function yv(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let a in n.marks){let c=n.marks[a];(i=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function AC(n){return n.tag!=null}function OC(n){return n.style!=null}let ry=class Vg{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(AC(i))this.tags.push(i);else if(OC(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new bv(this,t,!1);return r.addAll(e,_e.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new bv(this,t,!0);return r.addAll(e,_e.none,t.from,t.to),ee.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(DC(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(s.getAttrs){let c=s.getAttrs(t);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let a=t[s];if((a.priority==null?50:a.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Sv(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Sv(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Vg(e,Vg.schemaRules(e)))}};const hw={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},IC={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},pw={ol:!0,ul:!0},du=1,Gg=2,Qc=4;function vv(n,e,t){return e!=null?(e?du:0)|(e==="full"?Gg:0):n&&n.whitespace=="pre"?du|Gg:t&~Qc}class Of{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=_e.none,this.match=o||(s&Qc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(W.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&du)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=W.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(W.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!hw.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class bv{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,o,s=vv(null,t.preserveWhitespace,0)|(r?Qc:0);i?o=new Of(i.type,i.attrs,_e.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new Of(null,null,_e.none,!0,null,s):o=new Of(e.schema.topNodeType,null,_e.none,!0,null,s),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,o=i.options&Gg?"full":this.localPreserveWS||(i.options&du)>0;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)o!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
3
- `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],a=e.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;pw.hasOwnProperty(s)&&this.parser.normalizeLists&&MC(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(c?c.ignore:IC.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let f,p=this.needsBlock;if(hw.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),f=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let m=c&&c.skip?t:this.readStyles(e,t);m&&this.addAll(e,m),f&&this.sync(o),this.needsBlock=p}else{let f=this.readStyles(e,t);f&&this.addElementByRule(e,c,f,c.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
- `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let c=this.parser.matchStyle(o,s,this,a);if(!c)break;if(c.ignore)return null;if(c.clearMark?t=t.filter(f=>!c.clearMark(f)):t=t.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)a=c;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r)||this.leafFallback(e,r);else{let c=this.enter(s,t.attrs||null,r,t.preserveWhitespace);c&&(o=!0,r=c)}else{let c=this.parser.schema.marks[t.mark];r=r.concat(c.create(t.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(c=>this.insertNode(c,r));else{let c=e;typeof t.contentElement=="string"?c=e.querySelector(t.contentElement):typeof t.contentElement=="function"?c=t.contentElement(e):t.contentElement&&(c=t.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!1)}o&&this.sync(a)&&this.open--}addAll(e,t,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],a=s.findWrapping(e);if(a&&(!r||r.length>a.length)&&(r=a,i=s,!a.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)t=this.enterInner(r[o],null,t,!1);return t}insertNode(e,t){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let r=this.findPlace(e,t);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=_e.none;for(let s of r.concat(e.marks))(i.type?i.type.allowsMarkType(s.type):wv(s.type,e.type))&&(o=s.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,i){let o=this.findPlace(e.create(t),r);return o&&(o=this.enterInner(e,t,r,!0,i)),o}enterInner(e,t,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=vv(e,o,s.options);s.options&Qc&&s.content.length==0&&(a|=Qc);let c=_e.none;return r=r.filter(f=>(s.type?s.type.allowsMarkType(f.type):wv(f.type,e))?(c=f.addToSet(c),!1):!0),this.nodes.push(new Of(e,t,c,i,null,a)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=du)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,c)=>{for(;a>=0;a--){let f=t[a];if(f==""){if(a==t.length-1||a==0)continue;for(;c>=o;c--)if(s(a-1,c))return!0;return!1}else{let p=c>0||c==0&&i?this.nodes[c].type:r&&c>=o?r.node(c-o).type:null;if(!p||p.name!=f&&!p.isInGroup(f))return!1;c--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function MC(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&pw.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function DC(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Sv(n){let e={};for(let t in n)e[t]=n[t];return e}function wv(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let c=0;c<a.edgeCount;c++){let{type:f,next:p}=a.edge(c);if(f==e||o.indexOf(p)<0&&s(p))return!0}};if(s(i.contentMatch))return!0}}class rl{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Up(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,c=0;for(;a<o.length&&c<s.marks.length;){let f=s.marks[c];if(!this.marks[f.type.name]){c++;continue}if(!f.eq(o[a][0])||f.type.spec.spanning===!1)break;a++,c++}for(;a<o.length;)i=o.pop()[1];for(;c<s.marks.length;){let f=s.marks[c++],p=this.serializeMark(f,s.isInline,t);p&&(o.push([f,i]),i.appendChild(p.dom),i=p.contentDOM||p.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=Xf(Up(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Xf(Up(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return Xf(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new rl(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=xv(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return xv(e.marks)}}function xv(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Up(n){return n.document||window.document}const kv=new WeakMap;function PC(n){let e=kv.get(n);return e===void 0&&kv.set(n,e=_C(n)),e}function _C(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function Xf(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=PC(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let a,c=t?n.createElementNS(t,i):n.createElement(i),f=e[1],p=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){p=2;for(let m in f)if(f[m]!=null){let S=m.indexOf(" ");S>0?c.setAttributeNS(m.slice(0,S),m.slice(S+1),f[m]):c.setAttribute(m,f[m])}}for(let m=p;m<e.length;m++){let S=e[m];if(S===0){if(m<e.length-1||m>p)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:C,contentDOM:E}=Xf(n,S,t,r);if(c.appendChild(C),E){if(a)throw new RangeError("Multiple content holes");a=E}}}return{dom:c,contentDOM:a}}const gw=65535,mw=Math.pow(2,16);function NC(n,e){return n+e*mw}function Cv(n){return n&gw}function FC(n){return(n-(n&gw))/mw}const yw=1,vw=2,Zf=4,bw=8;class Jg{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&bw)>0}get deletedBefore(){return(this.delInfo&(yw|Zf))>0}get deletedAfter(){return(this.delInfo&(vw|Zf))>0}get deletedAcross(){return(this.delInfo&Zf)>0}}class Rn{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Rn.empty)return Rn.empty}recover(e){let t=0,r=Cv(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+FC(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?i:0);if(c>e)break;let f=this.ranges[a+o],p=this.ranges[a+s],m=c+f;if(e<=m){let S=f?e==c?-1:e==m?1:t:t,C=c+i+(S<0?0:p);if(r)return C;let E=e==(t<0?c:m)?null:NC(a/3,e-c),P=e==c?vw:e==m?yw:Zf;return(t<0?e!=c:e!=m)&&(P|=bw),new Jg(C,P,E)}i+=p-f}return r?e+i:new Jg(e+i,0,null)}touches(e,t){let r=0,i=Cv(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?r:0);if(c>e)break;let f=this.ranges[a+o],p=c+f;if(e<=p&&a==i*3)return!0;r+=this.ranges[a+s]-f}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),c=s+(this.inverted?0:o),f=this.ranges[i+t],p=this.ranges[i+r];e(a,a+f,c,c+p),o+=p-f}}invert(){return new Rn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Rn.empty:new Rn(e<0?[0,-e,0]:[0,0,e])}}Rn.empty=new Rn([]);class Sa{constructor(e=[],t,r=0,i=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=i}slice(e=0,t=this.maps.length){return new Sa(this.maps,this.mirror,e,t)}copy(){return new Sa(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let i=e.getMirror(t);this.appendMap(e.maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e.maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new Sa;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],a=s.mapResult(e,t);if(a.recover!=null){let c=this.getMirror(o);if(c!=null&&c>o&&c<this.to){o=c,e=this.maps[c].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new Jg(e,i,null)}}const Wp=Object.create(null);class Wt{getMap(){return Rn.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Wp[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Wp)throw new RangeError("Duplicate use of step JSON ID "+e);return Wp[e]=t,t.prototype.jsonID=e,t}}class st{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new st(e,null)}static fail(e){return new st(null,e)}static fromReplace(e,t,r,i){try{return st.ok(e.replace(t,r,i))}catch(o){if(o instanceof yd)return st.fail(o.message);throw o}}}function iy(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(iy(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return W.fromArray(r)}class Bo extends Wt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new ee(iy(t.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return st.fromReplace(e,this.from,this.to,o)}invert(){return new Hr(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Bo(t.pos,r.pos,this.mark)}merge(e){return e instanceof Bo&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Bo(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Bo(t.from,t.to,e.markFromJSON(t.mark))}}Wt.jsonID("addMark",Bo);class Hr extends Wt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new ee(iy(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return st.fromReplace(e,this.from,this.to,r)}invert(){return new Bo(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Hr(t.pos,r.pos,this.mark)}merge(e){return e instanceof Hr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Hr(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Hr(t.from,t.to,e.markFromJSON(t.mark))}}Wt.jsonID("removeMark",Hr);class $o extends Wt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return st.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return st.fromReplace(e,this.pos,this.pos+1,new ee(W.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new $o(this.pos,t.marks[i]);return new $o(this.pos,this.mark)}}return new Ra(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new $o(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new $o(t.pos,e.markFromJSON(t.mark))}}Wt.jsonID("addNodeMark",$o);class Ra extends Wt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return st.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return st.fromReplace(e,this.pos,this.pos+1,new ee(W.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new $o(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ra(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ra(t.pos,e.markFromJSON(t.mark))}}Wt.jsonID("removeNodeMark",Ra);class bt extends Wt{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Yg(e,this.from,this.to)?st.fail("Structure replace would overwrite content"):st.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Rn([this.from,this.to-this.from,this.slice.size])}invert(e){return new bt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new bt(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof bt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?ee.empty:new ee(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new bt(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?ee.empty:new ee(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new bt(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new bt(t.from,t.to,ee.fromJSON(e,t.slice),!!t.structure)}}Wt.jsonID("replace",bt);class St extends Wt{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Yg(e,this.from,this.gapFrom)||Yg(e,this.gapTo,this.to)))return st.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return st.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?st.fromReplace(e,this.from,this.to,r):st.fail("Content does not fit in gap")}getMap(){return new Rn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new St(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new St(t.pos,r.pos,i,o,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new St(t.from,t.to,t.gapFrom,t.gapTo,ee.fromJSON(e,t.slice),t.insert,!!t.structure)}}Wt.jsonID("replaceAround",St);function Yg(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function LC(n,e,t,r){let i=[],o=[],s,a;n.doc.nodesBetween(e,t,(c,f,p)=>{if(!c.isInline)return;let m=c.marks;if(!r.isInSet(m)&&p.type.allowsMarkType(r.type)){let S=Math.max(f,e),C=Math.min(f+c.nodeSize,t),E=r.addToSet(m);for(let P=0;P<m.length;P++)m[P].isInSet(E)||(s&&s.to==S&&s.mark.eq(m[P])?s.to=C:i.push(s=new Hr(S,C,m[P])));a&&a.to==S?a.to=C:o.push(a=new Bo(S,C,r))}}),i.forEach(c=>n.step(c)),o.forEach(c=>n.step(c))}function BC(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let c=null;if(r instanceof Eh){let f=s.marks,p;for(;p=r.isInSet(f);)(c||(c=[])).push(p),f=p.removeFromSet(f)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let f=Math.min(a+s.nodeSize,t);for(let p=0;p<c.length;p++){let m=c[p],S;for(let C=0;C<i.length;C++){let E=i[C];E.step==o-1&&m.eq(i[C].style)&&(S=E)}S?(S.to=f,S.step=o):i.push({style:m,from:Math.max(a,e),to:f,step:o})}}}),i.forEach(s=>n.step(new Hr(s.from,s.to,s.style)))}function oy(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],a=e+1;for(let c=0;c<o.childCount;c++){let f=o.child(c),p=a+f.nodeSize,m=r.matchType(f.type);if(!m)s.push(new bt(a,p,ee.empty));else{r=m;for(let S=0;S<f.marks.length;S++)t.allowsMarkType(f.marks[S].type)||n.step(new Hr(a,p,f.marks[S]));if(i&&f.isText&&t.whitespace!="pre"){let S,C=/\r?\n|\r/g,E;for(;S=C.exec(f.text);)E||(E=new ee(W.from(t.schema.text(" ",t.allowedMarks(f.marks))),0,0)),s.push(new bt(a+S.index,a+S.index+S[0].length,E))}}a=p}if(!r.validEnd){let c=r.fillBefore(W.empty,!0);n.replace(a,a,new ee(c,0,0))}for(let c=s.length-1;c>=0;c--)n.step(s[c])}function $C(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function za(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let i=n.$from.node(r),o=n.$from.index(r),s=n.$to.indexAfter(r);if(r<n.depth&&i.canReplace(o,s,t))return r;if(r==0||i.type.spec.isolating||!$C(i,o,s))break}return null}function zC(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),c=s,f=a,p=W.empty,m=0;for(let E=o,P=!1;E>t;E--)P||r.index(E)>0?(P=!0,p=W.from(r.node(E).copy(p)),m++):c--;let S=W.empty,C=0;for(let E=o,P=!1;E>t;E--)P||i.after(E+1)<i.end(E)?(P=!0,S=W.from(i.node(E).copy(S)),C++):f++;n.step(new St(c,f,s,a,new ee(p.append(S),m,C),p.size-m,!0))}function sy(n,e,t=null,r=n){let i=jC(n,e),o=i&&UC(r,e);return o?i.map(Ev).concat({type:e,attrs:t}).concat(o.map(Ev)):null}function Ev(n){return{type:n,attrs:null}}function jC(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function UC(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let c=(s.length?s[s.length-1]:e).contentMatch;for(let f=r;c&&f<i;f++)c=c.matchType(t.child(f).type);return!c||!c.validEnd?null:s}function WC(n,e,t){let r=W.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let a=t[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=W.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new St(i,o,i,o,new ee(r,0,0),t.length,!0))}function HC(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{let c=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,c)&&VC(n.doc,n.mapping.slice(o).map(a),r)){let f=null;if(r.schema.linebreakReplacement){let C=r.whitespace=="pre",E=!!r.contentMatch.matchType(r.schema.linebreakReplacement);C&&!E?f=!1:!C&&E&&(f=!0)}f===!1&&ww(n,s,a,o),oy(n,n.mapping.slice(o).map(a,1),r,void 0,f===null);let p=n.mapping.slice(o),m=p.map(a,1),S=p.map(a+s.nodeSize,1);return n.step(new St(m,S,m+1,S-1,new ee(W.from(r.create(c,null,s.marks)),0,0),1,!0)),f===!0&&Sw(n,s,a,o),!1}})}function Sw(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let c=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function ww(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(`
5
- `))}})}function VC(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function GC(n,e,t,r,i){let o=n.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);let s=t.create(r,null,i||o.marks);if(o.isLeaf)return n.replaceWith(e,e+o.nodeSize,s);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new St(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new ee(W.from(s),0,0),1,!0))}function ly(n,e,t=1,r){let i=n.resolve(e),o=i.depth-t,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let f=i.depth-1,p=t-2;f>o;f--,p--){let m=i.node(f),S=i.index(f);if(m.type.spec.isolating)return!1;let C=m.content.cutByIndex(S,m.childCount),E=r&&r[p+1];E&&(C=C.replaceChild(0,E.type.create(E.attrs)));let P=r&&r[p]||m;if(!m.canReplace(S+1,m.childCount)||!P.type.validContent(C))return!1}let a=i.indexAfter(o),c=r&&r[0];return i.node(o).canReplaceWith(a,a,c?c.type:i.node(o+1).type)}function JC(n,e,t=1,r){let i=n.doc.resolve(e),o=W.empty,s=W.empty;for(let a=i.depth,c=i.depth-t,f=t-1;a>c;a--,f--){o=W.from(i.node(a).copy(o));let p=r&&r[f];s=W.from(p?p.type.create(p.attrs,s):i.node(a).copy(s))}n.step(new bt(e,e,new ee(o.append(s),t,t),!0))}function ja(n,e){let t=n.resolve(e),r=t.index();return xw(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function YC(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),s=o.type==r?n.type.schema.nodes.text:o.type;if(t=t.matchType(s),!t||!n.type.allowsMarks(o.marks))return!1}return t.validEnd}function xw(n,e){return!!(n&&e&&!n.isLeaf&&YC(n,e))}function ay(n,e,t=-1){let r=n.resolve(e);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):t>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&xw(o,s)&&r.node(i).canReplace(a,a+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function KC(n,e,t){let r=null,{linebreakReplacement:i}=n.doc.type.schema,o=n.doc.resolve(e-t),s=o.node().type;if(i&&s.inlineContent){let p=s.whitespace=="pre",m=!!s.contentMatch.matchType(i);p&&!m?r=!1:!p&&m&&(r=!0)}let a=n.steps.length;if(r===!1){let p=n.doc.resolve(e+t);ww(n,p.node(),p.before(),a)}s.inlineContent&&oy(n,e+t-1,s,o.node().contentMatchAt(o.index()),r==null);let c=n.mapping.slice(a),f=c.map(e-t);if(n.step(new bt(f,c.map(e+t,-1),ee.empty,!0)),r===!0){let p=n.doc.resolve(f);Sw(n,p.node(),p.before(),n.steps.length)}return n}function XC(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,t))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,t))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function kw(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let i=t.content;for(let o=0;o<t.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(t.openStart==0&&t.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(a>0?1:0),f=r.node(s),p=!1;if(o==1)p=f.canReplace(c,c,i);else{let m=f.contentMatchAt(c).findWrapping(i.firstChild.type);p=m&&f.canReplaceWith(c,c,m[0])}if(p)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Th(n,e,t=e,r=ee.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),o=n.resolve(t);return Cw(i,o,r)?new bt(e,t,r):new ZC(i,o,r).fit()}function Cw(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class ZC{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=W.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=W.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let c=new ee(o,s,a);return e>-1?new St(r.pos,e,this.$to.pos,this.$to.end(),c,t):c.size||r.pos!=this.$to.pos?new bt(r.pos,i.pos,c):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=t.firstChild;if(t.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}t=o.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Hp(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:c,match:f}=this.frontier[a],p,m=null;if(t==1&&(s?f.matchType(s.type)||(m=f.fillBefore(W.from(s),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:m};if(t==2&&s&&(p=f.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:p};if(o&&f.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Hp(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new ee(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Hp(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new ee(Yc(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new ee(Yc(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let P=0;P<o.length;P++)this.openFrontierNode(o[P]);let s=this.unplaced,a=r?r.content:s.content,c=s.openStart-e,f=0,p=[],{match:m,type:S}=this.frontier[t];if(i){for(let P=0;P<i.childCount;P++)p.push(i.child(P));m=m.matchFragment(i)}let C=a.size+e-(s.content.size-s.openEnd);for(;f<a.childCount;){let P=a.child(f),D=m.matchType(P.type);if(!D)break;f++,(f>1||c==0||P.content.size)&&(m=D,p.push(Ew(P.mark(S.allowedMarks(P.marks)),f==1?c:0,f==a.childCount?C:-1)))}let E=f==a.childCount;E||(C=-1),this.placed=Kc(this.placed,t,W.from(p)),this.frontier[t].match=m,E&&C<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let P=0,D=a;P<C;P++){let _=D.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),D=_.content}this.unplaced=E?e==0?ee.empty:new ee(Yc(s.content,e-1,1),e-1,C<0?s.openEnd:e-1):new ee(Yc(s.content,e,f),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Vp(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=Vp(e,t,i,r,o);if(s){for(let a=t-1;a>=0;a--){let{match:c,type:f}=this.frontier[a],p=Vp(e,a,f,c,!0);if(!p||p.childCount)continue e}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Kc(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Kc(this.placed,this.depth,W.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(W.empty,!0);t.childCount&&(this.placed=Kc(this.placed,this.frontier.length,t))}}function Yc(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Yc(n.firstChild.content,e-1,t)))}function Kc(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Kc(n.lastChild.content,e-1,t)))}function Hp(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Ew(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Ew(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(W.empty,!0)))),n.copy(r)}function Vp(n,e,t,r,i){let o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!QC(t,o.content,s)?a:null}function QC(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function qC(n){return n.spec.defining||n.spec.definingForContent}function eE(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let i=n.doc.resolve(e),o=n.doc.resolve(t);if(Cw(i,o,r))return n.step(new bt(e,t,r));let s=Rw(i,n.doc.resolve(t));s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let S=i.depth,C=i.pos-1;S>0;S--,C--){let E=i.node(S).type.spec;if(E.defining||E.definingAsContext||E.isolating)break;s.indexOf(S)>-1?a=S:i.before(S)==C&&s.splice(1,0,-S)}let c=s.indexOf(a),f=[],p=r.openStart;for(let S=r.content,C=0;;C++){let E=S.firstChild;if(f.push(E),C==r.openStart)break;S=E.content}for(let S=p-1;S>=0;S--){let C=f[S],E=qC(C.type);if(E&&!C.sameMarkup(i.node(Math.abs(a)-1)))p=S;else if(E||!C.type.isTextblock)break}for(let S=r.openStart;S>=0;S--){let C=(S+p+1)%(r.openStart+1),E=f[C];if(E)for(let P=0;P<s.length;P++){let D=s[(P+c)%s.length],_=!0;D<0&&(_=!1,D=-D);let J=i.node(D-1),ie=i.index(D-1);if(J.canReplaceWith(ie,ie,E.type,E.marks))return n.replace(i.before(D),_?o.after(D):t,new ee(Tw(r.content,0,r.openStart,C),C,r.openEnd))}}let m=n.steps.length;for(let S=s.length-1;S>=0&&(n.replace(e,t,r),!(n.steps.length>m));S--){let C=s[S];C<0||(e=i.before(C),t=o.after(C))}}function Tw(n,e,t,r,i){if(e<t){let o=n.firstChild;n=n.replaceChild(0,o.copy(Tw(o.content,e+1,t,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(W.empty,!0))}return n}function tE(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=XC(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new ee(W.from(r),0,0))}function nE(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t),o=Rw(r,i);for(let s=0;s<o.length;s++){let a=o[s],c=s==o.length-1;if(c&&a==0||r.node(a).type.contentMatch.validEnd)return n.delete(r.start(a),i.end(a));if(a>0&&(c||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return n.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&t>r.end(s)&&i.end(s)-t!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return n.delete(r.before(s),t);n.delete(e,t)}function Rw(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let o=n.start(i);if(o<n.pos-(n.depth-i)||e.end(i)>e.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&t.push(i)}return t}class wa extends Wt{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return st.fail("No node at attribute step's position");let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return st.fromReplace(e,this.pos,this.pos+1,new ee(W.from(i),0,t.isLeaf?0:1))}getMap(){return Rn.empty}invert(e){return new wa(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new wa(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new wa(t.pos,t.attr,t.value)}}Wt.jsonID("attr",wa);class hu extends Wt{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return st.ok(r)}getMap(){return Rn.empty}invert(e){return new hu(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new hu(t.attr,t.value)}}Wt.jsonID("docAttr",hu);let Aa=class extends Error{};Aa=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};Aa.prototype=Object.create(Error.prototype);Aa.prototype.constructor=Aa;Aa.prototype.name="TransformError";class cy{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Sa}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Aa(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=ee.empty){let i=Th(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new ee(W.from(r),0,0))}delete(e,t){return this.replace(e,t,ee.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return eE(this,e,t,r),this}replaceRangeWith(e,t,r){return tE(this,e,t,r),this}deleteRange(e,t){return nE(this,e,t),this}lift(e,t){return zC(this,e,t),this}join(e,t=1){return KC(this,e,t),this}wrap(e,t){return WC(this,e,t),this}setBlockType(e,t=e,r,i=null){return HC(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return GC(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new wa(e,t,r)),this}setDocAttribute(e,t){return this.step(new hu(e,t)),this}addNodeMark(e,t){return this.step(new $o(e,t)),this}removeNodeMark(e,t){if(!(t instanceof _e)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new Ra(e,t)),this}split(e,t=1,r){return JC(this,e,t,r),this}addMark(e,t,r){return LC(this,e,t,r),this}removeMark(e,t,r){return BC(this,e,t,r),this}clearIncompatible(e,t,r){return oy(this,e,t,r),this}}const Gp=Object.create(null);class me{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new uy(e.min(t),e.max(t))]}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 t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=ee.empty){let r=t.content.lastChild,i=null;for(let a=0;a<t.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:c,$to:f}=s[a],p=e.mapping.slice(o);e.replaceRange(p.map(c.pos),p.map(f.pos),a?ee.empty:t),a==0&&Av(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],c=e.mapping.slice(r),f=c.map(s.pos),p=c.map(a.pos);o?e.deleteRange(f,p):(e.replaceRangeWith(f,p,t),Av(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let i=e.parent.inlineContent?new ke(e):ha(e.node(0),e.parent,e.pos,e.index(),t,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=t<0?ha(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):ha(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Kn(e.node(0))}static atStart(e){return ha(e,e,0,0,1)||new Kn(e)}static atEnd(e){return ha(e,e,e.content.size,e.childCount,-1)||new Kn(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Gp[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Gp)throw new RangeError("Duplicate use of selection JSON ID "+e);return Gp[e]=t,t.prototype.jsonID=e,t}getBookmark(){return ke.between(this.$anchor,this.$head).getBookmark()}}me.prototype.visible=!0;class uy{constructor(e,t){this.$from=e,this.$to=t}}let Tv=!1;function Rv(n){!Tv&&!n.parent.inlineContent&&(Tv=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class ke extends me{constructor(e,t=e){Rv(e),Rv(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return me.near(r);let i=e.resolve(t.map(this.anchor));return new ke(i.parent.inlineContent?i:r,r)}replace(e,t=ee.empty){if(super.replace(e,t),t==ee.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ke&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Rh(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ke(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let o=me.findFrom(t,r,!0)||me.findFrom(t,-r,!0);if(o)t=o.$head;else return me.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(me.findFrom(e,-r,!0)||me.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new ke(e,t)}}me.jsonID("text",ke);class Rh{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Rh(e.map(this.anchor),e.map(this.head))}resolve(e){return ke.between(e.resolve(this.anchor),e.resolve(this.head))}}class he extends me{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:i}=t.mapResult(this.anchor),o=e.resolve(i);return r?me.near(o):new he(o)}content(){return new ee(W.from(this.node),0,0)}eq(e){return e instanceof he&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new fy(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new he(e.resolve(t.anchor))}static create(e,t){return new he(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}he.prototype.visible=!1;me.jsonID("node",he);class fy{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Rh(r,r):new fy(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&he.isSelectable(r)?new he(t):me.near(t)}}class Kn extends me{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=ee.empty){if(t==ee.empty){e.delete(0,e.doc.content.size);let r=me.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Kn(e)}map(e){return new Kn(e)}eq(e){return e instanceof Kn}getBookmark(){return rE}}me.jsonID("all",Kn);const rE={map(){return this},resolve(n){return new Kn(n)}};function ha(n,e,t,r,i,o=!1){if(e.inlineContent)return ke.create(n,t);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&he.isSelectable(a))return he.create(n,t-(i<0?a.nodeSize:0))}else{let c=ha(n,a,t+i,i<0?a.childCount:0,i,o);if(c)return c}t+=a.nodeSize*i}return null}function Av(n,e,t){let r=n.steps.length-1;if(r<e)return;let i=n.steps[r];if(!(i instanceof bt||i instanceof St))return;let o=n.mapping.maps[r],s;o.forEach((a,c,f,p)=>{s==null&&(s=p)}),n.setSelection(me.near(n.doc.resolve(s),t))}const Ov=1,If=2,Iv=4;let iE=class extends cy{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Ov)&~If,this.storedMarks=null,this}get selectionSet(){return(this.updated&Ov)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=If,this}ensureMarks(e){return _e.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&If)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~If,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||_e.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,o)),this.selection.empty||this.setSelection(me.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,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|=Iv,this}get scrolledIntoView(){return(this.updated&Iv)>0}};function Mv(n,e){return!e||!n?n:n.bind(e)}class Xc{constructor(e,t,r){this.name=e,this.init=Mv(t.init,r),this.apply=Mv(t.apply,r)}}const oE=[new Xc("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Xc("selection",{init(n,e){return n.selection||me.atStart(e.doc)},apply(n){return n.selection}}),new Xc("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Xc("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Jp{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=oE.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Xc(r.key,r.spec.state,r))})}}class va{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,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let c=i?i[s].n:0,f=i?i[s].state:this,p=c<t.length&&a.spec.appendTransaction.call(a,c?t.slice(c):t,f,r);if(p&&r.filterTransaction(p,s)){if(p.setMeta("appendedTransaction",e),!i){i=[];for(let m=0;m<this.config.plugins.length;m++)i.push(m<s?{state:r,n:t.length}:{state:this,n:0})}t.push(p),r=r.applyInner(p),o=!0}i&&(i[s]={state:r,n:t.length})}}if(!o)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new va(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new iE(this)}static create(e){let t=new Jp(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new va(t);for(let i=0;i<t.fields.length;i++)r[t.fields[i].name]=t.fields[i].init(e,r);return r}reconfigure(e){let t=new Jp(this.schema,e.plugins),r=t.fields,i=new va(t);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(t[r]=o.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Jp(e.schema,e.plugins),o=new va(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=mr.fromJSON(e.schema,t.doc);else if(s.name=="selection")o.selection=me.fromJSON(o.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let c=r[a],f=c.spec.state;if(c.key==s.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(t,a)){o[s.name]=f.fromJSON.call(c,e,t[a],o);return}}o[s.name]=s.init(e,o)}}),o}}function Aw(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Aw(i,e,{})),t[r]=i}return t}class il{constructor(e){this.spec=e,this.props={},e.props&&Aw(e.props,this,this.props),this.key=e.key?e.key.key:Ow("plugin")}getState(e){return e[this.key]}}const Yp=Object.create(null);function Ow(n){return n in Yp?n+"$"+ ++Yp[n]:(Yp[n]=0,n+"$")}class ji{constructor(e="key"){this.key=Ow(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Mt=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},pu=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let Kg=null;const Pi=function(n,e,t){let r=Kg||(Kg=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},sE=function(){Kg=null},Zs=function(n,e,t,r){return t&&(Dv(n,e,t,r,-1)||Dv(n,e,t,r,1))},lE=/^(img|br|input|textarea|hr)$/i;function Dv(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Yn(n))){let o=n.parentNode;if(!o||o.nodeType!=1||Nu(n)||lE.test(n.nodeName)||n.contentEditable=="false")return!1;e=Mt(n)+(i<0?0:1),n=o}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.contentEditable=="false")return!1;e=i<0?Yn(n):0}else return!1}}function Yn(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function aE(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=Yn(n)}else if(n.parentNode&&!Nu(n))e=Mt(n),n=n.parentNode;else return null}}function cE(n,e){for(;;){if(n.nodeType==3&&e<n.nodeValue.length)return n;if(n.nodeType==1&&e<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[e],e=0}else if(n.parentNode&&!Nu(n))e=Mt(n)+1,n=n.parentNode;else return null}}function uE(n,e,t){for(let r=e==0,i=e==Yn(n);r||i;){if(n==t)return!0;let o=Mt(n);if(n=n.parentNode,!n)return!1;r=r&&o==0,i=i&&o==Yn(n)}}function Nu(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Ah=function(n){return n.focusNode&&Zs(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function $s(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function fE(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function dE(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:Math.min(Yn(r.offsetNode),r.offset)}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:Math.min(Yn(r.startContainer),r.startOffset)}}}const Jr=typeof navigator<"u"?navigator:null,Pv=typeof document<"u"?document:null,Xo=Jr&&Jr.userAgent||"",Xg=/Edge\/(\d+)/.exec(Xo),Iw=/MSIE \d/.exec(Xo),Zg=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xo),vn=!!(Iw||Zg||Xg),Wo=Iw?document.documentMode:Zg?+Zg[1]:Xg?+Xg[1]:0,vr=!vn&&/gecko\/(\d+)/i.test(Xo);vr&&+(/Firefox\/(\d+)/.exec(Xo)||[0,0])[1];const Qg=!vn&&/Chrome\/(\d+)/.exec(Xo),Bt=!!Qg,Mw=Qg?+Qg[1]:0,tn=!vn&&!!Jr&&/Apple Computer/.test(Jr.vendor),Oa=tn&&(/Mobile\/\w+/.test(Xo)||!!Jr&&Jr.maxTouchPoints>2),Jn=Oa||(Jr?/Mac/.test(Jr.platform):!1),hE=Jr?/Win/.test(Jr.platform):!1,_i=/Android \d/.test(Xo),Fu=!!Pv&&"webkitFontSmoothing"in Pv.documentElement.style,pE=Fu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function gE(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Ri(n,e){return typeof n=="number"?n:n[e]}function mE(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function _v(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=pu(s)){if(s.nodeType!=1)continue;let a=s,c=a==o.body,f=c?gE(o):mE(a),p=0,m=0;if(e.top<f.top+Ri(r,"top")?m=-(f.top-e.top+Ri(i,"top")):e.bottom>f.bottom-Ri(r,"bottom")&&(m=e.bottom-e.top>f.bottom-f.top?e.top+Ri(i,"top")-f.top:e.bottom-f.bottom+Ri(i,"bottom")),e.left<f.left+Ri(r,"left")?p=-(f.left-e.left+Ri(i,"left")):e.right>f.right-Ri(r,"right")&&(p=e.right-f.right+Ri(i,"right")),p||m)if(c)o.defaultView.scrollBy(p,m);else{let S=a.scrollLeft,C=a.scrollTop;m&&(a.scrollTop+=m),p&&(a.scrollLeft+=p);let E=a.scrollLeft-S,P=a.scrollTop-C;e={left:e.left-E,top:e.top-P,right:e.right-E,bottom:e.bottom-P}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function yE(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=n.root.elementFromPoint(o,s);if(!a||a==n.dom||!n.dom.contains(a))continue;let c=a.getBoundingClientRect();if(c.top>=t-20){r=a,i=c.top;break}}return{refDOM:r,refTop:i,stack:Dw(n.dom)}}function Dw(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=pu(r));return e}function vE({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Pw(t,r==0?0:r-e)}function Pw(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:i,left:o}=n[t];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let aa=null;function bE(n){if(n.setActive)return n.setActive();if(aa)return n.focus(aa);let e=Dw(n);n.focus(aa==null?{get preventScroll(){return aa={preventScroll:!0},!0}}:void 0),aa||(aa=!1,Pw(e,0))}function _w(n,e){let t,r=2e8,i,o=0,s=e.top,a=e.top,c,f;for(let p=n.firstChild,m=0;p;p=p.nextSibling,m++){let S;if(p.nodeType==1)S=p.getClientRects();else if(p.nodeType==3)S=Pi(p).getClientRects();else continue;for(let C=0;C<S.length;C++){let E=S[C];if(E.top<=s&&E.bottom>=a){s=Math.max(E.bottom,s),a=Math.min(E.top,a);let P=E.left>e.left?E.left-e.left:E.right<e.left?e.left-E.right:0;if(P<r){t=p,r=P,i=P&&t.nodeType==3?{left:E.right<e.left?E.right:E.left,top:e.top}:e,p.nodeType==1&&P&&(o=m+(e.left>=(E.left+E.right)/2?1:0));continue}}else E.top>e.top&&!c&&E.left<=e.left&&E.right>=e.left&&(c=p,f={left:Math.max(E.left,Math.min(E.right,e.left)),top:E.top});!t&&(e.left>=E.right&&e.top>=E.top||e.left>=E.left&&e.top>=E.bottom)&&(o=m+1)}}return!t&&c&&(t=c,i=f,r=0),t&&t.nodeType==3?SE(t,i):!t||r&&t.nodeType==1?{node:n,offset:o}:_w(t,i)}function SE(n,e){let t=n.nodeValue.length,r=document.createRange();for(let i=0;i<t;i++){r.setEnd(n,i+1),r.setStart(n,i);let o=Ao(r,1);if(o.top!=o.bottom&&dy(e,o))return{node:n,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}function dy(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function wE(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function xE(n,e,t){let{node:r,offset:i}=_w(e,t),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(r,i,o)}function kE(n,e,t,r){let i=-1;for(let o=e,s=!1;o!=n.dom;){let a=n.docView.nearestDesc(o,!0),c;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((c=a.dom.getBoundingClientRect()).width||c.height)&&(a.node.isBlock&&a.parent&&(!s&&c.left>r.left||c.top>r.top?i=a.posBefore:(!s&&c.right<r.left||c.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return i>-1?i:n.docView.posFromDOM(e,t,-1)}function Nw(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),o=i;;){let s=n.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let c=0;c<a.length;c++){let f=a[c];if(dy(e,f))return Nw(s,e,f)}}if((o=(o+1)%r)==i)break}return n}function CE(n,e){let t=n.dom.ownerDocument,r,i=0,o=dE(t,e.left,e.top);o&&({node:r,offset:i}=o);let s=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),a;if(!s||!n.dom.contains(s.nodeType!=1?s.parentNode:s)){let f=n.dom.getBoundingClientRect();if(!dy(e,f)||(s=Nw(n.dom,e,f),!s))return null}if(tn)for(let f=s;r&&f;f=pu(f))f.draggable&&(r=void 0);if(s=wE(s,e),r){if(vr&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let p=r.childNodes[i],m;p.nodeName=="IMG"&&(m=p.getBoundingClientRect()).right<=e.left&&m.bottom>e.top&&i++}let f;Fu&&i&&r.nodeType==1&&(f=r.childNodes[i-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=kE(n,r,i,e))}a==null&&(a=xE(n,s,e));let c=n.docView.nearestDesc(s,!0);return{pos:a,inside:c?c.posAtStart-c.border:-1}}function Nv(n){return n.top<n.bottom||n.left<n.right}function Ao(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(Nv(r))return r}return Array.prototype.find.call(t,Nv)||n.getBoundingClientRect()}const EE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Fw(n,e,t){let{node:r,offset:i,atom:o}=n.docView.domFromPos(e,t<0?-1:1),s=Fu||vr;if(r.nodeType==3)if(s&&(EE.test(r.nodeValue)||(t<0?!i:i==r.nodeValue.length))){let c=Ao(Pi(r,i,i),t);if(vr&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let f=Ao(Pi(r,i-1,i-1),-1);if(f.top==c.top){let p=Ao(Pi(r,i,i+1),-1);if(p.top!=c.top)return jc(p,p.left<f.left)}}return c}else{let c=i,f=i,p=t<0?1:-1;return t<0&&!i?(f++,p=-1):t>=0&&i==r.nodeValue.length?(c--,p=1):t<0?c--:f++,jc(Ao(Pi(r,c,f),p),p<0)}if(!n.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(t<0||i==Yn(r))){let c=r.childNodes[i-1];if(c.nodeType==1)return Kp(c.getBoundingClientRect(),!1)}if(o==null&&i<Yn(r)){let c=r.childNodes[i];if(c.nodeType==1)return Kp(c.getBoundingClientRect(),!0)}return Kp(r.getBoundingClientRect(),t>=0)}if(o==null&&i&&(t<0||i==Yn(r))){let c=r.childNodes[i-1],f=c.nodeType==3?Pi(c,Yn(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(f)return jc(Ao(f,1),!1)}if(o==null&&i<Yn(r)){let c=r.childNodes[i];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let f=c?c.nodeType==3?Pi(c,0,s?0:1):c.nodeType==1?c:null:null;if(f)return jc(Ao(f,-1),!0)}return jc(Ao(r.nodeType==3?Pi(r):r,-t),t>=0)}function jc(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Kp(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function Lw(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function TE(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return Lw(n,e,()=>{let{node:o}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let a=n.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=Fw(n,i.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let c;if(a.nodeType==1)c=a.getClientRects();else if(a.nodeType==3)c=Pi(a,0,a.nodeValue.length).getClientRects();else continue;for(let f=0;f<c.length;f++){let p=c[f];if(p.bottom>p.top+1&&(t=="up"?s.top-p.top>(p.bottom-s.top)*2:p.bottom-s.bottom>(s.bottom-p.top)*2))return!1}}return!0})}const RE=/[\u0590-\u08ac]/;function AE(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=n.domSelection();return a?!RE.test(r.parent.textContent)||!a.modify?t=="left"||t=="backward"?o:s:Lw(n,e,()=>{let{focusNode:c,focusOffset:f,anchorNode:p,anchorOffset:m}=n.domSelectionRange(),S=a.caretBidiLevel;a.modify("move",t,"character");let C=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:E,focusOffset:P}=n.domSelectionRange(),D=E&&!C.contains(E.nodeType==1?E:E.parentNode)||c==E&&f==P;try{a.collapse(p,m),c&&(c!=p||f!=m)&&a.extend&&a.extend(c,f)}catch{}return S!=null&&(a.caretBidiLevel=S),D}):r.pos==r.start()||r.pos==r.end()}let Fv=null,Lv=null,Bv=!1;function OE(n,e,t){return Fv==e&&Lv==t?Bv:(Fv=e,Lv=t,Bv=t=="up"||t=="down"?TE(n,e,t):AE(n,e,t))}const Xn=0,$v=1,zs=2,Yr=3;class Lu{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=Xn,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let i=this.children[t];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(e==this.contentDOM)o=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=t>Mt(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(t==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!t||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return o}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let i=this.children[t],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof $w){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof Bw&&o.side>=0;r--);if(t<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?Mt(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,t):{node:this.contentDOM,offset:o?Mt(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let c=this.children[a],f=s+c.size;if(i==-1&&e<=f){let p=s+c.border;if(e>=p&&t<=f-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(e,t,p);e=s;for(let m=a;m>0;m--){let S=this.children[m-1];if(S.size&&S.dom.parentNode==this.contentDOM&&!S.emptyChildAt(1)){i=Mt(S.dom)+1;break}e-=S.size}i==-1&&(i=0)}if(i>-1&&(f>t||a==this.children.length-1)){t=f;for(let p=a+1;p<this.children.length;p++){let m=this.children[p];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){o=Mt(m.dom);break}t+=m.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=f}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,i=!1){let o=Math.min(e,t),s=Math.max(e,t);for(let C=0,E=0;C<this.children.length;C++){let P=this.children[C],D=E+P.size;if(o>E&&s<D)return P.setSelection(e-E-P.border,t-E-P.border,r,i);E=D}let a=this.domFromPos(e,e?-1:1),c=t==e?a:this.domFromPos(t,t?-1:1),f=r.root.getSelection(),p=r.domSelectionRange(),m=!1;if((vr||tn)&&e==t){let{node:C,offset:E}=a;if(C.nodeType==3){if(m=!!(E&&C.nodeValue[E-1]==`
6
- `),m&&E==C.nodeValue.length)for(let P=C,D;P;P=P.parentNode){if(D=P.nextSibling){D.nodeName=="BR"&&(a=c={node:D.parentNode,offset:Mt(D)+1});break}let _=P.pmViewDesc;if(_&&_.node&&_.node.isBlock)break}}else{let P=C.childNodes[E-1];m=P&&(P.nodeName=="BR"||P.contentEditable=="false")}}if(vr&&p.focusNode&&p.focusNode!=c.node&&p.focusNode.nodeType==1){let C=p.focusNode.childNodes[p.focusOffset];C&&C.contentEditable=="false"&&(i=!0)}if(!(i||m&&tn)&&Zs(a.node,a.offset,p.anchorNode,p.anchorOffset)&&Zs(c.node,c.offset,p.focusNode,p.focusOffset))return;let S=!1;if((f.extend||e==t)&&!m){f.collapse(a.node,a.offset);try{e!=t&&f.extend(c.node,c.offset),S=!0}catch{}}if(!S){if(e>t){let E=a;a=c,c=E}let C=document.createRange();C.setEnd(c.node,c.offset),C.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(C)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&t>=r:e<s&&t>r){let a=r+o.border,c=s-o.border;if(e>=a&&t<=c){this.dirty=e==r||t==s?zs:$v,e==a&&t==c&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Yr:o.markDirty(e-a,t-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?zs:Yr}r=s}this.dirty=zs}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?zs:$v;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Bw extends Lu{constructor(e,t,r,i){let o,s=t.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!t.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return this.dirty==Xn&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(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 side(){return this.widget.type.side}}class IE extends Lu{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Qs extends Lu{constructor(e,t,r,i,o){super(e,[],r,i),this.mark=t,this.spec=o}static create(e,t,r,i){let o=i.nodeViews[t.type.name],s=o&&o(t,i,r);return(!s||!s.dom)&&(s=rl.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new Qs(e,t,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Yr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Yr&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Xn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Xn}}slice(e,t,r){let i=Qs.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;t<s&&(o=em(o,t,s,r)),e>0&&(o=em(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Ho extends Lu{constructor(e,t,r,i,o,s,a,c,f){super(e,[],o,s),this.node=t,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,t,r,i,o,s){let a=o.nodeViews[t.type.name],c,f=a&&a(t,o,()=>{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,i),p=f&&f.dom,m=f&&f.contentDOM;if(t.isText){if(!p)p=document.createTextNode(t.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:m}=rl.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!m&&!t.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),t.type.spec.draggable&&(p.draggable=!0));let S=p;return p=Uw(p,r,t),f?c=new ME(e,t,r,i,p,m||null,S,f,o,s+1):t.isText?new Oh(e,t,r,i,p,S,o):new Ho(e,t,r,i,p,m||null,S,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>W.empty)}return e}matchesNode(e,t,r){return this.dirty==Xn&&e.eq(this.node)&&Sd(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,c=new PE(this,s&&s.node,e);FE(this.node,this.innerDeco,(f,p,m)=>{f.spec.marks?c.syncToMarks(f.spec.marks,r,e):f.type.side>=0&&!m&&c.syncToMarks(p==this.node.childCount?_e.none:this.node.child(p).marks,r,e),c.placeWidget(f,e,i)},(f,p,m,S)=>{c.syncToMarks(f.marks,r,e);let C;c.findNodeMatch(f,p,m,S)||a&&e.state.selection.from>i&&e.state.selection.to<i+f.nodeSize&&(C=c.findIndexWithChild(o.node))>-1&&c.updateNodeAt(f,p,m,C,e)||c.updateNextNode(f,p,m,e,S,i)||c.addNode(f,p,m,e,i),i+=f.nodeSize}),c.syncToMarks([],r,e),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==zs)&&(s&&this.protectLocalComposition(e,s),zw(this.contentDOM,this.children,e),Oa&&LE(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof ke)||r<t||i>t+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=BE(this.node.content,s,r-t,i-t);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new IE(this,o,t,i);e.input.compositionNodes.push(s),this.children=em(this.children,r,r+i.length,e,s)}update(e,t,r,i){return this.dirty==Yr||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Xn}updateOuterDeco(e){if(Sd(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=jw(this.dom,this.nodeDOM,qg(this.outerDeco,this.node,t),qg(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function zv(n,e,t,r,i){Uw(r,e,n);let o=new Ho(void 0,n,e,t,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Oh extends Ho{constructor(e,t,r,i,o,s,a){super(e,t,r,i,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return this.dirty==Yr||this.dirty!=Xn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Xn||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=Xn,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),o=document.createTextNode(i.text);return new Oh(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Yr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class $w extends Lu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Xn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class ME extends Ho{constructor(e,t,r,i,o,s,a,c,f,p){super(e,t,r,i,o,s,a,f,p),this.spec=c}update(e,t,r,i){if(this.dirty==Yr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,t,r);return o&&this.updateInner(e,t,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,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 zw(n,e,t){let r=n.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==n){for(;a!=r;)r=jv(r),i=!0;r=r.nextSibling}else i=!0,n.insertBefore(a,r);if(s instanceof Qs){let c=r?r.previousSibling:n.lastChild;zw(s.contentDOM,s.children,t),r=c?c.nextSibling:n.firstChild}}for(;r;)r=jv(r),i=!0;i&&t.trackWrites==n&&(t.trackWrites=null)}const qc=function(n){n&&(this.nodeName=n)};qc.prototype=Object.create(null);const js=[new qc];function qg(n,e,t){if(n.length==0)return js;let r=t?js[0]:new qc,i=[r];for(let o=0;o<n.length;o++){let s=n[o].type.attrs;if(s){s.nodeName&&i.push(r=new qc(s.nodeName));for(let a in s){let c=s[a];c!=null&&(t&&i.length==1&&i.push(r=new qc(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+c:a=="style"?r.style=(r.style?r.style+";":"")+c:a!="nodeName"&&(r[a]=c))}}}return i}function jw(n,e,t,r){if(t==js&&r==js)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(o){let c;a&&a.nodeName==s.nodeName&&i!=n&&(c=i.parentNode)&&c.nodeName.toLowerCase()==s.nodeName||(c=document.createElement(s.nodeName),c.pmIsDeco=!0,c.appendChild(i),a=js[0]),i=c}DE(i,a||js[0],s)}return i}function DE(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=t.class?t.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&n.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&n.classList.add(i[o]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)n.style.removeProperty(i[1])}t.style&&(n.style.cssText+=t.style)}}function Uw(n,e,t){return jw(n,n,js,qg(e,t,n.nodeType!=1))}function Sd(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function jv(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class PE{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=_E(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=Xn,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let f=this.top.children[c];if(f.matchesMark(e[o])&&!this.isLocked(f.dom)){a=c;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let c=Qs.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,c=Math.min(this.top.children.length,a+5);a<c;a++){let f=this.top.children[a];if(f.matchesNode(e,t,r)&&!this.preMatch.matched.has(f)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,t,r,i,o){let s=this.top.children[i];return s.dirty==Yr&&s.dom==s.contentDOM&&(s.dirty=zs),s.update(e,t,r,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=t}}updateNextNode(e,t,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let c=this.top.children[a];if(c instanceof Ho){let f=this.preMatch.matched.get(c);if(f!=null&&f!=o)return!1;let p=c.dom,m,S=this.isLocked(p)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=Yr&&Sd(t,c.outerDeco));if(!S&&c.update(e,t,r,i))return this.destroyBetween(this.index,a),c.dom!=p&&(this.changed=!0),this.index++,!0;if(!S&&(m=this.recreateWrapper(c,e,t,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=m,m.contentDOM&&(m.dirty=zs,m.updateChildren(i,s+1),m.dirty=Xn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,i,o,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!Sd(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=Ho.create(this.top,t,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let c of a.children)c.parent=a}return e.destroy(),a}addNode(e,t,r,i,o){let s=Ho.create(this.top,e,t,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new Bw(this.top,e,t,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Qs;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Oh)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((tn||Bt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new $w(this.top,[],r,null);t!=this.top?t.children.push(i):t.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function _E(n,e){let t=e,r=t.children.length,i=n.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let f=t.children[r-1];if(f instanceof Qs)t=f,r=f.children.length;else{a=f,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let c=a.node;if(c){if(c!=n.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}function NE(n,e){return n.type.side-e.type.side}function FE(n,e,t,r){let i=e.locals(n),o=0;if(i.length==0){for(let f=0;f<n.childCount;f++){let p=n.child(f);r(p,i,e.forChild(o,p),f),o+=p.nodeSize}return}let s=0,a=[],c=null;for(let f=0;;){let p,m;for(;s<i.length&&i[s].to==o;){let D=i[s++];D.widget&&(p?(m||(m=[p])).push(D):p=D)}if(p)if(m){m.sort(NE);for(let D=0;D<m.length;D++)t(m[D],f,!!c)}else t(p,f,!!c);let S,C;if(c)C=-1,S=c,c=null;else if(f<n.childCount)C=f,S=n.child(f++);else break;for(let D=0;D<a.length;D++)a[D].to<=o&&a.splice(D--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let E=o+S.nodeSize;if(S.isText){let D=E;s<i.length&&i[s].from<D&&(D=i[s].from);for(let _=0;_<a.length;_++)a[_].to<D&&(D=a[_].to);D<E&&(c=S.cut(D-o),S=S.cut(0,D-o),E=D,C=-1)}else for(;s<i.length&&i[s].to<E;)s++;let P=S.isInline&&!S.isLeaf?a.filter(D=>!D.inline):a.slice();r(S,P,e.forChild(o,S),C),o=E}}function LE(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function BE(n,e,t,r){for(let i=0,o=0;i<n.childCount&&o<=r;){let s=n.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let c=s.text;for(;i<n.childCount;){let f=n.child(i++);if(o+=f.nodeSize,!f.isText)break;c+=f.text}if(o>=t){if(o>=r&&c.slice(r-e.length-a,r-a)==e)return r-e.length;let f=a<r?c.lastIndexOf(e,r-a-1):-1;if(f>=0&&f+e.length+a>=t)return a+f;if(t==r&&c.length>=r+e.length-a&&c.slice(r-a,r-a+e.length)==e)return r}}return-1}function em(n,e,t,r,i){let o=[];for(let s=0,a=0;s<n.length;s++){let c=n[s],f=a,p=a+=c.size;f>=t||p<=e?o.push(c):(f<e&&o.push(c.slice(0,e-f,r)),i&&(o.push(i),i=void 0),p>t&&o.push(c.slice(t-f,c.size,r)))}return o}function hy(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),o=i&&i.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let a=r.resolve(s),c,f;if(Ah(t)){for(c=s;i&&!i.node;)i=i.parent;let m=i.node;if(i&&m.isAtom&&he.isSelectable(m)&&i.parent&&!(m.isInline&&uE(t.focusNode,t.focusOffset,i.dom))){let S=i.posBefore;f=new he(s==S?a:r.resolve(S))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let m=s,S=s;for(let C=0;C<t.rangeCount;C++){let E=t.getRangeAt(C);m=Math.min(m,n.docView.posFromDOM(E.startContainer,E.startOffset,1)),S=Math.max(S,n.docView.posFromDOM(E.endContainer,E.endOffset,-1))}if(m<0)return null;[c,s]=S==n.state.selection.anchor?[S,m]:[m,S],a=r.resolve(s)}else c=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(c<0)return null}let p=r.resolve(c);if(!f){let m=e=="pointer"||n.state.selection.head<a.pos&&!o?1:-1;f=py(n,p,a,m)}return f}function Ww(n){return n.editable?n.hasFocus():Vw(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Fi(n,e=!1){let t=n.state.selection;if(Hw(n,t),!!Ww(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&Bt){let r=n.domSelectionRange(),i=n.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Zs(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)zE(n);else{let{anchor:r,head:i}=t,o,s;Uv&&!(t instanceof ke)&&(t.$from.parent.inlineContent||(o=Wv(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=Wv(n,t.to))),n.docView.setSelection(r,i,n,e),Uv&&(o&&Hv(o),s&&Hv(s)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&$E(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const Uv=tn||Bt&&Mw<63;function Wv(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),i=r<t.childNodes.length?t.childNodes[r]:null,o=r?t.childNodes[r-1]:null;if(tn&&i&&i.contentEditable=="false")return Xp(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return Xp(i);if(o)return Xp(o)}}function Xp(n){return n.contentEditable="true",tn&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Hv(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function $E(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,i=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Ww(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function zE(n){let e=n.domSelection(),t=document.createRange();if(!e)return;let r=n.cursorWrapper.dom,i=r.nodeName=="IMG";i?t.setStart(r.parentNode,Mt(r)+1):t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!i&&!n.state.selection.visible&&vn&&Wo<=11&&(r.disabled=!0,r.disabled=!1)}function Hw(n,e){if(e instanceof he){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Vv(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Vv(n)}function Vv(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function py(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||ke.between(e,t,r)}function Gv(n){return n.editable&&!n.hasFocus()?!1:Vw(n)}function Vw(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function jE(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Zs(e.node,e.offset,t.anchorNode,t.anchorOffset)}function tm(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),o=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return o&&me.findFrom(o,e)}function Oo(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Jv(n,e,t){let r=n.state.selection;if(r instanceof ke)if(t.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=n.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Oo(n,new ke(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=tm(n.state,e);return i&&i instanceof he?Oo(n,i):!1}else if(!(Jn&&t.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let a=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM?he.isSelectable(o)?Oo(n,new he(e<0?n.state.doc.resolve(i.pos-o.nodeSize):i)):Fu?Oo(n,new ke(n.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof he&&r.node.isInline)return Oo(n,new ke(e>0?r.$to:r.$from));{let i=tm(n.state,e);return i?Oo(n,i):!1}}}function wd(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function eu(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function ca(n,e){return e<0?UE(n):WE(n)}function UE(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,o,s=!1;for(vr&&t.nodeType==1&&r<wd(t)&&eu(t.childNodes[r],-1)&&(s=!0);;)if(r>0){if(t.nodeType!=1)break;{let a=t.childNodes[r-1];if(eu(a,-1))i=t,o=--r;else if(a.nodeType==3)t=a,r=t.nodeValue.length;else break}}else{if(Gw(t))break;{let a=t.previousSibling;for(;a&&eu(a,-1);)i=t.parentNode,o=Mt(a),a=a.previousSibling;if(a)t=a,r=wd(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?nm(n,t,r):i&&nm(n,i,o)}function WE(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=wd(t),o,s;for(;;)if(r<i){if(t.nodeType!=1)break;let a=t.childNodes[r];if(eu(a,1))o=t,s=++r;else break}else{if(Gw(t))break;{let a=t.nextSibling;for(;a&&eu(a,1);)o=a.parentNode,s=Mt(a)+1,a=a.nextSibling;if(a)t=a,r=0,i=wd(t);else{if(t=t.parentNode,t==n.dom)break;r=i=0}}}o&&nm(n,o,s)}function Gw(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function HE(n,e){for(;n&&e==n.childNodes.length&&!Nu(n);)e=Mt(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function VE(n,e){for(;n&&!e&&!Nu(n);)e=Mt(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function nm(n,e,t){if(e.nodeType!=3){let o,s;(s=HE(e,t))?(e=s,t=0):(o=VE(e,t))&&(e=o,t=o.nodeValue.length)}let r=n.domSelection();if(!r)return;if(Ah(r)){let o=document.createRange();o.setEnd(e,t),o.setStart(e,t),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:i}=n;setTimeout(()=>{n.state==i&&Fi(n)},50)}function Yv(n,e){let t=n.state.doc.resolve(e);if(!(Bt||hE)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let o=n.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<t.end()){let o=n.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Kv(n,e,t){let r=n.state.selection;if(r instanceof ke&&!r.empty||t.indexOf("s")>-1||Jn&&t.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=tm(n.state,e);if(s&&s instanceof he)return Oo(n,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Kn?me.near(s,e):me.findFrom(s,e);return a?Oo(n,a):!1}return!1}function Xv(n,e){if(!(n.state.selection instanceof ke))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function Zv(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function GE(n){if(!tn||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Zv(n,r,"true"),setTimeout(()=>Zv(n,r,"false"),20)}return!1}function JE(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function YE(n,e){let t=e.keyCode,r=JE(e);if(t==8||Jn&&t==72&&r=="c")return Xv(n,-1)||ca(n,-1);if(t==46&&!e.shiftKey||Jn&&t==68&&r=="c")return Xv(n,1)||ca(n,1);if(t==13||t==27)return!0;if(t==37||Jn&&t==66&&r=="c"){let i=t==37?Yv(n,n.state.selection.from)=="ltr"?-1:1:-1;return Jv(n,i,r)||ca(n,i)}else if(t==39||Jn&&t==70&&r=="c"){let i=t==39?Yv(n,n.state.selection.from)=="ltr"?1:-1:1;return Jv(n,i,r)||ca(n,i)}else{if(t==38||Jn&&t==80&&r=="c")return Kv(n,-1,r)||ca(n,-1);if(t==40||Jn&&t==78&&r=="c")return GE(n)||Kv(n,1,r)||ca(n,1);if(r==(Jn?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Jw(n,e){n.someProp("transformCopied",C=>{e=C(e,n)});let t=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let C=r.firstChild;t.push(C.type.name,C.attrs!=C.type.defaultAttrs?C.attrs:null),r=C.content}let s=n.someProp("clipboardSerializer")||rl.fromSchema(n.state.schema),a=qw(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let f=c.firstChild,p,m=0;for(;f&&f.nodeType==1&&(p=Qw[f.nodeName.toLowerCase()]);){for(let C=p.length-1;C>=0;C--){let E=a.createElement(p[C]);for(;c.firstChild;)E.appendChild(c.firstChild);c.appendChild(E),m++}f=c.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${i} ${o}${m?` -${m}`:""} ${JSON.stringify(t)}`);let S=n.someProp("clipboardTextSerializer",C=>C(e,n))||e.content.textBetween(0,e.content.size,`
1
+ "use strict";const rl=require("react"),xC=require("react-dom");function It(n){this.content=n}It.prototype={constructor:It,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new It(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new It(t)},addToStart:function(n,e){return new It([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new It(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new It(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=It.from(n),n.size?new It(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=It.from(n),n.size?new It(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=It.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};It.from=function(n){if(n instanceof It)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new It(e)};function aw(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=aw(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function cw(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),c=s.nodeSize;if(s==a){t-=c,r-=c;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let f=0,p=Math.min(s.text.length,a.text.length);for(;f<p&&s.text[s.text.length-f-1]==a.text[a.text.length-f-1];)f++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let f=cw(s.content,a.content,t-1,r-1);if(f)return f}t-=c,r-=c}}class W{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let c=this.content[s],f=a+c.nodeSize;if(f>e&&r(c,i+a,o||null,s)!==!1&&c.content.size){let p=a+1;c.nodesBetween(Math.max(0,e-p),Math.min(c.content.size,t-p),r,i+p)}a=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,c)=>{let f=a.isText?a.text.slice(Math.max(e,c)-c,t-c):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&f||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=f},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new W(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],c=s+a.nodeSize;c>e&&((s<e||c>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=c}return new W(r,i)}cutByIndex(e,t){return e==t?W.empty:e==0&&t==this.content.length?this:new W(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new W(i,o)}addToStart(e){return new W([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new W(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return aw(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return cw(this,e,t,r)}findIndex(e,t=-1){if(e==0)return Mf(0,e);if(e==this.size)return Mf(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||t>0?Mf(r+1,s):Mf(r,i);i=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,t){if(!t)return W.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new W(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return W.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new W(t||e,r)}static from(e){if(!e)return W.empty;if(e instanceof W)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new W([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}W.empty=new W([],0);const Gp={index:0,offset:0};function Mf(n,e){return Gp.index=n,Gp.offset=e,Gp}function Sd(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Sd(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Sd(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}class _e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Sd(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return _e.none;if(e instanceof _e)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}}_e.none=[];class wd extends Error{}class ee{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=fw(this.content,e+this.openStart,t);return r&&new ee(r,this.openStart,this.openEnd)}removeBetween(e,t){return new ee(uw(this.content,e+this.openStart,t+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,t){if(!t)return ee.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ee(W.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new ee(e,r,i)}}ee.empty=new ee(W.empty,0,0);function uw(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(uw(o.content,e-i-1,t-i-1)))}function fw(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return n.cut(0,e).append(t).append(n.cut(e));let a=fw(s.content,e-o-1,t);return a&&n.replaceChild(i,s.copy(a))}function kC(n,e,t){if(t.openStart>n.depth)throw new wd("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new wd("Inconsistent open depths");return dw(n,e,t,0)}function dw(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=dw(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return Hs(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=CC(t,n);return Hs(o,pw(n,s,a,e,r))}else return Hs(o,xd(n,e,r))}function hw(n,e){if(!e.type.compatibleContent(n.type))throw new wd("Cannot join "+e.type.name+" onto "+n.type.name)}function Kg(n,e,t){let r=n.node(t);return hw(r,e.node(t)),r}function Ws(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function eu(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(Ws(n.nodeAfter,r),o++));for(let a=o;a<s;a++)Ws(i.child(a),r);e&&e.depth==t&&e.textOffset&&Ws(e.nodeBefore,r)}function Hs(n,e){return n.type.checkContent(e),n.copy(e)}function pw(n,e,t,r,i){let o=n.depth>i&&Kg(n,e,i+1),s=r.depth>i&&Kg(t,r,i+1),a=[];return eu(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(hw(o,s),Ws(Hs(o,pw(n,e,t,r,i+1)),a)):(o&&Ws(Hs(o,xd(n,e,i+1)),a),eu(e,t,i,a),s&&Ws(Hs(s,xd(t,r,i+1)),a)),eu(r,null,i,a),new W(a)}function xd(n,e,t){let r=[];if(eu(null,n,t,r),n.depth>t){let i=Kg(n,e,t+1);Ws(Hs(i,xd(n,e,t+1)),r)}return eu(e,null,t,r),new W(r)}function CC(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(W.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class pu{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _e.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new gu(this,e,r);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<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:c}=s.content.findIndex(o),f=o-c;if(r.push(s,a,i+c),!f||(s=s.child(a),s.isText))break;o=f-1,i+=c+1}return new pu(t,r,o)}static resolveCached(e,t){let r=vv.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else vv.set(e,r=new EC);let i=r.elts[r.i]=pu.resolve(e,t);return r.i=(r.i+1)%TC,i}}class EC{constructor(){this.elts=[],this.i=0}}const TC=12,vv=new WeakMap;class gu{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const RC=Object.create(null);class mr{constructor(e,t,r,i=_e.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||W.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Sd(this.attrs,t||e.defaultAttrs||RC)&&_e.sameSet(this.marks,r||_e.none)}copy(e=null){return e==this.content?this:new mr(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new mr(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return ee.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),f=i.node(s).content.cut(i.pos-a,o.pos-a);return new ee(f,i.depth-s,o.depth-s)}replace(e,t,r){return kC(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return pu.resolveCached(this,e)}resolveNoCache(e){return pu.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.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()+")"),gw(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=W.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let c=i;c<o;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_e.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=W.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}mr.prototype.text=void 0;class kd extends mr{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):gw(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new kd(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new kd(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function gw(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Xs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new AC(e,t);if(r.next==null)return Xs.empty;let i=mw(r);r.next&&r.err("Unexpected trailing text");let o=NC(_C(i));return FC(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,a){let c=s.matchFragment(e,r);if(c&&(!t||c.validEnd))return W.from(a.map(f=>f.createAndFill()));for(let f=0;f<s.next.length;f++){let{type:p,next:m}=s.next[f];if(!(p.isText||p.hasRequiredAttrs())&&i.indexOf(m)==-1){i.push(m);let S=o(m,a.concat(p));if(S)return S}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:c}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||c.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
2
+ `)}}Xs.empty=new Xs(!0);class AC{constructor(e,t){this.string=e,this.nodeTypes=t,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 mw(n){let e=[];do e.push(OC(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function OC(n){let e=[];do e.push(IC(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function IC(n){let e=PC(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=MC(n,e);else break;return e}function bv(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function MC(n,e){let t=bv(n),r=t;return n.eat(",")&&(n.next!="}"?r=bv(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function DC(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function PC(n){if(n.eat("(")){let e=mw(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=DC(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function _C(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,a,c){let f={term:c,to:a};return e[s].push(f),f}function i(s,a){s.forEach(c=>c.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((c,f)=>c.concat(o(f,a)),[]);if(s.type=="seq")for(let c=0;;c++){let f=o(s.exprs[c],a);if(c==s.exprs.length-1)return f;i(f,a=t())}else if(s.type=="star"){let c=t();return r(a,c),i(o(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=t();return i(o(s.expr,a),c),i(o(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let c=a;for(let f=0;f<s.min;f++){let p=t();i(o(s.expr,c),p),c=p}if(s.max==-1)i(o(s.expr,c),c);else for(let f=s.min;f<s.max;f++){let p=t();r(c,p),i(o(s.expr,c),p),c=p}return[r(c)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function yw(n,e){return e-n}function Sv(n,e){let t=[];return r(e),t.sort(yw);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:a,to:c}=o[s];!a&&t.indexOf(c)==-1&&r(c)}}}function NC(n){let e=Object.create(null);return t(Sv(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:a,to:c})=>{if(!a)return;let f;for(let p=0;p<i.length;p++)i[p][0]==a&&(f=i[p][1]);Sv(n,c).forEach(p=>{f||i.push([a,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let o=e[r.join(",")]=new Xs(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(yw);o.next.push({type:i[s][0],next:e[a.join(",")]||t(a)})}return o}}function FC(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:c,next:f}=i.next[a];s.push(c.name),o&&!(c.isText||c.hasRequiredAttrs())&&(o=!1),r.indexOf(f)==-1&&r.push(f)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function vw(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function bw(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function Sw(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in n){let o=n[i];o.validate&&o.validate(e[i])}}function ww(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new BC(n,r,e[r]);return t}let wv=class xw{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ww(e,r.attrs),this.defaultAttrs=vw(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Xs.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-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:bw(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new mr(this,this.computeAttrs(e),W.from(t),_e.setFrom(r))}createChecked(e=null,t,r){return t=W.from(t),this.checkContent(t),new mr(this,this.computeAttrs(e),t,_e.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=W.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(W.empty,!0);return o?new mr(this,e,t.append(o),_e.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Sw(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:_e.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new xw(o,t,s));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function LC(n,e,t){let r=t.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class BC{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?LC(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ih{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=ww(e,i.attrs),this.excluded=null;let o=vw(this.attrs);this.instance=o?new _e(this,o):null}create(e=null){return!e&&this.instance?this.instance:new _e(this,bw(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Ih(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Sw(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class $C{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=It.from(e.nodes),t.marks=It.from(e.marks||{}),this.nodes=wv.compile(this.spec.nodes,this),this.marks=Ih.compile(this.spec.marks,this);let r=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 o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=Xs.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?xv(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:xv(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof wv){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(t,r,i)}text(e,t){let r=this.nodes.text;return new kd(r,r.defaultAttrs,e,_e.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return mr.fromJSON(this,e)}markFromJSON(e){return _e.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function xv(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let a in n.marks){let c=n.marks[a];(i=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function zC(n){return n.tag!=null}function jC(n){return n.style!=null}let ay=class Xg{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(zC(i))this.tags.push(i);else if(jC(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new Cv(this,t,!1);return r.addAll(e,_e.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Cv(this,t,!0);return r.addAll(e,_e.none,t.from,t.to),ee.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(HC(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(s.getAttrs){let c=s.getAttrs(t);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let a=t[s];if((a.priority==null?50:a.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ev(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ev(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Xg(e,Xg.schemaRules(e)))}};const kw={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},UC={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Cw={ol:!0,ul:!0},mu=1,Zg=2,tu=4;function kv(n,e,t){return e!=null?(e?mu:0)|(e==="full"?Zg:0):n&&n.whitespace=="pre"?mu|Zg:t&~tu}class Df{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=_e.none,this.match=o||(s&tu?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(W.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&mu)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=W.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(W.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!kw.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Cv{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,o,s=kv(null,t.preserveWhitespace,0)|(r?tu:0);i?o=new Df(i.type,i.attrs,_e.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new Df(null,null,_e.none,!0,null,s):o=new Df(e.schema.topNodeType,null,_e.none,!0,null,s),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,o=i.options&Zg?"full":this.localPreserveWS||(i.options&mu)>0;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)o!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
3
+ `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],a=e.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;Cw.hasOwnProperty(s)&&this.parser.normalizeLists&&WC(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(c?c.ignore:UC.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let f,p=this.needsBlock;if(kw.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),f=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let m=c&&c.skip?t:this.readStyles(e,t);m&&this.addAll(e,m),f&&this.sync(o),this.needsBlock=p}else{let f=this.readStyles(e,t);f&&this.addElementByRule(e,c,f,c.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
+ `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let c=this.parser.matchStyle(o,s,this,a);if(!c)break;if(c.ignore)return null;if(c.clearMark?t=t.filter(f=>!c.clearMark(f)):t=t.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)a=c;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r)||this.leafFallback(e,r);else{let c=this.enter(s,t.attrs||null,r,t.preserveWhitespace);c&&(o=!0,r=c)}else{let c=this.parser.schema.marks[t.mark];r=r.concat(c.create(t.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(c=>this.insertNode(c,r));else{let c=e;typeof t.contentElement=="string"?c=e.querySelector(t.contentElement):typeof t.contentElement=="function"?c=t.contentElement(e):t.contentElement&&(c=t.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!1)}o&&this.sync(a)&&this.open--}addAll(e,t,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],a=s.findWrapping(e);if(a&&(!r||r.length>a.length)&&(r=a,i=s,!a.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)t=this.enterInner(r[o],null,t,!1);return t}insertNode(e,t){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let r=this.findPlace(e,t);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=_e.none;for(let s of r.concat(e.marks))(i.type?i.type.allowsMarkType(s.type):Tv(s.type,e.type))&&(o=s.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,i){let o=this.findPlace(e.create(t),r);return o&&(o=this.enterInner(e,t,r,!0,i)),o}enterInner(e,t,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=kv(e,o,s.options);s.options&tu&&s.content.length==0&&(a|=tu);let c=_e.none;return r=r.filter(f=>(s.type?s.type.allowsMarkType(f.type):Tv(f.type,e))?(c=f.addToSet(c),!1):!0),this.nodes.push(new Df(e,t,c,i,null,a)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=mu)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,c)=>{for(;a>=0;a--){let f=t[a];if(f==""){if(a==t.length-1||a==0)continue;for(;c>=o;c--)if(s(a-1,c))return!0;return!1}else{let p=c>0||c==0&&i?this.nodes[c].type:r&&c>=o?r.node(c-o).type:null;if(!p||p.name!=f&&!p.isInGroup(f))return!1;c--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function WC(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Cw.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function HC(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Ev(n){let e={};for(let t in n)e[t]=n[t];return e}function Tv(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let c=0;c<a.edgeCount;c++){let{type:f,next:p}=a.edge(c);if(f==e||o.indexOf(p)<0&&s(p))return!0}};if(s(i.contentMatch))return!0}}class il{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Jp(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,c=0;for(;a<o.length&&c<s.marks.length;){let f=s.marks[c];if(!this.marks[f.type.name]){c++;continue}if(!f.eq(o[a][0])||f.type.spec.spanning===!1)break;a++,c++}for(;a<o.length;)i=o.pop()[1];for(;c<s.marks.length;){let f=s.marks[c++],p=this.serializeMark(f,s.isInline,t);p&&(o.push([f,i]),i.appendChild(p.dom),i=p.contentDOM||p.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=qf(Jp(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&qf(Jp(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return qf(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new il(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Rv(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Rv(e.marks)}}function Rv(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Jp(n){return n.document||window.document}const Av=new WeakMap;function VC(n){let e=Av.get(n);return e===void 0&&Av.set(n,e=GC(n)),e}function GC(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function qf(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=VC(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let a,c=t?n.createElementNS(t,i):n.createElement(i),f=e[1],p=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){p=2;for(let m in f)if(f[m]!=null){let S=m.indexOf(" ");S>0?c.setAttributeNS(m.slice(0,S),m.slice(S+1),f[m]):c.setAttribute(m,f[m])}}for(let m=p;m<e.length;m++){let S=e[m];if(S===0){if(m<e.length-1||m>p)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:C,contentDOM:E}=qf(n,S,t,r);if(c.appendChild(C),E){if(a)throw new RangeError("Multiple content holes");a=E}}}return{dom:c,contentDOM:a}}const Ew=65535,Tw=Math.pow(2,16);function JC(n,e){return n+e*Tw}function Ov(n){return n&Ew}function YC(n){return(n-(n&Ew))/Tw}const Rw=1,Aw=2,ed=4,Ow=8;class Qg{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ow)>0}get deletedBefore(){return(this.delInfo&(Rw|ed))>0}get deletedAfter(){return(this.delInfo&(Aw|ed))>0}get deletedAcross(){return(this.delInfo&ed)>0}}class Rn{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Rn.empty)return Rn.empty}recover(e){let t=0,r=Ov(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+YC(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?i:0);if(c>e)break;let f=this.ranges[a+o],p=this.ranges[a+s],m=c+f;if(e<=m){let S=f?e==c?-1:e==m?1:t:t,C=c+i+(S<0?0:p);if(r)return C;let E=e==(t<0?c:m)?null:JC(a/3,e-c),P=e==c?Aw:e==m?Rw:ed;return(t<0?e!=c:e!=m)&&(P|=Ow),new Qg(C,P,E)}i+=p-f}return r?e+i:new Qg(e+i,0,null)}touches(e,t){let r=0,i=Ov(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?r:0);if(c>e)break;let f=this.ranges[a+o],p=c+f;if(e<=p&&a==i*3)return!0;r+=this.ranges[a+s]-f}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),c=s+(this.inverted?0:o),f=this.ranges[i+t],p=this.ranges[i+r];e(a,a+f,c,c+p),o+=p-f}}invert(){return new Rn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Rn.empty:new Rn(e<0?[0,-e,0]:[0,0,e])}}Rn.empty=new Rn([]);class wa{constructor(e=[],t,r=0,i=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=i}slice(e=0,t=this.maps.length){return new wa(this.maps,this.mirror,e,t)}copy(){return new wa(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let i=e.getMirror(t);this.appendMap(e.maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e.maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new wa;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],a=s.mapResult(e,t);if(a.recover!=null){let c=this.getMirror(o);if(c!=null&&c>o&&c<this.to){o=c,e=this.maps[c].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new Qg(e,i,null)}}const Yp=Object.create(null);class Wt{getMap(){return Rn.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Yp[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Yp)throw new RangeError("Duplicate use of step JSON ID "+e);return Yp[e]=t,t.prototype.jsonID=e,t}}class st{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new st(e,null)}static fail(e){return new st(null,e)}static fromReplace(e,t,r,i){try{return st.ok(e.replace(t,r,i))}catch(o){if(o instanceof wd)return st.fail(o.message);throw o}}}function cy(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(cy(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return W.fromArray(r)}class Bo extends Wt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new ee(cy(t.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return st.fromReplace(e,this.from,this.to,o)}invert(){return new Hr(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Bo(t.pos,r.pos,this.mark)}merge(e){return e instanceof Bo&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Bo(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Bo(t.from,t.to,e.markFromJSON(t.mark))}}Wt.jsonID("addMark",Bo);class Hr extends Wt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new ee(cy(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return st.fromReplace(e,this.from,this.to,r)}invert(){return new Bo(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Hr(t.pos,r.pos,this.mark)}merge(e){return e instanceof Hr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Hr(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Hr(t.from,t.to,e.markFromJSON(t.mark))}}Wt.jsonID("removeMark",Hr);class $o extends Wt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return st.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return st.fromReplace(e,this.pos,this.pos+1,new ee(W.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new $o(this.pos,t.marks[i]);return new $o(this.pos,this.mark)}}return new Oa(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new $o(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new $o(t.pos,e.markFromJSON(t.mark))}}Wt.jsonID("addNodeMark",$o);class Oa extends Wt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return st.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return st.fromReplace(e,this.pos,this.pos+1,new ee(W.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new $o(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Oa(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Oa(t.pos,e.markFromJSON(t.mark))}}Wt.jsonID("removeNodeMark",Oa);class bt extends Wt{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&qg(e,this.from,this.to)?st.fail("Structure replace would overwrite content"):st.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Rn([this.from,this.to-this.from,this.slice.size])}invert(e){return new bt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new bt(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof bt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?ee.empty:new ee(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new bt(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?ee.empty:new ee(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new bt(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new bt(t.from,t.to,ee.fromJSON(e,t.slice),!!t.structure)}}Wt.jsonID("replace",bt);class St extends Wt{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(qg(e,this.from,this.gapFrom)||qg(e,this.gapTo,this.to)))return st.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return st.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?st.fromReplace(e,this.from,this.to,r):st.fail("Content does not fit in gap")}getMap(){return new Rn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new St(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new St(t.pos,r.pos,i,o,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new St(t.from,t.to,t.gapFrom,t.gapTo,ee.fromJSON(e,t.slice),t.insert,!!t.structure)}}Wt.jsonID("replaceAround",St);function qg(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function KC(n,e,t,r){let i=[],o=[],s,a;n.doc.nodesBetween(e,t,(c,f,p)=>{if(!c.isInline)return;let m=c.marks;if(!r.isInSet(m)&&p.type.allowsMarkType(r.type)){let S=Math.max(f,e),C=Math.min(f+c.nodeSize,t),E=r.addToSet(m);for(let P=0;P<m.length;P++)m[P].isInSet(E)||(s&&s.to==S&&s.mark.eq(m[P])?s.to=C:i.push(s=new Hr(S,C,m[P])));a&&a.to==S?a.to=C:o.push(a=new Bo(S,C,r))}}),i.forEach(c=>n.step(c)),o.forEach(c=>n.step(c))}function XC(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let c=null;if(r instanceof Ih){let f=s.marks,p;for(;p=r.isInSet(f);)(c||(c=[])).push(p),f=p.removeFromSet(f)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let f=Math.min(a+s.nodeSize,t);for(let p=0;p<c.length;p++){let m=c[p],S;for(let C=0;C<i.length;C++){let E=i[C];E.step==o-1&&m.eq(i[C].style)&&(S=E)}S?(S.to=f,S.step=o):i.push({style:m,from:Math.max(a,e),to:f,step:o})}}}),i.forEach(s=>n.step(new Hr(s.from,s.to,s.style)))}function uy(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],a=e+1;for(let c=0;c<o.childCount;c++){let f=o.child(c),p=a+f.nodeSize,m=r.matchType(f.type);if(!m)s.push(new bt(a,p,ee.empty));else{r=m;for(let S=0;S<f.marks.length;S++)t.allowsMarkType(f.marks[S].type)||n.step(new Hr(a,p,f.marks[S]));if(i&&f.isText&&t.whitespace!="pre"){let S,C=/\r?\n|\r/g,E;for(;S=C.exec(f.text);)E||(E=new ee(W.from(t.schema.text(" ",t.allowedMarks(f.marks))),0,0)),s.push(new bt(a+S.index,a+S.index+S[0].length,E))}}a=p}if(!r.validEnd){let c=r.fillBefore(W.empty,!0);n.replace(a,a,new ee(c,0,0))}for(let c=s.length-1;c>=0;c--)n.step(s[c])}function ZC(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Ua(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let i=n.$from.node(r),o=n.$from.index(r),s=n.$to.indexAfter(r);if(r<n.depth&&i.canReplace(o,s,t))return r;if(r==0||i.type.spec.isolating||!ZC(i,o,s))break}return null}function QC(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),c=s,f=a,p=W.empty,m=0;for(let E=o,P=!1;E>t;E--)P||r.index(E)>0?(P=!0,p=W.from(r.node(E).copy(p)),m++):c--;let S=W.empty,C=0;for(let E=o,P=!1;E>t;E--)P||i.after(E+1)<i.end(E)?(P=!0,S=W.from(i.node(E).copy(S)),C++):f++;n.step(new St(c,f,s,a,new ee(p.append(S),m,C),p.size-m,!0))}function fy(n,e,t=null,r=n){let i=qC(n,e),o=i&&eE(r,e);return o?i.map(Iv).concat({type:e,attrs:t}).concat(o.map(Iv)):null}function Iv(n){return{type:n,attrs:null}}function qC(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function eE(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let c=(s.length?s[s.length-1]:e).contentMatch;for(let f=r;c&&f<i;f++)c=c.matchType(t.child(f).type);return!c||!c.validEnd?null:s}function tE(n,e,t){let r=W.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let a=t[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=W.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new St(i,o,i,o,new ee(r,0,0),t.length,!0))}function nE(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{let c=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,c)&&rE(n.doc,n.mapping.slice(o).map(a),r)){let f=null;if(r.schema.linebreakReplacement){let C=r.whitespace=="pre",E=!!r.contentMatch.matchType(r.schema.linebreakReplacement);C&&!E?f=!1:!C&&E&&(f=!0)}f===!1&&Mw(n,s,a,o),uy(n,n.mapping.slice(o).map(a,1),r,void 0,f===null);let p=n.mapping.slice(o),m=p.map(a,1),S=p.map(a+s.nodeSize,1);return n.step(new St(m,S,m+1,S-1,new ee(W.from(r.create(c,null,s.marks)),0,0),1,!0)),f===!0&&Iw(n,s,a,o),!1}})}function Iw(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let c=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function Mw(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(`
5
+ `))}})}function rE(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function iE(n,e,t,r,i){let o=n.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);let s=t.create(r,null,i||o.marks);if(o.isLeaf)return n.replaceWith(e,e+o.nodeSize,s);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new St(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new ee(W.from(s),0,0),1,!0))}function dy(n,e,t=1,r){let i=n.resolve(e),o=i.depth-t,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let f=i.depth-1,p=t-2;f>o;f--,p--){let m=i.node(f),S=i.index(f);if(m.type.spec.isolating)return!1;let C=m.content.cutByIndex(S,m.childCount),E=r&&r[p+1];E&&(C=C.replaceChild(0,E.type.create(E.attrs)));let P=r&&r[p]||m;if(!m.canReplace(S+1,m.childCount)||!P.type.validContent(C))return!1}let a=i.indexAfter(o),c=r&&r[0];return i.node(o).canReplaceWith(a,a,c?c.type:i.node(o+1).type)}function oE(n,e,t=1,r){let i=n.doc.resolve(e),o=W.empty,s=W.empty;for(let a=i.depth,c=i.depth-t,f=t-1;a>c;a--,f--){o=W.from(i.node(a).copy(o));let p=r&&r[f];s=W.from(p?p.type.create(p.attrs,s):i.node(a).copy(s))}n.step(new bt(e,e,new ee(o.append(s),t,t),!0))}function Wa(n,e){let t=n.resolve(e),r=t.index();return Dw(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function sE(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),s=o.type==r?n.type.schema.nodes.text:o.type;if(t=t.matchType(s),!t||!n.type.allowsMarks(o.marks))return!1}return t.validEnd}function Dw(n,e){return!!(n&&e&&!n.isLeaf&&sE(n,e))}function hy(n,e,t=-1){let r=n.resolve(e);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):t>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&Dw(o,s)&&r.node(i).canReplace(a,a+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function lE(n,e,t){let r=null,{linebreakReplacement:i}=n.doc.type.schema,o=n.doc.resolve(e-t),s=o.node().type;if(i&&s.inlineContent){let p=s.whitespace=="pre",m=!!s.contentMatch.matchType(i);p&&!m?r=!1:!p&&m&&(r=!0)}let a=n.steps.length;if(r===!1){let p=n.doc.resolve(e+t);Mw(n,p.node(),p.before(),a)}s.inlineContent&&uy(n,e+t-1,s,o.node().contentMatchAt(o.index()),r==null);let c=n.mapping.slice(a),f=c.map(e-t);if(n.step(new bt(f,c.map(e+t,-1),ee.empty,!0)),r===!0){let p=n.doc.resolve(f);Iw(n,p.node(),p.before(),n.steps.length)}return n}function aE(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,t))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,t))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function Pw(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let i=t.content;for(let o=0;o<t.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(t.openStart==0&&t.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(a>0?1:0),f=r.node(s),p=!1;if(o==1)p=f.canReplace(c,c,i);else{let m=f.contentMatchAt(c).findWrapping(i.firstChild.type);p=m&&f.canReplaceWith(c,c,m[0])}if(p)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Mh(n,e,t=e,r=ee.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),o=n.resolve(t);return _w(i,o,r)?new bt(e,t,r):new cE(i,o,r).fit()}function _w(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class cE{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=W.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=W.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let c=new ee(o,s,a);return e>-1?new St(r.pos,e,this.$to.pos,this.$to.end(),c,t):c.size||r.pos!=this.$to.pos?new bt(r.pos,i.pos,c):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=t.firstChild;if(t.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}t=o.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Kp(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:c,match:f}=this.frontier[a],p,m=null;if(t==1&&(s?f.matchType(s.type)||(m=f.fillBefore(W.from(s),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:m};if(t==2&&s&&(p=f.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:p};if(o&&f.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Kp(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new ee(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Kp(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new ee(Xc(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new ee(Xc(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let P=0;P<o.length;P++)this.openFrontierNode(o[P]);let s=this.unplaced,a=r?r.content:s.content,c=s.openStart-e,f=0,p=[],{match:m,type:S}=this.frontier[t];if(i){for(let P=0;P<i.childCount;P++)p.push(i.child(P));m=m.matchFragment(i)}let C=a.size+e-(s.content.size-s.openEnd);for(;f<a.childCount;){let P=a.child(f),D=m.matchType(P.type);if(!D)break;f++,(f>1||c==0||P.content.size)&&(m=D,p.push(Nw(P.mark(S.allowedMarks(P.marks)),f==1?c:0,f==a.childCount?C:-1)))}let E=f==a.childCount;E||(C=-1),this.placed=Zc(this.placed,t,W.from(p)),this.frontier[t].match=m,E&&C<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let P=0,D=a;P<C;P++){let _=D.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),D=_.content}this.unplaced=E?e==0?ee.empty:new ee(Xc(s.content,e-1,1),e-1,C<0?s.openEnd:e-1):new ee(Xc(s.content,e,f),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Xp(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=Xp(e,t,i,r,o);if(s){for(let a=t-1;a>=0;a--){let{match:c,type:f}=this.frontier[a],p=Xp(e,a,f,c,!0);if(!p||p.childCount)continue e}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Zc(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Zc(this.placed,this.depth,W.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(W.empty,!0);t.childCount&&(this.placed=Zc(this.placed,this.frontier.length,t))}}function Xc(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Xc(n.firstChild.content,e-1,t)))}function Zc(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Zc(n.lastChild.content,e-1,t)))}function Kp(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Nw(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Nw(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(W.empty,!0)))),n.copy(r)}function Xp(n,e,t,r,i){let o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!uE(t,o.content,s)?a:null}function uE(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function fE(n){return n.spec.defining||n.spec.definingForContent}function dE(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let i=n.doc.resolve(e),o=n.doc.resolve(t);if(_w(i,o,r))return n.step(new bt(e,t,r));let s=Lw(i,n.doc.resolve(t));s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let S=i.depth,C=i.pos-1;S>0;S--,C--){let E=i.node(S).type.spec;if(E.defining||E.definingAsContext||E.isolating)break;s.indexOf(S)>-1?a=S:i.before(S)==C&&s.splice(1,0,-S)}let c=s.indexOf(a),f=[],p=r.openStart;for(let S=r.content,C=0;;C++){let E=S.firstChild;if(f.push(E),C==r.openStart)break;S=E.content}for(let S=p-1;S>=0;S--){let C=f[S],E=fE(C.type);if(E&&!C.sameMarkup(i.node(Math.abs(a)-1)))p=S;else if(E||!C.type.isTextblock)break}for(let S=r.openStart;S>=0;S--){let C=(S+p+1)%(r.openStart+1),E=f[C];if(E)for(let P=0;P<s.length;P++){let D=s[(P+c)%s.length],_=!0;D<0&&(_=!1,D=-D);let J=i.node(D-1),ie=i.index(D-1);if(J.canReplaceWith(ie,ie,E.type,E.marks))return n.replace(i.before(D),_?o.after(D):t,new ee(Fw(r.content,0,r.openStart,C),C,r.openEnd))}}let m=n.steps.length;for(let S=s.length-1;S>=0&&(n.replace(e,t,r),!(n.steps.length>m));S--){let C=s[S];C<0||(e=i.before(C),t=o.after(C))}}function Fw(n,e,t,r,i){if(e<t){let o=n.firstChild;n=n.replaceChild(0,o.copy(Fw(o.content,e+1,t,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(W.empty,!0))}return n}function hE(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=aE(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new ee(W.from(r),0,0))}function pE(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t),o=Lw(r,i);for(let s=0;s<o.length;s++){let a=o[s],c=s==o.length-1;if(c&&a==0||r.node(a).type.contentMatch.validEnd)return n.delete(r.start(a),i.end(a));if(a>0&&(c||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return n.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&t>r.end(s)&&i.end(s)-t!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return n.delete(r.before(s),t);n.delete(e,t)}function Lw(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let o=n.start(i);if(o<n.pos-(n.depth-i)||e.end(i)>e.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&t.push(i)}return t}class xa extends Wt{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return st.fail("No node at attribute step's position");let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return st.fromReplace(e,this.pos,this.pos+1,new ee(W.from(i),0,t.isLeaf?0:1))}getMap(){return Rn.empty}invert(e){return new xa(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new xa(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new xa(t.pos,t.attr,t.value)}}Wt.jsonID("attr",xa);class yu extends Wt{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return st.ok(r)}getMap(){return Rn.empty}invert(e){return new yu(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new yu(t.attr,t.value)}}Wt.jsonID("docAttr",yu);let Ia=class extends Error{};Ia=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};Ia.prototype=Object.create(Error.prototype);Ia.prototype.constructor=Ia;Ia.prototype.name="TransformError";class py{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new wa}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Ia(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=ee.empty){let i=Mh(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new ee(W.from(r),0,0))}delete(e,t){return this.replace(e,t,ee.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return dE(this,e,t,r),this}replaceRangeWith(e,t,r){return hE(this,e,t,r),this}deleteRange(e,t){return pE(this,e,t),this}lift(e,t){return QC(this,e,t),this}join(e,t=1){return lE(this,e,t),this}wrap(e,t){return tE(this,e,t),this}setBlockType(e,t=e,r,i=null){return nE(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return iE(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new xa(e,t,r)),this}setDocAttribute(e,t){return this.step(new yu(e,t)),this}addNodeMark(e,t){return this.step(new $o(e,t)),this}removeNodeMark(e,t){if(!(t instanceof _e)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new Oa(e,t)),this}split(e,t=1,r){return oE(this,e,t,r),this}addMark(e,t,r){return KC(this,e,t,r),this}removeMark(e,t,r){return XC(this,e,t,r),this}clearIncompatible(e,t,r){return uy(this,e,t,r),this}}const Zp=Object.create(null);class me{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new gy(e.min(t),e.max(t))]}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 t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=ee.empty){let r=t.content.lastChild,i=null;for(let a=0;a<t.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:c,$to:f}=s[a],p=e.mapping.slice(o);e.replaceRange(p.map(c.pos),p.map(f.pos),a?ee.empty:t),a==0&&Pv(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],c=e.mapping.slice(r),f=c.map(s.pos),p=c.map(a.pos);o?e.deleteRange(f,p):(e.replaceRangeWith(f,p,t),Pv(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let i=e.parent.inlineContent?new ke(e):pa(e.node(0),e.parent,e.pos,e.index(),t,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=t<0?pa(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):pa(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Kn(e.node(0))}static atStart(e){return pa(e,e,0,0,1)||new Kn(e)}static atEnd(e){return pa(e,e,e.content.size,e.childCount,-1)||new Kn(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Zp[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Zp)throw new RangeError("Duplicate use of selection JSON ID "+e);return Zp[e]=t,t.prototype.jsonID=e,t}getBookmark(){return ke.between(this.$anchor,this.$head).getBookmark()}}me.prototype.visible=!0;class gy{constructor(e,t){this.$from=e,this.$to=t}}let Mv=!1;function Dv(n){!Mv&&!n.parent.inlineContent&&(Mv=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class ke extends me{constructor(e,t=e){Dv(e),Dv(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return me.near(r);let i=e.resolve(t.map(this.anchor));return new ke(i.parent.inlineContent?i:r,r)}replace(e,t=ee.empty){if(super.replace(e,t),t==ee.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ke&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Dh(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ke(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let o=me.findFrom(t,r,!0)||me.findFrom(t,-r,!0);if(o)t=o.$head;else return me.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(me.findFrom(e,-r,!0)||me.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new ke(e,t)}}me.jsonID("text",ke);class Dh{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Dh(e.map(this.anchor),e.map(this.head))}resolve(e){return ke.between(e.resolve(this.anchor),e.resolve(this.head))}}class he extends me{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:i}=t.mapResult(this.anchor),o=e.resolve(i);return r?me.near(o):new he(o)}content(){return new ee(W.from(this.node),0,0)}eq(e){return e instanceof he&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new my(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new he(e.resolve(t.anchor))}static create(e,t){return new he(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}he.prototype.visible=!1;me.jsonID("node",he);class my{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Dh(r,r):new my(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&he.isSelectable(r)?new he(t):me.near(t)}}class Kn extends me{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=ee.empty){if(t==ee.empty){e.delete(0,e.doc.content.size);let r=me.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Kn(e)}map(e){return new Kn(e)}eq(e){return e instanceof Kn}getBookmark(){return gE}}me.jsonID("all",Kn);const gE={map(){return this},resolve(n){return new Kn(n)}};function pa(n,e,t,r,i,o=!1){if(e.inlineContent)return ke.create(n,t);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&he.isSelectable(a))return he.create(n,t-(i<0?a.nodeSize:0))}else{let c=pa(n,a,t+i,i<0?a.childCount:0,i,o);if(c)return c}t+=a.nodeSize*i}return null}function Pv(n,e,t){let r=n.steps.length-1;if(r<e)return;let i=n.steps[r];if(!(i instanceof bt||i instanceof St))return;let o=n.mapping.maps[r],s;o.forEach((a,c,f,p)=>{s==null&&(s=p)}),n.setSelection(me.near(n.doc.resolve(s),t))}const _v=1,Pf=2,Nv=4;let mE=class extends py{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|_v)&~Pf,this.storedMarks=null,this}get selectionSet(){return(this.updated&_v)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Pf,this}ensureMarks(e){return _e.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&Pf)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Pf,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||_e.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,o)),this.selection.empty||this.setSelection(me.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,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|=Nv,this}get scrolledIntoView(){return(this.updated&Nv)>0}};function Fv(n,e){return!e||!n?n:n.bind(e)}class Qc{constructor(e,t,r){this.name=e,this.init=Fv(t.init,r),this.apply=Fv(t.apply,r)}}const yE=[new Qc("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Qc("selection",{init(n,e){return n.selection||me.atStart(e.doc)},apply(n){return n.selection}}),new Qc("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Qc("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Qp{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=yE.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Qc(r.key,r.spec.state,r))})}}class ba{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,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let c=i?i[s].n:0,f=i?i[s].state:this,p=c<t.length&&a.spec.appendTransaction.call(a,c?t.slice(c):t,f,r);if(p&&r.filterTransaction(p,s)){if(p.setMeta("appendedTransaction",e),!i){i=[];for(let m=0;m<this.config.plugins.length;m++)i.push(m<s?{state:r,n:t.length}:{state:this,n:0})}t.push(p),r=r.applyInner(p),o=!0}i&&(i[s]={state:r,n:t.length})}}if(!o)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new ba(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new mE(this)}static create(e){let t=new Qp(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new ba(t);for(let i=0;i<t.fields.length;i++)r[t.fields[i].name]=t.fields[i].init(e,r);return r}reconfigure(e){let t=new Qp(this.schema,e.plugins),r=t.fields,i=new ba(t);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(t[r]=o.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Qp(e.schema,e.plugins),o=new ba(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=mr.fromJSON(e.schema,t.doc);else if(s.name=="selection")o.selection=me.fromJSON(o.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let c=r[a],f=c.spec.state;if(c.key==s.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(t,a)){o[s.name]=f.fromJSON.call(c,e,t[a],o);return}}o[s.name]=s.init(e,o)}}),o}}function Bw(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Bw(i,e,{})),t[r]=i}return t}class ol{constructor(e){this.spec=e,this.props={},e.props&&Bw(e.props,this,this.props),this.key=e.key?e.key.key:$w("plugin")}getState(e){return e[this.key]}}const qp=Object.create(null);function $w(n){return n in qp?n+"$"+ ++qp[n]:(qp[n]=0,n+"$")}class ji{constructor(e="key"){this.key=$w(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Mt=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},vu=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let em=null;const Pi=function(n,e,t){let r=em||(em=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},vE=function(){em=null},Zs=function(n,e,t,r){return t&&(Lv(n,e,t,r,-1)||Lv(n,e,t,r,1))},bE=/^(img|br|input|textarea|hr)$/i;function Lv(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Yn(n))){let o=n.parentNode;if(!o||o.nodeType!=1||Bu(n)||bE.test(n.nodeName)||n.contentEditable=="false")return!1;e=Mt(n)+(i<0?0:1),n=o}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.contentEditable=="false")return!1;e=i<0?Yn(n):0}else return!1}}function Yn(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function SE(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=Yn(n)}else if(n.parentNode&&!Bu(n))e=Mt(n),n=n.parentNode;else return null}}function wE(n,e){for(;;){if(n.nodeType==3&&e<n.nodeValue.length)return n;if(n.nodeType==1&&e<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[e],e=0}else if(n.parentNode&&!Bu(n))e=Mt(n)+1,n=n.parentNode;else return null}}function xE(n,e,t){for(let r=e==0,i=e==Yn(n);r||i;){if(n==t)return!0;let o=Mt(n);if(n=n.parentNode,!n)return!1;r=r&&o==0,i=i&&o==Yn(n)}}function Bu(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Ph=function(n){return n.focusNode&&Zs(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function $s(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function kE(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function CE(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:Math.min(Yn(r.offsetNode),r.offset)}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:Math.min(Yn(r.startContainer),r.startOffset)}}}const Jr=typeof navigator<"u"?navigator:null,Bv=typeof document<"u"?document:null,Xo=Jr&&Jr.userAgent||"",tm=/Edge\/(\d+)/.exec(Xo),zw=/MSIE \d/.exec(Xo),nm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xo),vn=!!(zw||nm||tm),Wo=zw?document.documentMode:nm?+nm[1]:tm?+tm[1]:0,vr=!vn&&/gecko\/(\d+)/i.test(Xo);vr&&+(/Firefox\/(\d+)/.exec(Xo)||[0,0])[1];const rm=!vn&&/Chrome\/(\d+)/.exec(Xo),Bt=!!rm,jw=rm?+rm[1]:0,tn=!vn&&!!Jr&&/Apple Computer/.test(Jr.vendor),Ma=tn&&(/Mobile\/\w+/.test(Xo)||!!Jr&&Jr.maxTouchPoints>2),Jn=Ma||(Jr?/Mac/.test(Jr.platform):!1),EE=Jr?/Win/.test(Jr.platform):!1,_i=/Android \d/.test(Xo),$u=!!Bv&&"webkitFontSmoothing"in Bv.documentElement.style,TE=$u?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function RE(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Ri(n,e){return typeof n=="number"?n:n[e]}function AE(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function $v(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=vu(s)){if(s.nodeType!=1)continue;let a=s,c=a==o.body,f=c?RE(o):AE(a),p=0,m=0;if(e.top<f.top+Ri(r,"top")?m=-(f.top-e.top+Ri(i,"top")):e.bottom>f.bottom-Ri(r,"bottom")&&(m=e.bottom-e.top>f.bottom-f.top?e.top+Ri(i,"top")-f.top:e.bottom-f.bottom+Ri(i,"bottom")),e.left<f.left+Ri(r,"left")?p=-(f.left-e.left+Ri(i,"left")):e.right>f.right-Ri(r,"right")&&(p=e.right-f.right+Ri(i,"right")),p||m)if(c)o.defaultView.scrollBy(p,m);else{let S=a.scrollLeft,C=a.scrollTop;m&&(a.scrollTop+=m),p&&(a.scrollLeft+=p);let E=a.scrollLeft-S,P=a.scrollTop-C;e={left:e.left-E,top:e.top-P,right:e.right-E,bottom:e.bottom-P}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function OE(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=n.root.elementFromPoint(o,s);if(!a||a==n.dom||!n.dom.contains(a))continue;let c=a.getBoundingClientRect();if(c.top>=t-20){r=a,i=c.top;break}}return{refDOM:r,refTop:i,stack:Uw(n.dom)}}function Uw(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=vu(r));return e}function IE({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Ww(t,r==0?0:r-e)}function Ww(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:i,left:o}=n[t];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let ca=null;function ME(n){if(n.setActive)return n.setActive();if(ca)return n.focus(ca);let e=Uw(n);n.focus(ca==null?{get preventScroll(){return ca={preventScroll:!0},!0}}:void 0),ca||(ca=!1,Ww(e,0))}function Hw(n,e){let t,r=2e8,i,o=0,s=e.top,a=e.top,c,f;for(let p=n.firstChild,m=0;p;p=p.nextSibling,m++){let S;if(p.nodeType==1)S=p.getClientRects();else if(p.nodeType==3)S=Pi(p).getClientRects();else continue;for(let C=0;C<S.length;C++){let E=S[C];if(E.top<=s&&E.bottom>=a){s=Math.max(E.bottom,s),a=Math.min(E.top,a);let P=E.left>e.left?E.left-e.left:E.right<e.left?e.left-E.right:0;if(P<r){t=p,r=P,i=P&&t.nodeType==3?{left:E.right<e.left?E.right:E.left,top:e.top}:e,p.nodeType==1&&P&&(o=m+(e.left>=(E.left+E.right)/2?1:0));continue}}else E.top>e.top&&!c&&E.left<=e.left&&E.right>=e.left&&(c=p,f={left:Math.max(E.left,Math.min(E.right,e.left)),top:E.top});!t&&(e.left>=E.right&&e.top>=E.top||e.left>=E.left&&e.top>=E.bottom)&&(o=m+1)}}return!t&&c&&(t=c,i=f,r=0),t&&t.nodeType==3?DE(t,i):!t||r&&t.nodeType==1?{node:n,offset:o}:Hw(t,i)}function DE(n,e){let t=n.nodeValue.length,r=document.createRange();for(let i=0;i<t;i++){r.setEnd(n,i+1),r.setStart(n,i);let o=Ao(r,1);if(o.top!=o.bottom&&yy(e,o))return{node:n,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}function yy(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function PE(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function _E(n,e,t){let{node:r,offset:i}=Hw(e,t),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(r,i,o)}function NE(n,e,t,r){let i=-1;for(let o=e,s=!1;o!=n.dom;){let a=n.docView.nearestDesc(o,!0),c;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((c=a.dom.getBoundingClientRect()).width||c.height)&&(a.node.isBlock&&a.parent&&(!s&&c.left>r.left||c.top>r.top?i=a.posBefore:(!s&&c.right<r.left||c.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return i>-1?i:n.docView.posFromDOM(e,t,-1)}function Vw(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),o=i;;){let s=n.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let c=0;c<a.length;c++){let f=a[c];if(yy(e,f))return Vw(s,e,f)}}if((o=(o+1)%r)==i)break}return n}function FE(n,e){let t=n.dom.ownerDocument,r,i=0,o=CE(t,e.left,e.top);o&&({node:r,offset:i}=o);let s=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),a;if(!s||!n.dom.contains(s.nodeType!=1?s.parentNode:s)){let f=n.dom.getBoundingClientRect();if(!yy(e,f)||(s=Vw(n.dom,e,f),!s))return null}if(tn)for(let f=s;r&&f;f=vu(f))f.draggable&&(r=void 0);if(s=PE(s,e),r){if(vr&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let p=r.childNodes[i],m;p.nodeName=="IMG"&&(m=p.getBoundingClientRect()).right<=e.left&&m.bottom>e.top&&i++}let f;$u&&i&&r.nodeType==1&&(f=r.childNodes[i-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=NE(n,r,i,e))}a==null&&(a=_E(n,s,e));let c=n.docView.nearestDesc(s,!0);return{pos:a,inside:c?c.posAtStart-c.border:-1}}function zv(n){return n.top<n.bottom||n.left<n.right}function Ao(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(zv(r))return r}return Array.prototype.find.call(t,zv)||n.getBoundingClientRect()}const LE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Gw(n,e,t){let{node:r,offset:i,atom:o}=n.docView.domFromPos(e,t<0?-1:1),s=$u||vr;if(r.nodeType==3)if(s&&(LE.test(r.nodeValue)||(t<0?!i:i==r.nodeValue.length))){let c=Ao(Pi(r,i,i),t);if(vr&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let f=Ao(Pi(r,i-1,i-1),-1);if(f.top==c.top){let p=Ao(Pi(r,i,i+1),-1);if(p.top!=c.top)return Wc(p,p.left<f.left)}}return c}else{let c=i,f=i,p=t<0?1:-1;return t<0&&!i?(f++,p=-1):t>=0&&i==r.nodeValue.length?(c--,p=1):t<0?c--:f++,Wc(Ao(Pi(r,c,f),p),p<0)}if(!n.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(t<0||i==Yn(r))){let c=r.childNodes[i-1];if(c.nodeType==1)return eg(c.getBoundingClientRect(),!1)}if(o==null&&i<Yn(r)){let c=r.childNodes[i];if(c.nodeType==1)return eg(c.getBoundingClientRect(),!0)}return eg(r.getBoundingClientRect(),t>=0)}if(o==null&&i&&(t<0||i==Yn(r))){let c=r.childNodes[i-1],f=c.nodeType==3?Pi(c,Yn(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(f)return Wc(Ao(f,1),!1)}if(o==null&&i<Yn(r)){let c=r.childNodes[i];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let f=c?c.nodeType==3?Pi(c,0,s?0:1):c.nodeType==1?c:null:null;if(f)return Wc(Ao(f,-1),!0)}return Wc(Ao(r.nodeType==3?Pi(r):r,-t),t>=0)}function Wc(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function eg(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function Jw(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function BE(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return Jw(n,e,()=>{let{node:o}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let a=n.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=Gw(n,i.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let c;if(a.nodeType==1)c=a.getClientRects();else if(a.nodeType==3)c=Pi(a,0,a.nodeValue.length).getClientRects();else continue;for(let f=0;f<c.length;f++){let p=c[f];if(p.bottom>p.top+1&&(t=="up"?s.top-p.top>(p.bottom-s.top)*2:p.bottom-s.bottom>(s.bottom-p.top)*2))return!1}}return!0})}const $E=/[\u0590-\u08ac]/;function zE(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=n.domSelection();return a?!$E.test(r.parent.textContent)||!a.modify?t=="left"||t=="backward"?o:s:Jw(n,e,()=>{let{focusNode:c,focusOffset:f,anchorNode:p,anchorOffset:m}=n.domSelectionRange(),S=a.caretBidiLevel;a.modify("move",t,"character");let C=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:E,focusOffset:P}=n.domSelectionRange(),D=E&&!C.contains(E.nodeType==1?E:E.parentNode)||c==E&&f==P;try{a.collapse(p,m),c&&(c!=p||f!=m)&&a.extend&&a.extend(c,f)}catch{}return S!=null&&(a.caretBidiLevel=S),D}):r.pos==r.start()||r.pos==r.end()}let jv=null,Uv=null,Wv=!1;function jE(n,e,t){return jv==e&&Uv==t?Wv:(jv=e,Uv=t,Wv=t=="up"||t=="down"?BE(n,e,t):zE(n,e,t))}const Xn=0,Hv=1,zs=2,Yr=3;class zu{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=Xn,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let i=this.children[t];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(e==this.contentDOM)o=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=t>Mt(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(t==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!t||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return o}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let i=this.children[t],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof Kw){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof Yw&&o.side>=0;r--);if(t<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?Mt(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,t):{node:this.contentDOM,offset:o?Mt(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let c=this.children[a],f=s+c.size;if(i==-1&&e<=f){let p=s+c.border;if(e>=p&&t<=f-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(e,t,p);e=s;for(let m=a;m>0;m--){let S=this.children[m-1];if(S.size&&S.dom.parentNode==this.contentDOM&&!S.emptyChildAt(1)){i=Mt(S.dom)+1;break}e-=S.size}i==-1&&(i=0)}if(i>-1&&(f>t||a==this.children.length-1)){t=f;for(let p=a+1;p<this.children.length;p++){let m=this.children[p];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){o=Mt(m.dom);break}t+=m.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=f}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,i=!1){let o=Math.min(e,t),s=Math.max(e,t);for(let C=0,E=0;C<this.children.length;C++){let P=this.children[C],D=E+P.size;if(o>E&&s<D)return P.setSelection(e-E-P.border,t-E-P.border,r,i);E=D}let a=this.domFromPos(e,e?-1:1),c=t==e?a:this.domFromPos(t,t?-1:1),f=r.root.getSelection(),p=r.domSelectionRange(),m=!1;if((vr||tn)&&e==t){let{node:C,offset:E}=a;if(C.nodeType==3){if(m=!!(E&&C.nodeValue[E-1]==`
6
+ `),m&&E==C.nodeValue.length)for(let P=C,D;P;P=P.parentNode){if(D=P.nextSibling){D.nodeName=="BR"&&(a=c={node:D.parentNode,offset:Mt(D)+1});break}let _=P.pmViewDesc;if(_&&_.node&&_.node.isBlock)break}}else{let P=C.childNodes[E-1];m=P&&(P.nodeName=="BR"||P.contentEditable=="false")}}if(vr&&p.focusNode&&p.focusNode!=c.node&&p.focusNode.nodeType==1){let C=p.focusNode.childNodes[p.focusOffset];C&&C.contentEditable=="false"&&(i=!0)}if(!(i||m&&tn)&&Zs(a.node,a.offset,p.anchorNode,p.anchorOffset)&&Zs(c.node,c.offset,p.focusNode,p.focusOffset))return;let S=!1;if((f.extend||e==t)&&!m){f.collapse(a.node,a.offset);try{e!=t&&f.extend(c.node,c.offset),S=!0}catch{}}if(!S){if(e>t){let E=a;a=c,c=E}let C=document.createRange();C.setEnd(c.node,c.offset),C.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(C)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&t>=r:e<s&&t>r){let a=r+o.border,c=s-o.border;if(e>=a&&t<=c){this.dirty=e==r||t==s?zs:Hv,e==a&&t==c&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Yr:o.markDirty(e-a,t-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?zs:Yr}r=s}this.dirty=zs}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?zs:Hv;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Yw extends zu{constructor(e,t,r,i){let o,s=t.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!t.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return this.dirty==Xn&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(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 side(){return this.widget.type.side}}class UE extends zu{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Qs extends zu{constructor(e,t,r,i,o){super(e,[],r,i),this.mark=t,this.spec=o}static create(e,t,r,i){let o=i.nodeViews[t.type.name],s=o&&o(t,i,r);return(!s||!s.dom)&&(s=il.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new Qs(e,t,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Yr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Yr&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Xn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Xn}}slice(e,t,r){let i=Qs.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;t<s&&(o=om(o,t,s,r)),e>0&&(o=om(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Ho extends zu{constructor(e,t,r,i,o,s,a,c,f){super(e,[],o,s),this.node=t,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,t,r,i,o,s){let a=o.nodeViews[t.type.name],c,f=a&&a(t,o,()=>{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,i),p=f&&f.dom,m=f&&f.contentDOM;if(t.isText){if(!p)p=document.createTextNode(t.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:m}=il.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!m&&!t.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),t.type.spec.draggable&&(p.draggable=!0));let S=p;return p=Qw(p,r,t),f?c=new WE(e,t,r,i,p,m||null,S,f,o,s+1):t.isText?new _h(e,t,r,i,p,S,o):new Ho(e,t,r,i,p,m||null,S,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>W.empty)}return e}matchesNode(e,t,r){return this.dirty==Xn&&e.eq(this.node)&&Cd(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,c=new VE(this,s&&s.node,e);YE(this.node,this.innerDeco,(f,p,m)=>{f.spec.marks?c.syncToMarks(f.spec.marks,r,e):f.type.side>=0&&!m&&c.syncToMarks(p==this.node.childCount?_e.none:this.node.child(p).marks,r,e),c.placeWidget(f,e,i)},(f,p,m,S)=>{c.syncToMarks(f.marks,r,e);let C;c.findNodeMatch(f,p,m,S)||a&&e.state.selection.from>i&&e.state.selection.to<i+f.nodeSize&&(C=c.findIndexWithChild(o.node))>-1&&c.updateNodeAt(f,p,m,C,e)||c.updateNextNode(f,p,m,e,S,i)||c.addNode(f,p,m,e,i),i+=f.nodeSize}),c.syncToMarks([],r,e),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==zs)&&(s&&this.protectLocalComposition(e,s),Xw(this.contentDOM,this.children,e),Ma&&KE(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof ke)||r<t||i>t+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=XE(this.node.content,s,r-t,i-t);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new UE(this,o,t,i);e.input.compositionNodes.push(s),this.children=om(this.children,r,r+i.length,e,s)}update(e,t,r,i){return this.dirty==Yr||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Xn}updateOuterDeco(e){if(Cd(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Zw(this.dom,this.nodeDOM,im(this.outerDeco,this.node,t),im(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Vv(n,e,t,r,i){Qw(r,e,n);let o=new Ho(void 0,n,e,t,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class _h extends Ho{constructor(e,t,r,i,o,s,a){super(e,t,r,i,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return this.dirty==Yr||this.dirty!=Xn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Xn||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=Xn,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),o=document.createTextNode(i.text);return new _h(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Yr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Kw extends zu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Xn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class WE extends Ho{constructor(e,t,r,i,o,s,a,c,f,p){super(e,t,r,i,o,s,a,f,p),this.spec=c}update(e,t,r,i){if(this.dirty==Yr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,t,r);return o&&this.updateInner(e,t,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,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 Xw(n,e,t){let r=n.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==n){for(;a!=r;)r=Gv(r),i=!0;r=r.nextSibling}else i=!0,n.insertBefore(a,r);if(s instanceof Qs){let c=r?r.previousSibling:n.lastChild;Xw(s.contentDOM,s.children,t),r=c?c.nextSibling:n.firstChild}}for(;r;)r=Gv(r),i=!0;i&&t.trackWrites==n&&(t.trackWrites=null)}const nu=function(n){n&&(this.nodeName=n)};nu.prototype=Object.create(null);const js=[new nu];function im(n,e,t){if(n.length==0)return js;let r=t?js[0]:new nu,i=[r];for(let o=0;o<n.length;o++){let s=n[o].type.attrs;if(s){s.nodeName&&i.push(r=new nu(s.nodeName));for(let a in s){let c=s[a];c!=null&&(t&&i.length==1&&i.push(r=new nu(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+c:a=="style"?r.style=(r.style?r.style+";":"")+c:a!="nodeName"&&(r[a]=c))}}}return i}function Zw(n,e,t,r){if(t==js&&r==js)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(o){let c;a&&a.nodeName==s.nodeName&&i!=n&&(c=i.parentNode)&&c.nodeName.toLowerCase()==s.nodeName||(c=document.createElement(s.nodeName),c.pmIsDeco=!0,c.appendChild(i),a=js[0]),i=c}HE(i,a||js[0],s)}return i}function HE(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=t.class?t.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&n.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&n.classList.add(i[o]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)n.style.removeProperty(i[1])}t.style&&(n.style.cssText+=t.style)}}function Qw(n,e,t){return Zw(n,n,js,im(e,t,n.nodeType!=1))}function Cd(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function Gv(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class VE{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=GE(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=Xn,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let f=this.top.children[c];if(f.matchesMark(e[o])&&!this.isLocked(f.dom)){a=c;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let c=Qs.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,c=Math.min(this.top.children.length,a+5);a<c;a++){let f=this.top.children[a];if(f.matchesNode(e,t,r)&&!this.preMatch.matched.has(f)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,t,r,i,o){let s=this.top.children[i];return s.dirty==Yr&&s.dom==s.contentDOM&&(s.dirty=zs),s.update(e,t,r,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=t}}updateNextNode(e,t,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let c=this.top.children[a];if(c instanceof Ho){let f=this.preMatch.matched.get(c);if(f!=null&&f!=o)return!1;let p=c.dom,m,S=this.isLocked(p)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=Yr&&Cd(t,c.outerDeco));if(!S&&c.update(e,t,r,i))return this.destroyBetween(this.index,a),c.dom!=p&&(this.changed=!0),this.index++,!0;if(!S&&(m=this.recreateWrapper(c,e,t,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=m,m.contentDOM&&(m.dirty=zs,m.updateChildren(i,s+1),m.dirty=Xn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,i,o,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!Cd(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=Ho.create(this.top,t,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let c of a.children)c.parent=a}return e.destroy(),a}addNode(e,t,r,i,o){let s=Ho.create(this.top,e,t,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new Yw(this.top,e,t,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Qs;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof _h)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((tn||Bt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new Kw(this.top,[],r,null);t!=this.top?t.children.push(i):t.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function GE(n,e){let t=e,r=t.children.length,i=n.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let f=t.children[r-1];if(f instanceof Qs)t=f,r=f.children.length;else{a=f,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let c=a.node;if(c){if(c!=n.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}function JE(n,e){return n.type.side-e.type.side}function YE(n,e,t,r){let i=e.locals(n),o=0;if(i.length==0){for(let f=0;f<n.childCount;f++){let p=n.child(f);r(p,i,e.forChild(o,p),f),o+=p.nodeSize}return}let s=0,a=[],c=null;for(let f=0;;){let p,m;for(;s<i.length&&i[s].to==o;){let D=i[s++];D.widget&&(p?(m||(m=[p])).push(D):p=D)}if(p)if(m){m.sort(JE);for(let D=0;D<m.length;D++)t(m[D],f,!!c)}else t(p,f,!!c);let S,C;if(c)C=-1,S=c,c=null;else if(f<n.childCount)C=f,S=n.child(f++);else break;for(let D=0;D<a.length;D++)a[D].to<=o&&a.splice(D--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let E=o+S.nodeSize;if(S.isText){let D=E;s<i.length&&i[s].from<D&&(D=i[s].from);for(let _=0;_<a.length;_++)a[_].to<D&&(D=a[_].to);D<E&&(c=S.cut(D-o),S=S.cut(0,D-o),E=D,C=-1)}else for(;s<i.length&&i[s].to<E;)s++;let P=S.isInline&&!S.isLeaf?a.filter(D=>!D.inline):a.slice();r(S,P,e.forChild(o,S),C),o=E}}function KE(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function XE(n,e,t,r){for(let i=0,o=0;i<n.childCount&&o<=r;){let s=n.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let c=s.text;for(;i<n.childCount;){let f=n.child(i++);if(o+=f.nodeSize,!f.isText)break;c+=f.text}if(o>=t){if(o>=r&&c.slice(r-e.length-a,r-a)==e)return r-e.length;let f=a<r?c.lastIndexOf(e,r-a-1):-1;if(f>=0&&f+e.length+a>=t)return a+f;if(t==r&&c.length>=r+e.length-a&&c.slice(r-a,r-a+e.length)==e)return r}}return-1}function om(n,e,t,r,i){let o=[];for(let s=0,a=0;s<n.length;s++){let c=n[s],f=a,p=a+=c.size;f>=t||p<=e?o.push(c):(f<e&&o.push(c.slice(0,e-f,r)),i&&(o.push(i),i=void 0),p>t&&o.push(c.slice(t-f,c.size,r)))}return o}function vy(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),o=i&&i.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let a=r.resolve(s),c,f;if(Ph(t)){for(c=s;i&&!i.node;)i=i.parent;let m=i.node;if(i&&m.isAtom&&he.isSelectable(m)&&i.parent&&!(m.isInline&&xE(t.focusNode,t.focusOffset,i.dom))){let S=i.posBefore;f=new he(s==S?a:r.resolve(S))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let m=s,S=s;for(let C=0;C<t.rangeCount;C++){let E=t.getRangeAt(C);m=Math.min(m,n.docView.posFromDOM(E.startContainer,E.startOffset,1)),S=Math.max(S,n.docView.posFromDOM(E.endContainer,E.endOffset,-1))}if(m<0)return null;[c,s]=S==n.state.selection.anchor?[S,m]:[m,S],a=r.resolve(s)}else c=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(c<0)return null}let p=r.resolve(c);if(!f){let m=e=="pointer"||n.state.selection.head<a.pos&&!o?1:-1;f=by(n,p,a,m)}return f}function qw(n){return n.editable?n.hasFocus():tx(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Fi(n,e=!1){let t=n.state.selection;if(ex(n,t),!!qw(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&Bt){let r=n.domSelectionRange(),i=n.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Zs(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)QE(n);else{let{anchor:r,head:i}=t,o,s;Jv&&!(t instanceof ke)&&(t.$from.parent.inlineContent||(o=Yv(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=Yv(n,t.to))),n.docView.setSelection(r,i,n,e),Jv&&(o&&Kv(o),s&&Kv(s)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ZE(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const Jv=tn||Bt&&jw<63;function Yv(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),i=r<t.childNodes.length?t.childNodes[r]:null,o=r?t.childNodes[r-1]:null;if(tn&&i&&i.contentEditable=="false")return tg(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return tg(i);if(o)return tg(o)}}function tg(n){return n.contentEditable="true",tn&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Kv(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function ZE(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,i=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!qw(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function QE(n){let e=n.domSelection(),t=document.createRange();if(!e)return;let r=n.cursorWrapper.dom,i=r.nodeName=="IMG";i?t.setStart(r.parentNode,Mt(r)+1):t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!i&&!n.state.selection.visible&&vn&&Wo<=11&&(r.disabled=!0,r.disabled=!1)}function ex(n,e){if(e instanceof he){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Xv(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Xv(n)}function Xv(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function by(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||ke.between(e,t,r)}function Zv(n){return n.editable&&!n.hasFocus()?!1:tx(n)}function tx(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function qE(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Zs(e.node,e.offset,t.anchorNode,t.anchorOffset)}function sm(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),o=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return o&&me.findFrom(o,e)}function Oo(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Qv(n,e,t){let r=n.state.selection;if(r instanceof ke)if(t.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=n.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Oo(n,new ke(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=sm(n.state,e);return i&&i instanceof he?Oo(n,i):!1}else if(!(Jn&&t.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let a=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM?he.isSelectable(o)?Oo(n,new he(e<0?n.state.doc.resolve(i.pos-o.nodeSize):i)):$u?Oo(n,new ke(n.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof he&&r.node.isInline)return Oo(n,new ke(e>0?r.$to:r.$from));{let i=sm(n.state,e);return i?Oo(n,i):!1}}}function Ed(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function ru(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function ua(n,e){return e<0?eT(n):tT(n)}function eT(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,o,s=!1;for(vr&&t.nodeType==1&&r<Ed(t)&&ru(t.childNodes[r],-1)&&(s=!0);;)if(r>0){if(t.nodeType!=1)break;{let a=t.childNodes[r-1];if(ru(a,-1))i=t,o=--r;else if(a.nodeType==3)t=a,r=t.nodeValue.length;else break}}else{if(nx(t))break;{let a=t.previousSibling;for(;a&&ru(a,-1);)i=t.parentNode,o=Mt(a),a=a.previousSibling;if(a)t=a,r=Ed(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?lm(n,t,r):i&&lm(n,i,o)}function tT(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=Ed(t),o,s;for(;;)if(r<i){if(t.nodeType!=1)break;let a=t.childNodes[r];if(ru(a,1))o=t,s=++r;else break}else{if(nx(t))break;{let a=t.nextSibling;for(;a&&ru(a,1);)o=a.parentNode,s=Mt(a)+1,a=a.nextSibling;if(a)t=a,r=0,i=Ed(t);else{if(t=t.parentNode,t==n.dom)break;r=i=0}}}o&&lm(n,o,s)}function nx(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function nT(n,e){for(;n&&e==n.childNodes.length&&!Bu(n);)e=Mt(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function rT(n,e){for(;n&&!e&&!Bu(n);)e=Mt(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function lm(n,e,t){if(e.nodeType!=3){let o,s;(s=nT(e,t))?(e=s,t=0):(o=rT(e,t))&&(e=o,t=o.nodeValue.length)}let r=n.domSelection();if(!r)return;if(Ph(r)){let o=document.createRange();o.setEnd(e,t),o.setStart(e,t),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:i}=n;setTimeout(()=>{n.state==i&&Fi(n)},50)}function qv(n,e){let t=n.state.doc.resolve(e);if(!(Bt||EE)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let o=n.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<t.end()){let o=n.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function eb(n,e,t){let r=n.state.selection;if(r instanceof ke&&!r.empty||t.indexOf("s")>-1||Jn&&t.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=sm(n.state,e);if(s&&s instanceof he)return Oo(n,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Kn?me.near(s,e):me.findFrom(s,e);return a?Oo(n,a):!1}return!1}function tb(n,e){if(!(n.state.selection instanceof ke))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function nb(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function iT(n){if(!tn||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;nb(n,r,"true"),setTimeout(()=>nb(n,r,"false"),20)}return!1}function oT(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function sT(n,e){let t=e.keyCode,r=oT(e);if(t==8||Jn&&t==72&&r=="c")return tb(n,-1)||ua(n,-1);if(t==46&&!e.shiftKey||Jn&&t==68&&r=="c")return tb(n,1)||ua(n,1);if(t==13||t==27)return!0;if(t==37||Jn&&t==66&&r=="c"){let i=t==37?qv(n,n.state.selection.from)=="ltr"?-1:1:-1;return Qv(n,i,r)||ua(n,i)}else if(t==39||Jn&&t==70&&r=="c"){let i=t==39?qv(n,n.state.selection.from)=="ltr"?1:-1:1;return Qv(n,i,r)||ua(n,i)}else{if(t==38||Jn&&t==80&&r=="c")return eb(n,-1,r)||ua(n,-1);if(t==40||Jn&&t==78&&r=="c")return iT(n)||eb(n,1,r)||ua(n,1);if(r==(Jn?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function rx(n,e){n.someProp("transformCopied",C=>{e=C(e,n)});let t=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let C=r.firstChild;t.push(C.type.name,C.attrs!=C.type.defaultAttrs?C.attrs:null),r=C.content}let s=n.someProp("clipboardSerializer")||il.fromSchema(n.state.schema),a=cx(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let f=c.firstChild,p,m=0;for(;f&&f.nodeType==1&&(p=ax[f.nodeName.toLowerCase()]);){for(let C=p.length-1;C>=0;C--){let E=a.createElement(p[C]);for(;c.firstChild;)E.appendChild(c.firstChild);c.appendChild(E),m++}f=c.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${i} ${o}${m?` -${m}`:""} ${JSON.stringify(t)}`);let S=n.someProp("clipboardTextSerializer",C=>C(e,n))||e.content.textBetween(0,e.content.size,`
7
7
 
8
- `);return{dom:c,text:S,slice:e}}function Yw(n,e,t,r,i){let o=i.parent.type.spec.code,s,a;if(!t&&!e)return null;let c=e&&(r||o||!t);if(c){if(n.someProp("transformPastedText",S=>{e=S(e,o||r,n)}),o)return e?new ee(W.from(n.state.schema.text(e.replace(/\r\n?/g,`
9
- `))),0,0):ee.empty;let m=n.someProp("clipboardTextParser",S=>S(e,i,r,n));if(m)a=m;else{let S=i.marks(),{schema:C}=n.state,E=rl.fromSchema(C);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(P=>{let D=s.appendChild(document.createElement("p"));P&&D.appendChild(E.serializeNode(C.text(P,S)))})}}else n.someProp("transformPastedHTML",m=>{t=m(t,n)}),s=QE(t),Fu&&qE(s);let f=s&&s.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let m=+p[3];m>0;m--){let S=s.firstChild;for(;S&&S.nodeType!=1;)S=S.nextSibling;if(!S)break;s=S}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||ry.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||p),context:i,ruleFromNode(S){return S.nodeName=="BR"&&!S.nextSibling&&S.parentNode&&!KE.test(S.parentNode.nodeName)?{ignore:!0}:null}})),p)a=eT(Qv(a,+p[1],+p[2]),p[4]);else if(a=ee.maxOpen(XE(a.content,i),!0),a.openStart||a.openEnd){let m=0,S=0;for(let C=a.content.firstChild;m<a.openStart&&!C.type.spec.isolating;m++,C=C.firstChild);for(let C=a.content.lastChild;S<a.openEnd&&!C.type.spec.isolating;S++,C=C.lastChild);a=Qv(a,m,S)}return n.someProp("transformPasted",m=>{a=m(a,n)}),a}const KE=/^(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 XE(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),o,s=[];if(n.forEach(a=>{if(!s)return;let c=i.findWrapping(a.type),f;if(!c)return s=null;if(f=s.length&&o.length&&Xw(c,o,a,s[s.length-1],0))s[s.length-1]=f;else{s.length&&(s[s.length-1]=Zw(s[s.length-1],o.length));let p=Kw(a,c);s.push(p),i=i.matchType(p.type),o=c}}),s)return W.from(s)}return n}function Kw(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,W.from(n));return n}function Xw(n,e,t,r,i){if(i<n.length&&i<e.length&&n[i]==e[i]){let o=Xw(n,e,t,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==n.length-1?t.type:n[i+1]))return r.copy(r.content.append(W.from(Kw(t,n,i+1))))}}function Zw(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,Zw(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(W.empty,!0);return n.copy(t.append(r))}function rm(n,e,t,r,i,o){let s=e<0?n.firstChild:n.lastChild,a=s.content;return n.childCount>1&&(o=0),i<r-1&&(a=rm(a,e,t,r,i+1,o)),i>=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(W.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function Qv(n,e,t){return e<n.openStart&&(n=new ee(rm(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new ee(rm(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Qw={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let qv=null;function qw(){return qv||(qv=document.implementation.createHTMLDocument("title"))}let Zp=null;function ZE(n){let e=window.trustedTypes;return e?(Zp||(Zp=e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),Zp.createHTML(n)):n}function QE(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=qw().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&Qw[r[1].toLowerCase()])&&(n=i.map(o=>"<"+o+">").join("")+n+i.map(o=>"</"+o+">").reverse().join("")),t.innerHTML=ZE(n),i)for(let o=0;o<i.length;o++)t=t.querySelector(i[o])||t;return t}function qE(n){let e=n.querySelectorAll(Bt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function eT(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:i,openStart:o,openEnd:s}=n;for(let a=r.length-2;a>=0;a-=2){let c=t.nodes[r[a]];if(!c||c.hasRequiredAttrs())break;i=W.from(c.create(r[a+1],i)),o++,s++}return new ee(i,o,s)}const nn={},rn={},tT={touchstart:!0,touchmove:!0};class nT{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},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 rT(n){for(let e in nn){let t=nn[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{oT(n,r)&&!gy(n,r)&&(n.editable||!(r.type in rn))&&t(n,r)},tT[e]?{passive:!0}:void 0)}tn&&n.dom.addEventListener("input",()=>null),im(n)}function zo(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function iT(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function im(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>gy(n,r))})}function gy(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function oT(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function sT(n,e){!gy(n,e)&&nn[e.type]&&(n.editable||!(e.type in rn))&&nn[e.type](n,e)}rn.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!tx(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(_i&&Bt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Oa&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,$s(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||YE(n,t)?t.preventDefault():zo(n,"key")};rn.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};rn.keypress=(n,e)=>{let t=e;if(tx(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Jn&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof ke)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode);!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i))&&n.dispatch(n.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}};function Ih(n){return{left:n.clientX,top:n.clientY}}function lT(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function my(n,e,t,r,i){if(r==-1)return!1;let o=n.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,a=>s>o.depth?a(n,t,o.nodeAfter,o.before(s),i,!0):a(n,t,o.node(s),o.before(s),i,!1)))return!0;return!1}function xa(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);r.setMeta("pointer",!0),n.dispatch(r)}function aT(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&he.isSelectable(r)?(xa(n,new he(t)),!0):!1}function cT(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof he&&(r=t.node);let o=n.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(he.isSelectable(a)){r&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?i=o.before(t.$from.depth):i=o.before(s);break}}return i!=null?(xa(n,he.create(n.state.doc,i)),!0):!1}function uT(n,e,t,r,i){return my(n,"handleClickOn",e,t,r)||n.someProp("handleClick",o=>o(n,e,r))||(i?cT(n,t):aT(n,t))}function fT(n,e,t,r){return my(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function dT(n,e,t,r){return my(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||hT(n,t,r)}function hT(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(xa(n,ke.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)xa(n,ke.create(r,a+1,a+1+s.content.size));else if(he.isSelectable(s))xa(n,he.create(r,a));else continue;return!0}}function yy(n){return xd(n)}const ex=Jn?"metaKey":"ctrlKey";nn.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=yy(n),i=Date.now(),o="singleClick";i-n.input.lastClick.time<500&&lT(t,n.input.lastClick)&&!t[ex]&&(n.input.lastClick.type=="singleClick"?o="doubleClick":n.input.lastClick.type=="doubleClick"&&(o="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(Ih(t));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new pT(n,s,t,!!r)):(o=="doubleClick"?fT:dT)(n,s.pos,s.inside,t)?t.preventDefault():zo(n,"pointer"))};class pT{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[ex],this.allowDefault=r.shiftKey;let o,s;if(t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let p=e.state.doc.resolve(t.pos);o=p.parent,s=p.depth?p.before():0}const a=i?null:r.target,c=a?e.docView.nearestDesc(a,!0):null;this.target=c&&c.dom.nodeType==1?c.dom:null;let{selection:f}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||f instanceof he&&f.from<=s&&f.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&vr&&!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)),zo(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(()=>Fi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ih(e))),this.updateAllowDefault(e),this.allowDefault||!t?zo(this.view,"pointer"):uT(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||tn&&this.mightDrag&&!this.mightDrag.node.isAtom||Bt&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(xa(this.view,me.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):zo(this.view,"pointer")}move(e){this.updateAllowDefault(e),zo(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)}}nn.touchstart=n=>{n.input.lastTouch=Date.now(),yy(n),zo(n,"pointer")};nn.touchmove=n=>{n.input.lastTouch=Date.now(),zo(n,"pointer")};nn.contextmenu=n=>yy(n);function tx(n,e){return n.composing?!0:tn&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const gT=_i?5e3:-1;rn.compositionstart=rn.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof ke&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),xd(n,!0),n.markCursor=null;else if(xd(n,!e.selection.empty),vr&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=n.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}n.input.composing=!0}nx(n,gT)};rn.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,nx(n,20))};function nx(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>xd(n),e))}function rx(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=yT());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function mT(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=aE(e.focusNode,e.focusOffset),r=cE(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,o=n.domObserver.lastChangedTextNode;if(t==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let s=t.pmViewDesc;if(!(!s||!s.isText(t.nodeValue)))return r}}return t||r}function yT(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function xd(n,e=!1){if(!(_i&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),rx(n),e||n.docView&&n.docView.dirty){let t=hy(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function vT(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const gu=vn&&Wo<15||Oa&&pE<604;nn.copy=rn.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let o=gu?null:t.clipboardData,s=r.content(),{dom:a,text:c}=Jw(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",c)):vT(n,a),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function bT(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function ST(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?mu(n,r.value,null,i,e):mu(n,r.textContent,r.innerHTML,i,e)},50)}function mu(n,e,t,r,i){let o=Yw(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",c=>c(n,i,o||ee.empty)))return!0;if(!o)return!1;let s=bT(o),a=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function ix(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}rn.paste=(n,e)=>{let t=e;if(n.composing&&!_i)return;let r=gu?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&mu(n,ix(r),r.getData("text/html"),i,t)?t.preventDefault():ST(n,t)};class ox{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const sx=Jn?"altKey":"ctrlKey";nn.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,o=i.empty?null:n.posAtCoords(Ih(t)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof he?i.to-1:i.to))){if(r&&r.mightDrag)s=he.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let m=n.docView.nearestDesc(t.target,!0);m&&m.node.type.spec.draggable&&m!=n.docView&&(s=he.create(n.state.doc,m.posBefore))}}let a=(s||n.state.selection).content(),{dom:c,text:f,slice:p}=Jw(n,a);(!t.dataTransfer.files.length||!Bt||Mw>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(gu?"Text":"text/html",c.innerHTML),t.dataTransfer.effectAllowed="copyMove",gu||t.dataTransfer.setData("text/plain",f),n.dragging=new ox(p,!t[sx],s)};nn.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};rn.dragover=rn.dragenter=(n,e)=>e.preventDefault();rn.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let i=n.posAtCoords(Ih(t));if(!i)return;let o=n.state.doc.resolve(i.pos),s=r&&r.slice;s?n.someProp("transformPasted",E=>{s=E(s,n)}):s=Yw(n,ix(t.dataTransfer),gu?null:t.dataTransfer.getData("text/html"),!1,o);let a=!!(r&&!t[sx]);if(n.someProp("handleDrop",E=>E(n,t,s||ee.empty,a))){t.preventDefault();return}if(!s)return;t.preventDefault();let c=s?kw(n.state.doc,o.pos,s):o.pos;c==null&&(c=o.pos);let f=n.state.tr;if(a){let{node:E}=r;E?E.replace(f):f.deleteSelection()}let p=f.mapping.map(c),m=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,S=f.doc;if(m?f.replaceRangeWith(p,p,s.content.firstChild):f.replaceRange(p,p,s),f.doc.eq(S))return;let C=f.doc.resolve(p);if(m&&he.isSelectable(s.content.firstChild)&&C.nodeAfter&&C.nodeAfter.sameMarkup(s.content.firstChild))f.setSelection(new he(C));else{let E=f.mapping.map(c);f.mapping.maps[f.mapping.maps.length-1].forEach((P,D,_,J)=>E=J),f.setSelection(py(n,C,f.doc.resolve(E)))}n.focus(),n.dispatch(f.setMeta("uiEvent","drop"))};nn.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Fi(n)},20))};nn.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};nn.beforeinput=(n,e)=>{if(Bt&&_i&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,$s(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in rn)nn[n]=rn[n];function yu(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class kd{constructor(e,t){this.toDOM=e,this.spec=t||Vs,this.side=this.spec.side||0}map(e,t,r,i){let{pos:o,deleted:s}=e.mapResult(t.from+i,this.side<0?-1:1);return s?null:new $t(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof kd&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&yu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Vo{constructor(e,t){this.attrs=e,this.spec=t||Vs}map(e,t,r,i){let o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new $t(o,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Vo&&yu(this.attrs,e.attrs)&&yu(this.spec,e.spec)}static is(e){return e.type instanceof Vo}destroy(){}}class vy{constructor(e,t){this.attrs=e,this.spec=t||Vs}map(e,t,r,i){let o=e.mapResult(t.from+i,1);if(o.deleted)return null;let s=e.mapResult(t.to+i,-1);return s.deleted||s.pos<=o.pos?null:new $t(o.pos-r,s.pos-r,this)}valid(e,t){let{index:r,offset:i}=e.content.findIndex(t.from),o;return i==t.from&&!(o=e.child(r)).isText&&i+o.nodeSize==t.to}eq(e){return this==e||e instanceof vy&&yu(this.attrs,e.attrs)&&yu(this.spec,e.spec)}destroy(){}}class $t{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new $t(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new $t(e,e,new kd(t,r))}static inline(e,t,r,i){return new $t(e,t,new Vo(r,i))}static node(e,t,r,i){return new $t(e,t,new vy(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Vo}get widget(){return this.type instanceof kd}}const pa=[],Vs={};class Qe{constructor(e,t){this.local=e.length?e:pa,this.children=t.length?t:pa}static create(e,t){return t.length?Cd(t,e,0,Vs):Lt}find(e,t,r){let i=[];return this.findInner(e??0,t??1e9,i,0,r),i}findInner(e,t,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,t-a,r,i+a,o)}}map(e,t,r){return this==Lt||e.maps.length==0?this:this.mapInner(e,t,0,0,r||Vs)}mapInner(e,t,r,i,o){let s;for(let a=0;a<this.local.length;a++){let c=this.local[a].map(e,r,i);c&&c.type.valid(t,c)?(s||(s=[])).push(c):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?wT(this.children,s||[],e,t,r,i,o):s?new Qe(s.sort(Gs),pa):Lt}add(e,t){return t.length?this==Lt?Qe.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let i,o=0;e.forEach((a,c)=>{let f=c+r,p;if(p=ax(t,a,f)){for(i||(i=this.children.slice());o<i.length&&i[o]<c;)o+=3;i[o]==c?i[o+2]=i[o+2].addInner(a,p,f+1):i.splice(o,0,c,c+a.nodeSize,Cd(p,a,f+1,Vs)),o+=3}});let s=lx(o?cx(t):t,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Qe(s.length?this.local.concat(s).sort(Gs):this.local,i||this.children)}remove(e){return e.length==0||this==Lt?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+t,c=r[o+1]+t;for(let p=0,m;p<e.length;p++)(m=e[p])&&m.from>a&&m.to<c&&(e[p]=null,(s||(s=[])).push(m));if(!s)continue;r==this.children&&(r=this.children.slice());let f=r[o+2].removeInner(s,a+1);f!=Lt?r[o+2]=f:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let a=0;a<i.length;a++)i[a].eq(s,t)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Qe(i,r):Lt}forChild(e,t){if(this==Lt)return this;if(t.isLeaf)return Qe.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+t.content.size;for(let a=0;a<this.local.length;a++){let c=this.local[a];if(c.from<s&&c.to>o&&c.type instanceof Vo){let f=Math.max(o,c.from)-o,p=Math.min(s,c.to)-o;f<p&&(i||(i=[])).push(c.copy(f,p))}}if(i){let a=new Qe(i.sort(Gs),pa);return r?new _o([a,r]):a}return r||Lt}eq(e){if(this==e)return!0;if(!(e instanceof Qe)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return by(this.localsInner(e))}localsInner(e){if(this==Lt)return pa;if(e.inlineContent||!this.local.some(Vo.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Vo||t.push(this.local[r]);return t}forEachSet(e){e(this)}}Qe.empty=new Qe([],[]);Qe.removeOverlap=by;const Lt=Qe.empty;class _o{constructor(e){this.members=e}map(e,t){const r=this.members.map(i=>i.map(e,t,Vs));return _o.from(r)}forChild(e,t){if(t.isLeaf)return Qe.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,t);o!=Lt&&(o instanceof _o?r=r.concat(o.members):r.push(o))}return _o.from(r)}eq(e){if(!(e instanceof _o)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!t)t=o;else{r&&(t=t.slice(),r=!1);for(let s=0;s<o.length;s++)t.push(o[s])}}return t?by(r?t:t.sort(Gs)):pa}static from(e){switch(e.length){case 0:return Lt;case 1:return e[0];default:return new _o(e.every(t=>t instanceof Qe)?e:e.reduce((t,r)=>t.concat(r instanceof Qe?r:r.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function wT(n,e,t,r,i,o,s){let a=n.slice();for(let f=0,p=o;f<t.maps.length;f++){let m=0;t.maps[f].forEach((S,C,E,P)=>{let D=P-E-(C-S);for(let _=0;_<a.length;_+=3){let J=a[_+1];if(J<0||S>J+p-m)continue;let ie=a[_]+p-m;C>=ie?a[_+1]=S<=ie?-2:-1:S>=p&&D&&(a[_]+=D,a[_+1]+=D)}m+=D}),p=t.maps[f].map(p,-1)}let c=!1;for(let f=0;f<a.length;f+=3)if(a[f+1]<0){if(a[f+1]==-2){c=!0,a[f+1]=-1;continue}let p=t.map(n[f]+o),m=p-i;if(m<0||m>=r.content.size){c=!0;continue}let S=t.map(n[f+1]+o,-1),C=S-i,{index:E,offset:P}=r.content.findIndex(m),D=r.maybeChild(E);if(D&&P==m&&P+D.nodeSize==C){let _=a[f+2].mapInner(t,D,p+1,n[f]+o+1,s);_!=Lt?(a[f]=m,a[f+1]=C,a[f+2]=_):(a[f+1]=-2,c=!0)}else c=!0}if(c){let f=xT(a,n,e,t,i,o,s),p=Cd(f,r,0,s);e=p.local;for(let m=0;m<a.length;m+=3)a[m+1]<0&&(a.splice(m,3),m-=3);for(let m=0,S=0;m<p.children.length;m+=3){let C=p.children[m];for(;S<a.length&&a[S]<C;)S+=3;a.splice(S,0,p.children[m],p.children[m+1],p.children[m+2])}}return new Qe(e.sort(Gs),a)}function lx(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let i=n[r];t.push(new $t(i.from+e,i.to+e,i.type))}return t}function xT(n,e,t,r,i,o,s){function a(c,f){for(let p=0;p<c.local.length;p++){let m=c.local[p].map(r,i,f);m?t.push(m):s.onRemove&&s.onRemove(c.local[p].spec)}for(let p=0;p<c.children.length;p+=3)a(c.children[p+2],c.children[p]+f+1)}for(let c=0;c<n.length;c+=3)n[c+1]==-1&&a(n[c+2],e[c]+o+1);return t}function ax(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,i=null;for(let o=0,s;o<n.length;o++)(s=n[o])&&s.from>t&&s.to<r&&((i||(i=[])).push(s),n[o]=null);return i}function cx(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Cd(n,e,t,r){let i=[],o=!1;e.forEach((a,c)=>{let f=ax(n,a,c+t);if(f){o=!0;let p=Cd(f,a,t+c+1,r);p!=Lt&&i.push(c,c+a.nodeSize,p)}});let s=lx(o?cx(n):n,-t).sort(Gs);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Qe(s,i):Lt}function Gs(n,e){return n.from-e.from||n.to-e.to}function by(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let i=t+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==n&&(e=n.slice()),e[i]=o.copy(o.from,r.to),eb(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,o.from),eb(e,i,r.copy(o.from,r.to)));break}}}return e}function eb(n,e,t){for(;e<n.length&&Gs(t,n[e])>0;)e++;n.splice(e,0,t)}function Qp(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=Lt&&e.push(r)}),n.cursorWrapper&&e.push(Qe.create(n.state.doc,[n.cursorWrapper.deco])),_o.from(e)}const kT={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},CT=vn&&Wo<=11;class ET{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 TT{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ET,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);vn&&Wo<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),CT&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.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,kT)),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 t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.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(Gv(this.view)){if(this.suppressingSelectionUpdates)return Fi(this.view);if(vn&&Wo<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Zs(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 t=new Set,r;for(let o=e.focusNode;o;o=pu(o))t.add(o);for(let o=e.anchorNode;o;o=pu(o))if(t.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))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 t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Gv(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,c=[];if(e.editable)for(let p=0;p<t.length;p++){let m=this.registerMutation(t[p],c);m&&(o=o<0?m.from:Math.min(m.from,o),s=s<0?m.to:Math.max(m.to,s),m.typeOver&&(a=!0))}if(vr&&c.length){let p=c.filter(m=>m.nodeName=="BR");if(p.length==2){let[m,S]=p;m.parentNode&&m.parentNode.parentNode==S.parentNode?S.remove():m.remove()}else{let{focusNode:m}=this.currentSelection;for(let S of p){let C=S.parentNode;C&&C.nodeName=="LI"&&(!m||OT(e,m)!=C)&&S.remove()}}}let f=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ah(r)&&(f=hy(e))&&f.eq(me.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Fi(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),RT(e)),this.handleDOMChange(o,s,a,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Fi(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let p=0;p<e.addedNodes.length;p++){let m=e.addedNodes[p];t.push(m),m.nodeType==3&&(this.lastChangedTextNode=m)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(vn&&Wo<=11&&e.addedNodes.length)for(let p=0;p<e.addedNodes.length;p++){let{previousSibling:m,nextSibling:S}=e.addedNodes[p];(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m),(!S||Array.prototype.indexOf.call(e.addedNodes,S)<0)&&(o=S)}let s=i&&i.parentNode==e.target?Mt(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),c=o&&o.parentNode==e.target?Mt(o):e.target.childNodes.length,f=r.localPosFromDOM(e.target,c,1);return{from:a,to:f}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let tb=new WeakMap,nb=!1;function RT(n){if(!tb.has(n)&&(tb.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=vr,nb)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),nb=!0}}function rb(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=n.domAtPos(n.state.selection.anchor);return Zs(s.node,s.offset,i,o)&&([t,r,i,o]=[i,o,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:o}}function AT(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return rb(n,i)}let t;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",r,!0),t?rb(n,t):null}function OT(n,e){for(let t=e.parentNode;t&&t!=n.dom;t=t.parentNode){let r=n.docView.nearestDesc(t,!0);if(r&&r.node.isBlock)return t}return null}function IT(n,e,t){let{node:r,fromOffset:i,toOffset:o,from:s,to:a}=n.docView.parseRange(e,t),c=n.domSelectionRange(),f,p=c.anchorNode;if(p&&n.dom.contains(p.nodeType==1?p:p.parentNode)&&(f=[{node:p,offset:c.anchorOffset}],Ah(c)||f.push({node:c.focusNode,offset:c.focusOffset})),Bt&&n.input.lastKeyCode===8)for(let D=o;D>i;D--){let _=r.childNodes[D-1],J=_.pmViewDesc;if(_.nodeName=="BR"&&!J){o=D;break}if(!J||J.size)break}let m=n.state.doc,S=n.someProp("domParser")||ry.fromSchema(n.state.schema),C=m.resolve(s),E=null,P=S.parse(r,{topNode:C.parent,topMatch:C.parent.contentMatchAt(C.index()),topOpen:!0,from:i,to:o,preserveWhitespace:C.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:MT,context:C});if(f&&f[0].pos!=null){let D=f[0].pos,_=f[1]&&f[1].pos;_==null&&(_=D),E={anchor:D+s,head:_+s}}return{doc:P,sel:E,from:s,to:a}}function MT(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(tn&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||tn&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const DT=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function PT(n,e,t,r,i){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let Q=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,Ee=hy(n,Q);if(Ee&&!n.state.selection.eq(Ee)){if(Bt&&_i&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",X=>X(n,$s(13,"Enter"))))return;let re=n.state.tr.setSelection(Ee);Q=="pointer"?re.setMeta("pointer",!0):Q=="key"&&re.scrollIntoView(),o&&re.setMeta("composition",o),n.dispatch(re)}return}let s=n.state.doc.resolve(e),a=s.sharedDepth(t);e=s.before(a+1),t=n.state.doc.resolve(t).after(a+1);let c=n.state.selection,f=IT(n,e,t),p=n.state.doc,m=p.slice(f.from,f.to),S,C;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(S=n.state.selection.to,C="end"):(S=n.state.selection.from,C="start"),n.input.lastKeyCode=null;let E=FT(m.content,f.doc.content,f.from,S,C);if(E&&n.input.domChangeCount++,(Oa&&n.input.lastIOSEnter>Date.now()-225||_i)&&i.some(Q=>Q.nodeType==1&&!DT.test(Q.nodeName))&&(!E||E.endA>=E.endB)&&n.someProp("handleKeyDown",Q=>Q(n,$s(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!E)if(r&&c instanceof ke&&!c.empty&&c.$head.sameParent(c.$anchor)&&!n.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))E={start:c.from,endA:c.to,endB:c.to};else{if(f.sel){let Q=ib(n,n.state.doc,f.sel);if(Q&&!Q.eq(n.state.selection)){let Ee=n.state.tr.setSelection(Q);o&&Ee.setMeta("composition",o),n.dispatch(Ee)}}return}n.state.selection.from<n.state.selection.to&&E.start==E.endB&&n.state.selection instanceof ke&&(E.start>n.state.selection.from&&E.start<=n.state.selection.from+2&&n.state.selection.from>=f.from?E.start=n.state.selection.from:E.endA<n.state.selection.to&&E.endA>=n.state.selection.to-2&&n.state.selection.to<=f.to&&(E.endB+=n.state.selection.to-E.endA,E.endA=n.state.selection.to)),vn&&Wo<=11&&E.endB==E.start+1&&E.endA==E.start&&E.start>f.from&&f.doc.textBetween(E.start-f.from-1,E.start-f.from+1)=="  "&&(E.start--,E.endA--,E.endB--);let P=f.doc.resolveNoCache(E.start-f.from),D=f.doc.resolveNoCache(E.endB-f.from),_=p.resolve(E.start),J=P.sameParent(D)&&P.parent.inlineContent&&_.end()>=E.endA,ie;if((Oa&&n.input.lastIOSEnter>Date.now()-225&&(!J||i.some(Q=>Q.nodeName=="DIV"||Q.nodeName=="P"))||!J&&P.pos<f.doc.content.size&&!P.sameParent(D)&&(ie=me.findFrom(f.doc.resolve(P.pos+1),1,!0))&&ie.head==D.pos)&&n.someProp("handleKeyDown",Q=>Q(n,$s(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>E.start&&NT(p,E.start,E.endA,P,D)&&n.someProp("handleKeyDown",Q=>Q(n,$s(8,"Backspace")))){_i&&Bt&&n.domObserver.suppressSelectionUpdates();return}Bt&&E.endB==E.start&&(n.input.lastChromeDelete=Date.now()),_i&&!J&&P.start()!=D.start()&&D.parentOffset==0&&P.depth==D.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==E.endA&&(E.endB-=2,D=f.doc.resolveNoCache(E.endB-f.from),setTimeout(()=>{n.someProp("handleKeyDown",function(Q){return Q(n,$s(13,"Enter"))})},20));let oe=E.start,te=E.endA,G,ne,ae;if(J){if(P.pos==D.pos)vn&&Wo<=11&&P.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Fi(n),20)),G=n.state.tr.delete(oe,te),ne=p.resolve(E.start).marksAcross(p.resolve(E.endA));else if(E.endA==E.endB&&(ae=_T(P.parent.content.cut(P.parentOffset,D.parentOffset),_.parent.content.cut(_.parentOffset,E.endA-_.start()))))G=n.state.tr,ae.type=="add"?G.addMark(oe,te,ae.mark):G.removeMark(oe,te,ae.mark);else if(P.parent.child(P.index()).isText&&P.index()==D.index()-(D.textOffset?0:1)){let Q=P.parent.textBetween(P.parentOffset,D.parentOffset);if(n.someProp("handleTextInput",Ee=>Ee(n,oe,te,Q)))return;G=n.state.tr.insertText(Q,oe,te)}}if(G||(G=n.state.tr.replace(oe,te,f.doc.slice(E.start-f.from,E.endB-f.from))),f.sel){let Q=ib(n,G.doc,f.sel);Q&&!(Bt&&n.composing&&Q.empty&&(E.start!=E.endB||n.input.lastChromeDelete<Date.now()-100)&&(Q.head==oe||Q.head==G.mapping.map(te)-1)||vn&&Q.empty&&Q.head==oe)&&G.setSelection(Q)}ne&&G.ensureMarks(ne),o&&G.setMeta("composition",o),n.dispatch(G.scrollIntoView())}function ib(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:py(n,e.resolve(t.anchor),e.resolve(t.head))}function _T(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,o=r,s,a,c;for(let p=0;p<r.length;p++)i=r[p].removeFromSet(i);for(let p=0;p<t.length;p++)o=t[p].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],s="add",c=p=>p.mark(a.addToSet(p.marks));else if(i.length==0&&o.length==1)a=o[0],s="remove",c=p=>p.mark(a.removeFromSet(p.marks));else return null;let f=[];for(let p=0;p<e.childCount;p++)f.push(c(e.child(p)));if(W.from(f).eq(n))return{mark:a,type:s}}function NT(n,e,t,r,i){if(t-e<=i.pos-r.pos||qp(r,!0,!1)<i.pos)return!1;let o=n.resolve(e);if(!r.parent.isTextblock){let a=o.nodeAfter;return a!=null&&t==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=n.resolve(qp(o,!0,!0));return!s.parent.isTextblock||s.pos>t||qp(s,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function qp(n,e,t){let r=n.depth,i=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let o=n.node(r).maybeChild(n.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function FT(n,e,t,r,i){let o=n.findDiffStart(e,t);if(o==null)return null;let{a:s,b:a}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let c=Math.max(0,o-Math.min(s,a));r-=s+c-o}if(s<o&&n.size<e.size){let c=r<=o&&r>=s?o-r:0;o-=c,o&&o<e.size&&ob(e.textBetween(o-1,o+1))&&(o+=c?1:-1),a=o+(a-s),s=o}else if(a<o){let c=r<=o&&r>=a?o-r:0;o-=c,o&&o<n.size&&ob(n.textBetween(o-1,o+1))&&(o+=c?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function ob(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class LT{constructor(e,t){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 nT,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ub),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=ab(this),lb(this),this.nodeViews=cb(this),this.docView=zv(this.state.doc,sb(this),Qp(this),this.dom,this),this.domObserver=new TT(this,(r,i,o,s)=>PT(this,r,i,o,s)),this.domObserver.start(),rT(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 t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&im(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(ub),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(rx(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let C=cb(this);$T(C,this.nodeViews)&&(this.nodeViews=C,o=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&im(this),this.editable=ab(this),lb(this);let c=Qp(this),f=sb(this),p=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",m=o||!this.docView.matchesNode(e.doc,f,c);(m||!e.selection.eq(i.selection))&&(s=!0);let S=p=="preserve"&&s&&this.dom.style.overflowAnchor==null&&yE(this);if(s){this.domObserver.stop();let C=m&&(vn||Bt)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&BT(i.selection,e.selection);if(m){let E=Bt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=mT(this)),(o||!this.docView.update(e.doc,f,c,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=zv(e.doc,f,c,this.dom,this)),E&&!this.trackWrites&&(C=!0)}C||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&jE(this))?Fi(this,C):(Hw(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),p=="reset"?this.dom.scrollTop=0:p=="to selection"?this.scrollToSelection():S&&vE(S)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof he){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&_v(this,t.getBoundingClientRect(),e)}else _v(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 t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-t.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new ox(e.slice,e.move,i<0?void 0:he.create(this.state.doc,i))}someProp(e,t){let r=this._props&&this._props[e],i;if(r!=null&&(i=t?t(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(i=t?t(a):a))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(i=t?t(a):a))return i}}hasFocus(){if(vn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&bE(this.dom),Fi(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return CE(this,e)}coordsAtPos(e,t=1){return Fw(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return OE(this,t||this.state,e)}pasteHTML(e,t){return mu(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return mu(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(iT(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Qp(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,sE())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return sT(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?tn&&this.root.nodeType===11&&fE(this.dom.ownerDocument)==this.dom&&AT(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function sb(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[$t.node(0,n.state.doc.content.size,e)]}function lb(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:$t.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function ab(n){return!n.someProp("editable",e=>e(n.state)===!1)}function BT(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function cb(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function $T(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function ub(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Go={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:"'"},Ed={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},zT=typeof navigator<"u"&&/Mac/.test(navigator.platform),jT=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Dt=0;Dt<10;Dt++)Go[48+Dt]=Go[96+Dt]=String(Dt);for(var Dt=1;Dt<=24;Dt++)Go[Dt+111]="F"+Dt;for(var Dt=65;Dt<=90;Dt++)Go[Dt]=String.fromCharCode(Dt+32),Ed[Dt]=String.fromCharCode(Dt);for(var eg in Go)Ed.hasOwnProperty(eg)||(Ed[eg]=Go[eg]);function UT(n){var e=zT&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||jT&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ed:Go)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const WT=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function HT(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,o,s;for(let a=0;a<e.length-1;a++){let c=e[a];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))WT?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(t="Alt-"+t),i&&(t="Ctrl-"+t),s&&(t="Meta-"+t),o&&(t="Shift-"+t),t}function VT(n){let e=Object.create(null);for(let t in n)e[HT(t)]=n[t];return e}function tg(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function GT(n){return new il({props:{handleKeyDown:Sy(n)}})}function Sy(n){let e=VT(n);return function(t,r){let i=UT(r),o,s=e[tg(i,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=e[tg(i,r,!1)];if(a&&a(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=Go[r.keyCode])&&o!=i){let a=e[tg(o,r)];if(a&&a(t.state,t.dispatch,t))return!0}}return!1}}const JT=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function ux(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const YT=(n,e,t)=>{let r=ux(n,t);if(!r)return!1;let i=wy(r);if(!i){let s=r.blockRange(),a=s&&za(s);return a==null?!1:(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(px(n,i,e,-1))return!0;if(r.parent.content.size==0&&(Ia(o,"end")||he.isSelectable(o)))for(let s=r.depth;;s--){let a=Th(n.doc,r.before(s),r.after(s),ee.empty);if(a&&a.slice.size<a.to-a.from){if(e){let c=n.tr.step(a);c.setSelection(Ia(o,"end")?me.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):he.create(c.doc,i.pos-o.nodeSize)),e(c.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},KT=(n,e,t)=>{let r=ux(n,t);if(!r)return!1;let i=wy(r);return i?fx(n,i,e):!1},XT=(n,e,t)=>{let r=dx(n,t);if(!r)return!1;let i=xy(r);return i?fx(n,i,e):!1};function fx(n,e,t){let r=e.nodeBefore,i=r,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let p=i.lastChild;if(!p)return!1;i=p}let s=e.nodeAfter,a=s,c=e.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let p=a.firstChild;if(!p)return!1;a=p}let f=Th(n.doc,o,c,ee.empty);if(!f||f.from!=o||f instanceof bt&&f.slice.size>=c-o)return!1;if(t){let p=n.tr.step(f);p.setSelection(ke.create(p.doc,o)),t(p.scrollIntoView())}return!0}function Ia(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const ZT=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;o=wy(r)}let s=o&&o.nodeBefore;return!s||!he.isSelectable(s)?!1:(e&&e(n.tr.setSelection(he.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function wy(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function dx(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const QT=(n,e,t)=>{let r=dx(n,t);if(!r)return!1;let i=xy(r);if(!i)return!1;let o=i.nodeAfter;if(px(n,i,e,1))return!0;if(r.parent.content.size==0&&(Ia(o,"start")||he.isSelectable(o))){let s=Th(n.doc,r.before(),r.after(),ee.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=n.tr.step(s);a.setSelection(Ia(o,"start")?me.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):he.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},qT=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;o=xy(r)}let s=o&&o.nodeAfter;return!s||!he.isSelectable(s)?!1:(e&&e(n.tr.setSelection(he.create(n.doc,o.pos)).scrollIntoView()),!0)};function xy(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const eR=(n,e)=>{let t=n.selection,r=t instanceof he,i;if(r){if(t.node.isTextblock||!ja(n.doc,t.from))return!1;i=t.from}else if(i=ay(n.doc,t.from,-1),i==null)return!1;if(e){let o=n.tr.join(i);r&&o.setSelection(he.create(o.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},tR=(n,e)=>{let t=n.selection,r;if(t instanceof he){if(t.node.isTextblock||!ja(n.doc,t.to))return!1;r=t.to}else if(r=ay(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},nR=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),o=i&&za(i);return o==null?!1:(e&&e(n.tr.lift(i,o).scrollIntoView()),!0)},rR=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
10
- `).scrollIntoView()),!0)};function hx(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const iR=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),o=t.indexAfter(-1),s=hx(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=t.after(),c=n.tr.replaceWith(a,a,s.createAndFill());c.setSelection(me.near(c.doc.resolve(a),1)),e(c.scrollIntoView())}return!0},oR=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof Kn||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=hx(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=n.tr.insert(s,o.createAndFill());a.setSelection(ke.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},sR=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let o=t.before();if(ly(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let r=t.blockRange(),i=r&&za(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)},lR=(n,e)=>{let{$from:t,to:r}=n.selection,i,o=t.sharedDepth(r);return o==0?!1:(i=t.before(o),e&&e(n.tr.setSelection(he.create(n.doc,i))),!0)};function aR(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||ja(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function px(n,e,t,r){let i=e.nodeBefore,o=e.nodeAfter,s,a,c=i.type.spec.isolating||o.type.spec.isolating;if(!c&&aR(n,e,t))return!0;let f=!c&&e.parent.canReplace(e.index(),e.index()+1);if(f&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(t){let C=e.pos+o.nodeSize,E=W.empty;for(let _=s.length-1;_>=0;_--)E=W.from(s[_].create(null,E));E=W.from(i.copy(E));let P=n.tr.step(new St(e.pos-1,C,e.pos,C,new ee(E,1,0),s.length,!0)),D=P.doc.resolve(C+2*s.length);D.nodeAfter&&D.nodeAfter.type==i.type&&ja(P.doc,D.pos)&&P.join(D.pos),t(P.scrollIntoView())}return!0}let p=o.type.spec.isolating||r>0&&c?null:me.findFrom(e,1),m=p&&p.$from.blockRange(p.$to),S=m&&za(m);if(S!=null&&S>=e.depth)return t&&t(n.tr.lift(m,S).scrollIntoView()),!0;if(f&&Ia(o,"start",!0)&&Ia(i,"end")){let C=i,E=[];for(;E.push(C),!C.isTextblock;)C=C.lastChild;let P=o,D=1;for(;!P.isTextblock;P=P.firstChild)D++;if(C.canReplace(C.childCount,C.childCount,P.content)){if(t){let _=W.empty;for(let ie=E.length-1;ie>=0;ie--)_=W.from(E[ie].copy(_));let J=n.tr.step(new St(e.pos-E.length,e.pos+o.nodeSize,e.pos+D,e.pos+o.nodeSize-D,new ee(_,E.length,0),0,!0));t(J.scrollIntoView())}return!0}}return!1}function gx(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(t&&t(e.tr.setSelection(ke.create(e.doc,n<0?i.start(o):i.end(o)))),!0):!1}}const cR=gx(-1),uR=gx(1);function fR(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),a=s&&sy(s,n,e);return a?(r&&r(t.tr.wrap(s,a).scrollIntoView()),!0):!1}}function dR(n,e=null){return function(t,r){let i=!1;for(let o=0;o<t.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=t.selection.ranges[o];t.doc.nodesBetween(s,a,(c,f)=>{if(i)return!1;if(!(!c.isTextblock||c.hasMarkup(n,e)))if(c.type==n)i=!0;else{let p=t.doc.resolve(f),m=p.index();i=p.parent.canReplaceWith(m,m+1,n)}})}if(!i)return!1;if(r){let o=t.tr;for(let s=0;s<t.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:c}}=t.selection.ranges[s];o.setBlockType(a,c,n,e)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function hR(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),a=!1,c=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(n)&&s.startIndex==0){if(i.index(s.depth-1)==0)return!1;let p=t.doc.resolve(s.start-2);c=new fu(p,p,s.depth),s.endIndex<s.parent.childCount&&(s=new fu(i,t.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let f=sy(c,n,e,s);return f?(r&&r(pR(t.tr,s,f,a,n).scrollIntoView()),!0):!1}}function pR(n,e,t,r,i){let o=W.empty;for(let p=t.length-1;p>=0;p--)o=W.from(t[p].type.create(t[p].attrs,o));n.step(new St(e.start-(r?2:0),e.end,e.start,e.end,new ee(o,0,0),t.length,!0));let s=0;for(let p=0;p<t.length;p++)t[p].type==i&&(s=p+1);let a=t.length-s,c=e.start+t.length-(r?2:0),f=e.parent;for(let p=e.startIndex,m=e.endIndex,S=!0;p<m;p++,S=!1)!S&&ly(n.doc,c,a)&&(n.split(c,a),c+=2*a),c+=f.child(p).nodeSize;return n}function gR(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==n);return o?t?r.node(o.depth-1).type==n?mR(e,t,n,o):yR(e,t,o):!0:!1}}function mR(n,e,t,r){let i=n.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new St(o-1,s,o,s,new ee(W.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new fu(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=za(r);if(a==null)return!1;i.lift(r,a);let c=i.mapping.map(o,-1)-1;return ja(i.doc,c)&&i.join(c),e(i.scrollIntoView()),!0}function yR(n,e,t){let r=n.tr,i=t.parent;for(let C=t.end,E=t.endIndex-1,P=t.startIndex;E>P;E--)C-=i.child(E).nodeSize,r.delete(C-1,C+1);let o=r.doc.resolve(t.start),s=o.nodeAfter;if(r.mapping.map(t.end)!=t.start+o.nodeAfter.nodeSize)return!1;let a=t.startIndex==0,c=t.endIndex==i.childCount,f=o.node(-1),p=o.index(-1);if(!f.canReplace(p+(a?0:1),p+1,s.content.append(c?W.empty:W.from(i))))return!1;let m=o.pos,S=m+s.nodeSize;return r.step(new St(m-(a?1:0),S+(c?1:0),m+1,S-1,new ee((a?W.empty:W.from(i.copy(W.empty))).append(c?W.empty:W.from(i.copy(W.empty))),a?0:1,c?0:1),a?0:1)),e(r.scrollIntoView()),!0}function vR(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,f=>f.childCount>0&&f.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,c=a.child(s-1);if(c.type!=n)return!1;if(t){let f=c.lastChild&&c.lastChild.type==a.type,p=W.from(f?n.create():null),m=new ee(W.from(n.create(null,W.from(a.type.create(null,p)))),f?3:1,0),S=o.start,C=o.end;t(e.tr.step(new St(S-(f?3:1),C,S,C,m,1,!0)).scrollIntoView())}return!0}}function mx(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(t=mx(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function yx(){for(var n,e,t=0,r="",i=arguments.length;t<i;t++)(n=arguments[t])&&(e=mx(n))&&(r&&(r+=" "),r+=e);return r}const ky="-",bR=n=>{const e=wR(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:s=>{const a=s.split(ky);return a[0]===""&&a.length!==1&&a.shift(),vx(a,e)||SR(s)},getConflictingClassGroupIds:(s,a)=>{const c=t[s]||[];return a&&r[s]?[...c,...r[s]]:c}}},vx=(n,e)=>{var s;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?vx(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const o=n.join(ky);return(s=e.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId},fb=/^\[(.+)\]$/,SR=n=>{if(fb.test(n)){const e=fb.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},wR=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return kR(Object.entries(n.classGroups),t).forEach(([o,s])=>{om(s,r,o,e)}),r},om=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const o=i===""?e:db(e,i);o.classGroupId=t;return}if(typeof i=="function"){if(xR(i)){om(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([o,s])=>{om(s,db(e,o),t,r)})})},db=(n,e)=>{let t=n;return e.split(ky).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},xR=n=>n.isThemeGetter,kR=(n,e)=>e?n.map(([t,r])=>{const i=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[e+s,a])):o);return[t,i]}):n,CR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(o,s)=>{t.set(o,s),e++,e>n&&(e=0,r=t,t=new Map)};return{get(o){let s=t.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){t.has(o)?t.set(o,s):i(o,s)}}},bx="!",ER=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],o=e.length,s=a=>{const c=[];let f=0,p=0,m;for(let D=0;D<a.length;D++){let _=a[D];if(f===0){if(_===i&&(r||a.slice(D,D+o)===e)){c.push(a.slice(p,D)),p=D+o;continue}if(_==="/"){m=D;continue}}_==="["?f++:_==="]"&&f--}const S=c.length===0?a:a.substring(p),C=S.startsWith(bx),E=C?S.substring(1):S,P=m&&m>p?m-p:void 0;return{modifiers:c,hasImportantModifier:C,baseClassName:E,maybePostfixModifierPosition:P}};return t?a=>t({className:a,parseClassName:s}):s},TR=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},RR=n=>({cache:CR(n.cacheSize),parseClassName:ER(n),...bR(n)}),AR=/\s+/,OR=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,o=[],s=n.trim().split(AR);let a="";for(let c=s.length-1;c>=0;c-=1){const f=s[c],{modifiers:p,hasImportantModifier:m,baseClassName:S,maybePostfixModifierPosition:C}=t(f);let E=!!C,P=r(E?S.substring(0,C):S);if(!P){if(!E){a=f+(a.length>0?" "+a:a);continue}if(P=r(S),!P){a=f+(a.length>0?" "+a:a);continue}E=!1}const D=TR(p).join(":"),_=m?D+bx:D,J=_+P;if(o.includes(J))continue;o.push(J);const ie=i(P,E);for(let oe=0;oe<ie.length;++oe){const te=ie[oe];o.push(_+te)}a=f+(a.length>0?" "+a:a)}return a};function IR(){let n=0,e,t,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Sx(e))&&(r&&(r+=" "),r+=t);return r}const Sx=n=>{if(typeof n=="string")return n;let e,t="";for(let r=0;r<n.length;r++)n[r]&&(e=Sx(n[r]))&&(t&&(t+=" "),t+=e);return t};function MR(n,...e){let t,r,i,o=s;function s(c){const f=e.reduce((p,m)=>m(p),n());return t=RR(f),r=t.cache.get,i=t.cache.set,o=a,a(c)}function a(c){const f=r(c);if(f)return f;const p=OR(c,t);return i(c,p),p}return function(){return o(IR.apply(null,arguments))}}const Ue=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},wx=/^\[(?:([a-z-]+):)?(.+)\]$/i,DR=/^\d+\/\d+$/,PR=new Set(["px","full","screen"]),_R=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,LR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ai=n=>ka(n)||PR.has(n)||DR.test(n),Eo=n=>Ua(n,"length",GR),ka=n=>!!n&&!Number.isNaN(Number(n)),ng=n=>Ua(n,"number",ka),Uc=n=>!!n&&Number.isInteger(Number(n)),$R=n=>n.endsWith("%")&&ka(n.slice(0,-1)),Se=n=>wx.test(n),To=n=>_R.test(n),zR=new Set(["length","size","percentage"]),jR=n=>Ua(n,zR,xx),UR=n=>Ua(n,"position",xx),WR=new Set(["image","url"]),HR=n=>Ua(n,WR,YR),VR=n=>Ua(n,"",JR),Wc=()=>!0,Ua=(n,e,t)=>{const r=wx.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},GR=n=>NR.test(n)&&!FR.test(n),xx=()=>!1,JR=n=>LR.test(n),YR=n=>BR.test(n),KR=()=>{const n=Ue("colors"),e=Ue("spacing"),t=Ue("blur"),r=Ue("brightness"),i=Ue("borderColor"),o=Ue("borderRadius"),s=Ue("borderSpacing"),a=Ue("borderWidth"),c=Ue("contrast"),f=Ue("grayscale"),p=Ue("hueRotate"),m=Ue("invert"),S=Ue("gap"),C=Ue("gradientColorStops"),E=Ue("gradientColorStopPositions"),P=Ue("inset"),D=Ue("margin"),_=Ue("opacity"),J=Ue("padding"),ie=Ue("saturate"),oe=Ue("scale"),te=Ue("sepia"),G=Ue("skew"),ne=Ue("space"),ae=Ue("translate"),Q=()=>["auto","contain","none"],Ee=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",Se,e],X=()=>[Se,e],fe=()=>["",Ai,Eo],V=()=>["auto",ka,Se],De=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ye=()=>["solid","dashed","dotted","double","none"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ie=()=>["start","end","center","between","around","evenly","stretch"],be=()=>["","0",Se],lt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],pe=()=>[ka,Se];return{cacheSize:500,separator:":",theme:{colors:[Wc],spacing:[Ai,Eo],blur:["none","",To,Se],brightness:pe(),borderColor:[n],borderRadius:["none","","full",To,Se],borderSpacing:X(),borderWidth:fe(),contrast:pe(),grayscale:be(),hueRotate:pe(),invert:be(),gap:X(),gradientColorStops:[n],gradientColorStopPositions:[$R,Eo],inset:re(),margin:re(),opacity:pe(),padding:X(),saturate:pe(),scale:pe(),sepia:be(),skew:pe(),space:X(),translate:X()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[To]}],"break-after":[{"break-after":lt()}],"break-before":[{"break-before":lt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...De(),Se]}],overflow:[{overflow:Ee()}],"overflow-x":[{"overflow-x":Ee()}],"overflow-y":[{"overflow-y":Ee()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Uc,Se]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:be()}],shrink:[{shrink:be()}],order:[{order:["first","last","none",Uc,Se]}],"grid-cols":[{"grid-cols":[Wc]}],"col-start-end":[{col:["auto",{span:["full",Uc,Se]},Se]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[Wc]}],"row-start-end":[{row:["auto",{span:[Uc,Se]},Se]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[S]}],"gap-x":[{"gap-x":[S]}],"gap-y":[{"gap-y":[S]}],"justify-content":[{justify:["normal",...Ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[J]}],px:[{px:[J]}],py:[{py:[J]}],ps:[{ps:[J]}],pe:[{pe:[J]}],pt:[{pt:[J]}],pr:[{pr:[J]}],pb:[{pb:[J]}],pl:[{pl:[J]}],m:[{m:[D]}],mx:[{mx:[D]}],my:[{my:[D]}],ms:[{ms:[D]}],me:[{me:[D]}],mt:[{mt:[D]}],mr:[{mr:[D]}],mb:[{mb:[D]}],ml:[{ml:[D]}],"space-x":[{"space-x":[ne]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ne]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,e]}],"min-w":[{"min-w":[Se,e,"min","max","fit"]}],"max-w":[{"max-w":[Se,e,"none","full","min","max","fit","prose",{screen:[To]},To]}],h:[{h:[Se,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,e,"auto","min","max","fit"]}],"font-size":[{text:["base",To,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ng]}],"font-family":[{font:[Wc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Se]}],"line-clamp":[{"line-clamp":["none",ka,ng]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ai,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ai,Eo]}],"underline-offset":[{"underline-offset":["auto",Ai,Se]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...De(),UR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},HR]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...ye(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:ye()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ye()]}],"outline-offset":[{"outline-offset":[Ai,Se]}],"outline-w":[{outline:[Ai,Eo]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Ai,Eo]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",To,VR]}],"shadow-color":[{shadow:[Wc]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...xe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":xe()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",To,Se]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[ie]}],sepia:[{sepia:[te]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[ie]}],"backdrop-sepia":[{"backdrop-sepia":[te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Se]}],duration:[{duration:pe()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:pe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[oe]}],"scale-x":[{"scale-x":[oe]}],"scale-y":[{"scale-y":[oe]}],rotate:[{rotate:[Uc,Se]}],"translate-x":[{"translate-x":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-x":[{"skew-x":[G]}],"skew-y":[{"skew-y":[G]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Se]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Ai,Eo,ng]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},XR=MR(KR);var vu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function ZR(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var hb=Object.prototype.toString,Cx=function(e){var t=hb.call(e),r=t==="[object Arguments]";return r||(r=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&hb.call(e.callee)==="[object Function]"),r},rg,pb;function QR(){if(pb)return rg;pb=1;var n;if(!Object.keys){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Cx,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(S){var C=S.constructor;return C&&C.prototype===S},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if(typeof window>"u")return!1;for(var S in window)try{if(!f["$"+S]&&e.call(window,S)&&window[S]!==null&&typeof window[S]=="object")try{c(window[S])}catch{return!0}}catch{return!0}return!1}(),m=function(S){if(typeof window>"u"||!p)return c(S);try{return c(S)}catch{return!1}};n=function(C){var E=C!==null&&typeof C=="object",P=t.call(C)==="[object Function]",D=r(C),_=E&&t.call(C)==="[object String]",J=[];if(!E&&!P&&!D)throw new TypeError("Object.keys called on a non-object");var ie=s&&P;if(_&&C.length>0&&!e.call(C,0))for(var oe=0;oe<C.length;++oe)J.push(String(oe));if(D&&C.length>0)for(var te=0;te<C.length;++te)J.push(String(te));else for(var G in C)!(ie&&G==="prototype")&&e.call(C,G)&&J.push(String(G));if(o)for(var ne=m(C),ae=0;ae<a.length;++ae)!(ne&&a[ae]==="constructor")&&e.call(C,a[ae])&&J.push(a[ae]);return J}}return rg=n,rg}var qR=Array.prototype.slice,eA=Cx,gb=Object.keys,Qf=gb?function(e){return gb(e)}:QR(),mb=Object.keys;Qf.shim=function(){if(Object.keys){var e=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);e||(Object.keys=function(r){return eA(r)?mb(qR.call(r)):mb(r)})}else Object.keys=Qf;return Object.keys||Qf};var Cy=Qf,tA=Error,nA=EvalError,rA=RangeError,iA=ReferenceError,Ex=SyntaxError,Zo=TypeError,oA=URIError,Mh=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==i||s.enumerable!==!0)return!1}return!0},yb=typeof Symbol<"u"&&Symbol,sA=Mh,Ey=function(){return typeof yb!="function"||typeof Symbol!="function"||typeof yb("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:sA()},ig={__proto__:null,foo:{}},lA=Object,aA=function(){return{__proto__:ig}.foo===ig.foo&&!(ig instanceof lA)},cA="Function.prototype.bind called on incompatible ",uA=Object.prototype.toString,fA=Math.max,dA="[object Function]",vb=function(e,t){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},hA=function(e,t){for(var r=[],i=t,o=0;i<e.length;i+=1,o+=1)r[o]=e[i];return r},pA=function(n,e){for(var t="",r=0;r<n.length;r+=1)t+=n[r],r+1<n.length&&(t+=e);return t},gA=function(e){var t=this;if(typeof t!="function"||uA.apply(t)!==dA)throw new TypeError(cA+t);for(var r=hA(arguments,1),i,o=function(){if(this instanceof i){var p=t.apply(this,vb(r,arguments));return Object(p)===p?p:this}return t.apply(e,vb(r,arguments))},s=fA(0,t.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(i=Function("binder","return function ("+pA(a,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var f=function(){};f.prototype=t.prototype,i.prototype=new f,f.prototype=null}return i},mA=gA,Ty=Function.prototype.bind||mA,yA=Function.prototype.call,vA=Object.prototype.hasOwnProperty,bA=Ty,Tx=bA.call(yA,vA),Ce,SA=tA,wA=nA,xA=rA,kA=iA,Ma=Ex,Ca=Zo,CA=oA,Rx=Function,og=function(n){try{return Rx('"use strict"; return ('+n+").constructor;")()}catch{}},Js=Object.getOwnPropertyDescriptor;if(Js)try{Js({},"")}catch{Js=null}var sg=function(){throw new Ca},EA=Js?function(){try{return arguments.callee,sg}catch{try{return Js(arguments,"callee").get}catch{return sg}}}():sg,ua=Ey(),TA=aA(),yt=Object.getPrototypeOf||(TA?function(n){return n.__proto__}:null),ga={},RA=typeof Uint8Array>"u"||!yt?Ce:yt(Uint8Array),Ys={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":ua&&yt?yt([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":ga,"%AsyncGenerator%":ga,"%AsyncGeneratorFunction%":ga,"%AsyncIteratorPrototype%":ga,"%Atomics%":typeof Atomics>"u"?Ce:Atomics,"%BigInt%":typeof BigInt>"u"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":SA,"%eval%":eval,"%EvalError%":wA,"%Float32Array%":typeof Float32Array>"u"?Ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ce:FinalizationRegistry,"%Function%":Rx,"%GeneratorFunction%":ga,"%Int8Array%":typeof Int8Array>"u"?Ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ua&&yt?yt(yt([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map>"u"?Ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ua||!yt?Ce:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ce:Promise,"%Proxy%":typeof Proxy>"u"?Ce:Proxy,"%RangeError%":xA,"%ReferenceError%":kA,"%Reflect%":typeof Reflect>"u"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ua||!yt?Ce:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ua&&yt?yt(""[Symbol.iterator]()):Ce,"%Symbol%":ua?Symbol:Ce,"%SyntaxError%":Ma,"%ThrowTypeError%":EA,"%TypedArray%":RA,"%TypeError%":Ca,"%Uint8Array%":typeof Uint8Array>"u"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ce:Uint32Array,"%URIError%":CA,"%WeakMap%":typeof WeakMap>"u"?Ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ce:WeakSet};if(yt)try{null.error}catch(n){var AA=yt(yt(n));Ys["%Error.prototype%"]=AA}var OA=function n(e){var t;if(e==="%AsyncFunction%")t=og("async function () {}");else if(e==="%GeneratorFunction%")t=og("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=og("async function* () {}");else if(e==="%AsyncGenerator%"){var r=n("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=n("%AsyncGenerator%");i&&yt&&(t=yt(i.prototype))}return Ys[e]=t,t},bb={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Bu=Ty,Td=Tx,IA=Bu.call(Function.call,Array.prototype.concat),MA=Bu.call(Function.apply,Array.prototype.splice),Sb=Bu.call(Function.call,String.prototype.replace),Rd=Bu.call(Function.call,String.prototype.slice),DA=Bu.call(Function.call,RegExp.prototype.exec),PA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_A=/\\(\\)?/g,NA=function(e){var t=Rd(e,0,1),r=Rd(e,-1);if(t==="%"&&r!=="%")throw new Ma("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&t!=="%")throw new Ma("invalid intrinsic syntax, expected opening `%`");var i=[];return Sb(e,PA,function(o,s,a,c){i[i.length]=a?Sb(c,_A,"$1"):s||o}),i},FA=function(e,t){var r=e,i;if(Td(bb,r)&&(i=bb[r],r="%"+i[0]+"%"),Td(Ys,r)){var o=Ys[r];if(o===ga&&(o=OA(r)),typeof o>"u"&&!t)throw new Ca("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Ma("intrinsic "+e+" does not exist!")},Zr=function(e,t){if(typeof e!="string"||e.length===0)throw new Ca("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ca('"allowMissing" argument must be a boolean');if(DA(/^%?[^%]*%?$/,e)===null)throw new Ma("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=NA(e),i=r.length>0?r[0]:"",o=FA("%"+i+"%",t),s=o.name,a=o.value,c=!1,f=o.alias;f&&(i=f[0],MA(r,IA([0,1],f)));for(var p=1,m=!0;p<r.length;p+=1){var S=r[p],C=Rd(S,0,1),E=Rd(S,-1);if((C==='"'||C==="'"||C==="`"||E==='"'||E==="'"||E==="`")&&C!==E)throw new Ma("property names with quotes must have matching quotes");if((S==="constructor"||!m)&&(c=!0),i+="."+S,s="%"+i+"%",Td(Ys,s))a=Ys[s];else if(a!=null){if(!(S in a)){if(!t)throw new Ca("base intrinsic for "+e+" exists, but the property is not available.");return}if(Js&&p+1>=r.length){var P=Js(a,S);m=!!P,m&&"get"in P&&!("originalValue"in P.get)?a=P.get:a=a[S]}else m=Td(a,S),a=a[S];m&&!c&&(Ys[s]=a)}}return a},LA=Zr,qf=LA("%Object.defineProperty%",!0)||!1;if(qf)try{qf({},"a",{value:1})}catch{qf=!1}var Ry=qf,BA=Zr,ed=BA("%Object.getOwnPropertyDescriptor%",!0);if(ed)try{ed([],"length")}catch{ed=null}var Ay=ed,wb=Ry,$A=Ex,fa=Zo,xb=Ay,Oy=function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new fa("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new fa("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new fa("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new fa("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new fa("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new fa("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!xb&&xb(e,t);if(wb)wb(e,t,{configurable:s===null&&c?c.configurable:!s,enumerable:i===null&&c?c.enumerable:!i,value:r,writable:o===null&&c?c.writable:!o});else if(a||!i&&!o&&!s)e[t]=r;else throw new $A("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},sm=Ry,Ax=function(){return!!sm};Ax.hasArrayLengthDefineBug=function(){if(!sm)return null;try{return sm([],"length",{value:1}).length!==1}catch{return!0}};var Iy=Ax,zA=Cy,jA=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",UA=Object.prototype.toString,WA=Array.prototype.concat,kb=Oy,HA=function(n){return typeof n=="function"&&UA.call(n)==="[object Function]"},Ox=Iy(),VA=function(n,e,t,r){if(e in n){if(r===!0){if(n[e]===t)return}else if(!HA(r)||!r())return}Ox?kb(n,e,t,!0):kb(n,e,t)},Ix=function(n,e){var t=arguments.length>2?arguments[2]:{},r=zA(e);jA&&(r=WA.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i<r.length;i+=1)VA(n,r[i],e[r[i]],t[r[i]])};Ix.supportsDescriptors=!!Ox;var ol=Ix,Mx={exports:{}},GA=Zr,Cb=Oy,JA=Iy(),Eb=Ay,Tb=Zo,YA=GA("%Math.floor%"),KA=function(e,t){if(typeof e!="function")throw new Tb("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||YA(t)!==t)throw new Tb("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Eb){var s=Eb(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!r)&&(JA?Cb(e,"length",t,!0,!0):Cb(e,"length",t)),e};(function(n){var e=Ty,t=Zr,r=KA,i=Zo,o=t("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(s,o),c=Ry,f=t("%Math.max%");n.exports=function(S){if(typeof S!="function")throw new i("a function is required");var C=a(e,s,arguments);return r(C,1+f(0,S.length-(arguments.length-1)),!0)};var p=function(){return a(e,o,arguments)};c?c(n.exports,"apply",{value:p}):n.exports.apply=p})(Mx);var Wa=Mx.exports,Dx=Zr,Px=Wa,XA=Px(Dx("String.prototype.indexOf")),Zn=function(e,t){var r=Dx(e,!!t);return typeof r=="function"&&XA(e,".prototype.")>-1?Px(r):r},ZA=Cy,_x=Mh(),Nx=Zn,Rb=Object,QA=Nx("Array.prototype.push"),Ab=Nx("Object.prototype.propertyIsEnumerable"),qA=_x?Object.getOwnPropertySymbols:null,Fx=function(e,t){if(e==null)throw new TypeError("target must be an object");var r=Rb(e);if(arguments.length===1)return r;for(var i=1;i<arguments.length;++i){var o=Rb(arguments[i]),s=ZA(o),a=_x&&(Object.getOwnPropertySymbols||qA);if(a)for(var c=a(o),f=0;f<c.length;++f){var p=c[f];Ab(o,p)&&QA(s,p)}for(var m=0;m<s.length;++m){var S=s[m];if(Ab(o,S)){var C=o[S];r[S]=C}}}return r},lg=Fx,eO=function(){if(!Object.assign)return!1;for(var n="abcdefghijklmnopqrst",e=n.split(""),t={},r=0;r<e.length;++r)t[e[r]]=e[r];var i=Object.assign({},t),o="";for(var s in i)o+=s;return n!==o},tO=function(){if(!Object.assign||!Object.preventExtensions)return!1;var n=Object.preventExtensions({1:2});try{Object.assign(n,"xy")}catch{return n[1]==="y"}return!1},Lx=function(){return!Object.assign||eO()||tO()?lg:Object.assign},nO=ol,rO=Lx,iO=function(){var e=rO();return nO(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e},oO=ol,sO=Wa,lO=Fx,Bx=Lx,aO=iO,cO=sO.apply(Bx()),$x=function(e,t){return cO(Object,arguments)};oO($x,{getPolyfill:Bx,implementation:lO,shim:aO});var uO=$x,bu=function(){return typeof(function(){}).name=="string"},tu=Object.getOwnPropertyDescriptor;if(tu)try{tu([],"length")}catch{tu=null}bu.functionsHaveConfigurableNames=function(){if(!bu()||!tu)return!1;var e=tu(function(){},"name");return!!e&&!!e.configurable};var fO=Function.prototype.bind;bu.boundFunctionsHaveNames=function(){return bu()&&typeof fO=="function"&&(function(){}).bind().name!==""};var dO=bu,Ob=Oy,hO=Iy(),pO=dO.functionsHaveConfigurableNames(),gO=Zo,mO=function(e,t){if(typeof e!="function")throw new gO("`fn` is not a function");var r=arguments.length>2&&!!arguments[2];return(!r||pO)&&(hO?Ob(e,"name",t,!0,!0):Ob(e,"name",t)),e},yO=mO,vO=Zo,bO=Object,zx=yO(function(){if(this==null||this!==bO(this))throw new vO("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),SO=zx,wO=ol.supportsDescriptors,xO=Object.getOwnPropertyDescriptor,jx=function(){if(wO&&/a/mig.flags==="gim"){var e=xO(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var t="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(r,"sticky",{get:function(){t+="y"}}),t==="dy")return e.get}}return SO},kO=ol.supportsDescriptors,CO=jx,EO=Object.getOwnPropertyDescriptor,TO=Object.defineProperty,RO=TypeError,Ib=Object.getPrototypeOf,AO=/a/,OO=function(){if(!kO||!Ib)throw new RO("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=CO(),t=Ib(AO),r=EO(t,"flags");return(!r||r.get!==e)&&TO(t,"flags",{configurable:!0,enumerable:!1,get:e}),e},IO=ol,MO=Wa,DO=zx,Ux=jx,PO=OO,Wx=MO(Ux());IO(Wx,{getPolyfill:Ux,implementation:DO,shim:PO});var _O=Wx,td={exports:{}},NO=Mh,sl=function(){return NO()&&!!Symbol.toStringTag},FO=sl(),LO=Zn,lm=LO("Object.prototype.toString"),Dh=function(e){return FO&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:lm(e)==="[object Arguments]"},Hx=function(e){return Dh(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&lm(e)!=="[object Array]"&&lm(e.callee)==="[object Function]"},BO=function(){return Dh(arguments)}();Dh.isLegacyArguments=Hx;var Vx=BO?Dh:Hx;const $O={},zO=Object.freeze(Object.defineProperty({__proto__:null,default:$O},Symbol.toStringTag,{value:"Module"})),jO=ZR(zO);var My=typeof Map=="function"&&Map.prototype,ag=Object.getOwnPropertyDescriptor&&My?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ad=My&&ag&&typeof ag.get=="function"?ag.get:null,Mb=My&&Map.prototype.forEach,Dy=typeof Set=="function"&&Set.prototype,cg=Object.getOwnPropertyDescriptor&&Dy?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Od=Dy&&cg&&typeof cg.get=="function"?cg.get:null,Db=Dy&&Set.prototype.forEach,UO=typeof WeakMap=="function"&&WeakMap.prototype,nu=UO?WeakMap.prototype.has:null,WO=typeof WeakSet=="function"&&WeakSet.prototype,ru=WO?WeakSet.prototype.has:null,HO=typeof WeakRef=="function"&&WeakRef.prototype,Pb=HO?WeakRef.prototype.deref:null,VO=Boolean.prototype.valueOf,GO=Object.prototype.toString,JO=Function.prototype.toString,YO=String.prototype.match,Py=String.prototype.slice,jo=String.prototype.replace,KO=String.prototype.toUpperCase,_b=String.prototype.toLowerCase,Gx=RegExp.prototype.test,Nb=Array.prototype.concat,Wr=Array.prototype.join,XO=Array.prototype.slice,Fb=Math.floor,am=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ug=Object.getOwnPropertySymbols,cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Da=typeof Symbol=="function"&&typeof Symbol.iterator=="object",jt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Da||!0)?Symbol.toStringTag:null,Jx=Object.prototype.propertyIsEnumerable,Lb=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function Bb(n,e){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||Gx.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var r=n<0?-Fb(-n):Fb(n);if(r!==n){var i=String(r),o=Py.call(e,i.length+1);return jo.call(i,t,"$&_")+"."+jo.call(jo.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return jo.call(e,t,"$&_")}var um=jO,$b=um.custom,zb=Kx($b)?$b:null,ZO=function n(e,t,r,i){var o=t||{};if(Io(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Io(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Io(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Io(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Io(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Zx(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return a?Bb(e,c):c}if(typeof e=="bigint"){var f=String(e)+"n";return a?Bb(e,f):f}var p=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=p&&p>0&&typeof e=="object")return fm(e)?"[Array]":"[Object]";var m=gI(o,r);if(typeof i>"u")i=[];else if(Xx(i,e)>=0)return"[Circular]";function S(fe,V,De){if(V&&(i=XO.call(i),i.push(V)),De){var ye={depth:o.depth};return Io(o,"quoteStyle")&&(ye.quoteStyle=o.quoteStyle),n(fe,ye,r+1,i)}return n(fe,o,r+1,i)}if(typeof e=="function"&&!jb(e)){var C=sI(e),E=Mf(e,S);return"[Function"+(C?": "+C:" (anonymous)")+"]"+(E.length>0?" { "+Wr.call(E,", ")+" }":"")}if(Kx(e)){var P=Da?jo.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):cm.call(e);return typeof e=="object"&&!Da?Hc(P):P}if(dI(e)){for(var D="<"+_b.call(String(e.nodeName)),_=e.attributes||[],J=0;J<_.length;J++)D+=" "+_[J].name+"="+Yx(QO(_[J].value),"double",o);return D+=">",e.childNodes&&e.childNodes.length&&(D+="..."),D+="</"+_b.call(String(e.nodeName))+">",D}if(fm(e)){if(e.length===0)return"[]";var ie=Mf(e,S);return m&&!pI(ie)?"["+dm(ie,m)+"]":"[ "+Wr.call(ie,", ")+" ]"}if(eI(e)){var oe=Mf(e,S);return!("cause"in Error.prototype)&&"cause"in e&&!Jx.call(e,"cause")?"{ ["+String(e)+"] "+Wr.call(Nb.call("[cause]: "+S(e.cause),oe),", ")+" }":oe.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Wr.call(oe,", ")+" }"}if(typeof e=="object"&&s){if(zb&&typeof e[zb]=="function"&&um)return um(e,{depth:p-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(lI(e)){var te=[];return Mb&&Mb.call(e,function(fe,V){te.push(S(V,e,!0)+" => "+S(fe,e))}),Ub("Map",Ad.call(e),te,m)}if(uI(e)){var G=[];return Db&&Db.call(e,function(fe){G.push(S(fe,e))}),Ub("Set",Od.call(e),G,m)}if(aI(e))return fg("WeakMap");if(fI(e))return fg("WeakSet");if(cI(e))return fg("WeakRef");if(nI(e))return Hc(S(Number(e)));if(iI(e))return Hc(S(am.call(e)));if(rI(e))return Hc(VO.call(e));if(tI(e))return Hc(S(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof vu<"u"&&e===vu)return"{ [object globalThis] }";if(!qO(e)&&!jb(e)){var ne=Mf(e,S),ae=Lb?Lb(e)===Object.prototype:e instanceof Object||e.constructor===Object,Q=e instanceof Object?"":"null prototype",Ee=!ae&&jt&&Object(e)===e&&jt in e?Py.call(Qo(e),8,-1):Q?"Object":"",re=ae||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",X=re+(Ee||Q?"["+Wr.call(Nb.call([],Ee||[],Q||[]),": ")+"] ":"");return ne.length===0?X+"{}":m?X+"{"+dm(ne,m)+"}":X+"{ "+Wr.call(ne,", ")+" }"}return String(e)};function Yx(n,e,t){var r=(t.quoteStyle||e)==="double"?'"':"'";return r+n+r}function QO(n){return jo.call(String(n),/"/g,"&quot;")}function fm(n){return Qo(n)==="[object Array]"&&(!jt||!(typeof n=="object"&&jt in n))}function qO(n){return Qo(n)==="[object Date]"&&(!jt||!(typeof n=="object"&&jt in n))}function jb(n){return Qo(n)==="[object RegExp]"&&(!jt||!(typeof n=="object"&&jt in n))}function eI(n){return Qo(n)==="[object Error]"&&(!jt||!(typeof n=="object"&&jt in n))}function tI(n){return Qo(n)==="[object String]"&&(!jt||!(typeof n=="object"&&jt in n))}function nI(n){return Qo(n)==="[object Number]"&&(!jt||!(typeof n=="object"&&jt in n))}function rI(n){return Qo(n)==="[object Boolean]"&&(!jt||!(typeof n=="object"&&jt in n))}function Kx(n){if(Da)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!cm)return!1;try{return cm.call(n),!0}catch{}return!1}function iI(n){if(!n||typeof n!="object"||!am)return!1;try{return am.call(n),!0}catch{}return!1}var oI=Object.prototype.hasOwnProperty||function(n){return n in this};function Io(n,e){return oI.call(n,e)}function Qo(n){return GO.call(n)}function sI(n){if(n.name)return n.name;var e=YO.call(JO.call(n),/^function\s*([\w$]+)/);return e?e[1]:null}function Xx(n,e){if(n.indexOf)return n.indexOf(e);for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function lI(n){if(!Ad||!n||typeof n!="object")return!1;try{Ad.call(n);try{Od.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}function aI(n){if(!nu||!n||typeof n!="object")return!1;try{nu.call(n,nu);try{ru.call(n,ru)}catch{return!0}return n instanceof WeakMap}catch{}return!1}function cI(n){if(!Pb||!n||typeof n!="object")return!1;try{return Pb.call(n),!0}catch{}return!1}function uI(n){if(!Od||!n||typeof n!="object")return!1;try{Od.call(n);try{Ad.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}function fI(n){if(!ru||!n||typeof n!="object")return!1;try{ru.call(n,ru);try{nu.call(n,nu)}catch{return!0}return n instanceof WeakSet}catch{}return!1}function dI(n){return!n||typeof n!="object"?!1:typeof HTMLElement<"u"&&n instanceof HTMLElement?!0:typeof n.nodeName=="string"&&typeof n.getAttribute=="function"}function Zx(n,e){if(n.length>e.maxStringLength){var t=n.length-e.maxStringLength,r="... "+t+" more character"+(t>1?"s":"");return Zx(Py.call(n,0,e.maxStringLength),e)+r}var i=jo.call(jo.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,hI);return Yx(i,"single",e)}function hI(n){var e=n.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+KO.call(e.toString(16))}function Hc(n){return"Object("+n+")"}function fg(n){return n+" { ? }"}function Ub(n,e,t,r){var i=r?dm(t,r):Wr.call(t,", ");return n+" ("+e+") {"+i+"}"}function pI(n){for(var e=0;e<n.length;e++)if(Xx(n[e],`
11
- `)>=0)return!1;return!0}function gI(n,e){var t;if(n.indent===" ")t=" ";else if(typeof n.indent=="number"&&n.indent>0)t=Wr.call(Array(n.indent+1)," ");else return null;return{base:t,prev:Wr.call(Array(e+1),t)}}function dm(n,e){if(n.length===0)return"";var t=`
8
+ `);return{dom:c,text:S,slice:e}}function ix(n,e,t,r,i){let o=i.parent.type.spec.code,s,a;if(!t&&!e)return null;let c=e&&(r||o||!t);if(c){if(n.someProp("transformPastedText",S=>{e=S(e,o||r,n)}),o)return e?new ee(W.from(n.state.schema.text(e.replace(/\r\n?/g,`
9
+ `))),0,0):ee.empty;let m=n.someProp("clipboardTextParser",S=>S(e,i,r,n));if(m)a=m;else{let S=i.marks(),{schema:C}=n.state,E=il.fromSchema(C);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(P=>{let D=s.appendChild(document.createElement("p"));P&&D.appendChild(E.serializeNode(C.text(P,S)))})}}else n.someProp("transformPastedHTML",m=>{t=m(t,n)}),s=uT(t),$u&&fT(s);let f=s&&s.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let m=+p[3];m>0;m--){let S=s.firstChild;for(;S&&S.nodeType!=1;)S=S.nextSibling;if(!S)break;s=S}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||ay.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||p),context:i,ruleFromNode(S){return S.nodeName=="BR"&&!S.nextSibling&&S.parentNode&&!lT.test(S.parentNode.nodeName)?{ignore:!0}:null}})),p)a=dT(rb(a,+p[1],+p[2]),p[4]);else if(a=ee.maxOpen(aT(a.content,i),!0),a.openStart||a.openEnd){let m=0,S=0;for(let C=a.content.firstChild;m<a.openStart&&!C.type.spec.isolating;m++,C=C.firstChild);for(let C=a.content.lastChild;S<a.openEnd&&!C.type.spec.isolating;S++,C=C.lastChild);a=rb(a,m,S)}return n.someProp("transformPasted",m=>{a=m(a,n)}),a}const lT=/^(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 aT(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),o,s=[];if(n.forEach(a=>{if(!s)return;let c=i.findWrapping(a.type),f;if(!c)return s=null;if(f=s.length&&o.length&&sx(c,o,a,s[s.length-1],0))s[s.length-1]=f;else{s.length&&(s[s.length-1]=lx(s[s.length-1],o.length));let p=ox(a,c);s.push(p),i=i.matchType(p.type),o=c}}),s)return W.from(s)}return n}function ox(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,W.from(n));return n}function sx(n,e,t,r,i){if(i<n.length&&i<e.length&&n[i]==e[i]){let o=sx(n,e,t,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==n.length-1?t.type:n[i+1]))return r.copy(r.content.append(W.from(ox(t,n,i+1))))}}function lx(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,lx(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(W.empty,!0);return n.copy(t.append(r))}function am(n,e,t,r,i,o){let s=e<0?n.firstChild:n.lastChild,a=s.content;return n.childCount>1&&(o=0),i<r-1&&(a=am(a,e,t,r,i+1,o)),i>=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(W.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function rb(n,e,t){return e<n.openStart&&(n=new ee(am(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new ee(am(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const ax={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let ib=null;function cx(){return ib||(ib=document.implementation.createHTMLDocument("title"))}let ng=null;function cT(n){let e=window.trustedTypes;return e?(ng||(ng=e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),ng.createHTML(n)):n}function uT(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=cx().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&ax[r[1].toLowerCase()])&&(n=i.map(o=>"<"+o+">").join("")+n+i.map(o=>"</"+o+">").reverse().join("")),t.innerHTML=cT(n),i)for(let o=0;o<i.length;o++)t=t.querySelector(i[o])||t;return t}function fT(n){let e=n.querySelectorAll(Bt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function dT(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:i,openStart:o,openEnd:s}=n;for(let a=r.length-2;a>=0;a-=2){let c=t.nodes[r[a]];if(!c||c.hasRequiredAttrs())break;i=W.from(c.create(r[a+1],i)),o++,s++}return new ee(i,o,s)}const nn={},rn={},hT={touchstart:!0,touchmove:!0};class pT{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},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 gT(n){for(let e in nn){let t=nn[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{yT(n,r)&&!Sy(n,r)&&(n.editable||!(r.type in rn))&&t(n,r)},hT[e]?{passive:!0}:void 0)}tn&&n.dom.addEventListener("input",()=>null),cm(n)}function zo(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function mT(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function cm(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Sy(n,r))})}function Sy(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function yT(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function vT(n,e){!Sy(n,e)&&nn[e.type]&&(n.editable||!(e.type in rn))&&nn[e.type](n,e)}rn.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!fx(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(_i&&Bt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Ma&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,$s(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||sT(n,t)?t.preventDefault():zo(n,"key")};rn.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};rn.keypress=(n,e)=>{let t=e;if(fx(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Jn&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof ke)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode);!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i))&&n.dispatch(n.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}};function Nh(n){return{left:n.clientX,top:n.clientY}}function bT(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function wy(n,e,t,r,i){if(r==-1)return!1;let o=n.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,a=>s>o.depth?a(n,t,o.nodeAfter,o.before(s),i,!0):a(n,t,o.node(s),o.before(s),i,!1)))return!0;return!1}function ka(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);r.setMeta("pointer",!0),n.dispatch(r)}function ST(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&he.isSelectable(r)?(ka(n,new he(t)),!0):!1}function wT(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof he&&(r=t.node);let o=n.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(he.isSelectable(a)){r&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?i=o.before(t.$from.depth):i=o.before(s);break}}return i!=null?(ka(n,he.create(n.state.doc,i)),!0):!1}function xT(n,e,t,r,i){return wy(n,"handleClickOn",e,t,r)||n.someProp("handleClick",o=>o(n,e,r))||(i?wT(n,t):ST(n,t))}function kT(n,e,t,r){return wy(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function CT(n,e,t,r){return wy(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||ET(n,t,r)}function ET(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(ka(n,ke.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)ka(n,ke.create(r,a+1,a+1+s.content.size));else if(he.isSelectable(s))ka(n,he.create(r,a));else continue;return!0}}function xy(n){return Td(n)}const ux=Jn?"metaKey":"ctrlKey";nn.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=xy(n),i=Date.now(),o="singleClick";i-n.input.lastClick.time<500&&bT(t,n.input.lastClick)&&!t[ux]&&(n.input.lastClick.type=="singleClick"?o="doubleClick":n.input.lastClick.type=="doubleClick"&&(o="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(Nh(t));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new TT(n,s,t,!!r)):(o=="doubleClick"?kT:CT)(n,s.pos,s.inside,t)?t.preventDefault():zo(n,"pointer"))};class TT{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[ux],this.allowDefault=r.shiftKey;let o,s;if(t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let p=e.state.doc.resolve(t.pos);o=p.parent,s=p.depth?p.before():0}const a=i?null:r.target,c=a?e.docView.nearestDesc(a,!0):null;this.target=c&&c.dom.nodeType==1?c.dom:null;let{selection:f}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||f instanceof he&&f.from<=s&&f.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&vr&&!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)),zo(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(()=>Fi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Nh(e))),this.updateAllowDefault(e),this.allowDefault||!t?zo(this.view,"pointer"):xT(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||tn&&this.mightDrag&&!this.mightDrag.node.isAtom||Bt&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ka(this.view,me.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):zo(this.view,"pointer")}move(e){this.updateAllowDefault(e),zo(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)}}nn.touchstart=n=>{n.input.lastTouch=Date.now(),xy(n),zo(n,"pointer")};nn.touchmove=n=>{n.input.lastTouch=Date.now(),zo(n,"pointer")};nn.contextmenu=n=>xy(n);function fx(n,e){return n.composing?!0:tn&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const RT=_i?5e3:-1;rn.compositionstart=rn.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof ke&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),Td(n,!0),n.markCursor=null;else if(Td(n,!e.selection.empty),vr&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=n.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}n.input.composing=!0}dx(n,RT)};rn.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,dx(n,20))};function dx(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>Td(n),e))}function hx(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=OT());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function AT(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=SE(e.focusNode,e.focusOffset),r=wE(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,o=n.domObserver.lastChangedTextNode;if(t==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let s=t.pmViewDesc;if(!(!s||!s.isText(t.nodeValue)))return r}}return t||r}function OT(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function Td(n,e=!1){if(!(_i&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),hx(n),e||n.docView&&n.docView.dirty){let t=vy(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function IT(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const bu=vn&&Wo<15||Ma&&TE<604;nn.copy=rn.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let o=bu?null:t.clipboardData,s=r.content(),{dom:a,text:c}=rx(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",c)):IT(n,a),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function MT(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function DT(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?Su(n,r.value,null,i,e):Su(n,r.textContent,r.innerHTML,i,e)},50)}function Su(n,e,t,r,i){let o=ix(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",c=>c(n,i,o||ee.empty)))return!0;if(!o)return!1;let s=MT(o),a=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function px(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}rn.paste=(n,e)=>{let t=e;if(n.composing&&!_i)return;let r=bu?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Su(n,px(r),r.getData("text/html"),i,t)?t.preventDefault():DT(n,t)};class gx{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const mx=Jn?"altKey":"ctrlKey";nn.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,o=i.empty?null:n.posAtCoords(Nh(t)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof he?i.to-1:i.to))){if(r&&r.mightDrag)s=he.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let m=n.docView.nearestDesc(t.target,!0);m&&m.node.type.spec.draggable&&m!=n.docView&&(s=he.create(n.state.doc,m.posBefore))}}let a=(s||n.state.selection).content(),{dom:c,text:f,slice:p}=rx(n,a);(!t.dataTransfer.files.length||!Bt||jw>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(bu?"Text":"text/html",c.innerHTML),t.dataTransfer.effectAllowed="copyMove",bu||t.dataTransfer.setData("text/plain",f),n.dragging=new gx(p,!t[mx],s)};nn.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};rn.dragover=rn.dragenter=(n,e)=>e.preventDefault();rn.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let i=n.posAtCoords(Nh(t));if(!i)return;let o=n.state.doc.resolve(i.pos),s=r&&r.slice;s?n.someProp("transformPasted",E=>{s=E(s,n)}):s=ix(n,px(t.dataTransfer),bu?null:t.dataTransfer.getData("text/html"),!1,o);let a=!!(r&&!t[mx]);if(n.someProp("handleDrop",E=>E(n,t,s||ee.empty,a))){t.preventDefault();return}if(!s)return;t.preventDefault();let c=s?Pw(n.state.doc,o.pos,s):o.pos;c==null&&(c=o.pos);let f=n.state.tr;if(a){let{node:E}=r;E?E.replace(f):f.deleteSelection()}let p=f.mapping.map(c),m=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,S=f.doc;if(m?f.replaceRangeWith(p,p,s.content.firstChild):f.replaceRange(p,p,s),f.doc.eq(S))return;let C=f.doc.resolve(p);if(m&&he.isSelectable(s.content.firstChild)&&C.nodeAfter&&C.nodeAfter.sameMarkup(s.content.firstChild))f.setSelection(new he(C));else{let E=f.mapping.map(c);f.mapping.maps[f.mapping.maps.length-1].forEach((P,D,_,J)=>E=J),f.setSelection(by(n,C,f.doc.resolve(E)))}n.focus(),n.dispatch(f.setMeta("uiEvent","drop"))};nn.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Fi(n)},20))};nn.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};nn.beforeinput=(n,e)=>{if(Bt&&_i&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,$s(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in rn)nn[n]=rn[n];function wu(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class Rd{constructor(e,t){this.toDOM=e,this.spec=t||Vs,this.side=this.spec.side||0}map(e,t,r,i){let{pos:o,deleted:s}=e.mapResult(t.from+i,this.side<0?-1:1);return s?null:new $t(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Rd&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&wu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Vo{constructor(e,t){this.attrs=e,this.spec=t||Vs}map(e,t,r,i){let o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new $t(o,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Vo&&wu(this.attrs,e.attrs)&&wu(this.spec,e.spec)}static is(e){return e.type instanceof Vo}destroy(){}}class ky{constructor(e,t){this.attrs=e,this.spec=t||Vs}map(e,t,r,i){let o=e.mapResult(t.from+i,1);if(o.deleted)return null;let s=e.mapResult(t.to+i,-1);return s.deleted||s.pos<=o.pos?null:new $t(o.pos-r,s.pos-r,this)}valid(e,t){let{index:r,offset:i}=e.content.findIndex(t.from),o;return i==t.from&&!(o=e.child(r)).isText&&i+o.nodeSize==t.to}eq(e){return this==e||e instanceof ky&&wu(this.attrs,e.attrs)&&wu(this.spec,e.spec)}destroy(){}}class $t{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new $t(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new $t(e,e,new Rd(t,r))}static inline(e,t,r,i){return new $t(e,t,new Vo(r,i))}static node(e,t,r,i){return new $t(e,t,new ky(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Vo}get widget(){return this.type instanceof Rd}}const ga=[],Vs={};class Qe{constructor(e,t){this.local=e.length?e:ga,this.children=t.length?t:ga}static create(e,t){return t.length?Ad(t,e,0,Vs):Lt}find(e,t,r){let i=[];return this.findInner(e??0,t??1e9,i,0,r),i}findInner(e,t,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,t-a,r,i+a,o)}}map(e,t,r){return this==Lt||e.maps.length==0?this:this.mapInner(e,t,0,0,r||Vs)}mapInner(e,t,r,i,o){let s;for(let a=0;a<this.local.length;a++){let c=this.local[a].map(e,r,i);c&&c.type.valid(t,c)?(s||(s=[])).push(c):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?PT(this.children,s||[],e,t,r,i,o):s?new Qe(s.sort(Gs),ga):Lt}add(e,t){return t.length?this==Lt?Qe.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let i,o=0;e.forEach((a,c)=>{let f=c+r,p;if(p=vx(t,a,f)){for(i||(i=this.children.slice());o<i.length&&i[o]<c;)o+=3;i[o]==c?i[o+2]=i[o+2].addInner(a,p,f+1):i.splice(o,0,c,c+a.nodeSize,Ad(p,a,f+1,Vs)),o+=3}});let s=yx(o?bx(t):t,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Qe(s.length?this.local.concat(s).sort(Gs):this.local,i||this.children)}remove(e){return e.length==0||this==Lt?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+t,c=r[o+1]+t;for(let p=0,m;p<e.length;p++)(m=e[p])&&m.from>a&&m.to<c&&(e[p]=null,(s||(s=[])).push(m));if(!s)continue;r==this.children&&(r=this.children.slice());let f=r[o+2].removeInner(s,a+1);f!=Lt?r[o+2]=f:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let a=0;a<i.length;a++)i[a].eq(s,t)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Qe(i,r):Lt}forChild(e,t){if(this==Lt)return this;if(t.isLeaf)return Qe.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+t.content.size;for(let a=0;a<this.local.length;a++){let c=this.local[a];if(c.from<s&&c.to>o&&c.type instanceof Vo){let f=Math.max(o,c.from)-o,p=Math.min(s,c.to)-o;f<p&&(i||(i=[])).push(c.copy(f,p))}}if(i){let a=new Qe(i.sort(Gs),ga);return r?new _o([a,r]):a}return r||Lt}eq(e){if(this==e)return!0;if(!(e instanceof Qe)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Cy(this.localsInner(e))}localsInner(e){if(this==Lt)return ga;if(e.inlineContent||!this.local.some(Vo.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Vo||t.push(this.local[r]);return t}forEachSet(e){e(this)}}Qe.empty=new Qe([],[]);Qe.removeOverlap=Cy;const Lt=Qe.empty;class _o{constructor(e){this.members=e}map(e,t){const r=this.members.map(i=>i.map(e,t,Vs));return _o.from(r)}forChild(e,t){if(t.isLeaf)return Qe.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,t);o!=Lt&&(o instanceof _o?r=r.concat(o.members):r.push(o))}return _o.from(r)}eq(e){if(!(e instanceof _o)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!t)t=o;else{r&&(t=t.slice(),r=!1);for(let s=0;s<o.length;s++)t.push(o[s])}}return t?Cy(r?t:t.sort(Gs)):ga}static from(e){switch(e.length){case 0:return Lt;case 1:return e[0];default:return new _o(e.every(t=>t instanceof Qe)?e:e.reduce((t,r)=>t.concat(r instanceof Qe?r:r.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function PT(n,e,t,r,i,o,s){let a=n.slice();for(let f=0,p=o;f<t.maps.length;f++){let m=0;t.maps[f].forEach((S,C,E,P)=>{let D=P-E-(C-S);for(let _=0;_<a.length;_+=3){let J=a[_+1];if(J<0||S>J+p-m)continue;let ie=a[_]+p-m;C>=ie?a[_+1]=S<=ie?-2:-1:S>=p&&D&&(a[_]+=D,a[_+1]+=D)}m+=D}),p=t.maps[f].map(p,-1)}let c=!1;for(let f=0;f<a.length;f+=3)if(a[f+1]<0){if(a[f+1]==-2){c=!0,a[f+1]=-1;continue}let p=t.map(n[f]+o),m=p-i;if(m<0||m>=r.content.size){c=!0;continue}let S=t.map(n[f+1]+o,-1),C=S-i,{index:E,offset:P}=r.content.findIndex(m),D=r.maybeChild(E);if(D&&P==m&&P+D.nodeSize==C){let _=a[f+2].mapInner(t,D,p+1,n[f]+o+1,s);_!=Lt?(a[f]=m,a[f+1]=C,a[f+2]=_):(a[f+1]=-2,c=!0)}else c=!0}if(c){let f=_T(a,n,e,t,i,o,s),p=Ad(f,r,0,s);e=p.local;for(let m=0;m<a.length;m+=3)a[m+1]<0&&(a.splice(m,3),m-=3);for(let m=0,S=0;m<p.children.length;m+=3){let C=p.children[m];for(;S<a.length&&a[S]<C;)S+=3;a.splice(S,0,p.children[m],p.children[m+1],p.children[m+2])}}return new Qe(e.sort(Gs),a)}function yx(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let i=n[r];t.push(new $t(i.from+e,i.to+e,i.type))}return t}function _T(n,e,t,r,i,o,s){function a(c,f){for(let p=0;p<c.local.length;p++){let m=c.local[p].map(r,i,f);m?t.push(m):s.onRemove&&s.onRemove(c.local[p].spec)}for(let p=0;p<c.children.length;p+=3)a(c.children[p+2],c.children[p]+f+1)}for(let c=0;c<n.length;c+=3)n[c+1]==-1&&a(n[c+2],e[c]+o+1);return t}function vx(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,i=null;for(let o=0,s;o<n.length;o++)(s=n[o])&&s.from>t&&s.to<r&&((i||(i=[])).push(s),n[o]=null);return i}function bx(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Ad(n,e,t,r){let i=[],o=!1;e.forEach((a,c)=>{let f=vx(n,a,c+t);if(f){o=!0;let p=Ad(f,a,t+c+1,r);p!=Lt&&i.push(c,c+a.nodeSize,p)}});let s=yx(o?bx(n):n,-t).sort(Gs);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Qe(s,i):Lt}function Gs(n,e){return n.from-e.from||n.to-e.to}function Cy(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let i=t+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==n&&(e=n.slice()),e[i]=o.copy(o.from,r.to),ob(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,o.from),ob(e,i,r.copy(o.from,r.to)));break}}}return e}function ob(n,e,t){for(;e<n.length&&Gs(t,n[e])>0;)e++;n.splice(e,0,t)}function rg(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=Lt&&e.push(r)}),n.cursorWrapper&&e.push(Qe.create(n.state.doc,[n.cursorWrapper.deco])),_o.from(e)}const NT={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},FT=vn&&Wo<=11;class LT{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 BT{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new LT,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);vn&&Wo<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),FT&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.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,NT)),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 t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.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(Zv(this.view)){if(this.suppressingSelectionUpdates)return Fi(this.view);if(vn&&Wo<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Zs(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 t=new Set,r;for(let o=e.focusNode;o;o=vu(o))t.add(o);for(let o=e.anchorNode;o;o=vu(o))if(t.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))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 t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Zv(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,c=[];if(e.editable)for(let p=0;p<t.length;p++){let m=this.registerMutation(t[p],c);m&&(o=o<0?m.from:Math.min(m.from,o),s=s<0?m.to:Math.max(m.to,s),m.typeOver&&(a=!0))}if(vr&&c.length){let p=c.filter(m=>m.nodeName=="BR");if(p.length==2){let[m,S]=p;m.parentNode&&m.parentNode.parentNode==S.parentNode?S.remove():m.remove()}else{let{focusNode:m}=this.currentSelection;for(let S of p){let C=S.parentNode;C&&C.nodeName=="LI"&&(!m||jT(e,m)!=C)&&S.remove()}}}let f=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ph(r)&&(f=vy(e))&&f.eq(me.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Fi(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),$T(e)),this.handleDOMChange(o,s,a,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Fi(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let p=0;p<e.addedNodes.length;p++){let m=e.addedNodes[p];t.push(m),m.nodeType==3&&(this.lastChangedTextNode=m)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(vn&&Wo<=11&&e.addedNodes.length)for(let p=0;p<e.addedNodes.length;p++){let{previousSibling:m,nextSibling:S}=e.addedNodes[p];(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m),(!S||Array.prototype.indexOf.call(e.addedNodes,S)<0)&&(o=S)}let s=i&&i.parentNode==e.target?Mt(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),c=o&&o.parentNode==e.target?Mt(o):e.target.childNodes.length,f=r.localPosFromDOM(e.target,c,1);return{from:a,to:f}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let sb=new WeakMap,lb=!1;function $T(n){if(!sb.has(n)&&(sb.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=vr,lb)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),lb=!0}}function ab(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=n.domAtPos(n.state.selection.anchor);return Zs(s.node,s.offset,i,o)&&([t,r,i,o]=[i,o,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:o}}function zT(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return ab(n,i)}let t;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",r,!0),t?ab(n,t):null}function jT(n,e){for(let t=e.parentNode;t&&t!=n.dom;t=t.parentNode){let r=n.docView.nearestDesc(t,!0);if(r&&r.node.isBlock)return t}return null}function UT(n,e,t){let{node:r,fromOffset:i,toOffset:o,from:s,to:a}=n.docView.parseRange(e,t),c=n.domSelectionRange(),f,p=c.anchorNode;if(p&&n.dom.contains(p.nodeType==1?p:p.parentNode)&&(f=[{node:p,offset:c.anchorOffset}],Ph(c)||f.push({node:c.focusNode,offset:c.focusOffset})),Bt&&n.input.lastKeyCode===8)for(let D=o;D>i;D--){let _=r.childNodes[D-1],J=_.pmViewDesc;if(_.nodeName=="BR"&&!J){o=D;break}if(!J||J.size)break}let m=n.state.doc,S=n.someProp("domParser")||ay.fromSchema(n.state.schema),C=m.resolve(s),E=null,P=S.parse(r,{topNode:C.parent,topMatch:C.parent.contentMatchAt(C.index()),topOpen:!0,from:i,to:o,preserveWhitespace:C.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:WT,context:C});if(f&&f[0].pos!=null){let D=f[0].pos,_=f[1]&&f[1].pos;_==null&&(_=D),E={anchor:D+s,head:_+s}}return{doc:P,sel:E,from:s,to:a}}function WT(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(tn&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||tn&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const HT=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function VT(n,e,t,r,i){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let Q=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,Ee=vy(n,Q);if(Ee&&!n.state.selection.eq(Ee)){if(Bt&&_i&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",X=>X(n,$s(13,"Enter"))))return;let re=n.state.tr.setSelection(Ee);Q=="pointer"?re.setMeta("pointer",!0):Q=="key"&&re.scrollIntoView(),o&&re.setMeta("composition",o),n.dispatch(re)}return}let s=n.state.doc.resolve(e),a=s.sharedDepth(t);e=s.before(a+1),t=n.state.doc.resolve(t).after(a+1);let c=n.state.selection,f=UT(n,e,t),p=n.state.doc,m=p.slice(f.from,f.to),S,C;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(S=n.state.selection.to,C="end"):(S=n.state.selection.from,C="start"),n.input.lastKeyCode=null;let E=YT(m.content,f.doc.content,f.from,S,C);if(E&&n.input.domChangeCount++,(Ma&&n.input.lastIOSEnter>Date.now()-225||_i)&&i.some(Q=>Q.nodeType==1&&!HT.test(Q.nodeName))&&(!E||E.endA>=E.endB)&&n.someProp("handleKeyDown",Q=>Q(n,$s(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!E)if(r&&c instanceof ke&&!c.empty&&c.$head.sameParent(c.$anchor)&&!n.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))E={start:c.from,endA:c.to,endB:c.to};else{if(f.sel){let Q=cb(n,n.state.doc,f.sel);if(Q&&!Q.eq(n.state.selection)){let Ee=n.state.tr.setSelection(Q);o&&Ee.setMeta("composition",o),n.dispatch(Ee)}}return}n.state.selection.from<n.state.selection.to&&E.start==E.endB&&n.state.selection instanceof ke&&(E.start>n.state.selection.from&&E.start<=n.state.selection.from+2&&n.state.selection.from>=f.from?E.start=n.state.selection.from:E.endA<n.state.selection.to&&E.endA>=n.state.selection.to-2&&n.state.selection.to<=f.to&&(E.endB+=n.state.selection.to-E.endA,E.endA=n.state.selection.to)),vn&&Wo<=11&&E.endB==E.start+1&&E.endA==E.start&&E.start>f.from&&f.doc.textBetween(E.start-f.from-1,E.start-f.from+1)=="  "&&(E.start--,E.endA--,E.endB--);let P=f.doc.resolveNoCache(E.start-f.from),D=f.doc.resolveNoCache(E.endB-f.from),_=p.resolve(E.start),J=P.sameParent(D)&&P.parent.inlineContent&&_.end()>=E.endA,ie;if((Ma&&n.input.lastIOSEnter>Date.now()-225&&(!J||i.some(Q=>Q.nodeName=="DIV"||Q.nodeName=="P"))||!J&&P.pos<f.doc.content.size&&!P.sameParent(D)&&(ie=me.findFrom(f.doc.resolve(P.pos+1),1,!0))&&ie.head==D.pos)&&n.someProp("handleKeyDown",Q=>Q(n,$s(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>E.start&&JT(p,E.start,E.endA,P,D)&&n.someProp("handleKeyDown",Q=>Q(n,$s(8,"Backspace")))){_i&&Bt&&n.domObserver.suppressSelectionUpdates();return}Bt&&E.endB==E.start&&(n.input.lastChromeDelete=Date.now()),_i&&!J&&P.start()!=D.start()&&D.parentOffset==0&&P.depth==D.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==E.endA&&(E.endB-=2,D=f.doc.resolveNoCache(E.endB-f.from),setTimeout(()=>{n.someProp("handleKeyDown",function(Q){return Q(n,$s(13,"Enter"))})},20));let oe=E.start,te=E.endA,G,ne,ae;if(J){if(P.pos==D.pos)vn&&Wo<=11&&P.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Fi(n),20)),G=n.state.tr.delete(oe,te),ne=p.resolve(E.start).marksAcross(p.resolve(E.endA));else if(E.endA==E.endB&&(ae=GT(P.parent.content.cut(P.parentOffset,D.parentOffset),_.parent.content.cut(_.parentOffset,E.endA-_.start()))))G=n.state.tr,ae.type=="add"?G.addMark(oe,te,ae.mark):G.removeMark(oe,te,ae.mark);else if(P.parent.child(P.index()).isText&&P.index()==D.index()-(D.textOffset?0:1)){let Q=P.parent.textBetween(P.parentOffset,D.parentOffset);if(n.someProp("handleTextInput",Ee=>Ee(n,oe,te,Q)))return;G=n.state.tr.insertText(Q,oe,te)}}if(G||(G=n.state.tr.replace(oe,te,f.doc.slice(E.start-f.from,E.endB-f.from))),f.sel){let Q=cb(n,G.doc,f.sel);Q&&!(Bt&&n.composing&&Q.empty&&(E.start!=E.endB||n.input.lastChromeDelete<Date.now()-100)&&(Q.head==oe||Q.head==G.mapping.map(te)-1)||vn&&Q.empty&&Q.head==oe)&&G.setSelection(Q)}ne&&G.ensureMarks(ne),o&&G.setMeta("composition",o),n.dispatch(G.scrollIntoView())}function cb(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:by(n,e.resolve(t.anchor),e.resolve(t.head))}function GT(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,o=r,s,a,c;for(let p=0;p<r.length;p++)i=r[p].removeFromSet(i);for(let p=0;p<t.length;p++)o=t[p].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],s="add",c=p=>p.mark(a.addToSet(p.marks));else if(i.length==0&&o.length==1)a=o[0],s="remove",c=p=>p.mark(a.removeFromSet(p.marks));else return null;let f=[];for(let p=0;p<e.childCount;p++)f.push(c(e.child(p)));if(W.from(f).eq(n))return{mark:a,type:s}}function JT(n,e,t,r,i){if(t-e<=i.pos-r.pos||ig(r,!0,!1)<i.pos)return!1;let o=n.resolve(e);if(!r.parent.isTextblock){let a=o.nodeAfter;return a!=null&&t==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=n.resolve(ig(o,!0,!0));return!s.parent.isTextblock||s.pos>t||ig(s,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function ig(n,e,t){let r=n.depth,i=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let o=n.node(r).maybeChild(n.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function YT(n,e,t,r,i){let o=n.findDiffStart(e,t);if(o==null)return null;let{a:s,b:a}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let c=Math.max(0,o-Math.min(s,a));r-=s+c-o}if(s<o&&n.size<e.size){let c=r<=o&&r>=s?o-r:0;o-=c,o&&o<e.size&&ub(e.textBetween(o-1,o+1))&&(o+=c?1:-1),a=o+(a-s),s=o}else if(a<o){let c=r<=o&&r>=a?o-r:0;o-=c,o&&o<n.size&&ub(n.textBetween(o-1,o+1))&&(o+=c?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function ub(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class KT{constructor(e,t){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 pT,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(gb),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=hb(this),db(this),this.nodeViews=pb(this),this.docView=Vv(this.state.doc,fb(this),rg(this),this.dom,this),this.domObserver=new BT(this,(r,i,o,s)=>VT(this,r,i,o,s)),this.domObserver.start(),gT(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 t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&cm(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(gb),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(hx(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let C=pb(this);ZT(C,this.nodeViews)&&(this.nodeViews=C,o=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&cm(this),this.editable=hb(this),db(this);let c=rg(this),f=fb(this),p=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",m=o||!this.docView.matchesNode(e.doc,f,c);(m||!e.selection.eq(i.selection))&&(s=!0);let S=p=="preserve"&&s&&this.dom.style.overflowAnchor==null&&OE(this);if(s){this.domObserver.stop();let C=m&&(vn||Bt)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&XT(i.selection,e.selection);if(m){let E=Bt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=AT(this)),(o||!this.docView.update(e.doc,f,c,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=Vv(e.doc,f,c,this.dom,this)),E&&!this.trackWrites&&(C=!0)}C||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&qE(this))?Fi(this,C):(ex(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),p=="reset"?this.dom.scrollTop=0:p=="to selection"?this.scrollToSelection():S&&IE(S)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof he){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&$v(this,t.getBoundingClientRect(),e)}else $v(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 t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-t.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new gx(e.slice,e.move,i<0?void 0:he.create(this.state.doc,i))}someProp(e,t){let r=this._props&&this._props[e],i;if(r!=null&&(i=t?t(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(i=t?t(a):a))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(i=t?t(a):a))return i}}hasFocus(){if(vn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&ME(this.dom),Fi(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return FE(this,e)}coordsAtPos(e,t=1){return Gw(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return jE(this,t||this.state,e)}pasteHTML(e,t){return Su(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Su(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(mT(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],rg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,vE())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return vT(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?tn&&this.root.nodeType===11&&kE(this.dom.ownerDocument)==this.dom&&zT(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function fb(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[$t.node(0,n.state.doc.content.size,e)]}function db(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:$t.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function hb(n){return!n.someProp("editable",e=>e(n.state)===!1)}function XT(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function pb(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function ZT(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function gb(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Go={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:"'"},Od={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},QT=typeof navigator<"u"&&/Mac/.test(navigator.platform),qT=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Dt=0;Dt<10;Dt++)Go[48+Dt]=Go[96+Dt]=String(Dt);for(var Dt=1;Dt<=24;Dt++)Go[Dt+111]="F"+Dt;for(var Dt=65;Dt<=90;Dt++)Go[Dt]=String.fromCharCode(Dt+32),Od[Dt]=String.fromCharCode(Dt);for(var og in Go)Od.hasOwnProperty(og)||(Od[og]=Go[og]);function eR(n){var e=QT&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||qT&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Od:Go)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const tR=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function nR(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,o,s;for(let a=0;a<e.length-1;a++){let c=e[a];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))tR?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(t="Alt-"+t),i&&(t="Ctrl-"+t),s&&(t="Meta-"+t),o&&(t="Shift-"+t),t}function rR(n){let e=Object.create(null);for(let t in n)e[nR(t)]=n[t];return e}function sg(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function iR(n){return new ol({props:{handleKeyDown:Ey(n)}})}function Ey(n){let e=rR(n);return function(t,r){let i=eR(r),o,s=e[sg(i,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=e[sg(i,r,!1)];if(a&&a(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=Go[r.keyCode])&&o!=i){let a=e[sg(o,r)];if(a&&a(t.state,t.dispatch,t))return!0}}return!1}}const oR=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function Sx(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const sR=(n,e,t)=>{let r=Sx(n,t);if(!r)return!1;let i=Ty(r);if(!i){let s=r.blockRange(),a=s&&Ua(s);return a==null?!1:(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(Cx(n,i,e,-1))return!0;if(r.parent.content.size==0&&(Da(o,"end")||he.isSelectable(o)))for(let s=r.depth;;s--){let a=Mh(n.doc,r.before(s),r.after(s),ee.empty);if(a&&a.slice.size<a.to-a.from){if(e){let c=n.tr.step(a);c.setSelection(Da(o,"end")?me.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):he.create(c.doc,i.pos-o.nodeSize)),e(c.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},lR=(n,e,t)=>{let r=Sx(n,t);if(!r)return!1;let i=Ty(r);return i?wx(n,i,e):!1},aR=(n,e,t)=>{let r=xx(n,t);if(!r)return!1;let i=Ry(r);return i?wx(n,i,e):!1};function wx(n,e,t){let r=e.nodeBefore,i=r,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let p=i.lastChild;if(!p)return!1;i=p}let s=e.nodeAfter,a=s,c=e.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let p=a.firstChild;if(!p)return!1;a=p}let f=Mh(n.doc,o,c,ee.empty);if(!f||f.from!=o||f instanceof bt&&f.slice.size>=c-o)return!1;if(t){let p=n.tr.step(f);p.setSelection(ke.create(p.doc,o)),t(p.scrollIntoView())}return!0}function Da(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const cR=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;o=Ty(r)}let s=o&&o.nodeBefore;return!s||!he.isSelectable(s)?!1:(e&&e(n.tr.setSelection(he.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function Ty(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function xx(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const uR=(n,e,t)=>{let r=xx(n,t);if(!r)return!1;let i=Ry(r);if(!i)return!1;let o=i.nodeAfter;if(Cx(n,i,e,1))return!0;if(r.parent.content.size==0&&(Da(o,"start")||he.isSelectable(o))){let s=Mh(n.doc,r.before(),r.after(),ee.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=n.tr.step(s);a.setSelection(Da(o,"start")?me.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):he.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},fR=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;o=Ry(r)}let s=o&&o.nodeAfter;return!s||!he.isSelectable(s)?!1:(e&&e(n.tr.setSelection(he.create(n.doc,o.pos)).scrollIntoView()),!0)};function Ry(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const dR=(n,e)=>{let t=n.selection,r=t instanceof he,i;if(r){if(t.node.isTextblock||!Wa(n.doc,t.from))return!1;i=t.from}else if(i=hy(n.doc,t.from,-1),i==null)return!1;if(e){let o=n.tr.join(i);r&&o.setSelection(he.create(o.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},hR=(n,e)=>{let t=n.selection,r;if(t instanceof he){if(t.node.isTextblock||!Wa(n.doc,t.to))return!1;r=t.to}else if(r=hy(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},pR=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),o=i&&Ua(i);return o==null?!1:(e&&e(n.tr.lift(i,o).scrollIntoView()),!0)},gR=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
10
+ `).scrollIntoView()),!0)};function kx(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const mR=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),o=t.indexAfter(-1),s=kx(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=t.after(),c=n.tr.replaceWith(a,a,s.createAndFill());c.setSelection(me.near(c.doc.resolve(a),1)),e(c.scrollIntoView())}return!0},yR=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof Kn||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=kx(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=n.tr.insert(s,o.createAndFill());a.setSelection(ke.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},vR=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let o=t.before();if(dy(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let r=t.blockRange(),i=r&&Ua(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)},bR=(n,e)=>{let{$from:t,to:r}=n.selection,i,o=t.sharedDepth(r);return o==0?!1:(i=t.before(o),e&&e(n.tr.setSelection(he.create(n.doc,i))),!0)};function SR(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||Wa(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function Cx(n,e,t,r){let i=e.nodeBefore,o=e.nodeAfter,s,a,c=i.type.spec.isolating||o.type.spec.isolating;if(!c&&SR(n,e,t))return!0;let f=!c&&e.parent.canReplace(e.index(),e.index()+1);if(f&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(t){let C=e.pos+o.nodeSize,E=W.empty;for(let _=s.length-1;_>=0;_--)E=W.from(s[_].create(null,E));E=W.from(i.copy(E));let P=n.tr.step(new St(e.pos-1,C,e.pos,C,new ee(E,1,0),s.length,!0)),D=P.doc.resolve(C+2*s.length);D.nodeAfter&&D.nodeAfter.type==i.type&&Wa(P.doc,D.pos)&&P.join(D.pos),t(P.scrollIntoView())}return!0}let p=o.type.spec.isolating||r>0&&c?null:me.findFrom(e,1),m=p&&p.$from.blockRange(p.$to),S=m&&Ua(m);if(S!=null&&S>=e.depth)return t&&t(n.tr.lift(m,S).scrollIntoView()),!0;if(f&&Da(o,"start",!0)&&Da(i,"end")){let C=i,E=[];for(;E.push(C),!C.isTextblock;)C=C.lastChild;let P=o,D=1;for(;!P.isTextblock;P=P.firstChild)D++;if(C.canReplace(C.childCount,C.childCount,P.content)){if(t){let _=W.empty;for(let ie=E.length-1;ie>=0;ie--)_=W.from(E[ie].copy(_));let J=n.tr.step(new St(e.pos-E.length,e.pos+o.nodeSize,e.pos+D,e.pos+o.nodeSize-D,new ee(_,E.length,0),0,!0));t(J.scrollIntoView())}return!0}}return!1}function Ex(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(t&&t(e.tr.setSelection(ke.create(e.doc,n<0?i.start(o):i.end(o)))),!0):!1}}const wR=Ex(-1),xR=Ex(1);function kR(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),a=s&&fy(s,n,e);return a?(r&&r(t.tr.wrap(s,a).scrollIntoView()),!0):!1}}function CR(n,e=null){return function(t,r){let i=!1;for(let o=0;o<t.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=t.selection.ranges[o];t.doc.nodesBetween(s,a,(c,f)=>{if(i)return!1;if(!(!c.isTextblock||c.hasMarkup(n,e)))if(c.type==n)i=!0;else{let p=t.doc.resolve(f),m=p.index();i=p.parent.canReplaceWith(m,m+1,n)}})}if(!i)return!1;if(r){let o=t.tr;for(let s=0;s<t.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:c}}=t.selection.ranges[s];o.setBlockType(a,c,n,e)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function ER(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),a=!1,c=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(n)&&s.startIndex==0){if(i.index(s.depth-1)==0)return!1;let p=t.doc.resolve(s.start-2);c=new gu(p,p,s.depth),s.endIndex<s.parent.childCount&&(s=new gu(i,t.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let f=fy(c,n,e,s);return f?(r&&r(TR(t.tr,s,f,a,n).scrollIntoView()),!0):!1}}function TR(n,e,t,r,i){let o=W.empty;for(let p=t.length-1;p>=0;p--)o=W.from(t[p].type.create(t[p].attrs,o));n.step(new St(e.start-(r?2:0),e.end,e.start,e.end,new ee(o,0,0),t.length,!0));let s=0;for(let p=0;p<t.length;p++)t[p].type==i&&(s=p+1);let a=t.length-s,c=e.start+t.length-(r?2:0),f=e.parent;for(let p=e.startIndex,m=e.endIndex,S=!0;p<m;p++,S=!1)!S&&dy(n.doc,c,a)&&(n.split(c,a),c+=2*a),c+=f.child(p).nodeSize;return n}function RR(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==n);return o?t?r.node(o.depth-1).type==n?AR(e,t,n,o):OR(e,t,o):!0:!1}}function AR(n,e,t,r){let i=n.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new St(o-1,s,o,s,new ee(W.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new gu(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=Ua(r);if(a==null)return!1;i.lift(r,a);let c=i.mapping.map(o,-1)-1;return Wa(i.doc,c)&&i.join(c),e(i.scrollIntoView()),!0}function OR(n,e,t){let r=n.tr,i=t.parent;for(let C=t.end,E=t.endIndex-1,P=t.startIndex;E>P;E--)C-=i.child(E).nodeSize,r.delete(C-1,C+1);let o=r.doc.resolve(t.start),s=o.nodeAfter;if(r.mapping.map(t.end)!=t.start+o.nodeAfter.nodeSize)return!1;let a=t.startIndex==0,c=t.endIndex==i.childCount,f=o.node(-1),p=o.index(-1);if(!f.canReplace(p+(a?0:1),p+1,s.content.append(c?W.empty:W.from(i))))return!1;let m=o.pos,S=m+s.nodeSize;return r.step(new St(m-(a?1:0),S+(c?1:0),m+1,S-1,new ee((a?W.empty:W.from(i.copy(W.empty))).append(c?W.empty:W.from(i.copy(W.empty))),a?0:1,c?0:1),a?0:1)),e(r.scrollIntoView()),!0}function IR(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,f=>f.childCount>0&&f.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,c=a.child(s-1);if(c.type!=n)return!1;if(t){let f=c.lastChild&&c.lastChild.type==a.type,p=W.from(f?n.create():null),m=new ee(W.from(n.create(null,W.from(a.type.create(null,p)))),f?3:1,0),S=o.start,C=o.end;t(e.tr.step(new St(S-(f?3:1),C,S,C,m,1,!0)).scrollIntoView())}return!0}}function Tx(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(t=Tx(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function Rx(){for(var n,e,t=0,r="",i=arguments.length;t<i;t++)(n=arguments[t])&&(e=Tx(n))&&(r&&(r+=" "),r+=e);return r}const Ay="-",MR=n=>{const e=PR(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:s=>{const a=s.split(Ay);return a[0]===""&&a.length!==1&&a.shift(),Ax(a,e)||DR(s)},getConflictingClassGroupIds:(s,a)=>{const c=t[s]||[];return a&&r[s]?[...c,...r[s]]:c}}},Ax=(n,e)=>{var s;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?Ax(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const o=n.join(Ay);return(s=e.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId},mb=/^\[(.+)\]$/,DR=n=>{if(mb.test(n)){const e=mb.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},PR=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return NR(Object.entries(n.classGroups),t).forEach(([o,s])=>{um(s,r,o,e)}),r},um=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const o=i===""?e:yb(e,i);o.classGroupId=t;return}if(typeof i=="function"){if(_R(i)){um(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([o,s])=>{um(s,yb(e,o),t,r)})})},yb=(n,e)=>{let t=n;return e.split(Ay).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},_R=n=>n.isThemeGetter,NR=(n,e)=>e?n.map(([t,r])=>{const i=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[e+s,a])):o);return[t,i]}):n,FR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(o,s)=>{t.set(o,s),e++,e>n&&(e=0,r=t,t=new Map)};return{get(o){let s=t.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){t.has(o)?t.set(o,s):i(o,s)}}},Ox="!",LR=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],o=e.length,s=a=>{const c=[];let f=0,p=0,m;for(let D=0;D<a.length;D++){let _=a[D];if(f===0){if(_===i&&(r||a.slice(D,D+o)===e)){c.push(a.slice(p,D)),p=D+o;continue}if(_==="/"){m=D;continue}}_==="["?f++:_==="]"&&f--}const S=c.length===0?a:a.substring(p),C=S.startsWith(Ox),E=C?S.substring(1):S,P=m&&m>p?m-p:void 0;return{modifiers:c,hasImportantModifier:C,baseClassName:E,maybePostfixModifierPosition:P}};return t?a=>t({className:a,parseClassName:s}):s},BR=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},$R=n=>({cache:FR(n.cacheSize),parseClassName:LR(n),...MR(n)}),zR=/\s+/,jR=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,o=[],s=n.trim().split(zR);let a="";for(let c=s.length-1;c>=0;c-=1){const f=s[c],{modifiers:p,hasImportantModifier:m,baseClassName:S,maybePostfixModifierPosition:C}=t(f);let E=!!C,P=r(E?S.substring(0,C):S);if(!P){if(!E){a=f+(a.length>0?" "+a:a);continue}if(P=r(S),!P){a=f+(a.length>0?" "+a:a);continue}E=!1}const D=BR(p).join(":"),_=m?D+Ox:D,J=_+P;if(o.includes(J))continue;o.push(J);const ie=i(P,E);for(let oe=0;oe<ie.length;++oe){const te=ie[oe];o.push(_+te)}a=f+(a.length>0?" "+a:a)}return a};function UR(){let n=0,e,t,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Ix(e))&&(r&&(r+=" "),r+=t);return r}const Ix=n=>{if(typeof n=="string")return n;let e,t="";for(let r=0;r<n.length;r++)n[r]&&(e=Ix(n[r]))&&(t&&(t+=" "),t+=e);return t};function WR(n,...e){let t,r,i,o=s;function s(c){const f=e.reduce((p,m)=>m(p),n());return t=$R(f),r=t.cache.get,i=t.cache.set,o=a,a(c)}function a(c){const f=r(c);if(f)return f;const p=jR(c,t);return i(c,p),p}return function(){return o(UR.apply(null,arguments))}}const Ue=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},Mx=/^\[(?:([a-z-]+):)?(.+)\]$/i,HR=/^\d+\/\d+$/,VR=new Set(["px","full","screen"]),GR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,YR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,KR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ai=n=>Ca(n)||VR.has(n)||HR.test(n),Eo=n=>Ha(n,"length",iA),Ca=n=>!!n&&!Number.isNaN(Number(n)),lg=n=>Ha(n,"number",Ca),Hc=n=>!!n&&Number.isInteger(Number(n)),ZR=n=>n.endsWith("%")&&Ca(n.slice(0,-1)),Se=n=>Mx.test(n),To=n=>GR.test(n),QR=new Set(["length","size","percentage"]),qR=n=>Ha(n,QR,Dx),eA=n=>Ha(n,"position",Dx),tA=new Set(["image","url"]),nA=n=>Ha(n,tA,sA),rA=n=>Ha(n,"",oA),Vc=()=>!0,Ha=(n,e,t)=>{const r=Mx.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},iA=n=>JR.test(n)&&!YR.test(n),Dx=()=>!1,oA=n=>KR.test(n),sA=n=>XR.test(n),lA=()=>{const n=Ue("colors"),e=Ue("spacing"),t=Ue("blur"),r=Ue("brightness"),i=Ue("borderColor"),o=Ue("borderRadius"),s=Ue("borderSpacing"),a=Ue("borderWidth"),c=Ue("contrast"),f=Ue("grayscale"),p=Ue("hueRotate"),m=Ue("invert"),S=Ue("gap"),C=Ue("gradientColorStops"),E=Ue("gradientColorStopPositions"),P=Ue("inset"),D=Ue("margin"),_=Ue("opacity"),J=Ue("padding"),ie=Ue("saturate"),oe=Ue("scale"),te=Ue("sepia"),G=Ue("skew"),ne=Ue("space"),ae=Ue("translate"),Q=()=>["auto","contain","none"],Ee=()=>["auto","hidden","clip","visible","scroll"],re=()=>["auto",Se,e],X=()=>[Se,e],fe=()=>["",Ai,Eo],V=()=>["auto",Ca,Se],De=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ye=()=>["solid","dashed","dotted","double","none"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ie=()=>["start","end","center","between","around","evenly","stretch"],be=()=>["","0",Se],lt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],pe=()=>[Ca,Se];return{cacheSize:500,separator:":",theme:{colors:[Vc],spacing:[Ai,Eo],blur:["none","",To,Se],brightness:pe(),borderColor:[n],borderRadius:["none","","full",To,Se],borderSpacing:X(),borderWidth:fe(),contrast:pe(),grayscale:be(),hueRotate:pe(),invert:be(),gap:X(),gradientColorStops:[n],gradientColorStopPositions:[ZR,Eo],inset:re(),margin:re(),opacity:pe(),padding:X(),saturate:pe(),scale:pe(),sepia:be(),skew:pe(),space:X(),translate:X()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[To]}],"break-after":[{"break-after":lt()}],"break-before":[{"break-before":lt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...De(),Se]}],overflow:[{overflow:Ee()}],"overflow-x":[{"overflow-x":Ee()}],"overflow-y":[{"overflow-y":Ee()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Hc,Se]}],basis:[{basis:re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:be()}],shrink:[{shrink:be()}],order:[{order:["first","last","none",Hc,Se]}],"grid-cols":[{"grid-cols":[Vc]}],"col-start-end":[{col:["auto",{span:["full",Hc,Se]},Se]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[Vc]}],"row-start-end":[{row:["auto",{span:[Hc,Se]},Se]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[S]}],"gap-x":[{"gap-x":[S]}],"gap-y":[{"gap-y":[S]}],"justify-content":[{justify:["normal",...Ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[J]}],px:[{px:[J]}],py:[{py:[J]}],ps:[{ps:[J]}],pe:[{pe:[J]}],pt:[{pt:[J]}],pr:[{pr:[J]}],pb:[{pb:[J]}],pl:[{pl:[J]}],m:[{m:[D]}],mx:[{mx:[D]}],my:[{my:[D]}],ms:[{ms:[D]}],me:[{me:[D]}],mt:[{mt:[D]}],mr:[{mr:[D]}],mb:[{mb:[D]}],ml:[{ml:[D]}],"space-x":[{"space-x":[ne]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ne]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,e]}],"min-w":[{"min-w":[Se,e,"min","max","fit"]}],"max-w":[{"max-w":[Se,e,"none","full","min","max","fit","prose",{screen:[To]},To]}],h:[{h:[Se,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,e,"auto","min","max","fit"]}],"font-size":[{text:["base",To,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lg]}],"font-family":[{font:[Vc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Se]}],"line-clamp":[{"line-clamp":["none",Ca,lg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ai,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ai,Eo]}],"underline-offset":[{"underline-offset":["auto",Ai,Se]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...De(),eA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nA]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...ye(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:ye()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ye()]}],"outline-offset":[{"outline-offset":[Ai,Se]}],"outline-w":[{outline:[Ai,Eo]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Ai,Eo]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",To,rA]}],"shadow-color":[{shadow:[Vc]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...xe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":xe()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",To,Se]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[ie]}],sepia:[{sepia:[te]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[ie]}],"backdrop-sepia":[{"backdrop-sepia":[te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Se]}],duration:[{duration:pe()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:pe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[oe]}],"scale-x":[{"scale-x":[oe]}],"scale-y":[{"scale-y":[oe]}],rotate:[{rotate:[Hc,Se]}],"translate-x":[{"translate-x":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-x":[{"skew-x":[G]}],"skew-y":[{"skew-y":[G]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Se]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Ai,Eo,lg]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},aA=WR(lA);var xu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Px(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function cA(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var vb=Object.prototype.toString,_x=function(e){var t=vb.call(e),r=t==="[object Arguments]";return r||(r=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&vb.call(e.callee)==="[object Function]"),r},ag,bb;function uA(){if(bb)return ag;bb=1;var n;if(!Object.keys){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=_x,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(S){var C=S.constructor;return C&&C.prototype===S},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if(typeof window>"u")return!1;for(var S in window)try{if(!f["$"+S]&&e.call(window,S)&&window[S]!==null&&typeof window[S]=="object")try{c(window[S])}catch{return!0}}catch{return!0}return!1}(),m=function(S){if(typeof window>"u"||!p)return c(S);try{return c(S)}catch{return!1}};n=function(C){var E=C!==null&&typeof C=="object",P=t.call(C)==="[object Function]",D=r(C),_=E&&t.call(C)==="[object String]",J=[];if(!E&&!P&&!D)throw new TypeError("Object.keys called on a non-object");var ie=s&&P;if(_&&C.length>0&&!e.call(C,0))for(var oe=0;oe<C.length;++oe)J.push(String(oe));if(D&&C.length>0)for(var te=0;te<C.length;++te)J.push(String(te));else for(var G in C)!(ie&&G==="prototype")&&e.call(C,G)&&J.push(String(G));if(o)for(var ne=m(C),ae=0;ae<a.length;++ae)!(ne&&a[ae]==="constructor")&&e.call(C,a[ae])&&J.push(a[ae]);return J}}return ag=n,ag}var fA=Array.prototype.slice,dA=_x,Sb=Object.keys,td=Sb?function(e){return Sb(e)}:uA(),wb=Object.keys;td.shim=function(){if(Object.keys){var e=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);e||(Object.keys=function(r){return dA(r)?wb(fA.call(r)):wb(r)})}else Object.keys=td;return Object.keys||td};var Oy=td,hA=Error,pA=EvalError,gA=RangeError,mA=ReferenceError,Nx=SyntaxError,Zo=TypeError,yA=URIError,Fh=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==i||s.enumerable!==!0)return!1}return!0},xb=typeof Symbol<"u"&&Symbol,vA=Fh,Iy=function(){return typeof xb!="function"||typeof Symbol!="function"||typeof xb("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:vA()},cg={__proto__:null,foo:{}},bA=Object,SA=function(){return{__proto__:cg}.foo===cg.foo&&!(cg instanceof bA)},wA="Function.prototype.bind called on incompatible ",xA=Object.prototype.toString,kA=Math.max,CA="[object Function]",kb=function(e,t){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},EA=function(e,t){for(var r=[],i=t,o=0;i<e.length;i+=1,o+=1)r[o]=e[i];return r},TA=function(n,e){for(var t="",r=0;r<n.length;r+=1)t+=n[r],r+1<n.length&&(t+=e);return t},RA=function(e){var t=this;if(typeof t!="function"||xA.apply(t)!==CA)throw new TypeError(wA+t);for(var r=EA(arguments,1),i,o=function(){if(this instanceof i){var p=t.apply(this,kb(r,arguments));return Object(p)===p?p:this}return t.apply(e,kb(r,arguments))},s=kA(0,t.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(i=Function("binder","return function ("+TA(a,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var f=function(){};f.prototype=t.prototype,i.prototype=new f,f.prototype=null}return i},AA=RA,My=Function.prototype.bind||AA,OA=Function.prototype.call,IA=Object.prototype.hasOwnProperty,MA=My,Fx=MA.call(OA,IA),Ce,DA=hA,PA=pA,_A=gA,NA=mA,Pa=Nx,Ea=Zo,FA=yA,Lx=Function,ug=function(n){try{return Lx('"use strict"; return ('+n+").constructor;")()}catch{}},Js=Object.getOwnPropertyDescriptor;if(Js)try{Js({},"")}catch{Js=null}var fg=function(){throw new Ea},LA=Js?function(){try{return arguments.callee,fg}catch{try{return Js(arguments,"callee").get}catch{return fg}}}():fg,fa=Iy(),BA=SA(),yt=Object.getPrototypeOf||(BA?function(n){return n.__proto__}:null),ma={},$A=typeof Uint8Array>"u"||!yt?Ce:yt(Uint8Array),Ys={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":fa&&yt?yt([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":ma,"%AsyncGenerator%":ma,"%AsyncGeneratorFunction%":ma,"%AsyncIteratorPrototype%":ma,"%Atomics%":typeof Atomics>"u"?Ce:Atomics,"%BigInt%":typeof BigInt>"u"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":DA,"%eval%":eval,"%EvalError%":PA,"%Float32Array%":typeof Float32Array>"u"?Ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ce:FinalizationRegistry,"%Function%":Lx,"%GeneratorFunction%":ma,"%Int8Array%":typeof Int8Array>"u"?Ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fa&&yt?yt(yt([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map>"u"?Ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!fa||!yt?Ce:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ce:Promise,"%Proxy%":typeof Proxy>"u"?Ce:Proxy,"%RangeError%":_A,"%ReferenceError%":NA,"%Reflect%":typeof Reflect>"u"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!fa||!yt?Ce:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fa&&yt?yt(""[Symbol.iterator]()):Ce,"%Symbol%":fa?Symbol:Ce,"%SyntaxError%":Pa,"%ThrowTypeError%":LA,"%TypedArray%":$A,"%TypeError%":Ea,"%Uint8Array%":typeof Uint8Array>"u"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ce:Uint32Array,"%URIError%":FA,"%WeakMap%":typeof WeakMap>"u"?Ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ce:WeakSet};if(yt)try{null.error}catch(n){var zA=yt(yt(n));Ys["%Error.prototype%"]=zA}var jA=function n(e){var t;if(e==="%AsyncFunction%")t=ug("async function () {}");else if(e==="%GeneratorFunction%")t=ug("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=ug("async function* () {}");else if(e==="%AsyncGenerator%"){var r=n("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=n("%AsyncGenerator%");i&&yt&&(t=yt(i.prototype))}return Ys[e]=t,t},Cb={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ju=My,Id=Fx,UA=ju.call(Function.call,Array.prototype.concat),WA=ju.call(Function.apply,Array.prototype.splice),Eb=ju.call(Function.call,String.prototype.replace),Md=ju.call(Function.call,String.prototype.slice),HA=ju.call(Function.call,RegExp.prototype.exec),VA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,GA=/\\(\\)?/g,JA=function(e){var t=Md(e,0,1),r=Md(e,-1);if(t==="%"&&r!=="%")throw new Pa("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&t!=="%")throw new Pa("invalid intrinsic syntax, expected opening `%`");var i=[];return Eb(e,VA,function(o,s,a,c){i[i.length]=a?Eb(c,GA,"$1"):s||o}),i},YA=function(e,t){var r=e,i;if(Id(Cb,r)&&(i=Cb[r],r="%"+i[0]+"%"),Id(Ys,r)){var o=Ys[r];if(o===ma&&(o=jA(r)),typeof o>"u"&&!t)throw new Ea("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Pa("intrinsic "+e+" does not exist!")},Zr=function(e,t){if(typeof e!="string"||e.length===0)throw new Ea("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ea('"allowMissing" argument must be a boolean');if(HA(/^%?[^%]*%?$/,e)===null)throw new Pa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=JA(e),i=r.length>0?r[0]:"",o=YA("%"+i+"%",t),s=o.name,a=o.value,c=!1,f=o.alias;f&&(i=f[0],WA(r,UA([0,1],f)));for(var p=1,m=!0;p<r.length;p+=1){var S=r[p],C=Md(S,0,1),E=Md(S,-1);if((C==='"'||C==="'"||C==="`"||E==='"'||E==="'"||E==="`")&&C!==E)throw new Pa("property names with quotes must have matching quotes");if((S==="constructor"||!m)&&(c=!0),i+="."+S,s="%"+i+"%",Id(Ys,s))a=Ys[s];else if(a!=null){if(!(S in a)){if(!t)throw new Ea("base intrinsic for "+e+" exists, but the property is not available.");return}if(Js&&p+1>=r.length){var P=Js(a,S);m=!!P,m&&"get"in P&&!("originalValue"in P.get)?a=P.get:a=a[S]}else m=Id(a,S),a=a[S];m&&!c&&(Ys[s]=a)}}return a},KA=Zr,nd=KA("%Object.defineProperty%",!0)||!1;if(nd)try{nd({},"a",{value:1})}catch{nd=!1}var Dy=nd,XA=Zr,rd=XA("%Object.getOwnPropertyDescriptor%",!0);if(rd)try{rd([],"length")}catch{rd=null}var Py=rd,Tb=Dy,ZA=Nx,da=Zo,Rb=Py,_y=function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new da("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new da("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new da("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new da("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new da("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new da("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!Rb&&Rb(e,t);if(Tb)Tb(e,t,{configurable:s===null&&c?c.configurable:!s,enumerable:i===null&&c?c.enumerable:!i,value:r,writable:o===null&&c?c.writable:!o});else if(a||!i&&!o&&!s)e[t]=r;else throw new ZA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},fm=Dy,Bx=function(){return!!fm};Bx.hasArrayLengthDefineBug=function(){if(!fm)return null;try{return fm([],"length",{value:1}).length!==1}catch{return!0}};var Ny=Bx,QA=Oy,qA=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",eO=Object.prototype.toString,tO=Array.prototype.concat,Ab=_y,nO=function(n){return typeof n=="function"&&eO.call(n)==="[object Function]"},$x=Ny(),rO=function(n,e,t,r){if(e in n){if(r===!0){if(n[e]===t)return}else if(!nO(r)||!r())return}$x?Ab(n,e,t,!0):Ab(n,e,t)},zx=function(n,e){var t=arguments.length>2?arguments[2]:{},r=QA(e);qA&&(r=tO.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i<r.length;i+=1)rO(n,r[i],e[r[i]],t[r[i]])};zx.supportsDescriptors=!!$x;var sl=zx,jx={exports:{}},iO=Zr,Ob=_y,oO=Ny(),Ib=Py,Mb=Zo,sO=iO("%Math.floor%"),lO=function(e,t){if(typeof e!="function")throw new Mb("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||sO(t)!==t)throw new Mb("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Ib){var s=Ib(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!r)&&(oO?Ob(e,"length",t,!0,!0):Ob(e,"length",t)),e};(function(n){var e=My,t=Zr,r=lO,i=Zo,o=t("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(s,o),c=Dy,f=t("%Math.max%");n.exports=function(S){if(typeof S!="function")throw new i("a function is required");var C=a(e,s,arguments);return r(C,1+f(0,S.length-(arguments.length-1)),!0)};var p=function(){return a(e,o,arguments)};c?c(n.exports,"apply",{value:p}):n.exports.apply=p})(jx);var Va=jx.exports,Ux=Zr,Wx=Va,aO=Wx(Ux("String.prototype.indexOf")),Zn=function(e,t){var r=Ux(e,!!t);return typeof r=="function"&&aO(e,".prototype.")>-1?Wx(r):r},cO=Oy,Hx=Fh(),Vx=Zn,Db=Object,uO=Vx("Array.prototype.push"),Pb=Vx("Object.prototype.propertyIsEnumerable"),fO=Hx?Object.getOwnPropertySymbols:null,Gx=function(e,t){if(e==null)throw new TypeError("target must be an object");var r=Db(e);if(arguments.length===1)return r;for(var i=1;i<arguments.length;++i){var o=Db(arguments[i]),s=cO(o),a=Hx&&(Object.getOwnPropertySymbols||fO);if(a)for(var c=a(o),f=0;f<c.length;++f){var p=c[f];Pb(o,p)&&uO(s,p)}for(var m=0;m<s.length;++m){var S=s[m];if(Pb(o,S)){var C=o[S];r[S]=C}}}return r},dg=Gx,dO=function(){if(!Object.assign)return!1;for(var n="abcdefghijklmnopqrst",e=n.split(""),t={},r=0;r<e.length;++r)t[e[r]]=e[r];var i=Object.assign({},t),o="";for(var s in i)o+=s;return n!==o},hO=function(){if(!Object.assign||!Object.preventExtensions)return!1;var n=Object.preventExtensions({1:2});try{Object.assign(n,"xy")}catch{return n[1]==="y"}return!1},Jx=function(){return!Object.assign||dO()||hO()?dg:Object.assign},pO=sl,gO=Jx,mO=function(){var e=gO();return pO(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e},yO=sl,vO=Va,bO=Gx,Yx=Jx,SO=mO,wO=vO.apply(Yx()),Kx=function(e,t){return wO(Object,arguments)};yO(Kx,{getPolyfill:Yx,implementation:bO,shim:SO});var xO=Kx,ku=function(){return typeof(function(){}).name=="string"},iu=Object.getOwnPropertyDescriptor;if(iu)try{iu([],"length")}catch{iu=null}ku.functionsHaveConfigurableNames=function(){if(!ku()||!iu)return!1;var e=iu(function(){},"name");return!!e&&!!e.configurable};var kO=Function.prototype.bind;ku.boundFunctionsHaveNames=function(){return ku()&&typeof kO=="function"&&(function(){}).bind().name!==""};var CO=ku,_b=_y,EO=Ny(),TO=CO.functionsHaveConfigurableNames(),RO=Zo,AO=function(e,t){if(typeof e!="function")throw new RO("`fn` is not a function");var r=arguments.length>2&&!!arguments[2];return(!r||TO)&&(EO?_b(e,"name",t,!0,!0):_b(e,"name",t)),e},OO=AO,IO=Zo,MO=Object,Xx=OO(function(){if(this==null||this!==MO(this))throw new IO("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),DO=Xx,PO=sl.supportsDescriptors,_O=Object.getOwnPropertyDescriptor,Zx=function(){if(PO&&/a/mig.flags==="gim"){var e=_O(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var t="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(r,"sticky",{get:function(){t+="y"}}),t==="dy")return e.get}}return DO},NO=sl.supportsDescriptors,FO=Zx,LO=Object.getOwnPropertyDescriptor,BO=Object.defineProperty,$O=TypeError,Nb=Object.getPrototypeOf,zO=/a/,jO=function(){if(!NO||!Nb)throw new $O("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=FO(),t=Nb(zO),r=LO(t,"flags");return(!r||r.get!==e)&&BO(t,"flags",{configurable:!0,enumerable:!1,get:e}),e},UO=sl,WO=Va,HO=Xx,Qx=Zx,VO=jO,qx=WO(Qx());UO(qx,{getPolyfill:Qx,implementation:HO,shim:VO});var GO=qx,id={exports:{}},JO=Fh,ll=function(){return JO()&&!!Symbol.toStringTag},YO=ll(),KO=Zn,dm=KO("Object.prototype.toString"),Lh=function(e){return YO&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:dm(e)==="[object Arguments]"},e1=function(e){return Lh(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&dm(e)!=="[object Array]"&&dm(e.callee)==="[object Function]"},XO=function(){return Lh(arguments)}();Lh.isLegacyArguments=e1;var t1=XO?Lh:e1;const ZO={},QO=Object.freeze(Object.defineProperty({__proto__:null,default:ZO},Symbol.toStringTag,{value:"Module"})),qO=cA(QO);var Fy=typeof Map=="function"&&Map.prototype,hg=Object.getOwnPropertyDescriptor&&Fy?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Dd=Fy&&hg&&typeof hg.get=="function"?hg.get:null,Fb=Fy&&Map.prototype.forEach,Ly=typeof Set=="function"&&Set.prototype,pg=Object.getOwnPropertyDescriptor&&Ly?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Pd=Ly&&pg&&typeof pg.get=="function"?pg.get:null,Lb=Ly&&Set.prototype.forEach,eI=typeof WeakMap=="function"&&WeakMap.prototype,ou=eI?WeakMap.prototype.has:null,tI=typeof WeakSet=="function"&&WeakSet.prototype,su=tI?WeakSet.prototype.has:null,nI=typeof WeakRef=="function"&&WeakRef.prototype,Bb=nI?WeakRef.prototype.deref:null,rI=Boolean.prototype.valueOf,iI=Object.prototype.toString,oI=Function.prototype.toString,sI=String.prototype.match,By=String.prototype.slice,jo=String.prototype.replace,lI=String.prototype.toUpperCase,$b=String.prototype.toLowerCase,n1=RegExp.prototype.test,zb=Array.prototype.concat,Wr=Array.prototype.join,aI=Array.prototype.slice,jb=Math.floor,hm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gg=Object.getOwnPropertySymbols,pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_a=typeof Symbol=="function"&&typeof Symbol.iterator=="object",jt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_a||!0)?Symbol.toStringTag:null,r1=Object.prototype.propertyIsEnumerable,Ub=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function Wb(n,e){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||n1.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var r=n<0?-jb(-n):jb(n);if(r!==n){var i=String(r),o=By.call(e,i.length+1);return jo.call(i,t,"$&_")+"."+jo.call(jo.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return jo.call(e,t,"$&_")}var gm=qO,Hb=gm.custom,Vb=o1(Hb)?Hb:null,cI=function n(e,t,r,i){var o=t||{};if(Io(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Io(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Io(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Io(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Io(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return l1(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return a?Wb(e,c):c}if(typeof e=="bigint"){var f=String(e)+"n";return a?Wb(e,f):f}var p=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=p&&p>0&&typeof e=="object")return mm(e)?"[Array]":"[Object]";var m=RI(o,r);if(typeof i>"u")i=[];else if(s1(i,e)>=0)return"[Circular]";function S(fe,V,De){if(V&&(i=aI.call(i),i.push(V)),De){var ye={depth:o.depth};return Io(o,"quoteStyle")&&(ye.quoteStyle=o.quoteStyle),n(fe,ye,r+1,i)}return n(fe,o,r+1,i)}if(typeof e=="function"&&!Gb(e)){var C=vI(e),E=_f(e,S);return"[Function"+(C?": "+C:" (anonymous)")+"]"+(E.length>0?" { "+Wr.call(E,", ")+" }":"")}if(o1(e)){var P=_a?jo.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):pm.call(e);return typeof e=="object"&&!_a?Gc(P):P}if(CI(e)){for(var D="<"+$b.call(String(e.nodeName)),_=e.attributes||[],J=0;J<_.length;J++)D+=" "+_[J].name+"="+i1(uI(_[J].value),"double",o);return D+=">",e.childNodes&&e.childNodes.length&&(D+="..."),D+="</"+$b.call(String(e.nodeName))+">",D}if(mm(e)){if(e.length===0)return"[]";var ie=_f(e,S);return m&&!TI(ie)?"["+ym(ie,m)+"]":"[ "+Wr.call(ie,", ")+" ]"}if(dI(e)){var oe=_f(e,S);return!("cause"in Error.prototype)&&"cause"in e&&!r1.call(e,"cause")?"{ ["+String(e)+"] "+Wr.call(zb.call("[cause]: "+S(e.cause),oe),", ")+" }":oe.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Wr.call(oe,", ")+" }"}if(typeof e=="object"&&s){if(Vb&&typeof e[Vb]=="function"&&gm)return gm(e,{depth:p-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(bI(e)){var te=[];return Fb&&Fb.call(e,function(fe,V){te.push(S(V,e,!0)+" => "+S(fe,e))}),Jb("Map",Dd.call(e),te,m)}if(xI(e)){var G=[];return Lb&&Lb.call(e,function(fe){G.push(S(fe,e))}),Jb("Set",Pd.call(e),G,m)}if(SI(e))return mg("WeakMap");if(kI(e))return mg("WeakSet");if(wI(e))return mg("WeakRef");if(pI(e))return Gc(S(Number(e)));if(mI(e))return Gc(S(hm.call(e)));if(gI(e))return Gc(rI.call(e));if(hI(e))return Gc(S(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof xu<"u"&&e===xu)return"{ [object globalThis] }";if(!fI(e)&&!Gb(e)){var ne=_f(e,S),ae=Ub?Ub(e)===Object.prototype:e instanceof Object||e.constructor===Object,Q=e instanceof Object?"":"null prototype",Ee=!ae&&jt&&Object(e)===e&&jt in e?By.call(Qo(e),8,-1):Q?"Object":"",re=ae||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",X=re+(Ee||Q?"["+Wr.call(zb.call([],Ee||[],Q||[]),": ")+"] ":"");return ne.length===0?X+"{}":m?X+"{"+ym(ne,m)+"}":X+"{ "+Wr.call(ne,", ")+" }"}return String(e)};function i1(n,e,t){var r=(t.quoteStyle||e)==="double"?'"':"'";return r+n+r}function uI(n){return jo.call(String(n),/"/g,"&quot;")}function mm(n){return Qo(n)==="[object Array]"&&(!jt||!(typeof n=="object"&&jt in n))}function fI(n){return Qo(n)==="[object Date]"&&(!jt||!(typeof n=="object"&&jt in n))}function Gb(n){return Qo(n)==="[object RegExp]"&&(!jt||!(typeof n=="object"&&jt in n))}function dI(n){return Qo(n)==="[object Error]"&&(!jt||!(typeof n=="object"&&jt in n))}function hI(n){return Qo(n)==="[object String]"&&(!jt||!(typeof n=="object"&&jt in n))}function pI(n){return Qo(n)==="[object Number]"&&(!jt||!(typeof n=="object"&&jt in n))}function gI(n){return Qo(n)==="[object Boolean]"&&(!jt||!(typeof n=="object"&&jt in n))}function o1(n){if(_a)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!pm)return!1;try{return pm.call(n),!0}catch{}return!1}function mI(n){if(!n||typeof n!="object"||!hm)return!1;try{return hm.call(n),!0}catch{}return!1}var yI=Object.prototype.hasOwnProperty||function(n){return n in this};function Io(n,e){return yI.call(n,e)}function Qo(n){return iI.call(n)}function vI(n){if(n.name)return n.name;var e=sI.call(oI.call(n),/^function\s*([\w$]+)/);return e?e[1]:null}function s1(n,e){if(n.indexOf)return n.indexOf(e);for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function bI(n){if(!Dd||!n||typeof n!="object")return!1;try{Dd.call(n);try{Pd.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}function SI(n){if(!ou||!n||typeof n!="object")return!1;try{ou.call(n,ou);try{su.call(n,su)}catch{return!0}return n instanceof WeakMap}catch{}return!1}function wI(n){if(!Bb||!n||typeof n!="object")return!1;try{return Bb.call(n),!0}catch{}return!1}function xI(n){if(!Pd||!n||typeof n!="object")return!1;try{Pd.call(n);try{Dd.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}function kI(n){if(!su||!n||typeof n!="object")return!1;try{su.call(n,su);try{ou.call(n,ou)}catch{return!0}return n instanceof WeakSet}catch{}return!1}function CI(n){return!n||typeof n!="object"?!1:typeof HTMLElement<"u"&&n instanceof HTMLElement?!0:typeof n.nodeName=="string"&&typeof n.getAttribute=="function"}function l1(n,e){if(n.length>e.maxStringLength){var t=n.length-e.maxStringLength,r="... "+t+" more character"+(t>1?"s":"");return l1(By.call(n,0,e.maxStringLength),e)+r}var i=jo.call(jo.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,EI);return i1(i,"single",e)}function EI(n){var e=n.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+lI.call(e.toString(16))}function Gc(n){return"Object("+n+")"}function mg(n){return n+" { ? }"}function Jb(n,e,t,r){var i=r?ym(t,r):Wr.call(t,", ");return n+" ("+e+") {"+i+"}"}function TI(n){for(var e=0;e<n.length;e++)if(s1(n[e],`
11
+ `)>=0)return!1;return!0}function RI(n,e){var t;if(n.indent===" ")t=" ";else if(typeof n.indent=="number"&&n.indent>0)t=Wr.call(Array(n.indent+1)," ");else return null;return{base:t,prev:Wr.call(Array(e+1),t)}}function ym(n,e){if(n.length===0)return"";var t=`
12
12
  `+e.prev+e.base;return t+Wr.call(n,","+t)+`
13
- `+e.prev}function Mf(n,e){var t=fm(n),r=[];if(t){r.length=n.length;for(var i=0;i<n.length;i++)r[i]=Io(n,i)?e(n[i],n):""}var o=typeof ug=="function"?ug(n):[],s;if(Da){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var c in n)Io(n,c)&&(t&&String(Number(c))===c&&c<n.length||Da&&s["$"+c]instanceof Symbol||(Gx.call(/[^\w$]/,c)?r.push(e(c,n)+": "+e(n[c],n)):r.push(c+": "+e(n[c],n))));if(typeof ug=="function")for(var f=0;f<o.length;f++)Jx.call(n,o[f])&&r.push("["+e(o[f])+"]: "+e(n[o[f]],n));return r}var Qx=Zr,Ha=Zn,mI=ZO,yI=Zo,Df=Qx("%WeakMap%",!0),Pf=Qx("%Map%",!0),vI=Ha("WeakMap.prototype.get",!0),bI=Ha("WeakMap.prototype.set",!0),SI=Ha("WeakMap.prototype.has",!0),wI=Ha("Map.prototype.get",!0),xI=Ha("Map.prototype.set",!0),kI=Ha("Map.prototype.has",!0),_y=function(n,e){for(var t=n,r;(r=t.next)!==null;t=r)if(r.key===e)return t.next=r.next,r.next=n.next,n.next=r,r},CI=function(n,e){var t=_y(n,e);return t&&t.value},EI=function(n,e,t){var r=_y(n,e);r?r.value=t:n.next={key:e,next:n.next,value:t}},TI=function(n,e){return!!_y(n,e)},qx=function(){var e,t,r,i={assert:function(o){if(!i.has(o))throw new yI("Side channel does not contain "+mI(o))},get:function(o){if(Df&&o&&(typeof o=="object"||typeof o=="function")){if(e)return vI(e,o)}else if(Pf){if(t)return wI(t,o)}else if(r)return CI(r,o)},has:function(o){if(Df&&o&&(typeof o=="object"||typeof o=="function")){if(e)return SI(e,o)}else if(Pf){if(t)return kI(t,o)}else if(r)return TI(r,o);return!1},set:function(o,s){Df&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new Df),bI(e,o,s)):Pf?(t||(t=new Pf),xI(t,o,s)):(r||(r={key:{},next:null}),EI(r,o,s))}};return i},RI=Tx,Vc=qx(),Oi=Zo,Ny={assert:function(n,e){if(!n||typeof n!="object"&&typeof n!="function")throw new Oi("`O` is not an object");if(typeof e!="string")throw new Oi("`slot` must be a string");if(Vc.assert(n),!Ny.has(n,e))throw new Oi("`"+e+"` is not present on `O`")},get:function(n,e){if(!n||typeof n!="object"&&typeof n!="function")throw new Oi("`O` is not an object");if(typeof e!="string")throw new Oi("`slot` must be a string");var t=Vc.get(n);return t&&t["$"+e]},has:function(n,e){if(!n||typeof n!="object"&&typeof n!="function")throw new Oi("`O` is not an object");if(typeof e!="string")throw new Oi("`slot` must be a string");var t=Vc.get(n);return!!t&&RI(t,"$"+e)},set:function(n,e,t){if(!n||typeof n!="object"&&typeof n!="function")throw new Oi("`O` is not an object");if(typeof e!="string")throw new Oi("`slot` must be a string");var r=Vc.get(n);r||(r={},Vc.set(n,r)),r["$"+e]=t}};Object.freeze&&Object.freeze(Ny);var AI=Ny,Gc=AI,OI=SyntaxError,Wb=typeof StopIteration=="object"?StopIteration:null,II=function(e){if(!Wb)throw new OI("this environment lacks StopIteration");Gc.set(e,"[[Done]]",!1);var t={next:function(){var i=Gc.get(this,"[[Iterator]]"),o=Gc.get(i,"[[Done]]");try{return{done:o,value:o?void 0:i.next()}}catch(s){if(Gc.set(i,"[[Done]]",!0),s!==Wb)throw s;return{done:!0,value:void 0}}}};return Gc.set(t,"[[Iterator]]",e),t},MI={}.toString,e1=Array.isArray||function(n){return MI.call(n)=="[object Array]"},DI=String.prototype.valueOf,PI=function(e){try{return DI.call(e),!0}catch{return!1}},_I=Object.prototype.toString,NI="[object String]",FI=sl(),t1=function(e){return typeof e=="string"?!0:typeof e!="object"?!1:FI?PI(e):_I.call(e)===NI},Fy=typeof Map=="function"&&Map.prototype?Map:null,LI=typeof Set=="function"&&Set.prototype?Set:null,Id;Fy||(Id=function(e){return!1});var n1=Fy?Map.prototype.has:null,Hb=LI?Set.prototype.has:null;!Id&&!n1&&(Id=function(e){return!1});var r1=Id||function(e){if(!e||typeof e!="object")return!1;try{if(n1.call(e),Hb)try{Hb.call(e)}catch{return!0}return e instanceof Fy}catch{}return!1},BI=typeof Map=="function"&&Map.prototype?Map:null,Ly=typeof Set=="function"&&Set.prototype?Set:null,Md;Ly||(Md=function(e){return!1});var Vb=BI?Map.prototype.has:null,i1=Ly?Set.prototype.has:null;!Md&&!i1&&(Md=function(e){return!1});var o1=Md||function(e){if(!e||typeof e!="object")return!1;try{if(i1.call(e),Vb)try{Vb.call(e)}catch{return!0}return e instanceof Ly}catch{}return!1},Gb=Vx,Jb=II;if(Ey()||Mh()){var dg=Symbol.iterator;td.exports=function(e){if(e!=null&&typeof e[dg]<"u")return e[dg]();if(Gb(e))return Array.prototype[dg].call(e)}}else{var $I=e1,zI=t1,Yb=Zr,jI=Yb("%Map%",!0),UI=Yb("%Set%",!0),pr=Zn,Kb=pr("Array.prototype.push"),Xb=pr("String.prototype.charCodeAt"),WI=pr("String.prototype.slice"),HI=function(e,t){var r=e.length;if(t+1>=r)return t+1;var i=Xb(e,t);if(i<55296||i>56319)return t+1;var o=Xb(e,t+1);return o<56320||o>57343?t+1:t+2},hg=function(e){var t=0;return{next:function(){var i=t>=e.length,o;return i||(o=e[t],t+=1),{done:i,value:o}}}},Zb=function(e,t){if($I(e)||Gb(e))return hg(e);if(zI(e)){var r=0;return{next:function(){var o=HI(e,r),s=WI(e,r,o);return r=o,{done:o>e.length,value:s}}}}if(t&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!jI&&!UI)td.exports=function(e){if(e!=null)return Zb(e,!0)};else{var VI=r1,GI=o1,Qb=pr("Map.prototype.forEach",!0),qb=pr("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var e0=pr("Map.prototype.iterator",!0),t0=pr("Set.prototype.iterator",!0);var n0=pr("Map.prototype.@@iterator",!0)||pr("Map.prototype._es6-shim iterator_",!0),r0=pr("Set.prototype.@@iterator",!0)||pr("Set.prototype._es6-shim iterator_",!0),JI=function(e){if(VI(e)){if(e0)return Jb(e0(e));if(n0)return n0(e);if(Qb){var t=[];return Qb(e,function(i,o){Kb(t,[o,i])}),hg(t)}}if(GI(e)){if(t0)return Jb(t0(e));if(r0)return r0(e);if(qb){var r=[];return qb(e,function(i){Kb(r,i)}),hg(r)}}};td.exports=function(e){return JI(e)||Zb(e)}}}var YI=td.exports,i0=function(n){return n!==n},s1=function(e,t){return e===0&&t===0?1/e===1/t:!!(e===t||i0(e)&&i0(t))},KI=s1,l1=function(){return typeof Object.is=="function"?Object.is:KI},XI=l1,ZI=ol,QI=function(){var e=XI();return ZI(Object,{is:e},{is:function(){return Object.is!==e}}),e},qI=ol,eM=Wa,tM=s1,a1=l1,nM=QI,c1=eM(a1(),Object);qI(c1,{getPolyfill:a1,implementation:tM,shim:nM});var rM=c1,iM=Wa,u1=Zn,oM=Zr,hm=oM("%ArrayBuffer%",!0),nd=u1("ArrayBuffer.prototype.byteLength",!0),sM=u1("Object.prototype.toString"),o0=!!hm&&!nd&&new hm(0).slice,s0=!!o0&&iM(o0),f1=nd||s0?function(e){if(!e||typeof e!="object")return!1;try{return nd?nd(e):s0(e,0),!0}catch{return!1}}:hm?function(e){return sM(e)==="[object ArrayBuffer]"}:function(e){return!1},lM=Date.prototype.getDay,aM=function(e){try{return lM.call(e),!0}catch{return!1}},cM=Object.prototype.toString,uM="[object Date]",fM=sl(),dM=function(e){return typeof e!="object"||e===null?!1:fM?aM(e):cM.call(e)===uM},pm=Zn,d1=sl(),h1,p1,gm,mm;if(d1){h1=pm("Object.prototype.hasOwnProperty"),p1=pm("RegExp.prototype.exec"),gm={};var pg=function(){throw gm};mm={toString:pg,valueOf:pg},typeof Symbol.toPrimitive=="symbol"&&(mm[Symbol.toPrimitive]=pg)}var hM=pm("Object.prototype.toString"),pM=Object.getOwnPropertyDescriptor,gM="[object RegExp]",mM=d1?function(e){if(!e||typeof e!="object")return!1;var t=pM(e,"lastIndex"),r=t&&h1(t,"value");if(!r)return!1;try{p1(e,mm)}catch(i){return i===gm}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:hM(e)===gM},yM=Zn,l0=yM("SharedArrayBuffer.prototype.byteLength",!0),vM=l0?function(e){if(!e||typeof e!="object")return!1;try{return l0(e),!0}catch{return!1}}:function(e){return!1},bM=Number.prototype.toString,SM=function(e){try{return bM.call(e),!0}catch{return!1}},wM=Object.prototype.toString,xM="[object Number]",kM=sl(),CM=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:kM?SM(e):wM.call(e)===xM},g1=Zn,EM=g1("Boolean.prototype.toString"),TM=g1("Object.prototype.toString"),RM=function(e){try{return EM(e),!0}catch{return!1}},AM="[object Boolean]",OM=sl(),IM=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:OM&&Symbol.toStringTag in e?RM(e):TM(e)===AM},ym={exports:{}},MM=Object.prototype.toString,DM=Ey();if(DM){var PM=Symbol.prototype.toString,_M=/^Symbol\(.*\)$/,NM=function(e){return typeof e.valueOf()!="symbol"?!1:_M.test(PM.call(e))};ym.exports=function(e){if(typeof e=="symbol")return!0;if(MM.call(e)!=="[object Symbol]")return!1;try{return NM(e)}catch{return!1}}}else ym.exports=function(e){return!1};var FM=ym.exports,vm={exports:{}},a0=typeof BigInt<"u"&&BigInt,LM=function(){return typeof a0=="function"&&typeof BigInt=="function"&&typeof a0(42)=="bigint"&&typeof BigInt(42)=="bigint"},BM=LM();if(BM){var $M=BigInt.prototype.valueOf,zM=function(e){try{return $M.call(e),!0}catch{}return!1};vm.exports=function(e){return e===null||typeof e>"u"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:zM(e)}}else vm.exports=function(e){return!1};var jM=vm.exports,UM=t1,WM=CM,HM=IM,VM=FM,GM=jM,JM=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(UM(e))return"String";if(WM(e))return"Number";if(HM(e))return"Boolean";if(VM(e))return"Symbol";if(GM(e))return"BigInt"},Dd=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,c0=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Pd;Dd||(Pd=function(e){return!1});var bm=Dd?Dd.prototype.has:null,gg=c0?c0.prototype.has:null;!Pd&&!bm&&(Pd=function(e){return!1});var YM=Pd||function(e){if(!e||typeof e!="object")return!1;try{if(bm.call(e,bm),gg)try{gg.call(e,gg)}catch{return!0}return e instanceof Dd}catch{}return!1},Sm={exports:{}},KM=Zr,m1=Zn,XM=KM("%WeakSet%",!0),mg=m1("WeakSet.prototype.has",!0);if(mg){var yg=m1("WeakMap.prototype.has",!0);Sm.exports=function(e){if(!e||typeof e!="object")return!1;try{if(mg(e,mg),yg)try{yg(e,yg)}catch{return!0}return e instanceof XM}catch{}return!1}}else Sm.exports=function(e){return!1};var ZM=Sm.exports,QM=r1,qM=o1,eD=YM,tD=ZM,nD=function(e){if(e&&typeof e=="object"){if(QM(e))return"Map";if(qM(e))return"Set";if(eD(e))return"WeakMap";if(tD(e))return"WeakSet"}return!1},y1=Function.prototype.toString,ba=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,wm,rd;if(typeof ba=="function"&&typeof Object.defineProperty=="function")try{wm=Object.defineProperty({},"length",{get:function(){throw rd}}),rd={},ba(function(){throw 42},null,wm)}catch(n){n!==rd&&(ba=null)}else ba=null;var rD=/^\s*class\b/,xm=function(e){try{var t=y1.call(e);return rD.test(t)}catch{return!1}},vg=function(e){try{return xm(e)?!1:(y1.call(e),!0)}catch{return!1}},id=Object.prototype.toString,iD="[object Object]",oD="[object Function]",sD="[object GeneratorFunction]",lD="[object HTMLAllCollection]",aD="[object HTML document.all class]",cD="[object HTMLCollection]",uD=typeof Symbol=="function"&&!!Symbol.toStringTag,fD=!(0 in[,]),km=function(){return!1};if(typeof document=="object"){var dD=document.all;id.call(dD)===id.call(document.all)&&(km=function(e){if((fD||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=id.call(e);return(t===lD||t===aD||t===cD||t===iD)&&e("")==null}catch{}return!1})}var hD=ba?function(e){if(km(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ba(e,null,wm)}catch(t){if(t!==rd)return!1}return!xm(e)&&vg(e)}:function(e){if(km(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(uD)return vg(e);if(xm(e))return!1;var t=id.call(e);return t!==oD&&t!==sD&&!/^\[object HTML/.test(t)?!1:vg(e)},pD=hD,gD=Object.prototype.toString,v1=Object.prototype.hasOwnProperty,mD=function(e,t,r){for(var i=0,o=e.length;i<o;i++)v1.call(e,i)&&(r==null?t(e[i],i,e):t.call(r,e[i],i,e))},yD=function(e,t,r){for(var i=0,o=e.length;i<o;i++)r==null?t(e.charAt(i),i,e):t.call(r,e.charAt(i),i,e)},vD=function(e,t,r){for(var i in e)v1.call(e,i)&&(r==null?t(e[i],i,e):t.call(r,e[i],i,e))},bD=function(e,t,r){if(!pD(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),gD.call(e)==="[object Array]"?mD(e,t,i):typeof e=="string"?yD(e,t,i):vD(e,t,i)},SD=bD,wD=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],bg=wD,xD=typeof globalThis>"u"?vu:globalThis,kD=function(){for(var e=[],t=0;t<bg.length;t++)typeof xD[bg[t]]=="function"&&(e[e.length]=bg[t]);return e},_d=SD,CD=kD,u0=Wa,By=Zn,od=Ay,ED=By("Object.prototype.toString"),b1=sl(),f0=typeof globalThis>"u"?vu:globalThis,Cm=CD(),$y=By("String.prototype.slice"),Sg=Object.getPrototypeOf,TD=By("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},Nd={__proto__:null};b1&&od&&Sg?_d(Cm,function(n){var e=new f0[n];if(Symbol.toStringTag in e){var t=Sg(e),r=od(t,Symbol.toStringTag);if(!r){var i=Sg(t);r=od(i,Symbol.toStringTag)}Nd["$"+n]=u0(r.get)}}):_d(Cm,function(n){var e=new f0[n],t=e.slice||e.set;t&&(Nd["$"+n]=u0(t))});var RD=function(e){var t=!1;return _d(Nd,function(r,i){if(!t)try{"$"+r(e)===i&&(t=$y(i,1))}catch{}}),t},AD=function(e){var t=!1;return _d(Nd,function(r,i){if(!t)try{r(e),t=$y(i,1)}catch{}}),t},OD=function(e){if(!e||typeof e!="object")return!1;if(!b1){var t=$y(ED(e),8,-1);return TD(Cm,t)>-1?t:t!=="Object"?!1:AD(e)}return od?RD(e):null},ID=Zn,d0=ID("ArrayBuffer.prototype.byteLength",!0),MD=f1,DD=function(e){return MD(e)?d0?d0(e):e.byteLength:NaN},S1=uO,Qr=Zn,h0=_O,PD=Zr,Pa=YI,_D=qx,p0=rM,g0=Vx,m0=e1,y0=f1,v0=dM,b0=mM,S0=vM,w0=Cy,x0=JM,k0=nD,C0=OD,E0=DD,T0=Qr("SharedArrayBuffer.prototype.byteLength",!0),R0=Qr("Date.prototype.getTime"),wg=Object.getPrototypeOf,A0=Qr("Object.prototype.toString"),Fd=PD("%Set%",!0),Em=Qr("Map.prototype.has",!0),Ld=Qr("Map.prototype.get",!0),O0=Qr("Map.prototype.size",!0),Bd=Qr("Set.prototype.add",!0),w1=Qr("Set.prototype.delete",!0),$d=Qr("Set.prototype.has",!0),sd=Qr("Set.prototype.size",!0);function I0(n,e,t,r){for(var i=Pa(n),o;(o=i.next())&&!o.done;)if(yr(e,o.value,t,r))return w1(n,o.value),!0;return!1}function x1(n){if(typeof n>"u")return null;if(typeof n!="object")return typeof n=="symbol"?!1:typeof n=="string"||typeof n=="number"?+n==+n:!0}function ND(n,e,t,r,i,o){var s=x1(t);if(s!=null)return s;var a=Ld(e,s),c=S1({},i,{strict:!1});return typeof a>"u"&&!Em(e,s)||!yr(r,a,c,o)?!1:!Em(n,s)&&yr(r,a,c,o)}function FD(n,e,t){var r=x1(t);return r??($d(e,r)&&!$d(n,r))}function M0(n,e,t,r,i,o){for(var s=Pa(n),a,c;(a=s.next())&&!a.done;)if(c=a.value,yr(t,c,i,o)&&yr(r,Ld(e,c),i,o))return w1(n,c),!0;return!1}function yr(n,e,t,r){var i=t||{};if(i.strict?p0(n,e):n===e)return!0;var o=x0(n),s=x0(e);if(o!==s)return!1;if(!n||!e||typeof n!="object"&&typeof e!="object")return i.strict?p0(n,e):n==e;var a=r.has(n),c=r.has(e),f;if(a&&c){if(r.get(n)===r.get(e))return!0}else f={};return a||r.set(n,f),c||r.set(e,f),$D(n,e,i,r)}function D0(n){return!n||typeof n!="object"||typeof n.length!="number"||typeof n.copy!="function"||typeof n.slice!="function"||n.length>0&&typeof n[0]!="number"?!1:!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))}function LD(n,e,t,r){if(sd(n)!==sd(e))return!1;for(var i=Pa(n),o=Pa(e),s,a,c;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object")c||(c=new Fd),Bd(c,s.value);else if(!$d(e,s.value)){if(t.strict||!FD(n,e,s.value))return!1;c||(c=new Fd),Bd(c,s.value)}if(c){for(;(a=o.next())&&!a.done;)if(a.value&&typeof a.value=="object"){if(!I0(c,a.value,t.strict,r))return!1}else if(!t.strict&&!$d(n,a.value)&&!I0(c,a.value,t.strict,r))return!1;return sd(c)===0}return!0}function BD(n,e,t,r){if(O0(n)!==O0(e))return!1;for(var i=Pa(n),o=Pa(e),s,a,c,f,p,m;(s=i.next())&&!s.done;)if(f=s.value[0],p=s.value[1],f&&typeof f=="object")c||(c=new Fd),Bd(c,f);else if(m=Ld(e,f),typeof m>"u"&&!Em(e,f)||!yr(p,m,t,r)){if(t.strict||!ND(n,e,f,p,t,r))return!1;c||(c=new Fd),Bd(c,f)}if(c){for(;(a=o.next())&&!a.done;)if(f=a.value[0],m=a.value[1],f&&typeof f=="object"){if(!M0(c,n,f,m,t,r))return!1}else if(!t.strict&&(!n.has(f)||!yr(Ld(n,f),m,t,r))&&!M0(c,n,f,m,S1({},t,{strict:!1}),r))return!1;return sd(c)===0}return!0}function $D(n,e,t,r){var i,o;if(typeof n!=typeof e||n==null||e==null||A0(n)!==A0(e)||g0(n)!==g0(e))return!1;var s=m0(n),a=m0(e);if(s!==a)return!1;var c=n instanceof Error,f=e instanceof Error;if(c!==f||(c||f)&&(n.name!==e.name||n.message!==e.message))return!1;var p=b0(n),m=b0(e);if(p!==m||(p||m)&&(n.source!==e.source||h0(n)!==h0(e)))return!1;var S=v0(n),C=v0(e);if(S!==C||(S||C)&&R0(n)!==R0(e)||t.strict&&wg&&wg(n)!==wg(e))return!1;var E=C0(n),P=C0(e);if(E!==P)return!1;if(E||P){if(n.length!==e.length)return!1;for(i=0;i<n.length;i++)if(n[i]!==e[i])return!1;return!0}var D=D0(n),_=D0(e);if(D!==_)return!1;if(D||_){if(n.length!==e.length)return!1;for(i=0;i<n.length;i++)if(n[i]!==e[i])return!1;return!0}var J=y0(n),ie=y0(e);if(J!==ie)return!1;if(J||ie)return E0(n)!==E0(e)?!1:typeof Uint8Array=="function"&&yr(new Uint8Array(n),new Uint8Array(e),t,r);var oe=S0(n),te=S0(e);if(oe!==te)return!1;if(oe||te)return T0(n)!==T0(e)?!1:typeof Uint8Array=="function"&&yr(new Uint8Array(n),new Uint8Array(e),t,r);if(typeof n!=typeof e)return!1;var G=w0(n),ne=w0(e);if(G.length!==ne.length)return!1;for(G.sort(),ne.sort(),i=G.length-1;i>=0;i--)if(G[i]!=ne[i])return!1;for(i=G.length-1;i>=0;i--)if(o=G[i],!yr(n[o],e[o],t,r))return!1;var ae=k0(n),Q=k0(e);return ae!==Q?!1:ae==="Set"||Q==="Set"?LD(n,e,t,r):ae==="Map"?BD(n,e,t,r):!0}var zD=function(e,t,r){return yr(e,t,r,_D())};const jD=kx(zD),P0=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,_0=yx,UD=(n,e)=>t=>{var r;if((e==null?void 0:e.variants)==null)return _0(n,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:i,defaultVariants:o}=e,s=Object.keys(i).map(f=>{const p=t==null?void 0:t[f],m=o==null?void 0:o[f];if(p===null)return null;const S=P0(p)||P0(m);return i[f][S]}),a=t&&Object.entries(t).reduce((f,p)=>{let[m,S]=p;return S===void 0||(f[m]=S),f},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:m,className:S,...C}=p;return Object.entries(C).every(E=>{let[P,D]=E;return Array.isArray(D)?D.includes({...o,...a}[P]):{...o,...a}[P]===D})?[...f,m,S]:f},[]);return _0(n,s,c,t==null?void 0:t.class,t==null?void 0:t.className)};var k1={exports:{}};(function(n,e){(function(r,i){n.exports=i(_u,uC)})(vu,function(t,r){return function(i){var o={};function s(a){if(o[a])return o[a].exports;var c=o[a]={i:a,l:!1,exports:{}};return i[a].call(c.exports,c,c.exports,s),c.l=!0,c.exports}return s.m=i,s.c=o,s.d=function(a,c,f){s.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:f})},s.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},s.t=function(a,c){if(c&1&&(a=s(a)),c&8||c&4&&typeof a=="object"&&a&&a.__esModule)return a;var f=Object.create(null);if(s.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:a}),c&2&&typeof a!="string")for(var p in a)s.d(f,p,(function(m){return a[m]}).bind(null,p));return f},s.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(c,"a",c),c},s.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)},s.p="",s(s.s=4)}([function(i,o,s){i.exports=s(5)()},function(i,o){i.exports=t},function(i,o){i.exports=r},function(i,o){i.exports=function(s,a,c){var f=s.direction,p=s.value;switch(f){case"top":return c.top+p<a.top&&c.bottom>a.bottom&&c.left<a.left&&c.right>a.right;case"left":return c.left+p<a.left&&c.bottom>a.bottom&&c.top<a.top&&c.right>a.right;case"bottom":return c.bottom-p>a.bottom&&c.left<a.left&&c.right>a.right&&c.top<a.top;case"right":return c.right-p>a.right&&c.left<a.left&&c.top<a.top&&c.bottom>a.bottom}}},function(i,o,s){s.r(o),s.d(o,"default",function(){return Ee});var a=s(1),c=s.n(a),f=s(2),p=s.n(f),m=s(0),S=s.n(m),C=s(3),E=s.n(C);function P(re){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(fe){return typeof fe}:P=function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},P(re)}function D(re,X){if(!(re instanceof X))throw new TypeError("Cannot call a class as a function")}function _(re,X){for(var fe=0;fe<X.length;fe++){var V=X[fe];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(re,V.key,V)}}function J(re,X,fe){return X&&_(re.prototype,X),re}function ie(re,X){return X&&(P(X)==="object"||typeof X=="function")?X:te(re)}function oe(re){return oe=Object.setPrototypeOf?Object.getPrototypeOf:function(fe){return fe.__proto__||Object.getPrototypeOf(fe)},oe(re)}function te(re){if(re===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re}function G(re,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");re.prototype=Object.create(X&&X.prototype,{constructor:{value:re,writable:!0,configurable:!0}}),X&&ne(re,X)}function ne(re,X){return ne=Object.setPrototypeOf||function(V,De){return V.__proto__=De,V},ne(re,X)}function ae(re,X,fe){return X in re?Object.defineProperty(re,X,{value:fe,enumerable:!0,configurable:!0,writable:!0}):re[X]=fe,re}function Q(re){return re.width===void 0&&(re.width=re.right-re.left),re.height===void 0&&(re.height=re.bottom-re.top),re}var Ee=function(re){G(X,re);function X(fe){var V;return D(this,X),V=ie(this,oe(X).call(this,fe)),ae(te(V),"getContainer",function(){return V.props.containment||window}),ae(te(V),"addEventListener",function(De,ye,xe,Ie){V.debounceCheck||(V.debounceCheck={});var be,lt,pe=function(){be=null,V.check()};Ie>-1?lt=function(){be||(be=setTimeout(pe,Ie||0))}:lt=function(){clearTimeout(be),be=setTimeout(pe,xe||0)};var Me={target:De,fn:lt,getLastTimeout:function(){return be}};De.addEventListener(ye,Me.fn),V.debounceCheck[ye]=Me}),ae(te(V),"startWatching",function(){V.debounceCheck||V.interval||(V.props.intervalCheck&&(V.interval=setInterval(V.check,V.props.intervalDelay)),V.props.scrollCheck&&V.addEventListener(V.getContainer(),"scroll",V.props.scrollDelay,V.props.scrollThrottle),V.props.resizeCheck&&V.addEventListener(window,"resize",V.props.resizeDelay,V.props.resizeThrottle),!V.props.delayedCall&&V.check())}),ae(te(V),"stopWatching",function(){if(V.debounceCheck){for(var De in V.debounceCheck)if(V.debounceCheck.hasOwnProperty(De)){var ye=V.debounceCheck[De];clearTimeout(ye.getLastTimeout()),ye.target.removeEventListener(De,ye.fn),V.debounceCheck[De]=null}}V.debounceCheck=null,V.interval&&(V.interval=clearInterval(V.interval))}),ae(te(V),"check",function(){var De=V.node,ye,xe;if(!De)return V.state;if(ye=Q(V.roundRectDown(De.getBoundingClientRect())),V.props.containment){var Ie=V.props.containment.getBoundingClientRect();xe={top:Ie.top,left:Ie.left,bottom:Ie.bottom,right:Ie.right}}else xe={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var be=V.props.offset||{},lt=P(be)==="object";lt&&(xe.top+=be.top||0,xe.left+=be.left||0,xe.bottom-=be.bottom||0,xe.right-=be.right||0);var pe={top:ye.top>=xe.top,left:ye.left>=xe.left,bottom:ye.bottom<=xe.bottom,right:ye.right<=xe.right},Me=ye.height>0&&ye.width>0,it=Me&&pe.top&&pe.left&&pe.bottom&&pe.right;if(Me&&V.props.partialVisibility){var _t=ye.top<=xe.bottom&&ye.bottom>=xe.top&&ye.left<=xe.right&&ye.right>=xe.left;typeof V.props.partialVisibility=="string"&&(_t=pe[V.props.partialVisibility]),it=V.props.minTopValue?_t&&ye.top<=xe.bottom-V.props.minTopValue:_t}typeof be.direction=="string"&&typeof be.value=="number"&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",be.direction,be.value),it=E()(be,ye,xe));var Fe=V.state;return V.state.isVisible!==it&&(Fe={isVisible:it,visibilityRect:pe},V.setState(Fe),V.props.onChange&&V.props.onChange(it)),Fe}),V.state={isVisible:null,visibilityRect:{}},V}return J(X,[{key:"componentDidMount",value:function(){this.node=p.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(V){this.node=p.a.findDOMNode(this),this.props.active&&!V.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(V){return{top:Math.floor(V.top),left:Math.floor(V.left),bottom:Math.floor(V.bottom),right:Math.floor(V.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):c.a.Children.only(this.props.children)}}]),X}(c.a.Component);ae(Ee,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:c.a.createElement("span",null)}),ae(Ee,"propTypes",{onChange:S.a.func,active:S.a.bool,partialVisibility:S.a.oneOfType([S.a.bool,S.a.oneOf(["top","right","bottom","left"])]),delayedCall:S.a.bool,offset:S.a.oneOfType([S.a.shape({top:S.a.number,left:S.a.number,bottom:S.a.number,right:S.a.number}),S.a.shape({direction:S.a.oneOf(["top","right","bottom","left"]),value:S.a.number})]),scrollCheck:S.a.bool,scrollDelay:S.a.number,scrollThrottle:S.a.number,resizeCheck:S.a.bool,resizeDelay:S.a.number,resizeThrottle:S.a.number,intervalCheck:S.a.bool,intervalDelay:S.a.number,containment:typeof window<"u"?S.a.instanceOf(window.Element):S.a.any,children:S.a.oneOfType([S.a.element,S.a.func]),minTopValue:S.a.number})},function(i,o,s){var a=s(6);function c(){}function f(){}f.resetWarningCache=c,i.exports=function(){function p(C,E,P,D,_,J){if(J!==a){var ie=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ie.name="Invariant Violation",ie}}p.isRequired=p;function m(){return p}var S={array:p,bool:p,func:p,number:p,object:p,string:p,symbol:p,any:p,arrayOf:m,element:p,elementType:p,instanceOf:m,node:p,objectOf:m,oneOf:m,oneOfType:m,shape:m,exact:m,checkPropTypes:f,resetWarningCache:c};return S.PropTypes=S,S}},function(i,o,s){var a="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";i.exports=a}])})})(k1);var WD=k1.exports;const HD=kx(WD),_f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",VD=n=>{n=n.replace(/\r\n/g,`
14
- `);let e=0,t="";for(;e<n.length;e++){const r=n.charCodeAt(e);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t},GD=n=>{let e,t,r,i,o,s,a,c=0,f="";for(n=VD(n);c<n.length;)e=n.charCodeAt(c++),t=n.charCodeAt(c++),r=n.charCodeAt(c++),i=e>>2,o=(3&e)<<4|t>>4,s=(15&t)<<2|r>>6,a=63&r,isNaN(t)?s=a=64:isNaN(r)&&(a=64),f=f+_f.charAt(i)+_f.charAt(o)+_f.charAt(s)+_f.charAt(a);return f},JD=n=>typeof n=="string"?"string":typeof SVGElement<"u"&&n instanceof SVGElement?"element":void 0,C1=n=>"data:image/svg+xml;base64,"+GD(n),YD=n=>C1(new XMLSerializer().serializeToString(n)),KD=n=>{switch(JD(n)){case"string":return C1(n);case"element":return YD(n);default:return n}};var E1=typeof global=="object"&&global&&global.Object===Object&&global,XD=typeof self=="object"&&self&&self.Object===Object&&self,qr=E1||XD||Function("return this")(),Kr=qr.Symbol,T1=Object.prototype,ZD=T1.hasOwnProperty,QD=T1.toString,Jc=Kr?Kr.toStringTag:void 0;function qD(n){var e=ZD.call(n,Jc),t=n[Jc];try{n[Jc]=void 0;var r=!0}catch{}var i=QD.call(n);return r&&(e?n[Jc]=t:delete n[Jc]),i}var eP=Object.prototype,tP=eP.toString;function nP(n){return tP.call(n)}var rP="[object Null]",iP="[object Undefined]",N0=Kr?Kr.toStringTag:void 0;function qo(n){return n==null?n===void 0?iP:rP:N0&&N0 in Object(n)?qD(n):nP(n)}function Bi(n){return n!=null&&typeof n=="object"}var oP="[object Symbol]";function Ph(n){return typeof n=="symbol"||Bi(n)&&qo(n)==oP}function R1(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var Xr=Array.isArray,sP=1/0,F0=Kr?Kr.prototype:void 0,L0=F0?F0.toString:void 0;function zd(n){if(typeof n=="string")return n;if(Xr(n))return R1(n,zd)+"";if(Ph(n))return L0?L0.call(n):"";var e=n+"";return e=="0"&&1/n==-sP?"-0":e}var lP=/\s/;function aP(n){for(var e=n.length;e--&&lP.test(n.charAt(e)););return e}var cP=/^\s+/;function uP(n){return n&&n.slice(0,aP(n)+1).replace(cP,"")}function Jo(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var B0=NaN,fP=/^[-+]0x[0-9a-f]+$/i,dP=/^0b[01]+$/i,hP=/^0o[0-7]+$/i,pP=parseInt;function Ea(n){if(typeof n=="number")return n;if(Ph(n))return B0;if(Jo(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Jo(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=uP(n);var t=dP.test(n);return t||hP.test(n)?pP(n.slice(2),t?2:8):fP.test(n)?B0:+n}var $0=1/0,gP=17976931348623157e292;function mP(n){if(!n)return n===0?n:0;if(n=Ea(n),n===$0||n===-$0){var e=n<0?-1:1;return e*gP}return n===n?n:0}function yP(n){var e=mP(n),t=e%1;return e===e?t?e-t:e:0}function zy(n){return n}var vP="[object AsyncFunction]",bP="[object Function]",SP="[object GeneratorFunction]",wP="[object Proxy]";function A1(n){if(!Jo(n))return!1;var e=qo(n);return e==bP||e==SP||e==vP||e==wP}var xg=qr["__core-js_shared__"],z0=function(){var n=/[^.]+$/.exec(xg&&xg.keys&&xg.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function xP(n){return!!z0&&z0 in n}var kP=Function.prototype,CP=kP.toString;function ll(n){if(n!=null){try{return CP.call(n)}catch{}try{return n+""}catch{}}return""}var EP=/[\\^$.*+?()[\]{}|]/g,TP=/^\[object .+?Constructor\]$/,RP=Function.prototype,AP=Object.prototype,OP=RP.toString,IP=AP.hasOwnProperty,MP=RegExp("^"+OP.call(IP).replace(EP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DP(n){if(!Jo(n)||xP(n))return!1;var e=A1(n)?MP:TP;return e.test(ll(n))}function PP(n,e){return n==null?void 0:n[e]}function al(n,e){var t=PP(n,e);return DP(t)?t:void 0}var Tm=al(qr,"WeakMap");function _P(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}var NP=800,FP=16,LP=Date.now;function BP(n){var e=0,t=0;return function(){var r=LP(),i=FP-(r-t);if(t=r,i>0){if(++e>=NP)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function $P(n){return function(){return n}}var j0=function(){try{var n=al(Object,"defineProperty");return n({},"",{}),n}catch{}}(),zP=j0?function(n,e){return j0(n,"toString",{configurable:!0,enumerable:!1,value:$P(e),writable:!0})}:zy,jP=BP(zP);function UP(n,e,t,r){for(var i=n.length,o=t+-1;++o<i;)if(e(n[o],o,n))return o;return-1}function WP(n){return n!==n}function HP(n,e,t){for(var r=t-1,i=n.length;++r<i;)if(n[r]===e)return r;return-1}function VP(n,e,t){return e===e?HP(n,e,t):UP(n,WP,t)}function GP(n,e){var t=n==null?0:n.length;return!!t&&VP(n,e,0)>-1}var JP=9007199254740991,YP=/^(?:0|[1-9]\d*)$/;function O1(n,e){var t=typeof n;return e=e??JP,!!e&&(t=="number"||t!="symbol"&&YP.test(n))&&n>-1&&n%1==0&&n<e}function I1(n,e){return n===e||n!==n&&e!==e}var U0=Math.max;function KP(n,e,t){return e=U0(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=U0(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(s),_P(n,this,a)}}function XP(n,e){return jP(KP(n,e,zy),n+"")}var ZP=9007199254740991;function jy(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ZP}function M1(n){return n!=null&&jy(n.length)&&!A1(n)}var QP=Object.prototype;function qP(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||QP;return n===t}function e_(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var t_="[object Arguments]";function W0(n){return Bi(n)&&qo(n)==t_}var D1=Object.prototype,n_=D1.hasOwnProperty,r_=D1.propertyIsEnumerable,Uy=W0(function(){return arguments}())?W0:function(n){return Bi(n)&&n_.call(n,"callee")&&!r_.call(n,"callee")};function i_(){return!1}var P1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,H0=P1&&typeof module=="object"&&module&&!module.nodeType&&module,o_=H0&&H0.exports===P1,V0=o_?qr.Buffer:void 0,s_=V0?V0.isBuffer:void 0,Rm=s_||i_,l_="[object Arguments]",a_="[object Array]",c_="[object Boolean]",u_="[object Date]",f_="[object Error]",d_="[object Function]",h_="[object Map]",p_="[object Number]",g_="[object Object]",m_="[object RegExp]",y_="[object Set]",v_="[object String]",b_="[object WeakMap]",S_="[object ArrayBuffer]",w_="[object DataView]",x_="[object Float32Array]",k_="[object Float64Array]",C_="[object Int8Array]",E_="[object Int16Array]",T_="[object Int32Array]",R_="[object Uint8Array]",A_="[object Uint8ClampedArray]",O_="[object Uint16Array]",I_="[object Uint32Array]",We={};We[x_]=We[k_]=We[C_]=We[E_]=We[T_]=We[R_]=We[A_]=We[O_]=We[I_]=!0;We[l_]=We[a_]=We[S_]=We[c_]=We[w_]=We[u_]=We[f_]=We[d_]=We[h_]=We[p_]=We[g_]=We[m_]=We[y_]=We[v_]=We[b_]=!1;function M_(n){return Bi(n)&&jy(n.length)&&!!We[qo(n)]}function Wy(n){return function(e){return n(e)}}var _1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,iu=_1&&typeof module=="object"&&module&&!module.nodeType&&module,D_=iu&&iu.exports===_1,kg=D_&&E1.process,jd=function(){try{var n=iu&&iu.require&&iu.require("util").types;return n||kg&&kg.binding&&kg.binding("util")}catch{}}(),G0=jd&&jd.isTypedArray,N1=G0?Wy(G0):M_,P_=Object.prototype,__=P_.hasOwnProperty;function N_(n,e){var t=Xr(n),r=!t&&Uy(n),i=!t&&!r&&Rm(n),o=!t&&!r&&!i&&N1(n),s=t||r||i||o,a=s?e_(n.length,String):[],c=a.length;for(var f in n)__.call(n,f)&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||O1(f,c)))&&a.push(f);return a}function F_(n,e){return function(t){return n(e(t))}}var L_=F_(Object.keys,Object),B_=Object.prototype,$_=B_.hasOwnProperty;function z_(n){if(!qP(n))return L_(n);var e=[];for(var t in Object(n))$_.call(n,t)&&t!="constructor"&&e.push(t);return e}function F1(n){return M1(n)?N_(n):z_(n)}var j_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,U_=/^\w*$/;function Hy(n,e){if(Xr(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||Ph(n)?!0:U_.test(n)||!j_.test(n)||e!=null&&n in Object(e)}var Su=al(Object,"create");function W_(){this.__data__=Su?Su(null):{},this.size=0}function H_(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var V_="__lodash_hash_undefined__",G_=Object.prototype,J_=G_.hasOwnProperty;function Y_(n){var e=this.__data__;if(Su){var t=e[n];return t===V_?void 0:t}return J_.call(e,n)?e[n]:void 0}var K_=Object.prototype,X_=K_.hasOwnProperty;function Z_(n){var e=this.__data__;return Su?e[n]!==void 0:X_.call(e,n)}var Q_="__lodash_hash_undefined__";function q_(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Su&&e===void 0?Q_:e,this}function qs(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}qs.prototype.clear=W_;qs.prototype.delete=H_;qs.prototype.get=Y_;qs.prototype.has=Z_;qs.prototype.set=q_;function eN(){this.__data__=[],this.size=0}function _h(n,e){for(var t=n.length;t--;)if(I1(n[t][0],e))return t;return-1}var tN=Array.prototype,nN=tN.splice;function rN(n){var e=this.__data__,t=_h(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():nN.call(e,t,1),--this.size,!0}function iN(n){var e=this.__data__,t=_h(e,n);return t<0?void 0:e[t][1]}function oN(n){return _h(this.__data__,n)>-1}function sN(n,e){var t=this.__data__,r=_h(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function Ui(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Ui.prototype.clear=eN;Ui.prototype.delete=rN;Ui.prototype.get=iN;Ui.prototype.has=oN;Ui.prototype.set=sN;var wu=al(qr,"Map");function lN(){this.size=0,this.__data__={hash:new qs,map:new(wu||Ui),string:new qs}}function aN(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Nh(n,e){var t=n.__data__;return aN(e)?t[typeof e=="string"?"string":"hash"]:t.map}function cN(n){var e=Nh(this,n).delete(n);return this.size-=e?1:0,e}function uN(n){return Nh(this,n).get(n)}function fN(n){return Nh(this,n).has(n)}function dN(n,e){var t=Nh(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Wi(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Wi.prototype.clear=lN;Wi.prototype.delete=cN;Wi.prototype.get=uN;Wi.prototype.has=fN;Wi.prototype.set=dN;var hN="Expected a function";function Vy(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(hN);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var s=n.apply(this,r);return t.cache=o.set(i,s)||o,s};return t.cache=new(Vy.Cache||Wi),t}Vy.Cache=Wi;var pN=500;function gN(n){var e=Vy(n,function(r){return t.size===pN&&t.clear(),r}),t=e.cache;return e}var mN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yN=/\\(\\)?/g,vN=gN(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(mN,function(t,r,i,o){e.push(i?o.replace(yN,"$1"):r||t)}),e});function Am(n){return n==null?"":zd(n)}function L1(n,e){return Xr(n)?n:Hy(n,e)?[n]:vN(Am(n))}var bN=1/0;function Fh(n){if(typeof n=="string"||Ph(n))return n;var e=n+"";return e=="0"&&1/n==-bN?"-0":e}function B1(n,e){e=L1(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[Fh(e[t++])];return t&&t==r?n:void 0}function SN(n,e,t){var r=n==null?void 0:B1(n,e);return r===void 0?t:r}function $1(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var J0=Kr?Kr.isConcatSpreadable:void 0;function wN(n){return Xr(n)||Uy(n)||!!(J0&&n&&n[J0])}function xN(n,e,t,r,i){var o=-1,s=n.length;for(t||(t=wN),i||(i=[]);++o<s;){var a=n[o];t(a)&&$1(i,a)}return i}function kN(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=n[r+e];return o}function CN(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:kN(n,e,t)}var EN="\\ud800-\\udfff",TN="\\u0300-\\u036f",RN="\\ufe20-\\ufe2f",AN="\\u20d0-\\u20ff",ON=TN+RN+AN,IN="\\ufe0e\\ufe0f",MN="\\u200d",DN=RegExp("["+MN+EN+ON+IN+"]");function Gy(n){return DN.test(n)}function PN(n){return n.split("")}var z1="\\ud800-\\udfff",_N="\\u0300-\\u036f",NN="\\ufe20-\\ufe2f",FN="\\u20d0-\\u20ff",LN=_N+NN+FN,BN="\\ufe0e\\ufe0f",$N="["+z1+"]",Om="["+LN+"]",Im="\\ud83c[\\udffb-\\udfff]",zN="(?:"+Om+"|"+Im+")",j1="[^"+z1+"]",U1="(?:\\ud83c[\\udde6-\\uddff]){2}",W1="[\\ud800-\\udbff][\\udc00-\\udfff]",jN="\\u200d",H1=zN+"?",V1="["+BN+"]?",UN="(?:"+jN+"(?:"+[j1,U1,W1].join("|")+")"+V1+H1+")*",WN=V1+H1+UN,HN="(?:"+[j1+Om+"?",Om,U1,W1,$N].join("|")+")",VN=RegExp(Im+"(?="+Im+")|"+HN+WN,"g");function GN(n){return n.match(VN)||[]}function JN(n){return Gy(n)?GN(n):PN(n)}function YN(n,e,t){return n===n&&(t!==void 0&&(n=n<=t?n:t),e!==void 0&&(n=n>=e?n:e)),n}function KN(n,e,t){return t===void 0&&(t=e,e=void 0),t!==void 0&&(t=Ea(t),t=t===t?t:0),e!==void 0&&(e=Ea(e),e=e===e?e:0),YN(Ea(n),e,t)}function XN(){this.__data__=new Ui,this.size=0}function ZN(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function QN(n){return this.__data__.get(n)}function qN(n){return this.__data__.has(n)}var eF=200;function tF(n,e){var t=this.__data__;if(t instanceof Ui){var r=t.__data__;if(!wu||r.length<eF-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Wi(r)}return t.set(n,e),this.size=t.size,this}function Li(n){var e=this.__data__=new Ui(n);this.size=e.size}Li.prototype.clear=XN;Li.prototype.delete=ZN;Li.prototype.get=QN;Li.prototype.has=qN;Li.prototype.set=tF;function nF(n,e){for(var t=-1,r=n==null?0:n.length,i=0,o=[];++t<r;){var s=n[t];e(s,t,n)&&(o[i++]=s)}return o}function rF(){return[]}var iF=Object.prototype,oF=iF.propertyIsEnumerable,Y0=Object.getOwnPropertySymbols,sF=Y0?function(n){return n==null?[]:(n=Object(n),nF(Y0(n),function(e){return oF.call(n,e)}))}:rF;function lF(n,e,t){var r=e(n);return Xr(n)?r:$1(r,t(n))}function K0(n){return lF(n,F1,sF)}var Mm=al(qr,"DataView"),Dm=al(qr,"Promise"),Pm=al(qr,"Set"),X0="[object Map]",aF="[object Object]",Z0="[object Promise]",Q0="[object Set]",q0="[object WeakMap]",eS="[object DataView]",cF=ll(Mm),uF=ll(wu),fF=ll(Dm),dF=ll(Pm),hF=ll(Tm),Mo=qo;(Mm&&Mo(new Mm(new ArrayBuffer(1)))!=eS||wu&&Mo(new wu)!=X0||Dm&&Mo(Dm.resolve())!=Z0||Pm&&Mo(new Pm)!=Q0||Tm&&Mo(new Tm)!=q0)&&(Mo=function(n){var e=qo(n),t=e==aF?n.constructor:void 0,r=t?ll(t):"";if(r)switch(r){case cF:return eS;case uF:return X0;case fF:return Z0;case dF:return Q0;case hF:return q0}return e});var tS=qr.Uint8Array,pF="__lodash_hash_undefined__";function gF(n){return this.__data__.set(n,pF),this}function mF(n){return this.__data__.has(n)}function xu(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Wi;++e<t;)this.add(n[e])}xu.prototype.add=xu.prototype.push=gF;xu.prototype.has=mF;function yF(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function G1(n,e){return n.has(e)}var vF=1,bF=2;function J1(n,e,t,r,i,o){var s=t&vF,a=n.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var f=o.get(n),p=o.get(e);if(f&&p)return f==e&&p==n;var m=-1,S=!0,C=t&bF?new xu:void 0;for(o.set(n,e),o.set(e,n);++m<a;){var E=n[m],P=e[m];if(r)var D=s?r(P,E,m,e,n,o):r(E,P,m,n,e,o);if(D!==void 0){if(D)continue;S=!1;break}if(C){if(!yF(e,function(_,J){if(!G1(C,J)&&(E===_||i(E,_,t,r,o)))return C.push(J)})){S=!1;break}}else if(!(E===P||i(E,P,t,r,o))){S=!1;break}}return o.delete(n),o.delete(e),S}function SF(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function wF(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var xF=1,kF=2,CF="[object Boolean]",EF="[object Date]",TF="[object Error]",RF="[object Map]",AF="[object Number]",OF="[object RegExp]",IF="[object Set]",MF="[object String]",DF="[object Symbol]",PF="[object ArrayBuffer]",_F="[object DataView]",nS=Kr?Kr.prototype:void 0,Cg=nS?nS.valueOf:void 0;function NF(n,e,t,r,i,o,s){switch(t){case _F:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case PF:return!(n.byteLength!=e.byteLength||!o(new tS(n),new tS(e)));case CF:case EF:case AF:return I1(+n,+e);case TF:return n.name==e.name&&n.message==e.message;case OF:case MF:return n==e+"";case RF:var a=SF;case IF:var c=r&xF;if(a||(a=wF),n.size!=e.size&&!c)return!1;var f=s.get(n);if(f)return f==e;r|=kF,s.set(n,e);var p=J1(a(n),a(e),r,i,o,s);return s.delete(n),p;case DF:if(Cg)return Cg.call(n)==Cg.call(e)}return!1}var FF=1,LF=Object.prototype,BF=LF.hasOwnProperty;function $F(n,e,t,r,i,o){var s=t&FF,a=K0(n),c=a.length,f=K0(e),p=f.length;if(c!=p&&!s)return!1;for(var m=c;m--;){var S=a[m];if(!(s?S in e:BF.call(e,S)))return!1}var C=o.get(n),E=o.get(e);if(C&&E)return C==e&&E==n;var P=!0;o.set(n,e),o.set(e,n);for(var D=s;++m<c;){S=a[m];var _=n[S],J=e[S];if(r)var ie=s?r(J,_,S,e,n,o):r(_,J,S,n,e,o);if(!(ie===void 0?_===J||i(_,J,t,r,o):ie)){P=!1;break}D||(D=S=="constructor")}if(P&&!D){var oe=n.constructor,te=e.constructor;oe!=te&&"constructor"in n&&"constructor"in e&&!(typeof oe=="function"&&oe instanceof oe&&typeof te=="function"&&te instanceof te)&&(P=!1)}return o.delete(n),o.delete(e),P}var zF=1,rS="[object Arguments]",iS="[object Array]",Nf="[object Object]",jF=Object.prototype,oS=jF.hasOwnProperty;function UF(n,e,t,r,i,o){var s=Xr(n),a=Xr(e),c=s?iS:Mo(n),f=a?iS:Mo(e);c=c==rS?Nf:c,f=f==rS?Nf:f;var p=c==Nf,m=f==Nf,S=c==f;if(S&&Rm(n)){if(!Rm(e))return!1;s=!0,p=!1}if(S&&!p)return o||(o=new Li),s||N1(n)?J1(n,e,t,r,i,o):NF(n,e,c,t,r,i,o);if(!(t&zF)){var C=p&&oS.call(n,"__wrapped__"),E=m&&oS.call(e,"__wrapped__");if(C||E){var P=C?n.value():n,D=E?e.value():e;return o||(o=new Li),i(P,D,t,r,o)}}return S?(o||(o=new Li),$F(n,e,t,r,i,o)):!1}function Jy(n,e,t,r,i){return n===e?!0:n==null||e==null||!Bi(n)&&!Bi(e)?n!==n&&e!==e:UF(n,e,t,r,Jy,i)}var WF=1,HF=2;function VF(n,e,t,r){var i=t.length,o=i;if(n==null)return!o;for(n=Object(n);i--;){var s=t[i];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<o;){s=t[i];var a=s[0],c=n[a],f=s[1];if(s[2]){if(c===void 0&&!(a in n))return!1}else{var p=new Li,m;if(!(m===void 0?Jy(f,c,WF|HF,r,p):m))return!1}}return!0}function Y1(n){return n===n&&!Jo(n)}function GF(n){for(var e=F1(n),t=e.length;t--;){var r=e[t],i=n[r];e[t]=[r,i,Y1(i)]}return e}function K1(n,e){return function(t){return t==null?!1:t[n]===e&&(e!==void 0||n in Object(t))}}function JF(n){var e=GF(n);return e.length==1&&e[0][2]?K1(e[0][0],e[0][1]):function(t){return t===n||VF(t,n,e)}}function YF(n,e){return n!=null&&e in Object(n)}function KF(n,e,t){e=L1(e,n);for(var r=-1,i=e.length,o=!1;++r<i;){var s=Fh(e[r]);if(!(o=n!=null&&t(n,s)))break;n=n[s]}return o||++r!=i?o:(i=n==null?0:n.length,!!i&&jy(i)&&O1(s,i)&&(Xr(n)||Uy(n)))}function XF(n,e){return n!=null&&KF(n,e,YF)}var ZF=1,QF=2;function qF(n,e){return Hy(n)&&Y1(e)?K1(Fh(n),e):function(t){var r=SN(t,n);return r===void 0&&r===e?XF(t,n):Jy(e,r,ZF|QF)}}function X1(n){return function(e){return e==null?void 0:e[n]}}function e2(n){return function(e){return B1(e,n)}}function t2(n){return Hy(n)?X1(Fh(n)):e2(n)}function n2(n){return typeof n=="function"?n:n==null?zy:typeof n=="object"?Xr(n)?qF(n[0],n[1]):JF(n):t2(n)}var Eg=function(){return qr.Date.now()},r2="Expected a function",i2=Math.max,o2=Math.min;function Z1(n,e,t){var r,i,o,s,a,c,f=0,p=!1,m=!1,S=!0;if(typeof n!="function")throw new TypeError(r2);e=Ea(e)||0,Jo(t)&&(p=!!t.leading,m="maxWait"in t,o=m?i2(Ea(t.maxWait)||0,e):o,S="trailing"in t?!!t.trailing:S);function C(G){var ne=r,ae=i;return r=i=void 0,f=G,s=n.apply(ae,ne),s}function E(G){return f=G,a=setTimeout(_,e),p?C(G):s}function P(G){var ne=G-c,ae=G-f,Q=e-ne;return m?o2(Q,o-ae):Q}function D(G){var ne=G-c,ae=G-f;return c===void 0||ne>=e||ne<0||m&&ae>=o}function _(){var G=Eg();if(D(G))return J(G);a=setTimeout(_,P(G))}function J(G){return a=void 0,S&&r?C(G):(r=i=void 0,s)}function ie(){a!==void 0&&clearTimeout(a),f=0,r=c=i=a=void 0}function oe(){return a===void 0?s:J(Eg())}function te(){var G=Eg(),ne=D(G);if(r=arguments,i=this,c=G,ne){if(a===void 0)return E(c);if(m)return clearTimeout(a),a=setTimeout(_,e),C(c)}return a===void 0&&(a=setTimeout(_,e)),s}return te.cancel=ie,te.flush=oe,te}function Tg(n){return Bi(n)&&M1(n)}var s2=200;function l2(n,e,t,r){var i=-1,o=GP,s=!0,a=n.length,c=[],f=e.length;if(!a)return c;t&&(e=R1(e,Wy(t))),e.length>=s2&&(o=G1,s=!1,e=new xu(e));e:for(;++i<a;){var p=n[i],m=t==null?p:t(p);if(p=p!==0?p:0,s&&m===m){for(var S=f;S--;)if(e[S]===m)continue e;c.push(p)}else o(e,m,r)||c.push(p)}return c}function a2(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}var c2=XP(function(n,e){var t=a2(e);return Tg(t)&&(t=void 0),Tg(n)?l2(n,xN(e,1,Tg),n2(t)):[]}),u2="[object Number]";function f2(n){return typeof n=="number"||Bi(n)&&qo(n)==u2}var d2="[object RegExp]";function h2(n){return Bi(n)&&qo(n)==d2}var sS=jd&&jd.isRegExp,p2=sS?Wy(sS):h2,g2=X1("length"),Q1="\\ud800-\\udfff",m2="\\u0300-\\u036f",y2="\\ufe20-\\ufe2f",v2="\\u20d0-\\u20ff",b2=m2+y2+v2,S2="\\ufe0e\\ufe0f",w2="["+Q1+"]",_m="["+b2+"]",Nm="\\ud83c[\\udffb-\\udfff]",x2="(?:"+_m+"|"+Nm+")",q1="[^"+Q1+"]",ek="(?:\\ud83c[\\udde6-\\uddff]){2}",tk="[\\ud800-\\udbff][\\udc00-\\udfff]",k2="\\u200d",nk=x2+"?",rk="["+S2+"]?",C2="(?:"+k2+"(?:"+[q1,ek,tk].join("|")+")"+rk+nk+")*",E2=rk+nk+C2,T2="(?:"+[q1+_m+"?",_m,ek,tk,w2].join("|")+")",lS=RegExp(Nm+"(?="+Nm+")|"+T2+E2,"g");function R2(n){for(var e=lS.lastIndex=0;lS.test(n);)++e;return e}function A2(n){return Gy(n)?R2(n):g2(n)}var O2="Expected a function";function I2(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(O2);return Jo(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),Z1(n,e,{leading:r,maxWait:e,trailing:i})}var M2=30,D2="...",P2=/\w*$/;function _2(n,e){var t=M2,r=D2;if(Jo(e)){var i="separator"in e?e.separator:i;t="length"in e?yP(e.length):t,r="omission"in e?zd(e.omission):r}n=Am(n);var o=n.length;if(Gy(n)){var s=JN(n);o=s.length}if(t>=o)return n;var a=t-A2(r);if(a<1)return r;var c=s?CN(s,0,a).join(""):n.slice(0,a);if(i===void 0)return c+r;if(s&&(a+=c.length-a),p2(i)){if(n.slice(a).search(i)){var f,p=c;for(i.global||(i=RegExp(i.source,Am(P2.exec(i))+"g")),i.lastIndex=0;f=i.exec(p);)var m=f.index;c=c.slice(0,m===void 0?a:m)}}else if(n.indexOf(zd(i),a)!=a){var S=c.lastIndexOf(i);S>-1&&(c=c.slice(0,S))}return c+r}const Vr=()=>new Map,Fm=n=>{const e=Vr();return n.forEach((t,r)=>{e.set(r,t)}),e},Va=(n,e,t)=>{let r=n.get(e);return r===void 0&&n.set(e,r=t()),r},N2=(n,e)=>{const t=[];for(const[r,i]of n)t.push(e(i,r));return t},F2=(n,e)=>{for(const[t,r]of n)if(e(r,t))return!0;return!1},_a=()=>new Set,Rg=n=>n[n.length-1],Na=Array.from,L2=Array.isArray;class B2{constructor(){this._observers=Vr()}on(e,t){return Va(this._observers,e,_a).add(t),t}once(e,t){const r=(...i)=>{this.off(e,r),t(...i)};this.on(e,r)}off(e,t){const r=this._observers.get(e);r!==void 0&&(r.delete(t),r.size===0&&this._observers.delete(e))}emit(e,t){return Na((this._observers.get(e)||Vr()).values()).forEach(r=>r(...t))}destroy(){this._observers=Vr()}}const el=Math.floor,ld=Math.abs,ik=(n,e)=>n<e?n:e,Ga=(n,e)=>n>e?n:e,$2=n=>n!==0?n<0:1/n<0,aS=1,cS=2,Ag=4,Og=8,z2=32,ok=64,Ud=128,j2=31,uS=63,ou=127,U2=2147483647,W2=Number.isInteger||(n=>typeof n=="number"&&isFinite(n)&&el(n)===n),H2=n=>n.toLowerCase(),V2=/^\s*/g,G2=n=>n.replace(V2,""),J2=/([A-Z])/g,fS=(n,e)=>G2(n.replace(J2,t=>`${e}${H2(t)}`)),Y2=n=>{const e=unescape(encodeURIComponent(n)),t=e.length,r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e.codePointAt(i);return r},ku=typeof TextEncoder<"u"?new TextEncoder:null,K2=n=>ku.encode(n),X2=ku?K2:Y2;let Ig=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});Ig&&Ig.decode(new Uint8Array).length===1&&(Ig=null);class $u{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Yy=()=>new $u,Z2=n=>{let e=n.cpos;for(let t=0;t<n.bufs.length;t++)e+=n.bufs[t].length;return e},Ni=n=>{const e=new Uint8Array(Z2(n));let t=0;for(let r=0;r<n.bufs.length;r++){const i=n.bufs[r];e.set(i,t),t+=i.length}return e.set(new Uint8Array(n.cbuf.buffer,0,n.cpos),t),e},Q2=(n,e)=>{const t=n.cbuf.length;t-n.cpos<e&&(n.bufs.push(new Uint8Array(n.cbuf.buffer,0,n.cpos)),n.cbuf=new Uint8Array(Ga(t,e)*2),n.cpos=0)},vt=(n,e)=>{const t=n.cbuf.length;n.cpos===t&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(t*2),n.cpos=0),n.cbuf[n.cpos++]=e},Lm=vt,$e=(n,e)=>{for(;e>ou;)vt(n,Ud|ou&e),e=el(e/128);vt(n,ou&e)},Ky=(n,e)=>{const t=$2(e);for(t&&(e=-e),vt(n,(e>uS?Ud:0)|(t?ok:0)|uS&e),e=el(e/64);e>0;)vt(n,(e>ou?Ud:0)|ou&e),e=el(e/128)},Bm=new Uint8Array(3e4),q2=Bm.length/3,eL=(n,e)=>{if(e.length<q2){const t=ku.encodeInto(e,Bm).written||0;$e(n,t);for(let r=0;r<t;r++)vt(n,Bm[r])}else Tn(n,X2(e))},tL=(n,e)=>{const t=unescape(encodeURIComponent(e)),r=t.length;$e(n,r);for(let i=0;i<r;i++)vt(n,t.codePointAt(i))},Ta=ku&&ku.encodeInto?eL:tL,Xy=(n,e)=>{const t=n.cbuf.length,r=n.cpos,i=ik(t-r,e.length),o=e.length-i;n.cbuf.set(e.subarray(0,i),r),n.cpos+=i,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(Ga(t*2,o)),n.cbuf.set(e.subarray(i)),n.cpos=o)},Tn=(n,e)=>{$e(n,e.byteLength),Xy(n,e)},Zy=(n,e)=>{Q2(n,e);const t=new DataView(n.cbuf.buffer,n.cpos,e);return n.cpos+=e,t},nL=(n,e)=>Zy(n,4).setFloat32(0,e,!1),rL=(n,e)=>Zy(n,8).setFloat64(0,e,!1),iL=(n,e)=>Zy(n,8).setBigInt64(0,e,!1),dS=new DataView(new ArrayBuffer(4)),oL=n=>(dS.setFloat32(0,n),dS.getFloat32(0)===n),Cu=(n,e)=>{switch(typeof e){case"string":vt(n,119),Ta(n,e);break;case"number":W2(e)&&ld(e)<=U2?(vt(n,125),Ky(n,e)):oL(e)?(vt(n,124),nL(n,e)):(vt(n,123),rL(n,e));break;case"bigint":vt(n,122),iL(n,e);break;case"object":if(e===null)vt(n,126);else if(L2(e)){vt(n,117),$e(n,e.length);for(let t=0;t<e.length;t++)Cu(n,e[t])}else if(e instanceof Uint8Array)vt(n,116),Tn(n,e);else{vt(n,118);const t=Object.keys(e);$e(n,t.length);for(let r=0;r<t.length;r++){const i=t[r];Ta(n,i),Cu(n,e[i])}}break;case"boolean":vt(n,e?120:121);break;default:vt(n,127)}};class hS extends $u{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&$e(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const pS=n=>{n.count>0&&(Ky(n.encoder,n.count===1?n.s:-n.s),n.count>1&&$e(n.encoder,n.count-2))};class ad{constructor(){this.encoder=new $u,this.s=0,this.count=0}write(e){this.s===e?this.count++:(pS(this),this.count=1,this.s=e)}toUint8Array(){return pS(this),Ni(this.encoder)}}const gS=n=>{if(n.count>0){const e=n.diff*2+(n.count===1?0:1);Ky(n.encoder,e),n.count>1&&$e(n.encoder,n.count-2)}};class Mg{constructor(){this.encoder=new $u,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(gS(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return gS(this),Ni(this.encoder)}}class sL{constructor(){this.sarr=[],this.s="",this.lensE=new ad}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){const e=new $u;return this.sarr.push(this.s),this.s="",Ta(e,this.sarr.join("")),Xy(e,this.lensE.toUint8Array()),Ni(e)}}const Fa=n=>new Error(n),Gr=()=>{throw Fa("Method unimplemented")},Yo=()=>{throw Fa("Unexpected case")},lL=crypto.getRandomValues.bind(crypto),sk=()=>lL(new Uint32Array(1))[0],aL="10000000-1000-4000-8000"+-1e11,cL=()=>aL.replace(/[018]/g,n=>(n^sk()&15>>n/4).toString(16)),mS=n=>new Promise(n);Promise.all.bind(Promise);const yS=n=>n===void 0?null:n;class uL{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}}let lk=new uL,fL=!0;try{typeof localStorage<"u"&&localStorage&&(lk=localStorage,fL=!1)}catch{}const dL=lk,hL=Object.assign,pL=Object.keys,gL=(n,e)=>{for(const t in n)e(n[t],t)},vS=n=>pL(n).length,mL=n=>{for(const e in n)return!1;return!0},yL=(n,e)=>{for(const t in n)if(!e(n[t],t))return!1;return!0},vL=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),bL=(n,e)=>n===e||vS(n)===vS(e)&&yL(n,(t,r)=>(t!==void 0||vL(e,r))&&e[r]===t),SL=Object.freeze,ak=n=>{for(const e in n){const t=n[e];(typeof t=="object"||typeof t=="function")&&ak(n[e])}return SL(n)},Qy=(n,e,t=0)=>{try{for(;t<n.length;t++)n[t](...e)}finally{t<n.length&&Qy(n,e,t+1)}},wL=(n,e)=>e.includes(n),Eu=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Br;const xL=()=>{if(Br===void 0)if(Eu){Br=Vr();const n=process.argv;let e=null;for(let t=0;t<n.length;t++){const r=n[t];r[0]==="-"?(e!==null&&Br.set(e,""),e=r):e!==null&&(Br.set(e,r),e=null)}e!==null&&Br.set(e,"")}else typeof location=="object"?(Br=Vr(),(location.search||"?").slice(1).split("&").forEach(n=>{if(n.length!==0){const[e,t]=n.split("=");Br.set(`--${fS(e,"-")}`,t),Br.set(`-${fS(e,"-")}`,t)}})):Br=Vr();return Br},$m=n=>xL().has(n),Wd=n=>yS(Eu?process.env[n.toUpperCase().replaceAll("-","_")]:dL.getItem(n)),ck=n=>$m("--"+n)||Wd(n)!==null;ck("production");const kL=Eu&&wL(process.env.FORCE_COLOR,["true","1","2"]),CL=kL||!$m("--no-colors")&&!ck("no-color")&&(!Eu||process.stdout.isTTY)&&(!Eu||$m("--color")||Wd("COLORTERM")!==null||(Wd("TERM")||"").includes("color"));class EL{constructor(e,t){this.left=e,this.right=t}}const Ii=(n,e)=>new EL(n,e);typeof DOMParser<"u"&&new DOMParser;const TL=n=>N2(n,(e,t)=>`${t}:${e};`).join(""),Hi=Symbol,uk=Hi(),fk=Hi(),RL=Hi(),AL=Hi(),OL=Hi(),dk=Hi(),IL=Hi(),qy=Hi(),ML=Hi(),DL=n=>{var i;n.length===1&&((i=n[0])==null?void 0:i.constructor)===Function&&(n=n[0]());const e=[],t=[];let r=0;for(;r<n.length;r++){const o=n[r];if(o===void 0)break;if(o.constructor===String||o.constructor===Number)e.push(o);else if(o.constructor===Object)break}for(r>0&&t.push(e.join(""));r<n.length;r++){const o=n[r];o instanceof Symbol||t.push(o)}return t},PL={[uk]:Ii("font-weight","bold"),[fk]:Ii("font-weight","normal"),[RL]:Ii("color","blue"),[OL]:Ii("color","green"),[AL]:Ii("color","grey"),[dk]:Ii("color","red"),[IL]:Ii("color","purple"),[qy]:Ii("color","orange"),[ML]:Ii("color","black")},_L=n=>{var s;n.length===1&&((s=n[0])==null?void 0:s.constructor)===Function&&(n=n[0]());const e=[],t=[],r=Vr();let i=[],o=0;for(;o<n.length;o++){const a=n[o],c=PL[a];if(c!==void 0)r.set(c.left,c.right);else{if(a===void 0)break;if(a.constructor===String||a.constructor===Number){const f=TL(r);o>0||f.length>0?(e.push("%c"+a),t.push(f)):e.push(a)}else break}}for(o>0&&(i=t,i.unshift(e.join("")));o<n.length;o++){const a=n[o];a instanceof Symbol||i.push(a)}return i},hk=CL?_L:DL,NL=(...n)=>{console.log(...hk(n)),pk.forEach(e=>e.print(n))},FL=(...n)=>{console.warn(...hk(n)),n.unshift(qy),pk.forEach(e=>e.print(n))},pk=_a(),gk=n=>({[Symbol.iterator](){return this},next:n}),LL=(n,e)=>gk(()=>{let t;do t=n.next();while(!t.done&&!e(t.value));return t}),Dg=(n,e)=>gk(()=>{const{done:t,value:r}=n.next();return{done:t,value:t?void 0:e(r)}});class BL{constructor(e,t){this.clock=e,this.len=t}}class $L{constructor(){this.clients=new Map}}const mk=(n,e,t)=>e.clients.forEach((r,i)=>{const o=n.doc.store.clients.get(i);for(let s=0;s<r.length;s++){const a=r[s];kk(n,o,a.clock,a.len,t)}}),zL=(n,e)=>{let t=0,r=n.length-1;for(;t<=r;){const i=el((t+r)/2),o=n[i],s=o.clock;if(s<=e){if(e<s+o.len)return i;t=i+1}else r=i-1}return null},yk=(n,e)=>{const t=n.clients.get(e.client);return t!==void 0&&zL(t,e.clock)!==null},vk=n=>{n.clients.forEach(e=>{e.sort((i,o)=>i.clock-o.clock);let t,r;for(t=1,r=1;t<e.length;t++){const i=e[r-1],o=e[t];i.clock+i.len>=o.clock?i.len=Ga(i.len,o.clock+o.len-i.clock):(r<t&&(e[r]=o),r++)}e.length=r})},bk=(n,e,t,r)=>{Va(n.clients,e,()=>[]).push(new BL(t,r))},jL=(n,e)=>{$e(n.restEncoder,e.clients.size),Na(e.clients.entries()).sort((t,r)=>r[0]-t[0]).forEach(([t,r])=>{n.resetDsCurVal(),$e(n.restEncoder,t);const i=r.length;$e(n.restEncoder,i);for(let o=0;o<i;o++){const s=r[o];n.writeDsClock(s.clock),n.writeDsLen(s.len)}})},Sk=sk;class zu extends B2{constructor({guid:e=cL(),collectionid:t=null,gc:r=!0,gcFilter:i=()=>!0,meta:o=null,autoLoad:s=!1,shouldLoad:a=!0}={}){super(),this.gc=r,this.gcFilter=i,this.clientID=Sk(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new XL,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=a,this.autoLoad=s,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=mS(f=>{this.on("load",()=>{this.isLoaded=!0,f(this)})});const c=()=>mS(f=>{const p=m=>{(m===void 0||m===!0)&&(this.off("sync",p),f())};this.on("sync",p)});this.on("sync",f=>{f===!1&&this.isSynced&&(this.whenSynced=c()),this.isSynced=f===void 0||f===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=c()}load(){const e=this._item;e!==null&&!this.shouldLoad&&He(e.parent.doc,t=>{t.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Na(this.subdocs).map(e=>e.guid))}transact(e,t=null){return He(this,e,t)}get(e,t=Pt){const r=Va(this.share,e,()=>{const o=new t;return o._integrate(this,null),o}),i=r.constructor;if(t!==Pt&&i!==t)if(i===Pt){const o=new t;o._map=r._map,r._map.forEach(s=>{for(;s!==null;s=s.left)s.parent=o}),o._start=r._start;for(let s=o._start;s!==null;s=s.right)s.parent=o;return o._length=r._length,this.share.set(e,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${e} has already been defined with a different constructor`);return r}getArray(e=""){return this.get(e,su)}getText(e=""){return this.get(e,Ou)}getMap(e=""){return this.get(e,Jd)}getXmlElement(e=""){return this.get(e,Iu)}getXmlFragment(e=""){return this.get(e,La)}toJSON(){const e={};return this.share.forEach((t,r)=>{e[r]=t.toJSON()}),e}destroy(){this.isDestroyed=!0,Na(this.subdocs).forEach(t=>t.destroy());const e=this._item;if(e!==null){this._item=null;const t=e.content;t.doc=new zu({guid:this.guid,...t.opts,shouldLoad:!1}),t.doc._item=e,He(e.parent.doc,r=>{const i=t.doc;e.deleted||r.subdocsAdded.add(i),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class UL{constructor(){this.restEncoder=Yy()}toUint8Array(){return Ni(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){$e(this.restEncoder,e)}writeDsLen(e){$e(this.restEncoder,e)}}class WL extends UL{writeLeftID(e){$e(this.restEncoder,e.client),$e(this.restEncoder,e.clock)}writeRightID(e){$e(this.restEncoder,e.client),$e(this.restEncoder,e.clock)}writeClient(e){$e(this.restEncoder,e)}writeInfo(e){Lm(this.restEncoder,e)}writeString(e){Ta(this.restEncoder,e)}writeParentInfo(e){$e(this.restEncoder,e?1:0)}writeTypeRef(e){$e(this.restEncoder,e)}writeLen(e){$e(this.restEncoder,e)}writeAny(e){Cu(this.restEncoder,e)}writeBuf(e){Tn(this.restEncoder,e)}writeJSON(e){Ta(this.restEncoder,JSON.stringify(e))}writeKey(e){Ta(this.restEncoder,e)}}class HL{constructor(){this.restEncoder=Yy(),this.dsCurrVal=0}toUint8Array(){return Ni(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){const t=e-this.dsCurrVal;this.dsCurrVal=e,$e(this.restEncoder,t)}writeDsLen(e){e===0&&Yo(),$e(this.restEncoder,e-1),this.dsCurrVal+=e}}class VL extends HL{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new Mg,this.clientEncoder=new ad,this.leftClockEncoder=new Mg,this.rightClockEncoder=new Mg,this.infoEncoder=new hS(Lm),this.stringEncoder=new sL,this.parentInfoEncoder=new hS(Lm),this.typeRefEncoder=new ad,this.lenEncoder=new ad}toUint8Array(){const e=Yy();return $e(e,0),Tn(e,this.keyClockEncoder.toUint8Array()),Tn(e,this.clientEncoder.toUint8Array()),Tn(e,this.leftClockEncoder.toUint8Array()),Tn(e,this.rightClockEncoder.toUint8Array()),Tn(e,Ni(this.infoEncoder)),Tn(e,this.stringEncoder.toUint8Array()),Tn(e,Ni(this.parentInfoEncoder)),Tn(e,this.typeRefEncoder.toUint8Array()),Tn(e,this.lenEncoder.toUint8Array()),Xy(e,Ni(this.restEncoder)),Ni(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){Cu(this.restEncoder,e)}writeBuf(e){Tn(this.restEncoder,e)}writeJSON(e){Cu(this.restEncoder,e)}writeKey(e){const t=this.keyMap.get(e);t===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}}const GL=(n,e,t,r)=>{r=Ga(r,e[0].id.clock);const i=$i(e,r);$e(n.restEncoder,e.length-i),n.writeClient(t),$e(n.restEncoder,r);const o=e[i];o.write(n,r-o.id.clock);for(let s=i+1;s<e.length;s++)e[s].write(n,0)},JL=(n,e,t)=>{const r=new Map;t.forEach((i,o)=>{yn(e,o)>i&&r.set(o,i)}),ev(e).forEach((i,o)=>{t.has(o)||r.set(o,0)}),$e(n.restEncoder,r.size),Na(r.entries()).sort((i,o)=>o[0]-i[0]).forEach(([i,o])=>{GL(n,e.clients.get(i),i,o)})},YL=(n,e)=>JL(n,e.doc.store,e.beforeState);class KL{constructor(){this.l=[]}}const bS=()=>new KL,SS=(n,e)=>n.l.push(e),wS=(n,e)=>{const t=n.l,r=t.length;n.l=t.filter(i=>e!==i),r===n.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},wk=(n,e,t)=>Qy(n.l,[e,t]);class cd{constructor(e,t){this.client=e,this.clock=t}}const Ff=(n,e)=>n===e||n!==null&&e!==null&&n.client===e.client&&n.clock===e.clock,Ve=(n,e)=>new cd(n,e),Tu=n=>{for(const[e,t]of n.doc.share.entries())if(t===n)return e;throw Yo()};class Hd{constructor(e,t,r,i=0){this.type=e,this.tname=t,this.item=r,this.assoc=i}}const Lf=(n,e,t)=>{let r=null,i=null;return n._item===null?i=Tu(n):r=Ve(n._item.id.client,n._item.id.clock),new Hd(r,i,e,t)},Pg=(n,e,t=0)=>{let r=n._start;if(t<0){if(e===0)return Lf(n,null,t);e--}for(;r!==null;){if(!r.deleted&&r.countable){if(r.length>e)return Lf(n,Ve(r.id.client,r.id.clock+e),t);e-=r.length}if(r.right===null&&t<0)return Lf(n,r.lastId,t);r=r.right}return Lf(n,null,t)},ma=(n,e)=>e===void 0?!n.deleted:e.sv.has(n.id.client)&&(e.sv.get(n.id.client)||0)>n.id.clock&&!yk(e.ds,n.id),zm=(n,e)=>{const t=Va(n.meta,zm,_a),r=n.doc.store;t.has(e)||(e.sv.forEach((i,o)=>{i<yn(r,o)&&Ko(n,Ve(o,i))}),mk(n,e.ds,i=>{}),t.add(e))};class XL{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const ev=n=>{const e=new Map;return n.clients.forEach((t,r)=>{const i=t[t.length-1];e.set(r,i.id.clock+i.length)}),e},yn=(n,e)=>{const t=n.clients.get(e);if(t===void 0)return 0;const r=t[t.length-1];return r.id.clock+r.length},xk=(n,e)=>{let t=n.clients.get(e.id.client);if(t===void 0)t=[],n.clients.set(e.id.client,t);else{const r=t[t.length-1];if(r.id.clock+r.length!==e.id.clock)throw Yo()}t.push(e)},$i=(n,e)=>{let t=0,r=n.length-1,i=n[r],o=i.id.clock;if(o===e)return r;let s=el(e/(o+i.length-1)*r);for(;t<=r;){if(i=n[s],o=i.id.clock,o<=e){if(e<o+i.length)return s;t=s+1}else r=s-1;s=el((t+r)/2)}throw Yo()},ZL=(n,e)=>{const t=n.clients.get(e.client);return t[$i(t,e.clock)]},_g=ZL,jm=(n,e,t)=>{const r=$i(e,t),i=e[r];return i.id.clock<t&&i instanceof On?(e.splice(r+1,0,jk(n,i,t-i.id.clock)),r+1):r},Ko=(n,e)=>{const t=n.doc.store.clients.get(e.client);return t[jm(n,t,e.clock)]},xS=(n,e,t)=>{const r=e.clients.get(t.client),i=$i(r,t.clock),o=r[i];return t.clock!==o.id.clock+o.length-1&&o.constructor!==No&&r.splice(i+1,0,jk(n,o,t.clock-o.id.clock+1)),o},QL=(n,e,t)=>{const r=n.clients.get(e.id.client);r[$i(r,e.id.clock)]=t},kk=(n,e,t,r,i)=>{if(r===0)return;const o=t+r;let s=jm(n,e,t),a;do a=e[s++],o<a.id.clock+a.length&&jm(n,e,o),i(a);while(s<e.length&&e[s].id.clock<o)};class qL{constructor(e,t,r){this.doc=e,this.deleteSet=new $L,this.beforeState=ev(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=r,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}const kS=(n,e)=>e.deleteSet.clients.size===0&&!F2(e.afterState,(t,r)=>e.beforeState.get(r)!==t)?!1:(vk(e.deleteSet),YL(n,e),jL(n,e.deleteSet),!0),CS=(n,e,t)=>{const r=e._item;(r===null||r.id.clock<(n.beforeState.get(r.id.client)||0)&&!r.deleted)&&Va(n.changed,e,_a).add(t)},ud=(n,e)=>{let t=n[e],r=n[e-1],i=e;for(;i>0;t=r,r=n[--i-1]){if(r.deleted===t.deleted&&r.constructor===t.constructor&&r.mergeWith(t)){t instanceof On&&t.parentSub!==null&&t.parent._map.get(t.parentSub)===t&&t.parent._map.set(t.parentSub,r);continue}break}const o=e-i;return o&&n.splice(e+1-o,o),o},eB=(n,e,t)=>{for(const[r,i]of n.clients.entries()){const o=e.clients.get(r);for(let s=i.length-1;s>=0;s--){const a=i[s],c=a.clock+a.len;for(let f=$i(o,a.clock),p=o[f];f<o.length&&p.id.clock<c;p=o[++f]){const m=o[f];if(a.clock+a.len<=m.id.clock)break;m instanceof On&&m.deleted&&!m.keep&&t(m)&&m.gc(e,!1)}}}},tB=(n,e)=>{n.clients.forEach((t,r)=>{const i=e.clients.get(r);for(let o=t.length-1;o>=0;o--){const s=t[o],a=ik(i.length-1,1+$i(i,s.clock+s.len-1));for(let c=a,f=i[c];c>0&&f.id.clock>=s.clock;f=i[c])c-=1+ud(i,c)}})},Ck=(n,e)=>{if(e<n.length){const t=n[e],r=t.doc,i=r.store,o=t.deleteSet,s=t._mergeStructs;try{vk(o),t.afterState=ev(t.doc.store),r.emit("beforeObserverCalls",[t,r]);const a=[];t.changed.forEach((c,f)=>a.push(()=>{(f._item===null||!f._item.deleted)&&f._callObserver(t,c)})),a.push(()=>{t.changedParentTypes.forEach((c,f)=>{f._dEH.l.length>0&&(f._item===null||!f._item.deleted)&&(c=c.filter(p=>p.target._item===null||!p.target._item.deleted),c.forEach(p=>{p.currentTarget=f,p._path=null}),c.sort((p,m)=>p.path.length-m.path.length),wk(f._dEH,c,t))})}),a.push(()=>r.emit("afterTransaction",[t,r])),Qy(a,[]),t._needFormattingCleanup&&hB(t)}finally{r.gc&&eB(o,i,r.gcFilter),tB(o,i),t.afterState.forEach((p,m)=>{const S=t.beforeState.get(m)||0;if(S!==p){const C=i.clients.get(m),E=Ga($i(C,S),1);for(let P=C.length-1;P>=E;)P-=1+ud(C,P)}});for(let p=s.length-1;p>=0;p--){const{client:m,clock:S}=s[p].id,C=i.clients.get(m),E=$i(C,S);E+1<C.length&&ud(C,E+1)>1||E>0&&ud(C,E)}if(!t.local&&t.afterState.get(r.clientID)!==t.beforeState.get(r.clientID)&&(NL(qy,uk,"[yjs] ",fk,dk,"Changed the client-id because another client seems to be using it."),r.clientID=Sk()),r.emit("afterTransactionCleanup",[t,r]),r._observers.has("update")){const p=new WL;kS(p,t)&&r.emit("update",[p.toUint8Array(),t.origin,r,t])}if(r._observers.has("updateV2")){const p=new VL;kS(p,t)&&r.emit("updateV2",[p.toUint8Array(),t.origin,r,t])}const{subdocsAdded:a,subdocsLoaded:c,subdocsRemoved:f}=t;(a.size>0||f.size>0||c.size>0)&&(a.forEach(p=>{p.clientID=r.clientID,p.collectionid==null&&(p.collectionid=r.collectionid),r.subdocs.add(p)}),f.forEach(p=>r.subdocs.delete(p)),r.emit("subdocs",[{loaded:c,added:a,removed:f},r,t]),f.forEach(p=>p.destroy())),n.length<=e+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,n])):Ck(n,e+1)}}},He=(n,e,t=null,r=!0)=>{const i=n._transactionCleanups;let o=!1,s=null;n._transaction===null&&(o=!0,n._transaction=new qL(n,t,r),i.push(n._transaction),i.length===1&&n.emit("beforeAllTransactions",[n]),n.emit("beforeTransaction",[n._transaction,n]));try{s=e(n._transaction)}finally{if(o){const a=n._transaction===i[0];n._transaction=null,a&&Ck(i,0)}}return s},ES="You must not compute changes after the event-handler fired.";class Lh{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=nB(this.currentTarget,this.target))}deletes(e){return yk(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw Fa(ES);const e=new Map,t=this.target;this.transaction.changed.get(t).forEach(i=>{if(i!==null){const o=t._map.get(i);let s,a;if(this.adds(o)){let c=o.left;for(;c!==null&&this.adds(c);)c=c.left;if(this.deletes(o))if(c!==null&&this.deletes(c))s="delete",a=Rg(c.content.getContent());else return;else c!==null&&this.deletes(c)?(s="update",a=Rg(c.content.getContent())):(s="add",a=void 0)}else if(this.deletes(o))s="delete",a=Rg(o.content.getContent());else return;e.set(i,{action:s,oldValue:a})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw Fa(ES);const t=this.target,r=_a(),i=_a(),o=[];if(e={added:r,deleted:i,delta:o,keys:this.keys},this.transaction.changed.get(t).has(null)){let a=null;const c=()=>{a&&o.push(a)};for(let f=t._start;f!==null;f=f.right)f.deleted?this.deletes(f)&&!this.adds(f)&&((a===null||a.delete===void 0)&&(c(),a={delete:0}),a.delete+=f.length,i.add(f)):this.adds(f)?((a===null||a.insert===void 0)&&(c(),a={insert:[]}),a.insert=a.insert.concat(f.content.getContent()),r.add(f)):((a===null||a.retain===void 0)&&(c(),a={retain:0}),a.retain+=f.length);a!==null&&a.retain===void 0&&c()}this._changes=e}return e}}const nB=(n,e)=>{const t=[];for(;e._item!==null&&e!==n;){if(e._item.parentSub!==null)t.unshift(e._item.parentSub);else{let r=0,i=e._item.parent._start;for(;i!==e._item&&i!==null;)!i.deleted&&i.countable&&(r+=i.length),i=i.right;t.unshift(r)}e=e._item.parent}return t},zt=()=>{FL("Invalid access: Add Yjs type to a document before reading data.")},Ek=80;let tv=0;class rB{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=tv++}}const iB=n=>{n.timestamp=tv++},Tk=(n,e,t)=>{n.p.marker=!1,n.p=e,e.marker=!0,n.index=t,n.timestamp=tv++},oB=(n,e,t)=>{if(n.length>=Ek){const r=n.reduce((i,o)=>i.timestamp<o.timestamp?i:o);return Tk(r,e,t),r}else{const r=new rB(e,t);return n.push(r),r}},Bh=(n,e)=>{if(n._start===null||e===0||n._searchMarker===null)return null;const t=n._searchMarker.length===0?null:n._searchMarker.reduce((o,s)=>ld(e-o.index)<ld(e-s.index)?o:s);let r=n._start,i=0;for(t!==null&&(r=t.p,i=t.index,iB(t));r.right!==null&&i<e;){if(!r.deleted&&r.countable){if(e<i+r.length)break;i+=r.length}r=r.right}for(;r.left!==null&&i>e;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return t!==null&&ld(t.index-i)<r.parent.length/Ek?(Tk(t,r,i),t):oB(n._searchMarker,r,i)},Ru=(n,e,t)=>{for(let r=n.length-1;r>=0;r--){const i=n[r];if(t>0){let o=i.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(i.index-=o.length);if(o===null||o.marker===!0){n.splice(r,1);continue}i.p=o,o.marker=!0}(e<i.index||t>0&&e===i.index)&&(i.index=Ga(e,i.index+t))}},$h=(n,e,t)=>{const r=n,i=e.changedParentTypes;for(;Va(i,n,()=>[]).push(t),n._item!==null;)n=n._item.parent;wk(r._eH,t,e)};class Pt{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=bS(),this._dEH=bS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw Gr()}clone(){throw Gr()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){SS(this._eH,e)}observeDeep(e){SS(this._dEH,e)}unobserve(e){wS(this._eH,e)}unobserveDeep(e){wS(this._dEH,e)}toJSON(){}}const Rk=(n,e,t)=>{n.doc??zt(),e<0&&(e=n._length+e),t<0&&(t=n._length+t);let r=t-e;const i=[];let o=n._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const s=o.content.getContent();if(s.length<=e)e-=s.length;else{for(let a=e;a<s.length&&r>0;a++)i.push(s[a]),r--;e=0}}o=o.right}return i},Ak=n=>{n.doc??zt();const e=[];let t=n._start;for(;t!==null;){if(t.countable&&!t.deleted){const r=t.content.getContent();for(let i=0;i<r.length;i++)e.push(r[i])}t=t.right}return e},Au=(n,e)=>{let t=0,r=n._start;for(n.doc??zt();r!==null;){if(r.countable&&!r.deleted){const i=r.content.getContent();for(let o=0;o<i.length;o++)e(i[o],t++,n)}r=r.right}},Ok=(n,e)=>{const t=[];return Au(n,(r,i)=>{t.push(e(r,i,n))}),t},sB=n=>{let e=n._start,t=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(t===null){for(;e!==null&&e.deleted;)e=e.right;if(e===null)return{done:!0,value:void 0};t=e.content.getContent(),r=0,e=e.right}const i=t[r++];return t.length<=r&&(t=null),{done:!1,value:i}}}},Ik=(n,e)=>{n.doc??zt();const t=Bh(n,e);let r=n._start;for(t!==null&&(r=t.p,e-=t.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(e<r.length)return r.content.getContent()[e];e-=r.length}},Vd=(n,e,t,r)=>{let i=t;const o=n.doc,s=o.clientID,a=o.store,c=t===null?e._start:t.right;let f=[];const p=()=>{f.length>0&&(i=new On(Ve(s,yn(a,s)),i,i&&i.lastId,c,c&&c.id,e,null,new Ba(f)),i.integrate(n,0),f=[])};r.forEach(m=>{if(m===null)f.push(m);else switch(m.constructor){case Number:case Object:case Boolean:case Array:case String:f.push(m);break;default:switch(p(),m.constructor){case Uint8Array:case ArrayBuffer:i=new On(Ve(s,yn(a,s)),i,i&&i.lastId,c,c&&c.id,e,null,new zh(new Uint8Array(m))),i.integrate(n,0);break;case zu:i=new On(Ve(s,yn(a,s)),i,i&&i.lastId,c,c&&c.id,e,null,new jh(m)),i.integrate(n,0);break;default:if(m instanceof Pt)i=new On(Ve(s,yn(a,s)),i,i&&i.lastId,c,c&&c.id,e,null,new es(m)),i.integrate(n,0);else throw new Error("Unexpected content type in insert operation")}}}),p()},Mk=()=>Fa("Length exceeded!"),Dk=(n,e,t,r)=>{if(t>e._length)throw Mk();if(t===0)return e._searchMarker&&Ru(e._searchMarker,t,r.length),Vd(n,e,null,r);const i=t,o=Bh(e,t);let s=e._start;for(o!==null&&(s=o.p,t-=o.index,t===0&&(s=s.prev,t+=s&&s.countable&&!s.deleted?s.length:0));s!==null;s=s.right)if(!s.deleted&&s.countable){if(t<=s.length){t<s.length&&Ko(n,Ve(s.id.client,s.id.clock+t));break}t-=s.length}return e._searchMarker&&Ru(e._searchMarker,i,r.length),Vd(n,e,s,r)},lB=(n,e,t)=>{let i=(e._searchMarker||[]).reduce((o,s)=>s.index>o.index?s:o,{index:0,p:e._start}).p;if(i)for(;i.right;)i=i.right;return Vd(n,e,i,t)},Pk=(n,e,t,r)=>{if(r===0)return;const i=t,o=r,s=Bh(e,t);let a=e._start;for(s!==null&&(a=s.p,t-=s.index);a!==null&&t>0;a=a.right)!a.deleted&&a.countable&&(t<a.length&&Ko(n,Ve(a.id.client,a.id.clock+t)),t-=a.length);for(;r>0&&a!==null;)a.deleted||(r<a.length&&Ko(n,Ve(a.id.client,a.id.clock+r)),a.delete(n),r-=a.length),a=a.right;if(r>0)throw Mk();e._searchMarker&&Ru(e._searchMarker,i,-o+r)},Gd=(n,e,t)=>{const r=e._map.get(t);r!==void 0&&r.delete(n)},nv=(n,e,t,r)=>{const i=e._map.get(t)||null,o=n.doc,s=o.clientID;let a;if(r==null)a=new Ba([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:a=new Ba([r]);break;case Uint8Array:a=new zh(r);break;case zu:a=new jh(r);break;default:if(r instanceof Pt)a=new es(r);else throw new Error("Unexpected content type")}new On(Ve(s,yn(o.store,s)),i,i&&i.lastId,null,null,e,t,a).integrate(n,0)},rv=(n,e)=>{n.doc??zt();const t=n._map.get(e);return t!==void 0&&!t.deleted?t.content.getContent()[t.length-1]:void 0},_k=n=>{const e={};return n.doc??zt(),n._map.forEach((t,r)=>{t.deleted||(e[r]=t.content.getContent()[t.length-1])}),e},Nk=(n,e)=>{n.doc??zt();const t=n._map.get(e);return t!==void 0&&!t.deleted},aB=(n,e)=>{const t={};return n._map.forEach((r,i)=>{let o=r;for(;o!==null&&(!e.sv.has(o.id.client)||o.id.clock>=(e.sv.get(o.id.client)||0));)o=o.left;o!==null&&ma(o,e)&&(t[i]=o.content.getContent()[o.length-1])}),t},Bf=n=>(n.doc??zt(),LL(n._map.entries(),e=>!e[1].deleted));class cB extends Lh{}class su extends Pt{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){const t=new su;return t.push(e),t}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new su}clone(){const e=new su;return e.insert(0,this.toArray().map(t=>t instanceof Pt?t.clone():t)),e}get length(){return this.doc??zt(),this._length}_callObserver(e,t){super._callObserver(e,t),$h(this,e,new cB(this,e))}insert(e,t){this.doc!==null?He(this.doc,r=>{Dk(r,this,e,t)}):this._prelimContent.splice(e,0,...t)}push(e){this.doc!==null?He(this.doc,t=>{lB(t,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,t=1){this.doc!==null?He(this.doc,r=>{Pk(r,this,e,t)}):this._prelimContent.splice(e,t)}get(e){return Ik(this,e)}toArray(){return Ak(this)}slice(e=0,t=this.length){return Rk(this,e,t)}toJSON(){return this.map(e=>e instanceof Pt?e.toJSON():e)}map(e){return Ok(this,e)}forEach(e){Au(this,e)}[Symbol.iterator](){return sB(this)}_write(e){e.writeTypeRef(bB)}}class uB extends Lh{constructor(e,t,r){super(e,t),this.keysChanged=r}}class Jd extends Pt{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach((r,i)=>{this.set(i,r)}),this._prelimContent=null}_copy(){return new Jd}clone(){const e=new Jd;return this.forEach((t,r)=>{e.set(r,t instanceof Pt?t.clone():t)}),e}_callObserver(e,t){$h(this,e,new uB(this,e,t))}toJSON(){this.doc??zt();const e={};return this._map.forEach((t,r)=>{if(!t.deleted){const i=t.content.getContent()[t.length-1];e[r]=i instanceof Pt?i.toJSON():i}}),e}get size(){return[...Bf(this)].length}keys(){return Dg(Bf(this),e=>e[0])}values(){return Dg(Bf(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Dg(Bf(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??zt(),this._map.forEach((t,r)=>{t.deleted||e(t.content.getContent()[t.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc!==null?He(this.doc,t=>{Gd(t,this,e)}):this._prelimContent.delete(e)}set(e,t){return this.doc!==null?He(this.doc,r=>{nv(r,this,e,t)}):this._prelimContent.set(e,t),t}get(e){return rv(this,e)}has(e){return Nk(this,e)}clear(){this.doc!==null?He(this.doc,e=>{this.forEach(function(t,r,i){Gd(e,i,r)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(SB)}}const Uo=(n,e)=>n===e||typeof n=="object"&&typeof e=="object"&&n&&e&&bL(n,e);class Um{constructor(e,t,r,i){this.left=e,this.right=t,this.index=r,this.currentAttributes=i}forward(){switch(this.right===null&&Yo(),this.right.content.constructor){case xt:this.right.deleted||Ja(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const TS=(n,e,t)=>{for(;e.right!==null&&t>0;){switch(e.right.content.constructor){case xt:e.right.deleted||Ja(e.currentAttributes,e.right.content);break;default:e.right.deleted||(t<e.right.length&&Ko(n,Ve(e.right.id.client,e.right.id.clock+t)),e.index+=e.right.length,t-=e.right.length);break}e.left=e.right,e.right=e.right.right}return e},$f=(n,e,t,r)=>{const i=new Map,o=r?Bh(e,t):null;if(o){const s=new Um(o.p.left,o.p,o.index,i);return TS(n,s,t-o.index)}else{const s=new Um(null,e._start,0,i);return TS(n,s,t)}},Fk=(n,e,t,r)=>{for(;t.right!==null&&(t.right.deleted===!0||t.right.content.constructor===xt&&Uo(r.get(t.right.content.key),t.right.content.value));)t.right.deleted||r.delete(t.right.content.key),t.forward();const i=n.doc,o=i.clientID;r.forEach((s,a)=>{const c=t.left,f=t.right,p=new On(Ve(o,yn(i.store,o)),c,c&&c.lastId,f,f&&f.id,e,null,new xt(a,s));p.integrate(n,0),t.right=p,t.forward()})},Ja=(n,e)=>{const{key:t,value:r}=e;r===null?n.delete(t):n.set(t,r)},Lk=(n,e)=>{for(;n.right!==null;){if(!(n.right.deleted||n.right.content.constructor===xt&&Uo(e[n.right.content.key]??null,n.right.content.value)))break;n.forward()}},Bk=(n,e,t,r)=>{const i=n.doc,o=i.clientID,s=new Map;for(const a in r){const c=r[a],f=t.currentAttributes.get(a)??null;if(!Uo(f,c)){s.set(a,f);const{left:p,right:m}=t;t.right=new On(Ve(o,yn(i.store,o)),p,p&&p.lastId,m,m&&m.id,e,null,new xt(a,c)),t.right.integrate(n,0),t.forward()}}return s},Ng=(n,e,t,r,i)=>{t.currentAttributes.forEach((S,C)=>{i[C]===void 0&&(i[C]=null)});const o=n.doc,s=o.clientID;Lk(t,i);const a=Bk(n,e,t,i),c=r.constructor===String?new zi(r):r instanceof Pt?new es(r):new Ya(r);let{left:f,right:p,index:m}=t;e._searchMarker&&Ru(e._searchMarker,t.index,c.getLength()),p=new On(Ve(s,yn(o.store,s)),f,f&&f.lastId,p,p&&p.id,e,null,c),p.integrate(n,0),t.right=p,t.index=m,t.forward(),Fk(n,e,t,a)},RS=(n,e,t,r,i)=>{const o=n.doc,s=o.clientID;Lk(t,i);const a=Bk(n,e,t,i);e:for(;t.right!==null&&(r>0||a.size>0&&(t.right.deleted||t.right.content.constructor===xt));){if(!t.right.deleted)switch(t.right.content.constructor){case xt:{const{key:c,value:f}=t.right.content,p=i[c];if(p!==void 0){if(Uo(p,f))a.delete(c);else{if(r===0)break e;a.set(c,f)}t.right.delete(n)}else t.currentAttributes.set(c,f);break}default:r<t.right.length&&Ko(n,Ve(t.right.id.client,t.right.id.clock+r)),r-=t.right.length;break}t.forward()}if(r>0){let c="";for(;r>0;r--)c+=`
15
- `;t.right=new On(Ve(s,yn(o.store,s)),t.left,t.left&&t.left.lastId,t.right,t.right&&t.right.id,e,null,new zi(c)),t.right.integrate(n,0),t.forward()}Fk(n,e,t,a)},$k=(n,e,t,r,i)=>{let o=e;const s=Vr();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===xt){const f=o.content;s.set(f.key,f)}o=o.right}let a=0,c=!1;for(;e!==o;){if(t===e&&(c=!0),!e.deleted){const f=e.content;switch(f.constructor){case xt:{const{key:p,value:m}=f,S=r.get(p)??null;(s.get(p)!==f||S===m)&&(e.delete(n),a++,!c&&(i.get(p)??null)===m&&S!==m&&(S===null?i.delete(p):i.set(p,S))),!c&&!e.deleted&&Ja(i,f);break}}}e=e.right}return a},fB=(n,e)=>{for(;e&&e.right&&(e.right.deleted||!e.right.countable);)e=e.right;const t=new Set;for(;e&&(e.deleted||!e.countable);){if(!e.deleted&&e.content.constructor===xt){const r=e.content.key;t.has(r)?e.delete(n):t.add(r)}e=e.left}},dB=n=>{let e=0;return He(n.doc,t=>{let r=n._start,i=n._start,o=Vr();const s=Fm(o);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case xt:Ja(s,i.content);break;default:e+=$k(t,r,i,o,s),o=Fm(s),r=i;break}i=i.right}}),e},hB=n=>{const e=new Set,t=n.doc;for(const[r,i]of n.afterState.entries()){const o=n.beforeState.get(r)||0;i!==o&&kk(n,t.store.clients.get(r),o,i,s=>{!s.deleted&&s.content.constructor===xt&&s.constructor!==No&&e.add(s.parent)})}He(t,r=>{mk(n,n.deleteSet,i=>{if(i instanceof No||!i.parent._hasFormatting||e.has(i.parent))return;const o=i.parent;i.content.constructor===xt?e.add(o):fB(r,i)});for(const i of e)dB(i)})},AS=(n,e,t)=>{const r=t,i=Fm(e.currentAttributes),o=e.right;for(;t>0&&e.right!==null;){if(e.right.deleted===!1)switch(e.right.content.constructor){case es:case Ya:case zi:t<e.right.length&&Ko(n,Ve(e.right.id.client,e.right.id.clock+t)),t-=e.right.length,e.right.delete(n);break}e.forward()}o&&$k(n,o,e.right,i,e.currentAttributes);const s=(e.left||e.right).parent;return s._searchMarker&&Ru(s._searchMarker,e.index,-r+t),e};class pB extends Lh{constructor(e,t,r){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,r.forEach(i=>{i===null?this.childListChanged=!0:this.keysChanged.add(i)})}get changes(){if(this._changes===null){const e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(this._delta===null){const e=this.target.doc,t=[];He(e,r=>{const i=new Map,o=new Map;let s=this.target._start,a=null;const c={};let f="",p=0,m=0;const S=()=>{if(a!==null){let C=null;switch(a){case"delete":m>0&&(C={delete:m}),m=0;break;case"insert":(typeof f=="object"||f.length>0)&&(C={insert:f},i.size>0&&(C.attributes={},i.forEach((E,P)=>{E!==null&&(C.attributes[P]=E)}))),f="";break;case"retain":p>0&&(C={retain:p},mL(c)||(C.attributes=hL({},c))),p=0;break}C&&t.push(C),a=null}};for(;s!==null;){switch(s.content.constructor){case es:case Ya:this.adds(s)?this.deletes(s)||(S(),a="insert",f=s.content.getContent()[0],S()):this.deletes(s)?(a!=="delete"&&(S(),a="delete"),m+=1):s.deleted||(a!=="retain"&&(S(),a="retain"),p+=1);break;case zi:this.adds(s)?this.deletes(s)||(a!=="insert"&&(S(),a="insert"),f+=s.content.str):this.deletes(s)?(a!=="delete"&&(S(),a="delete"),m+=s.length):s.deleted||(a!=="retain"&&(S(),a="retain"),p+=s.length);break;case xt:{const{key:C,value:E}=s.content;if(this.adds(s)){if(!this.deletes(s)){const P=i.get(C)??null;Uo(P,E)?E!==null&&s.delete(r):(a==="retain"&&S(),Uo(E,o.get(C)??null)?delete c[C]:c[C]=E)}}else if(this.deletes(s)){o.set(C,E);const P=i.get(C)??null;Uo(P,E)||(a==="retain"&&S(),c[C]=P)}else if(!s.deleted){o.set(C,E);const P=c[C];P!==void 0&&(Uo(P,E)?P!==null&&s.delete(r):(a==="retain"&&S(),E===null?delete c[C]:c[C]=E))}s.deleted||(a==="insert"&&S(),Ja(i,s.content));break}}s=s.right}for(S();t.length>0;){const C=t[t.length-1];if(C.retain!==void 0&&C.attributes===void 0)t.pop();else break}}),this._delta=t}return this._delta}}class Ou extends Pt{constructor(e){super(),this._pending=e!==void 0?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??zt(),this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Ou}clone(){const e=new Ou;return e.applyDelta(this.toDelta()),e}_callObserver(e,t){super._callObserver(e,t);const r=new pB(this,e,t);$h(this,e,r),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??zt();let e="",t=this._start;for(;t!==null;)!t.deleted&&t.countable&&t.content.constructor===zi&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){this.doc!==null?He(this.doc,r=>{const i=new Um(null,this._start,0,new Map);for(let o=0;o<e.length;o++){const s=e[o];if(s.insert!==void 0){const a=!t&&typeof s.insert=="string"&&o===e.length-1&&i.right===null&&s.insert.slice(-1)===`
16
- `?s.insert.slice(0,-1):s.insert;(typeof a!="string"||a.length>0)&&Ng(r,this,i,a,s.attributes||{})}else s.retain!==void 0?RS(r,this,i,s.retain,s.attributes||{}):s.delete!==void 0&&AS(r,i,s.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,t,r){this.doc??zt();const i=[],o=new Map,s=this.doc;let a="",c=this._start;function f(){if(a.length>0){const m={};let S=!1;o.forEach((E,P)=>{S=!0,m[P]=E});const C={insert:a};S&&(C.attributes=m),i.push(C),a=""}}const p=()=>{for(;c!==null;){if(ma(c,e)||t!==void 0&&ma(c,t))switch(c.content.constructor){case zi:{const m=o.get("ychange");e!==void 0&&!ma(c,e)?(m===void 0||m.user!==c.id.client||m.type!=="removed")&&(f(),o.set("ychange",r?r("removed",c.id):{type:"removed"})):t!==void 0&&!ma(c,t)?(m===void 0||m.user!==c.id.client||m.type!=="added")&&(f(),o.set("ychange",r?r("added",c.id):{type:"added"})):m!==void 0&&(f(),o.delete("ychange")),a+=c.content.str;break}case es:case Ya:{f();const m={insert:c.content.getContent()[0]};if(o.size>0){const S={};m.attributes=S,o.forEach((C,E)=>{S[E]=C})}i.push(m);break}case xt:ma(c,e)&&(f(),Ja(o,c.content));break}c=c.right}f()};return e||t?He(s,m=>{e&&zm(m,e),t&&zm(m,t),p()},"cleanup"):p(),i}insert(e,t,r){if(t.length<=0)return;const i=this.doc;i!==null?He(i,o=>{const s=$f(o,this,e,!r);r||(r={},s.currentAttributes.forEach((a,c)=>{r[c]=a})),Ng(o,this,s,t,r)}):this._pending.push(()=>this.insert(e,t,r))}insertEmbed(e,t,r){const i=this.doc;i!==null?He(i,o=>{const s=$f(o,this,e,!r);Ng(o,this,s,t,r||{})}):this._pending.push(()=>this.insertEmbed(e,t,r||{}))}delete(e,t){if(t===0)return;const r=this.doc;r!==null?He(r,i=>{AS(i,$f(i,this,e,!0),t)}):this._pending.push(()=>this.delete(e,t))}format(e,t,r){if(t===0)return;const i=this.doc;i!==null?He(i,o=>{const s=$f(o,this,e,!1);s.right!==null&&RS(o,this,s,t,r)}):this._pending.push(()=>this.format(e,t,r))}removeAttribute(e){this.doc!==null?He(this.doc,t=>{Gd(t,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,t){this.doc!==null?He(this.doc,r=>{nv(r,this,e,t)}):this._pending.push(()=>this.setAttribute(e,t))}getAttribute(e){return rv(this,e)}getAttributes(){return _k(this)}_write(e){e.writeTypeRef(wB)}}class Fg{constructor(e,t=()=>!0){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??zt()}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(t)))do if(t=e.content.type,!e.deleted&&(t.constructor===Iu||t.constructor===La)&&t._start!==null)e=t._start;else for(;e!==null;)if(e.right!==null){e=e.right;break}else e.parent===this._root?e=null:e=e.parent._item;while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}}class La extends Pt{constructor(){super(),this._prelimContent=[]}get firstChild(){const e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new La}clone(){const e=new La;return e.insert(0,this.toArray().map(t=>t instanceof Pt?t.clone():t)),e}get length(){return this.doc??zt(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new Fg(this,e)}querySelector(e){e=e.toUpperCase();const r=new Fg(this,i=>i.nodeName&&i.nodeName.toUpperCase()===e).next();return r.done?null:r.value}querySelectorAll(e){return e=e.toUpperCase(),Na(new Fg(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e))}_callObserver(e,t){$h(this,e,new gB(this,t,e))}toString(){return Ok(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,t={},r){const i=e.createDocumentFragment();return r!==void 0&&r._createAssociation(i,this),Au(this,o=>{i.insertBefore(o.toDOM(e,t,r),null)}),i}insert(e,t){this.doc!==null?He(this.doc,r=>{Dk(r,this,e,t)}):this._prelimContent.splice(e,0,...t)}insertAfter(e,t){if(this.doc!==null)He(this.doc,r=>{const i=e&&e instanceof Pt?e._item:e;Vd(r,this,i,t)});else{const r=this._prelimContent,i=e===null?0:r.findIndex(o=>o===e)+1;if(i===0&&e!==null)throw Fa("Reference item not found");r.splice(i,0,...t)}}delete(e,t=1){this.doc!==null?He(this.doc,r=>{Pk(r,this,e,t)}):this._prelimContent.splice(e,t)}toArray(){return Ak(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Ik(this,e)}slice(e=0,t=this.length){return Rk(this,e,t)}forEach(e){Au(this,e)}_write(e){e.writeTypeRef(kB)}}class Iu extends La{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach((r,i)=>{this.setAttribute(i,r)}),this._prelimAttrs=null}_copy(){return new Iu(this.nodeName)}clone(){const e=new Iu(this.nodeName),t=this.getAttributes();return gL(t,(r,i)=>{typeof r=="string"&&e.setAttribute(i,r)}),e.insert(0,this.toArray().map(r=>r instanceof Pt?r.clone():r)),e}toString(){const e=this.getAttributes(),t=[],r=[];for(const a in e)r.push(a);r.sort();const i=r.length;for(let a=0;a<i;a++){const c=r[a];t.push(c+'="'+e[c]+'"')}const o=this.nodeName.toLocaleLowerCase(),s=t.length>0?" "+t.join(" "):"";return`<${o}${s}>${super.toString()}</${o}>`}removeAttribute(e){this.doc!==null?He(this.doc,t=>{Gd(t,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,t){this.doc!==null?He(this.doc,r=>{nv(r,this,e,t)}):this._prelimAttrs.set(e,t)}getAttribute(e){return rv(this,e)}hasAttribute(e){return Nk(this,e)}getAttributes(e){return e?aB(this,e):_k(this)}toDOM(e=document,t={},r){const i=e.createElement(this.nodeName),o=this.getAttributes();for(const s in o){const a=o[s];typeof a=="string"&&i.setAttribute(s,a)}return Au(this,s=>{i.appendChild(s.toDOM(e,t,r))}),r!==void 0&&r._createAssociation(i,this),i}_write(e){e.writeTypeRef(xB),e.writeKey(this.nodeName)}}class gB extends Lh{constructor(e,t,r){super(e,r),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach(i=>{i===null?this.childListChanged=!0:this.attributesChanged.add(i)})}}class Mu extends Ou{get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new Mu}clone(){const e=new Mu;return e.applyDelta(this.toDelta()),e}toDOM(e=document,t,r){const i=e.createTextNode(this.toString());return r!==void 0&&r._createAssociation(i,this),i}toString(){return this.toDelta().map(e=>{const t=[];for(const i in e.attributes){const o=[];for(const s in e.attributes[i])o.push({key:s,value:e.attributes[i][s]});o.sort((s,a)=>s.key<a.key?-1:1),t.push({nodeName:i,attrs:o})}t.sort((i,o)=>i.nodeName<o.nodeName?-1:1);let r="";for(let i=0;i<t.length;i++){const o=t[i];r+=`<${o.nodeName}`;for(let s=0;s<o.attrs.length;s++){const a=o.attrs[s];r+=` ${a.key}="${a.value}"`}r+=">"}r+=e.insert;for(let i=t.length-1;i>=0;i--)r+=`</${t[i].nodeName}>`;return r}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(CB)}}class zk{constructor(e,t){this.id=e,this.length=t}get deleted(){throw Gr()}mergeWith(e){return!1}write(e,t,r){throw Gr()}integrate(e,t){throw Gr()}}const mB=0;class No extends zk{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),xk(e.doc.store,this)}write(e,t){e.writeInfo(mB),e.writeLen(this.length-t)}getMissing(e,t){return null}}class zh{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new zh(this.content)}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}}class Yd{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new Yd(this.len)}splice(e){const t=new Yd(this.len-e);return this.len=e,t}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){bk(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}}const yB=(n,e)=>new zu({guid:n,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1});class jh{constructor(e){e._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=e;const t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),e.meta!==null&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new jh(yB(this.doc.guid,this.opts))}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}class Ya{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Ya(this.embed)}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}}class xt{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new xt(this.key,this.value)}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){const r=t.parent;r._searchMarker=null,r._hasFormatting=!0}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}const vB=Wd("node_env")==="development";class Ba{constructor(e){this.arr=e,vB&&ak(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Ba(this.arr)}splice(e){const t=new Ba(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){const r=this.arr.length;e.writeLen(r-t);for(let i=t;i<r;i++){const o=this.arr[i];e.writeAny(o)}}getRef(){return 8}}class zi{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new zi(this.str)}splice(e){const t=new zi(this.str.slice(e));this.str=this.str.slice(0,e);const r=this.str.charCodeAt(e-1);return r>=55296&&r<=56319&&(this.str=this.str.slice(0,e-1)+"�",t.str="�"+t.str.slice(1)),t}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(t===0?this.str:this.str.slice(t))}getRef(){return 4}}const bB=0,SB=1,wB=2,xB=3,kB=4,CB=6;class es{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new es(this.type._copy())}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;t!==null;)t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(e.beforeState.get(r.id.client)||0)&&e._mergeStructs.push(r):r.delete(e)}),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;t!==null;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(e,!0),r=r.left}),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}}const jk=(n,e,t)=>{const{client:r,clock:i}=e.id,o=new On(Ve(r,i+t),e,Ve(r,i+t-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(t));return e.deleted&&o.markDeleted(),e.keep&&(o.keep=!0),e.redone!==null&&(o.redone=Ve(e.redone.client,e.redone.clock+t)),e.right=o,o.right!==null&&(o.right.left=o),n._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),e.length=t,o};let On=class Wm extends zk{constructor(e,t,r,i,o,s,a,c){super(e,c.getLength()),this.origin=r,this.left=t,this.right=i,this.rightOrigin=o,this.parent=s,this.parentSub=a,this.redone=null,this.content=c,this.info=this.content.isCountable()?cS:0}set marker(e){(this.info&Og)>0!==e&&(this.info^=Og)}get marker(){return(this.info&Og)>0}get keep(){return(this.info&aS)>0}set keep(e){this.keep!==e&&(this.info^=aS)}get countable(){return(this.info&cS)>0}get deleted(){return(this.info&Ag)>0}set deleted(e){this.deleted!==e&&(this.info^=Ag)}markDeleted(){this.info|=Ag}getMissing(e,t){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=yn(t,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=yn(t,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===cd&&this.id.client!==this.parent.client&&this.parent.clock>=yn(t,this.parent.client))return this.parent.client;if(this.origin&&(this.left=xS(e,t,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ko(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===No||this.right&&this.right.constructor===No)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===Wm&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===Wm&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===cd){const r=_g(t,this.parent);r.constructor===No?this.parent=null:this.parent=r.content.type}return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=xS(e,e.doc.store,Ve(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,i;if(r!==null)i=r.right;else if(this.parentSub!==null)for(i=this.parent._map.get(this.parentSub)||null;i!==null&&i.left!==null;)i=i.left;else i=this.parent._start;const o=new Set,s=new Set;for(;i!==null&&i!==this.right;){if(s.add(i),o.add(i),Ff(this.origin,i.origin)){if(i.id.client<this.id.client)r=i,o.clear();else if(Ff(this.rightOrigin,i.rightOrigin))break}else if(i.origin!==null&&s.has(_g(e.doc.store,i.origin)))o.has(_g(e.doc.store,i.origin))||(r=i,o.clear());else break;i=i.right}this.left=r}if(this.left!==null){const r=this.left.right;this.right=r,this.left.right=this}else{let r;if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start,this.parent._start=this;this.right=r}this.right!==null?this.right.left=this:this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)),this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),xk(e.doc.store,this),this.content.integrate(e,this),CS(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new No(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:Ve(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Ff(e.origin,this.lastId)&&this.right===e&&Ff(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){const t=this.parent._searchMarker;return t&&t.forEach(r=>{r.p===e&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){const t=this.parent;this.countable&&this.parentSub===null&&(t._length-=this.length),this.markDeleted(),bk(e.deleteSet,this.id.client,this.id.clock,this.length),CS(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw Yo();this.content.gc(e),t?QL(e,this,new No(this.id,this.length)):this.content=new Yd(this.length)}write(e,t){const r=t>0?Ve(this.id.client,this.id.clock+t-1):this.origin,i=this.rightOrigin,o=this.parentSub,s=this.content.getRef()&j2|(r===null?0:Ud)|(i===null?0:ok)|(o===null?0:z2);if(e.writeInfo(s),r!==null&&e.writeLeftID(r),i!==null&&e.writeRightID(i),r===null&&i===null){const a=this.parent;if(a._item!==void 0){const c=a._item;if(c===null){const f=Tu(a);e.writeParentInfo(!0),e.writeString(f)}else e.writeParentInfo(!1),e.writeLeftID(c.id)}else a.constructor===String?(e.writeParentInfo(!0),e.writeString(a)):a.constructor===cd?(e.writeParentInfo(!1),e.writeLeftID(a)):Yo();o!==null&&e.writeString(o)}this.content.write(e,t)}};const Uk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},Wk="__ $YJS$ __";Uk[Wk]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");Uk[Wk]=!0;const EB=new ji("y-sync");new ji("y-undo");new ji("yjs-cursor");const TB=(n,e,t)=>{if(n===0)return Pg(e,0,-1);let r=e._first===null?null:e._first.content.type;for(;r!==null&&e!==r;){if(r instanceof Mu){if(r._length>=n)return Pg(r,n,-1);if(n-=r._length,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{do r=r._item===null?null:r._item.parent,n--;while(r!==e&&r!==null&&r._item!==null&&r._item.next===null);r!==null&&r!==e&&(r=r._item===null?null:r._item.next.content.type)}}else{const i=(t.get(r)||{nodeSize:0}).nodeSize;if(r._first!==null&&n<i)r=r._first.content.type,n--;else{if(n===1&&r._length===0&&i>1)return new Hd(r._item===null?null:r._item.id,r._item===null?Tu(r):null,null);if(n-=i,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{if(n===0)return r=r._item===null?r:r._item.parent,new Hd(r._item===null?null:r._item.id,r._item===null?Tu(r):null,null);do r=r._item.parent,n--;while(r!==e&&r._item.next===null);r!==e&&(r=r._item.next.content.type)}}}if(r===null)throw Yo();if(n===0&&r.constructor!==Mu&&r!==e)return RB(r._item.parent,r._item)}return Pg(e,e._length,-1)},RB=(n,e)=>{let t=null,r=null;return n._item===null?r=Tu(n):t=Ve(n._item.id.client,n._item.id.clock),new Hd(t,r,e.id)},AB="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",OB="ελ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",$a=(n,e)=>{for(const t in e)n[t]=e[t];return n},Hm="numeric",Vm="ascii",Gm="alpha",fd="asciinumeric",zf="alphanumeric",Jm="domain",Hk="emoji",IB="scheme",MB="slashscheme",OS="whitespace";function DB(n,e){return n in e||(e[n]=[]),e[n]}function Us(n,e,t){e[Hm]&&(e[fd]=!0,e[zf]=!0),e[Vm]&&(e[fd]=!0,e[Gm]=!0),e[fd]&&(e[zf]=!0),e[Gm]&&(e[zf]=!0),e[zf]&&(e[Jm]=!0),e[Hk]&&(e[Jm]=!0);for(const r in e){const i=DB(r,t);i.indexOf(n)<0&&i.push(n)}}function PB(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function mn(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}mn.groups={};mn.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],o=e.jr[r][1];if(o&&i.test(n))return o}return e.jd},has(n,e){return e===void 0&&(e=!1),e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let i=0;i<n.length;i++)this.tt(n[i],e,t,r)},tr(n,e,t,r){r=r||mn.groups;let i;return e&&e.j?i=e:(i=new mn(e),t&&r&&Us(e,t,r)),this.jr.push([n,i]),i},ts(n,e,t,r){let i=this;const o=n.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(n[s]);return i.tt(n[o-1],e,t,r)},tt(n,e,t,r){r=r||mn.groups;const i=this;if(e&&e.j)return i.j[n]=e,e;const o=e;let s,a=i.go(n);if(a?(s=new mn,$a(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new mn,o){if(r)if(s.t&&typeof s.t=="string"){const c=$a(PB(s.t,r),t);Us(o,c,r)}else t&&Us(o,t,r);s.t=o}return i.j[n]=s,s}};const we=(n,e,t,r,i)=>n.ta(e,t,r,i),Vn=(n,e,t,r,i)=>n.tr(e,t,r,i),IS=(n,e,t,r,i)=>n.ts(e,t,r,i),Z=(n,e,t,r,i)=>n.tt(e,t,r,i),Mi="WORD",Ym="UWORD",Du="LOCALHOST",Km="TLD",Xm="UTLD",dd="SCHEME",ya="SLASH_SCHEME",iv="NUM",Vk="WS",ov="NL",lu="OPENBRACE",au="CLOSEBRACE",Kd="OPENBRACKET",Xd="CLOSEBRACKET",Zd="OPENPAREN",Qd="CLOSEPAREN",qd="OPENANGLEBRACKET",eh="CLOSEANGLEBRACKET",th="FULLWIDTHLEFTPAREN",nh="FULLWIDTHRIGHTPAREN",rh="LEFTCORNERBRACKET",ih="RIGHTCORNERBRACKET",oh="LEFTWHITECORNERBRACKET",sh="RIGHTWHITECORNERBRACKET",lh="FULLWIDTHLESSTHAN",ah="FULLWIDTHGREATERTHAN",ch="AMPERSAND",uh="APOSTROPHE",fh="ASTERISK",Do="AT",dh="BACKSLASH",hh="BACKTICK",ph="CARET",Fo="COLON",sv="COMMA",gh="DOLLAR",$r="DOT",mh="EQUALS",lv="EXCLAMATION",zr="HYPHEN",yh="PERCENT",vh="PIPE",bh="PLUS",Sh="POUND",wh="QUERY",av="QUOTE",cv="SEMI",jr="SLASH",cu="TILDE",xh="UNDERSCORE",Gk="EMOJI",kh="SYM";var Jk=Object.freeze({__proto__:null,WORD:Mi,UWORD:Ym,LOCALHOST:Du,TLD:Km,UTLD:Xm,SCHEME:dd,SLASH_SCHEME:ya,NUM:iv,WS:Vk,NL:ov,OPENBRACE:lu,CLOSEBRACE:au,OPENBRACKET:Kd,CLOSEBRACKET:Xd,OPENPAREN:Zd,CLOSEPAREN:Qd,OPENANGLEBRACKET:qd,CLOSEANGLEBRACKET:eh,FULLWIDTHLEFTPAREN:th,FULLWIDTHRIGHTPAREN:nh,LEFTCORNERBRACKET:rh,RIGHTCORNERBRACKET:ih,LEFTWHITECORNERBRACKET:oh,RIGHTWHITECORNERBRACKET:sh,FULLWIDTHLESSTHAN:lh,FULLWIDTHGREATERTHAN:ah,AMPERSAND:ch,APOSTROPHE:uh,ASTERISK:fh,AT:Do,BACKSLASH:dh,BACKTICK:hh,CARET:ph,COLON:Fo,COMMA:sv,DOLLAR:gh,DOT:$r,EQUALS:mh,EXCLAMATION:lv,HYPHEN:zr,PERCENT:yh,PIPE:vh,PLUS:bh,POUND:Sh,QUERY:wh,QUOTE:av,SEMI:cv,SLASH:jr,TILDE:cu,UNDERSCORE:xh,EMOJI:Gk,SYM:kh});const da=/[a-z]/,Lg=new RegExp("\\p{L}","u"),Bg=new RegExp("\\p{Emoji}","u"),$g=/\d/,MS=/\s/,DS=`
17
- `,_B="️",NB="‍";let jf=null,Uf=null;function FB(n){n===void 0&&(n=[]);const e={};mn.groups=e;const t=new mn;jf==null&&(jf=PS(AB)),Uf==null&&(Uf=PS(OB)),Z(t,"'",uh),Z(t,"{",lu),Z(t,"}",au),Z(t,"[",Kd),Z(t,"]",Xd),Z(t,"(",Zd),Z(t,")",Qd),Z(t,"<",qd),Z(t,">",eh),Z(t,"(",th),Z(t,")",nh),Z(t,"「",rh),Z(t,"」",ih),Z(t,"『",oh),Z(t,"』",sh),Z(t,"<",lh),Z(t,">",ah),Z(t,"&",ch),Z(t,"*",fh),Z(t,"@",Do),Z(t,"`",hh),Z(t,"^",ph),Z(t,":",Fo),Z(t,",",sv),Z(t,"$",gh),Z(t,".",$r),Z(t,"=",mh),Z(t,"!",lv),Z(t,"-",zr),Z(t,"%",yh),Z(t,"|",vh),Z(t,"+",bh),Z(t,"#",Sh),Z(t,"?",wh),Z(t,'"',av),Z(t,"/",jr),Z(t,";",cv),Z(t,"~",cu),Z(t,"_",xh),Z(t,"\\",dh);const r=Vn(t,$g,iv,{[Hm]:!0});Vn(r,$g,r);const i=Vn(t,da,Mi,{[Vm]:!0});Vn(i,da,i);const o=Vn(t,Lg,Ym,{[Gm]:!0});Vn(o,da),Vn(o,Lg,o);const s=Vn(t,MS,Vk,{[OS]:!0});Z(t,DS,ov,{[OS]:!0}),Z(s,DS),Vn(s,MS,s);const a=Vn(t,Bg,Gk,{[Hk]:!0});Vn(a,Bg,a),Z(a,_B,a);const c=Z(a,NB);Vn(c,Bg,a);const f=[[da,i]],p=[[da,null],[Lg,o]];for(let m=0;m<jf.length;m++)Ro(t,jf[m],Km,Mi,f);for(let m=0;m<Uf.length;m++)Ro(t,Uf[m],Xm,Ym,p);Us(Km,{tld:!0,ascii:!0},e),Us(Xm,{utld:!0,alpha:!0},e),Ro(t,"file",dd,Mi,f),Ro(t,"mailto",dd,Mi,f),Ro(t,"http",ya,Mi,f),Ro(t,"https",ya,Mi,f),Ro(t,"ftp",ya,Mi,f),Ro(t,"ftps",ya,Mi,f),Us(dd,{scheme:!0,ascii:!0},e),Us(ya,{slashscheme:!0,ascii:!0},e),n=n.sort((m,S)=>m[0]>S[0]?1:-1);for(let m=0;m<n.length;m++){const S=n[m][0],E=n[m][1]?{[IB]:!0}:{[MB]:!0};S.indexOf("-")>=0?E[Jm]=!0:da.test(S)?$g.test(S)?E[fd]=!0:E[Vm]=!0:E[Hm]=!0,IS(t,S,S,E)}return IS(t,"localhost",Du,{ascii:!0}),t.jd=new mn(kh),{start:t,tokens:$a({groups:e},Jk)}}function LB(n,e){const t=BB(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=t.length,i=[];let o=0,s=0;for(;s<r;){let a=n,c=null,f=0,p=null,m=-1,S=-1;for(;s<r&&(c=a.go(t[s]));)a=c,a.accepts()?(m=0,S=0,p=a):m>=0&&(m+=t[s].length,S++),f+=t[s].length,o+=t[s].length,s++;o-=m,s-=S,f-=m,i.push({t:p.t,v:e.slice(o-f,o),s:o-f,e:o})}return i}function BB(n){const e=[],t=n.length;let r=0;for(;r<t;){let i=n.charCodeAt(r),o,s=i<55296||i>56319||r+1===t||(o=n.charCodeAt(r+1))<56320||o>57343?n[r]:n.slice(r,r+2);e.push(s),r+=s.length}return e}function Ro(n,e,t,r,i){let o;const s=e.length;for(let a=0;a<s-1;a++){const c=e[a];n.j[c]?o=n.j[c]:(o=new mn(r),o.jr=i.slice(),n.j[c]=o),n=o}return o=new mn(t),o.jr=i.slice(),n.j[e[s-1]]=o,o}function PS(n){const e=[],t=[];let r=0,i="0123456789";for(;r<n.length;){let o=0;for(;i.indexOf(n[r+o])>=0;)o++;if(o>0){e.push(t.join(""));for(let s=parseInt(n.substring(r,r+o),10);s>0;s--)t.pop();r+=o}else t.push(n[r]),r++}return e}const Pu={defaultProtocol:"http",events:null,format:_S,formatHref:_S,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function uv(n,e){e===void 0&&(e=null);let t=$a({},Pu);n&&(t=$a(t,n instanceof uv?n.o:n));const r=t.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=i}uv.prototype={o:Pu,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let i=this.o[n];return i&&(typeof i=="object"?(i=t.t in i?i[t.t]:Pu[n],typeof i=="function"&&r&&(i=i(e,t))):typeof i=="function"&&r&&(i=i(e,t.t,t)),i)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function _S(n){return n}function Yk(n,e){this.t="token",this.v=n,this.tk=e}Yk.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"…":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return n===void 0&&(n=Pu.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),i=n.get("tagName",t,e),o=this.toFormattedString(n),s={},a=n.get("className",t,e),c=n.get("target",t,e),f=n.get("rel",t,e),p=n.getObj("attributes",t,e),m=n.getObj("events",t,e);return s.href=r,a&&(s.class=a),c&&(s.target=c),f&&(s.rel=f),p&&$a(s,p),{tagName:i,attributes:s,content:o,eventListeners:m}}};function Uh(n,e){class t extends Yk{constructor(i,o){super(i,o),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const NS=Uh("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),FS=Uh("text"),$B=Uh("nl"),Wf=Uh("url",{isLink:!0,toHref(n){return n===void 0&&(n=Pu.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Du&&n[1].t===Fo}}),Gn=n=>new mn(n);function zB(n){let{groups:e}=n;const t=e.domain.concat([ch,fh,Do,dh,hh,ph,gh,mh,zr,iv,yh,vh,bh,Sh,jr,kh,cu,xh]),r=[uh,Fo,sv,$r,lv,wh,av,cv,qd,eh,lu,au,Xd,Kd,Zd,Qd,th,nh,rh,ih,oh,sh,lh,ah],i=[ch,uh,fh,dh,hh,ph,gh,mh,zr,lu,au,yh,vh,bh,Sh,wh,jr,kh,cu,xh],o=Gn(),s=Z(o,cu);we(s,i,s),we(s,e.domain,s);const a=Gn(),c=Gn(),f=Gn();we(o,e.domain,a),we(o,e.scheme,c),we(o,e.slashscheme,f),we(a,i,s),we(a,e.domain,a);const p=Z(a,Do);Z(s,Do,p),Z(c,Do,p),Z(f,Do,p);const m=Z(s,$r);we(m,i,s),we(m,e.domain,s);const S=Gn();we(p,e.domain,S),we(S,e.domain,S);const C=Z(S,$r);we(C,e.domain,S);const E=Gn(NS);we(C,e.tld,E),we(C,e.utld,E),Z(p,Du,E);const P=Z(S,zr);we(P,e.domain,S),we(E,e.domain,S),Z(E,$r,C),Z(E,zr,P);const D=Z(E,Fo);we(D,e.numeric,NS);const _=Z(a,zr),J=Z(a,$r);we(_,e.domain,a),we(J,i,s),we(J,e.domain,a);const ie=Gn(Wf);we(J,e.tld,ie),we(J,e.utld,ie),we(ie,e.domain,a),we(ie,i,s),Z(ie,$r,J),Z(ie,zr,_),Z(ie,Do,p);const oe=Z(ie,Fo),te=Gn(Wf);we(oe,e.numeric,te);const G=Gn(Wf),ne=Gn();we(G,t,G),we(G,r,ne),we(ne,t,G),we(ne,r,ne),Z(ie,jr,G),Z(te,jr,G);const ae=Z(c,Fo),Q=Z(f,Fo),Ee=Z(Q,jr),re=Z(Ee,jr);we(c,e.domain,a),Z(c,$r,J),Z(c,zr,_),we(f,e.domain,a),Z(f,$r,J),Z(f,zr,_),we(ae,e.domain,G),Z(ae,jr,G),we(re,e.domain,G),we(re,t,G),Z(re,jr,G);const X=[[lu,au],[Kd,Xd],[Zd,Qd],[qd,eh],[th,nh],[rh,ih],[oh,sh],[lh,ah]];for(let fe=0;fe<X.length;fe++){const[V,De]=X[fe],ye=Z(G,V);Z(ne,V,ye),Z(ye,De,G);const xe=Gn(Wf);we(ye,t,xe);const Ie=Gn();we(ye,r),we(xe,t,xe),we(xe,r,Ie),we(Ie,t,xe),we(Ie,r,Ie),Z(xe,De,G),Z(Ie,De,G)}return Z(o,Du,ie),Z(o,ov,$B),{start:o,tokens:Jk}}function jB(n,e,t){let r=t.length,i=0,o=[],s=[];for(;i<r;){let a=n,c=null,f=null,p=0,m=null,S=-1;for(;i<r&&!(c=a.go(t[i].t));)s.push(t[i++]);for(;i<r&&(f=c||a.go(t[i].t));)c=null,a=f,a.accepts()?(S=0,m=a):S>=0&&S++,i++,p++;if(S<0)i-=p,i<r&&(s.push(t[i]),i++);else{s.length>0&&(o.push(zg(FS,e,s)),s=[]),i-=S,p-=S;const C=m.t,E=t.slice(i-p,i);o.push(zg(C,e,E))}}return s.length>0&&o.push(zg(FS,e,s)),o}function zg(n,e,t){const r=t[0].s,i=t[t.length-1].e,o=e.slice(r,i);return new n(o,t)}const UB=typeof console<"u"&&console&&console.warn||(()=>{}),WB="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ze={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function HB(){mn.groups={},Ze.scanner=null,Ze.parser=null,Ze.tokenQueue=[],Ze.pluginQueue=[],Ze.customSchemes=[],Ze.initialized=!1}function VB(n,e){if(e===void 0&&(e=!1),Ze.initialized&&UB(`linkifyjs: already initialized - will not register custom scheme "${n}" ${WB}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
13
+ `+e.prev}function _f(n,e){var t=mm(n),r=[];if(t){r.length=n.length;for(var i=0;i<n.length;i++)r[i]=Io(n,i)?e(n[i],n):""}var o=typeof gg=="function"?gg(n):[],s;if(_a){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var c in n)Io(n,c)&&(t&&String(Number(c))===c&&c<n.length||_a&&s["$"+c]instanceof Symbol||(n1.call(/[^\w$]/,c)?r.push(e(c,n)+": "+e(n[c],n)):r.push(c+": "+e(n[c],n))));if(typeof gg=="function")for(var f=0;f<o.length;f++)r1.call(n,o[f])&&r.push("["+e(o[f])+"]: "+e(n[o[f]],n));return r}var a1=Zr,Ga=Zn,AI=cI,OI=Zo,Nf=a1("%WeakMap%",!0),Ff=a1("%Map%",!0),II=Ga("WeakMap.prototype.get",!0),MI=Ga("WeakMap.prototype.set",!0),DI=Ga("WeakMap.prototype.has",!0),PI=Ga("Map.prototype.get",!0),_I=Ga("Map.prototype.set",!0),NI=Ga("Map.prototype.has",!0),$y=function(n,e){for(var t=n,r;(r=t.next)!==null;t=r)if(r.key===e)return t.next=r.next,r.next=n.next,n.next=r,r},FI=function(n,e){var t=$y(n,e);return t&&t.value},LI=function(n,e,t){var r=$y(n,e);r?r.value=t:n.next={key:e,next:n.next,value:t}},BI=function(n,e){return!!$y(n,e)},c1=function(){var e,t,r,i={assert:function(o){if(!i.has(o))throw new OI("Side channel does not contain "+AI(o))},get:function(o){if(Nf&&o&&(typeof o=="object"||typeof o=="function")){if(e)return II(e,o)}else if(Ff){if(t)return PI(t,o)}else if(r)return FI(r,o)},has:function(o){if(Nf&&o&&(typeof o=="object"||typeof o=="function")){if(e)return DI(e,o)}else if(Ff){if(t)return NI(t,o)}else if(r)return BI(r,o);return!1},set:function(o,s){Nf&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new Nf),MI(e,o,s)):Ff?(t||(t=new Ff),_I(t,o,s)):(r||(r={key:{},next:null}),LI(r,o,s))}};return i},$I=Fx,Jc=c1(),Oi=Zo,zy={assert:function(n,e){if(!n||typeof n!="object"&&typeof n!="function")throw new Oi("`O` is not an object");if(typeof e!="string")throw new Oi("`slot` must be a string");if(Jc.assert(n),!zy.has(n,e))throw new Oi("`"+e+"` is not present on `O`")},get:function(n,e){if(!n||typeof n!="object"&&typeof n!="function")throw new Oi("`O` is not an object");if(typeof e!="string")throw new Oi("`slot` must be a string");var t=Jc.get(n);return t&&t["$"+e]},has:function(n,e){if(!n||typeof n!="object"&&typeof n!="function")throw new Oi("`O` is not an object");if(typeof e!="string")throw new Oi("`slot` must be a string");var t=Jc.get(n);return!!t&&$I(t,"$"+e)},set:function(n,e,t){if(!n||typeof n!="object"&&typeof n!="function")throw new Oi("`O` is not an object");if(typeof e!="string")throw new Oi("`slot` must be a string");var r=Jc.get(n);r||(r={},Jc.set(n,r)),r["$"+e]=t}};Object.freeze&&Object.freeze(zy);var zI=zy,Yc=zI,jI=SyntaxError,Yb=typeof StopIteration=="object"?StopIteration:null,UI=function(e){if(!Yb)throw new jI("this environment lacks StopIteration");Yc.set(e,"[[Done]]",!1);var t={next:function(){var i=Yc.get(this,"[[Iterator]]"),o=Yc.get(i,"[[Done]]");try{return{done:o,value:o?void 0:i.next()}}catch(s){if(Yc.set(i,"[[Done]]",!0),s!==Yb)throw s;return{done:!0,value:void 0}}}};return Yc.set(t,"[[Iterator]]",e),t},WI={}.toString,u1=Array.isArray||function(n){return WI.call(n)=="[object Array]"},HI=String.prototype.valueOf,VI=function(e){try{return HI.call(e),!0}catch{return!1}},GI=Object.prototype.toString,JI="[object String]",YI=ll(),f1=function(e){return typeof e=="string"?!0:typeof e!="object"?!1:YI?VI(e):GI.call(e)===JI},jy=typeof Map=="function"&&Map.prototype?Map:null,KI=typeof Set=="function"&&Set.prototype?Set:null,_d;jy||(_d=function(e){return!1});var d1=jy?Map.prototype.has:null,Kb=KI?Set.prototype.has:null;!_d&&!d1&&(_d=function(e){return!1});var h1=_d||function(e){if(!e||typeof e!="object")return!1;try{if(d1.call(e),Kb)try{Kb.call(e)}catch{return!0}return e instanceof jy}catch{}return!1},XI=typeof Map=="function"&&Map.prototype?Map:null,Uy=typeof Set=="function"&&Set.prototype?Set:null,Nd;Uy||(Nd=function(e){return!1});var Xb=XI?Map.prototype.has:null,p1=Uy?Set.prototype.has:null;!Nd&&!p1&&(Nd=function(e){return!1});var g1=Nd||function(e){if(!e||typeof e!="object")return!1;try{if(p1.call(e),Xb)try{Xb.call(e)}catch{return!0}return e instanceof Uy}catch{}return!1},Zb=t1,Qb=UI;if(Iy()||Fh()){var yg=Symbol.iterator;id.exports=function(e){if(e!=null&&typeof e[yg]<"u")return e[yg]();if(Zb(e))return Array.prototype[yg].call(e)}}else{var ZI=u1,QI=f1,qb=Zr,qI=qb("%Map%",!0),eM=qb("%Set%",!0),pr=Zn,e0=pr("Array.prototype.push"),t0=pr("String.prototype.charCodeAt"),tM=pr("String.prototype.slice"),nM=function(e,t){var r=e.length;if(t+1>=r)return t+1;var i=t0(e,t);if(i<55296||i>56319)return t+1;var o=t0(e,t+1);return o<56320||o>57343?t+1:t+2},vg=function(e){var t=0;return{next:function(){var i=t>=e.length,o;return i||(o=e[t],t+=1),{done:i,value:o}}}},n0=function(e,t){if(ZI(e)||Zb(e))return vg(e);if(QI(e)){var r=0;return{next:function(){var o=nM(e,r),s=tM(e,r,o);return r=o,{done:o>e.length,value:s}}}}if(t&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!qI&&!eM)id.exports=function(e){if(e!=null)return n0(e,!0)};else{var rM=h1,iM=g1,r0=pr("Map.prototype.forEach",!0),i0=pr("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var o0=pr("Map.prototype.iterator",!0),s0=pr("Set.prototype.iterator",!0);var l0=pr("Map.prototype.@@iterator",!0)||pr("Map.prototype._es6-shim iterator_",!0),a0=pr("Set.prototype.@@iterator",!0)||pr("Set.prototype._es6-shim iterator_",!0),oM=function(e){if(rM(e)){if(o0)return Qb(o0(e));if(l0)return l0(e);if(r0){var t=[];return r0(e,function(i,o){e0(t,[o,i])}),vg(t)}}if(iM(e)){if(s0)return Qb(s0(e));if(a0)return a0(e);if(i0){var r=[];return i0(e,function(i){e0(r,i)}),vg(r)}}};id.exports=function(e){return oM(e)||n0(e)}}}var sM=id.exports,c0=function(n){return n!==n},m1=function(e,t){return e===0&&t===0?1/e===1/t:!!(e===t||c0(e)&&c0(t))},lM=m1,y1=function(){return typeof Object.is=="function"?Object.is:lM},aM=y1,cM=sl,uM=function(){var e=aM();return cM(Object,{is:e},{is:function(){return Object.is!==e}}),e},fM=sl,dM=Va,hM=m1,v1=y1,pM=uM,b1=dM(v1(),Object);fM(b1,{getPolyfill:v1,implementation:hM,shim:pM});var gM=b1,mM=Va,S1=Zn,yM=Zr,vm=yM("%ArrayBuffer%",!0),od=S1("ArrayBuffer.prototype.byteLength",!0),vM=S1("Object.prototype.toString"),u0=!!vm&&!od&&new vm(0).slice,f0=!!u0&&mM(u0),w1=od||f0?function(e){if(!e||typeof e!="object")return!1;try{return od?od(e):f0(e,0),!0}catch{return!1}}:vm?function(e){return vM(e)==="[object ArrayBuffer]"}:function(e){return!1},bM=Date.prototype.getDay,SM=function(e){try{return bM.call(e),!0}catch{return!1}},wM=Object.prototype.toString,xM="[object Date]",kM=ll(),CM=function(e){return typeof e!="object"||e===null?!1:kM?SM(e):wM.call(e)===xM},bm=Zn,x1=ll(),k1,C1,Sm,wm;if(x1){k1=bm("Object.prototype.hasOwnProperty"),C1=bm("RegExp.prototype.exec"),Sm={};var bg=function(){throw Sm};wm={toString:bg,valueOf:bg},typeof Symbol.toPrimitive=="symbol"&&(wm[Symbol.toPrimitive]=bg)}var EM=bm("Object.prototype.toString"),TM=Object.getOwnPropertyDescriptor,RM="[object RegExp]",AM=x1?function(e){if(!e||typeof e!="object")return!1;var t=TM(e,"lastIndex"),r=t&&k1(t,"value");if(!r)return!1;try{C1(e,wm)}catch(i){return i===Sm}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:EM(e)===RM},OM=Zn,d0=OM("SharedArrayBuffer.prototype.byteLength",!0),IM=d0?function(e){if(!e||typeof e!="object")return!1;try{return d0(e),!0}catch{return!1}}:function(e){return!1},MM=Number.prototype.toString,DM=function(e){try{return MM.call(e),!0}catch{return!1}},PM=Object.prototype.toString,_M="[object Number]",NM=ll(),FM=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:NM?DM(e):PM.call(e)===_M},E1=Zn,LM=E1("Boolean.prototype.toString"),BM=E1("Object.prototype.toString"),$M=function(e){try{return LM(e),!0}catch{return!1}},zM="[object Boolean]",jM=ll(),UM=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:jM&&Symbol.toStringTag in e?$M(e):BM(e)===zM},xm={exports:{}},WM=Object.prototype.toString,HM=Iy();if(HM){var VM=Symbol.prototype.toString,GM=/^Symbol\(.*\)$/,JM=function(e){return typeof e.valueOf()!="symbol"?!1:GM.test(VM.call(e))};xm.exports=function(e){if(typeof e=="symbol")return!0;if(WM.call(e)!=="[object Symbol]")return!1;try{return JM(e)}catch{return!1}}}else xm.exports=function(e){return!1};var YM=xm.exports,km={exports:{}},h0=typeof BigInt<"u"&&BigInt,KM=function(){return typeof h0=="function"&&typeof BigInt=="function"&&typeof h0(42)=="bigint"&&typeof BigInt(42)=="bigint"},XM=KM();if(XM){var ZM=BigInt.prototype.valueOf,QM=function(e){try{return ZM.call(e),!0}catch{}return!1};km.exports=function(e){return e===null||typeof e>"u"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:QM(e)}}else km.exports=function(e){return!1};var qM=km.exports,eD=f1,tD=FM,nD=UM,rD=YM,iD=qM,oD=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(eD(e))return"String";if(tD(e))return"Number";if(nD(e))return"Boolean";if(rD(e))return"Symbol";if(iD(e))return"BigInt"},Fd=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,p0=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Ld;Fd||(Ld=function(e){return!1});var Cm=Fd?Fd.prototype.has:null,Sg=p0?p0.prototype.has:null;!Ld&&!Cm&&(Ld=function(e){return!1});var sD=Ld||function(e){if(!e||typeof e!="object")return!1;try{if(Cm.call(e,Cm),Sg)try{Sg.call(e,Sg)}catch{return!0}return e instanceof Fd}catch{}return!1},Em={exports:{}},lD=Zr,T1=Zn,aD=lD("%WeakSet%",!0),wg=T1("WeakSet.prototype.has",!0);if(wg){var xg=T1("WeakMap.prototype.has",!0);Em.exports=function(e){if(!e||typeof e!="object")return!1;try{if(wg(e,wg),xg)try{xg(e,xg)}catch{return!0}return e instanceof aD}catch{}return!1}}else Em.exports=function(e){return!1};var cD=Em.exports,uD=h1,fD=g1,dD=sD,hD=cD,pD=function(e){if(e&&typeof e=="object"){if(uD(e))return"Map";if(fD(e))return"Set";if(dD(e))return"WeakMap";if(hD(e))return"WeakSet"}return!1},R1=Function.prototype.toString,Sa=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Tm,sd;if(typeof Sa=="function"&&typeof Object.defineProperty=="function")try{Tm=Object.defineProperty({},"length",{get:function(){throw sd}}),sd={},Sa(function(){throw 42},null,Tm)}catch(n){n!==sd&&(Sa=null)}else Sa=null;var gD=/^\s*class\b/,Rm=function(e){try{var t=R1.call(e);return gD.test(t)}catch{return!1}},kg=function(e){try{return Rm(e)?!1:(R1.call(e),!0)}catch{return!1}},ld=Object.prototype.toString,mD="[object Object]",yD="[object Function]",vD="[object GeneratorFunction]",bD="[object HTMLAllCollection]",SD="[object HTML document.all class]",wD="[object HTMLCollection]",xD=typeof Symbol=="function"&&!!Symbol.toStringTag,kD=!(0 in[,]),Am=function(){return!1};if(typeof document=="object"){var CD=document.all;ld.call(CD)===ld.call(document.all)&&(Am=function(e){if((kD||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=ld.call(e);return(t===bD||t===SD||t===wD||t===mD)&&e("")==null}catch{}return!1})}var ED=Sa?function(e){if(Am(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Sa(e,null,Tm)}catch(t){if(t!==sd)return!1}return!Rm(e)&&kg(e)}:function(e){if(Am(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(xD)return kg(e);if(Rm(e))return!1;var t=ld.call(e);return t!==yD&&t!==vD&&!/^\[object HTML/.test(t)?!1:kg(e)},TD=ED,RD=Object.prototype.toString,A1=Object.prototype.hasOwnProperty,AD=function(e,t,r){for(var i=0,o=e.length;i<o;i++)A1.call(e,i)&&(r==null?t(e[i],i,e):t.call(r,e[i],i,e))},OD=function(e,t,r){for(var i=0,o=e.length;i<o;i++)r==null?t(e.charAt(i),i,e):t.call(r,e.charAt(i),i,e)},ID=function(e,t,r){for(var i in e)A1.call(e,i)&&(r==null?t(e[i],i,e):t.call(r,e[i],i,e))},MD=function(e,t,r){if(!TD(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),RD.call(e)==="[object Array]"?AD(e,t,i):typeof e=="string"?OD(e,t,i):ID(e,t,i)},DD=MD,PD=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Cg=PD,_D=typeof globalThis>"u"?xu:globalThis,ND=function(){for(var e=[],t=0;t<Cg.length;t++)typeof _D[Cg[t]]=="function"&&(e[e.length]=Cg[t]);return e},Bd=DD,FD=ND,g0=Va,Wy=Zn,ad=Py,LD=Wy("Object.prototype.toString"),O1=ll(),m0=typeof globalThis>"u"?xu:globalThis,Om=FD(),Hy=Wy("String.prototype.slice"),Eg=Object.getPrototypeOf,BD=Wy("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},$d={__proto__:null};O1&&ad&&Eg?Bd(Om,function(n){var e=new m0[n];if(Symbol.toStringTag in e){var t=Eg(e),r=ad(t,Symbol.toStringTag);if(!r){var i=Eg(t);r=ad(i,Symbol.toStringTag)}$d["$"+n]=g0(r.get)}}):Bd(Om,function(n){var e=new m0[n],t=e.slice||e.set;t&&($d["$"+n]=g0(t))});var $D=function(e){var t=!1;return Bd($d,function(r,i){if(!t)try{"$"+r(e)===i&&(t=Hy(i,1))}catch{}}),t},zD=function(e){var t=!1;return Bd($d,function(r,i){if(!t)try{r(e),t=Hy(i,1)}catch{}}),t},jD=function(e){if(!e||typeof e!="object")return!1;if(!O1){var t=Hy(LD(e),8,-1);return BD(Om,t)>-1?t:t!=="Object"?!1:zD(e)}return ad?$D(e):null},UD=Zn,y0=UD("ArrayBuffer.prototype.byteLength",!0),WD=w1,HD=function(e){return WD(e)?y0?y0(e):e.byteLength:NaN},I1=xO,Qr=Zn,v0=GO,VD=Zr,Na=sM,GD=c1,b0=gM,S0=t1,w0=u1,x0=w1,k0=CM,C0=AM,E0=IM,T0=Oy,R0=oD,A0=pD,O0=jD,I0=HD,M0=Qr("SharedArrayBuffer.prototype.byteLength",!0),D0=Qr("Date.prototype.getTime"),Tg=Object.getPrototypeOf,P0=Qr("Object.prototype.toString"),zd=VD("%Set%",!0),Im=Qr("Map.prototype.has",!0),jd=Qr("Map.prototype.get",!0),_0=Qr("Map.prototype.size",!0),Ud=Qr("Set.prototype.add",!0),M1=Qr("Set.prototype.delete",!0),Wd=Qr("Set.prototype.has",!0),cd=Qr("Set.prototype.size",!0);function N0(n,e,t,r){for(var i=Na(n),o;(o=i.next())&&!o.done;)if(yr(e,o.value,t,r))return M1(n,o.value),!0;return!1}function D1(n){if(typeof n>"u")return null;if(typeof n!="object")return typeof n=="symbol"?!1:typeof n=="string"||typeof n=="number"?+n==+n:!0}function JD(n,e,t,r,i,o){var s=D1(t);if(s!=null)return s;var a=jd(e,s),c=I1({},i,{strict:!1});return typeof a>"u"&&!Im(e,s)||!yr(r,a,c,o)?!1:!Im(n,s)&&yr(r,a,c,o)}function YD(n,e,t){var r=D1(t);return r??(Wd(e,r)&&!Wd(n,r))}function F0(n,e,t,r,i,o){for(var s=Na(n),a,c;(a=s.next())&&!a.done;)if(c=a.value,yr(t,c,i,o)&&yr(r,jd(e,c),i,o))return M1(n,c),!0;return!1}function yr(n,e,t,r){var i=t||{};if(i.strict?b0(n,e):n===e)return!0;var o=R0(n),s=R0(e);if(o!==s)return!1;if(!n||!e||typeof n!="object"&&typeof e!="object")return i.strict?b0(n,e):n==e;var a=r.has(n),c=r.has(e),f;if(a&&c){if(r.get(n)===r.get(e))return!0}else f={};return a||r.set(n,f),c||r.set(e,f),ZD(n,e,i,r)}function L0(n){return!n||typeof n!="object"||typeof n.length!="number"||typeof n.copy!="function"||typeof n.slice!="function"||n.length>0&&typeof n[0]!="number"?!1:!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))}function KD(n,e,t,r){if(cd(n)!==cd(e))return!1;for(var i=Na(n),o=Na(e),s,a,c;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object")c||(c=new zd),Ud(c,s.value);else if(!Wd(e,s.value)){if(t.strict||!YD(n,e,s.value))return!1;c||(c=new zd),Ud(c,s.value)}if(c){for(;(a=o.next())&&!a.done;)if(a.value&&typeof a.value=="object"){if(!N0(c,a.value,t.strict,r))return!1}else if(!t.strict&&!Wd(n,a.value)&&!N0(c,a.value,t.strict,r))return!1;return cd(c)===0}return!0}function XD(n,e,t,r){if(_0(n)!==_0(e))return!1;for(var i=Na(n),o=Na(e),s,a,c,f,p,m;(s=i.next())&&!s.done;)if(f=s.value[0],p=s.value[1],f&&typeof f=="object")c||(c=new zd),Ud(c,f);else if(m=jd(e,f),typeof m>"u"&&!Im(e,f)||!yr(p,m,t,r)){if(t.strict||!JD(n,e,f,p,t,r))return!1;c||(c=new zd),Ud(c,f)}if(c){for(;(a=o.next())&&!a.done;)if(f=a.value[0],m=a.value[1],f&&typeof f=="object"){if(!F0(c,n,f,m,t,r))return!1}else if(!t.strict&&(!n.has(f)||!yr(jd(n,f),m,t,r))&&!F0(c,n,f,m,I1({},t,{strict:!1}),r))return!1;return cd(c)===0}return!0}function ZD(n,e,t,r){var i,o;if(typeof n!=typeof e||n==null||e==null||P0(n)!==P0(e)||S0(n)!==S0(e))return!1;var s=w0(n),a=w0(e);if(s!==a)return!1;var c=n instanceof Error,f=e instanceof Error;if(c!==f||(c||f)&&(n.name!==e.name||n.message!==e.message))return!1;var p=C0(n),m=C0(e);if(p!==m||(p||m)&&(n.source!==e.source||v0(n)!==v0(e)))return!1;var S=k0(n),C=k0(e);if(S!==C||(S||C)&&D0(n)!==D0(e)||t.strict&&Tg&&Tg(n)!==Tg(e))return!1;var E=O0(n),P=O0(e);if(E!==P)return!1;if(E||P){if(n.length!==e.length)return!1;for(i=0;i<n.length;i++)if(n[i]!==e[i])return!1;return!0}var D=L0(n),_=L0(e);if(D!==_)return!1;if(D||_){if(n.length!==e.length)return!1;for(i=0;i<n.length;i++)if(n[i]!==e[i])return!1;return!0}var J=x0(n),ie=x0(e);if(J!==ie)return!1;if(J||ie)return I0(n)!==I0(e)?!1:typeof Uint8Array=="function"&&yr(new Uint8Array(n),new Uint8Array(e),t,r);var oe=E0(n),te=E0(e);if(oe!==te)return!1;if(oe||te)return M0(n)!==M0(e)?!1:typeof Uint8Array=="function"&&yr(new Uint8Array(n),new Uint8Array(e),t,r);if(typeof n!=typeof e)return!1;var G=T0(n),ne=T0(e);if(G.length!==ne.length)return!1;for(G.sort(),ne.sort(),i=G.length-1;i>=0;i--)if(G[i]!=ne[i])return!1;for(i=G.length-1;i>=0;i--)if(o=G[i],!yr(n[o],e[o],t,r))return!1;var ae=A0(n),Q=A0(e);return ae!==Q?!1:ae==="Set"||Q==="Set"?KD(n,e,t,r):ae==="Map"?XD(n,e,t,r):!0}var QD=function(e,t,r){return yr(e,t,r,GD())};const qD=Px(QD),B0=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,$0=Rx,eP=(n,e)=>t=>{var r;if((e==null?void 0:e.variants)==null)return $0(n,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:i,defaultVariants:o}=e,s=Object.keys(i).map(f=>{const p=t==null?void 0:t[f],m=o==null?void 0:o[f];if(p===null)return null;const S=B0(p)||B0(m);return i[f][S]}),a=t&&Object.entries(t).reduce((f,p)=>{let[m,S]=p;return S===void 0||(f[m]=S),f},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:m,className:S,...C}=p;return Object.entries(C).every(E=>{let[P,D]=E;return Array.isArray(D)?D.includes({...o,...a}[P]):{...o,...a}[P]===D})?[...f,m,S]:f},[]);return $0(n,s,c,t==null?void 0:t.class,t==null?void 0:t.className)};var qc,ud,lu;function tP(){for(;qc!==void 0;){const n=qc,e=n.nextNotify;e!==void 0?(n.nextNotify=void 0,qc=e):(qc=void 0,ud=void 0),n.notify()}}function P1(n,e){const t=e.depsTail,r=t!==void 0?t.nextDep:e.deps;return r!==void 0&&r.dep===n?(e.depsTail=r,r):nP(n,e,r,t)}function nP(n,e,t,r){let i;if(lu!==void 0?(i=lu,lu=i.nextDep,i.nextDep=t,i.dep=n,i.sub=e):i={dep:n,sub:e,nextDep:t,prevSub:void 0,nextSub:void 0},r===void 0?e.deps=i:r.nextDep=i,n.subs===void 0)n.subs=i;else{const o=n.subsTail;i.prevSub=o,o.nextSub=i}return e.depsTail=i,n.subsTail=i,i}function rP(n){let e=16,t=n,r=0,i;e:do{const o=t.sub,s=o.flags;if(s&1){if(iP(t,o))if(s&28)s&e||(o.flags=s|e);else{o.flags=s|e|2;const a=o.subs;if(a!==void 0){a.nextSub!==void 0?(a.prevSub=n,t=n=a,e=8,++r):(t=a,e="notify"in o?4:8);continue}}}else if(!(s&28)&&(o.flags=s|e,!0)||s&2&&(o.flags=s&-3|e,!0)){const a=o.subs;if(a!==void 0){a.nextSub!==void 0?(a.prevSub=n,t=n=a,e=8,++r):(t=a,e="notify"in o?4:8);continue}"notify"in o&&(ud!==void 0?ud.nextNotify=o:qc=o,ud=o)}else s&e||(o.flags=s|e);if((i=n.nextSub)===void 0){if(r){let a=n.dep;do{--r;const c=a.subs,f=c.prevSub;if(c.prevSub=void 0,t=n=f.nextSub,n!==void 0){e=r?8:16;continue e}a=f.dep}while(r)}break}t!==n&&(e=r?8:16),t=n=i}while(!0);tP()}function z0(n){do{const e=n.sub,t=e.flags;(t&24)===8&&(e.flags=t|16),n=n.nextSub}while(n!==void 0)}function iP(n,e){const t=e.depsTail;if(t!==void 0){let r=e.deps;do{if(r===n)return!0;if(r===t)break;r=r.nextDep}while(r!==void 0)}return!1}function oP(n){let e=0,t,r;e:do{t=!1;const i=n.dep;if("update"in i){const o=i.flags;if(o&16){if(i.update()){const s=i.subs;s.nextSub!==void 0&&z0(s),t=!0}}else if(o&8){const s=i.subs;s.nextSub!==void 0&&(s.prevSub=n),n=i.deps,++e;continue}}if(t||(r=n.nextDep)===void 0){if(e){let o=n.sub;do{--e;const s=o.subs;let a=s.prevSub;if(a!==void 0)if(s.prevSub=void 0,t){if(o.update()){z0(o.subs),o=a.sub;continue}}else o.flags&=-9;else{if(t){if(o.update()){o=s.sub;continue}}else o.flags&=-9;a=s}if(n=a.nextDep,n!==void 0)continue e;o=a.sub,t=!1}while(e)}return t}n=r}while(!0)}function j0(n){n.depsTail=void 0,n.flags=1}function U0(n){const e=n.depsTail;e!==void 0?e.nextDep!==void 0&&(W0(e.nextDep),e.nextDep=void 0):n.deps!==void 0&&(W0(n.deps),n.deps=void 0),n.flags&=-2}function W0(n){do{const e=n.dep,t=n.nextDep,r=n.nextSub,i=n.prevSub;if(r!==void 0?(r.prevSub=i,n.nextSub=void 0):(e.subsTail=i,"lastTrackedId"in e&&(e.lastTrackedId=0)),i!==void 0?(i.nextSub=r,n.prevSub=void 0):e.subs=r,n.dep=void 0,n.sub=void 0,n.nextDep=lu,lu=n,e.subs===void 0&&"deps"in e){if("notify"in e)e.flags=0;else{const s=e.flags;s&16||(e.flags=s|16)}const o=e.deps;if(o!==void 0){n=o,e.depsTail.nextDep=t,e.deps=void 0,e.depsTail=void 0;continue}}n=t}while(n!==void 0)}var Hd,Ta=0,sP=0;function H0(n,e){Hd=n,Ta=e}function lP(){return++sP}function _1(n){const e=new aP(n);return e.run(),e}var aP=class{constructor(n){this.fn=n,this.nextNotify=void 0,this.subs=void 0,this.subsTail=void 0,this.deps=void 0,this.depsTail=void 0,this.flags=16,Ta&&P1(this,Hd)}notify(){let n=this.flags;if(n&16){this.run();return}if(n&8)if(oP(this.deps)){this.run();return}else this.flags=n&=-9;if(n&4){this.flags=n&-5;let e=this.deps;do{const t=e.dep;"notify"in t&&t.notify(),e=e.nextDep}while(e!==void 0)}}run(){const n=Hd,e=Ta;H0(this,lP()),j0(this);try{return this.fn()}finally{H0(n,e),U0(this)}}stop(){j0(this),U0(this)}};function cP(n){return new uP(n)}var uP=class{constructor(n){this.currentValue=n,this.subs=void 0,this.subsTail=void 0,this.lastTrackedId=0}get(){return Ta&&this.lastTrackedId!==Ta&&(this.lastTrackedId=Ta,P1(this,Hd)),this.currentValue}set(n){if(this.currentValue!==(this.currentValue=n)){const e=this.subs;e!==void 0&&rP(e)}}};function fP(n){return cP(n)}function dP(n){return[rl.useSyncExternalStore(e=>{let t=_1(()=>{n.get(),e()});return()=>t.stop()},()=>n.get(),()=>n.get()),e=>{typeof e=="function"?n.set(e(n.get())):n.set(e)}]}function hP(n){return rl.useSyncExternalStore(e=>{let t=_1(()=>{n.get(),e()});return()=>t.stop()},()=>n.get(),()=>n.get())}var N1={exports:{}};(function(n,e){(function(r,i){n.exports=i(rl,xC)})(xu,function(t,r){return function(i){var o={};function s(a){if(o[a])return o[a].exports;var c=o[a]={i:a,l:!1,exports:{}};return i[a].call(c.exports,c,c.exports,s),c.l=!0,c.exports}return s.m=i,s.c=o,s.d=function(a,c,f){s.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:f})},s.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},s.t=function(a,c){if(c&1&&(a=s(a)),c&8||c&4&&typeof a=="object"&&a&&a.__esModule)return a;var f=Object.create(null);if(s.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:a}),c&2&&typeof a!="string")for(var p in a)s.d(f,p,(function(m){return a[m]}).bind(null,p));return f},s.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(c,"a",c),c},s.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)},s.p="",s(s.s=4)}([function(i,o,s){i.exports=s(5)()},function(i,o){i.exports=t},function(i,o){i.exports=r},function(i,o){i.exports=function(s,a,c){var f=s.direction,p=s.value;switch(f){case"top":return c.top+p<a.top&&c.bottom>a.bottom&&c.left<a.left&&c.right>a.right;case"left":return c.left+p<a.left&&c.bottom>a.bottom&&c.top<a.top&&c.right>a.right;case"bottom":return c.bottom-p>a.bottom&&c.left<a.left&&c.right>a.right&&c.top<a.top;case"right":return c.right-p>a.right&&c.left<a.left&&c.top<a.top&&c.bottom>a.bottom}}},function(i,o,s){s.r(o),s.d(o,"default",function(){return Ee});var a=s(1),c=s.n(a),f=s(2),p=s.n(f),m=s(0),S=s.n(m),C=s(3),E=s.n(C);function P(re){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(fe){return typeof fe}:P=function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},P(re)}function D(re,X){if(!(re instanceof X))throw new TypeError("Cannot call a class as a function")}function _(re,X){for(var fe=0;fe<X.length;fe++){var V=X[fe];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(re,V.key,V)}}function J(re,X,fe){return X&&_(re.prototype,X),re}function ie(re,X){return X&&(P(X)==="object"||typeof X=="function")?X:te(re)}function oe(re){return oe=Object.setPrototypeOf?Object.getPrototypeOf:function(fe){return fe.__proto__||Object.getPrototypeOf(fe)},oe(re)}function te(re){if(re===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re}function G(re,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");re.prototype=Object.create(X&&X.prototype,{constructor:{value:re,writable:!0,configurable:!0}}),X&&ne(re,X)}function ne(re,X){return ne=Object.setPrototypeOf||function(V,De){return V.__proto__=De,V},ne(re,X)}function ae(re,X,fe){return X in re?Object.defineProperty(re,X,{value:fe,enumerable:!0,configurable:!0,writable:!0}):re[X]=fe,re}function Q(re){return re.width===void 0&&(re.width=re.right-re.left),re.height===void 0&&(re.height=re.bottom-re.top),re}var Ee=function(re){G(X,re);function X(fe){var V;return D(this,X),V=ie(this,oe(X).call(this,fe)),ae(te(V),"getContainer",function(){return V.props.containment||window}),ae(te(V),"addEventListener",function(De,ye,xe,Ie){V.debounceCheck||(V.debounceCheck={});var be,lt,pe=function(){be=null,V.check()};Ie>-1?lt=function(){be||(be=setTimeout(pe,Ie||0))}:lt=function(){clearTimeout(be),be=setTimeout(pe,xe||0)};var Me={target:De,fn:lt,getLastTimeout:function(){return be}};De.addEventListener(ye,Me.fn),V.debounceCheck[ye]=Me}),ae(te(V),"startWatching",function(){V.debounceCheck||V.interval||(V.props.intervalCheck&&(V.interval=setInterval(V.check,V.props.intervalDelay)),V.props.scrollCheck&&V.addEventListener(V.getContainer(),"scroll",V.props.scrollDelay,V.props.scrollThrottle),V.props.resizeCheck&&V.addEventListener(window,"resize",V.props.resizeDelay,V.props.resizeThrottle),!V.props.delayedCall&&V.check())}),ae(te(V),"stopWatching",function(){if(V.debounceCheck){for(var De in V.debounceCheck)if(V.debounceCheck.hasOwnProperty(De)){var ye=V.debounceCheck[De];clearTimeout(ye.getLastTimeout()),ye.target.removeEventListener(De,ye.fn),V.debounceCheck[De]=null}}V.debounceCheck=null,V.interval&&(V.interval=clearInterval(V.interval))}),ae(te(V),"check",function(){var De=V.node,ye,xe;if(!De)return V.state;if(ye=Q(V.roundRectDown(De.getBoundingClientRect())),V.props.containment){var Ie=V.props.containment.getBoundingClientRect();xe={top:Ie.top,left:Ie.left,bottom:Ie.bottom,right:Ie.right}}else xe={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var be=V.props.offset||{},lt=P(be)==="object";lt&&(xe.top+=be.top||0,xe.left+=be.left||0,xe.bottom-=be.bottom||0,xe.right-=be.right||0);var pe={top:ye.top>=xe.top,left:ye.left>=xe.left,bottom:ye.bottom<=xe.bottom,right:ye.right<=xe.right},Me=ye.height>0&&ye.width>0,it=Me&&pe.top&&pe.left&&pe.bottom&&pe.right;if(Me&&V.props.partialVisibility){var _t=ye.top<=xe.bottom&&ye.bottom>=xe.top&&ye.left<=xe.right&&ye.right>=xe.left;typeof V.props.partialVisibility=="string"&&(_t=pe[V.props.partialVisibility]),it=V.props.minTopValue?_t&&ye.top<=xe.bottom-V.props.minTopValue:_t}typeof be.direction=="string"&&typeof be.value=="number"&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",be.direction,be.value),it=E()(be,ye,xe));var Fe=V.state;return V.state.isVisible!==it&&(Fe={isVisible:it,visibilityRect:pe},V.setState(Fe),V.props.onChange&&V.props.onChange(it)),Fe}),V.state={isVisible:null,visibilityRect:{}},V}return J(X,[{key:"componentDidMount",value:function(){this.node=p.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(V){this.node=p.a.findDOMNode(this),this.props.active&&!V.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(V){return{top:Math.floor(V.top),left:Math.floor(V.left),bottom:Math.floor(V.bottom),right:Math.floor(V.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):c.a.Children.only(this.props.children)}}]),X}(c.a.Component);ae(Ee,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:c.a.createElement("span",null)}),ae(Ee,"propTypes",{onChange:S.a.func,active:S.a.bool,partialVisibility:S.a.oneOfType([S.a.bool,S.a.oneOf(["top","right","bottom","left"])]),delayedCall:S.a.bool,offset:S.a.oneOfType([S.a.shape({top:S.a.number,left:S.a.number,bottom:S.a.number,right:S.a.number}),S.a.shape({direction:S.a.oneOf(["top","right","bottom","left"]),value:S.a.number})]),scrollCheck:S.a.bool,scrollDelay:S.a.number,scrollThrottle:S.a.number,resizeCheck:S.a.bool,resizeDelay:S.a.number,resizeThrottle:S.a.number,intervalCheck:S.a.bool,intervalDelay:S.a.number,containment:typeof window<"u"?S.a.instanceOf(window.Element):S.a.any,children:S.a.oneOfType([S.a.element,S.a.func]),minTopValue:S.a.number})},function(i,o,s){var a=s(6);function c(){}function f(){}f.resetWarningCache=c,i.exports=function(){function p(C,E,P,D,_,J){if(J!==a){var ie=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ie.name="Invariant Violation",ie}}p.isRequired=p;function m(){return p}var S={array:p,bool:p,func:p,number:p,object:p,string:p,symbol:p,any:p,arrayOf:m,element:p,elementType:p,instanceOf:m,node:p,objectOf:m,oneOf:m,oneOfType:m,shape:m,exact:m,checkPropTypes:f,resetWarningCache:c};return S.PropTypes=S,S}},function(i,o,s){var a="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";i.exports=a}])})})(N1);var pP=N1.exports;const gP=Px(pP),Lf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",mP=n=>{n=n.replace(/\r\n/g,`
14
+ `);let e=0,t="";for(;e<n.length;e++){const r=n.charCodeAt(e);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t},yP=n=>{let e,t,r,i,o,s,a,c=0,f="";for(n=mP(n);c<n.length;)e=n.charCodeAt(c++),t=n.charCodeAt(c++),r=n.charCodeAt(c++),i=e>>2,o=(3&e)<<4|t>>4,s=(15&t)<<2|r>>6,a=63&r,isNaN(t)?s=a=64:isNaN(r)&&(a=64),f=f+Lf.charAt(i)+Lf.charAt(o)+Lf.charAt(s)+Lf.charAt(a);return f},vP=n=>typeof n=="string"?"string":typeof SVGElement<"u"&&n instanceof SVGElement?"element":void 0,F1=n=>"data:image/svg+xml;base64,"+yP(n),bP=n=>F1(new XMLSerializer().serializeToString(n)),SP=n=>{switch(vP(n)){case"string":return F1(n);case"element":return bP(n);default:return n}};var L1=typeof global=="object"&&global&&global.Object===Object&&global,wP=typeof self=="object"&&self&&self.Object===Object&&self,qr=L1||wP||Function("return this")(),Kr=qr.Symbol,B1=Object.prototype,xP=B1.hasOwnProperty,kP=B1.toString,Kc=Kr?Kr.toStringTag:void 0;function CP(n){var e=xP.call(n,Kc),t=n[Kc];try{n[Kc]=void 0;var r=!0}catch{}var i=kP.call(n);return r&&(e?n[Kc]=t:delete n[Kc]),i}var EP=Object.prototype,TP=EP.toString;function RP(n){return TP.call(n)}var AP="[object Null]",OP="[object Undefined]",V0=Kr?Kr.toStringTag:void 0;function qo(n){return n==null?n===void 0?OP:AP:V0&&V0 in Object(n)?CP(n):RP(n)}function Bi(n){return n!=null&&typeof n=="object"}var IP="[object Symbol]";function Bh(n){return typeof n=="symbol"||Bi(n)&&qo(n)==IP}function $1(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var Xr=Array.isArray,MP=1/0,G0=Kr?Kr.prototype:void 0,J0=G0?G0.toString:void 0;function Vd(n){if(typeof n=="string")return n;if(Xr(n))return $1(n,Vd)+"";if(Bh(n))return J0?J0.call(n):"";var e=n+"";return e=="0"&&1/n==-MP?"-0":e}var DP=/\s/;function PP(n){for(var e=n.length;e--&&DP.test(n.charAt(e)););return e}var _P=/^\s+/;function NP(n){return n&&n.slice(0,PP(n)+1).replace(_P,"")}function Jo(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var Y0=NaN,FP=/^[-+]0x[0-9a-f]+$/i,LP=/^0b[01]+$/i,BP=/^0o[0-7]+$/i,$P=parseInt;function Ra(n){if(typeof n=="number")return n;if(Bh(n))return Y0;if(Jo(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Jo(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=NP(n);var t=LP.test(n);return t||BP.test(n)?$P(n.slice(2),t?2:8):FP.test(n)?Y0:+n}var K0=1/0,zP=17976931348623157e292;function jP(n){if(!n)return n===0?n:0;if(n=Ra(n),n===K0||n===-K0){var e=n<0?-1:1;return e*zP}return n===n?n:0}function UP(n){var e=jP(n),t=e%1;return e===e?t?e-t:e:0}function Vy(n){return n}var WP="[object AsyncFunction]",HP="[object Function]",VP="[object GeneratorFunction]",GP="[object Proxy]";function z1(n){if(!Jo(n))return!1;var e=qo(n);return e==HP||e==VP||e==WP||e==GP}var Rg=qr["__core-js_shared__"],X0=function(){var n=/[^.]+$/.exec(Rg&&Rg.keys&&Rg.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function JP(n){return!!X0&&X0 in n}var YP=Function.prototype,KP=YP.toString;function al(n){if(n!=null){try{return KP.call(n)}catch{}try{return n+""}catch{}}return""}var XP=/[\\^$.*+?()[\]{}|]/g,ZP=/^\[object .+?Constructor\]$/,QP=Function.prototype,qP=Object.prototype,e_=QP.toString,t_=qP.hasOwnProperty,n_=RegExp("^"+e_.call(t_).replace(XP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function r_(n){if(!Jo(n)||JP(n))return!1;var e=z1(n)?n_:ZP;return e.test(al(n))}function i_(n,e){return n==null?void 0:n[e]}function cl(n,e){var t=i_(n,e);return r_(t)?t:void 0}var Mm=cl(qr,"WeakMap");function o_(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}var s_=800,l_=16,a_=Date.now;function c_(n){var e=0,t=0;return function(){var r=a_(),i=l_-(r-t);if(t=r,i>0){if(++e>=s_)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function u_(n){return function(){return n}}var Z0=function(){try{var n=cl(Object,"defineProperty");return n({},"",{}),n}catch{}}(),f_=Z0?function(n,e){return Z0(n,"toString",{configurable:!0,enumerable:!1,value:u_(e),writable:!0})}:Vy,d_=c_(f_);function h_(n,e,t,r){for(var i=n.length,o=t+-1;++o<i;)if(e(n[o],o,n))return o;return-1}function p_(n){return n!==n}function g_(n,e,t){for(var r=t-1,i=n.length;++r<i;)if(n[r]===e)return r;return-1}function m_(n,e,t){return e===e?g_(n,e,t):h_(n,p_,t)}function y_(n,e){var t=n==null?0:n.length;return!!t&&m_(n,e,0)>-1}var v_=9007199254740991,b_=/^(?:0|[1-9]\d*)$/;function j1(n,e){var t=typeof n;return e=e??v_,!!e&&(t=="number"||t!="symbol"&&b_.test(n))&&n>-1&&n%1==0&&n<e}function U1(n,e){return n===e||n!==n&&e!==e}var Q0=Math.max;function S_(n,e,t){return e=Q0(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=Q0(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(s),o_(n,this,a)}}function w_(n,e){return d_(S_(n,e,Vy),n+"")}var x_=9007199254740991;function Gy(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=x_}function W1(n){return n!=null&&Gy(n.length)&&!z1(n)}var k_=Object.prototype;function C_(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||k_;return n===t}function E_(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var T_="[object Arguments]";function q0(n){return Bi(n)&&qo(n)==T_}var H1=Object.prototype,R_=H1.hasOwnProperty,A_=H1.propertyIsEnumerable,Jy=q0(function(){return arguments}())?q0:function(n){return Bi(n)&&R_.call(n,"callee")&&!A_.call(n,"callee")};function O_(){return!1}var V1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,eS=V1&&typeof module=="object"&&module&&!module.nodeType&&module,I_=eS&&eS.exports===V1,tS=I_?qr.Buffer:void 0,M_=tS?tS.isBuffer:void 0,Dm=M_||O_,D_="[object Arguments]",P_="[object Array]",__="[object Boolean]",N_="[object Date]",F_="[object Error]",L_="[object Function]",B_="[object Map]",$_="[object Number]",z_="[object Object]",j_="[object RegExp]",U_="[object Set]",W_="[object String]",H_="[object WeakMap]",V_="[object ArrayBuffer]",G_="[object DataView]",J_="[object Float32Array]",Y_="[object Float64Array]",K_="[object Int8Array]",X_="[object Int16Array]",Z_="[object Int32Array]",Q_="[object Uint8Array]",q_="[object Uint8ClampedArray]",eN="[object Uint16Array]",tN="[object Uint32Array]",We={};We[J_]=We[Y_]=We[K_]=We[X_]=We[Z_]=We[Q_]=We[q_]=We[eN]=We[tN]=!0;We[D_]=We[P_]=We[V_]=We[__]=We[G_]=We[N_]=We[F_]=We[L_]=We[B_]=We[$_]=We[z_]=We[j_]=We[U_]=We[W_]=We[H_]=!1;function nN(n){return Bi(n)&&Gy(n.length)&&!!We[qo(n)]}function Yy(n){return function(e){return n(e)}}var G1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,au=G1&&typeof module=="object"&&module&&!module.nodeType&&module,rN=au&&au.exports===G1,Ag=rN&&L1.process,Gd=function(){try{var n=au&&au.require&&au.require("util").types;return n||Ag&&Ag.binding&&Ag.binding("util")}catch{}}(),nS=Gd&&Gd.isTypedArray,J1=nS?Yy(nS):nN,iN=Object.prototype,oN=iN.hasOwnProperty;function sN(n,e){var t=Xr(n),r=!t&&Jy(n),i=!t&&!r&&Dm(n),o=!t&&!r&&!i&&J1(n),s=t||r||i||o,a=s?E_(n.length,String):[],c=a.length;for(var f in n)oN.call(n,f)&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||j1(f,c)))&&a.push(f);return a}function lN(n,e){return function(t){return n(e(t))}}var aN=lN(Object.keys,Object),cN=Object.prototype,uN=cN.hasOwnProperty;function fN(n){if(!C_(n))return aN(n);var e=[];for(var t in Object(n))uN.call(n,t)&&t!="constructor"&&e.push(t);return e}function Y1(n){return W1(n)?sN(n):fN(n)}var dN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hN=/^\w*$/;function Ky(n,e){if(Xr(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||Bh(n)?!0:hN.test(n)||!dN.test(n)||e!=null&&n in Object(e)}var Cu=cl(Object,"create");function pN(){this.__data__=Cu?Cu(null):{},this.size=0}function gN(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var mN="__lodash_hash_undefined__",yN=Object.prototype,vN=yN.hasOwnProperty;function bN(n){var e=this.__data__;if(Cu){var t=e[n];return t===mN?void 0:t}return vN.call(e,n)?e[n]:void 0}var SN=Object.prototype,wN=SN.hasOwnProperty;function xN(n){var e=this.__data__;return Cu?e[n]!==void 0:wN.call(e,n)}var kN="__lodash_hash_undefined__";function CN(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Cu&&e===void 0?kN:e,this}function qs(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}qs.prototype.clear=pN;qs.prototype.delete=gN;qs.prototype.get=bN;qs.prototype.has=xN;qs.prototype.set=CN;function EN(){this.__data__=[],this.size=0}function $h(n,e){for(var t=n.length;t--;)if(U1(n[t][0],e))return t;return-1}var TN=Array.prototype,RN=TN.splice;function AN(n){var e=this.__data__,t=$h(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():RN.call(e,t,1),--this.size,!0}function ON(n){var e=this.__data__,t=$h(e,n);return t<0?void 0:e[t][1]}function IN(n){return $h(this.__data__,n)>-1}function MN(n,e){var t=this.__data__,r=$h(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function Ui(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Ui.prototype.clear=EN;Ui.prototype.delete=AN;Ui.prototype.get=ON;Ui.prototype.has=IN;Ui.prototype.set=MN;var Eu=cl(qr,"Map");function DN(){this.size=0,this.__data__={hash:new qs,map:new(Eu||Ui),string:new qs}}function PN(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function zh(n,e){var t=n.__data__;return PN(e)?t[typeof e=="string"?"string":"hash"]:t.map}function _N(n){var e=zh(this,n).delete(n);return this.size-=e?1:0,e}function NN(n){return zh(this,n).get(n)}function FN(n){return zh(this,n).has(n)}function LN(n,e){var t=zh(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Wi(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Wi.prototype.clear=DN;Wi.prototype.delete=_N;Wi.prototype.get=NN;Wi.prototype.has=FN;Wi.prototype.set=LN;var BN="Expected a function";function Xy(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(BN);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var s=n.apply(this,r);return t.cache=o.set(i,s)||o,s};return t.cache=new(Xy.Cache||Wi),t}Xy.Cache=Wi;var $N=500;function zN(n){var e=Xy(n,function(r){return t.size===$N&&t.clear(),r}),t=e.cache;return e}var jN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,UN=/\\(\\)?/g,WN=zN(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(jN,function(t,r,i,o){e.push(i?o.replace(UN,"$1"):r||t)}),e});function Pm(n){return n==null?"":Vd(n)}function K1(n,e){return Xr(n)?n:Ky(n,e)?[n]:WN(Pm(n))}var HN=1/0;function jh(n){if(typeof n=="string"||Bh(n))return n;var e=n+"";return e=="0"&&1/n==-HN?"-0":e}function X1(n,e){e=K1(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[jh(e[t++])];return t&&t==r?n:void 0}function VN(n,e,t){var r=n==null?void 0:X1(n,e);return r===void 0?t:r}function Z1(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var rS=Kr?Kr.isConcatSpreadable:void 0;function GN(n){return Xr(n)||Jy(n)||!!(rS&&n&&n[rS])}function JN(n,e,t,r,i){var o=-1,s=n.length;for(t||(t=GN),i||(i=[]);++o<s;){var a=n[o];t(a)&&Z1(i,a)}return i}function YN(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=n[r+e];return o}function KN(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:YN(n,e,t)}var XN="\\ud800-\\udfff",ZN="\\u0300-\\u036f",QN="\\ufe20-\\ufe2f",qN="\\u20d0-\\u20ff",eF=ZN+QN+qN,tF="\\ufe0e\\ufe0f",nF="\\u200d",rF=RegExp("["+nF+XN+eF+tF+"]");function Zy(n){return rF.test(n)}function iF(n){return n.split("")}var Q1="\\ud800-\\udfff",oF="\\u0300-\\u036f",sF="\\ufe20-\\ufe2f",lF="\\u20d0-\\u20ff",aF=oF+sF+lF,cF="\\ufe0e\\ufe0f",uF="["+Q1+"]",_m="["+aF+"]",Nm="\\ud83c[\\udffb-\\udfff]",fF="(?:"+_m+"|"+Nm+")",q1="[^"+Q1+"]",ek="(?:\\ud83c[\\udde6-\\uddff]){2}",tk="[\\ud800-\\udbff][\\udc00-\\udfff]",dF="\\u200d",nk=fF+"?",rk="["+cF+"]?",hF="(?:"+dF+"(?:"+[q1,ek,tk].join("|")+")"+rk+nk+")*",pF=rk+nk+hF,gF="(?:"+[q1+_m+"?",_m,ek,tk,uF].join("|")+")",mF=RegExp(Nm+"(?="+Nm+")|"+gF+pF,"g");function yF(n){return n.match(mF)||[]}function vF(n){return Zy(n)?yF(n):iF(n)}function bF(n,e,t){return n===n&&(t!==void 0&&(n=n<=t?n:t),e!==void 0&&(n=n>=e?n:e)),n}function SF(n,e,t){return t===void 0&&(t=e,e=void 0),t!==void 0&&(t=Ra(t),t=t===t?t:0),e!==void 0&&(e=Ra(e),e=e===e?e:0),bF(Ra(n),e,t)}function wF(){this.__data__=new Ui,this.size=0}function xF(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function kF(n){return this.__data__.get(n)}function CF(n){return this.__data__.has(n)}var EF=200;function TF(n,e){var t=this.__data__;if(t instanceof Ui){var r=t.__data__;if(!Eu||r.length<EF-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Wi(r)}return t.set(n,e),this.size=t.size,this}function Li(n){var e=this.__data__=new Ui(n);this.size=e.size}Li.prototype.clear=wF;Li.prototype.delete=xF;Li.prototype.get=kF;Li.prototype.has=CF;Li.prototype.set=TF;function RF(n,e){for(var t=-1,r=n==null?0:n.length,i=0,o=[];++t<r;){var s=n[t];e(s,t,n)&&(o[i++]=s)}return o}function AF(){return[]}var OF=Object.prototype,IF=OF.propertyIsEnumerable,iS=Object.getOwnPropertySymbols,MF=iS?function(n){return n==null?[]:(n=Object(n),RF(iS(n),function(e){return IF.call(n,e)}))}:AF;function DF(n,e,t){var r=e(n);return Xr(n)?r:Z1(r,t(n))}function oS(n){return DF(n,Y1,MF)}var Fm=cl(qr,"DataView"),Lm=cl(qr,"Promise"),Bm=cl(qr,"Set"),sS="[object Map]",PF="[object Object]",lS="[object Promise]",aS="[object Set]",cS="[object WeakMap]",uS="[object DataView]",_F=al(Fm),NF=al(Eu),FF=al(Lm),LF=al(Bm),BF=al(Mm),Mo=qo;(Fm&&Mo(new Fm(new ArrayBuffer(1)))!=uS||Eu&&Mo(new Eu)!=sS||Lm&&Mo(Lm.resolve())!=lS||Bm&&Mo(new Bm)!=aS||Mm&&Mo(new Mm)!=cS)&&(Mo=function(n){var e=qo(n),t=e==PF?n.constructor:void 0,r=t?al(t):"";if(r)switch(r){case _F:return uS;case NF:return sS;case FF:return lS;case LF:return aS;case BF:return cS}return e});var fS=qr.Uint8Array,$F="__lodash_hash_undefined__";function zF(n){return this.__data__.set(n,$F),this}function jF(n){return this.__data__.has(n)}function Tu(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Wi;++e<t;)this.add(n[e])}Tu.prototype.add=Tu.prototype.push=zF;Tu.prototype.has=jF;function UF(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function ik(n,e){return n.has(e)}var WF=1,HF=2;function ok(n,e,t,r,i,o){var s=t&WF,a=n.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var f=o.get(n),p=o.get(e);if(f&&p)return f==e&&p==n;var m=-1,S=!0,C=t&HF?new Tu:void 0;for(o.set(n,e),o.set(e,n);++m<a;){var E=n[m],P=e[m];if(r)var D=s?r(P,E,m,e,n,o):r(E,P,m,n,e,o);if(D!==void 0){if(D)continue;S=!1;break}if(C){if(!UF(e,function(_,J){if(!ik(C,J)&&(E===_||i(E,_,t,r,o)))return C.push(J)})){S=!1;break}}else if(!(E===P||i(E,P,t,r,o))){S=!1;break}}return o.delete(n),o.delete(e),S}function VF(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function GF(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var JF=1,YF=2,KF="[object Boolean]",XF="[object Date]",ZF="[object Error]",QF="[object Map]",qF="[object Number]",e2="[object RegExp]",t2="[object Set]",n2="[object String]",r2="[object Symbol]",i2="[object ArrayBuffer]",o2="[object DataView]",dS=Kr?Kr.prototype:void 0,Og=dS?dS.valueOf:void 0;function s2(n,e,t,r,i,o,s){switch(t){case o2:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case i2:return!(n.byteLength!=e.byteLength||!o(new fS(n),new fS(e)));case KF:case XF:case qF:return U1(+n,+e);case ZF:return n.name==e.name&&n.message==e.message;case e2:case n2:return n==e+"";case QF:var a=VF;case t2:var c=r&JF;if(a||(a=GF),n.size!=e.size&&!c)return!1;var f=s.get(n);if(f)return f==e;r|=YF,s.set(n,e);var p=ok(a(n),a(e),r,i,o,s);return s.delete(n),p;case r2:if(Og)return Og.call(n)==Og.call(e)}return!1}var l2=1,a2=Object.prototype,c2=a2.hasOwnProperty;function u2(n,e,t,r,i,o){var s=t&l2,a=oS(n),c=a.length,f=oS(e),p=f.length;if(c!=p&&!s)return!1;for(var m=c;m--;){var S=a[m];if(!(s?S in e:c2.call(e,S)))return!1}var C=o.get(n),E=o.get(e);if(C&&E)return C==e&&E==n;var P=!0;o.set(n,e),o.set(e,n);for(var D=s;++m<c;){S=a[m];var _=n[S],J=e[S];if(r)var ie=s?r(J,_,S,e,n,o):r(_,J,S,n,e,o);if(!(ie===void 0?_===J||i(_,J,t,r,o):ie)){P=!1;break}D||(D=S=="constructor")}if(P&&!D){var oe=n.constructor,te=e.constructor;oe!=te&&"constructor"in n&&"constructor"in e&&!(typeof oe=="function"&&oe instanceof oe&&typeof te=="function"&&te instanceof te)&&(P=!1)}return o.delete(n),o.delete(e),P}var f2=1,hS="[object Arguments]",pS="[object Array]",Bf="[object Object]",d2=Object.prototype,gS=d2.hasOwnProperty;function h2(n,e,t,r,i,o){var s=Xr(n),a=Xr(e),c=s?pS:Mo(n),f=a?pS:Mo(e);c=c==hS?Bf:c,f=f==hS?Bf:f;var p=c==Bf,m=f==Bf,S=c==f;if(S&&Dm(n)){if(!Dm(e))return!1;s=!0,p=!1}if(S&&!p)return o||(o=new Li),s||J1(n)?ok(n,e,t,r,i,o):s2(n,e,c,t,r,i,o);if(!(t&f2)){var C=p&&gS.call(n,"__wrapped__"),E=m&&gS.call(e,"__wrapped__");if(C||E){var P=C?n.value():n,D=E?e.value():e;return o||(o=new Li),i(P,D,t,r,o)}}return S?(o||(o=new Li),u2(n,e,t,r,i,o)):!1}function Qy(n,e,t,r,i){return n===e?!0:n==null||e==null||!Bi(n)&&!Bi(e)?n!==n&&e!==e:h2(n,e,t,r,Qy,i)}var p2=1,g2=2;function m2(n,e,t,r){var i=t.length,o=i;if(n==null)return!o;for(n=Object(n);i--;){var s=t[i];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<o;){s=t[i];var a=s[0],c=n[a],f=s[1];if(s[2]){if(c===void 0&&!(a in n))return!1}else{var p=new Li,m;if(!(m===void 0?Qy(f,c,p2|g2,r,p):m))return!1}}return!0}function sk(n){return n===n&&!Jo(n)}function y2(n){for(var e=Y1(n),t=e.length;t--;){var r=e[t],i=n[r];e[t]=[r,i,sk(i)]}return e}function lk(n,e){return function(t){return t==null?!1:t[n]===e&&(e!==void 0||n in Object(t))}}function v2(n){var e=y2(n);return e.length==1&&e[0][2]?lk(e[0][0],e[0][1]):function(t){return t===n||m2(t,n,e)}}function b2(n,e){return n!=null&&e in Object(n)}function S2(n,e,t){e=K1(e,n);for(var r=-1,i=e.length,o=!1;++r<i;){var s=jh(e[r]);if(!(o=n!=null&&t(n,s)))break;n=n[s]}return o||++r!=i?o:(i=n==null?0:n.length,!!i&&Gy(i)&&j1(s,i)&&(Xr(n)||Jy(n)))}function w2(n,e){return n!=null&&S2(n,e,b2)}var x2=1,k2=2;function C2(n,e){return Ky(n)&&sk(e)?lk(jh(n),e):function(t){var r=VN(t,n);return r===void 0&&r===e?w2(t,n):Qy(e,r,x2|k2)}}function ak(n){return function(e){return e==null?void 0:e[n]}}function E2(n){return function(e){return X1(e,n)}}function T2(n){return Ky(n)?ak(jh(n)):E2(n)}function R2(n){return typeof n=="function"?n:n==null?Vy:typeof n=="object"?Xr(n)?C2(n[0],n[1]):v2(n):T2(n)}var Ig=function(){return qr.Date.now()},A2="Expected a function",O2=Math.max,I2=Math.min;function ck(n,e,t){var r,i,o,s,a,c,f=0,p=!1,m=!1,S=!0;if(typeof n!="function")throw new TypeError(A2);e=Ra(e)||0,Jo(t)&&(p=!!t.leading,m="maxWait"in t,o=m?O2(Ra(t.maxWait)||0,e):o,S="trailing"in t?!!t.trailing:S);function C(G){var ne=r,ae=i;return r=i=void 0,f=G,s=n.apply(ae,ne),s}function E(G){return f=G,a=setTimeout(_,e),p?C(G):s}function P(G){var ne=G-c,ae=G-f,Q=e-ne;return m?I2(Q,o-ae):Q}function D(G){var ne=G-c,ae=G-f;return c===void 0||ne>=e||ne<0||m&&ae>=o}function _(){var G=Ig();if(D(G))return J(G);a=setTimeout(_,P(G))}function J(G){return a=void 0,S&&r?C(G):(r=i=void 0,s)}function ie(){a!==void 0&&clearTimeout(a),f=0,r=c=i=a=void 0}function oe(){return a===void 0?s:J(Ig())}function te(){var G=Ig(),ne=D(G);if(r=arguments,i=this,c=G,ne){if(a===void 0)return E(c);if(m)return clearTimeout(a),a=setTimeout(_,e),C(c)}return a===void 0&&(a=setTimeout(_,e)),s}return te.cancel=ie,te.flush=oe,te}function Mg(n){return Bi(n)&&W1(n)}var M2=200;function D2(n,e,t,r){var i=-1,o=y_,s=!0,a=n.length,c=[],f=e.length;if(!a)return c;t&&(e=$1(e,Yy(t))),e.length>=M2&&(o=ik,s=!1,e=new Tu(e));e:for(;++i<a;){var p=n[i],m=t==null?p:t(p);if(p=p!==0?p:0,s&&m===m){for(var S=f;S--;)if(e[S]===m)continue e;c.push(p)}else o(e,m,r)||c.push(p)}return c}function P2(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}var _2=w_(function(n,e){var t=P2(e);return Mg(t)&&(t=void 0),Mg(n)?D2(n,JN(e,1,Mg),R2(t)):[]}),N2="[object Number]";function F2(n){return typeof n=="number"||Bi(n)&&qo(n)==N2}var L2="[object RegExp]";function B2(n){return Bi(n)&&qo(n)==L2}var mS=Gd&&Gd.isRegExp,$2=mS?Yy(mS):B2,z2=ak("length"),uk="\\ud800-\\udfff",j2="\\u0300-\\u036f",U2="\\ufe20-\\ufe2f",W2="\\u20d0-\\u20ff",H2=j2+U2+W2,V2="\\ufe0e\\ufe0f",G2="["+uk+"]",$m="["+H2+"]",zm="\\ud83c[\\udffb-\\udfff]",J2="(?:"+$m+"|"+zm+")",fk="[^"+uk+"]",dk="(?:\\ud83c[\\udde6-\\uddff]){2}",hk="[\\ud800-\\udbff][\\udc00-\\udfff]",Y2="\\u200d",pk=J2+"?",gk="["+V2+"]?",K2="(?:"+Y2+"(?:"+[fk,dk,hk].join("|")+")"+gk+pk+")*",X2=gk+pk+K2,Z2="(?:"+[fk+$m+"?",$m,dk,hk,G2].join("|")+")",yS=RegExp(zm+"(?="+zm+")|"+Z2+X2,"g");function Q2(n){for(var e=yS.lastIndex=0;yS.test(n);)++e;return e}function q2(n){return Zy(n)?Q2(n):z2(n)}var eL="Expected a function";function tL(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(eL);return Jo(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),ck(n,e,{leading:r,maxWait:e,trailing:i})}var nL=30,rL="...",iL=/\w*$/;function oL(n,e){var t=nL,r=rL;if(Jo(e)){var i="separator"in e?e.separator:i;t="length"in e?UP(e.length):t,r="omission"in e?Vd(e.omission):r}n=Pm(n);var o=n.length;if(Zy(n)){var s=vF(n);o=s.length}if(t>=o)return n;var a=t-q2(r);if(a<1)return r;var c=s?KN(s,0,a).join(""):n.slice(0,a);if(i===void 0)return c+r;if(s&&(a+=c.length-a),$2(i)){if(n.slice(a).search(i)){var f,p=c;for(i.global||(i=RegExp(i.source,Pm(iL.exec(i))+"g")),i.lastIndex=0;f=i.exec(p);)var m=f.index;c=c.slice(0,m===void 0?a:m)}}else if(n.indexOf(Vd(i),a)!=a){var S=c.lastIndexOf(i);S>-1&&(c=c.slice(0,S))}return c+r}const Vr=()=>new Map,jm=n=>{const e=Vr();return n.forEach((t,r)=>{e.set(r,t)}),e},Ja=(n,e,t)=>{let r=n.get(e);return r===void 0&&n.set(e,r=t()),r},sL=(n,e)=>{const t=[];for(const[r,i]of n)t.push(e(i,r));return t},lL=(n,e)=>{for(const[t,r]of n)if(e(r,t))return!0;return!1},Fa=()=>new Set,Dg=n=>n[n.length-1],La=Array.from,aL=Array.isArray;class cL{constructor(){this._observers=Vr()}on(e,t){return Ja(this._observers,e,Fa).add(t),t}once(e,t){const r=(...i)=>{this.off(e,r),t(...i)};this.on(e,r)}off(e,t){const r=this._observers.get(e);r!==void 0&&(r.delete(t),r.size===0&&this._observers.delete(e))}emit(e,t){return La((this._observers.get(e)||Vr()).values()).forEach(r=>r(...t))}destroy(){this._observers=Vr()}}const el=Math.floor,fd=Math.abs,mk=(n,e)=>n<e?n:e,Ya=(n,e)=>n>e?n:e,uL=n=>n!==0?n<0:1/n<0,vS=1,bS=2,Pg=4,_g=8,fL=32,yk=64,Jd=128,dL=31,SS=63,cu=127,hL=2147483647,pL=Number.isInteger||(n=>typeof n=="number"&&isFinite(n)&&el(n)===n),gL=n=>n.toLowerCase(),mL=/^\s*/g,yL=n=>n.replace(mL,""),vL=/([A-Z])/g,wS=(n,e)=>yL(n.replace(vL,t=>`${e}${gL(t)}`)),bL=n=>{const e=unescape(encodeURIComponent(n)),t=e.length,r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e.codePointAt(i);return r},Ru=typeof TextEncoder<"u"?new TextEncoder:null,SL=n=>Ru.encode(n),wL=Ru?SL:bL;let Ng=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});Ng&&Ng.decode(new Uint8Array).length===1&&(Ng=null);class Uu{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const qy=()=>new Uu,xL=n=>{let e=n.cpos;for(let t=0;t<n.bufs.length;t++)e+=n.bufs[t].length;return e},Ni=n=>{const e=new Uint8Array(xL(n));let t=0;for(let r=0;r<n.bufs.length;r++){const i=n.bufs[r];e.set(i,t),t+=i.length}return e.set(new Uint8Array(n.cbuf.buffer,0,n.cpos),t),e},kL=(n,e)=>{const t=n.cbuf.length;t-n.cpos<e&&(n.bufs.push(new Uint8Array(n.cbuf.buffer,0,n.cpos)),n.cbuf=new Uint8Array(Ya(t,e)*2),n.cpos=0)},vt=(n,e)=>{const t=n.cbuf.length;n.cpos===t&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(t*2),n.cpos=0),n.cbuf[n.cpos++]=e},Um=vt,$e=(n,e)=>{for(;e>cu;)vt(n,Jd|cu&e),e=el(e/128);vt(n,cu&e)},ev=(n,e)=>{const t=uL(e);for(t&&(e=-e),vt(n,(e>SS?Jd:0)|(t?yk:0)|SS&e),e=el(e/64);e>0;)vt(n,(e>cu?Jd:0)|cu&e),e=el(e/128)},Wm=new Uint8Array(3e4),CL=Wm.length/3,EL=(n,e)=>{if(e.length<CL){const t=Ru.encodeInto(e,Wm).written||0;$e(n,t);for(let r=0;r<t;r++)vt(n,Wm[r])}else Tn(n,wL(e))},TL=(n,e)=>{const t=unescape(encodeURIComponent(e)),r=t.length;$e(n,r);for(let i=0;i<r;i++)vt(n,t.codePointAt(i))},Aa=Ru&&Ru.encodeInto?EL:TL,tv=(n,e)=>{const t=n.cbuf.length,r=n.cpos,i=mk(t-r,e.length),o=e.length-i;n.cbuf.set(e.subarray(0,i),r),n.cpos+=i,o>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(Ya(t*2,o)),n.cbuf.set(e.subarray(i)),n.cpos=o)},Tn=(n,e)=>{$e(n,e.byteLength),tv(n,e)},nv=(n,e)=>{kL(n,e);const t=new DataView(n.cbuf.buffer,n.cpos,e);return n.cpos+=e,t},RL=(n,e)=>nv(n,4).setFloat32(0,e,!1),AL=(n,e)=>nv(n,8).setFloat64(0,e,!1),OL=(n,e)=>nv(n,8).setBigInt64(0,e,!1),xS=new DataView(new ArrayBuffer(4)),IL=n=>(xS.setFloat32(0,n),xS.getFloat32(0)===n),Au=(n,e)=>{switch(typeof e){case"string":vt(n,119),Aa(n,e);break;case"number":pL(e)&&fd(e)<=hL?(vt(n,125),ev(n,e)):IL(e)?(vt(n,124),RL(n,e)):(vt(n,123),AL(n,e));break;case"bigint":vt(n,122),OL(n,e);break;case"object":if(e===null)vt(n,126);else if(aL(e)){vt(n,117),$e(n,e.length);for(let t=0;t<e.length;t++)Au(n,e[t])}else if(e instanceof Uint8Array)vt(n,116),Tn(n,e);else{vt(n,118);const t=Object.keys(e);$e(n,t.length);for(let r=0;r<t.length;r++){const i=t[r];Aa(n,i),Au(n,e[i])}}break;case"boolean":vt(n,e?120:121);break;default:vt(n,127)}};class kS extends Uu{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&$e(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const CS=n=>{n.count>0&&(ev(n.encoder,n.count===1?n.s:-n.s),n.count>1&&$e(n.encoder,n.count-2))};class dd{constructor(){this.encoder=new Uu,this.s=0,this.count=0}write(e){this.s===e?this.count++:(CS(this),this.count=1,this.s=e)}toUint8Array(){return CS(this),Ni(this.encoder)}}const ES=n=>{if(n.count>0){const e=n.diff*2+(n.count===1?0:1);ev(n.encoder,e),n.count>1&&$e(n.encoder,n.count-2)}};class Fg{constructor(){this.encoder=new Uu,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(ES(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return ES(this),Ni(this.encoder)}}class ML{constructor(){this.sarr=[],this.s="",this.lensE=new dd}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){const e=new Uu;return this.sarr.push(this.s),this.s="",Aa(e,this.sarr.join("")),tv(e,this.lensE.toUint8Array()),Ni(e)}}const Ba=n=>new Error(n),Gr=()=>{throw Ba("Method unimplemented")},Yo=()=>{throw Ba("Unexpected case")},DL=crypto.getRandomValues.bind(crypto),vk=()=>DL(new Uint32Array(1))[0],PL="10000000-1000-4000-8000"+-1e11,_L=()=>PL.replace(/[018]/g,n=>(n^vk()&15>>n/4).toString(16)),TS=n=>new Promise(n);Promise.all.bind(Promise);const RS=n=>n===void 0?null:n;class NL{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}}let bk=new NL,FL=!0;try{typeof localStorage<"u"&&localStorage&&(bk=localStorage,FL=!1)}catch{}const LL=bk,BL=Object.assign,$L=Object.keys,zL=(n,e)=>{for(const t in n)e(n[t],t)},AS=n=>$L(n).length,jL=n=>{for(const e in n)return!1;return!0},UL=(n,e)=>{for(const t in n)if(!e(n[t],t))return!1;return!0},WL=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),HL=(n,e)=>n===e||AS(n)===AS(e)&&UL(n,(t,r)=>(t!==void 0||WL(e,r))&&e[r]===t),VL=Object.freeze,Sk=n=>{for(const e in n){const t=n[e];(typeof t=="object"||typeof t=="function")&&Sk(n[e])}return VL(n)},rv=(n,e,t=0)=>{try{for(;t<n.length;t++)n[t](...e)}finally{t<n.length&&rv(n,e,t+1)}},GL=(n,e)=>e.includes(n),Ou=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let Br;const JL=()=>{if(Br===void 0)if(Ou){Br=Vr();const n=process.argv;let e=null;for(let t=0;t<n.length;t++){const r=n[t];r[0]==="-"?(e!==null&&Br.set(e,""),e=r):e!==null&&(Br.set(e,r),e=null)}e!==null&&Br.set(e,"")}else typeof location=="object"?(Br=Vr(),(location.search||"?").slice(1).split("&").forEach(n=>{if(n.length!==0){const[e,t]=n.split("=");Br.set(`--${wS(e,"-")}`,t),Br.set(`-${wS(e,"-")}`,t)}})):Br=Vr();return Br},Hm=n=>JL().has(n),Yd=n=>RS(Ou?process.env[n.toUpperCase().replaceAll("-","_")]:LL.getItem(n)),wk=n=>Hm("--"+n)||Yd(n)!==null;wk("production");const YL=Ou&&GL(process.env.FORCE_COLOR,["true","1","2"]),KL=YL||!Hm("--no-colors")&&!wk("no-color")&&(!Ou||process.stdout.isTTY)&&(!Ou||Hm("--color")||Yd("COLORTERM")!==null||(Yd("TERM")||"").includes("color"));class XL{constructor(e,t){this.left=e,this.right=t}}const Ii=(n,e)=>new XL(n,e);typeof DOMParser<"u"&&new DOMParser;const ZL=n=>sL(n,(e,t)=>`${t}:${e};`).join(""),Hi=Symbol,xk=Hi(),kk=Hi(),QL=Hi(),qL=Hi(),eB=Hi(),Ck=Hi(),tB=Hi(),iv=Hi(),nB=Hi(),rB=n=>{var i;n.length===1&&((i=n[0])==null?void 0:i.constructor)===Function&&(n=n[0]());const e=[],t=[];let r=0;for(;r<n.length;r++){const o=n[r];if(o===void 0)break;if(o.constructor===String||o.constructor===Number)e.push(o);else if(o.constructor===Object)break}for(r>0&&t.push(e.join(""));r<n.length;r++){const o=n[r];o instanceof Symbol||t.push(o)}return t},iB={[xk]:Ii("font-weight","bold"),[kk]:Ii("font-weight","normal"),[QL]:Ii("color","blue"),[eB]:Ii("color","green"),[qL]:Ii("color","grey"),[Ck]:Ii("color","red"),[tB]:Ii("color","purple"),[iv]:Ii("color","orange"),[nB]:Ii("color","black")},oB=n=>{var s;n.length===1&&((s=n[0])==null?void 0:s.constructor)===Function&&(n=n[0]());const e=[],t=[],r=Vr();let i=[],o=0;for(;o<n.length;o++){const a=n[o],c=iB[a];if(c!==void 0)r.set(c.left,c.right);else{if(a===void 0)break;if(a.constructor===String||a.constructor===Number){const f=ZL(r);o>0||f.length>0?(e.push("%c"+a),t.push(f)):e.push(a)}else break}}for(o>0&&(i=t,i.unshift(e.join("")));o<n.length;o++){const a=n[o];a instanceof Symbol||i.push(a)}return i},Ek=KL?oB:rB,sB=(...n)=>{console.log(...Ek(n)),Tk.forEach(e=>e.print(n))},lB=(...n)=>{console.warn(...Ek(n)),n.unshift(iv),Tk.forEach(e=>e.print(n))},Tk=Fa(),Rk=n=>({[Symbol.iterator](){return this},next:n}),aB=(n,e)=>Rk(()=>{let t;do t=n.next();while(!t.done&&!e(t.value));return t}),Lg=(n,e)=>Rk(()=>{const{done:t,value:r}=n.next();return{done:t,value:t?void 0:e(r)}});class cB{constructor(e,t){this.clock=e,this.len=t}}class uB{constructor(){this.clients=new Map}}const Ak=(n,e,t)=>e.clients.forEach((r,i)=>{const o=n.doc.store.clients.get(i);for(let s=0;s<r.length;s++){const a=r[s];Nk(n,o,a.clock,a.len,t)}}),fB=(n,e)=>{let t=0,r=n.length-1;for(;t<=r;){const i=el((t+r)/2),o=n[i],s=o.clock;if(s<=e){if(e<s+o.len)return i;t=i+1}else r=i-1}return null},Ok=(n,e)=>{const t=n.clients.get(e.client);return t!==void 0&&fB(t,e.clock)!==null},Ik=n=>{n.clients.forEach(e=>{e.sort((i,o)=>i.clock-o.clock);let t,r;for(t=1,r=1;t<e.length;t++){const i=e[r-1],o=e[t];i.clock+i.len>=o.clock?i.len=Ya(i.len,o.clock+o.len-i.clock):(r<t&&(e[r]=o),r++)}e.length=r})},Mk=(n,e,t,r)=>{Ja(n.clients,e,()=>[]).push(new cB(t,r))},dB=(n,e)=>{$e(n.restEncoder,e.clients.size),La(e.clients.entries()).sort((t,r)=>r[0]-t[0]).forEach(([t,r])=>{n.resetDsCurVal(),$e(n.restEncoder,t);const i=r.length;$e(n.restEncoder,i);for(let o=0;o<i;o++){const s=r[o];n.writeDsClock(s.clock),n.writeDsLen(s.len)}})},Dk=vk;class Wu extends cL{constructor({guid:e=_L(),collectionid:t=null,gc:r=!0,gcFilter:i=()=>!0,meta:o=null,autoLoad:s=!1,shouldLoad:a=!0}={}){super(),this.gc=r,this.gcFilter=i,this.clientID=Dk(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new wB,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=a,this.autoLoad=s,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=TS(f=>{this.on("load",()=>{this.isLoaded=!0,f(this)})});const c=()=>TS(f=>{const p=m=>{(m===void 0||m===!0)&&(this.off("sync",p),f())};this.on("sync",p)});this.on("sync",f=>{f===!1&&this.isSynced&&(this.whenSynced=c()),this.isSynced=f===void 0||f===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=c()}load(){const e=this._item;e!==null&&!this.shouldLoad&&He(e.parent.doc,t=>{t.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(La(this.subdocs).map(e=>e.guid))}transact(e,t=null){return He(this,e,t)}get(e,t=Pt){const r=Ja(this.share,e,()=>{const o=new t;return o._integrate(this,null),o}),i=r.constructor;if(t!==Pt&&i!==t)if(i===Pt){const o=new t;o._map=r._map,r._map.forEach(s=>{for(;s!==null;s=s.left)s.parent=o}),o._start=r._start;for(let s=o._start;s!==null;s=s.right)s.parent=o;return o._length=r._length,this.share.set(e,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${e} has already been defined with a different constructor`);return r}getArray(e=""){return this.get(e,uu)}getText(e=""){return this.get(e,Pu)}getMap(e=""){return this.get(e,Qd)}getXmlElement(e=""){return this.get(e,_u)}getXmlFragment(e=""){return this.get(e,$a)}toJSON(){const e={};return this.share.forEach((t,r)=>{e[r]=t.toJSON()}),e}destroy(){this.isDestroyed=!0,La(this.subdocs).forEach(t=>t.destroy());const e=this._item;if(e!==null){this._item=null;const t=e.content;t.doc=new Wu({guid:this.guid,...t.opts,shouldLoad:!1}),t.doc._item=e,He(e.parent.doc,r=>{const i=t.doc;e.deleted||r.subdocsAdded.add(i),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class hB{constructor(){this.restEncoder=qy()}toUint8Array(){return Ni(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){$e(this.restEncoder,e)}writeDsLen(e){$e(this.restEncoder,e)}}class pB extends hB{writeLeftID(e){$e(this.restEncoder,e.client),$e(this.restEncoder,e.clock)}writeRightID(e){$e(this.restEncoder,e.client),$e(this.restEncoder,e.clock)}writeClient(e){$e(this.restEncoder,e)}writeInfo(e){Um(this.restEncoder,e)}writeString(e){Aa(this.restEncoder,e)}writeParentInfo(e){$e(this.restEncoder,e?1:0)}writeTypeRef(e){$e(this.restEncoder,e)}writeLen(e){$e(this.restEncoder,e)}writeAny(e){Au(this.restEncoder,e)}writeBuf(e){Tn(this.restEncoder,e)}writeJSON(e){Aa(this.restEncoder,JSON.stringify(e))}writeKey(e){Aa(this.restEncoder,e)}}class gB{constructor(){this.restEncoder=qy(),this.dsCurrVal=0}toUint8Array(){return Ni(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){const t=e-this.dsCurrVal;this.dsCurrVal=e,$e(this.restEncoder,t)}writeDsLen(e){e===0&&Yo(),$e(this.restEncoder,e-1),this.dsCurrVal+=e}}class mB extends gB{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new Fg,this.clientEncoder=new dd,this.leftClockEncoder=new Fg,this.rightClockEncoder=new Fg,this.infoEncoder=new kS(Um),this.stringEncoder=new ML,this.parentInfoEncoder=new kS(Um),this.typeRefEncoder=new dd,this.lenEncoder=new dd}toUint8Array(){const e=qy();return $e(e,0),Tn(e,this.keyClockEncoder.toUint8Array()),Tn(e,this.clientEncoder.toUint8Array()),Tn(e,this.leftClockEncoder.toUint8Array()),Tn(e,this.rightClockEncoder.toUint8Array()),Tn(e,Ni(this.infoEncoder)),Tn(e,this.stringEncoder.toUint8Array()),Tn(e,Ni(this.parentInfoEncoder)),Tn(e,this.typeRefEncoder.toUint8Array()),Tn(e,this.lenEncoder.toUint8Array()),tv(e,Ni(this.restEncoder)),Ni(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){Au(this.restEncoder,e)}writeBuf(e){Tn(this.restEncoder,e)}writeJSON(e){Au(this.restEncoder,e)}writeKey(e){const t=this.keyMap.get(e);t===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}}const yB=(n,e,t,r)=>{r=Ya(r,e[0].id.clock);const i=$i(e,r);$e(n.restEncoder,e.length-i),n.writeClient(t),$e(n.restEncoder,r);const o=e[i];o.write(n,r-o.id.clock);for(let s=i+1;s<e.length;s++)e[s].write(n,0)},vB=(n,e,t)=>{const r=new Map;t.forEach((i,o)=>{yn(e,o)>i&&r.set(o,i)}),ov(e).forEach((i,o)=>{t.has(o)||r.set(o,0)}),$e(n.restEncoder,r.size),La(r.entries()).sort((i,o)=>o[0]-i[0]).forEach(([i,o])=>{yB(n,e.clients.get(i),i,o)})},bB=(n,e)=>vB(n,e.doc.store,e.beforeState);class SB{constructor(){this.l=[]}}const OS=()=>new SB,IS=(n,e)=>n.l.push(e),MS=(n,e)=>{const t=n.l,r=t.length;n.l=t.filter(i=>e!==i),r===n.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Pk=(n,e,t)=>rv(n.l,[e,t]);class hd{constructor(e,t){this.client=e,this.clock=t}}const $f=(n,e)=>n===e||n!==null&&e!==null&&n.client===e.client&&n.clock===e.clock,Ve=(n,e)=>new hd(n,e),Iu=n=>{for(const[e,t]of n.doc.share.entries())if(t===n)return e;throw Yo()};class Kd{constructor(e,t,r,i=0){this.type=e,this.tname=t,this.item=r,this.assoc=i}}const zf=(n,e,t)=>{let r=null,i=null;return n._item===null?i=Iu(n):r=Ve(n._item.id.client,n._item.id.clock),new Kd(r,i,e,t)},Bg=(n,e,t=0)=>{let r=n._start;if(t<0){if(e===0)return zf(n,null,t);e--}for(;r!==null;){if(!r.deleted&&r.countable){if(r.length>e)return zf(n,Ve(r.id.client,r.id.clock+e),t);e-=r.length}if(r.right===null&&t<0)return zf(n,r.lastId,t);r=r.right}return zf(n,null,t)},ya=(n,e)=>e===void 0?!n.deleted:e.sv.has(n.id.client)&&(e.sv.get(n.id.client)||0)>n.id.clock&&!Ok(e.ds,n.id),Vm=(n,e)=>{const t=Ja(n.meta,Vm,Fa),r=n.doc.store;t.has(e)||(e.sv.forEach((i,o)=>{i<yn(r,o)&&Ko(n,Ve(o,i))}),Ak(n,e.ds,i=>{}),t.add(e))};class wB{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const ov=n=>{const e=new Map;return n.clients.forEach((t,r)=>{const i=t[t.length-1];e.set(r,i.id.clock+i.length)}),e},yn=(n,e)=>{const t=n.clients.get(e);if(t===void 0)return 0;const r=t[t.length-1];return r.id.clock+r.length},_k=(n,e)=>{let t=n.clients.get(e.id.client);if(t===void 0)t=[],n.clients.set(e.id.client,t);else{const r=t[t.length-1];if(r.id.clock+r.length!==e.id.clock)throw Yo()}t.push(e)},$i=(n,e)=>{let t=0,r=n.length-1,i=n[r],o=i.id.clock;if(o===e)return r;let s=el(e/(o+i.length-1)*r);for(;t<=r;){if(i=n[s],o=i.id.clock,o<=e){if(e<o+i.length)return s;t=s+1}else r=s-1;s=el((t+r)/2)}throw Yo()},xB=(n,e)=>{const t=n.clients.get(e.client);return t[$i(t,e.clock)]},$g=xB,Gm=(n,e,t)=>{const r=$i(e,t),i=e[r];return i.id.clock<t&&i instanceof On?(e.splice(r+1,0,qk(n,i,t-i.id.clock)),r+1):r},Ko=(n,e)=>{const t=n.doc.store.clients.get(e.client);return t[Gm(n,t,e.clock)]},DS=(n,e,t)=>{const r=e.clients.get(t.client),i=$i(r,t.clock),o=r[i];return t.clock!==o.id.clock+o.length-1&&o.constructor!==No&&r.splice(i+1,0,qk(n,o,t.clock-o.id.clock+1)),o},kB=(n,e,t)=>{const r=n.clients.get(e.id.client);r[$i(r,e.id.clock)]=t},Nk=(n,e,t,r,i)=>{if(r===0)return;const o=t+r;let s=Gm(n,e,t),a;do a=e[s++],o<a.id.clock+a.length&&Gm(n,e,o),i(a);while(s<e.length&&e[s].id.clock<o)};class CB{constructor(e,t,r){this.doc=e,this.deleteSet=new uB,this.beforeState=ov(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=r,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}const PS=(n,e)=>e.deleteSet.clients.size===0&&!lL(e.afterState,(t,r)=>e.beforeState.get(r)!==t)?!1:(Ik(e.deleteSet),bB(n,e),dB(n,e.deleteSet),!0),_S=(n,e,t)=>{const r=e._item;(r===null||r.id.clock<(n.beforeState.get(r.id.client)||0)&&!r.deleted)&&Ja(n.changed,e,Fa).add(t)},pd=(n,e)=>{let t=n[e],r=n[e-1],i=e;for(;i>0;t=r,r=n[--i-1]){if(r.deleted===t.deleted&&r.constructor===t.constructor&&r.mergeWith(t)){t instanceof On&&t.parentSub!==null&&t.parent._map.get(t.parentSub)===t&&t.parent._map.set(t.parentSub,r);continue}break}const o=e-i;return o&&n.splice(e+1-o,o),o},EB=(n,e,t)=>{for(const[r,i]of n.clients.entries()){const o=e.clients.get(r);for(let s=i.length-1;s>=0;s--){const a=i[s],c=a.clock+a.len;for(let f=$i(o,a.clock),p=o[f];f<o.length&&p.id.clock<c;p=o[++f]){const m=o[f];if(a.clock+a.len<=m.id.clock)break;m instanceof On&&m.deleted&&!m.keep&&t(m)&&m.gc(e,!1)}}}},TB=(n,e)=>{n.clients.forEach((t,r)=>{const i=e.clients.get(r);for(let o=t.length-1;o>=0;o--){const s=t[o],a=mk(i.length-1,1+$i(i,s.clock+s.len-1));for(let c=a,f=i[c];c>0&&f.id.clock>=s.clock;f=i[c])c-=1+pd(i,c)}})},Fk=(n,e)=>{if(e<n.length){const t=n[e],r=t.doc,i=r.store,o=t.deleteSet,s=t._mergeStructs;try{Ik(o),t.afterState=ov(t.doc.store),r.emit("beforeObserverCalls",[t,r]);const a=[];t.changed.forEach((c,f)=>a.push(()=>{(f._item===null||!f._item.deleted)&&f._callObserver(t,c)})),a.push(()=>{t.changedParentTypes.forEach((c,f)=>{f._dEH.l.length>0&&(f._item===null||!f._item.deleted)&&(c=c.filter(p=>p.target._item===null||!p.target._item.deleted),c.forEach(p=>{p.currentTarget=f,p._path=null}),c.sort((p,m)=>p.path.length-m.path.length),Pk(f._dEH,c,t))})}),a.push(()=>r.emit("afterTransaction",[t,r])),rv(a,[]),t._needFormattingCleanup&&BB(t)}finally{r.gc&&EB(o,i,r.gcFilter),TB(o,i),t.afterState.forEach((p,m)=>{const S=t.beforeState.get(m)||0;if(S!==p){const C=i.clients.get(m),E=Ya($i(C,S),1);for(let P=C.length-1;P>=E;)P-=1+pd(C,P)}});for(let p=s.length-1;p>=0;p--){const{client:m,clock:S}=s[p].id,C=i.clients.get(m),E=$i(C,S);E+1<C.length&&pd(C,E+1)>1||E>0&&pd(C,E)}if(!t.local&&t.afterState.get(r.clientID)!==t.beforeState.get(r.clientID)&&(sB(iv,xk,"[yjs] ",kk,Ck,"Changed the client-id because another client seems to be using it."),r.clientID=Dk()),r.emit("afterTransactionCleanup",[t,r]),r._observers.has("update")){const p=new pB;PS(p,t)&&r.emit("update",[p.toUint8Array(),t.origin,r,t])}if(r._observers.has("updateV2")){const p=new mB;PS(p,t)&&r.emit("updateV2",[p.toUint8Array(),t.origin,r,t])}const{subdocsAdded:a,subdocsLoaded:c,subdocsRemoved:f}=t;(a.size>0||f.size>0||c.size>0)&&(a.forEach(p=>{p.clientID=r.clientID,p.collectionid==null&&(p.collectionid=r.collectionid),r.subdocs.add(p)}),f.forEach(p=>r.subdocs.delete(p)),r.emit("subdocs",[{loaded:c,added:a,removed:f},r,t]),f.forEach(p=>p.destroy())),n.length<=e+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,n])):Fk(n,e+1)}}},He=(n,e,t=null,r=!0)=>{const i=n._transactionCleanups;let o=!1,s=null;n._transaction===null&&(o=!0,n._transaction=new CB(n,t,r),i.push(n._transaction),i.length===1&&n.emit("beforeAllTransactions",[n]),n.emit("beforeTransaction",[n._transaction,n]));try{s=e(n._transaction)}finally{if(o){const a=n._transaction===i[0];n._transaction=null,a&&Fk(i,0)}}return s},NS="You must not compute changes after the event-handler fired.";class Uh{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=RB(this.currentTarget,this.target))}deletes(e){return Ok(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ba(NS);const e=new Map,t=this.target;this.transaction.changed.get(t).forEach(i=>{if(i!==null){const o=t._map.get(i);let s,a;if(this.adds(o)){let c=o.left;for(;c!==null&&this.adds(c);)c=c.left;if(this.deletes(o))if(c!==null&&this.deletes(c))s="delete",a=Dg(c.content.getContent());else return;else c!==null&&this.deletes(c)?(s="update",a=Dg(c.content.getContent())):(s="add",a=void 0)}else if(this.deletes(o))s="delete",a=Dg(o.content.getContent());else return;e.set(i,{action:s,oldValue:a})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ba(NS);const t=this.target,r=Fa(),i=Fa(),o=[];if(e={added:r,deleted:i,delta:o,keys:this.keys},this.transaction.changed.get(t).has(null)){let a=null;const c=()=>{a&&o.push(a)};for(let f=t._start;f!==null;f=f.right)f.deleted?this.deletes(f)&&!this.adds(f)&&((a===null||a.delete===void 0)&&(c(),a={delete:0}),a.delete+=f.length,i.add(f)):this.adds(f)?((a===null||a.insert===void 0)&&(c(),a={insert:[]}),a.insert=a.insert.concat(f.content.getContent()),r.add(f)):((a===null||a.retain===void 0)&&(c(),a={retain:0}),a.retain+=f.length);a!==null&&a.retain===void 0&&c()}this._changes=e}return e}}const RB=(n,e)=>{const t=[];for(;e._item!==null&&e!==n;){if(e._item.parentSub!==null)t.unshift(e._item.parentSub);else{let r=0,i=e._item.parent._start;for(;i!==e._item&&i!==null;)!i.deleted&&i.countable&&(r+=i.length),i=i.right;t.unshift(r)}e=e._item.parent}return t},zt=()=>{lB("Invalid access: Add Yjs type to a document before reading data.")},Lk=80;let sv=0;class AB{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=sv++}}const OB=n=>{n.timestamp=sv++},Bk=(n,e,t)=>{n.p.marker=!1,n.p=e,e.marker=!0,n.index=t,n.timestamp=sv++},IB=(n,e,t)=>{if(n.length>=Lk){const r=n.reduce((i,o)=>i.timestamp<o.timestamp?i:o);return Bk(r,e,t),r}else{const r=new AB(e,t);return n.push(r),r}},Wh=(n,e)=>{if(n._start===null||e===0||n._searchMarker===null)return null;const t=n._searchMarker.length===0?null:n._searchMarker.reduce((o,s)=>fd(e-o.index)<fd(e-s.index)?o:s);let r=n._start,i=0;for(t!==null&&(r=t.p,i=t.index,OB(t));r.right!==null&&i<e;){if(!r.deleted&&r.countable){if(e<i+r.length)break;i+=r.length}r=r.right}for(;r.left!==null&&i>e;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return t!==null&&fd(t.index-i)<r.parent.length/Lk?(Bk(t,r,i),t):IB(n._searchMarker,r,i)},Mu=(n,e,t)=>{for(let r=n.length-1;r>=0;r--){const i=n[r];if(t>0){let o=i.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(i.index-=o.length);if(o===null||o.marker===!0){n.splice(r,1);continue}i.p=o,o.marker=!0}(e<i.index||t>0&&e===i.index)&&(i.index=Ya(e,i.index+t))}},Hh=(n,e,t)=>{const r=n,i=e.changedParentTypes;for(;Ja(i,n,()=>[]).push(t),n._item!==null;)n=n._item.parent;Pk(r._eH,t,e)};class Pt{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=OS(),this._dEH=OS(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw Gr()}clone(){throw Gr()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){IS(this._eH,e)}observeDeep(e){IS(this._dEH,e)}unobserve(e){MS(this._eH,e)}unobserveDeep(e){MS(this._dEH,e)}toJSON(){}}const $k=(n,e,t)=>{n.doc??zt(),e<0&&(e=n._length+e),t<0&&(t=n._length+t);let r=t-e;const i=[];let o=n._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){const s=o.content.getContent();if(s.length<=e)e-=s.length;else{for(let a=e;a<s.length&&r>0;a++)i.push(s[a]),r--;e=0}}o=o.right}return i},zk=n=>{n.doc??zt();const e=[];let t=n._start;for(;t!==null;){if(t.countable&&!t.deleted){const r=t.content.getContent();for(let i=0;i<r.length;i++)e.push(r[i])}t=t.right}return e},Du=(n,e)=>{let t=0,r=n._start;for(n.doc??zt();r!==null;){if(r.countable&&!r.deleted){const i=r.content.getContent();for(let o=0;o<i.length;o++)e(i[o],t++,n)}r=r.right}},jk=(n,e)=>{const t=[];return Du(n,(r,i)=>{t.push(e(r,i,n))}),t},MB=n=>{let e=n._start,t=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(t===null){for(;e!==null&&e.deleted;)e=e.right;if(e===null)return{done:!0,value:void 0};t=e.content.getContent(),r=0,e=e.right}const i=t[r++];return t.length<=r&&(t=null),{done:!1,value:i}}}},Uk=(n,e)=>{n.doc??zt();const t=Wh(n,e);let r=n._start;for(t!==null&&(r=t.p,e-=t.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(e<r.length)return r.content.getContent()[e];e-=r.length}},Xd=(n,e,t,r)=>{let i=t;const o=n.doc,s=o.clientID,a=o.store,c=t===null?e._start:t.right;let f=[];const p=()=>{f.length>0&&(i=new On(Ve(s,yn(a,s)),i,i&&i.lastId,c,c&&c.id,e,null,new za(f)),i.integrate(n,0),f=[])};r.forEach(m=>{if(m===null)f.push(m);else switch(m.constructor){case Number:case Object:case Boolean:case Array:case String:f.push(m);break;default:switch(p(),m.constructor){case Uint8Array:case ArrayBuffer:i=new On(Ve(s,yn(a,s)),i,i&&i.lastId,c,c&&c.id,e,null,new Vh(new Uint8Array(m))),i.integrate(n,0);break;case Wu:i=new On(Ve(s,yn(a,s)),i,i&&i.lastId,c,c&&c.id,e,null,new Gh(m)),i.integrate(n,0);break;default:if(m instanceof Pt)i=new On(Ve(s,yn(a,s)),i,i&&i.lastId,c,c&&c.id,e,null,new es(m)),i.integrate(n,0);else throw new Error("Unexpected content type in insert operation")}}}),p()},Wk=()=>Ba("Length exceeded!"),Hk=(n,e,t,r)=>{if(t>e._length)throw Wk();if(t===0)return e._searchMarker&&Mu(e._searchMarker,t,r.length),Xd(n,e,null,r);const i=t,o=Wh(e,t);let s=e._start;for(o!==null&&(s=o.p,t-=o.index,t===0&&(s=s.prev,t+=s&&s.countable&&!s.deleted?s.length:0));s!==null;s=s.right)if(!s.deleted&&s.countable){if(t<=s.length){t<s.length&&Ko(n,Ve(s.id.client,s.id.clock+t));break}t-=s.length}return e._searchMarker&&Mu(e._searchMarker,i,r.length),Xd(n,e,s,r)},DB=(n,e,t)=>{let i=(e._searchMarker||[]).reduce((o,s)=>s.index>o.index?s:o,{index:0,p:e._start}).p;if(i)for(;i.right;)i=i.right;return Xd(n,e,i,t)},Vk=(n,e,t,r)=>{if(r===0)return;const i=t,o=r,s=Wh(e,t);let a=e._start;for(s!==null&&(a=s.p,t-=s.index);a!==null&&t>0;a=a.right)!a.deleted&&a.countable&&(t<a.length&&Ko(n,Ve(a.id.client,a.id.clock+t)),t-=a.length);for(;r>0&&a!==null;)a.deleted||(r<a.length&&Ko(n,Ve(a.id.client,a.id.clock+r)),a.delete(n),r-=a.length),a=a.right;if(r>0)throw Wk();e._searchMarker&&Mu(e._searchMarker,i,-o+r)},Zd=(n,e,t)=>{const r=e._map.get(t);r!==void 0&&r.delete(n)},lv=(n,e,t,r)=>{const i=e._map.get(t)||null,o=n.doc,s=o.clientID;let a;if(r==null)a=new za([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:a=new za([r]);break;case Uint8Array:a=new Vh(r);break;case Wu:a=new Gh(r);break;default:if(r instanceof Pt)a=new es(r);else throw new Error("Unexpected content type")}new On(Ve(s,yn(o.store,s)),i,i&&i.lastId,null,null,e,t,a).integrate(n,0)},av=(n,e)=>{n.doc??zt();const t=n._map.get(e);return t!==void 0&&!t.deleted?t.content.getContent()[t.length-1]:void 0},Gk=n=>{const e={};return n.doc??zt(),n._map.forEach((t,r)=>{t.deleted||(e[r]=t.content.getContent()[t.length-1])}),e},Jk=(n,e)=>{n.doc??zt();const t=n._map.get(e);return t!==void 0&&!t.deleted},PB=(n,e)=>{const t={};return n._map.forEach((r,i)=>{let o=r;for(;o!==null&&(!e.sv.has(o.id.client)||o.id.clock>=(e.sv.get(o.id.client)||0));)o=o.left;o!==null&&ya(o,e)&&(t[i]=o.content.getContent()[o.length-1])}),t},jf=n=>(n.doc??zt(),aB(n._map.entries(),e=>!e[1].deleted));class _B extends Uh{}class uu extends Pt{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){const t=new uu;return t.push(e),t}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new uu}clone(){const e=new uu;return e.insert(0,this.toArray().map(t=>t instanceof Pt?t.clone():t)),e}get length(){return this.doc??zt(),this._length}_callObserver(e,t){super._callObserver(e,t),Hh(this,e,new _B(this,e))}insert(e,t){this.doc!==null?He(this.doc,r=>{Hk(r,this,e,t)}):this._prelimContent.splice(e,0,...t)}push(e){this.doc!==null?He(this.doc,t=>{DB(t,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,t=1){this.doc!==null?He(this.doc,r=>{Vk(r,this,e,t)}):this._prelimContent.splice(e,t)}get(e){return Uk(this,e)}toArray(){return zk(this)}slice(e=0,t=this.length){return $k(this,e,t)}toJSON(){return this.map(e=>e instanceof Pt?e.toJSON():e)}map(e){return jk(this,e)}forEach(e){Du(this,e)}[Symbol.iterator](){return MB(this)}_write(e){e.writeTypeRef(HB)}}class NB extends Uh{constructor(e,t,r){super(e,t),this.keysChanged=r}}class Qd extends Pt{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach((r,i)=>{this.set(i,r)}),this._prelimContent=null}_copy(){return new Qd}clone(){const e=new Qd;return this.forEach((t,r)=>{e.set(r,t instanceof Pt?t.clone():t)}),e}_callObserver(e,t){Hh(this,e,new NB(this,e,t))}toJSON(){this.doc??zt();const e={};return this._map.forEach((t,r)=>{if(!t.deleted){const i=t.content.getContent()[t.length-1];e[r]=i instanceof Pt?i.toJSON():i}}),e}get size(){return[...jf(this)].length}keys(){return Lg(jf(this),e=>e[0])}values(){return Lg(jf(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Lg(jf(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??zt(),this._map.forEach((t,r)=>{t.deleted||e(t.content.getContent()[t.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc!==null?He(this.doc,t=>{Zd(t,this,e)}):this._prelimContent.delete(e)}set(e,t){return this.doc!==null?He(this.doc,r=>{lv(r,this,e,t)}):this._prelimContent.set(e,t),t}get(e){return av(this,e)}has(e){return Jk(this,e)}clear(){this.doc!==null?He(this.doc,e=>{this.forEach(function(t,r,i){Zd(e,i,r)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(VB)}}const Uo=(n,e)=>n===e||typeof n=="object"&&typeof e=="object"&&n&&e&&HL(n,e);class Jm{constructor(e,t,r,i){this.left=e,this.right=t,this.index=r,this.currentAttributes=i}forward(){switch(this.right===null&&Yo(),this.right.content.constructor){case xt:this.right.deleted||Ka(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const FS=(n,e,t)=>{for(;e.right!==null&&t>0;){switch(e.right.content.constructor){case xt:e.right.deleted||Ka(e.currentAttributes,e.right.content);break;default:e.right.deleted||(t<e.right.length&&Ko(n,Ve(e.right.id.client,e.right.id.clock+t)),e.index+=e.right.length,t-=e.right.length);break}e.left=e.right,e.right=e.right.right}return e},Uf=(n,e,t,r)=>{const i=new Map,o=r?Wh(e,t):null;if(o){const s=new Jm(o.p.left,o.p,o.index,i);return FS(n,s,t-o.index)}else{const s=new Jm(null,e._start,0,i);return FS(n,s,t)}},Yk=(n,e,t,r)=>{for(;t.right!==null&&(t.right.deleted===!0||t.right.content.constructor===xt&&Uo(r.get(t.right.content.key),t.right.content.value));)t.right.deleted||r.delete(t.right.content.key),t.forward();const i=n.doc,o=i.clientID;r.forEach((s,a)=>{const c=t.left,f=t.right,p=new On(Ve(o,yn(i.store,o)),c,c&&c.lastId,f,f&&f.id,e,null,new xt(a,s));p.integrate(n,0),t.right=p,t.forward()})},Ka=(n,e)=>{const{key:t,value:r}=e;r===null?n.delete(t):n.set(t,r)},Kk=(n,e)=>{for(;n.right!==null;){if(!(n.right.deleted||n.right.content.constructor===xt&&Uo(e[n.right.content.key]??null,n.right.content.value)))break;n.forward()}},Xk=(n,e,t,r)=>{const i=n.doc,o=i.clientID,s=new Map;for(const a in r){const c=r[a],f=t.currentAttributes.get(a)??null;if(!Uo(f,c)){s.set(a,f);const{left:p,right:m}=t;t.right=new On(Ve(o,yn(i.store,o)),p,p&&p.lastId,m,m&&m.id,e,null,new xt(a,c)),t.right.integrate(n,0),t.forward()}}return s},zg=(n,e,t,r,i)=>{t.currentAttributes.forEach((S,C)=>{i[C]===void 0&&(i[C]=null)});const o=n.doc,s=o.clientID;Kk(t,i);const a=Xk(n,e,t,i),c=r.constructor===String?new zi(r):r instanceof Pt?new es(r):new Xa(r);let{left:f,right:p,index:m}=t;e._searchMarker&&Mu(e._searchMarker,t.index,c.getLength()),p=new On(Ve(s,yn(o.store,s)),f,f&&f.lastId,p,p&&p.id,e,null,c),p.integrate(n,0),t.right=p,t.index=m,t.forward(),Yk(n,e,t,a)},LS=(n,e,t,r,i)=>{const o=n.doc,s=o.clientID;Kk(t,i);const a=Xk(n,e,t,i);e:for(;t.right!==null&&(r>0||a.size>0&&(t.right.deleted||t.right.content.constructor===xt));){if(!t.right.deleted)switch(t.right.content.constructor){case xt:{const{key:c,value:f}=t.right.content,p=i[c];if(p!==void 0){if(Uo(p,f))a.delete(c);else{if(r===0)break e;a.set(c,f)}t.right.delete(n)}else t.currentAttributes.set(c,f);break}default:r<t.right.length&&Ko(n,Ve(t.right.id.client,t.right.id.clock+r)),r-=t.right.length;break}t.forward()}if(r>0){let c="";for(;r>0;r--)c+=`
15
+ `;t.right=new On(Ve(s,yn(o.store,s)),t.left,t.left&&t.left.lastId,t.right,t.right&&t.right.id,e,null,new zi(c)),t.right.integrate(n,0),t.forward()}Yk(n,e,t,a)},Zk=(n,e,t,r,i)=>{let o=e;const s=Vr();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===xt){const f=o.content;s.set(f.key,f)}o=o.right}let a=0,c=!1;for(;e!==o;){if(t===e&&(c=!0),!e.deleted){const f=e.content;switch(f.constructor){case xt:{const{key:p,value:m}=f,S=r.get(p)??null;(s.get(p)!==f||S===m)&&(e.delete(n),a++,!c&&(i.get(p)??null)===m&&S!==m&&(S===null?i.delete(p):i.set(p,S))),!c&&!e.deleted&&Ka(i,f);break}}}e=e.right}return a},FB=(n,e)=>{for(;e&&e.right&&(e.right.deleted||!e.right.countable);)e=e.right;const t=new Set;for(;e&&(e.deleted||!e.countable);){if(!e.deleted&&e.content.constructor===xt){const r=e.content.key;t.has(r)?e.delete(n):t.add(r)}e=e.left}},LB=n=>{let e=0;return He(n.doc,t=>{let r=n._start,i=n._start,o=Vr();const s=jm(o);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case xt:Ka(s,i.content);break;default:e+=Zk(t,r,i,o,s),o=jm(s),r=i;break}i=i.right}}),e},BB=n=>{const e=new Set,t=n.doc;for(const[r,i]of n.afterState.entries()){const o=n.beforeState.get(r)||0;i!==o&&Nk(n,t.store.clients.get(r),o,i,s=>{!s.deleted&&s.content.constructor===xt&&s.constructor!==No&&e.add(s.parent)})}He(t,r=>{Ak(n,n.deleteSet,i=>{if(i instanceof No||!i.parent._hasFormatting||e.has(i.parent))return;const o=i.parent;i.content.constructor===xt?e.add(o):FB(r,i)});for(const i of e)LB(i)})},BS=(n,e,t)=>{const r=t,i=jm(e.currentAttributes),o=e.right;for(;t>0&&e.right!==null;){if(e.right.deleted===!1)switch(e.right.content.constructor){case es:case Xa:case zi:t<e.right.length&&Ko(n,Ve(e.right.id.client,e.right.id.clock+t)),t-=e.right.length,e.right.delete(n);break}e.forward()}o&&Zk(n,o,e.right,i,e.currentAttributes);const s=(e.left||e.right).parent;return s._searchMarker&&Mu(s._searchMarker,e.index,-r+t),e};class $B extends Uh{constructor(e,t,r){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,r.forEach(i=>{i===null?this.childListChanged=!0:this.keysChanged.add(i)})}get changes(){if(this._changes===null){const e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(this._delta===null){const e=this.target.doc,t=[];He(e,r=>{const i=new Map,o=new Map;let s=this.target._start,a=null;const c={};let f="",p=0,m=0;const S=()=>{if(a!==null){let C=null;switch(a){case"delete":m>0&&(C={delete:m}),m=0;break;case"insert":(typeof f=="object"||f.length>0)&&(C={insert:f},i.size>0&&(C.attributes={},i.forEach((E,P)=>{E!==null&&(C.attributes[P]=E)}))),f="";break;case"retain":p>0&&(C={retain:p},jL(c)||(C.attributes=BL({},c))),p=0;break}C&&t.push(C),a=null}};for(;s!==null;){switch(s.content.constructor){case es:case Xa:this.adds(s)?this.deletes(s)||(S(),a="insert",f=s.content.getContent()[0],S()):this.deletes(s)?(a!=="delete"&&(S(),a="delete"),m+=1):s.deleted||(a!=="retain"&&(S(),a="retain"),p+=1);break;case zi:this.adds(s)?this.deletes(s)||(a!=="insert"&&(S(),a="insert"),f+=s.content.str):this.deletes(s)?(a!=="delete"&&(S(),a="delete"),m+=s.length):s.deleted||(a!=="retain"&&(S(),a="retain"),p+=s.length);break;case xt:{const{key:C,value:E}=s.content;if(this.adds(s)){if(!this.deletes(s)){const P=i.get(C)??null;Uo(P,E)?E!==null&&s.delete(r):(a==="retain"&&S(),Uo(E,o.get(C)??null)?delete c[C]:c[C]=E)}}else if(this.deletes(s)){o.set(C,E);const P=i.get(C)??null;Uo(P,E)||(a==="retain"&&S(),c[C]=P)}else if(!s.deleted){o.set(C,E);const P=c[C];P!==void 0&&(Uo(P,E)?P!==null&&s.delete(r):(a==="retain"&&S(),E===null?delete c[C]:c[C]=E))}s.deleted||(a==="insert"&&S(),Ka(i,s.content));break}}s=s.right}for(S();t.length>0;){const C=t[t.length-1];if(C.retain!==void 0&&C.attributes===void 0)t.pop();else break}}),this._delta=t}return this._delta}}class Pu extends Pt{constructor(e){super(),this._pending=e!==void 0?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??zt(),this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Pu}clone(){const e=new Pu;return e.applyDelta(this.toDelta()),e}_callObserver(e,t){super._callObserver(e,t);const r=new $B(this,e,t);Hh(this,e,r),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??zt();let e="",t=this._start;for(;t!==null;)!t.deleted&&t.countable&&t.content.constructor===zi&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){this.doc!==null?He(this.doc,r=>{const i=new Jm(null,this._start,0,new Map);for(let o=0;o<e.length;o++){const s=e[o];if(s.insert!==void 0){const a=!t&&typeof s.insert=="string"&&o===e.length-1&&i.right===null&&s.insert.slice(-1)===`
16
+ `?s.insert.slice(0,-1):s.insert;(typeof a!="string"||a.length>0)&&zg(r,this,i,a,s.attributes||{})}else s.retain!==void 0?LS(r,this,i,s.retain,s.attributes||{}):s.delete!==void 0&&BS(r,i,s.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,t,r){this.doc??zt();const i=[],o=new Map,s=this.doc;let a="",c=this._start;function f(){if(a.length>0){const m={};let S=!1;o.forEach((E,P)=>{S=!0,m[P]=E});const C={insert:a};S&&(C.attributes=m),i.push(C),a=""}}const p=()=>{for(;c!==null;){if(ya(c,e)||t!==void 0&&ya(c,t))switch(c.content.constructor){case zi:{const m=o.get("ychange");e!==void 0&&!ya(c,e)?(m===void 0||m.user!==c.id.client||m.type!=="removed")&&(f(),o.set("ychange",r?r("removed",c.id):{type:"removed"})):t!==void 0&&!ya(c,t)?(m===void 0||m.user!==c.id.client||m.type!=="added")&&(f(),o.set("ychange",r?r("added",c.id):{type:"added"})):m!==void 0&&(f(),o.delete("ychange")),a+=c.content.str;break}case es:case Xa:{f();const m={insert:c.content.getContent()[0]};if(o.size>0){const S={};m.attributes=S,o.forEach((C,E)=>{S[E]=C})}i.push(m);break}case xt:ya(c,e)&&(f(),Ka(o,c.content));break}c=c.right}f()};return e||t?He(s,m=>{e&&Vm(m,e),t&&Vm(m,t),p()},"cleanup"):p(),i}insert(e,t,r){if(t.length<=0)return;const i=this.doc;i!==null?He(i,o=>{const s=Uf(o,this,e,!r);r||(r={},s.currentAttributes.forEach((a,c)=>{r[c]=a})),zg(o,this,s,t,r)}):this._pending.push(()=>this.insert(e,t,r))}insertEmbed(e,t,r){const i=this.doc;i!==null?He(i,o=>{const s=Uf(o,this,e,!r);zg(o,this,s,t,r||{})}):this._pending.push(()=>this.insertEmbed(e,t,r||{}))}delete(e,t){if(t===0)return;const r=this.doc;r!==null?He(r,i=>{BS(i,Uf(i,this,e,!0),t)}):this._pending.push(()=>this.delete(e,t))}format(e,t,r){if(t===0)return;const i=this.doc;i!==null?He(i,o=>{const s=Uf(o,this,e,!1);s.right!==null&&LS(o,this,s,t,r)}):this._pending.push(()=>this.format(e,t,r))}removeAttribute(e){this.doc!==null?He(this.doc,t=>{Zd(t,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,t){this.doc!==null?He(this.doc,r=>{lv(r,this,e,t)}):this._pending.push(()=>this.setAttribute(e,t))}getAttribute(e){return av(this,e)}getAttributes(){return Gk(this)}_write(e){e.writeTypeRef(GB)}}class jg{constructor(e,t=()=>!0){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??zt()}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(t)))do if(t=e.content.type,!e.deleted&&(t.constructor===_u||t.constructor===$a)&&t._start!==null)e=t._start;else for(;e!==null;)if(e.right!==null){e=e.right;break}else e.parent===this._root?e=null:e=e.parent._item;while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}}class $a extends Pt{constructor(){super(),this._prelimContent=[]}get firstChild(){const e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new $a}clone(){const e=new $a;return e.insert(0,this.toArray().map(t=>t instanceof Pt?t.clone():t)),e}get length(){return this.doc??zt(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new jg(this,e)}querySelector(e){e=e.toUpperCase();const r=new jg(this,i=>i.nodeName&&i.nodeName.toUpperCase()===e).next();return r.done?null:r.value}querySelectorAll(e){return e=e.toUpperCase(),La(new jg(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e))}_callObserver(e,t){Hh(this,e,new zB(this,t,e))}toString(){return jk(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,t={},r){const i=e.createDocumentFragment();return r!==void 0&&r._createAssociation(i,this),Du(this,o=>{i.insertBefore(o.toDOM(e,t,r),null)}),i}insert(e,t){this.doc!==null?He(this.doc,r=>{Hk(r,this,e,t)}):this._prelimContent.splice(e,0,...t)}insertAfter(e,t){if(this.doc!==null)He(this.doc,r=>{const i=e&&e instanceof Pt?e._item:e;Xd(r,this,i,t)});else{const r=this._prelimContent,i=e===null?0:r.findIndex(o=>o===e)+1;if(i===0&&e!==null)throw Ba("Reference item not found");r.splice(i,0,...t)}}delete(e,t=1){this.doc!==null?He(this.doc,r=>{Vk(r,this,e,t)}):this._prelimContent.splice(e,t)}toArray(){return zk(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Uk(this,e)}slice(e=0,t=this.length){return $k(this,e,t)}forEach(e){Du(this,e)}_write(e){e.writeTypeRef(YB)}}class _u extends $a{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach((r,i)=>{this.setAttribute(i,r)}),this._prelimAttrs=null}_copy(){return new _u(this.nodeName)}clone(){const e=new _u(this.nodeName),t=this.getAttributes();return zL(t,(r,i)=>{typeof r=="string"&&e.setAttribute(i,r)}),e.insert(0,this.toArray().map(r=>r instanceof Pt?r.clone():r)),e}toString(){const e=this.getAttributes(),t=[],r=[];for(const a in e)r.push(a);r.sort();const i=r.length;for(let a=0;a<i;a++){const c=r[a];t.push(c+'="'+e[c]+'"')}const o=this.nodeName.toLocaleLowerCase(),s=t.length>0?" "+t.join(" "):"";return`<${o}${s}>${super.toString()}</${o}>`}removeAttribute(e){this.doc!==null?He(this.doc,t=>{Zd(t,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,t){this.doc!==null?He(this.doc,r=>{lv(r,this,e,t)}):this._prelimAttrs.set(e,t)}getAttribute(e){return av(this,e)}hasAttribute(e){return Jk(this,e)}getAttributes(e){return e?PB(this,e):Gk(this)}toDOM(e=document,t={},r){const i=e.createElement(this.nodeName),o=this.getAttributes();for(const s in o){const a=o[s];typeof a=="string"&&i.setAttribute(s,a)}return Du(this,s=>{i.appendChild(s.toDOM(e,t,r))}),r!==void 0&&r._createAssociation(i,this),i}_write(e){e.writeTypeRef(JB),e.writeKey(this.nodeName)}}class zB extends Uh{constructor(e,t,r){super(e,r),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach(i=>{i===null?this.childListChanged=!0:this.attributesChanged.add(i)})}}class Nu extends Pu{get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new Nu}clone(){const e=new Nu;return e.applyDelta(this.toDelta()),e}toDOM(e=document,t,r){const i=e.createTextNode(this.toString());return r!==void 0&&r._createAssociation(i,this),i}toString(){return this.toDelta().map(e=>{const t=[];for(const i in e.attributes){const o=[];for(const s in e.attributes[i])o.push({key:s,value:e.attributes[i][s]});o.sort((s,a)=>s.key<a.key?-1:1),t.push({nodeName:i,attrs:o})}t.sort((i,o)=>i.nodeName<o.nodeName?-1:1);let r="";for(let i=0;i<t.length;i++){const o=t[i];r+=`<${o.nodeName}`;for(let s=0;s<o.attrs.length;s++){const a=o.attrs[s];r+=` ${a.key}="${a.value}"`}r+=">"}r+=e.insert;for(let i=t.length-1;i>=0;i--)r+=`</${t[i].nodeName}>`;return r}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(KB)}}class Qk{constructor(e,t){this.id=e,this.length=t}get deleted(){throw Gr()}mergeWith(e){return!1}write(e,t,r){throw Gr()}integrate(e,t){throw Gr()}}const jB=0;class No extends Qk{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),_k(e.doc.store,this)}write(e,t){e.writeInfo(jB),e.writeLen(this.length-t)}getMissing(e,t){return null}}class Vh{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Vh(this.content)}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}}class qd{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new qd(this.len)}splice(e){const t=new qd(this.len-e);return this.len=e,t}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){Mk(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}}const UB=(n,e)=>new Wu({guid:n,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1});class Gh{constructor(e){e._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=e;const t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),e.meta!==null&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Gh(UB(this.doc.guid,this.opts))}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}class Xa{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Xa(this.embed)}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}}class xt{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new xt(this.key,this.value)}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){const r=t.parent;r._searchMarker=null,r._hasFormatting=!0}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}const WB=Yd("node_env")==="development";class za{constructor(e){this.arr=e,WB&&Sk(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new za(this.arr)}splice(e){const t=new za(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){const r=this.arr.length;e.writeLen(r-t);for(let i=t;i<r;i++){const o=this.arr[i];e.writeAny(o)}}getRef(){return 8}}class zi{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new zi(this.str)}splice(e){const t=new zi(this.str.slice(e));this.str=this.str.slice(0,e);const r=this.str.charCodeAt(e-1);return r>=55296&&r<=56319&&(this.str=this.str.slice(0,e-1)+"�",t.str="�"+t.str.slice(1)),t}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(t===0?this.str:this.str.slice(t))}getRef(){return 4}}const HB=0,VB=1,GB=2,JB=3,YB=4,KB=6;class es{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new es(this.type._copy())}splice(e){throw Gr()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;t!==null;)t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(e.beforeState.get(r.id.client)||0)&&e._mergeStructs.push(r):r.delete(e)}),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;t!==null;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(e,!0),r=r.left}),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}}const qk=(n,e,t)=>{const{client:r,clock:i}=e.id,o=new On(Ve(r,i+t),e,Ve(r,i+t-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(t));return e.deleted&&o.markDeleted(),e.keep&&(o.keep=!0),e.redone!==null&&(o.redone=Ve(e.redone.client,e.redone.clock+t)),e.right=o,o.right!==null&&(o.right.left=o),n._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),e.length=t,o};let On=class Ym extends Qk{constructor(e,t,r,i,o,s,a,c){super(e,c.getLength()),this.origin=r,this.left=t,this.right=i,this.rightOrigin=o,this.parent=s,this.parentSub=a,this.redone=null,this.content=c,this.info=this.content.isCountable()?bS:0}set marker(e){(this.info&_g)>0!==e&&(this.info^=_g)}get marker(){return(this.info&_g)>0}get keep(){return(this.info&vS)>0}set keep(e){this.keep!==e&&(this.info^=vS)}get countable(){return(this.info&bS)>0}get deleted(){return(this.info&Pg)>0}set deleted(e){this.deleted!==e&&(this.info^=Pg)}markDeleted(){this.info|=Pg}getMissing(e,t){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=yn(t,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=yn(t,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===hd&&this.id.client!==this.parent.client&&this.parent.clock>=yn(t,this.parent.client))return this.parent.client;if(this.origin&&(this.left=DS(e,t,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Ko(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===No||this.right&&this.right.constructor===No)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===Ym&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===Ym&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===hd){const r=$g(t,this.parent);r.constructor===No?this.parent=null:this.parent=r.content.type}return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=DS(e,e.doc.store,Ve(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,i;if(r!==null)i=r.right;else if(this.parentSub!==null)for(i=this.parent._map.get(this.parentSub)||null;i!==null&&i.left!==null;)i=i.left;else i=this.parent._start;const o=new Set,s=new Set;for(;i!==null&&i!==this.right;){if(s.add(i),o.add(i),$f(this.origin,i.origin)){if(i.id.client<this.id.client)r=i,o.clear();else if($f(this.rightOrigin,i.rightOrigin))break}else if(i.origin!==null&&s.has($g(e.doc.store,i.origin)))o.has($g(e.doc.store,i.origin))||(r=i,o.clear());else break;i=i.right}this.left=r}if(this.left!==null){const r=this.left.right;this.right=r,this.left.right=this}else{let r;if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start,this.parent._start=this;this.right=r}this.right!==null?this.right.left=this:this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)),this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),_k(e.doc.store,this),this.content.integrate(e,this),_S(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new No(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:Ve(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&$f(e.origin,this.lastId)&&this.right===e&&$f(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){const t=this.parent._searchMarker;return t&&t.forEach(r=>{r.p===e&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){const t=this.parent;this.countable&&this.parentSub===null&&(t._length-=this.length),this.markDeleted(),Mk(e.deleteSet,this.id.client,this.id.clock,this.length),_S(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw Yo();this.content.gc(e),t?kB(e,this,new No(this.id,this.length)):this.content=new qd(this.length)}write(e,t){const r=t>0?Ve(this.id.client,this.id.clock+t-1):this.origin,i=this.rightOrigin,o=this.parentSub,s=this.content.getRef()&dL|(r===null?0:Jd)|(i===null?0:yk)|(o===null?0:fL);if(e.writeInfo(s),r!==null&&e.writeLeftID(r),i!==null&&e.writeRightID(i),r===null&&i===null){const a=this.parent;if(a._item!==void 0){const c=a._item;if(c===null){const f=Iu(a);e.writeParentInfo(!0),e.writeString(f)}else e.writeParentInfo(!1),e.writeLeftID(c.id)}else a.constructor===String?(e.writeParentInfo(!0),e.writeString(a)):a.constructor===hd?(e.writeParentInfo(!1),e.writeLeftID(a)):Yo();o!==null&&e.writeString(o)}this.content.write(e,t)}};const eC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},tC="__ $YJS$ __";eC[tC]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");eC[tC]=!0;const XB=new ji("y-sync");new ji("y-undo");new ji("yjs-cursor");const ZB=(n,e,t)=>{if(n===0)return Bg(e,0,-1);let r=e._first===null?null:e._first.content.type;for(;r!==null&&e!==r;){if(r instanceof Nu){if(r._length>=n)return Bg(r,n,-1);if(n-=r._length,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{do r=r._item===null?null:r._item.parent,n--;while(r!==e&&r!==null&&r._item!==null&&r._item.next===null);r!==null&&r!==e&&(r=r._item===null?null:r._item.next.content.type)}}else{const i=(t.get(r)||{nodeSize:0}).nodeSize;if(r._first!==null&&n<i)r=r._first.content.type,n--;else{if(n===1&&r._length===0&&i>1)return new Kd(r._item===null?null:r._item.id,r._item===null?Iu(r):null,null);if(n-=i,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{if(n===0)return r=r._item===null?r:r._item.parent,new Kd(r._item===null?null:r._item.id,r._item===null?Iu(r):null,null);do r=r._item.parent,n--;while(r!==e&&r._item.next===null);r!==e&&(r=r._item.next.content.type)}}}if(r===null)throw Yo();if(n===0&&r.constructor!==Nu&&r!==e)return QB(r._item.parent,r._item)}return Bg(e,e._length,-1)},QB=(n,e)=>{let t=null,r=null;return n._item===null?r=Iu(n):t=Ve(n._item.id.client,n._item.id.clock),new Kd(t,r,e.id)},qB="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",e$="ελ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",ja=(n,e)=>{for(const t in e)n[t]=e[t];return n},Km="numeric",Xm="ascii",Zm="alpha",gd="asciinumeric",Wf="alphanumeric",Qm="domain",nC="emoji",t$="scheme",n$="slashscheme",$S="whitespace";function r$(n,e){return n in e||(e[n]=[]),e[n]}function Us(n,e,t){e[Km]&&(e[gd]=!0,e[Wf]=!0),e[Xm]&&(e[gd]=!0,e[Zm]=!0),e[gd]&&(e[Wf]=!0),e[Zm]&&(e[Wf]=!0),e[Wf]&&(e[Qm]=!0),e[nC]&&(e[Qm]=!0);for(const r in e){const i=r$(r,t);i.indexOf(n)<0&&i.push(n)}}function i$(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function mn(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}mn.groups={};mn.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],o=e.jr[r][1];if(o&&i.test(n))return o}return e.jd},has(n,e){return e===void 0&&(e=!1),e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let i=0;i<n.length;i++)this.tt(n[i],e,t,r)},tr(n,e,t,r){r=r||mn.groups;let i;return e&&e.j?i=e:(i=new mn(e),t&&r&&Us(e,t,r)),this.jr.push([n,i]),i},ts(n,e,t,r){let i=this;const o=n.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(n[s]);return i.tt(n[o-1],e,t,r)},tt(n,e,t,r){r=r||mn.groups;const i=this;if(e&&e.j)return i.j[n]=e,e;const o=e;let s,a=i.go(n);if(a?(s=new mn,ja(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new mn,o){if(r)if(s.t&&typeof s.t=="string"){const c=ja(i$(s.t,r),t);Us(o,c,r)}else t&&Us(o,t,r);s.t=o}return i.j[n]=s,s}};const we=(n,e,t,r,i)=>n.ta(e,t,r,i),Vn=(n,e,t,r,i)=>n.tr(e,t,r,i),zS=(n,e,t,r,i)=>n.ts(e,t,r,i),Z=(n,e,t,r,i)=>n.tt(e,t,r,i),Mi="WORD",qm="UWORD",Fu="LOCALHOST",ey="TLD",ty="UTLD",md="SCHEME",va="SLASH_SCHEME",cv="NUM",rC="WS",uv="NL",fu="OPENBRACE",du="CLOSEBRACE",eh="OPENBRACKET",th="CLOSEBRACKET",nh="OPENPAREN",rh="CLOSEPAREN",ih="OPENANGLEBRACKET",oh="CLOSEANGLEBRACKET",sh="FULLWIDTHLEFTPAREN",lh="FULLWIDTHRIGHTPAREN",ah="LEFTCORNERBRACKET",ch="RIGHTCORNERBRACKET",uh="LEFTWHITECORNERBRACKET",fh="RIGHTWHITECORNERBRACKET",dh="FULLWIDTHLESSTHAN",hh="FULLWIDTHGREATERTHAN",ph="AMPERSAND",gh="APOSTROPHE",mh="ASTERISK",Do="AT",yh="BACKSLASH",vh="BACKTICK",bh="CARET",Fo="COLON",fv="COMMA",Sh="DOLLAR",$r="DOT",wh="EQUALS",dv="EXCLAMATION",zr="HYPHEN",xh="PERCENT",kh="PIPE",Ch="PLUS",Eh="POUND",Th="QUERY",hv="QUOTE",pv="SEMI",jr="SLASH",hu="TILDE",Rh="UNDERSCORE",iC="EMOJI",Ah="SYM";var oC=Object.freeze({__proto__:null,WORD:Mi,UWORD:qm,LOCALHOST:Fu,TLD:ey,UTLD:ty,SCHEME:md,SLASH_SCHEME:va,NUM:cv,WS:rC,NL:uv,OPENBRACE:fu,CLOSEBRACE:du,OPENBRACKET:eh,CLOSEBRACKET:th,OPENPAREN:nh,CLOSEPAREN:rh,OPENANGLEBRACKET:ih,CLOSEANGLEBRACKET:oh,FULLWIDTHLEFTPAREN:sh,FULLWIDTHRIGHTPAREN:lh,LEFTCORNERBRACKET:ah,RIGHTCORNERBRACKET:ch,LEFTWHITECORNERBRACKET:uh,RIGHTWHITECORNERBRACKET:fh,FULLWIDTHLESSTHAN:dh,FULLWIDTHGREATERTHAN:hh,AMPERSAND:ph,APOSTROPHE:gh,ASTERISK:mh,AT:Do,BACKSLASH:yh,BACKTICK:vh,CARET:bh,COLON:Fo,COMMA:fv,DOLLAR:Sh,DOT:$r,EQUALS:wh,EXCLAMATION:dv,HYPHEN:zr,PERCENT:xh,PIPE:kh,PLUS:Ch,POUND:Eh,QUERY:Th,QUOTE:hv,SEMI:pv,SLASH:jr,TILDE:hu,UNDERSCORE:Rh,EMOJI:iC,SYM:Ah});const ha=/[a-z]/,Ug=new RegExp("\\p{L}","u"),Wg=new RegExp("\\p{Emoji}","u"),Hg=/\d/,jS=/\s/,US=`
17
+ `,o$="️",s$="‍";let Hf=null,Vf=null;function l$(n){n===void 0&&(n=[]);const e={};mn.groups=e;const t=new mn;Hf==null&&(Hf=WS(qB)),Vf==null&&(Vf=WS(e$)),Z(t,"'",gh),Z(t,"{",fu),Z(t,"}",du),Z(t,"[",eh),Z(t,"]",th),Z(t,"(",nh),Z(t,")",rh),Z(t,"<",ih),Z(t,">",oh),Z(t,"(",sh),Z(t,")",lh),Z(t,"「",ah),Z(t,"」",ch),Z(t,"『",uh),Z(t,"』",fh),Z(t,"<",dh),Z(t,">",hh),Z(t,"&",ph),Z(t,"*",mh),Z(t,"@",Do),Z(t,"`",vh),Z(t,"^",bh),Z(t,":",Fo),Z(t,",",fv),Z(t,"$",Sh),Z(t,".",$r),Z(t,"=",wh),Z(t,"!",dv),Z(t,"-",zr),Z(t,"%",xh),Z(t,"|",kh),Z(t,"+",Ch),Z(t,"#",Eh),Z(t,"?",Th),Z(t,'"',hv),Z(t,"/",jr),Z(t,";",pv),Z(t,"~",hu),Z(t,"_",Rh),Z(t,"\\",yh);const r=Vn(t,Hg,cv,{[Km]:!0});Vn(r,Hg,r);const i=Vn(t,ha,Mi,{[Xm]:!0});Vn(i,ha,i);const o=Vn(t,Ug,qm,{[Zm]:!0});Vn(o,ha),Vn(o,Ug,o);const s=Vn(t,jS,rC,{[$S]:!0});Z(t,US,uv,{[$S]:!0}),Z(s,US),Vn(s,jS,s);const a=Vn(t,Wg,iC,{[nC]:!0});Vn(a,Wg,a),Z(a,o$,a);const c=Z(a,s$);Vn(c,Wg,a);const f=[[ha,i]],p=[[ha,null],[Ug,o]];for(let m=0;m<Hf.length;m++)Ro(t,Hf[m],ey,Mi,f);for(let m=0;m<Vf.length;m++)Ro(t,Vf[m],ty,qm,p);Us(ey,{tld:!0,ascii:!0},e),Us(ty,{utld:!0,alpha:!0},e),Ro(t,"file",md,Mi,f),Ro(t,"mailto",md,Mi,f),Ro(t,"http",va,Mi,f),Ro(t,"https",va,Mi,f),Ro(t,"ftp",va,Mi,f),Ro(t,"ftps",va,Mi,f),Us(md,{scheme:!0,ascii:!0},e),Us(va,{slashscheme:!0,ascii:!0},e),n=n.sort((m,S)=>m[0]>S[0]?1:-1);for(let m=0;m<n.length;m++){const S=n[m][0],E=n[m][1]?{[t$]:!0}:{[n$]:!0};S.indexOf("-")>=0?E[Qm]=!0:ha.test(S)?Hg.test(S)?E[gd]=!0:E[Xm]=!0:E[Km]=!0,zS(t,S,S,E)}return zS(t,"localhost",Fu,{ascii:!0}),t.jd=new mn(Ah),{start:t,tokens:ja({groups:e},oC)}}function a$(n,e){const t=c$(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=t.length,i=[];let o=0,s=0;for(;s<r;){let a=n,c=null,f=0,p=null,m=-1,S=-1;for(;s<r&&(c=a.go(t[s]));)a=c,a.accepts()?(m=0,S=0,p=a):m>=0&&(m+=t[s].length,S++),f+=t[s].length,o+=t[s].length,s++;o-=m,s-=S,f-=m,i.push({t:p.t,v:e.slice(o-f,o),s:o-f,e:o})}return i}function c$(n){const e=[],t=n.length;let r=0;for(;r<t;){let i=n.charCodeAt(r),o,s=i<55296||i>56319||r+1===t||(o=n.charCodeAt(r+1))<56320||o>57343?n[r]:n.slice(r,r+2);e.push(s),r+=s.length}return e}function Ro(n,e,t,r,i){let o;const s=e.length;for(let a=0;a<s-1;a++){const c=e[a];n.j[c]?o=n.j[c]:(o=new mn(r),o.jr=i.slice(),n.j[c]=o),n=o}return o=new mn(t),o.jr=i.slice(),n.j[e[s-1]]=o,o}function WS(n){const e=[],t=[];let r=0,i="0123456789";for(;r<n.length;){let o=0;for(;i.indexOf(n[r+o])>=0;)o++;if(o>0){e.push(t.join(""));for(let s=parseInt(n.substring(r,r+o),10);s>0;s--)t.pop();r+=o}else t.push(n[r]),r++}return e}const Lu={defaultProtocol:"http",events:null,format:HS,formatHref:HS,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function gv(n,e){e===void 0&&(e=null);let t=ja({},Lu);n&&(t=ja(t,n instanceof gv?n.o:n));const r=t.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=i}gv.prototype={o:Lu,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let i=this.o[n];return i&&(typeof i=="object"?(i=t.t in i?i[t.t]:Lu[n],typeof i=="function"&&r&&(i=i(e,t))):typeof i=="function"&&r&&(i=i(e,t.t,t)),i)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function HS(n){return n}function sC(n,e){this.t="token",this.v=n,this.tk=e}sC.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"…":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return n===void 0&&(n=Lu.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),i=n.get("tagName",t,e),o=this.toFormattedString(n),s={},a=n.get("className",t,e),c=n.get("target",t,e),f=n.get("rel",t,e),p=n.getObj("attributes",t,e),m=n.getObj("events",t,e);return s.href=r,a&&(s.class=a),c&&(s.target=c),f&&(s.rel=f),p&&ja(s,p),{tagName:i,attributes:s,content:o,eventListeners:m}}};function Jh(n,e){class t extends sC{constructor(i,o){super(i,o),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const VS=Jh("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),GS=Jh("text"),u$=Jh("nl"),Gf=Jh("url",{isLink:!0,toHref(n){return n===void 0&&(n=Lu.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Fu&&n[1].t===Fo}}),Gn=n=>new mn(n);function f$(n){let{groups:e}=n;const t=e.domain.concat([ph,mh,Do,yh,vh,bh,Sh,wh,zr,cv,xh,kh,Ch,Eh,jr,Ah,hu,Rh]),r=[gh,Fo,fv,$r,dv,Th,hv,pv,ih,oh,fu,du,th,eh,nh,rh,sh,lh,ah,ch,uh,fh,dh,hh],i=[ph,gh,mh,yh,vh,bh,Sh,wh,zr,fu,du,xh,kh,Ch,Eh,Th,jr,Ah,hu,Rh],o=Gn(),s=Z(o,hu);we(s,i,s),we(s,e.domain,s);const a=Gn(),c=Gn(),f=Gn();we(o,e.domain,a),we(o,e.scheme,c),we(o,e.slashscheme,f),we(a,i,s),we(a,e.domain,a);const p=Z(a,Do);Z(s,Do,p),Z(c,Do,p),Z(f,Do,p);const m=Z(s,$r);we(m,i,s),we(m,e.domain,s);const S=Gn();we(p,e.domain,S),we(S,e.domain,S);const C=Z(S,$r);we(C,e.domain,S);const E=Gn(VS);we(C,e.tld,E),we(C,e.utld,E),Z(p,Fu,E);const P=Z(S,zr);we(P,e.domain,S),we(E,e.domain,S),Z(E,$r,C),Z(E,zr,P);const D=Z(E,Fo);we(D,e.numeric,VS);const _=Z(a,zr),J=Z(a,$r);we(_,e.domain,a),we(J,i,s),we(J,e.domain,a);const ie=Gn(Gf);we(J,e.tld,ie),we(J,e.utld,ie),we(ie,e.domain,a),we(ie,i,s),Z(ie,$r,J),Z(ie,zr,_),Z(ie,Do,p);const oe=Z(ie,Fo),te=Gn(Gf);we(oe,e.numeric,te);const G=Gn(Gf),ne=Gn();we(G,t,G),we(G,r,ne),we(ne,t,G),we(ne,r,ne),Z(ie,jr,G),Z(te,jr,G);const ae=Z(c,Fo),Q=Z(f,Fo),Ee=Z(Q,jr),re=Z(Ee,jr);we(c,e.domain,a),Z(c,$r,J),Z(c,zr,_),we(f,e.domain,a),Z(f,$r,J),Z(f,zr,_),we(ae,e.domain,G),Z(ae,jr,G),we(re,e.domain,G),we(re,t,G),Z(re,jr,G);const X=[[fu,du],[eh,th],[nh,rh],[ih,oh],[sh,lh],[ah,ch],[uh,fh],[dh,hh]];for(let fe=0;fe<X.length;fe++){const[V,De]=X[fe],ye=Z(G,V);Z(ne,V,ye),Z(ye,De,G);const xe=Gn(Gf);we(ye,t,xe);const Ie=Gn();we(ye,r),we(xe,t,xe),we(xe,r,Ie),we(Ie,t,xe),we(Ie,r,Ie),Z(xe,De,G),Z(Ie,De,G)}return Z(o,Fu,ie),Z(o,uv,u$),{start:o,tokens:oC}}function d$(n,e,t){let r=t.length,i=0,o=[],s=[];for(;i<r;){let a=n,c=null,f=null,p=0,m=null,S=-1;for(;i<r&&!(c=a.go(t[i].t));)s.push(t[i++]);for(;i<r&&(f=c||a.go(t[i].t));)c=null,a=f,a.accepts()?(S=0,m=a):S>=0&&S++,i++,p++;if(S<0)i-=p,i<r&&(s.push(t[i]),i++);else{s.length>0&&(o.push(Vg(GS,e,s)),s=[]),i-=S,p-=S;const C=m.t,E=t.slice(i-p,i);o.push(Vg(C,e,E))}}return s.length>0&&o.push(Vg(GS,e,s)),o}function Vg(n,e,t){const r=t[0].s,i=t[t.length-1].e,o=e.slice(r,i);return new n(o,t)}const h$=typeof console<"u"&&console&&console.warn||(()=>{}),p$="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ze={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function g$(){mn.groups={},Ze.scanner=null,Ze.parser=null,Ze.tokenQueue=[],Ze.pluginQueue=[],Ze.customSchemes=[],Ze.initialized=!1}function m$(n,e){if(e===void 0&&(e=!1),Ze.initialized&&h$(`linkifyjs: already initialized - will not register custom scheme "${n}" ${p$}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
18
18
  1. Must only contain digits, lowercase ASCII letters or "-"
19
19
  2. Cannot start or end with "-"
20
- 3. "-" cannot repeat`);Ze.customSchemes.push([n,e])}function GB(){Ze.scanner=FB(Ze.customSchemes);for(let n=0;n<Ze.tokenQueue.length;n++)Ze.tokenQueue[n][1]({scanner:Ze.scanner});Ze.parser=zB(Ze.scanner.tokens);for(let n=0;n<Ze.pluginQueue.length;n++)Ze.pluginQueue[n][1]({scanner:Ze.scanner,parser:Ze.parser});Ze.initialized=!0}function Kk(n){return Ze.initialized||GB(),jB(Ze.parser.start,n,LB(Ze.scanner.start,n))}function JB(n,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new uv(t),i=Kk(n),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!e||a.t===e)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}var Ch=200,wt=function(){};wt.prototype.append=function(e){return e.length?(e=wt.from(e),!this.length&&e||e.length<Ch&&this.leafAppend(e)||this.length<Ch&&e.leafPrepend(this)||this.appendInner(e)):this};wt.prototype.prepend=function(e){return e.length?wt.from(e).append(this):this};wt.prototype.appendInner=function(e){return new YB(this,e)};wt.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?wt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};wt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};wt.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};wt.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},t,r),i};wt.from=function(e){return e instanceof wt?e:e&&e.length?new Xk(e):wt.empty};var Xk=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,a){for(var c=o;c<s;c++)if(i(this.values[c],a+c)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,a){for(var c=o-1;c>=s;c--)if(i(this.values[c],a+c)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Ch)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Ch)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(wt);wt.empty=new Xk([]);var YB=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,s){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(i,a),o,s)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(wt);const KB=500;class gr{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;t&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,a,c,f=[],p=[];return this.items.forEach((m,S)=>{if(!m.step){i||(i=this.remapping(r,S+1),o=i.maps.length),o--,p.push(m);return}if(i){p.push(new Ur(m.map));let C=m.step.map(i.slice(o)),E;C&&s.maybeStep(C).doc&&(E=s.mapping.maps[s.mapping.maps.length-1],f.push(new Ur(E,void 0,void 0,f.length+p.length))),o--,E&&i.appendMap(E,o)}else s.maybeStep(m.step);if(m.selection)return a=i?m.selection.map(i.slice(o)):m.selection,c=new gr(this.items.slice(0,r).append(p.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:a}}addTransform(e,t,r,i){let o=[],s=this.eventCount,a=this.items,c=!i&&a.length?a.get(a.length-1):null;for(let p=0;p<e.steps.length;p++){let m=e.steps[p].invert(e.docs[p]),S=new Ur(e.mapping.maps[p],m,t),C;(C=c&&c.merge(S))&&(S=C,p?o.pop():a=a.slice(0,a.length-1)),o.push(S),t&&(s++,t=void 0),i||(c=S)}let f=s-r.depth;return f>ZB&&(a=XB(a,f),s-=f),new gr(a.append(o),s)}remapping(e,t){let r=new Sa;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,t),r}addMaps(e){return this.eventCount==0?this:new gr(this.items.append(e.map(t=>new Ur(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(S=>{S.selection&&a--},i);let c=t;this.items.forEach(S=>{let C=o.getMirror(--c);if(C==null)return;s=Math.min(s,C);let E=o.maps[C];if(S.step){let P=e.steps[C].invert(e.docs[C]),D=S.selection&&S.selection.map(o.slice(c+1,C));D&&a++,r.push(new Ur(E,P,D))}else r.push(new Ur(E))},i);let f=[];for(let S=t;S<s;S++)f.push(new Ur(o.maps[S]));let p=this.items.slice(0,i).append(f).append(r),m=new gr(p,a);return m.emptyItemCount()>KB&&(m=m.compress(this.items.length-r.length)),m}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let c=s.step.map(t.slice(r)),f=c&&c.getMap();if(r--,f&&t.appendMap(f,r),c){let p=s.selection&&s.selection.map(t.slice(r));p&&o++;let m=new Ur(f.invert(),c,p),S,C=i.length-1;(S=i.length&&i[C].merge(m))?i[C]=S:i.push(m)}}else s.map&&r--},this.items.length,0),new gr(wt.from(i.reverse()),o)}}gr.empty=new gr(wt.empty,0);function XB(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}class Ur{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Ur(t.getMap().invert(),t,this.selection)}}}class Po{constructor(e,t,r,i,o){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const ZB=20;function QB(n,e,t,r){let i=t.getMeta(Ks),o;if(i)return i.historyState;t.getMeta(t$)&&(n=new Po(n.done,n.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(s&&s.getMeta(Ks))return s.getMeta(Ks).redo?new Po(n.done.addTransform(t,void 0,r,hd(e)),n.undone,LS(t.mapping.maps),n.prevTime,n.prevComposition):new Po(n.done,n.undone.addTransform(t,void 0,r,hd(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=t.getMeta("composition"),c=n.prevTime==0||!s&&n.prevComposition!=a&&(n.prevTime<(t.time||0)-r.newGroupDelay||!qB(t,n.prevRanges)),f=s?jg(n.prevRanges,t.mapping):LS(t.mapping.maps);return new Po(n.done.addTransform(t,c?e.selection.getBookmark():void 0,r,hd(e)),gr.empty,f,t.time,a??n.prevComposition)}else return(o=t.getMeta("rebased"))?new Po(n.done.rebased(t,o),n.undone.rebased(t,o),jg(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Po(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),jg(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function qB(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(t=!0)}),t}function LS(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,o,s)=>e.push(o,s));return e}function jg(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let i=e.map(n[r],1),o=e.map(n[r+1],-1);i<=o&&t.push(i,o)}return t}function e$(n,e,t){let r=hd(e),i=Ks.get(e).spec.config,o=(t?n.undone:n.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(t?n.done:n.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),c=new Po(t?a:o.remaining,t?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(Ks,{redo:t,historyState:c})}let Ug=!1,BS=null;function hd(n){let e=n.plugins;if(BS!=e){Ug=!1,BS=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){Ug=!0;break}}return Ug}const Ks=new ji("history"),t$=new ji("closeHistory");function n$(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new il({key:Ks,state:{init(){return new Po(gr.empty,gr.empty,null,0,-1)},apply(e,t,r){return QB(t,r,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,i=r=="historyUndo"?Qk:r=="historyRedo"?qk:null;return i?(t.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function Zk(n,e){return(t,r)=>{let i=Ks.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let o=e$(i,t,n);o&&r(e?o.scrollIntoView():o)}return!0}}const Qk=Zk(!1,!0),qk=Zk(!0,!0);function r$(n={}){return new il({view(e){return new i$(e,n)}})}class i${constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=s=>{this[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r;if(t){let a=e.nodeBefore,c=e.nodeAfter;if(a||c){let f=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(f){let p=f.getBoundingClientRect(),m=a?p.bottom:p.top;a&&c&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:p.left,right:p.right,top:m-this.width/2,bottom:m+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let o,s;if(!i||i==document.body&&getComputedStyle(i).position=="static")o=-pageXOffset,s=-pageYOffset;else{let a=i.getBoundingClientRect();o=a.left-i.scrollLeft,s=a.top-i.scrollTop}this.element.style.left=r.left-o+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!o){let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=kw(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}class tt extends me{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return tt.valid(r)?new tt(r):me.near(r)}content(){return ee.empty}eq(e){return e instanceof tt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new tt(e.resolve(t.pos))}getBookmark(){return new fv(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!o$(e)||!s$(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&tt.valid(e))return e;let i=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(t>0?e.indexAfter(s)<a.childCount:e.index(s)>0){o=a.child(t>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;i+=t;let c=e.doc.resolve(i);if(tt.valid(c))return c}for(;;){let s=t>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!he.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*t),r=!1;continue e}break}o=s,i+=t;let a=e.doc.resolve(i);if(tt.valid(a))return a}return null}}}tt.prototype.visible=!1;tt.findFrom=tt.findGapCursorFrom;me.jsonID("gapcursor",tt);class fv{constructor(e){this.pos=e}map(e){return new fv(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return tt.valid(t)?new tt(t):me.near(t)}}function o$(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function s$(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function l$(){return new il({props:{decorations:f$,createSelectionBetween(n,e,t){return e.pos==t.pos&&tt.valid(t)?new tt(t):null},handleClick:c$,handleKeyDown:a$,handleDOMEvents:{beforeinput:u$}}})}const a$=Sy({ArrowLeft:Hf("horiz",-1),ArrowRight:Hf("horiz",1),ArrowUp:Hf("vert",-1),ArrowDown:Hf("vert",1)});function Hf(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){let s=r.selection,a=e>0?s.$to:s.$from,c=s.empty;if(s instanceof ke){if(!o.endOfTextblock(t)||a.depth==0)return!1;c=!1,a=r.doc.resolve(e>0?a.after():a.before())}let f=tt.findGapCursorFrom(a,e,c);return f?(i&&i(r.tr.setSelection(new tt(f))),!0):!1}}function c$(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!tt.valid(r))return!1;let i=n.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&he.isSelectable(n.state.doc.nodeAt(i.inside))?!1:(n.dispatch(n.state.tr.setSelection(new tt(r))),!0)}function u$(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof tt))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let i=W.empty;for(let s=r.length-1;s>=0;s--)i=W.from(r[s].createAndFill(null,i));let o=n.state.tr.replace(t.pos,t.pos,new ee(i,0,0));return o.setSelection(ke.near(o.doc.resolve(t.pos+1))),n.dispatch(o),!1}function f$(n){if(!(n.selection instanceof tt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Qe.create(n.doc,[$t.widget(n.selection.head,e,{key:"gapcursor"})])}var Zm,Qm;if(typeof WeakMap<"u"){let n=new WeakMap;Zm=e=>n.get(e),Qm=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;Zm=r=>{for(let i=0;i<n.length;i+=2)if(n[i]==r)return n[i+1]},Qm=(r,i)=>(t==10&&(t=0),n[t++]=r,n[t++]=i)}var nt=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=n)continue;const r=e%this.width,i=e/this.width|0;let o=r+1,s=i+1;for(let a=1;o<this.width&&this.map[e+a]==t;a++)o++;for(let a=1;s<this.height&&this.map[e+this.width*a]==t;a++)s++;return{left:r,top:i,right:o,bottom:s}}throw new RangeError(`No cell with offset ${n} found`)}colCount(n){for(let e=0;e<this.map.length;e++)if(this.map[e]==n)return e%this.width;throw new RangeError(`No cell with offset ${n} found`)}nextCell(n,e,t){const{left:r,right:i,top:o,bottom:s}=this.findCell(n);return e=="horiz"?(t<0?r==0:i==this.width)?null:this.map[o*this.width+(t<0?r-1:i)]:(t<0?o==0:s==this.height)?null:this.map[r+this.width*(t<0?o-1:s)]}rectBetween(n,e){const{left:t,right:r,top:i,bottom:o}=this.findCell(n),{left:s,right:a,top:c,bottom:f}=this.findCell(e);return{left:Math.min(t,s),top:Math.min(i,c),right:Math.max(r,a),bottom:Math.max(o,f)}}cellsInRect(n){const e=[],t={};for(let r=n.top;r<n.bottom;r++)for(let i=n.left;i<n.right;i++){const o=r*this.width+i,s=this.map[o];t[s]||(t[s]=!0,!(i==n.left&&i&&this.map[o-1]==s||r==n.top&&r&&this.map[o-this.width]==s)&&e.push(s))}return e}positionAt(n,e,t){for(let r=0,i=0;;r++){const o=i+t.child(r).nodeSize;if(r==n){let s=e+n*this.width;const a=(n+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?o-1:this.map[s]}i=o}}static get(n){return Zm(n)||Qm(n,d$(n))}};function d$(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);const e=h$(n),t=n.childCount,r=[];let i=0,o=null;const s=[];for(let f=0,p=e*t;f<p;f++)r[f]=0;for(let f=0,p=0;f<t;f++){const m=n.child(f);p++;for(let E=0;;E++){for(;i<r.length&&r[i]!=0;)i++;if(E==m.childCount)break;const P=m.child(E),{colspan:D,rowspan:_,colwidth:J}=P.attrs;for(let ie=0;ie<_;ie++){if(ie+f>=t){(o||(o=[])).push({type:"overlong_rowspan",pos:p,n:_-ie});break}const oe=i+ie*e;for(let te=0;te<D;te++){r[oe+te]==0?r[oe+te]=p:(o||(o=[])).push({type:"collision",row:f,pos:p,n:D-te});const G=J&&J[te];if(G){const ne=(oe+te)%e*2,ae=s[ne];ae==null||ae!=G&&s[ne+1]==1?(s[ne]=G,s[ne+1]=1):ae==G&&s[ne+1]++}}}i+=D,p+=P.nodeSize}const S=(f+1)*e;let C=0;for(;i<S;)r[i++]==0&&C++;C&&(o||(o=[])).push({type:"missing",row:f,n:C}),p++}const a=new nt(e,t,r,o);let c=!1;for(let f=0;!c&&f<s.length;f+=2)s[f]!=null&&s[f+1]<t&&(c=!0);return c&&p$(a,s,n),a}function h$(n){let e=-1,t=!1;for(let r=0;r<n.childCount;r++){const i=n.child(r);let o=0;if(t)for(let s=0;s<r;s++){const a=n.child(s);for(let c=0;c<a.childCount;c++){const f=a.child(c);s+f.attrs.rowspan>r&&(o+=f.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);o+=a.attrs.colspan,a.attrs.rowspan>1&&(t=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function p$(n,e,t){n.problems||(n.problems=[]);const r={};for(let i=0;i<n.map.length;i++){const o=n.map[i];if(r[o])continue;r[o]=!0;const s=t.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let a=null;const c=s.attrs;for(let f=0;f<c.colspan;f++){const p=(i+f)%n.width,m=e[p*2];m!=null&&(!c.colwidth||c.colwidth[f]!=m)&&((a||(a=g$(c)))[f]=m)}a&&n.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function g$(n){if(n.colwidth)return n.colwidth.slice();const e=[];for(let t=0;t<n.colspan;t++)e.push(0);return e}function Ut(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var Lo=new ji("selectingCells");function Ka(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function m$(n){for(let e=n.depth;e>0;e--){const t=n.node(e).type.spec.tableRole;if(t==="cell"||t==="header_cell")return n.node(e)}return null}function br(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function Wh(n){const e=n.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 t=Ka(e.$head)||y$(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function y$(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function qm(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function v$(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function dv(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function eC(n,e,t){const r=n.node(-1),i=nt.get(r),o=n.start(-1),s=i.nextCell(n.pos-o,e,t);return s==null?null:n.node(0).resolve(o+s)}function tl(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function tC(n,e,t=1){const r={...n,colspan:n.colspan+t};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<t;i++)r.colwidth.splice(e,0,0)}return r}function b$(n,e,t){const r=Ut(e.type.schema).header_cell;for(let i=0;i<n.height;i++)if(e.nodeAt(n.map[t+i*n.width]).type!=r)return!1;return!0}var Ge=class Di extends me{constructor(e,t=e){const r=e.node(-1),i=nt.get(r),o=e.start(-1),s=i.rectBetween(e.pos-o,t.pos-o),a=e.node(0),c=i.cellsInRect(s).filter(p=>p!=t.pos-o);c.unshift(t.pos-o);const f=c.map(p=>{const m=r.nodeAt(p);if(!m)throw RangeError(`No cell with offset ${p} found`);const S=o+p+1;return new uy(a.resolve(S),a.resolve(S+m.content.size))});super(f[0].$from,f[0].$to,f),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),i=e.resolve(t.map(this.$headCell.pos));if(qm(r)&&qm(i)&&dv(r,i)){const o=this.$anchorCell.node(-1)!=r.node(-1);return o&&this.isRowSelection()?Di.rowSelection(r,i):o&&this.isColSelection()?Di.colSelection(r,i):new Di(r,i)}return ke.between(r,i)}content(){const e=this.$anchorCell.node(-1),t=nt.get(e),r=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),o={},s=[];for(let c=i.top;c<i.bottom;c++){const f=[];for(let p=c*t.width+i.left,m=i.left;m<i.right;m++,p++){const S=t.map[p];if(o[S])continue;o[S]=!0;const C=t.findCell(S);let E=e.nodeAt(S);if(!E)throw RangeError(`No cell with offset ${S} found`);const P=i.left-C.left,D=C.right-i.right;if(P>0||D>0){let _=E.attrs;if(P>0&&(_=tl(_,0,P)),D>0&&(_=tl(_,_.colspan-D,D)),C.left<i.left){if(E=E.type.createAndFill(_),!E)throw RangeError(`Could not create cell with attrs ${JSON.stringify(_)}`)}else E=E.type.create(_,E.content)}if(C.top<i.top||C.bottom>i.bottom){const _={...E.attrs,rowspan:Math.min(C.bottom,i.bottom)-Math.max(C.top,i.top)};C.top<i.top?E=E.type.createAndFill(_):E=E.type.create(_,E.content)}f.push(E)}s.push(e.child(c).copy(W.from(f)))}const a=this.isColSelection()&&this.isRowSelection()?e:s;return new ee(W.from(a),1,1)}replace(e,t=ee.empty){const r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:a,$to:c}=i[s],f=e.mapping.slice(r);e.replace(f.map(a.pos),f.map(c.pos),s?ee.empty:t)}const o=me.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new ee(W.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),r=nt.get(t),i=this.$anchorCell.start(-1),o=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<o.length;s++)e(t.nodeAt(o[s]),i+o[s])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),i=nt.get(r),o=e.start(-1),s=i.findCell(e.pos-o),a=i.findCell(t.pos-o),c=e.node(0);return s.top<=a.top?(s.top>0&&(e=c.resolve(o+i.map[s.left])),a.bottom<i.height&&(t=c.resolve(o+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(t=c.resolve(o+i.map[a.left])),s.bottom<i.height&&(e=c.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new Di(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=nt.get(e),r=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-r),o=t.colCount(this.$headCell.pos-r);if(Math.min(i,o)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==t.width}eq(e){return e instanceof Di&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),i=nt.get(r),o=e.start(-1),s=i.findCell(e.pos-o),a=i.findCell(t.pos-o),c=e.node(0);return s.left<=a.left?(s.left>0&&(e=c.resolve(o+i.map[s.top*i.width])),a.right<i.width&&(t=c.resolve(o+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(t=c.resolve(o+i.map[a.top*i.width])),s.right<i.width&&(e=c.resolve(o+i.map[i.width*(s.top+1)-1]))),new Di(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Di(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){return new Di(e.resolve(t),e.resolve(r))}getBookmark(){return new S$(this.$anchorCell.pos,this.$headCell.pos)}};Ge.prototype.visible=!1;me.jsonID("cell",Ge);var S$=class nC{constructor(e,t){this.anchor=e,this.head=t}map(e){return new nC(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),r=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&r.index()<r.parent.childCount&&dv(t,r)?new Ge(t,r):me.near(r,1)}};function w$(n){if(!(n.selection instanceof Ge))return null;const e=[];return n.selection.forEachCell((t,r)=>{e.push($t.node(r,r+t.nodeSize,{class:"selectedCell"}))}),Qe.create(n.doc,e)}function x$({$from:n,$to:e}){if(n.pos==e.pos||n.pos<e.pos-6)return!1;let t=n.pos,r=e.pos,i=n.depth;for(;i>=0&&!(n.after(i+1)<n.end(i));i--,t++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,r--);return t==r&&/row|table/.test(n.node(i).type.spec.tableRole)}function k$({$from:n,$to:e}){let t,r;for(let i=n.depth;i>0;i--){const o=n.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){t=o;break}}for(let i=e.depth;i>0;i--){const o=e.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}return t!==r&&e.parentOffset===0}function C$(n,e,t){const r=(e||n).selection,i=(e||n).doc;let o,s;if(r instanceof he&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=Ge.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);o=Ge.rowSelection(a,a)}else if(!t){const a=nt.get(r.node),c=r.from+1,f=c+a.map[a.width*a.height-1];o=Ge.create(i,c+1,f)}}else r instanceof ke&&x$(r)?o=ke.create(i,r.from):r instanceof ke&&k$(r)&&(o=ke.create(i,r.$from.start(),r.$from.end()));return o&&(e||(e=n.tr)).setSelection(o),e}var E$=new ji("fix-tables");function rC(n,e,t,r){const i=n.childCount,o=e.childCount;e:for(let s=0,a=0;s<o;s++){const c=e.child(s);for(let f=a,p=Math.min(i,s+3);f<p;f++)if(n.child(f)==c){a=f+1,t+=c.nodeSize;continue e}r(c,t),a<i&&n.child(a).sameMarkup(c)?rC(n.child(a),c,t+1,r):c.nodesBetween(0,c.content.size,r,t+1),t+=c.nodeSize}}function iC(n,e){let t;const r=(i,o)=>{i.type.spec.tableRole=="table"&&(t=T$(n,i,o,t))};return e?e.doc!=n.doc&&rC(e.doc,n.doc,0,r):n.doc.descendants(r),t}function T$(n,e,t,r){const i=nt.get(e);if(!i.problems)return r;r||(r=n.tr);const o=[];for(let c=0;c<i.height;c++)o.push(0);for(let c=0;c<i.problems.length;c++){const f=i.problems[c];if(f.type=="collision"){const p=e.nodeAt(f.pos);if(!p)continue;const m=p.attrs;for(let S=0;S<m.rowspan;S++)o[f.row+S]+=f.n;r.setNodeMarkup(r.mapping.map(t+1+f.pos),null,tl(m,m.colspan-f.n,f.n))}else if(f.type=="missing")o[f.row]+=f.n;else if(f.type=="overlong_rowspan"){const p=e.nodeAt(f.pos);if(!p)continue;r.setNodeMarkup(r.mapping.map(t+1+f.pos),null,{...p.attrs,rowspan:p.attrs.rowspan-f.n})}else if(f.type=="colwidth mismatch"){const p=e.nodeAt(f.pos);if(!p)continue;r.setNodeMarkup(r.mapping.map(t+1+f.pos),null,{...p.attrs,colwidth:f.colwidth})}}let s,a;for(let c=0;c<o.length;c++)o[c]&&(s==null&&(s=c),a=c);for(let c=0,f=t+1;c<i.height;c++){const p=e.child(c),m=f+p.nodeSize,S=o[c];if(S>0){let C="cell";p.firstChild&&(C=p.firstChild.type.spec.tableRole);const E=[];for(let D=0;D<S;D++){const _=Ut(n.schema)[C].createAndFill();_&&E.push(_)}const P=(c==0||s==c-1)&&a==c?f+1:m-1;r.insert(r.mapping.map(P),E)}f=m}return r.setMeta(E$,{fixTables:!0})}function ei(n){const e=n.selection,t=Wh(n),r=t.node(-1),i=t.start(-1),o=nt.get(r);return{...e instanceof Ge?o.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):o.findCell(t.pos-i),tableStart:i,map:o,table:r}}function oC(n,{map:e,tableStart:t,table:r},i){let o=i>0?-1:0;b$(e,r,i+o)&&(o=i==0||i==e.width?null:0);for(let s=0;s<e.height;s++){const a=s*e.width+i;if(i>0&&i<e.width&&e.map[a-1]==e.map[a]){const c=e.map[a],f=r.nodeAt(c);n.setNodeMarkup(n.mapping.map(t+c),null,tC(f.attrs,i-e.colCount(c))),s+=f.attrs.rowspan-1}else{const c=o==null?Ut(r.type.schema).cell:r.nodeAt(e.map[a+o]).type,f=e.positionAt(s,i,r);n.insert(n.mapping.map(t+f),c.createAndFill())}}return n}function R$(n,e){if(!br(n))return!1;if(e){const t=ei(n);e(oC(n.tr,t,t.left))}return!0}function A$(n,e){if(!br(n))return!1;if(e){const t=ei(n);e(oC(n.tr,t,t.right))}return!0}function O$(n,{map:e,table:t,tableStart:r},i){const o=n.mapping.maps.length;for(let s=0;s<e.height;){const a=s*e.width+i,c=e.map[a],f=t.nodeAt(c),p=f.attrs;if(i>0&&e.map[a-1]==c||i<e.width-1&&e.map[a+1]==c)n.setNodeMarkup(n.mapping.slice(o).map(r+c),null,tl(p,i-e.colCount(c)));else{const m=n.mapping.slice(o).map(r+c);n.delete(m,m+f.nodeSize)}s+=p.rowspan}}function I$(n,e){if(!br(n))return!1;if(e){const t=ei(n),r=n.tr;if(t.left==0&&t.right==t.map.width)return!1;for(let i=t.right-1;O$(r,t,i),i!=t.left;i--){const o=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=nt.get(o)}e(r)}return!0}function M$(n,e,t){var r;const i=Ut(e.type.schema).header_cell;for(let o=0;o<n.width;o++)if(((r=e.nodeAt(n.map[o+t*n.width]))==null?void 0:r.type)!=i)return!1;return!0}function sC(n,{map:e,tableStart:t,table:r},i){var o;let s=t;for(let f=0;f<i;f++)s+=r.child(f).nodeSize;const a=[];let c=i>0?-1:0;M$(e,r,i+c)&&(c=i==0||i==e.height?null:0);for(let f=0,p=e.width*i;f<e.width;f++,p++)if(i>0&&i<e.height&&e.map[p]==e.map[p-e.width]){const m=e.map[p],S=r.nodeAt(m).attrs;n.setNodeMarkup(t+m,null,{...S,rowspan:S.rowspan+1}),f+=S.colspan-1}else{const m=c==null?Ut(r.type.schema).cell:(o=r.nodeAt(e.map[p+c*e.width]))==null?void 0:o.type,S=m==null?void 0:m.createAndFill();S&&a.push(S)}return n.insert(s,Ut(r.type.schema).row.create(null,a)),n}function D$(n,e){if(!br(n))return!1;if(e){const t=ei(n);e(sC(n.tr,t,t.top))}return!0}function P$(n,e){if(!br(n))return!1;if(e){const t=ei(n);e(sC(n.tr,t,t.bottom))}return!0}function _$(n,{map:e,table:t,tableStart:r},i){let o=0;for(let f=0;f<i;f++)o+=t.child(f).nodeSize;const s=o+t.child(i).nodeSize,a=n.mapping.maps.length;n.delete(o+r,s+r);const c=new Set;for(let f=0,p=i*e.width;f<e.width;f++,p++){const m=e.map[p];if(!c.has(m)){if(c.add(m),i>0&&m==e.map[p-e.width]){const S=t.nodeAt(m).attrs;n.setNodeMarkup(n.mapping.slice(a).map(m+r),null,{...S,rowspan:S.rowspan-1}),f+=S.colspan-1}else if(i<e.height&&m==e.map[p+e.width]){const S=t.nodeAt(m),C=S.attrs,E=S.type.create({...C,rowspan:S.attrs.rowspan-1},S.content),P=e.positionAt(i+1,f,t);n.insert(n.mapping.slice(a).map(r+P),E),f+=C.colspan-1}}}}function N$(n,e){if(!br(n))return!1;if(e){const t=ei(n),r=n.tr;if(t.top==0&&t.bottom==t.map.height)return!1;for(let i=t.bottom-1;_$(r,t,i),i!=t.top;i--){const o=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=nt.get(t.table)}e(r)}return!0}function $S(n){const e=n.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function F$({width:n,height:e,map:t},r){let i=r.top*n+r.left,o=i,s=(r.bottom-1)*n+r.left,a=i+(r.right-r.left-1);for(let c=r.top;c<r.bottom;c++){if(r.left>0&&t[o]==t[o-1]||r.right<n&&t[a]==t[a+1])return!0;o+=n,a+=n}for(let c=r.left;c<r.right;c++){if(r.top>0&&t[i]==t[i-n]||r.bottom<e&&t[s]==t[s+n])return!0;i++,s++}return!1}function L$(n,e){const t=n.selection;if(!(t instanceof Ge)||t.$anchorCell.pos==t.$headCell.pos)return!1;const r=ei(n),{map:i}=r;if(F$(i,r))return!1;if(e){const o=n.tr,s={};let a=W.empty,c,f;for(let p=r.top;p<r.bottom;p++)for(let m=r.left;m<r.right;m++){const S=i.map[p*i.width+m],C=r.table.nodeAt(S);if(!(s[S]||!C))if(s[S]=!0,c==null)c=S,f=C;else{$S(C)||(a=a.append(C.content));const E=o.mapping.map(S+r.tableStart);o.delete(E,E+C.nodeSize)}}if(c==null||f==null)return!0;if(o.setNodeMarkup(c+r.tableStart,null,{...tC(f.attrs,f.attrs.colspan,r.right-r.left-f.attrs.colspan),rowspan:r.bottom-r.top}),a.size){const p=c+1+f.content.size,m=$S(f)?c+1:p;o.replaceWith(m+r.tableStart,p+r.tableStart,a)}o.setSelection(new Ge(o.doc.resolve(c+r.tableStart))),e(o)}return!0}function B$(n,e){const t=Ut(n.schema);return $$(({node:r})=>t[r.type.spec.tableRole])(n,e)}function $$(n){return(e,t)=>{var r;const i=e.selection;let o,s;if(i instanceof Ge){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,s=i.$anchorCell.pos}else{if(o=m$(i.$from),!o)return!1;s=(r=Ka(i.$from))==null?void 0:r.pos}if(o==null||s==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(t){let a=o.attrs;const c=[],f=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const p=ei(e),m=e.tr;for(let C=0;C<p.right-p.left;C++)c.push(f?{...a,colwidth:f&&f[C]?[f[C]]:null}:a);let S;for(let C=p.top;C<p.bottom;C++){let E=p.map.positionAt(C,p.left,p.table);C==p.top&&(E+=o.nodeSize);for(let P=p.left,D=0;P<p.right;P++,D++)P==p.left&&C==p.top||m.insert(S=m.mapping.map(E+p.tableStart,1),n({node:o,row:C,col:P}).createAndFill(c[D]))}m.setNodeMarkup(s,n({node:o,row:p.top,col:p.left}),c[0]),i instanceof Ge&&m.setSelection(new Ge(m.doc.resolve(i.$anchorCell.pos),S?m.doc.resolve(S):void 0)),t(m)}return!0}}function z$(n,e){return function(t,r){if(!br(t))return!1;const i=Wh(t);if(i.nodeAfter.attrs[n]===e)return!1;if(r){const o=t.tr;t.selection instanceof Ge?t.selection.forEachCell((s,a)=>{s.attrs[n]!==e&&o.setNodeMarkup(a,null,{...s.attrs,[n]:e})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[n]:e}),r(o)}return!0}}function j$(n){return function(e,t){if(!br(e))return!1;if(t){const r=Ut(e.schema),i=ei(e),o=e.tr,s=i.map.cellsInRect(n=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:n=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(c=>i.table.nodeAt(c));for(let c=0;c<s.length;c++)a[c].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[c],r.cell,a[c].attrs);if(o.steps.length==0)for(let c=0;c<s.length;c++)o.setNodeMarkup(i.tableStart+s[c],r.header_cell,a[c].attrs);t(o)}return!0}}function zS(n,e,t){const r=e.map.cellsInRect({left:0,top:0,right:n=="row"?e.map.width:1,bottom:n=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const o=e.table.nodeAt(r[i]);if(o&&o.type!==t.header_cell)return!1}return!0}function Hh(n,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?j$(n):function(t,r){if(!br(t))return!1;if(r){const i=Ut(t.schema),o=ei(t),s=t.tr,a=zS("row",o,i),c=zS("column",o,i),p=(n==="column"?a:n==="row"?c:!1)?1:0,m=n=="column"?{left:0,top:p,right:1,bottom:o.map.height}:n=="row"?{left:p,top:0,right:o.map.width,bottom:1}:o,S=n=="column"?c?i.cell:i.header_cell:n=="row"?a?i.cell:i.header_cell:i.cell;o.map.cellsInRect(m).forEach(C=>{const E=C+o.tableStart,P=s.doc.nodeAt(E);P&&s.setNodeMarkup(E,S,P.attrs)}),r(s)}return!0}}Hh("row",{useDeprecatedLogic:!0});Hh("column",{useDeprecatedLogic:!0});var U$=Hh("cell",{useDeprecatedLogic:!0});function W$(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let r=n.index(-1)-1,i=n.before();r>=0;r--){const o=n.node(-1).child(r),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(n.index()<n.parent.childCount-1)return n.pos+n.nodeAfter.nodeSize;const t=n.node(-1);for(let r=n.indexAfter(-1),i=n.after();r<t.childCount;r++){const o=t.child(r);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function H$(n){return function(e,t){if(!br(e))return!1;const r=W$(Wh(e),n);if(r==null)return!1;if(t){const i=e.doc.resolve(r);t(e.tr.setSelection(ke.between(i,v$(i))).scrollIntoView())}return!0}}function V$(n,e){const t=n.selection.$anchor;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="table")return e&&e(n.tr.delete(t.before(r),t.after(r)).scrollIntoView()),!0;return!1}function Vf(n,e){const t=n.selection;if(!(t instanceof Ge))return!1;if(e){const r=n.tr,i=Ut(n.schema).cell.createAndFill().content;t.forEachCell((o,s)=>{o.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+o.nodeSize-1),new ee(i,0,0))}),r.docChanged&&e(r)}return!0}function G$(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:r}=n;for(;e.childCount==1&&(t>0&&r>0||e.child(0).type.spec.tableRole=="table");)t--,r--,e=e.child(0).content;const i=e.child(0),o=i.type.spec.tableRole,s=i.type.schema,a=[];if(o=="row")for(let c=0;c<e.childCount;c++){let f=e.child(c).content;const p=c?0:Math.max(0,t-1),m=c<e.childCount-1?0:Math.max(0,r-1);(p||m)&&(f=ey(Ut(s).row,new ee(f,p,m)).content),a.push(f)}else if(o=="cell"||o=="header_cell")a.push(t||r?ey(Ut(s).row,new ee(e,t,r)).content:e);else return null;return J$(s,a)}function J$(n,e){const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(let s=o.childCount-1;s>=0;s--){const{rowspan:a,colspan:c}=o.child(s).attrs;for(let f=i;f<i+a;f++)t[f]=(t[f]||0)+c}}let r=0;for(let i=0;i<t.length;i++)r=Math.max(r,t[i]);for(let i=0;i<t.length;i++)if(i>=e.length&&e.push(W.empty),t[i]<r){const o=Ut(n).cell.createAndFill(),s=[];for(let a=t[i];a<r;a++)s.push(o);e[i]=e[i].append(W.from(s))}return{height:e.length,width:r,rows:e}}function ey(n,e){const t=n.createAndFill();return new cy(t).replace(0,t.content.size,e).doc}function Y$({width:n,height:e,rows:t},r,i){if(n!=r){const o=[],s=[];for(let a=0;a<t.length;a++){const c=t[a],f=[];for(let p=o[a]||0,m=0;p<r;m++){let S=c.child(m%c.childCount);p+S.attrs.colspan>r&&(S=S.type.createChecked(tl(S.attrs,S.attrs.colspan,p+S.attrs.colspan-r),S.content)),f.push(S),p+=S.attrs.colspan;for(let C=1;C<S.attrs.rowspan;C++)o[a+C]=(o[a+C]||0)+S.attrs.colspan}s.push(W.from(f))}t=s,n=r}if(e!=i){const o=[];for(let s=0,a=0;s<i;s++,a++){const c=[],f=t[a%e];for(let p=0;p<f.childCount;p++){let m=f.child(p);s+m.attrs.rowspan>i&&(m=m.type.create({...m.attrs,rowspan:Math.max(1,i-m.attrs.rowspan)},m.content)),c.push(m)}o.push(W.from(c))}t=o,e=i}return{width:n,height:e,rows:t}}function K$(n,e,t,r,i,o,s){const a=n.doc.type.schema,c=Ut(a);let f,p;if(i>e.width)for(let m=0,S=0;m<e.height;m++){const C=t.child(m);S+=C.nodeSize;const E=[];let P;C.lastChild==null||C.lastChild.type==c.cell?P=f||(f=c.cell.createAndFill()):P=p||(p=c.header_cell.createAndFill());for(let D=e.width;D<i;D++)E.push(P);n.insert(n.mapping.slice(s).map(S-1+r),E)}if(o>e.height){const m=[];for(let E=0,P=(e.height-1)*e.width;E<Math.max(e.width,i);E++){const D=E>=e.width?!1:t.nodeAt(e.map[P+E]).type==c.header_cell;m.push(D?p||(p=c.header_cell.createAndFill()):f||(f=c.cell.createAndFill()))}const S=c.row.create(null,W.from(m)),C=[];for(let E=e.height;E<o;E++)C.push(S);n.insert(n.mapping.slice(s).map(r+t.nodeSize-2),C)}return!!(f||p)}function jS(n,e,t,r,i,o,s,a){if(s==0||s==e.height)return!1;let c=!1;for(let f=i;f<o;f++){const p=s*e.width+f,m=e.map[p];if(e.map[p-e.width]==m){c=!0;const S=t.nodeAt(m),{top:C,left:E}=e.findCell(m);n.setNodeMarkup(n.mapping.slice(a).map(m+r),null,{...S.attrs,rowspan:s-C}),n.insert(n.mapping.slice(a).map(e.positionAt(s,E,t)),S.type.createAndFill({...S.attrs,rowspan:C+S.attrs.rowspan-s})),f+=S.attrs.colspan-1}}return c}function US(n,e,t,r,i,o,s,a){if(s==0||s==e.width)return!1;let c=!1;for(let f=i;f<o;f++){const p=f*e.width+s,m=e.map[p];if(e.map[p-1]==m){c=!0;const S=t.nodeAt(m),C=e.colCount(m),E=n.mapping.slice(a).map(m+r);n.setNodeMarkup(E,null,tl(S.attrs,s-C,S.attrs.colspan-(s-C))),n.insert(E+S.nodeSize,S.type.createAndFill(tl(S.attrs,0,s-C))),f+=S.attrs.rowspan-1}}return c}function WS(n,e,t,r,i){let o=t?n.doc.nodeAt(t-1):n.doc;if(!o)throw new Error("No table found");let s=nt.get(o);const{top:a,left:c}=r,f=c+i.width,p=a+i.height,m=n.tr;let S=0;function C(){if(o=t?m.doc.nodeAt(t-1):m.doc,!o)throw new Error("No table found");s=nt.get(o),S=m.mapping.maps.length}K$(m,s,o,t,f,p,S)&&C(),jS(m,s,o,t,c,f,a,S)&&C(),jS(m,s,o,t,c,f,p,S)&&C(),US(m,s,o,t,a,p,c,S)&&C(),US(m,s,o,t,a,p,f,S)&&C();for(let E=a;E<p;E++){const P=s.positionAt(E,c,o),D=s.positionAt(E,f,o);m.replace(m.mapping.slice(S).map(P+t),m.mapping.slice(S).map(D+t),new ee(i.rows[E-a],0,0))}C(),m.setSelection(new Ge(m.doc.resolve(t+s.positionAt(a,c,o)),m.doc.resolve(t+s.positionAt(p-1,f-1,o)))),e(m)}var X$=Sy({ArrowLeft:Gf("horiz",-1),ArrowRight:Gf("horiz",1),ArrowUp:Gf("vert",-1),ArrowDown:Gf("vert",1),"Shift-ArrowLeft":Jf("horiz",-1),"Shift-ArrowRight":Jf("horiz",1),"Shift-ArrowUp":Jf("vert",-1),"Shift-ArrowDown":Jf("vert",1),Backspace:Vf,"Mod-Backspace":Vf,Delete:Vf,"Mod-Delete":Vf});function pd(n,e,t){return t.eq(n.selection)?!1:(e&&e(n.tr.setSelection(t).scrollIntoView()),!0)}function Gf(n,e){return(t,r,i)=>{if(!i)return!1;const o=t.selection;if(o instanceof Ge)return pd(t,r,me.near(o.$headCell,e));if(n!="horiz"&&!o.empty)return!1;const s=lC(i,n,e);if(s==null)return!1;if(n=="horiz")return pd(t,r,me.near(t.doc.resolve(o.head+e),e));{const a=t.doc.resolve(s),c=eC(a,n,e);let f;return c?f=me.near(c,1):e<0?f=me.near(t.doc.resolve(a.before(-1)),-1):f=me.near(t.doc.resolve(a.after(-1)),1),pd(t,r,f)}}}function Jf(n,e){return(t,r,i)=>{if(!i)return!1;const o=t.selection;let s;if(o instanceof Ge)s=o;else{const c=lC(i,n,e);if(c==null)return!1;s=new Ge(t.doc.resolve(c))}const a=eC(s.$headCell,n,e);return a?pd(t,r,new Ge(s.$anchorCell,a)):!1}}function Z$(n,e){const t=n.state.doc,r=Ka(t.resolve(e));return r?(n.dispatch(n.state.tr.setSelection(new Ge(r))),!0):!1}function Q$(n,e,t){if(!br(n.state))return!1;let r=G$(t);const i=n.state.selection;if(i instanceof Ge){r||(r={width:1,height:1,rows:[W.from(ey(Ut(n.state.schema).cell,t))]});const o=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=nt.get(o).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=Y$(r,a.right-a.left,a.bottom-a.top),WS(n.state,n.dispatch,s,a,r),!0}else if(r){const o=Wh(n.state),s=o.start(-1);return WS(n.state,n.dispatch,s,nt.get(o.node(-1)).findCell(o.pos-s),r),!0}else return!1}function q$(n,e){var t;if(e.ctrlKey||e.metaKey)return;const r=HS(n,e.target);let i;if(e.shiftKey&&n.state.selection instanceof Ge)o(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=Ka(n.state.selection.$anchor))!=null&&((t=Wg(n,e))==null?void 0:t.pos)!=i.pos)o(i,e),e.preventDefault();else if(!r)return;function o(c,f){let p=Wg(n,f);const m=Lo.getState(n.state)==null;if(!p||!dv(c,p))if(m)p=c;else return;const S=new Ge(c,p);if(m||!n.state.selection.eq(S)){const C=n.state.tr.setSelection(S);m&&C.setMeta(Lo,c.pos),n.dispatch(C)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),Lo.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(Lo,-1))}function a(c){const f=c,p=Lo.getState(n.state);let m;if(p!=null)m=n.state.doc.resolve(p);else if(HS(n,f.target)!=r&&(m=Wg(n,e),!m))return s();m&&o(m,f)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function lC(n,e,t){if(!(n.state.selection instanceof ke))return null;const{$head:r}=n.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((t<0?r.index(i):r.indexAfter(i))!=(t<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=r.before(i),c=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(c)?a:null}}return null}function HS(n,e){for(;e&&e!=n.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Wg(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?Ka(n.state.doc.resolve(t.pos)):null}var ez=class{constructor(n,e){this.node=n,this.defaultCellMinWidth=e,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",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ty(n,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type!=this.node.type?!1:(this.node=n,ty(n,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(n){return n.type=="attributes"&&(n.target==this.table||this.colgroup.contains(n.target))}};function ty(n,e,t,r,i,o){var s;let a=0,c=!0,f=e.firstChild;const p=n.firstChild;if(p){for(let m=0,S=0;m<p.childCount;m++){const{colspan:C,colwidth:E}=p.child(m).attrs;for(let P=0;P<C;P++,S++){const D=i==S?o:E&&E[P],_=D?D+"px":"";if(a+=D||r,D||(c=!1),f)f.style.width!=_&&(f.style.width=_),f=f.nextSibling;else{const J=document.createElement("col");J.style.width=_,e.appendChild(J)}}}for(;f;){const m=f.nextSibling;(s=f.parentNode)==null||s.removeChild(f),f=m}c?(t.style.width=a+"px",t.style.minWidth=""):(t.style.width="",t.style.minWidth=a+"px")}}var An=new ji("tableColumnResizing");function tz({handleWidth:n=5,cellMinWidth:e=25,defaultCellMinWidth:t=100,View:r=ez,lastColumnResizable:i=!0}={}){const o=new il({key:An,state:{init(s,a){var c,f;const p=(f=(c=o.spec)==null?void 0:c.props)==null?void 0:f.nodeViews,m=Ut(a.schema).table.name;return r&&p&&(p[m]=(S,C)=>new r(S,t,C)),new nz(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=An.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{rz(s,a,n,i)},mouseleave:s=>{iz(s)},mousedown:(s,a)=>{oz(s,a,e,t)}},decorations:s=>{const a=An.getState(s);if(a&&a.activeHandle>-1)return uz(s,a.activeHandle)},nodeViews:{}}});return o}var nz=class gd{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,r=e.getMeta(An);if(r&&r.setHandle!=null)return new gd(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new gd(t.activeHandle,r.setDragging);if(t.activeHandle>-1&&e.docChanged){let i=e.mapping.map(t.activeHandle,-1);return qm(e.doc.resolve(i))||(i=-1),new gd(i,t.dragging)}return t}};function rz(n,e,t,r){const i=An.getState(n.state);if(i&&!i.dragging){const o=lz(e.target);let s=-1;if(o){const{left:a,right:c}=o.getBoundingClientRect();e.clientX-a<=t?s=VS(n,e,"left",t):c-e.clientX<=t&&(s=VS(n,e,"right",t))}if(s!=i.activeHandle){if(!r&&s!==-1){const a=n.state.doc.resolve(s),c=a.node(-1),f=nt.get(c),p=a.start(-1);if(f.colCount(a.pos-p)+a.nodeAfter.attrs.colspan-1==f.width-1)return}aC(n,s)}}}function iz(n){const e=An.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&aC(n,-1)}function oz(n,e,t,r){var i;const o=(i=n.dom.ownerDocument.defaultView)!=null?i:window,s=An.getState(n.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=n.state.doc.nodeAt(s.activeHandle),c=sz(n,s.activeHandle,a.attrs);n.dispatch(n.state.tr.setMeta(An,{setDragging:{startX:e.clientX,startWidth:c}}));function f(m){o.removeEventListener("mouseup",f),o.removeEventListener("mousemove",p);const S=An.getState(n.state);S!=null&&S.dragging&&(az(n,S.activeHandle,GS(S.dragging,m,t)),n.dispatch(n.state.tr.setMeta(An,{setDragging:null})))}function p(m){if(!m.which)return f(m);const S=An.getState(n.state);if(S&&S.dragging){const C=GS(S.dragging,m,t);JS(n,S.activeHandle,C,r)}}return JS(n,s.activeHandle,c,r),o.addEventListener("mouseup",f),o.addEventListener("mousemove",p),e.preventDefault(),!0}function sz(n,e,{colspan:t,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=n.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,c=t;if(r)for(let f=0;f<t;f++)r[f]&&(a-=r[f],c--);return a/c}function lz(n){for(;n&&n.nodeName!="TD"&&n.nodeName!="TH";)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}function VS(n,e,t,r){const i=t=="right"?-r:r,o=n.posAtCoords({left:e.clientX+i,top:e.clientY});if(!o)return-1;const{pos:s}=o,a=Ka(n.state.doc.resolve(s));if(!a)return-1;if(t=="right")return a.pos;const c=nt.get(a.node(-1)),f=a.start(-1),p=c.map.indexOf(a.pos-f);return p%c.width==0?-1:f+c.map[p-1]}function GS(n,e,t){const r=e.clientX-n.startX;return Math.max(t,n.startWidth+r)}function aC(n,e){n.dispatch(n.state.tr.setMeta(An,{setHandle:e}))}function az(n,e,t){const r=n.state.doc.resolve(e),i=r.node(-1),o=nt.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,c=n.state.tr;for(let f=0;f<o.height;f++){const p=f*o.width+a;if(f&&o.map[p]==o.map[p-o.width])continue;const m=o.map[p],S=i.nodeAt(m).attrs,C=S.colspan==1?0:a-o.colCount(m);if(S.colwidth&&S.colwidth[C]==t)continue;const E=S.colwidth?S.colwidth.slice():cz(S.colspan);E[C]=t,c.setNodeMarkup(s+m,null,{...S,colwidth:E})}c.docChanged&&n.dispatch(c)}function JS(n,e,t,r){const i=n.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),a=nt.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let c=n.domAtPos(i.start(-1)).node;for(;c&&c.nodeName!="TABLE";)c=c.parentNode;c&&ty(o,c.firstChild,c,r,a,t)}function cz(n){return Array(n).fill(0)}function uz(n,e){var t;const r=[],i=n.doc.resolve(e),o=i.node(-1);if(!o)return Qe.empty;const s=nt.get(o),a=i.start(-1),c=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let f=0;f<s.height;f++){const p=c+f*s.width;if((c==s.width-1||s.map[p]!=s.map[p+1])&&(f==0||s.map[p]!=s.map[p-s.width])){const m=s.map[p],S=a+m+o.nodeAt(m).nodeSize-1,C=document.createElement("div");C.className="column-resize-handle",(t=An.getState(n))!=null&&t.dragging&&r.push($t.node(a+m,a+m+o.nodeAt(m).nodeSize,{class:"column-resize-dragging"})),r.push($t.widget(S,C))}}return Qe.create(n.doc,r)}function fz({allowTableNodeSelection:n=!1}={}){return new il({key:Lo,state:{init(){return null},apply(e,t){const r=e.getMeta(Lo);if(r!=null)return r==-1?null:r;if(t==null||!e.docChanged)return t;const{deleted:i,pos:o}=e.mapping.mapResult(t);return i?null:o}},props:{decorations:w$,handleDOMEvents:{mousedown:q$},createSelectionBetween(e){return Lo.getState(e.state)!=null?e.state.selection:null},handleTripleClick:Z$,handleKeyDown:X$,handlePaste:Q$},appendTransaction(e,t,r){return C$(r,iC(r,t),n)}})}var cl={},Ls={};/**
20
+ 3. "-" cannot repeat`);Ze.customSchemes.push([n,e])}function y$(){Ze.scanner=l$(Ze.customSchemes);for(let n=0;n<Ze.tokenQueue.length;n++)Ze.tokenQueue[n][1]({scanner:Ze.scanner});Ze.parser=f$(Ze.scanner.tokens);for(let n=0;n<Ze.pluginQueue.length;n++)Ze.pluginQueue[n][1]({scanner:Ze.scanner,parser:Ze.parser});Ze.initialized=!0}function lC(n){return Ze.initialized||y$(),d$(Ze.parser.start,n,a$(Ze.scanner.start,n))}function v$(n,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new gv(t),i=lC(n),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!e||a.t===e)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}var Oh=200,wt=function(){};wt.prototype.append=function(e){return e.length?(e=wt.from(e),!this.length&&e||e.length<Oh&&this.leafAppend(e)||this.length<Oh&&e.leafPrepend(this)||this.appendInner(e)):this};wt.prototype.prepend=function(e){return e.length?wt.from(e).append(this):this};wt.prototype.appendInner=function(e){return new b$(this,e)};wt.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?wt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};wt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};wt.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};wt.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},t,r),i};wt.from=function(e){return e instanceof wt?e:e&&e.length?new aC(e):wt.empty};var aC=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,a){for(var c=o;c<s;c++)if(i(this.values[c],a+c)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,a){for(var c=o-1;c>=s;c--)if(i(this.values[c],a+c)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Oh)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Oh)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(wt);wt.empty=new aC([]);var b$=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,s){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(i,a),o,s)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(wt);const S$=500;class gr{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;t&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,a,c,f=[],p=[];return this.items.forEach((m,S)=>{if(!m.step){i||(i=this.remapping(r,S+1),o=i.maps.length),o--,p.push(m);return}if(i){p.push(new Ur(m.map));let C=m.step.map(i.slice(o)),E;C&&s.maybeStep(C).doc&&(E=s.mapping.maps[s.mapping.maps.length-1],f.push(new Ur(E,void 0,void 0,f.length+p.length))),o--,E&&i.appendMap(E,o)}else s.maybeStep(m.step);if(m.selection)return a=i?m.selection.map(i.slice(o)):m.selection,c=new gr(this.items.slice(0,r).append(p.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:a}}addTransform(e,t,r,i){let o=[],s=this.eventCount,a=this.items,c=!i&&a.length?a.get(a.length-1):null;for(let p=0;p<e.steps.length;p++){let m=e.steps[p].invert(e.docs[p]),S=new Ur(e.mapping.maps[p],m,t),C;(C=c&&c.merge(S))&&(S=C,p?o.pop():a=a.slice(0,a.length-1)),o.push(S),t&&(s++,t=void 0),i||(c=S)}let f=s-r.depth;return f>x$&&(a=w$(a,f),s-=f),new gr(a.append(o),s)}remapping(e,t){let r=new wa;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,t),r}addMaps(e){return this.eventCount==0?this:new gr(this.items.append(e.map(t=>new Ur(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(S=>{S.selection&&a--},i);let c=t;this.items.forEach(S=>{let C=o.getMirror(--c);if(C==null)return;s=Math.min(s,C);let E=o.maps[C];if(S.step){let P=e.steps[C].invert(e.docs[C]),D=S.selection&&S.selection.map(o.slice(c+1,C));D&&a++,r.push(new Ur(E,P,D))}else r.push(new Ur(E))},i);let f=[];for(let S=t;S<s;S++)f.push(new Ur(o.maps[S]));let p=this.items.slice(0,i).append(f).append(r),m=new gr(p,a);return m.emptyItemCount()>S$&&(m=m.compress(this.items.length-r.length)),m}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let c=s.step.map(t.slice(r)),f=c&&c.getMap();if(r--,f&&t.appendMap(f,r),c){let p=s.selection&&s.selection.map(t.slice(r));p&&o++;let m=new Ur(f.invert(),c,p),S,C=i.length-1;(S=i.length&&i[C].merge(m))?i[C]=S:i.push(m)}}else s.map&&r--},this.items.length,0),new gr(wt.from(i.reverse()),o)}}gr.empty=new gr(wt.empty,0);function w$(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}class Ur{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Ur(t.getMap().invert(),t,this.selection)}}}class Po{constructor(e,t,r,i,o){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const x$=20;function k$(n,e,t,r){let i=t.getMeta(Ks),o;if(i)return i.historyState;t.getMeta(T$)&&(n=new Po(n.done,n.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(s&&s.getMeta(Ks))return s.getMeta(Ks).redo?new Po(n.done.addTransform(t,void 0,r,yd(e)),n.undone,JS(t.mapping.maps),n.prevTime,n.prevComposition):new Po(n.done,n.undone.addTransform(t,void 0,r,yd(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=t.getMeta("composition"),c=n.prevTime==0||!s&&n.prevComposition!=a&&(n.prevTime<(t.time||0)-r.newGroupDelay||!C$(t,n.prevRanges)),f=s?Gg(n.prevRanges,t.mapping):JS(t.mapping.maps);return new Po(n.done.addTransform(t,c?e.selection.getBookmark():void 0,r,yd(e)),gr.empty,f,t.time,a??n.prevComposition)}else return(o=t.getMeta("rebased"))?new Po(n.done.rebased(t,o),n.undone.rebased(t,o),Gg(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Po(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),Gg(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function C$(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(t=!0)}),t}function JS(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,o,s)=>e.push(o,s));return e}function Gg(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let i=e.map(n[r],1),o=e.map(n[r+1],-1);i<=o&&t.push(i,o)}return t}function E$(n,e,t){let r=yd(e),i=Ks.get(e).spec.config,o=(t?n.undone:n.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(t?n.done:n.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),c=new Po(t?a:o.remaining,t?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(Ks,{redo:t,historyState:c})}let Jg=!1,YS=null;function yd(n){let e=n.plugins;if(YS!=e){Jg=!1,YS=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){Jg=!0;break}}return Jg}const Ks=new ji("history"),T$=new ji("closeHistory");function R$(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new ol({key:Ks,state:{init(){return new Po(gr.empty,gr.empty,null,0,-1)},apply(e,t,r){return k$(t,r,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,i=r=="historyUndo"?uC:r=="historyRedo"?fC:null;return i?(t.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function cC(n,e){return(t,r)=>{let i=Ks.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let o=E$(i,t,n);o&&r(e?o.scrollIntoView():o)}return!0}}const uC=cC(!1,!0),fC=cC(!0,!0);function A$(n={}){return new ol({view(e){return new O$(e,n)}})}class O${constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=s=>{this[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r;if(t){let a=e.nodeBefore,c=e.nodeAfter;if(a||c){let f=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(f){let p=f.getBoundingClientRect(),m=a?p.bottom:p.top;a&&c&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:p.left,right:p.right,top:m-this.width/2,bottom:m+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let o,s;if(!i||i==document.body&&getComputedStyle(i).position=="static")o=-pageXOffset,s=-pageYOffset;else{let a=i.getBoundingClientRect();o=a.left-i.scrollLeft,s=a.top-i.scrollTop}this.element.style.left=r.left-o+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!o){let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Pw(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}class tt extends me{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return tt.valid(r)?new tt(r):me.near(r)}content(){return ee.empty}eq(e){return e instanceof tt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new tt(e.resolve(t.pos))}getBookmark(){return new mv(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!I$(e)||!M$(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&tt.valid(e))return e;let i=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(t>0?e.indexAfter(s)<a.childCount:e.index(s)>0){o=a.child(t>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;i+=t;let c=e.doc.resolve(i);if(tt.valid(c))return c}for(;;){let s=t>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!he.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*t),r=!1;continue e}break}o=s,i+=t;let a=e.doc.resolve(i);if(tt.valid(a))return a}return null}}}tt.prototype.visible=!1;tt.findFrom=tt.findGapCursorFrom;me.jsonID("gapcursor",tt);class mv{constructor(e){this.pos=e}map(e){return new mv(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return tt.valid(t)?new tt(t):me.near(t)}}function I$(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function M$(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function D$(){return new ol({props:{decorations:F$,createSelectionBetween(n,e,t){return e.pos==t.pos&&tt.valid(t)?new tt(t):null},handleClick:_$,handleKeyDown:P$,handleDOMEvents:{beforeinput:N$}}})}const P$=Ey({ArrowLeft:Jf("horiz",-1),ArrowRight:Jf("horiz",1),ArrowUp:Jf("vert",-1),ArrowDown:Jf("vert",1)});function Jf(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){let s=r.selection,a=e>0?s.$to:s.$from,c=s.empty;if(s instanceof ke){if(!o.endOfTextblock(t)||a.depth==0)return!1;c=!1,a=r.doc.resolve(e>0?a.after():a.before())}let f=tt.findGapCursorFrom(a,e,c);return f?(i&&i(r.tr.setSelection(new tt(f))),!0):!1}}function _$(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!tt.valid(r))return!1;let i=n.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&he.isSelectable(n.state.doc.nodeAt(i.inside))?!1:(n.dispatch(n.state.tr.setSelection(new tt(r))),!0)}function N$(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof tt))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let i=W.empty;for(let s=r.length-1;s>=0;s--)i=W.from(r[s].createAndFill(null,i));let o=n.state.tr.replace(t.pos,t.pos,new ee(i,0,0));return o.setSelection(ke.near(o.doc.resolve(t.pos+1))),n.dispatch(o),!1}function F$(n){if(!(n.selection instanceof tt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Qe.create(n.doc,[$t.widget(n.selection.head,e,{key:"gapcursor"})])}var ny,ry;if(typeof WeakMap<"u"){let n=new WeakMap;ny=e=>n.get(e),ry=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;ny=r=>{for(let i=0;i<n.length;i+=2)if(n[i]==r)return n[i+1]},ry=(r,i)=>(t==10&&(t=0),n[t++]=r,n[t++]=i)}var nt=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=n)continue;const r=e%this.width,i=e/this.width|0;let o=r+1,s=i+1;for(let a=1;o<this.width&&this.map[e+a]==t;a++)o++;for(let a=1;s<this.height&&this.map[e+this.width*a]==t;a++)s++;return{left:r,top:i,right:o,bottom:s}}throw new RangeError(`No cell with offset ${n} found`)}colCount(n){for(let e=0;e<this.map.length;e++)if(this.map[e]==n)return e%this.width;throw new RangeError(`No cell with offset ${n} found`)}nextCell(n,e,t){const{left:r,right:i,top:o,bottom:s}=this.findCell(n);return e=="horiz"?(t<0?r==0:i==this.width)?null:this.map[o*this.width+(t<0?r-1:i)]:(t<0?o==0:s==this.height)?null:this.map[r+this.width*(t<0?o-1:s)]}rectBetween(n,e){const{left:t,right:r,top:i,bottom:o}=this.findCell(n),{left:s,right:a,top:c,bottom:f}=this.findCell(e);return{left:Math.min(t,s),top:Math.min(i,c),right:Math.max(r,a),bottom:Math.max(o,f)}}cellsInRect(n){const e=[],t={};for(let r=n.top;r<n.bottom;r++)for(let i=n.left;i<n.right;i++){const o=r*this.width+i,s=this.map[o];t[s]||(t[s]=!0,!(i==n.left&&i&&this.map[o-1]==s||r==n.top&&r&&this.map[o-this.width]==s)&&e.push(s))}return e}positionAt(n,e,t){for(let r=0,i=0;;r++){const o=i+t.child(r).nodeSize;if(r==n){let s=e+n*this.width;const a=(n+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?o-1:this.map[s]}i=o}}static get(n){return ny(n)||ry(n,L$(n))}};function L$(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);const e=B$(n),t=n.childCount,r=[];let i=0,o=null;const s=[];for(let f=0,p=e*t;f<p;f++)r[f]=0;for(let f=0,p=0;f<t;f++){const m=n.child(f);p++;for(let E=0;;E++){for(;i<r.length&&r[i]!=0;)i++;if(E==m.childCount)break;const P=m.child(E),{colspan:D,rowspan:_,colwidth:J}=P.attrs;for(let ie=0;ie<_;ie++){if(ie+f>=t){(o||(o=[])).push({type:"overlong_rowspan",pos:p,n:_-ie});break}const oe=i+ie*e;for(let te=0;te<D;te++){r[oe+te]==0?r[oe+te]=p:(o||(o=[])).push({type:"collision",row:f,pos:p,n:D-te});const G=J&&J[te];if(G){const ne=(oe+te)%e*2,ae=s[ne];ae==null||ae!=G&&s[ne+1]==1?(s[ne]=G,s[ne+1]=1):ae==G&&s[ne+1]++}}}i+=D,p+=P.nodeSize}const S=(f+1)*e;let C=0;for(;i<S;)r[i++]==0&&C++;C&&(o||(o=[])).push({type:"missing",row:f,n:C}),p++}const a=new nt(e,t,r,o);let c=!1;for(let f=0;!c&&f<s.length;f+=2)s[f]!=null&&s[f+1]<t&&(c=!0);return c&&$$(a,s,n),a}function B$(n){let e=-1,t=!1;for(let r=0;r<n.childCount;r++){const i=n.child(r);let o=0;if(t)for(let s=0;s<r;s++){const a=n.child(s);for(let c=0;c<a.childCount;c++){const f=a.child(c);s+f.attrs.rowspan>r&&(o+=f.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);o+=a.attrs.colspan,a.attrs.rowspan>1&&(t=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function $$(n,e,t){n.problems||(n.problems=[]);const r={};for(let i=0;i<n.map.length;i++){const o=n.map[i];if(r[o])continue;r[o]=!0;const s=t.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let a=null;const c=s.attrs;for(let f=0;f<c.colspan;f++){const p=(i+f)%n.width,m=e[p*2];m!=null&&(!c.colwidth||c.colwidth[f]!=m)&&((a||(a=z$(c)))[f]=m)}a&&n.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function z$(n){if(n.colwidth)return n.colwidth.slice();const e=[];for(let t=0;t<n.colspan;t++)e.push(0);return e}function Ut(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var Lo=new ji("selectingCells");function Za(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function j$(n){for(let e=n.depth;e>0;e--){const t=n.node(e).type.spec.tableRole;if(t==="cell"||t==="header_cell")return n.node(e)}return null}function br(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function Yh(n){const e=n.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 t=Za(e.$head)||U$(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function U$(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function iy(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function W$(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function yv(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function dC(n,e,t){const r=n.node(-1),i=nt.get(r),o=n.start(-1),s=i.nextCell(n.pos-o,e,t);return s==null?null:n.node(0).resolve(o+s)}function tl(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function hC(n,e,t=1){const r={...n,colspan:n.colspan+t};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<t;i++)r.colwidth.splice(e,0,0)}return r}function H$(n,e,t){const r=Ut(e.type.schema).header_cell;for(let i=0;i<n.height;i++)if(e.nodeAt(n.map[t+i*n.width]).type!=r)return!1;return!0}var Ge=class Di extends me{constructor(e,t=e){const r=e.node(-1),i=nt.get(r),o=e.start(-1),s=i.rectBetween(e.pos-o,t.pos-o),a=e.node(0),c=i.cellsInRect(s).filter(p=>p!=t.pos-o);c.unshift(t.pos-o);const f=c.map(p=>{const m=r.nodeAt(p);if(!m)throw RangeError(`No cell with offset ${p} found`);const S=o+p+1;return new gy(a.resolve(S),a.resolve(S+m.content.size))});super(f[0].$from,f[0].$to,f),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),i=e.resolve(t.map(this.$headCell.pos));if(iy(r)&&iy(i)&&yv(r,i)){const o=this.$anchorCell.node(-1)!=r.node(-1);return o&&this.isRowSelection()?Di.rowSelection(r,i):o&&this.isColSelection()?Di.colSelection(r,i):new Di(r,i)}return ke.between(r,i)}content(){const e=this.$anchorCell.node(-1),t=nt.get(e),r=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),o={},s=[];for(let c=i.top;c<i.bottom;c++){const f=[];for(let p=c*t.width+i.left,m=i.left;m<i.right;m++,p++){const S=t.map[p];if(o[S])continue;o[S]=!0;const C=t.findCell(S);let E=e.nodeAt(S);if(!E)throw RangeError(`No cell with offset ${S} found`);const P=i.left-C.left,D=C.right-i.right;if(P>0||D>0){let _=E.attrs;if(P>0&&(_=tl(_,0,P)),D>0&&(_=tl(_,_.colspan-D,D)),C.left<i.left){if(E=E.type.createAndFill(_),!E)throw RangeError(`Could not create cell with attrs ${JSON.stringify(_)}`)}else E=E.type.create(_,E.content)}if(C.top<i.top||C.bottom>i.bottom){const _={...E.attrs,rowspan:Math.min(C.bottom,i.bottom)-Math.max(C.top,i.top)};C.top<i.top?E=E.type.createAndFill(_):E=E.type.create(_,E.content)}f.push(E)}s.push(e.child(c).copy(W.from(f)))}const a=this.isColSelection()&&this.isRowSelection()?e:s;return new ee(W.from(a),1,1)}replace(e,t=ee.empty){const r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:a,$to:c}=i[s],f=e.mapping.slice(r);e.replace(f.map(a.pos),f.map(c.pos),s?ee.empty:t)}const o=me.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new ee(W.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),r=nt.get(t),i=this.$anchorCell.start(-1),o=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<o.length;s++)e(t.nodeAt(o[s]),i+o[s])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),i=nt.get(r),o=e.start(-1),s=i.findCell(e.pos-o),a=i.findCell(t.pos-o),c=e.node(0);return s.top<=a.top?(s.top>0&&(e=c.resolve(o+i.map[s.left])),a.bottom<i.height&&(t=c.resolve(o+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(t=c.resolve(o+i.map[a.left])),s.bottom<i.height&&(e=c.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new Di(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=nt.get(e),r=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-r),o=t.colCount(this.$headCell.pos-r);if(Math.min(i,o)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==t.width}eq(e){return e instanceof Di&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),i=nt.get(r),o=e.start(-1),s=i.findCell(e.pos-o),a=i.findCell(t.pos-o),c=e.node(0);return s.left<=a.left?(s.left>0&&(e=c.resolve(o+i.map[s.top*i.width])),a.right<i.width&&(t=c.resolve(o+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(t=c.resolve(o+i.map[a.top*i.width])),s.right<i.width&&(e=c.resolve(o+i.map[i.width*(s.top+1)-1]))),new Di(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Di(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){return new Di(e.resolve(t),e.resolve(r))}getBookmark(){return new V$(this.$anchorCell.pos,this.$headCell.pos)}};Ge.prototype.visible=!1;me.jsonID("cell",Ge);var V$=class pC{constructor(e,t){this.anchor=e,this.head=t}map(e){return new pC(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),r=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&r.index()<r.parent.childCount&&yv(t,r)?new Ge(t,r):me.near(r,1)}};function G$(n){if(!(n.selection instanceof Ge))return null;const e=[];return n.selection.forEachCell((t,r)=>{e.push($t.node(r,r+t.nodeSize,{class:"selectedCell"}))}),Qe.create(n.doc,e)}function J$({$from:n,$to:e}){if(n.pos==e.pos||n.pos<e.pos-6)return!1;let t=n.pos,r=e.pos,i=n.depth;for(;i>=0&&!(n.after(i+1)<n.end(i));i--,t++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,r--);return t==r&&/row|table/.test(n.node(i).type.spec.tableRole)}function Y$({$from:n,$to:e}){let t,r;for(let i=n.depth;i>0;i--){const o=n.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){t=o;break}}for(let i=e.depth;i>0;i--){const o=e.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}return t!==r&&e.parentOffset===0}function K$(n,e,t){const r=(e||n).selection,i=(e||n).doc;let o,s;if(r instanceof he&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=Ge.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);o=Ge.rowSelection(a,a)}else if(!t){const a=nt.get(r.node),c=r.from+1,f=c+a.map[a.width*a.height-1];o=Ge.create(i,c+1,f)}}else r instanceof ke&&J$(r)?o=ke.create(i,r.from):r instanceof ke&&Y$(r)&&(o=ke.create(i,r.$from.start(),r.$from.end()));return o&&(e||(e=n.tr)).setSelection(o),e}var X$=new ji("fix-tables");function gC(n,e,t,r){const i=n.childCount,o=e.childCount;e:for(let s=0,a=0;s<o;s++){const c=e.child(s);for(let f=a,p=Math.min(i,s+3);f<p;f++)if(n.child(f)==c){a=f+1,t+=c.nodeSize;continue e}r(c,t),a<i&&n.child(a).sameMarkup(c)?gC(n.child(a),c,t+1,r):c.nodesBetween(0,c.content.size,r,t+1),t+=c.nodeSize}}function mC(n,e){let t;const r=(i,o)=>{i.type.spec.tableRole=="table"&&(t=Z$(n,i,o,t))};return e?e.doc!=n.doc&&gC(e.doc,n.doc,0,r):n.doc.descendants(r),t}function Z$(n,e,t,r){const i=nt.get(e);if(!i.problems)return r;r||(r=n.tr);const o=[];for(let c=0;c<i.height;c++)o.push(0);for(let c=0;c<i.problems.length;c++){const f=i.problems[c];if(f.type=="collision"){const p=e.nodeAt(f.pos);if(!p)continue;const m=p.attrs;for(let S=0;S<m.rowspan;S++)o[f.row+S]+=f.n;r.setNodeMarkup(r.mapping.map(t+1+f.pos),null,tl(m,m.colspan-f.n,f.n))}else if(f.type=="missing")o[f.row]+=f.n;else if(f.type=="overlong_rowspan"){const p=e.nodeAt(f.pos);if(!p)continue;r.setNodeMarkup(r.mapping.map(t+1+f.pos),null,{...p.attrs,rowspan:p.attrs.rowspan-f.n})}else if(f.type=="colwidth mismatch"){const p=e.nodeAt(f.pos);if(!p)continue;r.setNodeMarkup(r.mapping.map(t+1+f.pos),null,{...p.attrs,colwidth:f.colwidth})}}let s,a;for(let c=0;c<o.length;c++)o[c]&&(s==null&&(s=c),a=c);for(let c=0,f=t+1;c<i.height;c++){const p=e.child(c),m=f+p.nodeSize,S=o[c];if(S>0){let C="cell";p.firstChild&&(C=p.firstChild.type.spec.tableRole);const E=[];for(let D=0;D<S;D++){const _=Ut(n.schema)[C].createAndFill();_&&E.push(_)}const P=(c==0||s==c-1)&&a==c?f+1:m-1;r.insert(r.mapping.map(P),E)}f=m}return r.setMeta(X$,{fixTables:!0})}function ei(n){const e=n.selection,t=Yh(n),r=t.node(-1),i=t.start(-1),o=nt.get(r);return{...e instanceof Ge?o.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):o.findCell(t.pos-i),tableStart:i,map:o,table:r}}function yC(n,{map:e,tableStart:t,table:r},i){let o=i>0?-1:0;H$(e,r,i+o)&&(o=i==0||i==e.width?null:0);for(let s=0;s<e.height;s++){const a=s*e.width+i;if(i>0&&i<e.width&&e.map[a-1]==e.map[a]){const c=e.map[a],f=r.nodeAt(c);n.setNodeMarkup(n.mapping.map(t+c),null,hC(f.attrs,i-e.colCount(c))),s+=f.attrs.rowspan-1}else{const c=o==null?Ut(r.type.schema).cell:r.nodeAt(e.map[a+o]).type,f=e.positionAt(s,i,r);n.insert(n.mapping.map(t+f),c.createAndFill())}}return n}function Q$(n,e){if(!br(n))return!1;if(e){const t=ei(n);e(yC(n.tr,t,t.left))}return!0}function q$(n,e){if(!br(n))return!1;if(e){const t=ei(n);e(yC(n.tr,t,t.right))}return!0}function ez(n,{map:e,table:t,tableStart:r},i){const o=n.mapping.maps.length;for(let s=0;s<e.height;){const a=s*e.width+i,c=e.map[a],f=t.nodeAt(c),p=f.attrs;if(i>0&&e.map[a-1]==c||i<e.width-1&&e.map[a+1]==c)n.setNodeMarkup(n.mapping.slice(o).map(r+c),null,tl(p,i-e.colCount(c)));else{const m=n.mapping.slice(o).map(r+c);n.delete(m,m+f.nodeSize)}s+=p.rowspan}}function tz(n,e){if(!br(n))return!1;if(e){const t=ei(n),r=n.tr;if(t.left==0&&t.right==t.map.width)return!1;for(let i=t.right-1;ez(r,t,i),i!=t.left;i--){const o=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=nt.get(o)}e(r)}return!0}function nz(n,e,t){var r;const i=Ut(e.type.schema).header_cell;for(let o=0;o<n.width;o++)if(((r=e.nodeAt(n.map[o+t*n.width]))==null?void 0:r.type)!=i)return!1;return!0}function vC(n,{map:e,tableStart:t,table:r},i){var o;let s=t;for(let f=0;f<i;f++)s+=r.child(f).nodeSize;const a=[];let c=i>0?-1:0;nz(e,r,i+c)&&(c=i==0||i==e.height?null:0);for(let f=0,p=e.width*i;f<e.width;f++,p++)if(i>0&&i<e.height&&e.map[p]==e.map[p-e.width]){const m=e.map[p],S=r.nodeAt(m).attrs;n.setNodeMarkup(t+m,null,{...S,rowspan:S.rowspan+1}),f+=S.colspan-1}else{const m=c==null?Ut(r.type.schema).cell:(o=r.nodeAt(e.map[p+c*e.width]))==null?void 0:o.type,S=m==null?void 0:m.createAndFill();S&&a.push(S)}return n.insert(s,Ut(r.type.schema).row.create(null,a)),n}function rz(n,e){if(!br(n))return!1;if(e){const t=ei(n);e(vC(n.tr,t,t.top))}return!0}function iz(n,e){if(!br(n))return!1;if(e){const t=ei(n);e(vC(n.tr,t,t.bottom))}return!0}function oz(n,{map:e,table:t,tableStart:r},i){let o=0;for(let f=0;f<i;f++)o+=t.child(f).nodeSize;const s=o+t.child(i).nodeSize,a=n.mapping.maps.length;n.delete(o+r,s+r);const c=new Set;for(let f=0,p=i*e.width;f<e.width;f++,p++){const m=e.map[p];if(!c.has(m)){if(c.add(m),i>0&&m==e.map[p-e.width]){const S=t.nodeAt(m).attrs;n.setNodeMarkup(n.mapping.slice(a).map(m+r),null,{...S,rowspan:S.rowspan-1}),f+=S.colspan-1}else if(i<e.height&&m==e.map[p+e.width]){const S=t.nodeAt(m),C=S.attrs,E=S.type.create({...C,rowspan:S.attrs.rowspan-1},S.content),P=e.positionAt(i+1,f,t);n.insert(n.mapping.slice(a).map(r+P),E),f+=C.colspan-1}}}}function sz(n,e){if(!br(n))return!1;if(e){const t=ei(n),r=n.tr;if(t.top==0&&t.bottom==t.map.height)return!1;for(let i=t.bottom-1;oz(r,t,i),i!=t.top;i--){const o=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=nt.get(t.table)}e(r)}return!0}function KS(n){const e=n.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function lz({width:n,height:e,map:t},r){let i=r.top*n+r.left,o=i,s=(r.bottom-1)*n+r.left,a=i+(r.right-r.left-1);for(let c=r.top;c<r.bottom;c++){if(r.left>0&&t[o]==t[o-1]||r.right<n&&t[a]==t[a+1])return!0;o+=n,a+=n}for(let c=r.left;c<r.right;c++){if(r.top>0&&t[i]==t[i-n]||r.bottom<e&&t[s]==t[s+n])return!0;i++,s++}return!1}function az(n,e){const t=n.selection;if(!(t instanceof Ge)||t.$anchorCell.pos==t.$headCell.pos)return!1;const r=ei(n),{map:i}=r;if(lz(i,r))return!1;if(e){const o=n.tr,s={};let a=W.empty,c,f;for(let p=r.top;p<r.bottom;p++)for(let m=r.left;m<r.right;m++){const S=i.map[p*i.width+m],C=r.table.nodeAt(S);if(!(s[S]||!C))if(s[S]=!0,c==null)c=S,f=C;else{KS(C)||(a=a.append(C.content));const E=o.mapping.map(S+r.tableStart);o.delete(E,E+C.nodeSize)}}if(c==null||f==null)return!0;if(o.setNodeMarkup(c+r.tableStart,null,{...hC(f.attrs,f.attrs.colspan,r.right-r.left-f.attrs.colspan),rowspan:r.bottom-r.top}),a.size){const p=c+1+f.content.size,m=KS(f)?c+1:p;o.replaceWith(m+r.tableStart,p+r.tableStart,a)}o.setSelection(new Ge(o.doc.resolve(c+r.tableStart))),e(o)}return!0}function cz(n,e){const t=Ut(n.schema);return uz(({node:r})=>t[r.type.spec.tableRole])(n,e)}function uz(n){return(e,t)=>{var r;const i=e.selection;let o,s;if(i instanceof Ge){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,s=i.$anchorCell.pos}else{if(o=j$(i.$from),!o)return!1;s=(r=Za(i.$from))==null?void 0:r.pos}if(o==null||s==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(t){let a=o.attrs;const c=[],f=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const p=ei(e),m=e.tr;for(let C=0;C<p.right-p.left;C++)c.push(f?{...a,colwidth:f&&f[C]?[f[C]]:null}:a);let S;for(let C=p.top;C<p.bottom;C++){let E=p.map.positionAt(C,p.left,p.table);C==p.top&&(E+=o.nodeSize);for(let P=p.left,D=0;P<p.right;P++,D++)P==p.left&&C==p.top||m.insert(S=m.mapping.map(E+p.tableStart,1),n({node:o,row:C,col:P}).createAndFill(c[D]))}m.setNodeMarkup(s,n({node:o,row:p.top,col:p.left}),c[0]),i instanceof Ge&&m.setSelection(new Ge(m.doc.resolve(i.$anchorCell.pos),S?m.doc.resolve(S):void 0)),t(m)}return!0}}function fz(n,e){return function(t,r){if(!br(t))return!1;const i=Yh(t);if(i.nodeAfter.attrs[n]===e)return!1;if(r){const o=t.tr;t.selection instanceof Ge?t.selection.forEachCell((s,a)=>{s.attrs[n]!==e&&o.setNodeMarkup(a,null,{...s.attrs,[n]:e})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[n]:e}),r(o)}return!0}}function dz(n){return function(e,t){if(!br(e))return!1;if(t){const r=Ut(e.schema),i=ei(e),o=e.tr,s=i.map.cellsInRect(n=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:n=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(c=>i.table.nodeAt(c));for(let c=0;c<s.length;c++)a[c].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[c],r.cell,a[c].attrs);if(o.steps.length==0)for(let c=0;c<s.length;c++)o.setNodeMarkup(i.tableStart+s[c],r.header_cell,a[c].attrs);t(o)}return!0}}function XS(n,e,t){const r=e.map.cellsInRect({left:0,top:0,right:n=="row"?e.map.width:1,bottom:n=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const o=e.table.nodeAt(r[i]);if(o&&o.type!==t.header_cell)return!1}return!0}function Kh(n,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?dz(n):function(t,r){if(!br(t))return!1;if(r){const i=Ut(t.schema),o=ei(t),s=t.tr,a=XS("row",o,i),c=XS("column",o,i),p=(n==="column"?a:n==="row"?c:!1)?1:0,m=n=="column"?{left:0,top:p,right:1,bottom:o.map.height}:n=="row"?{left:p,top:0,right:o.map.width,bottom:1}:o,S=n=="column"?c?i.cell:i.header_cell:n=="row"?a?i.cell:i.header_cell:i.cell;o.map.cellsInRect(m).forEach(C=>{const E=C+o.tableStart,P=s.doc.nodeAt(E);P&&s.setNodeMarkup(E,S,P.attrs)}),r(s)}return!0}}Kh("row",{useDeprecatedLogic:!0});Kh("column",{useDeprecatedLogic:!0});var hz=Kh("cell",{useDeprecatedLogic:!0});function pz(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let r=n.index(-1)-1,i=n.before();r>=0;r--){const o=n.node(-1).child(r),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(n.index()<n.parent.childCount-1)return n.pos+n.nodeAfter.nodeSize;const t=n.node(-1);for(let r=n.indexAfter(-1),i=n.after();r<t.childCount;r++){const o=t.child(r);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function gz(n){return function(e,t){if(!br(e))return!1;const r=pz(Yh(e),n);if(r==null)return!1;if(t){const i=e.doc.resolve(r);t(e.tr.setSelection(ke.between(i,W$(i))).scrollIntoView())}return!0}}function mz(n,e){const t=n.selection.$anchor;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="table")return e&&e(n.tr.delete(t.before(r),t.after(r)).scrollIntoView()),!0;return!1}function Yf(n,e){const t=n.selection;if(!(t instanceof Ge))return!1;if(e){const r=n.tr,i=Ut(n.schema).cell.createAndFill().content;t.forEachCell((o,s)=>{o.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+o.nodeSize-1),new ee(i,0,0))}),r.docChanged&&e(r)}return!0}function yz(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:r}=n;for(;e.childCount==1&&(t>0&&r>0||e.child(0).type.spec.tableRole=="table");)t--,r--,e=e.child(0).content;const i=e.child(0),o=i.type.spec.tableRole,s=i.type.schema,a=[];if(o=="row")for(let c=0;c<e.childCount;c++){let f=e.child(c).content;const p=c?0:Math.max(0,t-1),m=c<e.childCount-1?0:Math.max(0,r-1);(p||m)&&(f=oy(Ut(s).row,new ee(f,p,m)).content),a.push(f)}else if(o=="cell"||o=="header_cell")a.push(t||r?oy(Ut(s).row,new ee(e,t,r)).content:e);else return null;return vz(s,a)}function vz(n,e){const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(let s=o.childCount-1;s>=0;s--){const{rowspan:a,colspan:c}=o.child(s).attrs;for(let f=i;f<i+a;f++)t[f]=(t[f]||0)+c}}let r=0;for(let i=0;i<t.length;i++)r=Math.max(r,t[i]);for(let i=0;i<t.length;i++)if(i>=e.length&&e.push(W.empty),t[i]<r){const o=Ut(n).cell.createAndFill(),s=[];for(let a=t[i];a<r;a++)s.push(o);e[i]=e[i].append(W.from(s))}return{height:e.length,width:r,rows:e}}function oy(n,e){const t=n.createAndFill();return new py(t).replace(0,t.content.size,e).doc}function bz({width:n,height:e,rows:t},r,i){if(n!=r){const o=[],s=[];for(let a=0;a<t.length;a++){const c=t[a],f=[];for(let p=o[a]||0,m=0;p<r;m++){let S=c.child(m%c.childCount);p+S.attrs.colspan>r&&(S=S.type.createChecked(tl(S.attrs,S.attrs.colspan,p+S.attrs.colspan-r),S.content)),f.push(S),p+=S.attrs.colspan;for(let C=1;C<S.attrs.rowspan;C++)o[a+C]=(o[a+C]||0)+S.attrs.colspan}s.push(W.from(f))}t=s,n=r}if(e!=i){const o=[];for(let s=0,a=0;s<i;s++,a++){const c=[],f=t[a%e];for(let p=0;p<f.childCount;p++){let m=f.child(p);s+m.attrs.rowspan>i&&(m=m.type.create({...m.attrs,rowspan:Math.max(1,i-m.attrs.rowspan)},m.content)),c.push(m)}o.push(W.from(c))}t=o,e=i}return{width:n,height:e,rows:t}}function Sz(n,e,t,r,i,o,s){const a=n.doc.type.schema,c=Ut(a);let f,p;if(i>e.width)for(let m=0,S=0;m<e.height;m++){const C=t.child(m);S+=C.nodeSize;const E=[];let P;C.lastChild==null||C.lastChild.type==c.cell?P=f||(f=c.cell.createAndFill()):P=p||(p=c.header_cell.createAndFill());for(let D=e.width;D<i;D++)E.push(P);n.insert(n.mapping.slice(s).map(S-1+r),E)}if(o>e.height){const m=[];for(let E=0,P=(e.height-1)*e.width;E<Math.max(e.width,i);E++){const D=E>=e.width?!1:t.nodeAt(e.map[P+E]).type==c.header_cell;m.push(D?p||(p=c.header_cell.createAndFill()):f||(f=c.cell.createAndFill()))}const S=c.row.create(null,W.from(m)),C=[];for(let E=e.height;E<o;E++)C.push(S);n.insert(n.mapping.slice(s).map(r+t.nodeSize-2),C)}return!!(f||p)}function ZS(n,e,t,r,i,o,s,a){if(s==0||s==e.height)return!1;let c=!1;for(let f=i;f<o;f++){const p=s*e.width+f,m=e.map[p];if(e.map[p-e.width]==m){c=!0;const S=t.nodeAt(m),{top:C,left:E}=e.findCell(m);n.setNodeMarkup(n.mapping.slice(a).map(m+r),null,{...S.attrs,rowspan:s-C}),n.insert(n.mapping.slice(a).map(e.positionAt(s,E,t)),S.type.createAndFill({...S.attrs,rowspan:C+S.attrs.rowspan-s})),f+=S.attrs.colspan-1}}return c}function QS(n,e,t,r,i,o,s,a){if(s==0||s==e.width)return!1;let c=!1;for(let f=i;f<o;f++){const p=f*e.width+s,m=e.map[p];if(e.map[p-1]==m){c=!0;const S=t.nodeAt(m),C=e.colCount(m),E=n.mapping.slice(a).map(m+r);n.setNodeMarkup(E,null,tl(S.attrs,s-C,S.attrs.colspan-(s-C))),n.insert(E+S.nodeSize,S.type.createAndFill(tl(S.attrs,0,s-C))),f+=S.attrs.rowspan-1}}return c}function qS(n,e,t,r,i){let o=t?n.doc.nodeAt(t-1):n.doc;if(!o)throw new Error("No table found");let s=nt.get(o);const{top:a,left:c}=r,f=c+i.width,p=a+i.height,m=n.tr;let S=0;function C(){if(o=t?m.doc.nodeAt(t-1):m.doc,!o)throw new Error("No table found");s=nt.get(o),S=m.mapping.maps.length}Sz(m,s,o,t,f,p,S)&&C(),ZS(m,s,o,t,c,f,a,S)&&C(),ZS(m,s,o,t,c,f,p,S)&&C(),QS(m,s,o,t,a,p,c,S)&&C(),QS(m,s,o,t,a,p,f,S)&&C();for(let E=a;E<p;E++){const P=s.positionAt(E,c,o),D=s.positionAt(E,f,o);m.replace(m.mapping.slice(S).map(P+t),m.mapping.slice(S).map(D+t),new ee(i.rows[E-a],0,0))}C(),m.setSelection(new Ge(m.doc.resolve(t+s.positionAt(a,c,o)),m.doc.resolve(t+s.positionAt(p-1,f-1,o)))),e(m)}var wz=Ey({ArrowLeft:Kf("horiz",-1),ArrowRight:Kf("horiz",1),ArrowUp:Kf("vert",-1),ArrowDown:Kf("vert",1),"Shift-ArrowLeft":Xf("horiz",-1),"Shift-ArrowRight":Xf("horiz",1),"Shift-ArrowUp":Xf("vert",-1),"Shift-ArrowDown":Xf("vert",1),Backspace:Yf,"Mod-Backspace":Yf,Delete:Yf,"Mod-Delete":Yf});function vd(n,e,t){return t.eq(n.selection)?!1:(e&&e(n.tr.setSelection(t).scrollIntoView()),!0)}function Kf(n,e){return(t,r,i)=>{if(!i)return!1;const o=t.selection;if(o instanceof Ge)return vd(t,r,me.near(o.$headCell,e));if(n!="horiz"&&!o.empty)return!1;const s=bC(i,n,e);if(s==null)return!1;if(n=="horiz")return vd(t,r,me.near(t.doc.resolve(o.head+e),e));{const a=t.doc.resolve(s),c=dC(a,n,e);let f;return c?f=me.near(c,1):e<0?f=me.near(t.doc.resolve(a.before(-1)),-1):f=me.near(t.doc.resolve(a.after(-1)),1),vd(t,r,f)}}}function Xf(n,e){return(t,r,i)=>{if(!i)return!1;const o=t.selection;let s;if(o instanceof Ge)s=o;else{const c=bC(i,n,e);if(c==null)return!1;s=new Ge(t.doc.resolve(c))}const a=dC(s.$headCell,n,e);return a?vd(t,r,new Ge(s.$anchorCell,a)):!1}}function xz(n,e){const t=n.state.doc,r=Za(t.resolve(e));return r?(n.dispatch(n.state.tr.setSelection(new Ge(r))),!0):!1}function kz(n,e,t){if(!br(n.state))return!1;let r=yz(t);const i=n.state.selection;if(i instanceof Ge){r||(r={width:1,height:1,rows:[W.from(oy(Ut(n.state.schema).cell,t))]});const o=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=nt.get(o).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=bz(r,a.right-a.left,a.bottom-a.top),qS(n.state,n.dispatch,s,a,r),!0}else if(r){const o=Yh(n.state),s=o.start(-1);return qS(n.state,n.dispatch,s,nt.get(o.node(-1)).findCell(o.pos-s),r),!0}else return!1}function Cz(n,e){var t;if(e.ctrlKey||e.metaKey)return;const r=ew(n,e.target);let i;if(e.shiftKey&&n.state.selection instanceof Ge)o(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=Za(n.state.selection.$anchor))!=null&&((t=Yg(n,e))==null?void 0:t.pos)!=i.pos)o(i,e),e.preventDefault();else if(!r)return;function o(c,f){let p=Yg(n,f);const m=Lo.getState(n.state)==null;if(!p||!yv(c,p))if(m)p=c;else return;const S=new Ge(c,p);if(m||!n.state.selection.eq(S)){const C=n.state.tr.setSelection(S);m&&C.setMeta(Lo,c.pos),n.dispatch(C)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),Lo.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(Lo,-1))}function a(c){const f=c,p=Lo.getState(n.state);let m;if(p!=null)m=n.state.doc.resolve(p);else if(ew(n,f.target)!=r&&(m=Yg(n,e),!m))return s();m&&o(m,f)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function bC(n,e,t){if(!(n.state.selection instanceof ke))return null;const{$head:r}=n.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((t<0?r.index(i):r.indexAfter(i))!=(t<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=r.before(i),c=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(c)?a:null}}return null}function ew(n,e){for(;e&&e!=n.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Yg(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?Za(n.state.doc.resolve(t.pos)):null}var Ez=class{constructor(n,e){this.node=n,this.defaultCellMinWidth=e,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",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),sy(n,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type!=this.node.type?!1:(this.node=n,sy(n,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(n){return n.type=="attributes"&&(n.target==this.table||this.colgroup.contains(n.target))}};function sy(n,e,t,r,i,o){var s;let a=0,c=!0,f=e.firstChild;const p=n.firstChild;if(p){for(let m=0,S=0;m<p.childCount;m++){const{colspan:C,colwidth:E}=p.child(m).attrs;for(let P=0;P<C;P++,S++){const D=i==S?o:E&&E[P],_=D?D+"px":"";if(a+=D||r,D||(c=!1),f)f.style.width!=_&&(f.style.width=_),f=f.nextSibling;else{const J=document.createElement("col");J.style.width=_,e.appendChild(J)}}}for(;f;){const m=f.nextSibling;(s=f.parentNode)==null||s.removeChild(f),f=m}c?(t.style.width=a+"px",t.style.minWidth=""):(t.style.width="",t.style.minWidth=a+"px")}}var An=new ji("tableColumnResizing");function Tz({handleWidth:n=5,cellMinWidth:e=25,defaultCellMinWidth:t=100,View:r=Ez,lastColumnResizable:i=!0}={}){const o=new ol({key:An,state:{init(s,a){var c,f;const p=(f=(c=o.spec)==null?void 0:c.props)==null?void 0:f.nodeViews,m=Ut(a.schema).table.name;return r&&p&&(p[m]=(S,C)=>new r(S,t,C)),new Rz(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=An.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{Az(s,a,n,i)},mouseleave:s=>{Oz(s)},mousedown:(s,a)=>{Iz(s,a,e,t)}},decorations:s=>{const a=An.getState(s);if(a&&a.activeHandle>-1)return Nz(s,a.activeHandle)},nodeViews:{}}});return o}var Rz=class bd{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,r=e.getMeta(An);if(r&&r.setHandle!=null)return new bd(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new bd(t.activeHandle,r.setDragging);if(t.activeHandle>-1&&e.docChanged){let i=e.mapping.map(t.activeHandle,-1);return iy(e.doc.resolve(i))||(i=-1),new bd(i,t.dragging)}return t}};function Az(n,e,t,r){const i=An.getState(n.state);if(i&&!i.dragging){const o=Dz(e.target);let s=-1;if(o){const{left:a,right:c}=o.getBoundingClientRect();e.clientX-a<=t?s=tw(n,e,"left",t):c-e.clientX<=t&&(s=tw(n,e,"right",t))}if(s!=i.activeHandle){if(!r&&s!==-1){const a=n.state.doc.resolve(s),c=a.node(-1),f=nt.get(c),p=a.start(-1);if(f.colCount(a.pos-p)+a.nodeAfter.attrs.colspan-1==f.width-1)return}SC(n,s)}}}function Oz(n){const e=An.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&SC(n,-1)}function Iz(n,e,t,r){var i;const o=(i=n.dom.ownerDocument.defaultView)!=null?i:window,s=An.getState(n.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=n.state.doc.nodeAt(s.activeHandle),c=Mz(n,s.activeHandle,a.attrs);n.dispatch(n.state.tr.setMeta(An,{setDragging:{startX:e.clientX,startWidth:c}}));function f(m){o.removeEventListener("mouseup",f),o.removeEventListener("mousemove",p);const S=An.getState(n.state);S!=null&&S.dragging&&(Pz(n,S.activeHandle,nw(S.dragging,m,t)),n.dispatch(n.state.tr.setMeta(An,{setDragging:null})))}function p(m){if(!m.which)return f(m);const S=An.getState(n.state);if(S&&S.dragging){const C=nw(S.dragging,m,t);rw(n,S.activeHandle,C,r)}}return rw(n,s.activeHandle,c,r),o.addEventListener("mouseup",f),o.addEventListener("mousemove",p),e.preventDefault(),!0}function Mz(n,e,{colspan:t,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=n.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,c=t;if(r)for(let f=0;f<t;f++)r[f]&&(a-=r[f],c--);return a/c}function Dz(n){for(;n&&n.nodeName!="TD"&&n.nodeName!="TH";)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}function tw(n,e,t,r){const i=t=="right"?-r:r,o=n.posAtCoords({left:e.clientX+i,top:e.clientY});if(!o)return-1;const{pos:s}=o,a=Za(n.state.doc.resolve(s));if(!a)return-1;if(t=="right")return a.pos;const c=nt.get(a.node(-1)),f=a.start(-1),p=c.map.indexOf(a.pos-f);return p%c.width==0?-1:f+c.map[p-1]}function nw(n,e,t){const r=e.clientX-n.startX;return Math.max(t,n.startWidth+r)}function SC(n,e){n.dispatch(n.state.tr.setMeta(An,{setHandle:e}))}function Pz(n,e,t){const r=n.state.doc.resolve(e),i=r.node(-1),o=nt.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,c=n.state.tr;for(let f=0;f<o.height;f++){const p=f*o.width+a;if(f&&o.map[p]==o.map[p-o.width])continue;const m=o.map[p],S=i.nodeAt(m).attrs,C=S.colspan==1?0:a-o.colCount(m);if(S.colwidth&&S.colwidth[C]==t)continue;const E=S.colwidth?S.colwidth.slice():_z(S.colspan);E[C]=t,c.setNodeMarkup(s+m,null,{...S,colwidth:E})}c.docChanged&&n.dispatch(c)}function rw(n,e,t,r){const i=n.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),a=nt.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let c=n.domAtPos(i.start(-1)).node;for(;c&&c.nodeName!="TABLE";)c=c.parentNode;c&&sy(o,c.firstChild,c,r,a,t)}function _z(n){return Array(n).fill(0)}function Nz(n,e){var t;const r=[],i=n.doc.resolve(e),o=i.node(-1);if(!o)return Qe.empty;const s=nt.get(o),a=i.start(-1),c=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let f=0;f<s.height;f++){const p=c+f*s.width;if((c==s.width-1||s.map[p]!=s.map[p+1])&&(f==0||s.map[p]!=s.map[p-s.width])){const m=s.map[p],S=a+m+o.nodeAt(m).nodeSize-1,C=document.createElement("div");C.className="column-resize-handle",(t=An.getState(n))!=null&&t.dragging&&r.push($t.node(a+m,a+m+o.nodeAt(m).nodeSize,{class:"column-resize-dragging"})),r.push($t.widget(S,C))}}return Qe.create(n.doc,r)}function Fz({allowTableNodeSelection:n=!1}={}){return new ol({key:Lo,state:{init(){return null},apply(e,t){const r=e.getMeta(Lo);if(r!=null)return r==-1?null:r;if(t==null||!e.docChanged)return t;const{deleted:i,pos:o}=e.mapping.mapResult(t);return i?null:o}},props:{decorations:G$,handleDOMEvents:{mousedown:Cz},createSelectionBetween(e){return Lo.getState(e.state)!=null?e.state.selection:null},handleTripleClick:xz,handleKeyDown:wz,handlePaste:kz},appendTransaction(e,t,r){return K$(r,mC(r,t),n)}})}var ul={},Ls={};/**
21
21
  * @license React
22
22
  * react-dom-server-legacy.browser.production.min.js
23
23
  *
@@ -25,13 +25,13 @@
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */var YS;function dz(){if(YS)return Ls;YS=1;var n=_u;function e(y){for(var x="https://reactjs.org/docs/error-decoder.html?invariant="+y,A=1;A<arguments.length;A++)x+="&args[]="+encodeURIComponent(arguments[A]);return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=Object.prototype.hasOwnProperty,r=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,i={},o={};function s(y){return t.call(o,y)?!0:t.call(i,y)?!1:r.test(y)?o[y]=!0:(i[y]=!0,!1)}function a(y,x,A,I,B,N,z){this.acceptsBooleans=x===2||x===3||x===4,this.attributeName=I,this.attributeNamespace=B,this.mustUseProperty=A,this.propertyName=y,this.type=x,this.sanitizeURL=N,this.removeEmptyString=z}var c={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(y){c[y]=new a(y,0,!1,y,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(y){var x=y[0];c[x]=new a(x,1,!1,y[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(y){c[y]=new a(y,2,!1,y.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(y){c[y]=new a(y,2,!1,y,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(y){c[y]=new a(y,3,!1,y.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(y){c[y]=new a(y,3,!0,y,null,!1,!1)}),["capture","download"].forEach(function(y){c[y]=new a(y,4,!1,y,null,!1,!1)}),["cols","rows","size","span"].forEach(function(y){c[y]=new a(y,6,!1,y,null,!1,!1)}),["rowSpan","start"].forEach(function(y){c[y]=new a(y,5,!1,y.toLowerCase(),null,!1,!1)});var f=/[\-:]([a-z])/g;function p(y){return y[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(y){var x=y.replace(f,p);c[x]=new a(x,1,!1,y,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(y){var x=y.replace(f,p);c[x]=new a(x,1,!1,y,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(y){var x=y.replace(f,p);c[x]=new a(x,1,!1,y,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(y){c[y]=new a(y,1,!1,y.toLowerCase(),null,!1,!1)}),c.xlinkHref=new a("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(y){c[y]=new a(y,1,!1,y.toLowerCase(),null,!0,!0)});var m={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},S=["Webkit","ms","Moz","O"];Object.keys(m).forEach(function(y){S.forEach(function(x){x=x+y.charAt(0).toUpperCase()+y.substring(1),m[x]=m[y]})});var C=/["'&<>]/;function E(y){if(typeof y=="boolean"||typeof y=="number")return""+y;y=""+y;var x=C.exec(y);if(x){var A="",I,B=0;for(I=x.index;I<y.length;I++){switch(y.charCodeAt(I)){case 34:x="&quot;";break;case 38:x="&amp;";break;case 39:x="&#x27;";break;case 60:x="&lt;";break;case 62:x="&gt;";break;default:continue}B!==I&&(A+=y.substring(B,I)),B=I+1,A+=x}y=B!==I?A+y.substring(B,I):A}return y}var P=/([A-Z])/g,D=/^ms-/,_=Array.isArray;function J(y,x){return{insertionMode:y,selectedValue:x}}function ie(y,x,A){switch(x){case"select":return J(1,A.value!=null?A.value:A.defaultValue);case"svg":return J(2,null);case"math":return J(3,null);case"foreignObject":return J(1,null);case"table":return J(4,null);case"thead":case"tbody":case"tfoot":return J(5,null);case"colgroup":return J(7,null);case"tr":return J(6,null)}return 4<=y.insertionMode||y.insertionMode===0?J(1,null):y}var oe=new Map;function te(y,x,A){if(typeof A!="object")throw Error(e(62));x=!0;for(var I in A)if(t.call(A,I)){var B=A[I];if(B!=null&&typeof B!="boolean"&&B!==""){if(I.indexOf("--")===0){var N=E(I);B=E((""+B).trim())}else{N=I;var z=oe.get(N);z!==void 0||(z=E(N.replace(P,"-$1").toLowerCase().replace(D,"-ms-")),oe.set(N,z)),N=z,B=typeof B=="number"?B===0||t.call(m,I)?""+B:B+"px":E((""+B).trim())}x?(x=!1,y.push(' style="',N,":",B)):y.push(";",N,":",B)}}x||y.push('"')}function G(y,x,A,I){switch(A){case"style":te(y,x,I);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<A.length)||A[0]!=="o"&&A[0]!=="O"||A[1]!=="n"&&A[1]!=="N"){if(x=c.hasOwnProperty(A)?c[A]:null,x!==null){switch(typeof I){case"function":case"symbol":return;case"boolean":if(!x.acceptsBooleans)return}switch(A=x.attributeName,x.type){case 3:I&&y.push(" ",A,'=""');break;case 4:I===!0?y.push(" ",A,'=""'):I!==!1&&y.push(" ",A,'="',E(I),'"');break;case 5:isNaN(I)||y.push(" ",A,'="',E(I),'"');break;case 6:!isNaN(I)&&1<=I&&y.push(" ",A,'="',E(I),'"');break;default:x.sanitizeURL&&(I=""+I),y.push(" ",A,'="',E(I),'"')}}else if(s(A)){switch(typeof I){case"function":case"symbol":return;case"boolean":if(x=A.toLowerCase().slice(0,5),x!=="data-"&&x!=="aria-")return}y.push(" ",A,'="',E(I),'"')}}}function ne(y,x,A){if(x!=null){if(A!=null)throw Error(e(60));if(typeof x!="object"||!("__html"in x))throw Error(e(61));x=x.__html,x!=null&&y.push(""+x)}}function ae(y){var x="";return n.Children.forEach(y,function(A){A!=null&&(x+=A)}),x}function Q(y,x,A,I){y.push(X(A));var B=A=null,N;for(N in x)if(t.call(x,N)){var z=x[N];if(z!=null)switch(N){case"children":A=z;break;case"dangerouslySetInnerHTML":B=z;break;default:G(y,I,N,z)}}return y.push(">"),ne(y,B,A),typeof A=="string"?(y.push(E(A)),null):A}var Ee=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,re=new Map;function X(y){var x=re.get(y);if(x===void 0){if(!Ee.test(y))throw Error(e(65,y));x="<"+y,re.set(y,x)}return x}function fe(y,x,A,I,B){switch(x){case"select":y.push(X("select"));var N=null,z=null;for(le in A)if(t.call(A,le)){var Y=A[le];if(Y!=null)switch(le){case"children":N=Y;break;case"dangerouslySetInnerHTML":z=Y;break;case"defaultValue":case"value":break;default:G(y,I,le,Y)}}return y.push(">"),ne(y,z,N),N;case"option":z=B.selectedValue,y.push(X("option"));var se=Y=null,ce=null,le=null;for(N in A)if(t.call(A,N)){var Te=A[N];if(Te!=null)switch(N){case"children":Y=Te;break;case"selected":ce=Te;break;case"dangerouslySetInnerHTML":le=Te;break;case"value":se=Te;default:G(y,I,N,Te)}}if(z!=null)if(A=se!==null?""+se:ae(Y),_(z)){for(I=0;I<z.length;I++)if(""+z[I]===A){y.push(' selected=""');break}}else""+z===A&&y.push(' selected=""');else ce&&y.push(' selected=""');return y.push(">"),ne(y,le,Y),Y;case"textarea":y.push(X("textarea")),le=z=N=null;for(Y in A)if(t.call(A,Y)&&(se=A[Y],se!=null))switch(Y){case"children":le=se;break;case"value":N=se;break;case"defaultValue":z=se;break;case"dangerouslySetInnerHTML":throw Error(e(91));default:G(y,I,Y,se)}if(N===null&&z!==null&&(N=z),y.push(">"),le!=null){if(N!=null)throw Error(e(92));if(_(le)&&1<le.length)throw Error(e(93));N=""+le}return typeof N=="string"&&N[0]===`
28
+ */var iw;function Lz(){if(iw)return Ls;iw=1;var n=rl;function e(y){for(var x="https://reactjs.org/docs/error-decoder.html?invariant="+y,A=1;A<arguments.length;A++)x+="&args[]="+encodeURIComponent(arguments[A]);return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=Object.prototype.hasOwnProperty,r=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,i={},o={};function s(y){return t.call(o,y)?!0:t.call(i,y)?!1:r.test(y)?o[y]=!0:(i[y]=!0,!1)}function a(y,x,A,I,B,N,z){this.acceptsBooleans=x===2||x===3||x===4,this.attributeName=I,this.attributeNamespace=B,this.mustUseProperty=A,this.propertyName=y,this.type=x,this.sanitizeURL=N,this.removeEmptyString=z}var c={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(y){c[y]=new a(y,0,!1,y,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(y){var x=y[0];c[x]=new a(x,1,!1,y[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(y){c[y]=new a(y,2,!1,y.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(y){c[y]=new a(y,2,!1,y,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(y){c[y]=new a(y,3,!1,y.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(y){c[y]=new a(y,3,!0,y,null,!1,!1)}),["capture","download"].forEach(function(y){c[y]=new a(y,4,!1,y,null,!1,!1)}),["cols","rows","size","span"].forEach(function(y){c[y]=new a(y,6,!1,y,null,!1,!1)}),["rowSpan","start"].forEach(function(y){c[y]=new a(y,5,!1,y.toLowerCase(),null,!1,!1)});var f=/[\-:]([a-z])/g;function p(y){return y[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(y){var x=y.replace(f,p);c[x]=new a(x,1,!1,y,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(y){var x=y.replace(f,p);c[x]=new a(x,1,!1,y,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(y){var x=y.replace(f,p);c[x]=new a(x,1,!1,y,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(y){c[y]=new a(y,1,!1,y.toLowerCase(),null,!1,!1)}),c.xlinkHref=new a("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(y){c[y]=new a(y,1,!1,y.toLowerCase(),null,!0,!0)});var m={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},S=["Webkit","ms","Moz","O"];Object.keys(m).forEach(function(y){S.forEach(function(x){x=x+y.charAt(0).toUpperCase()+y.substring(1),m[x]=m[y]})});var C=/["'&<>]/;function E(y){if(typeof y=="boolean"||typeof y=="number")return""+y;y=""+y;var x=C.exec(y);if(x){var A="",I,B=0;for(I=x.index;I<y.length;I++){switch(y.charCodeAt(I)){case 34:x="&quot;";break;case 38:x="&amp;";break;case 39:x="&#x27;";break;case 60:x="&lt;";break;case 62:x="&gt;";break;default:continue}B!==I&&(A+=y.substring(B,I)),B=I+1,A+=x}y=B!==I?A+y.substring(B,I):A}return y}var P=/([A-Z])/g,D=/^ms-/,_=Array.isArray;function J(y,x){return{insertionMode:y,selectedValue:x}}function ie(y,x,A){switch(x){case"select":return J(1,A.value!=null?A.value:A.defaultValue);case"svg":return J(2,null);case"math":return J(3,null);case"foreignObject":return J(1,null);case"table":return J(4,null);case"thead":case"tbody":case"tfoot":return J(5,null);case"colgroup":return J(7,null);case"tr":return J(6,null)}return 4<=y.insertionMode||y.insertionMode===0?J(1,null):y}var oe=new Map;function te(y,x,A){if(typeof A!="object")throw Error(e(62));x=!0;for(var I in A)if(t.call(A,I)){var B=A[I];if(B!=null&&typeof B!="boolean"&&B!==""){if(I.indexOf("--")===0){var N=E(I);B=E((""+B).trim())}else{N=I;var z=oe.get(N);z!==void 0||(z=E(N.replace(P,"-$1").toLowerCase().replace(D,"-ms-")),oe.set(N,z)),N=z,B=typeof B=="number"?B===0||t.call(m,I)?""+B:B+"px":E((""+B).trim())}x?(x=!1,y.push(' style="',N,":",B)):y.push(";",N,":",B)}}x||y.push('"')}function G(y,x,A,I){switch(A){case"style":te(y,x,I);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<A.length)||A[0]!=="o"&&A[0]!=="O"||A[1]!=="n"&&A[1]!=="N"){if(x=c.hasOwnProperty(A)?c[A]:null,x!==null){switch(typeof I){case"function":case"symbol":return;case"boolean":if(!x.acceptsBooleans)return}switch(A=x.attributeName,x.type){case 3:I&&y.push(" ",A,'=""');break;case 4:I===!0?y.push(" ",A,'=""'):I!==!1&&y.push(" ",A,'="',E(I),'"');break;case 5:isNaN(I)||y.push(" ",A,'="',E(I),'"');break;case 6:!isNaN(I)&&1<=I&&y.push(" ",A,'="',E(I),'"');break;default:x.sanitizeURL&&(I=""+I),y.push(" ",A,'="',E(I),'"')}}else if(s(A)){switch(typeof I){case"function":case"symbol":return;case"boolean":if(x=A.toLowerCase().slice(0,5),x!=="data-"&&x!=="aria-")return}y.push(" ",A,'="',E(I),'"')}}}function ne(y,x,A){if(x!=null){if(A!=null)throw Error(e(60));if(typeof x!="object"||!("__html"in x))throw Error(e(61));x=x.__html,x!=null&&y.push(""+x)}}function ae(y){var x="";return n.Children.forEach(y,function(A){A!=null&&(x+=A)}),x}function Q(y,x,A,I){y.push(X(A));var B=A=null,N;for(N in x)if(t.call(x,N)){var z=x[N];if(z!=null)switch(N){case"children":A=z;break;case"dangerouslySetInnerHTML":B=z;break;default:G(y,I,N,z)}}return y.push(">"),ne(y,B,A),typeof A=="string"?(y.push(E(A)),null):A}var Ee=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,re=new Map;function X(y){var x=re.get(y);if(x===void 0){if(!Ee.test(y))throw Error(e(65,y));x="<"+y,re.set(y,x)}return x}function fe(y,x,A,I,B){switch(x){case"select":y.push(X("select"));var N=null,z=null;for(le in A)if(t.call(A,le)){var Y=A[le];if(Y!=null)switch(le){case"children":N=Y;break;case"dangerouslySetInnerHTML":z=Y;break;case"defaultValue":case"value":break;default:G(y,I,le,Y)}}return y.push(">"),ne(y,z,N),N;case"option":z=B.selectedValue,y.push(X("option"));var se=Y=null,ce=null,le=null;for(N in A)if(t.call(A,N)){var Te=A[N];if(Te!=null)switch(N){case"children":Y=Te;break;case"selected":ce=Te;break;case"dangerouslySetInnerHTML":le=Te;break;case"value":se=Te;default:G(y,I,N,Te)}}if(z!=null)if(A=se!==null?""+se:ae(Y),_(z)){for(I=0;I<z.length;I++)if(""+z[I]===A){y.push(' selected=""');break}}else""+z===A&&y.push(' selected=""');else ce&&y.push(' selected=""');return y.push(">"),ne(y,le,Y),Y;case"textarea":y.push(X("textarea")),le=z=N=null;for(Y in A)if(t.call(A,Y)&&(se=A[Y],se!=null))switch(Y){case"children":le=se;break;case"value":N=se;break;case"defaultValue":z=se;break;case"dangerouslySetInnerHTML":throw Error(e(91));default:G(y,I,Y,se)}if(N===null&&z!==null&&(N=z),y.push(">"),le!=null){if(N!=null)throw Error(e(92));if(_(le)&&1<le.length)throw Error(e(93));N=""+le}return typeof N=="string"&&N[0]===`
29
29
  `&&y.push(`
30
30
  `),N!==null&&y.push(E(""+N)),null;case"input":y.push(X("input")),se=le=Y=N=null;for(z in A)if(t.call(A,z)&&(ce=A[z],ce!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,"input"));case"defaultChecked":se=ce;break;case"defaultValue":Y=ce;break;case"checked":le=ce;break;case"value":N=ce;break;default:G(y,I,z,ce)}return le!==null?G(y,I,"checked",le):se!==null&&G(y,I,"checked",se),N!==null?G(y,I,"value",N):Y!==null&&G(y,I,"value",Y),y.push("/>"),null;case"menuitem":y.push(X("menuitem"));for(var pt in A)if(t.call(A,pt)&&(N=A[pt],N!=null))switch(pt){case"children":case"dangerouslySetInnerHTML":throw Error(e(400));default:G(y,I,pt,N)}return y.push(">"),null;case"title":y.push(X("title")),N=null;for(Te in A)if(t.call(A,Te)&&(z=A[Te],z!=null))switch(Te){case"children":N=z;break;case"dangerouslySetInnerHTML":throw Error(e(434));default:G(y,I,Te,z)}return y.push(">"),N;case"listing":case"pre":y.push(X(x)),z=N=null;for(se in A)if(t.call(A,se)&&(Y=A[se],Y!=null))switch(se){case"children":N=Y;break;case"dangerouslySetInnerHTML":z=Y;break;default:G(y,I,se,Y)}if(y.push(">"),z!=null){if(N!=null)throw Error(e(60));if(typeof z!="object"||!("__html"in z))throw Error(e(61));A=z.__html,A!=null&&(typeof A=="string"&&0<A.length&&A[0]===`
31
31
  `?y.push(`
32
32
  `,A):y.push(""+A))}return typeof N=="string"&&N[0]===`
33
33
  `&&y.push(`
34
- `),N;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":y.push(X(x));for(var gt in A)if(t.call(A,gt)&&(N=A[gt],N!=null))switch(gt){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,x));default:G(y,I,gt,N)}return y.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return Q(y,A,x,I);case"html":return B.insertionMode===0&&y.push("<!DOCTYPE html>"),Q(y,A,x,I);default:if(x.indexOf("-")===-1&&typeof A.is!="string")return Q(y,A,x,I);y.push(X(x)),z=N=null;for(ce in A)if(t.call(A,ce)&&(Y=A[ce],Y!=null))switch(ce){case"children":N=Y;break;case"dangerouslySetInnerHTML":z=Y;break;case"style":te(y,I,Y);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:s(ce)&&typeof Y!="function"&&typeof Y!="symbol"&&y.push(" ",ce,'="',E(Y),'"')}return y.push(">"),ne(y,z,N),N}}function V(y,x,A){if(y.push('<!--$?--><template id="'),A===null)throw Error(e(395));return y.push(A),y.push('"></template>')}function De(y,x,A,I){switch(A.insertionMode){case 0:case 1:return y.push('<div hidden id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 2:return y.push('<svg aria-hidden="true" style="display:none" id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 3:return y.push('<math aria-hidden="true" style="display:none" id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 4:return y.push('<table hidden id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 5:return y.push('<table hidden><tbody id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 6:return y.push('<table hidden><tr id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 7:return y.push('<table hidden><colgroup id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');default:throw Error(e(397))}}function ye(y,x){switch(x.insertionMode){case 0:case 1:return y.push("</div>");case 2:return y.push("</svg>");case 3:return y.push("</math>");case 4:return y.push("</table>");case 5:return y.push("</tbody></table>");case 6:return y.push("</tr></table>");case 7:return y.push("</colgroup></table>");default:throw Error(e(397))}}var xe=/[<\u2028\u2029]/g;function Ie(y){return JSON.stringify(y).replace(xe,function(x){switch(x){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function be(y,x){return x=x===void 0?"":x,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:x+"P:",segmentPrefix:x+"S:",boundaryPrefix:x+"B:",idPrefix:x,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:y}}function lt(y,x,A,I){return A.generateStaticMarkup?(y.push(E(x)),!1):(x===""?y=I:(I&&y.push("<!-- -->"),y.push(E(x)),y=!0),y)}var pe=Object.assign,Me=Symbol.for("react.element"),it=Symbol.for("react.portal"),_t=Symbol.for("react.fragment"),Fe=Symbol.for("react.strict_mode"),je=Symbol.for("react.profiler"),Qn=Symbol.for("react.provider"),qn=Symbol.for("react.context"),kt=Symbol.for("react.forward_ref"),bn=Symbol.for("react.suspense"),at=Symbol.for("react.suspense_list"),Sr=Symbol.for("react.memo"),qe=Symbol.for("react.lazy"),ct=Symbol.for("react.scope"),wr=Symbol.for("react.debug_trace_mode"),er=Symbol.for("react.legacy_hidden"),Vi=Symbol.for("react.default_value"),Ht=Symbol.iterator;function tr(y){if(y==null)return null;if(typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case _t:return"Fragment";case it:return"Portal";case je:return"Profiler";case Fe:return"StrictMode";case bn:return"Suspense";case at:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case qn:return(y.displayName||"Context")+".Consumer";case Qn:return(y._context.displayName||"Context")+".Provider";case kt:var x=y.render;return y=y.displayName,y||(y=x.displayName||x.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case Sr:return x=y.displayName||null,x!==null?x:tr(y.type)||"Memo";case qe:x=y._payload,y=y._init;try{return tr(y(x))}catch{}}return null}var nr={};function Gi(y,x){if(y=y.contextTypes,!y)return nr;var A={},I;for(I in y)A[I]=x[I];return A}var Vt=null;function ot(y,x){if(y!==x){y.context._currentValue2=y.parentValue,y=y.parent;var A=x.parent;if(y===null){if(A!==null)throw Error(e(401))}else{if(A===null)throw Error(e(401));ot(y,A)}x.context._currentValue2=x.value}}function Xe(y){y.context._currentValue2=y.parentValue,y=y.parent,y!==null&&Xe(y)}function ti(y){var x=y.parent;x!==null&&ti(x),y.context._currentValue2=y.value}function ni(y,x){if(y.context._currentValue2=y.parentValue,y=y.parent,y===null)throw Error(e(402));y.depth===x.depth?ot(y,x):ni(y,x)}function ri(y,x){var A=x.parent;if(A===null)throw Error(e(402));y.depth===A.depth?ot(y,A):ri(y,A),x.context._currentValue2=x.value}function Je(y){var x=Vt;x!==y&&(x===null?ti(y):y===null?Xe(x):x.depth===y.depth?ot(x,y):x.depth>y.depth?ni(x,y):ri(x,y),Vt=y)}var ii={isMounted:function(){return!1},enqueueSetState:function(y,x){y=y._reactInternals,y.queue!==null&&y.queue.push(x)},enqueueReplaceState:function(y,x){y=y._reactInternals,y.replace=!0,y.queue=[x]},enqueueForceUpdate:function(){}};function Ji(y,x,A,I){var B=y.state!==void 0?y.state:null;y.updater=ii,y.props=A,y.state=B;var N={queue:[],replace:!1};y._reactInternals=N;var z=x.contextType;if(y.context=typeof z=="object"&&z!==null?z._currentValue2:I,z=x.getDerivedStateFromProps,typeof z=="function"&&(z=z(A,B),B=z==null?B:pe({},B,z),y.state=B),typeof x.getDerivedStateFromProps!="function"&&typeof y.getSnapshotBeforeUpdate!="function"&&(typeof y.UNSAFE_componentWillMount=="function"||typeof y.componentWillMount=="function"))if(x=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),x!==y.state&&ii.enqueueReplaceState(y,y.state,null),N.queue!==null&&0<N.queue.length)if(x=N.queue,z=N.replace,N.queue=null,N.replace=!1,z&&x.length===1)y.state=x[0];else{for(N=z?x[0]:y.state,B=!0,z=z?1:0;z<x.length;z++){var Y=x[z];Y=typeof Y=="function"?Y.call(y,N,A,I):Y,Y!=null&&(B?(B=!1,N=pe({},N,Y)):pe(N,Y))}y.state=N}else N.queue=null}var Yi={id:1,overflow:""};function oi(y,x,A){var I=y.id;y=y.overflow;var B=32-xr(I)-1;I&=~(1<<B),A+=1;var N=32-xr(x)+B;if(30<N){var z=B-B%5;return N=(I&(1<<z)-1).toString(32),I>>=z,B-=z,{id:1<<32-xr(x)+B|A<<B|I,overflow:N+y}}return{id:1<<N|A<<B|I,overflow:y}}var xr=Math.clz32?Math.clz32:In,ts=Math.log,si=Math.LN2;function In(y){return y>>>=0,y===0?32:31-(ts(y)/si|0)|0}function li(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var Ki=typeof Object.is=="function"?Object.is:li,ft=null,on=null,Mn=null,Oe=null,Dn=!1,kr=!1,rr=0,sn=null,Cr=0;function Sn(){if(ft===null)throw Error(e(321));return ft}function et(){if(0<Cr)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function ai(){return Oe===null?Mn===null?(Dn=!1,Mn=Oe=et()):(Dn=!0,Oe=Mn):Oe.next===null?(Dn=!1,Oe=Oe.next=et()):(Dn=!0,Oe=Oe.next),Oe}function ci(){on=ft=null,kr=!1,Mn=null,Cr=0,Oe=sn=null}function Xi(y,x){return typeof x=="function"?x(y):x}function Ye(y,x,A){if(ft=Sn(),Oe=ai(),Dn){var I=Oe.queue;if(x=I.dispatch,sn!==null&&(A=sn.get(I),A!==void 0)){sn.delete(I),I=Oe.memoizedState;do I=y(I,A.action),A=A.next;while(A!==null);return Oe.memoizedState=I,[I,x]}return[Oe.memoizedState,x]}return y=y===Xi?typeof x=="function"?x():x:A!==void 0?A(x):x,Oe.memoizedState=y,y=Oe.queue={last:null,dispatch:null},y=y.dispatch=ns.bind(null,ft,y),[Oe.memoizedState,y]}function ui(y,x){if(ft=Sn(),Oe=ai(),x=x===void 0?null:x,Oe!==null){var A=Oe.memoizedState;if(A!==null&&x!==null){var I=A[1];e:if(I===null)I=!1;else{for(var B=0;B<I.length&&B<x.length;B++)if(!Ki(x[B],I[B])){I=!1;break e}I=!0}if(I)return A[0]}}return y=y(),Oe.memoizedState=[y,x],y}function ns(y,x,A){if(25<=Cr)throw Error(e(301));if(y===ft)if(kr=!0,y={action:A,next:null},sn===null&&(sn=new Map),A=sn.get(x),A===void 0)sn.set(x,y);else{for(x=A;x.next!==null;)x=x.next;x.next=y}}function rs(){throw Error(e(394))}function ln(){}var fi={readContext:function(y){return y._currentValue2},useContext:function(y){return Sn(),y._currentValue2},useMemo:ui,useReducer:Ye,useRef:function(y){ft=Sn(),Oe=ai();var x=Oe.memoizedState;return x===null?(y={current:y},Oe.memoizedState=y):x},useState:function(y){return Ye(Xi,y)},useInsertionEffect:ln,useLayoutEffect:function(){},useCallback:function(y,x){return ui(function(){return y},x)},useImperativeHandle:ln,useEffect:ln,useDebugValue:ln,useDeferredValue:function(y){return Sn(),y},useTransition:function(){return Sn(),[!1,rs]},useId:function(){var y=on.treeContext,x=y.overflow;y=y.id,y=(y&~(1<<32-xr(y)-1)).toString(32)+x;var A=Er;if(A===null)throw Error(e(404));return x=rr++,y=":"+A.idPrefix+"R"+y,0<x&&(y+="H"+x.toString(32)),y+":"},useMutableSource:function(y,x){return Sn(),x(y._source)},useSyncExternalStore:function(y,x,A){if(A===void 0)throw Error(e(407));return A()}},Er=null,Pn=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Ct(y){return console.error(y),null}function an(){}function Tr(y,x,A,I,B,N,z,Y,se){var ce=[],le=new Set;return x={destination:null,responseState:x,progressiveChunkSize:I===void 0?12800:I,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:le,pingedTasks:ce,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:B===void 0?Ct:B,onAllReady:an,onShellReady:z===void 0?an:z,onShellError:an,onFatalError:an},A=Nn(x,0,null,A,!1,!1),A.parentFlushed=!0,y=_n(x,y,null,A,le,nr,null,Yi),ce.push(y),x}function _n(y,x,A,I,B,N,z,Y){y.allPendingTasks++,A===null?y.pendingRootTasks++:A.pendingTasks++;var se={node:x,ping:function(){var ce=y.pingedTasks;ce.push(se),ce.length===1&&dt(y)},blockedBoundary:A,blockedSegment:I,abortSet:B,legacyContext:N,context:z,treeContext:Y};return B.add(se),se}function Nn(y,x,A,I,B,N){return{status:0,id:-1,index:x,parentFlushed:!1,chunks:[],children:[],formatContext:I,boundary:A,lastPushedText:B,textEmbedded:N}}function cn(y,x){if(y=y.onError(x),y!=null&&typeof y!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof y+'" instead');return y}function Fn(y,x){var A=y.onShellError;A(x),A=y.onFatalError,A(x),y.destination!==null?(y.status=2,y.destination.destroy(x)):(y.status=1,y.fatalError=x)}function Et(y,x,A,I,B){for(ft={},on=x,rr=0,y=A(I,B);kr;)kr=!1,rr=0,Cr+=1,Oe=null,y=A(I,B);return ci(),y}function Zi(y,x,A,I){var B=A.render(),N=I.childContextTypes;if(N!=null){var z=x.legacyContext;if(typeof A.getChildContext!="function")I=z;else{A=A.getChildContext();for(var Y in A)if(!(Y in N))throw Error(e(108,tr(I)||"Unknown",Y));I=pe({},z,A)}x.legacyContext=I,Ke(y,x,B),x.legacyContext=z}else Ke(y,x,B)}function Qi(y,x){if(y&&y.defaultProps){x=pe({},x),y=y.defaultProps;for(var A in y)x[A]===void 0&&(x[A]=y[A]);return x}return x}function wn(y,x,A,I,B){if(typeof A=="function")if(A.prototype&&A.prototype.isReactComponent){B=Gi(A,x.legacyContext);var N=A.contextType;N=new A(I,typeof N=="object"&&N!==null?N._currentValue2:B),Ji(N,A,I,B),Zi(y,x,N,A)}else{N=Gi(A,x.legacyContext),B=Et(y,x,A,I,N);var z=rr!==0;if(typeof B=="object"&&B!==null&&typeof B.render=="function"&&B.$$typeof===void 0)Ji(B,A,I,N),Zi(y,x,B,A);else if(z){I=x.treeContext,x.treeContext=oi(I,1,0);try{Ke(y,x,B)}finally{x.treeContext=I}}else Ke(y,x,B)}else if(typeof A=="string"){switch(B=x.blockedSegment,N=fe(B.chunks,A,I,y.responseState,B.formatContext),B.lastPushedText=!1,z=B.formatContext,B.formatContext=ie(z,A,I),fn(y,x,N),B.formatContext=z,A){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:B.chunks.push("</",A,">")}B.lastPushedText=!1}else{switch(A){case er:case wr:case Fe:case je:case _t:Ke(y,x,I.children);return;case at:Ke(y,x,I.children);return;case ct:throw Error(e(343));case bn:e:{A=x.blockedBoundary,B=x.blockedSegment,N=I.fallback,I=I.children,z=new Set;var Y={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:z,errorDigest:null},se=Nn(y,B.chunks.length,Y,B.formatContext,!1,!1);B.children.push(se),B.lastPushedText=!1;var ce=Nn(y,0,null,B.formatContext,!1,!1);ce.parentFlushed=!0,x.blockedBoundary=Y,x.blockedSegment=ce;try{if(fn(y,x,I),y.responseState.generateStaticMarkup||ce.lastPushedText&&ce.textEmbedded&&ce.chunks.push("<!-- -->"),ce.status=1,Gt(Y,ce),Y.pendingTasks===0)break e}catch(le){ce.status=4,Y.forceClientRender=!0,Y.errorDigest=cn(y,le)}finally{x.blockedBoundary=A,x.blockedSegment=B}x=_n(y,N,A,se,z,x.legacyContext,x.context,x.treeContext),y.pingedTasks.push(x)}return}if(typeof A=="object"&&A!==null)switch(A.$$typeof){case kt:if(I=Et(y,x,A.render,I,B),rr!==0){A=x.treeContext,x.treeContext=oi(A,1,0);try{Ke(y,x,I)}finally{x.treeContext=A}}else Ke(y,x,I);return;case Sr:A=A.type,I=Qi(A,I),wn(y,x,A,I,B);return;case Qn:if(B=I.children,A=A._context,I=I.value,N=A._currentValue2,A._currentValue2=I,z=Vt,Vt=I={parent:z,depth:z===null?0:z.depth+1,context:A,parentValue:N,value:I},x.context=I,Ke(y,x,B),y=Vt,y===null)throw Error(e(403));I=y.parentValue,y.context._currentValue2=I===Vi?y.context._defaultValue:I,y=Vt=y.parent,x.context=y;return;case qn:I=I.children,I=I(A._currentValue2),Ke(y,x,I);return;case qe:B=A._init,A=B(A._payload),I=Qi(A,I),wn(y,x,A,I,void 0);return}throw Error(e(130,A==null?A:typeof A,""))}}function Ke(y,x,A){if(x.node=A,typeof A=="object"&&A!==null){switch(A.$$typeof){case Me:wn(y,x,A.type,A.props,A.ref);return;case it:throw Error(e(257));case qe:var I=A._init;A=I(A._payload),Ke(y,x,A);return}if(_(A)){un(y,x,A);return}if(A===null||typeof A!="object"?I=null:(I=Ht&&A[Ht]||A["@@iterator"],I=typeof I=="function"?I:null),I&&(I=I.call(A))){if(A=I.next(),!A.done){var B=[];do B.push(A.value),A=I.next();while(!A.done);un(y,x,B)}return}throw y=Object.prototype.toString.call(A),Error(e(31,y==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":y))}typeof A=="string"?(I=x.blockedSegment,I.lastPushedText=lt(x.blockedSegment.chunks,A,y.responseState,I.lastPushedText)):typeof A=="number"&&(I=x.blockedSegment,I.lastPushedText=lt(x.blockedSegment.chunks,""+A,y.responseState,I.lastPushedText))}function un(y,x,A){for(var I=A.length,B=0;B<I;B++){var N=x.treeContext;x.treeContext=oi(N,I,B);try{fn(y,x,A[B])}finally{x.treeContext=N}}}function fn(y,x,A){var I=x.blockedSegment.formatContext,B=x.legacyContext,N=x.context;try{return Ke(y,x,A)}catch(se){if(ci(),typeof se=="object"&&se!==null&&typeof se.then=="function"){A=se;var z=x.blockedSegment,Y=Nn(y,z.chunks.length,null,z.formatContext,z.lastPushedText,!0);z.children.push(Y),z.lastPushedText=!1,y=_n(y,x.node,x.blockedBoundary,Y,x.abortSet,x.legacyContext,x.context,x.treeContext).ping,A.then(y,y),x.blockedSegment.formatContext=I,x.legacyContext=B,x.context=N,Je(N)}else throw x.blockedSegment.formatContext=I,x.legacyContext=B,x.context=N,Je(N),se}}function Ln(y){var x=y.blockedBoundary;y=y.blockedSegment,y.status=3,dn(this,x,y)}function Rr(y,x,A){var I=y.blockedBoundary;y.blockedSegment.status=3,I===null?(x.allPendingTasks--,x.status!==2&&(x.status=2,x.destination!==null&&x.destination.push(null))):(I.pendingTasks--,I.forceClientRender||(I.forceClientRender=!0,y=A===void 0?Error(e(432)):A,I.errorDigest=x.onError(y),I.parentFlushed&&x.clientRenderedBoundaries.push(I)),I.fallbackAbortableTasks.forEach(function(B){return Rr(B,x,A)}),I.fallbackAbortableTasks.clear(),x.allPendingTasks--,x.allPendingTasks===0&&(I=x.onAllReady,I()))}function Gt(y,x){if(x.chunks.length===0&&x.children.length===1&&x.children[0].boundary===null){var A=x.children[0];A.id=x.id,A.parentFlushed=!0,A.status===1&&Gt(y,A)}else y.completedSegments.push(x)}function dn(y,x,A){if(x===null){if(A.parentFlushed){if(y.completedRootSegment!==null)throw Error(e(389));y.completedRootSegment=A}y.pendingRootTasks--,y.pendingRootTasks===0&&(y.onShellError=an,x=y.onShellReady,x())}else x.pendingTasks--,x.forceClientRender||(x.pendingTasks===0?(A.parentFlushed&&A.status===1&&Gt(x,A),x.parentFlushed&&y.completedBoundaries.push(x),x.fallbackAbortableTasks.forEach(Ln,y),x.fallbackAbortableTasks.clear()):A.parentFlushed&&A.status===1&&(Gt(x,A),x.completedSegments.length===1&&x.parentFlushed&&y.partialBoundaries.push(x)));y.allPendingTasks--,y.allPendingTasks===0&&(y=y.onAllReady,y())}function dt(y){if(y.status!==2){var x=Vt,A=Pn.current;Pn.current=fi;var I=Er;Er=y.responseState;try{var B=y.pingedTasks,N;for(N=0;N<B.length;N++){var z=B[N],Y=y,se=z.blockedSegment;if(se.status===0){Je(z.context);try{Ke(Y,z,z.node),Y.responseState.generateStaticMarkup||se.lastPushedText&&se.textEmbedded&&se.chunks.push("<!-- -->"),z.abortSet.delete(z),se.status=1,dn(Y,z.blockedBoundary,se)}catch(mt){if(ci(),typeof mt=="object"&&mt!==null&&typeof mt.then=="function"){var ce=z.ping;mt.then(ce,ce)}else{z.abortSet.delete(z),se.status=4;var le=z.blockedBoundary,Te=mt,pt=cn(Y,Te);if(le===null?Fn(Y,Te):(le.pendingTasks--,le.forceClientRender||(le.forceClientRender=!0,le.errorDigest=pt,le.parentFlushed&&Y.clientRenderedBoundaries.push(le))),Y.allPendingTasks--,Y.allPendingTasks===0){var gt=Y.onAllReady;gt()}}}finally{}}}B.splice(0,N),y.destination!==null&&ht(y,y.destination)}catch(mt){cn(y,mt),Fn(y,mt)}finally{Er=I,Pn.current=A,A===fi&&Je(x)}}}function Bn(y,x,A){switch(A.parentFlushed=!0,A.status){case 0:var I=A.id=y.nextSegmentId++;return A.lastPushedText=!1,A.textEmbedded=!1,y=y.responseState,x.push('<template id="'),x.push(y.placeholderPrefix),y=I.toString(16),x.push(y),x.push('"></template>');case 1:A.status=2;var B=!0;I=A.chunks;var N=0;A=A.children;for(var z=0;z<A.length;z++){for(B=A[z];N<B.index;N++)x.push(I[N]);B=ir(y,x,B)}for(;N<I.length-1;N++)x.push(I[N]);return N<I.length&&(B=x.push(I[N])),B;default:throw Error(e(390))}}function ir(y,x,A){var I=A.boundary;if(I===null)return Bn(y,x,A);if(I.parentFlushed=!0,I.forceClientRender)return y.responseState.generateStaticMarkup||(I=I.errorDigest,x.push("<!--$!-->"),x.push("<template"),I&&(x.push(' data-dgst="'),I=E(I),x.push(I),x.push('"')),x.push("></template>")),Bn(y,x,A),y=y.responseState.generateStaticMarkup?!0:x.push("<!--/$-->"),y;if(0<I.pendingTasks){I.rootSegmentID=y.nextSegmentId++,0<I.completedSegments.length&&y.partialBoundaries.push(I);var B=y.responseState,N=B.nextSuspenseID++;return B=B.boundaryPrefix+N.toString(16),I=I.id=B,V(x,y.responseState,I),Bn(y,x,A),x.push("<!--/$-->")}if(I.byteSize>y.progressiveChunkSize)return I.rootSegmentID=y.nextSegmentId++,y.completedBoundaries.push(I),V(x,y.responseState,I.id),Bn(y,x,A),x.push("<!--/$-->");if(y.responseState.generateStaticMarkup||x.push("<!--$-->"),A=I.completedSegments,A.length!==1)throw Error(e(391));return ir(y,x,A[0]),y=y.responseState.generateStaticMarkup?!0:x.push("<!--/$-->"),y}function Ar(y,x,A){return De(x,y.responseState,A.formatContext,A.id),ir(y,x,A),ye(x,A.formatContext)}function Nt(y,x,A){for(var I=A.completedSegments,B=0;B<I.length;B++)hn(y,x,A,I[B]);if(I.length=0,y=y.responseState,I=A.id,A=A.rootSegmentID,x.push(y.startInlineScript),y.sentCompleteBoundaryFunction?x.push('$RC("'):(y.sentCompleteBoundaryFunction=!0,x.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),I===null)throw Error(e(395));return A=A.toString(16),x.push(I),x.push('","'),x.push(y.segmentPrefix),x.push(A),x.push('")<\/script>')}function hn(y,x,A,I){if(I.status===2)return!0;var B=I.id;if(B===-1){if((I.id=A.rootSegmentID)===-1)throw Error(e(392));return Ar(y,x,I)}return Ar(y,x,I),y=y.responseState,x.push(y.startInlineScript),y.sentCompleteSegmentFunction?x.push('$RS("'):(y.sentCompleteSegmentFunction=!0,x.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),x.push(y.segmentPrefix),B=B.toString(16),x.push(B),x.push('","'),x.push(y.placeholderPrefix),x.push(B),x.push('")<\/script>')}function ht(y,x){try{var A=y.completedRootSegment;if(A!==null&&y.pendingRootTasks===0){ir(y,x,A),y.completedRootSegment=null;var I=y.responseState.bootstrapChunks;for(A=0;A<I.length-1;A++)x.push(I[A]);A<I.length&&x.push(I[A])}var B=y.clientRenderedBoundaries,N;for(N=0;N<B.length;N++){var z=B[N];I=x;var Y=y.responseState,se=z.id,ce=z.errorDigest,le=z.errorMessage,Te=z.errorComponentStack;if(I.push(Y.startInlineScript),Y.sentClientRenderFunction?I.push('$RX("'):(Y.sentClientRenderFunction=!0,I.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),se===null)throw Error(e(395));if(I.push(se),I.push('"'),ce||le||Te){I.push(",");var pt=Ie(ce||"");I.push(pt)}if(le||Te){I.push(",");var gt=Ie(le||"");I.push(gt)}if(Te){I.push(",");var mt=Ie(Te);I.push(mt)}if(!I.push(")<\/script>")){y.destination=null,N++,B.splice(0,N);return}}B.splice(0,N);var $n=y.completedBoundaries;for(N=0;N<$n.length;N++)if(!Nt(y,x,$n[N])){y.destination=null,N++,$n.splice(0,N);return}$n.splice(0,N);var pn=y.partialBoundaries;for(N=0;N<pn.length;N++){var Ir=pn[N];e:{B=y,z=x;var zn=Ir.completedSegments;for(Y=0;Y<zn.length;Y++)if(!hn(B,z,Ir,zn[Y])){Y++,zn.splice(0,Y);var or=!1;break e}zn.splice(0,Y),or=!0}if(!or){y.destination=null,N++,pn.splice(0,N);return}}pn.splice(0,N);var xn=y.completedBoundaries;for(N=0;N<xn.length;N++)if(!Nt(y,x,xn[N])){y.destination=null,N++,xn.splice(0,N);return}xn.splice(0,N)}finally{y.allPendingTasks===0&&y.pingedTasks.length===0&&y.clientRenderedBoundaries.length===0&&y.completedBoundaries.length===0&&x.push(null)}}function Or(y,x){try{var A=y.abortableTasks;A.forEach(function(I){return Rr(I,y,x)}),A.clear(),y.destination!==null&&ht(y,y.destination)}catch(I){cn(y,I),Fn(y,I)}}function rt(){}function Tt(y,x,A,I){var B=!1,N=null,z="",Y={push:function(ce){return ce!==null&&(z+=ce),!0},destroy:function(ce){B=!0,N=ce}},se=!1;if(y=Tr(y,be(A,x?x.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,rt,void 0,function(){se=!0}),dt(y),Or(y,I),y.status===1)y.status=2,Y.destroy(y.fatalError);else if(y.status!==2&&y.destination===null){y.destination=Y;try{ht(y,Y)}catch(ce){cn(y,ce),Fn(y,ce)}}if(B)throw N;if(!se)throw Error(e(426));return z}return Ls.renderToNodeStream=function(){throw Error(e(207))},Ls.renderToStaticMarkup=function(y,x){return Tt(y,x,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},Ls.renderToStaticNodeStream=function(){throw Error(e(208))},Ls.renderToString=function(y,x){return Tt(y,x,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},Ls.version="18.3.1",Ls}var Yf={};/**
34
+ `),N;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":y.push(X(x));for(var gt in A)if(t.call(A,gt)&&(N=A[gt],N!=null))switch(gt){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,x));default:G(y,I,gt,N)}return y.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return Q(y,A,x,I);case"html":return B.insertionMode===0&&y.push("<!DOCTYPE html>"),Q(y,A,x,I);default:if(x.indexOf("-")===-1&&typeof A.is!="string")return Q(y,A,x,I);y.push(X(x)),z=N=null;for(ce in A)if(t.call(A,ce)&&(Y=A[ce],Y!=null))switch(ce){case"children":N=Y;break;case"dangerouslySetInnerHTML":z=Y;break;case"style":te(y,I,Y);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:s(ce)&&typeof Y!="function"&&typeof Y!="symbol"&&y.push(" ",ce,'="',E(Y),'"')}return y.push(">"),ne(y,z,N),N}}function V(y,x,A){if(y.push('<!--$?--><template id="'),A===null)throw Error(e(395));return y.push(A),y.push('"></template>')}function De(y,x,A,I){switch(A.insertionMode){case 0:case 1:return y.push('<div hidden id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 2:return y.push('<svg aria-hidden="true" style="display:none" id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 3:return y.push('<math aria-hidden="true" style="display:none" id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 4:return y.push('<table hidden id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 5:return y.push('<table hidden><tbody id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 6:return y.push('<table hidden><tr id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');case 7:return y.push('<table hidden><colgroup id="'),y.push(x.segmentPrefix),x=I.toString(16),y.push(x),y.push('">');default:throw Error(e(397))}}function ye(y,x){switch(x.insertionMode){case 0:case 1:return y.push("</div>");case 2:return y.push("</svg>");case 3:return y.push("</math>");case 4:return y.push("</table>");case 5:return y.push("</tbody></table>");case 6:return y.push("</tr></table>");case 7:return y.push("</colgroup></table>");default:throw Error(e(397))}}var xe=/[<\u2028\u2029]/g;function Ie(y){return JSON.stringify(y).replace(xe,function(x){switch(x){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function be(y,x){return x=x===void 0?"":x,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:x+"P:",segmentPrefix:x+"S:",boundaryPrefix:x+"B:",idPrefix:x,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:y}}function lt(y,x,A,I){return A.generateStaticMarkup?(y.push(E(x)),!1):(x===""?y=I:(I&&y.push("<!-- -->"),y.push(E(x)),y=!0),y)}var pe=Object.assign,Me=Symbol.for("react.element"),it=Symbol.for("react.portal"),_t=Symbol.for("react.fragment"),Fe=Symbol.for("react.strict_mode"),je=Symbol.for("react.profiler"),Qn=Symbol.for("react.provider"),qn=Symbol.for("react.context"),kt=Symbol.for("react.forward_ref"),bn=Symbol.for("react.suspense"),at=Symbol.for("react.suspense_list"),Sr=Symbol.for("react.memo"),qe=Symbol.for("react.lazy"),ct=Symbol.for("react.scope"),wr=Symbol.for("react.debug_trace_mode"),er=Symbol.for("react.legacy_hidden"),Vi=Symbol.for("react.default_value"),Ht=Symbol.iterator;function tr(y){if(y==null)return null;if(typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case _t:return"Fragment";case it:return"Portal";case je:return"Profiler";case Fe:return"StrictMode";case bn:return"Suspense";case at:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case qn:return(y.displayName||"Context")+".Consumer";case Qn:return(y._context.displayName||"Context")+".Provider";case kt:var x=y.render;return y=y.displayName,y||(y=x.displayName||x.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case Sr:return x=y.displayName||null,x!==null?x:tr(y.type)||"Memo";case qe:x=y._payload,y=y._init;try{return tr(y(x))}catch{}}return null}var nr={};function Gi(y,x){if(y=y.contextTypes,!y)return nr;var A={},I;for(I in y)A[I]=x[I];return A}var Vt=null;function ot(y,x){if(y!==x){y.context._currentValue2=y.parentValue,y=y.parent;var A=x.parent;if(y===null){if(A!==null)throw Error(e(401))}else{if(A===null)throw Error(e(401));ot(y,A)}x.context._currentValue2=x.value}}function Xe(y){y.context._currentValue2=y.parentValue,y=y.parent,y!==null&&Xe(y)}function ti(y){var x=y.parent;x!==null&&ti(x),y.context._currentValue2=y.value}function ni(y,x){if(y.context._currentValue2=y.parentValue,y=y.parent,y===null)throw Error(e(402));y.depth===x.depth?ot(y,x):ni(y,x)}function ri(y,x){var A=x.parent;if(A===null)throw Error(e(402));y.depth===A.depth?ot(y,A):ri(y,A),x.context._currentValue2=x.value}function Je(y){var x=Vt;x!==y&&(x===null?ti(y):y===null?Xe(x):x.depth===y.depth?ot(x,y):x.depth>y.depth?ni(x,y):ri(x,y),Vt=y)}var ii={isMounted:function(){return!1},enqueueSetState:function(y,x){y=y._reactInternals,y.queue!==null&&y.queue.push(x)},enqueueReplaceState:function(y,x){y=y._reactInternals,y.replace=!0,y.queue=[x]},enqueueForceUpdate:function(){}};function Ji(y,x,A,I){var B=y.state!==void 0?y.state:null;y.updater=ii,y.props=A,y.state=B;var N={queue:[],replace:!1};y._reactInternals=N;var z=x.contextType;if(y.context=typeof z=="object"&&z!==null?z._currentValue2:I,z=x.getDerivedStateFromProps,typeof z=="function"&&(z=z(A,B),B=z==null?B:pe({},B,z),y.state=B),typeof x.getDerivedStateFromProps!="function"&&typeof y.getSnapshotBeforeUpdate!="function"&&(typeof y.UNSAFE_componentWillMount=="function"||typeof y.componentWillMount=="function"))if(x=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),x!==y.state&&ii.enqueueReplaceState(y,y.state,null),N.queue!==null&&0<N.queue.length)if(x=N.queue,z=N.replace,N.queue=null,N.replace=!1,z&&x.length===1)y.state=x[0];else{for(N=z?x[0]:y.state,B=!0,z=z?1:0;z<x.length;z++){var Y=x[z];Y=typeof Y=="function"?Y.call(y,N,A,I):Y,Y!=null&&(B?(B=!1,N=pe({},N,Y)):pe(N,Y))}y.state=N}else N.queue=null}var Yi={id:1,overflow:""};function oi(y,x,A){var I=y.id;y=y.overflow;var B=32-xr(I)-1;I&=~(1<<B),A+=1;var N=32-xr(x)+B;if(30<N){var z=B-B%5;return N=(I&(1<<z)-1).toString(32),I>>=z,B-=z,{id:1<<32-xr(x)+B|A<<B|I,overflow:N+y}}return{id:1<<N|A<<B|I,overflow:y}}var xr=Math.clz32?Math.clz32:In,ts=Math.log,si=Math.LN2;function In(y){return y>>>=0,y===0?32:31-(ts(y)/si|0)|0}function li(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var Ki=typeof Object.is=="function"?Object.is:li,ft=null,on=null,Mn=null,Oe=null,Dn=!1,kr=!1,rr=0,sn=null,Cr=0;function Sn(){if(ft===null)throw Error(e(321));return ft}function et(){if(0<Cr)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function ai(){return Oe===null?Mn===null?(Dn=!1,Mn=Oe=et()):(Dn=!0,Oe=Mn):Oe.next===null?(Dn=!1,Oe=Oe.next=et()):(Dn=!0,Oe=Oe.next),Oe}function ci(){on=ft=null,kr=!1,Mn=null,Cr=0,Oe=sn=null}function Xi(y,x){return typeof x=="function"?x(y):x}function Ye(y,x,A){if(ft=Sn(),Oe=ai(),Dn){var I=Oe.queue;if(x=I.dispatch,sn!==null&&(A=sn.get(I),A!==void 0)){sn.delete(I),I=Oe.memoizedState;do I=y(I,A.action),A=A.next;while(A!==null);return Oe.memoizedState=I,[I,x]}return[Oe.memoizedState,x]}return y=y===Xi?typeof x=="function"?x():x:A!==void 0?A(x):x,Oe.memoizedState=y,y=Oe.queue={last:null,dispatch:null},y=y.dispatch=ns.bind(null,ft,y),[Oe.memoizedState,y]}function ui(y,x){if(ft=Sn(),Oe=ai(),x=x===void 0?null:x,Oe!==null){var A=Oe.memoizedState;if(A!==null&&x!==null){var I=A[1];e:if(I===null)I=!1;else{for(var B=0;B<I.length&&B<x.length;B++)if(!Ki(x[B],I[B])){I=!1;break e}I=!0}if(I)return A[0]}}return y=y(),Oe.memoizedState=[y,x],y}function ns(y,x,A){if(25<=Cr)throw Error(e(301));if(y===ft)if(kr=!0,y={action:A,next:null},sn===null&&(sn=new Map),A=sn.get(x),A===void 0)sn.set(x,y);else{for(x=A;x.next!==null;)x=x.next;x.next=y}}function rs(){throw Error(e(394))}function ln(){}var fi={readContext:function(y){return y._currentValue2},useContext:function(y){return Sn(),y._currentValue2},useMemo:ui,useReducer:Ye,useRef:function(y){ft=Sn(),Oe=ai();var x=Oe.memoizedState;return x===null?(y={current:y},Oe.memoizedState=y):x},useState:function(y){return Ye(Xi,y)},useInsertionEffect:ln,useLayoutEffect:function(){},useCallback:function(y,x){return ui(function(){return y},x)},useImperativeHandle:ln,useEffect:ln,useDebugValue:ln,useDeferredValue:function(y){return Sn(),y},useTransition:function(){return Sn(),[!1,rs]},useId:function(){var y=on.treeContext,x=y.overflow;y=y.id,y=(y&~(1<<32-xr(y)-1)).toString(32)+x;var A=Er;if(A===null)throw Error(e(404));return x=rr++,y=":"+A.idPrefix+"R"+y,0<x&&(y+="H"+x.toString(32)),y+":"},useMutableSource:function(y,x){return Sn(),x(y._source)},useSyncExternalStore:function(y,x,A){if(A===void 0)throw Error(e(407));return A()}},Er=null,Pn=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Ct(y){return console.error(y),null}function an(){}function Tr(y,x,A,I,B,N,z,Y,se){var ce=[],le=new Set;return x={destination:null,responseState:x,progressiveChunkSize:I===void 0?12800:I,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:le,pingedTasks:ce,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:B===void 0?Ct:B,onAllReady:an,onShellReady:z===void 0?an:z,onShellError:an,onFatalError:an},A=Nn(x,0,null,A,!1,!1),A.parentFlushed=!0,y=_n(x,y,null,A,le,nr,null,Yi),ce.push(y),x}function _n(y,x,A,I,B,N,z,Y){y.allPendingTasks++,A===null?y.pendingRootTasks++:A.pendingTasks++;var se={node:x,ping:function(){var ce=y.pingedTasks;ce.push(se),ce.length===1&&dt(y)},blockedBoundary:A,blockedSegment:I,abortSet:B,legacyContext:N,context:z,treeContext:Y};return B.add(se),se}function Nn(y,x,A,I,B,N){return{status:0,id:-1,index:x,parentFlushed:!1,chunks:[],children:[],formatContext:I,boundary:A,lastPushedText:B,textEmbedded:N}}function cn(y,x){if(y=y.onError(x),y!=null&&typeof y!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof y+'" instead');return y}function Fn(y,x){var A=y.onShellError;A(x),A=y.onFatalError,A(x),y.destination!==null?(y.status=2,y.destination.destroy(x)):(y.status=1,y.fatalError=x)}function Et(y,x,A,I,B){for(ft={},on=x,rr=0,y=A(I,B);kr;)kr=!1,rr=0,Cr+=1,Oe=null,y=A(I,B);return ci(),y}function Zi(y,x,A,I){var B=A.render(),N=I.childContextTypes;if(N!=null){var z=x.legacyContext;if(typeof A.getChildContext!="function")I=z;else{A=A.getChildContext();for(var Y in A)if(!(Y in N))throw Error(e(108,tr(I)||"Unknown",Y));I=pe({},z,A)}x.legacyContext=I,Ke(y,x,B),x.legacyContext=z}else Ke(y,x,B)}function Qi(y,x){if(y&&y.defaultProps){x=pe({},x),y=y.defaultProps;for(var A in y)x[A]===void 0&&(x[A]=y[A]);return x}return x}function wn(y,x,A,I,B){if(typeof A=="function")if(A.prototype&&A.prototype.isReactComponent){B=Gi(A,x.legacyContext);var N=A.contextType;N=new A(I,typeof N=="object"&&N!==null?N._currentValue2:B),Ji(N,A,I,B),Zi(y,x,N,A)}else{N=Gi(A,x.legacyContext),B=Et(y,x,A,I,N);var z=rr!==0;if(typeof B=="object"&&B!==null&&typeof B.render=="function"&&B.$$typeof===void 0)Ji(B,A,I,N),Zi(y,x,B,A);else if(z){I=x.treeContext,x.treeContext=oi(I,1,0);try{Ke(y,x,B)}finally{x.treeContext=I}}else Ke(y,x,B)}else if(typeof A=="string"){switch(B=x.blockedSegment,N=fe(B.chunks,A,I,y.responseState,B.formatContext),B.lastPushedText=!1,z=B.formatContext,B.formatContext=ie(z,A,I),fn(y,x,N),B.formatContext=z,A){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:B.chunks.push("</",A,">")}B.lastPushedText=!1}else{switch(A){case er:case wr:case Fe:case je:case _t:Ke(y,x,I.children);return;case at:Ke(y,x,I.children);return;case ct:throw Error(e(343));case bn:e:{A=x.blockedBoundary,B=x.blockedSegment,N=I.fallback,I=I.children,z=new Set;var Y={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:z,errorDigest:null},se=Nn(y,B.chunks.length,Y,B.formatContext,!1,!1);B.children.push(se),B.lastPushedText=!1;var ce=Nn(y,0,null,B.formatContext,!1,!1);ce.parentFlushed=!0,x.blockedBoundary=Y,x.blockedSegment=ce;try{if(fn(y,x,I),y.responseState.generateStaticMarkup||ce.lastPushedText&&ce.textEmbedded&&ce.chunks.push("<!-- -->"),ce.status=1,Gt(Y,ce),Y.pendingTasks===0)break e}catch(le){ce.status=4,Y.forceClientRender=!0,Y.errorDigest=cn(y,le)}finally{x.blockedBoundary=A,x.blockedSegment=B}x=_n(y,N,A,se,z,x.legacyContext,x.context,x.treeContext),y.pingedTasks.push(x)}return}if(typeof A=="object"&&A!==null)switch(A.$$typeof){case kt:if(I=Et(y,x,A.render,I,B),rr!==0){A=x.treeContext,x.treeContext=oi(A,1,0);try{Ke(y,x,I)}finally{x.treeContext=A}}else Ke(y,x,I);return;case Sr:A=A.type,I=Qi(A,I),wn(y,x,A,I,B);return;case Qn:if(B=I.children,A=A._context,I=I.value,N=A._currentValue2,A._currentValue2=I,z=Vt,Vt=I={parent:z,depth:z===null?0:z.depth+1,context:A,parentValue:N,value:I},x.context=I,Ke(y,x,B),y=Vt,y===null)throw Error(e(403));I=y.parentValue,y.context._currentValue2=I===Vi?y.context._defaultValue:I,y=Vt=y.parent,x.context=y;return;case qn:I=I.children,I=I(A._currentValue2),Ke(y,x,I);return;case qe:B=A._init,A=B(A._payload),I=Qi(A,I),wn(y,x,A,I,void 0);return}throw Error(e(130,A==null?A:typeof A,""))}}function Ke(y,x,A){if(x.node=A,typeof A=="object"&&A!==null){switch(A.$$typeof){case Me:wn(y,x,A.type,A.props,A.ref);return;case it:throw Error(e(257));case qe:var I=A._init;A=I(A._payload),Ke(y,x,A);return}if(_(A)){un(y,x,A);return}if(A===null||typeof A!="object"?I=null:(I=Ht&&A[Ht]||A["@@iterator"],I=typeof I=="function"?I:null),I&&(I=I.call(A))){if(A=I.next(),!A.done){var B=[];do B.push(A.value),A=I.next();while(!A.done);un(y,x,B)}return}throw y=Object.prototype.toString.call(A),Error(e(31,y==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":y))}typeof A=="string"?(I=x.blockedSegment,I.lastPushedText=lt(x.blockedSegment.chunks,A,y.responseState,I.lastPushedText)):typeof A=="number"&&(I=x.blockedSegment,I.lastPushedText=lt(x.blockedSegment.chunks,""+A,y.responseState,I.lastPushedText))}function un(y,x,A){for(var I=A.length,B=0;B<I;B++){var N=x.treeContext;x.treeContext=oi(N,I,B);try{fn(y,x,A[B])}finally{x.treeContext=N}}}function fn(y,x,A){var I=x.blockedSegment.formatContext,B=x.legacyContext,N=x.context;try{return Ke(y,x,A)}catch(se){if(ci(),typeof se=="object"&&se!==null&&typeof se.then=="function"){A=se;var z=x.blockedSegment,Y=Nn(y,z.chunks.length,null,z.formatContext,z.lastPushedText,!0);z.children.push(Y),z.lastPushedText=!1,y=_n(y,x.node,x.blockedBoundary,Y,x.abortSet,x.legacyContext,x.context,x.treeContext).ping,A.then(y,y),x.blockedSegment.formatContext=I,x.legacyContext=B,x.context=N,Je(N)}else throw x.blockedSegment.formatContext=I,x.legacyContext=B,x.context=N,Je(N),se}}function Ln(y){var x=y.blockedBoundary;y=y.blockedSegment,y.status=3,dn(this,x,y)}function Rr(y,x,A){var I=y.blockedBoundary;y.blockedSegment.status=3,I===null?(x.allPendingTasks--,x.status!==2&&(x.status=2,x.destination!==null&&x.destination.push(null))):(I.pendingTasks--,I.forceClientRender||(I.forceClientRender=!0,y=A===void 0?Error(e(432)):A,I.errorDigest=x.onError(y),I.parentFlushed&&x.clientRenderedBoundaries.push(I)),I.fallbackAbortableTasks.forEach(function(B){return Rr(B,x,A)}),I.fallbackAbortableTasks.clear(),x.allPendingTasks--,x.allPendingTasks===0&&(I=x.onAllReady,I()))}function Gt(y,x){if(x.chunks.length===0&&x.children.length===1&&x.children[0].boundary===null){var A=x.children[0];A.id=x.id,A.parentFlushed=!0,A.status===1&&Gt(y,A)}else y.completedSegments.push(x)}function dn(y,x,A){if(x===null){if(A.parentFlushed){if(y.completedRootSegment!==null)throw Error(e(389));y.completedRootSegment=A}y.pendingRootTasks--,y.pendingRootTasks===0&&(y.onShellError=an,x=y.onShellReady,x())}else x.pendingTasks--,x.forceClientRender||(x.pendingTasks===0?(A.parentFlushed&&A.status===1&&Gt(x,A),x.parentFlushed&&y.completedBoundaries.push(x),x.fallbackAbortableTasks.forEach(Ln,y),x.fallbackAbortableTasks.clear()):A.parentFlushed&&A.status===1&&(Gt(x,A),x.completedSegments.length===1&&x.parentFlushed&&y.partialBoundaries.push(x)));y.allPendingTasks--,y.allPendingTasks===0&&(y=y.onAllReady,y())}function dt(y){if(y.status!==2){var x=Vt,A=Pn.current;Pn.current=fi;var I=Er;Er=y.responseState;try{var B=y.pingedTasks,N;for(N=0;N<B.length;N++){var z=B[N],Y=y,se=z.blockedSegment;if(se.status===0){Je(z.context);try{Ke(Y,z,z.node),Y.responseState.generateStaticMarkup||se.lastPushedText&&se.textEmbedded&&se.chunks.push("<!-- -->"),z.abortSet.delete(z),se.status=1,dn(Y,z.blockedBoundary,se)}catch(mt){if(ci(),typeof mt=="object"&&mt!==null&&typeof mt.then=="function"){var ce=z.ping;mt.then(ce,ce)}else{z.abortSet.delete(z),se.status=4;var le=z.blockedBoundary,Te=mt,pt=cn(Y,Te);if(le===null?Fn(Y,Te):(le.pendingTasks--,le.forceClientRender||(le.forceClientRender=!0,le.errorDigest=pt,le.parentFlushed&&Y.clientRenderedBoundaries.push(le))),Y.allPendingTasks--,Y.allPendingTasks===0){var gt=Y.onAllReady;gt()}}}finally{}}}B.splice(0,N),y.destination!==null&&ht(y,y.destination)}catch(mt){cn(y,mt),Fn(y,mt)}finally{Er=I,Pn.current=A,A===fi&&Je(x)}}}function Bn(y,x,A){switch(A.parentFlushed=!0,A.status){case 0:var I=A.id=y.nextSegmentId++;return A.lastPushedText=!1,A.textEmbedded=!1,y=y.responseState,x.push('<template id="'),x.push(y.placeholderPrefix),y=I.toString(16),x.push(y),x.push('"></template>');case 1:A.status=2;var B=!0;I=A.chunks;var N=0;A=A.children;for(var z=0;z<A.length;z++){for(B=A[z];N<B.index;N++)x.push(I[N]);B=ir(y,x,B)}for(;N<I.length-1;N++)x.push(I[N]);return N<I.length&&(B=x.push(I[N])),B;default:throw Error(e(390))}}function ir(y,x,A){var I=A.boundary;if(I===null)return Bn(y,x,A);if(I.parentFlushed=!0,I.forceClientRender)return y.responseState.generateStaticMarkup||(I=I.errorDigest,x.push("<!--$!-->"),x.push("<template"),I&&(x.push(' data-dgst="'),I=E(I),x.push(I),x.push('"')),x.push("></template>")),Bn(y,x,A),y=y.responseState.generateStaticMarkup?!0:x.push("<!--/$-->"),y;if(0<I.pendingTasks){I.rootSegmentID=y.nextSegmentId++,0<I.completedSegments.length&&y.partialBoundaries.push(I);var B=y.responseState,N=B.nextSuspenseID++;return B=B.boundaryPrefix+N.toString(16),I=I.id=B,V(x,y.responseState,I),Bn(y,x,A),x.push("<!--/$-->")}if(I.byteSize>y.progressiveChunkSize)return I.rootSegmentID=y.nextSegmentId++,y.completedBoundaries.push(I),V(x,y.responseState,I.id),Bn(y,x,A),x.push("<!--/$-->");if(y.responseState.generateStaticMarkup||x.push("<!--$-->"),A=I.completedSegments,A.length!==1)throw Error(e(391));return ir(y,x,A[0]),y=y.responseState.generateStaticMarkup?!0:x.push("<!--/$-->"),y}function Ar(y,x,A){return De(x,y.responseState,A.formatContext,A.id),ir(y,x,A),ye(x,A.formatContext)}function Nt(y,x,A){for(var I=A.completedSegments,B=0;B<I.length;B++)hn(y,x,A,I[B]);if(I.length=0,y=y.responseState,I=A.id,A=A.rootSegmentID,x.push(y.startInlineScript),y.sentCompleteBoundaryFunction?x.push('$RC("'):(y.sentCompleteBoundaryFunction=!0,x.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),I===null)throw Error(e(395));return A=A.toString(16),x.push(I),x.push('","'),x.push(y.segmentPrefix),x.push(A),x.push('")<\/script>')}function hn(y,x,A,I){if(I.status===2)return!0;var B=I.id;if(B===-1){if((I.id=A.rootSegmentID)===-1)throw Error(e(392));return Ar(y,x,I)}return Ar(y,x,I),y=y.responseState,x.push(y.startInlineScript),y.sentCompleteSegmentFunction?x.push('$RS("'):(y.sentCompleteSegmentFunction=!0,x.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),x.push(y.segmentPrefix),B=B.toString(16),x.push(B),x.push('","'),x.push(y.placeholderPrefix),x.push(B),x.push('")<\/script>')}function ht(y,x){try{var A=y.completedRootSegment;if(A!==null&&y.pendingRootTasks===0){ir(y,x,A),y.completedRootSegment=null;var I=y.responseState.bootstrapChunks;for(A=0;A<I.length-1;A++)x.push(I[A]);A<I.length&&x.push(I[A])}var B=y.clientRenderedBoundaries,N;for(N=0;N<B.length;N++){var z=B[N];I=x;var Y=y.responseState,se=z.id,ce=z.errorDigest,le=z.errorMessage,Te=z.errorComponentStack;if(I.push(Y.startInlineScript),Y.sentClientRenderFunction?I.push('$RX("'):(Y.sentClientRenderFunction=!0,I.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),se===null)throw Error(e(395));if(I.push(se),I.push('"'),ce||le||Te){I.push(",");var pt=Ie(ce||"");I.push(pt)}if(le||Te){I.push(",");var gt=Ie(le||"");I.push(gt)}if(Te){I.push(",");var mt=Ie(Te);I.push(mt)}if(!I.push(")<\/script>")){y.destination=null,N++,B.splice(0,N);return}}B.splice(0,N);var $n=y.completedBoundaries;for(N=0;N<$n.length;N++)if(!Nt(y,x,$n[N])){y.destination=null,N++,$n.splice(0,N);return}$n.splice(0,N);var pn=y.partialBoundaries;for(N=0;N<pn.length;N++){var Ir=pn[N];e:{B=y,z=x;var zn=Ir.completedSegments;for(Y=0;Y<zn.length;Y++)if(!hn(B,z,Ir,zn[Y])){Y++,zn.splice(0,Y);var or=!1;break e}zn.splice(0,Y),or=!0}if(!or){y.destination=null,N++,pn.splice(0,N);return}}pn.splice(0,N);var xn=y.completedBoundaries;for(N=0;N<xn.length;N++)if(!Nt(y,x,xn[N])){y.destination=null,N++,xn.splice(0,N);return}xn.splice(0,N)}finally{y.allPendingTasks===0&&y.pingedTasks.length===0&&y.clientRenderedBoundaries.length===0&&y.completedBoundaries.length===0&&x.push(null)}}function Or(y,x){try{var A=y.abortableTasks;A.forEach(function(I){return Rr(I,y,x)}),A.clear(),y.destination!==null&&ht(y,y.destination)}catch(I){cn(y,I),Fn(y,I)}}function rt(){}function Tt(y,x,A,I){var B=!1,N=null,z="",Y={push:function(ce){return ce!==null&&(z+=ce),!0},destroy:function(ce){B=!0,N=ce}},se=!1;if(y=Tr(y,be(A,x?x.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,rt,void 0,function(){se=!0}),dt(y),Or(y,I),y.status===1)y.status=2,Y.destroy(y.fatalError);else if(y.status!==2&&y.destination===null){y.destination=Y;try{ht(y,Y)}catch(ce){cn(y,ce),Fn(y,ce)}}if(B)throw N;if(!se)throw Error(e(426));return z}return Ls.renderToNodeStream=function(){throw Error(e(207))},Ls.renderToStaticMarkup=function(y,x){return Tt(y,x,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},Ls.renderToStaticNodeStream=function(){throw Error(e(208))},Ls.renderToString=function(y,x){return Tt(y,x,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},Ls.version="18.3.1",Ls}var Zf={};/**
35
35
  * @license React
36
36
  * react-dom-server.browser.production.min.js
37
37
  *
@@ -39,11 +39,11 @@
39
39
  *
40
40
  * This source code is licensed under the MIT license found in the
41
41
  * LICENSE file in the root directory of this source tree.
42
- */var KS;function hz(){if(KS)return Yf;KS=1;var n=_u;function e(v){for(var w="https://reactjs.org/docs/error-decoder.html?invariant="+v,T=1;T<arguments.length;T++)w+="&args[]="+encodeURIComponent(arguments[T]);return"Minified React error #"+v+"; visit "+w+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=null,r=0;function i(v,w){if(w.length!==0)if(512<w.length)0<r&&(v.enqueue(new Uint8Array(t.buffer,0,r)),t=new Uint8Array(512),r=0),v.enqueue(w);else{var T=t.length-r;T<w.length&&(T===0?v.enqueue(t):(t.set(w.subarray(0,T),r),v.enqueue(t),w=w.subarray(T)),t=new Uint8Array(512),r=0),t.set(w,r),r+=w.length}}function o(v,w){return i(v,w),!0}function s(v){t&&0<r&&(v.enqueue(new Uint8Array(t.buffer,0,r)),t=null,r=0)}var a=new TextEncoder;function c(v){return a.encode(v)}function f(v){return a.encode(v)}function p(v,w){typeof v.error=="function"?v.error(w):v.close()}var m=Object.prototype.hasOwnProperty,S=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,C={},E={};function P(v){return m.call(E,v)?!0:m.call(C,v)?!1:S.test(v)?E[v]=!0:(C[v]=!0,!1)}function D(v,w,T,O,$,L,j){this.acceptsBooleans=w===2||w===3||w===4,this.attributeName=O,this.attributeNamespace=$,this.mustUseProperty=T,this.propertyName=v,this.type=w,this.sanitizeURL=L,this.removeEmptyString=j}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(v){_[v]=new D(v,0,!1,v,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(v){var w=v[0];_[w]=new D(w,1,!1,v[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(v){_[v]=new D(v,2,!1,v.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(v){_[v]=new D(v,2,!1,v,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(v){_[v]=new D(v,3,!1,v.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(v){_[v]=new D(v,3,!0,v,null,!1,!1)}),["capture","download"].forEach(function(v){_[v]=new D(v,4,!1,v,null,!1,!1)}),["cols","rows","size","span"].forEach(function(v){_[v]=new D(v,6,!1,v,null,!1,!1)}),["rowSpan","start"].forEach(function(v){_[v]=new D(v,5,!1,v.toLowerCase(),null,!1,!1)});var J=/[\-:]([a-z])/g;function ie(v){return v[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(v){var w=v.replace(J,ie);_[w]=new D(w,1,!1,v,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(v){var w=v.replace(J,ie);_[w]=new D(w,1,!1,v,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(v){var w=v.replace(J,ie);_[w]=new D(w,1,!1,v,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(v){_[v]=new D(v,1,!1,v.toLowerCase(),null,!1,!1)}),_.xlinkHref=new D("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(v){_[v]=new D(v,1,!1,v.toLowerCase(),null,!0,!0)});var oe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},te=["Webkit","ms","Moz","O"];Object.keys(oe).forEach(function(v){te.forEach(function(w){w=w+v.charAt(0).toUpperCase()+v.substring(1),oe[w]=oe[v]})});var G=/["'&<>]/;function ne(v){if(typeof v=="boolean"||typeof v=="number")return""+v;v=""+v;var w=G.exec(v);if(w){var T="",O,$=0;for(O=w.index;O<v.length;O++){switch(v.charCodeAt(O)){case 34:w="&quot;";break;case 38:w="&amp;";break;case 39:w="&#x27;";break;case 60:w="&lt;";break;case 62:w="&gt;";break;default:continue}$!==O&&(T+=v.substring($,O)),$=O+1,T+=w}v=$!==O?T+v.substring($,O):T}return v}var ae=/([A-Z])/g,Q=/^ms-/,Ee=Array.isArray,re=f("<script>"),X=f("<\/script>"),fe=f('<script src="'),V=f('<script type="module" src="'),De=f('" async=""><\/script>'),ye=/(<\/|<)(s)(cript)/gi;function xe(v,w,T,O){return""+w+(T==="s"?"\\u0073":"\\u0053")+O}function Ie(v,w,T,O,$){v=v===void 0?"":v,w=w===void 0?re:f('<script nonce="'+ne(w)+'">');var L=[];if(T!==void 0&&L.push(w,c((""+T).replace(ye,xe)),X),O!==void 0)for(T=0;T<O.length;T++)L.push(fe,c(ne(O[T])),De);if($!==void 0)for(O=0;O<$.length;O++)L.push(V,c(ne($[O])),De);return{bootstrapChunks:L,startInlineScript:w,placeholderPrefix:f(v+"P:"),segmentPrefix:f(v+"S:"),boundaryPrefix:v+"B:",idPrefix:v,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function be(v,w){return{insertionMode:v,selectedValue:w}}function lt(v){return be(v==="http://www.w3.org/2000/svg"?2:v==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function pe(v,w,T){switch(w){case"select":return be(1,T.value!=null?T.value:T.defaultValue);case"svg":return be(2,null);case"math":return be(3,null);case"foreignObject":return be(1,null);case"table":return be(4,null);case"thead":case"tbody":case"tfoot":return be(5,null);case"colgroup":return be(7,null);case"tr":return be(6,null)}return 4<=v.insertionMode||v.insertionMode===0?be(1,null):v}var Me=f("<!-- -->");function it(v,w,T,O){return w===""?O:(O&&v.push(Me),v.push(c(ne(w))),!0)}var _t=new Map,Fe=f(' style="'),je=f(":"),Qn=f(";");function qn(v,w,T){if(typeof T!="object")throw Error(e(62));w=!0;for(var O in T)if(m.call(T,O)){var $=T[O];if($!=null&&typeof $!="boolean"&&$!==""){if(O.indexOf("--")===0){var L=c(ne(O));$=c(ne((""+$).trim()))}else{L=O;var j=_t.get(L);j!==void 0||(j=f(ne(L.replace(ae,"-$1").toLowerCase().replace(Q,"-ms-"))),_t.set(L,j)),L=j,$=typeof $=="number"?$===0||m.call(oe,O)?c(""+$):c($+"px"):c(ne((""+$).trim()))}w?(w=!1,v.push(Fe,L,je,$)):v.push(Qn,L,je,$)}}w||v.push(at)}var kt=f(" "),bn=f('="'),at=f('"'),Sr=f('=""');function qe(v,w,T,O){switch(T){case"style":qn(v,w,O);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<T.length)||T[0]!=="o"&&T[0]!=="O"||T[1]!=="n"&&T[1]!=="N"){if(w=_.hasOwnProperty(T)?_[T]:null,w!==null){switch(typeof O){case"function":case"symbol":return;case"boolean":if(!w.acceptsBooleans)return}switch(T=c(w.attributeName),w.type){case 3:O&&v.push(kt,T,Sr);break;case 4:O===!0?v.push(kt,T,Sr):O!==!1&&v.push(kt,T,bn,c(ne(O)),at);break;case 5:isNaN(O)||v.push(kt,T,bn,c(ne(O)),at);break;case 6:!isNaN(O)&&1<=O&&v.push(kt,T,bn,c(ne(O)),at);break;default:w.sanitizeURL&&(O=""+O),v.push(kt,T,bn,c(ne(O)),at)}}else if(P(T)){switch(typeof O){case"function":case"symbol":return;case"boolean":if(w=T.toLowerCase().slice(0,5),w!=="data-"&&w!=="aria-")return}v.push(kt,c(T),bn,c(ne(O)),at)}}}var ct=f(">"),wr=f("/>");function er(v,w,T){if(w!=null){if(T!=null)throw Error(e(60));if(typeof w!="object"||!("__html"in w))throw Error(e(61));w=w.__html,w!=null&&v.push(c(""+w))}}function Vi(v){var w="";return n.Children.forEach(v,function(T){T!=null&&(w+=T)}),w}var Ht=f(' selected=""');function tr(v,w,T,O){v.push(ot(T));var $=T=null,L;for(L in w)if(m.call(w,L)){var j=w[L];if(j!=null)switch(L){case"children":T=j;break;case"dangerouslySetInnerHTML":$=j;break;default:qe(v,O,L,j)}}return v.push(ct),er(v,$,T),typeof T=="string"?(v.push(c(ne(T))),null):T}var nr=f(`
42
+ */var ow;function Bz(){if(ow)return Zf;ow=1;var n=rl;function e(v){for(var w="https://reactjs.org/docs/error-decoder.html?invariant="+v,T=1;T<arguments.length;T++)w+="&args[]="+encodeURIComponent(arguments[T]);return"Minified React error #"+v+"; visit "+w+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=null,r=0;function i(v,w){if(w.length!==0)if(512<w.length)0<r&&(v.enqueue(new Uint8Array(t.buffer,0,r)),t=new Uint8Array(512),r=0),v.enqueue(w);else{var T=t.length-r;T<w.length&&(T===0?v.enqueue(t):(t.set(w.subarray(0,T),r),v.enqueue(t),w=w.subarray(T)),t=new Uint8Array(512),r=0),t.set(w,r),r+=w.length}}function o(v,w){return i(v,w),!0}function s(v){t&&0<r&&(v.enqueue(new Uint8Array(t.buffer,0,r)),t=null,r=0)}var a=new TextEncoder;function c(v){return a.encode(v)}function f(v){return a.encode(v)}function p(v,w){typeof v.error=="function"?v.error(w):v.close()}var m=Object.prototype.hasOwnProperty,S=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,C={},E={};function P(v){return m.call(E,v)?!0:m.call(C,v)?!1:S.test(v)?E[v]=!0:(C[v]=!0,!1)}function D(v,w,T,O,$,L,j){this.acceptsBooleans=w===2||w===3||w===4,this.attributeName=O,this.attributeNamespace=$,this.mustUseProperty=T,this.propertyName=v,this.type=w,this.sanitizeURL=L,this.removeEmptyString=j}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(v){_[v]=new D(v,0,!1,v,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(v){var w=v[0];_[w]=new D(w,1,!1,v[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(v){_[v]=new D(v,2,!1,v.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(v){_[v]=new D(v,2,!1,v,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(v){_[v]=new D(v,3,!1,v.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(v){_[v]=new D(v,3,!0,v,null,!1,!1)}),["capture","download"].forEach(function(v){_[v]=new D(v,4,!1,v,null,!1,!1)}),["cols","rows","size","span"].forEach(function(v){_[v]=new D(v,6,!1,v,null,!1,!1)}),["rowSpan","start"].forEach(function(v){_[v]=new D(v,5,!1,v.toLowerCase(),null,!1,!1)});var J=/[\-:]([a-z])/g;function ie(v){return v[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(v){var w=v.replace(J,ie);_[w]=new D(w,1,!1,v,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(v){var w=v.replace(J,ie);_[w]=new D(w,1,!1,v,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(v){var w=v.replace(J,ie);_[w]=new D(w,1,!1,v,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(v){_[v]=new D(v,1,!1,v.toLowerCase(),null,!1,!1)}),_.xlinkHref=new D("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(v){_[v]=new D(v,1,!1,v.toLowerCase(),null,!0,!0)});var oe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},te=["Webkit","ms","Moz","O"];Object.keys(oe).forEach(function(v){te.forEach(function(w){w=w+v.charAt(0).toUpperCase()+v.substring(1),oe[w]=oe[v]})});var G=/["'&<>]/;function ne(v){if(typeof v=="boolean"||typeof v=="number")return""+v;v=""+v;var w=G.exec(v);if(w){var T="",O,$=0;for(O=w.index;O<v.length;O++){switch(v.charCodeAt(O)){case 34:w="&quot;";break;case 38:w="&amp;";break;case 39:w="&#x27;";break;case 60:w="&lt;";break;case 62:w="&gt;";break;default:continue}$!==O&&(T+=v.substring($,O)),$=O+1,T+=w}v=$!==O?T+v.substring($,O):T}return v}var ae=/([A-Z])/g,Q=/^ms-/,Ee=Array.isArray,re=f("<script>"),X=f("<\/script>"),fe=f('<script src="'),V=f('<script type="module" src="'),De=f('" async=""><\/script>'),ye=/(<\/|<)(s)(cript)/gi;function xe(v,w,T,O){return""+w+(T==="s"?"\\u0073":"\\u0053")+O}function Ie(v,w,T,O,$){v=v===void 0?"":v,w=w===void 0?re:f('<script nonce="'+ne(w)+'">');var L=[];if(T!==void 0&&L.push(w,c((""+T).replace(ye,xe)),X),O!==void 0)for(T=0;T<O.length;T++)L.push(fe,c(ne(O[T])),De);if($!==void 0)for(O=0;O<$.length;O++)L.push(V,c(ne($[O])),De);return{bootstrapChunks:L,startInlineScript:w,placeholderPrefix:f(v+"P:"),segmentPrefix:f(v+"S:"),boundaryPrefix:v+"B:",idPrefix:v,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function be(v,w){return{insertionMode:v,selectedValue:w}}function lt(v){return be(v==="http://www.w3.org/2000/svg"?2:v==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function pe(v,w,T){switch(w){case"select":return be(1,T.value!=null?T.value:T.defaultValue);case"svg":return be(2,null);case"math":return be(3,null);case"foreignObject":return be(1,null);case"table":return be(4,null);case"thead":case"tbody":case"tfoot":return be(5,null);case"colgroup":return be(7,null);case"tr":return be(6,null)}return 4<=v.insertionMode||v.insertionMode===0?be(1,null):v}var Me=f("<!-- -->");function it(v,w,T,O){return w===""?O:(O&&v.push(Me),v.push(c(ne(w))),!0)}var _t=new Map,Fe=f(' style="'),je=f(":"),Qn=f(";");function qn(v,w,T){if(typeof T!="object")throw Error(e(62));w=!0;for(var O in T)if(m.call(T,O)){var $=T[O];if($!=null&&typeof $!="boolean"&&$!==""){if(O.indexOf("--")===0){var L=c(ne(O));$=c(ne((""+$).trim()))}else{L=O;var j=_t.get(L);j!==void 0||(j=f(ne(L.replace(ae,"-$1").toLowerCase().replace(Q,"-ms-"))),_t.set(L,j)),L=j,$=typeof $=="number"?$===0||m.call(oe,O)?c(""+$):c($+"px"):c(ne((""+$).trim()))}w?(w=!1,v.push(Fe,L,je,$)):v.push(Qn,L,je,$)}}w||v.push(at)}var kt=f(" "),bn=f('="'),at=f('"'),Sr=f('=""');function qe(v,w,T,O){switch(T){case"style":qn(v,w,O);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<T.length)||T[0]!=="o"&&T[0]!=="O"||T[1]!=="n"&&T[1]!=="N"){if(w=_.hasOwnProperty(T)?_[T]:null,w!==null){switch(typeof O){case"function":case"symbol":return;case"boolean":if(!w.acceptsBooleans)return}switch(T=c(w.attributeName),w.type){case 3:O&&v.push(kt,T,Sr);break;case 4:O===!0?v.push(kt,T,Sr):O!==!1&&v.push(kt,T,bn,c(ne(O)),at);break;case 5:isNaN(O)||v.push(kt,T,bn,c(ne(O)),at);break;case 6:!isNaN(O)&&1<=O&&v.push(kt,T,bn,c(ne(O)),at);break;default:w.sanitizeURL&&(O=""+O),v.push(kt,T,bn,c(ne(O)),at)}}else if(P(T)){switch(typeof O){case"function":case"symbol":return;case"boolean":if(w=T.toLowerCase().slice(0,5),w!=="data-"&&w!=="aria-")return}v.push(kt,c(T),bn,c(ne(O)),at)}}}var ct=f(">"),wr=f("/>");function er(v,w,T){if(w!=null){if(T!=null)throw Error(e(60));if(typeof w!="object"||!("__html"in w))throw Error(e(61));w=w.__html,w!=null&&v.push(c(""+w))}}function Vi(v){var w="";return n.Children.forEach(v,function(T){T!=null&&(w+=T)}),w}var Ht=f(' selected=""');function tr(v,w,T,O){v.push(ot(T));var $=T=null,L;for(L in w)if(m.call(w,L)){var j=w[L];if(j!=null)switch(L){case"children":T=j;break;case"dangerouslySetInnerHTML":$=j;break;default:qe(v,O,L,j)}}return v.push(ct),er(v,$,T),typeof T=="string"?(v.push(c(ne(T))),null):T}var nr=f(`
43
43
  `),Gi=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Vt=new Map;function ot(v){var w=Vt.get(v);if(w===void 0){if(!Gi.test(v))throw Error(e(65,v));w=f("<"+v),Vt.set(v,w)}return w}var Xe=f("<!DOCTYPE html>");function ti(v,w,T,O,$){switch(w){case"select":v.push(ot("select"));var L=null,j=null;for(ge in T)if(m.call(T,ge)){var K=T[ge];if(K!=null)switch(ge){case"children":L=K;break;case"dangerouslySetInnerHTML":j=K;break;case"defaultValue":case"value":break;default:qe(v,O,ge,K)}}return v.push(ct),er(v,j,L),L;case"option":j=$.selectedValue,v.push(ot("option"));var ue=K=null,ve=null,ge=null;for(L in T)if(m.call(T,L)){var Ne=T[L];if(Ne!=null)switch(L){case"children":K=Ne;break;case"selected":ve=Ne;break;case"dangerouslySetInnerHTML":ge=Ne;break;case"value":ue=Ne;default:qe(v,O,L,Ne)}}if(j!=null)if(T=ue!==null?""+ue:Vi(K),Ee(j)){for(O=0;O<j.length;O++)if(""+j[O]===T){v.push(Ht);break}}else""+j===T&&v.push(Ht);else ve&&v.push(Ht);return v.push(ct),er(v,ge,K),K;case"textarea":v.push(ot("textarea")),ge=j=L=null;for(K in T)if(m.call(T,K)&&(ue=T[K],ue!=null))switch(K){case"children":ge=ue;break;case"value":L=ue;break;case"defaultValue":j=ue;break;case"dangerouslySetInnerHTML":throw Error(e(91));default:qe(v,O,K,ue)}if(L===null&&j!==null&&(L=j),v.push(ct),ge!=null){if(L!=null)throw Error(e(92));if(Ee(ge)&&1<ge.length)throw Error(e(93));L=""+ge}return typeof L=="string"&&L[0]===`
44
44
  `&&v.push(nr),L!==null&&v.push(c(ne(""+L))),null;case"input":v.push(ot("input")),ue=ge=K=L=null;for(j in T)if(m.call(T,j)&&(ve=T[j],ve!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,"input"));case"defaultChecked":ue=ve;break;case"defaultValue":K=ve;break;case"checked":ge=ve;break;case"value":L=ve;break;default:qe(v,O,j,ve)}return ge!==null?qe(v,O,"checked",ge):ue!==null&&qe(v,O,"checked",ue),L!==null?qe(v,O,"value",L):K!==null&&qe(v,O,"value",K),v.push(wr),null;case"menuitem":v.push(ot("menuitem"));for(var At in T)if(m.call(T,At)&&(L=T[At],L!=null))switch(At){case"children":case"dangerouslySetInnerHTML":throw Error(e(400));default:qe(v,O,At,L)}return v.push(ct),null;case"title":v.push(ot("title")),L=null;for(Ne in T)if(m.call(T,Ne)&&(j=T[Ne],j!=null))switch(Ne){case"children":L=j;break;case"dangerouslySetInnerHTML":throw Error(e(434));default:qe(v,O,Ne,j)}return v.push(ct),L;case"listing":case"pre":v.push(ot(w)),j=L=null;for(ue in T)if(m.call(T,ue)&&(K=T[ue],K!=null))switch(ue){case"children":L=K;break;case"dangerouslySetInnerHTML":j=K;break;default:qe(v,O,ue,K)}if(v.push(ct),j!=null){if(L!=null)throw Error(e(60));if(typeof j!="object"||!("__html"in j))throw Error(e(61));T=j.__html,T!=null&&(typeof T=="string"&&0<T.length&&T[0]===`
45
45
  `?v.push(nr,c(T)):v.push(c(""+T)))}return typeof L=="string"&&L[0]===`
46
- `&&v.push(nr),L;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":v.push(ot(w));for(var Yt in T)if(m.call(T,Yt)&&(L=T[Yt],L!=null))switch(Yt){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,w));default:qe(v,O,Yt,L)}return v.push(wr),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return tr(v,T,w,O);case"html":return $.insertionMode===0&&v.push(Xe),tr(v,T,w,O);default:if(w.indexOf("-")===-1&&typeof T.is!="string")return tr(v,T,w,O);v.push(ot(w)),j=L=null;for(ve in T)if(m.call(T,ve)&&(K=T[ve],K!=null))switch(ve){case"children":L=K;break;case"dangerouslySetInnerHTML":j=K;break;case"style":qn(v,O,K);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:P(ve)&&typeof K!="function"&&typeof K!="symbol"&&v.push(kt,c(ve),bn,c(ne(K)),at)}return v.push(ct),er(v,j,L),L}}var ni=f("</"),ri=f(">"),Je=f('<template id="'),ii=f('"></template>'),Ji=f("<!--$-->"),Yi=f('<!--$?--><template id="'),oi=f('"></template>'),xr=f("<!--$!-->"),ts=f("<!--/$-->"),si=f("<template"),In=f('"'),li=f(' data-dgst="');f(' data-msg="'),f(' data-stck="');var Ki=f("></template>");function ft(v,w,T){if(i(v,Yi),T===null)throw Error(e(395));return i(v,T),o(v,oi)}var on=f('<div hidden id="'),Mn=f('">'),Oe=f("</div>"),Dn=f('<svg aria-hidden="true" style="display:none" id="'),kr=f('">'),rr=f("</svg>"),sn=f('<math aria-hidden="true" style="display:none" id="'),Cr=f('">'),Sn=f("</math>"),et=f('<table hidden id="'),ai=f('">'),ci=f("</table>"),Xi=f('<table hidden><tbody id="'),Ye=f('">'),ui=f("</tbody></table>"),ns=f('<table hidden><tr id="'),rs=f('">'),ln=f("</tr></table>"),fi=f('<table hidden><colgroup id="'),Er=f('">'),Pn=f("</colgroup></table>");function Ct(v,w,T,O){switch(T.insertionMode){case 0:case 1:return i(v,on),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,Mn);case 2:return i(v,Dn),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,kr);case 3:return i(v,sn),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,Cr);case 4:return i(v,et),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,ai);case 5:return i(v,Xi),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,Ye);case 6:return i(v,ns),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,rs);case 7:return i(v,fi),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,Er);default:throw Error(e(397))}}function an(v,w){switch(w.insertionMode){case 0:case 1:return o(v,Oe);case 2:return o(v,rr);case 3:return o(v,Sn);case 4:return o(v,ci);case 5:return o(v,ui);case 6:return o(v,ln);case 7:return o(v,Pn);default:throw Error(e(397))}}var Tr=f('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),_n=f('$RS("'),Nn=f('","'),cn=f('")<\/script>'),Fn=f('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Et=f('$RC("'),Zi=f('","'),Qi=f('")<\/script>'),wn=f('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Ke=f('$RX("'),un=f('"'),fn=f(")<\/script>"),Ln=f(","),Rr=/[<\u2028\u2029]/g;function Gt(v){return JSON.stringify(v).replace(Rr,function(w){switch(w){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var dn=Object.assign,dt=Symbol.for("react.element"),Bn=Symbol.for("react.portal"),ir=Symbol.for("react.fragment"),Ar=Symbol.for("react.strict_mode"),Nt=Symbol.for("react.profiler"),hn=Symbol.for("react.provider"),ht=Symbol.for("react.context"),Or=Symbol.for("react.forward_ref"),rt=Symbol.for("react.suspense"),Tt=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),A=Symbol.for("react.scope"),I=Symbol.for("react.debug_trace_mode"),B=Symbol.for("react.legacy_hidden"),N=Symbol.for("react.default_value"),z=Symbol.iterator;function Y(v){if(v==null)return null;if(typeof v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case ir:return"Fragment";case Bn:return"Portal";case Nt:return"Profiler";case Ar:return"StrictMode";case rt:return"Suspense";case Tt:return"SuspenseList"}if(typeof v=="object")switch(v.$$typeof){case ht:return(v.displayName||"Context")+".Consumer";case hn:return(v._context.displayName||"Context")+".Provider";case Or:var w=v.render;return v=v.displayName,v||(v=w.displayName||w.name||"",v=v!==""?"ForwardRef("+v+")":"ForwardRef"),v;case y:return w=v.displayName||null,w!==null?w:Y(v.type)||"Memo";case x:w=v._payload,v=v._init;try{return Y(v(w))}catch{}}return null}var se={};function ce(v,w){if(v=v.contextTypes,!v)return se;var T={},O;for(O in v)T[O]=w[O];return T}var le=null;function Te(v,w){if(v!==w){v.context._currentValue=v.parentValue,v=v.parent;var T=w.parent;if(v===null){if(T!==null)throw Error(e(401))}else{if(T===null)throw Error(e(401));Te(v,T)}w.context._currentValue=w.value}}function pt(v){v.context._currentValue=v.parentValue,v=v.parent,v!==null&&pt(v)}function gt(v){var w=v.parent;w!==null&&gt(w),v.context._currentValue=v.value}function mt(v,w){if(v.context._currentValue=v.parentValue,v=v.parent,v===null)throw Error(e(402));v.depth===w.depth?Te(v,w):mt(v,w)}function $n(v,w){var T=w.parent;if(T===null)throw Error(e(402));v.depth===T.depth?Te(v,T):$n(v,T),w.context._currentValue=w.value}function pn(v){var w=le;w!==v&&(w===null?gt(v):v===null?pt(w):w.depth===v.depth?Te(w,v):w.depth>v.depth?mt(w,v):$n(w,v),le=v)}var Ir={isMounted:function(){return!1},enqueueSetState:function(v,w){v=v._reactInternals,v.queue!==null&&v.queue.push(w)},enqueueReplaceState:function(v,w){v=v._reactInternals,v.replace=!0,v.queue=[w]},enqueueForceUpdate:function(){}};function zn(v,w,T,O){var $=v.state!==void 0?v.state:null;v.updater=Ir,v.props=T,v.state=$;var L={queue:[],replace:!1};v._reactInternals=L;var j=w.contextType;if(v.context=typeof j=="object"&&j!==null?j._currentValue:O,j=w.getDerivedStateFromProps,typeof j=="function"&&(j=j(T,$),$=j==null?$:dn({},$,j),v.state=$),typeof w.getDerivedStateFromProps!="function"&&typeof v.getSnapshotBeforeUpdate!="function"&&(typeof v.UNSAFE_componentWillMount=="function"||typeof v.componentWillMount=="function"))if(w=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),w!==v.state&&Ir.enqueueReplaceState(v,v.state,null),L.queue!==null&&0<L.queue.length)if(w=L.queue,j=L.replace,L.queue=null,L.replace=!1,j&&w.length===1)v.state=w[0];else{for(L=j?w[0]:v.state,$=!0,j=j?1:0;j<w.length;j++){var K=w[j];K=typeof K=="function"?K.call(v,L,T,O):K,K!=null&&($?($=!1,L=dn({},L,K)):dn(L,K))}v.state=L}else L.queue=null}var or={id:1,overflow:""};function xn(v,w,T){var O=v.id;v=v.overflow;var $=32-sr(O)-1;O&=~(1<<$),T+=1;var L=32-sr(w)+$;if(30<L){var j=$-$%5;return L=(O&(1<<j)-1).toString(32),O>>=j,$-=j,{id:1<<32-sr(w)+$|T<<$|O,overflow:L+v}}return{id:1<<L|T<<$|O,overflow:v}}var sr=Math.clz32?Math.clz32:qi,Xa=Math.log,Za=Math.LN2;function qi(v){return v>>>=0,v===0?32:31-(Xa(v)/Za|0)|0}function gn(v,w){return v===w&&(v!==0||1/v===1/w)||v!==v&&w!==w}var Qa=typeof Object.is=="function"?Object.is:gn,kn=null,is=null,eo=null,Pe=null,lr=!1,to=!1,ar=0,jn=null,no=0;function Un(){if(kn===null)throw Error(e(321));return kn}function Jt(){if(0<no)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function ss(){return Pe===null?eo===null?(lr=!1,eo=Pe=Jt()):(lr=!0,Pe=eo):Pe.next===null?(lr=!1,Pe=Pe.next=Jt()):(lr=!0,Pe=Pe.next),Pe}function di(){is=kn=null,to=!1,eo=null,no=0,Pe=jn=null}function ul(v,w){return typeof w=="function"?w(v):w}function ro(v,w,T){if(kn=Un(),Pe=ss(),lr){var O=Pe.queue;if(w=O.dispatch,jn!==null&&(T=jn.get(O),T!==void 0)){jn.delete(O),O=Pe.memoizedState;do O=v(O,T.action),T=T.next;while(T!==null);return Pe.memoizedState=O,[O,w]}return[Pe.memoizedState,w]}return v=v===ul?typeof w=="function"?w():w:T!==void 0?T(w):w,Pe.memoizedState=v,v=Pe.queue={last:null,dispatch:null},v=v.dispatch=qa.bind(null,kn,v),[Pe.memoizedState,v]}function fl(v,w){if(kn=Un(),Pe=ss(),w=w===void 0?null:w,Pe!==null){var T=Pe.memoizedState;if(T!==null&&w!==null){var O=T[1];e:if(O===null)O=!1;else{for(var $=0;$<O.length&&$<w.length;$++)if(!Qa(w[$],O[$])){O=!1;break e}O=!0}if(O)return T[0]}}return v=v(),Pe.memoizedState=[v,w],v}function qa(v,w,T){if(25<=no)throw Error(e(301));if(v===kn)if(to=!0,v={action:T,next:null},jn===null&&(jn=new Map),T=jn.get(w),T===void 0)jn.set(w,v);else{for(w=T;w.next!==null;)w=w.next;w.next=v}}function ec(){throw Error(e(394))}function io(){}var dl={readContext:function(v){return v._currentValue},useContext:function(v){return Un(),v._currentValue},useMemo:fl,useReducer:ro,useRef:function(v){kn=Un(),Pe=ss();var w=Pe.memoizedState;return w===null?(v={current:v},Pe.memoizedState=v):w},useState:function(v){return ro(ul,v)},useInsertionEffect:io,useLayoutEffect:function(){},useCallback:function(v,w){return fl(function(){return v},w)},useImperativeHandle:io,useEffect:io,useDebugValue:io,useDeferredValue:function(v){return Un(),v},useTransition:function(){return Un(),[!1,ec]},useId:function(){var v=is.treeContext,w=v.overflow;v=v.id,v=(v&~(1<<32-sr(v)-1)).toString(32)+w;var T=hi;if(T===null)throw Error(e(404));return w=ar++,v=":"+T.idPrefix+"R"+v,0<w&&(v+="H"+w.toString(32)),v+":"},useMutableSource:function(v,w){return Un(),w(v._source)},useSyncExternalStore:function(v,w,T){if(T===void 0)throw Error(e(407));return T()}},hi=null,ls=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function tc(v){return console.error(v),null}function Mr(){}function as(v,w,T,O,$,L,j,K,ue){var ve=[],ge=new Set;return w={destination:null,responseState:w,progressiveChunkSize:O===void 0?12800:O,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:ge,pingedTasks:ve,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:$===void 0?tc:$,onAllReady:L===void 0?Mr:L,onShellReady:j===void 0?Mr:j,onShellError:K===void 0?Mr:K,onFatalError:ue===void 0?Mr:ue},T=Dr(w,0,null,T,!1,!1),T.parentFlushed=!0,v=cs(w,v,null,T,ge,se,null,or),ve.push(v),w}function cs(v,w,T,O,$,L,j,K){v.allPendingTasks++,T===null?v.pendingRootTasks++:T.pendingTasks++;var ue={node:w,ping:function(){var ve=v.pingedTasks;ve.push(ue),ve.length===1&&bl(v)},blockedBoundary:T,blockedSegment:O,abortSet:$,legacyContext:L,context:j,treeContext:K};return $.add(ue),ue}function Dr(v,w,T,O,$,L){return{status:0,id:-1,index:w,parentFlushed:!1,chunks:[],children:[],formatContext:O,boundary:T,lastPushedText:$,textEmbedded:L}}function pi(v,w){if(v=v.onError(w),v!=null&&typeof v!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof v+'" instead');return v}function oo(v,w){var T=v.onShellError;T(w),T=v.onFatalError,T(w),v.destination!==null?(v.status=2,p(v.destination,w)):(v.status=1,v.fatalError=w)}function hl(v,w,T,O,$){for(kn={},is=w,ar=0,v=T(O,$);to;)to=!1,ar=0,no+=1,Pe=null,v=T(O,$);return di(),v}function pl(v,w,T,O){var $=T.render(),L=O.childContextTypes;if(L!=null){var j=w.legacyContext;if(typeof T.getChildContext!="function")O=j;else{T=T.getChildContext();for(var K in T)if(!(K in L))throw Error(e(108,Y(O)||"Unknown",K));O=dn({},j,T)}w.legacyContext=O,Rt(v,w,$),w.legacyContext=j}else Rt(v,w,$)}function gl(v,w){if(v&&v.defaultProps){w=dn({},w),v=v.defaultProps;for(var T in v)w[T]===void 0&&(w[T]=v[T]);return w}return w}function so(v,w,T,O,$){if(typeof T=="function")if(T.prototype&&T.prototype.isReactComponent){$=ce(T,w.legacyContext);var L=T.contextType;L=new T(O,typeof L=="object"&&L!==null?L._currentValue:$),zn(L,T,O,$),pl(v,w,L,T)}else{L=ce(T,w.legacyContext),$=hl(v,w,T,O,L);var j=ar!==0;if(typeof $=="object"&&$!==null&&typeof $.render=="function"&&$.$$typeof===void 0)zn($,T,O,L),pl(v,w,$,T);else if(j){O=w.treeContext,w.treeContext=xn(O,1,0);try{Rt(v,w,$)}finally{w.treeContext=O}}else Rt(v,w,$)}else if(typeof T=="string"){switch($=w.blockedSegment,L=ti($.chunks,T,O,v.responseState,$.formatContext),$.lastPushedText=!1,j=$.formatContext,$.formatContext=pe(j,T,O),lo(v,w,L),$.formatContext=j,T){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:$.chunks.push(ni,c(T),ri)}$.lastPushedText=!1}else{switch(T){case B:case I:case Ar:case Nt:case ir:Rt(v,w,O.children);return;case Tt:Rt(v,w,O.children);return;case A:throw Error(e(343));case rt:e:{T=w.blockedBoundary,$=w.blockedSegment,L=O.fallback,O=O.children,j=new Set;var K={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:j,errorDigest:null},ue=Dr(v,$.chunks.length,K,$.formatContext,!1,!1);$.children.push(ue),$.lastPushedText=!1;var ve=Dr(v,0,null,$.formatContext,!1,!1);ve.parentFlushed=!0,w.blockedBoundary=K,w.blockedSegment=ve;try{if(lo(v,w,O),ve.lastPushedText&&ve.textEmbedded&&ve.chunks.push(Me),ve.status=1,ao(K,ve),K.pendingTasks===0)break e}catch(ge){ve.status=4,K.forceClientRender=!0,K.errorDigest=pi(v,ge)}finally{w.blockedBoundary=T,w.blockedSegment=$}w=cs(v,L,T,ue,j,w.legacyContext,w.context,w.treeContext),v.pingedTasks.push(w)}return}if(typeof T=="object"&&T!==null)switch(T.$$typeof){case Or:if(O=hl(v,w,T.render,O,$),ar!==0){T=w.treeContext,w.treeContext=xn(T,1,0);try{Rt(v,w,O)}finally{w.treeContext=T}}else Rt(v,w,O);return;case y:T=T.type,O=gl(T,O),so(v,w,T,O,$);return;case hn:if($=O.children,T=T._context,O=O.value,L=T._currentValue,T._currentValue=O,j=le,le=O={parent:j,depth:j===null?0:j.depth+1,context:T,parentValue:L,value:O},w.context=O,Rt(v,w,$),v=le,v===null)throw Error(e(403));O=v.parentValue,v.context._currentValue=O===N?v.context._defaultValue:O,v=le=v.parent,w.context=v;return;case ht:O=O.children,O=O(T._currentValue),Rt(v,w,O);return;case x:$=T._init,T=$(T._payload),O=gl(T,O),so(v,w,T,O,void 0);return}throw Error(e(130,T==null?T:typeof T,""))}}function Rt(v,w,T){if(w.node=T,typeof T=="object"&&T!==null){switch(T.$$typeof){case dt:so(v,w,T.type,T.props,T.ref);return;case Bn:throw Error(e(257));case x:var O=T._init;T=O(T._payload),Rt(v,w,T);return}if(Ee(T)){ml(v,w,T);return}if(T===null||typeof T!="object"?O=null:(O=z&&T[z]||T["@@iterator"],O=typeof O=="function"?O:null),O&&(O=O.call(T))){if(T=O.next(),!T.done){var $=[];do $.push(T.value),T=O.next();while(!T.done);ml(v,w,$)}return}throw v=Object.prototype.toString.call(T),Error(e(31,v==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":v))}typeof T=="string"?(O=w.blockedSegment,O.lastPushedText=it(w.blockedSegment.chunks,T,v.responseState,O.lastPushedText)):typeof T=="number"&&(O=w.blockedSegment,O.lastPushedText=it(w.blockedSegment.chunks,""+T,v.responseState,O.lastPushedText))}function ml(v,w,T){for(var O=T.length,$=0;$<O;$++){var L=w.treeContext;w.treeContext=xn(L,O,$);try{lo(v,w,T[$])}finally{w.treeContext=L}}}function lo(v,w,T){var O=w.blockedSegment.formatContext,$=w.legacyContext,L=w.context;try{return Rt(v,w,T)}catch(ue){if(di(),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"){T=ue;var j=w.blockedSegment,K=Dr(v,j.chunks.length,null,j.formatContext,j.lastPushedText,!0);j.children.push(K),j.lastPushedText=!1,v=cs(v,w.node,w.blockedBoundary,K,w.abortSet,w.legacyContext,w.context,w.treeContext).ping,T.then(v,v),w.blockedSegment.formatContext=O,w.legacyContext=$,w.context=L,pn(L)}else throw w.blockedSegment.formatContext=O,w.legacyContext=$,w.context=L,pn(L),ue}}function nc(v){var w=v.blockedBoundary;v=v.blockedSegment,v.status=3,vl(this,w,v)}function yl(v,w,T){var O=v.blockedBoundary;v.blockedSegment.status=3,O===null?(w.allPendingTasks--,w.status!==2&&(w.status=2,w.destination!==null&&w.destination.close())):(O.pendingTasks--,O.forceClientRender||(O.forceClientRender=!0,v=T===void 0?Error(e(432)):T,O.errorDigest=w.onError(v),O.parentFlushed&&w.clientRenderedBoundaries.push(O)),O.fallbackAbortableTasks.forEach(function($){return yl($,w,T)}),O.fallbackAbortableTasks.clear(),w.allPendingTasks--,w.allPendingTasks===0&&(O=w.onAllReady,O()))}function ao(v,w){if(w.chunks.length===0&&w.children.length===1&&w.children[0].boundary===null){var T=w.children[0];T.id=w.id,T.parentFlushed=!0,T.status===1&&ao(v,T)}else v.completedSegments.push(w)}function vl(v,w,T){if(w===null){if(T.parentFlushed){if(v.completedRootSegment!==null)throw Error(e(389));v.completedRootSegment=T}v.pendingRootTasks--,v.pendingRootTasks===0&&(v.onShellError=Mr,w=v.onShellReady,w())}else w.pendingTasks--,w.forceClientRender||(w.pendingTasks===0?(T.parentFlushed&&T.status===1&&ao(w,T),w.parentFlushed&&v.completedBoundaries.push(w),w.fallbackAbortableTasks.forEach(nc,v),w.fallbackAbortableTasks.clear()):T.parentFlushed&&T.status===1&&(ao(w,T),w.completedSegments.length===1&&w.parentFlushed&&v.partialBoundaries.push(w)));v.allPendingTasks--,v.allPendingTasks===0&&(v=v.onAllReady,v())}function bl(v){if(v.status!==2){var w=le,T=ls.current;ls.current=dl;var O=hi;hi=v.responseState;try{var $=v.pingedTasks,L;for(L=0;L<$.length;L++){var j=$[L],K=v,ue=j.blockedSegment;if(ue.status===0){pn(j.context);try{Rt(K,j,j.node),ue.lastPushedText&&ue.textEmbedded&&ue.chunks.push(Me),j.abortSet.delete(j),ue.status=1,vl(K,j.blockedBoundary,ue)}catch(Kt){if(di(),typeof Kt=="object"&&Kt!==null&&typeof Kt.then=="function"){var ve=j.ping;Kt.then(ve,ve)}else{j.abortSet.delete(j),ue.status=4;var ge=j.blockedBoundary,Ne=Kt,At=pi(K,Ne);if(ge===null?oo(K,Ne):(ge.pendingTasks--,ge.forceClientRender||(ge.forceClientRender=!0,ge.errorDigest=At,ge.parentFlushed&&K.clientRenderedBoundaries.push(ge))),K.allPendingTasks--,K.allPendingTasks===0){var Yt=K.onAllReady;Yt()}}}finally{}}}$.splice(0,L),v.destination!==null&&us(v,v.destination)}catch(Kt){pi(v,Kt),oo(v,Kt)}finally{hi=O,ls.current=T,T===dl&&pn(w)}}}function co(v,w,T){switch(T.parentFlushed=!0,T.status){case 0:var O=T.id=v.nextSegmentId++;return T.lastPushedText=!1,T.textEmbedded=!1,v=v.responseState,i(w,Je),i(w,v.placeholderPrefix),v=c(O.toString(16)),i(w,v),o(w,ii);case 1:T.status=2;var $=!0;O=T.chunks;var L=0;T=T.children;for(var j=0;j<T.length;j++){for($=T[j];L<$.index;L++)i(w,O[L]);$=uo(v,w,$)}for(;L<O.length-1;L++)i(w,O[L]);return L<O.length&&($=o(w,O[L])),$;default:throw Error(e(390))}}function uo(v,w,T){var O=T.boundary;if(O===null)return co(v,w,T);if(O.parentFlushed=!0,O.forceClientRender)O=O.errorDigest,o(w,xr),i(w,si),O&&(i(w,li),i(w,c(ne(O))),i(w,In)),o(w,Ki),co(v,w,T);else if(0<O.pendingTasks){O.rootSegmentID=v.nextSegmentId++,0<O.completedSegments.length&&v.partialBoundaries.push(O);var $=v.responseState,L=$.nextSuspenseID++;$=f($.boundaryPrefix+L.toString(16)),O=O.id=$,ft(w,v.responseState,O),co(v,w,T)}else if(O.byteSize>v.progressiveChunkSize)O.rootSegmentID=v.nextSegmentId++,v.completedBoundaries.push(O),ft(w,v.responseState,O.id),co(v,w,T);else{if(o(w,Ji),T=O.completedSegments,T.length!==1)throw Error(e(391));uo(v,w,T[0])}return o(w,ts)}function Sl(v,w,T){return Ct(w,v.responseState,T.formatContext,T.id),uo(v,w,T),an(w,T.formatContext)}function wl(v,w,T){for(var O=T.completedSegments,$=0;$<O.length;$++)xl(v,w,T,O[$]);if(O.length=0,v=v.responseState,O=T.id,T=T.rootSegmentID,i(w,v.startInlineScript),v.sentCompleteBoundaryFunction?i(w,Et):(v.sentCompleteBoundaryFunction=!0,i(w,Fn)),O===null)throw Error(e(395));return T=c(T.toString(16)),i(w,O),i(w,Zi),i(w,v.segmentPrefix),i(w,T),o(w,Qi)}function xl(v,w,T,O){if(O.status===2)return!0;var $=O.id;if($===-1){if((O.id=T.rootSegmentID)===-1)throw Error(e(392));return Sl(v,w,O)}return Sl(v,w,O),v=v.responseState,i(w,v.startInlineScript),v.sentCompleteSegmentFunction?i(w,_n):(v.sentCompleteSegmentFunction=!0,i(w,Tr)),i(w,v.segmentPrefix),$=c($.toString(16)),i(w,$),i(w,Nn),i(w,v.placeholderPrefix),i(w,$),o(w,cn)}function us(v,w){t=new Uint8Array(512),r=0;try{var T=v.completedRootSegment;if(T!==null&&v.pendingRootTasks===0){uo(v,w,T),v.completedRootSegment=null;var O=v.responseState.bootstrapChunks;for(T=0;T<O.length-1;T++)i(w,O[T]);T<O.length&&o(w,O[T])}var $=v.clientRenderedBoundaries,L;for(L=0;L<$.length;L++){var j=$[L];O=w;var K=v.responseState,ue=j.id,ve=j.errorDigest,ge=j.errorMessage,Ne=j.errorComponentStack;if(i(O,K.startInlineScript),K.sentClientRenderFunction?i(O,Ke):(K.sentClientRenderFunction=!0,i(O,wn)),ue===null)throw Error(e(395));i(O,ue),i(O,un),(ve||ge||Ne)&&(i(O,Ln),i(O,c(Gt(ve||"")))),(ge||Ne)&&(i(O,Ln),i(O,c(Gt(ge||"")))),Ne&&(i(O,Ln),i(O,c(Gt(Ne)))),o(O,fn)}$.splice(0,L);var At=v.completedBoundaries;for(L=0;L<At.length;L++)wl(v,w,At[L]);At.splice(0,L),s(w),t=new Uint8Array(512),r=0;var Yt=v.partialBoundaries;for(L=0;L<Yt.length;L++){var Kt=Yt[L];e:{$=v,j=w;var fo=Kt.completedSegments;for(K=0;K<fo.length;K++)if(!xl($,j,Kt,fo[K])){K++,fo.splice(0,K);var Cl=!1;break e}fo.splice(0,K),Cl=!0}if(!Cl){v.destination=null,L++,Yt.splice(0,L);return}}Yt.splice(0,L);var gi=v.completedBoundaries;for(L=0;L<gi.length;L++)wl(v,w,gi[L]);gi.splice(0,L)}finally{s(w),v.allPendingTasks===0&&v.pingedTasks.length===0&&v.clientRenderedBoundaries.length===0&&v.completedBoundaries.length===0&&w.close()}}function kl(v,w){try{var T=v.abortableTasks;T.forEach(function(O){return yl(O,v,w)}),T.clear(),v.destination!==null&&us(v,v.destination)}catch(O){pi(v,O),oo(v,O)}}return Yf.renderToReadableStream=function(v,w){return new Promise(function(T,O){var $,L,j=new Promise(function(ge,Ne){L=ge,$=Ne}),K=as(v,Ie(w?w.identifierPrefix:void 0,w?w.nonce:void 0,w?w.bootstrapScriptContent:void 0,w?w.bootstrapScripts:void 0,w?w.bootstrapModules:void 0),lt(w?w.namespaceURI:void 0),w?w.progressiveChunkSize:void 0,w?w.onError:void 0,L,function(){var ge=new ReadableStream({type:"bytes",pull:function(Ne){if(K.status===1)K.status=2,p(Ne,K.fatalError);else if(K.status!==2&&K.destination===null){K.destination=Ne;try{us(K,Ne)}catch(At){pi(K,At),oo(K,At)}}},cancel:function(){kl(K)}},{highWaterMark:0});ge.allReady=j,T(ge)},function(ge){j.catch(function(){}),O(ge)},$);if(w&&w.signal){var ue=w.signal,ve=function(){kl(K,ue.reason),ue.removeEventListener("abort",ve)};ue.addEventListener("abort",ve)}bl(K)})},Yf.version="18.3.1",Yf}var Bs={};/**
46
+ `&&v.push(nr),L;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":v.push(ot(w));for(var Yt in T)if(m.call(T,Yt)&&(L=T[Yt],L!=null))switch(Yt){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,w));default:qe(v,O,Yt,L)}return v.push(wr),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return tr(v,T,w,O);case"html":return $.insertionMode===0&&v.push(Xe),tr(v,T,w,O);default:if(w.indexOf("-")===-1&&typeof T.is!="string")return tr(v,T,w,O);v.push(ot(w)),j=L=null;for(ve in T)if(m.call(T,ve)&&(K=T[ve],K!=null))switch(ve){case"children":L=K;break;case"dangerouslySetInnerHTML":j=K;break;case"style":qn(v,O,K);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:P(ve)&&typeof K!="function"&&typeof K!="symbol"&&v.push(kt,c(ve),bn,c(ne(K)),at)}return v.push(ct),er(v,j,L),L}}var ni=f("</"),ri=f(">"),Je=f('<template id="'),ii=f('"></template>'),Ji=f("<!--$-->"),Yi=f('<!--$?--><template id="'),oi=f('"></template>'),xr=f("<!--$!-->"),ts=f("<!--/$-->"),si=f("<template"),In=f('"'),li=f(' data-dgst="');f(' data-msg="'),f(' data-stck="');var Ki=f("></template>");function ft(v,w,T){if(i(v,Yi),T===null)throw Error(e(395));return i(v,T),o(v,oi)}var on=f('<div hidden id="'),Mn=f('">'),Oe=f("</div>"),Dn=f('<svg aria-hidden="true" style="display:none" id="'),kr=f('">'),rr=f("</svg>"),sn=f('<math aria-hidden="true" style="display:none" id="'),Cr=f('">'),Sn=f("</math>"),et=f('<table hidden id="'),ai=f('">'),ci=f("</table>"),Xi=f('<table hidden><tbody id="'),Ye=f('">'),ui=f("</tbody></table>"),ns=f('<table hidden><tr id="'),rs=f('">'),ln=f("</tr></table>"),fi=f('<table hidden><colgroup id="'),Er=f('">'),Pn=f("</colgroup></table>");function Ct(v,w,T,O){switch(T.insertionMode){case 0:case 1:return i(v,on),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,Mn);case 2:return i(v,Dn),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,kr);case 3:return i(v,sn),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,Cr);case 4:return i(v,et),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,ai);case 5:return i(v,Xi),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,Ye);case 6:return i(v,ns),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,rs);case 7:return i(v,fi),i(v,w.segmentPrefix),i(v,c(O.toString(16))),o(v,Er);default:throw Error(e(397))}}function an(v,w){switch(w.insertionMode){case 0:case 1:return o(v,Oe);case 2:return o(v,rr);case 3:return o(v,Sn);case 4:return o(v,ci);case 5:return o(v,ui);case 6:return o(v,ln);case 7:return o(v,Pn);default:throw Error(e(397))}}var Tr=f('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),_n=f('$RS("'),Nn=f('","'),cn=f('")<\/script>'),Fn=f('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Et=f('$RC("'),Zi=f('","'),Qi=f('")<\/script>'),wn=f('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Ke=f('$RX("'),un=f('"'),fn=f(")<\/script>"),Ln=f(","),Rr=/[<\u2028\u2029]/g;function Gt(v){return JSON.stringify(v).replace(Rr,function(w){switch(w){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var dn=Object.assign,dt=Symbol.for("react.element"),Bn=Symbol.for("react.portal"),ir=Symbol.for("react.fragment"),Ar=Symbol.for("react.strict_mode"),Nt=Symbol.for("react.profiler"),hn=Symbol.for("react.provider"),ht=Symbol.for("react.context"),Or=Symbol.for("react.forward_ref"),rt=Symbol.for("react.suspense"),Tt=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),A=Symbol.for("react.scope"),I=Symbol.for("react.debug_trace_mode"),B=Symbol.for("react.legacy_hidden"),N=Symbol.for("react.default_value"),z=Symbol.iterator;function Y(v){if(v==null)return null;if(typeof v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case ir:return"Fragment";case Bn:return"Portal";case Nt:return"Profiler";case Ar:return"StrictMode";case rt:return"Suspense";case Tt:return"SuspenseList"}if(typeof v=="object")switch(v.$$typeof){case ht:return(v.displayName||"Context")+".Consumer";case hn:return(v._context.displayName||"Context")+".Provider";case Or:var w=v.render;return v=v.displayName,v||(v=w.displayName||w.name||"",v=v!==""?"ForwardRef("+v+")":"ForwardRef"),v;case y:return w=v.displayName||null,w!==null?w:Y(v.type)||"Memo";case x:w=v._payload,v=v._init;try{return Y(v(w))}catch{}}return null}var se={};function ce(v,w){if(v=v.contextTypes,!v)return se;var T={},O;for(O in v)T[O]=w[O];return T}var le=null;function Te(v,w){if(v!==w){v.context._currentValue=v.parentValue,v=v.parent;var T=w.parent;if(v===null){if(T!==null)throw Error(e(401))}else{if(T===null)throw Error(e(401));Te(v,T)}w.context._currentValue=w.value}}function pt(v){v.context._currentValue=v.parentValue,v=v.parent,v!==null&&pt(v)}function gt(v){var w=v.parent;w!==null&&gt(w),v.context._currentValue=v.value}function mt(v,w){if(v.context._currentValue=v.parentValue,v=v.parent,v===null)throw Error(e(402));v.depth===w.depth?Te(v,w):mt(v,w)}function $n(v,w){var T=w.parent;if(T===null)throw Error(e(402));v.depth===T.depth?Te(v,T):$n(v,T),w.context._currentValue=w.value}function pn(v){var w=le;w!==v&&(w===null?gt(v):v===null?pt(w):w.depth===v.depth?Te(w,v):w.depth>v.depth?mt(w,v):$n(w,v),le=v)}var Ir={isMounted:function(){return!1},enqueueSetState:function(v,w){v=v._reactInternals,v.queue!==null&&v.queue.push(w)},enqueueReplaceState:function(v,w){v=v._reactInternals,v.replace=!0,v.queue=[w]},enqueueForceUpdate:function(){}};function zn(v,w,T,O){var $=v.state!==void 0?v.state:null;v.updater=Ir,v.props=T,v.state=$;var L={queue:[],replace:!1};v._reactInternals=L;var j=w.contextType;if(v.context=typeof j=="object"&&j!==null?j._currentValue:O,j=w.getDerivedStateFromProps,typeof j=="function"&&(j=j(T,$),$=j==null?$:dn({},$,j),v.state=$),typeof w.getDerivedStateFromProps!="function"&&typeof v.getSnapshotBeforeUpdate!="function"&&(typeof v.UNSAFE_componentWillMount=="function"||typeof v.componentWillMount=="function"))if(w=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),w!==v.state&&Ir.enqueueReplaceState(v,v.state,null),L.queue!==null&&0<L.queue.length)if(w=L.queue,j=L.replace,L.queue=null,L.replace=!1,j&&w.length===1)v.state=w[0];else{for(L=j?w[0]:v.state,$=!0,j=j?1:0;j<w.length;j++){var K=w[j];K=typeof K=="function"?K.call(v,L,T,O):K,K!=null&&($?($=!1,L=dn({},L,K)):dn(L,K))}v.state=L}else L.queue=null}var or={id:1,overflow:""};function xn(v,w,T){var O=v.id;v=v.overflow;var $=32-sr(O)-1;O&=~(1<<$),T+=1;var L=32-sr(w)+$;if(30<L){var j=$-$%5;return L=(O&(1<<j)-1).toString(32),O>>=j,$-=j,{id:1<<32-sr(w)+$|T<<$|O,overflow:L+v}}return{id:1<<L|T<<$|O,overflow:v}}var sr=Math.clz32?Math.clz32:qi,Qa=Math.log,qa=Math.LN2;function qi(v){return v>>>=0,v===0?32:31-(Qa(v)/qa|0)|0}function gn(v,w){return v===w&&(v!==0||1/v===1/w)||v!==v&&w!==w}var ec=typeof Object.is=="function"?Object.is:gn,kn=null,is=null,eo=null,Pe=null,lr=!1,to=!1,ar=0,jn=null,no=0;function Un(){if(kn===null)throw Error(e(321));return kn}function Jt(){if(0<no)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function ss(){return Pe===null?eo===null?(lr=!1,eo=Pe=Jt()):(lr=!0,Pe=eo):Pe.next===null?(lr=!1,Pe=Pe.next=Jt()):(lr=!0,Pe=Pe.next),Pe}function di(){is=kn=null,to=!1,eo=null,no=0,Pe=jn=null}function fl(v,w){return typeof w=="function"?w(v):w}function ro(v,w,T){if(kn=Un(),Pe=ss(),lr){var O=Pe.queue;if(w=O.dispatch,jn!==null&&(T=jn.get(O),T!==void 0)){jn.delete(O),O=Pe.memoizedState;do O=v(O,T.action),T=T.next;while(T!==null);return Pe.memoizedState=O,[O,w]}return[Pe.memoizedState,w]}return v=v===fl?typeof w=="function"?w():w:T!==void 0?T(w):w,Pe.memoizedState=v,v=Pe.queue={last:null,dispatch:null},v=v.dispatch=tc.bind(null,kn,v),[Pe.memoizedState,v]}function dl(v,w){if(kn=Un(),Pe=ss(),w=w===void 0?null:w,Pe!==null){var T=Pe.memoizedState;if(T!==null&&w!==null){var O=T[1];e:if(O===null)O=!1;else{for(var $=0;$<O.length&&$<w.length;$++)if(!ec(w[$],O[$])){O=!1;break e}O=!0}if(O)return T[0]}}return v=v(),Pe.memoizedState=[v,w],v}function tc(v,w,T){if(25<=no)throw Error(e(301));if(v===kn)if(to=!0,v={action:T,next:null},jn===null&&(jn=new Map),T=jn.get(w),T===void 0)jn.set(w,v);else{for(w=T;w.next!==null;)w=w.next;w.next=v}}function nc(){throw Error(e(394))}function io(){}var hl={readContext:function(v){return v._currentValue},useContext:function(v){return Un(),v._currentValue},useMemo:dl,useReducer:ro,useRef:function(v){kn=Un(),Pe=ss();var w=Pe.memoizedState;return w===null?(v={current:v},Pe.memoizedState=v):w},useState:function(v){return ro(fl,v)},useInsertionEffect:io,useLayoutEffect:function(){},useCallback:function(v,w){return dl(function(){return v},w)},useImperativeHandle:io,useEffect:io,useDebugValue:io,useDeferredValue:function(v){return Un(),v},useTransition:function(){return Un(),[!1,nc]},useId:function(){var v=is.treeContext,w=v.overflow;v=v.id,v=(v&~(1<<32-sr(v)-1)).toString(32)+w;var T=hi;if(T===null)throw Error(e(404));return w=ar++,v=":"+T.idPrefix+"R"+v,0<w&&(v+="H"+w.toString(32)),v+":"},useMutableSource:function(v,w){return Un(),w(v._source)},useSyncExternalStore:function(v,w,T){if(T===void 0)throw Error(e(407));return T()}},hi=null,ls=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function rc(v){return console.error(v),null}function Mr(){}function as(v,w,T,O,$,L,j,K,ue){var ve=[],ge=new Set;return w={destination:null,responseState:w,progressiveChunkSize:O===void 0?12800:O,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:ge,pingedTasks:ve,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:$===void 0?rc:$,onAllReady:L===void 0?Mr:L,onShellReady:j===void 0?Mr:j,onShellError:K===void 0?Mr:K,onFatalError:ue===void 0?Mr:ue},T=Dr(w,0,null,T,!1,!1),T.parentFlushed=!0,v=cs(w,v,null,T,ge,se,null,or),ve.push(v),w}function cs(v,w,T,O,$,L,j,K){v.allPendingTasks++,T===null?v.pendingRootTasks++:T.pendingTasks++;var ue={node:w,ping:function(){var ve=v.pingedTasks;ve.push(ue),ve.length===1&&Sl(v)},blockedBoundary:T,blockedSegment:O,abortSet:$,legacyContext:L,context:j,treeContext:K};return $.add(ue),ue}function Dr(v,w,T,O,$,L){return{status:0,id:-1,index:w,parentFlushed:!1,chunks:[],children:[],formatContext:O,boundary:T,lastPushedText:$,textEmbedded:L}}function pi(v,w){if(v=v.onError(w),v!=null&&typeof v!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof v+'" instead');return v}function oo(v,w){var T=v.onShellError;T(w),T=v.onFatalError,T(w),v.destination!==null?(v.status=2,p(v.destination,w)):(v.status=1,v.fatalError=w)}function pl(v,w,T,O,$){for(kn={},is=w,ar=0,v=T(O,$);to;)to=!1,ar=0,no+=1,Pe=null,v=T(O,$);return di(),v}function gl(v,w,T,O){var $=T.render(),L=O.childContextTypes;if(L!=null){var j=w.legacyContext;if(typeof T.getChildContext!="function")O=j;else{T=T.getChildContext();for(var K in T)if(!(K in L))throw Error(e(108,Y(O)||"Unknown",K));O=dn({},j,T)}w.legacyContext=O,Rt(v,w,$),w.legacyContext=j}else Rt(v,w,$)}function ml(v,w){if(v&&v.defaultProps){w=dn({},w),v=v.defaultProps;for(var T in v)w[T]===void 0&&(w[T]=v[T]);return w}return w}function so(v,w,T,O,$){if(typeof T=="function")if(T.prototype&&T.prototype.isReactComponent){$=ce(T,w.legacyContext);var L=T.contextType;L=new T(O,typeof L=="object"&&L!==null?L._currentValue:$),zn(L,T,O,$),gl(v,w,L,T)}else{L=ce(T,w.legacyContext),$=pl(v,w,T,O,L);var j=ar!==0;if(typeof $=="object"&&$!==null&&typeof $.render=="function"&&$.$$typeof===void 0)zn($,T,O,L),gl(v,w,$,T);else if(j){O=w.treeContext,w.treeContext=xn(O,1,0);try{Rt(v,w,$)}finally{w.treeContext=O}}else Rt(v,w,$)}else if(typeof T=="string"){switch($=w.blockedSegment,L=ti($.chunks,T,O,v.responseState,$.formatContext),$.lastPushedText=!1,j=$.formatContext,$.formatContext=pe(j,T,O),lo(v,w,L),$.formatContext=j,T){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:$.chunks.push(ni,c(T),ri)}$.lastPushedText=!1}else{switch(T){case B:case I:case Ar:case Nt:case ir:Rt(v,w,O.children);return;case Tt:Rt(v,w,O.children);return;case A:throw Error(e(343));case rt:e:{T=w.blockedBoundary,$=w.blockedSegment,L=O.fallback,O=O.children,j=new Set;var K={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:j,errorDigest:null},ue=Dr(v,$.chunks.length,K,$.formatContext,!1,!1);$.children.push(ue),$.lastPushedText=!1;var ve=Dr(v,0,null,$.formatContext,!1,!1);ve.parentFlushed=!0,w.blockedBoundary=K,w.blockedSegment=ve;try{if(lo(v,w,O),ve.lastPushedText&&ve.textEmbedded&&ve.chunks.push(Me),ve.status=1,ao(K,ve),K.pendingTasks===0)break e}catch(ge){ve.status=4,K.forceClientRender=!0,K.errorDigest=pi(v,ge)}finally{w.blockedBoundary=T,w.blockedSegment=$}w=cs(v,L,T,ue,j,w.legacyContext,w.context,w.treeContext),v.pingedTasks.push(w)}return}if(typeof T=="object"&&T!==null)switch(T.$$typeof){case Or:if(O=pl(v,w,T.render,O,$),ar!==0){T=w.treeContext,w.treeContext=xn(T,1,0);try{Rt(v,w,O)}finally{w.treeContext=T}}else Rt(v,w,O);return;case y:T=T.type,O=ml(T,O),so(v,w,T,O,$);return;case hn:if($=O.children,T=T._context,O=O.value,L=T._currentValue,T._currentValue=O,j=le,le=O={parent:j,depth:j===null?0:j.depth+1,context:T,parentValue:L,value:O},w.context=O,Rt(v,w,$),v=le,v===null)throw Error(e(403));O=v.parentValue,v.context._currentValue=O===N?v.context._defaultValue:O,v=le=v.parent,w.context=v;return;case ht:O=O.children,O=O(T._currentValue),Rt(v,w,O);return;case x:$=T._init,T=$(T._payload),O=ml(T,O),so(v,w,T,O,void 0);return}throw Error(e(130,T==null?T:typeof T,""))}}function Rt(v,w,T){if(w.node=T,typeof T=="object"&&T!==null){switch(T.$$typeof){case dt:so(v,w,T.type,T.props,T.ref);return;case Bn:throw Error(e(257));case x:var O=T._init;T=O(T._payload),Rt(v,w,T);return}if(Ee(T)){yl(v,w,T);return}if(T===null||typeof T!="object"?O=null:(O=z&&T[z]||T["@@iterator"],O=typeof O=="function"?O:null),O&&(O=O.call(T))){if(T=O.next(),!T.done){var $=[];do $.push(T.value),T=O.next();while(!T.done);yl(v,w,$)}return}throw v=Object.prototype.toString.call(T),Error(e(31,v==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":v))}typeof T=="string"?(O=w.blockedSegment,O.lastPushedText=it(w.blockedSegment.chunks,T,v.responseState,O.lastPushedText)):typeof T=="number"&&(O=w.blockedSegment,O.lastPushedText=it(w.blockedSegment.chunks,""+T,v.responseState,O.lastPushedText))}function yl(v,w,T){for(var O=T.length,$=0;$<O;$++){var L=w.treeContext;w.treeContext=xn(L,O,$);try{lo(v,w,T[$])}finally{w.treeContext=L}}}function lo(v,w,T){var O=w.blockedSegment.formatContext,$=w.legacyContext,L=w.context;try{return Rt(v,w,T)}catch(ue){if(di(),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"){T=ue;var j=w.blockedSegment,K=Dr(v,j.chunks.length,null,j.formatContext,j.lastPushedText,!0);j.children.push(K),j.lastPushedText=!1,v=cs(v,w.node,w.blockedBoundary,K,w.abortSet,w.legacyContext,w.context,w.treeContext).ping,T.then(v,v),w.blockedSegment.formatContext=O,w.legacyContext=$,w.context=L,pn(L)}else throw w.blockedSegment.formatContext=O,w.legacyContext=$,w.context=L,pn(L),ue}}function ic(v){var w=v.blockedBoundary;v=v.blockedSegment,v.status=3,bl(this,w,v)}function vl(v,w,T){var O=v.blockedBoundary;v.blockedSegment.status=3,O===null?(w.allPendingTasks--,w.status!==2&&(w.status=2,w.destination!==null&&w.destination.close())):(O.pendingTasks--,O.forceClientRender||(O.forceClientRender=!0,v=T===void 0?Error(e(432)):T,O.errorDigest=w.onError(v),O.parentFlushed&&w.clientRenderedBoundaries.push(O)),O.fallbackAbortableTasks.forEach(function($){return vl($,w,T)}),O.fallbackAbortableTasks.clear(),w.allPendingTasks--,w.allPendingTasks===0&&(O=w.onAllReady,O()))}function ao(v,w){if(w.chunks.length===0&&w.children.length===1&&w.children[0].boundary===null){var T=w.children[0];T.id=w.id,T.parentFlushed=!0,T.status===1&&ao(v,T)}else v.completedSegments.push(w)}function bl(v,w,T){if(w===null){if(T.parentFlushed){if(v.completedRootSegment!==null)throw Error(e(389));v.completedRootSegment=T}v.pendingRootTasks--,v.pendingRootTasks===0&&(v.onShellError=Mr,w=v.onShellReady,w())}else w.pendingTasks--,w.forceClientRender||(w.pendingTasks===0?(T.parentFlushed&&T.status===1&&ao(w,T),w.parentFlushed&&v.completedBoundaries.push(w),w.fallbackAbortableTasks.forEach(ic,v),w.fallbackAbortableTasks.clear()):T.parentFlushed&&T.status===1&&(ao(w,T),w.completedSegments.length===1&&w.parentFlushed&&v.partialBoundaries.push(w)));v.allPendingTasks--,v.allPendingTasks===0&&(v=v.onAllReady,v())}function Sl(v){if(v.status!==2){var w=le,T=ls.current;ls.current=hl;var O=hi;hi=v.responseState;try{var $=v.pingedTasks,L;for(L=0;L<$.length;L++){var j=$[L],K=v,ue=j.blockedSegment;if(ue.status===0){pn(j.context);try{Rt(K,j,j.node),ue.lastPushedText&&ue.textEmbedded&&ue.chunks.push(Me),j.abortSet.delete(j),ue.status=1,bl(K,j.blockedBoundary,ue)}catch(Kt){if(di(),typeof Kt=="object"&&Kt!==null&&typeof Kt.then=="function"){var ve=j.ping;Kt.then(ve,ve)}else{j.abortSet.delete(j),ue.status=4;var ge=j.blockedBoundary,Ne=Kt,At=pi(K,Ne);if(ge===null?oo(K,Ne):(ge.pendingTasks--,ge.forceClientRender||(ge.forceClientRender=!0,ge.errorDigest=At,ge.parentFlushed&&K.clientRenderedBoundaries.push(ge))),K.allPendingTasks--,K.allPendingTasks===0){var Yt=K.onAllReady;Yt()}}}finally{}}}$.splice(0,L),v.destination!==null&&us(v,v.destination)}catch(Kt){pi(v,Kt),oo(v,Kt)}finally{hi=O,ls.current=T,T===hl&&pn(w)}}}function co(v,w,T){switch(T.parentFlushed=!0,T.status){case 0:var O=T.id=v.nextSegmentId++;return T.lastPushedText=!1,T.textEmbedded=!1,v=v.responseState,i(w,Je),i(w,v.placeholderPrefix),v=c(O.toString(16)),i(w,v),o(w,ii);case 1:T.status=2;var $=!0;O=T.chunks;var L=0;T=T.children;for(var j=0;j<T.length;j++){for($=T[j];L<$.index;L++)i(w,O[L]);$=uo(v,w,$)}for(;L<O.length-1;L++)i(w,O[L]);return L<O.length&&($=o(w,O[L])),$;default:throw Error(e(390))}}function uo(v,w,T){var O=T.boundary;if(O===null)return co(v,w,T);if(O.parentFlushed=!0,O.forceClientRender)O=O.errorDigest,o(w,xr),i(w,si),O&&(i(w,li),i(w,c(ne(O))),i(w,In)),o(w,Ki),co(v,w,T);else if(0<O.pendingTasks){O.rootSegmentID=v.nextSegmentId++,0<O.completedSegments.length&&v.partialBoundaries.push(O);var $=v.responseState,L=$.nextSuspenseID++;$=f($.boundaryPrefix+L.toString(16)),O=O.id=$,ft(w,v.responseState,O),co(v,w,T)}else if(O.byteSize>v.progressiveChunkSize)O.rootSegmentID=v.nextSegmentId++,v.completedBoundaries.push(O),ft(w,v.responseState,O.id),co(v,w,T);else{if(o(w,Ji),T=O.completedSegments,T.length!==1)throw Error(e(391));uo(v,w,T[0])}return o(w,ts)}function wl(v,w,T){return Ct(w,v.responseState,T.formatContext,T.id),uo(v,w,T),an(w,T.formatContext)}function xl(v,w,T){for(var O=T.completedSegments,$=0;$<O.length;$++)kl(v,w,T,O[$]);if(O.length=0,v=v.responseState,O=T.id,T=T.rootSegmentID,i(w,v.startInlineScript),v.sentCompleteBoundaryFunction?i(w,Et):(v.sentCompleteBoundaryFunction=!0,i(w,Fn)),O===null)throw Error(e(395));return T=c(T.toString(16)),i(w,O),i(w,Zi),i(w,v.segmentPrefix),i(w,T),o(w,Qi)}function kl(v,w,T,O){if(O.status===2)return!0;var $=O.id;if($===-1){if((O.id=T.rootSegmentID)===-1)throw Error(e(392));return wl(v,w,O)}return wl(v,w,O),v=v.responseState,i(w,v.startInlineScript),v.sentCompleteSegmentFunction?i(w,_n):(v.sentCompleteSegmentFunction=!0,i(w,Tr)),i(w,v.segmentPrefix),$=c($.toString(16)),i(w,$),i(w,Nn),i(w,v.placeholderPrefix),i(w,$),o(w,cn)}function us(v,w){t=new Uint8Array(512),r=0;try{var T=v.completedRootSegment;if(T!==null&&v.pendingRootTasks===0){uo(v,w,T),v.completedRootSegment=null;var O=v.responseState.bootstrapChunks;for(T=0;T<O.length-1;T++)i(w,O[T]);T<O.length&&o(w,O[T])}var $=v.clientRenderedBoundaries,L;for(L=0;L<$.length;L++){var j=$[L];O=w;var K=v.responseState,ue=j.id,ve=j.errorDigest,ge=j.errorMessage,Ne=j.errorComponentStack;if(i(O,K.startInlineScript),K.sentClientRenderFunction?i(O,Ke):(K.sentClientRenderFunction=!0,i(O,wn)),ue===null)throw Error(e(395));i(O,ue),i(O,un),(ve||ge||Ne)&&(i(O,Ln),i(O,c(Gt(ve||"")))),(ge||Ne)&&(i(O,Ln),i(O,c(Gt(ge||"")))),Ne&&(i(O,Ln),i(O,c(Gt(Ne)))),o(O,fn)}$.splice(0,L);var At=v.completedBoundaries;for(L=0;L<At.length;L++)xl(v,w,At[L]);At.splice(0,L),s(w),t=new Uint8Array(512),r=0;var Yt=v.partialBoundaries;for(L=0;L<Yt.length;L++){var Kt=Yt[L];e:{$=v,j=w;var fo=Kt.completedSegments;for(K=0;K<fo.length;K++)if(!kl($,j,Kt,fo[K])){K++,fo.splice(0,K);var El=!1;break e}fo.splice(0,K),El=!0}if(!El){v.destination=null,L++,Yt.splice(0,L);return}}Yt.splice(0,L);var gi=v.completedBoundaries;for(L=0;L<gi.length;L++)xl(v,w,gi[L]);gi.splice(0,L)}finally{s(w),v.allPendingTasks===0&&v.pingedTasks.length===0&&v.clientRenderedBoundaries.length===0&&v.completedBoundaries.length===0&&w.close()}}function Cl(v,w){try{var T=v.abortableTasks;T.forEach(function(O){return vl(O,v,w)}),T.clear(),v.destination!==null&&us(v,v.destination)}catch(O){pi(v,O),oo(v,O)}}return Zf.renderToReadableStream=function(v,w){return new Promise(function(T,O){var $,L,j=new Promise(function(ge,Ne){L=ge,$=Ne}),K=as(v,Ie(w?w.identifierPrefix:void 0,w?w.nonce:void 0,w?w.bootstrapScriptContent:void 0,w?w.bootstrapScripts:void 0,w?w.bootstrapModules:void 0),lt(w?w.namespaceURI:void 0),w?w.progressiveChunkSize:void 0,w?w.onError:void 0,L,function(){var ge=new ReadableStream({type:"bytes",pull:function(Ne){if(K.status===1)K.status=2,p(Ne,K.fatalError);else if(K.status!==2&&K.destination===null){K.destination=Ne;try{us(K,Ne)}catch(At){pi(K,At),oo(K,At)}}},cancel:function(){Cl(K)}},{highWaterMark:0});ge.allReady=j,T(ge)},function(ge){j.catch(function(){}),O(ge)},$);if(w&&w.signal){var ue=w.signal,ve=function(){Cl(K,ue.reason),ue.removeEventListener("abort",ve)};ue.addEventListener("abort",ve)}Sl(K)})},Zf.version="18.3.1",Zf}var Bs={};/**
47
47
  * @license React
48
48
  * react-dom-server-legacy.browser.development.js
49
49
  *
@@ -51,17 +51,17 @@
51
51
  *
52
52
  * This source code is licensed under the MIT license found in the
53
53
  * LICENSE file in the root directory of this source tree.
54
- */var XS;function pz(){return XS||(XS=1,process.env.NODE_ENV!=="production"&&function(){var n=_u,e="18.3.1",t=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(l){{for(var u=arguments.length,d=new Array(u>1?u-1:0),g=1;g<u;g++)d[g-1]=arguments[g];o("warn",l,d)}}function i(l){{for(var u=arguments.length,d=new Array(u>1?u-1:0),g=1;g<u;g++)d[g-1]=arguments[g];o("error",l,d)}}function o(l,u,d){{var g=t.ReactDebugCurrentFrame,b=g.getStackAddendum();b!==""&&(u+="%s",d=d.concat([b]));var k=d.map(function(R){return String(R)});k.unshift("Warning: "+u),Function.prototype.apply.call(console[l],console,k)}}function s(l){l()}function a(l){}function c(l,u){f(l,u)}function f(l,u){return l.push(u)}function p(l){}function m(l){l.push(null)}function S(l){return l}function C(l){return l}function E(l,u){l.destroy(u)}function P(l){{var u=typeof Symbol=="function"&&Symbol.toStringTag,d=u&&l[Symbol.toStringTag]||l.constructor.name||"Object";return d}}function D(l){try{return _(l),!1}catch{return!0}}function _(l){return""+l}function J(l,u){if(D(l))return i("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",u,P(l)),_(l)}function ie(l,u){if(D(l))return i("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",u,P(l)),_(l)}function oe(l){if(D(l))return i("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",P(l)),_(l)}var te=Object.prototype.hasOwnProperty,G=0,ne=1,ae=2,Q=3,Ee=4,re=5,X=6,fe=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",V=fe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",De=new RegExp("^["+fe+"]["+V+"]*$"),ye={},xe={};function Ie(l){return te.call(xe,l)?!0:te.call(ye,l)?!1:De.test(l)?(xe[l]=!0,!0):(ye[l]=!0,i("Invalid attribute name: `%s`",l),!1)}function be(l,u,d,g){if(d!==null&&d.type===G)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":{if(d!==null)return!d.acceptsBooleans;var b=l.toLowerCase().slice(0,5);return b!=="data-"&&b!=="aria-"}default:return!1}}function lt(l){return Me.hasOwnProperty(l)?Me[l]:null}function pe(l,u,d,g,b,k,R){this.acceptsBooleans=u===ae||u===Q||u===Ee,this.attributeName=g,this.attributeNamespace=b,this.mustUseProperty=d,this.propertyName=l,this.type=u,this.sanitizeURL=k,this.removeEmptyString=R}var Me={},it=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];it.forEach(function(l){Me[l]=new pe(l,G,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var u=l[0],d=l[1];Me[u]=new pe(u,ne,!1,d,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){Me[l]=new pe(l,ae,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){Me[l]=new pe(l,ae,!1,l,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(l){Me[l]=new pe(l,Q,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){Me[l]=new pe(l,Q,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){Me[l]=new pe(l,Ee,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){Me[l]=new pe(l,X,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){Me[l]=new pe(l,re,!1,l.toLowerCase(),null,!1,!1)});var _t=/[\-\:]([a-z])/g,Fe=function(l){return l[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(l){var u=l.replace(_t,Fe);Me[u]=new pe(u,ne,!1,l,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(l){var u=l.replace(_t,Fe);Me[u]=new pe(u,ne,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var u=l.replace(_t,Fe);Me[u]=new pe(u,ne,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){Me[l]=new pe(l,ne,!1,l.toLowerCase(),null,!1,!1)});var je="xlinkHref";Me[je]=new pe("xlinkHref",ne,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){Me[l]=new pe(l,ne,!1,l.toLowerCase(),null,!0,!0)});var Qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function qn(l,u){return l+u.charAt(0).toUpperCase()+u.substring(1)}var kt=["Webkit","ms","Moz","O"];Object.keys(Qn).forEach(function(l){kt.forEach(function(u){Qn[qn(u,l)]=Qn[l]})});var bn={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function at(l,u){bn[u.type]||u.onChange||u.onInput||u.readOnly||u.disabled||u.value==null||i("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),u.onChange||u.readOnly||u.disabled||u.checked==null||i("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Sr(l,u){if(l.indexOf("-")===-1)return typeof u.is=="string";switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qe={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},ct={},wr=new RegExp("^(aria)-["+V+"]*$"),er=new RegExp("^(aria)[A-Z]["+V+"]*$");function Vi(l,u){{if(te.call(ct,u)&&ct[u])return!0;if(er.test(u)){var d="aria-"+u.slice(4).toLowerCase(),g=qe.hasOwnProperty(d)?d:null;if(g==null)return i("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",u),ct[u]=!0,!0;if(u!==g)return i("Invalid ARIA attribute `%s`. Did you mean `%s`?",u,g),ct[u]=!0,!0}if(wr.test(u)){var b=u.toLowerCase(),k=qe.hasOwnProperty(b)?b:null;if(k==null)return ct[u]=!0,!1;if(u!==k)return i("Unknown ARIA attribute `%s`. Did you mean `%s`?",u,k),ct[u]=!0,!0}}return!0}function Ht(l,u){{var d=[];for(var g in u){var b=Vi(l,g);b||d.push(g)}var k=d.map(function(R){return"`"+R+"`"}).join(", ");d.length===1?i("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",k,l):d.length>1&&i("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",k,l)}}function tr(l,u){Sr(l,u)||Ht(l,u)}var nr=!1;function Gi(l,u){{if(l!=="input"&&l!=="textarea"&&l!=="select")return;u!=null&&u.value===null&&!nr&&(nr=!0,l==="select"&&u.multiple?i("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",l):i("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",l))}}var Vt={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},ot=function(){};{var Xe={},ti=/^on./,ni=/^on[^A-Z]/,ri=new RegExp("^(aria)-["+V+"]*$"),Je=new RegExp("^(aria)[A-Z]["+V+"]*$");ot=function(l,u,d,g){if(te.call(Xe,u)&&Xe[u])return!0;var b=u.toLowerCase();if(b==="onfocusin"||b==="onfocusout")return i("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Xe[u]=!0,!0;if(g!=null){var k=g.registrationNameDependencies,R=g.possibleRegistrationNames;if(k.hasOwnProperty(u))return!0;var M=R.hasOwnProperty(b)?R[b]:null;if(M!=null)return i("Invalid event handler property `%s`. Did you mean `%s`?",u,M),Xe[u]=!0,!0;if(ti.test(u))return i("Unknown event handler property `%s`. It will be ignored.",u),Xe[u]=!0,!0}else if(ti.test(u))return ni.test(u)&&i("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",u),Xe[u]=!0,!0;if(ri.test(u)||Je.test(u))return!0;if(b==="innerhtml")return i("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Xe[u]=!0,!0;if(b==="aria")return i("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Xe[u]=!0,!0;if(b==="is"&&d!==null&&d!==void 0&&typeof d!="string")return i("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof d),Xe[u]=!0,!0;if(typeof d=="number"&&isNaN(d))return i("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",u),Xe[u]=!0,!0;var F=lt(u),U=F!==null&&F.type===G;if(Vt.hasOwnProperty(b)){var H=Vt[b];if(H!==u)return i("Invalid DOM property `%s`. Did you mean `%s`?",u,H),Xe[u]=!0,!0}else if(!U&&u!==b)return i("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",u,b),Xe[u]=!0,!0;return typeof d=="boolean"&&be(u,d,F)?(d?i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',d,u,u,d,u):i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',d,u,u,d,u,u,u),Xe[u]=!0,!0):U?!0:be(u,d,F)?(Xe[u]=!0,!1):((d==="false"||d==="true")&&F!==null&&F.type===Q&&(i("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",d,u,d==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',u,d),Xe[u]=!0),!0)}}var ii=function(l,u,d){{var g=[];for(var b in u){var k=ot(l,b,u[b],d);k||g.push(b)}var R=g.map(function(M){return"`"+M+"`"}).join(", ");g.length===1?i("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",R,l):g.length>1&&i("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",R,l)}};function Ji(l,u,d){Sr(l,u)||ii(l,u,d)}var Yi=function(){};{var oi=/^(?:webkit|moz|o)[A-Z]/,xr=/^-ms-/,ts=/-(.)/g,si=/;\s*$/,In={},li={},Ki=!1,ft=!1,on=function(l){return l.replace(ts,function(u,d){return d.toUpperCase()})},Mn=function(l){In.hasOwnProperty(l)&&In[l]||(In[l]=!0,i("Unsupported style property %s. Did you mean %s?",l,on(l.replace(xr,"ms-"))))},Oe=function(l){In.hasOwnProperty(l)&&In[l]||(In[l]=!0,i("Unsupported vendor-prefixed style property %s. Did you mean %s?",l,l.charAt(0).toUpperCase()+l.slice(1)))},Dn=function(l,u){li.hasOwnProperty(u)&&li[u]||(li[u]=!0,i(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,l,u.replace(si,"")))},kr=function(l,u){Ki||(Ki=!0,i("`NaN` is an invalid value for the `%s` css style property.",l))},rr=function(l,u){ft||(ft=!0,i("`Infinity` is an invalid value for the `%s` css style property.",l))};Yi=function(l,u){l.indexOf("-")>-1?Mn(l):oi.test(l)?Oe(l):si.test(u)&&Dn(l,u),typeof u=="number"&&(isNaN(u)?kr(l,u):isFinite(u)||rr(l,u))}}var sn=Yi,Cr=/["'&<>]/;function Sn(l){oe(l);var u=""+l,d=Cr.exec(u);if(!d)return u;var g,b="",k,R=0;for(k=d.index;k<u.length;k++){switch(u.charCodeAt(k)){case 34:g="&quot;";break;case 38:g="&amp;";break;case 39:g="&#x27;";break;case 60:g="&lt;";break;case 62:g="&gt;";break;default:continue}R!==k&&(b+=u.substring(R,k)),R=k+1,b+=g}return R!==k?b+u.substring(R,k):b}function et(l){return typeof l=="boolean"||typeof l=="number"?""+l:Sn(l)}var ai=/([A-Z])/g,ci=/^ms-/;function Xi(l){return l.replace(ai,"-$1").toLowerCase().replace(ci,"-ms-")}var Ye=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,ui=!1;function ns(l){!ui&&Ye.test(l)&&(ui=!0,i("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(l)))}var rs=Array.isArray;function ln(l){return rs(l)}var fi="<script>";function Er(l,u,d,g,b){var k=l===void 0?"":l,R=fi,M=[];return{bootstrapChunks:M,startInlineScript:R,placeholderPrefix:k+"P:",segmentPrefix:k+"S:",boundaryPrefix:k+"B:",idPrefix:k,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}var Pn=0,Ct=1,an=2,Tr=3,_n=4,Nn=5,cn=6,Fn=7;function Et(l,u){return{insertionMode:l,selectedValue:u}}function Zi(l,u,d){switch(u){case"select":return Et(Ct,d.value!=null?d.value:d.defaultValue);case"svg":return Et(an,null);case"math":return Et(Tr,null);case"foreignObject":return Et(Ct,null);case"table":return Et(_n,null);case"thead":case"tbody":case"tfoot":return Et(Nn,null);case"colgroup":return Et(Fn,null);case"tr":return Et(cn,null)}return l.insertionMode>=_n||l.insertionMode===Pn?Et(Ct,null):l}var Qi=null;function wn(l){var u=l.nextSuspenseID++;return l.boundaryPrefix+u.toString(16)}function Ke(l,u,d){var g=l.idPrefix,b=":"+g+"R"+u;return d>0&&(b+="H"+d.toString(32)),b+":"}function un(l){return et(l)}var fn="<!-- -->";function Ln(l,u,d,g){return u===""?g:(g&&l.push(fn),l.push(un(u)),!0)}function Rr(l,u,d,g){d&&g&&l.push(fn)}var Gt=new Map;function dn(l){var u=Gt.get(l);if(u!==void 0)return u;var d=et(Xi(l));return Gt.set(l,d),d}var dt=' style="',Bn=":",ir=";";function Ar(l,u,d){if(typeof d!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var g=!0;for(var b in d)if(te.call(d,b)){var k=d[b];if(!(k==null||typeof k=="boolean"||k==="")){var R=void 0,M=void 0,F=b.indexOf("--")===0;F?(R=et(b),ie(k,b),M=et((""+k).trim())):(sn(b,k),R=dn(b),typeof k=="number"?k!==0&&!te.call(Qn,b)?M=k+"px":M=""+k:(ie(k,b),M=et((""+k).trim()))),g?(g=!1,l.push(dt,R,Bn,M)):l.push(ir,R,Bn,M)}}g||l.push(ht)}var Nt=" ",hn='="',ht='"',Or='=""';function rt(l,u,d,g){switch(d){case"style":{Ar(l,u,g);return}case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(d.length>2&&(d[0]==="o"||d[0]==="O")&&(d[1]==="n"||d[1]==="N"))){var b=lt(d);if(b!==null){switch(typeof g){case"function":case"symbol":return;case"boolean":if(!b.acceptsBooleans)return}var k=b.attributeName,R=k;switch(b.type){case Q:g&&l.push(Nt,R,Or);return;case Ee:g===!0?l.push(Nt,R,Or):g===!1||l.push(Nt,R,hn,et(g),ht);return;case re:isNaN(g)||l.push(Nt,R,hn,et(g),ht);break;case X:!isNaN(g)&&g>=1&&l.push(Nt,R,hn,et(g),ht);break;default:b.sanitizeURL&&(J(g,k),g=""+g,ns(g)),l.push(Nt,R,hn,et(g),ht)}}else if(Ie(d)){switch(typeof g){case"function":case"symbol":return;case"boolean":{var M=d.toLowerCase().slice(0,5);if(M!=="data-"&&M!=="aria-")return}}l.push(Nt,d,hn,et(g),ht)}}}var Tt=">",y="/>";function x(l,u,d){if(u!=null){if(d!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof u!="object"||!("__html"in u))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var g=u.__html;g!=null&&(oe(g),l.push(""+g))}}var A=!1,I=!1,B=!1,N=!1,z=!1,Y=!1,se=!1;function ce(l,u){{var d=l[u];if(d!=null){var g=ln(d);l.multiple&&!g?i("The `%s` prop supplied to <select> must be an array if `multiple` is true.",u):!l.multiple&&g&&i("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",u)}}}function le(l,u,d){at("select",u),ce(u,"value"),ce(u,"defaultValue"),u.value!==void 0&&u.defaultValue!==void 0&&!B&&(i("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),B=!0),l.push(gn("select"));var g=null,b=null;for(var k in u)if(te.call(u,k)){var R=u[k];if(R==null)continue;switch(k){case"children":g=R;break;case"dangerouslySetInnerHTML":b=R;break;case"defaultValue":case"value":break;default:rt(l,d,k,R);break}}return l.push(Tt),x(l,b,g),g}function Te(l){var u="";return n.Children.forEach(l,function(d){d!=null&&(u+=d,!z&&typeof d!="string"&&typeof d!="number"&&(z=!0,i("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),u}var pt=' selected=""';function gt(l,u,d,g){var b=g.selectedValue;l.push(gn("option"));var k=null,R=null,M=null,F=null;for(var U in u)if(te.call(u,U)){var H=u[U];if(H==null)continue;switch(U){case"children":k=H;break;case"selected":M=H,se||(i("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),se=!0);break;case"dangerouslySetInnerHTML":F=H;break;case"value":R=H;default:rt(l,d,U,H);break}}if(b!=null){var q;if(R!==null?(J(R,"value"),q=""+R):(F!==null&&(Y||(Y=!0,i("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),q=Te(k)),ln(b))for(var de=0;de<b.length;de++){J(b[de],"value");var Ae=""+b[de];if(Ae===q){l.push(pt);break}}else J(b,"select.value"),""+b===q&&l.push(pt)}else M&&l.push(pt);return l.push(Tt),x(l,F,k),k}function mt(l,u,d){at("input",u),u.checked!==void 0&&u.defaultChecked!==void 0&&!I&&(i("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",u.type),I=!0),u.value!==void 0&&u.defaultValue!==void 0&&!A&&(i("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",u.type),A=!0),l.push(gn("input"));var g=null,b=null,k=null,R=null;for(var M in u)if(te.call(u,M)){var F=u[M];if(F==null)continue;switch(M){case"children":case"dangerouslySetInnerHTML":throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"defaultChecked":R=F;break;case"defaultValue":b=F;break;case"checked":k=F;break;case"value":g=F;break;default:rt(l,d,M,F);break}}return k!==null?rt(l,d,"checked",k):R!==null&&rt(l,d,"checked",R),g!==null?rt(l,d,"value",g):b!==null&&rt(l,d,"value",b),l.push(y),null}function $n(l,u,d){at("textarea",u),u.value!==void 0&&u.defaultValue!==void 0&&!N&&(i("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"),N=!0),l.push(gn("textarea"));var g=null,b=null,k=null;for(var R in u)if(te.call(u,R)){var M=u[R];if(M==null)continue;switch(R){case"children":k=M;break;case"value":g=M;break;case"defaultValue":b=M;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:rt(l,d,R,M);break}}if(g===null&&b!==null&&(g=b),l.push(Tt),k!=null){if(i("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),g!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(ln(k)){if(k.length>1)throw new Error("<textarea> can only have at most one child.");oe(k[0]),g=""+k[0]}oe(k),g=""+k}return typeof g=="string"&&g[0]===`
54
+ */var sw;function $z(){return sw||(sw=1,process.env.NODE_ENV!=="production"&&function(){var n=rl,e="18.3.1",t=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(l){{for(var u=arguments.length,d=new Array(u>1?u-1:0),g=1;g<u;g++)d[g-1]=arguments[g];o("warn",l,d)}}function i(l){{for(var u=arguments.length,d=new Array(u>1?u-1:0),g=1;g<u;g++)d[g-1]=arguments[g];o("error",l,d)}}function o(l,u,d){{var g=t.ReactDebugCurrentFrame,b=g.getStackAddendum();b!==""&&(u+="%s",d=d.concat([b]));var k=d.map(function(R){return String(R)});k.unshift("Warning: "+u),Function.prototype.apply.call(console[l],console,k)}}function s(l){l()}function a(l){}function c(l,u){f(l,u)}function f(l,u){return l.push(u)}function p(l){}function m(l){l.push(null)}function S(l){return l}function C(l){return l}function E(l,u){l.destroy(u)}function P(l){{var u=typeof Symbol=="function"&&Symbol.toStringTag,d=u&&l[Symbol.toStringTag]||l.constructor.name||"Object";return d}}function D(l){try{return _(l),!1}catch{return!0}}function _(l){return""+l}function J(l,u){if(D(l))return i("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",u,P(l)),_(l)}function ie(l,u){if(D(l))return i("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",u,P(l)),_(l)}function oe(l){if(D(l))return i("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",P(l)),_(l)}var te=Object.prototype.hasOwnProperty,G=0,ne=1,ae=2,Q=3,Ee=4,re=5,X=6,fe=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",V=fe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",De=new RegExp("^["+fe+"]["+V+"]*$"),ye={},xe={};function Ie(l){return te.call(xe,l)?!0:te.call(ye,l)?!1:De.test(l)?(xe[l]=!0,!0):(ye[l]=!0,i("Invalid attribute name: `%s`",l),!1)}function be(l,u,d,g){if(d!==null&&d.type===G)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":{if(d!==null)return!d.acceptsBooleans;var b=l.toLowerCase().slice(0,5);return b!=="data-"&&b!=="aria-"}default:return!1}}function lt(l){return Me.hasOwnProperty(l)?Me[l]:null}function pe(l,u,d,g,b,k,R){this.acceptsBooleans=u===ae||u===Q||u===Ee,this.attributeName=g,this.attributeNamespace=b,this.mustUseProperty=d,this.propertyName=l,this.type=u,this.sanitizeURL=k,this.removeEmptyString=R}var Me={},it=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];it.forEach(function(l){Me[l]=new pe(l,G,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var u=l[0],d=l[1];Me[u]=new pe(u,ne,!1,d,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){Me[l]=new pe(l,ae,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){Me[l]=new pe(l,ae,!1,l,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(l){Me[l]=new pe(l,Q,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){Me[l]=new pe(l,Q,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){Me[l]=new pe(l,Ee,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){Me[l]=new pe(l,X,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){Me[l]=new pe(l,re,!1,l.toLowerCase(),null,!1,!1)});var _t=/[\-\:]([a-z])/g,Fe=function(l){return l[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(l){var u=l.replace(_t,Fe);Me[u]=new pe(u,ne,!1,l,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(l){var u=l.replace(_t,Fe);Me[u]=new pe(u,ne,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var u=l.replace(_t,Fe);Me[u]=new pe(u,ne,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){Me[l]=new pe(l,ne,!1,l.toLowerCase(),null,!1,!1)});var je="xlinkHref";Me[je]=new pe("xlinkHref",ne,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){Me[l]=new pe(l,ne,!1,l.toLowerCase(),null,!0,!0)});var Qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function qn(l,u){return l+u.charAt(0).toUpperCase()+u.substring(1)}var kt=["Webkit","ms","Moz","O"];Object.keys(Qn).forEach(function(l){kt.forEach(function(u){Qn[qn(u,l)]=Qn[l]})});var bn={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function at(l,u){bn[u.type]||u.onChange||u.onInput||u.readOnly||u.disabled||u.value==null||i("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),u.onChange||u.readOnly||u.disabled||u.checked==null||i("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Sr(l,u){if(l.indexOf("-")===-1)return typeof u.is=="string";switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qe={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},ct={},wr=new RegExp("^(aria)-["+V+"]*$"),er=new RegExp("^(aria)[A-Z]["+V+"]*$");function Vi(l,u){{if(te.call(ct,u)&&ct[u])return!0;if(er.test(u)){var d="aria-"+u.slice(4).toLowerCase(),g=qe.hasOwnProperty(d)?d:null;if(g==null)return i("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",u),ct[u]=!0,!0;if(u!==g)return i("Invalid ARIA attribute `%s`. Did you mean `%s`?",u,g),ct[u]=!0,!0}if(wr.test(u)){var b=u.toLowerCase(),k=qe.hasOwnProperty(b)?b:null;if(k==null)return ct[u]=!0,!1;if(u!==k)return i("Unknown ARIA attribute `%s`. Did you mean `%s`?",u,k),ct[u]=!0,!0}}return!0}function Ht(l,u){{var d=[];for(var g in u){var b=Vi(l,g);b||d.push(g)}var k=d.map(function(R){return"`"+R+"`"}).join(", ");d.length===1?i("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",k,l):d.length>1&&i("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",k,l)}}function tr(l,u){Sr(l,u)||Ht(l,u)}var nr=!1;function Gi(l,u){{if(l!=="input"&&l!=="textarea"&&l!=="select")return;u!=null&&u.value===null&&!nr&&(nr=!0,l==="select"&&u.multiple?i("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",l):i("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",l))}}var Vt={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},ot=function(){};{var Xe={},ti=/^on./,ni=/^on[^A-Z]/,ri=new RegExp("^(aria)-["+V+"]*$"),Je=new RegExp("^(aria)[A-Z]["+V+"]*$");ot=function(l,u,d,g){if(te.call(Xe,u)&&Xe[u])return!0;var b=u.toLowerCase();if(b==="onfocusin"||b==="onfocusout")return i("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Xe[u]=!0,!0;if(g!=null){var k=g.registrationNameDependencies,R=g.possibleRegistrationNames;if(k.hasOwnProperty(u))return!0;var M=R.hasOwnProperty(b)?R[b]:null;if(M!=null)return i("Invalid event handler property `%s`. Did you mean `%s`?",u,M),Xe[u]=!0,!0;if(ti.test(u))return i("Unknown event handler property `%s`. It will be ignored.",u),Xe[u]=!0,!0}else if(ti.test(u))return ni.test(u)&&i("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",u),Xe[u]=!0,!0;if(ri.test(u)||Je.test(u))return!0;if(b==="innerhtml")return i("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Xe[u]=!0,!0;if(b==="aria")return i("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Xe[u]=!0,!0;if(b==="is"&&d!==null&&d!==void 0&&typeof d!="string")return i("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof d),Xe[u]=!0,!0;if(typeof d=="number"&&isNaN(d))return i("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",u),Xe[u]=!0,!0;var F=lt(u),U=F!==null&&F.type===G;if(Vt.hasOwnProperty(b)){var H=Vt[b];if(H!==u)return i("Invalid DOM property `%s`. Did you mean `%s`?",u,H),Xe[u]=!0,!0}else if(!U&&u!==b)return i("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",u,b),Xe[u]=!0,!0;return typeof d=="boolean"&&be(u,d,F)?(d?i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',d,u,u,d,u):i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',d,u,u,d,u,u,u),Xe[u]=!0,!0):U?!0:be(u,d,F)?(Xe[u]=!0,!1):((d==="false"||d==="true")&&F!==null&&F.type===Q&&(i("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",d,u,d==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',u,d),Xe[u]=!0),!0)}}var ii=function(l,u,d){{var g=[];for(var b in u){var k=ot(l,b,u[b],d);k||g.push(b)}var R=g.map(function(M){return"`"+M+"`"}).join(", ");g.length===1?i("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",R,l):g.length>1&&i("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",R,l)}};function Ji(l,u,d){Sr(l,u)||ii(l,u,d)}var Yi=function(){};{var oi=/^(?:webkit|moz|o)[A-Z]/,xr=/^-ms-/,ts=/-(.)/g,si=/;\s*$/,In={},li={},Ki=!1,ft=!1,on=function(l){return l.replace(ts,function(u,d){return d.toUpperCase()})},Mn=function(l){In.hasOwnProperty(l)&&In[l]||(In[l]=!0,i("Unsupported style property %s. Did you mean %s?",l,on(l.replace(xr,"ms-"))))},Oe=function(l){In.hasOwnProperty(l)&&In[l]||(In[l]=!0,i("Unsupported vendor-prefixed style property %s. Did you mean %s?",l,l.charAt(0).toUpperCase()+l.slice(1)))},Dn=function(l,u){li.hasOwnProperty(u)&&li[u]||(li[u]=!0,i(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,l,u.replace(si,"")))},kr=function(l,u){Ki||(Ki=!0,i("`NaN` is an invalid value for the `%s` css style property.",l))},rr=function(l,u){ft||(ft=!0,i("`Infinity` is an invalid value for the `%s` css style property.",l))};Yi=function(l,u){l.indexOf("-")>-1?Mn(l):oi.test(l)?Oe(l):si.test(u)&&Dn(l,u),typeof u=="number"&&(isNaN(u)?kr(l,u):isFinite(u)||rr(l,u))}}var sn=Yi,Cr=/["'&<>]/;function Sn(l){oe(l);var u=""+l,d=Cr.exec(u);if(!d)return u;var g,b="",k,R=0;for(k=d.index;k<u.length;k++){switch(u.charCodeAt(k)){case 34:g="&quot;";break;case 38:g="&amp;";break;case 39:g="&#x27;";break;case 60:g="&lt;";break;case 62:g="&gt;";break;default:continue}R!==k&&(b+=u.substring(R,k)),R=k+1,b+=g}return R!==k?b+u.substring(R,k):b}function et(l){return typeof l=="boolean"||typeof l=="number"?""+l:Sn(l)}var ai=/([A-Z])/g,ci=/^ms-/;function Xi(l){return l.replace(ai,"-$1").toLowerCase().replace(ci,"-ms-")}var Ye=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,ui=!1;function ns(l){!ui&&Ye.test(l)&&(ui=!0,i("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(l)))}var rs=Array.isArray;function ln(l){return rs(l)}var fi="<script>";function Er(l,u,d,g,b){var k=l===void 0?"":l,R=fi,M=[];return{bootstrapChunks:M,startInlineScript:R,placeholderPrefix:k+"P:",segmentPrefix:k+"S:",boundaryPrefix:k+"B:",idPrefix:k,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}var Pn=0,Ct=1,an=2,Tr=3,_n=4,Nn=5,cn=6,Fn=7;function Et(l,u){return{insertionMode:l,selectedValue:u}}function Zi(l,u,d){switch(u){case"select":return Et(Ct,d.value!=null?d.value:d.defaultValue);case"svg":return Et(an,null);case"math":return Et(Tr,null);case"foreignObject":return Et(Ct,null);case"table":return Et(_n,null);case"thead":case"tbody":case"tfoot":return Et(Nn,null);case"colgroup":return Et(Fn,null);case"tr":return Et(cn,null)}return l.insertionMode>=_n||l.insertionMode===Pn?Et(Ct,null):l}var Qi=null;function wn(l){var u=l.nextSuspenseID++;return l.boundaryPrefix+u.toString(16)}function Ke(l,u,d){var g=l.idPrefix,b=":"+g+"R"+u;return d>0&&(b+="H"+d.toString(32)),b+":"}function un(l){return et(l)}var fn="<!-- -->";function Ln(l,u,d,g){return u===""?g:(g&&l.push(fn),l.push(un(u)),!0)}function Rr(l,u,d,g){d&&g&&l.push(fn)}var Gt=new Map;function dn(l){var u=Gt.get(l);if(u!==void 0)return u;var d=et(Xi(l));return Gt.set(l,d),d}var dt=' style="',Bn=":",ir=";";function Ar(l,u,d){if(typeof d!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var g=!0;for(var b in d)if(te.call(d,b)){var k=d[b];if(!(k==null||typeof k=="boolean"||k==="")){var R=void 0,M=void 0,F=b.indexOf("--")===0;F?(R=et(b),ie(k,b),M=et((""+k).trim())):(sn(b,k),R=dn(b),typeof k=="number"?k!==0&&!te.call(Qn,b)?M=k+"px":M=""+k:(ie(k,b),M=et((""+k).trim()))),g?(g=!1,l.push(dt,R,Bn,M)):l.push(ir,R,Bn,M)}}g||l.push(ht)}var Nt=" ",hn='="',ht='"',Or='=""';function rt(l,u,d,g){switch(d){case"style":{Ar(l,u,g);return}case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(d.length>2&&(d[0]==="o"||d[0]==="O")&&(d[1]==="n"||d[1]==="N"))){var b=lt(d);if(b!==null){switch(typeof g){case"function":case"symbol":return;case"boolean":if(!b.acceptsBooleans)return}var k=b.attributeName,R=k;switch(b.type){case Q:g&&l.push(Nt,R,Or);return;case Ee:g===!0?l.push(Nt,R,Or):g===!1||l.push(Nt,R,hn,et(g),ht);return;case re:isNaN(g)||l.push(Nt,R,hn,et(g),ht);break;case X:!isNaN(g)&&g>=1&&l.push(Nt,R,hn,et(g),ht);break;default:b.sanitizeURL&&(J(g,k),g=""+g,ns(g)),l.push(Nt,R,hn,et(g),ht)}}else if(Ie(d)){switch(typeof g){case"function":case"symbol":return;case"boolean":{var M=d.toLowerCase().slice(0,5);if(M!=="data-"&&M!=="aria-")return}}l.push(Nt,d,hn,et(g),ht)}}}var Tt=">",y="/>";function x(l,u,d){if(u!=null){if(d!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof u!="object"||!("__html"in u))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var g=u.__html;g!=null&&(oe(g),l.push(""+g))}}var A=!1,I=!1,B=!1,N=!1,z=!1,Y=!1,se=!1;function ce(l,u){{var d=l[u];if(d!=null){var g=ln(d);l.multiple&&!g?i("The `%s` prop supplied to <select> must be an array if `multiple` is true.",u):!l.multiple&&g&&i("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",u)}}}function le(l,u,d){at("select",u),ce(u,"value"),ce(u,"defaultValue"),u.value!==void 0&&u.defaultValue!==void 0&&!B&&(i("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),B=!0),l.push(gn("select"));var g=null,b=null;for(var k in u)if(te.call(u,k)){var R=u[k];if(R==null)continue;switch(k){case"children":g=R;break;case"dangerouslySetInnerHTML":b=R;break;case"defaultValue":case"value":break;default:rt(l,d,k,R);break}}return l.push(Tt),x(l,b,g),g}function Te(l){var u="";return n.Children.forEach(l,function(d){d!=null&&(u+=d,!z&&typeof d!="string"&&typeof d!="number"&&(z=!0,i("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),u}var pt=' selected=""';function gt(l,u,d,g){var b=g.selectedValue;l.push(gn("option"));var k=null,R=null,M=null,F=null;for(var U in u)if(te.call(u,U)){var H=u[U];if(H==null)continue;switch(U){case"children":k=H;break;case"selected":M=H,se||(i("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),se=!0);break;case"dangerouslySetInnerHTML":F=H;break;case"value":R=H;default:rt(l,d,U,H);break}}if(b!=null){var q;if(R!==null?(J(R,"value"),q=""+R):(F!==null&&(Y||(Y=!0,i("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),q=Te(k)),ln(b))for(var de=0;de<b.length;de++){J(b[de],"value");var Ae=""+b[de];if(Ae===q){l.push(pt);break}}else J(b,"select.value"),""+b===q&&l.push(pt)}else M&&l.push(pt);return l.push(Tt),x(l,F,k),k}function mt(l,u,d){at("input",u),u.checked!==void 0&&u.defaultChecked!==void 0&&!I&&(i("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",u.type),I=!0),u.value!==void 0&&u.defaultValue!==void 0&&!A&&(i("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",u.type),A=!0),l.push(gn("input"));var g=null,b=null,k=null,R=null;for(var M in u)if(te.call(u,M)){var F=u[M];if(F==null)continue;switch(M){case"children":case"dangerouslySetInnerHTML":throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"defaultChecked":R=F;break;case"defaultValue":b=F;break;case"checked":k=F;break;case"value":g=F;break;default:rt(l,d,M,F);break}}return k!==null?rt(l,d,"checked",k):R!==null&&rt(l,d,"checked",R),g!==null?rt(l,d,"value",g):b!==null&&rt(l,d,"value",b),l.push(y),null}function $n(l,u,d){at("textarea",u),u.value!==void 0&&u.defaultValue!==void 0&&!N&&(i("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"),N=!0),l.push(gn("textarea"));var g=null,b=null,k=null;for(var R in u)if(te.call(u,R)){var M=u[R];if(M==null)continue;switch(R){case"children":k=M;break;case"value":g=M;break;case"defaultValue":b=M;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:rt(l,d,R,M);break}}if(g===null&&b!==null&&(g=b),l.push(Tt),k!=null){if(i("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),g!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(ln(k)){if(k.length>1)throw new Error("<textarea> can only have at most one child.");oe(k[0]),g=""+k[0]}oe(k),g=""+k}return typeof g=="string"&&g[0]===`
55
55
  `&&l.push(sr),g!==null&&(J(g,"value"),l.push(un(""+g))),null}function pn(l,u,d,g){l.push(gn(d));for(var b in u)if(te.call(u,b)){var k=u[b];if(k==null)continue;switch(b){case"children":case"dangerouslySetInnerHTML":throw new Error(d+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:rt(l,g,b,k);break}}return l.push(y),null}function Ir(l,u,d){l.push(gn("menuitem"));for(var g in u)if(te.call(u,g)){var b=u[g];if(b==null)continue;switch(g){case"children":case"dangerouslySetInnerHTML":throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:rt(l,d,g,b);break}}return l.push(Tt),null}function zn(l,u,d){l.push(gn("title"));var g=null;for(var b in u)if(te.call(u,b)){var k=u[b];if(k==null)continue;switch(b){case"children":g=k;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:rt(l,d,b,k);break}}l.push(Tt);{var R=Array.isArray(g)&&g.length<2?g[0]||null:g;Array.isArray(g)&&g.length>1?i("A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"):R!=null&&R.$$typeof!=null?i("A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"):R!=null&&typeof R!="string"&&typeof R!="number"&&i("A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering")}return g}function or(l,u,d,g){l.push(gn(d));var b=null,k=null;for(var R in u)if(te.call(u,R)){var M=u[R];if(M==null)continue;switch(R){case"children":b=M;break;case"dangerouslySetInnerHTML":k=M;break;default:rt(l,g,R,M);break}}return l.push(Tt),x(l,k,b),typeof b=="string"?(l.push(un(b)),null):b}function xn(l,u,d,g){l.push(gn(d));var b=null,k=null;for(var R in u)if(te.call(u,R)){var M=u[R];if(M==null)continue;switch(R){case"children":b=M;break;case"dangerouslySetInnerHTML":k=M;break;case"style":Ar(l,g,M);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:Ie(R)&&typeof M!="function"&&typeof M!="symbol"&&l.push(Nt,R,hn,et(M),ht);break}}return l.push(Tt),x(l,k,b),b}var sr=`
56
- `;function Xa(l,u,d,g){l.push(gn(d));var b=null,k=null;for(var R in u)if(te.call(u,R)){var M=u[R];if(M==null)continue;switch(R){case"children":b=M;break;case"dangerouslySetInnerHTML":k=M;break;default:rt(l,g,R,M);break}}if(l.push(Tt),k!=null){if(b!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof k!="object"||!("__html"in k))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var F=k.__html;F!=null&&(typeof F=="string"&&F.length>0&&F[0]===`
56
+ `;function Qa(l,u,d,g){l.push(gn(d));var b=null,k=null;for(var R in u)if(te.call(u,R)){var M=u[R];if(M==null)continue;switch(R){case"children":b=M;break;case"dangerouslySetInnerHTML":k=M;break;default:rt(l,g,R,M);break}}if(l.push(Tt),k!=null){if(b!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof k!="object"||!("__html"in k))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var F=k.__html;F!=null&&(typeof F=="string"&&F.length>0&&F[0]===`
57
57
  `?l.push(sr,F):(oe(F),l.push(""+F)))}return typeof b=="string"&&b[0]===`
58
- `&&l.push(sr),b}var Za=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,qi=new Map;function gn(l){var u=qi.get(l);if(u===void 0){if(!Za.test(l))throw new Error("Invalid tag: "+l);u="<"+l,qi.set(l,u)}return u}var Qa="<!DOCTYPE html>";function kn(l,u,d,g,b){switch(tr(u,d),Gi(u,d),Ji(u,d,null),!d.suppressContentEditableWarning&&d.contentEditable&&d.children!=null&&i("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),b.insertionMode!==an&&b.insertionMode!==Tr&&u.indexOf("-")===-1&&typeof d.is!="string"&&u.toLowerCase()!==u&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",u),u){case"select":return le(l,d,g);case"option":return gt(l,d,g,b);case"textarea":return $n(l,d,g);case"input":return mt(l,d,g);case"menuitem":return Ir(l,d,g);case"title":return zn(l,d,g);case"listing":case"pre":return Xa(l,d,u,g);case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":return pn(l,d,u,g);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return or(l,d,u,g);case"html":return b.insertionMode===Pn&&l.push(Qa),or(l,d,u,g);default:return u.indexOf("-")===-1&&typeof d.is!="string"?or(l,d,u,g):xn(l,d,u,g)}}var is="</",eo=">";function Pe(l,u,d){switch(u){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:l.push(is,u,eo)}}function lr(l,u){for(var d=u.bootstrapChunks,g=0;g<d.length-1;g++)c(l,d[g]);return g<d.length?f(l,d[g]):!0}var to='<template id="',ar='"></template>';function jn(l,u,d){c(l,to),c(l,u.placeholderPrefix);var g=d.toString(16);return c(l,g),f(l,ar)}var no="<!--$-->",Un='<!--$?--><template id="',Jt='"></template>',ss="<!--$!-->",di="<!--/$-->",ul="<template",ro='"',fl=' data-dgst="',qa=' data-msg="',ec=' data-stck="',io="></template>";function dl(l,u){return f(l,no)}function hi(l,u,d){if(c(l,Un),d===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return c(l,d),f(l,Jt)}function ls(l,u,d,g,b){var k;return k=f(l,ss),c(l,ul),d&&(c(l,fl),c(l,et(d)),c(l,ro)),g&&(c(l,qa),c(l,et(g)),c(l,ro)),b&&(c(l,ec),c(l,et(b)),c(l,ro)),k=f(l,io),k}function tc(l,u){return f(l,di)}function Mr(l,u){return f(l,di)}function as(l,u){return f(l,di)}var cs='<div hidden id="',Dr='">',pi="</div>",oo='<svg aria-hidden="true" style="display:none" id="',hl='">',pl="</svg>",gl='<math aria-hidden="true" style="display:none" id="',so='">',Rt="</math>",ml='<table hidden id="',lo='">',nc="</table>",yl='<table hidden><tbody id="',ao='">',vl="</tbody></table>",bl='<table hidden><tr id="',co='">',uo="</tr></table>",Sl='<table hidden><colgroup id="',wl='">',xl="</colgroup></table>";function us(l,u,d,g){switch(d.insertionMode){case Pn:case Ct:return c(l,cs),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,Dr);case an:return c(l,oo),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,hl);case Tr:return c(l,gl),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,so);case _n:return c(l,ml),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,lo);case Nn:return c(l,yl),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,ao);case cn:return c(l,bl),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,co);case Fn:return c(l,Sl),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,wl);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function kl(l,u){switch(u.insertionMode){case Pn:case Ct:return f(l,pi);case an:return f(l,pl);case Tr:return f(l,Rt);case _n:return f(l,nc);case Nn:return f(l,vl);case cn:return f(l,uo);case Fn:return f(l,xl);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var v="function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}",w='function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}',T='function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}',O=v+';$RS("',$='$RS("',L='","',j='")<\/script>';function K(l,u,d){c(l,u.startInlineScript),u.sentCompleteSegmentFunction?c(l,$):(u.sentCompleteSegmentFunction=!0,c(l,O)),c(l,u.segmentPrefix);var g=d.toString(16);return c(l,g),c(l,L),c(l,u.placeholderPrefix),c(l,g),f(l,j)}var ue=w+';$RC("',ve='$RC("',ge='","',Ne='")<\/script>';function At(l,u,d,g){if(c(l,u.startInlineScript),u.sentCompleteBoundaryFunction?c(l,ve):(u.sentCompleteBoundaryFunction=!0,c(l,ue)),d===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var b=g.toString(16);return c(l,d),c(l,ge),c(l,u.segmentPrefix),c(l,b),f(l,Ne)}var Yt=T+';$RX("',Kt='$RX("',fo='"',Cl=")<\/script>",gi=",";function Vh(l,u,d,g,b,k){if(c(l,u.startInlineScript),u.sentClientRenderFunction?c(l,Kt):(u.sentClientRenderFunction=!0,c(l,Yt)),d===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return c(l,d),c(l,fo),(g||b||k)&&(c(l,gi),c(l,rc(g||""))),(b||k)&&(c(l,gi),c(l,rc(b||""))),k&&(c(l,gi),c(l,rc(k))),f(l,Cl)}var Gh=/[<\u2028\u2029]/g;function rc(l){var u=JSON.stringify(l);return u.replace(Gh,function(d){switch(d){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function Jh(l,u){var d=Er(u);return{bootstrapChunks:d.bootstrapChunks,startInlineScript:d.startInlineScript,placeholderPrefix:d.placeholderPrefix,segmentPrefix:d.segmentPrefix,boundaryPrefix:d.boundaryPrefix,idPrefix:d.idPrefix,nextSuspenseID:d.nextSuspenseID,sentCompleteSegmentFunction:d.sentCompleteSegmentFunction,sentCompleteBoundaryFunction:d.sentCompleteBoundaryFunction,sentClientRenderFunction:d.sentClientRenderFunction,generateStaticMarkup:l}}function Yh(){return{insertionMode:Ct,selectedValue:null}}function ju(l,u,d,g){return d.generateStaticMarkup?(l.push(et(u)),!1):Ln(l,u,d,g)}function Uu(l,u,d,g){if(!u.generateStaticMarkup)return Rr(l,u,d,g)}function Kh(l,u){return u.generateStaticMarkup?!0:dl(l)}function Xh(l,u,d,g,b){return u.generateStaticMarkup?!0:ls(l,u,d,g,b)}function Zh(l,u){return u.generateStaticMarkup?!0:tc(l)}function Qh(l,u){return u.generateStaticMarkup?!0:as(l)}var Ft=Object.assign,qh=Symbol.for("react.element"),Wu=Symbol.for("react.portal"),El=Symbol.for("react.fragment"),Xt=Symbol.for("react.strict_mode"),Hu=Symbol.for("react.profiler"),Tl=Symbol.for("react.provider"),Rl=Symbol.for("react.context"),Al=Symbol.for("react.forward_ref"),Ol=Symbol.for("react.suspense"),fs=Symbol.for("react.suspense_list"),ds=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),ic=Symbol.for("react.scope"),oc=Symbol.for("react.debug_trace_mode"),sc=Symbol.for("react.legacy_hidden"),Il=Symbol.for("react.default_value"),Vu=Symbol.iterator,ep="@@iterator";function tp(l){if(l===null||typeof l!="object")return null;var u=Vu&&l[Vu]||l[ep];return typeof u=="function"?u:null}function np(l,u,d){var g=l.displayName;if(g)return g;var b=u.displayName||u.name||"";return b!==""?d+"("+b+")":d}function lc(l){return l.displayName||"Context"}function ze(l){if(l==null)return null;if(typeof l.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case El:return"Fragment";case Wu:return"Portal";case Hu:return"Profiler";case Xt:return"StrictMode";case Ol:return"Suspense";case fs:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case Rl:var u=l;return lc(u)+".Consumer";case Tl:var d=l;return lc(d._context)+".Provider";case Al:return np(l,l.render,"ForwardRef");case ds:var g=l.displayName||null;return g!==null?g:ze(l.type)||"Memo";case ho:{var b=l,k=b._payload,R=b._init;try{return ze(R(k))}catch{return null}}}return null}var hs=0,Gu,ac,Be,po,cc,uc,fc;function dc(){}dc.__reactDisabledLog=!0;function Ju(){{if(hs===0){Gu=console.log,ac=console.info,Be=console.warn,po=console.error,cc=console.group,uc=console.groupCollapsed,fc=console.groupEnd;var l={configurable:!0,enumerable:!0,value:dc,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}hs++}}function Yu(){{if(hs--,hs===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ft({},l,{value:Gu}),info:Ft({},l,{value:ac}),warn:Ft({},l,{value:Be}),error:Ft({},l,{value:po}),group:Ft({},l,{value:cc}),groupCollapsed:Ft({},l,{value:uc}),groupEnd:Ft({},l,{value:fc})})}hs<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ml=t.ReactCurrentDispatcher,Dl;function ps(l,u,d){{if(Dl===void 0)try{throw Error()}catch(b){var g=b.stack.trim().match(/\n( *(at )?)/);Dl=g&&g[1]||""}return`
59
- `+Dl+l}}var hc=!1,go;{var pc=typeof WeakMap=="function"?WeakMap:Map;go=new pc}function mi(l,u){if(!l||hc)return"";{var d=go.get(l);if(d!==void 0)return d}var g;hc=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var k;k=Ml.current,Ml.current=null,Ju();try{if(u){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(ut){g=ut}Reflect.construct(l,[],R)}else{try{R.call()}catch(ut){g=ut}l.call(R.prototype)}}else{try{throw Error()}catch(ut){g=ut}l()}}catch(ut){if(ut&&g&&typeof ut.stack=="string"){for(var M=ut.stack.split(`
58
+ `&&l.push(sr),b}var qa=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,qi=new Map;function gn(l){var u=qi.get(l);if(u===void 0){if(!qa.test(l))throw new Error("Invalid tag: "+l);u="<"+l,qi.set(l,u)}return u}var ec="<!DOCTYPE html>";function kn(l,u,d,g,b){switch(tr(u,d),Gi(u,d),Ji(u,d,null),!d.suppressContentEditableWarning&&d.contentEditable&&d.children!=null&&i("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),b.insertionMode!==an&&b.insertionMode!==Tr&&u.indexOf("-")===-1&&typeof d.is!="string"&&u.toLowerCase()!==u&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",u),u){case"select":return le(l,d,g);case"option":return gt(l,d,g,b);case"textarea":return $n(l,d,g);case"input":return mt(l,d,g);case"menuitem":return Ir(l,d,g);case"title":return zn(l,d,g);case"listing":case"pre":return Qa(l,d,u,g);case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":return pn(l,d,u,g);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return or(l,d,u,g);case"html":return b.insertionMode===Pn&&l.push(ec),or(l,d,u,g);default:return u.indexOf("-")===-1&&typeof d.is!="string"?or(l,d,u,g):xn(l,d,u,g)}}var is="</",eo=">";function Pe(l,u,d){switch(u){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:l.push(is,u,eo)}}function lr(l,u){for(var d=u.bootstrapChunks,g=0;g<d.length-1;g++)c(l,d[g]);return g<d.length?f(l,d[g]):!0}var to='<template id="',ar='"></template>';function jn(l,u,d){c(l,to),c(l,u.placeholderPrefix);var g=d.toString(16);return c(l,g),f(l,ar)}var no="<!--$-->",Un='<!--$?--><template id="',Jt='"></template>',ss="<!--$!-->",di="<!--/$-->",fl="<template",ro='"',dl=' data-dgst="',tc=' data-msg="',nc=' data-stck="',io="></template>";function hl(l,u){return f(l,no)}function hi(l,u,d){if(c(l,Un),d===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return c(l,d),f(l,Jt)}function ls(l,u,d,g,b){var k;return k=f(l,ss),c(l,fl),d&&(c(l,dl),c(l,et(d)),c(l,ro)),g&&(c(l,tc),c(l,et(g)),c(l,ro)),b&&(c(l,nc),c(l,et(b)),c(l,ro)),k=f(l,io),k}function rc(l,u){return f(l,di)}function Mr(l,u){return f(l,di)}function as(l,u){return f(l,di)}var cs='<div hidden id="',Dr='">',pi="</div>",oo='<svg aria-hidden="true" style="display:none" id="',pl='">',gl="</svg>",ml='<math aria-hidden="true" style="display:none" id="',so='">',Rt="</math>",yl='<table hidden id="',lo='">',ic="</table>",vl='<table hidden><tbody id="',ao='">',bl="</tbody></table>",Sl='<table hidden><tr id="',co='">',uo="</tr></table>",wl='<table hidden><colgroup id="',xl='">',kl="</colgroup></table>";function us(l,u,d,g){switch(d.insertionMode){case Pn:case Ct:return c(l,cs),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,Dr);case an:return c(l,oo),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,pl);case Tr:return c(l,ml),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,so);case _n:return c(l,yl),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,lo);case Nn:return c(l,vl),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,ao);case cn:return c(l,Sl),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,co);case Fn:return c(l,wl),c(l,u.segmentPrefix),c(l,g.toString(16)),f(l,xl);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function Cl(l,u){switch(u.insertionMode){case Pn:case Ct:return f(l,pi);case an:return f(l,gl);case Tr:return f(l,Rt);case _n:return f(l,ic);case Nn:return f(l,bl);case cn:return f(l,uo);case Fn:return f(l,kl);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var v="function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}",w='function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}',T='function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}',O=v+';$RS("',$='$RS("',L='","',j='")<\/script>';function K(l,u,d){c(l,u.startInlineScript),u.sentCompleteSegmentFunction?c(l,$):(u.sentCompleteSegmentFunction=!0,c(l,O)),c(l,u.segmentPrefix);var g=d.toString(16);return c(l,g),c(l,L),c(l,u.placeholderPrefix),c(l,g),f(l,j)}var ue=w+';$RC("',ve='$RC("',ge='","',Ne='")<\/script>';function At(l,u,d,g){if(c(l,u.startInlineScript),u.sentCompleteBoundaryFunction?c(l,ve):(u.sentCompleteBoundaryFunction=!0,c(l,ue)),d===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var b=g.toString(16);return c(l,d),c(l,ge),c(l,u.segmentPrefix),c(l,b),f(l,Ne)}var Yt=T+';$RX("',Kt='$RX("',fo='"',El=")<\/script>",gi=",";function Xh(l,u,d,g,b,k){if(c(l,u.startInlineScript),u.sentClientRenderFunction?c(l,Kt):(u.sentClientRenderFunction=!0,c(l,Yt)),d===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return c(l,d),c(l,fo),(g||b||k)&&(c(l,gi),c(l,oc(g||""))),(b||k)&&(c(l,gi),c(l,oc(b||""))),k&&(c(l,gi),c(l,oc(k))),f(l,El)}var Zh=/[<\u2028\u2029]/g;function oc(l){var u=JSON.stringify(l);return u.replace(Zh,function(d){switch(d){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function Qh(l,u){var d=Er(u);return{bootstrapChunks:d.bootstrapChunks,startInlineScript:d.startInlineScript,placeholderPrefix:d.placeholderPrefix,segmentPrefix:d.segmentPrefix,boundaryPrefix:d.boundaryPrefix,idPrefix:d.idPrefix,nextSuspenseID:d.nextSuspenseID,sentCompleteSegmentFunction:d.sentCompleteSegmentFunction,sentCompleteBoundaryFunction:d.sentCompleteBoundaryFunction,sentClientRenderFunction:d.sentClientRenderFunction,generateStaticMarkup:l}}function qh(){return{insertionMode:Ct,selectedValue:null}}function Hu(l,u,d,g){return d.generateStaticMarkup?(l.push(et(u)),!1):Ln(l,u,d,g)}function Vu(l,u,d,g){if(!u.generateStaticMarkup)return Rr(l,u,d,g)}function ep(l,u){return u.generateStaticMarkup?!0:hl(l)}function tp(l,u,d,g,b){return u.generateStaticMarkup?!0:ls(l,u,d,g,b)}function np(l,u){return u.generateStaticMarkup?!0:rc(l)}function rp(l,u){return u.generateStaticMarkup?!0:as(l)}var Ft=Object.assign,ip=Symbol.for("react.element"),Gu=Symbol.for("react.portal"),Tl=Symbol.for("react.fragment"),Xt=Symbol.for("react.strict_mode"),Ju=Symbol.for("react.profiler"),Rl=Symbol.for("react.provider"),Al=Symbol.for("react.context"),Ol=Symbol.for("react.forward_ref"),Il=Symbol.for("react.suspense"),fs=Symbol.for("react.suspense_list"),ds=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),sc=Symbol.for("react.scope"),lc=Symbol.for("react.debug_trace_mode"),ac=Symbol.for("react.legacy_hidden"),Ml=Symbol.for("react.default_value"),Yu=Symbol.iterator,op="@@iterator";function sp(l){if(l===null||typeof l!="object")return null;var u=Yu&&l[Yu]||l[op];return typeof u=="function"?u:null}function lp(l,u,d){var g=l.displayName;if(g)return g;var b=u.displayName||u.name||"";return b!==""?d+"("+b+")":d}function cc(l){return l.displayName||"Context"}function ze(l){if(l==null)return null;if(typeof l.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case Tl:return"Fragment";case Gu:return"Portal";case Ju:return"Profiler";case Xt:return"StrictMode";case Il:return"Suspense";case fs:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case Al:var u=l;return cc(u)+".Consumer";case Rl:var d=l;return cc(d._context)+".Provider";case Ol:return lp(l,l.render,"ForwardRef");case ds:var g=l.displayName||null;return g!==null?g:ze(l.type)||"Memo";case ho:{var b=l,k=b._payload,R=b._init;try{return ze(R(k))}catch{return null}}}return null}var hs=0,Ku,uc,Be,po,fc,dc,hc;function pc(){}pc.__reactDisabledLog=!0;function Xu(){{if(hs===0){Ku=console.log,uc=console.info,Be=console.warn,po=console.error,fc=console.group,dc=console.groupCollapsed,hc=console.groupEnd;var l={configurable:!0,enumerable:!0,value:pc,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}hs++}}function Zu(){{if(hs--,hs===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ft({},l,{value:Ku}),info:Ft({},l,{value:uc}),warn:Ft({},l,{value:Be}),error:Ft({},l,{value:po}),group:Ft({},l,{value:fc}),groupCollapsed:Ft({},l,{value:dc}),groupEnd:Ft({},l,{value:hc})})}hs<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Dl=t.ReactCurrentDispatcher,Pl;function ps(l,u,d){{if(Pl===void 0)try{throw Error()}catch(b){var g=b.stack.trim().match(/\n( *(at )?)/);Pl=g&&g[1]||""}return`
59
+ `+Pl+l}}var gc=!1,go;{var mc=typeof WeakMap=="function"?WeakMap:Map;go=new mc}function mi(l,u){if(!l||gc)return"";{var d=go.get(l);if(d!==void 0)return d}var g;gc=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var k;k=Dl.current,Dl.current=null,Xu();try{if(u){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(ut){g=ut}Reflect.construct(l,[],R)}else{try{R.call()}catch(ut){g=ut}l.call(R.prototype)}}else{try{throw Error()}catch(ut){g=ut}l()}}catch(ut){if(ut&&g&&typeof ut.stack=="string"){for(var M=ut.stack.split(`
60
60
  `),F=g.stack.split(`
61
61
  `),U=M.length-1,H=F.length-1;U>=1&&H>=0&&M[U]!==F[H];)H--;for(;U>=1&&H>=0;U--,H--)if(M[U]!==F[H]){if(U!==1||H!==1)do if(U--,H--,H<0||M[U]!==F[H]){var q=`
62
- `+M[U].replace(" at new "," at ");return l.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",l.displayName)),typeof l=="function"&&go.set(l,q),q}while(U>=1&&H>=0);break}}}finally{hc=!1,Ml.current=k,Yu(),Error.prepareStackTrace=b}var de=l?l.displayName||l.name:"",Ae=de?ps(de):"";return typeof l=="function"&&go.set(l,Ae),Ae}function gc(l,u,d){return mi(l,!0)}function gs(l,u,d){return mi(l,!1)}function rp(l){var u=l.prototype;return!!(u&&u.isReactComponent)}function ms(l,u,d){if(l==null)return"";if(typeof l=="function")return mi(l,rp(l));if(typeof l=="string")return ps(l);switch(l){case Ol:return ps("Suspense");case fs:return ps("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case Al:return gs(l.render);case ds:return ms(l.type,u,d);case ho:{var g=l,b=g._payload,k=g._init;try{return ms(k(b),u,d)}catch{}}}return""}var Ku={},mc=t.ReactDebugCurrentFrame;function Pl(l){if(l){var u=l._owner,d=ms(l.type,l._source,u?u.type:null);mc.setExtraStackFrame(d)}else mc.setExtraStackFrame(null)}function _l(l,u,d,g,b){{var k=Function.call.bind(te);for(var R in l)if(k(l,R)){var M=void 0;try{if(typeof l[R]!="function"){var F=Error((g||"React class")+": "+d+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw F.name="Invariant Violation",F}M=l[R](u,R,g,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(U){M=U}M&&!(M instanceof Error)&&(Pl(b),i("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",g||"React class",d,R,typeof M),Pl(null)),M instanceof Error&&!(M.message in Ku)&&(Ku[M.message]=!0,Pl(b),i("Failed %s type: %s",d,M.message),Pl(null))}}}var Nl;Nl={};var ys={};Object.freeze(ys);function vs(l,u){{var d=l.contextTypes;if(!d)return ys;var g={};for(var b in d)g[b]=u[b];{var k=ze(l)||"Unknown";_l(d,g,"context",k)}return g}}function Xu(l,u,d,g){{if(typeof l.getChildContext!="function"){{var b=ze(u)||"Unknown";Nl[b]||(Nl[b]=!0,i("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",b,b))}return d}var k=l.getChildContext();for(var R in k)if(!(R in g))throw new Error((ze(u)||"Unknown")+'.getChildContext(): key "'+R+'" is not defined in childContextTypes.');{var M=ze(u)||"Unknown";_l(g,k,"child context",M)}return Ft({},d,k)}}var yi;yi={};var Fl=null,Pr=null;function yc(l){l.context._currentValue2=l.parentValue}function vi(l){l.context._currentValue2=l.value}function Ll(l,u){if(l!==u){yc(l);var d=l.parent,g=u.parent;if(d===null){if(g!==null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.")}else{if(g===null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.");Ll(d,g)}vi(u)}}function _r(l){yc(l);var u=l.parent;u!==null&&_r(u)}function Bl(l){var u=l.parent;u!==null&&Bl(u),vi(l)}function $l(l,u){yc(l);var d=l.parent;if(d===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");d.depth===u.depth?Ll(d,u):$l(d,u)}function bs(l,u){var d=u.parent;if(d===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");l.depth===d.depth?Ll(l,d):bs(l,d),vi(u)}function Ss(l){var u=Pr,d=l;u!==d&&(u===null?Bl(d):d===null?_r(u):u.depth===d.depth?Ll(u,d):u.depth>d.depth?$l(u,d):bs(u,d),Pr=d)}function Zu(l,u){var d;d=l._currentValue2,l._currentValue2=u,l._currentRenderer2!==void 0&&l._currentRenderer2!==null&&l._currentRenderer2!==yi&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),l._currentRenderer2=yi;var g=Pr,b={parent:g,depth:g===null?0:g.depth+1,context:l,parentValue:d,value:u};return Pr=b,b}function Qu(l){var u=Pr;if(u===null)throw new Error("Tried to pop a Context at the root of the app. This is a bug in React.");u.context!==l&&i("The parent context is not the expected context. This is probably a bug in React.");{var d=u.parentValue;d===Il?u.context._currentValue2=u.context._defaultValue:u.context._currentValue2=d,l._currentRenderer2!==void 0&&l._currentRenderer2!==null&&l._currentRenderer2!==yi&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),l._currentRenderer2=yi}return Pr=u.parent}function qu(){return Pr}function Nr(l){var u=l._currentValue2;return u}function vc(l){return l._reactInternals}function ip(l,u){l._reactInternals=u}var ef={},mo={},ws,bc,zl,jl,Ul,yo,xs,ks,Wl;{ws=new Set,bc=new Set,zl=new Set,xs=new Set,jl=new Set,ks=new Set,Wl=new Set;var Cs=new Set;yo=function(l,u){if(!(l===null||typeof l=="function")){var d=u+"_"+l;Cs.has(d)||(Cs.add(d),i("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",u,l))}},Ul=function(l,u){if(u===void 0){var d=ze(l)||"Component";jl.has(d)||(jl.add(d),i("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",d))}}}function Hl(l,u){{var d=l.constructor,g=d&&ze(d)||"ReactClass",b=g+"."+u;if(ef[b])return;i(`%s(...): Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.
62
+ `+M[U].replace(" at new "," at ");return l.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",l.displayName)),typeof l=="function"&&go.set(l,q),q}while(U>=1&&H>=0);break}}}finally{gc=!1,Dl.current=k,Zu(),Error.prepareStackTrace=b}var de=l?l.displayName||l.name:"",Ae=de?ps(de):"";return typeof l=="function"&&go.set(l,Ae),Ae}function yc(l,u,d){return mi(l,!0)}function gs(l,u,d){return mi(l,!1)}function ap(l){var u=l.prototype;return!!(u&&u.isReactComponent)}function ms(l,u,d){if(l==null)return"";if(typeof l=="function")return mi(l,ap(l));if(typeof l=="string")return ps(l);switch(l){case Il:return ps("Suspense");case fs:return ps("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case Ol:return gs(l.render);case ds:return ms(l.type,u,d);case ho:{var g=l,b=g._payload,k=g._init;try{return ms(k(b),u,d)}catch{}}}return""}var Qu={},vc=t.ReactDebugCurrentFrame;function _l(l){if(l){var u=l._owner,d=ms(l.type,l._source,u?u.type:null);vc.setExtraStackFrame(d)}else vc.setExtraStackFrame(null)}function Nl(l,u,d,g,b){{var k=Function.call.bind(te);for(var R in l)if(k(l,R)){var M=void 0;try{if(typeof l[R]!="function"){var F=Error((g||"React class")+": "+d+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw F.name="Invariant Violation",F}M=l[R](u,R,g,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(U){M=U}M&&!(M instanceof Error)&&(_l(b),i("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",g||"React class",d,R,typeof M),_l(null)),M instanceof Error&&!(M.message in Qu)&&(Qu[M.message]=!0,_l(b),i("Failed %s type: %s",d,M.message),_l(null))}}}var Fl;Fl={};var ys={};Object.freeze(ys);function vs(l,u){{var d=l.contextTypes;if(!d)return ys;var g={};for(var b in d)g[b]=u[b];{var k=ze(l)||"Unknown";Nl(d,g,"context",k)}return g}}function qu(l,u,d,g){{if(typeof l.getChildContext!="function"){{var b=ze(u)||"Unknown";Fl[b]||(Fl[b]=!0,i("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",b,b))}return d}var k=l.getChildContext();for(var R in k)if(!(R in g))throw new Error((ze(u)||"Unknown")+'.getChildContext(): key "'+R+'" is not defined in childContextTypes.');{var M=ze(u)||"Unknown";Nl(g,k,"child context",M)}return Ft({},d,k)}}var yi;yi={};var Ll=null,Pr=null;function bc(l){l.context._currentValue2=l.parentValue}function vi(l){l.context._currentValue2=l.value}function Bl(l,u){if(l!==u){bc(l);var d=l.parent,g=u.parent;if(d===null){if(g!==null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.")}else{if(g===null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.");Bl(d,g)}vi(u)}}function _r(l){bc(l);var u=l.parent;u!==null&&_r(u)}function $l(l){var u=l.parent;u!==null&&$l(u),vi(l)}function zl(l,u){bc(l);var d=l.parent;if(d===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");d.depth===u.depth?Bl(d,u):zl(d,u)}function bs(l,u){var d=u.parent;if(d===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");l.depth===d.depth?Bl(l,d):bs(l,d),vi(u)}function Ss(l){var u=Pr,d=l;u!==d&&(u===null?$l(d):d===null?_r(u):u.depth===d.depth?Bl(u,d):u.depth>d.depth?zl(u,d):bs(u,d),Pr=d)}function ef(l,u){var d;d=l._currentValue2,l._currentValue2=u,l._currentRenderer2!==void 0&&l._currentRenderer2!==null&&l._currentRenderer2!==yi&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),l._currentRenderer2=yi;var g=Pr,b={parent:g,depth:g===null?0:g.depth+1,context:l,parentValue:d,value:u};return Pr=b,b}function tf(l){var u=Pr;if(u===null)throw new Error("Tried to pop a Context at the root of the app. This is a bug in React.");u.context!==l&&i("The parent context is not the expected context. This is probably a bug in React.");{var d=u.parentValue;d===Ml?u.context._currentValue2=u.context._defaultValue:u.context._currentValue2=d,l._currentRenderer2!==void 0&&l._currentRenderer2!==null&&l._currentRenderer2!==yi&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),l._currentRenderer2=yi}return Pr=u.parent}function nf(){return Pr}function Nr(l){var u=l._currentValue2;return u}function Sc(l){return l._reactInternals}function cp(l,u){l._reactInternals=u}var rf={},mo={},ws,wc,jl,Ul,Wl,yo,xs,ks,Hl;{ws=new Set,wc=new Set,jl=new Set,xs=new Set,Ul=new Set,ks=new Set,Hl=new Set;var Cs=new Set;yo=function(l,u){if(!(l===null||typeof l=="function")){var d=u+"_"+l;Cs.has(d)||(Cs.add(d),i("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",u,l))}},Wl=function(l,u){if(u===void 0){var d=ze(l)||"Component";Ul.has(d)||(Ul.add(d),i("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",d))}}}function Vl(l,u){{var d=l.constructor,g=d&&ze(d)||"ReactClass",b=g+"."+u;if(rf[b])return;i(`%s(...): Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.
63
63
 
64
- Please check the code for the %s component.`,u,u,g),ef[b]=!0}}var Vl={isMounted:function(l){return!1},enqueueSetState:function(l,u,d){var g=vc(l);g.queue===null?Hl(l,"setState"):(g.queue.push(u),d!=null&&yo(d,"setState"))},enqueueReplaceState:function(l,u,d){var g=vc(l);g.replace=!0,g.queue=[u],d!=null&&yo(d,"setState")},enqueueForceUpdate:function(l,u){var d=vc(l);d.queue===null?Hl(l,"forceUpdate"):u!=null&&yo(u,"setState")}};function Sc(l,u,d,g,b){var k=d(b,g);Ul(u,k);var R=k==null?g:Ft({},g,k);return R}function tf(l,u,d){var g=ys,b=l.contextType;if("contextType"in l){var k=b===null||b!==void 0&&b.$$typeof===Rl&&b._context===void 0;if(!k&&!Wl.has(l)){Wl.add(l);var R="";b===void 0?R=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof b!="object"?R=" However, it is set to a "+typeof b+".":b.$$typeof===Tl?R=" Did you accidentally pass the Context.Provider instead?":b._context!==void 0?R=" Did you accidentally pass the Context.Consumer instead?":R=" However, it is set to an object with keys {"+Object.keys(b).join(", ")+"}.",i("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",ze(l)||"Component",R)}}typeof b=="object"&&b!==null?g=Nr(b):g=d;var M=new l(u,g);{if(typeof l.getDerivedStateFromProps=="function"&&(M.state===null||M.state===void 0)){var F=ze(l)||"Component";ws.has(F)||(ws.add(F),i("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",F,M.state===null?"null":"undefined",F))}if(typeof l.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"){var U=null,H=null,q=null;if(typeof M.componentWillMount=="function"&&M.componentWillMount.__suppressDeprecationWarning!==!0?U="componentWillMount":typeof M.UNSAFE_componentWillMount=="function"&&(U="UNSAFE_componentWillMount"),typeof M.componentWillReceiveProps=="function"&&M.componentWillReceiveProps.__suppressDeprecationWarning!==!0?H="componentWillReceiveProps":typeof M.UNSAFE_componentWillReceiveProps=="function"&&(H="UNSAFE_componentWillReceiveProps"),typeof M.componentWillUpdate=="function"&&M.componentWillUpdate.__suppressDeprecationWarning!==!0?q="componentWillUpdate":typeof M.UNSAFE_componentWillUpdate=="function"&&(q="UNSAFE_componentWillUpdate"),U!==null||H!==null||q!==null){var de=ze(l)||"Component",Ae=typeof l.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";zl.has(de)||(zl.add(de),i(`Unsafe legacy lifecycles will not be called for components using new component APIs.
64
+ Please check the code for the %s component.`,u,u,g),rf[b]=!0}}var Gl={isMounted:function(l){return!1},enqueueSetState:function(l,u,d){var g=Sc(l);g.queue===null?Vl(l,"setState"):(g.queue.push(u),d!=null&&yo(d,"setState"))},enqueueReplaceState:function(l,u,d){var g=Sc(l);g.replace=!0,g.queue=[u],d!=null&&yo(d,"setState")},enqueueForceUpdate:function(l,u){var d=Sc(l);d.queue===null?Vl(l,"forceUpdate"):u!=null&&yo(u,"setState")}};function xc(l,u,d,g,b){var k=d(b,g);Wl(u,k);var R=k==null?g:Ft({},g,k);return R}function of(l,u,d){var g=ys,b=l.contextType;if("contextType"in l){var k=b===null||b!==void 0&&b.$$typeof===Al&&b._context===void 0;if(!k&&!Hl.has(l)){Hl.add(l);var R="";b===void 0?R=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof b!="object"?R=" However, it is set to a "+typeof b+".":b.$$typeof===Rl?R=" Did you accidentally pass the Context.Provider instead?":b._context!==void 0?R=" Did you accidentally pass the Context.Consumer instead?":R=" However, it is set to an object with keys {"+Object.keys(b).join(", ")+"}.",i("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",ze(l)||"Component",R)}}typeof b=="object"&&b!==null?g=Nr(b):g=d;var M=new l(u,g);{if(typeof l.getDerivedStateFromProps=="function"&&(M.state===null||M.state===void 0)){var F=ze(l)||"Component";ws.has(F)||(ws.add(F),i("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",F,M.state===null?"null":"undefined",F))}if(typeof l.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"){var U=null,H=null,q=null;if(typeof M.componentWillMount=="function"&&M.componentWillMount.__suppressDeprecationWarning!==!0?U="componentWillMount":typeof M.UNSAFE_componentWillMount=="function"&&(U="UNSAFE_componentWillMount"),typeof M.componentWillReceiveProps=="function"&&M.componentWillReceiveProps.__suppressDeprecationWarning!==!0?H="componentWillReceiveProps":typeof M.UNSAFE_componentWillReceiveProps=="function"&&(H="UNSAFE_componentWillReceiveProps"),typeof M.componentWillUpdate=="function"&&M.componentWillUpdate.__suppressDeprecationWarning!==!0?q="componentWillUpdate":typeof M.UNSAFE_componentWillUpdate=="function"&&(q="UNSAFE_componentWillUpdate"),U!==null||H!==null||q!==null){var de=ze(l)||"Component",Ae=typeof l.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";jl.has(de)||(jl.add(de),i(`Unsafe legacy lifecycles will not be called for components using new component APIs.
65
65
 
66
66
  %s uses %s but also contains the following legacy lifecycles:%s%s%s
67
67
 
@@ -69,20 +69,20 @@ The above lifecycles should be removed. Learn more about this warning here:
69
69
  https://reactjs.org/link/unsafe-component-lifecycles`,de,Ae,U!==null?`
70
70
  `+U:"",H!==null?`
71
71
  `+H:"",q!==null?`
72
- `+q:""))}}}return M}function nf(l,u,d){{var g=ze(u)||"Component",b=l.render;b||(u.prototype&&typeof u.prototype.render=="function"?i("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",g):i("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",g)),l.getInitialState&&!l.getInitialState.isReactClassApproved&&!l.state&&i("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",g),l.getDefaultProps&&!l.getDefaultProps.isReactClassApproved&&i("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",g),l.propTypes&&i("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",g),l.contextType&&i("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",g),l.contextTypes&&i("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",g),u.contextType&&u.contextTypes&&!ks.has(u)&&(ks.add(u),i("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",g)),typeof l.componentShouldUpdate=="function"&&i("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",g),u.prototype&&u.prototype.isPureReactComponent&&typeof l.shouldComponentUpdate<"u"&&i("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",ze(u)||"A pure component"),typeof l.componentDidUnmount=="function"&&i("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",g),typeof l.componentDidReceiveProps=="function"&&i("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",g),typeof l.componentWillRecieveProps=="function"&&i("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",g),typeof l.UNSAFE_componentWillRecieveProps=="function"&&i("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",g);var k=l.props!==d;l.props!==void 0&&k&&i("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",g,g),l.defaultProps&&i("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",g,g),typeof l.getSnapshotBeforeUpdate=="function"&&typeof l.componentDidUpdate!="function"&&!bc.has(u)&&(bc.add(u),i("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",ze(u))),typeof l.getDerivedStateFromProps=="function"&&i("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",g),typeof l.getDerivedStateFromError=="function"&&i("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",g),typeof u.getSnapshotBeforeUpdate=="function"&&i("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",g);var R=l.state;R&&(typeof R!="object"||ln(R))&&i("%s.state: must be set to an object or null",g),typeof l.getChildContext=="function"&&typeof u.childContextTypes!="object"&&i("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",g)}}function rf(l,u){var d=u.state;if(typeof u.componentWillMount=="function"){if(u.componentWillMount.__suppressDeprecationWarning!==!0){var g=ze(l)||"Unknown";mo[g]||(r(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
72
+ `+q:""))}}}return M}function sf(l,u,d){{var g=ze(u)||"Component",b=l.render;b||(u.prototype&&typeof u.prototype.render=="function"?i("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",g):i("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",g)),l.getInitialState&&!l.getInitialState.isReactClassApproved&&!l.state&&i("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",g),l.getDefaultProps&&!l.getDefaultProps.isReactClassApproved&&i("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",g),l.propTypes&&i("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",g),l.contextType&&i("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",g),l.contextTypes&&i("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",g),u.contextType&&u.contextTypes&&!ks.has(u)&&(ks.add(u),i("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",g)),typeof l.componentShouldUpdate=="function"&&i("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",g),u.prototype&&u.prototype.isPureReactComponent&&typeof l.shouldComponentUpdate<"u"&&i("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",ze(u)||"A pure component"),typeof l.componentDidUnmount=="function"&&i("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",g),typeof l.componentDidReceiveProps=="function"&&i("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",g),typeof l.componentWillRecieveProps=="function"&&i("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",g),typeof l.UNSAFE_componentWillRecieveProps=="function"&&i("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",g);var k=l.props!==d;l.props!==void 0&&k&&i("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",g,g),l.defaultProps&&i("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",g,g),typeof l.getSnapshotBeforeUpdate=="function"&&typeof l.componentDidUpdate!="function"&&!wc.has(u)&&(wc.add(u),i("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",ze(u))),typeof l.getDerivedStateFromProps=="function"&&i("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",g),typeof l.getDerivedStateFromError=="function"&&i("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",g),typeof u.getSnapshotBeforeUpdate=="function"&&i("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",g);var R=l.state;R&&(typeof R!="object"||ln(R))&&i("%s.state: must be set to an object or null",g),typeof l.getChildContext=="function"&&typeof u.childContextTypes!="object"&&i("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",g)}}function lf(l,u){var d=u.state;if(typeof u.componentWillMount=="function"){if(u.componentWillMount.__suppressDeprecationWarning!==!0){var g=ze(l)||"Unknown";mo[g]||(r(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
73
73
 
74
74
  * Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.
75
75
 
76
- Please update the following components: %s`,g),mo[g]=!0)}u.componentWillMount()}typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&(i("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ze(l)||"Component"),Vl.enqueueReplaceState(u,u.state,null))}function op(l,u,d,g){if(l.queue!==null&&l.queue.length>0){var b=l.queue,k=l.replace;if(l.queue=null,l.replace=!1,k&&b.length===1)u.state=b[0];else{for(var R=k?b[0]:u.state,M=!0,F=k?1:0;F<b.length;F++){var U=b[F],H=typeof U=="function"?U.call(u,R,d,g):U;H!=null&&(M?(M=!1,R=Ft({},R,H)):Ft(R,H))}u.state=R}}else l.queue=null}function of(l,u,d,g){nf(l,u,d);var b=l.state!==void 0?l.state:null;l.updater=Vl,l.props=d,l.state=b;var k={queue:[],replace:!1};ip(l,k);var R=u.contextType;if(typeof R=="object"&&R!==null?l.context=Nr(R):l.context=g,l.state===d){var M=ze(u)||"Component";xs.has(M)||(xs.add(M),i("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",M))}var F=u.getDerivedStateFromProps;typeof F=="function"&&(l.state=Sc(l,u,F,b,d)),typeof u.getDerivedStateFromProps!="function"&&typeof l.getSnapshotBeforeUpdate!="function"&&(typeof l.UNSAFE_componentWillMount=="function"||typeof l.componentWillMount=="function")&&(rf(u,l),op(k,l,d,g))}var sp={id:1,overflow:""};function lp(l){var u=l.overflow,d=l.id,g=d&~ap(d);return g.toString(32)+u}function wc(l,u,d){var g=l.id,b=l.overflow,k=Es(g)-1,R=g&~(1<<k),M=d+1,F=Es(u)+k;if(F>30){var U=k-k%5,H=(1<<U)-1,q=(R&H).toString(32),de=R>>U,Ae=k-U,ut=Es(u)+Ae,Ei=M<<Ae,Ti=Ei|de,hr=q+b;return{id:1<<ut|Ti,overflow:hr}}else{var Co=M<<k,zp=Co|R,cC=b;return{id:1<<F|zp,overflow:cC}}}function Es(l){return 32-cp(l)}function ap(l){return 1<<Es(l)-1}var cp=Math.clz32?Math.clz32:up,xc=Math.log,Gl=Math.LN2;function up(l){var u=l>>>0;return u===0?32:31-(xc(u)/Gl|0)|0}function fp(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var dp=typeof Object.is=="function"?Object.is:fp,cr=null,kc=null,Jl=null,Le=null,Zt=!1,vo=!1,bi=0,Re=null,Fr=0,Yl=25,Qt=!1,qt;function Wn(){if(cr===null)throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
76
+ Please update the following components: %s`,g),mo[g]=!0)}u.componentWillMount()}typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&(i("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ze(l)||"Component"),Gl.enqueueReplaceState(u,u.state,null))}function up(l,u,d,g){if(l.queue!==null&&l.queue.length>0){var b=l.queue,k=l.replace;if(l.queue=null,l.replace=!1,k&&b.length===1)u.state=b[0];else{for(var R=k?b[0]:u.state,M=!0,F=k?1:0;F<b.length;F++){var U=b[F],H=typeof U=="function"?U.call(u,R,d,g):U;H!=null&&(M?(M=!1,R=Ft({},R,H)):Ft(R,H))}u.state=R}}else l.queue=null}function af(l,u,d,g){sf(l,u,d);var b=l.state!==void 0?l.state:null;l.updater=Gl,l.props=d,l.state=b;var k={queue:[],replace:!1};cp(l,k);var R=u.contextType;if(typeof R=="object"&&R!==null?l.context=Nr(R):l.context=g,l.state===d){var M=ze(u)||"Component";xs.has(M)||(xs.add(M),i("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",M))}var F=u.getDerivedStateFromProps;typeof F=="function"&&(l.state=xc(l,u,F,b,d)),typeof u.getDerivedStateFromProps!="function"&&typeof l.getSnapshotBeforeUpdate!="function"&&(typeof l.UNSAFE_componentWillMount=="function"||typeof l.componentWillMount=="function")&&(lf(u,l),up(k,l,d,g))}var fp={id:1,overflow:""};function dp(l){var u=l.overflow,d=l.id,g=d&~hp(d);return g.toString(32)+u}function kc(l,u,d){var g=l.id,b=l.overflow,k=Es(g)-1,R=g&~(1<<k),M=d+1,F=Es(u)+k;if(F>30){var U=k-k%5,H=(1<<U)-1,q=(R&H).toString(32),de=R>>U,Ae=k-U,ut=Es(u)+Ae,Ei=M<<Ae,Ti=Ei|de,hr=q+b;return{id:1<<ut|Ti,overflow:hr}}else{var Co=M<<k,Vp=Co|R,wC=b;return{id:1<<F|Vp,overflow:wC}}}function Es(l){return 32-pp(l)}function hp(l){return 1<<Es(l)-1}var pp=Math.clz32?Math.clz32:gp,Cc=Math.log,Jl=Math.LN2;function gp(l){var u=l>>>0;return u===0?32:31-(Cc(u)/Jl|0)|0}function mp(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var yp=typeof Object.is=="function"?Object.is:mp,cr=null,Ec=null,Yl=null,Le=null,Zt=!1,vo=!1,bi=0,Re=null,Fr=0,Kl=25,Qt=!1,qt;function Wn(){if(cr===null)throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
77
77
  1. You might have mismatching versions of React and the renderer (such as React DOM)
78
78
  2. You might be breaking the Rules of Hooks
79
79
  3. You might have more than one copy of React in the same app
80
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return Qt&&i("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks"),cr}function hp(l,u){if(u===null)return i("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",qt),!1;l.length!==u.length&&i(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
80
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return Qt&&i("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks"),cr}function vp(l,u){if(u===null)return i("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",qt),!1;l.length!==u.length&&i(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
81
81
 
82
82
  Previous: %s
83
- Incoming: %s`,qt,"["+l.join(", ")+"]","["+u.join(", ")+"]");for(var d=0;d<u.length&&d<l.length;d++)if(!dp(l[d],u[d]))return!1;return!0}function Cn(){if(Fr>0)throw new Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Lr(){return Le===null?Jl===null?(Zt=!1,Jl=Le=Cn()):(Zt=!0,Le=Jl):Le.next===null?(Zt=!1,Le=Le.next=Cn()):(Zt=!0,Le=Le.next),Le}function Si(l,u){cr=u,kc=l,Qt=!1,bi=0}function pp(l,u,d,g){for(;vo;)vo=!1,bi=0,Fr+=1,Le=null,d=l(u,g);return Ts(),d}function Cc(){var l=bi!==0;return l}function Ts(){Qt=!1,cr=null,kc=null,vo=!1,Jl=null,Fr=0,Re=null,Le=null}function gp(l){return Qt&&i("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Nr(l)}function mp(l){return qt="useContext",Wn(),Nr(l)}function Kl(l,u){return typeof u=="function"?u(l):u}function Ec(l){return qt="useState",sf(Kl,l)}function sf(l,u,d){if(l!==Kl&&(qt="useReducer"),cr=Wn(),Le=Lr(),Zt){var g=Le.queue,b=g.dispatch;if(Re!==null){var k=Re.get(g);if(k!==void 0){Re.delete(g);var R=Le.memoizedState,M=k;do{var F=M.action;Qt=!0,R=l(R,F),Qt=!1,M=M.next}while(M!==null);return Le.memoizedState=R,[R,b]}}return[Le.memoizedState,b]}else{Qt=!0;var U;l===Kl?U=typeof u=="function"?u():u:U=d!==void 0?d(u):u,Qt=!1,Le.memoizedState=U;var H=Le.queue={last:null,dispatch:null},q=H.dispatch=af.bind(null,cr,H);return[Le.memoizedState,q]}}function lf(l,u){cr=Wn(),Le=Lr();var d=u===void 0?null:u;if(Le!==null){var g=Le.memoizedState;if(g!==null&&d!==null){var b=g[1];if(hp(d,b))return g[0]}}Qt=!0;var k=l();return Qt=!1,Le.memoizedState=[k,d],k}function Tc(l){cr=Wn(),Le=Lr();var u=Le.memoizedState;if(u===null){var d={current:l};return Object.seal(d),Le.memoizedState=d,d}else return u}function yp(l,u){qt="useLayoutEffect",i("useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.")}function af(l,u,d){if(Fr>=Yl)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(l===cr){vo=!0;var g={action:d,next:null};Re===null&&(Re=new Map);var b=Re.get(u);if(b===void 0)Re.set(u,g);else{for(var k=b;k.next!==null;)k=k.next;k.next=g}}}function cf(l,u){return lf(function(){return l},u)}function vp(l,u,d){return Wn(),u(l._source)}function bp(l,u,d){if(d===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return d()}function Sp(l){return Wn(),l}function wp(){throw new Error("startTransition cannot be called during server rendering.")}function xp(){return Wn(),[!1,wp]}function kp(){var l=kc,u=lp(l.treeContext),d=Rc;if(d===null)throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");var g=bi++;return Ke(d,u,g)}function Xl(){}var uf={readContext:gp,useContext:mp,useMemo:lf,useReducer:sf,useRef:Tc,useState:Ec,useInsertionEffect:Xl,useLayoutEffect:yp,useCallback:cf,useImperativeHandle:Xl,useEffect:Xl,useDebugValue:Xl,useDeferredValue:Sp,useTransition:xp,useId:kp,useMutableSource:vp,useSyncExternalStore:bp},Rc=null;function ff(l){Rc=l}function Zl(l){try{var u="",d=l;do{switch(d.tag){case 0:u+=ps(d.type,null,null);break;case 1:u+=gs(d.type,null,null);break;case 2:u+=gc(d.type,null,null);break}d=d.parent}while(d);return u}catch(g){return`
83
+ Incoming: %s`,qt,"["+l.join(", ")+"]","["+u.join(", ")+"]");for(var d=0;d<u.length&&d<l.length;d++)if(!yp(l[d],u[d]))return!1;return!0}function Cn(){if(Fr>0)throw new Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Lr(){return Le===null?Yl===null?(Zt=!1,Yl=Le=Cn()):(Zt=!0,Le=Yl):Le.next===null?(Zt=!1,Le=Le.next=Cn()):(Zt=!0,Le=Le.next),Le}function Si(l,u){cr=u,Ec=l,Qt=!1,bi=0}function bp(l,u,d,g){for(;vo;)vo=!1,bi=0,Fr+=1,Le=null,d=l(u,g);return Ts(),d}function Tc(){var l=bi!==0;return l}function Ts(){Qt=!1,cr=null,Ec=null,vo=!1,Yl=null,Fr=0,Re=null,Le=null}function Sp(l){return Qt&&i("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Nr(l)}function wp(l){return qt="useContext",Wn(),Nr(l)}function Xl(l,u){return typeof u=="function"?u(l):u}function Rc(l){return qt="useState",cf(Xl,l)}function cf(l,u,d){if(l!==Xl&&(qt="useReducer"),cr=Wn(),Le=Lr(),Zt){var g=Le.queue,b=g.dispatch;if(Re!==null){var k=Re.get(g);if(k!==void 0){Re.delete(g);var R=Le.memoizedState,M=k;do{var F=M.action;Qt=!0,R=l(R,F),Qt=!1,M=M.next}while(M!==null);return Le.memoizedState=R,[R,b]}}return[Le.memoizedState,b]}else{Qt=!0;var U;l===Xl?U=typeof u=="function"?u():u:U=d!==void 0?d(u):u,Qt=!1,Le.memoizedState=U;var H=Le.queue={last:null,dispatch:null},q=H.dispatch=ff.bind(null,cr,H);return[Le.memoizedState,q]}}function uf(l,u){cr=Wn(),Le=Lr();var d=u===void 0?null:u;if(Le!==null){var g=Le.memoizedState;if(g!==null&&d!==null){var b=g[1];if(vp(d,b))return g[0]}}Qt=!0;var k=l();return Qt=!1,Le.memoizedState=[k,d],k}function Ac(l){cr=Wn(),Le=Lr();var u=Le.memoizedState;if(u===null){var d={current:l};return Object.seal(d),Le.memoizedState=d,d}else return u}function xp(l,u){qt="useLayoutEffect",i("useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.")}function ff(l,u,d){if(Fr>=Kl)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(l===cr){vo=!0;var g={action:d,next:null};Re===null&&(Re=new Map);var b=Re.get(u);if(b===void 0)Re.set(u,g);else{for(var k=b;k.next!==null;)k=k.next;k.next=g}}}function df(l,u){return uf(function(){return l},u)}function kp(l,u,d){return Wn(),u(l._source)}function Cp(l,u,d){if(d===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return d()}function Ep(l){return Wn(),l}function Tp(){throw new Error("startTransition cannot be called during server rendering.")}function Rp(){return Wn(),[!1,Tp]}function Ap(){var l=Ec,u=dp(l.treeContext),d=Oc;if(d===null)throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");var g=bi++;return Ke(d,u,g)}function Zl(){}var hf={readContext:Sp,useContext:wp,useMemo:uf,useReducer:cf,useRef:Ac,useState:Rc,useInsertionEffect:Zl,useLayoutEffect:xp,useCallback:df,useImperativeHandle:Zl,useEffect:Zl,useDebugValue:Zl,useDeferredValue:Ep,useTransition:Rp,useId:Ap,useMutableSource:kp,useSyncExternalStore:Cp},Oc=null;function pf(l){Oc=l}function Ql(l){try{var u="",d=l;do{switch(d.tag){case 0:u+=ps(d.type,null,null);break;case 1:u+=gs(d.type,null,null);break;case 2:u+=yc(d.type,null,null);break}d=d.parent}while(d);return u}catch(g){return`
84
84
  Error generating stack: `+g.message+`
85
- `+g.stack}}var Ql=t.ReactCurrentDispatcher,Rs=t.ReactDebugCurrentFrame,ql=0,bo=1,ea=2,ta=3,na=4,So=0,Ac=1,wi=2,df=12800;function Cp(l){return console.error(l),null}function wo(){}function xo(l,u,d,g,b,k,R,M,F){var U=[],H=new Set,q={destination:null,responseState:u,progressiveChunkSize:g===void 0?df:g,status:So,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:H,pingedTasks:U,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:b===void 0?Cp:b,onAllReady:wo,onShellReady:R===void 0?wo:R,onShellError:wo,onFatalError:wo},de=ra(q,0,null,d,!1,!1);de.parentFlushed=!0;var Ae=xi(q,l,null,de,H,ys,Fl,sp);return U.push(Ae),q}function Ep(l,u){var d=l.pingedTasks;d.push(u),d.length===1&&s(function(){return Bc(l)})}function Tp(l,u){return{id:Qi,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:u,errorDigest:null}}function xi(l,u,d,g,b,k,R,M){l.allPendingTasks++,d===null?l.pendingRootTasks++:d.pendingTasks++;var F={node:u,ping:function(){return Ep(l,F)},blockedBoundary:d,blockedSegment:g,abortSet:b,legacyContext:k,context:R,treeContext:M};return F.componentStack=null,b.add(F),F}function ra(l,u,d,g,b,k){return{status:ql,id:-1,index:u,parentFlushed:!1,chunks:[],children:[],formatContext:g,boundary:d,lastPushedText:b,textEmbedded:k}}var ur=null;function Oc(){return ur===null||ur.componentStack===null?"":Zl(ur.componentStack)}function ki(l,u){l.componentStack={tag:0,parent:l.componentStack,type:u}}function As(l,u){l.componentStack={tag:1,parent:l.componentStack,type:u}}function fr(l,u){l.componentStack={tag:2,parent:l.componentStack,type:u}}function Hn(l){l.componentStack===null?i("Unexpectedly popped too many stack frames. This is a bug in React."):l.componentStack=l.componentStack.parent}var dr=null;function ia(l,u){{var d;typeof u=="string"?d=u:u&&typeof u.message=="string"?d=u.message:d=String(u);var g=dr||Oc();dr=null,l.errorMessage=d,l.errorComponentStack=g}}function Os(l,u){var d=l.onError(u);if(d!=null&&typeof d!="string")throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof d+'" instead');return d}function En(l,u){var d=l.onShellError;d(u);var g=l.onFatalError;g(u),l.destination!==null?(l.status=wi,E(l.destination,u)):(l.status=Ac,l.fatalError=u)}function Is(l,u,d){ki(u,"Suspense");var g=u.blockedBoundary,b=u.blockedSegment,k=d.fallback,R=d.children,M=new Set,F=Tp(l,M),U=b.chunks.length,H=ra(l,U,F,b.formatContext,!1,!1);b.children.push(H),b.lastPushedText=!1;var q=ra(l,0,null,b.formatContext,!1,!1);q.parentFlushed=!0,u.blockedBoundary=F,u.blockedSegment=q;try{if(Ot(l,u,R),Uu(q.chunks,l.responseState,q.lastPushedText,q.textEmbedded),q.status=bo,ko(F,q),F.pendingTasks===0){Hn(u);return}}catch(Ae){q.status=na,F.forceClientRender=!0,F.errorDigest=Os(l,Ae),ia(F,Ae)}finally{u.blockedBoundary=g,u.blockedSegment=b}var de=xi(l,k,g,H,M,u.legacyContext,u.context,u.treeContext);de.componentStack=u.componentStack,l.pingedTasks.push(de),Hn(u)}function Ic(l,u,d,g){ki(u,d);var b=u.blockedSegment,k=kn(b.chunks,d,g,l.responseState,b.formatContext);b.lastPushedText=!1;var R=b.formatContext;b.formatContext=Zi(R,d,g),Ot(l,u,k),b.formatContext=R,Pe(b.chunks,d),b.lastPushedText=!1,Hn(u)}function Ms(l){return l.prototype&&l.prototype.isReactComponent}function Ds(l,u,d,g,b){var k={};Si(u,k);var R=d(g,b);return pp(d,g,R,b)}function hf(l,u,d,g,b){var k=d.render();d.props!==b&&(Dc||i("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ze(g)||"a component"),Dc=!0);{var R=g.childContextTypes;if(R!=null){var M=u.legacyContext,F=Xu(d,g,M,R);u.legacyContext=F,en(l,u,k),u.legacyContext=M;return}}en(l,u,k)}function Rp(l,u,d,g){fr(u,d);var b=vs(d,u.legacyContext),k=tf(d,g,b);of(k,d,g,b),hf(l,u,k,d,g),Hn(u)}var pf={},Ps={},Mc={},gf={},Dc=!1,_s={},Pc=!1,_c=!1,Nc=!1;function mf(l,u,d,g){var b;if(b=vs(d,u.legacyContext),As(u,d),d.prototype&&typeof d.prototype.render=="function"){var k=ze(d)||"Unknown";pf[k]||(i("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",k,k),pf[k]=!0)}var R=Ds(l,u,d,g,b),M=Cc();if(typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0){var F=ze(d)||"Unknown";Ps[F]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",F,F,F),Ps[F]=!0)}if(typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0){{var U=ze(d)||"Unknown";Ps[U]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",U,U,U),Ps[U]=!0)}of(R,d,g,b),hf(l,u,R,d,g)}else if(yf(d),M){var H=u.treeContext,q=1,de=0;u.treeContext=wc(H,q,de);try{en(l,u,R)}finally{u.treeContext=H}}else en(l,u,R);Hn(u)}function yf(l){{if(l&&l.childContextTypes&&i("%s(...): childContextTypes cannot be defined on a function component.",l.displayName||l.name||"Component"),l.defaultProps!==void 0){var u=ze(l)||"Unknown";_s[u]||(i("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",u),_s[u]=!0)}if(typeof l.getDerivedStateFromProps=="function"){var d=ze(l)||"Unknown";gf[d]||(i("%s: Function components do not support getDerivedStateFromProps.",d),gf[d]=!0)}if(typeof l.contextType=="object"&&l.contextType!==null){var g=ze(l)||"Unknown";Mc[g]||(i("%s: Function components do not support contextType.",g),Mc[g]=!0)}}}function Fc(l,u){if(l&&l.defaultProps){var d=Ft({},u),g=l.defaultProps;for(var b in g)d[b]===void 0&&(d[b]=g[b]);return d}return u}function vf(l,u,d,g,b){As(u,d.render);var k=Ds(l,u,d.render,g,b),R=Cc();if(R){var M=u.treeContext,F=1,U=0;u.treeContext=wc(M,F,U);try{en(l,u,k)}finally{u.treeContext=M}}else en(l,u,k);Hn(u)}function Ap(l,u,d,g,b){var k=d.type,R=Fc(k,g);Lc(l,u,k,R,b)}function Op(l,u,d,g){d._context===void 0?d!==d.Consumer&&(Nc||(Nc=!0,i("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):d=d._context;var b=g.children;typeof b!="function"&&i("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var k=Nr(d),R=b(k);en(l,u,R)}function bf(l,u,d,g){var b=d._context,k=g.value,R=g.children,M;M=u.context,u.context=Zu(b,k),en(l,u,R),u.context=Qu(b),M!==u.context&&i("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function Ip(l,u,d,g,b){ki(u,"Lazy");var k=d._payload,R=d._init,M=R(k),F=Fc(M,g);Lc(l,u,M,F,b),Hn(u)}function Lc(l,u,d,g,b){if(typeof d=="function")if(Ms(d)){Rp(l,u,d,g);return}else{mf(l,u,d,g);return}if(typeof d=="string"){Ic(l,u,d,g);return}switch(d){case sc:case oc:case Xt:case Hu:case El:{en(l,u,g.children);return}case fs:{ki(u,"SuspenseList"),en(l,u,g.children),Hn(u);return}case ic:throw new Error("ReactDOMServer does not yet support scope components.");case Ol:{Is(l,u,g);return}}if(typeof d=="object"&&d!==null)switch(d.$$typeof){case Al:{vf(l,u,d,g,b);return}case ds:{Ap(l,u,d,g,b);return}case Tl:{bf(l,u,d,g);return}case Rl:{Op(l,u,d,g);return}case ho:{Ip(l,u,d,g);return}}var k="";throw(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(k+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(d==null?d:typeof d)+"."+k))}function Mp(l,u){typeof Symbol=="function"&&l[Symbol.toStringTag]==="Generator"&&(Pc||i("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Pc=!0),l.entries===u&&(_c||i("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),_c=!0)}function en(l,u,d){try{return Dp(l,u,d)}catch(g){throw typeof g=="object"&&g!==null&&typeof g.then=="function"||(dr=dr!==null?dr:Oc()),g}}function Dp(l,u,d){if(u.node=d,typeof d=="object"&&d!==null){switch(d.$$typeof){case qh:{var g=d,b=g.type,k=g.props,R=g.ref;Lc(l,u,b,k,R);return}case Wu:throw new Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case ho:{var M=d,F=M._payload,U=M._init,H;try{H=U(F)}catch(Co){throw typeof Co=="object"&&Co!==null&&typeof Co.then=="function"&&ki(u,"Lazy"),Co}en(l,u,H);return}}if(ln(d)){oa(l,u,d);return}var q=tp(d);if(q){Mp(d,q);var de=q.call(d);if(de){var Ae=de.next();if(!Ae.done){var ut=[];do ut.push(Ae.value),Ae=de.next();while(!Ae.done);oa(l,u,ut);return}return}}var Ei=Object.prototype.toString.call(d);throw new Error("Objects are not valid as a React child (found: "+(Ei==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":Ei)+"). If you meant to render a collection of children, use an array instead.")}if(typeof d=="string"){var Ti=u.blockedSegment;Ti.lastPushedText=ju(u.blockedSegment.chunks,d,l.responseState,Ti.lastPushedText);return}if(typeof d=="number"){var hr=u.blockedSegment;hr.lastPushedText=ju(u.blockedSegment.chunks,""+d,l.responseState,hr.lastPushedText);return}typeof d=="function"&&i("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}function oa(l,u,d){for(var g=d.length,b=0;b<g;b++){var k=u.treeContext;u.treeContext=wc(k,g,b);try{Ot(l,u,d[b])}finally{u.treeContext=k}}}function Pp(l,u,d){var g=u.blockedSegment,b=g.chunks.length,k=ra(l,b,null,g.formatContext,g.lastPushedText,!0);g.children.push(k),g.lastPushedText=!1;var R=xi(l,u.node,u.blockedBoundary,k,u.abortSet,u.legacyContext,u.context,u.treeContext);u.componentStack!==null&&(R.componentStack=u.componentStack.parent);var M=R.ping;d.then(M,M)}function Ot(l,u,d){var g=u.blockedSegment.formatContext,b=u.legacyContext,k=u.context,R=null;R=u.componentStack;try{return en(l,u,d)}catch(M){if(Ts(),typeof M=="object"&&M!==null&&typeof M.then=="function"){Pp(l,u,M),u.blockedSegment.formatContext=g,u.legacyContext=b,u.context=k,Ss(k),u.componentStack=R;return}else throw u.blockedSegment.formatContext=g,u.legacyContext=b,u.context=k,Ss(k),u.componentStack=R,M}}function _p(l,u,d,g){var b=Os(l,g);if(u===null?En(l,g):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=b,ia(u,g),u.parentFlushed&&l.clientRenderedBoundaries.push(u))),l.allPendingTasks--,l.allPendingTasks===0){var k=l.onAllReady;k()}}function Sf(l){var u=this,d=l.blockedBoundary,g=l.blockedSegment;g.status=ta,xf(u,d,g)}function wf(l,u,d){var g=l.blockedBoundary,b=l.blockedSegment;if(b.status=ta,g===null)u.allPendingTasks--,u.status!==wi&&(u.status=wi,u.destination!==null&&m(u.destination));else{if(g.pendingTasks--,!g.forceClientRender){g.forceClientRender=!0;var k=d===void 0?new Error("The render was aborted by the server without a reason."):d;g.errorDigest=u.onError(k);{var R="The server did not finish this Suspense boundary: ";k&&typeof k.message=="string"?k=R+k.message:k=R+String(k);var M=ur;ur=l;try{ia(g,k)}finally{ur=M}}g.parentFlushed&&u.clientRenderedBoundaries.push(g)}if(g.fallbackAbortableTasks.forEach(function(U){return wf(U,u,d)}),g.fallbackAbortableTasks.clear(),u.allPendingTasks--,u.allPendingTasks===0){var F=u.onAllReady;F()}}}function ko(l,u){if(u.chunks.length===0&&u.children.length===1&&u.children[0].boundary===null){var d=u.children[0];d.id=u.id,d.parentFlushed=!0,d.status===bo&&ko(l,d)}else{var g=l.completedSegments;g.push(u)}}function xf(l,u,d){if(u===null){if(d.parentFlushed){if(l.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");l.completedRootSegment=d}if(l.pendingRootTasks--,l.pendingRootTasks===0){l.onShellError=wo;var g=l.onShellReady;g()}}else if(u.pendingTasks--,!u.forceClientRender){if(u.pendingTasks===0)d.parentFlushed&&d.status===bo&&ko(u,d),u.parentFlushed&&l.completedBoundaries.push(u),u.fallbackAbortableTasks.forEach(Sf,l),u.fallbackAbortableTasks.clear();else if(d.parentFlushed&&d.status===bo){ko(u,d);var b=u.completedSegments;b.length===1&&u.parentFlushed&&l.partialBoundaries.push(u)}}if(l.allPendingTasks--,l.allPendingTasks===0){var k=l.onAllReady;k()}}function Np(l,u){var d=u.blockedSegment;if(d.status===ql){Ss(u.context);var g=null;g=ur,ur=u;try{en(l,u,u.node),Uu(d.chunks,l.responseState,d.lastPushedText,d.textEmbedded),u.abortSet.delete(u),d.status=bo,xf(l,u.blockedBoundary,d)}catch(k){if(Ts(),typeof k=="object"&&k!==null&&typeof k.then=="function"){var b=u.ping;k.then(b,b)}else u.abortSet.delete(u),d.status=na,_p(l,u.blockedBoundary,d,k)}finally{ur=g}}}function Bc(l){if(l.status!==wi){var u=qu(),d=Ql.current;Ql.current=uf;var g;g=Rs.getCurrentStack,Rs.getCurrentStack=Oc;var b=Rc;ff(l.responseState);try{var k=l.pingedTasks,R;for(R=0;R<k.length;R++){var M=k[R];Np(l,M)}k.splice(0,R),l.destination!==null&&la(l,l.destination)}catch(F){Os(l,F),En(l,F)}finally{ff(b),Ql.current=d,Rs.getCurrentStack=g,d===uf&&Ss(u)}}}function Ci(l,u,d){switch(d.parentFlushed=!0,d.status){case ql:{var g=d.id=l.nextSegmentId++;return d.lastPushedText=!1,d.textEmbedded=!1,jn(u,l.responseState,g)}case bo:{d.status=ea;for(var b=!0,k=d.chunks,R=0,M=d.children,F=0;F<M.length;F++){for(var U=M[F];R<U.index;R++)c(u,k[R]);b=Ns(l,u,U)}for(;R<k.length-1;R++)c(u,k[R]);return R<k.length&&(b=f(u,k[R])),b}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function Ns(l,u,d){var g=d.boundary;if(g===null)return Ci(l,u,d);if(g.parentFlushed=!0,g.forceClientRender)return Xh(u,l.responseState,g.errorDigest,g.errorMessage,g.errorComponentStack),Ci(l,u,d),Qh(u,l.responseState);if(g.pendingTasks>0){g.rootSegmentID=l.nextSegmentId++,g.completedSegments.length>0&&l.partialBoundaries.push(g);var b=g.id=wn(l.responseState);return hi(u,l.responseState,b),Ci(l,u,d),Mr(u,l.responseState)}else{if(g.byteSize>l.progressiveChunkSize)return g.rootSegmentID=l.nextSegmentId++,l.completedBoundaries.push(g),hi(u,l.responseState,g.id),Ci(l,u,d),Mr(u,l.responseState);Kh(u,l.responseState);var k=g.completedSegments;if(k.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var R=k[0];return Ns(l,u,R),Zh(u,l.responseState)}}function Fp(l,u,d){return Vh(u,l.responseState,d.id,d.errorDigest,d.errorMessage,d.errorComponentStack)}function $c(l,u,d){return us(u,l.responseState,d.formatContext,d.id),Ns(l,u,d),kl(u,d.formatContext)}function Fs(l,u,d){for(var g=d.completedSegments,b=0;b<g.length;b++){var k=g[b];kf(l,u,d,k)}return g.length=0,At(u,l.responseState,d.id,d.rootSegmentID)}function sa(l,u,d){for(var g=d.completedSegments,b=0;b<g.length;b++){var k=g[b];if(!kf(l,u,d,k))return b++,g.splice(0,b),!1}return g.splice(0,b),!0}function kf(l,u,d,g){if(g.status===ea)return!0;var b=g.id;if(b===-1){var k=g.id=d.rootSegmentID;if(k===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return $c(l,u,g)}else return $c(l,u,g),K(u,l.responseState,b)}function la(l,u){try{var d=l.completedRootSegment;d!==null&&l.pendingRootTasks===0&&(Ns(l,u,d),l.completedRootSegment=null,lr(u,l.responseState));var g=l.clientRenderedBoundaries,b;for(b=0;b<g.length;b++){var k=g[b];if(!Fp(l,u,k)){l.destination=null,b++,g.splice(0,b);return}}g.splice(0,b);var R=l.completedBoundaries;for(b=0;b<R.length;b++){var M=R[b];if(!Fs(l,u,M)){l.destination=null,b++,R.splice(0,b);return}}R.splice(0,b);var F=l.partialBoundaries;for(b=0;b<F.length;b++){var U=F[b];if(!sa(l,u,U)){l.destination=null,b++,F.splice(0,b);return}}F.splice(0,b);var H=l.completedBoundaries;for(b=0;b<H.length;b++){var q=H[b];if(!Fs(l,u,q)){l.destination=null,b++,H.splice(0,b);return}}H.splice(0,b)}finally{l.allPendingTasks===0&&l.pingedTasks.length===0&&l.clientRenderedBoundaries.length===0&&l.completedBoundaries.length===0&&(l.abortableTasks.size!==0&&i("There was still abortable task at the root when we closed. This is a bug in React."),m(u))}}function Cf(l){s(function(){return Bc(l)})}function Lp(l,u){if(l.status===Ac){l.status=wi,E(u,l.fatalError);return}if(l.status!==wi&&l.destination===null){l.destination=u;try{la(l,u)}catch(d){Os(l,d),En(l,d)}}}function Ef(l,u){try{var d=l.abortableTasks;d.forEach(function(g){return wf(g,l,u)}),d.clear(),l.destination!==null&&la(l,l.destination)}catch(g){Os(l,g),En(l,g)}}function zc(){}function Tf(l,u,d,g){var b=!1,k=null,R="",M={push:function(q){return q!==null&&(R+=q),!0},destroy:function(q){b=!0,k=q}},F=!1;function U(){F=!0}var H=xo(l,Jh(d,u?u.identifierPrefix:void 0),Yh(),1/0,zc,void 0,U);if(Cf(H),Ef(H,g),Lp(H,M),b)throw k;if(!F)throw new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");return R}function Bp(l,u){return Tf(l,u,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')}function Rf(l,u){return Tf(l,u,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')}function $p(){throw new Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.")}function h(){throw new Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.")}Bs.renderToNodeStream=$p,Bs.renderToStaticMarkup=Rf,Bs.renderToStaticNodeStream=h,Bs.renderToString=Bp,Bs.version=e}()),Bs}var Kf={};/**
85
+ `+g.stack}}var ql=t.ReactCurrentDispatcher,Rs=t.ReactDebugCurrentFrame,ea=0,bo=1,ta=2,na=3,ra=4,So=0,Ic=1,wi=2,gf=12800;function Op(l){return console.error(l),null}function wo(){}function xo(l,u,d,g,b,k,R,M,F){var U=[],H=new Set,q={destination:null,responseState:u,progressiveChunkSize:g===void 0?gf:g,status:So,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:H,pingedTasks:U,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:b===void 0?Op:b,onAllReady:wo,onShellReady:R===void 0?wo:R,onShellError:wo,onFatalError:wo},de=ia(q,0,null,d,!1,!1);de.parentFlushed=!0;var Ae=xi(q,l,null,de,H,ys,Ll,fp);return U.push(Ae),q}function Ip(l,u){var d=l.pingedTasks;d.push(u),d.length===1&&s(function(){return zc(l)})}function Mp(l,u){return{id:Qi,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:u,errorDigest:null}}function xi(l,u,d,g,b,k,R,M){l.allPendingTasks++,d===null?l.pendingRootTasks++:d.pendingTasks++;var F={node:u,ping:function(){return Ip(l,F)},blockedBoundary:d,blockedSegment:g,abortSet:b,legacyContext:k,context:R,treeContext:M};return F.componentStack=null,b.add(F),F}function ia(l,u,d,g,b,k){return{status:ea,id:-1,index:u,parentFlushed:!1,chunks:[],children:[],formatContext:g,boundary:d,lastPushedText:b,textEmbedded:k}}var ur=null;function Mc(){return ur===null||ur.componentStack===null?"":Ql(ur.componentStack)}function ki(l,u){l.componentStack={tag:0,parent:l.componentStack,type:u}}function As(l,u){l.componentStack={tag:1,parent:l.componentStack,type:u}}function fr(l,u){l.componentStack={tag:2,parent:l.componentStack,type:u}}function Hn(l){l.componentStack===null?i("Unexpectedly popped too many stack frames. This is a bug in React."):l.componentStack=l.componentStack.parent}var dr=null;function oa(l,u){{var d;typeof u=="string"?d=u:u&&typeof u.message=="string"?d=u.message:d=String(u);var g=dr||Mc();dr=null,l.errorMessage=d,l.errorComponentStack=g}}function Os(l,u){var d=l.onError(u);if(d!=null&&typeof d!="string")throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof d+'" instead');return d}function En(l,u){var d=l.onShellError;d(u);var g=l.onFatalError;g(u),l.destination!==null?(l.status=wi,E(l.destination,u)):(l.status=Ic,l.fatalError=u)}function Is(l,u,d){ki(u,"Suspense");var g=u.blockedBoundary,b=u.blockedSegment,k=d.fallback,R=d.children,M=new Set,F=Mp(l,M),U=b.chunks.length,H=ia(l,U,F,b.formatContext,!1,!1);b.children.push(H),b.lastPushedText=!1;var q=ia(l,0,null,b.formatContext,!1,!1);q.parentFlushed=!0,u.blockedBoundary=F,u.blockedSegment=q;try{if(Ot(l,u,R),Vu(q.chunks,l.responseState,q.lastPushedText,q.textEmbedded),q.status=bo,ko(F,q),F.pendingTasks===0){Hn(u);return}}catch(Ae){q.status=ra,F.forceClientRender=!0,F.errorDigest=Os(l,Ae),oa(F,Ae)}finally{u.blockedBoundary=g,u.blockedSegment=b}var de=xi(l,k,g,H,M,u.legacyContext,u.context,u.treeContext);de.componentStack=u.componentStack,l.pingedTasks.push(de),Hn(u)}function Dc(l,u,d,g){ki(u,d);var b=u.blockedSegment,k=kn(b.chunks,d,g,l.responseState,b.formatContext);b.lastPushedText=!1;var R=b.formatContext;b.formatContext=Zi(R,d,g),Ot(l,u,k),b.formatContext=R,Pe(b.chunks,d),b.lastPushedText=!1,Hn(u)}function Ms(l){return l.prototype&&l.prototype.isReactComponent}function Ds(l,u,d,g,b){var k={};Si(u,k);var R=d(g,b);return bp(d,g,R,b)}function mf(l,u,d,g,b){var k=d.render();d.props!==b&&(_c||i("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ze(g)||"a component"),_c=!0);{var R=g.childContextTypes;if(R!=null){var M=u.legacyContext,F=qu(d,g,M,R);u.legacyContext=F,en(l,u,k),u.legacyContext=M;return}}en(l,u,k)}function Dp(l,u,d,g){fr(u,d);var b=vs(d,u.legacyContext),k=of(d,g,b);af(k,d,g,b),mf(l,u,k,d,g),Hn(u)}var yf={},Ps={},Pc={},vf={},_c=!1,_s={},Nc=!1,Fc=!1,Lc=!1;function bf(l,u,d,g){var b;if(b=vs(d,u.legacyContext),As(u,d),d.prototype&&typeof d.prototype.render=="function"){var k=ze(d)||"Unknown";yf[k]||(i("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",k,k),yf[k]=!0)}var R=Ds(l,u,d,g,b),M=Tc();if(typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0){var F=ze(d)||"Unknown";Ps[F]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",F,F,F),Ps[F]=!0)}if(typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0){{var U=ze(d)||"Unknown";Ps[U]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",U,U,U),Ps[U]=!0)}af(R,d,g,b),mf(l,u,R,d,g)}else if(Sf(d),M){var H=u.treeContext,q=1,de=0;u.treeContext=kc(H,q,de);try{en(l,u,R)}finally{u.treeContext=H}}else en(l,u,R);Hn(u)}function Sf(l){{if(l&&l.childContextTypes&&i("%s(...): childContextTypes cannot be defined on a function component.",l.displayName||l.name||"Component"),l.defaultProps!==void 0){var u=ze(l)||"Unknown";_s[u]||(i("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",u),_s[u]=!0)}if(typeof l.getDerivedStateFromProps=="function"){var d=ze(l)||"Unknown";vf[d]||(i("%s: Function components do not support getDerivedStateFromProps.",d),vf[d]=!0)}if(typeof l.contextType=="object"&&l.contextType!==null){var g=ze(l)||"Unknown";Pc[g]||(i("%s: Function components do not support contextType.",g),Pc[g]=!0)}}}function Bc(l,u){if(l&&l.defaultProps){var d=Ft({},u),g=l.defaultProps;for(var b in g)d[b]===void 0&&(d[b]=g[b]);return d}return u}function wf(l,u,d,g,b){As(u,d.render);var k=Ds(l,u,d.render,g,b),R=Tc();if(R){var M=u.treeContext,F=1,U=0;u.treeContext=kc(M,F,U);try{en(l,u,k)}finally{u.treeContext=M}}else en(l,u,k);Hn(u)}function Pp(l,u,d,g,b){var k=d.type,R=Bc(k,g);$c(l,u,k,R,b)}function _p(l,u,d,g){d._context===void 0?d!==d.Consumer&&(Lc||(Lc=!0,i("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):d=d._context;var b=g.children;typeof b!="function"&&i("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var k=Nr(d),R=b(k);en(l,u,R)}function xf(l,u,d,g){var b=d._context,k=g.value,R=g.children,M;M=u.context,u.context=ef(b,k),en(l,u,R),u.context=tf(b),M!==u.context&&i("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function Np(l,u,d,g,b){ki(u,"Lazy");var k=d._payload,R=d._init,M=R(k),F=Bc(M,g);$c(l,u,M,F,b),Hn(u)}function $c(l,u,d,g,b){if(typeof d=="function")if(Ms(d)){Dp(l,u,d,g);return}else{bf(l,u,d,g);return}if(typeof d=="string"){Dc(l,u,d,g);return}switch(d){case ac:case lc:case Xt:case Ju:case Tl:{en(l,u,g.children);return}case fs:{ki(u,"SuspenseList"),en(l,u,g.children),Hn(u);return}case sc:throw new Error("ReactDOMServer does not yet support scope components.");case Il:{Is(l,u,g);return}}if(typeof d=="object"&&d!==null)switch(d.$$typeof){case Ol:{wf(l,u,d,g,b);return}case ds:{Pp(l,u,d,g,b);return}case Rl:{xf(l,u,d,g);return}case Al:{_p(l,u,d,g);return}case ho:{Np(l,u,d,g);return}}var k="";throw(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(k+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(d==null?d:typeof d)+"."+k))}function Fp(l,u){typeof Symbol=="function"&&l[Symbol.toStringTag]==="Generator"&&(Nc||i("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Nc=!0),l.entries===u&&(Fc||i("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Fc=!0)}function en(l,u,d){try{return Lp(l,u,d)}catch(g){throw typeof g=="object"&&g!==null&&typeof g.then=="function"||(dr=dr!==null?dr:Mc()),g}}function Lp(l,u,d){if(u.node=d,typeof d=="object"&&d!==null){switch(d.$$typeof){case ip:{var g=d,b=g.type,k=g.props,R=g.ref;$c(l,u,b,k,R);return}case Gu:throw new Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case ho:{var M=d,F=M._payload,U=M._init,H;try{H=U(F)}catch(Co){throw typeof Co=="object"&&Co!==null&&typeof Co.then=="function"&&ki(u,"Lazy"),Co}en(l,u,H);return}}if(ln(d)){sa(l,u,d);return}var q=sp(d);if(q){Fp(d,q);var de=q.call(d);if(de){var Ae=de.next();if(!Ae.done){var ut=[];do ut.push(Ae.value),Ae=de.next();while(!Ae.done);sa(l,u,ut);return}return}}var Ei=Object.prototype.toString.call(d);throw new Error("Objects are not valid as a React child (found: "+(Ei==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":Ei)+"). If you meant to render a collection of children, use an array instead.")}if(typeof d=="string"){var Ti=u.blockedSegment;Ti.lastPushedText=Hu(u.blockedSegment.chunks,d,l.responseState,Ti.lastPushedText);return}if(typeof d=="number"){var hr=u.blockedSegment;hr.lastPushedText=Hu(u.blockedSegment.chunks,""+d,l.responseState,hr.lastPushedText);return}typeof d=="function"&&i("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}function sa(l,u,d){for(var g=d.length,b=0;b<g;b++){var k=u.treeContext;u.treeContext=kc(k,g,b);try{Ot(l,u,d[b])}finally{u.treeContext=k}}}function Bp(l,u,d){var g=u.blockedSegment,b=g.chunks.length,k=ia(l,b,null,g.formatContext,g.lastPushedText,!0);g.children.push(k),g.lastPushedText=!1;var R=xi(l,u.node,u.blockedBoundary,k,u.abortSet,u.legacyContext,u.context,u.treeContext);u.componentStack!==null&&(R.componentStack=u.componentStack.parent);var M=R.ping;d.then(M,M)}function Ot(l,u,d){var g=u.blockedSegment.formatContext,b=u.legacyContext,k=u.context,R=null;R=u.componentStack;try{return en(l,u,d)}catch(M){if(Ts(),typeof M=="object"&&M!==null&&typeof M.then=="function"){Bp(l,u,M),u.blockedSegment.formatContext=g,u.legacyContext=b,u.context=k,Ss(k),u.componentStack=R;return}else throw u.blockedSegment.formatContext=g,u.legacyContext=b,u.context=k,Ss(k),u.componentStack=R,M}}function $p(l,u,d,g){var b=Os(l,g);if(u===null?En(l,g):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=b,oa(u,g),u.parentFlushed&&l.clientRenderedBoundaries.push(u))),l.allPendingTasks--,l.allPendingTasks===0){var k=l.onAllReady;k()}}function kf(l){var u=this,d=l.blockedBoundary,g=l.blockedSegment;g.status=na,Ef(u,d,g)}function Cf(l,u,d){var g=l.blockedBoundary,b=l.blockedSegment;if(b.status=na,g===null)u.allPendingTasks--,u.status!==wi&&(u.status=wi,u.destination!==null&&m(u.destination));else{if(g.pendingTasks--,!g.forceClientRender){g.forceClientRender=!0;var k=d===void 0?new Error("The render was aborted by the server without a reason."):d;g.errorDigest=u.onError(k);{var R="The server did not finish this Suspense boundary: ";k&&typeof k.message=="string"?k=R+k.message:k=R+String(k);var M=ur;ur=l;try{oa(g,k)}finally{ur=M}}g.parentFlushed&&u.clientRenderedBoundaries.push(g)}if(g.fallbackAbortableTasks.forEach(function(U){return Cf(U,u,d)}),g.fallbackAbortableTasks.clear(),u.allPendingTasks--,u.allPendingTasks===0){var F=u.onAllReady;F()}}}function ko(l,u){if(u.chunks.length===0&&u.children.length===1&&u.children[0].boundary===null){var d=u.children[0];d.id=u.id,d.parentFlushed=!0,d.status===bo&&ko(l,d)}else{var g=l.completedSegments;g.push(u)}}function Ef(l,u,d){if(u===null){if(d.parentFlushed){if(l.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");l.completedRootSegment=d}if(l.pendingRootTasks--,l.pendingRootTasks===0){l.onShellError=wo;var g=l.onShellReady;g()}}else if(u.pendingTasks--,!u.forceClientRender){if(u.pendingTasks===0)d.parentFlushed&&d.status===bo&&ko(u,d),u.parentFlushed&&l.completedBoundaries.push(u),u.fallbackAbortableTasks.forEach(kf,l),u.fallbackAbortableTasks.clear();else if(d.parentFlushed&&d.status===bo){ko(u,d);var b=u.completedSegments;b.length===1&&u.parentFlushed&&l.partialBoundaries.push(u)}}if(l.allPendingTasks--,l.allPendingTasks===0){var k=l.onAllReady;k()}}function zp(l,u){var d=u.blockedSegment;if(d.status===ea){Ss(u.context);var g=null;g=ur,ur=u;try{en(l,u,u.node),Vu(d.chunks,l.responseState,d.lastPushedText,d.textEmbedded),u.abortSet.delete(u),d.status=bo,Ef(l,u.blockedBoundary,d)}catch(k){if(Ts(),typeof k=="object"&&k!==null&&typeof k.then=="function"){var b=u.ping;k.then(b,b)}else u.abortSet.delete(u),d.status=ra,$p(l,u.blockedBoundary,d,k)}finally{ur=g}}}function zc(l){if(l.status!==wi){var u=nf(),d=ql.current;ql.current=hf;var g;g=Rs.getCurrentStack,Rs.getCurrentStack=Mc;var b=Oc;pf(l.responseState);try{var k=l.pingedTasks,R;for(R=0;R<k.length;R++){var M=k[R];zp(l,M)}k.splice(0,R),l.destination!==null&&aa(l,l.destination)}catch(F){Os(l,F),En(l,F)}finally{pf(b),ql.current=d,Rs.getCurrentStack=g,d===hf&&Ss(u)}}}function Ci(l,u,d){switch(d.parentFlushed=!0,d.status){case ea:{var g=d.id=l.nextSegmentId++;return d.lastPushedText=!1,d.textEmbedded=!1,jn(u,l.responseState,g)}case bo:{d.status=ta;for(var b=!0,k=d.chunks,R=0,M=d.children,F=0;F<M.length;F++){for(var U=M[F];R<U.index;R++)c(u,k[R]);b=Ns(l,u,U)}for(;R<k.length-1;R++)c(u,k[R]);return R<k.length&&(b=f(u,k[R])),b}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function Ns(l,u,d){var g=d.boundary;if(g===null)return Ci(l,u,d);if(g.parentFlushed=!0,g.forceClientRender)return tp(u,l.responseState,g.errorDigest,g.errorMessage,g.errorComponentStack),Ci(l,u,d),rp(u,l.responseState);if(g.pendingTasks>0){g.rootSegmentID=l.nextSegmentId++,g.completedSegments.length>0&&l.partialBoundaries.push(g);var b=g.id=wn(l.responseState);return hi(u,l.responseState,b),Ci(l,u,d),Mr(u,l.responseState)}else{if(g.byteSize>l.progressiveChunkSize)return g.rootSegmentID=l.nextSegmentId++,l.completedBoundaries.push(g),hi(u,l.responseState,g.id),Ci(l,u,d),Mr(u,l.responseState);ep(u,l.responseState);var k=g.completedSegments;if(k.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var R=k[0];return Ns(l,u,R),np(u,l.responseState)}}function jp(l,u,d){return Xh(u,l.responseState,d.id,d.errorDigest,d.errorMessage,d.errorComponentStack)}function jc(l,u,d){return us(u,l.responseState,d.formatContext,d.id),Ns(l,u,d),Cl(u,d.formatContext)}function Fs(l,u,d){for(var g=d.completedSegments,b=0;b<g.length;b++){var k=g[b];Tf(l,u,d,k)}return g.length=0,At(u,l.responseState,d.id,d.rootSegmentID)}function la(l,u,d){for(var g=d.completedSegments,b=0;b<g.length;b++){var k=g[b];if(!Tf(l,u,d,k))return b++,g.splice(0,b),!1}return g.splice(0,b),!0}function Tf(l,u,d,g){if(g.status===ta)return!0;var b=g.id;if(b===-1){var k=g.id=d.rootSegmentID;if(k===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return jc(l,u,g)}else return jc(l,u,g),K(u,l.responseState,b)}function aa(l,u){try{var d=l.completedRootSegment;d!==null&&l.pendingRootTasks===0&&(Ns(l,u,d),l.completedRootSegment=null,lr(u,l.responseState));var g=l.clientRenderedBoundaries,b;for(b=0;b<g.length;b++){var k=g[b];if(!jp(l,u,k)){l.destination=null,b++,g.splice(0,b);return}}g.splice(0,b);var R=l.completedBoundaries;for(b=0;b<R.length;b++){var M=R[b];if(!Fs(l,u,M)){l.destination=null,b++,R.splice(0,b);return}}R.splice(0,b);var F=l.partialBoundaries;for(b=0;b<F.length;b++){var U=F[b];if(!la(l,u,U)){l.destination=null,b++,F.splice(0,b);return}}F.splice(0,b);var H=l.completedBoundaries;for(b=0;b<H.length;b++){var q=H[b];if(!Fs(l,u,q)){l.destination=null,b++,H.splice(0,b);return}}H.splice(0,b)}finally{l.allPendingTasks===0&&l.pingedTasks.length===0&&l.clientRenderedBoundaries.length===0&&l.completedBoundaries.length===0&&(l.abortableTasks.size!==0&&i("There was still abortable task at the root when we closed. This is a bug in React."),m(u))}}function Rf(l){s(function(){return zc(l)})}function Up(l,u){if(l.status===Ic){l.status=wi,E(u,l.fatalError);return}if(l.status!==wi&&l.destination===null){l.destination=u;try{aa(l,u)}catch(d){Os(l,d),En(l,d)}}}function Af(l,u){try{var d=l.abortableTasks;d.forEach(function(g){return Cf(g,l,u)}),d.clear(),l.destination!==null&&aa(l,l.destination)}catch(g){Os(l,g),En(l,g)}}function Uc(){}function Of(l,u,d,g){var b=!1,k=null,R="",M={push:function(q){return q!==null&&(R+=q),!0},destroy:function(q){b=!0,k=q}},F=!1;function U(){F=!0}var H=xo(l,Qh(d,u?u.identifierPrefix:void 0),qh(),1/0,Uc,void 0,U);if(Rf(H),Af(H,g),Up(H,M),b)throw k;if(!F)throw new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");return R}function Wp(l,u){return Of(l,u,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')}function If(l,u){return Of(l,u,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')}function Hp(){throw new Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.")}function h(){throw new Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.")}Bs.renderToNodeStream=Hp,Bs.renderToStaticMarkup=If,Bs.renderToStaticNodeStream=h,Bs.renderToString=Wp,Bs.version=e}()),Bs}var Qf={};/**
86
86
  * @license React
87
87
  * react-dom-server.browser.development.js
88
88
  *
@@ -90,17 +90,17 @@ Error generating stack: `+g.message+`
90
90
  *
91
91
  * This source code is licensed under the MIT license found in the
92
92
  * LICENSE file in the root directory of this source tree.
93
- */var ZS;function gz(){return ZS||(ZS=1,process.env.NODE_ENV!=="production"&&function(){var n=_u,e="18.3.1",t=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(h){{for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];o("warn",h,u)}}function i(h){{for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];o("error",h,u)}}function o(h,l,u){{var d=t.ReactDebugCurrentFrame,g=d.getStackAddendum();g!==""&&(l+="%s",u=u.concat([g]));var b=u.map(function(k){return String(k)});b.unshift("Warning: "+l),Function.prototype.apply.call(console[h],console,b)}}function s(h){h()}var a=512,c=null,f=0;function p(h){c=new Uint8Array(a),f=0}function m(h,l){if(l.length!==0){if(l.length>a){f>0&&(h.enqueue(new Uint8Array(c.buffer,0,f)),c=new Uint8Array(a),f=0),h.enqueue(l);return}var u=l,d=c.length-f;d<u.length&&(d===0?h.enqueue(c):(c.set(u.subarray(0,d),f),h.enqueue(c),u=u.subarray(d)),c=new Uint8Array(a),f=0),c.set(u,f),f+=u.length}}function S(h,l){return m(h,l),!0}function C(h){c&&f>0&&(h.enqueue(new Uint8Array(c.buffer,0,f)),c=null,f=0)}function E(h){h.close()}var P=new TextEncoder;function D(h){return P.encode(h)}function _(h){return P.encode(h)}function J(h,l){typeof h.error=="function"?h.error(l):h.close()}function ie(h){{var l=typeof Symbol=="function"&&Symbol.toStringTag,u=l&&h[Symbol.toStringTag]||h.constructor.name||"Object";return u}}function oe(h){try{return te(h),!1}catch{return!0}}function te(h){return""+h}function G(h,l){if(oe(h))return i("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",l,ie(h)),te(h)}function ne(h,l){if(oe(h))return i("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",l,ie(h)),te(h)}function ae(h){if(oe(h))return i("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",ie(h)),te(h)}var Q=Object.prototype.hasOwnProperty,Ee=0,re=1,X=2,fe=3,V=4,De=5,ye=6,xe=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ie=xe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",be=new RegExp("^["+xe+"]["+Ie+"]*$"),lt={},pe={};function Me(h){return Q.call(pe,h)?!0:Q.call(lt,h)?!1:be.test(h)?(pe[h]=!0,!0):(lt[h]=!0,i("Invalid attribute name: `%s`",h),!1)}function it(h,l,u,d){if(u!==null&&u.type===Ee)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":{if(u!==null)return!u.acceptsBooleans;var g=h.toLowerCase().slice(0,5);return g!=="data-"&&g!=="aria-"}default:return!1}}function _t(h){return je.hasOwnProperty(h)?je[h]:null}function Fe(h,l,u,d,g,b,k){this.acceptsBooleans=l===X||l===fe||l===V,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=h,this.type=l,this.sanitizeURL=b,this.removeEmptyString=k}var je={},Qn=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Qn.forEach(function(h){je[h]=new Fe(h,Ee,!1,h,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(h){var l=h[0],u=h[1];je[l]=new Fe(l,re,!1,u,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(h){je[h]=new Fe(h,X,!1,h.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(h){je[h]=new Fe(h,X,!1,h,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(h){je[h]=new Fe(h,fe,!1,h.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(h){je[h]=new Fe(h,fe,!0,h,null,!1,!1)}),["capture","download"].forEach(function(h){je[h]=new Fe(h,V,!1,h,null,!1,!1)}),["cols","rows","size","span"].forEach(function(h){je[h]=new Fe(h,ye,!1,h,null,!1,!1)}),["rowSpan","start"].forEach(function(h){je[h]=new Fe(h,De,!1,h.toLowerCase(),null,!1,!1)});var qn=/[\-\:]([a-z])/g,kt=function(h){return h[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(h){var l=h.replace(qn,kt);je[l]=new Fe(l,re,!1,h,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(h){var l=h.replace(qn,kt);je[l]=new Fe(l,re,!1,h,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(h){var l=h.replace(qn,kt);je[l]=new Fe(l,re,!1,h,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(h){je[h]=new Fe(h,re,!1,h.toLowerCase(),null,!1,!1)});var bn="xlinkHref";je[bn]=new Fe("xlinkHref",re,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(h){je[h]=new Fe(h,re,!1,h.toLowerCase(),null,!0,!0)});var at={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function Sr(h,l){return h+l.charAt(0).toUpperCase()+l.substring(1)}var qe=["Webkit","ms","Moz","O"];Object.keys(at).forEach(function(h){qe.forEach(function(l){at[Sr(l,h)]=at[h]})});var ct={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function wr(h,l){ct[l.type]||l.onChange||l.onInput||l.readOnly||l.disabled||l.value==null||i("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),l.onChange||l.readOnly||l.disabled||l.checked==null||i("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function er(h,l){if(h.indexOf("-")===-1)return typeof l.is=="string";switch(h){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vi={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Ht={},tr=new RegExp("^(aria)-["+Ie+"]*$"),nr=new RegExp("^(aria)[A-Z]["+Ie+"]*$");function Gi(h,l){{if(Q.call(Ht,l)&&Ht[l])return!0;if(nr.test(l)){var u="aria-"+l.slice(4).toLowerCase(),d=Vi.hasOwnProperty(u)?u:null;if(d==null)return i("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",l),Ht[l]=!0,!0;if(l!==d)return i("Invalid ARIA attribute `%s`. Did you mean `%s`?",l,d),Ht[l]=!0,!0}if(tr.test(l)){var g=l.toLowerCase(),b=Vi.hasOwnProperty(g)?g:null;if(b==null)return Ht[l]=!0,!1;if(l!==b)return i("Unknown ARIA attribute `%s`. Did you mean `%s`?",l,b),Ht[l]=!0,!0}}return!0}function Vt(h,l){{var u=[];for(var d in l){var g=Gi(h,d);g||u.push(d)}var b=u.map(function(k){return"`"+k+"`"}).join(", ");u.length===1?i("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",b,h):u.length>1&&i("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",b,h)}}function ot(h,l){er(h,l)||Vt(h,l)}var Xe=!1;function ti(h,l){{if(h!=="input"&&h!=="textarea"&&h!=="select")return;l!=null&&l.value===null&&!Xe&&(Xe=!0,h==="select"&&l.multiple?i("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",h):i("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",h))}}var ni={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},ri=function(){};{var Je={},ii=/^on./,Ji=/^on[^A-Z]/,Yi=new RegExp("^(aria)-["+Ie+"]*$"),oi=new RegExp("^(aria)[A-Z]["+Ie+"]*$");ri=function(h,l,u,d){if(Q.call(Je,l)&&Je[l])return!0;var g=l.toLowerCase();if(g==="onfocusin"||g==="onfocusout")return i("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Je[l]=!0,!0;if(d!=null){var b=d.registrationNameDependencies,k=d.possibleRegistrationNames;if(b.hasOwnProperty(l))return!0;var R=k.hasOwnProperty(g)?k[g]:null;if(R!=null)return i("Invalid event handler property `%s`. Did you mean `%s`?",l,R),Je[l]=!0,!0;if(ii.test(l))return i("Unknown event handler property `%s`. It will be ignored.",l),Je[l]=!0,!0}else if(ii.test(l))return Ji.test(l)&&i("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",l),Je[l]=!0,!0;if(Yi.test(l)||oi.test(l))return!0;if(g==="innerhtml")return i("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Je[l]=!0,!0;if(g==="aria")return i("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Je[l]=!0,!0;if(g==="is"&&u!==null&&u!==void 0&&typeof u!="string")return i("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof u),Je[l]=!0,!0;if(typeof u=="number"&&isNaN(u))return i("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",l),Je[l]=!0,!0;var M=_t(l),F=M!==null&&M.type===Ee;if(ni.hasOwnProperty(g)){var U=ni[g];if(U!==l)return i("Invalid DOM property `%s`. Did you mean `%s`?",l,U),Je[l]=!0,!0}else if(!F&&l!==g)return i("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",l,g),Je[l]=!0,!0;return typeof u=="boolean"&&it(l,u,M)?(u?i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',u,l,l,u,l):i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',u,l,l,u,l,l,l),Je[l]=!0,!0):F?!0:it(l,u,M)?(Je[l]=!0,!1):((u==="false"||u==="true")&&M!==null&&M.type===fe&&(i("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",u,l,u==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',l,u),Je[l]=!0),!0)}}var xr=function(h,l,u){{var d=[];for(var g in l){var b=ri(h,g,l[g],u);b||d.push(g)}var k=d.map(function(R){return"`"+R+"`"}).join(", ");d.length===1?i("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",k,h):d.length>1&&i("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",k,h)}};function ts(h,l,u){er(h,l)||xr(h,l,u)}var si=function(){};{var In=/^(?:webkit|moz|o)[A-Z]/,li=/^-ms-/,Ki=/-(.)/g,ft=/;\s*$/,on={},Mn={},Oe=!1,Dn=!1,kr=function(h){return h.replace(Ki,function(l,u){return u.toUpperCase()})},rr=function(h){on.hasOwnProperty(h)&&on[h]||(on[h]=!0,i("Unsupported style property %s. Did you mean %s?",h,kr(h.replace(li,"ms-"))))},sn=function(h){on.hasOwnProperty(h)&&on[h]||(on[h]=!0,i("Unsupported vendor-prefixed style property %s. Did you mean %s?",h,h.charAt(0).toUpperCase()+h.slice(1)))},Cr=function(h,l){Mn.hasOwnProperty(l)&&Mn[l]||(Mn[l]=!0,i(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,h,l.replace(ft,"")))},Sn=function(h,l){Oe||(Oe=!0,i("`NaN` is an invalid value for the `%s` css style property.",h))},et=function(h,l){Dn||(Dn=!0,i("`Infinity` is an invalid value for the `%s` css style property.",h))};si=function(h,l){h.indexOf("-")>-1?rr(h):In.test(h)?sn(h):ft.test(l)&&Cr(h,l),typeof l=="number"&&(isNaN(l)?Sn(h,l):isFinite(l)||et(h,l))}}var ai=si,ci=/["'&<>]/;function Xi(h){ae(h);var l=""+h,u=ci.exec(l);if(!u)return l;var d,g="",b,k=0;for(b=u.index;b<l.length;b++){switch(l.charCodeAt(b)){case 34:d="&quot;";break;case 38:d="&amp;";break;case 39:d="&#x27;";break;case 60:d="&lt;";break;case 62:d="&gt;";break;default:continue}k!==b&&(g+=l.substring(k,b)),k=b+1,g+=d}return k!==b?g+l.substring(k,b):g}function Ye(h){return typeof h=="boolean"||typeof h=="number"?""+h:Xi(h)}var ui=/([A-Z])/g,ns=/^ms-/;function rs(h){return h.replace(ui,"-$1").toLowerCase().replace(ns,"-ms-")}var ln=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,fi=!1;function Er(h){!fi&&ln.test(h)&&(fi=!0,i("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(h)))}var Pn=Array.isArray;function Ct(h){return Pn(h)}var an=_("<script>"),Tr=_("<\/script>"),_n=_('<script src="'),Nn=_('<script type="module" src="'),cn=_('" async=""><\/script>');function Fn(h){return ae(h),(""+h).replace(Et,Zi)}var Et=/(<\/|<)(s)(cript)/gi,Zi=function(h,l,u,d){return""+l+(u==="s"?"\\u0073":"\\u0053")+d};function Qi(h,l,u,d,g){var b=h===void 0?"":h,k=l===void 0?an:_('<script nonce="'+Ye(l)+'">'),R=[];if(u!==void 0&&R.push(k,D(Fn(u)),Tr),d!==void 0)for(var M=0;M<d.length;M++)R.push(_n,D(Ye(d[M])),cn);if(g!==void 0)for(var F=0;F<g.length;F++)R.push(Nn,D(Ye(g[F])),cn);return{bootstrapChunks:R,startInlineScript:k,placeholderPrefix:_(b+"P:"),segmentPrefix:_(b+"S:"),boundaryPrefix:b+"B:",idPrefix:b,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}var wn=0,Ke=1,un=2,fn=3,Ln=4,Rr=5,Gt=6,dn=7;function dt(h,l){return{insertionMode:h,selectedValue:l}}function Bn(h){var l=h==="http://www.w3.org/2000/svg"?un:h==="http://www.w3.org/1998/Math/MathML"?fn:wn;return dt(l,null)}function ir(h,l,u){switch(l){case"select":return dt(Ke,u.value!=null?u.value:u.defaultValue);case"svg":return dt(un,null);case"math":return dt(fn,null);case"foreignObject":return dt(Ke,null);case"table":return dt(Ln,null);case"thead":case"tbody":case"tfoot":return dt(Rr,null);case"colgroup":return dt(dn,null);case"tr":return dt(Gt,null)}return h.insertionMode>=Ln||h.insertionMode===wn?dt(Ke,null):h}var Ar=null;function Nt(h){var l=h.nextSuspenseID++;return _(h.boundaryPrefix+l.toString(16))}function hn(h,l,u){var d=h.idPrefix,g=":"+d+"R"+l;return u>0&&(g+="H"+u.toString(32)),g+":"}function ht(h){return Ye(h)}var Or=_("<!-- -->");function rt(h,l,u,d){return l===""?d:(d&&h.push(Or),h.push(D(ht(l))),!0)}function Tt(h,l,u,d){u&&d&&h.push(Or)}var y=new Map;function x(h){var l=y.get(h);if(l!==void 0)return l;var u=_(Ye(rs(h)));return y.set(h,u),u}var A=_(' style="'),I=_(":"),B=_(";");function N(h,l,u){if(typeof u!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var d=!0;for(var g in u)if(Q.call(u,g)){var b=u[g];if(!(b==null||typeof b=="boolean"||b==="")){var k=void 0,R=void 0,M=g.indexOf("--")===0;M?(k=D(Ye(g)),ne(b,g),R=D(Ye((""+b).trim()))):(ai(g,b),k=x(g),typeof b=="number"?b!==0&&!Q.call(at,g)?R=D(b+"px"):R=D(""+b):(ne(b,g),R=D(Ye((""+b).trim())))),d?(d=!1,h.push(A,k,I,R)):h.push(B,k,I,R)}}d||h.push(se)}var z=_(" "),Y=_('="'),se=_('"'),ce=_('=""');function le(h,l,u,d){switch(u){case"style":{N(h,l,d);return}case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(u.length>2&&(u[0]==="o"||u[0]==="O")&&(u[1]==="n"||u[1]==="N"))){var g=_t(u);if(g!==null){switch(typeof d){case"function":case"symbol":return;case"boolean":if(!g.acceptsBooleans)return}var b=g.attributeName,k=D(b);switch(g.type){case fe:d&&h.push(z,k,ce);return;case V:d===!0?h.push(z,k,ce):d===!1||h.push(z,k,Y,D(Ye(d)),se);return;case De:isNaN(d)||h.push(z,k,Y,D(Ye(d)),se);break;case ye:!isNaN(d)&&d>=1&&h.push(z,k,Y,D(Ye(d)),se);break;default:g.sanitizeURL&&(G(d,b),d=""+d,Er(d)),h.push(z,k,Y,D(Ye(d)),se)}}else if(Me(u)){switch(typeof d){case"function":case"symbol":return;case"boolean":{var R=u.toLowerCase().slice(0,5);if(R!=="data-"&&R!=="aria-")return}}h.push(z,D(u),Y,D(Ye(d)),se)}}}var Te=_(">"),pt=_("/>");function gt(h,l,u){if(l!=null){if(u!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof l!="object"||!("__html"in l))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var d=l.__html;d!=null&&(ae(d),h.push(D(""+d)))}}var mt=!1,$n=!1,pn=!1,Ir=!1,zn=!1,or=!1,xn=!1;function sr(h,l){{var u=h[l];if(u!=null){var d=Ct(u);h.multiple&&!d?i("The `%s` prop supplied to <select> must be an array if `multiple` is true.",l):!h.multiple&&d&&i("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",l)}}}function Xa(h,l,u){wr("select",l),sr(l,"value"),sr(l,"defaultValue"),l.value!==void 0&&l.defaultValue!==void 0&&!pn&&(i("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),pn=!0),h.push(Jt("select"));var d=null,g=null;for(var b in l)if(Q.call(l,b)){var k=l[b];if(k==null)continue;switch(b){case"children":d=k;break;case"dangerouslySetInnerHTML":g=k;break;case"defaultValue":case"value":break;default:le(h,u,b,k);break}}return h.push(Te),gt(h,g,d),d}function Za(h){var l="";return n.Children.forEach(h,function(u){u!=null&&(l+=u,!zn&&typeof u!="string"&&typeof u!="number"&&(zn=!0,i("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),l}var qi=_(' selected=""');function gn(h,l,u,d){var g=d.selectedValue;h.push(Jt("option"));var b=null,k=null,R=null,M=null;for(var F in l)if(Q.call(l,F)){var U=l[F];if(U==null)continue;switch(F){case"children":b=U;break;case"selected":R=U,xn||(i("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),xn=!0);break;case"dangerouslySetInnerHTML":M=U;break;case"value":k=U;default:le(h,u,F,U);break}}if(g!=null){var H;if(k!==null?(G(k,"value"),H=""+k):(M!==null&&(or||(or=!0,i("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),H=Za(b)),Ct(g))for(var q=0;q<g.length;q++){G(g[q],"value");var de=""+g[q];if(de===H){h.push(qi);break}}else G(g,"select.value"),""+g===H&&h.push(qi)}else R&&h.push(qi);return h.push(Te),gt(h,M,b),b}function Qa(h,l,u){wr("input",l),l.checked!==void 0&&l.defaultChecked!==void 0&&!$n&&(i("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",l.type),$n=!0),l.value!==void 0&&l.defaultValue!==void 0&&!mt&&(i("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",l.type),mt=!0),h.push(Jt("input"));var d=null,g=null,b=null,k=null;for(var R in l)if(Q.call(l,R)){var M=l[R];if(M==null)continue;switch(R){case"children":case"dangerouslySetInnerHTML":throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"defaultChecked":k=M;break;case"defaultValue":g=M;break;case"checked":b=M;break;case"value":d=M;break;default:le(h,u,R,M);break}}return b!==null?le(h,u,"checked",b):k!==null&&le(h,u,"checked",k),d!==null?le(h,u,"value",d):g!==null&&le(h,u,"value",g),h.push(pt),null}function kn(h,l,u){wr("textarea",l),l.value!==void 0&&l.defaultValue!==void 0&&!Ir&&(i("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"),Ir=!0),h.push(Jt("textarea"));var d=null,g=null,b=null;for(var k in l)if(Q.call(l,k)){var R=l[k];if(R==null)continue;switch(k){case"children":b=R;break;case"value":d=R;break;case"defaultValue":g=R;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:le(h,u,k,R);break}}if(d===null&&g!==null&&(d=g),h.push(Te),b!=null){if(i("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),d!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Ct(b)){if(b.length>1)throw new Error("<textarea> can only have at most one child.");ae(b[0]),d=""+b[0]}ae(b),d=""+b}return typeof d=="string"&&d[0]===`
93
+ */var lw;function zz(){return lw||(lw=1,process.env.NODE_ENV!=="production"&&function(){var n=rl,e="18.3.1",t=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(h){{for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];o("warn",h,u)}}function i(h){{for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];o("error",h,u)}}function o(h,l,u){{var d=t.ReactDebugCurrentFrame,g=d.getStackAddendum();g!==""&&(l+="%s",u=u.concat([g]));var b=u.map(function(k){return String(k)});b.unshift("Warning: "+l),Function.prototype.apply.call(console[h],console,b)}}function s(h){h()}var a=512,c=null,f=0;function p(h){c=new Uint8Array(a),f=0}function m(h,l){if(l.length!==0){if(l.length>a){f>0&&(h.enqueue(new Uint8Array(c.buffer,0,f)),c=new Uint8Array(a),f=0),h.enqueue(l);return}var u=l,d=c.length-f;d<u.length&&(d===0?h.enqueue(c):(c.set(u.subarray(0,d),f),h.enqueue(c),u=u.subarray(d)),c=new Uint8Array(a),f=0),c.set(u,f),f+=u.length}}function S(h,l){return m(h,l),!0}function C(h){c&&f>0&&(h.enqueue(new Uint8Array(c.buffer,0,f)),c=null,f=0)}function E(h){h.close()}var P=new TextEncoder;function D(h){return P.encode(h)}function _(h){return P.encode(h)}function J(h,l){typeof h.error=="function"?h.error(l):h.close()}function ie(h){{var l=typeof Symbol=="function"&&Symbol.toStringTag,u=l&&h[Symbol.toStringTag]||h.constructor.name||"Object";return u}}function oe(h){try{return te(h),!1}catch{return!0}}function te(h){return""+h}function G(h,l){if(oe(h))return i("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",l,ie(h)),te(h)}function ne(h,l){if(oe(h))return i("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",l,ie(h)),te(h)}function ae(h){if(oe(h))return i("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",ie(h)),te(h)}var Q=Object.prototype.hasOwnProperty,Ee=0,re=1,X=2,fe=3,V=4,De=5,ye=6,xe=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ie=xe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",be=new RegExp("^["+xe+"]["+Ie+"]*$"),lt={},pe={};function Me(h){return Q.call(pe,h)?!0:Q.call(lt,h)?!1:be.test(h)?(pe[h]=!0,!0):(lt[h]=!0,i("Invalid attribute name: `%s`",h),!1)}function it(h,l,u,d){if(u!==null&&u.type===Ee)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":{if(u!==null)return!u.acceptsBooleans;var g=h.toLowerCase().slice(0,5);return g!=="data-"&&g!=="aria-"}default:return!1}}function _t(h){return je.hasOwnProperty(h)?je[h]:null}function Fe(h,l,u,d,g,b,k){this.acceptsBooleans=l===X||l===fe||l===V,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=h,this.type=l,this.sanitizeURL=b,this.removeEmptyString=k}var je={},Qn=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Qn.forEach(function(h){je[h]=new Fe(h,Ee,!1,h,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(h){var l=h[0],u=h[1];je[l]=new Fe(l,re,!1,u,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(h){je[h]=new Fe(h,X,!1,h.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(h){je[h]=new Fe(h,X,!1,h,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(h){je[h]=new Fe(h,fe,!1,h.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(h){je[h]=new Fe(h,fe,!0,h,null,!1,!1)}),["capture","download"].forEach(function(h){je[h]=new Fe(h,V,!1,h,null,!1,!1)}),["cols","rows","size","span"].forEach(function(h){je[h]=new Fe(h,ye,!1,h,null,!1,!1)}),["rowSpan","start"].forEach(function(h){je[h]=new Fe(h,De,!1,h.toLowerCase(),null,!1,!1)});var qn=/[\-\:]([a-z])/g,kt=function(h){return h[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(h){var l=h.replace(qn,kt);je[l]=new Fe(l,re,!1,h,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(h){var l=h.replace(qn,kt);je[l]=new Fe(l,re,!1,h,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(h){var l=h.replace(qn,kt);je[l]=new Fe(l,re,!1,h,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(h){je[h]=new Fe(h,re,!1,h.toLowerCase(),null,!1,!1)});var bn="xlinkHref";je[bn]=new Fe("xlinkHref",re,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(h){je[h]=new Fe(h,re,!1,h.toLowerCase(),null,!0,!0)});var at={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function Sr(h,l){return h+l.charAt(0).toUpperCase()+l.substring(1)}var qe=["Webkit","ms","Moz","O"];Object.keys(at).forEach(function(h){qe.forEach(function(l){at[Sr(l,h)]=at[h]})});var ct={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function wr(h,l){ct[l.type]||l.onChange||l.onInput||l.readOnly||l.disabled||l.value==null||i("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),l.onChange||l.readOnly||l.disabled||l.checked==null||i("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function er(h,l){if(h.indexOf("-")===-1)return typeof l.is=="string";switch(h){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vi={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Ht={},tr=new RegExp("^(aria)-["+Ie+"]*$"),nr=new RegExp("^(aria)[A-Z]["+Ie+"]*$");function Gi(h,l){{if(Q.call(Ht,l)&&Ht[l])return!0;if(nr.test(l)){var u="aria-"+l.slice(4).toLowerCase(),d=Vi.hasOwnProperty(u)?u:null;if(d==null)return i("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",l),Ht[l]=!0,!0;if(l!==d)return i("Invalid ARIA attribute `%s`. Did you mean `%s`?",l,d),Ht[l]=!0,!0}if(tr.test(l)){var g=l.toLowerCase(),b=Vi.hasOwnProperty(g)?g:null;if(b==null)return Ht[l]=!0,!1;if(l!==b)return i("Unknown ARIA attribute `%s`. Did you mean `%s`?",l,b),Ht[l]=!0,!0}}return!0}function Vt(h,l){{var u=[];for(var d in l){var g=Gi(h,d);g||u.push(d)}var b=u.map(function(k){return"`"+k+"`"}).join(", ");u.length===1?i("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",b,h):u.length>1&&i("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",b,h)}}function ot(h,l){er(h,l)||Vt(h,l)}var Xe=!1;function ti(h,l){{if(h!=="input"&&h!=="textarea"&&h!=="select")return;l!=null&&l.value===null&&!Xe&&(Xe=!0,h==="select"&&l.multiple?i("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",h):i("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",h))}}var ni={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},ri=function(){};{var Je={},ii=/^on./,Ji=/^on[^A-Z]/,Yi=new RegExp("^(aria)-["+Ie+"]*$"),oi=new RegExp("^(aria)[A-Z]["+Ie+"]*$");ri=function(h,l,u,d){if(Q.call(Je,l)&&Je[l])return!0;var g=l.toLowerCase();if(g==="onfocusin"||g==="onfocusout")return i("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Je[l]=!0,!0;if(d!=null){var b=d.registrationNameDependencies,k=d.possibleRegistrationNames;if(b.hasOwnProperty(l))return!0;var R=k.hasOwnProperty(g)?k[g]:null;if(R!=null)return i("Invalid event handler property `%s`. Did you mean `%s`?",l,R),Je[l]=!0,!0;if(ii.test(l))return i("Unknown event handler property `%s`. It will be ignored.",l),Je[l]=!0,!0}else if(ii.test(l))return Ji.test(l)&&i("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",l),Je[l]=!0,!0;if(Yi.test(l)||oi.test(l))return!0;if(g==="innerhtml")return i("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Je[l]=!0,!0;if(g==="aria")return i("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Je[l]=!0,!0;if(g==="is"&&u!==null&&u!==void 0&&typeof u!="string")return i("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof u),Je[l]=!0,!0;if(typeof u=="number"&&isNaN(u))return i("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",l),Je[l]=!0,!0;var M=_t(l),F=M!==null&&M.type===Ee;if(ni.hasOwnProperty(g)){var U=ni[g];if(U!==l)return i("Invalid DOM property `%s`. Did you mean `%s`?",l,U),Je[l]=!0,!0}else if(!F&&l!==g)return i("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",l,g),Je[l]=!0,!0;return typeof u=="boolean"&&it(l,u,M)?(u?i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',u,l,l,u,l):i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',u,l,l,u,l,l,l),Je[l]=!0,!0):F?!0:it(l,u,M)?(Je[l]=!0,!1):((u==="false"||u==="true")&&M!==null&&M.type===fe&&(i("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",u,l,u==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',l,u),Je[l]=!0),!0)}}var xr=function(h,l,u){{var d=[];for(var g in l){var b=ri(h,g,l[g],u);b||d.push(g)}var k=d.map(function(R){return"`"+R+"`"}).join(", ");d.length===1?i("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",k,h):d.length>1&&i("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",k,h)}};function ts(h,l,u){er(h,l)||xr(h,l,u)}var si=function(){};{var In=/^(?:webkit|moz|o)[A-Z]/,li=/^-ms-/,Ki=/-(.)/g,ft=/;\s*$/,on={},Mn={},Oe=!1,Dn=!1,kr=function(h){return h.replace(Ki,function(l,u){return u.toUpperCase()})},rr=function(h){on.hasOwnProperty(h)&&on[h]||(on[h]=!0,i("Unsupported style property %s. Did you mean %s?",h,kr(h.replace(li,"ms-"))))},sn=function(h){on.hasOwnProperty(h)&&on[h]||(on[h]=!0,i("Unsupported vendor-prefixed style property %s. Did you mean %s?",h,h.charAt(0).toUpperCase()+h.slice(1)))},Cr=function(h,l){Mn.hasOwnProperty(l)&&Mn[l]||(Mn[l]=!0,i(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,h,l.replace(ft,"")))},Sn=function(h,l){Oe||(Oe=!0,i("`NaN` is an invalid value for the `%s` css style property.",h))},et=function(h,l){Dn||(Dn=!0,i("`Infinity` is an invalid value for the `%s` css style property.",h))};si=function(h,l){h.indexOf("-")>-1?rr(h):In.test(h)?sn(h):ft.test(l)&&Cr(h,l),typeof l=="number"&&(isNaN(l)?Sn(h,l):isFinite(l)||et(h,l))}}var ai=si,ci=/["'&<>]/;function Xi(h){ae(h);var l=""+h,u=ci.exec(l);if(!u)return l;var d,g="",b,k=0;for(b=u.index;b<l.length;b++){switch(l.charCodeAt(b)){case 34:d="&quot;";break;case 38:d="&amp;";break;case 39:d="&#x27;";break;case 60:d="&lt;";break;case 62:d="&gt;";break;default:continue}k!==b&&(g+=l.substring(k,b)),k=b+1,g+=d}return k!==b?g+l.substring(k,b):g}function Ye(h){return typeof h=="boolean"||typeof h=="number"?""+h:Xi(h)}var ui=/([A-Z])/g,ns=/^ms-/;function rs(h){return h.replace(ui,"-$1").toLowerCase().replace(ns,"-ms-")}var ln=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,fi=!1;function Er(h){!fi&&ln.test(h)&&(fi=!0,i("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(h)))}var Pn=Array.isArray;function Ct(h){return Pn(h)}var an=_("<script>"),Tr=_("<\/script>"),_n=_('<script src="'),Nn=_('<script type="module" src="'),cn=_('" async=""><\/script>');function Fn(h){return ae(h),(""+h).replace(Et,Zi)}var Et=/(<\/|<)(s)(cript)/gi,Zi=function(h,l,u,d){return""+l+(u==="s"?"\\u0073":"\\u0053")+d};function Qi(h,l,u,d,g){var b=h===void 0?"":h,k=l===void 0?an:_('<script nonce="'+Ye(l)+'">'),R=[];if(u!==void 0&&R.push(k,D(Fn(u)),Tr),d!==void 0)for(var M=0;M<d.length;M++)R.push(_n,D(Ye(d[M])),cn);if(g!==void 0)for(var F=0;F<g.length;F++)R.push(Nn,D(Ye(g[F])),cn);return{bootstrapChunks:R,startInlineScript:k,placeholderPrefix:_(b+"P:"),segmentPrefix:_(b+"S:"),boundaryPrefix:b+"B:",idPrefix:b,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}var wn=0,Ke=1,un=2,fn=3,Ln=4,Rr=5,Gt=6,dn=7;function dt(h,l){return{insertionMode:h,selectedValue:l}}function Bn(h){var l=h==="http://www.w3.org/2000/svg"?un:h==="http://www.w3.org/1998/Math/MathML"?fn:wn;return dt(l,null)}function ir(h,l,u){switch(l){case"select":return dt(Ke,u.value!=null?u.value:u.defaultValue);case"svg":return dt(un,null);case"math":return dt(fn,null);case"foreignObject":return dt(Ke,null);case"table":return dt(Ln,null);case"thead":case"tbody":case"tfoot":return dt(Rr,null);case"colgroup":return dt(dn,null);case"tr":return dt(Gt,null)}return h.insertionMode>=Ln||h.insertionMode===wn?dt(Ke,null):h}var Ar=null;function Nt(h){var l=h.nextSuspenseID++;return _(h.boundaryPrefix+l.toString(16))}function hn(h,l,u){var d=h.idPrefix,g=":"+d+"R"+l;return u>0&&(g+="H"+u.toString(32)),g+":"}function ht(h){return Ye(h)}var Or=_("<!-- -->");function rt(h,l,u,d){return l===""?d:(d&&h.push(Or),h.push(D(ht(l))),!0)}function Tt(h,l,u,d){u&&d&&h.push(Or)}var y=new Map;function x(h){var l=y.get(h);if(l!==void 0)return l;var u=_(Ye(rs(h)));return y.set(h,u),u}var A=_(' style="'),I=_(":"),B=_(";");function N(h,l,u){if(typeof u!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var d=!0;for(var g in u)if(Q.call(u,g)){var b=u[g];if(!(b==null||typeof b=="boolean"||b==="")){var k=void 0,R=void 0,M=g.indexOf("--")===0;M?(k=D(Ye(g)),ne(b,g),R=D(Ye((""+b).trim()))):(ai(g,b),k=x(g),typeof b=="number"?b!==0&&!Q.call(at,g)?R=D(b+"px"):R=D(""+b):(ne(b,g),R=D(Ye((""+b).trim())))),d?(d=!1,h.push(A,k,I,R)):h.push(B,k,I,R)}}d||h.push(se)}var z=_(" "),Y=_('="'),se=_('"'),ce=_('=""');function le(h,l,u,d){switch(u){case"style":{N(h,l,d);return}case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(u.length>2&&(u[0]==="o"||u[0]==="O")&&(u[1]==="n"||u[1]==="N"))){var g=_t(u);if(g!==null){switch(typeof d){case"function":case"symbol":return;case"boolean":if(!g.acceptsBooleans)return}var b=g.attributeName,k=D(b);switch(g.type){case fe:d&&h.push(z,k,ce);return;case V:d===!0?h.push(z,k,ce):d===!1||h.push(z,k,Y,D(Ye(d)),se);return;case De:isNaN(d)||h.push(z,k,Y,D(Ye(d)),se);break;case ye:!isNaN(d)&&d>=1&&h.push(z,k,Y,D(Ye(d)),se);break;default:g.sanitizeURL&&(G(d,b),d=""+d,Er(d)),h.push(z,k,Y,D(Ye(d)),se)}}else if(Me(u)){switch(typeof d){case"function":case"symbol":return;case"boolean":{var R=u.toLowerCase().slice(0,5);if(R!=="data-"&&R!=="aria-")return}}h.push(z,D(u),Y,D(Ye(d)),se)}}}var Te=_(">"),pt=_("/>");function gt(h,l,u){if(l!=null){if(u!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof l!="object"||!("__html"in l))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var d=l.__html;d!=null&&(ae(d),h.push(D(""+d)))}}var mt=!1,$n=!1,pn=!1,Ir=!1,zn=!1,or=!1,xn=!1;function sr(h,l){{var u=h[l];if(u!=null){var d=Ct(u);h.multiple&&!d?i("The `%s` prop supplied to <select> must be an array if `multiple` is true.",l):!h.multiple&&d&&i("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",l)}}}function Qa(h,l,u){wr("select",l),sr(l,"value"),sr(l,"defaultValue"),l.value!==void 0&&l.defaultValue!==void 0&&!pn&&(i("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),pn=!0),h.push(Jt("select"));var d=null,g=null;for(var b in l)if(Q.call(l,b)){var k=l[b];if(k==null)continue;switch(b){case"children":d=k;break;case"dangerouslySetInnerHTML":g=k;break;case"defaultValue":case"value":break;default:le(h,u,b,k);break}}return h.push(Te),gt(h,g,d),d}function qa(h){var l="";return n.Children.forEach(h,function(u){u!=null&&(l+=u,!zn&&typeof u!="string"&&typeof u!="number"&&(zn=!0,i("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),l}var qi=_(' selected=""');function gn(h,l,u,d){var g=d.selectedValue;h.push(Jt("option"));var b=null,k=null,R=null,M=null;for(var F in l)if(Q.call(l,F)){var U=l[F];if(U==null)continue;switch(F){case"children":b=U;break;case"selected":R=U,xn||(i("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),xn=!0);break;case"dangerouslySetInnerHTML":M=U;break;case"value":k=U;default:le(h,u,F,U);break}}if(g!=null){var H;if(k!==null?(G(k,"value"),H=""+k):(M!==null&&(or||(or=!0,i("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),H=qa(b)),Ct(g))for(var q=0;q<g.length;q++){G(g[q],"value");var de=""+g[q];if(de===H){h.push(qi);break}}else G(g,"select.value"),""+g===H&&h.push(qi)}else R&&h.push(qi);return h.push(Te),gt(h,M,b),b}function ec(h,l,u){wr("input",l),l.checked!==void 0&&l.defaultChecked!==void 0&&!$n&&(i("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",l.type),$n=!0),l.value!==void 0&&l.defaultValue!==void 0&&!mt&&(i("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",l.type),mt=!0),h.push(Jt("input"));var d=null,g=null,b=null,k=null;for(var R in l)if(Q.call(l,R)){var M=l[R];if(M==null)continue;switch(R){case"children":case"dangerouslySetInnerHTML":throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"defaultChecked":k=M;break;case"defaultValue":g=M;break;case"checked":b=M;break;case"value":d=M;break;default:le(h,u,R,M);break}}return b!==null?le(h,u,"checked",b):k!==null&&le(h,u,"checked",k),d!==null?le(h,u,"value",d):g!==null&&le(h,u,"value",g),h.push(pt),null}function kn(h,l,u){wr("textarea",l),l.value!==void 0&&l.defaultValue!==void 0&&!Ir&&(i("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"),Ir=!0),h.push(Jt("textarea"));var d=null,g=null,b=null;for(var k in l)if(Q.call(l,k)){var R=l[k];if(R==null)continue;switch(k){case"children":b=R;break;case"value":d=R;break;case"defaultValue":g=R;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:le(h,u,k,R);break}}if(d===null&&g!==null&&(d=g),h.push(Te),b!=null){if(i("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),d!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Ct(b)){if(b.length>1)throw new Error("<textarea> can only have at most one child.");ae(b[0]),d=""+b[0]}ae(b),d=""+b}return typeof d=="string"&&d[0]===`
94
94
  `&&h.push(ar),d!==null&&(G(d,"value"),h.push(D(ht(""+d)))),null}function is(h,l,u,d){h.push(Jt(u));for(var g in l)if(Q.call(l,g)){var b=l[g];if(b==null)continue;switch(g){case"children":case"dangerouslySetInnerHTML":throw new Error(u+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:le(h,d,g,b);break}}return h.push(pt),null}function eo(h,l,u){h.push(Jt("menuitem"));for(var d in l)if(Q.call(l,d)){var g=l[d];if(g==null)continue;switch(d){case"children":case"dangerouslySetInnerHTML":throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:le(h,u,d,g);break}}return h.push(Te),null}function Pe(h,l,u){h.push(Jt("title"));var d=null;for(var g in l)if(Q.call(l,g)){var b=l[g];if(b==null)continue;switch(g){case"children":d=b;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:le(h,u,g,b);break}}h.push(Te);{var k=Array.isArray(d)&&d.length<2?d[0]||null:d;Array.isArray(d)&&d.length>1?i("A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"):k!=null&&k.$$typeof!=null?i("A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"):k!=null&&typeof k!="string"&&typeof k!="number"&&i("A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering")}return d}function lr(h,l,u,d){h.push(Jt(u));var g=null,b=null;for(var k in l)if(Q.call(l,k)){var R=l[k];if(R==null)continue;switch(k){case"children":g=R;break;case"dangerouslySetInnerHTML":b=R;break;default:le(h,d,k,R);break}}return h.push(Te),gt(h,b,g),typeof g=="string"?(h.push(D(ht(g))),null):g}function to(h,l,u,d){h.push(Jt(u));var g=null,b=null;for(var k in l)if(Q.call(l,k)){var R=l[k];if(R==null)continue;switch(k){case"children":g=R;break;case"dangerouslySetInnerHTML":b=R;break;case"style":N(h,d,R);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:Me(k)&&typeof R!="function"&&typeof R!="symbol"&&h.push(z,D(k),Y,D(Ye(R)),se);break}}return h.push(Te),gt(h,b,g),g}var ar=_(`
95
95
  `);function jn(h,l,u,d){h.push(Jt(u));var g=null,b=null;for(var k in l)if(Q.call(l,k)){var R=l[k];if(R==null)continue;switch(k){case"children":g=R;break;case"dangerouslySetInnerHTML":b=R;break;default:le(h,d,k,R);break}}if(h.push(Te),b!=null){if(g!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof b!="object"||!("__html"in b))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var M=b.__html;M!=null&&(typeof M=="string"&&M.length>0&&M[0]===`
96
96
  `?h.push(ar,D(M)):(ae(M),h.push(D(""+M))))}return typeof g=="string"&&g[0]===`
97
- `&&h.push(ar),g}var no=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Un=new Map;function Jt(h){var l=Un.get(h);if(l===void 0){if(!no.test(h))throw new Error("Invalid tag: "+h);l=_("<"+h),Un.set(h,l)}return l}var ss=_("<!DOCTYPE html>");function di(h,l,u,d,g){switch(ot(l,u),ti(l,u),ts(l,u,null),!u.suppressContentEditableWarning&&u.contentEditable&&u.children!=null&&i("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),g.insertionMode!==un&&g.insertionMode!==fn&&l.indexOf("-")===-1&&typeof u.is!="string"&&l.toLowerCase()!==l&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",l),l){case"select":return Xa(h,u,d);case"option":return gn(h,u,d,g);case"textarea":return kn(h,u,d);case"input":return Qa(h,u,d);case"menuitem":return eo(h,u,d);case"title":return Pe(h,u,d);case"listing":case"pre":return jn(h,u,l,d);case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":return is(h,u,l,d);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return lr(h,u,l,d);case"html":return g.insertionMode===wn&&h.push(ss),lr(h,u,l,d);default:return l.indexOf("-")===-1&&typeof u.is!="string"?lr(h,u,l,d):to(h,u,l,d)}}var ul=_("</"),ro=_(">");function fl(h,l,u){switch(l){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:h.push(ul,D(l),ro)}}function qa(h,l){for(var u=l.bootstrapChunks,d=0;d<u.length-1;d++)m(h,u[d]);return d<u.length?S(h,u[d]):!0}var ec=_('<template id="'),io=_('"></template>');function dl(h,l,u){m(h,ec),m(h,l.placeholderPrefix);var d=D(u.toString(16));return m(h,d),S(h,io)}var hi=_("<!--$-->"),ls=_('<!--$?--><template id="'),tc=_('"></template>'),Mr=_("<!--$!-->"),as=_("<!--/$-->"),cs=_("<template"),Dr=_('"'),pi=_(' data-dgst="'),oo=_(' data-msg="'),hl=_(' data-stck="'),pl=_("></template>");function gl(h,l){return S(h,hi)}function so(h,l,u){if(m(h,ls),u===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return m(h,u),S(h,tc)}function Rt(h,l,u,d,g){var b;return b=S(h,Mr),m(h,cs),u&&(m(h,pi),m(h,D(Ye(u))),m(h,Dr)),d&&(m(h,oo),m(h,D(Ye(d))),m(h,Dr)),g&&(m(h,hl),m(h,D(Ye(g))),m(h,Dr)),b=S(h,pl),b}function ml(h,l){return S(h,as)}function lo(h,l){return S(h,as)}function nc(h,l){return S(h,as)}var yl=_('<div hidden id="'),ao=_('">'),vl=_("</div>"),bl=_('<svg aria-hidden="true" style="display:none" id="'),co=_('">'),uo=_("</svg>"),Sl=_('<math aria-hidden="true" style="display:none" id="'),wl=_('">'),xl=_("</math>"),us=_('<table hidden id="'),kl=_('">'),v=_("</table>"),w=_('<table hidden><tbody id="'),T=_('">'),O=_("</tbody></table>"),$=_('<table hidden><tr id="'),L=_('">'),j=_("</tr></table>"),K=_('<table hidden><colgroup id="'),ue=_('">'),ve=_("</colgroup></table>");function ge(h,l,u,d){switch(u.insertionMode){case wn:case Ke:return m(h,yl),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,ao);case un:return m(h,bl),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,co);case fn:return m(h,Sl),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,wl);case Ln:return m(h,us),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,kl);case Rr:return m(h,w),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,T);case Gt:return m(h,$),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,L);case dn:return m(h,K),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,ue);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function Ne(h,l){switch(l.insertionMode){case wn:case Ke:return S(h,vl);case un:return S(h,uo);case fn:return S(h,xl);case Ln:return S(h,v);case Rr:return S(h,O);case Gt:return S(h,j);case dn:return S(h,ve);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var At="function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}",Yt='function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}',Kt='function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}',fo=_(At+';$RS("'),Cl=_('$RS("'),gi=_('","'),Vh=_('")<\/script>');function Gh(h,l,u){m(h,l.startInlineScript),l.sentCompleteSegmentFunction?m(h,Cl):(l.sentCompleteSegmentFunction=!0,m(h,fo)),m(h,l.segmentPrefix);var d=D(u.toString(16));return m(h,d),m(h,gi),m(h,l.placeholderPrefix),m(h,d),S(h,Vh)}var rc=_(Yt+';$RC("'),Jh=_('$RC("'),Yh=_('","'),ju=_('")<\/script>');function Uu(h,l,u,d){if(m(h,l.startInlineScript),l.sentCompleteBoundaryFunction?m(h,Jh):(l.sentCompleteBoundaryFunction=!0,m(h,rc)),u===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var g=D(d.toString(16));return m(h,u),m(h,Yh),m(h,l.segmentPrefix),m(h,g),S(h,ju)}var Kh=_(Kt+';$RX("'),Xh=_('$RX("'),Zh=_('"'),Qh=_(")<\/script>"),Ft=_(",");function qh(h,l,u,d,g,b){if(m(h,l.startInlineScript),l.sentClientRenderFunction?m(h,Xh):(l.sentClientRenderFunction=!0,m(h,Kh)),u===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return m(h,u),m(h,Zh),(d||g||b)&&(m(h,Ft),m(h,D(El(d||"")))),(g||b)&&(m(h,Ft),m(h,D(El(g||"")))),b&&(m(h,Ft),m(h,D(El(b)))),S(h,Qh)}var Wu=/[<\u2028\u2029]/g;function El(h){var l=JSON.stringify(h);return l.replace(Wu,function(u){switch(u){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Xt=Object.assign,Hu=Symbol.for("react.element"),Tl=Symbol.for("react.portal"),Rl=Symbol.for("react.fragment"),Al=Symbol.for("react.strict_mode"),Ol=Symbol.for("react.profiler"),fs=Symbol.for("react.provider"),ds=Symbol.for("react.context"),ho=Symbol.for("react.forward_ref"),ic=Symbol.for("react.suspense"),oc=Symbol.for("react.suspense_list"),sc=Symbol.for("react.memo"),Il=Symbol.for("react.lazy"),Vu=Symbol.for("react.scope"),ep=Symbol.for("react.debug_trace_mode"),tp=Symbol.for("react.legacy_hidden"),np=Symbol.for("react.default_value"),lc=Symbol.iterator,ze="@@iterator";function hs(h){if(h===null||typeof h!="object")return null;var l=lc&&h[lc]||h[ze];return typeof l=="function"?l:null}function Gu(h,l,u){var d=h.displayName;if(d)return d;var g=l.displayName||l.name||"";return g!==""?u+"("+g+")":u}function ac(h){return h.displayName||"Context"}function Be(h){if(h==null)return null;if(typeof h.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case Rl:return"Fragment";case Tl:return"Portal";case Ol:return"Profiler";case Al:return"StrictMode";case ic:return"Suspense";case oc:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case ds:var l=h;return ac(l)+".Consumer";case fs:var u=h;return ac(u._context)+".Provider";case ho:return Gu(h,h.render,"ForwardRef");case sc:var d=h.displayName||null;return d!==null?d:Be(h.type)||"Memo";case Il:{var g=h,b=g._payload,k=g._init;try{return Be(k(b))}catch{return null}}}return null}var po=0,cc,uc,fc,dc,Ju,Yu,Ml;function Dl(){}Dl.__reactDisabledLog=!0;function ps(){{if(po===0){cc=console.log,uc=console.info,fc=console.warn,dc=console.error,Ju=console.group,Yu=console.groupCollapsed,Ml=console.groupEnd;var h={configurable:!0,enumerable:!0,value:Dl,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}po++}}function hc(){{if(po--,po===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Xt({},h,{value:cc}),info:Xt({},h,{value:uc}),warn:Xt({},h,{value:fc}),error:Xt({},h,{value:dc}),group:Xt({},h,{value:Ju}),groupCollapsed:Xt({},h,{value:Yu}),groupEnd:Xt({},h,{value:Ml})})}po<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var go=t.ReactCurrentDispatcher,pc;function mi(h,l,u){{if(pc===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);pc=d&&d[1]||""}return`
98
- `+pc+h}}var gc=!1,gs;{var rp=typeof WeakMap=="function"?WeakMap:Map;gs=new rp}function ms(h,l){if(!h||gc)return"";{var u=gs.get(h);if(u!==void 0)return u}var d;gc=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b;b=go.current,go.current=null,ps();try{if(l){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(Ae){d=Ae}Reflect.construct(h,[],k)}else{try{k.call()}catch(Ae){d=Ae}h.call(k.prototype)}}else{try{throw Error()}catch(Ae){d=Ae}h()}}catch(Ae){if(Ae&&d&&typeof Ae.stack=="string"){for(var R=Ae.stack.split(`
97
+ `&&h.push(ar),g}var no=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Un=new Map;function Jt(h){var l=Un.get(h);if(l===void 0){if(!no.test(h))throw new Error("Invalid tag: "+h);l=_("<"+h),Un.set(h,l)}return l}var ss=_("<!DOCTYPE html>");function di(h,l,u,d,g){switch(ot(l,u),ti(l,u),ts(l,u,null),!u.suppressContentEditableWarning&&u.contentEditable&&u.children!=null&&i("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),g.insertionMode!==un&&g.insertionMode!==fn&&l.indexOf("-")===-1&&typeof u.is!="string"&&l.toLowerCase()!==l&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",l),l){case"select":return Qa(h,u,d);case"option":return gn(h,u,d,g);case"textarea":return kn(h,u,d);case"input":return ec(h,u,d);case"menuitem":return eo(h,u,d);case"title":return Pe(h,u,d);case"listing":case"pre":return jn(h,u,l,d);case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":return is(h,u,l,d);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return lr(h,u,l,d);case"html":return g.insertionMode===wn&&h.push(ss),lr(h,u,l,d);default:return l.indexOf("-")===-1&&typeof u.is!="string"?lr(h,u,l,d):to(h,u,l,d)}}var fl=_("</"),ro=_(">");function dl(h,l,u){switch(l){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:h.push(fl,D(l),ro)}}function tc(h,l){for(var u=l.bootstrapChunks,d=0;d<u.length-1;d++)m(h,u[d]);return d<u.length?S(h,u[d]):!0}var nc=_('<template id="'),io=_('"></template>');function hl(h,l,u){m(h,nc),m(h,l.placeholderPrefix);var d=D(u.toString(16));return m(h,d),S(h,io)}var hi=_("<!--$-->"),ls=_('<!--$?--><template id="'),rc=_('"></template>'),Mr=_("<!--$!-->"),as=_("<!--/$-->"),cs=_("<template"),Dr=_('"'),pi=_(' data-dgst="'),oo=_(' data-msg="'),pl=_(' data-stck="'),gl=_("></template>");function ml(h,l){return S(h,hi)}function so(h,l,u){if(m(h,ls),u===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return m(h,u),S(h,rc)}function Rt(h,l,u,d,g){var b;return b=S(h,Mr),m(h,cs),u&&(m(h,pi),m(h,D(Ye(u))),m(h,Dr)),d&&(m(h,oo),m(h,D(Ye(d))),m(h,Dr)),g&&(m(h,pl),m(h,D(Ye(g))),m(h,Dr)),b=S(h,gl),b}function yl(h,l){return S(h,as)}function lo(h,l){return S(h,as)}function ic(h,l){return S(h,as)}var vl=_('<div hidden id="'),ao=_('">'),bl=_("</div>"),Sl=_('<svg aria-hidden="true" style="display:none" id="'),co=_('">'),uo=_("</svg>"),wl=_('<math aria-hidden="true" style="display:none" id="'),xl=_('">'),kl=_("</math>"),us=_('<table hidden id="'),Cl=_('">'),v=_("</table>"),w=_('<table hidden><tbody id="'),T=_('">'),O=_("</tbody></table>"),$=_('<table hidden><tr id="'),L=_('">'),j=_("</tr></table>"),K=_('<table hidden><colgroup id="'),ue=_('">'),ve=_("</colgroup></table>");function ge(h,l,u,d){switch(u.insertionMode){case wn:case Ke:return m(h,vl),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,ao);case un:return m(h,Sl),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,co);case fn:return m(h,wl),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,xl);case Ln:return m(h,us),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,Cl);case Rr:return m(h,w),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,T);case Gt:return m(h,$),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,L);case dn:return m(h,K),m(h,l.segmentPrefix),m(h,D(d.toString(16))),S(h,ue);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function Ne(h,l){switch(l.insertionMode){case wn:case Ke:return S(h,bl);case un:return S(h,uo);case fn:return S(h,kl);case Ln:return S(h,v);case Rr:return S(h,O);case Gt:return S(h,j);case dn:return S(h,ve);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var At="function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}",Yt='function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}',Kt='function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}',fo=_(At+';$RS("'),El=_('$RS("'),gi=_('","'),Xh=_('")<\/script>');function Zh(h,l,u){m(h,l.startInlineScript),l.sentCompleteSegmentFunction?m(h,El):(l.sentCompleteSegmentFunction=!0,m(h,fo)),m(h,l.segmentPrefix);var d=D(u.toString(16));return m(h,d),m(h,gi),m(h,l.placeholderPrefix),m(h,d),S(h,Xh)}var oc=_(Yt+';$RC("'),Qh=_('$RC("'),qh=_('","'),Hu=_('")<\/script>');function Vu(h,l,u,d){if(m(h,l.startInlineScript),l.sentCompleteBoundaryFunction?m(h,Qh):(l.sentCompleteBoundaryFunction=!0,m(h,oc)),u===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var g=D(d.toString(16));return m(h,u),m(h,qh),m(h,l.segmentPrefix),m(h,g),S(h,Hu)}var ep=_(Kt+';$RX("'),tp=_('$RX("'),np=_('"'),rp=_(")<\/script>"),Ft=_(",");function ip(h,l,u,d,g,b){if(m(h,l.startInlineScript),l.sentClientRenderFunction?m(h,tp):(l.sentClientRenderFunction=!0,m(h,ep)),u===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return m(h,u),m(h,np),(d||g||b)&&(m(h,Ft),m(h,D(Tl(d||"")))),(g||b)&&(m(h,Ft),m(h,D(Tl(g||"")))),b&&(m(h,Ft),m(h,D(Tl(b)))),S(h,rp)}var Gu=/[<\u2028\u2029]/g;function Tl(h){var l=JSON.stringify(h);return l.replace(Gu,function(u){switch(u){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Xt=Object.assign,Ju=Symbol.for("react.element"),Rl=Symbol.for("react.portal"),Al=Symbol.for("react.fragment"),Ol=Symbol.for("react.strict_mode"),Il=Symbol.for("react.profiler"),fs=Symbol.for("react.provider"),ds=Symbol.for("react.context"),ho=Symbol.for("react.forward_ref"),sc=Symbol.for("react.suspense"),lc=Symbol.for("react.suspense_list"),ac=Symbol.for("react.memo"),Ml=Symbol.for("react.lazy"),Yu=Symbol.for("react.scope"),op=Symbol.for("react.debug_trace_mode"),sp=Symbol.for("react.legacy_hidden"),lp=Symbol.for("react.default_value"),cc=Symbol.iterator,ze="@@iterator";function hs(h){if(h===null||typeof h!="object")return null;var l=cc&&h[cc]||h[ze];return typeof l=="function"?l:null}function Ku(h,l,u){var d=h.displayName;if(d)return d;var g=l.displayName||l.name||"";return g!==""?u+"("+g+")":u}function uc(h){return h.displayName||"Context"}function Be(h){if(h==null)return null;if(typeof h.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case Al:return"Fragment";case Rl:return"Portal";case Il:return"Profiler";case Ol:return"StrictMode";case sc:return"Suspense";case lc:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case ds:var l=h;return uc(l)+".Consumer";case fs:var u=h;return uc(u._context)+".Provider";case ho:return Ku(h,h.render,"ForwardRef");case ac:var d=h.displayName||null;return d!==null?d:Be(h.type)||"Memo";case Ml:{var g=h,b=g._payload,k=g._init;try{return Be(k(b))}catch{return null}}}return null}var po=0,fc,dc,hc,pc,Xu,Zu,Dl;function Pl(){}Pl.__reactDisabledLog=!0;function ps(){{if(po===0){fc=console.log,dc=console.info,hc=console.warn,pc=console.error,Xu=console.group,Zu=console.groupCollapsed,Dl=console.groupEnd;var h={configurable:!0,enumerable:!0,value:Pl,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}po++}}function gc(){{if(po--,po===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Xt({},h,{value:fc}),info:Xt({},h,{value:dc}),warn:Xt({},h,{value:hc}),error:Xt({},h,{value:pc}),group:Xt({},h,{value:Xu}),groupCollapsed:Xt({},h,{value:Zu}),groupEnd:Xt({},h,{value:Dl})})}po<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var go=t.ReactCurrentDispatcher,mc;function mi(h,l,u){{if(mc===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);mc=d&&d[1]||""}return`
98
+ `+mc+h}}var yc=!1,gs;{var ap=typeof WeakMap=="function"?WeakMap:Map;gs=new ap}function ms(h,l){if(!h||yc)return"";{var u=gs.get(h);if(u!==void 0)return u}var d;yc=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b;b=go.current,go.current=null,ps();try{if(l){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(Ae){d=Ae}Reflect.construct(h,[],k)}else{try{k.call()}catch(Ae){d=Ae}h.call(k.prototype)}}else{try{throw Error()}catch(Ae){d=Ae}h()}}catch(Ae){if(Ae&&d&&typeof Ae.stack=="string"){for(var R=Ae.stack.split(`
99
99
  `),M=d.stack.split(`
100
100
  `),F=R.length-1,U=M.length-1;F>=1&&U>=0&&R[F]!==M[U];)U--;for(;F>=1&&U>=0;F--,U--)if(R[F]!==M[U]){if(F!==1||U!==1)do if(F--,U--,U<0||R[F]!==M[U]){var H=`
101
- `+R[F].replace(" at new "," at ");return h.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",h.displayName)),typeof h=="function"&&gs.set(h,H),H}while(F>=1&&U>=0);break}}}finally{gc=!1,go.current=b,hc(),Error.prepareStackTrace=g}var q=h?h.displayName||h.name:"",de=q?mi(q):"";return typeof h=="function"&&gs.set(h,de),de}function Ku(h,l,u){return ms(h,!0)}function mc(h,l,u){return ms(h,!1)}function Pl(h){var l=h.prototype;return!!(l&&l.isReactComponent)}function _l(h,l,u){if(h==null)return"";if(typeof h=="function")return ms(h,Pl(h));if(typeof h=="string")return mi(h);switch(h){case ic:return mi("Suspense");case oc:return mi("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case ho:return mc(h.render);case sc:return _l(h.type,l,u);case Il:{var d=h,g=d._payload,b=d._init;try{return _l(b(g),l,u)}catch{}}}return""}var Nl={},ys=t.ReactDebugCurrentFrame;function vs(h){if(h){var l=h._owner,u=_l(h.type,h._source,l?l.type:null);ys.setExtraStackFrame(u)}else ys.setExtraStackFrame(null)}function Xu(h,l,u,d,g){{var b=Function.call.bind(Q);for(var k in h)if(b(h,k)){var R=void 0;try{if(typeof h[k]!="function"){var M=Error((d||"React class")+": "+u+" type `"+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[k]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}R=h[k](l,k,d,u,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){R=F}R&&!(R instanceof Error)&&(vs(g),i("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",d||"React class",u,k,typeof R),vs(null)),R instanceof Error&&!(R.message in Nl)&&(Nl[R.message]=!0,vs(g),i("Failed %s type: %s",u,R.message),vs(null))}}}var yi;yi={};var Fl={};Object.freeze(Fl);function Pr(h,l){{var u=h.contextTypes;if(!u)return Fl;var d={};for(var g in u)d[g]=l[g];{var b=Be(h)||"Unknown";Xu(u,d,"context",b)}return d}}function yc(h,l,u,d){{if(typeof h.getChildContext!="function"){{var g=Be(l)||"Unknown";yi[g]||(yi[g]=!0,i("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",g,g))}return u}var b=h.getChildContext();for(var k in b)if(!(k in d))throw new Error((Be(l)||"Unknown")+'.getChildContext(): key "'+k+'" is not defined in childContextTypes.');{var R=Be(l)||"Unknown";Xu(d,b,"child context",R)}return Xt({},u,b)}}var vi;vi={};var Ll=null,_r=null;function Bl(h){h.context._currentValue=h.parentValue}function $l(h){h.context._currentValue=h.value}function bs(h,l){if(h!==l){Bl(h);var u=h.parent,d=l.parent;if(u===null){if(d!==null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.")}else{if(d===null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.");bs(u,d)}$l(l)}}function Ss(h){Bl(h);var l=h.parent;l!==null&&Ss(l)}function Zu(h){var l=h.parent;l!==null&&Zu(l),$l(h)}function Qu(h,l){Bl(h);var u=h.parent;if(u===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");u.depth===l.depth?bs(u,l):Qu(u,l)}function qu(h,l){var u=l.parent;if(u===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");h.depth===u.depth?bs(h,u):qu(h,u),$l(l)}function Nr(h){var l=_r,u=h;l!==u&&(l===null?Zu(u):u===null?Ss(l):l.depth===u.depth?bs(l,u):l.depth>u.depth?Qu(l,u):qu(l,u),_r=u)}function vc(h,l){var u;u=h._currentValue,h._currentValue=l,h._currentRenderer!==void 0&&h._currentRenderer!==null&&h._currentRenderer!==vi&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),h._currentRenderer=vi;var d=_r,g={parent:d,depth:d===null?0:d.depth+1,context:h,parentValue:u,value:l};return _r=g,g}function ip(h){var l=_r;if(l===null)throw new Error("Tried to pop a Context at the root of the app. This is a bug in React.");l.context!==h&&i("The parent context is not the expected context. This is probably a bug in React.");{var u=l.parentValue;u===np?l.context._currentValue=l.context._defaultValue:l.context._currentValue=u,h._currentRenderer!==void 0&&h._currentRenderer!==null&&h._currentRenderer!==vi&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),h._currentRenderer=vi}return _r=l.parent}function ef(){return _r}function mo(h){var l=h._currentValue;return l}function ws(h){return h._reactInternals}function bc(h,l){h._reactInternals=l}var zl={},jl={},Ul,yo,xs,ks,Wl,Cs,Hl,Vl,Sc;{Ul=new Set,yo=new Set,xs=new Set,Hl=new Set,ks=new Set,Vl=new Set,Sc=new Set;var tf=new Set;Cs=function(h,l){if(!(h===null||typeof h=="function")){var u=l+"_"+h;tf.has(u)||(tf.add(u),i("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",l,h))}},Wl=function(h,l){if(l===void 0){var u=Be(h)||"Component";ks.has(u)||(ks.add(u),i("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",u))}}}function nf(h,l){{var u=h.constructor,d=u&&Be(u)||"ReactClass",g=d+"."+l;if(zl[g])return;i(`%s(...): Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.
101
+ `+R[F].replace(" at new "," at ");return h.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",h.displayName)),typeof h=="function"&&gs.set(h,H),H}while(F>=1&&U>=0);break}}}finally{yc=!1,go.current=b,gc(),Error.prepareStackTrace=g}var q=h?h.displayName||h.name:"",de=q?mi(q):"";return typeof h=="function"&&gs.set(h,de),de}function Qu(h,l,u){return ms(h,!0)}function vc(h,l,u){return ms(h,!1)}function _l(h){var l=h.prototype;return!!(l&&l.isReactComponent)}function Nl(h,l,u){if(h==null)return"";if(typeof h=="function")return ms(h,_l(h));if(typeof h=="string")return mi(h);switch(h){case sc:return mi("Suspense");case lc:return mi("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case ho:return vc(h.render);case ac:return Nl(h.type,l,u);case Ml:{var d=h,g=d._payload,b=d._init;try{return Nl(b(g),l,u)}catch{}}}return""}var Fl={},ys=t.ReactDebugCurrentFrame;function vs(h){if(h){var l=h._owner,u=Nl(h.type,h._source,l?l.type:null);ys.setExtraStackFrame(u)}else ys.setExtraStackFrame(null)}function qu(h,l,u,d,g){{var b=Function.call.bind(Q);for(var k in h)if(b(h,k)){var R=void 0;try{if(typeof h[k]!="function"){var M=Error((d||"React class")+": "+u+" type `"+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[k]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}R=h[k](l,k,d,u,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){R=F}R&&!(R instanceof Error)&&(vs(g),i("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",d||"React class",u,k,typeof R),vs(null)),R instanceof Error&&!(R.message in Fl)&&(Fl[R.message]=!0,vs(g),i("Failed %s type: %s",u,R.message),vs(null))}}}var yi;yi={};var Ll={};Object.freeze(Ll);function Pr(h,l){{var u=h.contextTypes;if(!u)return Ll;var d={};for(var g in u)d[g]=l[g];{var b=Be(h)||"Unknown";qu(u,d,"context",b)}return d}}function bc(h,l,u,d){{if(typeof h.getChildContext!="function"){{var g=Be(l)||"Unknown";yi[g]||(yi[g]=!0,i("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",g,g))}return u}var b=h.getChildContext();for(var k in b)if(!(k in d))throw new Error((Be(l)||"Unknown")+'.getChildContext(): key "'+k+'" is not defined in childContextTypes.');{var R=Be(l)||"Unknown";qu(d,b,"child context",R)}return Xt({},u,b)}}var vi;vi={};var Bl=null,_r=null;function $l(h){h.context._currentValue=h.parentValue}function zl(h){h.context._currentValue=h.value}function bs(h,l){if(h!==l){$l(h);var u=h.parent,d=l.parent;if(u===null){if(d!==null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.")}else{if(d===null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.");bs(u,d)}zl(l)}}function Ss(h){$l(h);var l=h.parent;l!==null&&Ss(l)}function ef(h){var l=h.parent;l!==null&&ef(l),zl(h)}function tf(h,l){$l(h);var u=h.parent;if(u===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");u.depth===l.depth?bs(u,l):tf(u,l)}function nf(h,l){var u=l.parent;if(u===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");h.depth===u.depth?bs(h,u):nf(h,u),zl(l)}function Nr(h){var l=_r,u=h;l!==u&&(l===null?ef(u):u===null?Ss(l):l.depth===u.depth?bs(l,u):l.depth>u.depth?tf(l,u):nf(l,u),_r=u)}function Sc(h,l){var u;u=h._currentValue,h._currentValue=l,h._currentRenderer!==void 0&&h._currentRenderer!==null&&h._currentRenderer!==vi&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),h._currentRenderer=vi;var d=_r,g={parent:d,depth:d===null?0:d.depth+1,context:h,parentValue:u,value:l};return _r=g,g}function cp(h){var l=_r;if(l===null)throw new Error("Tried to pop a Context at the root of the app. This is a bug in React.");l.context!==h&&i("The parent context is not the expected context. This is probably a bug in React.");{var u=l.parentValue;u===lp?l.context._currentValue=l.context._defaultValue:l.context._currentValue=u,h._currentRenderer!==void 0&&h._currentRenderer!==null&&h._currentRenderer!==vi&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),h._currentRenderer=vi}return _r=l.parent}function rf(){return _r}function mo(h){var l=h._currentValue;return l}function ws(h){return h._reactInternals}function wc(h,l){h._reactInternals=l}var jl={},Ul={},Wl,yo,xs,ks,Hl,Cs,Vl,Gl,xc;{Wl=new Set,yo=new Set,xs=new Set,Vl=new Set,ks=new Set,Gl=new Set,xc=new Set;var of=new Set;Cs=function(h,l){if(!(h===null||typeof h=="function")){var u=l+"_"+h;of.has(u)||(of.add(u),i("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",l,h))}},Hl=function(h,l){if(l===void 0){var u=Be(h)||"Component";ks.has(u)||(ks.add(u),i("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",u))}}}function sf(h,l){{var u=h.constructor,d=u&&Be(u)||"ReactClass",g=d+"."+l;if(jl[g])return;i(`%s(...): Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.
102
102
 
103
- Please check the code for the %s component.`,l,l,d),zl[g]=!0}}var rf={isMounted:function(h){return!1},enqueueSetState:function(h,l,u){var d=ws(h);d.queue===null?nf(h,"setState"):(d.queue.push(l),u!=null&&Cs(u,"setState"))},enqueueReplaceState:function(h,l,u){var d=ws(h);d.replace=!0,d.queue=[l],u!=null&&Cs(u,"setState")},enqueueForceUpdate:function(h,l){var u=ws(h);u.queue===null?nf(h,"forceUpdate"):l!=null&&Cs(l,"setState")}};function op(h,l,u,d,g){var b=u(g,d);Wl(l,b);var k=b==null?d:Xt({},d,b);return k}function of(h,l,u){var d=Fl,g=h.contextType;if("contextType"in h){var b=g===null||g!==void 0&&g.$$typeof===ds&&g._context===void 0;if(!b&&!Sc.has(h)){Sc.add(h);var k="";g===void 0?k=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof g!="object"?k=" However, it is set to a "+typeof g+".":g.$$typeof===fs?k=" Did you accidentally pass the Context.Provider instead?":g._context!==void 0?k=" Did you accidentally pass the Context.Consumer instead?":k=" However, it is set to an object with keys {"+Object.keys(g).join(", ")+"}.",i("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Be(h)||"Component",k)}}typeof g=="object"&&g!==null?d=mo(g):d=u;var R=new h(l,d);{if(typeof h.getDerivedStateFromProps=="function"&&(R.state===null||R.state===void 0)){var M=Be(h)||"Component";Ul.has(M)||(Ul.add(M),i("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",M,R.state===null?"null":"undefined",M))}if(typeof h.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"){var F=null,U=null,H=null;if(typeof R.componentWillMount=="function"&&R.componentWillMount.__suppressDeprecationWarning!==!0?F="componentWillMount":typeof R.UNSAFE_componentWillMount=="function"&&(F="UNSAFE_componentWillMount"),typeof R.componentWillReceiveProps=="function"&&R.componentWillReceiveProps.__suppressDeprecationWarning!==!0?U="componentWillReceiveProps":typeof R.UNSAFE_componentWillReceiveProps=="function"&&(U="UNSAFE_componentWillReceiveProps"),typeof R.componentWillUpdate=="function"&&R.componentWillUpdate.__suppressDeprecationWarning!==!0?H="componentWillUpdate":typeof R.UNSAFE_componentWillUpdate=="function"&&(H="UNSAFE_componentWillUpdate"),F!==null||U!==null||H!==null){var q=Be(h)||"Component",de=typeof h.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";xs.has(q)||(xs.add(q),i(`Unsafe legacy lifecycles will not be called for components using new component APIs.
103
+ Please check the code for the %s component.`,l,l,d),jl[g]=!0}}var lf={isMounted:function(h){return!1},enqueueSetState:function(h,l,u){var d=ws(h);d.queue===null?sf(h,"setState"):(d.queue.push(l),u!=null&&Cs(u,"setState"))},enqueueReplaceState:function(h,l,u){var d=ws(h);d.replace=!0,d.queue=[l],u!=null&&Cs(u,"setState")},enqueueForceUpdate:function(h,l){var u=ws(h);u.queue===null?sf(h,"forceUpdate"):l!=null&&Cs(l,"setState")}};function up(h,l,u,d,g){var b=u(g,d);Hl(l,b);var k=b==null?d:Xt({},d,b);return k}function af(h,l,u){var d=Ll,g=h.contextType;if("contextType"in h){var b=g===null||g!==void 0&&g.$$typeof===ds&&g._context===void 0;if(!b&&!xc.has(h)){xc.add(h);var k="";g===void 0?k=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof g!="object"?k=" However, it is set to a "+typeof g+".":g.$$typeof===fs?k=" Did you accidentally pass the Context.Provider instead?":g._context!==void 0?k=" Did you accidentally pass the Context.Consumer instead?":k=" However, it is set to an object with keys {"+Object.keys(g).join(", ")+"}.",i("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Be(h)||"Component",k)}}typeof g=="object"&&g!==null?d=mo(g):d=u;var R=new h(l,d);{if(typeof h.getDerivedStateFromProps=="function"&&(R.state===null||R.state===void 0)){var M=Be(h)||"Component";Wl.has(M)||(Wl.add(M),i("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",M,R.state===null?"null":"undefined",M))}if(typeof h.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"){var F=null,U=null,H=null;if(typeof R.componentWillMount=="function"&&R.componentWillMount.__suppressDeprecationWarning!==!0?F="componentWillMount":typeof R.UNSAFE_componentWillMount=="function"&&(F="UNSAFE_componentWillMount"),typeof R.componentWillReceiveProps=="function"&&R.componentWillReceiveProps.__suppressDeprecationWarning!==!0?U="componentWillReceiveProps":typeof R.UNSAFE_componentWillReceiveProps=="function"&&(U="UNSAFE_componentWillReceiveProps"),typeof R.componentWillUpdate=="function"&&R.componentWillUpdate.__suppressDeprecationWarning!==!0?H="componentWillUpdate":typeof R.UNSAFE_componentWillUpdate=="function"&&(H="UNSAFE_componentWillUpdate"),F!==null||U!==null||H!==null){var q=Be(h)||"Component",de=typeof h.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";xs.has(q)||(xs.add(q),i(`Unsafe legacy lifecycles will not be called for components using new component APIs.
104
104
 
105
105
  %s uses %s but also contains the following legacy lifecycles:%s%s%s
106
106
 
@@ -108,17 +108,17 @@ The above lifecycles should be removed. Learn more about this warning here:
108
108
  https://reactjs.org/link/unsafe-component-lifecycles`,q,de,F!==null?`
109
109
  `+F:"",U!==null?`
110
110
  `+U:"",H!==null?`
111
- `+H:""))}}}return R}function sp(h,l,u){{var d=Be(l)||"Component",g=h.render;g||(l.prototype&&typeof l.prototype.render=="function"?i("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",d):i("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",d)),h.getInitialState&&!h.getInitialState.isReactClassApproved&&!h.state&&i("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",d),h.getDefaultProps&&!h.getDefaultProps.isReactClassApproved&&i("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",d),h.propTypes&&i("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",d),h.contextType&&i("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",d),h.contextTypes&&i("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",d),l.contextType&&l.contextTypes&&!Vl.has(l)&&(Vl.add(l),i("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",d)),typeof h.componentShouldUpdate=="function"&&i("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",d),l.prototype&&l.prototype.isPureReactComponent&&typeof h.shouldComponentUpdate<"u"&&i("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Be(l)||"A pure component"),typeof h.componentDidUnmount=="function"&&i("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",d),typeof h.componentDidReceiveProps=="function"&&i("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",d),typeof h.componentWillRecieveProps=="function"&&i("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",d),typeof h.UNSAFE_componentWillRecieveProps=="function"&&i("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",d);var b=h.props!==u;h.props!==void 0&&b&&i("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",d,d),h.defaultProps&&i("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",d,d),typeof h.getSnapshotBeforeUpdate=="function"&&typeof h.componentDidUpdate!="function"&&!yo.has(l)&&(yo.add(l),i("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Be(l))),typeof h.getDerivedStateFromProps=="function"&&i("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof h.getDerivedStateFromError=="function"&&i("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof l.getSnapshotBeforeUpdate=="function"&&i("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",d);var k=h.state;k&&(typeof k!="object"||Ct(k))&&i("%s.state: must be set to an object or null",d),typeof h.getChildContext=="function"&&typeof l.childContextTypes!="object"&&i("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",d)}}function lp(h,l){var u=l.state;if(typeof l.componentWillMount=="function"){if(l.componentWillMount.__suppressDeprecationWarning!==!0){var d=Be(h)||"Unknown";jl[d]||(r(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
111
+ `+H:""))}}}return R}function fp(h,l,u){{var d=Be(l)||"Component",g=h.render;g||(l.prototype&&typeof l.prototype.render=="function"?i("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",d):i("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",d)),h.getInitialState&&!h.getInitialState.isReactClassApproved&&!h.state&&i("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",d),h.getDefaultProps&&!h.getDefaultProps.isReactClassApproved&&i("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",d),h.propTypes&&i("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",d),h.contextType&&i("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",d),h.contextTypes&&i("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",d),l.contextType&&l.contextTypes&&!Gl.has(l)&&(Gl.add(l),i("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",d)),typeof h.componentShouldUpdate=="function"&&i("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",d),l.prototype&&l.prototype.isPureReactComponent&&typeof h.shouldComponentUpdate<"u"&&i("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Be(l)||"A pure component"),typeof h.componentDidUnmount=="function"&&i("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",d),typeof h.componentDidReceiveProps=="function"&&i("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",d),typeof h.componentWillRecieveProps=="function"&&i("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",d),typeof h.UNSAFE_componentWillRecieveProps=="function"&&i("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",d);var b=h.props!==u;h.props!==void 0&&b&&i("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",d,d),h.defaultProps&&i("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",d,d),typeof h.getSnapshotBeforeUpdate=="function"&&typeof h.componentDidUpdate!="function"&&!yo.has(l)&&(yo.add(l),i("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Be(l))),typeof h.getDerivedStateFromProps=="function"&&i("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof h.getDerivedStateFromError=="function"&&i("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof l.getSnapshotBeforeUpdate=="function"&&i("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",d);var k=h.state;k&&(typeof k!="object"||Ct(k))&&i("%s.state: must be set to an object or null",d),typeof h.getChildContext=="function"&&typeof l.childContextTypes!="object"&&i("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",d)}}function dp(h,l){var u=l.state;if(typeof l.componentWillMount=="function"){if(l.componentWillMount.__suppressDeprecationWarning!==!0){var d=Be(h)||"Unknown";Ul[d]||(r(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
112
112
 
113
113
  * Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.
114
114
 
115
- Please update the following components: %s`,d),jl[d]=!0)}l.componentWillMount()}typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),u!==l.state&&(i("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Be(h)||"Component"),rf.enqueueReplaceState(l,l.state,null))}function wc(h,l,u,d){if(h.queue!==null&&h.queue.length>0){var g=h.queue,b=h.replace;if(h.queue=null,h.replace=!1,b&&g.length===1)l.state=g[0];else{for(var k=b?g[0]:l.state,R=!0,M=b?1:0;M<g.length;M++){var F=g[M],U=typeof F=="function"?F.call(l,k,u,d):F;U!=null&&(R?(R=!1,k=Xt({},k,U)):Xt(k,U))}l.state=k}}else h.queue=null}function Es(h,l,u,d){sp(h,l,u);var g=h.state!==void 0?h.state:null;h.updater=rf,h.props=u,h.state=g;var b={queue:[],replace:!1};bc(h,b);var k=l.contextType;if(typeof k=="object"&&k!==null?h.context=mo(k):h.context=d,h.state===u){var R=Be(l)||"Component";Hl.has(R)||(Hl.add(R),i("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",R))}var M=l.getDerivedStateFromProps;typeof M=="function"&&(h.state=op(h,l,M,g,u)),typeof l.getDerivedStateFromProps!="function"&&typeof h.getSnapshotBeforeUpdate!="function"&&(typeof h.UNSAFE_componentWillMount=="function"||typeof h.componentWillMount=="function")&&(lp(l,h),wc(b,h,u,d))}var ap={id:1,overflow:""};function cp(h){var l=h.overflow,u=h.id,d=u&~up(u);return d.toString(32)+l}function xc(h,l,u){var d=h.id,g=h.overflow,b=Gl(d)-1,k=d&~(1<<b),R=u+1,M=Gl(l)+b;if(M>30){var F=b-b%5,U=(1<<F)-1,H=(k&U).toString(32),q=k>>F,de=b-F,Ae=Gl(l)+de,ut=R<<de,Ei=ut|q,Ti=H+g;return{id:1<<Ae|Ei,overflow:Ti}}else{var hr=R<<b,Co=hr|k,zp=g;return{id:1<<M|Co,overflow:zp}}}function Gl(h){return 32-fp(h)}function up(h){return 1<<Gl(h)-1}var fp=Math.clz32?Math.clz32:kc,dp=Math.log,cr=Math.LN2;function kc(h){var l=h>>>0;return l===0?32:31-(dp(l)/cr|0)|0}function Jl(h,l){return h===l&&(h!==0||1/h===1/l)||h!==h&&l!==l}var Le=typeof Object.is=="function"?Object.is:Jl,Zt=null,vo=null,bi=null,Re=null,Fr=!1,Yl=!1,Qt=0,qt=null,Wn=0,hp=25,Cn=!1,Lr;function Si(){if(Zt===null)throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
115
+ Please update the following components: %s`,d),Ul[d]=!0)}l.componentWillMount()}typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),u!==l.state&&(i("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Be(h)||"Component"),lf.enqueueReplaceState(l,l.state,null))}function kc(h,l,u,d){if(h.queue!==null&&h.queue.length>0){var g=h.queue,b=h.replace;if(h.queue=null,h.replace=!1,b&&g.length===1)l.state=g[0];else{for(var k=b?g[0]:l.state,R=!0,M=b?1:0;M<g.length;M++){var F=g[M],U=typeof F=="function"?F.call(l,k,u,d):F;U!=null&&(R?(R=!1,k=Xt({},k,U)):Xt(k,U))}l.state=k}}else h.queue=null}function Es(h,l,u,d){fp(h,l,u);var g=h.state!==void 0?h.state:null;h.updater=lf,h.props=u,h.state=g;var b={queue:[],replace:!1};wc(h,b);var k=l.contextType;if(typeof k=="object"&&k!==null?h.context=mo(k):h.context=d,h.state===u){var R=Be(l)||"Component";Vl.has(R)||(Vl.add(R),i("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",R))}var M=l.getDerivedStateFromProps;typeof M=="function"&&(h.state=up(h,l,M,g,u)),typeof l.getDerivedStateFromProps!="function"&&typeof h.getSnapshotBeforeUpdate!="function"&&(typeof h.UNSAFE_componentWillMount=="function"||typeof h.componentWillMount=="function")&&(dp(l,h),kc(b,h,u,d))}var hp={id:1,overflow:""};function pp(h){var l=h.overflow,u=h.id,d=u&~gp(u);return d.toString(32)+l}function Cc(h,l,u){var d=h.id,g=h.overflow,b=Jl(d)-1,k=d&~(1<<b),R=u+1,M=Jl(l)+b;if(M>30){var F=b-b%5,U=(1<<F)-1,H=(k&U).toString(32),q=k>>F,de=b-F,Ae=Jl(l)+de,ut=R<<de,Ei=ut|q,Ti=H+g;return{id:1<<Ae|Ei,overflow:Ti}}else{var hr=R<<b,Co=hr|k,Vp=g;return{id:1<<M|Co,overflow:Vp}}}function Jl(h){return 32-mp(h)}function gp(h){return 1<<Jl(h)-1}var mp=Math.clz32?Math.clz32:Ec,yp=Math.log,cr=Math.LN2;function Ec(h){var l=h>>>0;return l===0?32:31-(yp(l)/cr|0)|0}function Yl(h,l){return h===l&&(h!==0||1/h===1/l)||h!==h&&l!==l}var Le=typeof Object.is=="function"?Object.is:Yl,Zt=null,vo=null,bi=null,Re=null,Fr=!1,Kl=!1,Qt=0,qt=null,Wn=0,vp=25,Cn=!1,Lr;function Si(){if(Zt===null)throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
116
116
  1. You might have mismatching versions of React and the renderer (such as React DOM)
117
117
  2. You might be breaking the Rules of Hooks
118
118
  3. You might have more than one copy of React in the same app
119
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return Cn&&i("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks"),Zt}function pp(h,l){if(l===null)return i("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Lr),!1;h.length!==l.length&&i(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
119
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return Cn&&i("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks"),Zt}function bp(h,l){if(l===null)return i("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Lr),!1;h.length!==l.length&&i(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
120
120
 
121
121
  Previous: %s
122
- Incoming: %s`,Lr,"["+h.join(", ")+"]","["+l.join(", ")+"]");for(var u=0;u<l.length&&u<h.length;u++)if(!Le(h[u],l[u]))return!1;return!0}function Cc(){if(Wn>0)throw new Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Ts(){return Re===null?bi===null?(Fr=!1,bi=Re=Cc()):(Fr=!0,Re=bi):Re.next===null?(Fr=!1,Re=Re.next=Cc()):(Fr=!0,Re=Re.next),Re}function gp(h,l){Zt=l,vo=h,Cn=!1,Qt=0}function mp(h,l,u,d){for(;Yl;)Yl=!1,Qt=0,Wn+=1,Re=null,u=h(l,d);return Ec(),u}function Kl(){var h=Qt!==0;return h}function Ec(){Cn=!1,Zt=null,vo=null,Yl=!1,bi=null,Wn=0,qt=null,Re=null}function sf(h){return Cn&&i("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),mo(h)}function lf(h){return Lr="useContext",Si(),mo(h)}function Tc(h,l){return typeof l=="function"?l(h):l}function yp(h){return Lr="useState",af(Tc,h)}function af(h,l,u){if(h!==Tc&&(Lr="useReducer"),Zt=Si(),Re=Ts(),Fr){var d=Re.queue,g=d.dispatch;if(qt!==null){var b=qt.get(d);if(b!==void 0){qt.delete(d);var k=Re.memoizedState,R=b;do{var M=R.action;Cn=!0,k=h(k,M),Cn=!1,R=R.next}while(R!==null);return Re.memoizedState=k,[k,g]}}return[Re.memoizedState,g]}else{Cn=!0;var F;h===Tc?F=typeof l=="function"?l():l:F=u!==void 0?u(l):l,Cn=!1,Re.memoizedState=F;var U=Re.queue={last:null,dispatch:null},H=U.dispatch=Sp.bind(null,Zt,U);return[Re.memoizedState,H]}}function cf(h,l){Zt=Si(),Re=Ts();var u=l===void 0?null:l;if(Re!==null){var d=Re.memoizedState;if(d!==null&&u!==null){var g=d[1];if(pp(u,g))return d[0]}}Cn=!0;var b=h();return Cn=!1,Re.memoizedState=[b,u],b}function vp(h){Zt=Si(),Re=Ts();var l=Re.memoizedState;if(l===null){var u={current:h};return Object.seal(u),Re.memoizedState=u,u}else return l}function bp(h,l){Lr="useLayoutEffect",i("useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.")}function Sp(h,l,u){if(Wn>=hp)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(h===Zt){Yl=!0;var d={action:u,next:null};qt===null&&(qt=new Map);var g=qt.get(l);if(g===void 0)qt.set(l,d);else{for(var b=g;b.next!==null;)b=b.next;b.next=d}}}function wp(h,l){return cf(function(){return h},l)}function xp(h,l,u){return Si(),l(h._source)}function kp(h,l,u){if(u===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return u()}function Xl(h){return Si(),h}function uf(){throw new Error("startTransition cannot be called during server rendering.")}function Rc(){return Si(),[!1,uf]}function ff(){var h=vo,l=cp(h.treeContext),u=Rs;if(u===null)throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");var d=Qt++;return hn(u,l,d)}function Zl(){}var Ql={readContext:sf,useContext:lf,useMemo:cf,useReducer:af,useRef:vp,useState:yp,useInsertionEffect:Zl,useLayoutEffect:bp,useCallback:wp,useImperativeHandle:Zl,useEffect:Zl,useDebugValue:Zl,useDeferredValue:Xl,useTransition:Rc,useId:ff,useMutableSource:xp,useSyncExternalStore:kp},Rs=null;function ql(h){Rs=h}function bo(h){try{var l="",u=h;do{switch(u.tag){case 0:l+=mi(u.type,null,null);break;case 1:l+=mc(u.type,null,null);break;case 2:l+=Ku(u.type,null,null);break}u=u.parent}while(u);return l}catch(d){return`
122
+ Incoming: %s`,Lr,"["+h.join(", ")+"]","["+l.join(", ")+"]");for(var u=0;u<l.length&&u<h.length;u++)if(!Le(h[u],l[u]))return!1;return!0}function Tc(){if(Wn>0)throw new Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Ts(){return Re===null?bi===null?(Fr=!1,bi=Re=Tc()):(Fr=!0,Re=bi):Re.next===null?(Fr=!1,Re=Re.next=Tc()):(Fr=!0,Re=Re.next),Re}function Sp(h,l){Zt=l,vo=h,Cn=!1,Qt=0}function wp(h,l,u,d){for(;Kl;)Kl=!1,Qt=0,Wn+=1,Re=null,u=h(l,d);return Rc(),u}function Xl(){var h=Qt!==0;return h}function Rc(){Cn=!1,Zt=null,vo=null,Kl=!1,bi=null,Wn=0,qt=null,Re=null}function cf(h){return Cn&&i("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),mo(h)}function uf(h){return Lr="useContext",Si(),mo(h)}function Ac(h,l){return typeof l=="function"?l(h):l}function xp(h){return Lr="useState",ff(Ac,h)}function ff(h,l,u){if(h!==Ac&&(Lr="useReducer"),Zt=Si(),Re=Ts(),Fr){var d=Re.queue,g=d.dispatch;if(qt!==null){var b=qt.get(d);if(b!==void 0){qt.delete(d);var k=Re.memoizedState,R=b;do{var M=R.action;Cn=!0,k=h(k,M),Cn=!1,R=R.next}while(R!==null);return Re.memoizedState=k,[k,g]}}return[Re.memoizedState,g]}else{Cn=!0;var F;h===Ac?F=typeof l=="function"?l():l:F=u!==void 0?u(l):l,Cn=!1,Re.memoizedState=F;var U=Re.queue={last:null,dispatch:null},H=U.dispatch=Ep.bind(null,Zt,U);return[Re.memoizedState,H]}}function df(h,l){Zt=Si(),Re=Ts();var u=l===void 0?null:l;if(Re!==null){var d=Re.memoizedState;if(d!==null&&u!==null){var g=d[1];if(bp(u,g))return d[0]}}Cn=!0;var b=h();return Cn=!1,Re.memoizedState=[b,u],b}function kp(h){Zt=Si(),Re=Ts();var l=Re.memoizedState;if(l===null){var u={current:h};return Object.seal(u),Re.memoizedState=u,u}else return l}function Cp(h,l){Lr="useLayoutEffect",i("useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.")}function Ep(h,l,u){if(Wn>=vp)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(h===Zt){Kl=!0;var d={action:u,next:null};qt===null&&(qt=new Map);var g=qt.get(l);if(g===void 0)qt.set(l,d);else{for(var b=g;b.next!==null;)b=b.next;b.next=d}}}function Tp(h,l){return df(function(){return h},l)}function Rp(h,l,u){return Si(),l(h._source)}function Ap(h,l,u){if(u===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return u()}function Zl(h){return Si(),h}function hf(){throw new Error("startTransition cannot be called during server rendering.")}function Oc(){return Si(),[!1,hf]}function pf(){var h=vo,l=pp(h.treeContext),u=Rs;if(u===null)throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");var d=Qt++;return hn(u,l,d)}function Ql(){}var ql={readContext:cf,useContext:uf,useMemo:df,useReducer:ff,useRef:kp,useState:xp,useInsertionEffect:Ql,useLayoutEffect:Cp,useCallback:Tp,useImperativeHandle:Ql,useEffect:Ql,useDebugValue:Ql,useDeferredValue:Zl,useTransition:Oc,useId:pf,useMutableSource:Rp,useSyncExternalStore:Ap},Rs=null;function ea(h){Rs=h}function bo(h){try{var l="",u=h;do{switch(u.tag){case 0:l+=mi(u.type,null,null);break;case 1:l+=vc(u.type,null,null);break;case 2:l+=Qu(u.type,null,null);break}u=u.parent}while(u);return l}catch(d){return`
123
123
  Error generating stack: `+d.message+`
124
- `+d.stack}}var ea=t.ReactCurrentDispatcher,ta=t.ReactDebugCurrentFrame,na=0,So=1,Ac=2,wi=3,df=4,Cp=0,wo=1,xo=2,Ep=12800;function Tp(h){return console.error(h),null}function xi(){}function ra(h,l,u,d,g,b,k,R,M){var F=[],U=new Set,H={destination:null,responseState:l,progressiveChunkSize:d===void 0?Ep:d,status:Cp,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:U,pingedTasks:F,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:g===void 0?Tp:g,onAllReady:b===void 0?xi:b,onShellReady:k===void 0?xi:k,onShellError:R===void 0?xi:R,onFatalError:M===void 0?xi:M},q=As(H,0,null,u,!1,!1);q.parentFlushed=!0;var de=ki(H,h,null,q,U,Fl,Ll,ap);return F.push(de),H}function ur(h,l){var u=h.pingedTasks;u.push(l),u.length===1&&s(function(){return $c(h)})}function Oc(h,l){return{id:Ar,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:l,errorDigest:null}}function ki(h,l,u,d,g,b,k,R){h.allPendingTasks++,u===null?h.pendingRootTasks++:u.pendingTasks++;var M={node:l,ping:function(){return ur(h,M)},blockedBoundary:u,blockedSegment:d,abortSet:g,legacyContext:b,context:k,treeContext:R};return M.componentStack=null,g.add(M),M}function As(h,l,u,d,g,b){return{status:na,id:-1,index:l,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:u,lastPushedText:g,textEmbedded:b}}var fr=null;function Hn(){return fr===null||fr.componentStack===null?"":bo(fr.componentStack)}function dr(h,l){h.componentStack={tag:0,parent:h.componentStack,type:l}}function ia(h,l){h.componentStack={tag:1,parent:h.componentStack,type:l}}function Os(h,l){h.componentStack={tag:2,parent:h.componentStack,type:l}}function En(h){h.componentStack===null?i("Unexpectedly popped too many stack frames. This is a bug in React."):h.componentStack=h.componentStack.parent}var Is=null;function Ic(h,l){{var u;typeof l=="string"?u=l:l&&typeof l.message=="string"?u=l.message:u=String(l);var d=Is||Hn();Is=null,h.errorMessage=u,h.errorComponentStack=d}}function Ms(h,l){var u=h.onError(l);if(u!=null&&typeof u!="string")throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof u+'" instead');return u}function Ds(h,l){var u=h.onShellError;u(l);var d=h.onFatalError;d(l),h.destination!==null?(h.status=xo,J(h.destination,l)):(h.status=wo,h.fatalError=l)}function hf(h,l,u){dr(l,"Suspense");var d=l.blockedBoundary,g=l.blockedSegment,b=u.fallback,k=u.children,R=new Set,M=Oc(h,R),F=g.chunks.length,U=As(h,F,M,g.formatContext,!1,!1);g.children.push(U),g.lastPushedText=!1;var H=As(h,0,null,g.formatContext,!1,!1);H.parentFlushed=!0,l.blockedBoundary=M,l.blockedSegment=H;try{if(ko(h,l,k),Tt(H.chunks,h.responseState,H.lastPushedText,H.textEmbedded),H.status=So,Ci(M,H),M.pendingTasks===0){En(l);return}}catch(de){H.status=df,M.forceClientRender=!0,M.errorDigest=Ms(h,de),Ic(M,de)}finally{l.blockedBoundary=d,l.blockedSegment=g}var q=ki(h,b,d,U,R,l.legacyContext,l.context,l.treeContext);q.componentStack=l.componentStack,h.pingedTasks.push(q),En(l)}function Rp(h,l,u,d){dr(l,u);var g=l.blockedSegment,b=di(g.chunks,u,d,h.responseState,g.formatContext);g.lastPushedText=!1;var k=g.formatContext;g.formatContext=ir(k,u,d),ko(h,l,b),g.formatContext=k,fl(g.chunks,u),g.lastPushedText=!1,En(l)}function pf(h){return h.prototype&&h.prototype.isReactComponent}function Ps(h,l,u,d,g){var b={};gp(l,b);var k=u(d,g);return mp(u,d,k,g)}function Mc(h,l,u,d,g){var b=u.render();u.props!==g&&(Nc||i("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Be(d)||"a component"),Nc=!0);{var k=d.childContextTypes;if(k!=null){var R=l.legacyContext,M=yc(u,d,R,k);l.legacyContext=M,Ot(h,l,b),l.legacyContext=R;return}}Ot(h,l,b)}function gf(h,l,u,d){Os(l,u);var g=Pr(u,l.legacyContext),b=of(u,d,g);Es(b,u,d,g),Mc(h,l,b,u,d),En(l)}var Dc={},_s={},Pc={},_c={},Nc=!1,mf={},yf=!1,Fc=!1,vf=!1;function Ap(h,l,u,d){var g;if(g=Pr(u,l.legacyContext),ia(l,u),u.prototype&&typeof u.prototype.render=="function"){var b=Be(u)||"Unknown";Dc[b]||(i("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",b,b),Dc[b]=!0)}var k=Ps(h,l,u,d,g),R=Kl();if(typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0){var M=Be(u)||"Unknown";_s[M]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",M,M,M),_s[M]=!0)}if(typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0){{var F=Be(u)||"Unknown";_s[F]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",F,F,F),_s[F]=!0)}Es(k,u,d,g),Mc(h,l,k,u,d)}else if(Op(u),R){var U=l.treeContext,H=1,q=0;l.treeContext=xc(U,H,q);try{Ot(h,l,k)}finally{l.treeContext=U}}else Ot(h,l,k);En(l)}function Op(h){{if(h&&h.childContextTypes&&i("%s(...): childContextTypes cannot be defined on a function component.",h.displayName||h.name||"Component"),h.defaultProps!==void 0){var l=Be(h)||"Unknown";mf[l]||(i("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",l),mf[l]=!0)}if(typeof h.getDerivedStateFromProps=="function"){var u=Be(h)||"Unknown";_c[u]||(i("%s: Function components do not support getDerivedStateFromProps.",u),_c[u]=!0)}if(typeof h.contextType=="object"&&h.contextType!==null){var d=Be(h)||"Unknown";Pc[d]||(i("%s: Function components do not support contextType.",d),Pc[d]=!0)}}}function bf(h,l){if(h&&h.defaultProps){var u=Xt({},l),d=h.defaultProps;for(var g in d)u[g]===void 0&&(u[g]=d[g]);return u}return l}function Ip(h,l,u,d,g){ia(l,u.render);var b=Ps(h,l,u.render,d,g),k=Kl();if(k){var R=l.treeContext,M=1,F=0;l.treeContext=xc(R,M,F);try{Ot(h,l,b)}finally{l.treeContext=R}}else Ot(h,l,b);En(l)}function Lc(h,l,u,d,g){var b=u.type,k=bf(b,d);oa(h,l,b,k,g)}function Mp(h,l,u,d){u._context===void 0?u!==u.Consumer&&(vf||(vf=!0,i("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):u=u._context;var g=d.children;typeof g!="function"&&i("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var b=mo(u),k=g(b);Ot(h,l,k)}function en(h,l,u,d){var g=u._context,b=d.value,k=d.children,R;R=l.context,l.context=vc(g,b),Ot(h,l,k),l.context=ip(g),R!==l.context&&i("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function Dp(h,l,u,d,g){dr(l,"Lazy");var b=u._payload,k=u._init,R=k(b),M=bf(R,d);oa(h,l,R,M,g),En(l)}function oa(h,l,u,d,g){if(typeof u=="function")if(pf(u)){gf(h,l,u,d);return}else{Ap(h,l,u,d);return}if(typeof u=="string"){Rp(h,l,u,d);return}switch(u){case tp:case ep:case Al:case Ol:case Rl:{Ot(h,l,d.children);return}case oc:{dr(l,"SuspenseList"),Ot(h,l,d.children),En(l);return}case Vu:throw new Error("ReactDOMServer does not yet support scope components.");case ic:{hf(h,l,d);return}}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case ho:{Ip(h,l,u,d,g);return}case sc:{Lc(h,l,u,d,g);return}case fs:{en(h,l,u,d);return}case ds:{Mp(h,l,u,d);return}case Il:{Dp(h,l,u,d);return}}var b="";throw(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&(b+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(u==null?u:typeof u)+"."+b))}function Pp(h,l){typeof Symbol=="function"&&h[Symbol.toStringTag]==="Generator"&&(yf||i("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),yf=!0),h.entries===l&&(Fc||i("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Fc=!0)}function Ot(h,l,u){try{return _p(h,l,u)}catch(d){throw typeof d=="object"&&d!==null&&typeof d.then=="function"||(Is=Is!==null?Is:Hn()),d}}function _p(h,l,u){if(l.node=u,typeof u=="object"&&u!==null){switch(u.$$typeof){case Hu:{var d=u,g=d.type,b=d.props,k=d.ref;oa(h,l,g,b,k);return}case Tl:throw new Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case Il:{var R=u,M=R._payload,F=R._init,U;try{U=F(M)}catch(hr){throw typeof hr=="object"&&hr!==null&&typeof hr.then=="function"&&dr(l,"Lazy"),hr}Ot(h,l,U);return}}if(Ct(u)){Sf(h,l,u);return}var H=hs(u);if(H){Pp(u,H);var q=H.call(u);if(q){var de=q.next();if(!de.done){var Ae=[];do Ae.push(de.value),de=q.next();while(!de.done);Sf(h,l,Ae);return}return}}var ut=Object.prototype.toString.call(u);throw new Error("Objects are not valid as a React child (found: "+(ut==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":ut)+"). If you meant to render a collection of children, use an array instead.")}if(typeof u=="string"){var Ei=l.blockedSegment;Ei.lastPushedText=rt(l.blockedSegment.chunks,u,h.responseState,Ei.lastPushedText);return}if(typeof u=="number"){var Ti=l.blockedSegment;Ti.lastPushedText=rt(l.blockedSegment.chunks,""+u,h.responseState,Ti.lastPushedText);return}typeof u=="function"&&i("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}function Sf(h,l,u){for(var d=u.length,g=0;g<d;g++){var b=l.treeContext;l.treeContext=xc(b,d,g);try{ko(h,l,u[g])}finally{l.treeContext=b}}}function wf(h,l,u){var d=l.blockedSegment,g=d.chunks.length,b=As(h,g,null,d.formatContext,d.lastPushedText,!0);d.children.push(b),d.lastPushedText=!1;var k=ki(h,l.node,l.blockedBoundary,b,l.abortSet,l.legacyContext,l.context,l.treeContext);l.componentStack!==null&&(k.componentStack=l.componentStack.parent);var R=k.ping;u.then(R,R)}function ko(h,l,u){var d=l.blockedSegment.formatContext,g=l.legacyContext,b=l.context,k=null;k=l.componentStack;try{return Ot(h,l,u)}catch(R){if(Ec(),typeof R=="object"&&R!==null&&typeof R.then=="function"){wf(h,l,R),l.blockedSegment.formatContext=d,l.legacyContext=g,l.context=b,Nr(b),l.componentStack=k;return}else throw l.blockedSegment.formatContext=d,l.legacyContext=g,l.context=b,Nr(b),l.componentStack=k,R}}function xf(h,l,u,d){var g=Ms(h,d);if(l===null?Ds(h,d):(l.pendingTasks--,l.forceClientRender||(l.forceClientRender=!0,l.errorDigest=g,Ic(l,d),l.parentFlushed&&h.clientRenderedBoundaries.push(l))),h.allPendingTasks--,h.allPendingTasks===0){var b=h.onAllReady;b()}}function Np(h){var l=this,u=h.blockedBoundary,d=h.blockedSegment;d.status=wi,Ns(l,u,d)}function Bc(h,l,u){var d=h.blockedBoundary,g=h.blockedSegment;if(g.status=wi,d===null)l.allPendingTasks--,l.status!==xo&&(l.status=xo,l.destination!==null&&E(l.destination));else{if(d.pendingTasks--,!d.forceClientRender){d.forceClientRender=!0;var b=u===void 0?new Error("The render was aborted by the server without a reason."):u;d.errorDigest=l.onError(b);{var k="The server did not finish this Suspense boundary: ";b&&typeof b.message=="string"?b=k+b.message:b=k+String(b);var R=fr;fr=h;try{Ic(d,b)}finally{fr=R}}d.parentFlushed&&l.clientRenderedBoundaries.push(d)}if(d.fallbackAbortableTasks.forEach(function(F){return Bc(F,l,u)}),d.fallbackAbortableTasks.clear(),l.allPendingTasks--,l.allPendingTasks===0){var M=l.onAllReady;M()}}}function Ci(h,l){if(l.chunks.length===0&&l.children.length===1&&l.children[0].boundary===null){var u=l.children[0];u.id=l.id,u.parentFlushed=!0,u.status===So&&Ci(h,u)}else{var d=h.completedSegments;d.push(l)}}function Ns(h,l,u){if(l===null){if(u.parentFlushed){if(h.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");h.completedRootSegment=u}if(h.pendingRootTasks--,h.pendingRootTasks===0){h.onShellError=xi;var d=h.onShellReady;d()}}else if(l.pendingTasks--,!l.forceClientRender){if(l.pendingTasks===0)u.parentFlushed&&u.status===So&&Ci(l,u),l.parentFlushed&&h.completedBoundaries.push(l),l.fallbackAbortableTasks.forEach(Np,h),l.fallbackAbortableTasks.clear();else if(u.parentFlushed&&u.status===So){Ci(l,u);var g=l.completedSegments;g.length===1&&l.parentFlushed&&h.partialBoundaries.push(l)}}if(h.allPendingTasks--,h.allPendingTasks===0){var b=h.onAllReady;b()}}function Fp(h,l){var u=l.blockedSegment;if(u.status===na){Nr(l.context);var d=null;d=fr,fr=l;try{Ot(h,l,l.node),Tt(u.chunks,h.responseState,u.lastPushedText,u.textEmbedded),l.abortSet.delete(l),u.status=So,Ns(h,l.blockedBoundary,u)}catch(b){if(Ec(),typeof b=="object"&&b!==null&&typeof b.then=="function"){var g=l.ping;b.then(g,g)}else l.abortSet.delete(l),u.status=df,xf(h,l.blockedBoundary,u,b)}finally{fr=d}}}function $c(h){if(h.status!==xo){var l=ef(),u=ea.current;ea.current=Ql;var d;d=ta.getCurrentStack,ta.getCurrentStack=Hn;var g=Rs;ql(h.responseState);try{var b=h.pingedTasks,k;for(k=0;k<b.length;k++){var R=b[k];Fp(h,R)}b.splice(0,k),h.destination!==null&&zc(h,h.destination)}catch(M){Ms(h,M),Ds(h,M)}finally{ql(g),ea.current=u,ta.getCurrentStack=d,u===Ql&&Nr(l)}}}function Fs(h,l,u){switch(u.parentFlushed=!0,u.status){case na:{var d=u.id=h.nextSegmentId++;return u.lastPushedText=!1,u.textEmbedded=!1,dl(l,h.responseState,d)}case So:{u.status=Ac;for(var g=!0,b=u.chunks,k=0,R=u.children,M=0;M<R.length;M++){for(var F=R[M];k<F.index;k++)m(l,b[k]);g=sa(h,l,F)}for(;k<b.length-1;k++)m(l,b[k]);return k<b.length&&(g=S(l,b[k])),g}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function sa(h,l,u){var d=u.boundary;if(d===null)return Fs(h,l,u);if(d.parentFlushed=!0,d.forceClientRender)return Rt(l,h.responseState,d.errorDigest,d.errorMessage,d.errorComponentStack),Fs(h,l,u),nc(l,h.responseState);if(d.pendingTasks>0){d.rootSegmentID=h.nextSegmentId++,d.completedSegments.length>0&&h.partialBoundaries.push(d);var g=d.id=Nt(h.responseState);return so(l,h.responseState,g),Fs(h,l,u),lo(l,h.responseState)}else{if(d.byteSize>h.progressiveChunkSize)return d.rootSegmentID=h.nextSegmentId++,h.completedBoundaries.push(d),so(l,h.responseState,d.id),Fs(h,l,u),lo(l,h.responseState);gl(l,h.responseState);var b=d.completedSegments;if(b.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var k=b[0];return sa(h,l,k),ml(l,h.responseState)}}function kf(h,l,u){return qh(l,h.responseState,u.id,u.errorDigest,u.errorMessage,u.errorComponentStack)}function la(h,l,u){return ge(l,h.responseState,u.formatContext,u.id),sa(h,l,u),Ne(l,u.formatContext)}function Cf(h,l,u){for(var d=u.completedSegments,g=0;g<d.length;g++){var b=d[g];Ef(h,l,u,b)}return d.length=0,Uu(l,h.responseState,u.id,u.rootSegmentID)}function Lp(h,l,u){for(var d=u.completedSegments,g=0;g<d.length;g++){var b=d[g];if(!Ef(h,l,u,b))return g++,d.splice(0,g),!1}return d.splice(0,g),!0}function Ef(h,l,u,d){if(d.status===Ac)return!0;var g=d.id;if(g===-1){var b=d.id=u.rootSegmentID;if(b===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return la(h,l,d)}else return la(h,l,d),Gh(l,h.responseState,g)}function zc(h,l){p();try{var u=h.completedRootSegment;u!==null&&h.pendingRootTasks===0&&(sa(h,l,u),h.completedRootSegment=null,qa(l,h.responseState));var d=h.clientRenderedBoundaries,g;for(g=0;g<d.length;g++){var b=d[g];kf(h,l,b)}d.splice(0,g);var k=h.completedBoundaries;for(g=0;g<k.length;g++){var R=k[g];Cf(h,l,R)}k.splice(0,g),C(l),p(l);var M=h.partialBoundaries;for(g=0;g<M.length;g++){var F=M[g];if(!Lp(h,l,F)){h.destination=null,g++,M.splice(0,g);return}}M.splice(0,g);var U=h.completedBoundaries;for(g=0;g<U.length;g++){var H=U[g];Cf(h,l,H)}U.splice(0,g)}finally{C(l),h.allPendingTasks===0&&h.pingedTasks.length===0&&h.clientRenderedBoundaries.length===0&&h.completedBoundaries.length===0&&(h.abortableTasks.size!==0&&i("There was still abortable task at the root when we closed. This is a bug in React."),E(l))}}function Tf(h){s(function(){return $c(h)})}function Bp(h,l){if(h.status===wo){h.status=xo,J(l,h.fatalError);return}if(h.status!==xo&&h.destination===null){h.destination=l;try{zc(h,l)}catch(u){Ms(h,u),Ds(h,u)}}}function Rf(h,l){try{var u=h.abortableTasks;u.forEach(function(d){return Bc(d,h,l)}),u.clear(),h.destination!==null&&zc(h,h.destination)}catch(d){Ms(h,d),Ds(h,d)}}function $p(h,l){return new Promise(function(u,d){var g,b,k=new Promise(function(q,de){b=q,g=de});function R(){var q=new ReadableStream({type:"bytes",pull:function(de){Bp(F,de)},cancel:function(de){Rf(F)}},{highWaterMark:0});q.allReady=k,u(q)}function M(q){k.catch(function(){}),d(q)}var F=ra(h,Qi(l?l.identifierPrefix:void 0,l?l.nonce:void 0,l?l.bootstrapScriptContent:void 0,l?l.bootstrapScripts:void 0,l?l.bootstrapModules:void 0),Bn(l?l.namespaceURI:void 0),l?l.progressiveChunkSize:void 0,l?l.onError:void 0,b,R,M,g);if(l&&l.signal){var U=l.signal,H=function(){Rf(F,U.reason),U.removeEventListener("abort",H)};U.addEventListener("abort",H)}Tf(F)})}Kf.renderToReadableStream=$p,Kf.version=e}()),Kf}var nl,ny;process.env.NODE_ENV==="production"?(nl=dz(),ny=hz()):(nl=pz(),ny=gz());cl.version=nl.version;cl.renderToString=nl.renderToString;cl.renderToStaticMarkup=nl.renderToStaticMarkup;cl.renderToNodeStream=nl.renderToNodeStream;cl.renderToStaticNodeStream=nl.renderToStaticNodeStream;cl.renderToReadableStream=ny.renderToReadableStream;exports.AllSelection=Kn;exports.CellSelection=Ge;exports.DOMParser=ry;exports.DOMSerializer=rl;exports.Decoration=$t;exports.DecorationSet=Qe;exports.EditorState=va;exports.EditorView=LT;exports.Fragment=W;exports.Node=mr;exports.NodeRange=fu;exports.NodeSelection=he;exports.Plugin=il;exports.PluginKey=ji;exports.ReplaceAroundStep=St;exports.ReplaceStep=bt;exports.Schema=RC;exports.Selection=me;exports.SelectionRange=uy;exports.Slice=ee;exports.TextSelection=ke;exports.Transform=cy;exports.VisibilitySensor=HD;exports.absolutePositionToRelativePosition=TB;exports.addColumnAfter=A$;exports.addColumnBefore=R$;exports.addRowAfter=P$;exports.addRowBefore=D$;exports.canJoin=ja;exports.canSplit=ly;exports.clamp=KN;exports.clsx=yx;exports.columnResizing=tz;exports.createParagraphNear=oR;exports.cva=UD;exports.debounce=Z1;exports.deepEqual=jD;exports.deleteColumn=I$;exports.deleteRow=N$;exports.deleteSelection=JT;exports.deleteTable=V$;exports.differenceBy=c2;exports.dropCursor=r$;exports.exitCode=iR;exports.find=JB;exports.findWrapping=sy;exports.fixTables=iC;exports.gapCursor=l$;exports.goToNextCell=H$;exports.history=n$;exports.i=KD;exports.isNumber=f2;exports.joinBackward=YT;exports.joinDown=tR;exports.joinForward=QT;exports.joinPoint=ay;exports.joinTextblockBackward=KT;exports.joinTextblockForward=XT;exports.joinUp=eR;exports.keymap=GT;exports.lift=nR;exports.liftEmptyBlock=sR;exports.liftListItem=gR;exports.liftTarget=za;exports.mergeCells=L$;exports.newlineInCode=rR;exports.redo=qk;exports.registerCustomProtocol=VB;exports.reset=HB;exports.selectNodeBackward=ZT;exports.selectNodeForward=qT;exports.selectParentNode=lR;exports.selectTextblockEnd=uR;exports.selectTextblockStart=cR;exports.server_browser=cl;exports.setBlockType=dR;exports.setCellAttr=z$;exports.sinkListItem=vR;exports.splitCell=B$;exports.tableEditing=fz;exports.throttle=I2;exports.toggleHeader=Hh;exports.toggleHeaderCell=U$;exports.tokenize=Kk;exports.truncate=_2;exports.twMerge=XR;exports.undo=Qk;exports.wrapIn=fR;exports.wrapInList=hR;exports.ySyncPluginKey=EB;
124
+ `+d.stack}}var ta=t.ReactCurrentDispatcher,na=t.ReactDebugCurrentFrame,ra=0,So=1,Ic=2,wi=3,gf=4,Op=0,wo=1,xo=2,Ip=12800;function Mp(h){return console.error(h),null}function xi(){}function ia(h,l,u,d,g,b,k,R,M){var F=[],U=new Set,H={destination:null,responseState:l,progressiveChunkSize:d===void 0?Ip:d,status:Op,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:U,pingedTasks:F,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:g===void 0?Mp:g,onAllReady:b===void 0?xi:b,onShellReady:k===void 0?xi:k,onShellError:R===void 0?xi:R,onFatalError:M===void 0?xi:M},q=As(H,0,null,u,!1,!1);q.parentFlushed=!0;var de=ki(H,h,null,q,U,Ll,Bl,hp);return F.push(de),H}function ur(h,l){var u=h.pingedTasks;u.push(l),u.length===1&&s(function(){return jc(h)})}function Mc(h,l){return{id:Ar,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:l,errorDigest:null}}function ki(h,l,u,d,g,b,k,R){h.allPendingTasks++,u===null?h.pendingRootTasks++:u.pendingTasks++;var M={node:l,ping:function(){return ur(h,M)},blockedBoundary:u,blockedSegment:d,abortSet:g,legacyContext:b,context:k,treeContext:R};return M.componentStack=null,g.add(M),M}function As(h,l,u,d,g,b){return{status:ra,id:-1,index:l,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:u,lastPushedText:g,textEmbedded:b}}var fr=null;function Hn(){return fr===null||fr.componentStack===null?"":bo(fr.componentStack)}function dr(h,l){h.componentStack={tag:0,parent:h.componentStack,type:l}}function oa(h,l){h.componentStack={tag:1,parent:h.componentStack,type:l}}function Os(h,l){h.componentStack={tag:2,parent:h.componentStack,type:l}}function En(h){h.componentStack===null?i("Unexpectedly popped too many stack frames. This is a bug in React."):h.componentStack=h.componentStack.parent}var Is=null;function Dc(h,l){{var u;typeof l=="string"?u=l:l&&typeof l.message=="string"?u=l.message:u=String(l);var d=Is||Hn();Is=null,h.errorMessage=u,h.errorComponentStack=d}}function Ms(h,l){var u=h.onError(l);if(u!=null&&typeof u!="string")throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof u+'" instead');return u}function Ds(h,l){var u=h.onShellError;u(l);var d=h.onFatalError;d(l),h.destination!==null?(h.status=xo,J(h.destination,l)):(h.status=wo,h.fatalError=l)}function mf(h,l,u){dr(l,"Suspense");var d=l.blockedBoundary,g=l.blockedSegment,b=u.fallback,k=u.children,R=new Set,M=Mc(h,R),F=g.chunks.length,U=As(h,F,M,g.formatContext,!1,!1);g.children.push(U),g.lastPushedText=!1;var H=As(h,0,null,g.formatContext,!1,!1);H.parentFlushed=!0,l.blockedBoundary=M,l.blockedSegment=H;try{if(ko(h,l,k),Tt(H.chunks,h.responseState,H.lastPushedText,H.textEmbedded),H.status=So,Ci(M,H),M.pendingTasks===0){En(l);return}}catch(de){H.status=gf,M.forceClientRender=!0,M.errorDigest=Ms(h,de),Dc(M,de)}finally{l.blockedBoundary=d,l.blockedSegment=g}var q=ki(h,b,d,U,R,l.legacyContext,l.context,l.treeContext);q.componentStack=l.componentStack,h.pingedTasks.push(q),En(l)}function Dp(h,l,u,d){dr(l,u);var g=l.blockedSegment,b=di(g.chunks,u,d,h.responseState,g.formatContext);g.lastPushedText=!1;var k=g.formatContext;g.formatContext=ir(k,u,d),ko(h,l,b),g.formatContext=k,dl(g.chunks,u),g.lastPushedText=!1,En(l)}function yf(h){return h.prototype&&h.prototype.isReactComponent}function Ps(h,l,u,d,g){var b={};Sp(l,b);var k=u(d,g);return wp(u,d,k,g)}function Pc(h,l,u,d,g){var b=u.render();u.props!==g&&(Lc||i("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Be(d)||"a component"),Lc=!0);{var k=d.childContextTypes;if(k!=null){var R=l.legacyContext,M=bc(u,d,R,k);l.legacyContext=M,Ot(h,l,b),l.legacyContext=R;return}}Ot(h,l,b)}function vf(h,l,u,d){Os(l,u);var g=Pr(u,l.legacyContext),b=af(u,d,g);Es(b,u,d,g),Pc(h,l,b,u,d),En(l)}var _c={},_s={},Nc={},Fc={},Lc=!1,bf={},Sf=!1,Bc=!1,wf=!1;function Pp(h,l,u,d){var g;if(g=Pr(u,l.legacyContext),oa(l,u),u.prototype&&typeof u.prototype.render=="function"){var b=Be(u)||"Unknown";_c[b]||(i("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",b,b),_c[b]=!0)}var k=Ps(h,l,u,d,g),R=Xl();if(typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0){var M=Be(u)||"Unknown";_s[M]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",M,M,M),_s[M]=!0)}if(typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0){{var F=Be(u)||"Unknown";_s[F]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",F,F,F),_s[F]=!0)}Es(k,u,d,g),Pc(h,l,k,u,d)}else if(_p(u),R){var U=l.treeContext,H=1,q=0;l.treeContext=Cc(U,H,q);try{Ot(h,l,k)}finally{l.treeContext=U}}else Ot(h,l,k);En(l)}function _p(h){{if(h&&h.childContextTypes&&i("%s(...): childContextTypes cannot be defined on a function component.",h.displayName||h.name||"Component"),h.defaultProps!==void 0){var l=Be(h)||"Unknown";bf[l]||(i("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",l),bf[l]=!0)}if(typeof h.getDerivedStateFromProps=="function"){var u=Be(h)||"Unknown";Fc[u]||(i("%s: Function components do not support getDerivedStateFromProps.",u),Fc[u]=!0)}if(typeof h.contextType=="object"&&h.contextType!==null){var d=Be(h)||"Unknown";Nc[d]||(i("%s: Function components do not support contextType.",d),Nc[d]=!0)}}}function xf(h,l){if(h&&h.defaultProps){var u=Xt({},l),d=h.defaultProps;for(var g in d)u[g]===void 0&&(u[g]=d[g]);return u}return l}function Np(h,l,u,d,g){oa(l,u.render);var b=Ps(h,l,u.render,d,g),k=Xl();if(k){var R=l.treeContext,M=1,F=0;l.treeContext=Cc(R,M,F);try{Ot(h,l,b)}finally{l.treeContext=R}}else Ot(h,l,b);En(l)}function $c(h,l,u,d,g){var b=u.type,k=xf(b,d);sa(h,l,b,k,g)}function Fp(h,l,u,d){u._context===void 0?u!==u.Consumer&&(wf||(wf=!0,i("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):u=u._context;var g=d.children;typeof g!="function"&&i("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var b=mo(u),k=g(b);Ot(h,l,k)}function en(h,l,u,d){var g=u._context,b=d.value,k=d.children,R;R=l.context,l.context=Sc(g,b),Ot(h,l,k),l.context=cp(g),R!==l.context&&i("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function Lp(h,l,u,d,g){dr(l,"Lazy");var b=u._payload,k=u._init,R=k(b),M=xf(R,d);sa(h,l,R,M,g),En(l)}function sa(h,l,u,d,g){if(typeof u=="function")if(yf(u)){vf(h,l,u,d);return}else{Pp(h,l,u,d);return}if(typeof u=="string"){Dp(h,l,u,d);return}switch(u){case sp:case op:case Ol:case Il:case Al:{Ot(h,l,d.children);return}case lc:{dr(l,"SuspenseList"),Ot(h,l,d.children),En(l);return}case Yu:throw new Error("ReactDOMServer does not yet support scope components.");case sc:{mf(h,l,d);return}}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case ho:{Np(h,l,u,d,g);return}case ac:{$c(h,l,u,d,g);return}case fs:{en(h,l,u,d);return}case ds:{Fp(h,l,u,d);return}case Ml:{Lp(h,l,u,d);return}}var b="";throw(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&(b+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(u==null?u:typeof u)+"."+b))}function Bp(h,l){typeof Symbol=="function"&&h[Symbol.toStringTag]==="Generator"&&(Sf||i("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Sf=!0),h.entries===l&&(Bc||i("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Bc=!0)}function Ot(h,l,u){try{return $p(h,l,u)}catch(d){throw typeof d=="object"&&d!==null&&typeof d.then=="function"||(Is=Is!==null?Is:Hn()),d}}function $p(h,l,u){if(l.node=u,typeof u=="object"&&u!==null){switch(u.$$typeof){case Ju:{var d=u,g=d.type,b=d.props,k=d.ref;sa(h,l,g,b,k);return}case Rl:throw new Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case Ml:{var R=u,M=R._payload,F=R._init,U;try{U=F(M)}catch(hr){throw typeof hr=="object"&&hr!==null&&typeof hr.then=="function"&&dr(l,"Lazy"),hr}Ot(h,l,U);return}}if(Ct(u)){kf(h,l,u);return}var H=hs(u);if(H){Bp(u,H);var q=H.call(u);if(q){var de=q.next();if(!de.done){var Ae=[];do Ae.push(de.value),de=q.next();while(!de.done);kf(h,l,Ae);return}return}}var ut=Object.prototype.toString.call(u);throw new Error("Objects are not valid as a React child (found: "+(ut==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":ut)+"). If you meant to render a collection of children, use an array instead.")}if(typeof u=="string"){var Ei=l.blockedSegment;Ei.lastPushedText=rt(l.blockedSegment.chunks,u,h.responseState,Ei.lastPushedText);return}if(typeof u=="number"){var Ti=l.blockedSegment;Ti.lastPushedText=rt(l.blockedSegment.chunks,""+u,h.responseState,Ti.lastPushedText);return}typeof u=="function"&&i("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}function kf(h,l,u){for(var d=u.length,g=0;g<d;g++){var b=l.treeContext;l.treeContext=Cc(b,d,g);try{ko(h,l,u[g])}finally{l.treeContext=b}}}function Cf(h,l,u){var d=l.blockedSegment,g=d.chunks.length,b=As(h,g,null,d.formatContext,d.lastPushedText,!0);d.children.push(b),d.lastPushedText=!1;var k=ki(h,l.node,l.blockedBoundary,b,l.abortSet,l.legacyContext,l.context,l.treeContext);l.componentStack!==null&&(k.componentStack=l.componentStack.parent);var R=k.ping;u.then(R,R)}function ko(h,l,u){var d=l.blockedSegment.formatContext,g=l.legacyContext,b=l.context,k=null;k=l.componentStack;try{return Ot(h,l,u)}catch(R){if(Rc(),typeof R=="object"&&R!==null&&typeof R.then=="function"){Cf(h,l,R),l.blockedSegment.formatContext=d,l.legacyContext=g,l.context=b,Nr(b),l.componentStack=k;return}else throw l.blockedSegment.formatContext=d,l.legacyContext=g,l.context=b,Nr(b),l.componentStack=k,R}}function Ef(h,l,u,d){var g=Ms(h,d);if(l===null?Ds(h,d):(l.pendingTasks--,l.forceClientRender||(l.forceClientRender=!0,l.errorDigest=g,Dc(l,d),l.parentFlushed&&h.clientRenderedBoundaries.push(l))),h.allPendingTasks--,h.allPendingTasks===0){var b=h.onAllReady;b()}}function zp(h){var l=this,u=h.blockedBoundary,d=h.blockedSegment;d.status=wi,Ns(l,u,d)}function zc(h,l,u){var d=h.blockedBoundary,g=h.blockedSegment;if(g.status=wi,d===null)l.allPendingTasks--,l.status!==xo&&(l.status=xo,l.destination!==null&&E(l.destination));else{if(d.pendingTasks--,!d.forceClientRender){d.forceClientRender=!0;var b=u===void 0?new Error("The render was aborted by the server without a reason."):u;d.errorDigest=l.onError(b);{var k="The server did not finish this Suspense boundary: ";b&&typeof b.message=="string"?b=k+b.message:b=k+String(b);var R=fr;fr=h;try{Dc(d,b)}finally{fr=R}}d.parentFlushed&&l.clientRenderedBoundaries.push(d)}if(d.fallbackAbortableTasks.forEach(function(F){return zc(F,l,u)}),d.fallbackAbortableTasks.clear(),l.allPendingTasks--,l.allPendingTasks===0){var M=l.onAllReady;M()}}}function Ci(h,l){if(l.chunks.length===0&&l.children.length===1&&l.children[0].boundary===null){var u=l.children[0];u.id=l.id,u.parentFlushed=!0,u.status===So&&Ci(h,u)}else{var d=h.completedSegments;d.push(l)}}function Ns(h,l,u){if(l===null){if(u.parentFlushed){if(h.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");h.completedRootSegment=u}if(h.pendingRootTasks--,h.pendingRootTasks===0){h.onShellError=xi;var d=h.onShellReady;d()}}else if(l.pendingTasks--,!l.forceClientRender){if(l.pendingTasks===0)u.parentFlushed&&u.status===So&&Ci(l,u),l.parentFlushed&&h.completedBoundaries.push(l),l.fallbackAbortableTasks.forEach(zp,h),l.fallbackAbortableTasks.clear();else if(u.parentFlushed&&u.status===So){Ci(l,u);var g=l.completedSegments;g.length===1&&l.parentFlushed&&h.partialBoundaries.push(l)}}if(h.allPendingTasks--,h.allPendingTasks===0){var b=h.onAllReady;b()}}function jp(h,l){var u=l.blockedSegment;if(u.status===ra){Nr(l.context);var d=null;d=fr,fr=l;try{Ot(h,l,l.node),Tt(u.chunks,h.responseState,u.lastPushedText,u.textEmbedded),l.abortSet.delete(l),u.status=So,Ns(h,l.blockedBoundary,u)}catch(b){if(Rc(),typeof b=="object"&&b!==null&&typeof b.then=="function"){var g=l.ping;b.then(g,g)}else l.abortSet.delete(l),u.status=gf,Ef(h,l.blockedBoundary,u,b)}finally{fr=d}}}function jc(h){if(h.status!==xo){var l=rf(),u=ta.current;ta.current=ql;var d;d=na.getCurrentStack,na.getCurrentStack=Hn;var g=Rs;ea(h.responseState);try{var b=h.pingedTasks,k;for(k=0;k<b.length;k++){var R=b[k];jp(h,R)}b.splice(0,k),h.destination!==null&&Uc(h,h.destination)}catch(M){Ms(h,M),Ds(h,M)}finally{ea(g),ta.current=u,na.getCurrentStack=d,u===ql&&Nr(l)}}}function Fs(h,l,u){switch(u.parentFlushed=!0,u.status){case ra:{var d=u.id=h.nextSegmentId++;return u.lastPushedText=!1,u.textEmbedded=!1,hl(l,h.responseState,d)}case So:{u.status=Ic;for(var g=!0,b=u.chunks,k=0,R=u.children,M=0;M<R.length;M++){for(var F=R[M];k<F.index;k++)m(l,b[k]);g=la(h,l,F)}for(;k<b.length-1;k++)m(l,b[k]);return k<b.length&&(g=S(l,b[k])),g}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function la(h,l,u){var d=u.boundary;if(d===null)return Fs(h,l,u);if(d.parentFlushed=!0,d.forceClientRender)return Rt(l,h.responseState,d.errorDigest,d.errorMessage,d.errorComponentStack),Fs(h,l,u),ic(l,h.responseState);if(d.pendingTasks>0){d.rootSegmentID=h.nextSegmentId++,d.completedSegments.length>0&&h.partialBoundaries.push(d);var g=d.id=Nt(h.responseState);return so(l,h.responseState,g),Fs(h,l,u),lo(l,h.responseState)}else{if(d.byteSize>h.progressiveChunkSize)return d.rootSegmentID=h.nextSegmentId++,h.completedBoundaries.push(d),so(l,h.responseState,d.id),Fs(h,l,u),lo(l,h.responseState);ml(l,h.responseState);var b=d.completedSegments;if(b.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var k=b[0];return la(h,l,k),yl(l,h.responseState)}}function Tf(h,l,u){return ip(l,h.responseState,u.id,u.errorDigest,u.errorMessage,u.errorComponentStack)}function aa(h,l,u){return ge(l,h.responseState,u.formatContext,u.id),la(h,l,u),Ne(l,u.formatContext)}function Rf(h,l,u){for(var d=u.completedSegments,g=0;g<d.length;g++){var b=d[g];Af(h,l,u,b)}return d.length=0,Vu(l,h.responseState,u.id,u.rootSegmentID)}function Up(h,l,u){for(var d=u.completedSegments,g=0;g<d.length;g++){var b=d[g];if(!Af(h,l,u,b))return g++,d.splice(0,g),!1}return d.splice(0,g),!0}function Af(h,l,u,d){if(d.status===Ic)return!0;var g=d.id;if(g===-1){var b=d.id=u.rootSegmentID;if(b===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return aa(h,l,d)}else return aa(h,l,d),Zh(l,h.responseState,g)}function Uc(h,l){p();try{var u=h.completedRootSegment;u!==null&&h.pendingRootTasks===0&&(la(h,l,u),h.completedRootSegment=null,tc(l,h.responseState));var d=h.clientRenderedBoundaries,g;for(g=0;g<d.length;g++){var b=d[g];Tf(h,l,b)}d.splice(0,g);var k=h.completedBoundaries;for(g=0;g<k.length;g++){var R=k[g];Rf(h,l,R)}k.splice(0,g),C(l),p(l);var M=h.partialBoundaries;for(g=0;g<M.length;g++){var F=M[g];if(!Up(h,l,F)){h.destination=null,g++,M.splice(0,g);return}}M.splice(0,g);var U=h.completedBoundaries;for(g=0;g<U.length;g++){var H=U[g];Rf(h,l,H)}U.splice(0,g)}finally{C(l),h.allPendingTasks===0&&h.pingedTasks.length===0&&h.clientRenderedBoundaries.length===0&&h.completedBoundaries.length===0&&(h.abortableTasks.size!==0&&i("There was still abortable task at the root when we closed. This is a bug in React."),E(l))}}function Of(h){s(function(){return jc(h)})}function Wp(h,l){if(h.status===wo){h.status=xo,J(l,h.fatalError);return}if(h.status!==xo&&h.destination===null){h.destination=l;try{Uc(h,l)}catch(u){Ms(h,u),Ds(h,u)}}}function If(h,l){try{var u=h.abortableTasks;u.forEach(function(d){return zc(d,h,l)}),u.clear(),h.destination!==null&&Uc(h,h.destination)}catch(d){Ms(h,d),Ds(h,d)}}function Hp(h,l){return new Promise(function(u,d){var g,b,k=new Promise(function(q,de){b=q,g=de});function R(){var q=new ReadableStream({type:"bytes",pull:function(de){Wp(F,de)},cancel:function(de){If(F)}},{highWaterMark:0});q.allReady=k,u(q)}function M(q){k.catch(function(){}),d(q)}var F=ia(h,Qi(l?l.identifierPrefix:void 0,l?l.nonce:void 0,l?l.bootstrapScriptContent:void 0,l?l.bootstrapScripts:void 0,l?l.bootstrapModules:void 0),Bn(l?l.namespaceURI:void 0),l?l.progressiveChunkSize:void 0,l?l.onError:void 0,b,R,M,g);if(l&&l.signal){var U=l.signal,H=function(){If(F,U.reason),U.removeEventListener("abort",H)};U.addEventListener("abort",H)}Of(F)})}Qf.renderToReadableStream=Hp,Qf.version=e}()),Qf}var nl,ly;process.env.NODE_ENV==="production"?(nl=Lz(),ly=Bz()):(nl=$z(),ly=zz());ul.version=nl.version;ul.renderToString=nl.renderToString;ul.renderToStaticMarkup=nl.renderToStaticMarkup;ul.renderToNodeStream=nl.renderToNodeStream;ul.renderToStaticNodeStream=nl.renderToStaticNodeStream;ul.renderToReadableStream=ly.renderToReadableStream;exports.A=dP;exports.AllSelection=Kn;exports.CellSelection=Ge;exports.DOMParser=ay;exports.DOMSerializer=il;exports.Decoration=$t;exports.DecorationSet=Qe;exports.EditorState=ba;exports.EditorView=KT;exports.Fragment=W;exports.Node=mr;exports.NodeRange=gu;exports.NodeSelection=he;exports.Plugin=ol;exports.PluginKey=ji;exports.ReplaceAroundStep=St;exports.ReplaceStep=bt;exports.Schema=$C;exports.Selection=me;exports.SelectionRange=gy;exports.Slice=ee;exports.TextSelection=ke;exports.Transform=py;exports.VisibilitySensor=gP;exports._=hP;exports.absolutePositionToRelativePosition=ZB;exports.addColumnAfter=q$;exports.addColumnBefore=Q$;exports.addRowAfter=iz;exports.addRowBefore=rz;exports.canJoin=Wa;exports.canSplit=dy;exports.clamp=SF;exports.clsx=Rx;exports.columnResizing=Tz;exports.createParagraphNear=yR;exports.cva=eP;exports.debounce=ck;exports.deepEqual=qD;exports.deleteColumn=tz;exports.deleteRow=sz;exports.deleteSelection=oR;exports.deleteTable=mz;exports.differenceBy=_2;exports.dropCursor=A$;exports.exitCode=mR;exports.find=v$;exports.findWrapping=fy;exports.fixTables=mC;exports.g=fP;exports.gapCursor=D$;exports.goToNextCell=gz;exports.history=R$;exports.i=SP;exports.isNumber=F2;exports.joinBackward=sR;exports.joinDown=hR;exports.joinForward=uR;exports.joinPoint=hy;exports.joinTextblockBackward=lR;exports.joinTextblockForward=aR;exports.joinUp=dR;exports.keymap=iR;exports.lift=pR;exports.liftEmptyBlock=vR;exports.liftListItem=RR;exports.liftTarget=Ua;exports.mergeCells=az;exports.newlineInCode=gR;exports.redo=fC;exports.registerCustomProtocol=m$;exports.reset=g$;exports.selectNodeBackward=cR;exports.selectNodeForward=fR;exports.selectParentNode=bR;exports.selectTextblockEnd=xR;exports.selectTextblockStart=wR;exports.server_browser=ul;exports.setBlockType=CR;exports.setCellAttr=fz;exports.sinkListItem=IR;exports.splitCell=cz;exports.tableEditing=Fz;exports.throttle=tL;exports.toggleHeader=Kh;exports.toggleHeaderCell=hz;exports.tokenize=lC;exports.truncate=oL;exports.twMerge=aA;exports.undo=uC;exports.wrapIn=kR;exports.wrapInList=ER;exports.ySyncPluginKey=XB;