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.
@@ -0,0 +1,420 @@
1
+ "use strict";var SP=Object.create;var mb=Object.defineProperty;var kP=Object.getOwnPropertyDescriptor;var _P=Object.getOwnPropertyNames;var EP=Object.getPrototypeOf,CP=Object.prototype.hasOwnProperty;var TP=(t,e,r)=>e in t?mb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var AP=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _P(e))!CP.call(t,i)&&i!==r&&mb(t,i,{get:()=>e[i],enumerable:!(n=kP(e,i))||n.enumerable});return t};var xk=(t,e,r)=>(r=t!=null?SP(EP(t)):{},AP(e||!t||!t.__esModule?mb(r,"default",{value:t,enumerable:!0}):r,t));var Tn=(t,e,r)=>TP(t,typeof e!="symbol"?e+"":e,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("react/jsx-runtime"),J=require("react"),He=require("lucide-react"),gd=require("tippy.js"),us=require("react-dom"),k1=require("katex"),_1=require("@radix-ui/react-slot"),RP=require("@radix-ui/react-tooltip"),Hp=require("@radix-ui/react-icons"),IP=require("@radix-ui/react-toggle"),OP=require("@radix-ui/react-popover"),MP=require("@radix-ui/react-label"),ER=require("re-resizable"),NP=require("@radix-ui/react-dialog"),rg=require("mermaid"),DP=require("@radix-ui/react-separator"),PP=require("react-tweet"),LP=require("react-colorful"),FP=require("@radix-ui/react-switch"),jP=require("@radix-ui/react-dropdown-menu"),BP=require("@radix-ui/react-tabs"),qf=require("shiki"),zP=require("@radix-ui/react-select"),HP=require("react-image-crop"),$P=require("@radix-ui/react-checkbox"),E1=require("scroll-into-view-if-needed");function bi(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const At=bi(J),Bh=bi(RP),CR=bi(IP),dh=bi(OP),TR=bi(MP),yi=bi(NP),AR=bi(DP),I0=bi(FP),tr=bi(jP),tc=bi(BP),cr=bi(zP),O0=bi($P);function Lr(t){this.content=t}Lr.prototype={constructor:Lr,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,r){var n=r&&r!=t?this.remove(r):this,i=n.find(t),o=n.content.slice();return i==-1?o.push(r||t,e):(o[i+1]=e,r&&(o[i]=r)),new Lr(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var r=this.content.slice();return r.splice(e,2),new Lr(r)},addToStart:function(t,e){return new Lr([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var r=this.remove(t).content.slice();return r.push(t,e),new Lr(r)},addBefore:function(t,e,r){var n=this.remove(e),i=n.content.slice(),o=n.find(t);return i.splice(o==-1?i.length:o,0,e,r),new Lr(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Lr.from(t),t.size?new Lr(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Lr.from(t),t.size?new Lr(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Lr.from(t);for(var r=0;r<t.content.length;r+=2)e=e.remove(t.content[r]);return e},toObject:function(){var t={};return this.forEach(function(e,r){t[e]=r}),t},get size(){return this.content.length>>1}};Lr.from=function(t){if(t instanceof Lr)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new Lr(e)};function RR(t,e,r){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;let i=t.child(n),o=e.child(n);if(i==o){r+=i.nodeSize;continue}if(!i.sameMarkup(o))return r;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)r++;return r}if(i.content.size||o.content.size){let s=RR(i.content,o.content,r+1);if(s!=null)return s}r+=i.nodeSize}}function IR(t,e,r,n){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:r,b:n};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){r-=l,n-=l;continue}if(!s.sameMarkup(a))return{a:r,b:n};if(s.isText&&s.text!=a.text){let c=0,d=Math.min(s.text.length,a.text.length);for(;c<d&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,r--,n--;return{a:r,b:n}}if(s.content.size||a.content.size){let c=IR(s.content,a.content,r-1,n-1);if(c)return c}r-=l,n-=l}}class Le{constructor(e,r){if(this.content=e,this.size=r||0,r==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,r,n,i=0,o){for(let s=0,a=0;a<r;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&n(l,i+a,o||null,s)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,r-d),n,i+d)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,r,n,i){let o="",s=!0;return this.nodesBetween(e,r,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,r-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&n&&(s?s=!1:o+=n),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let r=this.lastChild,n=e.firstChild,i=this.content.slice(),o=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new Le(i,this.size+e.size)}cut(e,r=this.size){if(e==0&&r==this.size)return this;let n=[],i=0;if(r>e)for(let o=0,s=0;s<r;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>r)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,r-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,r-s-1))),n.push(a),i+=a.nodeSize),s=l}return new Le(n,i)}cutByIndex(e,r){return e==r?Le.empty:e==0&&r==this.content.length?this:new Le(this.content.slice(e,r))}replaceChild(e,r){let n=this.content[e];if(n==r)return this;let i=this.content.slice(),o=this.size+r.nodeSize-n.nodeSize;return i[e]=r,new Le(i,o)}addToStart(e){return new Le([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Le(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let r=0;r<this.content.length;r++)if(!this.content[r].eq(e.content[r]))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 r=this.content[e];if(!r)throw new RangeError("Index "+e+" out of range for "+this);return r}maybeChild(e){return this.content[e]||null}forEach(e){for(let r=0,n=0;r<this.content.length;r++){let i=this.content[r];e(i,n,r),n+=i.nodeSize}}findDiffStart(e,r=0){return RR(this,e,r)}findDiffEnd(e,r=this.size,n=e.size){return IR(this,e,r,n)}findIndex(e,r=-1){if(e==0)return $p(0,e);if(e==this.size)return $p(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,i=0;;n++){let o=this.child(n),s=i+o.nodeSize;if(s>=e)return s==e||r>0?$p(n+1,s):$p(n,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,r){if(!r)return Le.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new Le(r.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Le.empty;let r,n=0;for(let i=0;i<e.length;i++){let o=e[i];n+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(r||(r=e.slice(0,i)),r[r.length-1]=o.withText(r[r.length-1].text+o.text)):r&&r.push(o)}return new Le(r||e,n)}static from(e){if(!e)return Le.empty;if(e instanceof Le)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Le([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Le.empty=new Le([],0);const gb={index:0,offset:0};function $p(t,e){return gb.index=t,gb.offset=e,gb}function ng(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!ng(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!ng(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}let $t=class M0{constructor(e,r){this.type=e,this.attrs=r}addToSet(e){let r,n=!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))r||(r=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(r||(r=e.slice(0,i)),r.push(this),n=!0),r&&r.push(o)}}return r||(r=e.slice()),n||r.push(this),r}removeFromSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return e.slice(0,r).concat(e.slice(r+1));return e}isInSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ng(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[r.type];if(!n)throw new RangeError(`There is no mark type ${r.type} in this schema`);let i=n.create(r.attrs);return n.checkAttrs(i.attrs),i}static sameSet(e,r){if(e==r)return!0;if(e.length!=r.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(r[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return M0.none;if(e instanceof M0)return[e];let r=e.slice();return r.sort((n,i)=>n.type.rank-i.type.rank),r}};$t.none=[];class ig extends Error{}class qe{constructor(e,r,n){this.content=e,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,r){let n=MR(this.content,e+this.openStart,r);return n&&new qe(n,this.openStart,this.openEnd)}removeBetween(e,r){return new qe(OR(this.content,e+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,r){if(!r)return qe.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new qe(Le.fromJSON(e,r.content),n,i)}static maxOpen(e,r=!0){let n=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(r||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=e.lastChild;o&&!o.isLeaf&&(r||!o.type.spec.isolating);o=o.lastChild)i++;return new qe(e,n,i)}}qe.empty=new qe(Le.empty,0,0);function OR(t,e,r){let{index:n,offset:i}=t.findIndex(e),o=t.maybeChild(n),{index:s,offset:a}=t.findIndex(r);if(i==e||o.isText){if(a!=r&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(n!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(n,o.copy(OR(o.content,e-i-1,r-i-1)))}function MR(t,e,r,n){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return t.cut(0,e).append(r).append(t.cut(e));let a=MR(s.content,e-o-1,r);return a&&t.replaceChild(i,s.copy(a))}function UP(t,e,r){if(r.openStart>t.depth)throw new ig("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new ig("Inconsistent open depths");return NR(t,e,r,0)}function NR(t,e,r,n){let i=t.index(n),o=t.node(n);if(i==e.index(n)&&n<t.depth-r.openStart){let s=NR(t,e,r,n+1);return o.copy(o.content.replaceChild(i,s))}else if(r.content.size)if(!r.openStart&&!r.openEnd&&t.depth==n&&e.depth==n){let s=t.parent,a=s.content;return Ll(s,a.cut(0,t.parentOffset).append(r.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=WP(r,t);return Ll(o,PR(t,s,a,e,n))}else return Ll(o,og(t,e,n))}function DR(t,e){if(!e.type.compatibleContent(t.type))throw new ig("Cannot join "+e.type.name+" onto "+t.type.name)}function N0(t,e,r){let n=t.node(r);return DR(n,e.node(r)),n}function Pl(t,e){let r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function Xf(t,e,r,n){let i=(e||t).node(r),o=0,s=e?e.index(r):i.childCount;t&&(o=t.index(r),t.depth>r?o++:t.textOffset&&(Pl(t.nodeAfter,n),o++));for(let a=o;a<s;a++)Pl(i.child(a),n);e&&e.depth==r&&e.textOffset&&Pl(e.nodeBefore,n)}function Ll(t,e){return t.type.checkContent(e),t.copy(e)}function PR(t,e,r,n,i){let o=t.depth>i&&N0(t,e,i+1),s=n.depth>i&&N0(r,n,i+1),a=[];return Xf(null,t,i,a),o&&s&&e.index(i)==r.index(i)?(DR(o,s),Pl(Ll(o,PR(t,e,r,n,i+1)),a)):(o&&Pl(Ll(o,og(t,e,i+1)),a),Xf(e,r,i,a),s&&Pl(Ll(s,og(r,n,i+1)),a)),Xf(n,null,i,a),new Le(a)}function og(t,e,r){let n=[];if(Xf(null,t,r,n),t.depth>r){let i=N0(t,e,r+1);Pl(Ll(i,og(t,e,r+1)),n)}return Xf(e,null,r,n),new Le(n)}function WP(t,e){let r=e.depth-t.openStart,i=e.node(r).copy(t.content);for(let o=r-1;o>=0;o--)i=e.node(o).copy(Le.from(i));return{start:i.resolveNoCache(t.openStart+r),end:i.resolveNoCache(i.content.size-t.openEnd-r)}}class fh{constructor(e,r,n){this.pos=e,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,r=this.index(this.depth);if(r==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(r);return n?e.child(r).cut(n):i}get nodeBefore(){let e=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(e).cut(0,r):e==0?null:this.parent.child(e-1)}posAtIndex(e,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let o=0;o<e;o++)i+=n.child(o).nodeSize;return i}marks(){let e=this.parent,r=this.index();if(e.content.size==0)return $t.none;if(this.textOffset)return e.child(r).marks;let n=e.maybeChild(r-1),i=e.maybeChild(r);if(!n){let a=n;n=i,i=a}let o=n.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 r=this.parent.maybeChild(this.index());if(!r||!r.isInline)return null;let n=r.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)n[o].type.spec.inclusive===!1&&(!i||!n[o].isInSet(i.marks))&&(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let r=this.depth;r>0;r--)if(this.start(r)<=e&&this.end(r)>=e)return r;return 0}blockRange(e=this,r){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!r||r(this.node(n))))return new hh(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let r=1;r<=this.depth;r++)e+=(e?"/":"")+this.node(r).type.name+"_"+this.index(r-1);return e+":"+this.parentOffset}static resolve(e,r){if(!(r>=0&&r<=e.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,o=r;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(n.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new fh(r,n,o)}static resolveCached(e,r){let n=Sk.get(e);if(n)for(let o=0;o<n.elts.length;o++){let s=n.elts[o];if(s.pos==r)return s}else Sk.set(e,n=new VP);let i=n.elts[n.i]=fh.resolve(e,r);return n.i=(n.i+1)%GP,i}}class VP{constructor(){this.elts=[],this.i=0}}const GP=12,Sk=new WeakMap;class hh{constructor(e,r,n){this.$from=e,this.$to=r,this.depth=n}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 KP=Object.create(null);let as=class D0{constructor(e,r,n,i=$t.none){this.type=e,this.attrs=r,this.marks=i,this.content=n||Le.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,r,n,i=0){this.content.nodesBetween(e,r,n,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,r,n,i){return this.content.textBetween(e,r,n,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,r,n){return this.type==e&&ng(this.attrs,r||e.defaultAttrs||KP)&&$t.sameSet(this.marks,n||$t.none)}copy(e=null){return e==this.content?this:new D0(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new D0(this.type,this.attrs,this.content,e)}cut(e,r=this.content.size){return e==0&&r==this.content.size?this:this.copy(this.content.cut(e,r))}slice(e,r=this.content.size,n=!1){if(e==r)return qe.empty;let i=this.resolve(e),o=this.resolve(r),s=n?0:i.sharedDepth(r),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new qe(c,i.depth-s,o.depth-s)}replace(e,r,n){return UP(this.resolve(e),this.resolve(r),n)}nodeAt(e){for(let r=this;;){let{index:n,offset:i}=r.content.findIndex(e);if(r=r.maybeChild(n),!r)return null;if(i==e||r.isText)return r;e-=i+1}}childAfter(e){let{index:r,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(r),index:r,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:r,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(r),index:r,offset:n};let i=this.content.child(r-1);return{node:i,index:r-1,offset:n-i.nodeSize}}resolve(e){return fh.resolveCached(this,e)}resolveNoCache(e){return fh.resolve(this,e)}rangeHasMark(e,r,n){let i=!1;return r>e&&this.nodesBetween(e,r,o=>(n.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()+")"),LR(this.marks,e)}contentMatchAt(e){let r=this.type.contentMatch.matchFragment(this.content,0,e);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(e,r,n=Le.empty,i=0,o=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,i,o),a=s&&s.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,r,n,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(n),s=o&&o.matchFragment(this.content,r);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=$t.none;for(let r=0;r<this.marks.length;r++){let n=this.marks[r];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!$t.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(r=>r.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(r=>r.toJSON())),e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(e.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(r.text,n)}let i=Le.fromJSON(e,r.content),o=e.nodeType(r.type).create(r.attrs,i,n);return o.type.checkAttrs(o.attrs),o}};as.prototype.text=void 0;class sg extends as{constructor(e,r,n,i){if(super(e,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):LR(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,r){return this.text.slice(e,r)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new sg(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new sg(this.type,this.attrs,e,this.marks)}cut(e=0,r=this.text.length){return e==0&&r==this.text.length?this:this.withText(this.text.slice(e,r))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function LR(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class Ul{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,r){let n=new qP(e,r);if(n.next==null)return Ul.empty;let i=FR(n);n.next&&n.err("Unexpected trailing text");let o=t2(e2(i));return r2(o,n),o}matchType(e){for(let r=0;r<this.next.length;r++)if(this.next[r].type==e)return this.next[r].next;return null}matchFragment(e,r=0,n=e.childCount){let i=this;for(let o=r;i&&o<n;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:r}=this.next[e];if(!(r.isText||r.hasRequiredAttrs()))return r}return null}compatible(e){for(let r=0;r<this.next.length;r++)for(let n=0;n<e.next.length;n++)if(this.next[r].type==e.next[n].type)return!0;return!1}fillBefore(e,r=!1,n=0){let i=[this];function o(s,a){let l=s.matchFragment(e,n);if(l&&(!r||l.validEnd))return Le.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:d,next:f}=s.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let p=o(f,a.concat(d));if(p)return p}}return null}return o(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let r=this.computeWrapping(e);return this.wrapCache.push(e,r),r}computeWrapping(e){let r=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.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:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in r)&&(!i.type||l.validEnd)&&(n.push({match:a.contentMatch,type:a,via:i}),r[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 r(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&r(n.next[i].next)}return r(this),e.map((n,i)=>{let o=i+(n.validEnd?"*":" ")+" ";for(let s=0;s<n.next.length;s++)o+=(s?", ":"")+n.next[s].type.name+"->"+e.indexOf(n.next[s].next);return o}).join(`
2
+ `)}}Ul.empty=new Ul(!0);class qP{constructor(e,r){this.string=e,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function FR(t){let e=[];do e.push(XP(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function XP(t){let e=[];do e.push(YP(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function YP(t){let e=QP(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=JP(t,e);else break;return e}function kk(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function JP(t,e){let r=kk(t),n=r;return t.eat(",")&&(t.next!="}"?n=kk(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function ZP(t,e){let r=t.nodeTypes,n=r[e];if(n)return[n];let i=[];for(let o in r){let s=r[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function QP(t){if(t.eat("(")){let e=FR(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=ZP(t,t.next).map(r=>(t.inline==null?t.inline=r.isInline:t.inline!=r.isInline&&t.err("Mixing inline and block content"),{type:"name",value:r}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function e2(t){let e=[[]];return i(o(t,0),r()),e;function r(){return e.push([])-1}function n(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=r())}else if(s.type=="star"){let l=r();return n(a,l),i(o(s.expr,l),l),[n(l)]}else if(s.type=="plus"){let l=r();return i(o(s.expr,a),l),i(o(s.expr,l),l),[n(l)]}else{if(s.type=="opt")return[n(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let d=r();i(o(s.expr,l),d),l=d}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let d=r();n(l,d),i(o(s.expr,l),d),l=d}return[n(l)]}else{if(s.type=="name")return[n(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function jR(t,e){return e-t}function _k(t,e){let r=[];return n(e),r.sort(jR);function n(i){let o=t[i];if(o.length==1&&!o[0].term)return n(o[0].to);r.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&r.indexOf(l)==-1&&n(l)}}}function t2(t){let e=Object.create(null);return r(_k(t,0));function r(n){let i=[];n.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let d=0;d<i.length;d++)i[d][0]==a&&(c=i[d][1]);_k(t,l).forEach(d=>{c||i.push([a,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let o=e[n.join(",")]=new Ul(n.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(jR);o.next.push({type:i[s][0],next:e[a.join(",")]||r(a)})}return o}}function r2(t,e){for(let r=0,n=[t];r<n.length;r++){let i=n[r],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),n.indexOf(c)==-1&&n.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function BR(t){let e=Object.create(null);for(let r in t){let n=t[r];if(!n.hasDefault)return null;e[r]=n.default}return e}function zR(t,e){let r=Object.create(null);for(let n in t){let i=e&&e[n];if(i===void 0){let o=t[n];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+n)}r[n]=i}return r}function HR(t,e,r,n){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${r} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function $R(t,e){let r=Object.create(null);if(e)for(let n in e)r[n]=new i2(t,n,e[n]);return r}let Ek=class UR{constructor(e,r,n){this.name=e,this.schema=r,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=$R(e,n.attrs),this.defaultAttrs=BR(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ul.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:zR(this.attrs,e)}create(e=null,r,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new as(this,this.computeAttrs(e),Le.from(r),$t.setFrom(n))}createChecked(e=null,r,n){return r=Le.from(r),this.checkContent(r),new as(this,this.computeAttrs(e),r,$t.setFrom(n))}createAndFill(e=null,r,n){if(e=this.computeAttrs(e),r=Le.from(r),r.size){let s=this.contentMatch.fillBefore(r);if(!s)return null;r=s.append(r)}let i=this.contentMatch.matchFragment(r),o=i&&i.fillBefore(Le.empty,!0);return o?new as(this,e,r.append(o),$t.setFrom(n)):null}validContent(e){let r=this.contentMatch.matchFragment(e);if(!r||!r.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).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){HR(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 r=0;r<e.length;r++)if(!this.allowsMarkType(e[r].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let r;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?r&&r.push(e[n]):r||(r=e.slice(0,n));return r?r.length?r:$t.none:e}static compile(e,r){let n=Object.create(null);e.forEach((o,s)=>n[o]=new UR(o,r,s));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function n2(t,e,r){let n=r.split("|");return i=>{let o=i===null?"null":typeof i;if(n.indexOf(o)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${t}, got ${o}`)}}class i2{constructor(e,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?n2(e,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Ey{constructor(e,r,n,i){this.name=e,this.rank=r,this.schema=n,this.spec=i,this.attrs=$R(e,i.attrs),this.excluded=null;let o=BR(this.attrs);this.instance=o?new $t(this,o):null}create(e=null){return!e&&this.instance?this.instance:new $t(this,zR(this.attrs,e))}static compile(e,r){let n=Object.create(null),i=0;return e.forEach((o,s)=>n[o]=new Ey(o,i++,r,s)),n}removeFromSet(e){for(var r=0;r<e.length;r++)e[r].type==this&&(e=e.slice(0,r).concat(e.slice(r+1)),r--);return e}isInSet(e){for(let r=0;r<e.length;r++)if(e[r].type==this)return e[r]}checkAttrs(e){HR(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class WR{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let i in e)r[i]=e[i];r.nodes=Lr.from(e.nodes),r.marks=Lr.from(e.marks||{}),this.nodes=Ek.compile(this.spec.nodes,this),this.marks=Ey.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=n[s]||(n[s]=Ul.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?Ck(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==""?[]:Ck(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,r=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Ek){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(r,n,i)}text(e,r){let n=this.nodes.text;return new sg(n,n.defaultAttrs,e,$t.setFrom(r))}mark(e,r){return typeof e=="string"&&(e=this.marks[e]),e.create(r)}nodeFromJSON(e){return as.fromJSON(this,e)}markFromJSON(e){return $t.fromJSON(this,e)}nodeType(e){let r=this.nodes[e];if(!r)throw new RangeError("Unknown node type: "+e);return r}}function Ck(t,e){let r=[];for(let n=0;n<e.length;n++){let i=e[n],o=t.marks[i],s=o;if(o)r.push(o);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&r.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return r}function o2(t){return t.tag!=null}function s2(t){return t.style!=null}let Yf=class P0{constructor(e,r){this.schema=e,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(i=>{if(o2(i))this.tags.push(i);else if(s2(i)){let o=/[^=]*/.exec(i.style)[0];n.indexOf(o)<0&&n.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,r={}){let n=new Ak(this,r,!1);return n.addAll(e,$t.none,r.from,r.to),n.finish()}parseSlice(e,r={}){let n=new Ak(this,r,!0);return n.addAll(e,$t.none,r.from,r.to),qe.maxOpen(n.finish())}matchTag(e,r,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(c2(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||r.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,r,n,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&&!n.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=r))){if(s.getAttrs){let l=s.getAttrs(r);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let r=[];function n(i){let o=i.priority==null?50:i.priority,s=0;for(;s<r.length;s++){let a=r[s];if((a.priority==null?50:a.priority)<o)break}r.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{n(s=Rk(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=>{n(s=Rk(s)),s.node||s.ignore||s.mark||(s.node=i)})}return r}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new P0(e,P0.schemaRules(e)))}};const VR={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},a2={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},GR={ol:!0,ul:!0},ph=1,L0=2,Jf=4;function Tk(t,e,r){return e!=null?(e?ph:0)|(e==="full"?L0:0):t&&t.whitespace=="pre"?ph|L0:r&~Jf}class Up{constructor(e,r,n,i,o,s){this.type=e,this.attrs=r,this.marks=n,this.solid=i,this.options=s,this.content=[],this.activeMarks=$t.none,this.match=o||(s&Jf?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(Le.from(e));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ph)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let o=n;n.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 r=Le.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(Le.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!VR.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ak{constructor(e,r,n){this.parser=e,this.options=r,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=r.topNode,o,s=Tk(null,r.preserveWhitespace,0)|(n?Jf:0);i?o=new Up(i.type,i.attrs,$t.none,!0,r.topMatch||i.type.contentMatch,s):n?o=new Up(null,null,$t.none,!0,null,s):o=new Up(e.schema.topNodeType,null,$t.none,!0,null,s),this.nodes=[o],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,r){e.nodeType==3?this.addTextNode(e,r):e.nodeType==1&&this.addElement(e,r)}addTextNode(e,r){let n=e.nodeValue,i=this.top,o=i.options&L0?"full":this.localPreserveWS||(i.options&ph)>0;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(o)o!=="full"?n=n.replace(/\r?\n|\r/g," "):n=n.replace(/\r\n?/g,`
3
+ `);else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&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))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),r),this.findInText(e)}else this.findInside(e)}addElement(e,r,n){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;GR.hasOwnProperty(s)&&this.parser.normalizeLists&&l2(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,n));e:if(l?l.ignore:a2.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,r);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,d=this.needsBlock;if(VR.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,r);break e}let f=l&&l.skip?r:this.readStyles(e,r);f&&this.addAll(e,f),c&&this.sync(o),this.needsBlock=d}else{let c=this.readStyles(e,r);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,r){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
+ `),r)}ignoreFallback(e,r){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),r)}readStyles(e,r){let n=e.style;if(n&&n.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=n.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?r=r.filter(c=>!l.clearMark(c)):r=r.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return r}addElementByRule(e,r,n,i){let o,s;if(r.node)if(s=this.parser.schema.nodes[r.node],s.isLeaf)this.insertNode(s.create(r.attrs),n)||this.leafFallback(e,n);else{let l=this.enter(s,r.attrs||null,n,r.preserveWhitespace);l&&(o=!0,n=l)}else{let l=this.parser.schema.marks[r.mark];n=n.concat(l.create(r.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(r.getContent)this.findInside(e),r.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n));else{let l=e;typeof r.contentElement=="string"?l=e.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(e):r.contentElement&&(l=r.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,r,n,i){let o=n||0;for(let s=n?e.childNodes[n]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,r);this.findAtPoint(e,o)}findPlace(e,r){let n,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],a=s.findWrapping(e);if(a&&(!n||n.length>a.length)&&(n=a,i=s,!a.length)||s.solid)break}if(!n)return null;this.sync(i);for(let o=0;o<n.length;o++)r=this.enterInner(n[o],null,r,!1);return r}insertNode(e,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(r=this.enterInner(i,null,r))}let n=this.findPlace(e,r);if(n){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=$t.none;for(let s of n.concat(e.marks))(i.type?i.type.allowsMarkType(s.type):Ik(s.type,e.type))&&(o=s.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,r,n,i){let o=this.findPlace(e.create(r),n);return o&&(o=this.enterInner(e,r,n,!0,i)),o}enterInner(e,r,n,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=Tk(e,o,s.options);s.options&Jf&&s.content.length==0&&(a|=Jf);let l=$t.none;return n=n.filter(c=>(s.type?s.type.allowsMarkType(c.type):Ik(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Up(e,r,l,i,null,a)),this.open++,n}closeExtra(e=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let r=this.open;r>=0;r--){if(this.nodes[r]==e)return this.open=r,!0;this.localPreserveWS&&(this.nodes[r].options|=ph)}return!1}get currentPos(){this.closeExtra();let e=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;r&&e++}return e}findAtPoint(e,r){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==r&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&(this.find[r].pos=this.currentPos)}findAround(e,r,n){if(e!=r&&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)&&r.compareDocumentPosition(this.find[i].node)&(n?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&(this.find[r].pos=this.currentPos-(e.nodeValue.length-this.find[r].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let r=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),o=-(n?n.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=r[a];if(c==""){if(a==r.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:n&&l>=o?n.node(l-o).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return s(r.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let r=e.depth;r>=0;r--){let n=e.node(r).contentMatchAt(e.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function l2(t){for(let e=t.firstChild,r=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&GR.hasOwnProperty(n)&&r?(r.appendChild(e),e=r):n=="li"?r=e:n&&(r=null)}}function c2(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Rk(t){let e={};for(let r in t)e[r]=t[r];return e}function Ik(t,e){let r=e.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:d}=a.edge(l);if(c==e||o.indexOf(d)<0&&s(d))return!0}};if(s(i.contentMatch))return!0}}class rc{constructor(e,r){this.nodes=e,this.marks=r}serializeFragment(e,r={},n){n||(n=yb(r).createDocumentFragment());let i=n,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],d=this.serializeMark(c,s.isInline,r);d&&(o.push([c,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(s,r))}),n}serializeNodeInner(e,r){let{dom:n,contentDOM:i}=Om(yb(r),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,r,i)}return n}serializeNode(e,r={}){let n=this.serializeNodeInner(e,r);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,r);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,r,n={}){let i=this.marks[e.type.name];return i&&Om(yb(n),i(e,r),null,e.attrs)}static renderSpec(e,r,n=null,i){return Om(e,r,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new rc(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let r=Ok(e.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(e){return Ok(e.marks)}}function Ok(t){let e={};for(let r in t){let n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function yb(t){return t.document||window.document}const Mk=new WeakMap;function u2(t){let e=Mk.get(t);return e===void 0&&Mk.set(t,e=d2(t)),e}function d2(t){let e=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i<n.length;i++)r(n[i]);else for(let i in n)r(n[i])}return r(t),e}function Om(t,e,r,n){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(o=u2(n))&&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&&(r=i.slice(0,s),i=i.slice(s+1));let a,l=r?t.createElementNS(r,i):t.createElement(i),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let p=f.indexOf(" ");p>0?l.setAttributeNS(f.slice(0,p),f.slice(p+1),c[f]):l.setAttribute(f,c[f])}}for(let f=d;f<e.length;f++){let p=e[f];if(p===0){if(f<e.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:g}=Om(t,p,r,n);if(l.appendChild(m),g){if(a)throw new RangeError("Multiple content holes");a=g}}}return{dom:l,contentDOM:a}}const KR=65535,qR=Math.pow(2,16);function f2(t,e){return t+e*qR}function Nk(t){return t&KR}function h2(t){return(t-(t&KR))/qR}const XR=1,YR=2,Mm=4,JR=8;class F0{constructor(e,r,n){this.pos=e,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&JR)>0}get deletedBefore(){return(this.delInfo&(XR|Mm))>0}get deletedAfter(){return(this.delInfo&(YR|Mm))>0}get deletedAcross(){return(this.delInfo&Mm)>0}}class Un{constructor(e,r=!1){if(this.ranges=e,this.inverted=r,!e.length&&Un.empty)return Un.empty}recover(e){let r=0,n=Nk(e);if(!this.inverted)for(let i=0;i<n;i++)r+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[n*3]+r+h2(e)}mapResult(e,r=1){return this._map(e,r,!1)}map(e,r=1){return this._map(e,r,!0)}_map(e,r,n){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],d=this.ranges[a+s],f=l+c;if(e<=f){let p=c?e==l?-1:e==f?1:r:r,m=l+i+(p<0?0:d);if(n)return m;let g=e==(r<0?l:f)?null:f2(a/3,e-l),b=e==l?YR:e==f?XR:Mm;return(r<0?e!=l:e!=f)&&(b|=JR),new F0(m,b,g)}i+=d-c}return n?e+i:new F0(e+i,0,null)}touches(e,r){let n=0,i=Nk(r),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?n:0);if(l>e)break;let c=this.ranges[a+o],d=l+c;if(e<=d&&a==i*3)return!0;n+=this.ranges[a+s]-c}return!1}forEach(e){let r=this.inverted?2:1,n=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),l=s+(this.inverted?0:o),c=this.ranges[i+r],d=this.ranges[i+n];e(a,a+c,l,l+d),o+=d-c}}invert(){return new Un(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Un.empty:new Un(e<0?[0,-e,0]:[0,0,e])}}Un.empty=new Un([]);class Nu{constructor(e=[],r,n=0,i=e.length){this.maps=e,this.mirror=r,this.from=n,this.to=i}slice(e=0,r=this.maps.length){return new Nu(this.maps,this.mirror,e,r)}copy(){return new Nu(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,r){this.to=this.maps.push(e),r!=null&&this.setMirror(this.maps.length-1,r)}appendMapping(e){for(let r=0,n=this.maps.length;r<e.maps.length;r++){let i=e.getMirror(r);this.appendMap(e.maps[r],i!=null&&i<r?n+i:void 0)}}getMirror(e){if(this.mirror){for(let r=0;r<this.mirror.length;r++)if(this.mirror[r]==e)return this.mirror[r+(r%2?-1:1)]}}setMirror(e,r){this.mirror||(this.mirror=[]),this.mirror.push(e,r)}appendMappingInverted(e){for(let r=e.maps.length-1,n=this.maps.length+e.maps.length;r>=0;r--){let i=e.getMirror(r);this.appendMap(e.maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let e=new Nu;return e.appendMappingInverted(this),e}map(e,r=1){if(this.mirror)return this._map(e,r,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,r);return e}mapResult(e,r=1){return this._map(e,r,!1)}_map(e,r,n){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],a=s.mapResult(e,r);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this.maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return n?e:new F0(e,i,null)}}const vb=Object.create(null);class Qr{getMap(){return Un.empty}merge(e){return null}static fromJSON(e,r){if(!r||!r.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=vb[r.stepType];if(!n)throw new RangeError(`No step type ${r.stepType} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in vb)throw new RangeError("Duplicate use of step JSON ID "+e);return vb[e]=r,r.prototype.jsonID=e,r}}class fr{constructor(e,r){this.doc=e,this.failed=r}static ok(e){return new fr(e,null)}static fail(e){return new fr(null,e)}static fromReplace(e,r,n,i){try{return fr.ok(e.replace(r,n,i))}catch(o){if(o instanceof ig)return fr.fail(o.message);throw o}}}function C1(t,e,r){let n=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(C1(o.content,e,o))),o.isInline&&(o=e(o,r,i)),n.push(o)}return Le.fromArray(n)}class ua extends Qr{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new qe(C1(r.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),r.openStart,r.openEnd);return fr.fromReplace(e,this.from,this.to,o)}invert(){return new po(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new ua(r.pos,n.pos,this.mark)}merge(e){return e instanceof ua&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ua(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ua(r.from,r.to,e.markFromJSON(r.mark))}}Qr.jsonID("addMark",ua);class po extends Qr{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=new qe(C1(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),r.openStart,r.openEnd);return fr.fromReplace(e,this.from,this.to,n)}invert(){return new ua(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new po(r.pos,n.pos,this.mark)}merge(e){return e instanceof po&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new po(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new po(r.from,r.to,e.markFromJSON(r.mark))}}Qr.jsonID("removeMark",po);class da extends Qr{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return fr.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return fr.fromReplace(e,this.pos,this.pos+1,new qe(Le.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;i<r.marks.length;i++)if(!r.marks[i].isInSet(n))return new da(this.pos,r.marks[i]);return new da(this.pos,this.mark)}}return new Ku(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new da(r.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new da(r.pos,e.markFromJSON(r.mark))}}Qr.jsonID("addNodeMark",da);class Ku extends Qr{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return fr.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.removeFromSet(r.marks));return fr.fromReplace(e,this.pos,this.pos+1,new qe(Le.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);return!r||!this.mark.isInSet(r.marks)?this:new da(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new Ku(r.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ku(r.pos,e.markFromJSON(r.mark))}}Qr.jsonID("removeNodeMark",Ku);class kr extends Qr{constructor(e,r,n,i=!1){super(),this.from=e,this.to=r,this.slice=n,this.structure=i}apply(e){return this.structure&&j0(e,this.from,this.to)?fr.fail("Structure replace would overwrite content"):fr.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Un([this.from,this.to-this.from,this.slice.size])}invert(e){return new kr(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deletedAcross&&n.deletedAcross?null:new kr(r.pos,Math.max(r.pos,n.pos),this.slice)}merge(e){if(!(e instanceof kr)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let r=this.slice.size+e.slice.size==0?qe.empty:new qe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new kr(this.from,this.to+(e.to-e.from),r,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let r=this.slice.size+e.slice.size==0?qe.empty:new qe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new kr(e.from,this.to,r,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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new kr(r.from,r.to,qe.fromJSON(e,r.slice),!!r.structure)}}Qr.jsonID("replace",kr);class _r extends Qr{constructor(e,r,n,i,o,s,a=!1){super(),this.from=e,this.to=r,this.gapFrom=n,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(j0(e,this.from,this.gapFrom)||j0(e,this.gapTo,this.to)))return fr.fail("Structure gap-replace would overwrite content");let r=e.slice(this.gapFrom,this.gapTo);if(r.openStart||r.openEnd)return fr.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,r.content);return n?fr.fromReplace(e,this.from,this.to,n):fr.fail("Content does not fit in gap")}getMap(){return new Un([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let r=this.gapTo-this.gapFrom;return new _r(this.from,this.from+this.slice.size+r,this.from+this.insert,this.from+this.insert+r,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?r.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return r.deletedAcross&&n.deletedAcross||i<r.pos||o>n.pos?null:new _r(r.pos,n.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,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new _r(r.from,r.to,r.gapFrom,r.gapTo,qe.fromJSON(e,r.slice),r.insert,!!r.structure)}}Qr.jsonID("replaceAround",_r);function j0(t,e,r){let n=t.resolve(e),i=r-e,o=n.depth;for(;i>0&&o>0&&n.indexAfter(o)==n.node(o).childCount;)o--,i--;if(i>0){let s=n.node(o).maybeChild(n.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function p2(t,e,r,n){let i=[],o=[],s,a;t.doc.nodesBetween(e,r,(l,c,d)=>{if(!l.isInline)return;let f=l.marks;if(!n.isInSet(f)&&d.type.allowsMarkType(n.type)){let p=Math.max(c,e),m=Math.min(c+l.nodeSize,r),g=n.addToSet(f);for(let b=0;b<f.length;b++)f[b].isInSet(g)||(s&&s.to==p&&s.mark.eq(f[b])?s.to=m:i.push(s=new po(p,m,f[b])));a&&a.to==p?a.to=m:o.push(a=new ua(p,m,n))}}),i.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function m2(t,e,r,n){let i=[],o=0;t.doc.nodesBetween(e,r,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(n instanceof Ey){let c=s.marks,d;for(;d=n.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else n?n.isInSet(s.marks)&&(l=[n]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,r);for(let d=0;d<l.length;d++){let f=l[d],p;for(let m=0;m<i.length;m++){let g=i[m];g.step==o-1&&f.eq(i[m].style)&&(p=g)}p?(p.to=c,p.step=o):i.push({style:f,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(s=>t.step(new po(s.from,s.to,s.style)))}function T1(t,e,r,n=r.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),d=a+c.nodeSize,f=n.matchType(c.type);if(!f)s.push(new kr(a,d,qe.empty));else{n=f;for(let p=0;p<c.marks.length;p++)r.allowsMarkType(c.marks[p].type)||t.step(new po(a,d,c.marks[p]));if(i&&c.isText&&r.whitespace!="pre"){let p,m=/\r?\n|\r/g,g;for(;p=m.exec(c.text);)g||(g=new qe(Le.from(r.schema.text(" ",r.allowedMarks(c.marks))),0,0)),s.push(new kr(a+p.index,a+p.index+p[0].length,g))}}a=d}if(!n.validEnd){let l=n.fillBefore(Le.empty,!0);t.replace(a,a,new qe(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function g2(t,e,r){return(e==0||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function yd(t){let r=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let i=t.$from.node(n),o=t.$from.index(n),s=t.$to.indexAfter(n);if(n<t.depth&&i.canReplace(o,s,r))return n;if(n==0||i.type.spec.isolating||!g2(i,o,s))break}return null}function y2(t,e,r){let{$from:n,$to:i,depth:o}=e,s=n.before(o+1),a=i.after(o+1),l=s,c=a,d=Le.empty,f=0;for(let g=o,b=!1;g>r;g--)b||n.index(g)>0?(b=!0,d=Le.from(n.node(g).copy(d)),f++):l--;let p=Le.empty,m=0;for(let g=o,b=!1;g>r;g--)b||i.after(g+1)<i.end(g)?(b=!0,p=Le.from(i.node(g).copy(p)),m++):c++;t.step(new _r(l,c,s,a,new qe(d.append(p),f,m),d.size-f,!0))}function A1(t,e,r=null,n=t){let i=v2(t,e),o=i&&b2(n,e);return o?i.map(Dk).concat({type:e,attrs:r}).concat(o.map(Dk)):null}function Dk(t){return{type:t,attrs:null}}function v2(t,e){let{parent:r,startIndex:n,endIndex:i}=t,o=r.contentMatchAt(n).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return r.canReplaceWith(n,i,s)?o:null}function b2(t,e){let{parent:r,startIndex:n,endIndex:i}=t,o=r.child(n),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=n;l&&c<i;c++)l=l.matchType(r.child(c).type);return!l||!l.validEnd?null:s}function w2(t,e,r){let n=Le.empty;for(let s=r.length-1;s>=0;s--){if(n.size){let a=r[s].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=Le.from(r[s].type.create(r[s].attrs,n))}let i=e.start,o=e.end;t.step(new _r(i,o,i,o,new qe(n,0,0),r.length,!0))}function x2(t,e,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,r,(s,a)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(n,l)&&S2(t.doc,t.mapping.slice(o).map(a),n)){let c=null;if(n.schema.linebreakReplacement){let m=n.whitespace=="pre",g=!!n.contentMatch.matchType(n.schema.linebreakReplacement);m&&!g?c=!1:!m&&g&&(c=!0)}c===!1&&QR(t,s,a,o),T1(t,t.mapping.slice(o).map(a,1),n,void 0,c===null);let d=t.mapping.slice(o),f=d.map(a,1),p=d.map(a+s.nodeSize,1);return t.step(new _r(f,p,f+1,p-1,new qe(Le.from(n.create(l,null,s.marks)),0,0),1,!0)),c===!0&&ZR(t,s,a,o),!1}})}function ZR(t,e,r,n){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=t.mapping.slice(n).map(r+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function QR(t,e,r,n){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(n).map(r+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
5
+ `))}})}function S2(t,e,r){let n=t.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}function k2(t,e,r,n,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");r||(r=o.type);let s=r.create(n,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,s);if(!r.validContent(o.content))throw new RangeError("Invalid content for node type "+r.name);t.step(new _r(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new qe(Le.from(s),0,0),1,!0))}function Du(t,e,r=1,n){let i=t.resolve(e),o=i.depth-r,s=n&&n[n.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 c=i.depth-1,d=r-2;c>o;c--,d--){let f=i.node(c),p=i.index(c);if(f.type.spec.isolating)return!1;let m=f.content.cutByIndex(p,f.childCount),g=n&&n[d+1];g&&(m=m.replaceChild(0,g.type.create(g.attrs)));let b=n&&n[d]||f;if(!f.canReplace(p+1,f.childCount)||!b.type.validContent(m))return!1}let a=i.indexAfter(o),l=n&&n[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function _2(t,e,r=1,n){let i=t.doc.resolve(e),o=Le.empty,s=Le.empty;for(let a=i.depth,l=i.depth-r,c=r-1;a>l;a--,c--){o=Le.from(i.node(a).copy(o));let d=n&&n[c];s=Le.from(d?d.type.create(d.attrs,s):i.node(a).copy(s))}t.step(new kr(e,e,new qe(o.append(s),r,r),!0))}function Ea(t,e){let r=t.resolve(e),n=r.index();return eI(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function E2(t,e){e.content.size||t.type.compatibleContent(e.type);let r=t.contentMatchAt(t.childCount),{linebreakReplacement:n}=t.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),s=o.type==n?t.type.schema.nodes.text:o.type;if(r=r.matchType(s),!r||!t.type.allowsMarks(o.marks))return!1}return r.validEnd}function eI(t,e){return!!(t&&e&&!t.isLeaf&&E2(t,e))}function Cy(t,e,r=-1){let n=t.resolve(e);for(let i=n.depth;;i--){let o,s,a=n.index(i);if(i==n.depth?(o=n.nodeBefore,s=n.nodeAfter):r>0?(o=n.node(i+1),a++,s=n.node(i).maybeChild(a)):(o=n.node(i).maybeChild(a-1),s=n.node(i+1)),o&&!o.isTextblock&&eI(o,s)&&n.node(i).canReplace(a,a+1))return e;if(i==0)break;e=r<0?n.before(i):n.after(i)}}function C2(t,e,r){let n=null,{linebreakReplacement:i}=t.doc.type.schema,o=t.doc.resolve(e-r),s=o.node().type;if(i&&s.inlineContent){let d=s.whitespace=="pre",f=!!s.contentMatch.matchType(i);d&&!f?n=!1:!d&&f&&(n=!0)}let a=t.steps.length;if(n===!1){let d=t.doc.resolve(e+r);QR(t,d.node(),d.before(),a)}s.inlineContent&&T1(t,e+r-1,s,o.node().contentMatchAt(o.index()),n==null);let l=t.mapping.slice(a),c=l.map(e-r);if(t.step(new kr(c,l.map(e+r,-1),qe.empty,!0)),n===!0){let d=t.doc.resolve(c);ZR(t,d.node(),d.before(),t.steps.length)}return t}function T2(t,e,r){let n=t.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),r))return e;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let o=n.index(i);if(n.node(i).canReplaceWith(o,o,r))return n.before(i+1);if(o>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let o=n.indexAfter(i);if(n.node(i).canReplaceWith(o,o,r))return n.after(i+1);if(o<n.node(i).childCount)return null}return null}function tI(t,e,r){let n=t.resolve(e);if(!r.content.size)return e;let i=r.content;for(let o=0;o<r.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(r.openStart==0&&r.size?2:1);o++)for(let s=n.depth;s>=0;s--){let a=s==n.depth?0:n.pos<=(n.start(s+1)+n.end(s+1))/2?-1:1,l=n.index(s)+(a>0?1:0),c=n.node(s),d=!1;if(o==1)d=c.canReplace(l,l,i);else{let f=c.contentMatchAt(l).findWrapping(i.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return a==0?n.pos:a<0?n.before(s+1):n.after(s+1)}return null}function Ty(t,e,r=e,n=qe.empty){if(e==r&&!n.size)return null;let i=t.resolve(e),o=t.resolve(r);return rI(i,o,n)?new kr(e,r,n):new A2(i,o,n).fit()}function rI(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}class A2{constructor(e,r,n){this.$from=e,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=Le.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=Le.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let o=this.placed,s=n.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new qe(o,s,a);return e>-1?new _r(n.pos,e,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new kr(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,i=this.unplaced.openEnd;n<e;n++){let o=r.firstChild;if(r.childCount>1&&(i=0),o.type.spec.isolating&&i<=n){e=n;break}r=o.content}for(let r=1;r<=2;r++)for(let n=r==1?e:this.unplaced.openStart;n>=0;n--){let i,o=null;n?(o=bb(this.unplaced.content,n-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],d,f=null;if(r==1&&(s?c.matchType(s.type)||(f=c.fillBefore(Le.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:a,parent:o,inject:f};if(r==2&&s&&(d=c.findWrapping(s.type)))return{sliceDepth:n,frontierDepth:a,parent:o,wrap:d};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:r,openEnd:n}=this.unplaced,i=bb(e,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new qe(e,r+1,Math.max(n,i.size+r>=e.size-n?r+1:0)),!0)}dropNode(){let{content:e,openStart:r,openEnd:n}=this.unplaced,i=bb(e,r);if(i.childCount<=1&&r>0){let o=e.size-r<=r+i.size;this.unplaced=new qe(zf(e,r-1,1),r-1,o?r-1:n)}else this.unplaced=new qe(zf(e,r,1),r,n)}placeNodes({sliceDepth:e,frontierDepth:r,parent:n,inject:i,wrap:o}){for(;this.depth>r;)this.closeFrontierNode();if(o)for(let b=0;b<o.length;b++)this.openFrontierNode(o[b]);let s=this.unplaced,a=n?n.content:s.content,l=s.openStart-e,c=0,d=[],{match:f,type:p}=this.frontier[r];if(i){for(let b=0;b<i.childCount;b++)d.push(i.child(b));f=f.matchFragment(i)}let m=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let b=a.child(c),S=f.matchType(b.type);if(!S)break;c++,(c>1||l==0||b.content.size)&&(f=S,d.push(nI(b.mark(p.allowedMarks(b.marks)),c==1?l:0,c==a.childCount?m:-1)))}let g=c==a.childCount;g||(m=-1),this.placed=Hf(this.placed,r,Le.from(d)),this.frontier[r].match=f,g&&m<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,S=a;b<m;b++){let w=S.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),S=w.content}this.unplaced=g?e==0?qe.empty:new qe(zf(s.content,e-1,1),e-1,m<0?s.openEnd:e-1):new qe(zf(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],r;if(!e.type.isTextblock||!wb(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(r=this.findCloseLevel(this.$to))&&r.depth==this.depth)return-1;let{depth:n}=this.$to,i=this.$to.after(n);for(;n>1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(e){e:for(let r=Math.min(this.depth,e.depth);r>=0;r--){let{match:n,type:i}=this.frontier[r],o=r<e.depth&&e.end(r+1)==e.pos+(e.depth-(r+1)),s=wb(e,r,i,n,o);if(s){for(let a=r-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],d=wb(e,a,c,l,!0);if(!d||d.childCount)continue e}return{depth:r,fit:s,move:o?e.doc.resolve(e.after(r+1)):e}}}}close(e){let r=this.findCloseLevel(e);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=Hf(this.placed,r.depth,r.fit)),e=r.move;for(let n=r.depth+1;n<=e.depth;n++){let i=e.node(n),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(n));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,r=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Hf(this.placed,this.depth,Le.from(e.create(r,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(Le.empty,!0);r.childCount&&(this.placed=Hf(this.placed,this.frontier.length,r))}}function zf(t,e,r){return e==0?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(zf(t.firstChild.content,e-1,r)))}function Hf(t,e,r){return e==0?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(Hf(t.lastChild.content,e-1,r)))}function bb(t,e){for(let r=0;r<e;r++)t=t.firstChild.content;return t}function nI(t,e,r){if(e<=0)return t;let n=t.content;return e>1&&(n=n.replaceChild(0,nI(n.firstChild,e-1,n.childCount==1?r-1:0))),e>0&&(n=t.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(t.type.contentMatch.matchFragment(n).fillBefore(Le.empty,!0)))),t.copy(n)}function wb(t,e,r,n,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!r.compatibleContent(o.type))return null;let a=n.fillBefore(o.content,!0,s);return a&&!R2(r,o.content,s)?a:null}function R2(t,e,r){for(let n=r;n<e.childCount;n++)if(!t.allowsMarks(e.child(n).marks))return!0;return!1}function I2(t){return t.spec.defining||t.spec.definingForContent}function O2(t,e,r,n){if(!n.size)return t.deleteRange(e,r);let i=t.doc.resolve(e),o=t.doc.resolve(r);if(rI(i,o,n))return t.step(new kr(e,r,n));let s=oI(i,t.doc.resolve(r));s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let p=i.depth,m=i.pos-1;p>0;p--,m--){let g=i.node(p).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;s.indexOf(p)>-1?a=p:i.before(p)==m&&s.splice(1,0,-p)}let l=s.indexOf(a),c=[],d=n.openStart;for(let p=n.content,m=0;;m++){let g=p.firstChild;if(c.push(g),m==n.openStart)break;p=g.content}for(let p=d-1;p>=0;p--){let m=c[p],g=I2(m.type);if(g&&!m.sameMarkup(i.node(Math.abs(a)-1)))d=p;else if(g||!m.type.isTextblock)break}for(let p=n.openStart;p>=0;p--){let m=(p+d+1)%(n.openStart+1),g=c[m];if(g)for(let b=0;b<s.length;b++){let S=s[(b+l)%s.length],w=!0;S<0&&(w=!1,S=-S);let T=i.node(S-1),M=i.index(S-1);if(T.canReplaceWith(M,M,g.type,g.marks))return t.replace(i.before(S),w?o.after(S):r,new qe(iI(n.content,0,n.openStart,m),m,n.openEnd))}}let f=t.steps.length;for(let p=s.length-1;p>=0&&(t.replace(e,r,n),!(t.steps.length>f));p--){let m=s[p];m<0||(e=i.before(m),r=o.after(m))}}function iI(t,e,r,n,i){if(e<r){let o=t.firstChild;t=t.replaceChild(0,o.copy(iI(o.content,e+1,r,n,o)))}if(e>n){let o=i.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(Le.empty,!0))}return t}function M2(t,e,r,n){if(!n.isInline&&e==r&&t.doc.resolve(e).parent.content.size){let i=T2(t.doc,e,n.type);i!=null&&(e=r=i)}t.replaceRange(e,r,new qe(Le.from(n),0,0))}function N2(t,e,r){let n=t.doc.resolve(e),i=t.doc.resolve(r),o=oI(n,i);for(let s=0;s<o.length;s++){let a=o[s],l=s==o.length-1;if(l&&a==0||n.node(a).type.contentMatch.validEnd)return t.delete(n.start(a),i.end(a));if(a>0&&(l||n.node(a-1).canReplace(n.index(a-1),i.indexAfter(a-1))))return t.delete(n.before(a),i.after(a))}for(let s=1;s<=n.depth&&s<=i.depth;s++)if(e-n.start(s)==n.depth-s&&r>n.end(s)&&i.end(s)-r!=i.depth-s&&n.start(s-1)==i.start(s-1)&&n.node(s-1).canReplace(n.index(s-1),i.index(s-1)))return t.delete(n.before(s),r);t.delete(e,r)}function oI(t,e){let r=[],n=Math.min(t.depth,e.depth);for(let i=n;i>=0;i--){let o=t.start(i);if(o<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&r.push(i)}return r}class Pu extends Qr{constructor(e,r,n){super(),this.pos=e,this.attr=r,this.value=n}apply(e){let r=e.nodeAt(this.pos);if(!r)return fr.fail("No node at attribute step's position");let n=Object.create(null);for(let o in r.attrs)n[o]=r.attrs[o];n[this.attr]=this.value;let i=r.type.create(n,null,r.marks);return fr.fromReplace(e,this.pos,this.pos+1,new qe(Le.from(i),0,r.isLeaf?0:1))}getMap(){return Un.empty}invert(e){return new Pu(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new Pu(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Pu(r.pos,r.attr,r.value)}}Qr.jsonID("attr",Pu);class mh extends Qr{constructor(e,r){super(),this.attr=e,this.value=r}apply(e){let r=Object.create(null);for(let i in e.attrs)r[i]=e.attrs[i];r[this.attr]=this.value;let n=e.type.create(r,e.content,e.marks);return fr.ok(n)}getMap(){return Un.empty}invert(e){return new mh(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new mh(r.attr,r.value)}}Qr.jsonID("docAttr",mh);let qu=class extends Error{};qu=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r};qu.prototype=Object.create(Error.prototype);qu.prototype.constructor=qu;qu.prototype.name="TransformError";class R1{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Nu}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let r=this.maybeStep(e);if(r.failed)throw new qu(r.failed);return this}maybeStep(e){let r=e.apply(this.doc);return r.failed||this.addStep(e,r.doc),r}get docChanged(){return this.steps.length>0}addStep(e,r){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=r}replace(e,r=e,n=qe.empty){let i=Ty(this.doc,e,r,n);return i&&this.step(i),this}replaceWith(e,r,n){return this.replace(e,r,new qe(Le.from(n),0,0))}delete(e,r){return this.replace(e,r,qe.empty)}insert(e,r){return this.replaceWith(e,e,r)}replaceRange(e,r,n){return O2(this,e,r,n),this}replaceRangeWith(e,r,n){return M2(this,e,r,n),this}deleteRange(e,r){return N2(this,e,r),this}lift(e,r){return y2(this,e,r),this}join(e,r=1){return C2(this,e,r),this}wrap(e,r){return w2(this,e,r),this}setBlockType(e,r=e,n,i=null){return x2(this,e,r,n,i),this}setNodeMarkup(e,r,n=null,i){return k2(this,e,r,n,i),this}setNodeAttribute(e,r,n){return this.step(new Pu(e,r,n)),this}setDocAttribute(e,r){return this.step(new mh(e,r)),this}addNodeMark(e,r){return this.step(new da(e,r)),this}removeNodeMark(e,r){if(!(r instanceof $t)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(r=r.isInSet(n.marks),!r)return this}return this.step(new Ku(e,r)),this}split(e,r=1,n){return _2(this,e,r,n),this}addMark(e,r,n){return p2(this,e,r,n),this}removeMark(e,r,n){return m2(this,e,r,n),this}clearIncompatible(e,r,n){return T1(this,e,r,n),this}}const xb=Object.create(null);let ot=class{constructor(e,r,n){this.$anchor=e,this.$head=r,this.ranges=n||[new I1(e.min(r),e.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let r=0;r<e.length;r++)if(e[r].$from.pos!=e[r].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,r=qe.empty){let n=r.content.lastChild,i=null;for(let a=0;a<r.openEnd;a++)i=n,n=n.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],d=e.mapping.slice(o);e.replaceRange(d.map(l.pos),d.map(c.pos),a?qe.empty:r),a==0&&Fk(e,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,r){let n=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=e.mapping.slice(n),c=l.map(s.pos),d=l.map(a.pos);o?e.deleteRange(c,d):(e.replaceRangeWith(c,d,r),Fk(e,n,r.isInline?-1:1))}}static findFrom(e,r,n=!1){let i=e.parent.inlineContent?new et(e):ku(e.node(0),e.parent,e.pos,e.index(),r,n);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=r<0?ku(e.node(0),e.node(o),e.before(o+1),e.index(o),r,n):ku(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,r,n);if(s)return s}return null}static near(e,r=1){return this.findFrom(e,r)||this.findFrom(e,-r)||new Gn(e.node(0))}static atStart(e){return ku(e,e,0,0,1)||new Gn(e)}static atEnd(e){return ku(e,e,e.content.size,e.childCount,-1)||new Gn(e)}static fromJSON(e,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=xb[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in xb)throw new RangeError("Duplicate use of selection JSON ID "+e);return xb[e]=r,r.prototype.jsonID=e,r}getBookmark(){return et.between(this.$anchor,this.$head).getBookmark()}};ot.prototype.visible=!0;class I1{constructor(e,r){this.$from=e,this.$to=r}}let Pk=!1;function Lk(t){!Pk&&!t.parent.inlineContent&&(Pk=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class et extends ot{constructor(e,r=e){Lk(e),Lk(r),super(e,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,r){let n=e.resolve(r.map(this.head));if(!n.parent.inlineContent)return ot.near(n);let i=e.resolve(r.map(this.anchor));return new et(i.parent.inlineContent?i:n,n)}replace(e,r=qe.empty){if(super.replace(e,r),r==qe.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof et&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ay(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new et(e.resolve(r.anchor),e.resolve(r.head))}static create(e,r,n=r){let i=e.resolve(r);return new this(i,n==r?i:e.resolve(n))}static between(e,r,n){let i=e.pos-r.pos;if((!n||i)&&(n=i>=0?1:-1),!r.parent.inlineContent){let o=ot.findFrom(r,n,!0)||ot.findFrom(r,-n,!0);if(o)r=o.$head;else return ot.near(r,n)}return e.parent.inlineContent||(i==0?e=r:(e=(ot.findFrom(e,-n,!0)||ot.findFrom(e,n,!0)).$anchor,e.pos<r.pos!=i<0&&(e=r))),new et(e,r)}}ot.jsonID("text",et);class Ay{constructor(e,r){this.anchor=e,this.head=r}map(e){return new Ay(e.map(this.anchor),e.map(this.head))}resolve(e){return et.between(e.resolve(this.anchor),e.resolve(this.head))}}class rt extends ot{constructor(e){let r=e.nodeAfter,n=e.node(0).resolve(e.pos+r.nodeSize);super(e,n),this.node=r}map(e,r){let{deleted:n,pos:i}=r.mapResult(this.anchor),o=e.resolve(i);return n?ot.near(o):new rt(o)}content(){return new qe(Le.from(this.node),0,0)}eq(e){return e instanceof rt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new O1(this.anchor)}static fromJSON(e,r){if(typeof r.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new rt(e.resolve(r.anchor))}static create(e,r){return new rt(e.resolve(r))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}rt.prototype.visible=!1;ot.jsonID("node",rt);class O1{constructor(e){this.anchor=e}map(e){let{deleted:r,pos:n}=e.mapResult(this.anchor);return r?new Ay(n,n):new O1(n)}resolve(e){let r=e.resolve(this.anchor),n=r.nodeAfter;return n&&rt.isSelectable(n)?new rt(r):ot.near(r)}}class Gn extends ot{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,r=qe.empty){if(r==qe.empty){e.delete(0,e.doc.content.size);let n=ot.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,r)}toJSON(){return{type:"all"}}static fromJSON(e){return new Gn(e)}map(e){return new Gn(e)}eq(e){return e instanceof Gn}getBookmark(){return D2}}ot.jsonID("all",Gn);const D2={map(){return this},resolve(t){return new Gn(t)}};function ku(t,e,r,n,i,o=!1){if(e.inlineContent)return et.create(t,r);for(let s=n-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&rt.isSelectable(a))return rt.create(t,r-(i<0?a.nodeSize:0))}else{let l=ku(t,a,r+i,i<0?a.childCount:0,i,o);if(l)return l}r+=a.nodeSize*i}return null}function Fk(t,e,r){let n=t.steps.length-1;if(n<e)return;let i=t.steps[n];if(!(i instanceof kr||i instanceof _r))return;let o=t.mapping.maps[n],s;o.forEach((a,l,c,d)=>{s==null&&(s=d)}),t.setSelection(ot.near(t.doc.resolve(s),r))}const jk=1,Wp=2,Bk=4;let P2=class extends R1{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|jk)&~Wp,this.storedMarks=null,this}get selectionSet(){return(this.updated&jk)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Wp,this}ensureMarks(e){return $t.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&Wp)>0}addStep(e,r){super.addStep(e,r),this.updated=this.updated&~Wp,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,r=!0){let n=this.selection;return r&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||$t.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,r,n){let i=this.doc.type.schema;if(r==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(n==null&&(n=r),n=n??r,!e)return this.deleteRange(r,n);let o=this.storedMarks;if(!o){let s=this.doc.resolve(r);o=n==r?s.marks():s.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(e,o)),this.selection.empty||this.setSelection(ot.near(this.selection.$to)),this}}setMeta(e,r){return this.meta[typeof e=="string"?e:e.key]=r,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Bk,this}get scrolledIntoView(){return(this.updated&Bk)>0}};function zk(t,e){return!e||!t?t:t.bind(e)}class $f{constructor(e,r,n){this.name=e,this.init=zk(r.init,n),this.apply=zk(r.apply,n)}}const L2=[new $f("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new $f("selection",{init(t,e){return t.selection||ot.atStart(e.doc)},apply(t){return t.selection}}),new $f("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,r,n){return n.selection.$cursor?t.storedMarks:null}}),new $f("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Sb{constructor(e,r){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=L2.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new $f(n.key,n.spec.state,n))})}}class Iu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,r=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=r){let i=this.config.plugins[n];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 r=[e],n=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 l=i?i[s].n:0,c=i?i[s].state:this,d=l<r.length&&a.spec.appendTransaction.call(a,l?r.slice(l):r,c,n);if(d&&n.filterTransaction(d,s)){if(d.setMeta("appendedTransaction",e),!i){i=[];for(let f=0;f<this.config.plugins.length;f++)i.push(f<s?{state:n,n:r.length}:{state:this,n:0})}r.push(d),n=n.applyInner(d),o=!0}i&&(i[s]={state:n,n:r.length})}}if(!o)return{state:n,transactions:r}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let r=new Iu(this.config),n=this.config.fields;for(let i=0;i<n.length;i++){let o=n[i];r[o.name]=o.apply(e,this[o.name],this,r)}return r}get tr(){return new P2(this)}static create(e){let r=new Sb(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Iu(r);for(let i=0;i<r.fields.length;i++)n[r.fields[i].name]=r.fields[i].init(e,n);return n}reconfigure(e){let r=new Sb(this.schema,e.plugins),n=r.fields,i=new Iu(r);for(let o=0;o<n.length;o++){let s=n[o].name;i[s]=this.hasOwnProperty(s)?this[s]:n[o].init(e,i)}return i}toJSON(e){let r={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(r.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[n],o=i.spec.state;o&&o.toJSON&&(r[n]=o.toJSON.call(i,this[i.key]))}return r}static fromJSON(e,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Sb(e.schema,e.plugins),o=new Iu(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=as.fromJSON(e.schema,r.doc);else if(s.name=="selection")o.selection=ot.fromJSON(o.doc,r.selection);else if(s.name=="storedMarks")r.storedMarks&&(o.storedMarks=r.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){o[s.name]=c.fromJSON.call(l,e,r[a],o);return}}o[s.name]=s.init(e,o)}}),o}}function sI(t,e,r){for(let n in t){let i=t[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=sI(i,e,{})),r[n]=i}return r}class _t{constructor(e){this.spec=e,this.props={},e.props&&sI(e.props,this,this.props),this.key=e.key?e.key.key:aI("plugin")}getState(e){return e[this.key]}}const kb=Object.create(null);function aI(t){return t in kb?t+"$"+ ++kb[t]:(kb[t]=0,t+"$")}class St{constructor(e="key"){this.key=aI(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Fr=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},gh=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let B0=null;const es=function(t,e,r){let n=B0||(B0=document.createRange());return n.setEnd(t,r??t.nodeValue.length),n.setStart(t,e||0),n},F2=function(){B0=null},Wl=function(t,e,r,n){return r&&(Hk(t,e,r,n,-1)||Hk(t,e,r,n,1))},j2=/^(img|br|input|textarea|hr)$/i;function Hk(t,e,r,n,i){for(;;){if(t==r&&e==n)return!0;if(e==(i<0?0:pi(t))){let o=t.parentNode;if(!o||o.nodeType!=1||zh(t)||j2.test(t.nodeName)||t.contentEditable=="false")return!1;e=Fr(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.contentEditable=="false")return!1;e=i<0?pi(t):0}else return!1}}function pi(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function B2(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=pi(t)}else if(t.parentNode&&!zh(t))e=Fr(t),t=t.parentNode;else return null}}function z2(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!zh(t))e=Fr(t)+1,t=t.parentNode;else return null}}function H2(t,e,r){for(let n=e==0,i=e==pi(t);n||i;){if(t==r)return!0;let o=Fr(t);if(t=t.parentNode,!t)return!1;n=n&&o==0,i=i&&o==pi(t)}}function zh(t){let e;for(let r=t;r&&!(e=r.pmViewDesc);r=r.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Ry=function(t){return t.focusNode&&Wl(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function _l(t,e){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=t,r.key=r.code=e,r}function $2(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function U2(t,e,r){if(t.caretPositionFromPoint)try{let n=t.caretPositionFromPoint(e,r);if(n)return{node:n.offsetNode,offset:Math.min(pi(n.offsetNode),n.offset)}}catch{}if(t.caretRangeFromPoint){let n=t.caretRangeFromPoint(e,r);if(n)return{node:n.startContainer,offset:Math.min(pi(n.startContainer),n.startOffset)}}}const bo=typeof navigator<"u"?navigator:null,$k=typeof document<"u"?document:null,Ca=bo&&bo.userAgent||"",z0=/Edge\/(\d+)/.exec(Ca),lI=/MSIE \d/.exec(Ca),H0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ca),On=!!(lI||H0||z0),ma=lI?document.documentMode:H0?+H0[1]:z0?+z0[1]:0,zi=!On&&/gecko\/(\d+)/i.test(Ca);zi&&+(/Firefox\/(\d+)/.exec(Ca)||[0,0])[1];const $0=!On&&/Chrome\/(\d+)/.exec(Ca),Vr=!!$0,cI=$0?+$0[1]:0,pn=!On&&!!bo&&/Apple Computer/.test(bo.vendor),Xu=pn&&(/Mobile\/\w+/.test(Ca)||!!bo&&bo.maxTouchPoints>2),hi=Xu||(bo?/Mac/.test(bo.platform):!1),W2=bo?/Win/.test(bo.platform):!1,ts=/Android \d/.test(Ca),Hh=!!$k&&"webkitFontSmoothing"in $k.documentElement.style,V2=Hh?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function G2(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Ko(t,e){return typeof t=="number"?t:t[e]}function K2(t){let e=t.getBoundingClientRect(),r=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*r,top:e.top,bottom:e.top+t.clientHeight*n}}function Uk(t,e,r){let n=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=r||t.dom;s;s=gh(s)){if(s.nodeType!=1)continue;let a=s,l=a==o.body,c=l?G2(o):K2(a),d=0,f=0;if(e.top<c.top+Ko(n,"top")?f=-(c.top-e.top+Ko(i,"top")):e.bottom>c.bottom-Ko(n,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+Ko(i,"top")-c.top:e.bottom-c.bottom+Ko(i,"bottom")),e.left<c.left+Ko(n,"left")?d=-(c.left-e.left+Ko(i,"left")):e.right>c.right-Ko(n,"right")&&(d=e.right-c.right+Ko(i,"right")),d||f)if(l)o.defaultView.scrollBy(d,f);else{let p=a.scrollLeft,m=a.scrollTop;f&&(a.scrollTop+=f),d&&(a.scrollLeft+=d);let g=a.scrollLeft-p,b=a.scrollTop-m;e={left:e.left-g,top:e.top-b,right:e.right-g,bottom:e.bottom-b}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function q2(t){let e=t.dom.getBoundingClientRect(),r=Math.max(0,e.top),n,i;for(let o=(e.left+e.right)/2,s=r+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=t.root.elementFromPoint(o,s);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=r-20){n=a,i=l.top;break}}return{refDOM:n,refTop:i,stack:uI(t.dom)}}function uI(t){let e=[],r=t.ownerDocument;for(let n=t;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),t!=r);n=gh(n));return e}function X2({refDOM:t,refTop:e,stack:r}){let n=t?t.getBoundingClientRect().top:0;dI(r,n==0?0:n-e)}function dI(t,e){for(let r=0;r<t.length;r++){let{dom:n,top:i,left:o}=t[r];n.scrollTop!=i+e&&(n.scrollTop=i+e),n.scrollLeft!=o&&(n.scrollLeft=o)}}let hu=null;function Y2(t){if(t.setActive)return t.setActive();if(hu)return t.focus(hu);let e=uI(t);t.focus(hu==null?{get preventScroll(){return hu={preventScroll:!0},!0}}:void 0),hu||(hu=!1,dI(e,0))}function fI(t,e){let r,n=2e8,i,o=0,s=e.top,a=e.top,l,c;for(let d=t.firstChild,f=0;d;d=d.nextSibling,f++){let p;if(d.nodeType==1)p=d.getClientRects();else if(d.nodeType==3)p=es(d).getClientRects();else continue;for(let m=0;m<p.length;m++){let g=p[m];if(g.top<=s&&g.bottom>=a){s=Math.max(g.bottom,s),a=Math.min(g.top,a);let b=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(b<n){r=d,n=b,i=b&&r.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,d.nodeType==1&&b&&(o=f+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!l&&g.left<=e.left&&g.right>=e.left&&(l=d,c={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!r&&(e.left>=g.right&&e.top>=g.top||e.left>=g.left&&e.top>=g.bottom)&&(o=f+1)}}return!r&&l&&(r=l,i=c,n=0),r&&r.nodeType==3?J2(r,i):!r||n&&r.nodeType==1?{node:t,offset:o}:fI(r,i)}function J2(t,e){let r=t.nodeValue.length,n=document.createRange();for(let i=0;i<r;i++){n.setEnd(t,i+1),n.setStart(t,i);let o=ea(n,1);if(o.top!=o.bottom&&M1(e,o))return{node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function M1(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Z2(t,e){let r=t.parentNode;return r&&/^li$/i.test(r.nodeName)&&e.left<t.getBoundingClientRect().left?r:t}function Q2(t,e,r){let{node:n,offset:i}=fI(e,r),o=-1;if(n.nodeType==1&&!n.firstChild){let s=n.getBoundingClientRect();o=s.left!=s.right&&r.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(n,i,o)}function eL(t,e,r,n){let i=-1;for(let o=e,s=!1;o!=t.dom;){let a=t.docView.nearestDesc(o,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&(!s&&l.left>n.left||l.top>n.top?i=a.posBefore:(!s&&l.right<n.left||l.bottom<n.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?n.top<(l.top+l.bottom)/2:n.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,r,-1)}function hI(t,e,r){let n=t.childNodes.length;if(n&&r.top<r.bottom)for(let i=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-r.top)/(r.bottom-r.top))-2)),o=i;;){let s=t.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(M1(e,c))return hI(s,e,c)}}if((o=(o+1)%n)==i)break}return t}function tL(t,e){let r=t.dom.ownerDocument,n,i=0,o=U2(r,e.left,e.top);o&&({node:n,offset:i}=o);let s=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top),a;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let c=t.dom.getBoundingClientRect();if(!M1(e,c)||(s=hI(t.dom,e,c),!s))return null}if(pn)for(let c=s;n&&c;c=gh(c))c.draggable&&(n=void 0);if(s=Z2(s,e),n){if(zi&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let d=n.childNodes[i],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}let c;Hh&&i&&n.nodeType==1&&(c=n.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(a=eL(t,n,i,e))}a==null&&(a=Q2(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Wk(t){return t.top<t.bottom||t.left<t.right}function ea(t,e){let r=t.getClientRects();if(r.length){let n=r[e<0?0:r.length-1];if(Wk(n))return n}return Array.prototype.find.call(r,Wk)||t.getBoundingClientRect()}const rL=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function pI(t,e,r){let{node:n,offset:i,atom:o}=t.docView.domFromPos(e,r<0?-1:1),s=Hh||zi;if(n.nodeType==3)if(s&&(rL.test(n.nodeValue)||(r<0?!i:i==n.nodeValue.length))){let l=ea(es(n,i,i),r);if(zi&&i&&/\s/.test(n.nodeValue[i-1])&&i<n.nodeValue.length){let c=ea(es(n,i-1,i-1),-1);if(c.top==l.top){let d=ea(es(n,i,i+1),-1);if(d.top!=l.top)return Ef(d,d.left<c.left)}}return l}else{let l=i,c=i,d=r<0?1:-1;return r<0&&!i?(c++,d=-1):r>=0&&i==n.nodeValue.length?(l--,d=1):r<0?l--:c++,Ef(ea(es(n,l,c),d),d<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(r<0||i==pi(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return _b(l.getBoundingClientRect(),!1)}if(o==null&&i<pi(n)){let l=n.childNodes[i];if(l.nodeType==1)return _b(l.getBoundingClientRect(),!0)}return _b(n.getBoundingClientRect(),r>=0)}if(o==null&&i&&(r<0||i==pi(n))){let l=n.childNodes[i-1],c=l.nodeType==3?es(l,pi(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Ef(ea(c,1),!1)}if(o==null&&i<pi(n)){let l=n.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?es(l,0,s?0:1):l.nodeType==1?l:null:null;if(c)return Ef(ea(c,-1),!0)}return Ef(ea(n.nodeType==3?es(n):n,-r),r>=0)}function Ef(t,e){if(t.width==0)return t;let r=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:r,right:r}}function _b(t,e){if(t.height==0)return t;let r=e?t.top:t.bottom;return{top:r,bottom:r,left:t.left,right:t.right}}function mI(t,e,r){let n=t.state,i=t.root.activeElement;n!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return r()}finally{n!=e&&t.updateState(n),i!=t.dom&&i&&i.focus()}}function nL(t,e,r){let n=e.selection,i=r=="up"?n.$from:n.$to;return mI(t,e,()=>{let{node:o}=t.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=pI(t,i.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=es(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let d=l[c];if(d.bottom>d.top+1&&(r=="up"?s.top-d.top>(d.bottom-s.top)*2:d.bottom-s.bottom>(s.bottom-d.top)*2))return!1}}return!0})}const iL=/[\u0590-\u08ac]/;function oL(t,e,r){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,o=!i,s=i==n.parent.content.size,a=t.domSelection();return a?!iL.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?o:s:mI(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:d,anchorOffset:f}=t.domSelectionRange(),p=a.caretBidiLevel;a.modify("move",r,"character");let m=n.depth?t.docView.domAfterPos(n.before()):t.dom,{focusNode:g,focusOffset:b}=t.domSelectionRange(),S=g&&!m.contains(g.nodeType==1?g:g.parentNode)||l==g&&c==b;try{a.collapse(d,f),l&&(l!=d||c!=f)&&a.extend&&a.extend(l,c)}catch{}return p!=null&&(a.caretBidiLevel=p),S}):n.pos==n.start()||n.pos==n.end()}let Vk=null,Gk=null,Kk=!1;function sL(t,e,r){return Vk==e&&Gk==r?Kk:(Vk=e,Gk=r,Kk=r=="up"||r=="down"?nL(t,e,r):oL(t,e,r))}const mi=0,qk=1,Al=2,wo=3;class $h{constructor(e,r,n,i){this.parent=e,this.children=r,this.dom=n,this.contentDOM=i,this.dirty=mi,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,r,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let r=0;r<this.children.length;r++)e+=this.children[r].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 r=0,n=this.posAtStart;;r++){let i=this.children[r];if(i==e)return n;n+=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,r,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let o,s;if(e==this.contentDOM)o=e.childNodes[r-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[r];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=r>Fr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&r==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,r=!1){for(let n=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!r||o.node))if(n&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))n=!1;else return o}}getDesc(e){let r=e.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(e,r,n){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,r,n)}return-1}descAt(e){for(let r=0,n=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==e&&o!=n){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-n-i.border);n=o}}domFromPos(e,r){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,i=0;for(let o=0;n<this.children.length;n++){let s=this.children[n],a=o+s.size;if(a>e||s instanceof yI){i=e-o;break}o=a}if(i)return this.children[n].domFromPos(i-this.children[n].border,r);for(let o;n&&!(o=this.children[n-1]).size&&o instanceof gI&&o.side>=0;n--);if(r<=0){let o,s=!0;for(;o=n?this.children[n-1]:null,!(!o||o.dom.parentNode==this.contentDOM);n--,s=!1);return o&&r&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,r):{node:this.contentDOM,offset:o?Fr(o.dom)+1:0}}else{let o,s=!0;for(;o=n<this.children.length?this.children[n]:null,!(!o||o.dom.parentNode==this.contentDOM);n++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,r):{node:this.contentDOM,offset:o?Fr(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,r,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:r,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=n,a=0;;a++){let l=this.children[a],c=s+l.size;if(i==-1&&e<=c){let d=s+l.border;if(e>=d&&r<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,r,d);e=s;for(let f=a;f>0;f--){let p=this.children[f-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){i=Fr(p.dom)+1;break}e-=p.size}i==-1&&(i=0)}if(i>-1&&(c>r||a==this.children.length-1)){r=c;for(let d=a+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=Fr(f.dom);break}r+=f.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:r,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let r=this.children[e<0?0:this.children.length-1];return r.size==0||r.emptyChildAt(e)}domAfterPos(e){let{node:r,offset:n}=this.domFromPos(e,0);if(r.nodeType!=1||n==r.childNodes.length)throw new RangeError("No node after pos "+e);return r.childNodes[n]}setSelection(e,r,n,i=!1){let o=Math.min(e,r),s=Math.max(e,r);for(let m=0,g=0;m<this.children.length;m++){let b=this.children[m],S=g+b.size;if(o>g&&s<S)return b.setSelection(e-g-b.border,r-g-b.border,n,i);g=S}let a=this.domFromPos(e,e?-1:1),l=r==e?a:this.domFromPos(r,r?-1:1),c=n.root.getSelection(),d=n.domSelectionRange(),f=!1;if((zi||pn)&&e==r){let{node:m,offset:g}=a;if(m.nodeType==3){if(f=!!(g&&m.nodeValue[g-1]==`
6
+ `),f&&g==m.nodeValue.length)for(let b=m,S;b;b=b.parentNode){if(S=b.nextSibling){S.nodeName=="BR"&&(a=l={node:S.parentNode,offset:Fr(S)+1});break}let w=b.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let b=m.childNodes[g-1];f=b&&(b.nodeName=="BR"||b.contentEditable=="false")}}if(zi&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let m=d.focusNode.childNodes[d.focusOffset];m&&m.contentEditable=="false"&&(i=!0)}if(!(i||f&&pn)&&Wl(a.node,a.offset,d.anchorNode,d.anchorOffset)&&Wl(l.node,l.offset,d.focusNode,d.focusOffset))return;let p=!1;if((c.extend||e==r)&&!f){c.collapse(a.node,a.offset);try{e!=r&&c.extend(l.node,l.offset),p=!0}catch{}}if(!p){if(e>r){let g=a;a=l,l=g}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(m)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,r){for(let n=0,i=0;i<this.children.length;i++){let o=this.children[i],s=n+o.size;if(n==s?e<=s&&r>=n:e<s&&r>n){let a=n+o.border,l=s-o.border;if(e>=a&&r<=l){this.dirty=e==n||r==s?Al:qk,e==a&&r==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=wo:o.markDirty(e-a,r-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Al:wo}n=s}this.dirty=Al}markParentsDirty(){let e=1;for(let r=this.parent;r;r=r.parent,e++){let n=e==1?Al:qk;r.dirty<n&&(r.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class gI extends $h{constructor(e,r,n,i){let o,s=r.type.toDOM;if(typeof s=="function"&&(s=s(n,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!r.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=r,this.widget=r,o=this}matchesWidget(e){return this.dirty==mi&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let r=this.widget.spec.stopEvent;return r?r(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class aL extends $h{constructor(e,r,n,i){super(e,[],r,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(e,r){return e!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Vl extends $h{constructor(e,r,n,i,o){super(e,[],n,i),this.mark=r,this.spec=o}static create(e,r,n,i){let o=i.nodeViews[r.type.name],s=o&&o(r,i,n);return(!s||!s.dom)&&(s=rc.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new Vl(e,r,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&wo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=wo&&this.mark.eq(e)}markDirty(e,r){if(super.markDirty(e,r),this.dirty!=mi){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=mi}}slice(e,r,n){let i=Vl.create(this.parent,this.mark,!0,n),o=this.children,s=this.size;r<s&&(o=W0(o,r,s,n)),e>0&&(o=W0(o,0,e,n));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 ga extends $h{constructor(e,r,n,i,o,s,a,l,c){super(e,[],o,s),this.node=r,this.outerDeco=n,this.innerDeco=i,this.nodeDOM=a}static create(e,r,n,i,o,s){let a=o.nodeViews[r.type.name],l,c=a&&a(r,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},n,i),d=c&&c.dom,f=c&&c.contentDOM;if(r.isText){if(!d)d=document.createTextNode(r.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=rc.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!f&&!r.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),r.type.spec.draggable&&(d.draggable=!0));let p=d;return d=wI(d,n,r),c?l=new lL(e,r,n,i,d,f||null,p,c,o,s+1):r.isText?new Iy(e,r,n,i,d,p,o):new ga(e,r,n,i,d,f||null,p,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 r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Le.empty)}return e}matchesNode(e,r,n){return this.dirty==mi&&e.eq(this.node)&&ag(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,r){let n=this.node.inlineContent,i=r,o=e.composing?this.localCompositionInfo(e,r):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new uL(this,s&&s.node,e);hL(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,n,e):c.type.side>=0&&!f&&l.syncToMarks(d==this.node.childCount?$t.none:this.node.child(d).marks,n,e),l.placeWidget(c,e,i)},(c,d,f,p)=>{l.syncToMarks(c.marks,n,e);let m;l.findNodeMatch(c,d,f,p)||a&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(m=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,d,f,m,e)||l.updateNextNode(c,d,f,e,p,i)||l.addNode(c,d,f,e,i),i+=c.nodeSize}),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Al)&&(s&&this.protectLocalComposition(e,s),vI(this.contentDOM,this.children,e),Xu&&pL(this.dom))}localCompositionInfo(e,r){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof et)||n<r||i>r+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=mL(this.node.content,s,n-r,i-r);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:r,pos:n,text:i}){if(this.getDesc(r))return;let o=r;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 aL(this,o,r,i);e.input.compositionNodes.push(s),this.children=W0(this.children,n,n+i.length,e,s)}update(e,r,n,i){return this.dirty==wo||!e.sameMarkup(this.node)?!1:(this.updateInner(e,r,n,i),!0)}updateInner(e,r,n,i){this.updateOuterDeco(r),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=mi}updateOuterDeco(e){if(ag(e,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=bI(this.dom,this.nodeDOM,U0(this.outerDeco,this.node,r),U0(e,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.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 Xk(t,e,r,n,i){wI(n,e,t);let o=new ga(void 0,t,e,r,n,n,n,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Iy extends ga{constructor(e,r,n,i,o,s,a){super(e,r,n,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,r,n,i){return this.dirty==wo||this.dirty!=mi&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=mi||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=mi,!0)}inParent(){let e=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,r,n){return e==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(e,r,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,r,n){let i=this.node.cut(e,r),o=document.createTextNode(i.text);return new Iy(this.parent,i,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,r){super.markDirty(e,r),this.dom!=this.nodeDOM&&(e==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=wo)}get domAtom(){return!1}isText(e){return this.node.text==e}}class yI extends $h{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==mi&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class lL extends ga{constructor(e,r,n,i,o,s,a,l,c,d){super(e,r,n,i,o,s,a,c,d),this.spec=l}update(e,r,n,i){if(this.dirty==wo)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,r,n);return o&&this.updateInner(e,r,n,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,r,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,r,n,i){this.spec.setSelection?this.spec.setSelection(e,r,n.root):super.setSelection(e,r,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function vI(t,e,r){let n=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=n;)n=Yk(n),i=!0;n=n.nextSibling}else i=!0,t.insertBefore(a,n);if(s instanceof Vl){let l=n?n.previousSibling:t.lastChild;vI(s.contentDOM,s.children,r),n=l?l.nextSibling:t.firstChild}}for(;n;)n=Yk(n),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}const Zf=function(t){t&&(this.nodeName=t)};Zf.prototype=Object.create(null);const Rl=[new Zf];function U0(t,e,r){if(t.length==0)return Rl;let n=r?Rl[0]:new Zf,i=[n];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(n=new Zf(s.nodeName));for(let a in s){let l=s[a];l!=null&&(r&&i.length==1&&i.push(n=new Zf(e.isInline?"span":"div")),a=="class"?n.class=(n.class?n.class+" ":"")+l:a=="style"?n.style=(n.style?n.style+";":"")+l:a!="nodeName"&&(n[a]=l))}}}return i}function bI(t,e,r,n){if(r==Rl&&n==Rl)return e;let i=e;for(let o=0;o<n.length;o++){let s=n[o],a=r[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Rl[0]),i=l}cL(i,a||Rl[0],s)}return i}function cL(t,e,r){for(let n in e)n!="class"&&n!="style"&&n!="nodeName"&&!(n in r)&&t.removeAttribute(n);for(let n in r)n!="class"&&n!="style"&&n!="nodeName"&&r[n]!=e[n]&&t.setAttribute(n,r[n]);if(e.class!=r.class){let n=e.class?e.class.split(" ").filter(Boolean):[],i=r.class?r.class.split(" ").filter(Boolean):[];for(let o=0;o<n.length;o++)i.indexOf(n[o])==-1&&t.classList.remove(n[o]);for(let o=0;o<i.length;o++)n.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=r.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=n.exec(e.style);)t.style.removeProperty(i[1])}r.style&&(t.style.cssText+=r.style)}}function wI(t,e,r){return bI(t,t,Rl,U0(e,r,t.nodeType!=1))}function ag(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].type.eq(e[r].type))return!1;return!0}function Yk(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class uL{constructor(e,r,n){this.lock=r,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=dL(e.node.content,e)}destroyBetween(e,r){if(e!=r){for(let n=e;n<r;n++)this.top.children[n].destroy();this.top.children.splice(e,r-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,r,n){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=mi,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 l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[o])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Vl.create(this.top,e[o],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,r,n,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,r,n))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,r,n)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,r,n,i,o){let s=this.top.children[i];return s.dirty==wo&&s.dom==s.contentDOM&&(s.dirty=Al),s.update(e,r,n,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let r=e.parentNode;if(!r)return-1;if(r==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==n)return i}return-1}e=r}}updateNextNode(e,r,n,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof ga){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let d=l.dom,f,p=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=wo&&ag(r,l.outerDeco));if(!p&&l.update(e,r,n,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!p&&(f=this.recreateWrapper(l,e,r,n,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Al,f.updateChildren(i,s+1),f.dirty=mi),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,r,n,i,o,s){if(e.dirty||r.isAtom||!e.children.length||!e.node.content.eq(r.content)||!ag(n,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=ga.create(this.top,r,n,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,r,n,i,o){let s=ga.create(this.top,e,r,n,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,r,n){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 gI(this.top,e,r,n);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],r=this.top;for(;e instanceof Vl;)r=e,e=r.children[r.children.length-1];(!e||!(e instanceof Iy)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((pn||Vr)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",r),this.addHackNode("BR",this.top))}addHackNode(e,r){if(r==this.top&&this.index<r.children.length&&r.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),e=="BR"&&(n.className="ProseMirror-trailingBreak");let i=new yI(this.top,[],n,null);r!=this.top?r.children.push(i):r.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 dL(t,e){let r=e,n=r.children.length,i=t.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(n){let c=r.children[n-1];if(c instanceof Vl)r=c,n=c.children.length;else{a=c,n--;break}}else{if(r==e)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}function fL(t,e){return t.type.side-e.type.side}function hL(t,e,r,n){let i=e.locals(t),o=0;if(i.length==0){for(let c=0;c<t.childCount;c++){let d=t.child(c);n(d,i,e.forChild(o,d),c),o+=d.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let d,f;for(;s<i.length&&i[s].to==o;){let S=i[s++];S.widget&&(d?(f||(f=[d])).push(S):d=S)}if(d)if(f){f.sort(fL);for(let S=0;S<f.length;S++)r(f[S],c,!!l)}else r(d,c,!!l);let p,m;if(l)m=-1,p=l,l=null;else if(c<t.childCount)m=c,p=t.child(c++);else break;for(let S=0;S<a.length;S++)a[S].to<=o&&a.splice(S--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let g=o+p.nodeSize;if(p.isText){let S=g;s<i.length&&i[s].from<S&&(S=i[s].from);for(let w=0;w<a.length;w++)a[w].to<S&&(S=a[w].to);S<g&&(l=p.cut(S-o),p=p.cut(0,S-o),g=S,m=-1)}else for(;s<i.length&&i[s].to<g;)s++;let b=p.isInline&&!p.isLeaf?a.filter(S=>!S.inline):a.slice();n(p,b,e.forChild(o,p),m),o=g}}function pL(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function mL(t,e,r,n){for(let i=0,o=0;i<t.childCount&&o<=n;){let s=t.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<t.childCount;){let c=t.child(i++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=r){if(o>=n&&l.slice(n-e.length-a,n-a)==e)return n-e.length;let c=a<n?l.lastIndexOf(e,n-a-1):-1;if(c>=0&&c+e.length+a>=r)return a+c;if(r==n&&l.length>=n+e.length-a&&l.slice(n-a,n-a+e.length)==e)return n}}return-1}function W0(t,e,r,n,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],c=a,d=a+=l.size;c>=r||d<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,n)),i&&(o.push(i),i=void 0),d>r&&o.push(l.slice(r-c,l.size,n)))}return o}function N1(t,e=null){let r=t.domSelectionRange(),n=t.state.doc;if(!r.focusNode)return null;let i=t.docView.nearestDesc(r.focusNode),o=i&&i.size==0,s=t.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(s<0)return null;let a=n.resolve(s),l,c;if(Ry(r)){for(l=s;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&rt.isSelectable(f)&&i.parent&&!(f.isInline&&H2(r.focusNode,r.focusOffset,i.dom))){let p=i.posBefore;c=new rt(s==p?a:n.resolve(p))}}else{if(r instanceof t.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let f=s,p=s;for(let m=0;m<r.rangeCount;m++){let g=r.getRangeAt(m);f=Math.min(f,t.docView.posFromDOM(g.startContainer,g.startOffset,1)),p=Math.max(p,t.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(f<0)return null;[l,s]=p==t.state.selection.anchor?[p,f]:[f,p],a=n.resolve(s)}else l=t.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(l<0)return null}let d=n.resolve(l);if(!c){let f=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;c=D1(t,d,a,f)}return c}function xI(t){return t.editable?t.hasFocus():kI(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ls(t,e=!1){let r=t.state.selection;if(SI(t,r),!!xI(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Vr){let n=t.domSelectionRange(),i=t.domObserver.currentSelection;if(n.anchorNode&&i.anchorNode&&Wl(n.anchorNode,n.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)yL(t);else{let{anchor:n,head:i}=r,o,s;Jk&&!(r instanceof et)&&(r.$from.parent.inlineContent||(o=Zk(t,r.from)),!r.empty&&!r.$from.parent.inlineContent&&(s=Zk(t,r.to))),t.docView.setSelection(n,i,t,e),Jk&&(o&&Qk(o),s&&Qk(s)),r.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&gL(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Jk=pn||Vr&&cI<63;function Zk(t,e){let{node:r,offset:n}=t.docView.domFromPos(e,0),i=n<r.childNodes.length?r.childNodes[n]:null,o=n?r.childNodes[n-1]:null;if(pn&&i&&i.contentEditable=="false")return Eb(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return Eb(i);if(o)return Eb(o)}}function Eb(t){return t.contentEditable="true",pn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Qk(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function gL(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let r=t.domSelectionRange(),n=r.anchorNode,i=r.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(r.anchorNode!=n||r.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!xI(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function yL(t){let e=t.domSelection(),r=document.createRange();if(!e)return;let n=t.cursorWrapper.dom,i=n.nodeName=="IMG";i?r.setStart(n.parentNode,Fr(n)+1):r.setStart(n,0),r.collapse(!0),e.removeAllRanges(),e.addRange(r),!i&&!t.state.selection.visible&&On&&ma<=11&&(n.disabled=!0,n.disabled=!1)}function SI(t,e){if(e instanceof rt){let r=t.docView.descAt(e.from);r!=t.lastSelectedViewDesc&&(e_(t),r&&r.selectNode(),t.lastSelectedViewDesc=r)}else e_(t)}function e_(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function D1(t,e,r,n){return t.someProp("createSelectionBetween",i=>i(t,e,r))||et.between(e,r,n)}function t_(t){return t.editable&&!t.hasFocus()?!1:kI(t)}function kI(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function vL(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),r=t.domSelectionRange();return Wl(e.node,e.offset,r.anchorNode,r.anchorOffset)}function V0(t,e){let{$anchor:r,$head:n}=t.selection,i=e>0?r.max(n):r.min(n),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&ot.findFrom(o,e)}function ta(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function r_(t,e,r){let n=t.state.selection;if(n instanceof et)if(r.indexOf("s")>-1){let{$head:i}=n,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return ta(t,new et(n.$anchor,s))}else if(n.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=V0(t.state,e);return i&&i instanceof rt?ta(t,i):!1}else if(!(hi&&r.indexOf("m")>-1)){let i=n.$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=t.docView.descAt(a))&&!s.contentDOM?rt.isSelectable(o)?ta(t,new rt(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):Hh?ta(t,new et(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(n instanceof rt&&n.node.isInline)return ta(t,new et(e>0?n.$to:n.$from));{let i=V0(t.state,e);return i?ta(t,i):!1}}}function lg(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Qf(t,e){let r=t.pmViewDesc;return r&&r.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function pu(t,e){return e<0?bL(t):wL(t)}function bL(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let i,o,s=!1;for(zi&&r.nodeType==1&&n<lg(r)&&Qf(r.childNodes[n],-1)&&(s=!0);;)if(n>0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(Qf(a,-1))i=r,o=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(_I(r))break;{let a=r.previousSibling;for(;a&&Qf(a,-1);)i=r.parentNode,o=Fr(a),a=a.previousSibling;if(a)r=a,n=lg(r);else{if(r=r.parentNode,r==t.dom)break;n=0}}}s?G0(t,r,n):i&&G0(t,i,o)}function wL(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let i=lg(r),o,s;for(;;)if(n<i){if(r.nodeType!=1)break;let a=r.childNodes[n];if(Qf(a,1))o=r,s=++n;else break}else{if(_I(r))break;{let a=r.nextSibling;for(;a&&Qf(a,1);)o=a.parentNode,s=Fr(a)+1,a=a.nextSibling;if(a)r=a,n=0,i=lg(r);else{if(r=r.parentNode,r==t.dom)break;n=i=0}}}o&&G0(t,o,s)}function _I(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function xL(t,e){for(;t&&e==t.childNodes.length&&!zh(t);)e=Fr(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let r=t.childNodes[e];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;t=r,e=0}}function SL(t,e){for(;t&&!e&&!zh(t);)e=Fr(t),t=t.parentNode;for(;t&&e;){let r=t.childNodes[e-1];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;t=r,e=t.childNodes.length}}function G0(t,e,r){if(e.nodeType!=3){let o,s;(s=xL(e,r))?(e=s,r=0):(o=SL(e,r))&&(e=o,r=o.nodeValue.length)}let n=t.domSelection();if(!n)return;if(Ry(n)){let o=document.createRange();o.setEnd(e,r),o.setStart(e,r),n.removeAllRanges(),n.addRange(o)}else n.extend&&n.extend(e,r);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&ls(t)},50)}function n_(t,e){let r=t.state.doc.resolve(e);if(!(Vr||W2)&&r.parent.inlineContent){let i=t.coordsAtPos(e);if(e>r.start()){let o=t.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<r.end()){let o=t.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(t.dom).direction=="rtl"?"rtl":"ltr"}function i_(t,e,r){let n=t.state.selection;if(n instanceof et&&!n.empty||r.indexOf("s")>-1||hi&&r.indexOf("m")>-1)return!1;let{$from:i,$to:o}=n;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=V0(t.state,e);if(s&&s instanceof rt)return ta(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=n instanceof Gn?ot.near(s,e):ot.findFrom(s,e);return a?ta(t,a):!1}return!1}function o_(t,e){if(!(t.state.selection instanceof et))return!0;let{$head:r,$anchor:n,empty:i}=t.state.selection;if(!r.sameParent(n))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(o&&!o.isText){let s=t.state.tr;return e<0?s.delete(r.pos-o.nodeSize,r.pos):s.delete(r.pos,r.pos+o.nodeSize),t.dispatch(s),!0}return!1}function s_(t,e,r){t.domObserver.stop(),e.contentEditable=r,t.domObserver.start()}function kL(t){if(!pn||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:r}=t.domSelectionRange();if(e&&e.nodeType==1&&r==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;s_(t,n,"true"),setTimeout(()=>s_(t,n,"false"),20)}return!1}function _L(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function EL(t,e){let r=e.keyCode,n=_L(e);if(r==8||hi&&r==72&&n=="c")return o_(t,-1)||pu(t,-1);if(r==46&&!e.shiftKey||hi&&r==68&&n=="c")return o_(t,1)||pu(t,1);if(r==13||r==27)return!0;if(r==37||hi&&r==66&&n=="c"){let i=r==37?n_(t,t.state.selection.from)=="ltr"?-1:1:-1;return r_(t,i,n)||pu(t,i)}else if(r==39||hi&&r==70&&n=="c"){let i=r==39?n_(t,t.state.selection.from)=="ltr"?1:-1:1;return r_(t,i,n)||pu(t,i)}else{if(r==38||hi&&r==80&&n=="c")return i_(t,-1,n)||pu(t,-1);if(r==40||hi&&r==78&&n=="c")return kL(t)||i_(t,1,n)||pu(t,1);if(n==(hi?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function EI(t,e){t.someProp("transformCopied",m=>{e=m(e,t)});let r=[],{content:n,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,o--;let m=n.firstChild;r.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),n=m.content}let s=t.someProp("clipboardSerializer")||rc.fromSchema(t.state.schema),a=OI(),l=a.createElement("div");l.appendChild(s.serializeFragment(n,{document:a}));let c=l.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=II[c.nodeName.toLowerCase()]);){for(let m=d.length-1;m>=0;m--){let g=a.createElement(d[m]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(r)}`);let p=t.someProp("clipboardTextSerializer",m=>m(e,t))||e.content.textBetween(0,e.content.size,`
7
+
8
+ `);return{dom:l,text:p,slice:e}}function CI(t,e,r,n,i){let o=i.parent.type.spec.code,s,a;if(!r&&!e)return null;let l=e&&(n||o||!r);if(l){if(t.someProp("transformPastedText",p=>{e=p(e,o||n,t)}),o)return e?new qe(Le.from(t.state.schema.text(e.replace(/\r\n?/g,`
9
+ `))),0,0):qe.empty;let f=t.someProp("clipboardTextParser",p=>p(e,i,n,t));if(f)a=f;else{let p=i.marks(),{schema:m}=t.state,g=rc.fromSchema(m);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(b=>{let S=s.appendChild(document.createElement("p"));b&&S.appendChild(g.serializeNode(m.text(b,p)))})}}else t.someProp("transformPastedHTML",f=>{r=f(r,t)}),s=RL(r),Hh&&IL(s);let c=s&&s.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let p=s.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;s=p}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Yf.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||d),context:i,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!CL.test(p.parentNode.nodeName)?{ignore:!0}:null}})),d)a=OL(a_(a,+d[1],+d[2]),d[4]);else if(a=qe.maxOpen(TL(a.content,i),!0),a.openStart||a.openEnd){let f=0,p=0;for(let m=a.content.firstChild;f<a.openStart&&!m.type.spec.isolating;f++,m=m.firstChild);for(let m=a.content.lastChild;p<a.openEnd&&!m.type.spec.isolating;p++,m=m.lastChild);a=a_(a,f,p)}return t.someProp("transformPasted",f=>{a=f(a,t)}),a}const CL=/^(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 TL(t,e){if(t.childCount<2)return t;for(let r=e.depth;r>=0;r--){let i=e.node(r).contentMatchAt(e.index(r)),o,s=[];if(t.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&o.length&&AI(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=RI(s[s.length-1],o.length));let d=TI(a,l);s.push(d),i=i.matchType(d.type),o=l}}),s)return Le.from(s)}return t}function TI(t,e,r=0){for(let n=e.length-1;n>=r;n--)t=e[n].create(null,Le.from(t));return t}function AI(t,e,r,n,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=AI(t,e,r,n.lastChild,i+1);if(o)return n.copy(n.content.replaceChild(n.childCount-1,o));if(n.contentMatchAt(n.childCount).matchType(i==t.length-1?r.type:t[i+1]))return n.copy(n.content.append(Le.from(TI(r,t,i+1))))}}function RI(t,e){if(e==0)return t;let r=t.content.replaceChild(t.childCount-1,RI(t.lastChild,e-1)),n=t.contentMatchAt(t.childCount).fillBefore(Le.empty,!0);return t.copy(r.append(n))}function K0(t,e,r,n,i,o){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(o=0),i<n-1&&(a=K0(a,e,r,n,i+1,o)),i>=r&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Le.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function a_(t,e,r){return e<t.openStart&&(t=new qe(K0(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),r<t.openEnd&&(t=new qe(K0(t.content,1,r,t.openEnd,0,0),t.openStart,r)),t}const II={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 l_=null;function OI(){return l_||(l_=document.implementation.createHTMLDocument("title"))}let Cb=null;function AL(t){let e=window.trustedTypes;return e?(Cb||(Cb=e.createPolicy("ProseMirrorClipboard",{createHTML:r=>r})),Cb.createHTML(t)):t}function RL(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let r=OI().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(t),i;if((i=n&&II[n[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),r.innerHTML=AL(t),i)for(let o=0;o<i.length;o++)r=r.querySelector(i[o])||r;return r}function IL(t){let e=t.querySelectorAll(Vr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let r=0;r<e.length;r++){let n=e[r];n.childNodes.length==1&&n.textContent==" "&&n.parentNode&&n.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),n)}}function OL(t,e){if(!t.size)return t;let r=t.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return t}let{content:i,openStart:o,openEnd:s}=t;for(let a=n.length-2;a>=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;i=Le.from(l.create(n[a+1],i)),o++,s++}return new qe(i,o,s)}const mn={},gn={},ML={touchstart:!0,touchmove:!0};class NL{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 DL(t){for(let e in mn){let r=mn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=n=>{LL(t,n)&&!P1(t,n)&&(t.editable||!(n.type in gn))&&r(t,n)},ML[e]?{passive:!0}:void 0)}pn&&t.dom.addEventListener("input",()=>null),q0(t)}function fa(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function PL(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function q0(t){t.someProp("handleDOMEvents",e=>{for(let r in e)t.input.eventHandlers[r]||t.dom.addEventListener(r,t.input.eventHandlers[r]=n=>P1(t,n))})}function P1(t,e){return t.someProp("handleDOMEvents",r=>{let n=r[e.type];return n?n(t,e)||e.defaultPrevented:!1})}function LL(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let r=e.target;r!=t.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(e))return!1;return!0}function FL(t,e){!P1(t,e)&&mn[e.type]&&(t.editable||!(e.type in gn))&&mn[e.type](t,e)}gn.keydown=(t,e)=>{let r=e;if(t.input.shiftKey=r.keyCode==16||r.shiftKey,!NI(t,r)&&(t.input.lastKeyCode=r.keyCode,t.input.lastKeyCodeTime=Date.now(),!(ts&&Vr&&r.keyCode==13)))if(r.keyCode!=229&&t.domObserver.forceFlush(),Xu&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();t.input.lastIOSEnter=n,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==n&&(t.someProp("handleKeyDown",i=>i(t,_l(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",n=>n(t,r))||EL(t,r)?r.preventDefault():fa(t,"key")};gn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};gn.keypress=(t,e)=>{let r=e;if(NI(t,r)||!r.charCode||r.ctrlKey&&!r.altKey||hi&&r.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,r))){r.preventDefault();return}let n=t.state.selection;if(!(n instanceof et)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(r.charCode);!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,n.$from.pos,n.$to.pos,i))&&t.dispatch(t.state.tr.insertText(i).scrollIntoView()),r.preventDefault()}};function Oy(t){return{left:t.clientX,top:t.clientY}}function jL(t,e){let r=e.x-t.clientX,n=e.y-t.clientY;return r*r+n*n<100}function L1(t,e,r,n,i){if(n==-1)return!1;let o=t.state.doc.resolve(n);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,a=>s>o.depth?a(t,r,o.nodeAfter,o.before(s),i,!0):a(t,r,o.node(s),o.before(s),i,!1)))return!0;return!1}function Lu(t,e,r){if(t.focused||t.focus(),t.state.selection.eq(e))return;let n=t.state.tr.setSelection(e);n.setMeta("pointer",!0),t.dispatch(n)}function BL(t,e){if(e==-1)return!1;let r=t.state.doc.resolve(e),n=r.nodeAfter;return n&&n.isAtom&&rt.isSelectable(n)?(Lu(t,new rt(r)),!0):!1}function zL(t,e){if(e==-1)return!1;let r=t.state.selection,n,i;r instanceof rt&&(n=r.node);let o=t.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(rt.isSelectable(a)){n&&r.$from.depth>0&&s>=r.$from.depth&&o.before(r.$from.depth+1)==r.$from.pos?i=o.before(r.$from.depth):i=o.before(s);break}}return i!=null?(Lu(t,rt.create(t.state.doc,i)),!0):!1}function HL(t,e,r,n,i){return L1(t,"handleClickOn",e,r,n)||t.someProp("handleClick",o=>o(t,e,n))||(i?zL(t,r):BL(t,r))}function $L(t,e,r,n){return L1(t,"handleDoubleClickOn",e,r,n)||t.someProp("handleDoubleClick",i=>i(t,e,n))}function UL(t,e,r,n){return L1(t,"handleTripleClickOn",e,r,n)||t.someProp("handleTripleClick",i=>i(t,e,n))||WL(t,r,n)}function WL(t,e,r){if(r.button!=0)return!1;let n=t.state.doc;if(e==-1)return n.inlineContent?(Lu(t,et.create(n,0,n.content.size)),!0):!1;let i=n.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)Lu(t,et.create(n,a+1,a+1+s.content.size));else if(rt.isSelectable(s))Lu(t,rt.create(n,a));else continue;return!0}}function F1(t){return cg(t)}const MI=hi?"metaKey":"ctrlKey";mn.mousedown=(t,e)=>{let r=e;t.input.shiftKey=r.shiftKey;let n=F1(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&jL(r,t.input.lastClick)&&!r[MI]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:o};let s=t.posAtCoords(Oy(r));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new VL(t,s,r,!!n)):(o=="doubleClick"?$L:UL)(t,s.pos,s.inside,r)?r.preventDefault():fa(t,"pointer"))};class VL{constructor(e,r,n,i){this.view=e,this.pos=r,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[MI],this.allowDefault=n.shiftKey;let o,s;if(r.inside>-1)o=e.state.doc.nodeAt(r.inside),s=r.inside;else{let d=e.state.doc.resolve(r.pos);o=d.parent,s=d.depth?d.before():0}const a=i?null:n.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(n.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof rt&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&zi&&!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)),fa(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(()=>ls(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(Oy(e))),this.updateAllowDefault(e),this.allowDefault||!r?fa(this.view,"pointer"):HL(this.view,r.pos,r.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||pn&&this.mightDrag&&!this.mightDrag.node.isAtom||Vr&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(Lu(this.view,ot.near(this.view.state.doc.resolve(r.pos))),e.preventDefault()):fa(this.view,"pointer")}move(e){this.updateAllowDefault(e),fa(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)}}mn.touchstart=t=>{t.input.lastTouch=Date.now(),F1(t),fa(t,"pointer")};mn.touchmove=t=>{t.input.lastTouch=Date.now(),fa(t,"pointer")};mn.contextmenu=t=>F1(t);function NI(t,e){return t.composing?!0:pn&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const GL=ts?5e3:-1;gn.compositionstart=gn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,r=e.selection.$to;if(e.selection instanceof et&&(e.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||r.marks(),cg(t,!0),t.markCursor=null;else if(cg(t,!e.selection.empty),zi&&e.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=t.domSelectionRange();for(let i=n.focusNode,o=n.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=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}t.input.composing=!0}DI(t,GL)};gn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,DI(t,20))};function DI(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>cg(t),e))}function PI(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=qL());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function KL(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let r=B2(e.focusNode,e.focusOffset),n=z2(e.focusNode,e.focusOffset);if(r&&n&&r!=n){let i=n.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(r==o||n==o)return o;if(!i||!i.isText(n.nodeValue))return n;if(t.input.compositionNode==n){let s=r.pmViewDesc;if(!(!s||!s.isText(r.nodeValue)))return n}}return r||n}function qL(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function cg(t,e=!1){if(!(ts&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),PI(t),e||t.docView&&t.docView.dirty){let r=N1(t);return r&&!r.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(r)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function XL(t,e){if(!t.dom.parentNode)return;let r=t.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),t.focus()},50)}const yh=On&&ma<15||Xu&&V2<604;mn.copy=gn.cut=(t,e)=>{let r=e,n=t.state.selection,i=r.type=="cut";if(n.empty)return;let o=yh?null:r.clipboardData,s=n.content(),{dom:a,text:l}=EI(t,s);o?(r.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):XL(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function YL(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function JL(t,e){if(!t.dom.parentNode)return;let r=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,n=t.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),n.parentNode&&n.parentNode.removeChild(n),r?vh(t,n.value,null,i,e):vh(t,n.textContent,n.innerHTML,i,e)},50)}function vh(t,e,r,n,i){let o=CI(t,e,r,n,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||qe.empty)))return!0;if(!o)return!1;let s=YL(o),a=s?t.state.tr.replaceSelectionWith(s,n):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function LI(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let r=t.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}gn.paste=(t,e)=>{let r=e;if(t.composing&&!ts)return;let n=yh?null:r.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;n&&vh(t,LI(n),n.getData("text/html"),i,r)?r.preventDefault():JL(t,r)};class FI{constructor(e,r,n){this.slice=e,this.move=r,this.node=n}}const jI=hi?"altKey":"ctrlKey";mn.dragstart=(t,e)=>{let r=e,n=t.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(Oy(r)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof rt?i.to-1:i.to))){if(n&&n.mightDrag)s=rt.create(t.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let f=t.docView.nearestDesc(r.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=rt.create(t.state.doc,f.posBefore))}}let a=(s||t.state.selection).content(),{dom:l,text:c,slice:d}=EI(t,a);(!r.dataTransfer.files.length||!Vr||cI>120)&&r.dataTransfer.clearData(),r.dataTransfer.setData(yh?"Text":"text/html",l.innerHTML),r.dataTransfer.effectAllowed="copyMove",yh||r.dataTransfer.setData("text/plain",c),t.dragging=new FI(d,!r[jI],s)};mn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};gn.dragover=gn.dragenter=(t,e)=>e.preventDefault();gn.drop=(t,e)=>{let r=e,n=t.dragging;if(t.dragging=null,!r.dataTransfer)return;let i=t.posAtCoords(Oy(r));if(!i)return;let o=t.state.doc.resolve(i.pos),s=n&&n.slice;s?t.someProp("transformPasted",g=>{s=g(s,t)}):s=CI(t,LI(r.dataTransfer),yh?null:r.dataTransfer.getData("text/html"),!1,o);let a=!!(n&&!r[jI]);if(t.someProp("handleDrop",g=>g(t,r,s||qe.empty,a))){r.preventDefault();return}if(!s)return;r.preventDefault();let l=s?tI(t.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let c=t.state.tr;if(a){let{node:g}=n;g?g.replace(c):c.deleteSelection()}let d=c.mapping.map(l),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,p=c.doc;if(f?c.replaceRangeWith(d,d,s.content.firstChild):c.replaceRange(d,d,s),c.doc.eq(p))return;let m=c.doc.resolve(d);if(f&&rt.isSelectable(s.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new rt(m));else{let g=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((b,S,w,T)=>g=T),c.setSelection(D1(t,m,c.doc.resolve(g)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};mn.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&ls(t)},20))};mn.blur=(t,e)=>{let r=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),r.relatedTarget&&t.dom.contains(r.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};mn.beforeinput=(t,e)=>{if(Vr&&ts&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,_l(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in gn)mn[t]=gn[t];function bh(t,e){if(t==e)return!0;for(let r in t)if(t[r]!==e[r])return!1;for(let r in e)if(!(r in t))return!1;return!0}class ug{constructor(e,r){this.toDOM=e,this.spec=r||Fl,this.side=this.spec.side||0}map(e,r,n,i){let{pos:o,deleted:s}=e.mapResult(r.from+i,this.side<0?-1:1);return s?null:new Qt(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof ug&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&bh(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class ya{constructor(e,r){this.attrs=e,this.spec=r||Fl}map(e,r,n,i){let o=e.map(r.from+i,this.spec.inclusiveStart?-1:1)-n,s=e.map(r.to+i,this.spec.inclusiveEnd?1:-1)-n;return o>=s?null:new Qt(o,s,this)}valid(e,r){return r.from<r.to}eq(e){return this==e||e instanceof ya&&bh(this.attrs,e.attrs)&&bh(this.spec,e.spec)}static is(e){return e.type instanceof ya}destroy(){}}class j1{constructor(e,r){this.attrs=e,this.spec=r||Fl}map(e,r,n,i){let o=e.mapResult(r.from+i,1);if(o.deleted)return null;let s=e.mapResult(r.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Qt(o.pos-n,s.pos-n,this)}valid(e,r){let{index:n,offset:i}=e.content.findIndex(r.from),o;return i==r.from&&!(o=e.child(n)).isText&&i+o.nodeSize==r.to}eq(e){return this==e||e instanceof j1&&bh(this.attrs,e.attrs)&&bh(this.spec,e.spec)}destroy(){}}class Qt{constructor(e,r,n){this.from=e,this.to=r,this.type=n}copy(e,r){return new Qt(e,r,this.type)}eq(e,r=0){return this.type.eq(e.type)&&this.from+r==e.from&&this.to+r==e.to}map(e,r,n){return this.type.map(e,this,r,n)}static widget(e,r,n){return new Qt(e,e,new ug(r,n))}static inline(e,r,n,i){return new Qt(e,r,new ya(n,i))}static node(e,r,n,i){return new Qt(e,r,new j1(n,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof ya}get widget(){return this.type instanceof ug}}const _u=[],Fl={};class Tt{constructor(e,r){this.local=e.length?e:_u,this.children=r.length?r:_u}static create(e,r){return r.length?dg(r,e,0,Fl):Wr}find(e,r,n){let i=[];return this.findInner(e??0,r??1e9,i,0,n),i}findInner(e,r,n,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=r&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<r&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,r-a,n,i+a,o)}}map(e,r,n){return this==Wr||e.maps.length==0?this:this.mapInner(e,r,0,0,n||Fl)}mapInner(e,r,n,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,n,i);l&&l.type.valid(r,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?ZL(this.children,s||[],e,r,n,i,o):s?new Tt(s.sort(jl),_u):Wr}add(e,r){return r.length?this==Wr?Tt.create(e,r):this.addInner(e,r,0):this}addInner(e,r,n){let i,o=0;e.forEach((a,l)=>{let c=l+n,d;if(d=zI(r,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,d,c+1):i.splice(o,0,l,l+a.nodeSize,dg(d,a,c+1,Fl)),o+=3}});let s=BI(o?HI(r):r,-n);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Tt(s.length?this.local.concat(s).sort(jl):this.local,i||this.children)}remove(e){return e.length==0||this==Wr?this:this.removeInner(e,0)}removeInner(e,r){let n=this.children,i=this.local;for(let o=0;o<n.length;o+=3){let s,a=n[o]+r,l=n[o+1]+r;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>a&&f.to<l&&(e[d]=null,(s||(s=[])).push(f));if(!s)continue;n==this.children&&(n=this.children.slice());let c=n[o+2].removeInner(s,a+1);c!=Wr?n[o+2]=c:(n.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,r)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return n==this.children&&i==this.local?this:i.length||n.length?new Tt(i,n):Wr}forChild(e,r){if(this==Wr)return this;if(r.isLeaf)return Tt.empty;let n,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(n=this.children[a+2]);break}let o=e+1,s=o+r.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof ya){let c=Math.max(o,l.from)-o,d=Math.min(s,l.to)-o;c<d&&(i||(i=[])).push(l.copy(c,d))}}if(i){let a=new Tt(i.sort(jl),_u);return n?new sa([a,n]):a}return n||Wr}eq(e){if(this==e)return!0;if(!(e instanceof Tt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let r=0;r<this.local.length;r++)if(!this.local[r].eq(e.local[r]))return!1;for(let r=0;r<this.children.length;r+=3)if(this.children[r]!=e.children[r]||this.children[r+1]!=e.children[r+1]||!this.children[r+2].eq(e.children[r+2]))return!1;return!0}locals(e){return B1(this.localsInner(e))}localsInner(e){if(this==Wr)return _u;if(e.inlineContent||!this.local.some(ya.is))return this.local;let r=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof ya||r.push(this.local[n]);return r}forEachSet(e){e(this)}}Tt.empty=new Tt([],[]);Tt.removeOverlap=B1;const Wr=Tt.empty;class sa{constructor(e){this.members=e}map(e,r){const n=this.members.map(i=>i.map(e,r,Fl));return sa.from(n)}forChild(e,r){if(r.isLeaf)return Tt.empty;let n=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,r);o!=Wr&&(o instanceof sa?n=n.concat(o.members):n.push(o))}return sa.from(n)}eq(e){if(!(e instanceof sa)||e.members.length!=this.members.length)return!1;for(let r=0;r<this.members.length;r++)if(!this.members[r].eq(e.members[r]))return!1;return!0}locals(e){let r,n=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!r)r=o;else{n&&(r=r.slice(),n=!1);for(let s=0;s<o.length;s++)r.push(o[s])}}return r?B1(n?r:r.sort(jl)):_u}static from(e){switch(e.length){case 0:return Wr;case 1:return e[0];default:return new sa(e.every(r=>r instanceof Tt)?e:e.reduce((r,n)=>r.concat(n instanceof Tt?n:n.members),[]))}}forEachSet(e){for(let r=0;r<this.members.length;r++)this.members[r].forEachSet(e)}}function ZL(t,e,r,n,i,o,s){let a=t.slice();for(let c=0,d=o;c<r.maps.length;c++){let f=0;r.maps[c].forEach((p,m,g,b)=>{let S=b-g-(m-p);for(let w=0;w<a.length;w+=3){let T=a[w+1];if(T<0||p>T+d-f)continue;let M=a[w]+d-f;m>=M?a[w+1]=p<=M?-2:-1:p>=d&&S&&(a[w]+=S,a[w+1]+=S)}f+=S}),d=r.maps[c].map(d,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let d=r.map(t[c]+o),f=d-i;if(f<0||f>=n.content.size){l=!0;continue}let p=r.map(t[c+1]+o,-1),m=p-i,{index:g,offset:b}=n.content.findIndex(f),S=n.maybeChild(g);if(S&&b==f&&b+S.nodeSize==m){let w=a[c+2].mapInner(r,S,d+1,t[c]+o+1,s);w!=Wr?(a[c]=f,a[c+1]=m,a[c+2]=w):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=QL(a,t,e,r,i,o,s),d=dg(c,n,0,s);e=d.local;for(let f=0;f<a.length;f+=3)a[f+1]<0&&(a.splice(f,3),f-=3);for(let f=0,p=0;f<d.children.length;f+=3){let m=d.children[f];for(;p<a.length&&a[p]<m;)p+=3;a.splice(p,0,d.children[f],d.children[f+1],d.children[f+2])}}return new Tt(e.sort(jl),a)}function BI(t,e){if(!e||!t.length)return t;let r=[];for(let n=0;n<t.length;n++){let i=t[n];r.push(new Qt(i.from+e,i.to+e,i.type))}return r}function QL(t,e,r,n,i,o,s){function a(l,c){for(let d=0;d<l.local.length;d++){let f=l.local[d].map(n,i,c);f?r.push(f):s.onRemove&&s.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)a(l.children[d+2],l.children[d]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+o+1);return r}function zI(t,e,r){if(e.isLeaf)return null;let n=r+e.nodeSize,i=null;for(let o=0,s;o<t.length;o++)(s=t[o])&&s.from>r&&s.to<n&&((i||(i=[])).push(s),t[o]=null);return i}function HI(t){let e=[];for(let r=0;r<t.length;r++)t[r]!=null&&e.push(t[r]);return e}function dg(t,e,r,n){let i=[],o=!1;e.forEach((a,l)=>{let c=zI(t,a,l+r);if(c){o=!0;let d=dg(c,a,r+l+1,n);d!=Wr&&i.push(l,l+a.nodeSize,d)}});let s=BI(o?HI(t):t,-r).sort(jl);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(n.onRemove&&n.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Tt(s,i):Wr}function jl(t,e){return t.from-e.from||t.to-e.to}function B1(t){let e=t;for(let r=0;r<e.length-1;r++){let n=e[r];if(n.from!=n.to)for(let i=r+1;i<e.length;i++){let o=e[i];if(o.from==n.from){o.to!=n.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,n.to),c_(e,i+1,o.copy(n.to,o.to)));continue}else{o.from<n.to&&(e==t&&(e=t.slice()),e[r]=n.copy(n.from,o.from),c_(e,i,n.copy(o.from,n.to)));break}}}return e}function c_(t,e,r){for(;e<t.length&&jl(r,t[e])>0;)e++;t.splice(e,0,r)}function Tb(t){let e=[];return t.someProp("decorations",r=>{let n=r(t.state);n&&n!=Wr&&e.push(n)}),t.cursorWrapper&&e.push(Tt.create(t.state.doc,[t.cursorWrapper.deco])),sa.from(e)}const e5={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},t5=On&&ma<=11;class r5{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 n5{constructor(e,r){this.view=e,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new r5,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;i<n.length;i++)this.queue.push(n[i]);On&&ma<=11&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),t5&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,e5)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let r=0;r<e.length;r++)this.queue.push(e[r]);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(t_(this.view)){if(this.suppressingSelectionUpdates)return ls(this.view);if(On&&ma<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Wl(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let r=new Set,n;for(let o=e.focusNode;o;o=gh(o))r.add(o);for(let o=e.anchorNode;o;o=gh(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&t_(e)&&!this.ignoreSelectionChange(n),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let d=0;d<r.length;d++){let f=this.registerMutation(r[d],l);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(a=!0))}if(zi&&l.length){let d=l.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,p]=d;f.parentNode&&f.parentNode.parentNode==p.parentNode?p.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let p of d){let m=p.parentNode;m&&m.nodeName=="LI"&&(!f||s5(e,f)!=m)&&p.remove()}}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ry(n)&&(c=N1(e))&&c.eq(ot.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ls(e),this.currentSelection.set(n),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),i5(e)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||ls(e),this.currentSelection.set(n))}registerMutation(e,r){if(r.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let f=e.addedNodes[d];r.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let i=e.previousSibling,o=e.nextSibling;if(On&&ma<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:p}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(o=p)}let s=i&&i.parentNode==e.target?Fr(i)+1:0,a=n.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?Fr(o):e.target.childNodes.length,c=n.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let u_=new WeakMap,d_=!1;function i5(t){if(!u_.has(t)&&(u_.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=zi,d_)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."),d_=!0}}function f_(t,e){let r=e.startContainer,n=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return Wl(s.node,s.offset,i,o)&&([r,n,i,o]=[i,o,r,n]),{anchorNode:r,anchorOffset:n,focusNode:i,focusOffset:o}}function o5(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return f_(t,i)}let r;function n(i){i.preventDefault(),i.stopImmediatePropagation(),r=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",n,!0),r?f_(t,r):null}function s5(t,e){for(let r=e.parentNode;r&&r!=t.dom;r=r.parentNode){let n=t.docView.nearestDesc(r,!0);if(n&&n.node.isBlock)return r}return null}function a5(t,e,r){let{node:n,fromOffset:i,toOffset:o,from:s,to:a}=t.docView.parseRange(e,r),l=t.domSelectionRange(),c,d=l.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:l.anchorOffset}],Ry(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Vr&&t.input.lastKeyCode===8)for(let S=o;S>i;S--){let w=n.childNodes[S-1],T=w.pmViewDesc;if(w.nodeName=="BR"&&!T){o=S;break}if(!T||T.size)break}let f=t.state.doc,p=t.someProp("domParser")||Yf.fromSchema(t.state.schema),m=f.resolve(s),g=null,b=p.parse(n,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:i,to:o,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:l5,context:m});if(c&&c[0].pos!=null){let S=c[0].pos,w=c[1]&&c[1].pos;w==null&&(w=S),g={anchor:S+s,head:w+s}}return{doc:b,sel:g,from:s,to:a}}function l5(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(pn&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(t.parentNode.lastChild==t||pn&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const c5=/^(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 u5(t,e,r,n,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let P=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,fe=N1(t,P);if(fe&&!t.state.selection.eq(fe)){if(Vr&&ts&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",U=>U(t,_l(13,"Enter"))))return;let de=t.state.tr.setSelection(fe);P=="pointer"?de.setMeta("pointer",!0):P=="key"&&de.scrollIntoView(),o&&de.setMeta("composition",o),t.dispatch(de)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(r);e=s.before(a+1),r=t.state.doc.resolve(r).after(a+1);let l=t.state.selection,c=a5(t,e,r),d=t.state.doc,f=d.slice(c.from,c.to),p,m;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(p=t.state.selection.to,m="end"):(p=t.state.selection.from,m="start"),t.input.lastKeyCode=null;let g=h5(f.content,c.doc.content,c.from,p,m);if(g&&t.input.domChangeCount++,(Xu&&t.input.lastIOSEnter>Date.now()-225||ts)&&i.some(P=>P.nodeType==1&&!c5.test(P.nodeName))&&(!g||g.endA>=g.endB)&&t.someProp("handleKeyDown",P=>P(t,_l(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!g)if(n&&l instanceof et&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))g={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let P=h_(t,t.state.doc,c.sel);if(P&&!P.eq(t.state.selection)){let fe=t.state.tr.setSelection(P);o&&fe.setMeta("composition",o),t.dispatch(fe)}}return}t.state.selection.from<t.state.selection.to&&g.start==g.endB&&t.state.selection instanceof et&&(g.start>t.state.selection.from&&g.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?g.start=t.state.selection.from:g.endA<t.state.selection.to&&g.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(g.endB+=t.state.selection.to-g.endA,g.endA=t.state.selection.to)),On&&ma<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)=="  "&&(g.start--,g.endA--,g.endB--);let b=c.doc.resolveNoCache(g.start-c.from),S=c.doc.resolveNoCache(g.endB-c.from),w=d.resolve(g.start),T=b.sameParent(S)&&b.parent.inlineContent&&w.end()>=g.endA,M;if((Xu&&t.input.lastIOSEnter>Date.now()-225&&(!T||i.some(P=>P.nodeName=="DIV"||P.nodeName=="P"))||!T&&b.pos<c.doc.content.size&&!b.sameParent(S)&&(M=ot.findFrom(c.doc.resolve(b.pos+1),1,!0))&&M.head==S.pos)&&t.someProp("handleKeyDown",P=>P(t,_l(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>g.start&&f5(d,g.start,g.endA,b,S)&&t.someProp("handleKeyDown",P=>P(t,_l(8,"Backspace")))){ts&&Vr&&t.domObserver.suppressSelectionUpdates();return}Vr&&g.endB==g.start&&(t.input.lastChromeDelete=Date.now()),ts&&!T&&b.start()!=S.start()&&S.parentOffset==0&&b.depth==S.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,S=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(P){return P(t,_l(13,"Enter"))})},20));let j=g.start,$=g.endA,W,Y,ee;if(T){if(b.pos==S.pos)On&&ma<=11&&b.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ls(t),20)),W=t.state.tr.delete(j,$),Y=d.resolve(g.start).marksAcross(d.resolve(g.endA));else if(g.endA==g.endB&&(ee=d5(b.parent.content.cut(b.parentOffset,S.parentOffset),w.parent.content.cut(w.parentOffset,g.endA-w.start()))))W=t.state.tr,ee.type=="add"?W.addMark(j,$,ee.mark):W.removeMark(j,$,ee.mark);else if(b.parent.child(b.index()).isText&&b.index()==S.index()-(S.textOffset?0:1)){let P=b.parent.textBetween(b.parentOffset,S.parentOffset);if(t.someProp("handleTextInput",fe=>fe(t,j,$,P)))return;W=t.state.tr.insertText(P,j,$)}}if(W||(W=t.state.tr.replace(j,$,c.doc.slice(g.start-c.from,g.endB-c.from))),c.sel){let P=h_(t,W.doc,c.sel);P&&!(Vr&&t.composing&&P.empty&&(g.start!=g.endB||t.input.lastChromeDelete<Date.now()-100)&&(P.head==j||P.head==W.mapping.map($)-1)||On&&P.empty&&P.head==j)&&W.setSelection(P)}Y&&W.ensureMarks(Y),o&&W.setMeta("composition",o),t.dispatch(W.scrollIntoView())}function h_(t,e,r){return Math.max(r.anchor,r.head)>e.content.size?null:D1(t,e.resolve(r.anchor),e.resolve(r.head))}function d5(t,e){let r=t.firstChild.marks,n=e.firstChild.marks,i=r,o=n,s,a,l;for(let d=0;d<n.length;d++)i=n[d].removeFromSet(i);for(let d=0;d<r.length;d++)o=r[d].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],s="add",l=d=>d.mark(a.addToSet(d.marks));else if(i.length==0&&o.length==1)a=o[0],s="remove",l=d=>d.mark(a.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(l(e.child(d)));if(Le.from(c).eq(t))return{mark:a,type:s}}function f5(t,e,r,n,i){if(r-e<=i.pos-n.pos||Ab(n,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!n.parent.isTextblock){let a=o.nodeAfter;return a!=null&&r==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(Ab(o,!0,!0));return!s.parent.isTextblock||s.pos>r||Ab(s,!0,!1)<r?!1:n.parent.content.cut(n.parentOffset).eq(s.parent.content)}function Ab(t,e,r){let n=t.depth,i=e?t.end():t.pos;for(;n>0&&(e||t.indexAfter(n)==t.node(n).childCount);)n--,i++,e=!1;if(r){let o=t.node(n).maybeChild(t.indexAfter(n));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function h5(t,e,r,n,i){let o=t.findDiffStart(e,r);if(o==null)return null;let{a:s,b:a}=t.findDiffEnd(e,r+t.size,r+e.size);if(i=="end"){let l=Math.max(0,o-Math.min(s,a));n-=s+l-o}if(s<o&&t.size<e.size){let l=n<=o&&n>=s?o-n:0;o-=l,o&&o<e.size&&p_(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-s),s=o}else if(a<o){let l=n<=o&&n>=a?o-n:0;o-=l,o&&o<t.size&&p_(t.textBetween(o-1,o+1))&&(o+=l?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function p_(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),r=t.charCodeAt(1);return e>=56320&&e<=57343&&r>=55296&&r<=56319}class p5{constructor(e,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new NL,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(b_),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=y_(this),g_(this),this.nodeViews=v_(this),this.docView=Xk(this.state.doc,m_(this),Tb(this),this.dom,this),this.domObserver=new n5(this,(n,i,o,s)=>u5(this,n,i,o,s)),this.domObserver.start(),DL(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let r in e)this._props[r]=e[r];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&q0(this);let r=this._props;this._props=e,e.plugins&&(e.plugins.forEach(b_),this.directPlugins=e.plugins),this.updateStateInner(e.state,r)}setProps(e){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in e)r[n]=e[n];this.update(r)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,r){var n;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(PI(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=r.plugins;if(a||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let m=v_(this);g5(m,this.nodeViews)&&(this.nodeViews=m,o=!0)}(a||r.handleDOMEvents!=this._props.handleDOMEvents)&&q0(this),this.editable=y_(this),g_(this);let l=Tb(this),c=m_(this),d=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,c,l);(f||!e.selection.eq(i.selection))&&(s=!0);let p=d=="preserve"&&s&&this.dom.style.overflowAnchor==null&&q2(this);if(s){this.domObserver.stop();let m=f&&(On||Vr)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&m5(i.selection,e.selection);if(f){let g=Vr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=KL(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Xk(e.doc,c,l,this.dom,this)),g&&!this.trackWrites&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&vL(this))?ls(this,m):(SI(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():p&&X2(p)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof rt){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&Uk(this,r.getBoundingClientRect(),e)}else Uk(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r<this.directPlugins.length;r++){let n=this.directPlugins[r];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let r=0;r<this.state.plugins.length;r++){let n=this.state.plugins[r];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let r=0;r<this.pluginViews.length;r++){let n=this.pluginViews[r];n.update&&n.update(this,e)}}updateDraggedNode(e,r){let n=e.node,i=-1;if(this.state.doc.nodeAt(n.from)==n.node)i=n.from;else{let o=n.from+(this.state.doc.content.size-r.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==n.node&&(i=o)}this.dragging=new FI(e.slice,e.move,i<0?void 0:rt.create(this.state.doc,i))}someProp(e,r){let n=this._props&&this._props[e],i;if(n!=null&&(i=r?r(n):n))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(i=r?r(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=r?r(a):a))return i}}hasFocus(){if(On){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&&Y2(this.dom),ls(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let r=this.dom.parentNode;r;r=r.parentNode)if(r.nodeType==9||r.nodeType==11&&r.host)return r.getSelection||(Object.getPrototypeOf(r).getSelection=()=>r.ownerDocument.getSelection()),this._root=r}return e||document}updateRoot(){this._root=null}posAtCoords(e){return tL(this,e)}coordsAtPos(e,r=1){return pI(this,e,r)}domAtPos(e,r=0){return this.docView.domFromPos(e,r)}nodeDOM(e){let r=this.docView.descAt(e);return r?r.nodeDOM:null}posAtDOM(e,r,n=-1){let i=this.docView.posFromDOM(e,r,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,r){return sL(this,r||this.state,e)}pasteHTML(e,r){return vh(this,"",e,!1,r||new ClipboardEvent("paste"))}pasteText(e,r){return vh(this,e,null,!0,r||new ClipboardEvent("paste"))}destroy(){this.docView&&(PL(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Tb(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,F2())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return FL(this,e)}dispatch(e){let r=this._props.dispatchTransaction;r?r.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?pn&&this.root.nodeType===11&&$2(this.dom.ownerDocument)==this.dom&&o5(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function m_(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(t.state)),r)for(let n in r)n=="class"?e.class+=" "+r[n]:n=="style"?e.style=(e.style?e.style+";":"")+r[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(r[n]))}),e.translate||(e.translate="no"),[Qt.node(0,t.state.doc.content.size,e)]}function g_(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Qt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function y_(t){return!t.someProp("editable",e=>e(t.state)===!1)}function m5(t,e){let r=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(r)!=e.$anchor.start(r)}function v_(t){let e=Object.create(null);function r(n){for(let i in n)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=n[i])}return t.someProp("nodeViews",r),t.someProp("markViews",r),e}function g5(t,e){let r=0,n=0;for(let i in t){if(t[i]!=e[i])return!0;r++}for(let i in e)n++;return r!=n}function b_(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var ba={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:"'"},fg={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},y5=typeof navigator<"u"&&/Mac/.test(navigator.platform),v5=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var jr=0;jr<10;jr++)ba[48+jr]=ba[96+jr]=String(jr);for(var jr=1;jr<=24;jr++)ba[jr+111]="F"+jr;for(var jr=65;jr<=90;jr++)ba[jr]=String.fromCharCode(jr+32),fg[jr]=String.fromCharCode(jr);for(var Rb in ba)fg.hasOwnProperty(Rb)||(fg[Rb]=ba[Rb]);function b5(t){var e=y5&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||v5&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",r=!e&&t.key||(t.shiftKey?fg:ba)[t.keyCode]||t.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const w5=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function x5(t){let e=t.split(/-(?!$)/),r=e[e.length-1];r=="Space"&&(r=" ");let n,i,o,s;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))w5?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(r="Alt-"+r),i&&(r="Ctrl-"+r),s&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function S5(t){let e=Object.create(null);for(let r in t)e[x5(r)]=t[r];return e}function Ib(t,e,r=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),r&&e.shiftKey&&(t="Shift-"+t),t}function k5(t){return new _t({props:{handleKeyDown:z1(t)}})}function z1(t){let e=S5(t);return function(r,n){let i=b5(n),o,s=e[Ib(i,n)];if(s&&s(r.state,r.dispatch,r))return!0;if(i.length==1&&i!=" "){if(n.shiftKey){let a=e[Ib(i,n,!1)];if(a&&a(r.state,r.dispatch,r))return!0}if((n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(o=ba[n.keyCode])&&o!=i){let a=e[Ib(o,n)];if(a&&a(r.state,r.dispatch,r))return!0}}return!1}}const Uh=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function $I(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("backward",t):r.parentOffset>0)?null:r}const _5=(t,e,r)=>{let n=$I(t,r);if(!n)return!1;let i=H1(n);if(!i){let s=n.blockRange(),a=s&&yd(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(GI(t,i,e,-1))return!0;if(n.parent.content.size==0&&(Yu(o,"end")||rt.isSelectable(o)))for(let s=n.depth;;s--){let a=Ty(t.doc,n.before(s),n.after(s),qe.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Yu(o,"end")?ot.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):rt.create(l.doc,i.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(s==1||n.node(s-1).childCount>1)break}return o.isAtom&&i.depth==n.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},E5=(t,e,r)=>{let n=$I(t,r);if(!n)return!1;let i=H1(n);return i?UI(t,i,e):!1},C5=(t,e,r)=>{let n=WI(t,r);if(!n)return!1;let i=$1(n);return i?UI(t,i,e):!1};function UI(t,e,r){let n=e.nodeBefore,i=n,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let d=i.lastChild;if(!d)return!1;i=d}let s=e.nodeAfter,a=s,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let d=a.firstChild;if(!d)return!1;a=d}let c=Ty(t.doc,o,l,qe.empty);if(!c||c.from!=o||c instanceof kr&&c.slice.size>=l-o)return!1;if(r){let d=t.tr.step(c);d.setSelection(et.create(d.doc,o)),r(d.scrollIntoView())}return!0}function Yu(t,e,r=!1){for(let n=t;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const T5=(t,e,r)=>{let{$head:n,empty:i}=t.selection,o=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",t):n.parentOffset>0)return!1;o=H1(n)}let s=o&&o.nodeBefore;return!s||!rt.isSelectable(s)?!1:(e&&e(t.tr.setSelection(rt.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function H1(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function WI(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)?null:r}const A5=(t,e,r)=>{let n=WI(t,r);if(!n)return!1;let i=$1(n);if(!i)return!1;let o=i.nodeAfter;if(GI(t,i,e,1))return!0;if(n.parent.content.size==0&&(Yu(o,"start")||rt.isSelectable(o))){let s=Ty(t.doc,n.before(),n.after(),qe.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(Yu(o,"start")?ot.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):rt.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==n.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},R5=(t,e,r)=>{let{$head:n,empty:i}=t.selection,o=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)return!1;o=$1(n)}let s=o&&o.nodeAfter;return!s||!rt.isSelectable(s)?!1:(e&&e(t.tr.setSelection(rt.create(t.doc,o.pos)).scrollIntoView()),!0)};function $1(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let r=t.node(e);if(t.index(e)+1<r.childCount)return t.doc.resolve(t.after(e+1));if(r.type.spec.isolating)break}return null}const I5=(t,e)=>{let r=t.selection,n=r instanceof rt,i;if(n){if(r.node.isTextblock||!Ea(t.doc,r.from))return!1;i=r.from}else if(i=Cy(t.doc,r.from,-1),i==null)return!1;if(e){let o=t.tr.join(i);n&&o.setSelection(rt.create(o.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},O5=(t,e)=>{let r=t.selection,n;if(r instanceof rt){if(r.node.isTextblock||!Ea(t.doc,r.to))return!1;n=r.to}else if(n=Cy(t.doc,r.to,1),n==null)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0},M5=(t,e)=>{let{$from:r,$to:n}=t.selection,i=r.blockRange(n),o=i&&yd(i);return o==null?!1:(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)},N5=(t,e)=>{let{$head:r,$anchor:n}=t.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(e&&e(t.tr.insertText(`
10
+ `).scrollIntoView()),!0)};function VI(t){for(let e=0;e<t.edgeCount;e++){let{type:r}=t.edge(e);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}const D5=(t,e)=>{let{$head:r,$anchor:n}=t.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),o=r.indexAfter(-1),s=VI(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=r.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(ot.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},P5=(t,e)=>{let r=t.selection,{$from:n,$to:i}=r;if(r instanceof Gn||n.parent.inlineContent||i.parent.inlineContent)return!1;let o=VI(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!n.parentOffset&&i.index()<i.parent.childCount?n:i).pos,a=t.tr.insert(s,o.createAndFill());a.setSelection(et.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},L5=(t,e)=>{let{$cursor:r}=t.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let o=r.before();if(Du(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let n=r.blockRange(),i=n&&yd(n);return i==null?!1:(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)},F5=(t,e)=>{let{$from:r,to:n}=t.selection,i,o=r.sharedDepth(n);return o==0?!1:(i=r.before(o),e&&e(t.tr.setSelection(rt.create(t.doc,i))),!0)};function j5(t,e,r){let n=e.nodeBefore,i=e.nodeAfter,o=e.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&e.parent.canReplace(o-1,o)?(r&&r(t.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||Ea(t.doc,e.pos))?!1:(r&&r(t.tr.join(e.pos).scrollIntoView()),!0)}function GI(t,e,r,n){let i=e.nodeBefore,o=e.nodeAfter,s,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&j5(t,e,r))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(r){let m=e.pos+o.nodeSize,g=Le.empty;for(let w=s.length-1;w>=0;w--)g=Le.from(s[w].create(null,g));g=Le.from(i.copy(g));let b=t.tr.step(new _r(e.pos-1,m,e.pos,m,new qe(g,1,0),s.length,!0)),S=b.doc.resolve(m+2*s.length);S.nodeAfter&&S.nodeAfter.type==i.type&&Ea(b.doc,S.pos)&&b.join(S.pos),r(b.scrollIntoView())}return!0}let d=o.type.spec.isolating||n>0&&l?null:ot.findFrom(e,1),f=d&&d.$from.blockRange(d.$to),p=f&&yd(f);if(p!=null&&p>=e.depth)return r&&r(t.tr.lift(f,p).scrollIntoView()),!0;if(c&&Yu(o,"start",!0)&&Yu(i,"end")){let m=i,g=[];for(;g.push(m),!m.isTextblock;)m=m.lastChild;let b=o,S=1;for(;!b.isTextblock;b=b.firstChild)S++;if(m.canReplace(m.childCount,m.childCount,b.content)){if(r){let w=Le.empty;for(let M=g.length-1;M>=0;M--)w=Le.from(g[M].copy(w));let T=t.tr.step(new _r(e.pos-g.length,e.pos+o.nodeSize,e.pos+S,e.pos+o.nodeSize-S,new qe(w,g.length,0),0,!0));r(T.scrollIntoView())}return!0}}return!1}function KI(t){return function(e,r){let n=e.selection,i=t<0?n.$from:n.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(r&&r(e.tr.setSelection(et.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const B5=KI(-1),z5=KI(1);function H5(t,e=null){return function(r,n){let{$from:i,$to:o}=r.selection,s=i.blockRange(o),a=s&&A1(s,t,e);return a?(n&&n(r.tr.wrap(s,a).scrollIntoView()),!0):!1}}function w_(t,e=null){return function(r,n){let i=!1;for(let o=0;o<r.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=r.selection.ranges[o];r.doc.nodesBetween(s,a,(l,c)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let d=r.doc.resolve(c),f=d.index();i=d.parent.canReplaceWith(f,f+1,t)}})}if(!i)return!1;if(n){let o=r.tr;for(let s=0;s<r.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=r.selection.ranges[s];o.setBlockType(a,l,t,e)}n(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function $5(t,e=null){return function(r,n){let{$from:i,$to:o}=r.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(t)&&s.startIndex==0){if(i.index(s.depth-1)==0)return!1;let d=r.doc.resolve(s.start-2);l=new hh(d,d,s.depth),s.endIndex<s.parent.childCount&&(s=new hh(i,r.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let c=A1(l,t,e,s);return c?(n&&n(U5(r.tr,s,c,a,t).scrollIntoView()),!0):!1}}function U5(t,e,r,n,i){let o=Le.empty;for(let d=r.length-1;d>=0;d--)o=Le.from(r[d].type.create(r[d].attrs,o));t.step(new _r(e.start-(n?2:0),e.end,e.start,e.end,new qe(o,0,0),r.length,!0));let s=0;for(let d=0;d<r.length;d++)r[d].type==i&&(s=d+1);let a=r.length-s,l=e.start+r.length-(n?2:0),c=e.parent;for(let d=e.startIndex,f=e.endIndex,p=!0;d<f;d++,p=!1)!p&&Du(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(d).nodeSize;return t}function W5(t){return function(e,r){let{$from:n,$to:i}=e.selection,o=n.blockRange(i,s=>s.childCount>0&&s.firstChild.type==t);return o?r?n.node(o.depth-1).type==t?V5(e,r,t,o):G5(e,r,o):!0:!1}}function V5(t,e,r,n){let i=t.tr,o=n.end,s=n.$to.end(n.depth);o<s&&(i.step(new _r(o-1,s,o,s,new qe(Le.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new hh(i.doc.resolve(n.$from.pos),i.doc.resolve(s),n.depth));const a=yd(n);if(a==null)return!1;i.lift(n,a);let l=i.mapping.map(o,-1)-1;return Ea(i.doc,l)&&i.join(l),e(i.scrollIntoView()),!0}function G5(t,e,r){let n=t.tr,i=r.parent;for(let m=r.end,g=r.endIndex-1,b=r.startIndex;g>b;g--)m-=i.child(g).nodeSize,n.delete(m-1,m+1);let o=n.doc.resolve(r.start),s=o.nodeAfter;if(n.mapping.map(r.end)!=r.start+o.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==i.childCount,c=o.node(-1),d=o.index(-1);if(!c.canReplace(d+(a?0:1),d+1,s.content.append(l?Le.empty:Le.from(i))))return!1;let f=o.pos,p=f+s.nodeSize;return n.step(new _r(f-(a?1:0),p+(l?1:0),f+1,p-1,new qe((a?Le.empty:Le.from(i.copy(Le.empty))).append(l?Le.empty:Le.from(i.copy(Le.empty))),a?0:1,l?0:1),a?0:1)),e(n.scrollIntoView()),!0}function K5(t){return function(e,r){let{$from:n,$to:i}=e.selection,o=n.blockRange(i,c=>c.childCount>0&&c.firstChild.type==t);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=t)return!1;if(r){let c=l.lastChild&&l.lastChild.type==a.type,d=Le.from(c?t.create():null),f=new qe(Le.from(t.create(null,Le.from(a.type.create(null,d)))),c?3:1,0),p=o.start,m=o.end;r(e.tr.step(new _r(p-(c?3:1),m,p,m,f,1,!0)).scrollIntoView())}return!0}}function My(t){const{state:e,transaction:r}=t;let{selection:n}=r,{doc:i}=r,{storedMarks:o}=r;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return n},get doc(){return i},get tr(){return n=r.selection,i=r.doc,o=r.storedMarks,r}}}class Ny{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:r,state:n}=this,{view:i}=r,{tr:o}=n,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...d)=>{const f=l(...d)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,r=!0){const{rawCommands:n,editor:i,state:o}=this,{view:s}=i,a=[],l=!!e,c=e||o.tr,d=()=>(!l&&r&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(p=>p===!0)),f={...Object.fromEntries(Object.entries(n).map(([p,m])=>[p,(...b)=>{const S=this.buildProps(c,r),w=m(...b)(S);return a.push(w),f}])),run:d};return f}createCan(e){const{rawCommands:r,state:n}=this,i=!1,o=e||n.tr,s=this.buildProps(o,i);return{...Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...d)=>c(...d)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,i)}}buildProps(e,r=!0){const{rawCommands:n,editor:i,state:o}=this,{view:s}=i,a={tr:e,editor:i,view:s,state:My({state:o,transaction:e}),dispatch:r?()=>{}:void 0,chain:()=>this.createChain(e,r),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...d)=>c(...d)(a)]))}};return a}}let q5=class{constructor(){this.callbacks={}}on(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),this}emit(e,...r){const n=this.callbacks[e];return n&&n.forEach(i=>i.apply(this,r)),this}off(e,r){const n=this.callbacks[e];return n&&(r?this.callbacks[e]=n.filter(i=>i!==r):delete this.callbacks[e]),this}once(e,r){const n=(...i)=>{this.off(e,n),r.apply(this,i)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}};function Ze(t,e,r){return t.config[e]===void 0&&t.parent?Ze(t.parent,e,r):typeof t.config[e]=="function"?t.config[e].bind({...r,parent:t.parent?Ze(t.parent,e,r):null}):t.config[e]}function Dy(t){const e=t.filter(i=>i.type==="extension"),r=t.filter(i=>i.type==="node"),n=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:r,markExtensions:n}}function qI(t){const e=[],{nodeExtensions:r,markExtensions:n}=Dy(t),i=[...r,...n],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage,extensions:i},l=Ze(s,"addGlobalAttributes",a);if(!l)return;l().forEach(d=>{d.types.forEach(f=>{Object.entries(d.attributes).forEach(([p,m])=>{e.push({type:f,name:p,attribute:{...o,...m}})})})})}),i.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=Ze(s,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([d,f])=>{const p={...o,...f};typeof(p==null?void 0:p.default)=="function"&&(p.default=p.default()),p!=null&&p.isRequired&&(p==null?void 0:p.default)===void 0&&delete p.default,e.push({type:s.name,name:d,attribute:p})})}),e}function Cr(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function lt(...t){return t.filter(e=>!!e).reduce((e,r)=>{const n={...e};return Object.entries(r).forEach(([i,o])=>{if(!n[i]){n[i]=o;return}if(i==="class"){const a=o?o.split(" "):[],l=n[i]?n[i].split(" "):[],c=a.filter(d=>!l.includes(d));n[i]=[...l,...c].join(" ")}else if(i==="style"){const a=o?o.split(";").map(d=>d.trim()).filter(Boolean):[],l=n[i]?n[i].split(";").map(d=>d.trim()).filter(Boolean):[],c=new Map;l.forEach(d=>{const[f,p]=d.split(":").map(m=>m.trim());c.set(f,p)}),a.forEach(d=>{const[f,p]=d.split(":").map(m=>m.trim());c.set(f,p)}),n[i]=Array.from(c.entries()).map(([d,f])=>`${d}: ${f}`).join("; ")}else n[i]=o}),n},{})}function hg(t,e){return e.filter(r=>r.type===t.type.name).filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(t.attrs)||{}:{[r.name]:t.attrs[r.name]}).reduce((r,n)=>lt(r,n),{})}function XI(t){return typeof t=="function"}function dt(t,e=void 0,...r){return XI(t)?e?t.bind(e)(...r):t(...r):t}function X5(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Y5(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function x_(t,e){return"style"in t?t:{...t,getAttrs:r=>{const n=t.getAttrs?t.getAttrs(r):t.attrs;if(n===!1)return!1;const i=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(r):Y5(r.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...n,...i}}}}function S_(t){return Object.fromEntries(Object.entries(t).filter(([e,r])=>e==="attrs"&&X5(r)?!1:r!=null))}function J5(t,e){var r;const n=qI(t),{nodeExtensions:i,markExtensions:o}=Dy(t),s=(r=i.find(c=>Ze(c,"topNode")))===null||r===void 0?void 0:r.name,a=Object.fromEntries(i.map(c=>{const d=n.filter(w=>w.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},p=t.reduce((w,T)=>{const M=Ze(T,"extendNodeSchema",f);return{...w,...M?M(c):{}}},{}),m=S_({...p,content:dt(Ze(c,"content",f)),marks:dt(Ze(c,"marks",f)),group:dt(Ze(c,"group",f)),inline:dt(Ze(c,"inline",f)),atom:dt(Ze(c,"atom",f)),selectable:dt(Ze(c,"selectable",f)),draggable:dt(Ze(c,"draggable",f)),code:dt(Ze(c,"code",f)),whitespace:dt(Ze(c,"whitespace",f)),linebreakReplacement:dt(Ze(c,"linebreakReplacement",f)),defining:dt(Ze(c,"defining",f)),isolating:dt(Ze(c,"isolating",f)),attrs:Object.fromEntries(d.map(w=>{var T;return[w.name,{default:(T=w==null?void 0:w.attribute)===null||T===void 0?void 0:T.default}]}))}),g=dt(Ze(c,"parseHTML",f));g&&(m.parseDOM=g.map(w=>x_(w,d)));const b=Ze(c,"renderHTML",f);b&&(m.toDOM=w=>b({node:w,HTMLAttributes:hg(w,d)}));const S=Ze(c,"renderText",f);return S&&(m.toText=S),[c.name,m]})),l=Object.fromEntries(o.map(c=>{const d=n.filter(S=>S.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},p=t.reduce((S,w)=>{const T=Ze(w,"extendMarkSchema",f);return{...S,...T?T(c):{}}},{}),m=S_({...p,inclusive:dt(Ze(c,"inclusive",f)),excludes:dt(Ze(c,"excludes",f)),group:dt(Ze(c,"group",f)),spanning:dt(Ze(c,"spanning",f)),code:dt(Ze(c,"code",f)),attrs:Object.fromEntries(d.map(S=>{var w;return[S.name,{default:(w=S==null?void 0:S.attribute)===null||w===void 0?void 0:w.default}]}))}),g=dt(Ze(c,"parseHTML",f));g&&(m.parseDOM=g.map(S=>x_(S,d)));const b=Ze(c,"renderHTML",f);return b&&(m.toDOM=S=>b({mark:S,HTMLAttributes:hg(S,d)})),[c.name,m]}));return new WR({topNode:s,nodes:a,marks:l})}function Ob(t,e){return e.nodes[t]||e.marks[t]||null}function k_(t,e){return Array.isArray(e)?e.some(r=>(typeof r=="string"?r:r.name)===t.name):e}function U1(t,e){const r=rc.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}const Z5=(t,e=500)=>{let r="";const n=t.parentOffset;return t.parent.nodesBetween(Math.max(0,n-e),n,(i,o,s,a)=>{var l,c;const d=((c=(l=i.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:i,pos:o,parent:s,index:a}))||i.textContent||"%leaf%";r+=i.isAtom&&!i.isText?d:d.slice(0,Math.max(0,n-o))}),r};function W1(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class Py{constructor(e){this.find=e.find,this.handler=e.handler}}const Q5=(t,e)=>{if(W1(e))return e.exec(t);const r=e(t);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=t,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function Vp(t){var e;const{editor:r,from:n,to:i,text:o,rules:s,plugin:a}=t,{view:l}=r;if(l.composing)return!1;const c=l.state.doc.resolve(n);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(p=>p.type.spec.code))return!1;let d=!1;const f=Z5(c)+o;return s.forEach(p=>{if(d)return;const m=Q5(f,p.find);if(!m)return;const g=l.state.tr,b=My({state:l.state,transaction:g}),S={from:n-(m[0].length-o.length),to:i},{commands:w,chain:T,can:M}=new Ny({editor:r,state:b});p.handler({state:b,range:S,match:m,commands:w,chain:T,can:M})===null||!g.steps.length||(g.setMeta(a,{transform:g,from:n,to:i,text:o}),l.dispatch(g),d=!0)}),d}function e6(t){const{editor:e,rules:r}=t,n=new _t({state:{init(){return null},apply(i,o,s){const a=i.getMeta(n);if(a)return a;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=U1(Le.from(d),s.schema);const{from:f}=l,p=f+d.length;Vp({editor:e,from:f,to:p,text:d,rules:r,plugin:n})}),i.selectionSet||i.docChanged?null:o}},props:{handleTextInput(i,o,s,a){return Vp({editor:e,from:o,to:s,text:a,rules:r,plugin:n})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&Vp({editor:e,from:o.pos,to:o.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:s}=i.state.selection;return s?Vp({editor:e,from:s.pos,to:s.pos,text:`
11
+ `,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function t6(t){return Object.prototype.toString.call(t).slice(8,-1)}function Gp(t){return t6(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Ly(t,e){const r={...t};return Gp(t)&&Gp(e)&&Object.keys(e).forEach(n=>{Gp(e[n])&&Gp(t[n])?r[n]=Ly(t[n],e[n]):r[n]=e[n]}),r}class Mn{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=dt(Ze(this,"addOptions",{name:this.name}))),this.storage=dt(Ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Mn(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>Ly(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new Mn(e);return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=dt(Ze(r,"addOptions",{name:r.name})),r.storage=dt(Ze(r,"addStorage",{name:r.name,options:r.options})),r}static handleExit({editor:e,mark:r}){const{tr:n}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===r.name))return!1;const l=s.find(c=>(c==null?void 0:c.type.name)===r.name);return l&&n.removeStoredMark(l),n.insertText(" ",i.pos),e.view.dispatch(n),!0}return!1}}function X0(t){return typeof t=="number"}class YI{constructor(e){this.find=e.find,this.handler=e.handler}}const r6=(t,e,r)=>{if(W1(e))return[...t.matchAll(e)];const n=e(t,r);return n?n.map(i=>{const o=[i.text];return o.index=i.index,o.input=t,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function n6(t){const{editor:e,state:r,from:n,to:i,rule:o,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:c,can:d}=new Ny({editor:e,state:r}),f=[];return r.doc.nodesBetween(n,i,(m,g)=>{if(!m.isTextblock||m.type.spec.code)return;const b=Math.max(n,g),S=Math.min(i,g+m.content.size),w=m.textBetween(b-g,S-g,void 0,"");r6(w,o.find,s).forEach(M=>{if(M.index===void 0)return;const j=b+M.index+1,$=j+M[0].length,W={from:r.tr.mapping.map(j),to:r.tr.mapping.map($)},Y=o.handler({state:r,range:W,match:M,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});f.push(Y)})}),f.every(m=>m!==null)}const i6=t=>{var e;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=r.clipboardData)===null||e===void 0||e.setData("text/html",t),r};function o6(t){const{editor:e,rules:r}=t;let n=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:d,from:f,to:p,rule:m,pasteEvt:g})=>{const b=d.tr,S=My({state:d,transaction:b});if(!(!n6({editor:e,state:S,from:Math.max(f-1,0),to:p.b-1,rule:m,pasteEvent:g,dropEvent:a})||!b.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,b}};return r.map(d=>new _t({view(f){const p=m=>{var g;n=!((g=f.dom.parentElement)===null||g===void 0)&&g.contains(m.target)?f.dom.parentElement:null};return window.addEventListener("dragstart",p),{destroy(){window.removeEventListener("dragstart",p)}}},props:{handleDOMEvents:{drop:(f,p)=>(o=n===f.dom.parentElement,a=p,!1),paste:(f,p)=>{var m;const g=(m=p.clipboardData)===null||m===void 0?void 0:m.getData("text/html");return s=p,i=!!(g!=null&&g.includes("data-pm-slice")),!1}}},appendTransaction:(f,p,m)=>{const g=f[0],b=g.getMeta("uiEvent")==="paste"&&!i,S=g.getMeta("uiEvent")==="drop"&&!o,w=g.getMeta("applyPasteRules"),T=!!w;if(!b&&!S&&!T)return;if(T){let{text:$}=w;typeof $=="string"?$=$:$=U1(Le.from($),m.schema);const{from:W}=w,Y=W+$.length,ee=i6($);return l({rule:d,state:m,from:W,to:{b:Y},pasteEvt:ee})}const M=p.doc.content.findDiffStart(m.doc.content),j=p.doc.content.findDiffEnd(m.doc.content);if(!(!X0(M)||!j||M===j.b))return l({rule:d,state:m,from:M,to:j,pasteEvt:s})}}))}function s6(t){const e=t.filter((r,n)=>t.indexOf(r)!==n);return Array.from(new Set(e))}class Ou{constructor(e,r){this.splittableMarks=[],this.editor=r,this.extensions=Ou.resolve(e),this.schema=J5(this.extensions,r),this.setupExtensions()}static resolve(e){const r=Ou.sort(Ou.flatten(e)),n=s6(r.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),r}static flatten(e){return e.map(r=>{const n={name:r.name,options:r.options,storage:r.storage},i=Ze(r,"addExtensions",n);return i?[r,...this.flatten(i())]:r}).flat(10)}static sort(e){return e.sort((n,i)=>{const o=Ze(n,"priority")||100,s=Ze(i,"priority")||100;return o>s?-1:o<s?1:0})}get commands(){return this.extensions.reduce((e,r)=>{const n={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:Ob(r.name,this.schema)},i=Ze(r,"addCommands",n);return i?{...e,...i()}:e},{})}get plugins(){const{editor:e}=this,r=Ou.sort([...this.extensions].reverse()),n=[],i=[],o=r.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:Ob(s.name,this.schema)},l=[],c=Ze(s,"addKeyboardShortcuts",a);let d={};if(s.type==="mark"&&Ze(s,"exitable",a)&&(d.ArrowRight=()=>Mn.handleExit({editor:e,mark:s})),c){const b=Object.fromEntries(Object.entries(c()).map(([S,w])=>[S,()=>w({editor:e})]));d={...d,...b}}const f=k5(d);l.push(f);const p=Ze(s,"addInputRules",a);k_(s,e.options.enableInputRules)&&p&&n.push(...p());const m=Ze(s,"addPasteRules",a);k_(s,e.options.enablePasteRules)&&m&&i.push(...m());const g=Ze(s,"addProseMirrorPlugins",a);if(g){const b=g();l.push(...b)}return l}).flat();return[e6({editor:e,rules:n}),...o6({editor:e,rules:i}),...o]}get attributes(){return qI(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:r}=Dy(this.extensions);return Object.fromEntries(r.filter(n=>!!Ze(n,"addNodeView")).map(n=>{const i=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:e,type:Cr(n.name,this.schema)},s=Ze(n,"addNodeView",o);if(!s)return[];const a=(l,c,d,f,p)=>{const m=hg(l,i);return s()({node:l,view:c,getPos:d,decorations:f,innerDecorations:p,editor:e,extension:n,HTMLAttributes:m})};return[n.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var r;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Ob(e.name,this.schema)};e.type==="mark"&&(!((r=dt(Ze(e,"keepOnSplit",n)))!==null&&r!==void 0)||r)&&this.splittableMarks.push(e.name);const i=Ze(e,"onBeforeCreate",n),o=Ze(e,"onCreate",n),s=Ze(e,"onUpdate",n),a=Ze(e,"onSelectionUpdate",n),l=Ze(e,"onTransaction",n),c=Ze(e,"onFocus",n),d=Ze(e,"onBlur",n),f=Ze(e,"onDestroy",n);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}}class yt{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=dt(Ze(this,"addOptions",{name:this.name}))),this.storage=dt(Ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new yt(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>Ly(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new yt({...this.config,...e});return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=dt(Ze(r,"addOptions",{name:r.name})),r.storage=dt(Ze(r,"addStorage",{name:r.name,options:r.options})),r}}function JI(t,e,r){const{from:n,to:i}=e,{blockSeparator:o=`
12
+
13
+ `,textSerializers:s={}}=r||{};let a="";return t.nodesBetween(n,i,(l,c,d,f)=>{var p;l.isBlock&&c>n&&(a+=o);const m=s==null?void 0:s[l.type.name];if(m)return d&&(a+=m({node:l,pos:c,parent:d,index:f,range:e})),!1;l.isText&&(a+=(p=l==null?void 0:l.text)===null||p===void 0?void 0:p.slice(Math.max(n,c)-c,i-c))}),a}function ZI(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,r])=>[e,r.spec.toText]))}const a6=yt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new _t({key:new St("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:r}=t,{doc:n,selection:i}=e,{ranges:o}=i,s=Math.min(...o.map(d=>d.$from.pos)),a=Math.max(...o.map(d=>d.$to.pos)),l=ZI(r);return JI(n,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),l6=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var r;t.isDestroyed||(e.dom.blur(),(r=window==null?void 0:window.getSelection())===null||r===void 0||r.removeAllRanges())}),!0),c6=(t=!1)=>({commands:e})=>e.setContent("",t),u6=()=>({state:t,tr:e,dispatch:r})=>{const{selection:n}=e,{ranges:i}=n;return r&&i.forEach(({$from:o,$to:s})=>{t.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:d}=e,f=c.resolve(d.map(l)),p=c.resolve(d.map(l+a.nodeSize)),m=f.blockRange(p);if(!m)return;const g=yd(m);if(a.type.isTextblock){const{defaultType:b}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(m.start,b)}(g||g===0)&&e.lift(m,g)})}),!0},d6=t=>e=>t(e),f6=()=>({state:t,dispatch:e})=>P5(t,e),h6=(t,e)=>({editor:r,tr:n})=>{const{state:i}=r,o=i.doc.slice(t.from,t.to);n.deleteRange(t.from,t.to);const s=n.mapping.map(e);return n.insert(s,o.content),n.setSelection(new et(n.doc.resolve(s-1))),!0},p6=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,n=r.$anchor.node();if(n.content.size>0)return!1;const i=t.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===n.type){if(e){const a=i.before(o),l=i.after(o);t.delete(a,l).scrollIntoView()}return!0}return!1},m6=t=>({tr:e,state:r,dispatch:n})=>{const i=Cr(t,r.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(n){const l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1},g6=t=>({tr:e,dispatch:r})=>{const{from:n,to:i}=t;return r&&e.delete(n,i),!0},y6=()=>({state:t,dispatch:e})=>Uh(t,e),v6=()=>({commands:t})=>t.keyboardShortcut("Enter"),b6=()=>({state:t,dispatch:e})=>D5(t,e);function pg(t,e,r={strict:!0}){const n=Object.keys(e);return n.length?n.every(i=>r.strict?e[i]===t[i]:W1(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function QI(t,e,r={}){return t.find(n=>n.type===e&&pg(Object.fromEntries(Object.keys(r).map(i=>[i,n.attrs[i]])),r))}function __(t,e,r={}){return!!QI(t,e,r)}function Fy(t,e,r){var n;if(!t||!e)return;let i=t.parent.childAfter(t.parentOffset);if((!i.node||!i.node.marks.some(d=>d.type===e))&&(i=t.parent.childBefore(t.parentOffset)),!i.node||!i.node.marks.some(d=>d.type===e)||(r=r||((n=i.node.marks[0])===null||n===void 0?void 0:n.attrs),!QI([...i.node.marks],e,r)))return;let s=i.index,a=t.start()+i.offset,l=s+1,c=a+i.node.nodeSize;for(;s>0&&__([...t.parent.child(s-1).marks],e,r);)s-=1,a-=t.parent.child(s).nodeSize;for(;l<t.parent.childCount&&__([...t.parent.child(l).marks],e,r);)c+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:c}}function Ta(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const w6=(t,e={})=>({tr:r,state:n,dispatch:i})=>{const o=Ta(t,n.schema),{doc:s,selection:a}=r,{$from:l,from:c,to:d}=a;if(i){const f=Fy(l,o,e);if(f&&f.from<=c&&f.to>=d){const p=et.create(s,f.from,f.to);r.setSelection(p)}}return!0},x6=t=>e=>{const r=typeof t=="function"?t(e):t;for(let n=0;n<r.length;n+=1)if(r[n](e))return!0;return!1};function V1(t){return t instanceof et}function rs(t=0,e=0,r=0){return Math.min(Math.max(t,e),r)}function eO(t,e=null){if(!e)return null;const r=ot.atStart(t),n=ot.atEnd(t);if(e==="start"||e===!0)return r;if(e==="end")return n;const i=r.from,o=n.to;return e==="all"?et.create(t,rs(0,i,o),rs(t.content.size,i,o)):et.create(t,rs(e,i,o),rs(e,i,o))}function jy(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const S6=(t=null,e={})=>({editor:r,view:n,tr:i,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{jy()&&n.dom.focus(),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),e!=null&&e.scrollIntoView&&r.commands.scrollIntoView())})};if(n.hasFocus()&&t===null||t===!1)return!0;if(o&&t===null&&!V1(r.state.selection))return s(),!0;const a=eO(i.doc,t)||r.state.selection,l=r.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},k6=(t,e)=>r=>t.every((n,i)=>e(n,{...r,index:i})),_6=(t,e)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},t,e),tO=t=>{const e=t.childNodes;for(let r=e.length-1;r>=0;r-=1){const n=e[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?t.removeChild(n):n.nodeType===1&&tO(n)}return t};function Kp(t){const e=`<body>${t}</body>`,r=new window.DOMParser().parseFromString(e,"text/html").body;return tO(r)}function mg(t,e,r){if(t instanceof as||t instanceof Le)return t;r={slice:!0,parseOptions:{},...r};const n=typeof t=="object"&&t!==null,i=typeof t=="string";if(n)try{if(Array.isArray(t)&&t.length>0)return Le.fromArray(t.map(a=>e.nodeFromJSON(a)));const s=e.nodeFromJSON(t);return r.errorOnInvalidContent&&s.check(),s}catch(o){if(r.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",o),mg("",e,r)}if(i){if(r.errorOnInvalidContent){let s=!1,a="";const l=new WR({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(s=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(r.slice?Yf.fromSchema(l).parseSlice(Kp(t),r.parseOptions):Yf.fromSchema(l).parse(Kp(t),r.parseOptions),r.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const o=Yf.fromSchema(e);return r.slice?o.parseSlice(Kp(t),r.parseOptions).content:o.parse(Kp(t),r.parseOptions)}return mg("",e,r)}function E6(t,e,r){const n=t.steps.length-1;if(n<e)return;const i=t.steps[n];if(!(i instanceof kr||i instanceof _r))return;const o=t.mapping.maps[n];let s=0;o.forEach((a,l,c,d)=>{s===0&&(s=d)}),t.setSelection(ot.near(t.doc.resolve(s),r))}const C6=t=>!("type"in t),T6=(t,e,r)=>({tr:n,dispatch:i,editor:o})=>{var s;if(i){r={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};let a;try{a=mg(e,o.schema,{parseOptions:{preserveWhitespace:"full",...r.parseOptions},errorOnInvalidContent:(s=r.errorOnInvalidContent)!==null&&s!==void 0?s:o.options.enableContentCheck})}catch(g){return o.emit("contentError",{editor:o,error:g,disableCollaboration:()=>{o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:c}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},d=!0,f=!0;if((C6(a)?a:[a]).forEach(g=>{g.check(),d=d?g.isText&&g.marks.length===0:!1,f=f?g.isBlock:!1}),l===c&&f){const{parent:g}=n.doc.resolve(l);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(l-=1,c+=1)}let m;if(d){if(Array.isArray(e))m=e.map(g=>g.text||"").join("");else if(e instanceof Le){let g="";e.forEach(b=>{b.text&&(g+=b.text)}),m=g}else typeof e=="object"&&e&&e.text?m=e.text:m=e;n.insertText(m,l,c)}else m=a,n.replaceWith(l,c,m);r.updateSelection&&E6(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:l,text:m}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:l,text:m})}return!0},A6=()=>({state:t,dispatch:e})=>I5(t,e),R6=()=>({state:t,dispatch:e})=>O5(t,e),I6=()=>({state:t,dispatch:e})=>_5(t,e),O6=()=>({state:t,dispatch:e})=>A5(t,e),M6=()=>({state:t,dispatch:e,tr:r})=>{try{const n=Cy(t.doc,t.selection.$from.pos,-1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},N6=()=>({state:t,dispatch:e,tr:r})=>{try{const n=Cy(t.doc,t.selection.$from.pos,1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},D6=()=>({state:t,dispatch:e})=>E5(t,e),P6=()=>({state:t,dispatch:e})=>C5(t,e);function rO(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function L6(t){const e=t.split(/-(?!$)/);let r=e[e.length-1];r==="Space"&&(r=" ");let n,i,o,s;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))jy()||rO()?s=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return n&&(r=`Alt-${r}`),i&&(r=`Ctrl-${r}`),s&&(r=`Meta-${r}`),o&&(r=`Shift-${r}`),r}const F6=t=>({editor:e,view:r,tr:n,dispatch:i})=>{const o=L6(t).split(/-(?!$)/),s=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{r.someProp("handleKeyDown",c=>c(r,a))});return l==null||l.steps.forEach(c=>{const d=c.map(n.mapping);d&&i&&n.maybeStep(d)}),!0};function wh(t,e,r={}){const{from:n,to:i,empty:o}=t.selection,s=e?Cr(e,t.schema):null,a=[];t.doc.nodesBetween(n,i,(f,p)=>{if(f.isText)return;const m=Math.max(n,p),g=Math.min(i,p+f.nodeSize);a.push({node:f,from:m,to:g})});const l=i-n,c=a.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>pg(f.node.attrs,r,{strict:!1}));return o?!!c.length:c.reduce((f,p)=>f+p.to-p.from,0)>=l}const j6=(t,e={})=>({state:r,dispatch:n})=>{const i=Cr(t,r.schema);return wh(r,i,e)?M5(r,n):!1},B6=()=>({state:t,dispatch:e})=>L5(t,e),z6=t=>({state:e,dispatch:r})=>{const n=Cr(t,e.schema);return W5(n)(e,r)},H6=()=>({state:t,dispatch:e})=>N5(t,e);function By(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function E_(t,e){const r=typeof e=="string"?[e]:e;return Object.keys(t).reduce((n,i)=>(r.includes(i)||(n[i]=t[i]),n),{})}const $6=(t,e)=>({tr:r,state:n,dispatch:i})=>{let o=null,s=null;const a=By(typeof t=="string"?t:t.name,n.schema);return a?(a==="node"&&(o=Cr(t,n.schema)),a==="mark"&&(s=Ta(t,n.schema)),i&&r.selection.ranges.forEach(l=>{n.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,d)=>{o&&o===c.type&&r.setNodeMarkup(d,void 0,E_(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&r.addMark(d,d+c.nodeSize,s.create(E_(f.attrs,e)))})})}),!0):!1},U6=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),W6=()=>({tr:t,commands:e})=>e.setTextSelection({from:0,to:t.doc.content.size}),V6=()=>({state:t,dispatch:e})=>T5(t,e),G6=()=>({state:t,dispatch:e})=>R5(t,e),K6=()=>({state:t,dispatch:e})=>F5(t,e),q6=()=>({state:t,dispatch:e})=>z5(t,e),X6=()=>({state:t,dispatch:e})=>B5(t,e);function Y0(t,e,r={},n={}){return mg(t,e,{slice:!1,parseOptions:r,errorOnInvalidContent:n.errorOnInvalidContent})}const Y6=(t,e=!1,r={},n={})=>({editor:i,tr:o,dispatch:s,commands:a})=>{var l,c;const{doc:d}=o;if(r.preserveWhitespace!=="full"){const f=Y0(t,i.schema,r,{errorOnInvalidContent:(l=n.errorOnInvalidContent)!==null&&l!==void 0?l:i.options.enableContentCheck});return s&&o.replaceWith(0,d.content.size,f).setMeta("preventUpdate",!e),!0}return s&&o.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:d.content.size},t,{parseOptions:r,errorOnInvalidContent:(c=n.errorOnInvalidContent)!==null&&c!==void 0?c:i.options.enableContentCheck})};function G1(t,e){const r=Ta(e,t.schema),{from:n,to:i,empty:o}=t.selection,s=[];o?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(n,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===r.name);return a?{...a.attrs}:{}}function J6(t,e){const r=new R1(t);return e.forEach(n=>{n.steps.forEach(i=>{r.step(i)})}),r}function Z6(t){for(let e=0;e<t.edgeCount;e+=1){const{type:r}=t.edge(e);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}function eh(t,e){const r=[];return t.descendants((n,i)=>{e(n)&&r.push({node:n,pos:i})}),r}function Q6(t,e,r){const n=[];return t.nodesBetween(e.from,e.to,(i,o)=>{r(i)&&n.push({node:i,pos:o})}),n}function nO(t,e){for(let r=t.depth;r>0;r-=1){const n=t.node(r);if(e(n))return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:n}}}function Gl(t){return e=>nO(e.$from,t)}function e4(t,e){const r={from:0,to:t.content.size};return JI(t,r,e)}function t4(t,e){const r=Cr(e,t.schema),{from:n,to:i}=t.selection,o=[];t.doc.nodesBetween(n,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===r.name);return s?{...s.attrs}:{}}function iO(t,e){const r=By(typeof e=="string"?e:e.name,t.schema);return r==="node"?t4(t,e):r==="mark"?G1(t,e):{}}function r4(t,e=JSON.stringify){const r={};return t.filter(n=>{const i=e(n);return Object.prototype.hasOwnProperty.call(r,i)?!1:r[i]=!0})}function n4(t){const e=r4(t);return e.length===1?e:e.filter((r,n)=>!e.filter((o,s)=>s!==n).some(o=>r.oldRange.from>=o.oldRange.from&&r.oldRange.to<=o.oldRange.to&&r.newRange.from>=o.newRange.from&&r.newRange.to<=o.newRange.to))}function i4(t){const{mapping:e,steps:r}=t,n=[];return e.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=r[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=e.slice(o).map(a,-1),d=e.slice(o).map(l),f=e.invert().map(c,-1),p=e.invert().map(d);n.push({oldRange:{from:f,to:p},newRange:{from:c,to:d}})})}),n4(n)}function K1(t,e,r){const n=[];return t===e?r.resolve(t).marks().forEach(i=>{const o=r.resolve(t),s=Fy(o,i.type);s&&n.push({mark:i,...s})}):r.nodesBetween(t,e,(i,o)=>{!i||(i==null?void 0:i.nodeSize)===void 0||n.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),n}function Nm(t,e,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const i=t.find(o=>o.type===e&&o.name===n);return i?i.attribute.keepOnSplit:!1}))}function J0(t,e,r={}){const{empty:n,ranges:i}=t.selection,o=e?Ta(e,t.schema):null;if(n)return!!(t.storedMarks||t.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>pg(f.attrs,r,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:f,$to:p})=>{const m=f.pos,g=p.pos;t.doc.nodesBetween(m,g,(b,S)=>{if(!b.isText&&!b.marks.length)return;const w=Math.max(m,S),T=Math.min(g,S+b.nodeSize),M=T-w;s+=M,a.push(...b.marks.map(j=>({mark:j,from:w,to:T})))})}),s===0)return!1;const l=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>pg(f.mark.attrs,r,{strict:!1})).reduce((f,p)=>f+p.to-p.from,0),c=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,p)=>f+p.to-p.from,0);return(l>0?l+c:l)>=s}function oO(t,e,r={}){if(!e)return wh(t,null,r)||J0(t,null,r);const n=By(e,t.schema);return n==="node"?wh(t,e,r):n==="mark"?J0(t,e,r):!1}function Z0(t,e){const{nodeExtensions:r}=Dy(e),n=r.find(s=>s.name===t);if(!n)return!1;const i={name:n.name,options:n.options,storage:n.storage},o=dt(Ze(n,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function zy(t,{checkChildren:e=!0,ignoreWhitespace:r=!1}={}){var n;if(r){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((n=t.text)!==null&&n!==void 0?n:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(o=>{i!==!1&&(zy(o,{ignoreWhitespace:r,checkChildren:e})||(i=!1))}),i}return!1}function sO(t){return t instanceof rt}function o4(t,e,r){const i=t.state.doc.content.size,o=rs(e,0,i),s=rs(r,0,i),a=t.coordsAtPos(o),l=t.coordsAtPos(s,-1),c=Math.min(a.top,l.top),d=Math.max(a.bottom,l.bottom),f=Math.min(a.left,l.left),p=Math.max(a.right,l.right),m=p-f,g=d-c,w={top:c,bottom:d,left:f,right:p,width:m,height:g,x:f,y:c};return{...w,toJSON:()=>w}}function s4(t,e,r){var n;const{selection:i}=e;let o=null;if(V1(i)&&(o=i.$cursor),o){const a=(n=t.storedMarks)!==null&&n!==void 0?n:o.marks();return!!r.isInSet(a)||!a.some(l=>l.type.excludes(r))}const{ranges:s}=i;return s.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(r):!1;return t.doc.nodesBetween(a.pos,l.pos,(d,f,p)=>{if(c)return!1;if(d.isInline){const m=!p||p.type.allowsMarkType(r),g=!!r.isInSet(d.marks)||!d.marks.some(b=>b.type.excludes(r));c=m&&g}return!c}),c})}const a4=(t,e={})=>({tr:r,state:n,dispatch:i})=>{const{selection:o}=r,{empty:s,ranges:a}=o,l=Ta(t,n.schema);if(i)if(s){const c=G1(n,l);r.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;n.doc.nodesBetween(d,f,(p,m)=>{const g=Math.max(m,d),b=Math.min(m+p.nodeSize,f);p.marks.find(w=>w.type===l)?p.marks.forEach(w=>{l===w.type&&r.addMark(g,b,l.create({...w.attrs,...e}))}):r.addMark(g,b,l.create(e))})});return s4(n,r,l)},l4=(t,e)=>({tr:r})=>(r.setMeta(t,e),!0),c4=(t,e={})=>({state:r,dispatch:n,chain:i})=>{const o=Cr(t,r.schema);let s;return r.selection.$anchor.sameParent(r.selection.$head)&&(s=r.selection.$anchor.parent.attrs),o.isTextblock?i().command(({commands:a})=>w_(o,{...s,...e})(r)?!0:a.clearNodes()).command(({state:a})=>w_(o,{...s,...e})(a,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},u4=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,i=rs(t,0,n.content.size),o=rt.create(n,i);e.setSelection(o)}return!0},d4=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,{from:i,to:o}=typeof t=="number"?{from:t,to:t}:t,s=et.atStart(n).from,a=et.atEnd(n).to,l=rs(i,s,a),c=rs(o,s,a),d=et.create(n,l,c);e.setSelection(d)}return!0},f4=t=>({state:e,dispatch:r})=>{const n=Cr(t,e.schema);return K5(n)(e,r)};function C_(t,e){const r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(r){const n=r.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(n)}}const h4=({keepMarks:t=!0}={})=>({tr:e,state:r,dispatch:n,editor:i})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,c=i.extensionManager.attributes,d=Nm(c,a.node().type.name,a.node().attrs);if(o instanceof rt&&o.node.isBlock)return!a.parentOffset||!Du(s,a.pos)?!1:(n&&(t&&C_(r,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,p=a.depth===0?void 0:Z6(a.node(-1).contentMatchAt(a.indexAfter(-1)));let m=f&&p?[{type:p,attrs:d}]:void 0,g=Du(e.doc,e.mapping.map(a.pos),1,m);if(!m&&!g&&Du(e.doc,e.mapping.map(a.pos),1,p?[{type:p}]:void 0)&&(g=!0,m=p?[{type:p,attrs:d}]:void 0),n){if(g&&(o instanceof et&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,m),p&&!f&&!a.parentOffset&&a.parent.type!==p)){const b=e.mapping.map(a.before()),S=e.doc.resolve(b);a.node(-1).canReplaceWith(S.index(),S.index()+1,p)&&e.setNodeMarkup(e.mapping.map(a.before()),p)}t&&C_(r,i.extensionManager.splittableMarks),e.scrollIntoView()}return g},p4=(t,e={})=>({tr:r,state:n,dispatch:i,editor:o})=>{var s;const a=Cr(t,n.schema),{$from:l,$to:c}=n.selection,d=n.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;const f=l.node(-1);if(f.type!==a)return!1;const p=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let w=Le.empty;const T=l.index(-1)?1:l.index(-2)?2:3;for(let ee=l.depth-T;ee>=l.depth-3;ee-=1)w=Le.from(l.node(ee).copy(w));const M=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,j={...Nm(p,l.node().type.name,l.node().attrs),...e},$=((s=a.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(j))||void 0;w=w.append(Le.from(a.createAndFill(null,$)||void 0));const W=l.before(l.depth-(T-1));r.replace(W,l.after(-M),new qe(w,4-T,0));let Y=-1;r.doc.nodesBetween(W,r.doc.content.size,(ee,P)=>{if(Y>-1)return!1;ee.isTextblock&&ee.content.size===0&&(Y=P+1)}),Y>-1&&r.setSelection(et.near(r.doc.resolve(Y))),r.scrollIntoView()}return!0}const m=c.pos===l.end()?f.contentMatchAt(0).defaultType:null,g={...Nm(p,f.type.name,f.attrs),...e},b={...Nm(p,l.node().type.name,l.node().attrs),...e};r.delete(l.pos,c.pos);const S=m?[{type:a,attrs:g},{type:m,attrs:b}]:[{type:a,attrs:g}];if(!Du(r.doc,l.pos,2))return!1;if(i){const{selection:w,storedMarks:T}=n,{splittableMarks:M}=o.extensionManager,j=T||w.$to.parentOffset&&w.$from.marks();if(r.split(l.pos,2,S).scrollIntoView(),!j||!i)return!0;const $=j.filter(W=>M.includes(W.type.name));r.ensureMarks($)}return!0},Mb=(t,e)=>{const r=Gl(s=>s.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const i=t.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&Ea(t.doc,r.pos)&&t.join(r.pos),!0},Nb=(t,e)=>{const r=Gl(s=>s.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const i=t.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&Ea(t.doc,n)&&t.join(n),!0},m4=(t,e,r,n={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:f,splittableMarks:p}=i.extensionManager,m=Cr(t,s.schema),g=Cr(e,s.schema),{selection:b,storedMarks:S}=s,{$from:w,$to:T}=b,M=w.blockRange(T),j=S||b.$to.parentOffset&&b.$from.marks();if(!M)return!1;const $=Gl(W=>Z0(W.type.name,f))(b);if(M.depth>=1&&$&&M.depth-$.depth<=1){if($.node.type===m)return c.liftListItem(g);if(Z0($.node.type.name,f)&&m.validContent($.node.content)&&a)return l().command(()=>(o.setNodeMarkup($.pos,m),!0)).command(()=>Mb(o,m)).command(()=>Nb(o,m)).run()}return!r||!j||!a?l().command(()=>d().wrapInList(m,n)?!0:c.clearNodes()).wrapInList(m,n).command(()=>Mb(o,m)).command(()=>Nb(o,m)).run():l().command(()=>{const W=d().wrapInList(m,n),Y=j.filter(ee=>p.includes(ee.type.name));return o.ensureMarks(Y),W?!0:c.clearNodes()}).wrapInList(m,n).command(()=>Mb(o,m)).command(()=>Nb(o,m)).run()},g4=(t,e={},r={})=>({state:n,commands:i})=>{const{extendEmptyMarkRange:o=!1}=r,s=Ta(t,n.schema);return J0(n,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)},y4=(t,e,r={})=>({state:n,commands:i})=>{const o=Cr(t,n.schema),s=Cr(e,n.schema),a=wh(n,o,r);let l;return n.selection.$anchor.sameParent(n.selection.$head)&&(l=n.selection.$anchor.parent.attrs),a?i.setNode(s,l):i.setNode(o,{...l,...r})},v4=(t,e={})=>({state:r,commands:n})=>{const i=Cr(t,r.schema);return wh(r,i,e)?n.lift(i):n.wrapIn(i,e)},b4=()=>({state:t,dispatch:e})=>{const r=t.plugins;for(let n=0;n<r.length;n+=1){const i=r[n];let o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){const s=t.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,t.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},w4=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,{empty:n,ranges:i}=r;return n||e&&i.forEach(o=>{t.removeMark(o.$from.pos,o.$to.pos)}),!0},x4=(t,e={})=>({tr:r,state:n,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=r,l=Ta(t,n.schema),{$from:c,empty:d,ranges:f}=a;if(!i)return!0;if(d&&s){let{from:p,to:m}=a;const g=(o=c.marks().find(S=>S.type===l))===null||o===void 0?void 0:o.attrs,b=Fy(c,l,g);b&&(p=b.from,m=b.to),r.removeMark(p,m,l)}else f.forEach(p=>{r.removeMark(p.$from.pos,p.$to.pos,l)});return r.removeStoredMark(l),!0},S4=(t,e={})=>({tr:r,state:n,dispatch:i})=>{let o=null,s=null;const a=By(typeof t=="string"?t:t.name,n.schema);return a?(a==="node"&&(o=Cr(t,n.schema)),a==="mark"&&(s=Ta(t,n.schema)),i&&r.selection.ranges.forEach(l=>{const c=l.$from.pos,d=l.$to.pos;let f,p,m,g;r.selection.empty?n.doc.nodesBetween(c,d,(b,S)=>{o&&o===b.type&&(m=Math.max(S,c),g=Math.min(S+b.nodeSize,d),f=S,p=b)}):n.doc.nodesBetween(c,d,(b,S)=>{S<c&&o&&o===b.type&&(m=Math.max(S,c),g=Math.min(S+b.nodeSize,d),f=S,p=b),S>=c&&S<=d&&(o&&o===b.type&&r.setNodeMarkup(S,void 0,{...b.attrs,...e}),s&&b.marks.length&&b.marks.forEach(w=>{if(s===w.type){const T=Math.max(S,c),M=Math.min(S+b.nodeSize,d);r.addMark(T,M,s.create({...w.attrs,...e}))}}))}),p&&(f!==void 0&&r.setNodeMarkup(f,void 0,{...p.attrs,...e}),s&&p.marks.length&&p.marks.forEach(b=>{s===b.type&&r.addMark(m,g,s.create({...b.attrs,...e}))}))}),!0):!1},k4=(t,e={})=>({state:r,dispatch:n})=>{const i=Cr(t,r.schema);return H5(i,e)(r,n)},_4=(t,e={})=>({state:r,dispatch:n})=>{const i=Cr(t,r.schema);return $5(i,e)(r,n)};var E4=Object.freeze({__proto__:null,blur:l6,clearContent:c6,clearNodes:u6,command:d6,createParagraphNear:f6,cut:h6,deleteCurrentNode:p6,deleteNode:m6,deleteRange:g6,deleteSelection:y6,enter:v6,exitCode:b6,extendMarkRange:w6,first:x6,focus:S6,forEach:k6,insertContent:_6,insertContentAt:T6,joinBackward:I6,joinDown:R6,joinForward:O6,joinItemBackward:M6,joinItemForward:N6,joinTextblockBackward:D6,joinTextblockForward:P6,joinUp:A6,keyboardShortcut:F6,lift:j6,liftEmptyBlock:B6,liftListItem:z6,newlineInCode:H6,resetAttributes:$6,scrollIntoView:U6,selectAll:W6,selectNodeBackward:V6,selectNodeForward:G6,selectParentNode:K6,selectTextblockEnd:q6,selectTextblockStart:X6,setContent:Y6,setMark:a4,setMeta:l4,setNode:c4,setNodeSelection:u4,setTextSelection:d4,sinkListItem:f4,splitBlock:h4,splitListItem:p4,toggleList:m4,toggleMark:g4,toggleNode:y4,toggleWrap:v4,undoInputRule:b4,unsetAllMarks:w4,unsetMark:x4,updateAttributes:S4,wrapIn:k4,wrapInList:_4});const C4=yt.create({name:"commands",addCommands(){return{...E4}}}),T4=yt.create({name:"drop",addProseMirrorPlugins(){return[new _t({key:new St("tiptapDrop"),props:{handleDrop:(t,e,r,n)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:r,moved:n})}}})]}}),A4=yt.create({name:"editable",addProseMirrorPlugins(){return[new _t({key:new St("editable"),props:{editable:()=>this.editor.options.editable}})]}}),R4=yt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new _t({key:new St("focusEvents"),props:{handleDOMEvents:{focus:(e,r)=>{t.isFocused=!0;const n=t.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1},blur:(e,r)=>{t.isFocused=!1;const n=t.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1}}}})]}}),I4=yt.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:d,$anchor:f}=l,{pos:p,parent:m}=f,g=f.parent.isTextblock&&p>0?a.doc.resolve(p-1):f,b=g.parent.type.spec.isolating,S=f.pos-f.parentOffset,w=b&&g.parent.childCount===1?S===f.pos:ot.atStart(c).from===p;return!d||!m.type.isTextblock||m.textContent.length||!w||w&&f.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},o={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return jy()||rO()?o:i},addProseMirrorPlugins(){return[new _t({key:new St("clearDocument"),appendTransaction:(t,e,r)=>{const n=t.some(b=>b.docChanged)&&!e.doc.eq(r.doc),i=t.some(b=>b.getMeta("preventClearDocument"));if(!n||i)return;const{empty:o,from:s,to:a}=e.selection,l=ot.atStart(e.doc).from,c=ot.atEnd(e.doc).to;if(o||!(s===l&&a===c)||!zy(r.doc))return;const p=r.tr,m=My({state:r,transaction:p}),{commands:g}=new Ny({editor:this.editor,state:m});if(g.clearNodes(),!!p.steps.length)return p}})]}}),O4=yt.create({name:"paste",addProseMirrorPlugins(){return[new _t({key:new St("tiptapPaste"),props:{handlePaste:(t,e,r)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:r})}}})]}}),M4=yt.create({name:"tabindex",addProseMirrorPlugins(){return[new _t({key:new St("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class El{get name(){return this.node.type.name}constructor(e,r,n=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=r,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(e);return new El(r,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new El(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new El(e,this.editor)}get children(){const e=[];return this.node.content.forEach((r,n)=>{const i=r.isBlock&&!r.isTextblock,o=r.isAtom&&!r.isText,s=this.pos+n+(o?0:1),a=this.resolvedPos.doc.resolve(s);if(!i&&a.depth<=this.depth)return;const l=new El(a,this.editor,i,i?r:null);i&&(l.actualDepth=this.depth+1),e.push(new El(a,this.editor,i,i?r:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,r={}){let n=null,i=this.parent;for(;i&&!n;){if(i.node.type.name===e)if(Object.keys(r).length>0){const o=i.node.attrs,s=Object.keys(r);for(let a=0;a<s.length;a+=1){const l=s[a];if(o[l]!==r[l])break}}else n=i;i=i.parent}return n}querySelector(e,r={}){return this.querySelectorAll(e,r,!0)[0]||null}querySelectorAll(e,r={},n=!1){let i=[];if(!this.children||this.children.length===0)return i;const o=Object.keys(r);return this.children.forEach(s=>{n&&i.length>0||(s.node.type.name===e&&o.every(l=>r[l]===s.node.attrs[l])&&i.push(s),!(n&&i.length>0)&&(i=i.concat(s.querySelectorAll(e,r,n))))}),i}setAttribute(e){const{tr:r}=this.editor.state;r.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(r)}}const N4=`.ProseMirror {
14
+ position: relative;
15
+ }
16
+
17
+ .ProseMirror {
18
+ word-wrap: break-word;
19
+ white-space: pre-wrap;
20
+ white-space: break-spaces;
21
+ -webkit-font-variant-ligatures: none;
22
+ font-variant-ligatures: none;
23
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
24
+ }
25
+
26
+ .ProseMirror [contenteditable="false"] {
27
+ white-space: normal;
28
+ }
29
+
30
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
31
+ white-space: pre-wrap;
32
+ }
33
+
34
+ .ProseMirror pre {
35
+ white-space: pre-wrap;
36
+ }
37
+
38
+ img.ProseMirror-separator {
39
+ display: inline !important;
40
+ border: none !important;
41
+ margin: 0 !important;
42
+ width: 0 !important;
43
+ height: 0 !important;
44
+ }
45
+
46
+ .ProseMirror-gapcursor {
47
+ display: none;
48
+ pointer-events: none;
49
+ position: absolute;
50
+ margin: 0;
51
+ }
52
+
53
+ .ProseMirror-gapcursor:after {
54
+ content: "";
55
+ display: block;
56
+ position: absolute;
57
+ top: -2px;
58
+ width: 20px;
59
+ border-top: 1px solid black;
60
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
61
+ }
62
+
63
+ @keyframes ProseMirror-cursor-blink {
64
+ to {
65
+ visibility: hidden;
66
+ }
67
+ }
68
+
69
+ .ProseMirror-hideselection *::selection {
70
+ background: transparent;
71
+ }
72
+
73
+ .ProseMirror-hideselection *::-moz-selection {
74
+ background: transparent;
75
+ }
76
+
77
+ .ProseMirror-hideselection * {
78
+ caret-color: transparent;
79
+ }
80
+
81
+ .ProseMirror-focused .ProseMirror-gapcursor {
82
+ display: block;
83
+ }
84
+
85
+ .tippy-box[data-animation=fade][data-state=hidden] {
86
+ opacity: 0
87
+ }`;function D4(t,e,r){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}class P4 extends q5{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:n,moved:i})=>this.options.onDrop(r,n,i)),this.on("paste",({event:r,slice:n})=>this.options.onPaste(r,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=D4(N4,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,r=!0){this.setOptions({editable:e}),r&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,r){const n=XI(r)?r(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;const r=this.state.plugins;let n=r;if([].concat(e).forEach(o=>{const s=typeof o=="string"?`${o}$`:o.key;n=r.filter(a=>!a.key.startsWith(s))}),r.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var e,r;const i=[...this.options.enableCoreExtensions?[A4,a6.configure({blockSeparator:(r=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),C4,R4,I4,M4,T4,O4].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new Ou(i,this)}createCommandManager(){this.commandManager=new Ny({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let r;try{r=Y0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),r=Y0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=eO(r,this.options.autofocus);this.view=new p5(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Iu.create({doc:r,selection:n||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const r=this.state.apply(e),n=!this.state.selection.eq(r.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:r}),this.view.updateState(r),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),o=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return iO(this.state,e)}isActive(e,r){const n=typeof e=="string"?e:null,i=typeof e=="string"?r:e;return oO(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return U1(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:r=`
88
+
89
+ `,textSerializers:n={}}=e||{};return e4(this.state.doc,{blockSeparator:r,textSerializers:{...ZI(this.schema),...n}})}get isEmpty(){return zy(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(e,r))||null}$nodes(e,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(e,r))||null}$pos(e){const r=this.state.doc.resolve(e);return new El(r,this)}get $doc(){return this.$pos(0)}}function Kl(t){return new Py({find:t.find,handler:({state:e,range:r,match:n})=>{const i=dt(t.getAttributes,void 0,n);if(i===!1||i===null)return null;const{tr:o}=e,s=n[n.length-1],a=n[0];if(s){const l=a.search(/\S/),c=r.from+a.indexOf(s),d=c+s.length;if(K1(r.from,r.to,e.doc).filter(m=>m.mark.type.excluded.find(b=>b===t.type&&b!==m.mark.type)).filter(m=>m.to>c).length)return null;d<r.to&&o.delete(d,r.to),c>r.from&&o.delete(r.from+l,c);const p=r.from+l+s.length;o.addMark(r.from+l,p,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function Wh(t){return new Py({find:t.find,handler:({state:e,range:r,match:n})=>{const i=dt(t.getAttributes,void 0,n)||{},{tr:o}=e,s=r.from;let a=r.to;const l=t.type.create(i);if(n[1]){const c=n[0].lastIndexOf(n[1]);let d=s+c;d>a?d=a:a=d+n[1].length;const f=n[0][n[0].length-1];o.insertText(f,s+n[0].length-1),o.replaceWith(d,a,l)}else if(n[0]){const c=t.type.isInline?s:s-1;o.insert(c,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function Q0(t){return new Py({find:t.find,handler:({state:e,range:r,match:n})=>{const i=e.doc.resolve(r.from),o=dt(t.getAttributes,void 0,n)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(r.from,r.to).setBlockType(r.from,r.from,t.type,o)}})}function Ju(t){return new Py({find:t.find,handler:({state:e,range:r,match:n,chain:i})=>{const o=dt(t.getAttributes,void 0,n)||{},s=e.tr.delete(r.from,r.to),l=s.doc.resolve(r.from).blockRange(),c=l&&A1(l,t.type,o);if(!c)return null;if(s.wrap(l,c),t.keepMarks&&t.editor){const{selection:f,storedMarks:p}=e,{splittableMarks:m}=t.editor.extensionManager,g=p||f.$to.parentOffset&&f.$from.marks();if(g){const b=g.filter(S=>m.includes(S.type.name));s.ensureMarks(b)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const d=s.doc.resolve(r.from-1).nodeBefore;d&&d.type===t.type&&Ea(s.doc,r.from-1)&&(!t.joinPredicate||t.joinPredicate(n,d))&&s.join(r.from-1)}})}let Nt=class ex{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=dt(Ze(this,"addOptions",{name:this.name}))),this.storage=dt(Ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ex(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>Ly(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new ex(e);return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=dt(Ze(r,"addOptions",{name:r.name})),r.storage=dt(Ze(r,"addStorage",{name:r.name,options:r.options})),r}};function L4(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class F4{constructor(e,r,n){this.isDragging=!1,this.component=e,this.editor=r.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=r.extension,this.node=r.node,this.decorations=r.decorations,this.innerDecorations=r.innerDecorations,this.view=r.view,this.HTMLAttributes=r.HTMLAttributes,this.getPos=r.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var r,n,i,o,s,a,l;const{view:c}=this.editor,d=e.target,f=d.nodeType===3?(r=d.parentElement)===null||r===void 0?void 0:r.closest("[data-drag-handle]"):d.closest("[data-drag-handle]");if(!this.dom||!((n=this.contentDOM)===null||n===void 0)&&n.contains(d)||!f)return;let p=0,m=0;if(this.dom!==f){const w=this.dom.getBoundingClientRect(),T=f.getBoundingClientRect(),M=(i=e.offsetX)!==null&&i!==void 0?i:(o=e.nativeEvent)===null||o===void 0?void 0:o.offsetX,j=(s=e.offsetY)!==null&&s!==void 0?s:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetY;p=T.x-w.x+M,m=T.y-w.y+j}(l=e.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,p,m);const g=this.getPos();if(typeof g!="number")return;const b=rt.create(c.state.doc,g),S=c.state.tr.setSelection(b);c.dispatch(S)}stopEvent(e){var r;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const n=e.target;if(!(this.dom.contains(n)&&!(!((r=this.contentDOM)===null||r===void 0)&&r.contains(n))))return!1;const o=e.type.startsWith("drag"),s=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!s&&!o)return!0;const{isEditable:l}=this.editor,{isDragging:c}=this,d=!!this.node.type.spec.draggable,f=rt.isSelectable(this.node),p=e.type==="copy",m=e.type==="paste",g=e.type==="cut",b=e.type==="mousedown";if(!d&&f&&o&&e.preventDefault(),d&&o&&!c)return e.preventDefault(),!1;if(d&&l&&!c&&b){const S=n.closest("[data-drag-handle]");S&&(this.dom===S||this.dom.contains(S))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||s||p||m||g||b&&f)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(jy()||L4())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:r})=>{const n=this.getPos();return typeof n!="number"?!1:(r.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const r=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:r})}}function wa(t){return new YI({find:t.find,handler:({state:e,range:r,match:n,pasteEvent:i})=>{const o=dt(t.getAttributes,void 0,n,i);if(o===!1||o===null)return null;const{tr:s}=e,a=n[n.length-1],l=n[0];let c=r.to;if(a){const d=l.search(/\S/),f=r.from+l.indexOf(a),p=f+a.length;if(K1(r.from,r.to,e.doc).filter(g=>g.mark.type.excluded.find(S=>S===t.type&&S!==g.mark.type)).filter(g=>g.to>f).length)return null;p<r.to&&s.delete(p,r.to),f>r.from&&s.delete(r.from+d,f),c=r.from+d+a.length,s.addMark(r.from+d,c,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}function j4(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function B4(t){return new YI({find:t.find,handler({match:e,chain:r,range:n,pasteEvent:i}){const o=dt(t.getAttributes,void 0,e,i),s=dt(t.getContent,void 0,o);if(o===!1||o===null)return null;const a={type:t.type.name,attrs:o};s&&(a.content=s),e.input&&r().deleteRange(n).insertContentAt(n.from,a)}})}const z4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,H4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,$4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,U4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,W4=Mn.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Kl({find:z4,type:this.type}),Kl({find:$4,type:this.type})]},addPasteRules(){return[wa({find:H4,type:this.type}),wa({find:U4,type:this.type})]}});let Db;function Pb(){return Db===void 0&&(Db=navigator.platform.includes("Mac")),Db}function Hy(t){return`${t}`.toLowerCase()==="mod"?Pb()?"⌘":"Ctrl":`${t}`.toLowerCase()==="alt"?Pb()?"⌥":"Alt":`${t}`.toLowerCase()==="shift"?Pb()?"⇧":"Shift":t}function $y(t){return t.map(Hy).join(" ")}function aO(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=aO(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Gr(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=aO(t))&&(n&&(n+=" "),n+=e);return n}const q1="-",V4=t=>{const e=K4(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{const a=s.split(q1);return a[0]===""&&a.length!==1&&a.shift(),lO(a,e)||G4(s)},getConflictingClassGroupIds:(s,a)=>{const l=r[s]||[];return a&&n[s]?[...l,...n[s]]:l}}},lO=(t,e)=>{var s;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),i=n?lO(t.slice(1),n):void 0;if(i)return i;if(e.validators.length===0)return;const o=t.join(q1);return(s=e.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId},T_=/^\[(.+)\]$/,G4=t=>{if(T_.test(t)){const e=T_.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},K4=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return X4(Object.entries(t.classGroups),r).forEach(([o,s])=>{tx(s,n,o,e)}),n},tx=(t,e,r,n)=>{t.forEach(i=>{if(typeof i=="string"){const o=i===""?e:A_(e,i);o.classGroupId=r;return}if(typeof i=="function"){if(q4(i)){tx(i(n),e,r,n);return}e.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,s])=>{tx(s,A_(e,o),r,n)})})},A_=(t,e)=>{let r=t;return e.split(q1).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},q4=t=>t.isThemeGetter,X4=(t,e)=>e?t.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[e+s,a])):o);return[r,i]}):t,Y4=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const i=(o,s)=>{r.set(o,s),e++,e>t&&(e=0,n=r,r=new Map)};return{get(o){let s=r.get(o);if(s!==void 0)return s;if((s=n.get(o))!==void 0)return i(o,s),s},set(o,s){r.has(o)?r.set(o,s):i(o,s)}}},cO="!",J4=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,i=e[0],o=e.length,s=a=>{const l=[];let c=0,d=0,f;for(let S=0;S<a.length;S++){let w=a[S];if(c===0){if(w===i&&(n||a.slice(S,S+o)===e)){l.push(a.slice(d,S)),d=S+o;continue}if(w==="/"){f=S;continue}}w==="["?c++:w==="]"&&c--}const p=l.length===0?a:a.substring(d),m=p.startsWith(cO),g=m?p.substring(1):p,b=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:b}};return r?a=>r({className:a,parseClassName:s}):s},Z4=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},Q4=t=>({cache:Y4(t.cacheSize),parseClassName:J4(t),...V4(t)}),eF=/\s+/,tF=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=e,o=[],s=t.trim().split(eF);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=r(c);let g=!!m,b=n(g?p.substring(0,m):p);if(!b){if(!g){a=c+(a.length>0?" "+a:a);continue}if(b=n(p),!b){a=c+(a.length>0?" "+a:a);continue}g=!1}const S=Z4(d).join(":"),w=f?S+cO:S,T=w+b;if(o.includes(T))continue;o.push(T);const M=i(b,g);for(let j=0;j<M.length;++j){const $=M[j];o.push(w+$)}a=c+(a.length>0?" "+a:a)}return a};function rF(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=uO(e))&&(n&&(n+=" "),n+=r);return n}const uO=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=uO(t[n]))&&(r&&(r+=" "),r+=e);return r};function nF(t,...e){let r,n,i,o=s;function s(l){const c=e.reduce((d,f)=>f(d),t());return r=Q4(c),n=r.cache.get,i=r.cache.set,o=a,a(l)}function a(l){const c=n(l);if(c)return c;const d=tF(l,r);return i(l,d),d}return function(){return o(rF.apply(null,arguments))}}const Kt=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},dO=/^\[(?:([a-z-]+):)?(.+)\]$/i,iF=/^\d+\/\d+$/,oF=new Set(["px","full","screen"]),sF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aF=/\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$/,lF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qo=t=>Fu(t)||oF.has(t)||iF.test(t),Xs=t=>vd(t,"length",vF),Fu=t=>!!t&&!Number.isNaN(Number(t)),Lb=t=>vd(t,"number",Fu),Cf=t=>!!t&&Number.isInteger(Number(t)),dF=t=>t.endsWith("%")&&Fu(t.slice(0,-1)),ft=t=>dO.test(t),Ys=t=>sF.test(t),fF=new Set(["length","size","percentage"]),hF=t=>vd(t,fF,fO),pF=t=>vd(t,"position",fO),mF=new Set(["image","url"]),gF=t=>vd(t,mF,wF),yF=t=>vd(t,"",bF),Tf=()=>!0,vd=(t,e,r)=>{const n=dO.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},vF=t=>aF.test(t)&&!lF.test(t),fO=()=>!1,bF=t=>cF.test(t),wF=t=>uF.test(t),xF=()=>{const t=Kt("colors"),e=Kt("spacing"),r=Kt("blur"),n=Kt("brightness"),i=Kt("borderColor"),o=Kt("borderRadius"),s=Kt("borderSpacing"),a=Kt("borderWidth"),l=Kt("contrast"),c=Kt("grayscale"),d=Kt("hueRotate"),f=Kt("invert"),p=Kt("gap"),m=Kt("gradientColorStops"),g=Kt("gradientColorStopPositions"),b=Kt("inset"),S=Kt("margin"),w=Kt("opacity"),T=Kt("padding"),M=Kt("saturate"),j=Kt("scale"),$=Kt("sepia"),W=Kt("skew"),Y=Kt("space"),ee=Kt("translate"),P=()=>["auto","contain","none"],fe=()=>["auto","hidden","clip","visible","scroll"],de=()=>["auto",ft,e],U=()=>[ft,e],ne=()=>["",qo,Xs],R=()=>["auto",Fu,ft],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ce=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Fe=()=>["start","end","center","between","around","evenly","stretch"],ye=()=>["","0",ft],ze=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ue=()=>[Fu,ft];return{cacheSize:500,separator:":",theme:{colors:[Tf],spacing:[qo,Xs],blur:["none","",Ys,ft],brightness:ue(),borderColor:[t],borderRadius:["none","","full",Ys,ft],borderSpacing:U(),borderWidth:ne(),contrast:ue(),grayscale:ye(),hueRotate:ue(),invert:ye(),gap:U(),gradientColorStops:[t],gradientColorStopPositions:[dF,Xs],inset:de(),margin:de(),opacity:ue(),padding:U(),saturate:ue(),scale:ue(),sepia:ye(),skew:ue(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",ft]}],container:["container"],columns:[{columns:[Ys]}],"break-after":[{"break-after":ze()}],"break-before":[{"break-before":ze()}],"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:[...le(),ft]}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cf,ft]}],basis:[{basis:de()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ft]}],grow:[{grow:ye()}],shrink:[{shrink:ye()}],order:[{order:["first","last","none",Cf,ft]}],"grid-cols":[{"grid-cols":[Tf]}],"col-start-end":[{col:["auto",{span:["full",Cf,ft]},ft]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Tf]}],"row-start-end":[{row:["auto",{span:[Cf,ft]},ft]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ft]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ft]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...Fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[Y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ft,e]}],"min-w":[{"min-w":[ft,e,"min","max","fit"]}],"max-w":[{"max-w":[ft,e,"none","full","min","max","fit","prose",{screen:[Ys]},Ys]}],h:[{h:[ft,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ft,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ft,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ft,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ys,Xs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Lb]}],"font-family":[{font:[Tf]}],"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",ft]}],"line-clamp":[{"line-clamp":["none",Fu,Lb]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qo,ft]}],"list-image":[{"list-image":["none",ft]}],"list-style-type":[{list:["none","disc","decimal",ft]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qo,Xs]}],"underline-offset":[{"underline-offset":["auto",qo,ft]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ft]}],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",ft]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),pF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gF]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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":[w]}],"border-style":[{border:[...Ce(),"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":[w]}],"divide-style":[{divide:Ce()}],"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:["",...Ce()]}],"outline-offset":[{"outline-offset":[qo,ft]}],"outline-w":[{outline:[qo,Xs]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[qo,Xs]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Ys,yF]}],"shadow-color":[{shadow:[Tf]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ys,ft]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[M]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"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",ft]}],duration:[{duration:ue()}],ease:[{ease:["linear","in","out","in-out",ft]}],delay:[{delay:ue()}],animate:[{animate:["none","spin","ping","pulse","bounce",ft]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Cf,ft]}],"translate-x":[{"translate-x":[ee]}],"translate-y":[{"translate-y":[ee]}],"skew-x":[{"skew-x":[W]}],"skew-y":[{"skew-y":[W]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ft]}],accent:[{accent:["auto",t]}],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",ft]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",ft]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[qo,Xs,Lb]}],stroke:[{stroke:[t,"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"]}}},SF=nF(xF);function pt(...t){return SF(Gr(t))}const Ve=J.forwardRef((t,e)=>{const{icon:r=void 0,tooltip:n=void 0,disabled:i=!1,customClass:o="",loading:s=void 0,shortcutKeys:a=void 0,tooltipOptions:l={},action:c=void 0,isActive:d=void 0,children:f,asChild:p=!1,upload:m=!1,...g}=t,b=Yh[r],S=p?_1.Slot:qh;return x.jsxs(Sd,{children:[x.jsx(kd,{asChild:!0,children:x.jsxs(S,{ref:e,size:"sm",className:pt("richtext-w-[32px] richtext-h-[32px]",o),disabled:i,onClick:c,"data-state":d!=null&&d()?"on":"off",...g,children:[b&&x.jsx(b,{className:"richtext-w-4 richtext-h-4"}),f]})}),n&&x.jsx(sc,{...l,children:x.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24",children:[x.jsx("div",{children:n}),!!(a!=null&&a.length)&&x.jsx("span",{children:$y(a)})]})})]})}),X1=J.forwardRef(({asChild:t,...e},r)=>{var o;const n=Yh[e.icon],i=t?_1.Slot:Mt;return x.jsxs(Sd,{children:[x.jsx(kd,{asChild:!0,children:x.jsx(i,{ref:r,className:"richtext-h-[32px] richtext-px-[5px] richtext-py-0 richtext-min-w-24 richtext-overflow-hidden",variant:"ghost",disabled:e==null?void 0:e.disabled,...e,children:x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-full richtext-font-normal",children:[(e==null?void 0:e.title)&&x.jsx("div",{className:"richtext-flex-grow richtext-text-sm richtext-text-left richtext-truncate",children:e==null?void 0:e.title}),n&&x.jsx(n,{className:"richtext-flex-shrink-0 richtext-w-3 richtext-h-3 richtext-ml-1 richtext-text-zinc-500"})]})})}),x.jsx(sc,{children:x.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24",children:[(e==null?void 0:e.tooltip)&&x.jsx("div",{children:e==null?void 0:e.tooltip}),x.jsx("div",{className:"richtext-flex",children:!!((o=e==null?void 0:e.shortcutKeys)!=null&&o.length)&&x.jsx("span",{children:$y(e==null?void 0:e.shortcutKeys)})})]})})]})});class kF{constructor({editor:e,element:r,view:n,tippyOptions:i={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:d})=>{const{doc:f,selection:p}=l,{empty:m}=p,g=!f.textBetween(c,d).length&&V1(l.selection),b=this.element.contains(document.activeElement);return!(!(a.hasFocus()||b)||m||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget))||(a==null?void 0:a.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const c=!(l!=null&&l.selection.eq(a.state.selection)),d=!(l!=null&&l.doc.eq(a.state.doc));!c&&!d||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,d,l)},this.updateDelay))},this.updateHandler=(a,l,c,d)=>{var f,p,m;const{state:g,composing:b}=a,{selection:S}=g;if(b||!l&&!c)return;this.createTooltip();const{ranges:T}=S,M=Math.min(...T.map(W=>W.$from.pos)),j=Math.max(...T.map(W=>W.$to.pos));if(!((f=this.shouldShow)===null||f===void 0?void 0:f.call(this,{editor:this.editor,element:this.element,view:a,state:g,oldState:d,from:M,to:j}))){this.hide();return}(p=this.tippy)===null||p===void 0||p.setProps({getReferenceClientRect:((m=this.tippyOptions)===null||m===void 0?void 0:m.getReferenceClientRect)||(()=>{if(sO(g.selection)){let W=a.nodeDOM(M);if(W){const Y=W.dataset.nodeViewWrapper?W:W.querySelector("[data-node-view-wrapper]");if(Y&&(W=Y.firstChild),W)return W.getBoundingClientRect()}}return o4(a,M,j)})}),this.show()},this.editor=e,this.element=r,this.view=n,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,r=!!e.parentElement;this.tippy||!r||(this.tippy=gd(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,r){const{state:n}=e,i=n.selection.from!==n.selection.to;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(e,r);return}const o=!(r!=null&&r.selection.eq(e.state.selection)),s=!(r!=null&&r.doc.eq(e.state.doc));this.updateHandler(e,o,s,r)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,r;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(r=this.tippy)===null||r===void 0||r.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const hO=t=>new _t({key:typeof t.pluginKey=="string"?new St(t.pluginKey):t.pluginKey,view:e=>new kF({view:e,...t})});yt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[hO({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});function _F(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rx={exports:{}},Fb={};/**
90
+ * @license React
91
+ * use-sync-external-store-shim.production.min.js
92
+ *
93
+ * Copyright (c) Facebook, Inc. and its affiliates.
94
+ *
95
+ * This source code is licensed under the MIT license found in the
96
+ * LICENSE file in the root directory of this source tree.
97
+ */var R_;function EF(){if(R_)return Fb;R_=1;var t=J;function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function a(f,p){var m=p(),g=n({inst:{value:m,getSnapshot:p}}),b=g[0].inst,S=g[1];return o(function(){b.value=m,b.getSnapshot=p,l(b)&&S({inst:b})},[f,m,p]),i(function(){return l(b)&&S({inst:b}),f(function(){l(b)&&S({inst:b})})},[f]),s(m),m}function l(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!r(f,m)}catch{return!0}}function c(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Fb.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Fb}var jb={};/**
98
+ * @license React
99
+ * use-sync-external-store-shim.development.js
100
+ *
101
+ * Copyright (c) Facebook, Inc. and its affiliates.
102
+ *
103
+ * This source code is licensed under the MIT license found in the
104
+ * LICENSE file in the root directory of this source tree.
105
+ */var I_;function CF(){return I_||(I_=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=J,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(M){{for(var j=arguments.length,$=new Array(j>1?j-1:0),W=1;W<j;W++)$[W-1]=arguments[W];n("error",M,$)}}function n(M,j,$){{var W=e.ReactDebugCurrentFrame,Y=W.getStackAddendum();Y!==""&&(j+="%s",$=$.concat([Y]));var ee=$.map(function(P){return String(P)});ee.unshift("Warning: "+j),Function.prototype.apply.call(console[M],console,ee)}}function i(M,j){return M===j&&(M!==0||1/M===1/j)||M!==M&&j!==j}var o=typeof Object.is=="function"?Object.is:i,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,d=!1,f=!1;function p(M,j,$){d||t.startTransition!==void 0&&(d=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var W=j();if(!f){var Y=j();o(W,Y)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var ee=s({inst:{value:W,getSnapshot:j}}),P=ee[0].inst,fe=ee[1];return l(function(){P.value=W,P.getSnapshot=j,m(P)&&fe({inst:P})},[M,W,j]),a(function(){m(P)&&fe({inst:P});var de=function(){m(P)&&fe({inst:P})};return M(de)},[M]),c(W),W}function m(M){var j=M.getSnapshot,$=M.value;try{var W=j();return!o($,W)}catch{return!0}}function g(M,j,$){return j()}var b=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",S=!b,w=S?g:p,T=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:w;jb.useSyncExternalStore=T,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),jb}process.env.NODE_ENV==="production"?rx.exports=EF():rx.exports=CF();var Uy=rx.exports;const TF=(...t)=>e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&(r.current=e)})},AF=({contentComponent:t})=>{const e=Uy.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return J.createElement(J.Fragment,null,Object.values(e))};function RF(){const t=new Set;let e={};return{subscribe(r){return t.add(r),()=>{t.delete(r)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(r,n){e={...e,[r]:us.createPortal(n.reactElement,n.element,r)},t.forEach(i=>i())},removeRenderer(r){const n={...e};delete n[r],e=n,t.forEach(i=>i())}}}class IF extends J.Component{constructor(e){var r;super(e),this.editorContentRef=J.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((r=e.editor)===null||r===void 0)&&r.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const r=this.editorContentRef.current;r.append(...e.options.element.childNodes),e.setOptions({element:r}),e.contentComponent=RF(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;const r=document.createElement("div");r.append(...e.options.element.childNodes),e.setOptions({element:r})}render(){const{editor:e,innerRef:r,...n}=this.props;return J.createElement(J.Fragment,null,J.createElement("div",{ref:TF(r,this.editorContentRef),...n}),(e==null?void 0:e.contentComponent)&&J.createElement(AF,{contentComponent:e.contentComponent}))}}const OF=J.forwardRef((t,e)=>{const r=J.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return J.createElement(IF,{key:r,innerRef:e,...t})}),MF=J.memo(OF);var NF=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(i of e.entries())if(!r.has(i[0]))return!1;for(i of e.entries())if(!t(i[1],r.get(i[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(i of e.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(e[i]!==r[i])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var s=o[i];if(!(s==="_owner"&&e.$$typeof)&&!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r},DF=_F(NF),nx={exports:{}},Bb={};/**
106
+ * @license React
107
+ * use-sync-external-store-shim/with-selector.production.min.js
108
+ *
109
+ * Copyright (c) Facebook, Inc. and its affiliates.
110
+ *
111
+ * This source code is licensed under the MIT license found in the
112
+ * LICENSE file in the root directory of this source tree.
113
+ */var O_;function PF(){if(O_)return Bb;O_=1;var t=J,e=Uy;function r(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,o=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;return Bb.useSyncExternalStoreWithSelector=function(c,d,f,p,m){var g=o(null);if(g.current===null){var b={hasValue:!1,value:null};g.current=b}else b=g.current;g=a(function(){function w(W){if(!T){if(T=!0,M=W,W=p(W),m!==void 0&&b.hasValue){var Y=b.value;if(m(Y,W))return j=Y}return j=W}if(Y=j,n(M,W))return Y;var ee=p(W);return m!==void 0&&m(Y,ee)?Y:(M=W,j=ee)}var T=!1,M,j,$=f===void 0?null:f;return[function(){return w(d())},$===null?void 0:function(){return w($())}]},[d,f,p,m]);var S=i(c,g[0],g[1]);return s(function(){b.hasValue=!0,b.value=S},[S]),l(S),S},Bb}var zb={};/**
114
+ * @license React
115
+ * use-sync-external-store-shim/with-selector.development.js
116
+ *
117
+ * Copyright (c) Facebook, Inc. and its affiliates.
118
+ *
119
+ * This source code is licensed under the MIT license found in the
120
+ * LICENSE file in the root directory of this source tree.
121
+ */var M_;function LF(){return M_||(M_=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=J,e=Uy;function r(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,o=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function c(d,f,p,m,g){var b=o(null),S;b.current===null?(S={hasValue:!1,value:null},b.current=S):S=b.current;var w=a(function(){var $=!1,W,Y,ee=function(U){if(!$){$=!0,W=U;var ne=m(U);if(g!==void 0&&S.hasValue){var R=S.value;if(g(R,ne))return Y=R,R}return Y=ne,ne}var le=W,Ce=Y;if(n(le,U))return Ce;var he=m(U);return g!==void 0&&g(Ce,he)?Ce:(W=U,Y=he,he)},P=p===void 0?null:p,fe=function(){return ee(f())},de=P===null?void 0:function(){return ee(P())};return[fe,de]},[f,p,m,g]),T=w[0],M=w[1],j=i(d,T,M);return s(function(){S.hasValue=!0,S.value=j},[j]),l(j),j}zb.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),zb}process.env.NODE_ENV==="production"?nx.exports=PF():nx.exports=LF();var FF=nx.exports;const jF=typeof window<"u"?J.useLayoutEffect:J.useEffect;class BF{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const r=()=>{this.transactionNumber+=1,this.subscribers.forEach(i=>i())},n=this.editor;return n.on("transaction",r),()=>{n.off("transaction",r)}}}}function zF(t){var e;const[r]=J.useState(()=>new BF(t.editor)),n=FF.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:DF);return jF(()=>r.watch(t.editor),[t.editor,r]),J.useDebugValue(n),n}const N_=process.env.NODE_ENV!=="production",ix=typeof window>"u",HF=ix||!!(typeof window<"u"&&window.next);class $F{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return ix||HF?(N_&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&ix&&N_)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...n)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)===null||o===void 0?void 0:o.call(i,...n)},onBlur:(...n)=>{var i,o;return(o=(i=this.options.current).onBlur)===null||o===void 0?void 0:o.call(i,...n)},onCreate:(...n)=>{var i,o;return(o=(i=this.options.current).onCreate)===null||o===void 0?void 0:o.call(i,...n)},onDestroy:(...n)=>{var i,o;return(o=(i=this.options.current).onDestroy)===null||o===void 0?void 0:o.call(i,...n)},onFocus:(...n)=>{var i,o;return(o=(i=this.options.current).onFocus)===null||o===void 0?void 0:o.call(i,...n)},onSelectionUpdate:(...n)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)===null||o===void 0?void 0:o.call(i,...n)},onTransaction:(...n)=>{var i,o;return(o=(i=this.options.current).onTransaction)===null||o===void 0?void 0:o.call(i,...n)},onUpdate:(...n)=>{var i,o;return(o=(i=this.options.current).onUpdate)===null||o===void 0?void 0:o.call(i,...n)},onContentError:(...n)=>{var i,o;return(o=(i=this.options.current).onContentError)===null||o===void 0?void 0:o.call(i,...n)},onDrop:(...n)=>{var i,o;return(o=(i=this.options.current).onDrop)===null||o===void 0?void 0:o.call(i,...n)},onPaste:(...n)=>{var i,o;return(o=(i=this.options.current).onPaste)===null||o===void 0?void 0:o.call(i,...n)}};return new P4(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((n,i)=>n===e[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){r&&r.setOptions(this.options.current);return}r&&!r.isDestroyed&&(r.destroy(),this.instanceId===e&&this.setEditor(null))},1)}}function UF(t={},e=[]){const r=J.useRef(t);r.current=t;const[n]=J.useState(()=>new $F(r)),i=Uy.useSyncExternalStore(n.subscribe,n.getEditor,n.getServerSnapshot);return J.useDebugValue(i),J.useEffect(n.onRender(e)),zF({editor:i,selector:({transactionNumber:o})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&o===0?0:o+1}),i}const pO=J.createContext({editor:null});pO.Consumer;const WF=()=>J.useContext(pO),qn=t=>{const[e,r]=J.useState(null),{editor:n}=WF();return J.useEffect(()=>{var i;if(!e||!((i=t.editor)===null||i===void 0)&&i.isDestroyed||n!=null&&n.isDestroyed)return;const{pluginKey:o="bubbleMenu",editor:s,tippyOptions:a={},updateDelay:l,shouldShow:c=null}=t,d=s||n;if(!d){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const f=hO({updateDelay:l,editor:d,element:e,pluginKey:o,shouldShow:c,tippyOptions:a});return d.registerPlugin(f),()=>{d.unregisterPlugin(o)}},[t.editor,n,e]),J.createElement("div",{ref:r,className:t.className,style:{visibility:"hidden"}},t.children)},mO=J.createContext({onDragStart:void 0}),gO=()=>J.useContext(mO),VF=t=>{const e=t.as||"div",{nodeViewContentRef:r}=gO();return J.createElement(e,{...t,ref:r,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},gi=J.forwardRef((t,e)=>{const{onDragStart:r}=gO(),n=t.as||"div";return J.createElement(n,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...t.style}})});function GF(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function KF(t){var e;return typeof t=="object"&&((e=t.$$typeof)===null||e===void 0?void 0:e.toString())==="Symbol(react.forward_ref)"}class Wy{constructor(e,{editor:r,props:n={},as:i="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=r,this.props=n,this.element=document.createElement(i),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?us.flushSync(()=>{this.render()}):this.render()}render(){var e;const r=this.component,n=this.props,i=this.editor;(GF(r)||KF(r))&&(n.ref=o=>{this.ref=o}),this.reactElement=J.createElement(r,{...n}),(e=i==null?void 0:i.contentComponent)===null||e===void 0||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;const r=this.editor;(e=r==null?void 0:r.contentComponent)===null||e===void 0||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(r=>{this.element.setAttribute(r,e[r])})}}class qF extends F4{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const c=d=>d.charAt(0).toUpperCase()+d.substring(1);this.component.displayName=c(this.extension.name)}const i={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&c.appendChild(this.contentDOMElement)}},o=this.component,s=J.memo(c=>J.createElement(mO.Provider,{value:i},J.createElement(o,c)));s.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let a=this.node.isInline?"span":"div";this.options.as&&(a=this.options.as);const{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new Wy(s,{editor:this.editor,props:e,as:a,className:`node-${this.node.type.name} ${l}`.trim()}),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!((e=this.renderer.element.firstElementChild)===null||e===void 0)&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:e,to:r}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&r>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,r,n){const i=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const o=this.node,s=this.decorations,a=this.innerDecorations;return this.node=e,this.decorations=r,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:s,newNode:e,newDecorations:r,oldInnerDecorations:a,innerDecorations:n,updateProps:()=>i({node:e,decorations:r,innerDecorations:n})})}return e===this.node&&this.decorations===r&&this.innerDecorations===n||(this.node=e,this.decorations=r,this.innerDecorations=n,i({node:e,decorations:r,innerDecorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){const r=this.editor.extensionManager.attributes,n=hg(this.node,r);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function ko(t,e){return r=>r.editor.contentComponent?new qF(t,r,e):{}}function bd(t,e){const{state:r}=e,n=r.selection.$anchor;let i=!1;if(n.depth)for(let o=n.depth;o>0;o--)n.node(o).type.name===t&&(e.dispatchTransaction&&e.dispatchTransaction(r.tr.delete(n.before(o),n.after(o)).scrollIntoView()),i=!0);else{const o=r.selection.node;o&&o.type.name===t&&(e.chain().deleteSelection().run(),i=!0)}if(!i){const o=n.pos;if(o){const s=r.tr.doc.nodeAt(o);s&&s.type.name===t&&(e.dispatchTransaction&&e.dispatchTransaction(r.tr.delete(o,o+s.nodeSize)),i=!0)}}return i}var xh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function XF(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var D_=Object.prototype.toString,yO=function(e){var r=D_.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&D_.call(e.callee)==="[object Function]"),n},Hb,P_;function YF(){if(P_)return Hb;P_=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=yO,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(p){var m=p.constructor;return m&&m.prototype===p},c={$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},d=function(){if(typeof window>"u")return!1;for(var p in window)try{if(!c["$"+p]&&e.call(window,p)&&window[p]!==null&&typeof window[p]=="object")try{l(window[p])}catch{return!0}}catch{return!0}return!1}(),f=function(p){if(typeof window>"u"||!d)return l(p);try{return l(p)}catch{return!1}};t=function(m){var g=m!==null&&typeof m=="object",b=r.call(m)==="[object Function]",S=n(m),w=g&&r.call(m)==="[object String]",T=[];if(!g&&!b&&!S)throw new TypeError("Object.keys called on a non-object");var M=s&&b;if(w&&m.length>0&&!e.call(m,0))for(var j=0;j<m.length;++j)T.push(String(j));if(S&&m.length>0)for(var $=0;$<m.length;++$)T.push(String($));else for(var W in m)!(M&&W==="prototype")&&e.call(m,W)&&T.push(String(W));if(o)for(var Y=f(m),ee=0;ee<a.length;++ee)!(Y&&a[ee]==="constructor")&&e.call(m,a[ee])&&T.push(a[ee]);return T}}return Hb=t,Hb}var JF=Array.prototype.slice,ZF=yO,L_=Object.keys,Dm=L_?function(e){return L_(e)}:YF(),F_=Object.keys;Dm.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return ZF(n)?F_(JF.call(n)):F_(n)})}else Object.keys=Dm;return Object.keys||Dm};var J1=Dm,QF=Error,ej=EvalError,tj=RangeError,rj=ReferenceError,vO=SyntaxError,Aa=TypeError,nj=URIError,Vy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r 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]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0},j_=typeof Symbol<"u"&&Symbol,ij=Vy,Z1=function(){return typeof j_!="function"||typeof Symbol!="function"||typeof j_("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ij()},$b={__proto__:null,foo:{}},oj=Object,sj=function(){return{__proto__:$b}.foo===$b.foo&&!($b instanceof oj)},aj="Function.prototype.bind called on incompatible ",lj=Object.prototype.toString,cj=Math.max,uj="[object Function]",B_=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<r.length;o+=1)n[o+e.length]=r[o];return n},dj=function(e,r){for(var n=[],i=r,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},fj=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},hj=function(e){var r=this;if(typeof r!="function"||lj.apply(r)!==uj)throw new TypeError(aj+r);for(var n=dj(arguments,1),i,o=function(){if(this instanceof i){var d=r.apply(this,B_(n,arguments));return Object(d)===d?d:this}return r.apply(e,B_(n,arguments))},s=cj(0,r.length-n.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(i=Function("binder","return function ("+fj(a,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var c=function(){};c.prototype=r.prototype,i.prototype=new c,c.prototype=null}return i},pj=hj,Q1=Function.prototype.bind||pj,mj=Function.prototype.call,gj=Object.prototype.hasOwnProperty,yj=Q1,bO=yj.call(mj,gj),bt,vj=QF,bj=ej,wj=tj,xj=rj,Zu=vO,ju=Aa,Sj=nj,wO=Function,Ub=function(t){try{return wO('"use strict"; return ('+t+").constructor;")()}catch{}},Bl=Object.getOwnPropertyDescriptor;if(Bl)try{Bl({},"")}catch{Bl=null}var Wb=function(){throw new ju},kj=Bl?function(){try{return arguments.callee,Wb}catch{try{return Bl(arguments,"callee").get}catch{return Wb}}}():Wb,mu=Z1(),_j=sj(),xr=Object.getPrototypeOf||(_j?function(t){return t.__proto__}:null),Eu={},Ej=typeof Uint8Array>"u"||!xr?bt:xr(Uint8Array),zl={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?bt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?bt:ArrayBuffer,"%ArrayIteratorPrototype%":mu&&xr?xr([][Symbol.iterator]()):bt,"%AsyncFromSyncIteratorPrototype%":bt,"%AsyncFunction%":Eu,"%AsyncGenerator%":Eu,"%AsyncGeneratorFunction%":Eu,"%AsyncIteratorPrototype%":Eu,"%Atomics%":typeof Atomics>"u"?bt:Atomics,"%BigInt%":typeof BigInt>"u"?bt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?bt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?bt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?bt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":vj,"%eval%":eval,"%EvalError%":bj,"%Float32Array%":typeof Float32Array>"u"?bt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?bt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?bt:FinalizationRegistry,"%Function%":wO,"%GeneratorFunction%":Eu,"%Int8Array%":typeof Int8Array>"u"?bt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?bt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?bt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":mu&&xr?xr(xr([][Symbol.iterator]())):bt,"%JSON%":typeof JSON=="object"?JSON:bt,"%Map%":typeof Map>"u"?bt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!mu||!xr?bt:xr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?bt:Promise,"%Proxy%":typeof Proxy>"u"?bt:Proxy,"%RangeError%":wj,"%ReferenceError%":xj,"%Reflect%":typeof Reflect>"u"?bt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?bt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!mu||!xr?bt:xr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?bt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":mu&&xr?xr(""[Symbol.iterator]()):bt,"%Symbol%":mu?Symbol:bt,"%SyntaxError%":Zu,"%ThrowTypeError%":kj,"%TypedArray%":Ej,"%TypeError%":ju,"%Uint8Array%":typeof Uint8Array>"u"?bt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?bt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?bt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?bt:Uint32Array,"%URIError%":Sj,"%WeakMap%":typeof WeakMap>"u"?bt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?bt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?bt:WeakSet};if(xr)try{null.error}catch(t){var Cj=xr(xr(t));zl["%Error.prototype%"]=Cj}var Tj=function t(e){var r;if(e==="%AsyncFunction%")r=Ub("async function () {}");else if(e==="%GeneratorFunction%")r=Ub("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Ub("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&xr&&(r=xr(i.prototype))}return zl[e]=r,r},z_={__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"]},Vh=Q1,gg=bO,Aj=Vh.call(Function.call,Array.prototype.concat),Rj=Vh.call(Function.apply,Array.prototype.splice),H_=Vh.call(Function.call,String.prototype.replace),yg=Vh.call(Function.call,String.prototype.slice),Ij=Vh.call(Function.call,RegExp.prototype.exec),Oj=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Mj=/\\(\\)?/g,Nj=function(e){var r=yg(e,0,1),n=yg(e,-1);if(r==="%"&&n!=="%")throw new Zu("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Zu("invalid intrinsic syntax, expected opening `%`");var i=[];return H_(e,Oj,function(o,s,a,l){i[i.length]=a?H_(l,Mj,"$1"):s||o}),i},Dj=function(e,r){var n=e,i;if(gg(z_,n)&&(i=z_[n],n="%"+i[0]+"%"),gg(zl,n)){var o=zl[n];if(o===Eu&&(o=Tj(n)),typeof o>"u"&&!r)throw new ju("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Zu("intrinsic "+e+" does not exist!")},_o=function(e,r){if(typeof e!="string"||e.length===0)throw new ju("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ju('"allowMissing" argument must be a boolean');if(Ij(/^%?[^%]*%?$/,e)===null)throw new Zu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Nj(e),i=n.length>0?n[0]:"",o=Dj("%"+i+"%",r),s=o.name,a=o.value,l=!1,c=o.alias;c&&(i=c[0],Rj(n,Aj([0,1],c)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=yg(p,0,1),g=yg(p,-1);if((m==='"'||m==="'"||m==="`"||g==='"'||g==="'"||g==="`")&&m!==g)throw new Zu("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(l=!0),i+="."+p,s="%"+i+"%",gg(zl,s))a=zl[s];else if(a!=null){if(!(p in a)){if(!r)throw new ju("base intrinsic for "+e+" exists, but the property is not available.");return}if(Bl&&d+1>=n.length){var b=Bl(a,p);f=!!b,f&&"get"in b&&!("originalValue"in b.get)?a=b.get:a=a[p]}else f=gg(a,p),a=a[p];f&&!l&&(zl[s]=a)}}return a},Pj=_o,Pm=Pj("%Object.defineProperty%",!0)||!1;if(Pm)try{Pm({},"a",{value:1})}catch{Pm=!1}var eS=Pm,Lj=_o,Lm=Lj("%Object.getOwnPropertyDescriptor%",!0);if(Lm)try{Lm([],"length")}catch{Lm=null}var tS=Lm,$_=eS,Fj=vO,gu=Aa,U_=tS,rS=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new gu("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new gu("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new gu("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new gu("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new gu("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new gu("`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,l=!!U_&&U_(e,r);if($_)$_(e,r,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:o===null&&l?l.writable:!o});else if(a||!i&&!o&&!s)e[r]=n;else throw new Fj("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ox=eS,xO=function(){return!!ox};xO.hasArrayLengthDefineBug=function(){if(!ox)return null;try{return ox([],"length",{value:1}).length!==1}catch{return!0}};var nS=xO,jj=J1,Bj=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",zj=Object.prototype.toString,Hj=Array.prototype.concat,W_=rS,$j=function(t){return typeof t=="function"&&zj.call(t)==="[object Function]"},SO=nS(),Uj=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!$j(n)||!n())return}SO?W_(t,e,r,!0):W_(t,e,r)},kO=function(t,e){var r=arguments.length>2?arguments[2]:{},n=jj(e);Bj&&(n=Hj.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)Uj(t,n[i],e[n[i]],r[n[i]])};kO.supportsDescriptors=!!SO;var nc=kO,_O={exports:{}},Wj=_o,V_=rS,Vj=nS(),G_=tS,K_=Aa,Gj=Wj("%Math.floor%"),Kj=function(e,r){if(typeof e!="function")throw new K_("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Gj(r)!==r)throw new K_("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&G_){var s=G_(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!n)&&(Vj?V_(e,"length",r,!0,!0):V_(e,"length",r)),e};(function(t){var e=Q1,r=_o,n=Kj,i=Aa,o=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(s,o),l=eS,c=r("%Math.max%");t.exports=function(p){if(typeof p!="function")throw new i("a function is required");var m=a(e,s,arguments);return n(m,1+c(0,p.length-(arguments.length-1)),!0)};var d=function(){return a(e,o,arguments)};l?l(t.exports,"apply",{value:d}):t.exports.apply=d})(_O);var wd=_O.exports,EO=_o,CO=wd,qj=CO(EO("String.prototype.indexOf")),wi=function(e,r){var n=EO(e,!!r);return typeof n=="function"&&qj(e,".prototype.")>-1?CO(n):n},Xj=J1,TO=Vy(),AO=wi,q_=Object,Yj=AO("Array.prototype.push"),X_=AO("Object.prototype.propertyIsEnumerable"),Jj=TO?Object.getOwnPropertySymbols:null,RO=function(e,r){if(e==null)throw new TypeError("target must be an object");var n=q_(e);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var o=q_(arguments[i]),s=Xj(o),a=TO&&(Object.getOwnPropertySymbols||Jj);if(a)for(var l=a(o),c=0;c<l.length;++c){var d=l[c];X_(o,d)&&Yj(s,d)}for(var f=0;f<s.length;++f){var p=s[f];if(X_(o,p)){var m=o[p];n[p]=m}}}return n},Vb=RO,Zj=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n<e.length;++n)r[e[n]]=e[n];var i=Object.assign({},r),o="";for(var s in i)o+=s;return t!==o},Qj=function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch{return t[1]==="y"}return!1},IO=function(){return!Object.assign||Zj()||Qj()?Vb:Object.assign},e8=nc,t8=IO,r8=function(){var e=t8();return e8(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e},n8=nc,i8=wd,o8=RO,OO=IO,s8=r8,a8=i8.apply(OO()),MO=function(e,r){return a8(Object,arguments)};n8(MO,{getPolyfill:OO,implementation:o8,shim:s8});var l8=MO,Sh=function(){return typeof(function(){}).name=="string"},th=Object.getOwnPropertyDescriptor;if(th)try{th([],"length")}catch{th=null}Sh.functionsHaveConfigurableNames=function(){if(!Sh()||!th)return!1;var e=th(function(){},"name");return!!e&&!!e.configurable};var c8=Function.prototype.bind;Sh.boundFunctionsHaveNames=function(){return Sh()&&typeof c8=="function"&&(function(){}).bind().name!==""};var u8=Sh,Y_=rS,d8=nS(),f8=u8.functionsHaveConfigurableNames(),h8=Aa,p8=function(e,r){if(typeof e!="function")throw new h8("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||f8)&&(d8?Y_(e,"name",r,!0,!0):Y_(e,"name",r)),e},m8=p8,g8=Aa,y8=Object,NO=m8(function(){if(this==null||this!==y8(this))throw new g8("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),v8=NO,b8=nc.supportsDescriptors,w8=Object.getOwnPropertyDescriptor,DO=function(){if(b8&&/a/mig.flags==="gim"){var e=w8(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return e.get}}return v8},x8=nc.supportsDescriptors,S8=DO,k8=Object.getOwnPropertyDescriptor,_8=Object.defineProperty,E8=TypeError,J_=Object.getPrototypeOf,C8=/a/,T8=function(){if(!x8||!J_)throw new E8("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=S8(),r=J_(C8),n=k8(r,"flags");return(!n||n.get!==e)&&_8(r,"flags",{configurable:!0,enumerable:!1,get:e}),e},A8=nc,R8=wd,I8=NO,PO=DO,O8=T8,LO=R8(PO());A8(LO,{getPolyfill:PO,implementation:I8,shim:O8});var M8=LO,Fm={exports:{}},N8=Vy,ic=function(){return N8()&&!!Symbol.toStringTag},D8=ic(),P8=wi,sx=P8("Object.prototype.toString"),Gy=function(e){return D8&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:sx(e)==="[object Arguments]"},FO=function(e){return Gy(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&sx(e)!=="[object Array]"&&sx(e.callee)==="[object Function]"},L8=function(){return Gy(arguments)}();Gy.isLegacyArguments=FO;var jO=L8?Gy:FO;const F8={},j8=Object.freeze(Object.defineProperty({__proto__:null,default:F8},Symbol.toStringTag,{value:"Module"})),B8=XF(j8);var iS=typeof Map=="function"&&Map.prototype,Gb=Object.getOwnPropertyDescriptor&&iS?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,vg=iS&&Gb&&typeof Gb.get=="function"?Gb.get:null,Z_=iS&&Map.prototype.forEach,oS=typeof Set=="function"&&Set.prototype,Kb=Object.getOwnPropertyDescriptor&&oS?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,bg=oS&&Kb&&typeof Kb.get=="function"?Kb.get:null,Q_=oS&&Set.prototype.forEach,z8=typeof WeakMap=="function"&&WeakMap.prototype,rh=z8?WeakMap.prototype.has:null,H8=typeof WeakSet=="function"&&WeakSet.prototype,nh=H8?WeakSet.prototype.has:null,$8=typeof WeakRef=="function"&&WeakRef.prototype,eE=$8?WeakRef.prototype.deref:null,U8=Boolean.prototype.valueOf,W8=Object.prototype.toString,V8=Function.prototype.toString,G8=String.prototype.match,sS=String.prototype.slice,ha=String.prototype.replace,K8=String.prototype.toUpperCase,tE=String.prototype.toLowerCase,BO=RegExp.prototype.test,rE=Array.prototype.concat,fo=Array.prototype.join,q8=Array.prototype.slice,nE=Math.floor,ax=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qb=Object.getOwnPropertySymbols,lx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Qu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Yr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Qu||!0)?Symbol.toStringTag:null,zO=Object.prototype.propertyIsEnumerable,iE=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function oE(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||BO.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-nE(-t):nE(t);if(n!==t){var i=String(n),o=sS.call(e,i.length+1);return ha.call(i,r,"$&_")+"."+ha.call(ha.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ha.call(e,r,"$&_")}var cx=B8,sE=cx.custom,aE=$O(sE)?sE:null,X8=function t(e,r,n,i){var o=r||{};if(ra(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ra(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=ra(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(ra(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(ra(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 WO(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?oE(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?oE(e,c):c}var d=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=d&&d>0&&typeof e=="object")return ux(e)?"[Array]":"[Object]";var f=hB(o,n);if(typeof i>"u")i=[];else if(UO(i,e)>=0)return"[Circular]";function p(ne,R,le){if(R&&(i=q8.call(i),i.push(R)),le){var Ce={depth:o.depth};return ra(o,"quoteStyle")&&(Ce.quoteStyle=o.quoteStyle),t(ne,Ce,n+1,i)}return t(ne,o,n+1,i)}if(typeof e=="function"&&!lE(e)){var m=iB(e),g=qp(e,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(g.length>0?" { "+fo.call(g,", ")+" }":"")}if($O(e)){var b=Qu?ha.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):lx.call(e);return typeof e=="object"&&!Qu?Af(b):b}if(uB(e)){for(var S="<"+tE.call(String(e.nodeName)),w=e.attributes||[],T=0;T<w.length;T++)S+=" "+w[T].name+"="+HO(Y8(w[T].value),"double",o);return S+=">",e.childNodes&&e.childNodes.length&&(S+="..."),S+="</"+tE.call(String(e.nodeName))+">",S}if(ux(e)){if(e.length===0)return"[]";var M=qp(e,p);return f&&!fB(M)?"["+dx(M,f)+"]":"[ "+fo.call(M,", ")+" ]"}if(Z8(e)){var j=qp(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!zO.call(e,"cause")?"{ ["+String(e)+"] "+fo.call(rE.call("[cause]: "+p(e.cause),j),", ")+" }":j.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fo.call(j,", ")+" }"}if(typeof e=="object"&&s){if(aE&&typeof e[aE]=="function"&&cx)return cx(e,{depth:d-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(oB(e)){var $=[];return Z_&&Z_.call(e,function(ne,R){$.push(p(R,e,!0)+" => "+p(ne,e))}),cE("Map",vg.call(e),$,f)}if(lB(e)){var W=[];return Q_&&Q_.call(e,function(ne){W.push(p(ne,e))}),cE("Set",bg.call(e),W,f)}if(sB(e))return Xb("WeakMap");if(cB(e))return Xb("WeakSet");if(aB(e))return Xb("WeakRef");if(eB(e))return Af(p(Number(e)));if(rB(e))return Af(p(ax.call(e)));if(tB(e))return Af(U8.call(e));if(Q8(e))return Af(p(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof xh<"u"&&e===xh)return"{ [object globalThis] }";if(!J8(e)&&!lE(e)){var Y=qp(e,p),ee=iE?iE(e)===Object.prototype:e instanceof Object||e.constructor===Object,P=e instanceof Object?"":"null prototype",fe=!ee&&Yr&&Object(e)===e&&Yr in e?sS.call(Ra(e),8,-1):P?"Object":"",de=ee||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",U=de+(fe||P?"["+fo.call(rE.call([],fe||[],P||[]),": ")+"] ":"");return Y.length===0?U+"{}":f?U+"{"+dx(Y,f)+"}":U+"{ "+fo.call(Y,", ")+" }"}return String(e)};function HO(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Y8(t){return ha.call(String(t),/"/g,"&quot;")}function ux(t){return Ra(t)==="[object Array]"&&(!Yr||!(typeof t=="object"&&Yr in t))}function J8(t){return Ra(t)==="[object Date]"&&(!Yr||!(typeof t=="object"&&Yr in t))}function lE(t){return Ra(t)==="[object RegExp]"&&(!Yr||!(typeof t=="object"&&Yr in t))}function Z8(t){return Ra(t)==="[object Error]"&&(!Yr||!(typeof t=="object"&&Yr in t))}function Q8(t){return Ra(t)==="[object String]"&&(!Yr||!(typeof t=="object"&&Yr in t))}function eB(t){return Ra(t)==="[object Number]"&&(!Yr||!(typeof t=="object"&&Yr in t))}function tB(t){return Ra(t)==="[object Boolean]"&&(!Yr||!(typeof t=="object"&&Yr in t))}function $O(t){if(Qu)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!lx)return!1;try{return lx.call(t),!0}catch{}return!1}function rB(t){if(!t||typeof t!="object"||!ax)return!1;try{return ax.call(t),!0}catch{}return!1}var nB=Object.prototype.hasOwnProperty||function(t){return t in this};function ra(t,e){return nB.call(t,e)}function Ra(t){return W8.call(t)}function iB(t){if(t.name)return t.name;var e=G8.call(V8.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function UO(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function oB(t){if(!vg||!t||typeof t!="object")return!1;try{vg.call(t);try{bg.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function sB(t){if(!rh||!t||typeof t!="object")return!1;try{rh.call(t,rh);try{nh.call(t,nh)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function aB(t){if(!eE||!t||typeof t!="object")return!1;try{return eE.call(t),!0}catch{}return!1}function lB(t){if(!bg||!t||typeof t!="object")return!1;try{bg.call(t);try{vg.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function cB(t){if(!nh||!t||typeof t!="object")return!1;try{nh.call(t,nh);try{rh.call(t,rh)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function uB(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function WO(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return WO(sS.call(t,0,e.maxStringLength),e)+n}var i=ha.call(ha.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,dB);return HO(i,"single",e)}function dB(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+K8.call(e.toString(16))}function Af(t){return"Object("+t+")"}function Xb(t){return t+" { ? }"}function cE(t,e,r,n){var i=n?dx(r,n):fo.call(r,", ");return t+" ("+e+") {"+i+"}"}function fB(t){for(var e=0;e<t.length;e++)if(UO(t[e],`
122
+ `)>=0)return!1;return!0}function hB(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=fo.call(Array(t.indent+1)," ");else return null;return{base:r,prev:fo.call(Array(e+1),r)}}function dx(t,e){if(t.length===0)return"";var r=`
123
+ `+e.prev+e.base;return r+fo.call(t,","+r)+`
124
+ `+e.prev}function qp(t,e){var r=ux(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=ra(t,i)?e(t[i],t):""}var o=typeof qb=="function"?qb(t):[],s;if(Qu){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var l in t)ra(t,l)&&(r&&String(Number(l))===l&&l<t.length||Qu&&s["$"+l]instanceof Symbol||(BO.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if(typeof qb=="function")for(var c=0;c<o.length;c++)zO.call(t,o[c])&&n.push("["+e(o[c])+"]: "+e(t[o[c]],t));return n}var VO=_o,xd=wi,pB=X8,mB=Aa,Xp=VO("%WeakMap%",!0),Yp=VO("%Map%",!0),gB=xd("WeakMap.prototype.get",!0),yB=xd("WeakMap.prototype.set",!0),vB=xd("WeakMap.prototype.has",!0),bB=xd("Map.prototype.get",!0),wB=xd("Map.prototype.set",!0),xB=xd("Map.prototype.has",!0),aS=function(t,e){for(var r=t,n;(n=r.next)!==null;r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},SB=function(t,e){var r=aS(t,e);return r&&r.value},kB=function(t,e,r){var n=aS(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},_B=function(t,e){return!!aS(t,e)},GO=function(){var e,r,n,i={assert:function(o){if(!i.has(o))throw new mB("Side channel does not contain "+pB(o))},get:function(o){if(Xp&&o&&(typeof o=="object"||typeof o=="function")){if(e)return gB(e,o)}else if(Yp){if(r)return bB(r,o)}else if(n)return SB(n,o)},has:function(o){if(Xp&&o&&(typeof o=="object"||typeof o=="function")){if(e)return vB(e,o)}else if(Yp){if(r)return xB(r,o)}else if(n)return _B(n,o);return!1},set:function(o,s){Xp&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new Xp),yB(e,o,s)):Yp?(r||(r=new Yp),wB(r,o,s)):(n||(n={key:{},next:null}),kB(n,o,s))}};return i},EB=bO,Rf=GO(),Xo=Aa,lS={assert:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Xo("`O` is not an object");if(typeof e!="string")throw new Xo("`slot` must be a string");if(Rf.assert(t),!lS.has(t,e))throw new Xo("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Xo("`O` is not an object");if(typeof e!="string")throw new Xo("`slot` must be a string");var r=Rf.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Xo("`O` is not an object");if(typeof e!="string")throw new Xo("`slot` must be a string");var r=Rf.get(t);return!!r&&EB(r,"$"+e)},set:function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Xo("`O` is not an object");if(typeof e!="string")throw new Xo("`slot` must be a string");var n=Rf.get(t);n||(n={},Rf.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(lS);var CB=lS,If=CB,TB=SyntaxError,uE=typeof StopIteration=="object"?StopIteration:null,AB=function(e){if(!uE)throw new TB("this environment lacks StopIteration");If.set(e,"[[Done]]",!1);var r={next:function(){var i=If.get(this,"[[Iterator]]"),o=If.get(i,"[[Done]]");try{return{done:o,value:o?void 0:i.next()}}catch(s){if(If.set(i,"[[Done]]",!0),s!==uE)throw s;return{done:!0,value:void 0}}}};return If.set(r,"[[Iterator]]",e),r},RB={}.toString,KO=Array.isArray||function(t){return RB.call(t)=="[object Array]"},IB=String.prototype.valueOf,OB=function(e){try{return IB.call(e),!0}catch{return!1}},MB=Object.prototype.toString,NB="[object String]",DB=ic(),qO=function(e){return typeof e=="string"?!0:typeof e!="object"?!1:DB?OB(e):MB.call(e)===NB},cS=typeof Map=="function"&&Map.prototype?Map:null,PB=typeof Set=="function"&&Set.prototype?Set:null,wg;cS||(wg=function(e){return!1});var XO=cS?Map.prototype.has:null,dE=PB?Set.prototype.has:null;!wg&&!XO&&(wg=function(e){return!1});var YO=wg||function(e){if(!e||typeof e!="object")return!1;try{if(XO.call(e),dE)try{dE.call(e)}catch{return!0}return e instanceof cS}catch{}return!1},LB=typeof Map=="function"&&Map.prototype?Map:null,uS=typeof Set=="function"&&Set.prototype?Set:null,xg;uS||(xg=function(e){return!1});var fE=LB?Map.prototype.has:null,JO=uS?Set.prototype.has:null;!xg&&!JO&&(xg=function(e){return!1});var ZO=xg||function(e){if(!e||typeof e!="object")return!1;try{if(JO.call(e),fE)try{fE.call(e)}catch{return!0}return e instanceof uS}catch{}return!1},hE=jO,pE=AB;if(Z1()||Vy()){var Yb=Symbol.iterator;Fm.exports=function(e){if(e!=null&&typeof e[Yb]<"u")return e[Yb]();if(hE(e))return Array.prototype[Yb].call(e)}}else{var FB=KO,jB=qO,mE=_o,BB=mE("%Map%",!0),zB=mE("%Set%",!0),Di=wi,gE=Di("Array.prototype.push"),yE=Di("String.prototype.charCodeAt"),HB=Di("String.prototype.slice"),$B=function(e,r){var n=e.length;if(r+1>=n)return r+1;var i=yE(e,r);if(i<55296||i>56319)return r+1;var o=yE(e,r+1);return o<56320||o>57343?r+1:r+2},Jb=function(e){var r=0;return{next:function(){var i=r>=e.length,o;return i||(o=e[r],r+=1),{done:i,value:o}}}},vE=function(e,r){if(FB(e)||hE(e))return Jb(e);if(jB(e)){var n=0;return{next:function(){var o=$B(e,n),s=HB(e,n,o);return n=o,{done:o>e.length,value:s}}}}if(r&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!BB&&!zB)Fm.exports=function(e){if(e!=null)return vE(e,!0)};else{var UB=YO,WB=ZO,bE=Di("Map.prototype.forEach",!0),wE=Di("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var xE=Di("Map.prototype.iterator",!0),SE=Di("Set.prototype.iterator",!0);var kE=Di("Map.prototype.@@iterator",!0)||Di("Map.prototype._es6-shim iterator_",!0),_E=Di("Set.prototype.@@iterator",!0)||Di("Set.prototype._es6-shim iterator_",!0),VB=function(e){if(UB(e)){if(xE)return pE(xE(e));if(kE)return kE(e);if(bE){var r=[];return bE(e,function(i,o){gE(r,[o,i])}),Jb(r)}}if(WB(e)){if(SE)return pE(SE(e));if(_E)return _E(e);if(wE){var n=[];return wE(e,function(i){gE(n,i)}),Jb(n)}}};Fm.exports=function(e){return VB(e)||vE(e)}}}var GB=Fm.exports,EE=function(t){return t!==t},QO=function(e,r){return e===0&&r===0?1/e===1/r:!!(e===r||EE(e)&&EE(r))},KB=QO,eM=function(){return typeof Object.is=="function"?Object.is:KB},qB=eM,XB=nc,YB=function(){var e=qB();return XB(Object,{is:e},{is:function(){return Object.is!==e}}),e},JB=nc,ZB=wd,QB=QO,tM=eM,ez=YB,rM=ZB(tM(),Object);JB(rM,{getPolyfill:tM,implementation:QB,shim:ez});var tz=rM,rz=wd,nM=wi,nz=_o,fx=nz("%ArrayBuffer%",!0),jm=nM("ArrayBuffer.prototype.byteLength",!0),iz=nM("Object.prototype.toString"),CE=!!fx&&!jm&&new fx(0).slice,TE=!!CE&&rz(CE),iM=jm||TE?function(e){if(!e||typeof e!="object")return!1;try{return jm?jm(e):TE(e,0),!0}catch{return!1}}:fx?function(e){return iz(e)==="[object ArrayBuffer]"}:function(e){return!1},oz=Date.prototype.getDay,sz=function(e){try{return oz.call(e),!0}catch{return!1}},az=Object.prototype.toString,lz="[object Date]",cz=ic(),uz=function(e){return typeof e!="object"||e===null?!1:cz?sz(e):az.call(e)===lz},hx=wi,oM=ic(),sM,aM,px,mx;if(oM){sM=hx("Object.prototype.hasOwnProperty"),aM=hx("RegExp.prototype.exec"),px={};var Zb=function(){throw px};mx={toString:Zb,valueOf:Zb},typeof Symbol.toPrimitive=="symbol"&&(mx[Symbol.toPrimitive]=Zb)}var dz=hx("Object.prototype.toString"),fz=Object.getOwnPropertyDescriptor,hz="[object RegExp]",pz=oM?function(e){if(!e||typeof e!="object")return!1;var r=fz(e,"lastIndex"),n=r&&sM(r,"value");if(!n)return!1;try{aM(e,mx)}catch(i){return i===px}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:dz(e)===hz},mz=wi,AE=mz("SharedArrayBuffer.prototype.byteLength",!0),gz=AE?function(e){if(!e||typeof e!="object")return!1;try{return AE(e),!0}catch{return!1}}:function(e){return!1},yz=Number.prototype.toString,vz=function(e){try{return yz.call(e),!0}catch{return!1}},bz=Object.prototype.toString,wz="[object Number]",xz=ic(),Sz=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:xz?vz(e):bz.call(e)===wz},lM=wi,kz=lM("Boolean.prototype.toString"),_z=lM("Object.prototype.toString"),Ez=function(e){try{return kz(e),!0}catch{return!1}},Cz="[object Boolean]",Tz=ic(),Az=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:Tz&&Symbol.toStringTag in e?Ez(e):_z(e)===Cz},gx={exports:{}},Rz=Object.prototype.toString,Iz=Z1();if(Iz){var Oz=Symbol.prototype.toString,Mz=/^Symbol\(.*\)$/,Nz=function(e){return typeof e.valueOf()!="symbol"?!1:Mz.test(Oz.call(e))};gx.exports=function(e){if(typeof e=="symbol")return!0;if(Rz.call(e)!=="[object Symbol]")return!1;try{return Nz(e)}catch{return!1}}}else gx.exports=function(e){return!1};var Dz=gx.exports,yx={exports:{}},RE=typeof BigInt<"u"&&BigInt,Pz=function(){return typeof RE=="function"&&typeof BigInt=="function"&&typeof RE(42)=="bigint"&&typeof BigInt(42)=="bigint"},Lz=Pz();if(Lz){var Fz=BigInt.prototype.valueOf,jz=function(e){try{return Fz.call(e),!0}catch{}return!1};yx.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:jz(e)}}else yx.exports=function(e){return!1};var Bz=yx.exports,zz=qO,Hz=Sz,$z=Az,Uz=Dz,Wz=Bz,Vz=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(zz(e))return"String";if(Hz(e))return"Number";if($z(e))return"Boolean";if(Uz(e))return"Symbol";if(Wz(e))return"BigInt"},Sg=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,IE=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,kg;Sg||(kg=function(e){return!1});var vx=Sg?Sg.prototype.has:null,Qb=IE?IE.prototype.has:null;!kg&&!vx&&(kg=function(e){return!1});var Gz=kg||function(e){if(!e||typeof e!="object")return!1;try{if(vx.call(e,vx),Qb)try{Qb.call(e,Qb)}catch{return!0}return e instanceof Sg}catch{}return!1},bx={exports:{}},Kz=_o,cM=wi,qz=Kz("%WeakSet%",!0),ew=cM("WeakSet.prototype.has",!0);if(ew){var tw=cM("WeakMap.prototype.has",!0);bx.exports=function(e){if(!e||typeof e!="object")return!1;try{if(ew(e,ew),tw)try{tw(e,tw)}catch{return!0}return e instanceof qz}catch{}return!1}}else bx.exports=function(e){return!1};var Xz=bx.exports,Yz=YO,Jz=ZO,Zz=Gz,Qz=Xz,eH=function(e){if(e&&typeof e=="object"){if(Yz(e))return"Map";if(Jz(e))return"Set";if(Zz(e))return"WeakMap";if(Qz(e))return"WeakSet"}return!1},uM=Function.prototype.toString,Mu=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,wx,Bm;if(typeof Mu=="function"&&typeof Object.defineProperty=="function")try{wx=Object.defineProperty({},"length",{get:function(){throw Bm}}),Bm={},Mu(function(){throw 42},null,wx)}catch(t){t!==Bm&&(Mu=null)}else Mu=null;var tH=/^\s*class\b/,xx=function(e){try{var r=uM.call(e);return tH.test(r)}catch{return!1}},rw=function(e){try{return xx(e)?!1:(uM.call(e),!0)}catch{return!1}},zm=Object.prototype.toString,rH="[object Object]",nH="[object Function]",iH="[object GeneratorFunction]",oH="[object HTMLAllCollection]",sH="[object HTML document.all class]",aH="[object HTMLCollection]",lH=typeof Symbol=="function"&&!!Symbol.toStringTag,cH=!(0 in[,]),Sx=function(){return!1};if(typeof document=="object"){var uH=document.all;zm.call(uH)===zm.call(document.all)&&(Sx=function(e){if((cH||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=zm.call(e);return(r===oH||r===sH||r===aH||r===rH)&&e("")==null}catch{}return!1})}var dH=Mu?function(e){if(Sx(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Mu(e,null,wx)}catch(r){if(r!==Bm)return!1}return!xx(e)&&rw(e)}:function(e){if(Sx(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(lH)return rw(e);if(xx(e))return!1;var r=zm.call(e);return r!==nH&&r!==iH&&!/^\[object HTML/.test(r)?!1:rw(e)},fH=dH,hH=Object.prototype.toString,dM=Object.prototype.hasOwnProperty,pH=function(e,r,n){for(var i=0,o=e.length;i<o;i++)dM.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},mH=function(e,r,n){for(var i=0,o=e.length;i<o;i++)n==null?r(e.charAt(i),i,e):r.call(n,e.charAt(i),i,e)},gH=function(e,r,n){for(var i in e)dM.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},yH=function(e,r,n){if(!fH(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),hH.call(e)==="[object Array]"?pH(e,r,i):typeof e=="string"?mH(e,r,i):gH(e,r,i)},vH=yH,bH=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],nw=bH,wH=typeof globalThis>"u"?xh:globalThis,xH=function(){for(var e=[],r=0;r<nw.length;r++)typeof wH[nw[r]]=="function"&&(e[e.length]=nw[r]);return e},_g=vH,SH=xH,OE=wd,dS=wi,Hm=tS,kH=dS("Object.prototype.toString"),fM=ic(),ME=typeof globalThis>"u"?xh:globalThis,kx=SH(),fS=dS("String.prototype.slice"),iw=Object.getPrototypeOf,_H=dS("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},Eg={__proto__:null};fM&&Hm&&iw?_g(kx,function(t){var e=new ME[t];if(Symbol.toStringTag in e){var r=iw(e),n=Hm(r,Symbol.toStringTag);if(!n){var i=iw(r);n=Hm(i,Symbol.toStringTag)}Eg["$"+t]=OE(n.get)}}):_g(kx,function(t){var e=new ME[t],r=e.slice||e.set;r&&(Eg["$"+t]=OE(r))});var EH=function(e){var r=!1;return _g(Eg,function(n,i){if(!r)try{"$"+n(e)===i&&(r=fS(i,1))}catch{}}),r},CH=function(e){var r=!1;return _g(Eg,function(n,i){if(!r)try{n(e),r=fS(i,1)}catch{}}),r},TH=function(e){if(!e||typeof e!="object")return!1;if(!fM){var r=fS(kH(e),8,-1);return _H(kx,r)>-1?r:r!=="Object"?!1:CH(e)}return Hm?EH(e):null},AH=wi,NE=AH("ArrayBuffer.prototype.byteLength",!0),RH=iM,IH=function(e){return RH(e)?NE?NE(e):e.byteLength:NaN},hM=l8,Eo=wi,DE=M8,OH=_o,ed=GB,MH=GO,PE=tz,LE=jO,FE=KO,jE=iM,BE=uz,zE=pz,HE=gz,$E=J1,UE=Vz,WE=eH,VE=TH,GE=IH,KE=Eo("SharedArrayBuffer.prototype.byteLength",!0),qE=Eo("Date.prototype.getTime"),ow=Object.getPrototypeOf,XE=Eo("Object.prototype.toString"),Cg=OH("%Set%",!0),_x=Eo("Map.prototype.has",!0),Tg=Eo("Map.prototype.get",!0),YE=Eo("Map.prototype.size",!0),Ag=Eo("Set.prototype.add",!0),pM=Eo("Set.prototype.delete",!0),Rg=Eo("Set.prototype.has",!0),$m=Eo("Set.prototype.size",!0);function JE(t,e,r,n){for(var i=ed(t),o;(o=i.next())&&!o.done;)if(ji(e,o.value,r,n))return pM(t,o.value),!0;return!1}function mM(t){if(typeof t>"u")return null;if(typeof t!="object")return typeof t=="symbol"?!1:typeof t=="string"||typeof t=="number"?+t==+t:!0}function NH(t,e,r,n,i,o){var s=mM(r);if(s!=null)return s;var a=Tg(e,s),l=hM({},i,{strict:!1});return typeof a>"u"&&!_x(e,s)||!ji(n,a,l,o)?!1:!_x(t,s)&&ji(n,a,l,o)}function DH(t,e,r){var n=mM(r);return n??(Rg(e,n)&&!Rg(t,n))}function ZE(t,e,r,n,i,o){for(var s=ed(t),a,l;(a=s.next())&&!a.done;)if(l=a.value,ji(r,l,i,o)&&ji(n,Tg(e,l),i,o))return pM(t,l),!0;return!1}function ji(t,e,r,n){var i=r||{};if(i.strict?PE(t,e):t===e)return!0;var o=UE(t),s=UE(e);if(o!==s)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?PE(t,e):t==e;var a=n.has(t),l=n.has(e),c;if(a&&l){if(n.get(t)===n.get(e))return!0}else c={};return a||n.set(t,c),l||n.set(e,c),FH(t,e,i,n)}function QE(t){return!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function PH(t,e,r,n){if($m(t)!==$m(e))return!1;for(var i=ed(t),o=ed(e),s,a,l;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object")l||(l=new Cg),Ag(l,s.value);else if(!Rg(e,s.value)){if(r.strict||!DH(t,e,s.value))return!1;l||(l=new Cg),Ag(l,s.value)}if(l){for(;(a=o.next())&&!a.done;)if(a.value&&typeof a.value=="object"){if(!JE(l,a.value,r.strict,n))return!1}else if(!r.strict&&!Rg(t,a.value)&&!JE(l,a.value,r.strict,n))return!1;return $m(l)===0}return!0}function LH(t,e,r,n){if(YE(t)!==YE(e))return!1;for(var i=ed(t),o=ed(e),s,a,l,c,d,f;(s=i.next())&&!s.done;)if(c=s.value[0],d=s.value[1],c&&typeof c=="object")l||(l=new Cg),Ag(l,c);else if(f=Tg(e,c),typeof f>"u"&&!_x(e,c)||!ji(d,f,r,n)){if(r.strict||!NH(t,e,c,d,r,n))return!1;l||(l=new Cg),Ag(l,c)}if(l){for(;(a=o.next())&&!a.done;)if(c=a.value[0],f=a.value[1],c&&typeof c=="object"){if(!ZE(l,t,c,f,r,n))return!1}else if(!r.strict&&(!t.has(c)||!ji(Tg(t,c),f,r,n))&&!ZE(l,t,c,f,hM({},r,{strict:!1}),n))return!1;return $m(l)===0}return!0}function FH(t,e,r,n){var i,o;if(typeof t!=typeof e||t==null||e==null||XE(t)!==XE(e)||LE(t)!==LE(e))return!1;var s=FE(t),a=FE(e);if(s!==a)return!1;var l=t instanceof Error,c=e instanceof Error;if(l!==c||(l||c)&&(t.name!==e.name||t.message!==e.message))return!1;var d=zE(t),f=zE(e);if(d!==f||(d||f)&&(t.source!==e.source||DE(t)!==DE(e)))return!1;var p=BE(t),m=BE(e);if(p!==m||(p||m)&&qE(t)!==qE(e)||r.strict&&ow&&ow(t)!==ow(e))return!1;var g=VE(t),b=VE(e);if(g!==b)return!1;if(g||b){if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}var S=QE(t),w=QE(e);if(S!==w)return!1;if(S||w){if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}var T=jE(t),M=jE(e);if(T!==M)return!1;if(T||M)return GE(t)!==GE(e)?!1:typeof Uint8Array=="function"&&ji(new Uint8Array(t),new Uint8Array(e),r,n);var j=HE(t),$=HE(e);if(j!==$)return!1;if(j||$)return KE(t)!==KE(e)?!1:typeof Uint8Array=="function"&&ji(new Uint8Array(t),new Uint8Array(e),r,n);if(typeof t!=typeof e)return!1;var W=$E(t),Y=$E(e);if(W.length!==Y.length)return!1;for(W.sort(),Y.sort(),i=W.length-1;i>=0;i--)if(W[i]!=Y[i])return!1;for(i=W.length-1;i>=0;i--)if(o=W[i],!ji(t[o],e[o],r,n))return!1;var ee=WE(t),P=WE(e);return ee!==P?!1:ee==="Set"||P==="Set"?PH(t,e,r,n):ee==="Map"?LH(t,e,r,n):!0}var jH=function(e,r,n){return ji(e,r,n,MH())};const hS=Y1(jH);function BH(t){return t}function Gh(t,e,r,n){const i=BH,[o,s]=J.useState(i(r)),a=J.useRef(o);return J.useEffect(()=>{const l=()=>{const c={...r,...t.getAttributes(e)};Object.keys(c).forEach(f=>{(c[f]===null||c[f]===void 0)&&(c[f]=r?r[f]:null)});const d=i(c);hS(a.current,d)||(s(d),a.current=d)};return t.on("selectionUpdate",l),t.on("transaction",l),()=>{t.off("selectionUpdate",l),t.off("transaction",l)}},[t,r,e,i]),o}const Kh=At.forwardRef(({className:t,...e},r)=>x.jsx("textarea",{className:pt("richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",t),ref:r,...e}));Kh.displayName="Textarea";const eC=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,tC=Gr,pS=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return tC(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=e,s=Object.keys(i).map(c=>{const d=r==null?void 0:r[c],f=o==null?void 0:o[c];if(d===null)return null;const p=eC(d)||eC(f);return i[c][p]}),a=r&&Object.entries(r).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(g=>{let[b,S]=g;return Array.isArray(S)?S.includes({...o,...a}[b]):{...o,...a}[b]===S})?[...c,f,p]:c},[]);return tC(t,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},zH=pS("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",{variants:{variant:{default:"!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",destructive:"richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",outline:"richtext-border richtext-border-input richtext-bg-background hover:richtext-bg-accent hover:richtext-text-accent-foreground",secondary:"richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",ghost:"hover:richtext-bg-accent hover:richtext-text-accent-foreground",link:"richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"},size:{default:"richtext-h-10 richtext-px-4 richtext-py-2",sm:"richtext-h-9 richtext-rounded-md richtext-px-3",lg:"richtext-h-11 richtext-rounded-md richtext-px-8",icon:"richtext-h-10 richtext-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Mt=At.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...i},o)=>{const s=n?_1.Slot:"button";return x.jsx(s,{className:pt(zH({variant:e,size:r,className:t})),ref:o,...i})});Mt.displayName="Button";const Ia=tr.Root,Oa=tr.Trigger,rC=tr.Portal,nC=tr.Sub,Ex=At.forwardRef(({className:t,inset:e,children:r,...n},i)=>x.jsxs(tr.SubTrigger,{ref:i,className:pt("richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",e&&"richtext-pl-8",t),...n,children:[r,x.jsx(He.ChevronRight,{className:"richtext-ml-auto richtext-h-4 richtext-w-4"})]}));Ex.displayName=tr.SubTrigger.displayName;const Cx=At.forwardRef(({className:t,...e},r)=>x.jsx(tr.SubContent,{ref:r,className:pt("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...e}));Cx.displayName=tr.SubContent.displayName;const ps=At.forwardRef(({className:t,sideOffset:e=4,...r},n)=>x.jsx(tr.Portal,{children:x.jsx(tr.Content,{ref:n,sideOffset:e,className:pt("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...r})}));ps.displayName=tr.Content.displayName;const Pi=At.forwardRef(({className:t,inset:e,...r},n)=>x.jsx(tr.Item,{ref:n,className:pt("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e&&"richtext-pl-8",t),...r}));Pi.displayName=tr.Item.displayName;const oc=At.forwardRef(({className:t,children:e,checked:r,...n},i)=>x.jsxs(tr.CheckboxItem,{ref:i,className:pt("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),checked:r,...n,children:[x.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:x.jsx(tr.ItemIndicator,{children:x.jsx(He.Check,{className:"richtext-h-4 richtext-w-4"})})}),e]}));oc.displayName=tr.CheckboxItem.displayName;const HH=At.forwardRef(({className:t,children:e,...r},n)=>x.jsxs(tr.RadioItem,{ref:n,className:pt("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...r,children:[x.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:x.jsx(tr.ItemIndicator,{children:x.jsx(He.Circle,{className:"richtext-h-2 richtext-w-2 richtext-fill-current"})})}),e]}));HH.displayName=tr.RadioItem.displayName;const $H=At.forwardRef(({className:t,inset:e,...r},n)=>x.jsx(tr.Label,{ref:n,className:pt("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",e&&"richtext-pl-8",t),...r}));$H.displayName=tr.Label.displayName;const Ky=At.forwardRef(({className:t,...e},r)=>x.jsx(tr.Separator,{ref:r,className:pt("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",t),...e}));Ky.displayName=tr.Separator.displayName;function gM({className:t,...e}){return x.jsx("span",{className:pt("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",t),...e})}gM.displayName="DropdownMenuShortcut";const hn=At.forwardRef(({className:t,type:e,...r},n)=>x.jsx("input",{type:e,className:pt("richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",t),ref:n,...r}));hn.displayName="Input";const UH=pS("richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),Kn=At.forwardRef(({className:t,...e},r)=>x.jsx(TR.Root,{ref:r,className:pt(UH(),t),...e}));Kn.displayName=TR.Root.displayName;const xi=dh.Root,Si=dh.Trigger,Xn=At.forwardRef(({className:t,align:e="center",sideOffset:r=4,...n},i)=>x.jsx(dh.Portal,{children:x.jsx(dh.Content,{ref:i,align:e,sideOffset:r,className:pt("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...n})}));Xn.displayName=dh.Content.displayName;const Bi=At.forwardRef(({className:t,orientation:e="horizontal",decorative:r=!0,...n},i)=>x.jsx(AR.Root,{ref:i,decorative:r,orientation:e,className:pt("richtext-shrink-0 richtext-bg-border",e==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...n}));Bi.displayName=AR.Root.displayName;const mS=At.forwardRef(({className:t,...e},r)=>x.jsx(I0.Root,{className:pt("richtext-peer richtext-inline-flex richtext-h-6 richtext-w-11 richtext-shrink-0 richtext-cursor-pointer richtext-items-center richtext-rounded-full richtext-border-2 richtext-border-transparent richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 focus-visible:richtext-ring-offset-background disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 data-[state=checked]:richtext-bg-primary data-[state=unchecked]:richtext-bg-input",t),...e,ref:r,children:x.jsx(I0.Thumb,{className:pt("richtext-pointer-events-none richtext-block richtext-h-5 richtext-w-5 richtext-rounded-full richtext-bg-background richtext-shadow-lg richtext-ring-0 richtext-transition-transform data-[state=checked]:richtext-translate-x-5 data-[state=unchecked]:richtext-translate-x-0")})}));mS.displayName=I0.Root.displayName;const gS=tc.Root,qy=At.forwardRef(({className:t,...e},r)=>x.jsx(tc.List,{ref:r,className:pt("richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",t),...e}));qy.displayName=tc.List.displayName;const td=At.forwardRef(({className:t,...e},r)=>x.jsx(tc.Trigger,{ref:r,className:pt("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",t),...e}));td.displayName=tc.Trigger.displayName;const rd=At.forwardRef(({className:t,...e},r)=>x.jsx(tc.Content,{ref:r,className:pt("richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2",t),...e}));rd.displayName=tc.Content.displayName;const WH=pS("richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",{variants:{variant:{default:"richtext-bg-transparent",outline:"richtext-border richtext-border-input richtext-bg-transparent hover:richtext-bg-accent hover:richtext-text-accent-foreground"},size:{default:"richtext-h-10 richtext-px-3",sm:"richtext-h-9 richtext-px-2",lg:"richtext-h-11 richtext-px-5"}},defaultVariants:{variant:"default",size:"default"}}),qh=At.forwardRef(({className:t,variant:e,size:r,...n},i)=>x.jsx(CR.Root,{ref:i,className:pt(WH({variant:e,size:r,className:t})),...n}));qh.displayName=CR.Root.displayName;const VH=Bh.Provider,Sd=Bh.Root,kd=Bh.Trigger,sc=At.forwardRef(({className:t,sideOffset:e=4,...r},n)=>x.jsx(Bh.Content,{ref:n,sideOffset:e,className:pt("richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-popover-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...r}));sc.displayName=Bh.Content.displayName;const GH=cr.Root,KH=cr.Value,yM=At.forwardRef(({className:t,children:e,...r},n)=>x.jsxs(cr.Trigger,{ref:n,className:pt("richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",t),...r,children:[e,x.jsx(cr.Icon,{asChild:!0,children:x.jsx(He.ChevronDown,{className:"richtext-h-4 richtext-w-4 richtext-opacity-50"})})]}));yM.displayName=cr.Trigger.displayName;const vM=At.forwardRef(({className:t,...e},r)=>x.jsx(cr.ScrollUpButton,{ref:r,className:pt("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",t),...e,children:x.jsx(He.ChevronUp,{className:"richtext-h-4 richtext-w-4"})}));vM.displayName=cr.ScrollUpButton.displayName;const bM=At.forwardRef(({className:t,...e},r)=>x.jsx(cr.ScrollDownButton,{ref:r,className:pt("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",t),...e,children:x.jsx(He.ChevronDown,{className:"richtext-h-4 richtext-w-4"})}));bM.displayName=cr.ScrollDownButton.displayName;const wM=At.forwardRef(({className:t,children:e,position:r="popper",...n},i)=>x.jsx(cr.Portal,{children:x.jsxs(cr.Content,{ref:i,className:pt("richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",t),position:r,...n,children:[x.jsx(vM,{}),x.jsx(cr.Viewport,{className:pt("richtext-p-1",r==="popper"&&"richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"),children:e}),x.jsx(bM,{})]})}));wM.displayName=cr.Content.displayName;const qH=At.forwardRef(({className:t,...e},r)=>x.jsx(cr.Label,{ref:r,className:pt("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",t),...e}));qH.displayName=cr.Label.displayName;const Tx=At.forwardRef(({className:t,children:e,...r},n)=>x.jsxs(cr.Item,{ref:n,className:pt("richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...r,children:[x.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:x.jsx(cr.ItemIndicator,{children:x.jsx(He.Check,{className:"richtext-h-4 richtext-w-4"})})}),x.jsx(cr.ItemText,{children:e})]}));Tx.displayName=cr.Item.displayName;const XH=At.forwardRef(({className:t,...e},r)=>x.jsx(cr.Separator,{ref:r,className:pt("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",t),...e}));XH.displayName=cr.Separator.displayName;const xM=At.forwardRef(({className:t,...e},r)=>x.jsx(O0.Root,{ref:r,className:pt("!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-p-0 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-2 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",t),...e,children:x.jsx(O0.Indicator,{className:pt("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),children:x.jsx(He.Check,{className:"!richtext-h-4 !richtext-w-4"})})}));xM.displayName=O0.Root.displayName;function YH({editor:t,...e}){const r=Gh(t,Ml.name,{text:"",defaultShowPicker:!1}),{text:n,defaultShowPicker:i}=r,[o,s]=J.useState(""),[a,l]=J.useState(!1),c=J.useCallback(()=>t.isActive(Ml.name),[t]),d=J.useCallback(()=>bd(Ml.name,t),[t]),f=J.useCallback(()=>{t.chain().focus().setKatex({text:o}).run(),l(!1)},[t,o]);J.useEffect(()=>{i&&(l(!0),t.chain().updateAttributes(Ml.name,{defaultShowPicker:!1}).focus().run())},[t,i,l]),J.useEffect(()=>{a&&s(n||"")},[a]);const p=J.useMemo(()=>{try{return k1.renderToString(`${o}`)}catch{return o}},[o]),m=J.useMemo(()=>`${o}`.trim()?x.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:p||""}}):null,[o,p]);return x.jsx(qn,{editor:t,pluginKey:"Katex-bubble-menu",shouldShow:c,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{l(!1)}},children:e!=null&&e.disabled?x.jsx(x.Fragment,{}):x.jsx("div",{className:"richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black richtext-border-neutral-200 dark:richtext-border-neutral-800",children:a?x.jsxs(x.Fragment,{children:[x.jsx(Kh,{value:o,onChange:g=>s(g.target.value),autoFocus:!0,placeholder:"Formula text",rows:3,defaultValue:n,style:{marginBottom:8}}),m&&x.jsx("div",{className:"richtext-my-[10px] richtext-p-[10px] richtext-rounded-[6px] !richtext-border-[1px] richtext-whitespace-nowrap richtext-overflow-auto",children:m}),x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]",children:[x.jsx(Mt,{onClick:f,className:"richtext-flex-1",children:"Submit"}),x.jsx("a",{href:"https://katex.org/docs/supported",target:"_blank",rel:"noreferrer noopener",children:x.jsx(He.HelpCircle,{size:16})})]})]}):x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-gap-[6px]",children:[x.jsx(Ve,{tooltip:"Edit",action:()=>l(!a),children:x.jsx(He.Pencil,{size:16})}),x.jsx(Ve,{tooltip:"Delete",action:d,children:x.jsx(He.Trash2,{size:16})})]})})})}var Uf,Um,ih;function JH(){for(;Uf!==void 0;){const t=Uf,e=t.nextNotify;e!==void 0?(t.nextNotify=void 0,Uf=e):(Uf=void 0,Um=void 0),t.notify()}}function SM(t,e){const r=e.depsTail,n=r!==void 0?r.nextDep:e.deps;return n!==void 0&&n.dep===t?(e.depsTail=n,n):ZH(t,e,n,r)}function ZH(t,e,r,n){let i;if(ih!==void 0?(i=ih,ih=i.nextDep,i.nextDep=r,i.dep=t,i.sub=e):i={dep:t,sub:e,nextDep:r,prevSub:void 0,nextSub:void 0},n===void 0?e.deps=i:n.nextDep=i,t.subs===void 0)t.subs=i;else{const o=t.subsTail;i.prevSub=o,o.nextSub=i}return e.depsTail=i,t.subsTail=i,i}function QH(t){let e=16,r=t,n=0,i;e:do{const o=r.sub,s=o.flags;if(s&1){if(e7(r,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=t,r=t=a,e=8,++n):(r=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=t,r=t=a,e=8,++n):(r=a,e="notify"in o?4:8);continue}"notify"in o&&(Um!==void 0?Um.nextNotify=o:Uf=o,Um=o)}else s&e||(o.flags=s|e);if((i=t.nextSub)===void 0){if(n){let a=t.dep;do{--n;const l=a.subs,c=l.prevSub;if(l.prevSub=void 0,r=t=c.nextSub,t!==void 0){e=n?8:16;continue e}a=c.dep}while(n)}break}r!==t&&(e=n?8:16),r=t=i}while(!0);JH()}function iC(t){do{const e=t.sub,r=e.flags;(r&24)===8&&(e.flags=r|16),t=t.nextSub}while(t!==void 0)}function e7(t,e){const r=e.depsTail;if(r!==void 0){let n=e.deps;do{if(n===t)return!0;if(n===r)break;n=n.nextDep}while(n!==void 0)}return!1}function t7(t){let e=0,r,n;e:do{r=!1;const i=t.dep;if("update"in i){const o=i.flags;if(o&16){if(i.update()){const s=i.subs;s.nextSub!==void 0&&iC(s),r=!0}}else if(o&8){const s=i.subs;s.nextSub!==void 0&&(s.prevSub=t),t=i.deps,++e;continue}}if(r||(n=t.nextDep)===void 0){if(e){let o=t.sub;do{--e;const s=o.subs;let a=s.prevSub;if(a!==void 0)if(s.prevSub=void 0,r){if(o.update()){iC(o.subs),o=a.sub;continue}}else o.flags&=-9;else{if(r){if(o.update()){o=s.sub;continue}}else o.flags&=-9;a=s}if(t=a.nextDep,t!==void 0)continue e;o=a.sub,r=!1}while(e)}return r}t=n}while(!0)}function oC(t){t.depsTail=void 0,t.flags=1}function sC(t){const e=t.depsTail;e!==void 0?e.nextDep!==void 0&&(aC(e.nextDep),e.nextDep=void 0):t.deps!==void 0&&(aC(t.deps),t.deps=void 0),t.flags&=-2}function aC(t){do{const e=t.dep,r=t.nextDep,n=t.nextSub,i=t.prevSub;if(n!==void 0?(n.prevSub=i,t.nextSub=void 0):(e.subsTail=i,"lastTrackedId"in e&&(e.lastTrackedId=0)),i!==void 0?(i.nextSub=n,t.prevSub=void 0):e.subs=n,t.dep=void 0,t.sub=void 0,t.nextDep=ih,ih=t,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){t=o,e.depsTail.nextDep=r,e.deps=void 0,e.depsTail=void 0;continue}}t=r}while(t!==void 0)}var Ig,Bu=0,r7=0;function lC(t,e){Ig=t,Bu=e}function n7(){return++r7}function kM(t){const e=new i7(t);return e.run(),e}var i7=class{constructor(t){this.fn=t,this.nextNotify=void 0,this.subs=void 0,this.subsTail=void 0,this.deps=void 0,this.depsTail=void 0,this.flags=16,Bu&&SM(this,Ig)}notify(){let t=this.flags;if(t&16){this.run();return}if(t&8)if(t7(this.deps)){this.run();return}else this.flags=t&=-9;if(t&4){this.flags=t&-5;let e=this.deps;do{const r=e.dep;"notify"in r&&r.notify(),e=e.nextDep}while(e!==void 0)}}run(){const t=Ig,e=Bu;lC(this,n7()),oC(this);try{return this.fn()}finally{lC(t,e),sC(this)}}stop(){oC(this),sC(this)}};function o7(t){return new s7(t)}var s7=class{constructor(t){this.currentValue=t,this.subs=void 0,this.subsTail=void 0,this.lastTrackedId=0}get(){return Bu&&this.lastTrackedId!==Bu&&(this.lastTrackedId=Bu,SM(this,Ig)),this.currentValue}set(t){if(this.currentValue!==(this.currentValue=t)){const e=this.subs;e!==void 0&&QH(e)}}};function Xh(t){return o7(t)}function a7(t){return[J.useSyncExternalStore(e=>{let r=kM(()=>{t.get(),e()});return()=>r.stop()},()=>t.get(),()=>t.get()),e=>{typeof e=="function"?t.set(e(t.get())):t.set(e)}]}function Xy(t){return J.useSyncExternalStore(e=>{let r=kM(()=>{t.get(),e()});return()=>r.stop()},()=>t.get(),()=>t.get())}const l7={"editor.remove":"Remove","editor.copy":"Copy","editor.words":"WORDS","editor.characters":"CHARACTERS","editor.default":"Default","editor.recent":"Recently Used","editor.nofill":"No Fill","editor.format":"Format Painter","editor.delete":"Delete","editor.edit":"Edit","editor.settings":"Settings","editor.table_of_content":"Table of Content","editor.draghandle.tooltip":"Modify","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Import Word","editor.slash":"Press '/' for commands","editor.slash.empty":"No Result","editor.slash.format":"Format","editor.slash.insert":"Insert","editor.slash.embed":"Embed Services","editor.content":"Please input content","editor.fontFamily.tooltip":"Font Family","editor.fontFamily.default.tooltip":"Default","editor.moremark":"More Text Styles","editor.size.small.tooltip":"Small","editor.size.medium.tooltip":"Medium","editor.size.large.tooltip":"Cover","editor.bold.tooltip":"Bold","editor.italic.tooltip":"Italic","editor.underline.tooltip":"Underline","editor.strike.tooltip":"Strike","editor.color.tooltip":"Color","editor.color.more":"More Colors","editor.highlight.tooltip":"Highlight","editor.lineheight.tooltip":"Line Height","editor.heading.tooltip":"Headings","editor.heading.h1.tooltip":"Heading 1","editor.heading.h2.tooltip":"Heading 2","editor.heading.h3.tooltip":"Heading 3","editor.heading.h4.tooltip":"Heading 4","editor.heading.h5.tooltip":"Heading 5","editor.heading.h6.tooltip":"Heading 6","editor.paragraph.tooltip":"Paragraph","editor.textalign.tooltip":"Align","editor.textalign.left.tooltip":"Left","editor.textalign.center.tooltip":"Center","editor.textalign.right.tooltip":"Right","editor.textalign.justify.tooltip":"Justify","editor.indent":"Indent","editor.indent.indent":"Increase Indent","editor.indent.outdent":"Decrease Indent","editor.fontSize.tooltip":"Font size","editor.fontSize.default.tooltip":"Default","editor.superscript.tooltip":"Superscript","editor.subscript.tooltip":"Subscript","editor.bulletlist.tooltip":"Bullet List","editor.orderedlist.tooltip":"Ordered List","editor.tasklist.tooltip":"Task List","editor.indent.tooltip":"Indent","editor.outdent.tooltip":"Outdent","editor.columns.tooltip":"Columns","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"UnLink","editor.link.open.tooltip":"Open Link","editor.link.edit.tooltip":"Edit Link","editor.link.dialog.title":"Insert Link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Text","editor.link.dialog.openInNewTab":"Open In New Tab","editor.link.dialog.link.placeholder":"Link Address","editor.link.dialog.text.placeholder":"Add Description","editor.link.dialog.button.apply":"Apply","editor.image.tooltip":"Image","editor.image.dragger.tooltip":"Click or drag the image to the area to upload","editor.image.float.left.tooltip":"Float left","editor.image.float.none.tooltip":"Float none","editor.image.float.right.tooltip":"Float right","editor.image.dialog.title":"Add an image","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Upload","editor.image.dialog.tab.uploadCrop":"Upload & Crop","editor.image.dialog.uploading":"Uploading","editor.link.dialog.inline":"Inline","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Lock original aspect ratio","editor.image.dialog.form.file":"File","editor.image.dialog.button.apply":"Apply","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Upload","editor.video.dialog.uploading":"Uploading","editor.video.dialog.title":"Embed or upload a video","editor.video.dialog.link":"Link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"Apply","editor.table.tooltip":"Table","editor.table.menu.insert_table":"Insert Table","editor.table.menu.insert_table.with_header_row":"With header row","editor.table.menu.add_column_before":"Add Column Before","editor.table.menu.add_column_after":"Add Column After","editor.table.menu.delete_column":"Delete Column","editor.table.menu.add_row_before":"Add Row Before","editor.table.menu.add_row_after":"Add Row After","editor.table.menu.delete_row":"Delete Row","editor.table.menu.merge_or_split_cells":"Merge Or Split Cells","editor.table.menu.delete_table":"Delete Table","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Horizontal Rule","editor.code.tooltip":"Code","editor.codeblock.tooltip":"Code Block","editor.clear.tooltip":"Clear Format","editor.undo.tooltip":"Undo","editor.redo.tooltip":"Redo","editor.fullscreen.tooltip.fullscreen":"Fullscreen","editor.fullscreen.tooltip.exit":"Fullscreen Exit","editor.imageUpload.cancel":"Cancel","editor.imageUpload.crop":"Crop","editor.imageUpload.fileTypeNotSupported":"File type not supported","editor.imageUpload.fileSizeTooBig":"File size too big, Maximum size is","editor.table.menu.insertColumnBefore":"Insert Column Before","editor.table.menu.insertColumnAfter":"Insert Column After","editor.table.menu.deleteColumn":"Delete Column","editor.table.menu.insertRowAbove":"Insert Row Above","editor.table.menu.insertRowBelow":"Insert Row Below","editor.table.menu.deleteRow":"Delete Row","editor.table.menu.mergeCells":"Merge Cells","editor.table.menu.splitCells":"Split Cells","editor.table.menu.deleteTable":"Delete Table","editor.table.menu.setCellsBgColor":"Cell Background Color","editor.emoji.tooltip":"Emoji","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Search and Replace","editor.search.dialog.text":"Search","editor.replace.dialog.text":"Replace","editor.replaceAll.dialog.text":"Replace All","editor.previous.dialog.text":"Previous","editor.next.dialog.text":"Next",no_result_found:"No results found","Smileys & People":"Smileys & People","Animals & Nature":"Animals & Nature","Food & Drink":"Food & Drink",Activity:"Activity","Travel & Places":"Travel & Places",Object:"Objects",Symbol:"Symbols",Flags:"Flags","Frequently used":"Frequently used","editor.formula.dialog.text":"Formula","editor.katex.tooltip":"Math Formula","editor.exportPdf.tooltip":"Export PDF","editor.exportWord.tooltip":"Export Word","editor.importWrod.tooltip":"Import Word","editor.textDirection.tooltip":"Text Direction","editor.textDirection.auto.tooltip":"Auto","editor.textDirection.ltr.tooltip":"Left to Right","editor.textDirection.rtl.tooltip":"Right to Left","editor.attachment.tooltip":"Attachment","editor.attachment.uploading":"Uploading","editor.attachment.please_upload":"Please upload the file","editor.imageGif.tooltip":"Gif","editor.replace.caseSensitive":"Case Sensitive","editor.mermaid.tooltip":"Mermaid","editor.twitter.tooltip":"Twitter","editor.tooltip.flipX":"Flip Horizontal","editor.tooltip.flipY":"Flip Vertical"},_M=l7,c7={"editor.remove":"Remover","editor.copy":"Copiar","editor.words":"PALAVRAS","editor.characters":"CARACTERES","editor.default":"Padrão","editor.recent":"Usado recentemente","editor.nofill":"Sem preenchimento","editor.format":"Format Painter","editor.delete":"Deletar","editor.edit":"Editar","editor.settings":"Configurações","editor.table_of_content":"Tabela de conteúdos","editor.draghandle.tooltip":"Modificar","editor.copyToClipboard":"Copiar para a área de transferência","editor.importWord.tooltip":"Importar Word","editor.slash":"Pressione '/' para comandos","editor.slash.empty":"Nenhum resultado","editor.slash.format":"Formato","editor.slash.insert":"Inserir","editor.slash.embed":"Incorporar serviços","editor.content":"Por favor, insira o conteúdo","editor.fontFamily.tooltip":"Fonte","editor.fontFamily.default.tooltip":"Padrão","editor.moremark":"Mais estilos de texto","editor.size.small.tooltip":"Pequeno","editor.size.medium.tooltip":"Médio","editor.size.large.tooltip":"Grande","editor.bold.tooltip":"Negrito","editor.italic.tooltip":"Itálico","editor.underline.tooltip":"Sublinhado","editor.strike.tooltip":"Riscado","editor.color.tooltip":"Cor","editor.color.more":"Mais cores","editor.highlight.tooltip":"Destaque","editor.lineheight.tooltip":"Altura da linha","editor.heading.tooltip":"Cabeçalhos","editor.heading.h1.tooltip":"Cabeçalho 1","editor.heading.h2.tooltip":"Cabeçalho 2","editor.heading.h3.tooltip":"Cabeçalho 3","editor.heading.h4.tooltip":"Cabeçalho 4","editor.heading.h5.tooltip":"Cabeçalho 5","editor.heading.h6.tooltip":"Cabeçalho 6","editor.paragraph.tooltip":"Parágrafo","editor.textalign.tooltip":"Alinhar","editor.textalign.left.tooltip":"Esquerda","editor.textalign.center.tooltip":"Centro","editor.textalign.right.tooltip":"Direita","editor.textalign.justify.tooltip":"Justificar","editor.indent":"Recuo","editor.indent.indent":"Aumentar recuo","editor.indent.outdent":"Diminuir recuo","editor.fontSize.tooltip":"Tamanho da fonte","editor.fontSize.default.tooltip":"Padrão","editor.superscript.tooltip":"Sobrescrito","editor.subscript.tooltip":"Subscrito","editor.bulletlist.tooltip":"Lista de marcadores","editor.orderedlist.tooltip":"Lista numerada","editor.tasklist.tooltip":"Lista de tarefas","editor.indent.tooltip":"Recuo","editor.outdent.tooltip":"Diminuir recuo","editor.columns.tooltip":"Colunas","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"Desvincular","editor.link.open.tooltip":"Abrir link","editor.link.edit.tooltip":"Editar link","editor.link.dialog.title":"Inserir link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Texto","editor.link.dialog.openInNewTab":"Abrir em nova guia","editor.link.dialog.link.placeholder":"Endereço do link","editor.link.dialog.text.placeholder":"Texto do link","editor.link.dialog.button.apply":"Aplicar","editor.image.tooltip":"Imagem","editor.image.dragger.tooltip":"Clique ou arraste a imagem para a área de upload","editor.image.float.left.tooltip":"Flutuar à esquerda","editor.image.float.none.tooltip":"Nenhum flutuante","editor.image.float.right.tooltip":"Flutuar à direita","editor.image.dialog.title":"Adicionar uma imagem","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Enviar","editor.link.dialog.inline":"Inline","editor.image.dialog.tab.uploadCrop":"Enviar e cortar","editor.image.dialog.uploading":"Enviando","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Bloquear proporção original","editor.image.dialog.form.file":"Arquivo","editor.image.dialog.button.apply":"Aplicar","editor.video.tooltip":"Vídeo","editor.video.dialog.tab.upload":"Enviar","editor.video.dialog.uploading":"Enviando","editor.video.dialog.title":"Incorporar ou enviar um vídeo","editor.video.dialog.link":"Link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"Aplicar","editor.table.tooltip":"Tabela","editor.table.menu.insert_table":"Inserir tabela","editor.table.menu.insert_table.with_header_row":"Com linha de cabeçalho","editor.table.menu.add_column_before":"Adicionar coluna antes","editor.table.menu.add_column_after":"Adicionar coluna depois","editor.table.menu.delete_column":"Excluir coluna","editor.table.menu.add_row_before":"Adicionar linha antes","editor.table.menu.add_row_after":"Adicionar linha depois","editor.table.menu.delete_row":"Deletar linha","editor.table.menu.merge_or_split_cells":"Mesclar ou dividir células","editor.table.menu.delete_table":"Deletar tabela","editor.blockquote.tooltip":"Citação","editor.horizontalrule.tooltip":"Regra horizontal","editor.code.tooltip":"Código","editor.codeblock.tooltip":"Bloco de código","editor.clear.tooltip":"Limpar formato","editor.undo.tooltip":"Desfazer","editor.redo.tooltip":"Refazer","editor.fullscreen.tooltip.fullscreen":"Tela cheia","editor.fullscreen.tooltip.exit":"Sair da tela cheia","editor.imageUpload.cancel":"Cancelar","editor.imageUpload.crop":"Cortar","editor.imageUpload.fileTypeNotSupported":"Tipo de arquivo não suportado","editor.imageUpload.fileSizeTooBig":"Tamanho do arquivo muito grande, tamanho máximo é","editor.table.menu.insertColumnBefore":"Inserir coluna antes","editor.table.menu.insertColumnAfter":"Inserir coluna depois","editor.table.menu.deleteColumn":"Excluir coluna","editor.table.menu.insertRowAbove":"Inserir linha acima","editor.table.menu.insertRowBelow":"Inserir linha abaixo","editor.table.menu.deleteRow":"Deletar linha","editor.table.menu.mergeCells":"Mesclar células","editor.table.menu.splitCells":"Dividir células","editor.table.menu.deleteTable":"Deletar tabela","editor.table.menu.setCellsBgColor":"Cor de fundo da célula","editor.emoji.tooltip":"Emoji","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Pesquisar e substituir","editor.search.dialog.text":"Pesquisar","editor.replace.dialog.text":"Substituir","editor.replaceAll.dialog.text":"Substituir tudo","editor.previous.dialog.text":"Anterior","editor.next.dialog.text":"Próximo",no_result_found:"Nenhum resultado encontrado","Smileys & People":"Emoticons & Pessoas","Animals & Nature":"Animais & Natureza","Food & Drink":"Comida & Bebida",Activity:"Atividade","Travel & Places":"Viagem & Lugares",Object:"Objetos",Symbol:"Símbolos",Flags:"Bandeiras","Frequently used":"Frequentemente usado","editor.formula.dialog.text":"Fórmula","editor.katex.tooltip":"Fórmula matemática","editor.exportPdf.tooltip":"Exportar PDF","editor.exportWord.tooltip":"Exportar Word","editor.importWrod.tooltip":"Importar Word","editor.textDirection.tooltip":"Direção do texto","editor.textDirection.auto.tooltip":"Automático","editor.textDirection.ltr.tooltip":"Esquerda para Direita","editor.textDirection.rtl.tooltip":"Direita para Esquerda","editor.attachment.tooltip":"Anexo","editor.attachment.uploading":"Enviando","editor.attachment.please_upload":"Por favor, envie o arquivo","editor.imageGif.tooltip":"Gif","editor.replace.caseSensitive":"Sensível a maiúsculas e minúsculas","editor.mermaid.tooltip":"Mermaid","editor.twitter.tooltip":"Twitter","editor.tooltip.flipX":"Inverter Horizontal","editor.tooltip.flipY":"Inverter Vertical"},EM=c7,u7={"editor.remove":"Xóa","editor.copy":"Sao chép","editor.words":"TỪ","editor.characters":"KÝ TỰ","editor.default":"Mặc định","editor.recent":"Đã sử dụng gần đây","editor.nofill":"Không tô","editor.format":"Format Painter","editor.delete":"Xóa","editor.edit":"Chỉnh sửa","editor.settings":"Cài đặt","editor.table_of_content":"Mục lục","editor.draghandle.tooltip":"Sửa đổi","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Nhập Word","editor.slash":"Nhấn '/' để biết lệnh","editor.slash.empty":"Không có kết quả","editor.slash.format":"Định dạng","editor.slash.insert":"Chèn","editor.slash.embed":"Dịch vụ nhúng","editor.content":"Vui lòng nhập nội dung","editor.moremark":"Nhiều kiểu văn bản hơn","editor.size.small.tooltip":"Nhỏ","editor.fontFamily.tooltip":"Phông chữ","editor.fontFamily.default.tooltip":"Mặc định","editor.size.medium.tooltip":"Trung bình","editor.size.large.tooltip":"Lớn","editor.bold.tooltip":"Đậm","editor.italic.tooltip":"In nghiêng","editor.underline.tooltip":"Gạch chân","editor.strike.tooltip":"Gạch","editor.color.tooltip":"Màu","editor.color.more":"Nhiều màu hơn","editor.highlight.tooltip":"Đánh dấu","editor.lineheight.tooltip":"Chiều cao dòng","editor.heading.tooltip":"Tiêu đề","editor.heading.h1.tooltip":"Tiêu đề 1","editor.heading.h2.tooltip":"Tiêu đề 2","editor.heading.h3.tooltip":"Tiêu đề 3","editor.heading.h4.tooltip":"Tiêu đề 4","editor.heading.h5.tooltip":"Tiêu đề 5","editor.heading.h6.tooltip":"Tiêu đề 6","editor.paragraph.tooltip":"Đoạn văn","editor.textalign.tooltip":"Căn chỉnh","editor.textalign.left.tooltip":"Trái","editor.textalign.center.tooltip":"Giữa","editor.textalign.right.tooltip":"Phải","editor.textalign.justify.tooltip":"Căn đều","editor.indent":"Thụt lề","editor.indent.indent":"Tăng thụt lề","editor.indent.outdent":"Giảm thụt lề","editor.fontSize.tooltip":"Kích thước phông chữ","editor.fontSize.default.tooltip":"Mặc định","editor.superscript.tooltip":"Chỉ số trên","editor.subscript.tooltip":"Chỉ số dưới","editor.bulletlist.tooltip":"Danh sách dấu đầu dòng","editor.orderedlist.tooltip":"Danh sách có thứ tự","editor.tasklist.tooltip":"Danh sách tác vụ","editor.indent.tooltip":"Tăng thụt lề","editor.outdent.tooltip":"Giảm thụt lề","editor.columns.tooltip":"Cột","editor.link.tooltip":"Liên kết","editor.link.unlink.tooltip":"Hủy liên kết","editor.link.open.tooltip":"Mở liên kết","editor.link.edit.tooltip":"Chỉnh sửa liên kết","editor.link.dialog.title":"Chèn liên kết","editor.link.dialog.link":"Liên kết","editor.link.dialog.text":"Văn bản","editor.link.dialog.openInNewTab":"Mở trong tab mới","editor.link.dialog.link.placeholder":"Địa chỉ liên kết","editor.link.dialog.text.placeholder":"Thêm mô tả","editor.link.dialog.button.apply":"Áp dụng","editor.image.tooltip":"Hình ảnh","editor.image.dragger.tooltip":"Nhấp hoặc kéo hình ảnh đến khu vực để tải lên","editor.image.float.left.tooltip":"Trôi sang trái","editor.image.float.none.tooltip":"Trôi không","editor.image.float.right.tooltip":"Trôi sang phải","editor.image.dialog.title":"Thêm hình ảnh","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Tải lên","editor.link.dialog.inline":"Inline","editor.image.dialog.tab.uploadCrop":"Tải lên & Cắt","editor.image.dialog.uploading":"Đang tải lên","editor.image.dialog.form.link":"Liên kết","editor.image.dialog.placeholder":"Liên kết","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Khóa tỷ lệ khung hình gốc","editor.image.dialog.form.file":"Tệp","editor.image.dialog.button.apply":"Áp dụng","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Tải lên","editor.video.dialog.uploading":"Đang tải lên","editor.video.dialog.title":"Nhúng hoặc tải lên video","editor.video.dialog.link":"Liên kết","editor.video.dialog.placeholder":"Liên kết","editor.video.dialog.button.apply":"Áp dụng","editor.table.tooltip":"Bảng","editor.table.menu.insert_table":"Chèn Bảng","editor.table.menu.insert_table.with_header_row":"Có hàng tiêu đề","editor.table.menu.add_column_before":"Thêm Cột Trước","editor.table.menu.add_column_after":"Thêm Cột Sau","editor.table.menu.delete_column":"Xóa Cột","editor.table.menu.add_row_before":"Thêm Hàng Trước","editor.table.menu.add_row_after":"Thêm Hàng Sau","editor.table.menu.delete_row":"Xóa Hàng","editor.table.menu.merge_or_split_cells":"Gộp Hoặc Tách Ô","editor.table.menu.delete_table":"Xóa Bảng","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Quy tắc ngang","editor.code.tooltip":"Mã","editor.codeblock.tooltip":"Khối mã","editor.clear.tooltip":"Xóa định dạng","editor.undo.tooltip":"Hoàn tác","editor.redo.tooltip":"Làm lại","editor.fullscreen.tooltip.fullscreen":"Toàn màn hình","editor.fullscreen.tooltip.exit":"Thoát toàn màn hình","editor.imageUpload.cancel":"Hủy","editor.imageUpload.crop":"Cắt","editor.imageUpload.fileTypeNotSupported":"Loại tệp không được hỗ trợ","editor.imageUpload.fileSizeTooBig":"Kích thước tệp quá lớn, Kích thước tối đa là","editor.table.menu.insertColumnBefore":"Chèn cột trước","editor.table.menu.insertColumnAfter":"Chèn cột sau","editor.table.menu.deleteColumn":"Xóa cột","editor.table.menu.insertRowAbove":"Chèn hàng ở trên","editor.table.menu.insertRowBelow":"Chèn hàng ở dưới","editor.table.menu.deleteRow":"Xóa hàng","editor.table.menu.mergeCells":"Gộp các ô","editor.table.menu.splitCells":"Chia ô","editor.table.menu.deleteTable":"Xóa bảng","editor.table.menu.setCellsBgColor":"Màu nền ô","editor.emoji.tooltip":"Biểu tượng","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Tìm kiếm và thay thế","editor.search.dialog.text":"Tìm kiếm","editor.replace.dialog.text":"Thay thế","editor.replaceAll.dialog.text":"Thay thế tất cả","editor.previous.dialog.text":"Trước","editor.next.dialog.text":"Tiếp theo",no_result_found:"Không tìm thấy kết quả","Smileys & People":"Cười & Mọi người","Animals & Nature":"Động vật & Thiên nhiên","Food & Drink":"Thức ăn & Đồ uống",Activity:"Hoạt động","Travel & Places":"Du lịch & Địa điểm",Object:"Vật",Symbol:"Ký hiệu",Flags:"Cờ","Frequently used":"Thường xuyên sử dụng","editor.formula.dialog.text":"Công thức","editor.katex.tooltip":"Công thức toán học","editor.exportPdf.tooltip":"Xuất PDF","editor.exportWord.tooltip":"Xuất Word","editor.importWrod.tooltip":"Nhập Word","editor.textDirection.tooltip":"Hướng văn bản","editor.textDirection.auto.tooltip":"Tự động","editor.textDirection.ltr.tooltip":"Trái sang Phải","editor.textDirection.rtl.tooltip":"Phải sang Trái","editor.attachment.tooltip":"Đính kèm","editor.attachment.uploading":"Đang tải lên","editor.attachment.please_upload":"Vui lòng tải lên tệp","editor.imageGif.tooltip":"Gif","editor.replace.caseSensitive":"Phân biệt chữ hoa chữ thường","editor.mermaid.tooltip":"Mermaid","editor.twitter.tooltip":"Twitter","editor.tooltip.flipX":"Lật Ngang","editor.tooltip.flipY":"Lật Dọc"},CM=u7,d7={"editor.remove":"移除","editor.copy":"复制","editor.words":"字数","editor.characters":"字符数","editor.default":"默认","editor.recent":"最近使用","editor.nofill":"无填充","editor.format":"格式刷","editor.delete":"删除","editor.edit":"编辑","editor.settings":"设置","editor.table_of_content":"目录","editor.draghandle.tooltip":"修改","editor.copyToClipboard":"复制到剪贴板","editor.importWord.tooltip":"导入 Word","editor.slash":"按 '/' 使用命令","editor.slash.empty":"无结果","editor.slash.format":"格式","editor.slash.insert":"插入","editor.slash.embed":"嵌入服务","editor.content":"请输入内容","editor.fontFamily.tooltip":"字体","editor.fontFamily.default.tooltip":"默认","editor.moremark":"更多文本样式","editor.size.small.tooltip":"小","editor.size.medium.tooltip":"中","editor.size.large.tooltip":"封面","editor.bold.tooltip":"粗体","editor.italic.tooltip":"斜体","editor.underline.tooltip":"下划线","editor.strike.tooltip":"删除线","editor.color.tooltip":"颜色","editor.color.more":"更多颜色","editor.highlight.tooltip":"高亮","editor.lineheight.tooltip":"行高","editor.heading.tooltip":"标题","editor.heading.h1.tooltip":"标题 1","editor.heading.h2.tooltip":"标题 2","editor.heading.h3.tooltip":"标题 3","editor.heading.h4.tooltip":"标题 4","editor.heading.h5.tooltip":"标题 5","editor.heading.h6.tooltip":"标题 6","editor.paragraph.tooltip":"段落","editor.textalign.tooltip":"对齐","editor.textalign.left.tooltip":"左对齐","editor.textalign.center.tooltip":"居中","editor.textalign.right.tooltip":"右对齐","editor.textalign.justify.tooltip":"两端对齐","editor.indent":"缩进","editor.indent.indent":"增加缩进","editor.indent.outdent":"减少缩进","editor.fontSize.tooltip":"字号","editor.fontSize.default.tooltip":"默认","editor.superscript.tooltip":"上标","editor.subscript.tooltip":"下标","editor.bulletlist.tooltip":"无序列表","editor.orderedlist.tooltip":"有序列表","editor.tasklist.tooltip":"任务列表","editor.indent.tooltip":"缩进","editor.outdent.tooltip":"减少缩进","editor.columns.tooltip":"列","editor.link.tooltip":"链接","editor.link.unlink.tooltip":"取消链接","editor.link.open.tooltip":"打开链接","editor.link.edit.tooltip":"编辑链接","editor.link.dialog.title":"插入链接","editor.link.dialog.link":"链接","editor.link.dialog.text":"文本","editor.link.dialog.openInNewTab":"在新标签页中打开","editor.link.dialog.link.placeholder":"链接地址","editor.link.dialog.text.placeholder":"添加描述","editor.link.dialog.button.apply":"应用","editor.image.tooltip":"图片","editor.image.dragger.tooltip":"点击或拖拽图片到此区域上传","editor.image.float.left.tooltip":"左浮动","editor.image.float.none.tooltip":"无浮动","editor.image.float.right.tooltip":"右浮动","editor.image.dialog.title":"添加图片","editor.image.dialog.tab.url":"链接","editor.image.dialog.tab.upload":"上传","editor.link.dialog.inline":"Inline","editor.image.dialog.uploading":"上传中","editor.image.dialog.form.link":"链接","editor.image.dialog.placeholder":"链接","editor.image.dialog.form.alt":"替代文本","editor.image.dialog.form.aspectRatio":"锁定原始宽高比","editor.image.dialog.form.file":"文件","editor.image.dialog.button.apply":"应用","editor.video.tooltip":"视频","editor.video.dialog.tab.upload":"上传","editor.image.dialog.tab.uploadCrop":"上传并裁剪","editor.video.dialog.uploading":"上传中","editor.video.dialog.title":"嵌入或上传视频","editor.video.dialog.link":"链接","editor.video.dialog.placeholder":"链接","editor.video.dialog.button.apply":"应用","editor.table.tooltip":"表格","editor.table.menu.insert_table":"插入表格","editor.table.menu.insert_table.with_header_row":"带标题行","editor.table.menu.add_column_before":"在前面插入列","editor.table.menu.add_column_after":"在后面插入列","editor.table.menu.delete_column":"删除列","editor.table.menu.add_row_before":"在上方插入行","editor.table.menu.add_row_after":"在下方插入行","editor.table.menu.delete_row":"删除行","editor.table.menu.merge_or_split_cells":"合并或拆分单元格","editor.table.menu.delete_table":"删除表格","editor.blockquote.tooltip":"引用","editor.horizontalrule.tooltip":"水平线","editor.code.tooltip":"代码","editor.codeblock.tooltip":"代码块","editor.clear.tooltip":"清除格式","editor.undo.tooltip":"撤销","editor.redo.tooltip":"重做","editor.fullscreen.tooltip.fullscreen":"全屏","editor.fullscreen.tooltip.exit":"退出全屏","editor.imageUpload.cancel":"取消","editor.imageUpload.crop":"裁剪","editor.imageUpload.fileTypeNotSupported":"不支持的文件类型","editor.imageUpload.fileSizeTooBig":"文件大小超出限制,最大大小为","editor.table.menu.insertColumnBefore":"在前面插入列","editor.table.menu.insertColumnAfter":"在后面插入列","editor.table.menu.deleteColumn":"删除列","editor.table.menu.insertRowAbove":"在上方插入行","editor.table.menu.insertRowBelow":"在下方插入行","editor.table.menu.deleteRow":"删除行","editor.table.menu.mergeCells":"合并单元格","editor.table.menu.splitCells":"拆分单元格","editor.table.menu.deleteTable":"删除表格","editor.table.menu.setCellsBgColor":"设置单元格背景色","editor.emoji.tooltip":"表情","editor.iframe.tooltip":"内嵌框架","editor.searchAndReplace.tooltip":"搜索和替换","editor.search.dialog.text":"搜索","editor.replace.dialog.text":"替换","editor.replaceAll.dialog.text":"全部替换","editor.previous.dialog.text":"上一个","editor.next.dialog.text":"下一个",no_result_found:"未找到结果","Smileys & People":"笑脸和人","Animals & Nature":"动物和自然","Food & Drink":"食物和饮料",Activity:"活动","Travel & Places":"旅行和地点",Object:"物体",Symbol:"符号",Flags:"旗帜","Frequently used":"常用","editor.formula.dialog.text":"公式","editor.katex.tooltip":"数学公式","editor.exportPdf.tooltip":"导出 PDF","editor.exportWord.tooltip":"导出 Word","editor.importWrod.tooltip":"导入 Word","editor.textDirection.tooltip":"文本方向","editor.textDirection.auto.tooltip":"自动","editor.textDirection.ltr.tooltip":"从左到右","editor.textDirection.rtl.tooltip":"从右到左","editor.attachment.tooltip":"附件","editor.attachment.uploading":"上传中","editor.attachment.please_upload":"请上传文件","editor.imageGif.tooltip":"Gif","editor.replace.caseSensitive":"区分大小写","editor.mermaid.tooltip":"Mermaid","editor.twitter.tooltip":"Twitter","editor.tooltip.flipX":"水平翻转","editor.tooltip.flipY":"垂直翻转"},TM=d7,f7={"editor.remove":"Eltávolítás","editor.copy":"Másolás","editor.words":"SZAVAK","editor.characters":"KARAKTEREK","editor.default":"Alapértelmezett","editor.recent":"Gyakran használt","editor.nofill":"Kitöltés törlése","editor.format":"Formátummásoló","editor.delete":"Törlés","editor.edit":"Szerkesztés","editor.settings":"Beállítások","editor.table_of_content":"Tartalomjegyzék","editor.draghandle.tooltip":"Módosítás","editor.copyToClipboard":"Másolás vágólapra","editor.importWord.tooltip":"Word importálása","editor.slash":"Nyomja meg a '/' gombot a parancsokhoz","editor.slash.empty":"Nincs találat","editor.slash.format":"Formátum","editor.slash.insert":"Beszúrás","editor.slash.embed":"Szolgáltatások beágyazása","editor.content":"Írjon be tartalmat","editor.fontFamily.tooltip":"Betűtípus","editor.fontFamily.default.tooltip":"Alapértelmezett","editor.moremark":"Több betűstílus","editor.size.small.tooltip":"Kicsi","editor.size.medium.tooltip":"Közepes","editor.size.large.tooltip":"Borítókép","editor.bold.tooltip":"Félkövér","editor.italic.tooltip":"Dőlt betű","editor.underline.tooltip":"Aláhúzott","editor.strike.tooltip":"Áthúzott","editor.color.tooltip":"Szín","editor.color.more":"Több szín","editor.highlight.tooltip":"Kiemelés","editor.lineheight.tooltip":"Sorköz","editor.heading.tooltip":"Fejlécek","editor.heading.h1.tooltip":"Fejléc 1","editor.heading.h2.tooltip":"Fejléc 2","editor.heading.h3.tooltip":"Fejléc 3","editor.heading.h4.tooltip":"Fejléc 4","editor.heading.h5.tooltip":"Fejléc 5","editor.heading.h6.tooltip":"Fejléc 6","editor.paragraph.tooltip":"Bekezdés","editor.textalign.tooltip":"Igazítás","editor.textalign.left.tooltip":"Bal","editor.textalign.center.tooltip":"Közép","editor.textalign.right.tooltip":"Jobb","editor.textalign.justify.tooltip":"Sorkizárt","editor.indent":"Behúzás","editor.indent.indent":"Behúzás Növelése","editor.indent.outdent":"Behúzás Csökkentése","editor.fontSize.tooltip":"Betűméret","editor.fontSize.default.tooltip":"Alapértelmezett","editor.superscript.tooltip":"Felső index","editor.subscript.tooltip":"Alsó index","editor.bulletlist.tooltip":"Felsorolás","editor.orderedlist.tooltip":"Rendezett lista","editor.tasklist.tooltip":"Feladat lista","editor.indent.tooltip":"Behúzás növelése","editor.outdent.tooltip":"Behúzás csökkentése","editor.columns.tooltip":"Oszlopok","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"Link törlése","editor.link.open.tooltip":"Link megnyitása","editor.link.edit.tooltip":"Link szerkesztése","editor.link.dialog.title":"Link beszúrása","editor.link.dialog.link":"Link","editor.link.dialog.text":"Szöveg","editor.link.dialog.openInNewTab":"Megnyitás új lapon","editor.link.dialog.link.placeholder":"Link célpont","editor.link.dialog.text.placeholder":"Szöveg","editor.link.dialog.button.apply":"Alkalmaz","editor.image.tooltip":"Kép","editor.image.dragger.tooltip":"Kattintson vagy húzza a feltölteni kívánt képet a területre","editor.image.float.left.tooltip":"Lebegtetés balra","editor.image.float.none.tooltip":"Lebegtetés törlése","editor.image.float.right.tooltip":"Lebegtetés jobbra","editor.image.dialog.title":"Kép hozzáadása","editor.image.dialog.tab.url":"URL","editor.image.dialog.tab.upload":"Feltöltés","editor.image.dialog.tab.uploadCrop":"Feltöltés és körbevágás","editor.image.dialog.uploading":"Feltöltés alatt","editor.link.dialog.inline":"Soron belüli","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alternatív szöveg","editor.image.dialog.form.aspectRatio":"Eredeti képarány megtartása","editor.image.dialog.form.file":"Fájl","editor.image.dialog.button.apply":"Alkalmaz","editor.video.tooltip":"Videó","editor.video.dialog.tab.upload":"Feltöltés","editor.video.dialog.uploading":"Feltöltés alatt","editor.video.dialog.title":"Videó beágyazása vagy feltöltése","editor.video.dialog.link":"Link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"Alkalmaz","editor.table.tooltip":"Táblázat","editor.table.menu.insert_table":"Táblázat beszúrása","editor.table.menu.insert_table.with_header_row":"Fejléc sorral","editor.table.menu.add_column_before":"Oszlop beszúrása balra","editor.table.menu.add_column_after":"Oszlop beszúrása jobbra","editor.table.menu.delete_column":"Oszlop törlése","editor.table.menu.add_row_before":"Sor beszúrása felülre","editor.table.menu.add_row_after":"Sor beszúrása alulra","editor.table.menu.delete_row":"Sor törlése","editor.table.menu.merge_or_split_cells":"Cellák egyesítése vagy szétválasztása","editor.table.menu.delete_table":"Táblázat törlése","editor.blockquote.tooltip":"Blokkidézet","editor.horizontalrule.tooltip":"Vízszintes vonal","editor.code.tooltip":"Kód","editor.codeblock.tooltip":"Kód Blokk","editor.clear.tooltip":"Formatálás Törlése","editor.undo.tooltip":"Visszavonás","editor.redo.tooltip":"Visszaállítás","editor.fullscreen.tooltip.fullscreen":"Teljes képernyős mód","editor.fullscreen.tooltip.exit":"Kilépés teljes képernyős módból","editor.imageUpload.cancel":"Mégsem","editor.imageUpload.crop":"Körbevágás","editor.imageUpload.fileTypeNotSupported":"Fájltípus nem támogatott","editor.imageUpload.fileSizeTooBig":"A fájlméret túl nagy, a maximum méret","editor.table.menu.insertColumnBefore":"Oszlop beszúrása balra","editor.table.menu.insertColumnAfter":"Oszlop beszúrása jobbra","editor.table.menu.deleteColumn":"Oszlop törlése","editor.table.menu.insertRowAbove":"Sor beszúrása felülre","editor.table.menu.insertRowBelow":"Sor beszúrása alulra","editor.table.menu.deleteRow":"Sor törlése","editor.table.menu.mergeCells":"Cellák egyesítése","editor.table.menu.splitCells":"Cellék szétválasztása","editor.table.menu.deleteTable":"Táblázat törlése","editor.table.menu.setCellsBgColor":"Cella háttérszín","editor.emoji.tooltip":"Emoji","editor.iframe.tooltip":"Beágyazás","editor.searchAndReplace.tooltip":"Keresés és csere","editor.search.dialog.text":"Keres","editor.replace.dialog.text":"Csere","editor.replaceAll.dialog.text":"Összes cseréje","editor.previous.dialog.text":"Előző","editor.next.dialog.text":"Következő",no_result_found:"Nincs találat","Smileys & People":"Arcok és emberek","Animals & Nature":"Állatok és természet","Food & Drink":"Étel és ital",Activity:"Aktivitás","Travel & Places":"Utazás és helyek",Object:"Tárgyak",Symbol:"Szimbólumok",Flags:"Zászlók","Frequently used":"Gyakran használt","editor.formula.dialog.text":"Formula","editor.katex.tooltip":"Matematikai formula","editor.exportPdf.tooltip":"PDF exportálása","editor.exportWord.tooltip":"Word exportálása","editor.importWrod.tooltip":"Word importálása","editor.textDirection.tooltip":"Szövegirány","editor.textDirection.auto.tooltip":"Automatikus","editor.textDirection.ltr.tooltip":"Balról jobbra","editor.textDirection.rtl.tooltip":"Jobbról balra","editor.attachment.tooltip":"Csatolmány","editor.attachment.uploading":"Feltöltés alatt","editor.attachment.please_upload":"Töltse fel a fájlt","editor.imageGif.tooltip":"Gif","editor.replace.caseSensitive":"Kisbetű-nagybetű érzékenység","editor.mermaid.tooltip":"Mermaid","editor.twitter.tooltip":"Twitter","editor.tooltip.flipX":"Vízszintes tükrözés","editor.tooltip.flipY":"Függőleges tükrözés"},AM=f7;function RM(t){return t=t||new Map,{all:t,on(e,r){const n=t.get(e);n?n.push(r):t.set(e,[r])},off(e,r){const n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){let n=t.get(e);n&&[...n].map(i=>{i(r)}),n=t.get("*"),n&&[...n].map(i=>{i(e,r)})}}}const h7="en",p7=200,m7=p7-80,yS=20,nd=1e5,id=16,Jp=10,Zp=10,Qp=2,g7=["#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E9E9E9","#F5F5F5","#FAFAFA","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],y7=["Inter","Comic Sans MS, Comic Sans","serif","cursive","Arial","Arial Black","Georgia","Impact","Tahoma","Times New Roman","Verdana","Courier New","Lucida Console","Monaco","monospace"],IM=["html","css","js","ts","bash"],v7={html:"HTML",css:"CSS",js:"JavaScript",ts:"TypeScript",bash:"Bash"},b7=["10px","11px","12px","14px","16px","18px","20px","22px","24px","26px","28px","36px","48px","72px"],cC="default";var kh=(t=>(t[t["size-small"]=200]="size-small",t[t["size-medium"]=500]="size-medium",t["size-large"]="100%",t))(kh||{}),Og=(t=>(t[t["size-small"]=480]="size-small",t[t["size-medium"]=640]="size-medium",t["size-large"]="100%",t))(Og||{});const w7=["100%","115%","150%","200%","250%","300%"],OM="1",x7=["bold","italic","underline","strike","code","link","divider","color","highlight","textAlign"],Cu={lang:h7,message:{en:_M,hu_HU:AM,vi:CM,zh_CN:TM,pt_BR:EM}};class S7{constructor(){Tn(this,"emitter");this.emitter=RM()}get lang(){return Cu.lang}set lang(e){if(!this.isLangSupported(e)){console.warn(`Can't find the current language "${e}", Using language "${Cu.lang}" by default`);return}Cu.lang=e,this.emitter.emit("lang",e)}get message(){return Cu.message}set message(e){Cu.message=e}loadLangMessage(e){return this.message[e]}isLangSupported(e){return Object.keys(this.message).includes(e)}setLang(e){this.lang=e}registerWatchLang(e){return this.emitter.on("lang",e),{unsubscribe:()=>{this.emitter.off("lang",e)}}}setMessage(e,r){this.message[e]=r}buildLocalesHandler(e){e||(e=this.lang);const r=this.loadLangMessage(e);return function(i){return r[i]||i}}}const Mg=new S7,MM=Xh(Cu.lang);function Et(){const[t,e]=a7(MM),r=J.useMemo(()=>Mg.buildLocalesHandler(t),[t]);return J.useEffect(()=>{const n=Mg.registerWatchLang(i=>{e(i)});return()=>{n.unsubscribe()}},[]),{lang:t,t:r}}const Ot={t:t=>Mg.buildLocalesHandler(MM.get())(t)},k7=Mg,_7={padding:"0 12px 12px"},NM=({width:t,maxWidth:e,height:r,onOk:n,children:i})=>{const{t:o}=Et(),[s,a]=J.useState({width:"",height:"",maxWidth:""});J.useEffect(()=>{a({width:t,height:r,maxWidth:e})},[r,e,t]);function l(c){c.preventDefault(),c.stopPropagation(),n(s)}return x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{asChild:!0,children:i}),x.jsx(Xn,{children:x.jsx("div",{style:_7,children:x.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:l,children:[x.jsx(Kn,{className:"mb-[6px]",children:"Width"}),x.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:x.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:x.jsx(hn,{type:"number",value:s.width,required:!0,onChange:c=>a({...s,width:c.target.value})})})}),x.jsx(Kn,{className:"mb-[6px]",children:"Max Width"}),x.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:x.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:x.jsx(hn,{type:"number",value:s.maxWidth,required:!0,onChange:c=>a({...s,maxWidth:c.target.value})})})}),x.jsx(Kn,{className:"mb-[6px]",children:"Height"}),x.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:x.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:x.jsx(hn,{type:"number",value:s.height,required:!0,onChange:c=>a({...s,height:c.target.value})})})}),x.jsx(Mt,{type:"submit",className:"richtext-self-end richtext-mt-2",children:o("editor.link.dialog.button.apply")})]})})})]})};var DM={exports:{}};(function(t,e){(function(n,i){t.exports=i(J,us)})(xh,function(r,n){return function(i){var o={};function s(a){if(o[a])return o[a].exports;var l=o[a]={i:a,l:!1,exports:{}};return i[a].call(l.exports,l,l.exports,s),l.l=!0,l.exports}return s.m=i,s.c=o,s.d=function(a,l,c){s.o(a,l)||Object.defineProperty(a,l,{enumerable:!0,get:c})},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,l){if(l&1&&(a=s(a)),l&8||l&4&&typeof a=="object"&&a&&a.__esModule)return a;var c=Object.create(null);if(s.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:a}),l&2&&typeof a!="string")for(var d in a)s.d(c,d,(function(f){return a[f]}).bind(null,d));return c},s.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(l,"a",l),l},s.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},s.p="",s(s.s=4)}([function(i,o,s){i.exports=s(5)()},function(i,o){i.exports=r},function(i,o){i.exports=n},function(i,o){i.exports=function(s,a,l){var c=s.direction,d=s.value;switch(c){case"top":return l.top+d<a.top&&l.bottom>a.bottom&&l.left<a.left&&l.right>a.right;case"left":return l.left+d<a.left&&l.bottom>a.bottom&&l.top<a.top&&l.right>a.right;case"bottom":return l.bottom-d>a.bottom&&l.left<a.left&&l.right>a.right&&l.top<a.top;case"right":return l.right-d>a.right&&l.left<a.left&&l.top<a.top&&l.bottom>a.bottom}}},function(i,o,s){s.r(o),s.d(o,"default",function(){return fe});var a=s(1),l=s.n(a),c=s(2),d=s.n(c),f=s(0),p=s.n(f),m=s(3),g=s.n(m);function b(de){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(ne){return typeof ne}:b=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},b(de)}function S(de,U){if(!(de instanceof U))throw new TypeError("Cannot call a class as a function")}function w(de,U){for(var ne=0;ne<U.length;ne++){var R=U[ne];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(de,R.key,R)}}function T(de,U,ne){return U&&w(de.prototype,U),de}function M(de,U){return U&&(b(U)==="object"||typeof U=="function")?U:$(de)}function j(de){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},j(de)}function $(de){if(de===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return de}function W(de,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function");de.prototype=Object.create(U&&U.prototype,{constructor:{value:de,writable:!0,configurable:!0}}),U&&Y(de,U)}function Y(de,U){return Y=Object.setPrototypeOf||function(R,le){return R.__proto__=le,R},Y(de,U)}function ee(de,U,ne){return U in de?Object.defineProperty(de,U,{value:ne,enumerable:!0,configurable:!0,writable:!0}):de[U]=ne,de}function P(de){return de.width===void 0&&(de.width=de.right-de.left),de.height===void 0&&(de.height=de.bottom-de.top),de}var fe=function(de){W(U,de);function U(ne){var R;return S(this,U),R=M(this,j(U).call(this,ne)),ee($(R),"getContainer",function(){return R.props.containment||window}),ee($(R),"addEventListener",function(le,Ce,he,Fe){R.debounceCheck||(R.debounceCheck={});var ye,ze,ue=function(){ye=null,R.check()};Fe>-1?ze=function(){ye||(ye=setTimeout(ue,Fe||0))}:ze=function(){clearTimeout(ye),ye=setTimeout(ue,he||0)};var V={target:le,fn:ze,getLastTimeout:function(){return ye}};le.addEventListener(Ce,V.fn),R.debounceCheck[Ce]=V}),ee($(R),"startWatching",function(){R.debounceCheck||R.interval||(R.props.intervalCheck&&(R.interval=setInterval(R.check,R.props.intervalDelay)),R.props.scrollCheck&&R.addEventListener(R.getContainer(),"scroll",R.props.scrollDelay,R.props.scrollThrottle),R.props.resizeCheck&&R.addEventListener(window,"resize",R.props.resizeDelay,R.props.resizeThrottle),!R.props.delayedCall&&R.check())}),ee($(R),"stopWatching",function(){if(R.debounceCheck){for(var le in R.debounceCheck)if(R.debounceCheck.hasOwnProperty(le)){var Ce=R.debounceCheck[le];clearTimeout(Ce.getLastTimeout()),Ce.target.removeEventListener(le,Ce.fn),R.debounceCheck[le]=null}}R.debounceCheck=null,R.interval&&(R.interval=clearInterval(R.interval))}),ee($(R),"check",function(){var le=R.node,Ce,he;if(!le)return R.state;if(Ce=P(R.roundRectDown(le.getBoundingClientRect())),R.props.containment){var Fe=R.props.containment.getBoundingClientRect();he={top:Fe.top,left:Fe.left,bottom:Fe.bottom,right:Fe.right}}else he={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var ye=R.props.offset||{},ze=b(ye)==="object";ze&&(he.top+=ye.top||0,he.left+=ye.left||0,he.bottom-=ye.bottom||0,he.right-=ye.right||0);var ue={top:Ce.top>=he.top,left:Ce.left>=he.left,bottom:Ce.bottom<=he.bottom,right:Ce.right<=he.right},V=Ce.height>0&&Ce.width>0,me=V&&ue.top&&ue.left&&ue.bottom&&ue.right;if(V&&R.props.partialVisibility){var ge=Ce.top<=he.bottom&&Ce.bottom>=he.top&&Ce.left<=he.right&&Ce.right>=he.left;typeof R.props.partialVisibility=="string"&&(ge=ue[R.props.partialVisibility]),me=R.props.minTopValue?ge&&Ce.top<=he.bottom-R.props.minTopValue:ge}typeof ye.direction=="string"&&typeof ye.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 }",ye.direction,ye.value),me=g()(ye,Ce,he));var ke=R.state;return R.state.isVisible!==me&&(ke={isVisible:me,visibilityRect:ue},R.setState(ke),R.props.onChange&&R.props.onChange(me)),ke}),R.state={isVisible:null,visibilityRect:{}},R}return T(U,[{key:"componentDidMount",value:function(){this.node=d.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(R){this.node=d.a.findDOMNode(this),this.props.active&&!R.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(R){return{top:Math.floor(R.top),left:Math.floor(R.left),bottom:Math.floor(R.bottom),right:Math.floor(R.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):l.a.Children.only(this.props.children)}}]),U}(l.a.Component);ee(fe,"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:l.a.createElement("span",null)}),ee(fe,"propTypes",{onChange:p.a.func,active:p.a.bool,partialVisibility:p.a.oneOfType([p.a.bool,p.a.oneOf(["top","right","bottom","left"])]),delayedCall:p.a.bool,offset:p.a.oneOfType([p.a.shape({top:p.a.number,left:p.a.number,bottom:p.a.number,right:p.a.number}),p.a.shape({direction:p.a.oneOf(["top","right","bottom","left"]),value:p.a.number})]),scrollCheck:p.a.bool,scrollDelay:p.a.number,scrollThrottle:p.a.number,resizeCheck:p.a.bool,resizeDelay:p.a.number,resizeThrottle:p.a.number,intervalCheck:p.a.bool,intervalDelay:p.a.number,containment:typeof window<"u"?p.a.instanceOf(window.Element):p.a.any,children:p.a.oneOfType([p.a.element,p.a.func]),minTopValue:p.a.number})},function(i,o,s){var a=s(6);function l(){}function c(){}c.resetWarningCache=l,i.exports=function(){function d(m,g,b,S,w,T){if(T!==a){var M=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 M.name="Invariant Violation",M}}d.isRequired=d;function f(){return d}var p={array:d,bool:d,func:d,number:d,object:d,string:d,symbol:d,any:d,arrayOf:f,element:d,elementType:d,instanceOf:f,node:d,objectOf:f,oneOf:f,oneOfType:f,shape:f,exact:f,checkPropTypes:c,resetWarningCache:l};return p.PropTypes=p,p}},function(i,o,s){var a="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";i.exports=a}])})})(DM);var E7=DM.exports;const C7=Y1(E7),T7="_wrap_15k3c_1",A7="_renderWrap_15k3c_7",R7="_title_15k3c_14",I7="_icon_15k3c_20",O7="_handlerWrap_15k3c_30",Of={wrap:T7,renderWrap:A7,title:R7,icon:I7,handlerWrap:O7};function PM(t,e,r){return t<e?e:t>r?r:t}const M7=t=>typeof t=="number",N7=t=>typeof t=="string",D7=t=>typeof t=="function";function P7(t,e="px"){if(!t)return t;const r=M7(t)?String(t):t,n=Number.parseFloat(r),i=r.match(/[a-z%]+$/i),o=i?i[0]:e;return Number.isNaN(n)?t:n+o}function LM(t,e){if(!t)return!1;const{extensions:r=[]}=(t==null?void 0:t.extensionManager)??{};return!!r.find(i=>i.name===e)}function Ax(t){return t.map(e=>N7(e)?{value:e,name:e}:e)}const L7=10,F7=200,uC=15,dC={width:"100%",height:"100%",maxWidth:"100%"};function j7({editor:t,node:e,updateAttributes:r}){const n=J.useRef(null),i=t.isActive(Cl.name),{data:o,width:s,height:a}=e.attrs,[l,c]=J.useState(null),[d,f]=J.useState(!0),[p,m]=J.useState(null),[g,b]=J.useState(!1),[S,w]=J.useState(100),T=J.useCallback($=>{$&&b(!0)},[b]),M=J.useCallback($=>()=>{w(W=>PM($==="minus"?W-uC:W+uC,L7,F7))},[]);J.useEffect(()=>{let $=!1;return import("@excalidraw/excalidraw").then(W=>{$||(n.current=W.exportToSvg)}).catch(W=>!$&&m(W)).finally(()=>!$&&f(!1)),()=>{$=!0}},[f,o]),J.useEffect(()=>{let $=!1;return(async()=>{if($||d||p||!g||!o)return;const Y=await n.current(o);$||(Y.setAttribute("width","100%"),Y.setAttribute("height","100%"),Y.setAttribute("display","block"),c(Y))})(),()=>{$=!0}},[o,d,p,g]);const j=$=>{r({width:$.width,height:$.height})};return x.jsx(gi,{className:Gr(Of.wrap,i&&Of.isActive),children:x.jsx(C7,{onChange:T,children:x.jsx(ER.Resizable,{size:{width:Number.parseInt(s),height:Number.parseInt(a)},onResizeStop:($,W,Y,ee)=>{j({width:Number.parseInt(s)+ee.width,height:Number.parseInt(a)+ee.height})},children:x.jsxs("div",{className:Gr(Of.renderWrap,"render-wrapper"),style:{...dC,overflow:"hidden"},children:[p&&x.jsx("div",{style:dC,children:x.jsx("p",{children:p.message||p})}),d&&x.jsx("p",{children:"Loading..."}),!d&&!p&&g&&x.jsx("div",{style:{height:"100%",maxHeight:"100%",padding:24,overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",transform:`scale(${S/100})`,transition:"all ease-in-out .3s"},dangerouslySetInnerHTML:{__html:(l==null?void 0:l.outerHTML)??""}}),x.jsx("div",{className:Of.title}),x.jsxs("div",{className:Of.handlerWrap,children:[x.jsx(Ve,{icon:"ZoomOut",action:M("minus"),tooltip:"Zoom Out"}),x.jsx(Ve,{icon:"ZoomIn",action:M("plus"),tooltip:"Zoom In"})]})]})})})})}const B7=J.memo(j7,(t,e)=>!!hS(t.node.attrs,e.node.attrs));function z7(t,e="{}"){try{return JSON.stringify(t)}catch{return e}}function H7(t){try{return JSON.stringify(t)}catch{return JSON.stringify({})}}function fn(t,e=!1){return r=>{const n=t.startsWith("data-")?t:`data-${t}`;let i=decodeURIComponent(r.getAttribute(n));if(i==null||typeof i=="string"&&i==="null")try{const a=r.outerHTML.match(/([\s\S])+?="([\s\S])+?"/g);a&&a.length&&(i=(a.map(c=>c.trim()).reduce((c,d)=>{const f=d.indexOf("="),p=[d.slice(0,f),d.slice(f+1).slice(1,-1)];return c[p[0]]=p[1],c},{})[t.toLowerCase()]||"").replaceAll("&quot;",'"'))}catch(s){console.error("Error getDatasetAttribute ",s.message,r)}if(e)try{return JSON.parse(i)}catch{return{}}if(i.includes("%")||i.includes("auto"))return i;const o=Number.parseInt(i);return o!==o?i:o}}function $7(t){const{attrs:e}=t;return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i==null)return r;let o="";return typeof i=="object"?o=H7(i):o=i,r[n]=o,r},Object.create(null))}const ac=yi.Root,lc=yi.Trigger,U7=yi.Portal,FM=At.forwardRef(({className:t,...e},r)=>x.jsx(yi.Overlay,{ref:r,className:pt("richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 richtext- data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",t),...e}));FM.displayName=yi.Overlay.displayName;const Ma=At.forwardRef(({className:t,children:e,...r},n)=>x.jsxs(U7,{children:[x.jsx(FM,{}),x.jsxs(yi.Content,{ref:n,className:pt("richtext-dialog-content richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",t),...r,children:[e,x.jsxs(yi.Close,{className:"richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground",children:[x.jsx(He.X,{className:"richtext-h-4 richtext-w-4"}),x.jsx("span",{className:"richtext-sr-only",children:"Close"})]})]})]}));Ma.displayName=yi.Content.displayName;function jM({className:t,...e}){return x.jsx("div",{className:pt("richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",t),...e})}jM.displayName="DialogHeader";function _d({className:t,...e}){return x.jsx("div",{className:pt("richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",t),...e})}_d.displayName="DialogFooter";const Na=At.forwardRef(({className:t,...e},r)=>x.jsx(yi.Title,{ref:r,className:pt("richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight",t),...e}));Na.displayName=yi.Title.displayName;const W7=At.forwardRef(({className:t,...e},r)=>x.jsx(yi.Description,{ref:r,className:pt("richtext-text-sm richtext-text-muted-foreground",t),...e}));W7.displayName=yi.Description.displayName;let sw;function vS(){try{return sw||(sw=RM()),sw}catch{throw new Error("Error EventEmitter")}}const Rx="OPEN_EXCALIDRAW_SETTING_MODAL";function V7(t,e){vS().on(t,e)}function G7(t,e){vS().off(t,e)}function K7(t){vS().emit(Rx,t)}const q7=({editor:t})=>{const[e,r]=J.useState(null),[n,i]=J.useState({}),[o,s]=J.useState({elements:[],appState:{isLoading:!1},files:null}),[a,l]=J.useState(!1),[c,d]=J.useState(!0),[f,p]=J.useState(null),m=J.useCallback(w=>{w&&import("@excalidraw/excalidraw").then(T=>{r(T.Excalidraw)}).catch(p).finally(()=>d(!1))},[d]),g=J.useCallback(w=>{setTimeout(()=>{w.refresh()})},[]),b=J.useCallback((w,T,M)=>{i({elements:w,appState:{isLoading:!1},files:M})},[]),S=J.useCallback(()=>{if(!e){l(!1);return}t.chain().focus().setExcalidraw({data:n}).run(),l(!1)},[e,t,n,l]);return J.useEffect(()=>{const w=T=>{l(!0),T&&s(T.data)};return V7(Rx,w),()=>{G7(Rx,w)}},[t,l]),x.jsxs(ac,{open:a,onOpenChange:l,children:[x.jsx(lc,{asChild:!0,children:x.jsx(Ve,{icon:"Excalidraw",tooltip:"Excalidraw",action:()=>l(!0)})}),x.jsxs(Ma,{className:"!richtext-max-w-[1300px] richtext-z-[99999]",children:[x.jsx(Na,{children:"Excalidraw"}),x.jsxs("div",{style:{height:"100%",borderWidth:1},children:[c&&x.jsx("p",{children:"Loading..."}),f&&x.jsx("p",{children:f&&f.message||"Error"}),x.jsx("div",{style:{width:"100%",height:600},ref:m,children:!c&&!f&&e?x.jsx(e,{ref:g,onChange:b,langCode:"en",initialData:o}):null})]}),x.jsx(_d,{children:x.jsx(Mt,{type:"button",onClick:S,children:"Save changes"})})]})]})},fC={elements:[]},Cl=Nt.create({name:"excalidraw",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addAttributes(){return{defaultShowPicker:{default:!1},createUser:{default:null},width:{default:"100%",parseHTML:fn("width")},height:{default:240,parseHTML:fn("height")},data:{default:fC,parseHTML:fn("data",!0)}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"excalidraw"},button:({editor:e})=>({component:q7,componentProps:{editor:e}})}},parseHTML(){return[{tag:"div[class=excalidraw]"}]},renderHTML({HTMLAttributes:t,node:e}){return["div",lt(this.options.HTMLAttributes,t,$7(e))]},addCommands(){return{setExcalidraw:t=>({tr:e,commands:r,chain:n})=>{var i,o,s;return t=t||{},t.data=t.data||fC,((s=(o=(i=e.selection)==null?void 0:i.node)==null?void 0:o.type)==null?void 0:s.name)==this.name?r.updateAttributes(this.name,t):n().insertContent({type:this.name,attrs:t}).run()}}},addNodeView(){return ko(B7)},addInputRules(){return[Wh({find:/^\$excalidraw\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]}}),yl=new Map;function X7(t){const e=t.options.element;yl.has("width")||yl.set("width",e.clientWidth),yl.has("width")&&yl.get("width")<=0&&yl.set("width",e.clientWidth);const r={attributes:!0,childList:!0,subtree:!0},n=function(){yl.set("width",e.clientWidth)},i=new MutationObserver(n);return i.observe(e,r),t.on("destroy",()=>{i.disconnect()}),{width:yl.get("width")}}function Y7({editor:t}){const{t:e}=Et(),{width:r}=X7(t),n=Gh(t,Cl.name,{defaultShowPicker:!1,createUser:"",width:0,height:0}),{defaultShowPicker:i,createUser:o,width:s,height:a}=n,l=J.useCallback(p=>{t.chain().updateAttributes(Cl.name,p).setNodeSelection(t.state.selection.from).focus().run()},[t]),c=J.useCallback(()=>{K7(n)},[t,n]),d=J.useCallback(()=>t.isActive(Cl.name),[t]),f=J.useCallback(()=>bd(Cl.name,t),[t]);return J.useEffect(()=>{i&&(c(),t.chain().updateAttributes(Cl.name,{defaultShowPicker:!1}).focus().run())},[o,i,t,c]),x.jsx(qn,{className:"bubble-menu",editor:t,pluginKey:"excalidraw-bubble-menu",shouldShow:d,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:x.jsxs("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:[x.jsx(Ve,{icon:"Pencil",action:c,tooltip:e("editor.edit")}),x.jsx(NM,{width:s,maxWidth:r,height:a,onOk:l,children:x.jsx(Ve,{icon:"Settings",tooltip:e("editor.settings")})}),x.jsx(Ve,{icon:"Trash2",action:f,tooltip:e("editor.delete")})]})})}const J7="_wrap_5y04w_1",Z7="_handlerWrap_5y04w_11",Q7="_innerWrap_5y04w_15",e9="_emptyWrap_5y04w_23",hC={wrap:J7,handlerWrap:Z7,innerWrap:Q7,emptyWrap:e9},BM=Xh(!1);function Yy(){return Xy(BM)}const t9={setDisable:t=>{BM.set(t)}};function r9({editor:t,node:e,updateAttributes:r}){const n=Yy(),{url:i,width:o,height:s}=e.attrs,[a,l]=J.useState("");function c(){a&&t.chain().updateAttributes(Tl.name,{url:a}).setNodeSelection(t.state.selection.from).focus().run()}const d=J.useCallback(f=>{r({width:f.width,height:f.height})},[r]);return x.jsxs(gi,{children:[!i&&x.jsxs("div",{className:"richtext-max-w-[600px] richtext-mx-[auto] richtext-my-[12px] richtext-flex richtext-items-center richtext-justify-center richtext-gap-[10px] richtext-p-[10px] richtext-border-[1px] richtext-border-solid richtext-border-[#ccc] richtext-rounded-[12px]",children:[x.jsx(hn,{value:a,onInput:f=>l(f.target.value),type:"url",className:"richtext-flex-1",autoFocus:!0,placeholder:"Enter link"}),x.jsx(Mt,{className:"richtext-w-[60px]",onClick:c,children:"OK"})]}),i&&x.jsx(ER.Resizable,{size:{width:Number.parseInt(o),height:Number.parseInt(s)},onResizeStop:(f,p,m,g)=>{d({width:Number.parseInt(o)+g.width,height:Number.parseInt(s)+g.height})},children:x.jsx("div",{className:Gr(hC.wrap,"render-wrapper"),children:x.jsx("div",{className:hC.innerWrap,style:{pointerEvents:n?"none":"auto"},children:x.jsx("iframe",{src:i,className:"richtext-my-[12px] "})})})})]})}const Tl=Nt.create({name:"iframe",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"iframe"},button:({editor:e,extension:r,t:n})=>({component:Ve,componentProps:{action:i=>e.commands.setIframe(i),upload:r.options.upload,disabled:!e.can().setIframe({}),icon:"Iframe",tooltip:n("editor.iframe.tooltip")}})}},addAttributes(){return{width:{default:600,parseHTML:fn("width")},height:{default:300,parseHTML:fn("height")},url:{default:null,parseHTML:fn("url")},defaultShowPicker:{default:!1},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML(){return[{tag:"iframe"}]},renderHTML({HTMLAttributes:t}){return["iframe",lt(this.options.HTMLAttributes,t)]},addCommands(){return{setIframe:t=>({tr:e,commands:r,chain:n})=>{var o,s,a;if(((a=(s=(o=e.selection)==null?void 0:o.node)==null?void 0:s.type)==null?void 0:a.name)==this.name)return r.updateAttributes(this.name,t);const i=t||{url:""};return n().insertContent({type:this.name,attrs:i}).run()}}},addInputRules(){return[Wh({find:/^\$iframe\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]},addNodeView(){return ko(r9)}});function n9({editor:t}){const{t:e}=Et(),{width:r,height:n,url:i}=Gh(t,Tl.name,{width:0,height:0,url:"",defaultShowPicker:!1}),[o,s]=J.useState(!1),[a,l]=J.useState(""),c=J.useCallback(()=>{s(!1)},[s]);J.useEffect(()=>{o&&l(i)},[o,i]);const d=J.useCallback(()=>{t.chain().updateAttributes(Tl.name,{url:a}).setNodeSelection(t.state.selection.from).focus().run(),s(!1)},[t,a,s]),f=J.useCallback(()=>{window.open(i,"_blank")},[i]),p=J.useCallback(()=>{s(!0)},[s]),m=J.useCallback(S=>{t.chain().updateAttributes(Tl.name,S).setNodeSelection(t.state.selection.from).focus().run()},[t]),g=J.useCallback(()=>t.isActive(Tl.name)&&!i,[t,i]),b=J.useCallback(()=>bd(Tl.name,t),[t]);return x.jsxs(x.Fragment,{children:[x.jsx(qn,{className:"bubble-menu",editor:t,pluginKey:"iframe-bubble-menu",shouldShow:g,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:x.jsxs("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:[x.jsx(Ve,{action:f,icon:"Eye",tooltip:"Visit Link"}),x.jsx(Ve,{action:p,icon:"Pencil",tooltip:"Open Edit Link"}),x.jsx(NM,{width:r,height:n,onOk:m,children:x.jsx(Ve,{icon:"Settings",tooltip:e("editor.settings")})}),x.jsx(Ve,{action:b,icon:"Trash2",tooltip:e("editor.delete")})]})}),x.jsxs(ac,{open:o,onOpenChange:s,children:[x.jsx(lc,{}),x.jsxs(Ma,{children:[x.jsx(jM,{children:x.jsx(Na,{children:"Edit Link Iframe"})}),x.jsx(hn,{value:a,onInput:S=>l(S.target.value),type:"url",autoFocus:!0,placeholder:"Enter link"}),x.jsxs(_d,{children:[x.jsx(Mt,{onClick:c,children:"Cancel"}),x.jsx(Mt,{onClick:d,children:"OK"})]})]})]})]})}const em="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i9=t=>{t=t.replace(/\r\n/g,`
125
+ `);let e=0,r="";for(;e<t.length;e++){const n=t.charCodeAt(e);n<128?r+=String.fromCharCode(n):n>127&&n<2048?(r+=String.fromCharCode(n>>6|192),r+=String.fromCharCode(63&n|128)):(r+=String.fromCharCode(n>>12|224),r+=String.fromCharCode(n>>6&63|128),r+=String.fromCharCode(63&n|128))}return r},o9=t=>{let e,r,n,i,o,s,a,l=0,c="";for(t=i9(t);l<t.length;)e=t.charCodeAt(l++),r=t.charCodeAt(l++),n=t.charCodeAt(l++),i=e>>2,o=(3&e)<<4|r>>4,s=(15&r)<<2|n>>6,a=63&n,isNaN(r)?s=a=64:isNaN(n)&&(a=64),c=c+em.charAt(i)+em.charAt(o)+em.charAt(s)+em.charAt(a);return c},s9=t=>typeof t=="string"?"string":typeof SVGElement<"u"&&t instanceof SVGElement?"element":void 0,zM=t=>"data:image/svg+xml;base64,"+o9(t),a9=t=>zM(new XMLSerializer().serializeToString(t)),HM=t=>{switch(s9(t)){case"string":return zM(t);case"element":return a9(t);default:return t}};function $M(t=8){return Math.random().toString(36).substring(2,t+2)}function l9(t){return t.replace(/^.*\/|\..+$/g,"")}function c9(t){return t.split(".").pop()}function UM(t){return t<1024?`${t} Byte`:t<1024*1024?`${(t/1024).toFixed(2)} KB`:`${(t/1024/1024).toFixed(2)} MB`}function u9(t){return t?t==="application/pdf"?"pdf":t.startsWith("application/")&&[".document","word"].some(e=>t.includes(e))?"word":t.startsWith("application/")&&["presentation"].some(e=>t.includes(e))?"excel":t.startsWith("application/")&&["sheet"].some(e=>t.includes(e))?"ppt":t.startsWith("image")?"image":t.startsWith("audio")?"audio":t.startsWith("video")?"video":"file":"file"}function d9(t){return new Promise(e=>{const r=new FileReader;r.addEventListener("load",()=>{e({alt:t.name,src:r.result})},!1),r.readAsDataURL(t)})}function bS(t,e){const r=t.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[r.length-1]);let o=i.length;const s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],e,{type:n})}const pC=`graph TB
126
+ a-->b`,f9=({editor:t,attrs:e,extension:r})=>{const{alt:n,align:i}=e,[o,s]=J.useState(decodeURIComponent(n??pC)),[a,l]=J.useState(""),[c,d]=J.useState(!1),f=J.useRef(null),p=r==null?void 0:r.options.upload,m=async S=>{try{const{svg:w}=await rg.render("mermaid-svg",S);l(w)}catch{l("")}},g=()=>{rg.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,theme:"base"}),m(o)};J.useEffect(()=>{c&&g()},[c]),J.useEffect(()=>{c&&m(o)},[o]);const b=async()=>{if(o!==""){if(o){const S=f.current.querySelector("svg"),{width:w,height:T}=S.getBoundingClientRect(),M=`mermaid-${$M()}.svg`;let j=HM(S.outerHTML);if(p){const $=bS(j,M);j=await p($)}t==null||t.chain().focus().setMermaid({type:"mermaid",src:j,alt:encodeURIComponent(o),width:w,height:T},!!o).run(),t==null||t.commands.setAlignImageMermaid(i)}d(!1)}};return x.jsxs(ac,{open:c,onOpenChange:d,children:[x.jsx(lc,{asChild:!0,children:x.jsx(Ve,{icon:"Pencil",tooltip:"Edit Mermaid",action:()=>d(!0)})}),x.jsxs(Ma,{className:"!richtext-max-w-[1300px] richtext-z-[99999]",children:[x.jsx(Na,{children:"Edit Mermaid"}),x.jsx("div",{style:{height:"100%",border:"1px solid hsl(var(--border))"},children:x.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[x.jsx(Kh,{className:"richtext-flex-1",value:o,onChange:S=>s(S.target.value),autoFocus:!0,required:!0,rows:10,defaultValue:pC,placeholder:"Text",style:{color:"hsl(var(--richtext-foreground))"}}),x.jsx("div",{className:"richtext-flex-1 richtext-flex richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",style:{height:"100%",border:"1px solid hsl(var(--border))",minHeight:500,background:"#fff"},ref:f,dangerouslySetInnerHTML:{__html:a}})]})}),x.jsx(_d,{children:x.jsx(Mt,{type:"button",onClick:b,children:"Save changes"})})]})]})};function h9(t,e){const[r,n]=J.useState(void 0);return J.useEffect(()=>{const i=()=>{const o=t.extensionManager.extensions.find(s=>s.name===e);o&&n(o)};return t.on("selectionUpdate",i),t.on("transaction",i),()=>{t.off("selectionUpdate",i),t.off("transaction",i)}},[t,e]),r}const p9={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function m9({item:t,disabled:e,editor:r}){var i;const n=t.component;return n?x.jsx(J.Fragment,{children:t.type==="divider"?x.jsx(Bi,{orientation:"vertical",className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"}):x.jsx(n,{...t.componentProps,editor:r,disabled:e||((i=t==null?void 0:t.componentProps)==null?void 0:i.disabled)})}):x.jsx(x.Fragment,{})}function g9(t){return t.type.name==="mermaid"}function y9(t){const{lang:e}=Et(),r=Gh(t.editor,S1.name),n=h9(t.editor,S1.name),i=({editor:s})=>{const{selection:a}=s.view.state,{$from:l,to:c}=a;let d=!1;return s.view.state.doc.nodesBetween(l.pos,c,f=>{if(g9(f))return d=!0,!1}),d},o=J.useMemo(()=>t.disabled?[]:KG(t.editor),[t.disabled,t.editor,e]);return x.jsx(x.Fragment,{children:x.jsx(qn,{shouldShow:i,editor:t==null?void 0:t.editor,tippyOptions:p9,children:o!=null&&o.length?x.jsx("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:x.jsx("div",{className:"richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative",children:o==null?void 0:o.map((s,a)=>s.type==="edit"&&(r!=null&&r.src)?x.jsx(f9,{editor:t.editor,attrs:r,extension:n},`bubbleMenu-mermaid-${a}`):x.jsx(m9,{item:s,disabled:t.disabled,editor:t.editor},`bubbleMenu-mermaid-${a}`))})}):x.jsx(x.Fragment,{})})})}function v9({node:t}){var n;const e=((n=t==null?void 0:t.attrs)==null?void 0:n.src)||"",r=e==null?void 0:e.split("/").pop();return r?x.jsx(gi,{children:x.jsx("div",{"data-twitter":"",children:x.jsx(PP.Tweet,{id:r})})}):null}function b9(t){function e(r){t.action&&t.action(r)}return x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(Ve,{tooltip:t==null?void 0:t.tooltip,isActive:t==null?void 0:t.isActive,disabled:t==null?void 0:t.disabled,children:x.jsx(Rt,{name:t==null?void 0:t.icon})})}),x.jsx(Xn,{hideWhenDetached:!0,className:"richtext-w-full",align:"start",side:"bottom",children:x.jsx(WM,{editor:t.editor,onSetLink:e})})]})}const w9=/(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g,x9=/^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;function mC(t){return t.match(x9)}const Ng=Nt.create({name:"twitter",draggable:!0,selectable:!0,addOptions(){return{addPasteHandler:!0,HTMLAttributes:{},inline:!1,origin:"",button:({editor:t,t:e})=>({component:b9,componentProps:{action:r=>{t.commands.setTweet({src:r})},isActive:()=>!1,disabled:!1,icon:"Twitter",tooltip:e("editor.twitter.tooltip"),editor:t}})}},addNodeView(){return ko(v9,{attrs:this.options.HTMLAttributes})},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},addAttributes(){return{src:{default:null}}},parseHTML(){return[{tag:"div[data-twitter]"}]},addCommands(){return{setTweet:t=>({commands:e})=>mC(t.src)?e.insertContent({type:this.name,attrs:t}):!1,updateTweet:t=>({commands:e})=>mC(t.src)?e.updateAttributes(this.name,{src:t.src}):!1}},addPasteRules(){return this.options.addPasteHandler?[B4({find:w9,type:this.type,getAttributes:t=>({src:t.input})})]:[]},renderHTML({HTMLAttributes:t}){return["div",lt({"data-twitter":""},t)]}});function WM(t){const{t:e}=Et(),[r,n]=J.useState("");J.useEffect(()=>{var o;if(t!=null&&t.editor){const{src:s}=(o=t.editor)==null?void 0:o.getAttributes(Ng.name);s&&n(s)}},[t==null?void 0:t.editor]);function i(o){o.preventDefault(),o.stopPropagation(),t==null||t.onSetLink(r)}return x.jsx("div",{className:"richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black border-neutral-200 dark:richtext-border-neutral-800",children:x.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:i,children:[x.jsx(Kn,{className:"mb-[6px]",children:e("editor.link.dialog.text")}),x.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[10px]",children:x.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:x.jsx(hn,{type:"text",value:r,required:!0,className:"richtext-w-80",placeholder:"Text",onChange:o=>n(o.target.value)})})}),x.jsx(Mt,{type:"submit",className:"richtext-self-end richtext-mt-2",children:e("editor.link.dialog.button.apply")})]})})}function S9({editor:t,disabled:e}){const[r,n]=J.useState(!1),{t:i}=Et(),o=J.useCallback(({editor:l})=>l.isActive(Ng.name),[]),s=l=>{t.commands.updateTweet({src:l}),n(!1)},a=J.useCallback(()=>bd(Ng.name,t),[t]);return x.jsx(x.Fragment,{children:x.jsx(qn,{editor:t,shouldShow:o,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n(!1)}},children:e?x.jsx(x.Fragment,{}):x.jsx(x.Fragment,{children:r?x.jsx(WM,{onSetLink:s,editor:t}):x.jsx("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black richtext-border-neutral-200 dark:richtext-border-neutral-800",children:x.jsxs("div",{className:"richtext-flex richtext-flex-nowrap",children:[x.jsx(Ve,{icon:"Pencil",tooltip:i("editor.link.edit.tooltip"),action:()=>{n(!0)},tooltipOptions:{sideOffset:15}}),x.jsx(Ve,{icon:"Trash",tooltip:i("editor.delete"),action:a,tooltipOptions:{sideOffset:15}})]})})})})})}function k9({editor:t,disabled:e,bubbleMenu:r}){const n=t.extensionManager.extensions.map(o=>o.name),i=()=>{var o,s,a,l,c,d,f,p,m,g,b,S,w;return[n.includes("columns")&&!((o=r==null?void 0:r.columnConfig)!=null&&o.hidden)?x.jsx(cX,{editor:t},"columns"):null,n.includes("table")&&!((s=r==null?void 0:r.tableConfig)!=null&&s.hidden)?x.jsx(eX,{editor:t},"table"):null,n.includes("link")&&!((a=r==null?void 0:r.linkConfig)!=null&&a.hidden)?x.jsx(rX,{editor:t,disabled:e},"link"):null,n.includes("image")&&!((l=r==null?void 0:r.imageConfig)!=null&&l.hidden)?x.jsx(sX,{editor:t,disabled:e},"image"):null,n.includes(wk.name)&&!((c=r==null?void 0:r.imageGifConfig)!=null&&c.hidden)?x.jsx(aX,{editor:t,disabled:e},"imageGif"):null,n.includes("video")&&!((d=r==null?void 0:r.videoConfig)!=null&&d.hidden)?x.jsx(lX,{editor:t,disabled:e},"video"):null,n.includes("katex")&&!((f=r==null?void 0:r.katexConfig)!=null&&f.hidden)?x.jsx(YH,{editor:t,disabled:e},"katex"):null,n.includes("excalidraw")&&!((p=r==null?void 0:r.excalidrawConfig)!=null&&p.hidden)?x.jsx(Y7,{editor:t,disabled:e},"excalidraw"):null,n.includes("mermaid")&&!((m=r==null?void 0:r.mermaidConfig)!=null&&m.hidden)?x.jsx(y9,{editor:t,disabled:e},"mermaid"):null,n.includes("iframe")&&!((g=r==null?void 0:r.iframeConfig)!=null&&g.hidden)?x.jsx(n9,{editor:t,disabled:e},"iframe"):null,n.includes("twitter")&&!((b=r==null?void 0:r.twitterConfig)!=null&&b.hidden)?x.jsx(S9,{editor:t,disabled:e},"twitter"):null,(S=r==null?void 0:r.floatingMenuConfig)!=null&&S.hidden?null:x.jsx(Xq,{editor:t,disabled:e},"content"),(w=r==null?void 0:r.textConfig)!=null&&w.hidden?null:x.jsx(Zq,{editor:t,disabled:e},"text")]};return r!=null&&r.render?r.render({editor:t,disabled:e||!1,bubbleMenu:r},i()):i().filter(Boolean)}function gC(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}function VM(t){const{t:e}=Et(),{highlight:r=!1,disabled:n=!1,selectedColor:i,setSelectedColor:o,onChange:s,colors:a=g7}=t,l=J.useMemo(()=>{const m=a,g=[];for(let b=0;b<m.length;b+=10)g.push(m.slice(b,b+10));return g},[a]),[c,d]=J.useState([]),f=m=>{const g=[...c],b=g.indexOf(m);b!==-1&&g.splice(b,1),g.unshift(m),g.length>10&&g.pop(),d(g)};function p(m){if(m===void 0){o==null||o(m),s==null||s(m);return}/^#([\da-f]{3}){1,2}$/i.test(m)&&(o==null||o(m),s==null||s(m),f(m))}return x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{className:"!richtext-p-0",disabled:n,asChild:!0,children:t==null?void 0:t.children}),x.jsx(Xn,{hideWhenDetached:!0,className:"richtext-w-full richtext-h-full richtext-p-2",align:"start",side:"bottom",children:x.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[r?x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-p-1 richtext-cursor-pointer rd-1 richtext-gap-[4px] hover:richtext-bg-accent",onClick:()=>p(void 0),children:[x.jsx(gC,{}),x.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:e("editor.nofill")})]}):x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-p-1 richtext-cursor-pointer rd-1 richtext-gap-[4px] hover:richtext-bg-accent",onClick:()=>{p(void 0)},children:[x.jsx(gC,{}),x.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:e("editor.default")})]}),l.map((m,g)=>x.jsx("span",{className:"richtext-relative richtext-flex richtext-w-full richtext-h-auto richtext-p-0 last:richtext-pb-2",children:m.map((b,S)=>x.jsx("span",{className:"richtext-w-6 richtext-h-6 richtext-p-0.5 richtext-inline-block richtext-rounded-sm !richtext-border richtext-border-transparent richtext-flex-[0_0_auto] richtext-cursor-pointer hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>p(b),children:x.jsx("span",{style:{backgroundColor:b},className:"richtext-relative richtext-w-[18px] richtext-h-[18px] richtext-block richtext-rounded-[2px] richtext-border-transparent",children:b===i?x.jsx("svg",{className:"richtext-absolute richtext-block richtext-top-[-1px] richtext-left-[1px] richtext-w-3 richtext-h-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:x.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):x.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:x.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${S}`))},g)),x.jsxs("div",{children:[x.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:e("editor.recent")}),x.jsx("span",{className:"richtext-relative richtext-flex richtext-w-full richtext-h-auto richtext-p-0 last:richtext-pb-2",children:c==null?void 0:c.map((m,g)=>x.jsx("span",{className:"richtext-w-6 richtext-h-6 richtext-p-0.5 richtext-inline-block richtext-rounded-sm !richtext-border richtext-border-transparent richtext-flex-[0_0_auto] richtext-cursor-pointer hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>p(m),children:x.jsx("span",{className:"richtext-relative richtext-w-[18px] richtext-h-[18px] richtext-block richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:m},children:x.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:x.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${g}`))})]}),x.jsx(_9,{setColor:p})]})})]})}function _9({setColor:t}){const[e,r]=J.useState("#000000"),[n,i]=J.useState(!1),{t:o}=Et();return J.useEffect(()=>()=>{i(!1)},[]),x.jsxs(xi,{open:n,children:[x.jsx(Si,{asChild:!0,children:x.jsxs("div",{onClick:s=>{s.preventDefault(),i(!0)},className:"richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent richtext-py-1.5 richtext-px-1.5",children:[o("editor.color.more"),"..."]})}),x.jsxs(Xn,{children:[x.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[x.jsx(LP.HexColorPicker,{color:e,onChange:r}),x.jsx(hn,{className:"richtext-mt-[8px] richtext-w-full",type:"text",onChange:s=>{s.preventDefault(),r(`#${s.target.value}`)},value:e.slice(1)})]}),x.jsx(Bi,{className:"richtext-my-[10px]"}),x.jsx(Mt,{onClick:s=>{s.preventDefault(),t(e),i(!1)},className:"richtext-w-full",children:x.jsx(He.Plus,{size:16})})]})]})}var GM=typeof global=="object"&&global&&global.Object===Object&&global,E9=typeof self=="object"&&self&&self.Object===Object&&self,Co=GM||E9||Function("return this")(),xo=Co.Symbol,KM=Object.prototype,C9=KM.hasOwnProperty,T9=KM.toString,Mf=xo?xo.toStringTag:void 0;function A9(t){var e=C9.call(t,Mf),r=t[Mf];try{t[Mf]=void 0;var n=!0}catch{}var i=T9.call(t);return n&&(e?t[Mf]=r:delete t[Mf]),i}var R9=Object.prototype,I9=R9.toString;function O9(t){return I9.call(t)}var M9="[object Null]",N9="[object Undefined]",yC=xo?xo.toStringTag:void 0;function Da(t){return t==null?t===void 0?N9:M9:yC&&yC in Object(t)?A9(t):O9(t)}function ds(t){return t!=null&&typeof t=="object"}var D9="[object Symbol]";function Jy(t){return typeof t=="symbol"||ds(t)&&Da(t)==D9}function qM(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var So=Array.isArray,P9=1/0,vC=xo?xo.prototype:void 0,bC=vC?vC.toString:void 0;function Dg(t){if(typeof t=="string")return t;if(So(t))return qM(t,Dg)+"";if(Jy(t))return bC?bC.call(t):"";var e=t+"";return e=="0"&&1/t==-P9?"-0":e}var L9=/\s/;function F9(t){for(var e=t.length;e--&&L9.test(t.charAt(e)););return e}var j9=/^\s+/;function B9(t){return t&&t.slice(0,F9(t)+1).replace(j9,"")}function xa(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var wC=NaN,z9=/^[-+]0x[0-9a-f]+$/i,H9=/^0b[01]+$/i,$9=/^0o[0-7]+$/i,U9=parseInt;function zu(t){if(typeof t=="number")return t;if(Jy(t))return wC;if(xa(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=xa(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=B9(t);var r=H9.test(t);return r||$9.test(t)?U9(t.slice(2),r?2:8):z9.test(t)?wC:+t}var xC=1/0,W9=17976931348623157e292;function V9(t){if(!t)return t===0?t:0;if(t=zu(t),t===xC||t===-xC){var e=t<0?-1:1;return e*W9}return t===t?t:0}function G9(t){var e=V9(t),r=e%1;return e===e?r?e-r:e:0}function wS(t){return t}var K9="[object AsyncFunction]",q9="[object Function]",X9="[object GeneratorFunction]",Y9="[object Proxy]";function XM(t){if(!xa(t))return!1;var e=Da(t);return e==q9||e==X9||e==K9||e==Y9}var aw=Co["__core-js_shared__"],SC=function(){var t=/[^.]+$/.exec(aw&&aw.keys&&aw.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function J9(t){return!!SC&&SC in t}var Z9=Function.prototype,Q9=Z9.toString;function cc(t){if(t!=null){try{return Q9.call(t)}catch{}try{return t+""}catch{}}return""}var e$=/[\\^$.*+?()[\]{}|]/g,t$=/^\[object .+?Constructor\]$/,r$=Function.prototype,n$=Object.prototype,i$=r$.toString,o$=n$.hasOwnProperty,s$=RegExp("^"+i$.call(o$).replace(e$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function a$(t){if(!xa(t)||J9(t))return!1;var e=XM(t)?s$:t$;return e.test(cc(t))}function l$(t,e){return t==null?void 0:t[e]}function uc(t,e){var r=l$(t,e);return a$(r)?r:void 0}var Ix=uc(Co,"WeakMap");function c$(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var u$=800,d$=16,f$=Date.now;function h$(t){var e=0,r=0;return function(){var n=f$(),i=d$-(n-r);if(r=n,i>0){if(++e>=u$)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function p$(t){return function(){return t}}var kC=function(){try{var t=uc(Object,"defineProperty");return t({},"",{}),t}catch{}}(),m$=kC?function(t,e){return kC(t,"toString",{configurable:!0,enumerable:!1,value:p$(e),writable:!0})}:wS,g$=h$(m$);function y$(t,e,r,n){for(var i=t.length,o=r+-1;++o<i;)if(e(t[o],o,t))return o;return-1}function v$(t){return t!==t}function b$(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function w$(t,e,r){return e===e?b$(t,e,r):y$(t,v$,r)}function x$(t,e){var r=t==null?0:t.length;return!!r&&w$(t,e,0)>-1}var S$=9007199254740991,k$=/^(?:0|[1-9]\d*)$/;function YM(t,e){var r=typeof t;return e=e??S$,!!e&&(r=="number"||r!="symbol"&&k$.test(t))&&t>-1&&t%1==0&&t<e}function JM(t,e){return t===e||t!==t&&e!==e}var _C=Math.max;function _$(t,e,r){return e=_C(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=_C(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),c$(t,this,a)}}function E$(t,e){return g$(_$(t,e,wS),t+"")}var C$=9007199254740991;function xS(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=C$}function ZM(t){return t!=null&&xS(t.length)&&!XM(t)}var T$=Object.prototype;function A$(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||T$;return t===r}function R$(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var I$="[object Arguments]";function EC(t){return ds(t)&&Da(t)==I$}var QM=Object.prototype,O$=QM.hasOwnProperty,M$=QM.propertyIsEnumerable,SS=EC(function(){return arguments}())?EC:function(t){return ds(t)&&O$.call(t,"callee")&&!M$.call(t,"callee")};function N$(){return!1}var eN=typeof exports=="object"&&exports&&!exports.nodeType&&exports,CC=eN&&typeof module=="object"&&module&&!module.nodeType&&module,D$=CC&&CC.exports===eN,TC=D$?Co.Buffer:void 0,P$=TC?TC.isBuffer:void 0,Ox=P$||N$,L$="[object Arguments]",F$="[object Array]",j$="[object Boolean]",B$="[object Date]",z$="[object Error]",H$="[object Function]",$$="[object Map]",U$="[object Number]",W$="[object Object]",V$="[object RegExp]",G$="[object Set]",K$="[object String]",q$="[object WeakMap]",X$="[object ArrayBuffer]",Y$="[object DataView]",J$="[object Float32Array]",Z$="[object Float64Array]",Q$="[object Int8Array]",eU="[object Int16Array]",tU="[object Int32Array]",rU="[object Uint8Array]",nU="[object Uint8ClampedArray]",iU="[object Uint16Array]",oU="[object Uint32Array]",qt={};qt[J$]=qt[Z$]=qt[Q$]=qt[eU]=qt[tU]=qt[rU]=qt[nU]=qt[iU]=qt[oU]=!0;qt[L$]=qt[F$]=qt[X$]=qt[j$]=qt[Y$]=qt[B$]=qt[z$]=qt[H$]=qt[$$]=qt[U$]=qt[W$]=qt[V$]=qt[G$]=qt[K$]=qt[q$]=!1;function sU(t){return ds(t)&&xS(t.length)&&!!qt[Da(t)]}function kS(t){return function(e){return t(e)}}var tN=typeof exports=="object"&&exports&&!exports.nodeType&&exports,oh=tN&&typeof module=="object"&&module&&!module.nodeType&&module,aU=oh&&oh.exports===tN,lw=aU&&GM.process,Pg=function(){try{var t=oh&&oh.require&&oh.require("util").types;return t||lw&&lw.binding&&lw.binding("util")}catch{}}(),AC=Pg&&Pg.isTypedArray,rN=AC?kS(AC):sU,lU=Object.prototype,cU=lU.hasOwnProperty;function uU(t,e){var r=So(t),n=!r&&SS(t),i=!r&&!n&&Ox(t),o=!r&&!n&&!i&&rN(t),s=r||n||i||o,a=s?R$(t.length,String):[],l=a.length;for(var c in t)cU.call(t,c)&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||YM(c,l)))&&a.push(c);return a}function dU(t,e){return function(r){return t(e(r))}}var fU=dU(Object.keys,Object),hU=Object.prototype,pU=hU.hasOwnProperty;function mU(t){if(!A$(t))return fU(t);var e=[];for(var r in Object(t))pU.call(t,r)&&r!="constructor"&&e.push(r);return e}function nN(t){return ZM(t)?uU(t):mU(t)}var gU=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yU=/^\w*$/;function _S(t,e){if(So(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Jy(t)?!0:yU.test(t)||!gU.test(t)||e!=null&&t in Object(e)}var _h=uc(Object,"create");function vU(){this.__data__=_h?_h(null):{},this.size=0}function bU(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var wU="__lodash_hash_undefined__",xU=Object.prototype,SU=xU.hasOwnProperty;function kU(t){var e=this.__data__;if(_h){var r=e[t];return r===wU?void 0:r}return SU.call(e,t)?e[t]:void 0}var _U=Object.prototype,EU=_U.hasOwnProperty;function CU(t){var e=this.__data__;return _h?e[t]!==void 0:EU.call(e,t)}var TU="__lodash_hash_undefined__";function AU(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_h&&e===void 0?TU:e,this}function ql(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ql.prototype.clear=vU;ql.prototype.delete=bU;ql.prototype.get=kU;ql.prototype.has=CU;ql.prototype.set=AU;function RU(){this.__data__=[],this.size=0}function Zy(t,e){for(var r=t.length;r--;)if(JM(t[r][0],e))return r;return-1}var IU=Array.prototype,OU=IU.splice;function MU(t){var e=this.__data__,r=Zy(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():OU.call(e,r,1),--this.size,!0}function NU(t){var e=this.__data__,r=Zy(e,t);return r<0?void 0:e[r][1]}function DU(t){return Zy(this.__data__,t)>-1}function PU(t,e){var r=this.__data__,n=Zy(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function ms(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ms.prototype.clear=RU;ms.prototype.delete=MU;ms.prototype.get=NU;ms.prototype.has=DU;ms.prototype.set=PU;var Eh=uc(Co,"Map");function LU(){this.size=0,this.__data__={hash:new ql,map:new(Eh||ms),string:new ql}}function FU(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Qy(t,e){var r=t.__data__;return FU(e)?r[typeof e=="string"?"string":"hash"]:r.map}function jU(t){var e=Qy(this,t).delete(t);return this.size-=e?1:0,e}function BU(t){return Qy(this,t).get(t)}function zU(t){return Qy(this,t).has(t)}function HU(t,e){var r=Qy(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function gs(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}gs.prototype.clear=LU;gs.prototype.delete=jU;gs.prototype.get=BU;gs.prototype.has=zU;gs.prototype.set=HU;var $U="Expected a function";function ES(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError($U);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(ES.Cache||gs),r}ES.Cache=gs;var UU=500;function WU(t){var e=ES(t,function(n){return r.size===UU&&r.clear(),n}),r=e.cache;return e}var VU=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,GU=/\\(\\)?/g,KU=WU(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(VU,function(r,n,i,o){e.push(i?o.replace(GU,"$1"):n||r)}),e});function Mx(t){return t==null?"":Dg(t)}function iN(t,e){return So(t)?t:_S(t,e)?[t]:KU(Mx(t))}var qU=1/0;function ev(t){if(typeof t=="string"||Jy(t))return t;var e=t+"";return e=="0"&&1/t==-qU?"-0":e}function oN(t,e){e=iN(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[ev(e[r++])];return r&&r==n?t:void 0}function XU(t,e,r){var n=t==null?void 0:oN(t,e);return n===void 0?r:n}function sN(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var RC=xo?xo.isConcatSpreadable:void 0;function YU(t){return So(t)||SS(t)||!!(RC&&t&&t[RC])}function JU(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=YU),i||(i=[]);++o<s;){var a=t[o];r(a)&&sN(i,a)}return i}function ZU(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}function QU(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:ZU(t,e,r)}var eW="\\ud800-\\udfff",tW="\\u0300-\\u036f",rW="\\ufe20-\\ufe2f",nW="\\u20d0-\\u20ff",iW=tW+rW+nW,oW="\\ufe0e\\ufe0f",sW="\\u200d",aW=RegExp("["+sW+eW+iW+oW+"]");function CS(t){return aW.test(t)}function lW(t){return t.split("")}var aN="\\ud800-\\udfff",cW="\\u0300-\\u036f",uW="\\ufe20-\\ufe2f",dW="\\u20d0-\\u20ff",fW=cW+uW+dW,hW="\\ufe0e\\ufe0f",pW="["+aN+"]",Nx="["+fW+"]",Dx="\\ud83c[\\udffb-\\udfff]",mW="(?:"+Nx+"|"+Dx+")",lN="[^"+aN+"]",cN="(?:\\ud83c[\\udde6-\\uddff]){2}",uN="[\\ud800-\\udbff][\\udc00-\\udfff]",gW="\\u200d",dN=mW+"?",fN="["+hW+"]?",yW="(?:"+gW+"(?:"+[lN,cN,uN].join("|")+")"+fN+dN+")*",vW=fN+dN+yW,bW="(?:"+[lN+Nx+"?",Nx,cN,uN,pW].join("|")+")",wW=RegExp(Dx+"(?="+Dx+")|"+bW+vW,"g");function xW(t){return t.match(wW)||[]}function SW(t){return CS(t)?xW(t):lW(t)}function kW(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}function hN(t,e,r){return r===void 0&&(r=e,e=void 0),r!==void 0&&(r=zu(r),r=r===r?r:0),e!==void 0&&(e=zu(e),e=e===e?e:0),kW(zu(t),e,r)}function _W(){this.__data__=new ms,this.size=0}function EW(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function CW(t){return this.__data__.get(t)}function TW(t){return this.__data__.has(t)}var AW=200;function RW(t,e){var r=this.__data__;if(r instanceof ms){var n=r.__data__;if(!Eh||n.length<AW-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new gs(n)}return r.set(t,e),this.size=r.size,this}function cs(t){var e=this.__data__=new ms(t);this.size=e.size}cs.prototype.clear=_W;cs.prototype.delete=EW;cs.prototype.get=CW;cs.prototype.has=TW;cs.prototype.set=RW;function IW(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function OW(){return[]}var MW=Object.prototype,NW=MW.propertyIsEnumerable,IC=Object.getOwnPropertySymbols,DW=IC?function(t){return t==null?[]:(t=Object(t),IW(IC(t),function(e){return NW.call(t,e)}))}:OW;function PW(t,e,r){var n=e(t);return So(t)?n:sN(n,r(t))}function OC(t){return PW(t,nN,DW)}var Px=uc(Co,"DataView"),Lx=uc(Co,"Promise"),Fx=uc(Co,"Set"),MC="[object Map]",LW="[object Object]",NC="[object Promise]",DC="[object Set]",PC="[object WeakMap]",LC="[object DataView]",FW=cc(Px),jW=cc(Eh),BW=cc(Lx),zW=cc(Fx),HW=cc(Ix),na=Da;(Px&&na(new Px(new ArrayBuffer(1)))!=LC||Eh&&na(new Eh)!=MC||Lx&&na(Lx.resolve())!=NC||Fx&&na(new Fx)!=DC||Ix&&na(new Ix)!=PC)&&(na=function(t){var e=Da(t),r=e==LW?t.constructor:void 0,n=r?cc(r):"";if(n)switch(n){case FW:return LC;case jW:return MC;case BW:return NC;case zW:return DC;case HW:return PC}return e});var FC=Co.Uint8Array,$W="__lodash_hash_undefined__";function UW(t){return this.__data__.set(t,$W),this}function WW(t){return this.__data__.has(t)}function Ch(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new gs;++e<r;)this.add(t[e])}Ch.prototype.add=Ch.prototype.push=UW;Ch.prototype.has=WW;function VW(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function pN(t,e){return t.has(e)}var GW=1,KW=2;function mN(t,e,r,n,i,o){var s=r&GW,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t),d=o.get(e);if(c&&d)return c==e&&d==t;var f=-1,p=!0,m=r&KW?new Ch:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var g=t[f],b=e[f];if(n)var S=s?n(b,g,f,e,t,o):n(g,b,f,t,e,o);if(S!==void 0){if(S)continue;p=!1;break}if(m){if(!VW(e,function(w,T){if(!pN(m,T)&&(g===w||i(g,w,r,n,o)))return m.push(T)})){p=!1;break}}else if(!(g===b||i(g,b,r,n,o))){p=!1;break}}return o.delete(t),o.delete(e),p}function qW(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function XW(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var YW=1,JW=2,ZW="[object Boolean]",QW="[object Date]",eV="[object Error]",tV="[object Map]",rV="[object Number]",nV="[object RegExp]",iV="[object Set]",oV="[object String]",sV="[object Symbol]",aV="[object ArrayBuffer]",lV="[object DataView]",jC=xo?xo.prototype:void 0,cw=jC?jC.valueOf:void 0;function cV(t,e,r,n,i,o,s){switch(r){case lV:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case aV:return!(t.byteLength!=e.byteLength||!o(new FC(t),new FC(e)));case ZW:case QW:case rV:return JM(+t,+e);case eV:return t.name==e.name&&t.message==e.message;case nV:case oV:return t==e+"";case tV:var a=qW;case iV:var l=n&YW;if(a||(a=XW),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;n|=JW,s.set(t,e);var d=mN(a(t),a(e),n,i,o,s);return s.delete(t),d;case sV:if(cw)return cw.call(t)==cw.call(e)}return!1}var uV=1,dV=Object.prototype,fV=dV.hasOwnProperty;function hV(t,e,r,n,i,o){var s=r&uV,a=OC(t),l=a.length,c=OC(e),d=c.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var p=a[f];if(!(s?p in e:fV.call(e,p)))return!1}var m=o.get(t),g=o.get(e);if(m&&g)return m==e&&g==t;var b=!0;o.set(t,e),o.set(e,t);for(var S=s;++f<l;){p=a[f];var w=t[p],T=e[p];if(n)var M=s?n(T,w,p,e,t,o):n(w,T,p,t,e,o);if(!(M===void 0?w===T||i(w,T,r,n,o):M)){b=!1;break}S||(S=p=="constructor")}if(b&&!S){var j=t.constructor,$=e.constructor;j!=$&&"constructor"in t&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof $=="function"&&$ instanceof $)&&(b=!1)}return o.delete(t),o.delete(e),b}var pV=1,BC="[object Arguments]",zC="[object Array]",tm="[object Object]",mV=Object.prototype,HC=mV.hasOwnProperty;function gV(t,e,r,n,i,o){var s=So(t),a=So(e),l=s?zC:na(t),c=a?zC:na(e);l=l==BC?tm:l,c=c==BC?tm:c;var d=l==tm,f=c==tm,p=l==c;if(p&&Ox(t)){if(!Ox(e))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new cs),s||rN(t)?mN(t,e,r,n,i,o):cV(t,e,l,r,n,i,o);if(!(r&pV)){var m=d&&HC.call(t,"__wrapped__"),g=f&&HC.call(e,"__wrapped__");if(m||g){var b=m?t.value():t,S=g?e.value():e;return o||(o=new cs),i(b,S,r,n,o)}}return p?(o||(o=new cs),hV(t,e,r,n,i,o)):!1}function TS(t,e,r,n,i){return t===e?!0:t==null||e==null||!ds(t)&&!ds(e)?t!==t&&e!==e:gV(t,e,r,n,TS,i)}var yV=1,vV=2;function bV(t,e,r,n){var i=r.length,o=i;if(t==null)return!o;for(t=Object(t);i--;){var s=r[i];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){s=r[i];var a=s[0],l=t[a],c=s[1];if(s[2]){if(l===void 0&&!(a in t))return!1}else{var d=new cs,f;if(!(f===void 0?TS(c,l,yV|vV,n,d):f))return!1}}return!0}function gN(t){return t===t&&!xa(t)}function wV(t){for(var e=nN(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,gN(i)]}return e}function yN(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function xV(t){var e=wV(t);return e.length==1&&e[0][2]?yN(e[0][0],e[0][1]):function(r){return r===t||bV(r,t,e)}}function SV(t,e){return t!=null&&e in Object(t)}function kV(t,e,r){e=iN(e,t);for(var n=-1,i=e.length,o=!1;++n<i;){var s=ev(e[n]);if(!(o=t!=null&&r(t,s)))break;t=t[s]}return o||++n!=i?o:(i=t==null?0:t.length,!!i&&xS(i)&&YM(s,i)&&(So(t)||SS(t)))}function _V(t,e){return t!=null&&kV(t,e,SV)}var EV=1,CV=2;function TV(t,e){return _S(t)&&gN(e)?yN(ev(t),e):function(r){var n=XU(r,t);return n===void 0&&n===e?_V(r,t):TS(e,n,EV|CV)}}function vN(t){return function(e){return e==null?void 0:e[t]}}function AV(t){return function(e){return oN(e,t)}}function RV(t){return _S(t)?vN(ev(t)):AV(t)}function IV(t){return typeof t=="function"?t:t==null?wS:typeof t=="object"?So(t)?TV(t[0],t[1]):xV(t):RV(t)}var uw=function(){return Co.Date.now()},OV="Expected a function",MV=Math.max,NV=Math.min;function tv(t,e,r){var n,i,o,s,a,l,c=0,d=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError(OV);e=zu(e)||0,xa(r)&&(d=!!r.leading,f="maxWait"in r,o=f?MV(zu(r.maxWait)||0,e):o,p="trailing"in r?!!r.trailing:p);function m(W){var Y=n,ee=i;return n=i=void 0,c=W,s=t.apply(ee,Y),s}function g(W){return c=W,a=setTimeout(w,e),d?m(W):s}function b(W){var Y=W-l,ee=W-c,P=e-Y;return f?NV(P,o-ee):P}function S(W){var Y=W-l,ee=W-c;return l===void 0||Y>=e||Y<0||f&&ee>=o}function w(){var W=uw();if(S(W))return T(W);a=setTimeout(w,b(W))}function T(W){return a=void 0,p&&n?m(W):(n=i=void 0,s)}function M(){a!==void 0&&clearTimeout(a),c=0,n=l=i=a=void 0}function j(){return a===void 0?s:T(uw())}function $(){var W=uw(),Y=S(W);if(n=arguments,i=this,l=W,Y){if(a===void 0)return g(l);if(f)return clearTimeout(a),a=setTimeout(w,e),m(l)}return a===void 0&&(a=setTimeout(w,e)),s}return $.cancel=M,$.flush=j,$}function dw(t){return ds(t)&&ZM(t)}var DV=200;function PV(t,e,r,n){var i=-1,o=x$,s=!0,a=t.length,l=[],c=e.length;if(!a)return l;r&&(e=qM(e,kS(r))),e.length>=DV&&(o=pN,s=!1,e=new Ch(e));e:for(;++i<a;){var d=t[i],f=r==null?d:r(d);if(d=d!==0?d:0,s&&f===f){for(var p=c;p--;)if(e[p]===f)continue e;l.push(d)}else o(e,f,n)||l.push(d)}return l}function LV(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var FV=E$(function(t,e){var r=LV(e);return dw(r)&&(r=void 0),dw(t)?PV(t,JU(e,1,dw),IV(r)):[]}),jV="[object Number]";function Lg(t){return typeof t=="number"||ds(t)&&Da(t)==jV}var BV="[object RegExp]";function zV(t){return ds(t)&&Da(t)==BV}var $C=Pg&&Pg.isRegExp,HV=$C?kS($C):zV,$V=vN("length"),bN="\\ud800-\\udfff",UV="\\u0300-\\u036f",WV="\\ufe20-\\ufe2f",VV="\\u20d0-\\u20ff",GV=UV+WV+VV,KV="\\ufe0e\\ufe0f",qV="["+bN+"]",jx="["+GV+"]",Bx="\\ud83c[\\udffb-\\udfff]",XV="(?:"+jx+"|"+Bx+")",wN="[^"+bN+"]",xN="(?:\\ud83c[\\udde6-\\uddff]){2}",SN="[\\ud800-\\udbff][\\udc00-\\udfff]",YV="\\u200d",kN=XV+"?",_N="["+KV+"]?",JV="(?:"+YV+"(?:"+[wN,xN,SN].join("|")+")"+_N+kN+")*",ZV=_N+kN+JV,QV="(?:"+[wN+jx+"?",jx,xN,SN,qV].join("|")+")",UC=RegExp(Bx+"(?="+Bx+")|"+QV+ZV,"g");function eG(t){for(var e=UC.lastIndex=0;UC.test(t);)++e;return e}function tG(t){return CS(t)?eG(t):$V(t)}var rG="Expected a function";function Xl(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(rG);return xa(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),tv(t,e,{leading:n,maxWait:e,trailing:i})}var nG=30,iG="...",oG=/\w*$/;function sG(t,e){var r=nG,n=iG;if(xa(e)){var i="separator"in e?e.separator:i;r="length"in e?G9(e.length):r,n="omission"in e?Dg(e.omission):n}t=Mx(t);var o=t.length;if(CS(t)){var s=SW(t);o=s.length}if(r>=o)return t;var a=r-tG(n);if(a<1)return n;var l=s?QU(s,0,a).join(""):t.slice(0,a);if(i===void 0)return l+n;if(s&&(a+=l.length-a),HV(i)){if(t.slice(a).search(i)){var c,d=l;for(i.global||(i=RegExp(i.source,Mx(oG.exec(i))+"g")),i.lastIndex=0;c=i.exec(d);)var f=c.index;l=l.slice(0,f===void 0?a:f)}}else if(t.indexOf(Dg(i),a)!=a){var p=l.lastIndexOf(i);p>-1&&(l=l.slice(0,p))}return l+n}const aG=`
127
+ .reactjs-tiptap-editor, .richtext-dialog-content {
128
+ button,
129
+ input:where([type=button]),
130
+ input:where([type=reset]),
131
+ input:where([type=submit]) {
132
+ -webkit-appearance: button;
133
+ background-color: transparent;
134
+ background-image: none
135
+ }
136
+
137
+ input,
138
+ optgroup,
139
+ select,
140
+ textarea {
141
+ font-family: inherit;
142
+ font-feature-settings: inherit;
143
+ font-variation-settings: inherit;
144
+ font-size: 100%;
145
+ font-weight: inherit;
146
+ line-height: inherit;
147
+ letter-spacing: inherit;
148
+ color: inherit;
149
+ }
150
+
151
+ button {
152
+ font-family: inherit;
153
+ font-feature-settings: inherit;
154
+ font-variation-settings: inherit;
155
+ font-size: 100%;
156
+ font-weight: inherit;
157
+ line-height: inherit;
158
+ letter-spacing: inherit;
159
+ color: inherit;
160
+ }
161
+ }
162
+
163
+ .reactjs-tiptap-editor,
164
+ .richtext-dialog-content,
165
+ div[data-radix-popper-content-wrapper],
166
+ div[data-tippy-root] {
167
+ *,
168
+ :before,
169
+ :after {
170
+ box-sizing: border-box;
171
+ border-width: 0;
172
+ border-style: solid;
173
+ border-color: hsl(var(--richtext-border));
174
+ }
175
+
176
+ background-color: hsl(var(--richtext-background));
177
+ color: hsl(var(--richtext-foreground));
178
+
179
+
180
+ html,
181
+ :host {
182
+ line-height: 1.5;
183
+ -webkit-text-size-adjust: 100%;
184
+ -moz-tab-size: 4;
185
+ tab-size: 4;
186
+ font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
187
+ font-feature-settings: normal;
188
+ font-variation-settings: normal;
189
+ -webkit-tap-highlight-color: transparent
190
+ }
191
+
192
+ hr {
193
+ height: 0;
194
+ color: inherit;
195
+ border-top-width: 1px
196
+ }
197
+
198
+ a {
199
+ color: inherit;
200
+ text-decoration: inherit
201
+ }
202
+
203
+ b,
204
+ strong {
205
+ font-weight: bolder
206
+ }
207
+
208
+ code,
209
+ kbd,
210
+ samp,
211
+ pre {
212
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
213
+ font-feature-settings: normal;
214
+ font-variation-settings: normal;
215
+ font-size: 1em
216
+ }
217
+
218
+ table {
219
+ text-indent: 0;
220
+ border-color: inherit;
221
+ border-collapse: collapse
222
+ }
223
+
224
+ input, textarea {
225
+ border-width: 1px;
226
+ }
227
+
228
+ textarea {
229
+ resize: vertical
230
+ }
231
+
232
+ input::placeholder,
233
+ textarea::placeholder {
234
+ opacity: 1;
235
+ color: #9ca3af
236
+ }
237
+
238
+ button, input, textarea {
239
+ cursor: pointer;
240
+ color: inherit;
241
+ }
242
+
243
+ img,
244
+ svg,
245
+ video,
246
+ canvas,
247
+ audio,
248
+ iframe,
249
+ embed,
250
+ object {
251
+ display: block;
252
+ vertical-align: middle
253
+ }
254
+
255
+ img,
256
+ video {
257
+ max-width: 100%;
258
+ height: auto
259
+ }
260
+ }
261
+ `,EN=Xh("light");function lG(){return Xy(EN)}const cG={setTheme:t=>{EN.set(t)}},WC="data-rc-order",VC="data-rc-priority",uG="rc-util-key",zx=new Map;function dG(t,e){if(!t)return!1;if(t.contains)return t.contains(e);let r=e;for(;r;){if(r===t)return!0;r=r.parentNode}return!1}function CN({mark:t}={}){return t?t.startsWith("data-")?t:`data-${t}`:uG}function AS(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function fG(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function TN(t){return[...(zx.get(t)||t).children].filter(e=>e.tagName==="STYLE")}function AN(t,e={}){const{csp:r,prepend:n,priority:i=0}=e,o=fG(n),s=o==="prependQueue",a=document.createElement("style");a.setAttribute(WC,o),s&&i&&a.setAttribute(VC,`${i}`),r!=null&&r.nonce&&(a.nonce=r==null?void 0:r.nonce),a.innerHTML=t;const l=AS(e),{firstChild:c}=l;if(n){if(s){const d=TN(l).filter(f=>{if(!["prepend","prependQueue"].includes(f.getAttribute(WC)))return!1;const p=Number(f.getAttribute(VC)||0);return i>=p});if(d.length>0)return l.insertBefore(a,d.at(-1).nextSibling),a}c.before(a)}else l.append(a);return a}function RN(t,e={}){const r=AS(e);return TN(r).find(n=>n.getAttribute(CN(e))===t)}function hG(t,e={}){const r=RN(t,e);r&&r.remove()}function pG(t,e){const r=zx.get(t);if(!r||!dG(document,r)){const n=AN("",e),{parentNode:i}=n;zx.set(t,i),n.remove()}}function mG(t,e,r={}){var s,a,l;const n=AS(r);pG(n,r);const i=RN(e,r);if(i)return(s=r.csp)!=null&&s.nonce&&i.nonce!==((a=r.csp)==null?void 0:a.nonce)&&(i.nonce=(l=r.csp)==null?void 0:l.nonce),i.innerHTML!==t&&(i.innerHTML=t),i;const o=AN(t,r);return o.setAttribute(CN(r),e),o}function gG({editor:t,extensions:e}){const{t:r}=Et(),n=J.useMemo(()=>{var i,o,s;return(s=(o=(i=e==null?void 0:e.find(a=>a.name==="base-kit"))==null?void 0:i.options)==null?void 0:o.characterCount)==null?void 0:s.limit},[e]);return n?x.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:x.jsx("div",{className:"richtext-flex richtext-flex-col",children:x.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:x.jsxs("span",{children:[t.storage.characterCount.characters(),"/",n," ",r("editor.characters")]})})})}):x.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:x.jsx("div",{className:"richtext-flex richtext-flex-col",children:x.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:x.jsxs("span",{children:[t.storage.characterCount.characters()," ",r("editor.characters")]})})})})}function yG(t,e){const{content:r,extensions:n,useEditorOptions:i={}}=t,o=J.useMemo(()=>{const d=FV(n,n,"name");return[...n.map(p=>{const m=n.find(g=>g.name===p.name);return m?p.configure(m.options):p}),...d].map((p,m)=>p.configure({sort:m}))},[n]),s=Xl(d=>{var p;const f=l(d,t.output);(p=t==null?void 0:t.onChangeContent)==null||p.call(t,f)},m7),a=UF({extensions:o,content:r,onUpdate:({editor:d})=>{s&&s(d)},...i});J.useImperativeHandle(e,()=>({editor:a})),J.useEffect(()=>{document.documentElement.classList.toggle("dark",t.dark),cG.setTheme(t.dark?"dark":"light")},[t.dark]),J.useEffect(()=>{a==null||a.setEditable(!(t!=null&&t.disabled)),t9.setDisable(!(t!=null&&t.disabled))},[a,t==null?void 0:t.disabled]),J.useEffect(()=>((t==null?void 0:t.resetCSS)!==!1&&mG(aG,"react-tiptap-reset"),()=>{hG("react-tiptap-reset")}),[t==null?void 0:t.resetCSS]);function l(d,f){return t!=null&&t.removeDefaultWrapper?f==="html"?d.isEmpty?"":d.getHTML():f==="json"?d.isEmpty?{}:d.getJSON():f==="text"?d.isEmpty?"":d.getText():"":f==="html"?d.getHTML():f==="json"?d.getJSON():f==="text"?d.getText():""}J.useEffect(()=>()=>{var d;(d=a==null?void 0:a.destroy)==null||d.call(a)},[]);const c=LM(a,"characterCount");return a?x.jsx("div",{className:"reactjs-tiptap-editor",children:x.jsx(VH,{delayDuration:0,disableHoverableContent:!0,children:x.jsx("div",{className:"richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-overflow-hidden richtext-outline richtext-outline-1",children:x.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-w-full richtext-max-h-full",children:[!(t!=null&&t.hideToolbar)&&x.jsx(bG,{editor:a,disabled:!!(t!=null&&t.disabled)}),x.jsx(MF,{className:`richtext-relative ${(t==null?void 0:t.contentClass)||""}`,editor:a}),c&&x.jsx(gG,{editor:a,extensions:n}),!(t!=null&&t.hideBubble)&&x.jsx(k9,{bubbleMenu:t==null?void 0:t.bubbleMenu,editor:a,disabled:t==null?void 0:t.disabled})]})})})}):x.jsx(x.Fragment,{})}const vG=J.forwardRef(yG);function bG({editor:t,disabled:e}){const{t:r,lang:n}=Et(),i=J.useMemo(()=>{const s=[...t.extensionManager.extensions].sort((l,c)=>{const d=l.options.sort??-1,f=c.options.sort??-1;return d-f});let a=[];for(const l of s){const{button:c,divider:d=!1,spacer:f=!1,toolbar:p=!0}=l.options;if(!c||!D7(c)||!p)continue;const m=c({editor:t,extension:l,t:r});if(Array.isArray(m)){const g=m.map((b,S)=>({button:b,divider:S===m.length-1?d:!1,spacer:S===0?f:!1}));a=[...a,...g];continue}a.push({button:m,divider:d,spacer:f})}return a},[t,r,n]);return x.jsx("div",{className:"richtext-px-1 richtext-py-2 !richtext-border-b",style:{pointerEvents:e?"none":"auto",opacity:e?.5:1},children:x.jsx("div",{className:"richtext-relative richtext-flex richtext-flex-wrap richtext-h-auto richtext-gap-y-1 richtext-gap-x-1",children:i.map((o,s)=>{var l,c;const a=o.button.component;return x.jsxs("div",{className:"richtext-flex richtext-items-center",children:[(o==null?void 0:o.spacer)&&x.jsx(Bi,{orientation:"vertical",className:"!richtext-h-[16px] !richtext-mx-[10px]"}),x.jsx(a,{...o.button.componentProps,disabled:e||((c=(l=o==null?void 0:o.button)==null?void 0:l.componentProps)==null?void 0:c.disabled)}),(o==null?void 0:o.divider)&&x.jsx(Bi,{orientation:"vertical",className:"!richtext-h-auto !richtext-mx-2"})]},`toolbar-item-${s}`)})})})}function wG(t){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t,children:x.jsx("path",{fill:"currentColor",d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H3V5h18z"})})}function xG(t){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t,children:x.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 15h15m0 4H6m9-8h6m0-4h-6M9 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2M3 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2"})})}function SG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5.5 3c1.404 0 2.107 0 2.611.38c.219.164.406.375.552.62C9 4.568 9 5.358 9 6.938v10.125c0 1.58 0 2.37-.337 2.937a2.1 2.1 0 0 1-.552.621c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C2 19.432 2 18.642 2 17.062V6.938c0-1.58 0-2.37.337-2.938a2.1 2.1 0 0 1 .552-.62C3.393 3 4.096 3 5.5 3M20 11.938v5.124c0 1.58 0 2.37-.337 2.938a2.1 2.1 0 0 1-.552.62c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C13 19.433 13 18.642 13 17.063V6.938c0-1.58 0-2.37.337-2.938M22 9l-6-6m6 0l-6 6",color:"currentColor"})})}function kG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M21 18.5c0 1.404 0 2.107-.38 2.611a2.1 2.1 0 0 1-.62.552c-.567.337-1.358.337-2.937.337H6.938c-1.58 0-2.37 0-2.938-.337a2.1 2.1 0 0 1-.62-.552C3 20.607 3 19.904 3 18.5s0-2.107.38-2.611c.163-.218.374-.406.62-.552C4.567 15 5.357 15 6.938 15h10.125c1.58 0 2.37 0 2.937.337c.246.146.457.334.62.552c.38.504.38 1.207.38 2.611M12.063 4H6.937C5.358 4 4.568 4 4 4.337a2.1 2.1 0 0 0-.62.552C3 5.393 3 6.096 3 7.5s0 2.107.38 2.611c.163.218.374.406.62.552C4.567 11 5.357 11 6.938 11h10.125c1.58 0 2.37 0 2.937-.337M21 8l-6-6m6 0l-6 6",color:"currentColor"})})}function _G(t){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t,children:x.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}function Rt(t){const e=Yh[t.name];return e?x.jsx(e,{onClick:t==null?void 0:t.onClick,className:`richtext-w-4 richtext-h-4 ${(t==null?void 0:t.className)||""}`}):null}function EG(t){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t,children:x.jsx("path",{fill:"currentColor",d:"M21 22H3v-2h18zm0-18H3V2h18zm-11 9.7h4l-2-5.4zM11.2 6h1.7l4.7 12h-2l-.9-2.6H9.4L8.5 18h-2z"})})}function IN(t){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 48 48",...t,children:x.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function CG(t){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t,children:x.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function TG(t){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t,children:x.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function AG(t){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t,children:x.jsx("path",{fill:"currentColor",d:"M11 7c-1.1 0-2 .9-2 2v2a2 2 0 0 0 2 2h2v2H9v2h4c1.11 0 2-.89 2-2v-2a2 2 0 0 0-2-2h-2V9h4V7z"})})}function RG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}function ON(){return x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[x.jsx("path",{fill:"currentColor",d:"M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"}),x.jsx("path",{fill:"currentColor",d:"M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"})]})}function MN(){return x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[x.jsx("path",{fill:"currentColor",d:"M679.253 402.364 618.77 561.015l-60.348-158.651a30.04 30.04 0 0 0-30.447-18.637 29.76 29.76 0 0 0-30.447 18.637l-60.416 158.651-60.416-158.651a30.515 30.515 0 0 0-38.843-17.272 28.945 28.945 0 0 0-17.954 37.547l88.815 233.267c4.369 11.469 15.7 19.115 28.398 19.115a30.31 30.31 0 0 0 28.468-19.115l62.395-163.908 62.396 163.84c4.437 11.605 15.701 19.183 28.4 19.183a30.31 30.31 0 0 0 28.466-19.115l88.747-233.267a28.945 28.945 0 0 0-17.886-37.547 30.447 30.447 0 0 0-38.912 17.272zm219.478 395.605-51.883-29.218c-28.672-16.18-52.224-3.072-52.224 29.082v.273H643.209a29.833 29.833 0 0 0-30.31 29.354c0 16.18 13.584 29.218 30.31 29.218h151.825c1.092 30.516 24.03 43.077 52.224 27.648l51.063-27.989c29.013-15.906 29.15-42.189.41-58.368"}),x.jsx("path",{fill:"currentColor",d:"m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"})]})}function IG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4"})})}function OG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4"})})}function MG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905"})})}function NG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z"})})}function DG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:x.jsx("path",{fill:"currentColor",d:"M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z"})})}function PG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:x.jsx("path",{fill:"currentColor",d:"M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z"})})}function LG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[x.jsx("path",{d:"M14.86 22h-4.312c-3.291 0-4.937 0-6.08-.798a4.2 4.2 0 0 1-.863-.805c-.855-1.066-.855-2.6-.855-5.67v-2.545c0-2.963 0-4.445.473-5.628c.761-1.903 2.37-3.403 4.41-4.113C8.9 2 10.49 2 13.667 2c1.816 0 2.723 0 3.448.252c1.166.406 2.085 1.263 2.52 2.35c.27.676.27 1.523.27 3.216V10"}),x.jsx("path",{d:"M2.75 12c0-1.84 1.506-3.333 3.364-3.333c.672 0 1.464.116 2.117-.057a1.67 1.67 0 0 0 1.19-1.179c.174-.647.057-1.432.057-2.098C9.478 3.493 10.984 2 12.84 2m.002 16h2.523m-4.949-4.15c-.126-.8-.281-.801-1.61-.85h-1.01c-.557 0-1.009.448-1.009 1v3c0 .552.452 1 1.01 1h1.816c.39 0 .803-.313.803-.7v-1.1c0-.11-.113-.304-.224-.304H9.068M12.842 13h1.261m0 0h1.262m-1.262 0v4.875M21.251 13h-2.523c-.557 0-1.009.448-1.009 1v1.5m0 0V18m0-2.5h2.523"})]})})}function FG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:x.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[x.jsx("circle",{cx:"10",cy:"24",r:"4"}),x.jsx("circle",{cx:"38",cy:"10",r:"4"}),x.jsx("circle",{cx:"38",cy:"24",r:"4"}),x.jsx("circle",{cx:"38",cy:"38",r:"4"}),x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function jG(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548",color:"currentColor"})})}const Yh={Bold:He.Bold,LoaderCircle:He.LoaderCircle,Italic:He.Italic,Underline:He.Underline,Quote:He.Quote,TextQuote:xG,Strikethrough:He.Strikethrough,Minus:He.Minus,Eraser:He.Eraser,PaintRoller:He.PaintRoller,Redo2:He.Redo2,Undo2:He.Undo2,AlignCenter:Hp.TextAlignCenterIcon,AlignJustify:Hp.TextAlignJustifyIcon,AlignLeft:Hp.TextAlignLeftIcon,AlignRight:Hp.TextAlignRightIcon,ChevronDown:He.ChevronDown,Subscript:He.Subscript,Superscript:He.Superscript,Code:He.Code,Code2:He.CodeXml,Type:He.Type,IndentIncrease:He.IndentIncrease,IndentDecrease:He.IndentDecrease,List:He.List,ListOrdered:He.ListOrdered,ListTodo:He.ListTodo,Link:He.Link,ImageUp:He.ImageUp,Video:He.Video,Maximize:He.Maximize,Minimize:He.Minimize,Table:He.Table,Sparkles:He.Sparkles,Pencil:He.Pencil,Unlink:He.Unlink,BetweenHorizonalEnd:He.BetweenHorizonalEnd,BetweenHorizonalStart:He.BetweenHorizonalStart,BetweenVerticalStart:He.BetweenVerticalStart,BetweenVerticalEnd:He.BetweenVerticalEnd,TableCellsMerge:He.TableCellsMerge,TableCellsSplit:He.TableCellsSplit,Trash2:He.Trash2,Trash:He.Trash,Replace:He.Replace,ChevronsUpDown:He.ChevronsUpDown,LineHeight:EG,Word:_G,Heading1:He.Heading1,Heading2:He.Heading2,Heading3:He.Heading3,Heading4:He.Heading4,Heading5:He.Heading5,Heading6:He.Heading6,Columns2:He.Columns2,Columns3:He.Columns3,Columns4:He.Columns4,Plus:He.Plus,Grip:He.GripVertical,Copy:He.Copy,Clipboard:He.Clipboard,PanelLeft:He.PanelLeft,PanelRight:He.PanelRight,Columns:He.Columns2,Iframe:He.Frame,MenuDown:IN,SizeS:AG,SizeM:TG,SizeL:CG,AspectRatio:wG,Emoji:He.SmilePlus,DeleteColumn:SG,DeleteRow:kG,SearchAndReplace:He.Replace,EmojiIcon:He.SmilePlusIcon,KatexIcon:He.Sigma,ExportPdf:ON,ExportWord:MN,ImportWord:RG,ColumnAddLeft:IG,ColumnAddRight:OG,BookMarked:He.BookMarked,Excalidraw:MG,ZoomIn:He.ZoomIn,ZoomOut:He.ZoomOut,Settings:He.Settings,Eye:He.Eye,TextDirection:NG,LeftToRight:DG,RightToLeft:PG,Attachment:He.Paperclip,GifIcon:LG,ChevronUp:He.ChevronUp,Crop:He.CropIcon,Mermaid:FG,Twitter:jG,FlipX:He.FlipVertical,FlipY:He.FlipHorizontal};function BG(t){const e=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return e.map((n,i)=>({type:`image-${n}`,component:Ve,componentProps:{tooltip:Ot.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>t.commands.updateImage({width:kh[n]}),isActive:()=>t.isActive("image",{width:kh[n]})}}))}function zG(t){const e=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return e.map((n,i)=>({type:`image-${n}`,component:Ve,componentProps:{tooltip:Ot.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>t.commands.updateImageGif({width:kh[n]}),isActive:()=>t.isActive("image",{width:kh[n]})}}))}function HG(t){const e=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return e.map(n=>({type:`image-${n}`,component:Ve,componentProps:{tooltip:Ot.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=t.commands)==null?void 0:i.setAlignImage)==null?void 0:o.call(i,n)},isActive:()=>t.isActive({align:n})||!1,disabled:!1}}))}function $G(t){const e=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return e.map(n=>({type:`image-${n}`,component:Ve,componentProps:{tooltip:Ot.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=t.commands)==null?void 0:i.setAlignImageGif)==null?void 0:o.call(i,n)},isActive:()=>t.isActive({align:n})||!1,disabled:!1}}))}function UG(t){const e=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return e.map(n=>({type:`image-${n}`,component:Ve,componentProps:{tooltip:Ot.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=t.commands)==null?void 0:i.setAlignImageMermaid)==null?void 0:o.call(i,n)},isActive:()=>t.isActive({align:n})||!1,disabled:!1}}))}function WG(t){const e=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return e.map((n,i)=>({type:`video-${n}`,component:Ve,componentProps:{tooltip:Ot.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>t.commands.updateVideo({width:Og[n]}),isActive:()=>t.isActive("video",{width:Og[n]})}}))}function VG(t){return[{type:"flipX",component:Ve,componentProps:{editor:t,tooltip:Ot.t("editor.tooltip.flipX"),icon:"FlipX",action:()=>{const e=t.getAttributes("image"),{flipX:r}=e;t.chain().focus(void 0,{scrollIntoView:!1}).updateImage({flipX:!r}).run()}}},{type:"flipY",component:Ve,componentProps:{editor:t,tooltip:Ot.t("editor.tooltip.flipY"),icon:"FlipY",action:()=>{const e=t.getAttributes("image"),{flipY:r}=e;t.chain().focus(void 0,{scrollIntoView:!1}).updateImage({flipY:!r}).run()}}},...BG(t),...HG(t),{type:"remove",component:Ve,componentProps:{editor:t,tooltip:Ot.t("editor.remove"),icon:"Trash2",action:()=>{const{state:e,dispatch:r}=t.view;Uh(e,r)}}}]}function GG(t){return[...zG(t),...$G(t),{type:"remove",component:Ve,componentProps:{editor:t,tooltip:Ot.t("editor.remove"),icon:"Trash2",action:()=>{const{state:e,dispatch:r}=t.view;Uh(e,r)}}}]}function KG(t){return[...UG(t),{type:"edit",component:Ve,componentProps:{editor:t,tooltip:Ot.t("editor.edit"),icon:"Pencil",action:()=>{}}},{type:"remove",component:Ve,componentProps:{editor:t,tooltip:Ot.t("editor.remove"),icon:"Trash2",action:()=>{const{state:e,dispatch:r}=t.view;Uh(e,r)}}}]}function qG(t){return[...WG(t),{type:"remove",component:Ve,componentProps:{editor:t,tooltip:Ot.t("editor.remove"),icon:"Trash2",action:()=>{const{state:e,dispatch:r}=t.view;Uh(e,r)}}}]}function XG(t,e){return x7.reduce((r,n)=>{if(n==="divider"&&r.length>0)return[...r,{type:"divider",component:void 0,componentProps:{}}];const i=t.extensionManager.extensions.find(o=>o.name===n);return i?[...r,i.configure().options.button({editor:t,t:e,extension:i})]:r},[])}const go=()=>new Map,Hx=t=>{const e=go();return t.forEach((r,n)=>{e.set(n,r)}),e},Ed=(t,e,r)=>{let n=t.get(e);return n===void 0&&t.set(e,n=r()),n},YG=(t,e)=>{const r=[];for(const[n,i]of t)r.push(e(i,n));return r},JG=(t,e)=>{for(const[r,n]of t)if(e(n,r))return!0;return!1},od=()=>new Set,fw=t=>t[t.length-1],sd=Array.from,ZG=Array.isArray;class QG{constructor(){this._observers=go()}on(e,r){return Ed(this._observers,e,od).add(r),r}once(e,r){const n=(...i)=>{this.off(e,n),r(...i)};this.on(e,n)}off(e,r){const n=this._observers.get(e);n!==void 0&&(n.delete(r),n.size===0&&this._observers.delete(e))}emit(e,r){return sd((this._observers.get(e)||go()).values()).forEach(n=>n(...r))}destroy(){this._observers=go()}}const Yl=Math.floor,Wm=Math.abs,NN=(t,e)=>t<e?t:e,Cd=(t,e)=>t>e?t:e,eK=t=>t!==0?t<0:1/t<0,GC=1,KC=2,hw=4,pw=8,tK=32,DN=64,Fg=128,rK=31,qC=63,sh=127,nK=2147483647,iK=Number.isInteger||(t=>typeof t=="number"&&isFinite(t)&&Yl(t)===t),oK=t=>t.toLowerCase(),sK=/^\s*/g,aK=t=>t.replace(sK,""),lK=/([A-Z])/g,XC=(t,e)=>aK(t.replace(lK,r=>`${e}${oK(r)}`)),cK=t=>{const e=unescape(encodeURIComponent(t)),r=e.length,n=new Uint8Array(r);for(let i=0;i<r;i++)n[i]=e.codePointAt(i);return n},Th=typeof TextEncoder<"u"?new TextEncoder:null,uK=t=>Th.encode(t),dK=Th?uK:cK;let mw=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});mw&&mw.decode(new Uint8Array).length===1&&(mw=null);class Jh{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const RS=()=>new Jh,fK=t=>{let e=t.cpos;for(let r=0;r<t.bufs.length;r++)e+=t.bufs[r].length;return e},ns=t=>{const e=new Uint8Array(fK(t));let r=0;for(let n=0;n<t.bufs.length;n++){const i=t.bufs[n];e.set(i,r),r+=i.length}return e.set(new Uint8Array(t.cbuf.buffer,0,t.cpos),r),e},hK=(t,e)=>{const r=t.cbuf.length;r-t.cpos<e&&(t.bufs.push(new Uint8Array(t.cbuf.buffer,0,t.cpos)),t.cbuf=new Uint8Array(Cd(r,e)*2),t.cpos=0)},Sr=(t,e)=>{const r=t.cbuf.length;t.cpos===r&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(r*2),t.cpos=0),t.cbuf[t.cpos++]=e},$x=Sr,Ht=(t,e)=>{for(;e>sh;)Sr(t,Fg|sh&e),e=Yl(e/128);Sr(t,sh&e)},IS=(t,e)=>{const r=eK(e);for(r&&(e=-e),Sr(t,(e>qC?Fg:0)|(r?DN:0)|qC&e),e=Yl(e/64);e>0;)Sr(t,(e>sh?Fg:0)|sh&e),e=Yl(e/128)},Ux=new Uint8Array(3e4),pK=Ux.length/3,mK=(t,e)=>{if(e.length<pK){const r=Th.encodeInto(e,Ux).written||0;Ht(t,r);for(let n=0;n<r;n++)Sr(t,Ux[n])}else Hn(t,dK(e))},gK=(t,e)=>{const r=unescape(encodeURIComponent(e)),n=r.length;Ht(t,n);for(let i=0;i<n;i++)Sr(t,r.codePointAt(i))},Hu=Th&&Th.encodeInto?mK:gK,OS=(t,e)=>{const r=t.cbuf.length,n=t.cpos,i=NN(r-n,e.length),o=e.length-i;t.cbuf.set(e.subarray(0,i),n),t.cpos+=i,o>0&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(Cd(r*2,o)),t.cbuf.set(e.subarray(i)),t.cpos=o)},Hn=(t,e)=>{Ht(t,e.byteLength),OS(t,e)},MS=(t,e)=>{hK(t,e);const r=new DataView(t.cbuf.buffer,t.cpos,e);return t.cpos+=e,r},yK=(t,e)=>MS(t,4).setFloat32(0,e,!1),vK=(t,e)=>MS(t,8).setFloat64(0,e,!1),bK=(t,e)=>MS(t,8).setBigInt64(0,e,!1),YC=new DataView(new ArrayBuffer(4)),wK=t=>(YC.setFloat32(0,t),YC.getFloat32(0)===t),Ah=(t,e)=>{switch(typeof e){case"string":Sr(t,119),Hu(t,e);break;case"number":iK(e)&&Wm(e)<=nK?(Sr(t,125),IS(t,e)):wK(e)?(Sr(t,124),yK(t,e)):(Sr(t,123),vK(t,e));break;case"bigint":Sr(t,122),bK(t,e);break;case"object":if(e===null)Sr(t,126);else if(ZG(e)){Sr(t,117),Ht(t,e.length);for(let r=0;r<e.length;r++)Ah(t,e[r])}else if(e instanceof Uint8Array)Sr(t,116),Hn(t,e);else{Sr(t,118);const r=Object.keys(e);Ht(t,r.length);for(let n=0;n<r.length;n++){const i=r[n];Hu(t,i),Ah(t,e[i])}}break;case"boolean":Sr(t,e?120:121);break;default:Sr(t,127)}};class JC extends Jh{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&Ht(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const ZC=t=>{t.count>0&&(IS(t.encoder,t.count===1?t.s:-t.s),t.count>1&&Ht(t.encoder,t.count-2))};class Vm{constructor(){this.encoder=new Jh,this.s=0,this.count=0}write(e){this.s===e?this.count++:(ZC(this),this.count=1,this.s=e)}toUint8Array(){return ZC(this),ns(this.encoder)}}const QC=t=>{if(t.count>0){const e=t.diff*2+(t.count===1?0:1);IS(t.encoder,e),t.count>1&&Ht(t.encoder,t.count-2)}};class gw{constructor(){this.encoder=new Jh,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(QC(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return QC(this),ns(this.encoder)}}class xK{constructor(){this.sarr=[],this.s="",this.lensE=new Vm}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 Jh;return this.sarr.push(this.s),this.s="",Hu(e,this.sarr.join("")),OS(e,this.lensE.toUint8Array()),ns(e)}}const ad=t=>new Error(t),yo=()=>{throw ad("Method unimplemented")},Sa=()=>{throw ad("Unexpected case")},SK=crypto.getRandomValues.bind(crypto),PN=()=>SK(new Uint32Array(1))[0],kK="10000000-1000-4000-8000"+-1e11,_K=()=>kK.replace(/[018]/g,t=>(t^PN()&15>>t/4).toString(16)),eT=t=>new Promise(t);Promise.all.bind(Promise);const tT=t=>t===void 0?null:t;class EK{constructor(){this.map=new Map}setItem(e,r){this.map.set(e,r)}getItem(e){return this.map.get(e)}}let LN=new EK,CK=!0;try{typeof localStorage<"u"&&localStorage&&(LN=localStorage,CK=!1)}catch{}const TK=LN,AK=Object.assign,RK=Object.keys,IK=(t,e)=>{for(const r in t)e(t[r],r)},rT=t=>RK(t).length,OK=t=>{for(const e in t)return!1;return!0},MK=(t,e)=>{for(const r in t)if(!e(t[r],r))return!1;return!0},NK=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),DK=(t,e)=>t===e||rT(t)===rT(e)&&MK(t,(r,n)=>(r!==void 0||NK(e,n))&&e[n]===r),PK=Object.freeze,FN=t=>{for(const e in t){const r=t[e];(typeof r=="object"||typeof r=="function")&&FN(t[e])}return PK(t)},NS=(t,e,r=0)=>{try{for(;r<t.length;r++)t[r](...e)}finally{r<t.length&&NS(t,e,r+1)}},LK=(t,e)=>e.includes(t),Rh=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";let io;const FK=()=>{if(io===void 0)if(Rh){io=go();const t=process.argv;let e=null;for(let r=0;r<t.length;r++){const n=t[r];n[0]==="-"?(e!==null&&io.set(e,""),e=n):e!==null&&(io.set(e,n),e=null)}e!==null&&io.set(e,"")}else typeof location=="object"?(io=go(),(location.search||"?").slice(1).split("&").forEach(t=>{if(t.length!==0){const[e,r]=t.split("=");io.set(`--${XC(e,"-")}`,r),io.set(`-${XC(e,"-")}`,r)}})):io=go();return io},Wx=t=>FK().has(t),jg=t=>tT(Rh?process.env[t.toUpperCase().replaceAll("-","_")]:TK.getItem(t)),jN=t=>Wx("--"+t)||jg(t)!==null;jN("production");const jK=Rh&&LK(process.env.FORCE_COLOR,["true","1","2"]),BK=jK||!Wx("--no-colors")&&!jN("no-color")&&(!Rh||process.stdout.isTTY)&&(!Rh||Wx("--color")||jg("COLORTERM")!==null||(jg("TERM")||"").includes("color"));class zK{constructor(e,r){this.left=e,this.right=r}}const Yo=(t,e)=>new zK(t,e);typeof DOMParser<"u"&&new DOMParser;const HK=t=>YG(t,(e,r)=>`${r}:${e};`).join(""),ys=Symbol,BN=ys(),zN=ys(),$K=ys(),UK=ys(),WK=ys(),HN=ys(),VK=ys(),DS=ys(),GK=ys(),KK=t=>{var i;t.length===1&&((i=t[0])==null?void 0:i.constructor)===Function&&(t=t[0]());const e=[],r=[];let n=0;for(;n<t.length;n++){const o=t[n];if(o===void 0)break;if(o.constructor===String||o.constructor===Number)e.push(o);else if(o.constructor===Object)break}for(n>0&&r.push(e.join(""));n<t.length;n++){const o=t[n];o instanceof Symbol||r.push(o)}return r},qK={[BN]:Yo("font-weight","bold"),[zN]:Yo("font-weight","normal"),[$K]:Yo("color","blue"),[WK]:Yo("color","green"),[UK]:Yo("color","grey"),[HN]:Yo("color","red"),[VK]:Yo("color","purple"),[DS]:Yo("color","orange"),[GK]:Yo("color","black")},XK=t=>{var s;t.length===1&&((s=t[0])==null?void 0:s.constructor)===Function&&(t=t[0]());const e=[],r=[],n=go();let i=[],o=0;for(;o<t.length;o++){const a=t[o],l=qK[a];if(l!==void 0)n.set(l.left,l.right);else{if(a===void 0)break;if(a.constructor===String||a.constructor===Number){const c=HK(n);o>0||c.length>0?(e.push("%c"+a),r.push(c)):e.push(a)}else break}}for(o>0&&(i=r,i.unshift(e.join("")));o<t.length;o++){const a=t[o];a instanceof Symbol||i.push(a)}return i},$N=BK?XK:KK,YK=(...t)=>{console.log(...$N(t)),UN.forEach(e=>e.print(t))},JK=(...t)=>{console.warn(...$N(t)),t.unshift(DS),UN.forEach(e=>e.print(t))},UN=od(),WN=t=>({[Symbol.iterator](){return this},next:t}),ZK=(t,e)=>WN(()=>{let r;do r=t.next();while(!r.done&&!e(r.value));return r}),yw=(t,e)=>WN(()=>{const{done:r,value:n}=t.next();return{done:r,value:r?void 0:e(n)}});class QK{constructor(e,r){this.clock=e,this.len=r}}class eq{constructor(){this.clients=new Map}}const VN=(t,e,r)=>e.clients.forEach((n,i)=>{const o=t.doc.store.clients.get(i);for(let s=0;s<n.length;s++){const a=n[s];ZN(t,o,a.clock,a.len,r)}}),tq=(t,e)=>{let r=0,n=t.length-1;for(;r<=n;){const i=Yl((r+n)/2),o=t[i],s=o.clock;if(s<=e){if(e<s+o.len)return i;r=i+1}else n=i-1}return null},GN=(t,e)=>{const r=t.clients.get(e.client);return r!==void 0&&tq(r,e.clock)!==null},KN=t=>{t.clients.forEach(e=>{e.sort((i,o)=>i.clock-o.clock);let r,n;for(r=1,n=1;r<e.length;r++){const i=e[n-1],o=e[r];i.clock+i.len>=o.clock?i.len=Cd(i.len,o.clock+o.len-i.clock):(n<r&&(e[n]=o),n++)}e.length=n})},qN=(t,e,r,n)=>{Ed(t.clients,e,()=>[]).push(new QK(r,n))},rq=(t,e)=>{Ht(t.restEncoder,e.clients.size),sd(e.clients.entries()).sort((r,n)=>n[0]-r[0]).forEach(([r,n])=>{t.resetDsCurVal(),Ht(t.restEncoder,r);const i=n.length;Ht(t.restEncoder,i);for(let o=0;o<i;o++){const s=n[o];t.writeDsClock(s.clock),t.writeDsLen(s.len)}})},XN=PN;class Zh extends QG{constructor({guid:e=_K(),collectionid:r=null,gc:n=!0,gcFilter:i=()=>!0,meta:o=null,autoLoad:s=!1,shouldLoad:a=!0}={}){super(),this.gc=n,this.gcFilter=i,this.clientID=XN(),this.guid=e,this.collectionid=r,this.share=new Map,this.store=new dq,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=eT(c=>{this.on("load",()=>{this.isLoaded=!0,c(this)})});const l=()=>eT(c=>{const d=f=>{(f===void 0||f===!0)&&(this.off("sync",d),c())};this.on("sync",d)});this.on("sync",c=>{c===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=c===void 0||c===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const e=this._item;e!==null&&!this.shouldLoad&&Xt(e.parent.doc,r=>{r.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(sd(this.subdocs).map(e=>e.guid))}transact(e,r=null){return Xt(this,e,r)}get(e,r=zr){const n=Ed(this.share,e,()=>{const o=new r;return o._integrate(this,null),o}),i=n.constructor;if(r!==zr&&i!==r)if(i===zr){const o=new r;o._map=n._map,n._map.forEach(s=>{for(;s!==null;s=s.left)s.parent=o}),o._start=n._start;for(let s=o._start;s!==null;s=s.right)s.parent=o;return o._length=n._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 n}getArray(e=""){return this.get(e,ah)}getText(e=""){return this.get(e,Nh)}getMap(e=""){return this.get(e,$g)}getXmlElement(e=""){return this.get(e,Dh)}getXmlFragment(e=""){return this.get(e,ld)}toJSON(){const e={};return this.share.forEach((r,n)=>{e[n]=r.toJSON()}),e}destroy(){this.isDestroyed=!0,sd(this.subdocs).forEach(r=>r.destroy());const e=this._item;if(e!==null){this._item=null;const r=e.content;r.doc=new Zh({guid:this.guid,...r.opts,shouldLoad:!1}),r.doc._item=e,Xt(e.parent.doc,n=>{const i=r.doc;e.deleted||n.subdocsAdded.add(i),n.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class nq{constructor(){this.restEncoder=RS()}toUint8Array(){return ns(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){Ht(this.restEncoder,e)}writeDsLen(e){Ht(this.restEncoder,e)}}class iq extends nq{writeLeftID(e){Ht(this.restEncoder,e.client),Ht(this.restEncoder,e.clock)}writeRightID(e){Ht(this.restEncoder,e.client),Ht(this.restEncoder,e.clock)}writeClient(e){Ht(this.restEncoder,e)}writeInfo(e){$x(this.restEncoder,e)}writeString(e){Hu(this.restEncoder,e)}writeParentInfo(e){Ht(this.restEncoder,e?1:0)}writeTypeRef(e){Ht(this.restEncoder,e)}writeLen(e){Ht(this.restEncoder,e)}writeAny(e){Ah(this.restEncoder,e)}writeBuf(e){Hn(this.restEncoder,e)}writeJSON(e){Hu(this.restEncoder,JSON.stringify(e))}writeKey(e){Hu(this.restEncoder,e)}}class oq{constructor(){this.restEncoder=RS(),this.dsCurrVal=0}toUint8Array(){return ns(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){const r=e-this.dsCurrVal;this.dsCurrVal=e,Ht(this.restEncoder,r)}writeDsLen(e){e===0&&Sa(),Ht(this.restEncoder,e-1),this.dsCurrVal+=e}}class sq extends oq{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new gw,this.clientEncoder=new Vm,this.leftClockEncoder=new gw,this.rightClockEncoder=new gw,this.infoEncoder=new JC($x),this.stringEncoder=new xK,this.parentInfoEncoder=new JC($x),this.typeRefEncoder=new Vm,this.lenEncoder=new Vm}toUint8Array(){const e=RS();return Ht(e,0),Hn(e,this.keyClockEncoder.toUint8Array()),Hn(e,this.clientEncoder.toUint8Array()),Hn(e,this.leftClockEncoder.toUint8Array()),Hn(e,this.rightClockEncoder.toUint8Array()),Hn(e,ns(this.infoEncoder)),Hn(e,this.stringEncoder.toUint8Array()),Hn(e,ns(this.parentInfoEncoder)),Hn(e,this.typeRefEncoder.toUint8Array()),Hn(e,this.lenEncoder.toUint8Array()),OS(e,ns(this.restEncoder)),ns(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){Ah(this.restEncoder,e)}writeBuf(e){Hn(this.restEncoder,e)}writeJSON(e){Ah(this.restEncoder,e)}writeKey(e){const r=this.keyMap.get(e);r===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(r)}}const aq=(t,e,r,n)=>{n=Cd(n,e[0].id.clock);const i=fs(e,n);Ht(t.restEncoder,e.length-i),t.writeClient(r),Ht(t.restEncoder,n);const o=e[i];o.write(t,n-o.id.clock);for(let s=i+1;s<e.length;s++)e[s].write(t,0)},lq=(t,e,r)=>{const n=new Map;r.forEach((i,o)=>{In(e,o)>i&&n.set(o,i)}),PS(e).forEach((i,o)=>{r.has(o)||n.set(o,0)}),Ht(t.restEncoder,n.size),sd(n.entries()).sort((i,o)=>o[0]-i[0]).forEach(([i,o])=>{aq(t,e.clients.get(i),i,o)})},cq=(t,e)=>lq(t,e.doc.store,e.beforeState);class uq{constructor(){this.l=[]}}const nT=()=>new uq,iT=(t,e)=>t.l.push(e),oT=(t,e)=>{const r=t.l,n=r.length;t.l=r.filter(i=>e!==i),n===t.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},YN=(t,e,r)=>NS(t.l,[e,r]);class Gm{constructor(e,r){this.client=e,this.clock=r}}const rm=(t,e)=>t===e||t!==null&&e!==null&&t.client===e.client&&t.clock===e.clock,Yt=(t,e)=>new Gm(t,e),Ih=t=>{for(const[e,r]of t.doc.share.entries())if(r===t)return e;throw Sa()};class Bg{constructor(e,r,n,i=0){this.type=e,this.tname=r,this.item=n,this.assoc=i}}const nm=(t,e,r)=>{let n=null,i=null;return t._item===null?i=Ih(t):n=Yt(t._item.id.client,t._item.id.clock),new Bg(n,i,e,r)},vw=(t,e,r=0)=>{let n=t._start;if(r<0){if(e===0)return nm(t,null,r);e--}for(;n!==null;){if(!n.deleted&&n.countable){if(n.length>e)return nm(t,Yt(n.id.client,n.id.clock+e),r);e-=n.length}if(n.right===null&&r<0)return nm(t,n.lastId,r);n=n.right}return nm(t,null,r)},Tu=(t,e)=>e===void 0?!t.deleted:e.sv.has(t.id.client)&&(e.sv.get(t.id.client)||0)>t.id.clock&&!GN(e.ds,t.id),Vx=(t,e)=>{const r=Ed(t.meta,Vx,od),n=t.doc.store;r.has(e)||(e.sv.forEach((i,o)=>{i<In(n,o)&&ka(t,Yt(o,i))}),VN(t,e.ds,i=>{}),r.add(e))};class dq{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const PS=t=>{const e=new Map;return t.clients.forEach((r,n)=>{const i=r[r.length-1];e.set(n,i.id.clock+i.length)}),e},In=(t,e)=>{const r=t.clients.get(e);if(r===void 0)return 0;const n=r[r.length-1];return n.id.clock+n.length},JN=(t,e)=>{let r=t.clients.get(e.id.client);if(r===void 0)r=[],t.clients.set(e.id.client,r);else{const n=r[r.length-1];if(n.id.clock+n.length!==e.id.clock)throw Sa()}r.push(e)},fs=(t,e)=>{let r=0,n=t.length-1,i=t[n],o=i.id.clock;if(o===e)return n;let s=Yl(e/(o+i.length-1)*n);for(;r<=n;){if(i=t[s],o=i.id.clock,o<=e){if(e<o+i.length)return s;r=s+1}else n=s-1;s=Yl((r+n)/2)}throw Sa()},fq=(t,e)=>{const r=t.clients.get(e.client);return r[fs(r,e.clock)]},bw=fq,Gx=(t,e,r)=>{const n=fs(e,r),i=e[n];return i.id.clock<r&&i instanceof Vn?(e.splice(n+1,0,gD(t,i,r-i.id.clock)),n+1):n},ka=(t,e)=>{const r=t.doc.store.clients.get(e.client);return r[Gx(t,r,e.clock)]},sT=(t,e,r)=>{const n=e.clients.get(r.client),i=fs(n,r.clock),o=n[i];return r.clock!==o.id.clock+o.length-1&&o.constructor!==aa&&n.splice(i+1,0,gD(t,o,r.clock-o.id.clock+1)),o},hq=(t,e,r)=>{const n=t.clients.get(e.id.client);n[fs(n,e.id.clock)]=r},ZN=(t,e,r,n,i)=>{if(n===0)return;const o=r+n;let s=Gx(t,e,r),a;do a=e[s++],o<a.id.clock+a.length&&Gx(t,e,o),i(a);while(s<e.length&&e[s].id.clock<o)};class pq{constructor(e,r,n){this.doc=e,this.deleteSet=new eq,this.beforeState=PS(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=r,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}const aT=(t,e)=>e.deleteSet.clients.size===0&&!JG(e.afterState,(r,n)=>e.beforeState.get(n)!==r)?!1:(KN(e.deleteSet),cq(t,e),rq(t,e.deleteSet),!0),lT=(t,e,r)=>{const n=e._item;(n===null||n.id.clock<(t.beforeState.get(n.id.client)||0)&&!n.deleted)&&Ed(t.changed,e,od).add(r)},Km=(t,e)=>{let r=t[e],n=t[e-1],i=e;for(;i>0;r=n,n=t[--i-1]){if(n.deleted===r.deleted&&n.constructor===r.constructor&&n.mergeWith(r)){r instanceof Vn&&r.parentSub!==null&&r.parent._map.get(r.parentSub)===r&&r.parent._map.set(r.parentSub,n);continue}break}const o=e-i;return o&&t.splice(e+1-o,o),o},mq=(t,e,r)=>{for(const[n,i]of t.clients.entries()){const o=e.clients.get(n);for(let s=i.length-1;s>=0;s--){const a=i[s],l=a.clock+a.len;for(let c=fs(o,a.clock),d=o[c];c<o.length&&d.id.clock<l;d=o[++c]){const f=o[c];if(a.clock+a.len<=f.id.clock)break;f instanceof Vn&&f.deleted&&!f.keep&&r(f)&&f.gc(e,!1)}}}},gq=(t,e)=>{t.clients.forEach((r,n)=>{const i=e.clients.get(n);for(let o=r.length-1;o>=0;o--){const s=r[o],a=NN(i.length-1,1+fs(i,s.clock+s.len-1));for(let l=a,c=i[l];l>0&&c.id.clock>=s.clock;c=i[l])l-=1+Km(i,l)}})},QN=(t,e)=>{if(e<t.length){const r=t[e],n=r.doc,i=n.store,o=r.deleteSet,s=r._mergeStructs;try{KN(o),r.afterState=PS(r.doc.store),n.emit("beforeObserverCalls",[r,n]);const a=[];r.changed.forEach((l,c)=>a.push(()=>{(c._item===null||!c._item.deleted)&&c._callObserver(r,l)})),a.push(()=>{r.changedParentTypes.forEach((l,c)=>{c._dEH.l.length>0&&(c._item===null||!c._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=c,d._path=null}),l.sort((d,f)=>d.path.length-f.path.length),YN(c._dEH,l,r))})}),a.push(()=>n.emit("afterTransaction",[r,n])),NS(a,[]),r._needFormattingCleanup&&Aq(r)}finally{n.gc&&mq(o,i,n.gcFilter),gq(o,i),r.afterState.forEach((d,f)=>{const p=r.beforeState.get(f)||0;if(p!==d){const m=i.clients.get(f),g=Cd(fs(m,p),1);for(let b=m.length-1;b>=g;)b-=1+Km(m,b)}});for(let d=s.length-1;d>=0;d--){const{client:f,clock:p}=s[d].id,m=i.clients.get(f),g=fs(m,p);g+1<m.length&&Km(m,g+1)>1||g>0&&Km(m,g)}if(!r.local&&r.afterState.get(n.clientID)!==r.beforeState.get(n.clientID)&&(YK(DS,BN,"[yjs] ",zN,HN,"Changed the client-id because another client seems to be using it."),n.clientID=XN()),n.emit("afterTransactionCleanup",[r,n]),n._observers.has("update")){const d=new iq;aT(d,r)&&n.emit("update",[d.toUint8Array(),r.origin,n,r])}if(n._observers.has("updateV2")){const d=new sq;aT(d,r)&&n.emit("updateV2",[d.toUint8Array(),r.origin,n,r])}const{subdocsAdded:a,subdocsLoaded:l,subdocsRemoved:c}=r;(a.size>0||c.size>0||l.size>0)&&(a.forEach(d=>{d.clientID=n.clientID,d.collectionid==null&&(d.collectionid=n.collectionid),n.subdocs.add(d)}),c.forEach(d=>n.subdocs.delete(d)),n.emit("subdocs",[{loaded:l,added:a,removed:c},n,r]),c.forEach(d=>d.destroy())),t.length<=e+1?(n._transactionCleanups=[],n.emit("afterAllTransactions",[n,t])):QN(t,e+1)}}},Xt=(t,e,r=null,n=!0)=>{const i=t._transactionCleanups;let o=!1,s=null;t._transaction===null&&(o=!0,t._transaction=new pq(t,r,n),i.push(t._transaction),i.length===1&&t.emit("beforeAllTransactions",[t]),t.emit("beforeTransaction",[t._transaction,t]));try{s=e(t._transaction)}finally{if(o){const a=t._transaction===i[0];t._transaction=null,a&&QN(i,0)}}return s},cT="You must not compute changes after the event-handler fired.";class rv{constructor(e,r){this.target=e,this.currentTarget=e,this.transaction=r,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=yq(this.currentTarget,this.target))}deletes(e){return GN(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw ad(cT);const e=new Map,r=this.target;this.transaction.changed.get(r).forEach(i=>{if(i!==null){const o=r._map.get(i);let s,a;if(this.adds(o)){let l=o.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(o))if(l!==null&&this.deletes(l))s="delete",a=fw(l.content.getContent());else return;else l!==null&&this.deletes(l)?(s="update",a=fw(l.content.getContent())):(s="add",a=void 0)}else if(this.deletes(o))s="delete",a=fw(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 ad(cT);const r=this.target,n=od(),i=od(),o=[];if(e={added:n,deleted:i,delta:o,keys:this.keys},this.transaction.changed.get(r).has(null)){let a=null;const l=()=>{a&&o.push(a)};for(let c=r._start;c!==null;c=c.right)c.deleted?this.deletes(c)&&!this.adds(c)&&((a===null||a.delete===void 0)&&(l(),a={delete:0}),a.delete+=c.length,i.add(c)):this.adds(c)?((a===null||a.insert===void 0)&&(l(),a={insert:[]}),a.insert=a.insert.concat(c.content.getContent()),n.add(c)):((a===null||a.retain===void 0)&&(l(),a={retain:0}),a.retain+=c.length);a!==null&&a.retain===void 0&&l()}this._changes=e}return e}}const yq=(t,e)=>{const r=[];for(;e._item!==null&&e!==t;){if(e._item.parentSub!==null)r.unshift(e._item.parentSub);else{let n=0,i=e._item.parent._start;for(;i!==e._item&&i!==null;)!i.deleted&&i.countable&&(n+=i.length),i=i.right;r.unshift(n)}e=e._item.parent}return r},Kr=()=>{JK("Invalid access: Add Yjs type to a document before reading data.")},eD=80;let LS=0;class vq{constructor(e,r){e.marker=!0,this.p=e,this.index=r,this.timestamp=LS++}}const bq=t=>{t.timestamp=LS++},tD=(t,e,r)=>{t.p.marker=!1,t.p=e,e.marker=!0,t.index=r,t.timestamp=LS++},wq=(t,e,r)=>{if(t.length>=eD){const n=t.reduce((i,o)=>i.timestamp<o.timestamp?i:o);return tD(n,e,r),n}else{const n=new vq(e,r);return t.push(n),n}},nv=(t,e)=>{if(t._start===null||e===0||t._searchMarker===null)return null;const r=t._searchMarker.length===0?null:t._searchMarker.reduce((o,s)=>Wm(e-o.index)<Wm(e-s.index)?o:s);let n=t._start,i=0;for(r!==null&&(n=r.p,i=r.index,bq(r));n.right!==null&&i<e;){if(!n.deleted&&n.countable){if(e<i+n.length)break;i+=n.length}n=n.right}for(;n.left!==null&&i>e;)n=n.left,!n.deleted&&n.countable&&(i-=n.length);for(;n.left!==null&&n.left.id.client===n.id.client&&n.left.id.clock+n.left.length===n.id.clock;)n=n.left,!n.deleted&&n.countable&&(i-=n.length);return r!==null&&Wm(r.index-i)<n.parent.length/eD?(tD(r,n,i),r):wq(t._searchMarker,n,i)},Oh=(t,e,r)=>{for(let n=t.length-1;n>=0;n--){const i=t[n];if(r>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){t.splice(n,1);continue}i.p=o,o.marker=!0}(e<i.index||r>0&&e===i.index)&&(i.index=Cd(e,i.index+r))}},iv=(t,e,r)=>{const n=t,i=e.changedParentTypes;for(;Ed(i,t,()=>[]).push(r),t._item!==null;)t=t._item.parent;YN(n._eH,r,e)};class zr{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=nT(),this._dEH=nT(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,r){this.doc=e,this._item=r}_copy(){throw yo()}clone(){throw yo()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,r){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){iT(this._eH,e)}observeDeep(e){iT(this._dEH,e)}unobserve(e){oT(this._eH,e)}unobserveDeep(e){oT(this._dEH,e)}toJSON(){}}const rD=(t,e,r)=>{t.doc??Kr(),e<0&&(e=t._length+e),r<0&&(r=t._length+r);let n=r-e;const i=[];let o=t._start;for(;o!==null&&n>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&&n>0;a++)i.push(s[a]),n--;e=0}}o=o.right}return i},nD=t=>{t.doc??Kr();const e=[];let r=t._start;for(;r!==null;){if(r.countable&&!r.deleted){const n=r.content.getContent();for(let i=0;i<n.length;i++)e.push(n[i])}r=r.right}return e},Mh=(t,e)=>{let r=0,n=t._start;for(t.doc??Kr();n!==null;){if(n.countable&&!n.deleted){const i=n.content.getContent();for(let o=0;o<i.length;o++)e(i[o],r++,t)}n=n.right}},iD=(t,e)=>{const r=[];return Mh(t,(n,i)=>{r.push(e(n,i,t))}),r},xq=t=>{let e=t._start,r=null,n=0;return{[Symbol.iterator](){return this},next:()=>{if(r===null){for(;e!==null&&e.deleted;)e=e.right;if(e===null)return{done:!0,value:void 0};r=e.content.getContent(),n=0,e=e.right}const i=r[n++];return r.length<=n&&(r=null),{done:!1,value:i}}}},oD=(t,e)=>{t.doc??Kr();const r=nv(t,e);let n=t._start;for(r!==null&&(n=r.p,e-=r.index);n!==null;n=n.right)if(!n.deleted&&n.countable){if(e<n.length)return n.content.getContent()[e];e-=n.length}},zg=(t,e,r,n)=>{let i=r;const o=t.doc,s=o.clientID,a=o.store,l=r===null?e._start:r.right;let c=[];const d=()=>{c.length>0&&(i=new Vn(Yt(s,In(a,s)),i,i&&i.lastId,l,l&&l.id,e,null,new cd(c)),i.integrate(t,0),c=[])};n.forEach(f=>{if(f===null)c.push(f);else switch(f.constructor){case Number:case Object:case Boolean:case Array:case String:c.push(f);break;default:switch(d(),f.constructor){case Uint8Array:case ArrayBuffer:i=new Vn(Yt(s,In(a,s)),i,i&&i.lastId,l,l&&l.id,e,null,new ov(new Uint8Array(f))),i.integrate(t,0);break;case Zh:i=new Vn(Yt(s,In(a,s)),i,i&&i.lastId,l,l&&l.id,e,null,new sv(f)),i.integrate(t,0);break;default:if(f instanceof zr)i=new Vn(Yt(s,In(a,s)),i,i&&i.lastId,l,l&&l.id,e,null,new Pa(f)),i.integrate(t,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},sD=()=>ad("Length exceeded!"),aD=(t,e,r,n)=>{if(r>e._length)throw sD();if(r===0)return e._searchMarker&&Oh(e._searchMarker,r,n.length),zg(t,e,null,n);const i=r,o=nv(e,r);let s=e._start;for(o!==null&&(s=o.p,r-=o.index,r===0&&(s=s.prev,r+=s&&s.countable&&!s.deleted?s.length:0));s!==null;s=s.right)if(!s.deleted&&s.countable){if(r<=s.length){r<s.length&&ka(t,Yt(s.id.client,s.id.clock+r));break}r-=s.length}return e._searchMarker&&Oh(e._searchMarker,i,n.length),zg(t,e,s,n)},Sq=(t,e,r)=>{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 zg(t,e,i,r)},lD=(t,e,r,n)=>{if(n===0)return;const i=r,o=n,s=nv(e,r);let a=e._start;for(s!==null&&(a=s.p,r-=s.index);a!==null&&r>0;a=a.right)!a.deleted&&a.countable&&(r<a.length&&ka(t,Yt(a.id.client,a.id.clock+r)),r-=a.length);for(;n>0&&a!==null;)a.deleted||(n<a.length&&ka(t,Yt(a.id.client,a.id.clock+n)),a.delete(t),n-=a.length),a=a.right;if(n>0)throw sD();e._searchMarker&&Oh(e._searchMarker,i,-o+n)},Hg=(t,e,r)=>{const n=e._map.get(r);n!==void 0&&n.delete(t)},FS=(t,e,r,n)=>{const i=e._map.get(r)||null,o=t.doc,s=o.clientID;let a;if(n==null)a=new cd([n]);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:a=new cd([n]);break;case Uint8Array:a=new ov(n);break;case Zh:a=new sv(n);break;default:if(n instanceof zr)a=new Pa(n);else throw new Error("Unexpected content type")}new Vn(Yt(s,In(o.store,s)),i,i&&i.lastId,null,null,e,r,a).integrate(t,0)},jS=(t,e)=>{t.doc??Kr();const r=t._map.get(e);return r!==void 0&&!r.deleted?r.content.getContent()[r.length-1]:void 0},cD=t=>{const e={};return t.doc??Kr(),t._map.forEach((r,n)=>{r.deleted||(e[n]=r.content.getContent()[r.length-1])}),e},uD=(t,e)=>{t.doc??Kr();const r=t._map.get(e);return r!==void 0&&!r.deleted},kq=(t,e)=>{const r={};return t._map.forEach((n,i)=>{let o=n;for(;o!==null&&(!e.sv.has(o.id.client)||o.id.clock>=(e.sv.get(o.id.client)||0));)o=o.left;o!==null&&Tu(o,e)&&(r[i]=o.content.getContent()[o.length-1])}),r},im=t=>(t.doc??Kr(),ZK(t._map.entries(),e=>!e[1].deleted));class _q extends rv{}class ah extends zr{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){const r=new ah;return r.push(e),r}_integrate(e,r){super._integrate(e,r),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new ah}clone(){const e=new ah;return e.insert(0,this.toArray().map(r=>r instanceof zr?r.clone():r)),e}get length(){return this.doc??Kr(),this._length}_callObserver(e,r){super._callObserver(e,r),iv(this,e,new _q(this,e))}insert(e,r){this.doc!==null?Xt(this.doc,n=>{aD(n,this,e,r)}):this._prelimContent.splice(e,0,...r)}push(e){this.doc!==null?Xt(this.doc,r=>{Sq(r,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,r=1){this.doc!==null?Xt(this.doc,n=>{lD(n,this,e,r)}):this._prelimContent.splice(e,r)}get(e){return oD(this,e)}toArray(){return nD(this)}slice(e=0,r=this.length){return rD(this,e,r)}toJSON(){return this.map(e=>e instanceof zr?e.toJSON():e)}map(e){return iD(this,e)}forEach(e){Mh(this,e)}[Symbol.iterator](){return xq(this)}_write(e){e.writeTypeRef(Dq)}}class Eq extends rv{constructor(e,r,n){super(e,r),this.keysChanged=n}}class $g extends zr{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,r){super._integrate(e,r),this._prelimContent.forEach((n,i)=>{this.set(i,n)}),this._prelimContent=null}_copy(){return new $g}clone(){const e=new $g;return this.forEach((r,n)=>{e.set(n,r instanceof zr?r.clone():r)}),e}_callObserver(e,r){iv(this,e,new Eq(this,e,r))}toJSON(){this.doc??Kr();const e={};return this._map.forEach((r,n)=>{if(!r.deleted){const i=r.content.getContent()[r.length-1];e[n]=i instanceof zr?i.toJSON():i}}),e}get size(){return[...im(this)].length}keys(){return yw(im(this),e=>e[0])}values(){return yw(im(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return yw(im(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??Kr(),this._map.forEach((r,n)=>{r.deleted||e(r.content.getContent()[r.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc!==null?Xt(this.doc,r=>{Hg(r,this,e)}):this._prelimContent.delete(e)}set(e,r){return this.doc!==null?Xt(this.doc,n=>{FS(n,this,e,r)}):this._prelimContent.set(e,r),r}get(e){return jS(this,e)}has(e){return uD(this,e)}clear(){this.doc!==null?Xt(this.doc,e=>{this.forEach(function(r,n,i){Hg(e,i,n)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(Pq)}}const pa=(t,e)=>t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&DK(t,e);class Kx{constructor(e,r,n,i){this.left=e,this.right=r,this.index=n,this.currentAttributes=i}forward(){switch(this.right===null&&Sa(),this.right.content.constructor){case Tr:this.right.deleted||Td(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 uT=(t,e,r)=>{for(;e.right!==null&&r>0;){switch(e.right.content.constructor){case Tr:e.right.deleted||Td(e.currentAttributes,e.right.content);break;default:e.right.deleted||(r<e.right.length&&ka(t,Yt(e.right.id.client,e.right.id.clock+r)),e.index+=e.right.length,r-=e.right.length);break}e.left=e.right,e.right=e.right.right}return e},om=(t,e,r,n)=>{const i=new Map,o=n?nv(e,r):null;if(o){const s=new Kx(o.p.left,o.p,o.index,i);return uT(t,s,r-o.index)}else{const s=new Kx(null,e._start,0,i);return uT(t,s,r)}},dD=(t,e,r,n)=>{for(;r.right!==null&&(r.right.deleted===!0||r.right.content.constructor===Tr&&pa(n.get(r.right.content.key),r.right.content.value));)r.right.deleted||n.delete(r.right.content.key),r.forward();const i=t.doc,o=i.clientID;n.forEach((s,a)=>{const l=r.left,c=r.right,d=new Vn(Yt(o,In(i.store,o)),l,l&&l.lastId,c,c&&c.id,e,null,new Tr(a,s));d.integrate(t,0),r.right=d,r.forward()})},Td=(t,e)=>{const{key:r,value:n}=e;n===null?t.delete(r):t.set(r,n)},fD=(t,e)=>{for(;t.right!==null;){if(!(t.right.deleted||t.right.content.constructor===Tr&&pa(e[t.right.content.key]??null,t.right.content.value)))break;t.forward()}},hD=(t,e,r,n)=>{const i=t.doc,o=i.clientID,s=new Map;for(const a in n){const l=n[a],c=r.currentAttributes.get(a)??null;if(!pa(c,l)){s.set(a,c);const{left:d,right:f}=r;r.right=new Vn(Yt(o,In(i.store,o)),d,d&&d.lastId,f,f&&f.id,e,null,new Tr(a,l)),r.right.integrate(t,0),r.forward()}}return s},ww=(t,e,r,n,i)=>{r.currentAttributes.forEach((p,m)=>{i[m]===void 0&&(i[m]=null)});const o=t.doc,s=o.clientID;fD(r,i);const a=hD(t,e,r,i),l=n.constructor===String?new hs(n):n instanceof zr?new Pa(n):new Ad(n);let{left:c,right:d,index:f}=r;e._searchMarker&&Oh(e._searchMarker,r.index,l.getLength()),d=new Vn(Yt(s,In(o.store,s)),c,c&&c.lastId,d,d&&d.id,e,null,l),d.integrate(t,0),r.right=d,r.index=f,r.forward(),dD(t,e,r,a)},dT=(t,e,r,n,i)=>{const o=t.doc,s=o.clientID;fD(r,i);const a=hD(t,e,r,i);e:for(;r.right!==null&&(n>0||a.size>0&&(r.right.deleted||r.right.content.constructor===Tr));){if(!r.right.deleted)switch(r.right.content.constructor){case Tr:{const{key:l,value:c}=r.right.content,d=i[l];if(d!==void 0){if(pa(d,c))a.delete(l);else{if(n===0)break e;a.set(l,c)}r.right.delete(t)}else r.currentAttributes.set(l,c);break}default:n<r.right.length&&ka(t,Yt(r.right.id.client,r.right.id.clock+n)),n-=r.right.length;break}r.forward()}if(n>0){let l="";for(;n>0;n--)l+=`
262
+ `;r.right=new Vn(Yt(s,In(o.store,s)),r.left,r.left&&r.left.lastId,r.right,r.right&&r.right.id,e,null,new hs(l)),r.right.integrate(t,0),r.forward()}dD(t,e,r,a)},pD=(t,e,r,n,i)=>{let o=e;const s=go();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===Tr){const c=o.content;s.set(c.key,c)}o=o.right}let a=0,l=!1;for(;e!==o;){if(r===e&&(l=!0),!e.deleted){const c=e.content;switch(c.constructor){case Tr:{const{key:d,value:f}=c,p=n.get(d)??null;(s.get(d)!==c||p===f)&&(e.delete(t),a++,!l&&(i.get(d)??null)===f&&p!==f&&(p===null?i.delete(d):i.set(d,p))),!l&&!e.deleted&&Td(i,c);break}}}e=e.right}return a},Cq=(t,e)=>{for(;e&&e.right&&(e.right.deleted||!e.right.countable);)e=e.right;const r=new Set;for(;e&&(e.deleted||!e.countable);){if(!e.deleted&&e.content.constructor===Tr){const n=e.content.key;r.has(n)?e.delete(t):r.add(n)}e=e.left}},Tq=t=>{let e=0;return Xt(t.doc,r=>{let n=t._start,i=t._start,o=go();const s=Hx(o);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case Tr:Td(s,i.content);break;default:e+=pD(r,n,i,o,s),o=Hx(s),n=i;break}i=i.right}}),e},Aq=t=>{const e=new Set,r=t.doc;for(const[n,i]of t.afterState.entries()){const o=t.beforeState.get(n)||0;i!==o&&ZN(t,r.store.clients.get(n),o,i,s=>{!s.deleted&&s.content.constructor===Tr&&s.constructor!==aa&&e.add(s.parent)})}Xt(r,n=>{VN(t,t.deleteSet,i=>{if(i instanceof aa||!i.parent._hasFormatting||e.has(i.parent))return;const o=i.parent;i.content.constructor===Tr?e.add(o):Cq(n,i)});for(const i of e)Tq(i)})},fT=(t,e,r)=>{const n=r,i=Hx(e.currentAttributes),o=e.right;for(;r>0&&e.right!==null;){if(e.right.deleted===!1)switch(e.right.content.constructor){case Pa:case Ad:case hs:r<e.right.length&&ka(t,Yt(e.right.id.client,e.right.id.clock+r)),r-=e.right.length,e.right.delete(t);break}e.forward()}o&&pD(t,o,e.right,i,e.currentAttributes);const s=(e.left||e.right).parent;return s._searchMarker&&Oh(s._searchMarker,e.index,-n+r),e};class Rq extends rv{constructor(e,r,n){super(e,r),this.childListChanged=!1,this.keysChanged=new Set,n.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,r=[];Xt(e,n=>{const i=new Map,o=new Map;let s=this.target._start,a=null;const l={};let c="",d=0,f=0;const p=()=>{if(a!==null){let m=null;switch(a){case"delete":f>0&&(m={delete:f}),f=0;break;case"insert":(typeof c=="object"||c.length>0)&&(m={insert:c},i.size>0&&(m.attributes={},i.forEach((g,b)=>{g!==null&&(m.attributes[b]=g)}))),c="";break;case"retain":d>0&&(m={retain:d},OK(l)||(m.attributes=AK({},l))),d=0;break}m&&r.push(m),a=null}};for(;s!==null;){switch(s.content.constructor){case Pa:case Ad:this.adds(s)?this.deletes(s)||(p(),a="insert",c=s.content.getContent()[0],p()):this.deletes(s)?(a!=="delete"&&(p(),a="delete"),f+=1):s.deleted||(a!=="retain"&&(p(),a="retain"),d+=1);break;case hs:this.adds(s)?this.deletes(s)||(a!=="insert"&&(p(),a="insert"),c+=s.content.str):this.deletes(s)?(a!=="delete"&&(p(),a="delete"),f+=s.length):s.deleted||(a!=="retain"&&(p(),a="retain"),d+=s.length);break;case Tr:{const{key:m,value:g}=s.content;if(this.adds(s)){if(!this.deletes(s)){const b=i.get(m)??null;pa(b,g)?g!==null&&s.delete(n):(a==="retain"&&p(),pa(g,o.get(m)??null)?delete l[m]:l[m]=g)}}else if(this.deletes(s)){o.set(m,g);const b=i.get(m)??null;pa(b,g)||(a==="retain"&&p(),l[m]=b)}else if(!s.deleted){o.set(m,g);const b=l[m];b!==void 0&&(pa(b,g)?b!==null&&s.delete(n):(a==="retain"&&p(),g===null?delete l[m]:l[m]=g))}s.deleted||(a==="insert"&&p(),Td(i,s.content));break}}s=s.right}for(p();r.length>0;){const m=r[r.length-1];if(m.retain!==void 0&&m.attributes===void 0)r.pop();else break}}),this._delta=r}return this._delta}}class Nh extends zr{constructor(e){super(),this._pending=e!==void 0?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Kr(),this._length}_integrate(e,r){super._integrate(e,r);try{this._pending.forEach(n=>n())}catch(n){console.error(n)}this._pending=null}_copy(){return new Nh}clone(){const e=new Nh;return e.applyDelta(this.toDelta()),e}_callObserver(e,r){super._callObserver(e,r);const n=new Rq(this,e,r);iv(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??Kr();let e="",r=this._start;for(;r!==null;)!r.deleted&&r.countable&&r.content.constructor===hs&&(e+=r.content.str),r=r.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:r=!0}={}){this.doc!==null?Xt(this.doc,n=>{const i=new Kx(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=!r&&typeof s.insert=="string"&&o===e.length-1&&i.right===null&&s.insert.slice(-1)===`
263
+ `?s.insert.slice(0,-1):s.insert;(typeof a!="string"||a.length>0)&&ww(n,this,i,a,s.attributes||{})}else s.retain!==void 0?dT(n,this,i,s.retain,s.attributes||{}):s.delete!==void 0&&fT(n,i,s.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,r,n){this.doc??Kr();const i=[],o=new Map,s=this.doc;let a="",l=this._start;function c(){if(a.length>0){const f={};let p=!1;o.forEach((g,b)=>{p=!0,f[b]=g});const m={insert:a};p&&(m.attributes=f),i.push(m),a=""}}const d=()=>{for(;l!==null;){if(Tu(l,e)||r!==void 0&&Tu(l,r))switch(l.content.constructor){case hs:{const f=o.get("ychange");e!==void 0&&!Tu(l,e)?(f===void 0||f.user!==l.id.client||f.type!=="removed")&&(c(),o.set("ychange",n?n("removed",l.id):{type:"removed"})):r!==void 0&&!Tu(l,r)?(f===void 0||f.user!==l.id.client||f.type!=="added")&&(c(),o.set("ychange",n?n("added",l.id):{type:"added"})):f!==void 0&&(c(),o.delete("ychange")),a+=l.content.str;break}case Pa:case Ad:{c();const f={insert:l.content.getContent()[0]};if(o.size>0){const p={};f.attributes=p,o.forEach((m,g)=>{p[g]=m})}i.push(f);break}case Tr:Tu(l,e)&&(c(),Td(o,l.content));break}l=l.right}c()};return e||r?Xt(s,f=>{e&&Vx(f,e),r&&Vx(f,r),d()},"cleanup"):d(),i}insert(e,r,n){if(r.length<=0)return;const i=this.doc;i!==null?Xt(i,o=>{const s=om(o,this,e,!n);n||(n={},s.currentAttributes.forEach((a,l)=>{n[l]=a})),ww(o,this,s,r,n)}):this._pending.push(()=>this.insert(e,r,n))}insertEmbed(e,r,n){const i=this.doc;i!==null?Xt(i,o=>{const s=om(o,this,e,!n);ww(o,this,s,r,n||{})}):this._pending.push(()=>this.insertEmbed(e,r,n||{}))}delete(e,r){if(r===0)return;const n=this.doc;n!==null?Xt(n,i=>{fT(i,om(i,this,e,!0),r)}):this._pending.push(()=>this.delete(e,r))}format(e,r,n){if(r===0)return;const i=this.doc;i!==null?Xt(i,o=>{const s=om(o,this,e,!1);s.right!==null&&dT(o,this,s,r,n)}):this._pending.push(()=>this.format(e,r,n))}removeAttribute(e){this.doc!==null?Xt(this.doc,r=>{Hg(r,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,r){this.doc!==null?Xt(this.doc,n=>{FS(n,this,e,r)}):this._pending.push(()=>this.setAttribute(e,r))}getAttribute(e){return jS(this,e)}getAttributes(){return cD(this)}_write(e){e.writeTypeRef(Lq)}}class xw{constructor(e,r=()=>!0){this._filter=r,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??Kr()}[Symbol.iterator](){return this}next(){let e=this._currentNode,r=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(r)))do if(r=e.content.type,!e.deleted&&(r.constructor===Dh||r.constructor===ld)&&r._start!==null)e=r._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 ld extends zr{constructor(){super(),this._prelimContent=[]}get firstChild(){const e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,r){super._integrate(e,r),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new ld}clone(){const e=new ld;return e.insert(0,this.toArray().map(r=>r instanceof zr?r.clone():r)),e}get length(){return this.doc??Kr(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new xw(this,e)}querySelector(e){e=e.toUpperCase();const n=new xw(this,i=>i.nodeName&&i.nodeName.toUpperCase()===e).next();return n.done?null:n.value}querySelectorAll(e){return e=e.toUpperCase(),sd(new xw(this,r=>r.nodeName&&r.nodeName.toUpperCase()===e))}_callObserver(e,r){iv(this,e,new Iq(this,r,e))}toString(){return iD(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,r={},n){const i=e.createDocumentFragment();return n!==void 0&&n._createAssociation(i,this),Mh(this,o=>{i.insertBefore(o.toDOM(e,r,n),null)}),i}insert(e,r){this.doc!==null?Xt(this.doc,n=>{aD(n,this,e,r)}):this._prelimContent.splice(e,0,...r)}insertAfter(e,r){if(this.doc!==null)Xt(this.doc,n=>{const i=e&&e instanceof zr?e._item:e;zg(n,this,i,r)});else{const n=this._prelimContent,i=e===null?0:n.findIndex(o=>o===e)+1;if(i===0&&e!==null)throw ad("Reference item not found");n.splice(i,0,...r)}}delete(e,r=1){this.doc!==null?Xt(this.doc,n=>{lD(n,this,e,r)}):this._prelimContent.splice(e,r)}toArray(){return nD(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return oD(this,e)}slice(e=0,r=this.length){return rD(this,e,r)}forEach(e){Mh(this,e)}_write(e){e.writeTypeRef(jq)}}class Dh extends ld{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,r){super._integrate(e,r),this._prelimAttrs.forEach((n,i)=>{this.setAttribute(i,n)}),this._prelimAttrs=null}_copy(){return new Dh(this.nodeName)}clone(){const e=new Dh(this.nodeName),r=this.getAttributes();return IK(r,(n,i)=>{typeof n=="string"&&e.setAttribute(i,n)}),e.insert(0,this.toArray().map(n=>n instanceof zr?n.clone():n)),e}toString(){const e=this.getAttributes(),r=[],n=[];for(const a in e)n.push(a);n.sort();const i=n.length;for(let a=0;a<i;a++){const l=n[a];r.push(l+'="'+e[l]+'"')}const o=this.nodeName.toLocaleLowerCase(),s=r.length>0?" "+r.join(" "):"";return`<${o}${s}>${super.toString()}</${o}>`}removeAttribute(e){this.doc!==null?Xt(this.doc,r=>{Hg(r,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,r){this.doc!==null?Xt(this.doc,n=>{FS(n,this,e,r)}):this._prelimAttrs.set(e,r)}getAttribute(e){return jS(this,e)}hasAttribute(e){return uD(this,e)}getAttributes(e){return e?kq(this,e):cD(this)}toDOM(e=document,r={},n){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 Mh(this,s=>{i.appendChild(s.toDOM(e,r,n))}),n!==void 0&&n._createAssociation(i,this),i}_write(e){e.writeTypeRef(Fq),e.writeKey(this.nodeName)}}class Iq extends rv{constructor(e,r,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,r.forEach(i=>{i===null?this.childListChanged=!0:this.attributesChanged.add(i)})}}class Ph extends Nh{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 Ph}clone(){const e=new Ph;return e.applyDelta(this.toDelta()),e}toDOM(e=document,r,n){const i=e.createTextNode(this.toString());return n!==void 0&&n._createAssociation(i,this),i}toString(){return this.toDelta().map(e=>{const r=[];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),r.push({nodeName:i,attrs:o})}r.sort((i,o)=>i.nodeName<o.nodeName?-1:1);let n="";for(let i=0;i<r.length;i++){const o=r[i];n+=`<${o.nodeName}`;for(let s=0;s<o.attrs.length;s++){const a=o.attrs[s];n+=` ${a.key}="${a.value}"`}n+=">"}n+=e.insert;for(let i=r.length-1;i>=0;i--)n+=`</${r[i].nodeName}>`;return n}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(Bq)}}class mD{constructor(e,r){this.id=e,this.length=r}get deleted(){throw yo()}mergeWith(e){return!1}write(e,r,n){throw yo()}integrate(e,r){throw yo()}}const Oq=0;class aa extends mD{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,r){r>0&&(this.id.clock+=r,this.length-=r),JN(e.doc.store,this)}write(e,r){e.writeInfo(Oq),e.writeLen(this.length-r)}getMissing(e,r){return null}}class ov{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new ov(this.content)}splice(e){throw yo()}mergeWith(e){return!1}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeBuf(this.content)}getRef(){return 3}}class Ug{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new Ug(this.len)}splice(e){const r=new Ug(this.len-e);return this.len=e,r}mergeWith(e){return this.len+=e.len,!0}integrate(e,r){qN(e.deleteSet,r.id.client,r.id.clock,this.len),r.markDeleted()}delete(e){}gc(e){}write(e,r){e.writeLen(this.len-r)}getRef(){return 1}}const Mq=(t,e)=>new Zh({guid:t,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1});class sv{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 r={};this.opts=r,e.gc||(r.gc=!1),e.autoLoad&&(r.autoLoad=!0),e.meta!==null&&(r.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new sv(Mq(this.doc.guid,this.opts))}splice(e){throw yo()}mergeWith(e){return!1}integrate(e,r){this.doc._item=r,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,r){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}class Ad{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Ad(this.embed)}splice(e){throw yo()}mergeWith(e){return!1}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeJSON(this.embed)}getRef(){return 5}}class Tr{constructor(e,r){this.key=e,this.value=r}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new Tr(this.key,this.value)}splice(e){throw yo()}mergeWith(e){return!1}integrate(e,r){const n=r.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,r){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}const Nq=jg("node_env")==="development";class cd{constructor(e){this.arr=e,Nq&&FN(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new cd(this.arr)}splice(e){const r=new cd(this.arr.slice(e));return this.arr=this.arr.slice(0,e),r}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,r){}delete(e){}gc(e){}write(e,r){const n=this.arr.length;e.writeLen(n-r);for(let i=r;i<n;i++){const o=this.arr[i];e.writeAny(o)}}getRef(){return 8}}class hs{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new hs(this.str)}splice(e){const r=new hs(this.str.slice(e));this.str=this.str.slice(0,e);const n=this.str.charCodeAt(e-1);return n>=55296&&n<=56319&&(this.str=this.str.slice(0,e-1)+"�",r.str="�"+r.str.slice(1)),r}mergeWith(e){return this.str+=e.str,!0}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeString(r===0?this.str:this.str.slice(r))}getRef(){return 4}}const Dq=0,Pq=1,Lq=2,Fq=3,jq=4,Bq=6;class Pa{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Pa(this.type._copy())}splice(e){throw yo()}mergeWith(e){return!1}integrate(e,r){this.type._integrate(e.doc,r)}delete(e){let r=this.type._start;for(;r!==null;)r.deleted?r.id.clock<(e.beforeState.get(r.id.client)||0)&&e._mergeStructs.push(r):r.delete(e),r=r.right;this.type._map.forEach(n=>{n.deleted?n.id.clock<(e.beforeState.get(n.id.client)||0)&&e._mergeStructs.push(n):n.delete(e)}),e.changed.delete(this.type)}gc(e){let r=this.type._start;for(;r!==null;)r.gc(e,!0),r=r.right;this.type._start=null,this.type._map.forEach(n=>{for(;n!==null;)n.gc(e,!0),n=n.left}),this.type._map=new Map}write(e,r){this.type._write(e)}getRef(){return 7}}const gD=(t,e,r)=>{const{client:n,clock:i}=e.id,o=new Vn(Yt(n,i+r),e,Yt(n,i+r-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(r));return e.deleted&&o.markDeleted(),e.keep&&(o.keep=!0),e.redone!==null&&(o.redone=Yt(e.redone.client,e.redone.clock+r)),e.right=o,o.right!==null&&(o.right.left=o),t._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),e.length=r,o};let Vn=class qx extends mD{constructor(e,r,n,i,o,s,a,l){super(e,l.getLength()),this.origin=n,this.left=r,this.right=i,this.rightOrigin=o,this.parent=s,this.parentSub=a,this.redone=null,this.content=l,this.info=this.content.isCountable()?KC:0}set marker(e){(this.info&pw)>0!==e&&(this.info^=pw)}get marker(){return(this.info&pw)>0}get keep(){return(this.info&GC)>0}set keep(e){this.keep!==e&&(this.info^=GC)}get countable(){return(this.info&KC)>0}get deleted(){return(this.info&hw)>0}set deleted(e){this.deleted!==e&&(this.info^=hw)}markDeleted(){this.info|=hw}getMissing(e,r){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=In(r,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=In(r,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Gm&&this.id.client!==this.parent.client&&this.parent.clock>=In(r,this.parent.client))return this.parent.client;if(this.origin&&(this.left=sT(e,r,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=ka(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===aa||this.right&&this.right.constructor===aa)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===qx&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===qx&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Gm){const n=bw(r,this.parent);n.constructor===aa?this.parent=null:this.parent=n.content.type}return null}integrate(e,r){if(r>0&&(this.id.clock+=r,this.left=sT(e,e.doc.store,Yt(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(r),this.length-=r),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let n=this.left,i;if(n!==null)i=n.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),rm(this.origin,i.origin)){if(i.id.client<this.id.client)n=i,o.clear();else if(rm(this.rightOrigin,i.rightOrigin))break}else if(i.origin!==null&&s.has(bw(e.doc.store,i.origin)))o.has(bw(e.doc.store,i.origin))||(n=i,o.clear());else break;i=i.right}this.left=n}if(this.left!==null){const n=this.left.right;this.right=n,this.left.right=this}else{let n;if(this.parentSub!==null)for(n=this.parent._map.get(this.parentSub)||null;n!==null&&n.left!==null;)n=n.left;else n=this.parent._start,this.parent._start=this;this.right=n}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),JN(e.doc.store,this),this.content.integrate(e,this),lT(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new aa(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:Yt(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&rm(e.origin,this.lastId)&&this.right===e&&rm(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 r=this.parent._searchMarker;return r&&r.forEach(n=>{n.p===e&&(n.p=this,!this.deleted&&this.countable&&(n.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 r=this.parent;this.countable&&this.parentSub===null&&(r._length-=this.length),this.markDeleted(),qN(e.deleteSet,this.id.client,this.id.clock,this.length),lT(e,r,this.parentSub),this.content.delete(e)}}gc(e,r){if(!this.deleted)throw Sa();this.content.gc(e),r?hq(e,this,new aa(this.id,this.length)):this.content=new Ug(this.length)}write(e,r){const n=r>0?Yt(this.id.client,this.id.clock+r-1):this.origin,i=this.rightOrigin,o=this.parentSub,s=this.content.getRef()&rK|(n===null?0:Fg)|(i===null?0:DN)|(o===null?0:tK);if(e.writeInfo(s),n!==null&&e.writeLeftID(n),i!==null&&e.writeRightID(i),n===null&&i===null){const a=this.parent;if(a._item!==void 0){const l=a._item;if(l===null){const c=Ih(a);e.writeParentInfo(!0),e.writeString(c)}else e.writeParentInfo(!1),e.writeLeftID(l.id)}else a.constructor===String?(e.writeParentInfo(!0),e.writeString(a)):a.constructor===Gm?(e.writeParentInfo(!1),e.writeLeftID(a)):Sa();o!==null&&e.writeString(o)}this.content.write(e,r)}};const yD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},vD="__ $YJS$ __";yD[vD]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");yD[vD]=!0;const zq=new St("y-sync");new St("y-undo");new St("yjs-cursor");const Hq=(t,e,r)=>{if(t===0)return vw(e,0,-1);let n=e._first===null?null:e._first.content.type;for(;n!==null&&e!==n;){if(n instanceof Ph){if(n._length>=t)return vw(n,t,-1);if(t-=n._length,n._item!==null&&n._item.next!==null)n=n._item.next.content.type;else{do n=n._item===null?null:n._item.parent,t--;while(n!==e&&n!==null&&n._item!==null&&n._item.next===null);n!==null&&n!==e&&(n=n._item===null?null:n._item.next.content.type)}}else{const i=(r.get(n)||{nodeSize:0}).nodeSize;if(n._first!==null&&t<i)n=n._first.content.type,t--;else{if(t===1&&n._length===0&&i>1)return new Bg(n._item===null?null:n._item.id,n._item===null?Ih(n):null,null);if(t-=i,n._item!==null&&n._item.next!==null)n=n._item.next.content.type;else{if(t===0)return n=n._item===null?n:n._item.parent,new Bg(n._item===null?null:n._item.id,n._item===null?Ih(n):null,null);do n=n._item.parent,t--;while(n!==e&&n._item.next===null);n!==e&&(n=n._item.next.content.type)}}}if(n===null)throw Sa();if(t===0&&n.constructor!==Ph&&n!==e)return $q(n._item.parent,n._item)}return vw(e,e._length,-1)},$q=(t,e)=>{let r=null,n=null;return t._item===null?n=Ih(t):r=Yt(t._item.id.client,t._item.id.clock),new Bg(r,n,e.id)};function BS(t,e,r){const n=[],i=t.node(0);r=typeof r=="number"&&r>=0?r:t.sameParent(e)?Math.max(0,t.sharedDepth(e.pos)-1):t.sharedDepth(e.pos);const o=new hh(t,e,r),s=o.depth===0?0:i.resolve(o.start).posAtIndex(0);return o.parent.forEach((a,l)=>{const c=s+l,d=c+a.nodeSize;if(c<o.start||c>=o.end)return;const f=new I1(i.resolve(c),i.resolve(d));n.push(f)}),n}class zS{constructor(e,r){Tn(this,"anchor");Tn(this,"head");this.anchor=e,this.head=r}map(e){return new zS(e.map(this.anchor),e.map(this.head))}resolve(e){const r=e.resolve(this.anchor),n=e.resolve(this.head);return new lo(r,n)}}class lo extends ot{constructor(r,n,i,o=1){const{doc:s}=r,a=r===n,l=r.pos===s.content.size&&n.pos===s.content.size,c=a&&!l?s.resolve(n.pos+(o>0?1:-1)):n,d=a&&l?s.resolve(r.pos-(o>0?1:-1)):r,f=BS(d.min(c),d.max(c),i);super(c.pos>=r.pos?f[0].$from:f[f.length-1].$to,c.pos>=r.pos?f[f.length-1].$to:f[0].$from,f);Tn(this,"depth");this.depth=i}get $to(){return this.ranges[this.ranges.length-1].$to}eq(r){return r instanceof lo&&r.$from.pos===this.$from.pos&&r.$to.pos===this.$to.pos}map(r,n){const i=r.resolve(n.map(this.anchor)),o=r.resolve(n.map(this.head));return new lo(i,o)}toJSON(){return{type:"nodeRange",anchor:this.anchor,head:this.head}}get isForwards(){return this.head>=this.anchor}get isBackwards(){return!this.isForwards}extendBackwards(){const{doc:r}=this.$from;if(this.isForwards&&this.ranges.length>1){const o=this.ranges.slice(0,-1),s=o[0].$from,a=o[o.length-1].$to;return new lo(s,a,this.depth)}const n=this.ranges[0],i=r.resolve(Math.max(0,n.$from.pos-1));return new lo(this.$anchor,i,this.depth)}extendForwards(){const{doc:r}=this.$from;if(this.isBackwards&&this.ranges.length>1){const o=this.ranges.slice(1),s=o[0].$from,a=o[o.length-1].$to;return new lo(a,s,this.depth)}const n=this.ranges[this.ranges.length-1],i=r.resolve(Math.min(r.content.size,n.$to.pos+1));return new lo(this.$anchor,i,this.depth)}static fromJSON(r,n){return new lo(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i,o,s=1){return new this(r.resolve(n),r.resolve(i),o,s)}getBookmark(){return new zS(this.anchor,this.head)}}function Uq(t){const e=t.cloneNode(!0),r=[t,...Array.from(t.getElementsByTagName("*"))],n=[e,...Array.from(e.getElementsByTagName("*"))];return r.forEach((i,o)=>{n[o].style.cssText=function(s){let a="";const l=getComputedStyle(s);for(let c=0;c<l.length;c+=1)a+=`${l[c]}:${l.getPropertyValue(l[c])};`;return a}(i)}),e}function sm(t,e){return window.getComputedStyle(t)[e]}function Wq(t=0,e=0,r=0){return Math.min(Math.max(t,e),r)}function hT(t){t.parentNode!==null&&t.parentNode!==void 0&&t.parentNode.removeChild(t)}const bD=t=>{const{x:e,y:r,direction:n,editor:i}=t;let o=null,s=null,a=null,l=e;for(;s===null&&l<window.innerWidth&&l>0;){const c=document.elementsFromPoint(l,r),d=c.findIndex(p=>p.classList.contains("ProseMirror")),f=c.slice(0,d);if(f.length>0){const p=f[0];if(o=p,a=i.view.posAtDOM(p,0),a>=0){s=i.state.doc.nodeAt(Math.max(a-1,0)),(s===null||s.isText)&&(s=i.state.doc.nodeAt(Math.max(a-1,0))),s||(s=i.state.doc.nodeAt(Math.max(a,0)));break}}n==="left"?l-=1:l+=1}return{resultElement:o,resultNode:s,pos:a!==null?a:null}};function Vq(t,e){const{doc:r}=e.view.state,n=bD({editor:e,x:t.clientX,y:t.clientY,direction:"right"});if(!n.resultNode||n.pos===null)return[];const i=t.clientX,o=function(d,f,p){const m=parseInt(sm(d.dom,"paddingLeft"),10),g=parseInt(sm(d.dom,"paddingRight"),10),b=parseInt(sm(d.dom,"borderLeftWidth"),10),S=parseInt(sm(d.dom,"borderLeftWidth"),10),w=d.dom.getBoundingClientRect();return{left:Wq(f,w.left+m+b,w.right-g-S),top:p}}(e.view,i,t.clientY),s=e.view.posAtCoords(o);if(!s)return[];const{pos:a}=s;if(!r.resolve(a).parent)return[];const l=r.resolve(n.pos),c=r.resolve(n.pos+1);return BS(l,c,0)}const pT=(t,e)=>{const r=t.resolve(e),{depth:n}=r;return n===0?e:r.pos-r.parentOffset-1},mT=(t,e)=>{const r=t.nodeAt(e),n=t.resolve(e);let{depth:i}=n,o=r;for(;i>0;){const s=n.node(i);i-=1,i===0&&(o=s)}return o},Sw=(t,e)=>{const r=zq.getState(t);return r?Hq(e,r.type,r.binding.mapping):null},gT=(t,e)=>{let r=e;for(;r&&r.parentNode&&r.parentNode!==t.dom;)r=r.parentNode;return r},wD=new St("dragHandle"),Gq=({pluginKey:t=wD,element:e,editor:r,tippyOptions:n,onNodeChange:i})=>{const o=document.createElement("div");let s=null,a=!1,l=null,c=-1;return e.addEventListener("dragstart",d=>{const{view:f}=r;if(!d.dataTransfer)return;const{empty:p,$from:m,$to:g}=f.state.selection,b=Vq(d,r),S=BS(m,g,0),w=S.some(P=>b.find(fe=>fe.$from===P.$from&&fe.$to===P.$to)),T=p||!w?b:S;if(!T.length)return;const{tr:M}=f.state,j=document.createElement("div"),$=T[0].$from.pos,W=T[T.length-1].$to.pos,Y=lo.create(f.state.doc,$,W),ee=Y.content();T.forEach(P=>{const fe=Uq(f.nodeDOM(P.$from.pos));j.append(fe)}),j.style.position="absolute",j.style.top="-10000px",document.body.append(j),d.dataTransfer.clearData(),d.dataTransfer.setDragImage(j,0,0),f.dragging={slice:ee,move:!0},M.setSelection(Y),f.dispatch(M),document.addEventListener("drop",()=>hT(j),{once:!0}),setTimeout(()=>{e&&(e.style.pointerEvents="none")},0)}),e.addEventListener("dragend",()=>{e&&(e.style.pointerEvents="auto")}),new _t({key:typeof t=="string"?new St(t):t,state:{init:()=>({locked:!1}),apply(d,f,p,m){const g=d.getMeta("lockDragHandle"),b=d.getMeta("hideDragHandle");if(g!==void 0&&(a=g),b&&s)return s.hide(),a=!1,l=null,c=-1,i==null||i({editor:r,node:null,pos:-1}),f;if(d.docChanged&&c!==-1&&e&&s){const S=d.mapping.map(c);S!==c&&(c=S,Sw(m,c))}return f}},view:d=>{var f;return e.draggable=!0,e.style.pointerEvents="auto",(f=r.view.dom.parentElement)===null||f===void 0||f.appendChild(o),o.appendChild(e),o.style.pointerEvents="none",o.style.position="absolute",o.style.top="0",o.style.left="0",s=gd(d.dom,{getReferenceClientRect:null,interactive:!0,trigger:"manual",placement:"left-start",hideOnClick:!1,duration:100,zIndex:10,popperOptions:{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{rootBoundary:"document",mainAxis:!1}}]},...n,appendTo:o,content:e}),{update(p,m){if(!e||!s||(e.draggable=!a,d.state.doc.eq(m.doc)||c===-1))return;let g=d.nodeDOM(c);if(g=gT(d,g),g===d.dom||(g==null?void 0:g.nodeType)!==1)return;const b=d.posAtDOM(g,0),S=mT(r.state.doc,b);if(S!==l){const w=pT(r.state.doc,b);l=S,c=w,Sw(d.state,c),i==null||i({editor:r,node:l,pos:c}),s.setProps({getReferenceClientRect:()=>g.getBoundingClientRect()}),s.show()}},destroy(){s==null||s.destroy(),e&&hT(o)}}},props:{handleDOMEvents:{mouseleave:(d,f)=>(a||f.target&&!o.contains(f.relatedTarget)&&(s==null||s.hide(),l=null,c=-1,i==null||i({editor:r,node:null,pos:-1})),!1),mousemove(d,f){if(!e||!s||a)return!1;const p=bD({x:f.clientX,y:f.clientY,direction:"right",editor:r});if(!p.resultElement)return!1;let m=p.resultElement;if(m=gT(d,m),m===d.dom||(m==null?void 0:m.nodeType)!==1)return!1;const g=d.posAtDOM(m,0),b=mT(r.state.doc,g);if(b!==l){const S=pT(r.state.doc,g);l=b,c=S,Sw(d.state,c),i==null||i({editor:r,node:l,pos:c}),s.setProps({getReferenceClientRect:()=>m.getBoundingClientRect()}),s.show()}return!1}}}})};var Il=(t=>(t[t.max=7]="max",t[t.min=0]="min",t[t.more=1]="more",t[t.less=-1]="less",t))(Il||{});function Kq(t,e,r){return t<e?e:t>r?r:t}function qq(t,e,r,n){const{doc:i,selection:o}=t;if(!i||!o||!(o instanceof et||o instanceof Gn))return t;const{from:s,to:a}=o;return i.nodesBetween(s,a,(l,c)=>{const d=l.type;return r.includes(d.name)?(t=Xx(t,c,e),!1):!Z0(l.type.name,n.extensionManager.extensions)}),t}function Xx(t,e,r){if(!t.doc)return t;const n=t.doc.nodeAt(e);if(!n)return t;const s=Kq((n.attrs.indent||0)+r,0,7);if(s===n.attrs.indent)return t;const a={...n.attrs,indent:s};return t.setNodeMarkup(e,n.type,a,n.marks)}function yT({delta:t,types:e}){return({state:r,dispatch:n,editor:i})=>{const{selection:o}=r;let{tr:s}=r;return s=s.setSelection(o),s=qq(s,t,e,i),s.docChanged?(n&&n(s),!0):!1}}function Xq(t){var ee,P,fe;const{pluginKey:e=wD}=t,{t:r}=Et(),[n,i]=J.useState(null),[o,s]=J.useState(-1),a=J.useRef(null),l=J.useRef(null),[c,d]=J.useState(!1),f=t.editor.extensionManager.extensions.some(de=>de.name==="textAlign"),p=t.editor.extensionManager.extensions.some(de=>de.name==="indent"),m=t.editor.extensionManager.extensions.some(de=>de.name==="clear");J.useEffect(()=>{a.current&&!t.editor.isDestroyed&&(l.current=Gq({editor:t.editor,element:a.current,pluginKey:"ContentItemMenu",tippyOptions:{offset:[-2,16],zIndex:99,moveTransition:"transform 0.15s ease-out"},onNodeChange:$}),t.editor.registerPlugin(l.current))},[t.editor,a]);function g(){const de=t.editor.chain();de.setNodeSelection(o).unsetAllMarks(),(n==null?void 0:n.type.name)!=="paragraph"&&de.setParagraph(),de.run()}function b(){t.editor.chain().focus().setNodeSelection(o).run(),document.execCommand("copy")}function S(){t.editor.commands.setNodeSelection(o);const{$anchor:de}=t.editor.state.selection,U=de.node(1)||t.editor.state.selection.node;t.editor.chain().setMeta("hideDragHandle",!0).insertContentAt(o+((n==null?void 0:n.nodeSize)||0),U.toJSON()).run()}function w(de){t.editor.commands.setTextAlign(de)}function T(){const de=Xx(t.editor.state.tr,o,1);de.setMeta("hideDragHandle",!0),t.editor.view.dispatch&&t.editor.view.dispatch(de)}function M(){const de=Xx(t.editor.state.tr,o,-1);t.editor.view.dispatch&&t.editor.view.dispatch(de)}function j(){t.editor.chain().setMeta("hideDragHandle",!0).setNodeSelection(o).deleteSelection().run()}function $(de){de.node&&i(de.node),s(de.pos)}function W(){var de;if(o!==-1){const U=(n==null?void 0:n.nodeSize)||0,ne=o+U,R=(n==null?void 0:n.type.name)==="paragraph"&&((de=n==null?void 0:n.content)==null?void 0:de.size)===0,le=R?o+2:ne+2;t.editor.chain().command(({dispatch:Ce,tr:he,state:Fe})=>Ce?(R?he.insertText("/",o,o+1):he.insert(ne,Fe.schema.nodes.paragraph.create(null,[Fe.schema.text("/")])),Ce(he)):!0).focus(le).run()}}J.useEffect(()=>(c?t.editor.commands.setMeta("lockDragHandle",!0):t.editor.commands.setMeta("lockDragHandle",!1),()=>{t.editor.commands.setMeta("lockDragHandle",!1)}),[c]),J.useEffect(()=>()=>{l.current&&(t.editor.unregisterPlugin(e),l.current=null)},[]),J.useEffect(()=>{var de;(de=t.editor)!=null&&de.isDestroyed&&l.current&&(t.editor.unregisterPlugin(e),l.current=null)},[(ee=t.editor)==null?void 0:ee.isDestroyed]);const Y=de=>{t!=null&&t.disabled||d(de)};return x.jsx("div",{className:`drag-handle [transition-property:top,_left] richtext-ease-in-out richtext-duration-200 ${t==null?void 0:t.className}`,style:{opacity:t!=null&&t.disabled?0:1},ref:a,children:x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-0.5 [transition-property:top,_left] richtext-ease-in-out richtext-duration-200",children:[x.jsx(Mt,{variant:"ghost",size:"icon",className:"richtext-w-7 richtext-h-7 richtext-cursor-grab",disabled:t==null?void 0:t.disabled,onClick:W,type:"button",children:x.jsx(Rt,{name:"Plus",className:"richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200"})}),x.jsxs(Ia,{open:c,onOpenChange:Y,children:[x.jsxs("div",{className:"richtext-relative richtext-flex richtext-flex-col",children:[x.jsxs(Sd,{children:[x.jsx(kd,{asChild:!0,disabled:t==null?void 0:t.disabled,children:x.jsx(Mt,{variant:"ghost",size:"icon",className:"richtext-w-7 richtext-h-7 richtext-cursor-grab richtext-relative richtext-z-[1]",disabled:t==null?void 0:t.disabled,onMouseUp:de=>{de.preventDefault(),!(t!=null&&t.disabled)&&d(!0)},type:"button",children:x.jsx(Rt,{name:"Grip",className:"richtext-text-sm dark:richtext-text-neutral-200 richtext-text-neutral-600"})})}),x.jsx(sc,{children:r("editor.draghandle.tooltip")})]}),x.jsx(Oa,{className:"richtext-absolute richtext-top-0 richtext-left-0 richtext-w-[28px] richtext-h-[28px] richtext-z-0"})]}),x.jsxs(ps,{className:"richtext-w-48",align:"start",side:"bottom",sideOffset:0,children:[x.jsxs(Pi,{onClick:j,className:"richtext-flex richtext-gap-3 focus:richtext-text-red-500 focus:richtext-bg-red-400 hover:richtext-bg-red-400 dark:hover:richtext-text-red-500 richtext-bg-opacity-10 hover:richtext-bg-opacity-20 focus:richtext-bg-opacity-30 dark:hover:richtext-bg-opacity-20",children:[x.jsx(Rt,{name:"Trash2"}),x.jsx("span",{children:r("editor.remove")})]}),m?x.jsxs(Pi,{className:"richtext-flex richtext-gap-3",onClick:g,children:[x.jsx(Rt,{name:"PaintRoller"}),x.jsx("span",{children:r("editor.clear.tooltip")})]}):null,x.jsxs(Pi,{className:"richtext-flex richtext-gap-3",onClick:b,children:[x.jsx(Rt,{name:"Clipboard"}),x.jsx("span",{children:r("editor.copyToClipboard")})]}),x.jsxs(Pi,{className:"richtext-flex richtext-gap-3",onClick:S,children:[x.jsx(Rt,{name:"Copy"}),x.jsx("span",{children:r("editor.copy")})]}),f||p?x.jsx(Ky,{}):null,f?x.jsxs(nC,{children:[x.jsxs(Ex,{className:"richtext-flex richtext-gap-3",children:[x.jsx(Rt,{name:"AlignCenter"}),x.jsx("span",{children:r("editor.textalign.tooltip")})]}),x.jsx(rC,{children:x.jsxs(Cx,{children:[x.jsxs(Pi,{className:"richtext-flex richtext-gap-3",onClick:()=>w("left"),children:[x.jsx(Rt,{name:"AlignLeft"}),x.jsx("span",{children:r("editor.textalign.left.tooltip")})]}),x.jsxs(Pi,{className:"richtext-flex richtext-gap-3",onClick:()=>w("center"),children:[x.jsx(Rt,{name:"AlignCenter"}),x.jsx("span",{children:r("editor.textalign.center.tooltip")})]}),x.jsxs(Pi,{className:"richtext-flex richtext-gap-3",onClick:()=>w("right"),children:[x.jsx(Rt,{name:"AlignRight"}),x.jsx("span",{children:r("editor.textalign.right.tooltip")})]})]})})]}):null,p?x.jsxs(nC,{children:[x.jsxs(Ex,{className:"richtext-flex richtext-gap-3",children:[x.jsx(Rt,{name:"IndentIncrease"}),x.jsx("span",{children:r("editor.indent")})]}),x.jsx(rC,{children:x.jsxs(Cx,{children:[x.jsxs(Pi,{className:"richtext-flex richtext-gap-3",onClick:T,disabled:((P=n==null?void 0:n.attrs)==null?void 0:P.indent)>=Il.max,children:[x.jsx(Rt,{name:"IndentIncrease"}),x.jsx("span",{children:r("editor.indent.tooltip")})]}),x.jsxs(Pi,{className:"richtext-flex richtext-gap-3",onClick:M,disabled:((fe=n==null?void 0:n.attrs)==null?void 0:fe.indent)<=Il.min,children:[x.jsx(Rt,{name:"IndentDecrease"}),x.jsx("span",{children:r("editor.outdent.tooltip")})]})]})})]}):null]})]})]})})}const Yq={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function Jq({item:t,disabled:e,editor:r}){var i;const n=t.component;return n?x.jsx(n,{...t.componentProps,editor:r,disabled:e||((i=t==null?void 0:t.componentProps)==null?void 0:i.disabled)}):x.jsx(x.Fragment,{})}function Zq(t){const{t:e,lang:r}=Et(),n=({editor:o})=>{const{selection:s}=o.view.state,{$from:a,to:l}=s;return a.pos===l?!1:s instanceof et},i=J.useMemo(()=>t.disabled||!(t!=null&&t.editor)?[]:XG(t.editor,e),[t.disabled,t.editor,r,e]);return x.jsx(qn,{shouldShow:n,editor:t==null?void 0:t.editor,tippyOptions:Yq,children:i!=null&&i.length?x.jsx("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:x.jsx("div",{className:"richtext-flex richtext-items-center richtext-gap-[4px] richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative",children:i==null?void 0:i.map((o,s)=>(o==null?void 0:o.type)==="divider"?x.jsx(Bi,{orientation:"vertical",className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"},`bubbleMenu-divider-${s}`):x.jsx(Jq,{item:o,disabled:t.disabled,editor:t.editor},`bubbleMenu-text-${s}`))})}):x.jsx(x.Fragment,{})})}function Qq({fill:t}){return x.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("g",{id:"icon/填充色",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:x.jsxs("g",{id:"icon/背景颜色",children:[x.jsx("g",{id:"编组",fill:"currentColor",children:x.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",id:"矩形",children:[x.jsx("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z",fillRule:"nonzero"}),x.jsx("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z",fillRule:"evenodd"}),x.jsx("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z",fillRule:"nonzero"})]})}),x.jsx("path",{d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",id:"矩形",fill:t||"#FBDE28"})]})})})}function xD(t){const[e,r]=J.useState(void 0);function n(s){var a;(a=t.action)==null||a.call(t,s)}function i(){var s;(s=t.action)==null||s.call(t,e)}const o=J.useCallback(tv(s=>{r(s)},350),[]);return x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[x.jsx(Ve,{tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,action:i,tooltipOptions:t==null?void 0:t.tooltipOptions,shortcutKeys:t==null?void 0:t.shortcutKeys,children:x.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:x.jsx(Qq,{fill:e})})}),x.jsx(VM,{selectedColor:e,setSelectedColor:o,onChange:n,highlight:!0,disabled:t==null?void 0:t.disabled,children:x.jsx(Mt,{variant:"ghost",size:"icon",className:"!richtext-w-3 !richtext-h-[32px]",disabled:t==null?void 0:t.disabled,children:x.jsx(Rt,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}function eX({editor:t,disabled:e}){var b,S,w,T,M,j,$,W,Y,ee,P,fe,de,U,ne,R,le,Ce;const r=({editor:he})=>oO(he.view.state,"table"),{t:n}=Et();function i(){t.chain().focus().addColumnBefore().run()}function o(){t.chain().focus().addColumnAfter().run()}function s(){t.chain().focus().deleteColumn().run()}function a(){t.chain().focus().addRowBefore().run()}function l(){t.chain().focus().addRowAfter().run()}function c(){t.chain().focus().deleteRow().run()}function d(){t.chain().focus().mergeCells().run()}function f(){t==null||t.chain().focus().splitCell().run()}function p(){t.chain().focus().deleteTable().run()}function m(he){t.chain().focus().setTableCellBackground(he).run()}const g=()=>{var V;const{view:he,state:{selection:{from:Fe}}}=t,ye=he.domAtPos(Fe).node;if(!ye)return new DOMRect(-1e3,-1e3,0,0);const ze=(V=ye==null?void 0:ye.closest)==null?void 0:V.call(ye,".tableWrapper");return ze?ze.getBoundingClientRect():new DOMRect(-1e3,-1e3,0,0)};return x.jsx(qn,{editor:t,pluginKey:"table",shouldShow:r,updateDelay:0,tippyOptions:{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},maxWidth:"auto",getReferenceClientRect:g,plugins:[gd.sticky],sticky:"popper"},children:e?x.jsx(x.Fragment,{}):x.jsxs("div",{className:"richtext-min-w-32 richtext-flex richtext-flex-row richtext-h-full richtext-items-center richtext-leading-none richtext-gap-0.5 richtext-p-2 richtext-w-full richtext-bg-background richtext-rounded-lg richtext-shadow-sm !richtext-border richtext-border-border",children:[x.jsx(Ve,{icon:"BetweenHorizonalEnd",tooltip:n("editor.table.menu.insertColumnBefore"),action:i,"tooltip-options":{sideOffset:15},disabled:!((S=(b=t==null?void 0:t.can())==null?void 0:b.addColumnBefore)!=null&&S.call(b))}),x.jsx(Ve,{icon:"BetweenHorizonalStart",tooltip:n("editor.table.menu.insertColumnAfter"),action:o,"tooltip-options":{sideOffset:15},disabled:!((T=(w=t==null?void 0:t.can())==null?void 0:w.addColumnAfter)!=null&&T.call(w))}),x.jsx(Ve,{icon:"DeleteColumn",action:s,tooltip:n("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15},disabled:!((j=t==null?void 0:(M=t.can()).deleteColumn)!=null&&j.call(M))}),x.jsx(Bi,{orientation:"vertical",className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"}),x.jsx(Ve,{icon:"BetweenVerticalEnd",action:a,tooltip:n("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15},disabled:!((W=t==null?void 0:($=t.can()).addRowBefore)!=null&&W.call($))}),x.jsx(Ve,{icon:"BetweenVerticalStart",action:l,tooltip:n("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15},disabled:!((ee=(Y=t==null?void 0:t.can())==null?void 0:Y.addRowAfter)!=null&&ee.call(Y))}),x.jsx(Ve,{icon:"DeleteRow",action:c,tooltip:n("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15},disabled:!((fe=(P=t==null?void 0:t.can())==null?void 0:P.deleteRow)!=null&&fe.call(P))}),x.jsx(Bi,{orientation:"vertical",className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"}),x.jsx(Ve,{icon:"TableCellsMerge",action:d,tooltip:n("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15},disabled:!((U=(de=t==null?void 0:t.can())==null?void 0:de.mergeCells)!=null&&U.call(de))}),x.jsx(Ve,{icon:"TableCellsSplit",action:f,tooltip:n("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15},disabled:!((R=(ne=t==null?void 0:t.can())==null?void 0:ne.splitCell)!=null&&R.call(ne))}),x.jsx(Bi,{orientation:"vertical",className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"}),x.jsx(xD,{editor:t,tooltip:n("editor.table.menu.setCellsBgColor"),action:m,tooltipOptions:{sideOffset:15}}),x.jsx(Ve,{icon:"Trash2",tooltip:n("editor.table.menu.deleteTable"),action:p,"tooltip-options":{sideOffset:15},disabled:!((Ce=(le=t==null?void 0:t.can())==null?void 0:le.deleteTable)!=null&&Ce.call(le))})]})})}function SD(t){const{t:e}=Et(),[r,n]=J.useState({text:"",link:""}),[i,o]=J.useState(!1);J.useEffect(()=>{var a;if(t!=null&&t.editor){const{href:l,target:c}=(a=t.editor)==null?void 0:a.getAttributes("link"),{from:d,to:f}=t.editor.state.selection,p=t.editor.state.doc.textBetween(d,f," ");n({link:l,text:p}),o(c==="_blank")}},[t==null?void 0:t.editor]);function s(a){a.preventDefault(),a.stopPropagation(),t==null||t.onSetLink(r.link,r.text,i)}return x.jsx("div",{className:"richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black border-neutral-200 dark:richtext-border-neutral-800",children:x.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:s,children:[x.jsx(Kn,{className:"mb-[6px]",children:e("editor.link.dialog.text")}),x.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[10px]",children:x.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:x.jsx(hn,{type:"text",value:r.text,required:!0,className:"richtext-w-80",placeholder:"Text",onChange:a=>n({...r,text:a.target.value})})})}),x.jsx(Kn,{className:"mb-[6px]",children:e("editor.link.dialog.link")}),x.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:x.jsxs("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:[x.jsx(hn,{type:"url",value:r.link,required:!0,className:"richtext-pl-10",onChange:a=>n({...r,link:a.target.value})}),x.jsx("span",{className:"richtext-absolute richtext-inset-y-0 richtext-flex richtext-items-center richtext-justify-center richtext-px-2 richtext-start-0",children:x.jsx(Rt,{className:"richtext-size-5 richtext-text-muted-foreground",name:"Link"})})]})}),x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-space-x-2",children:[x.jsx(Kn,{children:e("editor.link.dialog.openInNewTab")}),x.jsx(mS,{checked:i,onCheckedChange:a=>{o(a)}})]}),x.jsx(Mt,{type:"submit",className:"richtext-self-end richtext-mt-2",children:e("editor.link.dialog.button.apply")})]})})}function tX(t){const{t:e}=Et();return x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black richtext-border-neutral-200 dark:richtext-border-neutral-800",children:[x.jsx("a",{href:t==null?void 0:t.link,target:"_blank",rel:"noopener noreferrer",className:"richtext-text-sm richtext-underline richtext-break-all",children:sG(t==null?void 0:t.link,{length:50,omission:"…"})}),(t==null?void 0:t.link)&&x.jsx(Bi,{orientation:"vertical",className:"!richtext-h-4"}),x.jsxs("div",{className:"richtext-flex richtext-flex-nowrap",children:[x.jsx(Ve,{icon:"Pencil",tooltip:e("editor.link.edit.tooltip"),action:()=>{t==null||t.onEdit()},tooltipOptions:{sideOffset:15}}),x.jsx(Ve,{icon:"Unlink",tooltip:e("editor.link.unlink.tooltip"),action:()=>{t==null||t.onClear()},tooltipOptions:{sideOffset:15}})]})]})}function rX({editor:t,disabled:e}){const[r,n]=J.useState(!1),i=J.useMemo(()=>{const{href:l}=t.getAttributes("link");return l},[t]),o=J.useCallback(({editor:l})=>l.isActive("link"),[]),s=(l,c,d)=>{t.chain().extendMarkRange("link").insertContent({type:"text",text:c,marks:[{type:"link",attrs:{href:l,target:d?"_blank":""}}]}).setLink({href:l}).focus().run(),n(!1)},a=J.useCallback(()=>{t.chain().extendMarkRange("link").unsetLink().focus().run(),n(!1)},[t]);return x.jsx(x.Fragment,{children:x.jsx(qn,{editor:t,shouldShow:o,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n(!1)}},children:e?x.jsx(x.Fragment,{}):x.jsx(x.Fragment,{children:r?x.jsx(SD,{onSetLink:s,editor:t}):x.jsx(tX,{editor:t,onClear:a,onEdit:()=>{n(!0)},link:i})})})})}const HS={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function $S({item:t,disabled:e,editor:r}){var i;const n=t.component;return n?x.jsx(J.Fragment,{children:t.type==="divider"?x.jsx(Bi,{orientation:"vertical",className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"}):x.jsx(n,{...t.componentProps,editor:r,disabled:e||((i=t==null?void 0:t.componentProps)==null?void 0:i.disabled)})}):x.jsx(x.Fragment,{})}function nX(t){return t.type.name==="image"}function iX(t){return t.type.name===wk.name}function oX(t){return t.type.name==="video"}function sX(t){const{lang:e}=Et(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:a}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,a,c=>{if(nX(c))return l=!0,!1}),l},n=J.useMemo(()=>t.disabled?[]:VG(t.editor),[t.disabled,t.editor,e]);return x.jsx(x.Fragment,{children:x.jsx(qn,{shouldShow:r,editor:t==null?void 0:t.editor,tippyOptions:HS,children:n!=null&&n.length?x.jsx("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:x.jsx("div",{className:"richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative",children:n==null?void 0:n.map((i,o)=>x.jsx($S,{item:i,disabled:t.disabled,editor:t.editor},`bubbleMenu-image-${o}`))})}):x.jsx(x.Fragment,{})})})}function aX(t){const{lang:e}=Et(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:a}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,a,c=>{if(iX(c))return l=!0,!1}),l},n=J.useMemo(()=>t.disabled?[]:GG(t.editor),[t.disabled,t.editor,e]);return x.jsx(x.Fragment,{children:x.jsx(qn,{shouldShow:r,editor:t==null?void 0:t.editor,tippyOptions:HS,children:n!=null&&n.length?x.jsx("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:x.jsx("div",{className:"richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative",children:n==null?void 0:n.map((i,o)=>x.jsx($S,{item:i,disabled:t.disabled,editor:t.editor},`bubbleMenu-image-gif-${o}`))})}):x.jsx(x.Fragment,{})})})}function lX(t){const{lang:e}=Et(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:a}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,a,c=>{if(oX(c))return l=!0,!1}),l},n=J.useMemo(()=>t.disabled?[]:qG(t.editor),[t.editor,t.disabled,e]);return x.jsx(x.Fragment,{children:x.jsx(qn,{shouldShow:r,editor:t==null?void 0:t.editor,tippyOptions:HS,children:n!=null&&n.length?x.jsx("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:x.jsx("div",{className:"richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative",children:n==null?void 0:n.map((i,o)=>x.jsx($S,{item:i,disabled:t.disabled,editor:t.editor},`bubbleMenu-video-${o}`))})}):x.jsx(x.Fragment,{})})})}function cX({editor:t}){const{t:e}=Et(),r=J.useCallback(()=>t.isActive(dd.name),[t]),n=J.useCallback(()=>bd(dd.name,t),[t]),i=J.useCallback(()=>t.chain().focus().addColBefore().run(),[t]),o=J.useCallback(()=>t.chain().focus().addColAfter().run(),[t]),s=J.useCallback(()=>t.chain().focus().deleteCol().run(),[t]);return x.jsx(qn,{pluginKey:"columns-bubble-menu",editor:t,shouldShow:r,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:x.jsxs("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:[x.jsx(Ve,{action:i,icon:"ColumnAddLeft",tooltip:e("editor.table.menu.insertColumnBefore")}),x.jsx(Ve,{action:o,icon:"ColumnAddRight",tooltip:e("editor.table.menu.insertColumnAfter")}),x.jsx(Ve,{action:s,icon:"DeleteColumn",tooltip:e("editor.table.menu.deleteColumn")}),x.jsx(Ve,{action:n,icon:"Trash2",tooltip:e("editor.table.menu.delete_column")})]})})}const uX=W4.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.commands.toggleBold(),isActive:()=>e.isActive("bold")||!1,disabled:!e.can().toggleBold(),icon:"Bold",shortcutKeys:["mod","B"],tooltip:r("editor.bold.tooltip")}})}}}),dX=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,fX=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,hX=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,pX=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,mX=Mn.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Kl({find:dX,type:this.type}),Kl({find:hX,type:this.type})]},addPasteRules(){return[wa({find:fX,type:this.type}),wa({find:pX,type:this.type})]}}),gX=mX.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,t:r}){return{component:Ve,componentProps:{action:()=>e.commands.toggleItalic(),isActive:()=>e.isActive("italic")||!1,disabled:!e.can().toggleItalic(),shortcutKeys:["mod","I"],icon:"Italic",tooltip:r("editor.italic.tooltip")}}}}}}),yX=Mn.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),vX=yX.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,t:r}){return{component:Ve,componentProps:{action:()=>e.commands.toggleUnderline(),isActive:()=>e.isActive("underline")||!1,disabled:!e.can().toggleUnderline(),icon:"Underline",shortcutKeys:["mod","U"],tooltip:r("editor.underline.tooltip")}}}}}}),bX=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,wX=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,xX=Mn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Kl({find:bX,type:this.type})]},addPasteRules(){return[wa({find:wX,type:this.type})]}}),SX=xX.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.commands.toggleStrike(),isActive:()=>e.isActive("strike")||!1,disabled:!e.can().toggleStrike(),icon:"Strikethrough",shortcutKeys:["shift","mod","X"],tooltip:r("editor.strike.tooltip")}})}}}),kX=new RegExp("(?<!`)`([^`]+)`(?!`)"),_X=new RegExp("(?<!`)`([^`]+)`(?!`)","g"),EX=Mn.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Kl({find:kX,type:this.type})]},addPasteRules(){return[wa({find:_X,type:this.type})]}}),CX=EX.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.commands.toggleCode(),isActive:()=>e.isActive("code")||!1,disabled:!e.can().toggleCode(),icon:"Code",shortcutKeys:["mod","E"],tooltip:r("editor.code.tooltip")}})}}}),TX=/^```([a-z]+)?[\s\n]$/,AX=/^~~~([a-z]+)?[\s\n]$/,RX=Nt.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:r}=this.options,o=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(r)).map(s=>s.replace(r,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",lt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,r=e.pos===1;return!t||e.parent.type.name!==this.name?!1:r||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:r}=e,{$from:n,empty:i}=r;if(!i||n.parent.type!==this.type)return!1;const o=n.parentOffset===n.parent.nodeSize-2,s=n.parent.textContent.endsWith(`
264
+
265
+ `);return!o||!s?!1:t.chain().command(({tr:a})=>(a.delete(n.pos-2,n.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:r,doc:n}=e,{$from:i,empty:o}=r;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:n.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(ot.near(n.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[Q0({find:TX,type:this.type,getAttributes:t=>({language:t[1]})}),Q0({find:AX,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new _t({key:new St("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const r=e.clipboardData.getData("text/plain"),n=e.clipboardData.getData("vscode-editor-data"),i=n?JSON.parse(n):void 0,o=i==null?void 0:i.mode;if(!r||!o)return!1;const{tr:s,schema:a}=t.state,l=a.text(r.replace(/\r\n?/g,`
266
+ `));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(et.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}});let vo,Nf;const kw=new Set,_w=new Set;function IX(){return vo}function OX(t){if(!vo&&!Nf){const e=t.themes.filter(n=>!!n&&n in qf.bundledThemes),r=t.languages.filter(n=>!!n&&n in qf.bundledLanguages);return Nf=qf.createHighlighter({themes:e,langs:r}).then(n=>{vo=n}),Nf}if(Nf)return Nf}async function kD(t){return vo&&!vo.getLoadedThemes().includes(t)&&!_w.has(t)&&t in qf.bundledThemes?(_w.add(t),await vo.loadTheme(t),_w.delete(t),!0):!1}async function _D(t){return vo&&!vo.getLoadedLanguages().includes(t)&&!kw.has(t)&&t in qf.bundledLanguages?(kw.add(t),await vo.loadLanguage(t),kw.delete(t),!0):!1}async function MX({doc:t,name:e,defaultTheme:r,defaultLanguage:n}){const i=eh(t,a=>a.type.name===e),o=[...i.map(a=>a.node.attrs.theme),r],s=[...i.map(a=>a.node.attrs.language),n];vo?await Promise.all([...o.flatMap(a=>kD(a)),...s.flatMap(a=>!!a&&_D(a))]):await OX({languages:s,themes:o})}function vT({doc:t,name:e,defaultTheme:r,defaultLanguage:n}){const i=[];return eh(t,s=>s.type.name===e).forEach(s=>{let a=s.pos+1,l=s.node.attrs.language||n;const c=s.node.attrs.theme||r,d=IX();if(!d)return;d.getLoadedLanguages().includes(l)||(l="plaintext");const f=d.getLoadedThemes().includes(c)?c:d.getLoadedThemes()[0],p=d.codeToTokensBase(s.node.textContent,{lang:l,theme:f});for(const m of p){for(const g of m){const b=a+g.content.length,S=Qt.inline(a,b,{style:`color: ${g.color}`});i.push(S),a=b}a+=1}}),Tt.create(t,i)}function NX({name:t,defaultLanguage:e,defaultTheme:r}){const n=new _t({key:new St("shiki"),view(i){class o{constructor(){this.initDecorations()}update(){this.checkUndecoratedBlocks()}destroy(){}async initDecorations(){const a=i.state.doc;await MX({doc:a,name:t,defaultLanguage:e,defaultTheme:r});const l=i.state.tr.setMeta("shikiPluginForceDecoration",!0);i.dispatch(l)}async checkUndecoratedBlocks(){const a=eh(i.state.doc,d=>d.type.name===t);if((await Promise.all(a.flatMap(d=>[kD(d.node.attrs.theme),_D(d.node.attrs.language)]))).includes(!0)){const d=i.state.tr.setMeta("shikiPluginForceDecoration",!0);i.dispatch(d)}}}return new o},state:{init:(i,{doc:o})=>vT({doc:o,name:t,defaultLanguage:e,defaultTheme:r}),apply:(i,o,s,a)=>{const l=s.selection.$head.parent.type.name,c=a.selection.$head.parent.type.name,d=eh(s.doc,m=>m.type.name===t),f=eh(a.doc,m=>m.type.name===t),p=i.docChanged&&([l,c].includes(t)||f.length!==d.length||i.steps.some(m=>m.from!==void 0&&m.to!==void 0&&d.some(g=>g.pos>=m.from&&g.pos+g.node.nodeSize<=m.to)));return i.getMeta("shikiPluginForceDecoration")||p?vT({doc:i.doc,name:t,defaultLanguage:e,defaultTheme:r}):o.map(i.mapping,i.doc)}},props:{decorations(i){return n.getState(i)}}});return n}function DX({action:t,languages:e,...r}){const n=o=>{t(o)},i=J.useMemo(()=>e==null?void 0:e.map(o=>({title:v7[o]||o,language:o})),[e]);return x.jsxs(Ia,{children:[x.jsx(Oa,{disabled:r==null?void 0:r.disabled,asChild:!0,children:x.jsx(Ve,{tooltip:r==null?void 0:r.tooltip,disabled:r==null?void 0:r.disabled,icon:r==null?void 0:r.icon})}),x.jsx(ps,{className:"richtext-w-full !richtext-max-h-[180px] !richtext-overflow-y-scroll",children:i==null?void 0:i.map(o=>x.jsx(Pi,{onClick:()=>n(o.language),children:x.jsx("div",{className:"richtext-h-full richtext-ml-1",children:o.title})},`codeblock-${o.title}`))})]})}const PX="_wrap_134f4_1",LX="_maxHeight_134f4_10",FX="_btnCopy_134f4_13",jX="_btnDelete_134f4_14",BX="_blockInfo_134f4_18",zX="_blockInfoEditable_134f4_28",HX="_selectLang_134f4_32",$X="_copied_134f4_58",Js={wrap:PX,maxHeight:LX,btnCopy:FX,btnDelete:jX,blockInfo:BX,blockInfoEditable:zX,selectLang:HX,"richtext-SelectContent":"_richtext-SelectContent_134f4_46",copied:$X};function UX(){const[t,e]=J.useState(!1);return{isCopied:t,copyToClipboard:async n=>{try{await navigator.clipboard.writeText(n),e(!0),setTimeout(()=>e(!1),2e3)}catch(i){console.error("Failed to copy text: ",i),e(!1)}}}}function WX({editor:t,node:{attrs:e},updateAttributes:r,extension:n}){var p,m;const{isCopied:i,copyToClipboard:o}=UX(),s=J.useMemo(()=>{var g;return(g=n.options.languages)!=null&&g.length?n.options.languages:IM},[n.options.languages]),a=Yy(),l=(m=(p=t==null?void 0:t.options)==null?void 0:p.editorProps)==null?void 0:m.print,{language:c}=e,d=J.useRef(),f=J.useCallback(()=>bd(ED.name,t),[t]);return x.jsxs(gi,{className:Gr(Js.wrap,!l&&Js.maxHeight,"render-wrapper"),children:[x.jsxs("div",{className:Gr(Js.blockInfo,{[Js.blockInfoEditable]:!a}),children:[x.jsx("span",{onClick:()=>o(d.current.innerText),className:Gr(Js.btnCopy,i&&Js.copied),children:i?x.jsx(He.CopyCheck,{size:16}):x.jsx(He.Copy,{size:16})}),x.jsx("span",{onClick:f,className:Js.btnDelete,children:x.jsx(Rt,{name:"Trash2"})}),x.jsx("div",{className:Js.selectLang,children:x.jsxs(GH,{defaultValue:c||"auto",disabled:!a,onValueChange:g=>r({language:g}),children:[x.jsx(yM,{children:x.jsx(KH,{placeholder:"Language"})}),x.jsxs(wM,{className:"richtext-max-h-60 richtext-overflow-y-auto",children:[x.jsx(Tx,{value:"auto",children:"Auto"}),s.map((g,b)=>x.jsx(Tx,{value:g,children:g.charAt(0).toUpperCase()+g.slice(1)},`code-lang-${b}`))]})]})})]}),x.jsx("pre",{ref:d,children:x.jsx(VF,{as:"code"})})]})}const ED=RX.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),languages:[],button:({editor:e,t:r,extension:n})=>{var o,s,a;const i=(s=(o=n==null?void 0:n.options)==null?void 0:o.languages)!=null&&s.length?(a=n==null?void 0:n.options)==null?void 0:a.languages:IM;return{component:DX,componentProps:{action:(l="js")=>e.commands.setCodeBlock({language:l}),isActive:()=>e.isActive("codeBlock")||!1,disabled:!e.can().toggleCodeBlock(),icon:"Code2",tooltip:r("editor.codeblock.tooltip"),languages:i}}}}},addNodeView(){return ko(WX)},addProseMirrorPlugins(){var t;return[...((t=this.parent)==null?void 0:t.call(this))||[],NX({name:this.name,defaultLanguage:null,defaultTheme:this.options.defaultTheme})]}}),VX=Mn.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const r=G1(t,this.type);return Object.entries(r).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),GX=yt.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});function KX(t){var i,o,s;const{t:e,lang:r}=Et(),n=J.useMemo(()=>{var c;const a=(c=t==null?void 0:t.items)==null?void 0:c.find(d=>d.isActive());return a&&!a.default?{...a}:{title:t.tooltip,font:e("editor.fontFamily.default.tooltip"),isActive:()=>!1,disabled:!1,action:()=>t.editor.chain().focus().unsetFontFamily().run()}},[e,r,t]);return x.jsxs(Ia,{children:[x.jsx(Oa,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(X1,{title:((i=n==null?void 0:n.font)==null?void 0:i.length)>7?`${(o=n==null?void 0:n.font)==null?void 0:o.slice(0,6)}...`:n==null?void 0:n.font,tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,icon:"MenuDown"})}),x.jsx(ps,{className:"richtext-w-full",children:(s=t==null?void 0:t.items)==null?void 0:s.map((a,l)=>{const c=a.font===e("editor.fontFamily.default.tooltip")?{}:{fontFamily:a.font};return x.jsxs(J.Fragment,{children:[x.jsx(oc,{checked:(n==null?void 0:n.font)===a.font,onClick:a.action,children:x.jsx("div",{className:"richtext-h-full richtext-ml-1",style:c,children:a.font})}),a.font===e("editor.fontFamily.default.tooltip")&&x.jsx(Ky,{})]},`font-family-${l}`)})})]})}const qX=GX.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),fontFamilyList:y7,button({editor:e,extension:r,t:n}){var c;const{extensions:i=[]}=e.extensionManager??[],o=Ax(((c=r==null?void 0:r.options)==null?void 0:c.fontFamilyList)||[]),s=i.find(d=>d.name==="base-kit"),a=o.map(d=>({action:()=>{e.chain().focus().setFontFamily(d.value).run()},isActive:()=>e.isActive("textStyle",{fontFamily:d.value})||!1,disabled:!e.can().setFontFamily(d.value),title:d.name,font:d.value}));s&&s.options.textStyle!==!1&&a.unshift({action:()=>e.chain().focus().unsetFontFamily().run(),isActive:()=>!1,disabled:!1,font:n("editor.fontFamily.default.tooltip"),title:n("editor.fontFamily.tooltip")});const l=a.filter(d=>d.disabled).length===a.length;return{component:KX,componentProps:{tooltip:n("editor.fontFamily.tooltip"),disabled:l,items:a,editor:e}}}}}}),XX=Nt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,lt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Q0({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});function YX(t){var r;const e=J.useMemo(()=>{var o;const n=(o=t==null?void 0:t.items)==null?void 0:o.find(s=>s.isActive());return n&&!n.default?{...n}:{title:t.tooltip,level:0,isActive:()=>!1}},[t]);return x.jsxs(Ia,{children:[x.jsx(Oa,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(X1,{title:e==null?void 0:e.title,tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,icon:"MenuDown"})}),x.jsx(ps,{className:"richtext-w-full",children:(r=t==null?void 0:t.items)==null?void 0:r.map((n,i)=>{var o,s;return x.jsxs(J.Fragment,{children:[x.jsxs(oc,{checked:(e==null?void 0:e.title)===n.title,onClick:n.action,children:[x.jsx("div",{className:`richtext-ml-1 richtext-h-full heading-${n.level}`,children:n.title}),!!((o=n==null?void 0:n.shortcutKeys)!=null&&o.length)&&x.jsx(gM,{className:"richtext-pl-4",children:(s=n==null?void 0:n.shortcutKeys)==null?void 0:s.map(a=>Hy(a)).join(" ")})]}),n.level===0&&x.jsx(Ky,{})]},`heading-k-${i}`)})})]})}const JX=XX.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),levels:[1,2,3,4,5,6],button({editor:e,extension:r,t:n}){var c;const{extensions:i=[]}=e.extensionManager??[],o=((c=r.options)==null?void 0:c.levels)||[],s=i.find(d=>d.name==="base-kit"),a=o.map(d=>({action:()=>e.commands.toggleHeading({level:d}),isActive:()=>e.isActive("heading",{level:d})||!1,disabled:!e.can().toggleHeading({level:d}),title:n(`editor.heading.h${d}.tooltip`),level:d,shortcutKeys:["alt","mod",`${d}`]}));s&&s.options.paragraph!==!1&&a.unshift({action:()=>e.commands.setParagraph(),isActive:()=>e.isActive("paragraph")||!1,disabled:!e.can().setParagraph(),level:0,title:n("editor.paragraph.tooltip"),shortcutKeys:["alt","mod","0"]});const l=a.filter(d=>d.disabled).length===a.length;return{component:YX,componentProps:{tooltip:n("editor.heading.tooltip"),disabled:l,items:a,editor:e}}}}}}),ZX=yt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign||this.options.defaultAlignment;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${t.textAlign}`}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(r=>e.updateAttributes(r,{textAlign:t})).every(r=>r):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function QX(t){var r;const e=J.useMemo(()=>{var o;const n=(o=t==null?void 0:t.items)==null?void 0:o.find(s=>s.isActive());return n&&!n.default?{...n,icon:n.icon?n.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(Ve,{customClass:"!richtext-w-12 richtext-h-12",icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,children:x.jsx(Rt,{className:"richtext-w-3 richtext-h-3 richtext-ml-1 richtext-text-zinc-500",name:"MenuDown"})})}),x.jsx(Xn,{className:"richtext-min-w-4 richtext-w-full !richtext-p-[4px] richtext-flex richtext-flex-row richtext-gap-1",align:"start",side:"bottom",children:(r=t==null?void 0:t.items)==null?void 0:r.map((n,i)=>{var o,s;return x.jsxs(Sd,{children:[x.jsx(kd,{asChild:!0,children:x.jsx(qh,{size:"sm",onClick:n==null?void 0:n.action,className:"richtext-p-1 richtext-w-7 richtext-h-7",pressed:e.title===n.title,"data-state":e.title===n.title?"on":"off",children:(n==null?void 0:n.icon)&&x.jsx(Rt,{name:n.icon})})}),x.jsxs(sc,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[x.jsx("span",{children:n.title}),!!((o=n.shortcutKeys)!=null&&o.length)&&x.jsx("span",{children:(s=n.shortcutKeys)==null?void 0:s.map(a=>Hy(a)).join(" ")})]})]},`text-align-${i}`)})})]})}const eY=ZX.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph","list_item","title"],button({editor:e,extension:r,t:n}){var c;const i=((c=r.options)==null?void 0:c.alignments)||[],o={left:["mod","Shift","L"],center:["mod","Shift","E"],right:["mod","Shift","R"],justify:["mod","Shift","J"]},s={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},a=i.map(d=>{var f,p,m;return{title:n(`editor.textalign.${d}.tooltip`),icon:s[d],shortcutKeys:o[d],isActive:()=>e.isActive({textAlign:d})||!1,action:()=>{var g,b;return(b=(g=e.commands)==null?void 0:g.setTextAlign)==null?void 0:b.call(g,d)},disabled:!((m=(p=(f=e==null?void 0:e.can)==null?void 0:f.call(e))==null?void 0:p.setTextAlign)!=null&&m.call(p,d))}}),l=a.filter(d=>d.disabled).length===a.length;return{component:QX,componentProps:{icon:"AlignJustify",tooltip:n("editor.textalign.tooltip"),disabled:l,items:a}}}}}});function tY(t){var n;const{t:e}=Et(),r=J.useMemo(()=>{const i=(t.items||[]).find(s=>s.isActive());return i||{title:e("editor.fontSize.default.tooltip"),isActive:()=>!1}},[t]);return x.jsxs(Ia,{children:[x.jsx(Oa,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(X1,{title:r==null?void 0:r.title,tooltip:`${t==null?void 0:t.tooltip}`,disabled:t==null?void 0:t.disabled,icon:"MenuDown"})}),x.jsx(ps,{className:"richtext-w-32 richtext-overflow-y-auto richtext-max-h-96",children:(n=t==null?void 0:t.items)==null?void 0:n.map((i,o)=>x.jsx(oc,{checked:r.title===i.title,onClick:i.action,children:x.jsx("div",{className:"richtext-h-full richtext-ml-1",children:i.title})},`font-size-${o}`))})]})}const rY=yt.create({name:"fontSize",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontSizes:[...b7],button({editor:e,extension:r,t:n}){var l;const i=Ax(((l=r.options)==null?void 0:l.fontSizes)||cC),o=Ax([cC])[0],s=i.map(c=>({title:c.value===o.value?n("editor.fontSize.default.tooltip"):String(c.name),isActive:()=>{const{fontSize:d}=e.getAttributes("textStyle");return c.value===o.value&&d===void 0?!0:e.isActive({fontSize:String(c.value)})||!1},action:()=>{if(c.value===o.value){e.commands.unsetFontSize();return}e.commands.setFontSize(String(c.value))},disabled:!e.can().setFontSize(String(c.value)),divider:c.value===o.value||!1,default:c.value===o.value||!1})),a=s.filter(c=>c.disabled).length===s.length;return{component:tY,componentProps:{editor:e,tooltip:n("editor.fontSize.tooltip"),disabled:a,items:s,maxHeight:280}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replaceAll(/["']+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),nY=yt.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function iY({fill:t}){return x.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 240 240",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:x.jsx("g",{transform:"translate(0.000000, 0.500000)",children:x.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[x.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",id:"矩形",fill:t||"#DF2A3F",fillRule:"evenodd"}),x.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",id:"路径-21",fill:"currentColor",fillRule:"nonzero"}),x.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",id:"路径-22",fill:"currentColor",fillRule:"nonzero"})]})})})})}function oY(t){const[e,r]=J.useState(void 0);function n(s){var a;(a=t.action)==null||a.call(t,s)}function i(){var s;(s=t.action)==null||s.call(t,e)}const o=J.useCallback(tv(s=>{r(s)},350),[]);return x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[x.jsx(Ve,{tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,action:i,children:x.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:x.jsx(iY,{fill:e})})}),x.jsx(VM,{selectedColor:e,setSelectedColor:o,onChange:n,disabled:t==null?void 0:t.disabled,colors:t==null?void 0:t.colors,defaultColor:t==null?void 0:t.defaultColor,children:x.jsx(Mt,{variant:"ghost",size:"icon",className:"r!ichtext-h-[32px] !richtext-w-3",disabled:t==null?void 0:t.disabled,children:x.jsx(Rt,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}const sY=nY.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,t:r,extension:n}){return{component:oY,componentProps:{colors:n.options.colors,defaultColor:n.options.defaultColor,action:i=>{i===void 0&&e.chain().focus().unsetColor().run(),typeof i=="string"&&e.chain().focus().setColor(i).run()},isActive:()=>{const{color:i}=e.getAttributes("textStyle");return i&&e.isActive({color:i})||!1},editor:e,disabled:!e.can().setColor(""),tooltip:r("editor.color.tooltip")}}}}}}),aY=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,lY=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,cY=Mn.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Kl({find:aY,type:this.type})]},addPasteRules(){return[wa({find:lY,type:this.type})]}}),uY=cY.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),multicolor:!0,button:({editor:e,t:r})=>({component:xD,componentProps:{action:n=>{typeof n=="string"&&e.chain().focus().setHighlight({color:n}).run(),n===void 0&&e.chain().focus().unsetHighlight().run()},editor:e,isActive:()=>e.isActive("highlight")||!1,disabled:!e.can().setHighlight(),shortcutKeys:["⇧","mod","H"],tooltip:r("editor.highlight.tooltip")}})}}}),dY="listItem",bT="textStyle",wT=/^\s*([-+*])\s$/,fY=Nt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(dY,this.editor.getAttributes(bT)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Ju({find:wT,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ju({find:wT,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(bT),editor:this.editor})),[t]}}),hY=fY.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList")||!1,disabled:!1,shortcutKeys:["shift","mod","8"],icon:"List",tooltip:r("editor.bulletlist.tooltip")}})}}}),pY=Nt.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),disabled:!e.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:r("editor.clear.tooltip")}})}}}),mY="listItem",xT="textStyle",ST=/^(\d+)\.\s$/,gY=Nt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...r}=t;return e===1?["ol",lt(this.options.HTMLAttributes,r),0]:["ol",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(mY,this.editor.getAttributes(xT)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Ju({find:ST,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ju({find:ST,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(xT)}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1],editor:this.editor})),[t]}}),yY=gY.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.commands.toggleOrderedList(),isActive:()=>e.isActive("orderedList")||!1,disabled:!1,icon:"ListOrdered",shortcutKeys:["mod","shift","7"],tooltip:r("editor.orderedlist.tooltip")}})}}}),vY=/^\s*(\[([( |x])?\])\s$/,bY=Nt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",lt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:r,editor:n})=>{const i=document.createElement("li"),o=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");return o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",c=>c.preventDefault()),a.addEventListener("change",c=>{if(!n.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:d}=c.target;n.isEditable&&typeof r=="function"&&n.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const p=r();if(typeof p!="number")return!1;const m=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...m==null?void 0:m.attrs,checked:d}),!0}).run(),!n.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,d)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{i.setAttribute(c,d)}),i.dataset.checked=t.attrs.checked,t.attrs.checked&&a.setAttribute("checked","checked"),o.append(a,s),i.append(o,l),Object.entries(e).forEach(([c,d])=>{i.setAttribute(c,d)}),{dom:i,contentDOM:l,update:c=>c.type!==this.type?!1:(i.dataset.checked=c.attrs.checked,c.attrs.checked?a.setAttribute("checked","checked"):a.removeAttribute("checked"),!0)}}},addInputRules(){return[Ju({find:vY,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),wY=Nt.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",lt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),xY=wY.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.commands.toggleTaskList(),isActive:()=>e.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:["shift","mod","9"],tooltip:r("editor.tasklist.tooltip")}})}},addExtensions(){return[bY.configure(this.options.taskItem)]}}),SY=/^\s*>\s$/,kY=Nt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ju({find:SY,type:this.type})]}}),_Y=kY.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"blockquote"},button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.commands.toggleBlockquote(),isActive:()=>e.isActive("blockquote")||!1,disabled:!e.can().toggleBlockquote(),icon:"TextQuote",shortcutKeys:["shift","mod","B"],tooltip:r("editor.blockquote.tooltip")}})}}}),EY="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",CY="ελ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",ud=(t,e)=>{for(const r in e)t[r]=e[r];return t},Yx="numeric",Jx="ascii",Zx="alpha",qm="asciinumeric",am="alphanumeric",Qx="domain",CD="emoji",TY="scheme",AY="slashscheme",kT="whitespace";function RY(t,e){return t in e||(e[t]=[]),e[t]}function Ol(t,e,r){e[Yx]&&(e[qm]=!0,e[am]=!0),e[Jx]&&(e[qm]=!0,e[Zx]=!0),e[qm]&&(e[am]=!0),e[Zx]&&(e[am]=!0),e[am]&&(e[Qx]=!0),e[CD]&&(e[Qx]=!0);for(const n in e){const i=RY(n,r);i.indexOf(t)<0&&i.push(t)}}function IY(t,e){const r={};for(const n in e)e[n].indexOf(t)>=0&&(r[n]=!0);return r}function Rn(t){t===void 0&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}Rn.groups={};Rn.prototype={accepts(){return!!this.t},go(t){const e=this,r=e.j[t];if(r)return r;for(let n=0;n<e.jr.length;n++){const i=e.jr[n][0],o=e.jr[n][1];if(o&&i.test(t))return o}return e.jd},has(t,e){return e===void 0&&(e=!1),e?t in this.j:!!this.go(t)},ta(t,e,r,n){for(let i=0;i<t.length;i++)this.tt(t[i],e,r,n)},tr(t,e,r,n){n=n||Rn.groups;let i;return e&&e.j?i=e:(i=new Rn(e),r&&n&&Ol(e,r,n)),this.jr.push([t,i]),i},ts(t,e,r,n){let i=this;const o=t.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(t[s]);return i.tt(t[o-1],e,r,n)},tt(t,e,r,n){n=n||Rn.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const o=e;let s,a=i.go(t);if(a?(s=new Rn,ud(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Rn,o){if(n)if(s.t&&typeof s.t=="string"){const l=ud(IY(s.t,n),r);Ol(o,l,n)}else r&&Ol(o,r,n);s.t=o}return i.j[t]=s,s}};const ht=(t,e,r,n,i)=>t.ta(e,r,n,i),ui=(t,e,r,n,i)=>t.tr(e,r,n,i),_T=(t,e,r,n,i)=>t.ts(e,r,n,i),Ge=(t,e,r,n,i)=>t.tt(e,r,n,i),Zo="WORD",e1="UWORD",Lh="LOCALHOST",t1="TLD",r1="UTLD",Xm="SCHEME",Au="SLASH_SCHEME",US="NUM",TD="WS",WS="NL",lh="OPENBRACE",ch="CLOSEBRACE",Wg="OPENBRACKET",Vg="CLOSEBRACKET",Gg="OPENPAREN",Kg="CLOSEPAREN",qg="OPENANGLEBRACKET",Xg="CLOSEANGLEBRACKET",Yg="FULLWIDTHLEFTPAREN",Jg="FULLWIDTHRIGHTPAREN",Zg="LEFTCORNERBRACKET",Qg="RIGHTCORNERBRACKET",ey="LEFTWHITECORNERBRACKET",ty="RIGHTWHITECORNERBRACKET",ry="FULLWIDTHLESSTHAN",ny="FULLWIDTHGREATERTHAN",iy="AMPERSAND",oy="APOSTROPHE",sy="ASTERISK",ia="AT",ay="BACKSLASH",ly="BACKTICK",cy="CARET",la="COLON",VS="COMMA",uy="DOLLAR",oo="DOT",dy="EQUALS",GS="EXCLAMATION",so="HYPHEN",fy="PERCENT",hy="PIPE",py="PLUS",my="POUND",gy="QUERY",KS="QUOTE",qS="SEMI",ao="SLASH",uh="TILDE",yy="UNDERSCORE",AD="EMOJI",vy="SYM";var RD=Object.freeze({__proto__:null,WORD:Zo,UWORD:e1,LOCALHOST:Lh,TLD:t1,UTLD:r1,SCHEME:Xm,SLASH_SCHEME:Au,NUM:US,WS:TD,NL:WS,OPENBRACE:lh,CLOSEBRACE:ch,OPENBRACKET:Wg,CLOSEBRACKET:Vg,OPENPAREN:Gg,CLOSEPAREN:Kg,OPENANGLEBRACKET:qg,CLOSEANGLEBRACKET:Xg,FULLWIDTHLEFTPAREN:Yg,FULLWIDTHRIGHTPAREN:Jg,LEFTCORNERBRACKET:Zg,RIGHTCORNERBRACKET:Qg,LEFTWHITECORNERBRACKET:ey,RIGHTWHITECORNERBRACKET:ty,FULLWIDTHLESSTHAN:ry,FULLWIDTHGREATERTHAN:ny,AMPERSAND:iy,APOSTROPHE:oy,ASTERISK:sy,AT:ia,BACKSLASH:ay,BACKTICK:ly,CARET:cy,COLON:la,COMMA:VS,DOLLAR:uy,DOT:oo,EQUALS:dy,EXCLAMATION:GS,HYPHEN:so,PERCENT:fy,PIPE:hy,PLUS:py,POUND:my,QUERY:gy,QUOTE:KS,SEMI:qS,SLASH:ao,TILDE:uh,UNDERSCORE:yy,EMOJI:AD,SYM:vy});const yu=/[a-z]/,Ew=new RegExp("\\p{L}","u"),Cw=new RegExp("\\p{Emoji}","u"),Tw=/\d/,ET=/\s/,CT=`
267
+ `,OY="️",MY="‍";let lm=null,cm=null;function NY(t){t===void 0&&(t=[]);const e={};Rn.groups=e;const r=new Rn;lm==null&&(lm=TT(EY)),cm==null&&(cm=TT(CY)),Ge(r,"'",oy),Ge(r,"{",lh),Ge(r,"}",ch),Ge(r,"[",Wg),Ge(r,"]",Vg),Ge(r,"(",Gg),Ge(r,")",Kg),Ge(r,"<",qg),Ge(r,">",Xg),Ge(r,"(",Yg),Ge(r,")",Jg),Ge(r,"「",Zg),Ge(r,"」",Qg),Ge(r,"『",ey),Ge(r,"』",ty),Ge(r,"<",ry),Ge(r,">",ny),Ge(r,"&",iy),Ge(r,"*",sy),Ge(r,"@",ia),Ge(r,"`",ly),Ge(r,"^",cy),Ge(r,":",la),Ge(r,",",VS),Ge(r,"$",uy),Ge(r,".",oo),Ge(r,"=",dy),Ge(r,"!",GS),Ge(r,"-",so),Ge(r,"%",fy),Ge(r,"|",hy),Ge(r,"+",py),Ge(r,"#",my),Ge(r,"?",gy),Ge(r,'"',KS),Ge(r,"/",ao),Ge(r,";",qS),Ge(r,"~",uh),Ge(r,"_",yy),Ge(r,"\\",ay);const n=ui(r,Tw,US,{[Yx]:!0});ui(n,Tw,n);const i=ui(r,yu,Zo,{[Jx]:!0});ui(i,yu,i);const o=ui(r,Ew,e1,{[Zx]:!0});ui(o,yu),ui(o,Ew,o);const s=ui(r,ET,TD,{[kT]:!0});Ge(r,CT,WS,{[kT]:!0}),Ge(s,CT),ui(s,ET,s);const a=ui(r,Cw,AD,{[CD]:!0});ui(a,Cw,a),Ge(a,OY,a);const l=Ge(a,MY);ui(l,Cw,a);const c=[[yu,i]],d=[[yu,null],[Ew,o]];for(let f=0;f<lm.length;f++)Zs(r,lm[f],t1,Zo,c);for(let f=0;f<cm.length;f++)Zs(r,cm[f],r1,e1,d);Ol(t1,{tld:!0,ascii:!0},e),Ol(r1,{utld:!0,alpha:!0},e),Zs(r,"file",Xm,Zo,c),Zs(r,"mailto",Xm,Zo,c),Zs(r,"http",Au,Zo,c),Zs(r,"https",Au,Zo,c),Zs(r,"ftp",Au,Zo,c),Zs(r,"ftps",Au,Zo,c),Ol(Xm,{scheme:!0,ascii:!0},e),Ol(Au,{slashscheme:!0,ascii:!0},e),t=t.sort((f,p)=>f[0]>p[0]?1:-1);for(let f=0;f<t.length;f++){const p=t[f][0],g=t[f][1]?{[TY]:!0}:{[AY]:!0};p.indexOf("-")>=0?g[Qx]=!0:yu.test(p)?Tw.test(p)?g[qm]=!0:g[Jx]=!0:g[Yx]=!0,_T(r,p,p,g)}return _T(r,"localhost",Lh,{ascii:!0}),r.jd=new Rn(vy),{start:r,tokens:ud({groups:e},RD)}}function DY(t,e){const r=PY(e.replace(/[A-Z]/g,a=>a.toLowerCase())),n=r.length,i=[];let o=0,s=0;for(;s<n;){let a=t,l=null,c=0,d=null,f=-1,p=-1;for(;s<n&&(l=a.go(r[s]));)a=l,a.accepts()?(f=0,p=0,d=a):f>=0&&(f+=r[s].length,p++),c+=r[s].length,o+=r[s].length,s++;o-=f,s-=p,c-=f,i.push({t:d.t,v:e.slice(o-c,o),s:o-c,e:o})}return i}function PY(t){const e=[],r=t.length;let n=0;for(;n<r;){let i=t.charCodeAt(n),o,s=i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?t[n]:t.slice(n,n+2);e.push(s),n+=s.length}return e}function Zs(t,e,r,n,i){let o;const s=e.length;for(let a=0;a<s-1;a++){const l=e[a];t.j[l]?o=t.j[l]:(o=new Rn(n),o.jr=i.slice(),t.j[l]=o),t=o}return o=new Rn(r),o.jr=i.slice(),t.j[e[s-1]]=o,o}function TT(t){const e=[],r=[];let n=0,i="0123456789";for(;n<t.length;){let o=0;for(;i.indexOf(t[n+o])>=0;)o++;if(o>0){e.push(r.join(""));for(let s=parseInt(t.substring(n,n+o),10);s>0;s--)r.pop();n+=o}else r.push(t[n]),n++}return e}const Fh={defaultProtocol:"http",events:null,format:AT,formatHref:AT,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function XS(t,e){e===void 0&&(e=null);let r=ud({},Fh);t&&(r=ud(r,t instanceof XS?t.o:t));const n=r.ignoreTags,i=[];for(let o=0;o<n.length;o++)i.push(n[o].toUpperCase());this.o=r,e&&(this.defaultRender=e),this.ignoreTags=i}XS.prototype={o:Fh,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,r){const n=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=r.t in i?i[r.t]:Fh[t],typeof i=="function"&&n&&(i=i(e,r))):typeof i=="function"&&n&&(i=i(e,r.t,r)),i)},getObj(t,e,r){let n=this.o[t];return typeof n=="function"&&e!=null&&(n=n(e,r.t,r)),n},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function AT(t){return t}function ID(t,e){this.t="token",this.v=t,this.tk=e}ID.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),r=t.get("truncate",e,this),n=t.get("format",e,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t){return t===void 0&&(t=Fh.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,r=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",r,this),i=t.get("tagName",r,e),o=this.toFormattedString(t),s={},a=t.get("className",r,e),l=t.get("target",r,e),c=t.get("rel",r,e),d=t.getObj("attributes",r,e),f=t.getObj("events",r,e);return s.href=n,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),d&&ud(s,d),{tagName:i,attributes:s,content:o,eventListeners:f}}};function av(t,e){class r extends ID{constructor(i,o){super(i,o),this.t=t}}for(const n in e)r.prototype[n]=e[n];return r.t=t,r}const RT=av("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),IT=av("text"),LY=av("nl"),um=av("url",{isLink:!0,toHref(t){return t===void 0&&(t=Fh.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Lh&&t[1].t===la}}),di=t=>new Rn(t);function FY(t){let{groups:e}=t;const r=e.domain.concat([iy,sy,ia,ay,ly,cy,uy,dy,so,US,fy,hy,py,my,ao,vy,uh,yy]),n=[oy,la,VS,oo,GS,gy,KS,qS,qg,Xg,lh,ch,Vg,Wg,Gg,Kg,Yg,Jg,Zg,Qg,ey,ty,ry,ny],i=[iy,oy,sy,ay,ly,cy,uy,dy,so,lh,ch,fy,hy,py,my,gy,ao,vy,uh,yy],o=di(),s=Ge(o,uh);ht(s,i,s),ht(s,e.domain,s);const a=di(),l=di(),c=di();ht(o,e.domain,a),ht(o,e.scheme,l),ht(o,e.slashscheme,c),ht(a,i,s),ht(a,e.domain,a);const d=Ge(a,ia);Ge(s,ia,d),Ge(l,ia,d),Ge(c,ia,d);const f=Ge(s,oo);ht(f,i,s),ht(f,e.domain,s);const p=di();ht(d,e.domain,p),ht(p,e.domain,p);const m=Ge(p,oo);ht(m,e.domain,p);const g=di(RT);ht(m,e.tld,g),ht(m,e.utld,g),Ge(d,Lh,g);const b=Ge(p,so);ht(b,e.domain,p),ht(g,e.domain,p),Ge(g,oo,m),Ge(g,so,b);const S=Ge(g,la);ht(S,e.numeric,RT);const w=Ge(a,so),T=Ge(a,oo);ht(w,e.domain,a),ht(T,i,s),ht(T,e.domain,a);const M=di(um);ht(T,e.tld,M),ht(T,e.utld,M),ht(M,e.domain,a),ht(M,i,s),Ge(M,oo,T),Ge(M,so,w),Ge(M,ia,d);const j=Ge(M,la),$=di(um);ht(j,e.numeric,$);const W=di(um),Y=di();ht(W,r,W),ht(W,n,Y),ht(Y,r,W),ht(Y,n,Y),Ge(M,ao,W),Ge($,ao,W);const ee=Ge(l,la),P=Ge(c,la),fe=Ge(P,ao),de=Ge(fe,ao);ht(l,e.domain,a),Ge(l,oo,T),Ge(l,so,w),ht(c,e.domain,a),Ge(c,oo,T),Ge(c,so,w),ht(ee,e.domain,W),Ge(ee,ao,W),ht(de,e.domain,W),ht(de,r,W),Ge(de,ao,W);const U=[[lh,ch],[Wg,Vg],[Gg,Kg],[qg,Xg],[Yg,Jg],[Zg,Qg],[ey,ty],[ry,ny]];for(let ne=0;ne<U.length;ne++){const[R,le]=U[ne],Ce=Ge(W,R);Ge(Y,R,Ce),Ge(Ce,le,W);const he=di(um);ht(Ce,r,he);const Fe=di();ht(Ce,n),ht(he,r,he),ht(he,n,Fe),ht(Fe,r,he),ht(Fe,n,Fe),Ge(he,le,W),Ge(Fe,le,W)}return Ge(o,Lh,M),Ge(o,WS,LY),{start:o,tokens:RD}}function jY(t,e,r){let n=r.length,i=0,o=[],s=[];for(;i<n;){let a=t,l=null,c=null,d=0,f=null,p=-1;for(;i<n&&!(l=a.go(r[i].t));)s.push(r[i++]);for(;i<n&&(c=l||a.go(r[i].t));)l=null,a=c,a.accepts()?(p=0,f=a):p>=0&&p++,i++,d++;if(p<0)i-=d,i<n&&(s.push(r[i]),i++);else{s.length>0&&(o.push(Aw(IT,e,s)),s=[]),i-=p,d-=p;const m=f.t,g=r.slice(i-d,i);o.push(Aw(m,e,g))}}return s.length>0&&o.push(Aw(IT,e,s)),o}function Aw(t,e,r){const n=r[0].s,i=r[r.length-1].e,o=e.slice(n,i);return new t(o,r)}const BY=typeof console<"u"&&console&&console.warn||(()=>{}),zY="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",er={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function HY(){Rn.groups={},er.scanner=null,er.parser=null,er.tokenQueue=[],er.pluginQueue=[],er.customSchemes=[],er.initialized=!1}function OT(t,e){if(e===void 0&&(e=!1),er.initialized&&BY(`linkifyjs: already initialized - will not register custom scheme "${t}" ${zY}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
268
+ 1. Must only contain digits, lowercase ASCII letters or "-"
269
+ 2. Cannot start or end with "-"
270
+ 3. "-" cannot repeat`);er.customSchemes.push([t,e])}function $Y(){er.scanner=NY(er.customSchemes);for(let t=0;t<er.tokenQueue.length;t++)er.tokenQueue[t][1]({scanner:er.scanner});er.parser=FY(er.scanner.tokens);for(let t=0;t<er.pluginQueue.length;t++)er.pluginQueue[t][1]({scanner:er.scanner,parser:er.parser});er.initialized=!0}function OD(t){return er.initialized||$Y(),jY(er.parser.start,t,DY(er.scanner.start,t))}function MD(t,e,r){if(e===void 0&&(e=null),r===void 0&&(r=null),e&&typeof e=="object"){if(r)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);r=e,e=null}const n=new XS(r),i=OD(t),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!e||a.t===e)&&n.check(a)&&o.push(a.toFormattedObject(n))}return o}function UY(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function WY(t){return new _t({key:new St("autolink"),appendTransaction:(e,r,n)=>{const i=e.some(c=>c.docChanged)&&!r.doc.eq(n.doc),o=e.some(c=>c.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=n,a=J6(r.doc,[...e]);if(i4(a).forEach(({newRange:c})=>{const d=Q6(n.doc,c,m=>m.isTextblock);let f,p;if(d.length>1?(f=d[0],p=n.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):d.length&&n.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(f=d[0],p=n.doc.textBetween(f.pos,c.to,void 0," ")),f&&p){const m=p.split(" ").filter(w=>w!=="");if(m.length<=0)return!1;const g=m[m.length-1],b=f.pos+p.lastIndexOf(g);if(!g)return!1;const S=OD(g).map(w=>w.toObject(t.defaultProtocol));if(!UY(S))return!1;S.filter(w=>w.isLink).map(w=>({...w,from:b+w.start+1,to:b+w.end+1})).filter(w=>n.schema.marks.code?!n.doc.rangeHasMark(w.from,w.to,n.schema.marks.code):!0).filter(w=>t.validate(w.value)).filter(w=>t.shouldAutoLink(w.value)).forEach(w=>{K1(w.from,w.to,n.doc).some(T=>T.mark.type===t.type)||s.addMark(w.from,w.to,t.type.create({href:w.href}))})}}),!!s.steps.length)return s}})}function VY(t){return new _t({key:new St("handleClickLink"),props:{handleClick:(e,r,n)=>{var i,o;if(n.button!==0||!e.editable)return!1;let s=n.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(p=>p.nodeName==="A"))return!1;const l=iO(e.state,t.type.name),c=n.target,d=(i=c==null?void 0:c.href)!==null&&i!==void 0?i:l.href,f=(o=c==null?void 0:c.target)!==null&&o!==void 0?o:l.target;return c&&d?(window.open(d,f),!0):!1}}})}function GY(t){return new _t({key:new St("handlePasteLink"),props:{handlePaste:(e,r,n)=>{const{state:i}=e,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";n.content.forEach(c=>{a+=c.textContent});const l=MD(a,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!l?!1:(t.editor.commands.setMark(t.type,{href:l.href}),!0)}}})}const KY=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Df(t,e){const r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{const i=typeof n=="string"?n:n.scheme;i&&r.push(i)}),!t||t.replace(KY,"").match(new RegExp(`^(?:(?:${r.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}const qY=Mn.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){OT(t);return}OT(t.scheme,t.optionalSlashes)})},onDestroy(){HY()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Df(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:r=>!!Df(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Df(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",lt(this.options.HTMLAttributes,t),0]:["a",lt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[wa({find:t=>{const e=[];if(t){const{protocols:r,defaultProtocol:n}=this.options,i=MD(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:s=>!!Df(s,r),protocols:r,defaultProtocol:n}));i.length&&i.forEach(o=>e.push({text:o.value,data:{href:o.href},index:o.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:r}=this.options;return this.options.autolink&&t.push(WY({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:n=>this.options.isAllowedUri(n,{defaultValidate:i=>!!Df(i,e),protocols:e,defaultProtocol:r}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(VY({type:this.type})),this.options.linkOnPaste&&t.push(GY({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}});function XY(t){const[e,r]=J.useState(!1);function n(i,o,s){t.action&&(t.action({link:i,text:o,openInNewTab:s}),r(!1))}return x.jsxs(xi,{modal:!0,open:e,onOpenChange:r,children:[x.jsx(Si,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(Ve,{tooltip:t==null?void 0:t.tooltip,isActive:t==null?void 0:t.isActive,disabled:t==null?void 0:t.disabled,children:x.jsx(Rt,{name:t==null?void 0:t.icon})})}),x.jsx(Xn,{hideWhenDetached:!0,className:"richtext-w-full",align:"start",side:"bottom",children:x.jsx(SD,{editor:t.editor,onSetLink:n})})]})}const YY=qY.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){return["a",lt(this.options.HTMLAttributes,t,{class:"link"}),0]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),openOnClick:!0,button:({editor:e,t:r})=>({component:XY,componentProps:{editor:e,action:n=>{const{link:i,text:o,openInNewTab:s}=n;e.chain().extendMarkRange("link").insertContent({type:"text",text:o,marks:[{type:"link",attrs:{href:i,target:s?"_blank":""}}]}).setLink({href:i}).focus().run()},id:"linkk",isActive:()=>e.isActive("link")||!1,disabled:!e.can().setLink({href:""}),icon:"Link",tooltip:r("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new _t({props:{handleClick:(t,e)=>{const{schema:r,doc:n,tr:i}=t.state,o=Fy(n.resolve(e),r.marks.link);if(!o)return!1;const s=n.resolve(o.from),a=n.resolve(o.to),l=i.setSelection(new et(s,a));t.dispatch(l)}}})]}}),JY=Nt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",lt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:r}=e,{$from:n,$to:i}=r,o=t();return n.parentOffset===0?o.insertContentAt({from:Math.max(n.pos-1,0),to:i.pos},{type:this.name}):sO(r)?o.insertContentAt(i.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({tr:s,dispatch:a})=>{var l;if(a){const{$to:c}=s.selection,d=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?s.setSelection(et.create(s.doc,c.pos+1)):c.nodeAfter.isBlock?s.setSelection(rt.create(s.doc,c.pos)):s.setSelection(et.create(s.doc,c.pos));else{const f=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();f&&(s.insert(d,f),s.setSelection(et.create(s.doc,d+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Wh({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),ZY=JY.extend({renderHTML(){return["div",lt(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.commands.setHorizontalRule(),disabled:!e.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:r("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});var by=200,Er=function(){};Er.prototype.append=function(e){return e.length?(e=Er.from(e),!this.length&&e||e.length<by&&this.leafAppend(e)||this.length<by&&e.leafPrepend(this)||this.appendInner(e)):this};Er.prototype.prepend=function(e){return e.length?Er.from(e).append(this):this};Er.prototype.appendInner=function(e){return new QY(this,e)};Er.prototype.slice=function(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.length),e>=r?Er.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,r))};Er.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Er.prototype.forEach=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(e,r,n,0):this.forEachInvertedInner(e,r,n,0)};Er.prototype.map=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},r,n),i};Er.from=function(e){return e instanceof Er?e:e&&e.length?new ND(e):Er.empty};var ND=function(t){function e(n){t.call(this),this.values=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,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 l=o;l<s;l++)if(i(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,a){for(var l=o-1;l>=s;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=by)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=by)return new e(i.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e}(Er);Er.empty=new ND([]);var QY=function(t){function e(r,n){t.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,o,s){var a=this.left.length;if(i<a&&this.left.forEachInner(n,i,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(n,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(n,i-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(n,Math.min(i,a),o,s)===!1)return!1},e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(n,i):n>=o?this.right.slice(n-o,i-o):this.left.slice(n,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(Er);const eJ=500;class Fi{constructor(e,r){this.items=e,this.eventCount=r}popEvent(e,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,o;r&&(i=this.remapping(n,this.items.length),o=i.maps.length);let s=e.tr,a,l,c=[],d=[];return this.items.forEach((f,p)=>{if(!f.step){i||(i=this.remapping(n,p+1),o=i.maps.length),o--,d.push(f);return}if(i){d.push(new Qs(f.map));let m=f.step.map(i.slice(o)),g;m&&s.maybeStep(m).doc&&(g=s.mapping.maps[s.mapping.maps.length-1],c.push(new Qs(g,void 0,void 0,c.length+d.length))),o--,g&&i.appendMap(g,o)}else s.maybeStep(f.step);if(f.selection)return a=i?f.selection.map(i.slice(o)):f.selection,l=new Fi(this.items.slice(0,n).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,r,n,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let d=0;d<e.steps.length;d++){let f=e.steps[d].invert(e.docs[d]),p=new Qs(e.mapping.maps[d],f,r),m;(m=l&&l.merge(p))&&(p=m,d?o.pop():a=a.slice(0,a.length-1)),o.push(p),r&&(s++,r=void 0),i||(l=p)}let c=s-n.depth;return c>rJ&&(a=tJ(a,c),s-=c),new Fi(a.append(o),s)}remapping(e,r){let n=new Nu;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,s)},e,r),n}addMaps(e){return this.eventCount==0?this:new Fi(this.items.append(e.map(r=>new Qs(r))),this.eventCount)}rebased(e,r){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-r),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},i);let l=r;this.items.forEach(p=>{let m=o.getMirror(--l);if(m==null)return;s=Math.min(s,m);let g=o.maps[m];if(p.step){let b=e.steps[m].invert(e.docs[m]),S=p.selection&&p.selection.map(o.slice(l+1,m));S&&a++,n.push(new Qs(g,b,S))}else n.push(new Qs(g))},i);let c=[];for(let p=r;p<s;p++)c.push(new Qs(o.maps[p]));let d=this.items.slice(0,i).append(c).append(n),f=new Fi(d,a);return f.emptyItemCount()>eJ&&(f=f.compress(this.items.length-n.length)),f}emptyItemCount(){let e=0;return this.items.forEach(r=>{r.step||e++}),e}compress(e=this.items.length){let r=this.remapping(0,e),n=r.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(r.slice(n)),c=l&&l.getMap();if(n--,c&&r.appendMap(c,n),l){let d=s.selection&&s.selection.map(r.slice(n));d&&o++;let f=new Qs(c.invert(),l,d),p,m=i.length-1;(p=i.length&&i[m].merge(f))?i[m]=p:i.push(f)}}else s.map&&n--},this.items.length,0),new Fi(Er.from(i.reverse()),o)}}Fi.empty=new Fi(Er.empty,0);function tJ(t,e){let r;return t.forEach((n,i)=>{if(n.selection&&e--==0)return r=i,!1}),t.slice(r)}let Qs=class DD{constructor(e,r,n,i){this.map=e,this.step=r,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let r=e.step.merge(this.step);if(r)return new DD(r.getMap().invert(),r,this.selection)}}};class oa{constructor(e,r,n,i,o){this.done=e,this.undone=r,this.prevRanges=n,this.prevTime=i,this.prevComposition=o}}const rJ=20;function nJ(t,e,r,n){let i=r.getMeta(Hl),o;if(i)return i.historyState;r.getMeta(sJ)&&(t=new oa(t.done,t.undone,null,0,-1));let s=r.getMeta("appendedTransaction");if(r.steps.length==0)return t;if(s&&s.getMeta(Hl))return s.getMeta(Hl).redo?new oa(t.done.addTransform(r,void 0,n,Ym(e)),t.undone,MT(r.mapping.maps),t.prevTime,t.prevComposition):new oa(t.done,t.undone.addTransform(r,void 0,n,Ym(e)),null,t.prevTime,t.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=r.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(r.time||0)-n.newGroupDelay||!iJ(r,t.prevRanges)),c=s?Rw(t.prevRanges,r.mapping):MT(r.mapping.maps);return new oa(t.done.addTransform(r,l?e.selection.getBookmark():void 0,n,Ym(e)),Fi.empty,c,r.time,a??t.prevComposition)}else return(o=r.getMeta("rebased"))?new oa(t.done.rebased(r,o),t.undone.rebased(r,o),Rw(t.prevRanges,r.mapping),t.prevTime,t.prevComposition):new oa(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),Rw(t.prevRanges,r.mapping),t.prevTime,t.prevComposition)}function iJ(t,e){if(!e)return!1;if(!t.docChanged)return!0;let r=!1;return t.mapping.maps[0].forEach((n,i)=>{for(let o=0;o<e.length;o+=2)n<=e[o+1]&&i>=e[o]&&(r=!0)}),r}function MT(t){let e=[];for(let r=t.length-1;r>=0&&e.length==0;r--)t[r].forEach((n,i,o,s)=>e.push(o,s));return e}function Rw(t,e){if(!t)return null;let r=[];for(let n=0;n<t.length;n+=2){let i=e.map(t[n],1),o=e.map(t[n+1],-1);i<=o&&r.push(i,o)}return r}function oJ(t,e,r){let n=Ym(e),i=Hl.get(e).spec.config,o=(r?t.undone:t.done).popEvent(e,n);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(r?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,n),l=new oa(r?a:o.remaining,r?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(Hl,{redo:r,historyState:l})}let Iw=!1,NT=null;function Ym(t){let e=t.plugins;if(NT!=e){Iw=!1,NT=e;for(let r=0;r<e.length;r++)if(e[r].spec.historyPreserveItems){Iw=!0;break}}return Iw}const Hl=new St("history"),sJ=new St("closeHistory");function aJ(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new _t({key:Hl,state:{init(){return new oa(Fi.empty,Fi.empty,null,0,-1)},apply(e,r,n){return nJ(r,n,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,r){let n=r.inputType,i=n=="historyUndo"?LD:n=="historyRedo"?FD:null;return i?(r.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function PD(t,e){return(r,n)=>{let i=Hl.getState(r);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(n){let o=oJ(i,r,t);o&&n(e?o.scrollIntoView():o)}return!0}}const LD=PD(!1,!0),FD=PD(!0,!0),lJ=yt.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>LD(t,e),redo:()=>({state:t,dispatch:e})=>FD(t,e)}},addProseMirrorPlugins(){return[aJ(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});function cJ(t){var c;const{icon:e=void 0,tooltip:r=void 0,customClass:n="",tooltipOptions:i={},action:o=void 0,isActive:s=void 0,children:a}=t,l=Yh[e];return x.jsxs(Sd,{children:[x.jsx(kd,{asChild:!0,children:x.jsxs(qh,{size:"sm",className:`richtext-w-[32px] richtext-h-[32px] ${n}`,disabled:s==null?void 0:s(),onClick:o,children:[l&&x.jsx(l,{className:"richtext-w-4 richtext-h-4"}),a&&x.jsx(x.Fragment,{children:a})]})}),r&&x.jsx(sc,{...i,children:x.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24",children:[x.jsx("div",{children:r}),!!((c=t==null?void 0:t.shortcutKeys)!=null&&c.length)&&x.jsx("span",{children:$y(t==null?void 0:t.shortcutKeys)})]})})]})}const uJ=["undo","redo"],dJ=lJ.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),depth:100,newGroupDelay:500,button:({editor:e,t:r})=>uJ.map(n=>({component:cJ,componentProps:{action:()=>{n==="undo"&&e.chain().focus().undo().run(),n==="redo"&&e.chain().focus().redo().run()},shortcutKeys:n==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:n==="undo"?!e.can().undo():!e.can().redo(),isActive:()=>n==="undo"?!e.can().undo():!e.can().redo(),icon:n==="undo"?"Undo2":"Redo2",tooltip:r(`editor.${n}.tooltip`)}}))}}}),fJ=yt.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const n=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(n)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,r=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let t=!1;return[new _t({key:new St("characterCount"),appendTransaction:(e,r,n)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const o=this.storage.characters({node:n.doc});if(o>i){const s=o-i,a=0,l=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=n.tr.deleteRange(a,l);return t=!0,c}t=!0},filterTransaction:(e,r)=>{const n=this.options.limit;if(!e.docChanged||n===0||n===null||n===void 0)return!0;const i=this.storage.characters({node:r.doc}),o=this.storage.characters({node:e.doc});if(o<=n||i>n&&o>n&&o<=i)return!0;if(i>n&&o>n&&o>i||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=o-n,c=a-l,d=a;return e.deleteRange(c,d),!(this.storage.characters({node:e.doc})>n)}})]}});function hJ(t={}){return new _t({view(e){return new pJ(e,t)}})}class pJ{constructor(e,r){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=s=>{this[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:r})=>this.editorView.dom.removeEventListener(e,r))}update(e,r){this.cursorPos!=null&&r.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),r=!e.parent.inlineContent,n;if(r){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let d=c.getBoundingClientRect(),f=a?d.bottom:d.top;a&&l&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),n={left:d.left,right:d.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!n){let a=this.editorView.coordsAtPos(this.cursorPos);n={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",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);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=n.left-o+"px",this.element.style.top=n.top-s+"px",this.element.style.width=n.right-n.left+"px",this.element.style.height=n.bottom-n.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),i=n&&n.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,r,e):i;if(r&&!o){let s=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=tI(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)}}const mJ=yt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[hJ(this.options)]}}),gJ=yt.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new _t({key:new St("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:r,isFocused:n}=this.editor,{anchor:i}=e,o=[];if(!r||!n)return Tt.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(l.isText)return;if(!(i>=c&&i<=c+l.nodeSize-1))return!1;s+=1});let a=0;return t.descendants((l,c)=>{if(l.isText||!(i>=c&&i<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";o.push(Qt.node(c,c+l.nodeSize,{class:this.options.className}))}),Tt.create(t,o)}}})]}});class ir extends ot{constructor(e){super(e,e)}map(e,r){let n=e.resolve(r.map(this.head));return ir.valid(n)?new ir(n):ot.near(n)}content(){return qe.empty}eq(e){return e instanceof ir&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new ir(e.resolve(r.pos))}getBookmark(){return new YS(this.anchor)}static valid(e){let r=e.parent;if(r.isTextblock||!yJ(e)||!vJ(e))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let i=r.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,r,n=!1){e:for(;;){if(!n&&ir.valid(e))return e;let i=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(r>0?e.indexAfter(s)<a.childCount:e.index(s)>0){o=a.child(r>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;i+=r;let l=e.doc.resolve(i);if(ir.valid(l))return l}for(;;){let s=r>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!rt.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*r),n=!1;continue e}break}o=s,i+=r;let a=e.doc.resolve(i);if(ir.valid(a))return a}return null}}}ir.prototype.visible=!1;ir.findFrom=ir.findGapCursorFrom;ot.jsonID("gapcursor",ir);class YS{constructor(e){this.pos=e}map(e){return new YS(e.map(this.pos))}resolve(e){let r=e.resolve(this.pos);return ir.valid(r)?new ir(r):ot.near(r)}}function yJ(t){for(let e=t.depth;e>=0;e--){let r=t.index(e),n=t.node(e);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function vJ(t){for(let e=t.depth;e>=0;e--){let r=t.indexAfter(e),n=t.node(e);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function bJ(){return new _t({props:{decorations:kJ,createSelectionBetween(t,e,r){return e.pos==r.pos&&ir.valid(r)?new ir(r):null},handleClick:xJ,handleKeyDown:wJ,handleDOMEvents:{beforeinput:SJ}}})}const wJ=z1({ArrowLeft:dm("horiz",-1),ArrowRight:dm("horiz",1),ArrowUp:dm("vert",-1),ArrowDown:dm("vert",1)});function dm(t,e){const r=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,i,o){let s=n.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof et){if(!o.endOfTextblock(r)||a.depth==0)return!1;l=!1,a=n.doc.resolve(e>0?a.after():a.before())}let c=ir.findGapCursorFrom(a,e,l);return c?(i&&i(n.tr.setSelection(new ir(c))),!0):!1}}function xJ(t,e,r){if(!t||!t.editable)return!1;let n=t.state.doc.resolve(e);if(!ir.valid(n))return!1;let i=t.posAtCoords({left:r.clientX,top:r.clientY});return i&&i.inside>-1&&rt.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new ir(n))),!0)}function SJ(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof ir))return!1;let{$from:r}=t.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(t.state.schema.nodes.text);if(!n)return!1;let i=Le.empty;for(let s=n.length-1;s>=0;s--)i=Le.from(n[s].createAndFill(null,i));let o=t.state.tr.replace(r.pos,r.pos,new qe(i,0,0));return o.setSelection(et.near(o.doc.resolve(r.pos+1))),t.dispatch(o),!1}function kJ(t){if(!(t.selection instanceof ir))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Tt.create(t.doc,[Qt.widget(t.selection.head,e,{key:"gapcursor"})])}const _J=yt.create({name:"gapCursor",addProseMirrorPlugins(){return[bJ()]},extendNodeSchema(t){var e;const r={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=dt(Ze(t,"allowGapCursor",r)))!==null&&e!==void 0?e:null}}}),EJ=Nt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",lt(this.options.HTMLAttributes,t)]},renderText(){return`
271
+ `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:r,editor:n})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:o}=r;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=n.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&l&&s){const f=l.filter(p=>a.includes(p.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),CJ=Nt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",lt(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),TJ=Nt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),AJ=yt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new _t({key:new St("placeholder"),props:{decorations:({doc:t,selection:e})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!r)return null;const o=this.editor.isEmpty;return t.descendants((s,a)=>{const l=n>=a&&n<=a+s.nodeSize,c=!s.isLeaf&&zy(s);if((l||!this.options.showOnlyCurrent)&&c){const d=[this.options.emptyNodeClass];o&&d.push(this.options.emptyEditorClass);const f=Qt.node(a,a+s.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:a,hasAnchor:l}):this.options.placeholder});i.push(f)}return this.options.includeChildren}),Tt.create(t,i)}}})]}}),RJ=Nt.create({name:"text",group:"inline"}),IJ=Nt.create({name:"doc",topNode:!0,content:"block+"}),OJ=IJ.extend({content:"(block|columns)+"});function MJ(t,e,r=null){return r?t.createChecked({index:e},r):t.createAndFill({index:e})}function NJ(t){if(t.cached.columnsNodeTypes)return t.cached.columnsNodeTypes;const e={columns:t.nodes.columns,column:t.nodes.column};return t.cached.columnsNodeTypes=e,e}function DJ(t,e,r=null){const n=NJ(t),i=[];for(let o=0;o<e;o+=1){const s=MJ(n.column,o,r);s&&i.push(s)}return n.columns.createChecked({cols:e},i)}function Ow({state:t,dispatch:e,type:r}){const n=Gl(o=>o.type.name===dd.name)(t.selection),i=Gl(o=>o.type.name===lv.name)(t.selection);if(e&&n&&i){const o=n.node,s=i.node.attrs.index,a=o.toJSON();let l=s;r==="delete"?(l=s-1,a.content.splice(s,1)):(l=r==="addBefore"?s:s+1,a.content.splice(l,0,{type:"column",attrs:{index:s},content:[{type:"paragraph"}]})),a.attrs.cols=a.content.length,a.content.forEach((p,m)=>{p.attrs.index=m});const c=as.fromJSON(t.schema,a);let d=n.pos;c.content.forEach((p,m,g)=>{g<l&&(d+=p.nodeSize)});const f=t.tr.setTime(Date.now());f.replaceWith(n.pos,n.pos+n.node.nodeSize,c).setSelection(et.near(f.doc.resolve(d))),e(f)}return!0}function DT({state:t,dispatch:e,type:r}){const n=Gl(o=>o.type.name===dd.name)(t.selection),i=Gl(o=>o.type.name===lv.name)(t.selection);if(e&&n&&i){const o=n.node,s=i.node.attrs.index;let a=0;r==="before"?a=(s-1+o.attrs.cols)%o.attrs.cols:a=(s+1)%o.attrs.cols;let l=n.pos;o.content.forEach((d,f,p)=>{p<a&&(l+=d.nodeSize)});const c=t.tr.setTime(Date.now());return c.setSelection(et.near(c.doc.resolve(l))),e(c),!0}return!1}const PJ=200,dd=Nt.create({name:"columns",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"column{1,}",priority:PJ,addOptions(){return{HTMLAttributes:{class:"columns"}}},addAttributes(){return{cols:{default:2,parseHTML:t=>t.getAttribute("cols")}}},parseHTML(){return[{tag:"div[class=grid]"}]},renderHTML({HTMLAttributes:t}){return["div",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{insertColumns:t=>({tr:e,dispatch:r,editor:n})=>{const i=DJ(n.schema,t&&t.cols||3);if(r){const o=e.selection.anchor+1;e.replaceSelectionWith(i).scrollIntoView().setSelection(et.near(e.doc.resolve(o)))}return!0},addColBefore:()=>({dispatch:t,state:e})=>Ow({dispatch:t,state:e,type:"addBefore"}),addColAfter:()=>({dispatch:t,state:e})=>Ow({dispatch:t,state:e,type:"addAfter"}),deleteCol:()=>({dispatch:t,state:e})=>Ow({dispatch:t,state:e,type:"delete"})}},addKeyboardShortcuts(){return{"Mod-Alt-G":()=>this.editor.commands.insertColumns(),Tab:()=>DT({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"after"}),"Shift-Tab":()=>DT({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"before"})}}}),lv=Nt.create({name:"column",content:"block+",isolating:!0,addOptions(){return{HTMLAttributes:{class:"column"}}},addAttributes(){return{index:{default:0,parseHTML:t=>t.getAttribute("index")}}},parseHTML(){return[{tag:"div[class=column]"}]},renderHTML({HTMLAttributes:t}){return["div",lt(this.options.HTMLAttributes,t),0]}}),LJ=yt.create({name:"columnActionButton",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>{e.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:r("editor.columns.tooltip")}})}}}),FJ=yt.create({name:"selection",addProseMirrorPlugins(){const{editor:t}=this;return[new _t({key:new St("selection"),props:{decorations(e){return e.selection.empty||t.isFocused===!0?null:Tt.create(e.doc,[Qt.inline(e.selection.from,e.selection.to,{class:"selection"})])}}})]}});function jJ(t){const{t:e}=Et(),r=J.useMemo(()=>[{name:"paragraph",label:e("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>t.editor.isActive("paragraph")&&!t.editor.isActive("orderedList")&&!t.editor.isActive("bulletList")&&!t.editor.isActive("taskList"),action:()=>t.editor.chain().focus().clearNodes().run()},{name:"heading1",label:e("editor.heading.h1.tooltip"),isActive:()=>t.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>t.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:e("editor.heading.h2.tooltip"),isActive:()=>t.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>t.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:e("editor.heading.h3.tooltip"),isActive:()=>t.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>t.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:e("editor.bulletlist.tooltip"),isActive:()=>t.editor.isActive("bulletList"),iconName:"List",action:()=>t.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:e("editor.orderedlist.tooltip"),isActive:()=>t.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>t.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:e("editor.tasklist.tooltip"),isActive:()=>t.editor.isActive("taskList"),iconName:"ListTodo",action:()=>t.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:e("editor.blockquote.tooltip"),isActive:()=>t.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>t.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:e("editor.codeblock.tooltip"),isActive:()=>t.editor.isActive("codeBlock"),iconName:"Code2",action:()=>t.editor.chain().focus().clearNodes().toggleCodeBlock().run()}],[t.editor,e]),n=J.useMemo(()=>r.filter(i=>i.isActive()).pop()??{label:"Empty"},[r]);return x.jsxs(Ia,{children:[x.jsx(Oa,{asChild:!0,children:x.jsxs(Mt,{variant:"ghost",className:"richtext-h-[32px] richtext-flex richtext-gap-1 richtext-px-1.5",children:[x.jsxs("span",{className:"richtext-text-sm richtext-font-normal richtext-whitespace-nowrap",children:[" ",n==null?void 0:n.label]}),x.jsx(He.ChevronDown,{className:"richtext-w-4 richtext-h-4"})]})}),x.jsx(ps,{hideWhenDetached:!0,className:"richtext-w-full richtext-p-1",align:"start",sideOffset:5,children:r.map((i,o)=>{var a;const s=Yh[i.iconName];return x.jsx(oc,{checked:((a=i.isActive)==null?void 0:a.call(i))||!1,onClick:()=>i.action(),className:"richtext-cursor-pointer",children:x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-px-2",children:[x.jsx(s,{className:"richtext-w-3 richtext-h3"}),x.jsxs("span",{children:[" ",i.label]})]})},`text-bubble-${o}`)})})]})}const BJ=yt.create({name:"text-bubble",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:()=>({component:jJ,componentProps:{}})}}});function PT({types:t,node:e}){return Array.isArray(t)&&t.includes(e.type)||e.type===t}const zJ=yt.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph"]}},addProseMirrorPlugins(){const t=new St(this.name),e=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>this.options.notAfter.includes(r.name));return[new _t({key:t,appendTransaction:(r,n,i)=>{const{doc:o,tr:s,schema:a}=i,l=t.getState(i),c=o.content.size,d=a.nodes[this.options.node];if(l)return s.insert(c,d.create())},state:{init:(r,n)=>{const i=n.tr.doc.lastChild;return!PT({node:i,types:e})},apply:(r,n)=>{if(!r.docChanged)return n;const i=r.doc.lastChild;return!PT({node:i,types:e})}}})]}}),HJ=yt.create({name:"base-kit",addExtensions(){const t=[];return this.options.document!==!1&&t.push(OJ.configure()),this.options.placeholder!==!1&&t.push(AJ.configure({placeholder:({node:e,pos:r,editor:n})=>{var i,o,s,a,l;return((i=e==null?void 0:e.type)==null?void 0:i.name)==="columns"||((o=e==null?void 0:e.content)==null?void 0:o.size)!==0?"":((s=e==null?void 0:e.type)==null?void 0:s.name)==="heading"?`${Ot.t(`editor.heading.h${e.attrs.level}.tooltip`)}`:((a=e==null?void 0:e.type)==null?void 0:a.name)==="codeBlock"||((l=e==null?void 0:e.type)==null?void 0:l.name)==="table"?"":n.extensionManager.extensions.some(c=>c.name==="slashCommand")?Ot.t("editor.slash"):Ot.t("editor.content")},...this.options.placeholder})),this.options.focus!==!1&&t.push(gJ.configure({className:"focus",...this.options.focus})),this.options.text!==!1&&t.push(RJ.configure()),this.options.textBubble!==!1&&t.push(BJ.configure()),this.options.gapcursor!==!1&&t.push(_J.configure()),this.options.dropcursor!==!1&&t.push(mJ.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&t.push(fJ.configure(this.options.characterCount)),this.options.paragraph!==!1&&t.push(TJ.configure(this.options.paragraph)),this.options.hardBreak!==!1&&t.push(EJ.configure(this.options.hardBreak)),this.options.listItem!==!1&&t.push(CJ.configure(this.options.listItem)),this.options.textStyle!==!1&&t.push(VX.configure(this.options.textStyle)),this.options.trailingNode!==!1&&t.push(zJ.configure(this.options.trailingNode)),this.options.selection!==!1&&t.push(FJ),this.options.multiColumn!==!1&&(t.push(lv),t.push(dd)),t}}),jD=Mn.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),BD=Mn.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),$J=yt.create({name:"subAndSuperScript",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:r,t:n})=>{const i=r.options.subscript,o=r.options.superscript,s={component:Ve,componentProps:{action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",tooltip:n("editor.subscript.tooltip")}},a={component:Ve,componentProps:{action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",tooltip:n("editor.superscript.tooltip")}},l=[];return i!==!1&&l.push(s),o!==!1&&l.push(a),l}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(jD.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(BD.configure(this.options.superscript)),t}});function UJ(t){var r;const e=J.useMemo(()=>{var o;const n=(o=t==null?void 0:t.items)==null?void 0:o.find(s=>s.isActive());return n&&!n.default?{...n,icon:n!=null&&n.icon?n==null?void 0:n.icon:t==null?void 0:t.icon}:{title:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return x.jsxs(Ia,{children:[x.jsx(Oa,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(Ve,{customClass:"!richtext-w-12 richtext-h-12",icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,children:x.jsx(IN,{className:"richtext-w-3 richtext-h-3 richtext-text-gray-500"})})}),x.jsx(ps,{className:"w-full",children:(r=t==null?void 0:t.items)==null?void 0:r.map((n,i)=>x.jsxs(oc,{checked:e.title===n.title,onClick:n.action,className:"richtext-flex richtext-items-center richtext-gap-3",children:[x.jsx(Rt,{name:n==null?void 0:n.icon}),x.jsx("span",{className:"richtext-ml-1",children:n.title}),!!(n!=null&&n.shortcutKeys)&&x.jsx("span",{className:"richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",children:$y(n.shortcutKeys)})]},`more-mark-${i}`))})]})}const WJ=yt.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,extension:r,t:n}){const i=r.options.subscript,o=r.options.superscript,s={action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",title:n("editor.subscript.tooltip"),shortcutKeys:["mod","."]},a={action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",title:n("editor.superscript.tooltip"),shortcutKeys:["mod",","]},l=[];return i!==!1&&l.push(s),o!==!1&&l.push(a),{component:UJ,componentProps:{icon:"Type",tooltip:n("editor.moremark"),disabled:!e.isEditable,items:l}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(jD.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(BD.configure(this.options.superscript)),t}}),VJ=yt.create({name:"indent",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","blockquote"],minIndent:Il.min,maxIndent:Il.max,button({editor:e,t:r}){return[{component:Ve,componentProps:{action:()=>{e.commands.indent()},shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:r("editor.indent.tooltip")}},{component:Ve,componentProps:{action:()=>{e.commands.outdent()},shortcutKeys:["Shift","Tab"],icon:"IndentDecrease",tooltip:r("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:t=>{const e=t.dataset.indent;return(e?Number.parseInt(e,10):0)||0},renderHTML:t=>t.indent?{"data-indent":t.indent}:{}}}}]},addCommands(){return{indent:()=>yT({delta:Il.more,types:this.options.types}),outdent:()=>yT({delta:Il.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function GJ(t){return Number.parseFloat(t.replace("%",""))/100}function KJ(t){const{t:e}=Et(),[r,n]=J.useState("default");function i(s){s==="default"?t.editor.commands.unsetLineHeight():t.editor.commands.setLineHeight(s),n(s)}const o=J.useMemo(()=>{const l=t.editor.extensionManager.extensions.find(c=>c.name==="lineHeight").options.lineHeights.map(c=>({label:GJ(c),value:c}));return l.unshift({label:e("editor.default"),value:"default"}),l},[t]);return x.jsxs(Ia,{children:[x.jsx(Oa,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(Ve,{customClass:"!richtext-w-12 richtext-h-12",icon:"LineHeight",tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,children:x.jsx(Rt,{className:"richtext-w-3 richtext-h-3 richtext-ml-1 richtext-text-zinc-500",name:"MenuDown"})})}),x.jsx(ps,{className:"richtext-min-w-24",children:o==null?void 0:o.map((s,a)=>x.jsx(oc,{checked:s.value===r,onClick:()=>i(s.value),children:s.label},`lineHeight-${a}`))})]})}const qJ=["paragraph","heading","list_item","todo_item"];function XJ(t,e){const{selection:r,doc:n}=t;if(!r||!n||!(r instanceof et||r instanceof Gn))return t;const{from:i,to:o}=r,s=[],a=e&&e!==OM?e:null;if(n.nodesBetween(i,o,(l,c)=>{const d=l.type;return qJ.includes(d.name)?((l.attrs.lineHeight||null)!==a&&s.push({node:l,pos:c,nodeType:d}),d.name!=="list_item"&&d.name!=="todo_item"):!0}),s.length===0)return t;for(const l of s){const{node:c,pos:d,nodeType:f}=l;let{attrs:p}=c;p={...p,lineHeight:a},t=t.setNodeMarkup(d,f,p,c.marks)}return t}function YJ(t){return({state:e,dispatch:r})=>{const{selection:n}=e;let{tr:i}=e;return i=i.setSelection(n),i=XJ(i,t),i.docChanged?(r&&r(i),!0):!1}}const JJ=yt.create({name:"lineHeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:w7,defaultHeight:OM,button({editor:e,t:r}){return{component:KJ,componentProps:{editor:e,tooltip:r("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight||this.options.defaultHeight,renderHTML:t=>t.lineHeight===this.options.defaultHeight||!t.lineHeight?{}:{style:`line-height: ${t.lineHeight}`}}}}]},addCommands(){return{setLineHeight:t=>YJ(t),unsetLineHeight:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"lineHeight"))}}});function ZJ(t){var e;const{char:r,allowSpaces:n,allowedPrefixes:i,startOfLine:o,$position:s}=t,a=j4(r),l=new RegExp(`\\s${a}$`),c=o?"^":"",d=n?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),f=((e=s.nodeBefore)===null||e===void 0?void 0:e.isText)&&s.nodeBefore.text;if(!f)return null;const p=s.pos-f.length,m=Array.from(f.matchAll(d)).pop();if(!m||m.input===void 0||m.index===void 0)return null;const g=m.input.slice(Math.max(0,m.index-1),m.index),b=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(g);if(i!==null&&!b)return null;const S=p+m.index;let w=S+m[0].length;return n&&l.test(f.slice(w-1,w+1))&&(m[0]+=" ",w+=1),S<s.pos&&w>=s.pos?{range:{from:S,to:w},query:m[0].slice(r.length),text:m[0]}:null}const QJ=new St("suggestion");function JS({pluginKey:t=QJ,editor:e,char:r="@",allowSpaces:n=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=()=>null,items:c=()=>[],render:d=()=>({}),allow:f=()=>!0,findSuggestionMatch:p=ZJ}){let m;const g=d==null?void 0:d(),b=new _t({key:t,view(){return{update:async(S,w)=>{var T,M,j,$,W,Y,ee;const P=(T=this.key)===null||T===void 0?void 0:T.getState(w),fe=(M=this.key)===null||M===void 0?void 0:M.getState(S.state),de=P.active&&fe.active&&P.range.from!==fe.range.from,U=!P.active&&fe.active,ne=P.active&&!fe.active,R=!U&&!ne&&P.query!==fe.query,le=U||de&&R,Ce=R||de,he=ne||de&&R;if(!le&&!Ce&&!he)return;const Fe=he&&!le?P:fe,ye=S.dom.querySelector(`[data-decoration-id="${Fe.decorationId}"]`);m={editor:e,range:Fe.range,query:Fe.query,text:Fe.text,items:[],command:ze=>l({editor:e,range:Fe.range,props:ze}),decorationNode:ye,clientRect:ye?()=>{var ze;const{decorationId:ue}=(ze=this.key)===null||ze===void 0?void 0:ze.getState(e.state),V=S.dom.querySelector(`[data-decoration-id="${ue}"]`);return(V==null?void 0:V.getBoundingClientRect())||null}:null},le&&((j=g==null?void 0:g.onBeforeStart)===null||j===void 0||j.call(g,m)),Ce&&(($=g==null?void 0:g.onBeforeUpdate)===null||$===void 0||$.call(g,m)),(Ce||le)&&(m.items=await c({editor:e,query:Fe.query})),he&&((W=g==null?void 0:g.onExit)===null||W===void 0||W.call(g,m)),Ce&&((Y=g==null?void 0:g.onUpdate)===null||Y===void 0||Y.call(g,m)),le&&((ee=g==null?void 0:g.onStart)===null||ee===void 0||ee.call(g,m))},destroy:()=>{var S;m&&((S=g==null?void 0:g.onExit)===null||S===void 0||S.call(g,m))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(S,w,T,M){const{isEditable:j}=e,{composing:$}=e.view,{selection:W}=S,{empty:Y,from:ee}=W,P={...w};if(P.composing=$,j&&(Y||e.view.composing)){(ee<w.range.from||ee>w.range.to)&&!$&&!w.composing&&(P.active=!1);const fe=p({char:r,allowSpaces:n,allowedPrefixes:i,startOfLine:o,$position:W.$from}),de=`id_${Math.floor(Math.random()*4294967295)}`;fe&&f({editor:e,state:M,range:fe.range,isActive:w.active})?(P.active=!0,P.decorationId=w.decorationId?w.decorationId:de,P.range=fe.range,P.query=fe.query,P.text=fe.text):P.active=!1}else P.active=!1;return P.active||(P.decorationId=null,P.range={from:0,to:0},P.query=null,P.text=null),P}},props:{handleKeyDown(S,w){var T;const{active:M,range:j}=b.getState(S.state);return M&&((T=g==null?void 0:g.onKeyDown)===null||T===void 0?void 0:T.call(g,{view:S,event:w,range:j}))||!1},decorations(S){const{active:w,range:T,decorationId:M}=b.getState(S);return w?Tt.create(S.doc,[Qt.inline(T.from,T.to,{nodeName:s,class:a,"data-decoration-id":M})]):null}}});return b}const zD=Xh(!1);function eZ(){return Xy(zD)}const Ru={setOpen:t=>{zD.set(t)}},HD=Xh(!1);function tZ(){return Xy(HD)}const Wf={setOpen:t=>{HD.set(t)}};function rZ(t){const e=[{name:"format",title:Ot.t("editor.slash.format"),commands:[]},{name:"insert",title:Ot.t("editor.slash.insert"),commands:[]}];return t.forEach(r=>{r.name.toLowerCase()==="heading"&&r.options.levels.forEach(n=>{e[0].commands.push({name:`heading${n}`,label:Ot.t(`editor.heading.h${n}.tooltip`),aliases:[`h${n}`,"bt",`bt${n}`],iconName:`Heading${n}`,action:({editor:i,range:o})=>{i.chain().focus().deleteRange(o).setHeading({level:n}).run()}})}),r.name.toLowerCase()==="bulletlist"&&e[0].commands.push({name:"bulletList",label:Ot.t("editor.bulletlist.tooltip"),aliases:["ul","yxlb"],iconName:"List",action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).toggleBulletList().run()}}),r.name.toLowerCase()==="orderedlist"&&e[0].commands.push({name:"numberedList",label:Ot.t("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).toggleOrderedList().run()}}),r.name.toLowerCase()==="tasklist"&&e[0].commands.push({name:"taskList",label:Ot.t("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).toggleTaskList().run()}}),r.name.toLowerCase()==="blockquote"&&e[0].commands.push({name:"blockquote",label:Ot.t("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).setBlockquote().run()}}),r.name.toLowerCase()==="codeblock"&&e[0].commands.push({name:"codeBlock",label:Ot.t("editor.codeblock.tooltip"),iconName:"Code2",description:"Code block with syntax highlighting",shouldBeHidden:n=>n.isActive("columns"),action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).setCodeBlock().run()}}),r.name.toLowerCase()==="image"&&e[1].commands.push({name:"image",label:Ot.t("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:n=>n.isActive("columns"),action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).run(),Ru.setOpen(!0)}}),r.name.toLowerCase()==="video"&&e[1].commands.push({name:"video",label:Ot.t("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:n=>n.isActive("columns"),action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).run(),Wf.setOpen(!0)}}),r.name.toLowerCase()==="table"&&e[1].commands.push({name:"table",label:Ot.t("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:n=>n.isActive("columns"),action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}}),r.name.toLowerCase()==="horizontalrule"&&e[1].commands.push({name:"horizontalRule",label:Ot.t("editor.horizontalrule.tooltip"),iconName:"Minus",description:"Insert a horizontal divider",aliases:["hr","fgx","fg"],action:({editor:n,range:i})=>{n.chain().focus().deleteRange(i).setHorizontalRule().run()}}),r.name.toLowerCase()==="columns"&&e[1].commands.push({name:"columns",label:Ot.t("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",action:({editor:n})=>{n.chain().focus().insertColumns({cols:2}).run()}})}),e}function nZ(t,e){var S,w;const[r,n]=J.useState(0),[i,o]=J.useState(0),s=J.useRef(null),{t:a}=Et(),l=J.useRef([]);J.useImperativeHandle(e,()=>({onKeyDown:c})),J.useEffect(()=>{if(!s.current)return;const T=i*1e3+r,M=l.current[T];M&&M.scrollIntoView({behavior:"smooth",block:"nearest"})},[r,i]);function c({event:T}){return T.key==="ArrowUp"?(d(),!0):T.key==="ArrowDown"?(f(),!0):T.key==="Enter"?(p(),!0):!1}function d(){var j;if(t.items.length===0)return!1;let T=r-1,M=i;T<0&&(M=i-1,T=((j=t.items[M])==null?void 0:j.commands.length)-1||0),M<0&&(M=t.items.length-1,T=t.items[M].commands.length-1),n(T),o(M)}function f(){if(t.items.length===0)return!1;const T=t.items[i].commands;let M=r+1,j=i;T.length-1<M&&(M=0,j=i+1),t.items.length-1<j&&(j=0),n(M),o(j)}function p(){if(t.items.length===0||i===-1||r===-1)return!1;m(i,r)}function m(T,M){const j=t.items[T].commands[M];t.command(j)}function g(T,M){m(T,M)}function b(T,M,j){l.current[T*1e3+M]=j}return x.jsx("div",{className:"!richtext-bg-white richtext-rounded-lg dark:!richtext-bg-black richtext-shadow-sm !richtext-border !richtext-border-neutral-200 dark:!richtext-border-neutral-800 !richtext-text-black richtext-max-h-[min(80vh,24rem)] richtext-overflow-auto richtext-flex-wrap richtext-mb-8 richtext-p-1",ref:s,children:(S=t==null?void 0:t.items)!=null&&S.length?x.jsx("div",{className:"richtext-grid richtext-grid-cols-1 richtext-gap-0.5 richtext-min-w-48",children:(w=t==null?void 0:t.items)==null?void 0:w.map((T,M)=>x.jsxs(J.Fragment,{children:[x.jsx("div",{className:"!richtext-text-neutral-500 richtext-text-[0.65rem] richtext-col-[1/-1] richtext-mx-2 richtext-mt-2 richtext-font-semibold richtext-tracking-wider richtext-select-none richtext-uppercase first:richtext-mt-0.5",children:T.title}),T.commands.map((j,$)=>x.jsxs("button",{className:pt("richtext-flex richtext-items-center richtext-gap-3 richtext-px-2 richtext-py-1.5 richtext-text-sm !richtext-text-neutral-800 dark:!richtext-text-neutral-200 richtext-text-left richtext-w-full richtext-rounded-sm richtext-outline-none richtext-transition-colors !richtext-bg-transparent hover:!richtext-bg-accent ",{"slash-command-active":i===M&&r===$}),ref:W=>b(M,$,W),onClick:()=>g(M,$),children:[j.iconUrl&&x.jsx("img",{className:"richtext-w-6 richtext-h-6",src:j.iconUrl,alt:""}),j.iconName&&x.jsx(Rt,{name:j.iconName,className:"!richtext-mr-1 !richtext-text-lg"}),j.label]},`command-${$}`))]},`slash-${T.title}`))}):x.jsx("div",{className:"richtext-p-3",children:x.jsx("span",{className:"richtext-text-xs richtext-text-gray-800 dark:richtext-text-gray-100",children:a("editor.slash.empty")})})})}const iZ=J.forwardRef(nZ),vl="slashCommand";let Ft;const oZ=yt.create({name:vl,priority:200,onCreate(){Ft=gd("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[JS({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new St(vl),allow:({state:t,range:e})=>{var c,d,f;const r=t.doc.resolve(e.from),n=r.depth===1,i=r.parent.type.name==="paragraph",o=((c=r.parent.textContent)==null?void 0:c.charAt(0))==="/",s=this.editor.isActive("column"),a=(f=r.parent.textContent)==null?void 0:f.slice(Math.max(0,(d=r.parent.textContent)==null?void 0:d.indexOf("/"))),l=!(a!=null&&a.endsWith(" "));return(n&&i&&o||s&&i&&o)&&l},command:({editor:t,range:e,props:r})=>{const{view:n}=t;r.action({editor:t,range:e}),n.focus()},items:({query:t,editor:e})=>rZ(e.extensionManager.extensions).map(s=>({...s,commands:s.commands.filter(a=>{const l=a.label.toLowerCase().trim(),c=t.toLowerCase().trim();if(a.aliases){const d=a.aliases.map(m=>m.toLowerCase().trim()),f=l.match(c),p=d.some(m=>m.match(c));return f||p}return l.match(c)}).filter(a=>a.shouldBeHidden?!a.shouldBeHidden(this.editor):!0)})).filter(s=>s.commands.length>0).map(s=>({...s,commands:s.commands.map(a=>({...a,isEnabled:!0}))})),render:()=>{let t,e=null;return{onStart:r=>{var o;t=new Wy(iZ,{props:r,editor:r.editor});const{view:n}=r.editor,i=()=>{if(!r.clientRect)return r.editor.storage[vl].rect;const s=r.clientRect();if(!s)return r.editor.storage[vl].rect;let a=s.y;if(s.top+t.element.offsetHeight+40>window.innerHeight){const l=s.top+t.element.offsetHeight-window.innerHeight+40;a=s.y-l}return new DOMRect(s.x,a,s.width,s.height)};e=()=>{Ft==null||Ft[0].setProps({getReferenceClientRect:i})},(o=n.dom.parentElement)==null||o.addEventListener("scroll",e),Ft==null||Ft[0].setProps({getReferenceClientRect:i,appendTo:()=>document.body,content:t.element}),Ft==null||Ft[0].show()},onUpdate(r){var s;t.updateProps(r);const{view:n}=r.editor,i=()=>{if(!r.clientRect)return r.editor.storage[vl].rect;const a=r.clientRect();return a?new DOMRect(a.x,a.y,a.width,a.height):r.editor.storage[vl].rect},o=()=>{Ft==null||Ft[0].setProps({getReferenceClientRect:i})};(s=n.dom.parentElement)==null||s.addEventListener("scroll",o),r.editor.storage[vl].rect=r.clientRect?i():{width:0,height:0,left:0,top:0,right:0,bottom:0},Ft==null||Ft[0].setProps({getReferenceClientRect:i})},onKeyDown(r){var n;return r.event.key==="Escape"?(Ft==null||Ft[0].hide(),!0):(Ft!=null&&Ft[0].state.isShown||Ft==null||Ft[0].show(),(n=t.ref)==null?void 0:n.onKeyDown(r))},onExit(r){var n;if(Ft==null||Ft[0].hide(),e){const{view:i}=r.editor;(n=i.dom.parentElement)==null||n.removeEventListener("scroll",e)}t.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),sZ=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,ZS=Nt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",lt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Wh({find:sZ,type:this.type,getAttributes:t=>{const[,,e,r,n]=t;return{src:r,alt:e,title:n}}})]}}),fm={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function aZ(t){var Y,ee;const[e,r]=J.useState({width:nd,height:nd}),[n,i]=J.useState({width:0,height:0}),[o]=J.useState([fm.TOP_LEFT,fm.TOP_RIGHT,fm.BOTTOM_LEFT,fm.BOTTOM_RIGHT]),[s,a]=J.useState(!1),[l,c]=J.useState({x:0,y:0,w:0,h:0,dir:""}),{align:d,inline:f}=(Y=t==null?void 0:t.node)==null?void 0:Y.attrs,p=J.useMemo(()=>{var ye;const{src:P,alt:fe,width:de,height:U,flipX:ne,flipY:R}=(ye=t==null?void 0:t.node)==null?void 0:ye.attrs,le=Lg(de)?`${de}px`:de,Ce=Lg(U)?`${U}px`:U,he=[];ne&&he.push("rotateX(180deg)"),R&&he.push("rotateY(180deg)");const Fe=he.join(" ");return{src:P||void 0,alt:fe||void 0,style:{width:le||void 0,height:Ce||void 0,transform:Fe||"none"}}},[(ee=t==null?void 0:t.node)==null?void 0:ee.attrs]),m=J.useMemo(()=>{const{style:{width:P}}=p;return{width:P==="100%"?P:void 0}},[p]);function g(P){i({width:P.target.width,height:P.target.height})}function b(){const{editor:P,getPos:fe}=t;P.commands.setNodeSelection(fe())}const S=J.useCallback(Xl(()=>{const{editor:P}=t,{width:fe}=getComputedStyle(P.view.dom);r(de=>({...de,width:Number.parseInt(fe,10)}))},id),[t==null?void 0:t.editor]);function w(P,fe){P.preventDefault(),P.stopPropagation();const de=n.width,U=n.height,ne=de/U;let R=Number(t.node.attrs.width),le=Number(t.node.attrs.height);const Ce=e.width;R&&!le?(R=R>Ce?Ce:R,le=Math.round(R/ne)):le&&!R?(R=Math.round(le*ne),R=R>Ce?Ce:R):!R&&!le?(R=de>Ce?Ce:de,le=Math.round(R/ne)):R=R>Ce?Ce:R,us.flushSync(()=>{a(!0),c({x:P.clientX,y:P.clientY,w:R,h:le,dir:fe})})}const T=J.useCallback(Xl(P=>{if(P.preventDefault(),P.stopPropagation(),!s)return;const{x:fe,w:de,dir:U}=l,ne=(P.clientX-fe)*(/l/.test(U)?-1:1),R=hN(de+ne,yS,e.width);t.updateAttributes({width:R,height:null})},id),[s,l,e,t.updateAttributes]),M=J.useCallback(P=>{P.preventDefault(),P.stopPropagation(),s&&(us.flushSync(()=>{c({x:0,y:0,w:0,h:0,dir:""}),a(!1)}),b())},[s,b]),j=J.useCallback(()=>{document==null||document.addEventListener("mousemove",T,!0),document==null||document.addEventListener("mouseup",M,!0)},[T,M]),$=J.useCallback(()=>{document==null||document.removeEventListener("mousemove",T,!0),document==null||document.removeEventListener("mouseup",M,!0)},[T,M]);J.useEffect(()=>(s?j():$(),()=>{$()}),[s,j,$]);const W=J.useMemo(()=>new ResizeObserver(()=>S()),[S]);return J.useEffect(()=>(W.observe(t.editor.view.dom),()=>{W.disconnect()}),[t.editor.view.dom,W]),x.jsx(gi,{className:"image-view",style:{...m,textAlign:d,display:f?"inline":"block"},as:f?"span":"div",children:x.jsxs("div",{draggable:"true","data-drag-handle":!0,className:`image-view__body ${t!=null&&t.selected?"image-view__body--focused":""} ${s?"image-view__body--resizing":""}`,style:m,children:[x.jsx("img",{src:p.src,alt:p.alt,style:p.style,height:"auto",className:"image-view__body__image block",onLoad:g,onClick:b}),(t==null?void 0:t.editor.view.editable)&&((t==null?void 0:t.selected)||s)&&x.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(P=>x.jsx("span",{className:`image-resizer__handler image-resizer__handler--${P}`,onMouseDown:fe=>w(fe,P)},`image-dir-${P}`))})]})})}function lZ({editor:t,imageInline:e,onClose:r}){const{t:n}=Et(),[i,o]=J.useState(!1),s=J.useRef(null),[a,l]=J.useState(),[c,d]=J.useState(""),f=J.useRef(null),[p,m]=J.useState({src:"",file:null});function g(M){if(s.current&&M.width&&M.height){const j=b(s.current,M);d(j)}}function b(M,j){const $=document.createElement("canvas"),W=M.naturalWidth/M.width,Y=M.naturalHeight/M.height;$.width=j.width*W,$.height=j.height*Y;const ee=$.getContext("2d");return ee&&(ee.imageSmoothingEnabled=!1,ee.drawImage(M,j.x*W,j.y*Y,j.width*W,j.height*Y,0,0,j.width*W,j.height*Y)),$.toDataURL("image/png",1)}async function S(){var M,j;try{const $=await bS(c,((M=p==null?void 0:p.file)==null?void 0:M.name)||"image.png"),W=(j=t.extensionManager.extensions.find(ee=>ee.name==="image"))==null?void 0:j.options;let Y="";W.upload?Y=await W.upload($):Y=URL.createObjectURL($),t.chain().focus().setImageInline({src:Y,inline:e}).run(),o(!1),m({src:"",file:null}),r()}catch($){console.log("Error cropping image",$)}}function w(M){var j;M.preventDefault(),(j=f.current)==null||j.click()}const T=async M=>{var Y;const j=(Y=M==null?void 0:M.target)==null?void 0:Y.files;if(!t||t.isDestroyed||j.length===0)return;const $=j[0],W=await d9($);o(!0),m({src:W.src,file:$})};return x.jsxs(x.Fragment,{children:[x.jsx(Mt,{className:"richtext-w-full richtext-mt-1",size:"sm",onClick:w,children:n("editor.image.dialog.tab.uploadCrop")}),x.jsxs(ac,{open:i,children:[x.jsx(lc,{}),x.jsxs(Ma,{children:[x.jsx(Na,{children:n("editor.image.dialog.tab.uploadCrop")}),x.jsx("div",{children:p.src&&x.jsx(HP,{crop:a,onChange:M=>l(M),onComplete:M=>g(M),className:"richtext-w-full",children:x.jsx("img",{ref:s,alt:"Crop me",src:p.src})})}),x.jsxs(_d,{children:[x.jsxs(Mt,{onClick:()=>{o(!1),m({src:"",file:null})},children:[n("editor.imageUpload.cancel"),x.jsx(Rt,{name:"Trash2",className:"richtext-ml-[4px]"})]}),x.jsxs(Mt,{className:"richtext-w-fit",onClick:S,children:[n("editor.imageUpload.crop"),x.jsx(Rt,{name:"Crop",className:"richtext-ml-[4px]"})]})]})]})]}),x.jsx("input",{type:"file",accept:"image/*",ref:f,multiple:!0,style:{display:"none"},onChange:T})]})}function cZ(t){const{t:e}=Et(),r=eZ(),[n,i]=J.useState(""),o=J.useRef(null),[s,a]=J.useState(!1),l=J.useMemo(()=>{var m;return(m=t.editor.extensionManager.extensions.find(g=>g.name===$D.name))==null?void 0:m.options},[t.editor]);async function c(p){var S;const m=(S=p==null?void 0:p.target)==null?void 0:S.files;if(!t.editor||t.editor.isDestroyed||m.length===0)return;const g=m[0];let b="";l.upload?b=await l.upload(g):b=URL.createObjectURL(g),t.editor.chain().focus().setImageInline({src:b,inline:s}).run(),Ru.setOpen(!1),a(!1)}function d(p){p.preventDefault(),p.stopPropagation(),t.editor.chain().focus().setImageInline({src:n,inline:s}).run(),Ru.setOpen(!1),a(!1)}function f(p){var m;p.preventDefault(),(m=o.current)==null||m.click()}return x.jsxs(ac,{open:r,onOpenChange:Ru.setOpen,children:[x.jsx(lc,{asChild:!0,children:x.jsx(Ve,{icon:t.icon,action:()=>Ru.setOpen(!0),tooltip:t.tooltip})}),x.jsxs(Ma,{children:[x.jsx(Na,{children:e("editor.image.dialog.title")}),x.jsxs(gS,{defaultValue:l.resourceImage==="both"||l.resourceImage==="upload"?"upload":"link",activationMode:"manual",children:[x.jsxs(qy,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[l.resourceImage==="both"||l.resourceImage==="upload"?x.jsx(td,{value:"upload",children:e("editor.image.dialog.tab.upload")}):x.jsx(x.Fragment,{}),l.resourceImage==="both"||l.resourceImage==="link"?x.jsx(td,{value:"link",children:e("editor.image.dialog.tab.url")}):x.jsx(x.Fragment,{})]}),x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[4px] richtext-my-[10px]",children:[x.jsx(xM,{checked:s,onCheckedChange:p=>{a(p)}}),x.jsx(Kn,{children:e("editor.link.dialog.inline")})]}),x.jsxs(rd,{value:"upload",children:[x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[x.jsx(Mt,{className:"richtext-w-full richtext-mt-1",size:"sm",onClick:f,children:e("editor.image.dialog.tab.upload")}),x.jsx(lZ,{editor:t.editor,imageInline:s,onClose:()=>Ru.setOpen(!1)})]}),x.jsx("input",{type:"file",accept:"image/*",ref:o,multiple:!0,style:{display:"none"},onChange:c})]}),x.jsx(rd,{value:"link",children:x.jsx("form",{onSubmit:d,children:x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[x.jsx(hn,{type:"url",autoFocus:!0,value:n,onChange:p=>i(p.target.value),required:!0,placeholder:e("editor.image.dialog.placeholder")}),x.jsx(Mt,{type:"submit",children:e("editor.image.dialog.button.apply")})]})})})]})]})]})}const $u=new St("upload-image");function uZ(){return new _t({key:$u,state:{init(){return Tt.empty},apply(t,e){e=e.map(t.mapping,t.doc);const r=t.getMeta($u);if(r!=null&&r.add)for(const{id:n,pos:i,src:o}of r.add){const s=dZ(o),a=Qt.widget(i,s,{id:n});e=e.add(t.doc,[a])}else if(r!=null&&r.remove)for(const n of r.remove)e=e.remove(e.find(void 0,void 0,i=>i.id===n));return e}},props:{decorations(t){return this.getState(t)}}})}function dZ(t){const e=document.createElement("div"),r=document.createElement("img");return r.setAttribute("class","opacity-50"),r.src=t,r.addEventListener("load",()=>{e.setAttribute("class","img-placeholder")}),e.append(r),e}function fZ(t,e){var i;const n=$u.getState(t).find(void 0,void 0,o=>o.id===e);return n.length>0?(i=n[0])==null?void 0:i.from:null}function hZ({validateFn:t,onUpload:e,postUpload:r}){return(n,i,o)=>{for(const s of n){if(t&&!t(s))continue;const a=Date.now().toString(),l=i.state.tr;l.selection.empty||l.deleteSelection();const c=URL.createObjectURL(s);l.setMeta($u,{add:[{id:a,pos:o,src:c}]}),i.dispatch(l),e(s).then(async d=>{var w;r&&typeof d=="string"&&(d=await r(d));const{schema:f}=i.state;let p=fZ(i.state,a);if(p===null)return;const m=typeof d=="object"?c:d,g=(w=f.nodes.image)==null?void 0:w.create({src:m});if(!g)return;const{doc:b}=i.state;p>b.content.size&&(p=b.content.size-1);const S=i.state.tr.replaceWith(p,p,g).setMeta($u,{remove:[a]});i.dispatch(S)},()=>{const d=i.state.tr.delete(o,o).setMeta($u,{remove:[a]});i.dispatch(d)})}}}function pZ(t,e,r){var i;const n=[...((i=e.clipboardData)==null?void 0:i.files)||[]];if(n.length>0){e.preventDefault();const o=t.state.selection.from;return r(n,t,o+1),!0}return!1}function mZ(t,e,r,n){var o;const i=[...((o=e.dataTransfer)==null?void 0:o.files)||[]];if(!r&&i.length>0){e.preventDefault();const s=t.posAtCoords({left:e.clientX,top:e.clientY});if(s)return n(i,t,s.pos+1),!0}return!1}const gZ={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5,resourceImage:"both"},$D=ZS.extend({group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){var t;return{...gZ,...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:e,extension:r,t:n})=>{var i,o;return{component:cZ,componentProps:{action:()=>{},upload:r.options.upload,disabled:!((o=(i=e.can()).setImage)!=null&&o.call(i,{})),icon:"ImageUp",tooltip:n("editor.image.tooltip"),editor:e}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),flipX:{default:!1},flipY:{default:!1},width:{default:null,parseHTML:e=>{const r=e.style.width||e.getAttribute("width")||null;return r?Number.parseInt(r,10):null},renderHTML:e=>({width:e.width})},align:{default:"center",parseHTML:e=>e.getAttribute("align"),renderHTML:e=>({align:e.align})},inline:{default:!1,parseHTML:e=>!!e.getAttribute("inline"),renderHTML:e=>({inline:e.inline})}}},addNodeView(){return ko(aZ)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),setImageInline:e=>({commands:r})=>r.insertContent({type:this.name,attrs:e}),updateImage:e=>({commands:r})=>r.updateAttributes(this.name,e),setAlignImage:e=>({commands:r})=>r.updateAttributes(this.name,{align:e})}},renderHTML({HTMLAttributes:t}){const{flipX:e,flipY:r,align:n,inline:i}=t,o=e||r?`transform: rotateX(${e?"180":"0"}deg) rotateY(${r?"180":"0"}deg);`:"",s=n?`text-align: ${n};`:"";return[i?"span":"div",{style:s,class:"image"},["img",lt({height:"auto",style:o},this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"span.image img",getAttrs:t=>{var o;const e=t==null?void 0:t.parentElement,r=t==null?void 0:t.getAttribute("width"),n=(t==null?void 0:t.getAttribute("flipx"))||!1,i=(t==null?void 0:t.getAttribute("flipy"))||!1;return{src:t==null?void 0:t.getAttribute("src"),alt:t==null?void 0:t.getAttribute("alt"),caption:t==null?void 0:t.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(t==null?void 0:t.getAttribute("align"))||((o=e==null?void 0:e.style)==null?void 0:o.textAlign)||null,inline:(t==null?void 0:t.getAttribute("inline"))||!1,flipX:n==="true",flipY:i==="true"}}},{tag:"div[class=image]",getAttrs:t=>{const e=t.querySelector("img"),r=e==null?void 0:e.getAttribute("width"),n=(e==null?void 0:e.getAttribute("flipx"))||!1,i=(e==null?void 0:e.getAttribute("flipy"))||!1;return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),caption:e==null?void 0:e.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(e==null?void 0:e.getAttribute("align"))||t.style.textAlign||null,inline:(e==null?void 0:e.getAttribute("inline"))||!1,flipX:n==="true",flipY:i==="true"}}}]},addProseMirrorPlugins(){const e=hZ({validateFn:r=>!(!this.options.acceptMimes.includes(r.type)||r.size>this.options.maxSize),onUpload:this.options.upload});return[new _t({props:{handlePaste:(r,n)=>!n.clipboardData||[...n.clipboardData.files||[]].some(o=>o.type==="text/html")?!1:pZ(r,n,e),handleDrop:(r,n,i,o)=>(!(n instanceof DragEvent)||!n.dataTransfer||mZ(r,n,o,e),!1)}}),uZ()]}});function yZ(t){return/\.(?:mp4|webm|ogg|mov)$/i.test(t)}function vZ(t){const{t:e}=Et(),[r,n]=J.useState(""),i=J.useRef(null),o=tZ(),[s,a]=J.useState(""),l=J.useMemo(()=>{var m;return(m=t.editor.extensionManager.extensions.find(g=>g.name===UD.name))==null?void 0:m.options},[t.editor]);async function c(p){var S;const m=(S=p==null?void 0:p.target)==null?void 0:S.files;if(!t.editor||t.editor.isDestroyed||m.length===0)return;const g=m[0];let b="";l.upload?b=await l.upload(g):b=URL.createObjectURL(g),t.editor.chain().setVideo({src:b,width:"100%"}).focus().run(),Wf.setOpen(!1)}function d(p){p.preventDefault(),p.stopPropagation(),r&&(t.editor.chain().setVideo({src:r,width:"100%"}).focus().run(),Wf.setOpen(!1))}function f(p){var m;p.preventDefault(),(m=i.current)==null||m.click()}return x.jsxs(ac,{open:o,onOpenChange:Wf.setOpen,children:[x.jsx(lc,{asChild:!0,children:x.jsx(Ve,{icon:t.icon,action:()=>Wf.setOpen(!0),tooltip:t.tooltip})}),x.jsxs(Ma,{children:[x.jsx(Na,{children:e("editor.video.dialog.title")}),x.jsxs(gS,{defaultValue:(l==null?void 0:l.resourceVideo)==="both"||(l==null?void 0:l.resourceVideo)==="upload"?"upload":"link",activationMode:"manual",children:[x.jsxs(qy,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[((l==null?void 0:l.resourceVideo)==="both"||(l==null?void 0:l.resourceVideo)==="upload")&&x.jsx(td,{value:"upload",children:e("editor.video.dialog.tab.upload")}),((l==null?void 0:l.resourceVideo)==="both"||(l==null?void 0:l.resourceVideo)==="link")&&x.jsx(td,{value:"link",children:e("editor.video.dialog.link")})]}),x.jsxs(rd,{value:"upload",children:[x.jsx("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:x.jsx(Mt,{className:"richtext-w-full richtext-mt-1",size:"sm",onClick:f,children:e("editor.video.dialog.tab.upload")})}),x.jsx("input",{type:"file",accept:"video/*",ref:i,multiple:!0,style:{display:"none"},onChange:c})]}),x.jsxs(rd,{value:"link",children:[x.jsx("form",{onSubmit:d,children:x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[x.jsx(hn,{type:"url",autoFocus:!0,value:r,onChange:p=>{const m=p.target.value;if(!yZ(m)){a("Invalid video URL"),n("");return}a(""),n(m)},required:!0,placeholder:e("editor.video.dialog.placeholder")}),x.jsx(Mt,{type:"submit",children:e("editor.video.dialog.button.apply")})]})}),s&&x.jsx("div",{className:"richtext-text-red-500 richtext-my-[5px]",children:s})]})]})]})]})}function bZ(t){return t=t.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/"),t=t.replace("https://vimeo.com/","https://player.vimeo.com/video/"),/^https?:\/\/www.bilibili.com\/video\/.*/i.test(t)&&(t=t.replace(/\?.*$/,"").replace("https://www.bilibili.com/video/","https://player.bilibili.com/player.html?bvid=")),t.includes("drive.google.com")&&(t=t.replace("/view","/preview")),t}const UD=Nt.create({name:"video",group:"block",atom:!0,draggable:!0,addOptions(){return{divider:!1,spacer:!1,allowFullscreen:!0,upload:void 0,frameborder:!1,resourceVideo:"both",width:Og["size-medium"],HTMLAttributes:{class:"iframe-wrapper",style:"display: flex;justify-content: center;"},button:({editor:t,t:e})=>{var r,n;return{component:vZ,componentProps:{action:()=>{},isActive:()=>t.isActive("video")||!1,disabled:!((n=(r=t.can()).setVideo)!=null&&n.call(r,{})),icon:"Video",tooltip:e("editor.video.tooltip"),editor:t}}}}},addAttributes(){return{src:{default:null,renderHTML:({src:t})=>({src:t?bZ(t):null})},width:{default:this.options.width,renderHTML:({width:t})=>({width:P7(t)})},frameborder:{default:this.options.frameborder?1:0,parseHTML:()=>this.options.frameborder?1:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML(){return[{tag:"div[data-video] iframe"}]},renderHTML({HTMLAttributes:t}){const{width:e="100%"}=t??{},r={...t,width:"100%",height:"100%"},n=`position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${e};`,i=`flex: 1;padding-bottom: ${9/16*100}%;`,a=["div",{style:n},["div",{style:i}],["iframe",r]];return["div",{...this.options.HTMLAttributes,"data-video":""},a]},addCommands(){return{setVideo:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),updateVideo:t=>({commands:e})=>e.updateAttributes(this.name,t)}}}),wZ=Nt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",lt(this.options.HTMLAttributes,t),0]}});var n1,i1;if(typeof WeakMap<"u"){let t=new WeakMap;n1=e=>t.get(e),i1=(e,r)=>(t.set(e,r),r)}else{const t=[];let r=0;n1=n=>{for(let i=0;i<t.length;i+=2)if(t[i]==n)return t[i+1]},i1=(n,i)=>(r==10&&(r=0),t[r++]=n,t[r++]=i)}var or=class{constructor(t,e,r,n){this.width=t,this.height=e,this.map=r,this.problems=n}findCell(t){for(let e=0;e<this.map.length;e++){const r=this.map[e];if(r!=t)continue;const n=e%this.width,i=e/this.width|0;let o=n+1,s=i+1;for(let a=1;o<this.width&&this.map[e+a]==r;a++)o++;for(let a=1;s<this.height&&this.map[e+this.width*a]==r;a++)s++;return{left:n,top:i,right:o,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,r){const{left:n,right:i,top:o,bottom:s}=this.findCell(t);return e=="horiz"?(r<0?n==0:i==this.width)?null:this.map[o*this.width+(r<0?n-1:i)]:(r<0?o==0:s==this.height)?null:this.map[n+this.width*(r<0?o-1:s)]}rectBetween(t,e){const{left:r,right:n,top:i,bottom:o}=this.findCell(t),{left:s,right:a,top:l,bottom:c}=this.findCell(e);return{left:Math.min(r,s),top:Math.min(i,l),right:Math.max(n,a),bottom:Math.max(o,c)}}cellsInRect(t){const e=[],r={};for(let n=t.top;n<t.bottom;n++)for(let i=t.left;i<t.right;i++){const o=n*this.width+i,s=this.map[o];r[s]||(r[s]=!0,!(i==t.left&&i&&this.map[o-1]==s||n==t.top&&n&&this.map[o-this.width]==s)&&e.push(s))}return e}positionAt(t,e,r){for(let n=0,i=0;;n++){const o=i+r.child(n).nodeSize;if(n==t){let s=e+t*this.width;const a=(t+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?o-1:this.map[s]}i=o}}static get(t){return n1(t)||i1(t,xZ(t))}};function xZ(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=SZ(t),r=t.childCount,n=[];let i=0,o=null;const s=[];for(let c=0,d=e*r;c<d;c++)n[c]=0;for(let c=0,d=0;c<r;c++){const f=t.child(c);d++;for(let g=0;;g++){for(;i<n.length&&n[i]!=0;)i++;if(g==f.childCount)break;const b=f.child(g),{colspan:S,rowspan:w,colwidth:T}=b.attrs;for(let M=0;M<w;M++){if(M+c>=r){(o||(o=[])).push({type:"overlong_rowspan",pos:d,n:w-M});break}const j=i+M*e;for(let $=0;$<S;$++){n[j+$]==0?n[j+$]=d:(o||(o=[])).push({type:"collision",row:c,pos:d,n:S-$});const W=T&&T[$];if(W){const Y=(j+$)%e*2,ee=s[Y];ee==null||ee!=W&&s[Y+1]==1?(s[Y]=W,s[Y+1]=1):ee==W&&s[Y+1]++}}}i+=S,d+=b.nodeSize}const p=(c+1)*e;let m=0;for(;i<p;)n[i++]==0&&m++;m&&(o||(o=[])).push({type:"missing",row:c,n:m}),d++}const a=new or(e,r,n,o);let l=!1;for(let c=0;!l&&c<s.length;c+=2)s[c]!=null&&s[c+1]<r&&(l=!0);return l&&kZ(a,s,t),a}function SZ(t){let e=-1,r=!1;for(let n=0;n<t.childCount;n++){const i=t.child(n);let o=0;if(r)for(let s=0;s<n;s++){const a=t.child(s);for(let l=0;l<a.childCount;l++){const c=a.child(l);s+c.attrs.rowspan>n&&(o+=c.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);o+=a.attrs.colspan,a.attrs.rowspan>1&&(r=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function kZ(t,e,r){t.problems||(t.problems=[]);const n={};for(let i=0;i<t.map.length;i++){const o=t.map[i];if(n[o])continue;n[o]=!0;const s=r.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let a=null;const l=s.attrs;for(let c=0;c<l.colspan;c++){const d=(i+c)%t.width,f=e[d*2];f!=null&&(!l.colwidth||l.colwidth[c]!=f)&&((a||(a=_Z(l)))[c]=f)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function _Z(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let r=0;r<t.colspan;r++)e.push(0);return e}function Jr(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const r in t.nodes){const n=t.nodes[r],i=n.spec.tableRole;i&&(e[i]=n)}}return e}var ca=new St("selectingCells");function Rd(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function EZ(t){for(let e=t.depth;e>0;e--){const r=t.node(e).type.spec.tableRole;if(r==="cell"||r==="header_cell")return t.node(e)}return null}function Hi(t){const e=t.selection.$head;for(let r=e.depth;r>0;r--)if(e.node(r).type.spec.tableRole=="row")return!0;return!1}function cv(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const r=Rd(e.$head)||CZ(e.$head);if(r)return r;throw new RangeError(`No cell found around position ${e.head}`)}function CZ(t){for(let e=t.nodeAfter,r=t.pos;e;e=e.firstChild,r++){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return t.doc.resolve(r)}for(let e=t.nodeBefore,r=t.pos;e;e=e.lastChild,r--){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return t.doc.resolve(r-e.nodeSize)}}function o1(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function TZ(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function QS(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function WD(t,e,r){const n=t.node(-1),i=or.get(n),o=t.start(-1),s=i.nextCell(t.pos-o,e,r);return s==null?null:t.node(0).resolve(o+s)}function Jl(t,e,r=1){const n={...t,colspan:t.colspan-r};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(e,r),n.colwidth.some(i=>i>0)||(n.colwidth=null)),n}function VD(t,e,r=1){const n={...t,colspan:t.colspan+r};if(n.colwidth){n.colwidth=n.colwidth.slice();for(let i=0;i<r;i++)n.colwidth.splice(e,0,0)}return n}function AZ(t,e,r){const n=Jr(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[r+i*t.width]).type!=n)return!1;return!0}var Ut=class Qo extends ot{constructor(e,r=e){const n=e.node(-1),i=or.get(n),o=e.start(-1),s=i.rectBetween(e.pos-o,r.pos-o),a=e.node(0),l=i.cellsInRect(s).filter(d=>d!=r.pos-o);l.unshift(r.pos-o);const c=l.map(d=>{const f=n.nodeAt(d);if(!f)throw RangeError(`No cell with offset ${d} found`);const p=o+d+1;return new I1(a.resolve(p),a.resolve(p+f.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=r}map(e,r){const n=e.resolve(r.map(this.$anchorCell.pos)),i=e.resolve(r.map(this.$headCell.pos));if(o1(n)&&o1(i)&&QS(n,i)){const o=this.$anchorCell.node(-1)!=n.node(-1);return o&&this.isRowSelection()?Qo.rowSelection(n,i):o&&this.isColSelection()?Qo.colSelection(n,i):new Qo(n,i)}return et.between(n,i)}content(){const e=this.$anchorCell.node(-1),r=or.get(e),n=this.$anchorCell.start(-1),i=r.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},s=[];for(let l=i.top;l<i.bottom;l++){const c=[];for(let d=l*r.width+i.left,f=i.left;f<i.right;f++,d++){const p=r.map[d];if(o[p])continue;o[p]=!0;const m=r.findCell(p);let g=e.nodeAt(p);if(!g)throw RangeError(`No cell with offset ${p} found`);const b=i.left-m.left,S=m.right-i.right;if(b>0||S>0){let w=g.attrs;if(b>0&&(w=Jl(w,0,b)),S>0&&(w=Jl(w,w.colspan-S,S)),m.left<i.left){if(g=g.type.createAndFill(w),!g)throw RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else g=g.type.create(w,g.content)}if(m.top<i.top||m.bottom>i.bottom){const w={...g.attrs,rowspan:Math.min(m.bottom,i.bottom)-Math.max(m.top,i.top)};m.top<i.top?g=g.type.createAndFill(w):g=g.type.create(w,g.content)}c.push(g)}s.push(e.child(l).copy(Le.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:s;return new qe(Le.from(a),1,1)}replace(e,r=qe.empty){const n=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:a,$to:l}=i[s],c=e.mapping.slice(n);e.replace(c.map(a.pos),c.map(l.pos),s?qe.empty:r)}const o=ot.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,r){this.replace(e,new qe(Le.from(r),0,0))}forEachCell(e){const r=this.$anchorCell.node(-1),n=or.get(r),i=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<o.length;s++)e(r.nodeAt(o[s]),i+o[s])}isColSelection(){const e=this.$anchorCell.index(-1),r=this.$headCell.index(-1);if(Math.min(e,r)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=r+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,i)==this.$headCell.node(-1).childCount}static colSelection(e,r=e){const n=e.node(-1),i=or.get(n),o=e.start(-1),s=i.findCell(e.pos-o),a=i.findCell(r.pos-o),l=e.node(0);return s.top<=a.top?(s.top>0&&(e=l.resolve(o+i.map[s.left])),a.bottom<i.height&&(r=l.resolve(o+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(r=l.resolve(o+i.map[a.left])),s.bottom<i.height&&(e=l.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new Qo(e,r)}isRowSelection(){const e=this.$anchorCell.node(-1),r=or.get(e),n=this.$anchorCell.start(-1),i=r.colCount(this.$anchorCell.pos-n),o=r.colCount(this.$headCell.pos-n);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)==r.width}eq(e){return e instanceof Qo&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,r=e){const n=e.node(-1),i=or.get(n),o=e.start(-1),s=i.findCell(e.pos-o),a=i.findCell(r.pos-o),l=e.node(0);return s.left<=a.left?(s.left>0&&(e=l.resolve(o+i.map[s.top*i.width])),a.right<i.width&&(r=l.resolve(o+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(r=l.resolve(o+i.map[a.top*i.width])),s.right<i.width&&(e=l.resolve(o+i.map[i.width*(s.top+1)-1]))),new Qo(e,r)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,r){return new Qo(e.resolve(r.anchor),e.resolve(r.head))}static create(e,r,n=r){return new Qo(e.resolve(r),e.resolve(n))}getBookmark(){return new RZ(this.$anchorCell.pos,this.$headCell.pos)}};Ut.prototype.visible=!1;ot.jsonID("cell",Ut);var RZ=class GD{constructor(e,r){this.anchor=e,this.head=r}map(e){return new GD(e.map(this.anchor),e.map(this.head))}resolve(e){const r=e.resolve(this.anchor),n=e.resolve(this.head);return r.parent.type.spec.tableRole=="row"&&n.parent.type.spec.tableRole=="row"&&r.index()<r.parent.childCount&&n.index()<n.parent.childCount&&QS(r,n)?new Ut(r,n):ot.near(n,1)}};function IZ(t){if(!(t.selection instanceof Ut))return null;const e=[];return t.selection.forEachCell((r,n)=>{e.push(Qt.node(n,n+r.nodeSize,{class:"selectedCell"}))}),Tt.create(t.doc,e)}function OZ({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let r=t.pos,n=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,r++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,n--);return r==n&&/row|table/.test(t.node(i).type.spec.tableRole)}function MZ({$from:t,$to:e}){let r,n;for(let i=t.depth;i>0;i--){const o=t.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=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"){n=o;break}}return r!==n&&e.parentOffset===0}function NZ(t,e,r){const n=(e||t).selection,i=(e||t).doc;let o,s;if(n instanceof rt&&(s=n.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=Ut.create(i,n.from);else if(s=="row"){const a=i.resolve(n.from+1);o=Ut.rowSelection(a,a)}else if(!r){const a=or.get(n.node),l=n.from+1,c=l+a.map[a.width*a.height-1];o=Ut.create(i,l+1,c)}}else n instanceof et&&OZ(n)?o=et.create(i,n.from):n instanceof et&&MZ(n)&&(o=et.create(i,n.$from.start(),n.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var DZ=new St("fix-tables");function KD(t,e,r,n){const i=t.childCount,o=e.childCount;e:for(let s=0,a=0;s<o;s++){const l=e.child(s);for(let c=a,d=Math.min(i,s+3);c<d;c++)if(t.child(c)==l){a=c+1,r+=l.nodeSize;continue e}n(l,r),a<i&&t.child(a).sameMarkup(l)?KD(t.child(a),l,r+1,n):l.nodesBetween(0,l.content.size,n,r+1),r+=l.nodeSize}}function qD(t,e){let r;const n=(i,o)=>{i.type.spec.tableRole=="table"&&(r=PZ(t,i,o,r))};return e?e.doc!=t.doc&&KD(e.doc,t.doc,0,n):t.doc.descendants(n),r}function PZ(t,e,r,n){const i=or.get(e);if(!i.problems)return n;n||(n=t.tr);const o=[];for(let l=0;l<i.height;l++)o.push(0);for(let l=0;l<i.problems.length;l++){const c=i.problems[l];if(c.type=="collision"){const d=e.nodeAt(c.pos);if(!d)continue;const f=d.attrs;for(let p=0;p<f.rowspan;p++)o[c.row+p]+=c.n;n.setNodeMarkup(n.mapping.map(r+1+c.pos),null,Jl(f,f.colspan-c.n,c.n))}else if(c.type=="missing")o[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const d=e.nodeAt(c.pos);if(!d)continue;n.setNodeMarkup(n.mapping.map(r+1+c.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const d=e.nodeAt(c.pos);if(!d)continue;n.setNodeMarkup(n.mapping.map(r+1+c.pos),null,{...d.attrs,colwidth:c.colwidth})}}let s,a;for(let l=0;l<o.length;l++)o[l]&&(s==null&&(s=l),a=l);for(let l=0,c=r+1;l<i.height;l++){const d=e.child(l),f=c+d.nodeSize,p=o[l];if(p>0){let m="cell";d.firstChild&&(m=d.firstChild.type.spec.tableRole);const g=[];for(let S=0;S<p;S++){const w=Jr(t.schema)[m].createAndFill();w&&g.push(w)}const b=(l==0||s==l-1)&&a==l?c+1:f-1;n.insert(n.mapping.map(b),g)}c=f}return n.setMeta(DZ,{fixTables:!0})}function To(t){const e=t.selection,r=cv(t),n=r.node(-1),i=r.start(-1),o=or.get(n);return{...e instanceof Ut?o.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):o.findCell(r.pos-i),tableStart:i,map:o,table:n}}function XD(t,{map:e,tableStart:r,table:n},i){let o=i>0?-1:0;AZ(e,n,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 l=e.map[a],c=n.nodeAt(l);t.setNodeMarkup(t.mapping.map(r+l),null,VD(c.attrs,i-e.colCount(l))),s+=c.attrs.rowspan-1}else{const l=o==null?Jr(n.type.schema).cell:n.nodeAt(e.map[a+o]).type,c=e.positionAt(s,i,n);t.insert(t.mapping.map(r+c),l.createAndFill())}}return t}function LZ(t,e){if(!Hi(t))return!1;if(e){const r=To(t);e(XD(t.tr,r,r.left))}return!0}function FZ(t,e){if(!Hi(t))return!1;if(e){const r=To(t);e(XD(t.tr,r,r.right))}return!0}function jZ(t,{map:e,table:r,tableStart:n},i){const o=t.mapping.maps.length;for(let s=0;s<e.height;){const a=s*e.width+i,l=e.map[a],c=r.nodeAt(l),d=c.attrs;if(i>0&&e.map[a-1]==l||i<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(o).map(n+l),null,Jl(d,i-e.colCount(l)));else{const f=t.mapping.slice(o).map(n+l);t.delete(f,f+c.nodeSize)}s+=d.rowspan}}function BZ(t,e){if(!Hi(t))return!1;if(e){const r=To(t),n=t.tr;if(r.left==0&&r.right==r.map.width)return!1;for(let i=r.right-1;jZ(n,r,i),i!=r.left;i--){const o=r.tableStart?n.doc.nodeAt(r.tableStart-1):n.doc;if(!o)throw RangeError("No table found");r.table=o,r.map=or.get(o)}e(n)}return!0}function zZ(t,e,r){var n;const i=Jr(e.type.schema).header_cell;for(let o=0;o<t.width;o++)if(((n=e.nodeAt(t.map[o+r*t.width]))==null?void 0:n.type)!=i)return!1;return!0}function YD(t,{map:e,tableStart:r,table:n},i){var o;let s=r;for(let c=0;c<i;c++)s+=n.child(c).nodeSize;const a=[];let l=i>0?-1:0;zZ(e,n,i+l)&&(l=i==0||i==e.height?null:0);for(let c=0,d=e.width*i;c<e.width;c++,d++)if(i>0&&i<e.height&&e.map[d]==e.map[d-e.width]){const f=e.map[d],p=n.nodeAt(f).attrs;t.setNodeMarkup(r+f,null,{...p,rowspan:p.rowspan+1}),c+=p.colspan-1}else{const f=l==null?Jr(n.type.schema).cell:(o=n.nodeAt(e.map[d+l*e.width]))==null?void 0:o.type,p=f==null?void 0:f.createAndFill();p&&a.push(p)}return t.insert(s,Jr(n.type.schema).row.create(null,a)),t}function HZ(t,e){if(!Hi(t))return!1;if(e){const r=To(t);e(YD(t.tr,r,r.top))}return!0}function $Z(t,e){if(!Hi(t))return!1;if(e){const r=To(t);e(YD(t.tr,r,r.bottom))}return!0}function UZ(t,{map:e,table:r,tableStart:n},i){let o=0;for(let c=0;c<i;c++)o+=r.child(c).nodeSize;const s=o+r.child(i).nodeSize,a=t.mapping.maps.length;t.delete(o+n,s+n);const l=new Set;for(let c=0,d=i*e.width;c<e.width;c++,d++){const f=e.map[d];if(!l.has(f)){if(l.add(f),i>0&&f==e.map[d-e.width]){const p=r.nodeAt(f).attrs;t.setNodeMarkup(t.mapping.slice(a).map(f+n),null,{...p,rowspan:p.rowspan-1}),c+=p.colspan-1}else if(i<e.height&&f==e.map[d+e.width]){const p=r.nodeAt(f),m=p.attrs,g=p.type.create({...m,rowspan:p.attrs.rowspan-1},p.content),b=e.positionAt(i+1,c,r);t.insert(t.mapping.slice(a).map(n+b),g),c+=m.colspan-1}}}}function WZ(t,e){if(!Hi(t))return!1;if(e){const r=To(t),n=t.tr;if(r.top==0&&r.bottom==r.map.height)return!1;for(let i=r.bottom-1;UZ(n,r,i),i!=r.top;i--){const o=r.tableStart?n.doc.nodeAt(r.tableStart-1):n.doc;if(!o)throw RangeError("No table found");r.table=o,r.map=or.get(r.table)}e(n)}return!0}function LT(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function VZ({width:t,height:e,map:r},n){let i=n.top*t+n.left,o=i,s=(n.bottom-1)*t+n.left,a=i+(n.right-n.left-1);for(let l=n.top;l<n.bottom;l++){if(n.left>0&&r[o]==r[o-1]||n.right<t&&r[a]==r[a+1])return!0;o+=t,a+=t}for(let l=n.left;l<n.right;l++){if(n.top>0&&r[i]==r[i-t]||n.bottom<e&&r[s]==r[s+t])return!0;i++,s++}return!1}function FT(t,e){const r=t.selection;if(!(r instanceof Ut)||r.$anchorCell.pos==r.$headCell.pos)return!1;const n=To(t),{map:i}=n;if(VZ(i,n))return!1;if(e){const o=t.tr,s={};let a=Le.empty,l,c;for(let d=n.top;d<n.bottom;d++)for(let f=n.left;f<n.right;f++){const p=i.map[d*i.width+f],m=n.table.nodeAt(p);if(!(s[p]||!m))if(s[p]=!0,l==null)l=p,c=m;else{LT(m)||(a=a.append(m.content));const g=o.mapping.map(p+n.tableStart);o.delete(g,g+m.nodeSize)}}if(l==null||c==null)return!0;if(o.setNodeMarkup(l+n.tableStart,null,{...VD(c.attrs,c.attrs.colspan,n.right-n.left-c.attrs.colspan),rowspan:n.bottom-n.top}),a.size){const d=l+1+c.content.size,f=LT(c)?l+1:d;o.replaceWith(f+n.tableStart,d+n.tableStart,a)}o.setSelection(new Ut(o.doc.resolve(l+n.tableStart))),e(o)}return!0}function jT(t,e){const r=Jr(t.schema);return GZ(({node:n})=>r[n.type.spec.tableRole])(t,e)}function GZ(t){return(e,r)=>{var n;const i=e.selection;let o,s;if(i instanceof Ut){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,s=i.$anchorCell.pos}else{if(o=EZ(i.$from),!o)return!1;s=(n=Rd(i.$from))==null?void 0:n.pos}if(o==null||s==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(r){let a=o.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const d=To(e),f=e.tr;for(let m=0;m<d.right-d.left;m++)l.push(c?{...a,colwidth:c&&c[m]?[c[m]]:null}:a);let p;for(let m=d.top;m<d.bottom;m++){let g=d.map.positionAt(m,d.left,d.table);m==d.top&&(g+=o.nodeSize);for(let b=d.left,S=0;b<d.right;b++,S++)b==d.left&&m==d.top||f.insert(p=f.mapping.map(g+d.tableStart,1),t({node:o,row:m,col:b}).createAndFill(l[S]))}f.setNodeMarkup(s,t({node:o,row:d.top,col:d.left}),l[0]),i instanceof Ut&&f.setSelection(new Ut(f.doc.resolve(i.$anchorCell.pos),p?f.doc.resolve(p):void 0)),r(f)}return!0}}function KZ(t,e){return function(r,n){if(!Hi(r))return!1;const i=cv(r);if(i.nodeAfter.attrs[t]===e)return!1;if(n){const o=r.tr;r.selection instanceof Ut?r.selection.forEachCell((s,a)=>{s.attrs[t]!==e&&o.setNodeMarkup(a,null,{...s.attrs,[t]:e})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),n(o)}return!0}}function qZ(t){return function(e,r){if(!Hi(e))return!1;if(r){const n=Jr(e.schema),i=To(e),o=e.tr,s=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(l=>i.table.nodeAt(l));for(let l=0;l<s.length;l++)a[l].type==n.header_cell&&o.setNodeMarkup(i.tableStart+s[l],n.cell,a[l].attrs);if(o.steps.length==0)for(let l=0;l<s.length;l++)o.setNodeMarkup(i.tableStart+s[l],n.header_cell,a[l].attrs);r(o)}return!0}}function BT(t,e,r){const n=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<n.length;i++){const o=e.table.nodeAt(n[i]);if(o&&o.type!==r.header_cell)return!1}return!0}function jh(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?qZ(t):function(r,n){if(!Hi(r))return!1;if(n){const i=Jr(r.schema),o=To(r),s=r.tr,a=BT("row",o,i),l=BT("column",o,i),d=(t==="column"?a:t==="row"?l:!1)?1:0,f=t=="column"?{left:0,top:d,right:1,bottom:o.map.height}:t=="row"?{left:d,top:0,right:o.map.width,bottom:1}:o,p=t=="column"?l?i.cell:i.header_cell:t=="row"?a?i.cell:i.header_cell:i.cell;o.map.cellsInRect(f).forEach(m=>{const g=m+o.tableStart,b=s.doc.nodeAt(g);b&&s.setNodeMarkup(g,p,b.attrs)}),n(s)}return!0}}jh("row",{useDeprecatedLogic:!0});jh("column",{useDeprecatedLogic:!0});var XZ=jh("cell",{useDeprecatedLogic:!0});function YZ(t,e){if(e<0){const r=t.nodeBefore;if(r)return t.pos-r.nodeSize;for(let n=t.index(-1)-1,i=t.before();n>=0;n--){const o=t.node(-1).child(n),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const r=t.node(-1);for(let n=t.indexAfter(-1),i=t.after();n<r.childCount;n++){const o=r.child(n);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function zT(t){return function(e,r){if(!Hi(e))return!1;const n=YZ(cv(e),t);if(n==null)return!1;if(r){const i=e.doc.resolve(n);r(e.tr.setSelection(et.between(i,TZ(i))).scrollIntoView())}return!0}}function JZ(t,e){const r=t.selection.$anchor;for(let n=r.depth;n>0;n--)if(r.node(n).type.spec.tableRole=="table")return e&&e(t.tr.delete(r.before(n),r.after(n)).scrollIntoView()),!0;return!1}function hm(t,e){const r=t.selection;if(!(r instanceof Ut))return!1;if(e){const n=t.tr,i=Jr(t.schema).cell.createAndFill().content;r.forEachCell((o,s)=>{o.content.eq(i)||n.replace(n.mapping.map(s+1),n.mapping.map(s+o.nodeSize-1),new qe(i,0,0))}),n.docChanged&&e(n)}return!0}function ZZ(t){if(!t.size)return null;let{content:e,openStart:r,openEnd:n}=t;for(;e.childCount==1&&(r>0&&n>0||e.child(0).type.spec.tableRole=="table");)r--,n--,e=e.child(0).content;const i=e.child(0),o=i.type.spec.tableRole,s=i.type.schema,a=[];if(o=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const d=l?0:Math.max(0,r-1),f=l<e.childCount-1?0:Math.max(0,n-1);(d||f)&&(c=s1(Jr(s).row,new qe(c,d,f)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(r||n?s1(Jr(s).row,new qe(e,r,n)).content:e);else return null;return QZ(s,a)}function QZ(t,e){const r=[];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:l}=o.child(s).attrs;for(let c=i;c<i+a;c++)r[c]=(r[c]||0)+l}}let n=0;for(let i=0;i<r.length;i++)n=Math.max(n,r[i]);for(let i=0;i<r.length;i++)if(i>=e.length&&e.push(Le.empty),r[i]<n){const o=Jr(t).cell.createAndFill(),s=[];for(let a=r[i];a<n;a++)s.push(o);e[i]=e[i].append(Le.from(s))}return{height:e.length,width:n,rows:e}}function s1(t,e){const r=t.createAndFill();return new R1(r).replace(0,r.content.size,e).doc}function eQ({width:t,height:e,rows:r},n,i){if(t!=n){const o=[],s=[];for(let a=0;a<r.length;a++){const l=r[a],c=[];for(let d=o[a]||0,f=0;d<n;f++){let p=l.child(f%l.childCount);d+p.attrs.colspan>n&&(p=p.type.createChecked(Jl(p.attrs,p.attrs.colspan,d+p.attrs.colspan-n),p.content)),c.push(p),d+=p.attrs.colspan;for(let m=1;m<p.attrs.rowspan;m++)o[a+m]=(o[a+m]||0)+p.attrs.colspan}s.push(Le.from(c))}r=s,t=n}if(e!=i){const o=[];for(let s=0,a=0;s<i;s++,a++){const l=[],c=r[a%e];for(let d=0;d<c.childCount;d++){let f=c.child(d);s+f.attrs.rowspan>i&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,i-f.attrs.rowspan)},f.content)),l.push(f)}o.push(Le.from(l))}r=o,e=i}return{width:t,height:e,rows:r}}function tQ(t,e,r,n,i,o,s){const a=t.doc.type.schema,l=Jr(a);let c,d;if(i>e.width)for(let f=0,p=0;f<e.height;f++){const m=r.child(f);p+=m.nodeSize;const g=[];let b;m.lastChild==null||m.lastChild.type==l.cell?b=c||(c=l.cell.createAndFill()):b=d||(d=l.header_cell.createAndFill());for(let S=e.width;S<i;S++)g.push(b);t.insert(t.mapping.slice(s).map(p-1+n),g)}if(o>e.height){const f=[];for(let g=0,b=(e.height-1)*e.width;g<Math.max(e.width,i);g++){const S=g>=e.width?!1:r.nodeAt(e.map[b+g]).type==l.header_cell;f.push(S?d||(d=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const p=l.row.create(null,Le.from(f)),m=[];for(let g=e.height;g<o;g++)m.push(p);t.insert(t.mapping.slice(s).map(n+r.nodeSize-2),m)}return!!(c||d)}function HT(t,e,r,n,i,o,s,a){if(s==0||s==e.height)return!1;let l=!1;for(let c=i;c<o;c++){const d=s*e.width+c,f=e.map[d];if(e.map[d-e.width]==f){l=!0;const p=r.nodeAt(f),{top:m,left:g}=e.findCell(f);t.setNodeMarkup(t.mapping.slice(a).map(f+n),null,{...p.attrs,rowspan:s-m}),t.insert(t.mapping.slice(a).map(e.positionAt(s,g,r)),p.type.createAndFill({...p.attrs,rowspan:m+p.attrs.rowspan-s})),c+=p.attrs.colspan-1}}return l}function $T(t,e,r,n,i,o,s,a){if(s==0||s==e.width)return!1;let l=!1;for(let c=i;c<o;c++){const d=c*e.width+s,f=e.map[d];if(e.map[d-1]==f){l=!0;const p=r.nodeAt(f),m=e.colCount(f),g=t.mapping.slice(a).map(f+n);t.setNodeMarkup(g,null,Jl(p.attrs,s-m,p.attrs.colspan-(s-m))),t.insert(g+p.nodeSize,p.type.createAndFill(Jl(p.attrs,0,s-m))),c+=p.attrs.rowspan-1}}return l}function UT(t,e,r,n,i){let o=r?t.doc.nodeAt(r-1):t.doc;if(!o)throw new Error("No table found");let s=or.get(o);const{top:a,left:l}=n,c=l+i.width,d=a+i.height,f=t.tr;let p=0;function m(){if(o=r?f.doc.nodeAt(r-1):f.doc,!o)throw new Error("No table found");s=or.get(o),p=f.mapping.maps.length}tQ(f,s,o,r,c,d,p)&&m(),HT(f,s,o,r,l,c,a,p)&&m(),HT(f,s,o,r,l,c,d,p)&&m(),$T(f,s,o,r,a,d,l,p)&&m(),$T(f,s,o,r,a,d,c,p)&&m();for(let g=a;g<d;g++){const b=s.positionAt(g,l,o),S=s.positionAt(g,c,o);f.replace(f.mapping.slice(p).map(b+r),f.mapping.slice(p).map(S+r),new qe(i.rows[g-a],0,0))}m(),f.setSelection(new Ut(f.doc.resolve(r+s.positionAt(a,l,o)),f.doc.resolve(r+s.positionAt(d-1,c-1,o)))),e(f)}var rQ=z1({ArrowLeft:pm("horiz",-1),ArrowRight:pm("horiz",1),ArrowUp:pm("vert",-1),ArrowDown:pm("vert",1),"Shift-ArrowLeft":mm("horiz",-1),"Shift-ArrowRight":mm("horiz",1),"Shift-ArrowUp":mm("vert",-1),"Shift-ArrowDown":mm("vert",1),Backspace:hm,"Mod-Backspace":hm,Delete:hm,"Mod-Delete":hm});function Jm(t,e,r){return r.eq(t.selection)?!1:(e&&e(t.tr.setSelection(r).scrollIntoView()),!0)}function pm(t,e){return(r,n,i)=>{if(!i)return!1;const o=r.selection;if(o instanceof Ut)return Jm(r,n,ot.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const s=JD(i,t,e);if(s==null)return!1;if(t=="horiz")return Jm(r,n,ot.near(r.doc.resolve(o.head+e),e));{const a=r.doc.resolve(s),l=WD(a,t,e);let c;return l?c=ot.near(l,1):e<0?c=ot.near(r.doc.resolve(a.before(-1)),-1):c=ot.near(r.doc.resolve(a.after(-1)),1),Jm(r,n,c)}}}function mm(t,e){return(r,n,i)=>{if(!i)return!1;const o=r.selection;let s;if(o instanceof Ut)s=o;else{const l=JD(i,t,e);if(l==null)return!1;s=new Ut(r.doc.resolve(l))}const a=WD(s.$headCell,t,e);return a?Jm(r,n,new Ut(s.$anchorCell,a)):!1}}function nQ(t,e){const r=t.state.doc,n=Rd(r.resolve(e));return n?(t.dispatch(t.state.tr.setSelection(new Ut(n))),!0):!1}function iQ(t,e,r){if(!Hi(t.state))return!1;let n=ZZ(r);const i=t.state.selection;if(i instanceof Ut){n||(n={width:1,height:1,rows:[Le.from(s1(Jr(t.state.schema).cell,r))]});const o=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=or.get(o).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return n=eQ(n,a.right-a.left,a.bottom-a.top),UT(t.state,t.dispatch,s,a,n),!0}else if(n){const o=cv(t.state),s=o.start(-1);return UT(t.state,t.dispatch,s,or.get(o.node(-1)).findCell(o.pos-s),n),!0}else return!1}function oQ(t,e){var r;if(e.ctrlKey||e.metaKey)return;const n=WT(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof Ut)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&n&&(i=Rd(t.state.selection.$anchor))!=null&&((r=Mw(t,e))==null?void 0:r.pos)!=i.pos)o(i,e),e.preventDefault();else if(!n)return;function o(l,c){let d=Mw(t,c);const f=ca.getState(t.state)==null;if(!d||!QS(l,d))if(f)d=l;else return;const p=new Ut(l,d);if(f||!t.state.selection.eq(p)){const m=t.state.tr.setSelection(p);f&&m.setMeta(ca,l.pos),t.dispatch(m)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),ca.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(ca,-1))}function a(l){const c=l,d=ca.getState(t.state);let f;if(d!=null)f=t.state.doc.resolve(d);else if(WT(t,c.target)!=n&&(f=Mw(t,e),!f))return s();f&&o(f,c)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",a)}function JD(t,e,r){if(!(t.state.selection instanceof et))return null;const{$head:n}=t.state.selection;for(let i=n.depth-1;i>=0;i--){const o=n.node(i);if((r<0?n.index(i):n.indexAfter(i))!=(r<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=n.before(i),l=e=="vert"?r>0?"down":"up":r>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function WT(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Mw(t,e){const r=t.posAtCoords({left:e.clientX,top:e.clientY});return r&&r?Rd(t.state.doc.resolve(r.pos)):null}var sQ=class{constructor(e,r){this.node=e,this.defaultCellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${r}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),a1(e,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,a1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function a1(t,e,r,n,i,o){var s;let a=0,l=!0,c=e.firstChild;const d=t.firstChild;if(d){for(let f=0,p=0;f<d.childCount;f++){const{colspan:m,colwidth:g}=d.child(f).attrs;for(let b=0;b<m;b++,p++){const S=i==p?o:g&&g[b],w=S?S+"px":"";if(a+=S||n,S||(l=!1),c)c.style.width!=w&&(c.style.width=w),c=c.nextSibling;else{const T=document.createElement("col");T.style.width=w,e.appendChild(T)}}}for(;c;){const f=c.nextSibling;(s=c.parentNode)==null||s.removeChild(c),c=f}l?(r.style.width=a+"px",r.style.minWidth=""):(r.style.width="",r.style.minWidth=a+"px")}}var Wn=new St("tableColumnResizing");function aQ({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:r=100,View:n=sQ,lastColumnResizable:i=!0}={}){const o=new _t({key:Wn,state:{init(s,a){var l,c;const d=(c=(l=o.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,f=Jr(a.schema).table.name;return n&&d&&(d[f]=(p,m)=>new n(p,r,m)),new lQ(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Wn.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{cQ(s,a,t,i)},mouseleave:s=>{uQ(s)},mousedown:(s,a)=>{dQ(s,a,e,r)}},decorations:s=>{const a=Wn.getState(s);if(a&&a.activeHandle>-1)return gQ(s,a.activeHandle)},nodeViews:{}}});return o}var lQ=class Zm{constructor(e,r){this.activeHandle=e,this.dragging=r}apply(e){const r=this,n=e.getMeta(Wn);if(n&&n.setHandle!=null)return new Zm(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new Zm(r.activeHandle,n.setDragging);if(r.activeHandle>-1&&e.docChanged){let i=e.mapping.map(r.activeHandle,-1);return o1(e.doc.resolve(i))||(i=-1),new Zm(i,r.dragging)}return r}};function cQ(t,e,r,n){const i=Wn.getState(t.state);if(i&&!i.dragging){const o=hQ(e.target);let s=-1;if(o){const{left:a,right:l}=o.getBoundingClientRect();e.clientX-a<=r?s=VT(t,e,"left",r):l-e.clientX<=r&&(s=VT(t,e,"right",r))}if(s!=i.activeHandle){if(!n&&s!==-1){const a=t.state.doc.resolve(s),l=a.node(-1),c=or.get(l),d=a.start(-1);if(c.colCount(a.pos-d)+a.nodeAfter.attrs.colspan-1==c.width-1)return}ZD(t,s)}}}function uQ(t){const e=Wn.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&ZD(t,-1)}function dQ(t,e,r,n){var i;const o=(i=t.dom.ownerDocument.defaultView)!=null?i:window,s=Wn.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=t.state.doc.nodeAt(s.activeHandle),l=fQ(t,s.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(Wn,{setDragging:{startX:e.clientX,startWidth:l}}));function c(f){o.removeEventListener("mouseup",c),o.removeEventListener("mousemove",d);const p=Wn.getState(t.state);p!=null&&p.dragging&&(pQ(t,p.activeHandle,GT(p.dragging,f,r)),t.dispatch(t.state.tr.setMeta(Wn,{setDragging:null})))}function d(f){if(!f.which)return c(f);const p=Wn.getState(t.state);if(p&&p.dragging){const m=GT(p.dragging,f,r);KT(t,p.activeHandle,m,n)}}return KT(t,s.activeHandle,l,n),o.addEventListener("mouseup",c),o.addEventListener("mousemove",d),e.preventDefault(),!0}function fQ(t,e,{colspan:r,colwidth:n}){const i=n&&n[n.length-1];if(i)return i;const o=t.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,l=r;if(n)for(let c=0;c<r;c++)n[c]&&(a-=n[c],l--);return a/l}function hQ(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function VT(t,e,r,n){const i=r=="right"?-n:n,o=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!o)return-1;const{pos:s}=o,a=Rd(t.state.doc.resolve(s));if(!a)return-1;if(r=="right")return a.pos;const l=or.get(a.node(-1)),c=a.start(-1),d=l.map.indexOf(a.pos-c);return d%l.width==0?-1:c+l.map[d-1]}function GT(t,e,r){const n=e.clientX-t.startX;return Math.max(r,t.startWidth+n)}function ZD(t,e){t.dispatch(t.state.tr.setMeta(Wn,{setHandle:e}))}function pQ(t,e,r){const n=t.state.doc.resolve(e),i=n.node(-1),o=or.get(i),s=n.start(-1),a=o.colCount(n.pos-s)+n.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<o.height;c++){const d=c*o.width+a;if(c&&o.map[d]==o.map[d-o.width])continue;const f=o.map[d],p=i.nodeAt(f).attrs,m=p.colspan==1?0:a-o.colCount(f);if(p.colwidth&&p.colwidth[m]==r)continue;const g=p.colwidth?p.colwidth.slice():mQ(p.colspan);g[m]=r,l.setNodeMarkup(s+f,null,{...p,colwidth:g})}l.docChanged&&t.dispatch(l)}function KT(t,e,r,n){const i=t.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),a=or.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let l=t.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&a1(o,l.firstChild,l,n,a,r)}function mQ(t){return Array(t).fill(0)}function gQ(t,e){var r;const n=[],i=t.doc.resolve(e),o=i.node(-1);if(!o)return Tt.empty;const s=or.get(o),a=i.start(-1),l=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let c=0;c<s.height;c++){const d=l+c*s.width;if((l==s.width-1||s.map[d]!=s.map[d+1])&&(c==0||s.map[d]!=s.map[d-s.width])){const f=s.map[d],p=a+f+o.nodeAt(f).nodeSize-1,m=document.createElement("div");m.className="column-resize-handle",(r=Wn.getState(t))!=null&&r.dragging&&n.push(Qt.node(a+f,a+f+o.nodeAt(f).nodeSize,{class:"column-resize-dragging"})),n.push(Qt.widget(p,m))}}return Tt.create(t.doc,n)}function yQ({allowTableNodeSelection:t=!1}={}){return new _t({key:ca,state:{init(){return null},apply(e,r){const n=e.getMeta(ca);if(n!=null)return n==-1?null:n;if(r==null||!e.docChanged)return r;const{deleted:i,pos:o}=e.mapping.mapResult(r);return i?null:o}},props:{decorations:IZ,handleDOMEvents:{mousedown:oQ},createSelectionBetween(e){return ca.getState(e.state)!=null?e.state.selection:null},handleTripleClick:nQ,handleKeyDown:rQ,handlePaste:iQ},appendTransaction(e,r,n){return NZ(n,qD(n,r),t)}})}function l1(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function qT(t,e,r,n,i,o){var s;let a=0,l=!0,c=e.firstChild;const d=t.firstChild;if(d!==null)for(let f=0,p=0;f<d.childCount;f+=1){const{colspan:m,colwidth:g}=d.child(f).attrs;for(let b=0;b<m;b+=1,p+=1){const S=i===p?o:g&&g[b],w=S?`${S}px`:"";if(a+=S||n,S||(l=!1),c){if(c.style.width!==w){const[T,M]=l1(n,S);c.style.setProperty(T,M)}c=c.nextSibling}else{const T=document.createElement("col"),[M,j]=l1(n,S);T.style.setProperty(M,j),e.appendChild(T)}}}for(;c;){const f=c.nextSibling;(s=c.parentNode)===null||s===void 0||s.removeChild(c),c=f}l?(r.style.width=`${a}px`,r.style.minWidth=""):(r.style.width="",r.style.minWidth=`${a}px`)}class vQ{constructor(e,r){this.node=e,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),qT(e,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,qT(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function bQ(t,e,r,n){let i=0,o=!0;const s=[],a=t.firstChild;if(!a)return{};for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:m,colwidth:g}=a.child(f).attrs;for(let b=0;b<m;b+=1,p+=1){const S=r===p?n:g&&g[b];i+=S||e,S||(o=!1);const[w,T]=l1(e,S);s.push(["col",{style:`${w}: ${T}`}])}}const l=o?`${i}px`:"",c=o?"":`${i}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:c}}function XT(t,e){return t.createAndFill()}function wQ(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(r=>{const n=t.nodes[r];n.spec.tableRole&&(e[n.spec.tableRole]=n)}),t.cached.tableNodeTypes=e,e}function xQ(t,e,r,n,i){const o=wQ(t),s=[],a=[];for(let c=0;c<r;c+=1){const d=XT(o.cell);if(d&&a.push(d),n){const f=XT(o.header_cell);f&&s.push(f)}}const l=[];for(let c=0;c<e;c+=1)l.push(o.row.createChecked(null,n&&c===0?s:a));return o.table.createChecked(null,l)}function SQ(t){return t instanceof Ut}const gm=({editor:t})=>{const{selection:e}=t.state;if(!SQ(e))return!1;let r=0;const n=nO(e.ranges[0].$from,o=>o.type.name==="table");return n==null||n.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(r+=1)}),r===e.ranges.length?(t.commands.deleteTable(),!0):!1},kQ=Nt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:vQ,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:r,tableWidth:n,tableMinWidth:i}=bQ(t,this.options.cellMinWidth);return["table",lt(this.options.HTMLAttributes,e,{style:n?`width: ${n}`:`min-width: ${i}`}),r,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:r=!0}={})=>({tr:n,dispatch:i,editor:o})=>{const s=xQ(o.schema,t,e,r);if(i){const a=n.selection.from+1;n.replaceSelectionWith(s).scrollIntoView().setSelection(et.near(n.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>LZ(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>FZ(t,e),deleteColumn:()=>({state:t,dispatch:e})=>BZ(t,e),addRowBefore:()=>({state:t,dispatch:e})=>HZ(t,e),addRowAfter:()=>({state:t,dispatch:e})=>$Z(t,e),deleteRow:()=>({state:t,dispatch:e})=>WZ(t,e),deleteTable:()=>({state:t,dispatch:e})=>JZ(t,e),mergeCells:()=>({state:t,dispatch:e})=>FT(t,e),splitCell:()=>({state:t,dispatch:e})=>jT(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>jh("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>jh("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>XZ(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>FT(t,e)?!0:jT(t,e),setCellAttribute:(t,e)=>({state:r,dispatch:n})=>KZ(t,e)(r,n),goToNextCell:()=>({state:t,dispatch:e})=>zT(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>zT(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&qD(t),!0),setCellSelection:t=>({tr:e,dispatch:r})=>{if(r){const n=Ut.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:gm,"Mod-Backspace":gm,Delete:gm,"Mod-Delete":gm}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[aQ({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],yQ({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:dt(Ze(t,"tableRole",e))}}}),_Q=Nt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",lt(this.options.HTMLAttributes,t),0]}}),EQ=Nt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",lt(this.options.HTMLAttributes,t),0]}});function CQ(t,e,r){if(!t.doc)return t;const n=t.doc.nodeAt(e);if(!n||r===n.attrs.backgroundColor)return t;const i={...n.attrs,backgroundColor:r};return t.setNodeMarkup(e,n.type,i,n.marks)}function TQ(t,e,r){const{doc:n,selection:i}=t;return!n||!i||!(i instanceof Ut)||i.forEachCell((o,s)=>{t=CQ(t,s,r)}),t}function YT(t,e){return({tr:r,state:n,dispatch:i})=>{const{selection:o}=n;return r=r.setSelection(o),r=TQ(r,e,t),r.docChanged?(i==null||i(r),!0):!1}}const AQ=yt.create({name:"tableCellBackground",addOptions(){return{types:["tableCell"],HTMLAttributes:{}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{parseHTML:t=>t.style.backgroundColor||"",renderHTML:t=>!t.backgroundColor||t.backgroundColor===""?{}:{style:`background-color: ${t.backgroundColor}`}}}}]},addCommands(){return{setTableCellBackground:t=>YT(t,this.options),unsetTableCellBackground:()=>YT("",this.options)}}}),RQ=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,IQ=/CrOS/,OQ=/android|ipad|playbook|silk/i;function JT(t={}){let e=t.ua||typeof navigator<"u"&&navigator.userAgent;return e&&typeof e=="object"&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string"?!1:!!(RQ.test(e)&&!IQ.test(e)||t.tablet&&OQ.test(e)||t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.includes("Macintosh")&&e.includes("Safari"))}const ZT=t=>Array.from({length:t}).map((e,r)=>r+1);function MQ(t){var d;const[e,r]=J.useState(!0),[n,i]=J.useState({rows:JT()?Zp:Jp,cols:JT()?Zp:Jp}),[o,s]=J.useState({rows:Qp,cols:Qp});function a(f,p){f===n.rows&&i(m=>({...m,rows:Math.min(f+1,Zp)})),p===n.cols&&i(m=>({...m,cols:Math.min(p+1,Zp)})),s({rows:f,cols:p})}function l(f,p){t==null||t.createTable({rows:f,cols:p,withHeaderRow:e}),c()}function c(){r(!1),i({rows:Jp,cols:Jp}),s({rows:Qp,cols:Qp})}return x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{asChild:!0,children:t==null?void 0:t.children}),x.jsx(Xn,{className:"richtext-w-full !richtext-p-2",align:"start",side:"bottom",children:x.jsxs("div",{className:"richtext-p-0 table-grid-size-editor",children:[x.jsx("div",{className:"richtext-flex richtext-flex-col richtext-flex-wrap richtext-justify-between richtext-gap-1",children:(d=ZT(n==null?void 0:n.rows))==null?void 0:d.map(f=>{var p;return x.jsx("div",{className:"richtext-flex richtext-gap-1",children:(p=ZT(n==null?void 0:n.cols))==null?void 0:p.map(m=>x.jsx("div",{className:`richtext-cursor-pointer richtext-border-border ${m<=o.cols&&f<=o.rows&&"!richtext-bg-foreground tableCellActive"}`,onMouseOver:()=>a(f,m),onMouseDown:()=>l(f,m),children:x.jsx("div",{className:"richtext-w-4 richtext-h-4 richtext-p-1 !richtext-border richtext-rounded-[2px] richtext-box-border richtext-border-solid !richtext-border-border"})},`c-${m}`))},`r-${f}`)})}),x.jsxs("div",{className:"richtext-mt-2 richtext-text-sm richtext-text-center richtext-text-zinc-600",children:[o.rows," ","x",o.cols]})]})})]})}function NQ(t){function e(r){t.disabled||t.editor.chain().focus().insertTable({...r,withHeaderRow:!1}).run()}return x.jsx(MQ,{createTable:e,children:x.jsx(Ve,{icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,color:t==null?void 0:t.color,action:t==null?void 0:t.action,isActive:t==null?void 0:t.isActive})})}const DQ=kQ.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!1,button:({editor:e,t:r})=>({component:NQ,componentProps:{disabled:e.isActive("table")||!1,icon:"Table",tooltip:r("editor.table.tooltip"),editor:e}})}},addExtensions(){return[wZ.configure(this.options.tableRow),EQ.configure(this.options.tableHeader),_Q.configure(this.options.tableCell),AQ.configure(this.options.tableCellBackground)]}}),PQ=yt.create({name:"painter",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>{e.commands.setPainter(e==null?void 0:e.state.selection.$head.marks())},icon:"PaintRoller",tooltip:r("editor.format")}})}},addCommands(){return{setPainter:t=>({view:{dispatch:e,state:{tr:r},dom:n}})=>{const s=`url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;return n.style.cursor=s,e(r.setMeta("painterAction",{type:"start",marks:t})),!0}}},addProseMirrorPlugins(){return[new _t({key:new St("format-painter"),state:{init:()=>[],apply:(t,e)=>{const r=t.getMeta("painterAction");return r&&r.type==="start"?e=r.marks:r&&r.type==="end"&&(e=[]),e}},props:{handleDOMEvents:{mousedown(t,e){const r=this.getState(t.state);if(!r||r.length===0)return t.dom.style.cursor="",!1;const n=()=>{document.removeEventListener("mouseup",n);let{dispatch:i,state:{tr:o,selection:s},dom:a}=t;a.style.cursor="",o=o.removeMark(s.from,s.to);for(const l of r)l.type.name!=="link"&&(o=o.addMark(s.from,s.to,l));i(o.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",n),!0}}}})]}});function LQ({editor:t,...e}){const{t:r}=Et(),[n,i]=J.useState(-1),[o,s]=J.useState([]),[a,l]=J.useState(""),[c,d]=J.useState(""),[f,p]=J.useState(!1),[m,g]=J.useState(!1);return J.useEffect(()=>{f||(l(""),d(""),i(-1),s([]),t.commands.setSearchTerm(""),t.commands.setReplaceTerm(""))},[t,f]),J.useEffect(()=>{f&&t&&t.commands&&t.commands.setSearchTerm&&t.commands.setSearchTerm(a)},[f,a,t]),J.useEffect(()=>{f&&t&&t.commands&&t.commands.setReplaceTerm&&t.commands.setReplaceTerm(c)},[f,c,t]),J.useEffect(()=>{if(!t)return;const b=t.extensionManager.extensions.find(w=>w.name===QD.name);if(!b)return;const S=()=>{if(!f)return;const w=b?b.storage.currentIndex:-1,T=b?b.storage.results:[];i(M=>M!==w?w:M),s(M=>hS(M,T)?M:T)};return window.addEventListener(c1,S),()=>{b&&window.removeEventListener(c1,S)}},[f,t]),x.jsxs(xi,{open:f,onOpenChange:p,children:[x.jsx(Si,{disabled:e==null?void 0:e.disabled,asChild:!0,children:x.jsx(Ve,{tooltip:e==null?void 0:e.tooltip,isActive:e==null?void 0:e.isActive,disabled:e==null?void 0:e.disabled,children:x.jsx(Rt,{name:e==null?void 0:e.icon})})}),x.jsxs(Xn,{hideWhenDetached:!0,className:"richtext-w-full",align:"start",side:"bottom",children:[x.jsxs("div",{className:"richtext-mb-[6px] richtext-flex richtext-items-center richtext-justify-between",children:[x.jsx(Kn,{children:r("editor.search.dialog.text")}),x.jsx("span",{className:"richtext-font-semibold",children:o.length?`${n+1}/${o.length}`:"0/0"})]}),x.jsxs("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[10px]",children:[x.jsx(hn,{type:"text",required:!0,className:"richtext-w-full",placeholder:"Text",autoFocus:!0,value:a,onChange:b=>l(b.target.value)}),x.jsx(Mt,{disabled:!o.length,className:"richtext-flex-1",onClick:t.commands.goToPrevSearchResult,children:x.jsx(Rt,{name:"ChevronUp"})}),x.jsx(Mt,{disabled:!o.length,className:"richtext-flex-1",onClick:t.commands.goToNextSearchResult,children:x.jsx(Rt,{name:"ChevronDown"})})]}),x.jsx(Kn,{className:"richtext-mb-[6px]",children:r("editor.replace.dialog.text")}),x.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[5px]",children:x.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:x.jsx(hn,{type:"text",required:!0,className:"richtext-w-80",placeholder:"Text",value:c,onChange:b=>d(b.target.value)})})}),x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-space-x-2 richtext-mb-[10px]",children:[x.jsx(mS,{checked:m,onCheckedChange:b=>{g(b),t.commands.setCaseSensitive(b)}}),x.jsx(Kn,{children:r("editor.replace.caseSensitive")})]}),x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[x.jsx(Mt,{disabled:!o.length,className:"richtext-flex-1",onClick:t.commands.replace,children:r("editor.replace.dialog.text")}),x.jsx(Mt,{disabled:!o.length,className:"richtext-flex-1",onClick:t.commands.replaceAll,children:r("editor.replaceAll.dialog.text")})]})]})]})}const Pf=(t,e)=>e(t.tr);function FQ(t,e,r){return RegExp(e?t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"):t,r?"gu":"gui")}function jQ(t,e,r){const n=[];let i=[];const o=[];let s=0;if(!e)return{decorationsToReturn:[],results:[]};t==null||t.descendants((a,l)=>{a.isText?i[s]?i[s]={text:i[s].text+a.text,pos:i[s].pos}:i[s]={text:`${a.text}`,pos:l}:s+=1}),i=i.filter(Boolean);for(let a=0;a<i.length;a+=1){const{text:l,pos:c}=i[a],d=[...l.matchAll(e)];for(let f=0;f<d.length;f+=1){const p=d[f];if(p[0]==="")break;p.index!==void 0&&o.push({from:c+p.index,to:c+p.index+p[0].length})}}for(let a=0;a<o.length;a+=1){const l=o[a];n.push(Qt.inline(l.from,l.to,{class:r}))}return{decorationsToReturn:n,results:o}}function QT(t,e,{state:r,dispatch:n}){if(!e[0])return;const{from:o,to:s}=e[0];n&&n(r.tr.insertText(t,o,s))}function BQ(t,e,r,n){const i=e+1;if(!n[i])return null;const{from:o,to:s}=n[e],a=s-o-t.length+r,{from:l,to:c}=n[i];return n[i]={to:c-a,from:l-a},[a,n]}function zQ(t,e,{tr:r,dispatch:n}){let i=0,o=e.slice();if(!o.length)return!1;for(let s=0;s<o.length;s+=1){const{from:a,to:l}=o[s];r.insertText(t,a,l);const c=BQ(t,s,i,o);c&&(i=c[0],o=c[1])}return n(r),!0}function eA({view:t,tr:e,searchResults:r,searchResultCurrentClass:n,gotoIndex:i}){const o=r[i];if(o){const s=e.setMeta("directDecoration",{fromPos:o.from,toPos:o.to,attrs:{class:n}});return t==null||t.dispatch(s),setTimeout(()=>{const a=window.document.querySelector(`.${n}`);a&&E1(a,{behavior:"smooth",scrollMode:"if-needed"})},0),!0}return!1}const c1="ON_SEARCH_RESULTS",vu=new CustomEvent(c1),QD=yt.create({name:"search",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),searchTerm:"",replaceTerm:"",results:[],currentIndex:0,searchResultClass:"search-result",searchResultCurrentClass:"search-result-current",caseSensitive:!1,disableRegex:!1,onChange:()=>{},button:({editor:e,t:r})=>({component:LQ,componentProps:{action:()=>{},icon:"SearchAndReplace",tooltip:r("editor.searchAndReplace.tooltip"),isActive:()=>!1,disabled:!1,editor:e}})}},addStorage(){return{results:[],currentIndex:-1}},addCommands(){return{setSearchTerm:t=>({state:e,dispatch:r})=>(this.options.searchTerm=t,this.storage.results=[],this.storage.currentIndex=0,window.dispatchEvent(vu),Pf(e,r),!1),setReplaceTerm:t=>({state:e,dispatch:r})=>(this.options.replaceTerm=t,Pf(e,r),!1),setCaseSensitive:t=>({state:e,dispatch:r})=>(this.options.caseSensitive=t,Pf(e,r),!1),replace:()=>({state:t,dispatch:e})=>{const{replaceTerm:r}=this.options,{currentIndex:n,results:i}=this.storage,o=i[n];return o?(QT(r,[o],{state:t,dispatch:e}),this.storage.results.splice(n,1)):(QT(r,i,{state:t,dispatch:e}),this.storage.results.shift()),window.dispatchEvent(vu),Pf(t,e),!1},replaceAll:()=>({state:t,tr:e,dispatch:r})=>{const{replaceTerm:n}=this.options,{results:i}=this.storage;return zQ(n,i,{tr:e,dispatch:r}),this.storage.currentIndex=-1,this.storage.results=[],window.dispatchEvent(vu),Pf(t,r),!1},goToPrevSearchResult:()=>({view:t,tr:e})=>{const{searchResultCurrentClass:r}=this.options,{currentIndex:n,results:i}=this.storage,o=(n+i.length-1)%i.length;return this.storage.currentIndex=o,window.dispatchEvent(vu),eA({view:t,tr:e,searchResults:i,searchResultCurrentClass:r,gotoIndex:o})},goToNextSearchResult:()=>({view:t,tr:e})=>{const{searchResultCurrentClass:r}=this.options,{currentIndex:n,results:i}=this.storage,o=(n+1)%i.length;return this.storage.currentIndex=o,this.options.onChange&&this.options.onChange(),window.dispatchEvent(vu),eA({view:t,tr:e,searchResults:i,searchResultCurrentClass:r,gotoIndex:o})}}},addProseMirrorPlugins(){const t=this;return[new _t({key:new St("search"),state:{init(){return Tt.empty},apply(e){const{doc:r,docChanged:n}=e,{searchTerm:i,searchResultClass:o,searchResultCurrentClass:s,disableRegex:a,caseSensitive:l}=t.options;if(n||i){const{decorationsToReturn:c,results:d}=jQ(r,FQ(i,a,l),o);if(t.storage.results=d,t.storage.currentIndex>d.length-1&&(t.storage.currentIndex=0),window.dispatchEvent(vu),e.getMeta("directDecoration")){const{fromPos:f,toPos:p,attrs:m}=e.getMeta("directDecoration");c.push(Qt.inline(f,p,m))}else d.length&&(c[0]=Qt.inline(d[0].from,d[0].to,{class:s}));return Tt.create(r,c)}return Tt.empty}},props:{decorations(e){return this.getState(e)}}})]}}),fd={100:"💯",1234:"🔢",grinning:"😀",smiley:"😃",smile:"😄",grin:"😁",laughing:"😆",satisfied:"😆",sweat_smile:"😅",rofl:"🤣",joy:"😂",slightly_smiling_face:"🙂",upside_down_face:"🙃",wink:"😉",blush:"😊",innocent:"😇",smiling_face_with_three_hearts:"🥰",heart_eyes:"😍",star_struck:"🤩",kissing_heart:"😘",kissing:"😗",relaxed:"☺️",kissing_closed_eyes:"😚",kissing_smiling_eyes:"😙",smiling_face_with_tear:"🥲",yum:"😋",stuck_out_tongue:"😛",stuck_out_tongue_winking_eye:"😜",zany_face:"🤪",stuck_out_tongue_closed_eyes:"😝",money_mouth_face:"🤑",hugs:"🤗",hand_over_mouth:"🤭",shushing_face:"🤫",thinking:"🤔",zipper_mouth_face:"🤐",raised_eyebrow:"🤨",neutral_face:"😐",expressionless:"😑",no_mouth:"😶",smirk:"😏",unamused:"😒",roll_eyes:"🙄",grimacing:"😬",lying_face:"🤥",relieved:"😌",pensive:"😔",sleepy:"😪",drooling_face:"🤤",sleeping:"😴",mask:"😷",face_with_thermometer:"🤒",face_with_head_bandage:"🤕",nauseated_face:"🤢",vomiting_face:"🤮",sneezing_face:"🤧",hot_face:"🥵",cold_face:"🥶",woozy_face:"🥴",dizzy_face:"😵",exploding_head:"🤯",cowboy_hat_face:"🤠",partying_face:"🥳",disguised_face:"🥸",sunglasses:"😎",nerd_face:"🤓",monocle_face:"🧐",confused:"😕",worried:"😟",slightly_frowning_face:"🙁",frowning_face:"☹️",open_mouth:"😮",hushed:"😯",astonished:"😲",flushed:"😳",pleading_face:"🥺",frowning:"😦",anguished:"😧",fearful:"😨",cold_sweat:"😰",disappointed_relieved:"😥",cry:"😢",sob:"😭",scream:"😱",confounded:"😖",persevere:"😣",disappointed:"😞",sweat:"😓",weary:"😩",tired_face:"😫",yawning_face:"🥱",triumph:"😤",rage:"😡",pout:"😡",angry:"😠",cursing_face:"🤬",smiling_imp:"😈",imp:"👿",skull:"💀",skull_and_crossbones:"☠️",hankey:"💩",poop:"💩",shit:"💩",clown_face:"🤡",japanese_ogre:"👹",japanese_goblin:"👺",ghost:"👻",alien:"👽",space_invader:"👾",robot:"🤖",smiley_cat:"😺",smile_cat:"😸",joy_cat:"😹",heart_eyes_cat:"😻",smirk_cat:"😼",kissing_cat:"😽",scream_cat:"🙀",crying_cat_face:"😿",pouting_cat:"😾",see_no_evil:"🙈",hear_no_evil:"🙉",speak_no_evil:"🙊",kiss:"💋",love_letter:"💌",cupid:"💘",gift_heart:"💝",sparkling_heart:"💖",heartpulse:"💗",heartbeat:"💓",revolving_hearts:"💞",two_hearts:"💕",heart_decoration:"💟",heavy_heart_exclamation:"❣️",broken_heart:"💔",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",brown_heart:"🤎",black_heart:"🖤",white_heart:"🤍",anger:"💢",boom:"💥",collision:"💥",dizzy:"💫",sweat_drops:"💦",dash:"💨",hole:"🕳️",bomb:"💣",speech_balloon:"💬",eye_speech_bubble:"👁️‍🗨️",left_speech_bubble:"🗨️",right_anger_bubble:"🗯️",thought_balloon:"💭",zzz:"💤",wave:"👋",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐️",hand:"✋",raised_hand:"✋",vulcan_salute:"🖖",ok_hand:"👌",pinched_fingers:"🤌",pinching_hand:"🤏",v:"✌️",crossed_fingers:"🤞",love_you_gesture:"🤟",metal:"🤘",call_me_hand:"🤙",point_left:"👈",point_right:"👉",point_up_2:"👆",middle_finger:"🖕",fu:"🖕",point_down:"👇",point_up:"☝️","+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",fist_raised:"✊",fist:"✊",fist_oncoming:"👊",facepunch:"👊",punch:"👊",fist_left:"🤛",fist_right:"🤜",clap:"👏",raised_hands:"🙌",open_hands:"👐",palms_up_together:"🤲",handshake:"🤝",pray:"🙏",writing_hand:"✍️",nail_care:"💅",selfie:"🤳",muscle:"💪",mechanical_arm:"🦾",mechanical_leg:"🦿",leg:"🦵",foot:"🦶",ear:"👂",ear_with_hearing_aid:"🦻",nose:"👃",brain:"🧠",anatomical_heart:"🫀",lungs:"🫁",tooth:"🦷",bone:"🦴",eyes:"👀",eye:"👁️",tongue:"👅",lips:"👄",baby:"👶",child:"🧒",boy:"👦",girl:"👧",adult:"🧑",blond_haired_person:"👱",man:"👨",bearded_person:"🧔",red_haired_man:"👨‍🦰",curly_haired_man:"👨‍🦱",white_haired_man:"👨‍🦳",bald_man:"👨‍🦲",woman:"👩",red_haired_woman:"👩‍🦰",person_red_hair:"🧑‍🦰",curly_haired_woman:"👩‍🦱",person_curly_hair:"🧑‍🦱",white_haired_woman:"👩‍🦳",person_white_hair:"🧑‍🦳",bald_woman:"👩‍🦲",person_bald:"🧑‍🦲",blond_haired_woman:"👱‍♀️",blonde_woman:"👱‍♀️",blond_haired_man:"👱‍♂️",older_adult:"🧓",older_man:"👴",older_woman:"👵",frowning_person:"🙍",frowning_man:"🙍‍♂️",frowning_woman:"🙍‍♀️",pouting_face:"🙎",pouting_man:"🙎‍♂️",pouting_woman:"🙎‍♀️",no_good:"🙅",no_good_man:"🙅‍♂️",ng_man:"🙅‍♂️",no_good_woman:"🙅‍♀️",ng_woman:"🙅‍♀️",ok_person:"🙆",ok_man:"🙆‍♂️",ok_woman:"🙆‍♀️",tipping_hand_person:"💁",information_desk_person:"💁",tipping_hand_man:"💁‍♂️",sassy_man:"💁‍♂️",tipping_hand_woman:"💁‍♀️",sassy_woman:"💁‍♀️",raising_hand:"🙋",raising_hand_man:"🙋‍♂️",raising_hand_woman:"🙋‍♀️",deaf_person:"🧏",deaf_man:"🧏‍♂️",deaf_woman:"🧏‍♀️",bow:"🙇",bowing_man:"🙇‍♂️",bowing_woman:"🙇‍♀️",facepalm:"🤦",man_facepalming:"🤦‍♂️",woman_facepalming:"🤦‍♀️",shrug:"🤷",man_shrugging:"🤷‍♂️",woman_shrugging:"🤷‍♀️",health_worker:"🧑‍⚕️",man_health_worker:"👨‍⚕️",woman_health_worker:"👩‍⚕️",student:"🧑‍🎓",man_student:"👨‍🎓",woman_student:"👩‍🎓",teacher:"🧑‍🏫",man_teacher:"👨‍🏫",woman_teacher:"👩‍🏫",judge:"🧑‍⚖️",man_judge:"👨‍⚖️",woman_judge:"👩‍⚖️",farmer:"🧑‍🌾",man_farmer:"👨‍🌾",woman_farmer:"👩‍🌾",cook:"🧑‍🍳",man_cook:"👨‍🍳",woman_cook:"👩‍🍳",mechanic:"🧑‍🔧",man_mechanic:"👨‍🔧",woman_mechanic:"👩‍🔧",factory_worker:"🧑‍🏭",man_factory_worker:"👨‍🏭",woman_factory_worker:"👩‍🏭",office_worker:"🧑‍💼",man_office_worker:"👨‍💼",woman_office_worker:"👩‍💼",scientist:"🧑‍🔬",man_scientist:"👨‍🔬",woman_scientist:"👩‍🔬",technologist:"🧑‍💻",man_technologist:"👨‍💻",woman_technologist:"👩‍💻",singer:"🧑‍🎤",man_singer:"👨‍🎤",woman_singer:"👩‍🎤",artist:"🧑‍🎨",man_artist:"👨‍🎨",woman_artist:"👩‍🎨",pilot:"🧑‍✈️",man_pilot:"👨‍✈️",woman_pilot:"👩‍✈️",astronaut:"🧑‍🚀",man_astronaut:"👨‍🚀",woman_astronaut:"👩‍🚀",firefighter:"🧑‍🚒",man_firefighter:"👨‍🚒",woman_firefighter:"👩‍🚒",police_officer:"👮",cop:"👮",policeman:"👮‍♂️",policewoman:"👮‍♀️",detective:"🕵️",male_detective:"🕵️‍♂️",female_detective:"🕵️‍♀️",guard:"💂",guardsman:"💂‍♂️",guardswoman:"💂‍♀️",ninja:"🥷",construction_worker:"👷",construction_worker_man:"👷‍♂️",construction_worker_woman:"👷‍♀️",prince:"🤴",princess:"👸",person_with_turban:"👳",man_with_turban:"👳‍♂️",woman_with_turban:"👳‍♀️",man_with_gua_pi_mao:"👲",woman_with_headscarf:"🧕",person_in_tuxedo:"🤵",man_in_tuxedo:"🤵‍♂️",woman_in_tuxedo:"🤵‍♀️",person_with_veil:"👰",man_with_veil:"👰‍♂️",woman_with_veil:"👰‍♀️",bride_with_veil:"👰‍♀️",pregnant_woman:"🤰",breast_feeding:"🤱",woman_feeding_baby:"👩‍🍼",man_feeding_baby:"👨‍🍼",person_feeding_baby:"🧑‍🍼",angel:"👼",santa:"🎅",mrs_claus:"🤶",mx_claus:"🧑‍🎄",superhero:"🦸",superhero_man:"🦸‍♂️",superhero_woman:"🦸‍♀️",supervillain:"🦹",supervillain_man:"🦹‍♂️",supervillain_woman:"🦹‍♀️",mage:"🧙",mage_man:"🧙‍♂️",mage_woman:"🧙‍♀️",fairy:"🧚",fairy_man:"🧚‍♂️",fairy_woman:"🧚‍♀️",vampire:"🧛",vampire_man:"🧛‍♂️",vampire_woman:"🧛‍♀️",merperson:"🧜",merman:"🧜‍♂️",mermaid:"🧜‍♀️",elf:"🧝",elf_man:"🧝‍♂️",elf_woman:"🧝‍♀️",genie:"🧞",genie_man:"🧞‍♂️",genie_woman:"🧞‍♀️",zombie:"🧟",zombie_man:"🧟‍♂️",zombie_woman:"🧟‍♀️",massage:"💆",massage_man:"💆‍♂️",massage_woman:"💆‍♀️",haircut:"💇",haircut_man:"💇‍♂️",haircut_woman:"💇‍♀️",walking:"🚶",walking_man:"🚶‍♂️",walking_woman:"🚶‍♀️",standing_person:"🧍",standing_man:"🧍‍♂️",standing_woman:"🧍‍♀️",kneeling_person:"🧎",kneeling_man:"🧎‍♂️",kneeling_woman:"🧎‍♀️",person_with_probing_cane:"🧑‍🦯",man_with_probing_cane:"👨‍🦯",woman_with_probing_cane:"👩‍🦯",person_in_motorized_wheelchair:"🧑‍🦼",man_in_motorized_wheelchair:"👨‍🦼",woman_in_motorized_wheelchair:"👩‍🦼",person_in_manual_wheelchair:"🧑‍🦽",man_in_manual_wheelchair:"👨‍🦽",woman_in_manual_wheelchair:"👩‍🦽",runner:"🏃",running:"🏃",running_man:"🏃‍♂️",running_woman:"🏃‍♀️",woman_dancing:"💃",dancer:"💃",man_dancing:"🕺",business_suit_levitating:"🕴️",dancers:"👯",dancing_men:"👯‍♂️",dancing_women:"👯‍♀️",sauna_person:"🧖",sauna_man:"🧖‍♂️",sauna_woman:"🧖‍♀️",climbing:"🧗",climbing_man:"🧗‍♂️",climbing_woman:"🧗‍♀️",person_fencing:"🤺",horse_racing:"🏇",skier:"⛷️",snowboarder:"🏂",golfing:"🏌️",golfing_man:"🏌️‍♂️",golfing_woman:"🏌️‍♀️",surfer:"🏄",surfing_man:"🏄‍♂️",surfing_woman:"🏄‍♀️",rowboat:"🚣",rowing_man:"🚣‍♂️",rowing_woman:"🚣‍♀️",swimmer:"🏊",swimming_man:"🏊‍♂️",swimming_woman:"🏊‍♀️",bouncing_ball_person:"⛹️",bouncing_ball_man:"⛹️‍♂️",basketball_man:"⛹️‍♂️",bouncing_ball_woman:"⛹️‍♀️",basketball_woman:"⛹️‍♀️",weight_lifting:"🏋️",weight_lifting_man:"🏋️‍♂️",weight_lifting_woman:"🏋️‍♀️",bicyclist:"🚴",biking_man:"🚴‍♂️",biking_woman:"🚴‍♀️",mountain_bicyclist:"🚵",mountain_biking_man:"🚵‍♂️",mountain_biking_woman:"🚵‍♀️",cartwheeling:"🤸",man_cartwheeling:"🤸‍♂️",woman_cartwheeling:"🤸‍♀️",wrestling:"🤼",men_wrestling:"🤼‍♂️",women_wrestling:"🤼‍♀️",water_polo:"🤽",man_playing_water_polo:"🤽‍♂️",woman_playing_water_polo:"🤽‍♀️",handball_person:"🤾",man_playing_handball:"🤾‍♂️",woman_playing_handball:"🤾‍♀️",juggling_person:"🤹",man_juggling:"🤹‍♂️",woman_juggling:"🤹‍♀️",lotus_position:"🧘",lotus_position_man:"🧘‍♂️",lotus_position_woman:"🧘‍♀️",bath:"🛀",sleeping_bed:"🛌",people_holding_hands:"🧑‍🤝‍🧑",two_women_holding_hands:"👭",couple:"👫",two_men_holding_hands:"👬",couplekiss:"💏",couplekiss_man_woman:"👩‍❤️‍💋‍👨",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",couple_with_heart:"💑",couple_with_heart_woman_man:"👩‍❤️‍👨",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",family:"👪",family_man_woman_boy:"👨‍👩‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",speaking_head:"🗣️",bust_in_silhouette:"👤",busts_in_silhouette:"👥",people_hugging:"🫂",footprints:"👣",monkey_face:"🐵",monkey:"🐒",gorilla:"🦍",orangutan:"🦧",dog:"🐶",dog2:"🐕",guide_dog:"🦮",service_dog:"🐕‍🦺",poodle:"🐩",wolf:"🐺",fox_face:"🦊",raccoon:"🦝",cat:"🐱",cat2:"🐈",black_cat:"🐈‍⬛",lion:"🦁",tiger:"🐯",tiger2:"🐅",leopard:"🐆",horse:"🐴",racehorse:"🐎",unicorn:"🦄",zebra:"🦓",deer:"🦌",bison:"🦬",cow:"🐮",ox:"🐂",water_buffalo:"🐃",cow2:"🐄",pig:"🐷",pig2:"🐖",boar:"🐗",pig_nose:"🐽",ram:"🐏",sheep:"🐑",goat:"🐐",dromedary_camel:"🐪",camel:"🐫",llama:"🦙",giraffe:"🦒",elephant:"🐘",mammoth:"🦣",rhinoceros:"🦏",hippopotamus:"🦛",mouse:"🐭",mouse2:"🐁",rat:"🐀",hamster:"🐹",rabbit:"🐰",rabbit2:"🐇",chipmunk:"🐿️",beaver:"🦫",hedgehog:"🦔",bat:"🦇",bear:"🐻",polar_bear:"🐻‍❄️",koala:"🐨",panda_face:"🐼",sloth:"🦥",otter:"🦦",skunk:"🦨",kangaroo:"🦘",badger:"🦡",feet:"🐾",paw_prints:"🐾",turkey:"🦃",chicken:"🐔",rooster:"🐓",hatching_chick:"🐣",baby_chick:"🐤",hatched_chick:"🐥",bird:"🐦",penguin:"🐧",dove:"🕊️",eagle:"🦅",duck:"🦆",swan:"🦢",owl:"🦉",dodo:"🦤",feather:"🪶",flamingo:"🦩",peacock:"🦚",parrot:"🦜",frog:"🐸",crocodile:"🐊",turtle:"🐢",lizard:"🦎",snake:"🐍",dragon_face:"🐲",dragon:"🐉",sauropod:"🦕","t-rex":"🦖",whale:"🐳",whale2:"🐋",dolphin:"🐬",flipper:"🐬",seal:"🦭",fish:"🐟",tropical_fish:"🐠",blowfish:"🐡",shark:"🦈",octopus:"🐙",shell:"🐚",snail:"🐌",butterfly:"🦋",bug:"🐛",ant:"🐜",bee:"🐝",honeybee:"🐝",beetle:"🪲",lady_beetle:"🐞",cricket:"🦗",cockroach:"🪳",spider:"🕷️",spider_web:"🕸️",scorpion:"🦂",mosquito:"🦟",fly:"🪰",worm:"🪱",microbe:"🦠",bouquet:"💐",cherry_blossom:"🌸",white_flower:"💮",rosette:"🏵️",rose:"🌹",wilted_flower:"🥀",hibiscus:"🌺",sunflower:"🌻",blossom:"🌼",tulip:"🌷",seedling:"🌱",potted_plant:"🪴",evergreen_tree:"🌲",deciduous_tree:"🌳",palm_tree:"🌴",cactus:"🌵",ear_of_rice:"🌾",herb:"🌿",shamrock:"☘️",four_leaf_clover:"🍀",maple_leaf:"🍁",fallen_leaf:"🍂",leaves:"🍃",grapes:"🍇",melon:"🍈",watermelon:"🍉",tangerine:"🍊",orange:"🍊",mandarin:"🍊",lemon:"🍋",banana:"🍌",pineapple:"🍍",mango:"🥭",apple:"🍎",green_apple:"🍏",pear:"🍐",peach:"🍑",cherries:"🍒",strawberry:"🍓",blueberries:"🫐",kiwi_fruit:"🥝",tomato:"🍅",olive:"🫒",coconut:"🥥",avocado:"🥑",eggplant:"🍆",potato:"🥔",carrot:"🥕",corn:"🌽",hot_pepper:"🌶️",bell_pepper:"🫑",cucumber:"🥒",leafy_green:"🥬",broccoli:"🥦",garlic:"🧄",onion:"🧅",mushroom:"🍄",peanuts:"🥜",chestnut:"🌰",bread:"🍞",croissant:"🥐",baguette_bread:"🥖",flatbread:"🫓",pretzel:"🥨",bagel:"🥯",pancakes:"🥞",waffle:"🧇",cheese:"🧀",meat_on_bone:"🍖",poultry_leg:"🍗",cut_of_meat:"🥩",bacon:"🥓",hamburger:"🍔",fries:"🍟",pizza:"🍕",hotdog:"🌭",sandwich:"🥪",taco:"🌮",burrito:"🌯",tamale:"🫔",stuffed_flatbread:"🥙",falafel:"🧆",egg:"🥚",fried_egg:"🍳",shallow_pan_of_food:"🥘",stew:"🍲",fondue:"🫕",bowl_with_spoon:"🥣",green_salad:"🥗",popcorn:"🍿",butter:"🧈",salt:"🧂",canned_food:"🥫",bento:"🍱",rice_cracker:"🍘",rice_ball:"🍙",rice:"🍚",curry:"🍛",ramen:"🍜",spaghetti:"🍝",sweet_potato:"🍠",oden:"🍢",sushi:"🍣",fried_shrimp:"🍤",fish_cake:"🍥",moon_cake:"🥮",dango:"🍡",dumpling:"🥟",fortune_cookie:"🥠",takeout_box:"🥡",crab:"🦀",lobster:"🦞",shrimp:"🦐",squid:"🦑",oyster:"🦪",icecream:"🍦",shaved_ice:"🍧",ice_cream:"🍨",doughnut:"🍩",cookie:"🍪",birthday:"🎂",cake:"🍰",cupcake:"🧁",pie:"🥧",chocolate_bar:"🍫",candy:"🍬",lollipop:"🍭",custard:"🍮",honey_pot:"🍯",baby_bottle:"🍼",milk_glass:"🥛",coffee:"☕",teapot:"🫖",tea:"🍵",sake:"🍶",champagne:"🍾",wine_glass:"🍷",cocktail:"🍸",tropical_drink:"🍹",beer:"🍺",beers:"🍻",clinking_glasses:"🥂",tumbler_glass:"🥃",cup_with_straw:"🥤",bubble_tea:"🧋",beverage_box:"🧃",mate:"🧉",ice_cube:"🧊",chopsticks:"🥢",plate_with_cutlery:"🍽️",fork_and_knife:"🍴",spoon:"🥄",hocho:"🔪",knife:"🔪",amphora:"🏺",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",globe_with_meridians:"🌐",world_map:"🗺️",japan:"🗾",compass:"🧭",mountain_snow:"🏔️",mountain:"⛰️",volcano:"🌋",mount_fuji:"🗻",camping:"🏕️",beach_umbrella:"🏖️",desert:"🏜️",desert_island:"🏝️",national_park:"🏞️",stadium:"🏟️",classical_building:"🏛️",building_construction:"🏗️",bricks:"🧱",rock:"🪨",wood:"🪵",hut:"🛖",houses:"🏘️",derelict_house:"🏚️",house:"🏠",house_with_garden:"🏡",office:"🏢",post_office:"🏣",european_post_office:"🏤",hospital:"🏥",bank:"🏦",hotel:"🏨",love_hotel:"🏩",convenience_store:"🏪",school:"🏫",department_store:"🏬",factory:"🏭",japanese_castle:"🏯",european_castle:"🏰",wedding:"💒",tokyo_tower:"🗼",statue_of_liberty:"🗽",church:"⛪",mosque:"🕌",hindu_temple:"🛕",synagogue:"🕍",shinto_shrine:"⛩️",kaaba:"🕋",fountain:"⛲",tent:"⛺",foggy:"🌁",night_with_stars:"🌃",cityscape:"🏙️",sunrise_over_mountains:"🌄",sunrise:"🌅",city_sunset:"🌆",city_sunrise:"🌇",bridge_at_night:"🌉",hotsprings:"♨️",carousel_horse:"🎠",ferris_wheel:"🎡",roller_coaster:"🎢",barber:"💈",circus_tent:"🎪",steam_locomotive:"🚂",railway_car:"🚃",bullettrain_side:"🚄",bullettrain_front:"🚅",train2:"🚆",metro:"🚇",light_rail:"🚈",station:"🚉",tram:"🚊",monorail:"🚝",mountain_railway:"🚞",train:"🚋",bus:"🚌",oncoming_bus:"🚍",trolleybus:"🚎",minibus:"🚐",ambulance:"🚑",fire_engine:"🚒",police_car:"🚓",oncoming_police_car:"🚔",taxi:"🚕",oncoming_taxi:"🚖",car:"🚗",red_car:"🚗",oncoming_automobile:"🚘",blue_car:"🚙",pickup_truck:"🛻",truck:"🚚",articulated_lorry:"🚛",tractor:"🚜",racing_car:"🏎️",motorcycle:"🏍️",motor_scooter:"🛵",manual_wheelchair:"🦽",motorized_wheelchair:"🦼",auto_rickshaw:"🛺",bike:"🚲",kick_scooter:"🛴",skateboard:"🛹",roller_skate:"🛼",busstop:"🚏",motorway:"🛣️",railway_track:"🛤️",oil_drum:"🛢️",fuelpump:"⛽",rotating_light:"🚨",traffic_light:"🚥",vertical_traffic_light:"🚦",stop_sign:"🛑",construction:"🚧",anchor:"⚓",boat:"⛵",sailboat:"⛵",canoe:"🛶",speedboat:"🚤",passenger_ship:"🛳️",ferry:"⛴️",motor_boat:"🛥️",ship:"🚢",airplane:"✈️",small_airplane:"🛩️",flight_departure:"🛫",flight_arrival:"🛬",parachute:"🪂",seat:"💺",helicopter:"🚁",suspension_railway:"🚟",mountain_cableway:"🚠",aerial_tramway:"🚡",artificial_satellite:"🛰️",rocket:"🚀",flying_saucer:"🛸",bellhop_bell:"🛎️",luggage:"🧳",hourglass:"⌛",hourglass_flowing_sand:"⏳",watch:"⌚",alarm_clock:"⏰",stopwatch:"⏱️",timer_clock:"⏲️",mantelpiece_clock:"🕰️",clock12:"🕛",clock1230:"🕧",clock1:"🕐",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",new_moon:"🌑",waxing_crescent_moon:"🌒",first_quarter_moon:"🌓",moon:"🌔",waxing_gibbous_moon:"🌔",full_moon:"🌕",waning_gibbous_moon:"🌖",last_quarter_moon:"🌗",waning_crescent_moon:"🌘",crescent_moon:"🌙",new_moon_with_face:"🌚",first_quarter_moon_with_face:"🌛",last_quarter_moon_with_face:"🌜",thermometer:"🌡️",sunny:"☀️",full_moon_with_face:"🌝",sun_with_face:"🌞",ringed_planet:"🪐",star:"⭐",star2:"🌟",stars:"🌠",milky_way:"🌌",cloud:"☁️",partly_sunny:"⛅",cloud_with_lightning_and_rain:"⛈️",sun_behind_small_cloud:"🌤️",sun_behind_large_cloud:"🌥️",sun_behind_rain_cloud:"🌦️",cloud_with_rain:"🌧️",cloud_with_snow:"🌨️",cloud_with_lightning:"🌩️",tornado:"🌪️",fog:"🌫️",wind_face:"🌬️",cyclone:"🌀",rainbow:"🌈",closed_umbrella:"🌂",open_umbrella:"☂️",umbrella:"☔",parasol_on_ground:"⛱️",zap:"⚡",snowflake:"❄️",snowman_with_snow:"☃️",snowman:"⛄",comet:"☄️",fire:"🔥",droplet:"💧",ocean:"🌊",jack_o_lantern:"🎃",christmas_tree:"🎄",fireworks:"🎆",sparkler:"🎇",firecracker:"🧨",sparkles:"✨",balloon:"🎈",tada:"🎉",confetti_ball:"🎊",tanabata_tree:"🎋",bamboo:"🎍",dolls:"🎎",flags:"🎏",wind_chime:"🎐",rice_scene:"🎑",red_envelope:"🧧",ribbon:"🎀",gift:"🎁",reminder_ribbon:"🎗️",tickets:"🎟️",ticket:"🎫",medal_military:"🎖️",trophy:"🏆",medal_sports:"🏅","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉",soccer:"⚽",baseball:"⚾",softball:"🥎",basketball:"🏀",volleyball:"🏐",football:"🏈",rugby_football:"🏉",tennis:"🎾",flying_disc:"🥏",bowling:"🎳",cricket_game:"🏏",field_hockey:"🏑",ice_hockey:"🏒",lacrosse:"🥍",ping_pong:"🏓",badminton:"🏸",boxing_glove:"🥊",martial_arts_uniform:"🥋",goal_net:"🥅",golf:"⛳",ice_skate:"⛸️",fishing_pole_and_fish:"🎣",diving_mask:"🤿",running_shirt_with_sash:"🎽",ski:"🎿",sled:"🛷",curling_stone:"🥌",dart:"🎯",yo_yo:"🪀",kite:"🪁","8ball":"🎱",crystal_ball:"🔮",magic_wand:"🪄",nazar_amulet:"🧿",video_game:"🎮",joystick:"🕹️",slot_machine:"🎰",game_die:"🎲",jigsaw:"🧩",teddy_bear:"🧸",pinata:"🪅",nesting_dolls:"🪆",spades:"♠️",hearts:"♥️",diamonds:"♦️",clubs:"♣️",chess_pawn:"♟️",black_joker:"🃏",mahjong:"🀄",flower_playing_cards:"🎴",performing_arts:"🎭",framed_picture:"🖼️",art:"🎨",thread:"🧵",sewing_needle:"🪡",yarn:"🧶",knot:"🪢",eyeglasses:"👓",dark_sunglasses:"🕶️",goggles:"🥽",lab_coat:"🥼",safety_vest:"🦺",necktie:"👔",shirt:"👕",tshirt:"👕",jeans:"👖",scarf:"🧣",gloves:"🧤",coat:"🧥",socks:"🧦",dress:"👗",kimono:"👘",sari:"🥻",one_piece_swimsuit:"🩱",swim_brief:"🩲",shorts:"🩳",bikini:"👙",womans_clothes:"👚",purse:"👛",handbag:"👜",pouch:"👝",shopping:"🛍️",school_satchel:"🎒",thong_sandal:"🩴",mans_shoe:"👞",shoe:"👞",athletic_shoe:"👟",hiking_boot:"🥾",flat_shoe:"🥿",high_heel:"👠",sandal:"👡",ballet_shoes:"🩰",boot:"👢",crown:"👑",womans_hat:"👒",tophat:"🎩",mortar_board:"🎓",billed_cap:"🧢",military_helmet:"🪖",rescue_worker_helmet:"⛑️",prayer_beads:"📿",lipstick:"💄",ring:"💍",gem:"💎",mute:"🔇",speaker:"🔈",sound:"🔉",loud_sound:"🔊",loudspeaker:"📢",mega:"📣",postal_horn:"📯",bell:"🔔",no_bell:"🔕",musical_score:"🎼",musical_note:"🎵",notes:"🎶",studio_microphone:"🎙️",level_slider:"🎚️",control_knobs:"🎛️",microphone:"🎤",headphones:"🎧",radio:"📻",saxophone:"🎷",accordion:"🪗",guitar:"🎸",musical_keyboard:"🎹",trumpet:"🎺",violin:"🎻",banjo:"🪕",drum:"🥁",long_drum:"🪘",iphone:"📱",calling:"📲",phone:"☎️",telephone:"☎️",telephone_receiver:"📞",pager:"📟",fax:"📠",battery:"🔋",electric_plug:"🔌",computer:"💻",desktop_computer:"🖥️",printer:"🖨️",keyboard:"⌨️",computer_mouse:"🖱️",trackball:"🖲️",minidisc:"💽",floppy_disk:"💾",cd:"💿",dvd:"📀",abacus:"🧮",movie_camera:"🎥",film_strip:"🎞️",film_projector:"📽️",clapper:"🎬",tv:"📺",camera:"📷",camera_flash:"📸",video_camera:"📹",vhs:"📼",mag:"🔍",mag_right:"🔎",candle:"🕯️",bulb:"💡",flashlight:"🔦",izakaya_lantern:"🏮",lantern:"🏮",diya_lamp:"🪔",notebook_with_decorative_cover:"📔",closed_book:"📕",book:"📖",open_book:"📖",green_book:"📗",blue_book:"📘",orange_book:"📙",books:"📚",notebook:"📓",ledger:"📒",page_with_curl:"📃",scroll:"📜",page_facing_up:"📄",newspaper:"📰",newspaper_roll:"🗞️",bookmark_tabs:"📑",bookmark:"🔖",label:"🏷️",moneybag:"💰",coin:"🪙",yen:"💴",dollar:"💵",euro:"💶",pound:"💷",money_with_wings:"💸",credit_card:"💳",receipt:"🧾",chart:"💹",envelope:"✉️",email:"📧","e-mail":"📧",incoming_envelope:"📨",envelope_with_arrow:"📩",outbox_tray:"📤",inbox_tray:"📥",package:"📦",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",postbox:"📮",ballot_box:"🗳️",pencil2:"✏️",black_nib:"✒️",fountain_pen:"🖋️",pen:"🖊️",paintbrush:"🖌️",crayon:"🖍️",memo:"📝",pencil:"📝",briefcase:"💼",file_folder:"📁",open_file_folder:"📂",card_index_dividers:"🗂️",date:"📅",calendar:"📆",spiral_notepad:"🗒️",spiral_calendar:"🗓️",card_index:"📇",chart_with_upwards_trend:"📈",chart_with_downwards_trend:"📉",bar_chart:"📊",clipboard:"📋",pushpin:"📌",round_pushpin:"📍",paperclip:"📎",paperclips:"🖇️",straight_ruler:"📏",triangular_ruler:"📐",scissors:"✂️",card_file_box:"🗃️",file_cabinet:"🗄️",wastebasket:"🗑️",lock:"🔒",unlock:"🔓",lock_with_ink_pen:"🔏",closed_lock_with_key:"🔐",key:"🔑",old_key:"🗝️",hammer:"🔨",axe:"🪓",pick:"⛏️",hammer_and_pick:"⚒️",hammer_and_wrench:"🛠️",dagger:"🗡️",crossed_swords:"⚔️",gun:"🔫",boomerang:"🪃",bow_and_arrow:"🏹",shield:"🛡️",carpentry_saw:"🪚",wrench:"🔧",screwdriver:"🪛",nut_and_bolt:"🔩",gear:"⚙️",clamp:"🗜️",balance_scale:"⚖️",probing_cane:"🦯",link:"🔗",chains:"⛓️",hook:"🪝",toolbox:"🧰",magnet:"🧲",ladder:"🪜",alembic:"⚗️",test_tube:"🧪",petri_dish:"🧫",dna:"🧬",microscope:"🔬",telescope:"🔭",satellite:"📡",syringe:"💉",drop_of_blood:"🩸",pill:"💊",adhesive_bandage:"🩹",stethoscope:"🩺",door:"🚪",elevator:"🛗",mirror:"🪞",window:"🪟",bed:"🛏️",couch_and_lamp:"🛋️",chair:"🪑",toilet:"🚽",plunger:"🪠",shower:"🚿",bathtub:"🛁",mouse_trap:"🪤",razor:"🪒",lotion_bottle:"🧴",safety_pin:"🧷",broom:"🧹",basket:"🧺",roll_of_paper:"🧻",bucket:"🪣",soap:"🧼",toothbrush:"🪥",sponge:"🧽",fire_extinguisher:"🧯",shopping_cart:"🛒",smoking:"🚬",coffin:"⚰️",headstone:"🪦",funeral_urn:"⚱️",moyai:"🗿",placard:"🪧",atm:"🏧",put_litter_in_its_place:"🚮",potable_water:"🚰",wheelchair:"♿",mens:"🚹",womens:"🚺",restroom:"🚻",baby_symbol:"🚼",wc:"🚾",passport_control:"🛂",customs:"🛃",baggage_claim:"🛄",left_luggage:"🛅",warning:"⚠️",children_crossing:"🚸",no_entry:"⛔",no_entry_sign:"🚫",no_bicycles:"🚳",no_smoking:"🚭",do_not_litter:"🚯","non-potable_water":"🚱",no_pedestrians:"🚷",no_mobile_phones:"📵",underage:"🔞",radioactive:"☢️",biohazard:"☣️",arrow_up:"⬆️",arrow_upper_right:"↗️",arrow_right:"➡️",arrow_lower_right:"↘️",arrow_down:"⬇️",arrow_lower_left:"↙️",arrow_left:"⬅️",arrow_upper_left:"↖️",arrow_up_down:"↕️",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",arrow_right_hook:"↪️",arrow_heading_up:"⤴️",arrow_heading_down:"⤵️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",back:"🔙",end:"🔚",on:"🔛",soon:"🔜",top:"🔝",place_of_worship:"🛐",atom_symbol:"⚛️",om:"🕉️",star_of_david:"✡️",wheel_of_dharma:"☸️",yin_yang:"☯️",latin_cross:"✝️",orthodox_cross:"☦️",star_and_crescent:"☪️",peace_symbol:"☮️",menorah:"🕎",six_pointed_star:"🔯",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpius:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓",ophiuchus:"⛎",twisted_rightwards_arrows:"🔀",repeat:"🔁",repeat_one:"🔂",arrow_forward:"▶️",fast_forward:"⏩",next_track_button:"⏭️",play_or_pause_button:"⏯️",arrow_backward:"◀️",rewind:"⏪",previous_track_button:"⏮️",arrow_up_small:"🔼",arrow_double_up:"⏫",arrow_down_small:"🔽",arrow_double_down:"⏬",pause_button:"⏸️",stop_button:"⏹️",record_button:"⏺️",eject_button:"⏏️",cinema:"🎦",low_brightness:"🔅",high_brightness:"🔆",signal_strength:"📶",vibration_mode:"📳",mobile_phone_off:"📴",female_sign:"♀️",male_sign:"♂️",transgender_symbol:"⚧️",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",heavy_minus_sign:"➖",heavy_division_sign:"➗",infinity:"♾️",bangbang:"‼️",interrobang:"⁉️",question:"❓",grey_question:"❔",grey_exclamation:"❕",exclamation:"❗",heavy_exclamation_mark:"❗",wavy_dash:"〰️",currency_exchange:"💱",heavy_dollar_sign:"💲",medical_symbol:"⚕️",recycle:"♻️",fleur_de_lis:"⚜️",trident:"🔱",name_badge:"📛",beginner:"🔰",o:"⭕",white_check_mark:"✅",ballot_box_with_check:"☑️",heavy_check_mark:"✔️",x:"❌",negative_squared_cross_mark:"❎",curly_loop:"➰",loop:"➿",part_alternation_mark:"〽️",eight_spoked_asterisk:"✳️",eight_pointed_black_star:"✴️",sparkle:"❇️",copyright:"©️",registered:"®️",tm:"™️",hash:"#️⃣",asterisk:"*️⃣",zero:"0️⃣",one:"1️⃣",two:"2️⃣",three:"3️⃣",four:"4️⃣",five:"5️⃣",six:"6️⃣",seven:"7️⃣",eight:"8️⃣",nine:"9️⃣",keycap_ten:"🔟",capital_abcd:"🔠",abcd:"🔡",symbols:"🔣",abc:"🔤",a:"🅰️",ab:"🆎",b:"🅱️",cl:"🆑",cool:"🆒",free:"🆓",information_source:"ℹ️",id:"🆔",m:"Ⓜ️",new:"🆕",ng:"🆖",o2:"🅾️",ok:"🆗",parking:"🅿️",sos:"🆘",up:"🆙",vs:"🆚",koko:"🈁",sa:"🈂️",ideograph_advantage:"🉐",accept:"🉑",congratulations:"㊗️",secret:"㊙️",u6e80:"🈵",red_circle:"🔴",orange_circle:"🟠",yellow_circle:"🟡",green_circle:"🟢",large_blue_circle:"🔵",purple_circle:"🟣",brown_circle:"🟤",black_circle:"⚫",white_circle:"⚪",red_square:"🟥",orange_square:"🟧",yellow_square:"🟨",green_square:"🟩",blue_square:"🟦",purple_square:"🟪",brown_square:"🟫",black_large_square:"⬛",white_large_square:"⬜",black_medium_square:"◼️",white_medium_square:"◻️",black_medium_small_square:"◾",white_medium_small_square:"◽",black_small_square:"▪️",white_small_square:"▫️",large_orange_diamond:"🔶",large_blue_diamond:"🔷",small_orange_diamond:"🔸",small_blue_diamond:"🔹",small_red_triangle:"🔺",small_red_triangle_down:"🔻",diamond_shape_with_a_dot_inside:"💠",radio_button:"🔘",white_square_button:"🔳",black_square_button:"🔲",checkered_flag:"🏁",triangular_flag_on_post:"🚩",crossed_flags:"🎌",black_flag:"🏴",white_flag:"🏳️",rainbow_flag:"🏳️‍🌈",transgender_flag:"🏳️‍⚧️",pirate_flag:"🏴‍☠️",ascension_island:"🇦🇨",andorra:"🇦🇩",united_arab_emirates:"🇦🇪",afghanistan:"🇦🇫",antigua_barbuda:"🇦🇬",anguilla:"🇦🇮",albania:"🇦🇱",armenia:"🇦🇲",angola:"🇦🇴",antarctica:"🇦🇶",argentina:"🇦🇷",american_samoa:"🇦🇸",austria:"🇦🇹",australia:"🇦🇺",aruba:"🇦🇼",aland_islands:"🇦🇽",azerbaijan:"🇦🇿",bosnia_herzegovina:"🇧🇦",barbados:"🇧🇧",bangladesh:"🇧🇩",belgium:"🇧🇪",burkina_faso:"🇧🇫",bulgaria:"🇧🇬",bahrain:"🇧🇭",burundi:"🇧🇮",benin:"🇧🇯",st_barthelemy:"🇧🇱",bermuda:"🇧🇲",brunei:"🇧🇳",bolivia:"🇧🇴",caribbean_netherlands:"🇧🇶",brazil:"🇧🇷",bahamas:"🇧🇸",bhutan:"🇧🇹",bouvet_island:"🇧🇻",botswana:"🇧🇼",belarus:"🇧🇾",belize:"🇧🇿",canada:"🇨🇦",cocos_islands:"🇨🇨",congo_kinshasa:"🇨🇩",central_african_republic:"🇨🇫",congo_brazzaville:"🇨🇬",switzerland:"🇨🇭",cote_divoire:"🇨🇮",cook_islands:"🇨🇰",chile:"🇨🇱",cameroon:"🇨🇲",cn:"🇨🇳",colombia:"🇨🇴",clipperton_island:"🇨🇵",costa_rica:"🇨🇷",cuba:"🇨🇺",cape_verde:"🇨🇻",curacao:"🇨🇼",christmas_island:"🇨🇽",cyprus:"🇨🇾",czech_republic:"🇨🇿",de:"🇩🇪",diego_garcia:"🇩🇬",djibouti:"🇩🇯",denmark:"🇩🇰",dominica:"🇩🇲",dominican_republic:"🇩🇴",algeria:"🇩🇿",ceuta_melilla:"🇪🇦",ecuador:"🇪🇨",estonia:"🇪🇪",egypt:"🇪🇬",western_sahara:"🇪🇭",eritrea:"🇪🇷",es:"🇪🇸",ethiopia:"🇪🇹",eu:"🇪🇺",european_union:"🇪🇺",finland:"🇫🇮",fiji:"🇫🇯",falkland_islands:"🇫🇰",micronesia:"🇫🇲",faroe_islands:"🇫🇴",fr:"🇫🇷",gabon:"🇬🇦",gb:"🇬🇧",uk:"🇬🇧",grenada:"🇬🇩",georgia:"🇬🇪",french_guiana:"🇬🇫",guernsey:"🇬🇬",ghana:"🇬🇭",gibraltar:"🇬🇮",greenland:"🇬🇱",gambia:"🇬🇲",guinea:"🇬🇳",guadeloupe:"🇬🇵",equatorial_guinea:"🇬🇶",greece:"🇬🇷",south_georgia_south_sandwich_islands:"🇬🇸",guatemala:"🇬🇹",guam:"🇬🇺",guinea_bissau:"🇬🇼",guyana:"🇬🇾",hong_kong:"🇭🇰",heard_mcdonald_islands:"🇭🇲",honduras:"🇭🇳",croatia:"🇭🇷",haiti:"🇭🇹",hungary:"🇭🇺",canary_islands:"🇮🇨",indonesia:"🇮🇩",ireland:"🇮🇪",israel:"🇮🇱",isle_of_man:"🇮🇲",india:"🇮🇳",british_indian_ocean_territory:"🇮🇴",iraq:"🇮🇶",iran:"🇮🇷",iceland:"🇮🇸",it:"🇮🇹",jersey:"🇯🇪",jamaica:"🇯🇲",jordan:"🇯🇴",jp:"🇯🇵",kenya:"🇰🇪",kyrgyzstan:"🇰🇬",cambodia:"🇰🇭",kiribati:"🇰🇮",comoros:"🇰🇲",st_kitts_nevis:"🇰🇳",north_korea:"🇰🇵",kr:"🇰🇷",kuwait:"🇰🇼",cayman_islands:"🇰🇾",kazakhstan:"🇰🇿",laos:"🇱🇦",lebanon:"🇱🇧",st_lucia:"🇱🇨",liechtenstein:"🇱🇮",sri_lanka:"🇱🇰",liberia:"🇱🇷",lesotho:"🇱🇸",lithuania:"🇱🇹",luxembourg:"🇱🇺",latvia:"🇱🇻",libya:"🇱🇾",morocco:"🇲🇦",monaco:"🇲🇨",moldova:"🇲🇩",montenegro:"🇲🇪",st_martin:"🇲🇫",madagascar:"🇲🇬",marshall_islands:"🇲🇭",macedonia:"🇲🇰",mali:"🇲🇱",myanmar:"🇲🇲",mongolia:"🇲🇳",macau:"🇲🇴",northern_mariana_islands:"🇲🇵",martinique:"🇲🇶",mauritania:"🇲🇷",montserrat:"🇲🇸",malta:"🇲🇹",mauritius:"🇲🇺",maldives:"🇲🇻",malawi:"🇲🇼",mexico:"🇲🇽",malaysia:"🇲🇾",mozambique:"🇲🇿",namibia:"🇳🇦",new_caledonia:"🇳🇨",niger:"🇳🇪",norfolk_island:"🇳🇫",nigeria:"🇳🇬",nicaragua:"🇳🇮",netherlands:"🇳🇱",norway:"🇳🇴",nepal:"🇳🇵",nauru:"🇳🇷",niue:"🇳🇺",new_zealand:"🇳🇿",oman:"🇴🇲",panama:"🇵🇦",peru:"🇵🇪",french_polynesia:"🇵🇫",papua_new_guinea:"🇵🇬",philippines:"🇵🇭",pakistan:"🇵🇰",poland:"🇵🇱",st_pierre_miquelon:"🇵🇲",pitcairn_islands:"🇵🇳",puerto_rico:"🇵🇷",palestinian_territories:"🇵🇸",portugal:"🇵🇹",palau:"🇵🇼",paraguay:"🇵🇾",qatar:"🇶🇦",reunion:"🇷🇪",romania:"🇷🇴",serbia:"🇷🇸",ru:"🇷🇺",rwanda:"🇷🇼",saudi_arabia:"🇸🇦",solomon_islands:"🇸🇧",seychelles:"🇸🇨",sudan:"🇸🇩",sweden:"🇸🇪",singapore:"🇸🇬",st_helena:"🇸🇭",slovenia:"🇸🇮",svalbard_jan_mayen:"🇸🇯",slovakia:"🇸🇰",sierra_leone:"🇸🇱",san_marino:"🇸🇲",senegal:"🇸🇳",somalia:"🇸🇴",suriname:"🇸🇷",south_sudan:"🇸🇸",sao_tome_principe:"🇸🇹",el_salvador:"🇸🇻",sint_maarten:"🇸🇽",syria:"🇸🇾",swaziland:"🇸🇿",tristan_da_cunha:"🇹🇦",turks_caicos_islands:"🇹🇨",chad:"🇹🇩",french_southern_territories:"🇹🇫",togo:"🇹🇬",thailand:"🇹🇭",tajikistan:"🇹🇯",tokelau:"🇹🇰",timor_leste:"🇹🇱",turkmenistan:"🇹🇲",tunisia:"🇹🇳",tonga:"🇹🇴",tr:"🇹🇷",trinidad_tobago:"🇹🇹",tuvalu:"🇹🇻",taiwan:"🇹🇼",tanzania:"🇹🇿",ukraine:"🇺🇦",uganda:"🇺🇬",us_outlying_islands:"🇺🇲",united_nations:"🇺🇳",us:"🇺🇸",uruguay:"🇺🇾",uzbekistan:"🇺🇿",vatican_city:"🇻🇦",st_vincent_grenadines:"🇻🇨",venezuela:"🇻🇪",british_virgin_islands:"🇻🇬",us_virgin_islands:"🇻🇮",vietnam:"🇻🇳",vanuatu:"🇻🇺",wallis_futuna:"🇼🇫",samoa:"🇼🇸",kosovo:"🇽🇰",yemen:"🇾🇪",mayotte:"🇾🇹",south_africa:"🇿🇦",zambia:"🇿🇲",zimbabwe:"🇿🇼",england:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",scotland:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",wales:"🏴󠁧󠁢󠁷󠁬󠁳󠁿"};Object.keys(fd).reduce((t,e)=>{const r=fd[e];return t[r]=e,t},{});const HQ=Object.keys(fd).map(t=>t);Object.keys(fd).map(t=>fd[t]);function $Q(t){return HQ.filter(e=>e.startsWith(t)).map(e=>({name:e,emoji:fd[e]}))}const e3=J.forwardRef((t,e)=>{const r=J.useRef(),[n,i]=J.useState(0),{t:o}=Et(),s=d=>{const f=t.items[d];f&&t.command(f)},a=()=>{i((n+t.items.length-1)%t.items.length)},l=()=>{i((n+1)%t.items.length)},c=()=>{s(n)};return J.useEffect(()=>i(0),[t.items]),J.useEffect(()=>{if(Number.isNaN(n+1))return;const d=r.current.querySelector(`span:nth-of-type(${n+1})`);d&&E1(d,{behavior:"smooth",scrollMode:"if-needed"})},[n]),J.useImperativeHandle(e,()=>({onKeyDown:({event:d})=>d.key==="ArrowUp"?(a(),!0):d.key==="ArrowDown"?(l(),!0):d.key==="Enter"?(c(),!0):!1})),x.jsx("div",{className:"richtext-w-[200px] richtext-max-h-[320px] richtext-overflow-x-hidden richtext-overflow-y-auto richtext-rounded-sm !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none",children:x.jsx("div",{ref:r,children:t.items.length?t.items.map((d,f)=>x.jsxs("span",{className:Gr(" richtext-flex richtext-relative richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground hover:richtext-bg-accent",f===n?"bg-accent":""),onClick:()=>s(f),children:[d.fallbackImage?x.jsx("img",{src:d.fallbackImage,className:"richtext-w-[1em] richtext-h-[1em]"}):d.emoji,":",d.name,":"]},`emoji-list-code-${f}`)):x.jsx("div",{className:"richtext-flex richtext-relative richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors",children:x.jsx("span",{children:o("no_result_found")})})})})});e3.displayName="EmojiList";const UQ=["😀","😃","😄","😁","😆","😅","😂","🤣","🥲","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🥸","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕","🤑","🤠","😈","👿","👹","👺","🤡","💩","👻","💀","☠️","👽","👾","🤖","🎃","😺","😸","😹","😻","😼","😽","🙀","😿","😾","👋","🤚","🖐","✋","🖖","👌","🤌","🤏","✌️","🤞","🤟","🤘","🤙","👈","👉","👆","🖕","👇","☝️","👍","👎","✊","👊","🤛","🤜","👏","🙌","👐","🤲","🤝","🙏","✍️","💅","🤳","💪","🦾","🦵","🦿","🦶","👣","👂","🦻","👃","🫀","🫁","🧠","🦷","🦴","👀","👁","👅","👄","💋","🩸","💋","💌","💘","💝","💖","💗","💓","💞","💕","💟","❣️","❣","💔","❤️‍🔥","❤‍🔥","❤️‍🩹","❤‍🩹","❤️","❤","🧡","💛","💚","💙","💜","🤎","🖤","🤍","💯","💢","💥","💫","💦","💨","🕳️","🕳","💣","💬","👁️‍🗨️","👁‍🗨️","👁️‍🗨","👁‍🗨","🗨️","🗨","🗯️","🗯","💭","💤"],WQ=["🏧","🚮","🚰","♿","🚹","🚺","🚻","🚼","🚾","🛂","🛃","🛄","🛅","⚠️","⚠","🚸","⛔","🚫","🚳","🚭","🚯","🚱","🚷","📵","🔞","☢️","☢","☣️","☣","⬆️","⬆","↗️","↗","➡️","➡","↘️","↘","⬇️","⬇","↙️","↙","⬅️","⬅","↖️","↖","↕️","↕","↔️","↔","↩️","↩","↪️","↪","⤴️","⤴","⤵️","⤵","🔃","🔄","🔙","🔚","🔛","🔜","🔝","🛐","⚛️","⚛","🕉️","🕉","✡️","✡","☸️","☸","☯️","☯","✝️","✝","☦️","☦","☪️","☪","☮️","☮","🕎","🔯","♈","♉","♊","♋","♌","♍","♎","♏","♐","♑","♒","♓","⛎","🔀","🔁","🔂","▶️","▶","⏩","⏭️","⏭","⏯️","⏯","◀️","◀","⏪","⏮️","⏮","🔼","⏫","🔽","⏬","⏸️","⏸","⏹️","⏹","⏺️","⏺","⏏️","⏏","🎦","🔅","🔆","📶","📳","📴","♀️","♀","♂️","♂","⚧️","⚧","✖️","✖","➕","➖","➗","♾️","♾","‼️","‼","⁉️","⁉","❓","❔","❕","❗","〰️","〰","💱","💲","⚕️","⚕","♻️","♻","⚜️","⚜","🔱","📛","🔰","⭕","✅","☑️","☑","✔️","✔","❌","❎","➰","➿","〽️","〽","✳️","✳","✴️","✴","❇️","❇","©️","©","®️","®","™️","™","#️⃣","#⃣","*️⃣","*⃣","0️⃣","0⃣","1️⃣","1⃣","2️⃣","2⃣","3️⃣","3⃣","4️⃣","4⃣","5️⃣","5⃣","6️⃣","6⃣","7️⃣","7⃣","8️⃣","8⃣","9️⃣","9⃣","🔟","🔠","🔡","🔢","🔣","🔤","🅰️","🅰","🆎","🅱️","🅱","🆑","🆒","🆓","ℹ️","ℹ","🆔","Ⓜ️","Ⓜ","🆕","🆖","🅾️","🅾","🆗","🅿️","🅿","🆘","🆙","🆚","🈁","🈂️","🈂","🈷️","🈷","🈶","🈯","🉐","🈹","🈚","🈲","🉑","🈸","🈴","🈳","㊗️","㊗","㊙️","㊙","🈺","🈵","🔴","🟠","🟡","🟢","🔵","🟣","🟤","⚫","⚪","🟥","🟧","🟨","🟩","🟦","🟪","🟫","⬛","⬜","◼️","◼","◻️","◻","◾","◽","▪️","▪","▫️","▫","🔶","🔷","🔸","🔹","🔺","🔻","💠","🔘","🔳","🔲"],VQ=["👓","🕶️","🕶","🥽","🥼","🦺","👔","👕","👖","🧣","🧤","🧥","🧦","👗","👘","🥻","🩱","🩲","🩳","👙","👚","👛","👜","👝","🛍️","🛍","🎒","🩴","👞","👟","🥾","🥿","👠","👡","🩰","👢","👑","👒","🎩","🎓","🧢","🪖","⛑️","⛑","📿","💄","💍","💎","🔇","🔈","🔉","🔊","📢","📣","📯","🔔","🔕","🎼","🎵","🎶","🎙️","🎙","🎚️","🎚","🎛️","🎛","🎤","🎧","📻","🎷","🪗","🎸","🎹","🎺","🎻","🪕","🥁","🪘","📱","📲","☎️","☎","📞","📟","📠","🔋","🔌","💻","🖥️","🖥","🖨️","🖨","⌨️","⌨","🖱️","🖱","🖲️","🖲","💽","💾","💿","📀","🧮","🎥","🎞️","🎞","📽️","📽","🎬","📺","📷","📸","📹","📼","🔍","🔎","🕯️","🕯","💡","🔦","🏮","🪔","📔","📕","📖","📗","📘","📙","📚","📓","📒","📃","📜","📄","📰","🗞️","🗞","📑","🔖","🏷️","🏷","💰","🪙","💴","💵","💶","💷","💸","💳","🧾","💹","✉️","✉","📧","📨","📩","📤","📥","📦","📫","📪","📬","📭","📮","🗳️","🗳","✏️","✏","✒️","✒","🖋️","🖋","🖊️","🖊","🖌️","🖌","🖍️","🖍","📝","💼","📁","📂","🗂️","🗂","📅","📆","🗒️","🗒","🗓️","🗓","📇","📈","📉","📊","📋","📌","📍","📎","🖇️","🖇","📏","📐","✂️","✂","🗃️","🗃","🗄️","🗄","🗑️","🗑","🔒","🔓","🔏","🔐","🔑","🗝️","🗝","🔨","🪓","⛏️","⛏","⚒️","⚒","🛠️","🛠","🗡️","🗡","⚔️","⚔","🔫","🪃","🏹","🛡️","🛡","🪚","🔧","🪛","🔩","⚙️","⚙","🗜️","🗜","⚖️","⚖","🦯","🔗","⛓️","⛓","🪝","🧰","🧲","🪜","⚗️","⚗","🧪","🧫","🧬","🔬","🔭","📡","💉","🩸","💊","🩹","🩺","🚪","🛗","🪞","🪟","🛏️","🛏","🛋️","🛋","🪑","🚽","🪠","🚿","🛁","🪤","🪒","🧴","🧷","🧹","🧺","🧻","🪣","🧼","🪥","🧽","🧯","🛒","🚬","⚰️","⚰","🪦","⚱️","⚱","🗿","🪧"],GQ=["🎃","🎄","🎆","🎇","🧨","✨","🎈","🎉","🎊","🎋","🎍","🎎","🎏","🎐","🎑","🧧","🎀","🎁","🎗️","🎗","🎟️","🎟","🎫","🎖️","🎖","🏆","🏅","🥇","🥈","🥉","⚽","⚾","🥎","🏀","🏐","🏈","🏉","🎾","🥏","🎳","🏏","🏑","🏒","🥍","🏓","🏸","🥊","🥋","🥅","⛳","⛸️","⛸","🎣","🤿","🎽","🎿","🛷","🥌","🎯","🪀","🪁","🎱","🔮","🪄","🧿","🎮","🕹️","🕹","🎰","🎲","🧩","🧸","🪅","🪆","♠️","♠","♥️","♥","♦️","♦","♣️","♣","♟️","♟","🃏","🀄","🎴","🎭","🖼️","🖼","🎨","🧵","🪡","🧶","🪢"],KQ=["🌍","🌎","🌏","🌐","🗺️","🗺","🗾","🧭","🏔️","🏔","⛰️","⛰","🌋","🗻","🏕️","🏕","🏖️","🏖","🏜️","🏜","🏝️","🏝","🏞️","🏞","🏟️","🏟","🏛️","🏛","🏗️","🏗","🧱","🪨","🪵","🛖","🏘️","🏘","🏚️","🏚","🏠","🏡","🏢","🏣","🏤","🏥","🏦","🏨","🏩","🏪","🏫","🏬","🏭","🏯","🏰","💒","🗼","🗽","⛪","🕌","🛕","🕍","⛩️","⛩","🕋","⛲","⛺","🌁","🌃","🏙️","🏙","🌄","🌅","🌆","🌇","🌉","♨️","♨","🎠","🎡","🎢","💈","🎪","🚂","🚃","🚄","🚅","🚆","🚇","🚈","🚉","🚊","🚝","🚞","🚋","🚌","🚍","🚎","🚐","🚑","🚒","🚓","🚔","🚕","🚖","🚗","🚘","🚙","🛻","🚚","🚛","🚜","🏎️","🏎","🏍️","🏍","🛵","🦽","🦼","🛺","🚲","🛴","🛹","🛼","🚏","🛣️","🛣","🛤️","🛤","🛢️","🛢","⛽","🚨","🚥","🚦","🛑","🚧","⚓","⛵","🛶","🚤","🛳️","🛳","⛴️","⛴","🛥️","🛥","🚢","✈️","✈","🛩️","🛩","🛫","🛬","🪂","💺","🚁","🚟","🚠","🚡","🛰️","🛰","🚀","🛸","🛎️","🛎","🧳","⌛","⏳","⌚","⏰","⏱️","⏱","⏲️","⏲","🕰️","🕰","🕛","🕧","🕐","🕜","🕑","🕝","🕒","🕞","🕓","🕟","🕔","🕠","🕕","🕡","🕖","🕢","🕗","🕣","🕘","🕤","🕙","🕥","🕚","🕦","🌑","🌒","🌓","🌔","🌕","🌖","🌗","🌘","🌙","🌚","🌛","🌜","🌡️","🌡","☀️","☀","🌝","🌞","🪐","⭐","🌟","🌠","🌌","☁️","☁","⛅","⛈️","⛈","🌤️","🌤","🌥️","🌥","🌦️","🌦","🌧️","🌧","🌨️","🌨","🌩️","🌩","🌪️","🌪","🌫️","🌫","🌬️","🌬","🌀","🌈","🌂","☂️","☂","☔","⛱️","⛱","⚡","❄️","❄","☃️","☃","⛄","☄️","☄","🔥","💧","🌊"],qQ=["🏁","🚩","🎌","🏴","🏳️","🏳","🏳️‍🌈","🏳‍🌈","🏳️‍⚧️","🏳‍⚧️","🏳️‍⚧","🏳‍⚧","🏴‍☠️","🏴‍☠","🇦🇨","🇦🇩","🇦🇪","🇦🇫","🇦🇬","🇦🇮","🇦🇱","🇦🇲","🇦🇴","🇦🇶","🇦🇷","🇦🇸","🇦🇹","🇦🇺","🇦🇼","🇦🇽","🇦🇿","🇧🇦","🇧🇧","🇧🇩","🇧🇪","🇧🇫","🇧🇬","🇧🇭","🇧🇮","🇧🇯","🇧🇱","🇧🇲","🇧🇳","🇧🇴","🇧🇶","🇧🇷","🇧🇸","🇧🇹","🇧🇻","🇧🇼","🇧🇾","🇧🇿","🇨🇦","🇨🇨","🇨🇩","🇨🇫","🇨🇬","🇨🇭","🇨🇮","🇨🇰","🇨🇱","🇨🇲","🇨🇳","🇨🇴","🇨🇵","🇨🇷","🇨🇺","🇨🇻","🇨🇼","🇨🇽","🇨🇾","🇨🇿","🇩🇪","🇩🇬","🇩🇯","🇩🇰","🇩🇲","🇩🇴","🇩🇿","🇪🇦","🇪🇨","🇪🇪","🇪🇬","🇪🇭","🇪🇷","🇪🇸","🇪🇹","🇪🇺","🇫🇮","🇫🇯","🇫🇰","🇫🇲","🇫🇴","🇫🇷","🇬🇦","🇬🇧","🇬🇩","🇬🇪","🇬🇫","🇬🇬","🇬🇭","🇬🇮","🇬🇱","🇬🇲","🇬🇳","🇬🇵","🇬🇶","🇬🇷","🇬🇸","🇬🇹","🇬🇺","🇬🇼","🇬🇾","🇭🇰","🇭🇲","🇭🇳","🇭🇷","🇭🇹","🇭🇺","🇮🇨","🇮🇩","🇮🇪","🇮🇱","🇮🇲","🇮🇳","🇮🇴","🇮🇶","🇮🇷","🇮🇸","🇮🇹","🇯🇪","🇯🇲","🇯🇴","🇯🇵","🇰🇪","🇰🇬","🇰🇭","🇰🇮","🇰🇲","🇰🇳","🇰🇵","🇰🇷","🇰🇼","🇰🇾","🇰🇿","🇱🇦","🇱🇧","🇱🇨","🇱🇮","🇱🇰","🇱🇷","🇱🇸","🇱🇹","🇱🇺","🇱🇻","🇱🇾","🇲🇦","🇲🇨","🇲🇩","🇲🇪","🇲🇫","🇲🇬","🇲🇭","🇲🇰","🇲🇱","🇲🇲","🇲🇳","🇲🇴","🇲🇵","🇲🇶","🇲🇷","🇲🇸","🇲🇹","🇲🇺","🇲🇻","🇲🇼","🇲🇽","🇲🇾","🇲🇿","🇳🇦","🇳🇨","🇳🇪","🇳🇫","🇳🇬","🇳🇮","🇳🇱","🇳🇴","🇳🇵","🇳🇷","🇳🇺","🇳🇿","🇴🇲","🇵🇦","🇵🇪","🇵🇫","🇵🇬","🇵🇭","🇵🇰","🇵🇱","🇵🇲","🇵🇳","🇵🇷","🇵🇸","🇵🇹","🇵🇼","🇵🇾","🇶🇦","🇷🇪","🇷🇴","🇷🇸","🇷🇺","🇷🇼","🇸🇦","🇸🇧","🇸🇨","🇸🇩","🇸🇪","🇸🇬","🇸🇭","🇸🇮","🇸🇯","🇸🇰","🇸🇱","🇸🇲","🇸🇳","🇸🇴","🇸🇷","🇸🇸","🇸🇹","🇸🇻","🇸🇽","🇸🇾","🇸🇿","🇹🇦","🇹🇨","🇹🇩","🇹🇫","🇹🇬","🇹🇭","🇹🇯","🇹🇰","🇹🇱","🇹🇲","🇹🇳","🇹🇴","🇹🇷","🇹🇹","🇹🇻","🇹🇼","🇹🇿","🇺🇦","🇺🇬","🇺🇲","🇺🇳","🇺🇸","🇺🇾","🇺🇿","🇻🇦","🇻🇨","🇻🇪","🇻🇬","🇻🇮","🇻🇳","🇻🇺","🇼🇫","🇼🇸","🇽🇰","🇾🇪","🇾🇹","🇿🇦","🇿🇲","🇿🇼","🏴󠁧󠁢󠁥󠁮󠁧󠁿","🏴󠁧󠁢󠁳󠁣󠁴󠁿","🏴󠁧󠁢󠁷󠁬󠁳󠁿"],XQ=["🐵","🐒","🦍","🦧","🐶","🐕","🦮","🐕‍🦺","🐩","🐺","🦊","🦝","🐱","🐈","🐈‍⬛","🦁","🐯","🐅","🐆","🐴","🐎","🦄","🦓","🦌","🦬","🐮","🐂","🐃","🐄","🐷","🐖","🐗","🐽","🐏","🐑","🐐","🐪","🐫","🦙","🦒","🐘","🦣","🦏","🦛","🐭","🐁","🐀","🐹","🐰","🐇","🐿️","🐿","🦫","🦔","🦇","🐻","🐻‍❄️","🐻‍❄","🐨","🐼","🦥","🦦","🦨","🦘","🦡","🐾","🦃","🐔","🐓","🐣","🐤","🐥","🐦","🐧","🕊️","🕊","🦅","🦆","🦢","🦉","🦤","🪶","🦩","🦚","🦜","🐸","🐊","🐢","🦎","🐍","🐲","🐉","🦕","🦖","🐳","🐋","🐬","🦭","🐟","🐠","🐡","🦈","🐙","🐚","🐌","🦋","🐛","🐜","🐝","🪲","🐞","🦗","🪳","🕷️","🕷","🕸️","🕸","🦂","🦟","🪰","🪱","🦠","💐","🌸","💮","🏵️","🏵","🌹","🥀","🌺","🌻","🌼","🌷","🌱","🪴","🌲","🌳","🌴","🌵","🌾","🌿","☘️","☘","🍀","🍁","🍂","🍃"],YQ=["🍇","🍈","🍉","🍊","🍋","🍌","🍍","🥭","🍎","🍏","🍐","🍑","🍒","🍓","🫐","🥝","🍅","🫒","🥥","🥑","🍆","🥔","🥕","🌽","🌶️","🌶","🫑","🥒","🥬","🥦","🧄","🧅","🍄","🥜","🌰","🍞","🥐","🥖","🫓","🥨","🥯","🥞","🧇","🧀","🍖","🍗","🥩","🥓","🍔","🍟","🍕","🌭","🥪","🌮","🌯","🫔","🥙","🧆","🥚","🍳","🥘","🍲","🫕","🥣","🥗","🍿","🧈","🧂","🥫","🍱","🍘","🍙","🍚","🍛","🍜","🍝","🍠","🍢","🍣","🍤","🍥","🥮","🍡","🥟","🥠","🥡","🦀","🦞","🦐","🦑","🦪","🍦","🍧","🍨","🍩","🍪","🎂","🍰","🧁","🥧","🍫","🍬","🍭","🍮","🍯","🍼","🥛","☕","🫖","🍵","🍶","🍾","🍷","🍸","🍹","🍺","🍻","🥂","🥃","🥤","🧋","🧃","🧉","🧊","🥢","🍽️","🍽","🍴","🥄","🔪","🏺"];function JQ(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",children:x.jsx("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113",fill:"currentColor"})})}function ZQ(){return x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",children:[x.jsx("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8",fill:"currentColor"}),x.jsx("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235",fill:"currentColor"})]})}function QQ(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",children:x.jsx("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z",fill:"currentColor"})})}function eee(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",children:x.jsx("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9",fill:"currentColor"})})}function tee(){return x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",children:[x.jsx("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z",fill:"currentColor"}),x.jsx("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789",fill:"currentColor"})]})}function ree(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",children:x.jsx("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76",fill:"currentColor"})})}function nee(){return x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",children:[x.jsx("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5",fill:"currentColor"}),x.jsx("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z",fill:"currentColor"})]})}function iee(t,e=null){if(typeof window>"u")throw new Error;const r=localStorage.getItem(t);if(!r)return e;try{return JSON.parse(r)}catch{return r}}function oee(t,e){window.localStorage.setItem(t,`${e}`)}class Nw{constructor(e,r){Tn(this,"key");Tn(this,"value");Tn(this,"prev");Tn(this,"next");this.key=e,this.value=r,this.prev=null,this.next=null}}class see{constructor(e){Tn(this,"capacity");Tn(this,"usedCapacity");Tn(this,"head");Tn(this,"tail");Tn(this,"store");this.capacity=e||20,this.usedCapacity=0,this.store={},this.head=new Nw("fakeHeadNode","fakeHeadNode"),this.tail=new Nw("fakeTailNode","fakeTailNode"),this.head.next=this.tail,this.tail.prev=this.head}removeNode(e){e.prev.next=e.next,e.next.prev=e.prev}addToHead(e){e.prev=this.head,e.next=this.head.next,this.head.next.prev=e,this.head.next=e}moveToHead(e){this.removeNode(e),this.addToHead(e)}removeTail(){const e=this.tail.prev;return this.removeNode(e),e}get(e){if(e in this.store){const r=this.store[e];return this.moveToHead(r),r.value}return-1}put(e,r){if(e in this.store){const n=this.store[e];n.value=r,this.moveToHead(n)}else{const n=new Nw(e,r);if(this.addToHead(n),this.store[e]=n,this.usedCapacity+=1,this.usedCapacity>this.capacity){const i=this.removeTail();delete this.store[i.key],this.usedCapacity-=1}}}keys(){const e=[];let r=this.head;for(;r;)e.push(r.key),r=r.next;return e.slice(1,-1)}values(){const e=[];let r=this.head;for(;r;)e.push(r.value),r=r.next;return e.slice(1,-1)}toJSON(){return this.store}}function aee(t,e){const r=new see(e);return{syncFromStorage(){(iee(t)||[]).slice().reverse().forEach(o=>{r.put(o,o)})},syncToStorage(){oee(t,z7(r.keys()))},put(i){r.put(i,i),this.syncToStorage()},get(i){return i?r.get(i):r.keys()}}}const bu=aee("EMOJI_PICKER",20),tA=[{title:"Smileys & People",data:UQ,icon:He.Laugh},{title:"Animals & Nature",data:XQ,icon:ZQ},{title:"Food & Drink",data:YQ,icon:eee},{title:"Activity",data:GQ,icon:JQ},{title:"Travel & Places",data:KQ,icon:nee},{title:"Object",data:VQ,icon:tee},{title:"Symbol",data:WQ,icon:ree},{title:"Flags",data:qQ,icon:QQ}],lee=["😀","😃","😄","😁","😆","😅","😂","🤣"];function cee({onSelectEmoji:t,children:e}){const[r,n]=J.useState([]),{t:i}=Et(),o=J.useMemo(()=>r.length?[{title:"Frequently used",icon:He.Clock3,data:r},...tA]:tA,[r]),s=J.useCallback(a=>{bu.put(a),n(bu.get()),t&&t(a)},[t]);return J.useEffect(()=>{bu.syncFromStorage();const a=bu.get();a!=null&&a.length||lee.forEach(c=>{bu.put(c)});const l=bu.get();n(l)},[]),x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{asChild:!0,children:e}),x.jsx(Xn,{hideWhenDetached:!0,className:"richtext-w-full richtext-h-full richtext-p-2",align:"start",side:"bottom",children:x.jsxs(gS,{defaultValue:"Frequently used",children:[x.jsx(qy,{className:"richtext-flex richtext-items-center richtext-gap-[4px]",children:o.map(a=>x.jsx(td,{value:a.title,className:"!richtext-p-[6px] richtext-bg-accent hover:richtext-text-accent-foreground",children:a.icon&&x.jsx(a.icon,{size:16})},`emoji-picker-title-${a.title}`))}),o.map(a=>x.jsxs(rd,{value:a.title,children:[x.jsx("p",{className:"richtext-mb-[6px] richtext-font-semibold",children:i(a.title)}),x.jsx("div",{className:"richtext-max-h-[280px] richtext-overflow-y-auto",children:x.jsx("div",{className:"richtext-grid richtext-grid-cols-8 richtext-gap-1 ",children:(a.data||[]).map(l=>x.jsx("div",{onClick:()=>s(l),className:"richtext-text-center richtext-cursor-pointer",children:l},`emoji-picker-${l}`))})})]},`emoji-picker-content-${a.title}`))]})})]})}function uee({editor:t,icon:e,...r}){const n=J.useCallback(i=>{const{selection:o}=t.state,{$anchor:s}=o;return t.chain().insertContentAt(s.pos,i).run()},[t]);return x.jsx(cee,{onSelectEmoji:n,children:x.jsx(Ve,{tooltip:r==null?void 0:r.tooltip,icon:e})})}const dee=200,fee=new St("emoji"),hee=Nt.create({name:"emoji",content:"text*",priority:dee,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{},suggestion:{char:":",pluginKey:fee,command:({editor:e,range:r,props:n})=>{e.chain().focus().insertContentAt(r,`${n.emoji} `).run()}},button:({editor:e,t:r})=>({component:uee,componentProps:{editor:e,action:()=>{},isActive:()=>!1,disabled:!1,icon:"EmojiIcon",tooltip:r("editor.emoji.tooltip")}})}},addCommands(){return{setEmoji:t=>({commands:e})=>e.insertContent(`${t.emoji} `)}},addProseMirrorPlugins(){return[JS({editor:this.editor,...this.options.suggestion})]}}).configure({suggestion:{items:({query:t})=>$Q(t),render:()=>{let t,e,r;return{onStart:n=>{r=n.editor.isEditable,r&&(t=new Wy(e3,{props:n,editor:n.editor}),e=gd("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(n){r&&(t.updateProps(n),e[0].setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var i;if(r)return n.event.key==="Escape"?(e[0].hide(),!0):(i=t.ref)==null?void 0:i.onKeyDown(n)},onExit(){r&&(e[0].destroy(),t.destroy())}}}}});function pee({editor:t,...e}){const{t:r}=Et(),n=Gh(t,Ml.name,{text:"",defaultShowPicker:!1}),{text:i,defaultShowPicker:o}=n,[s,a]=J.useState(""),l=J.useCallback(()=>{t.chain().focus().setKatex({text:s}).run(),a("")},[t,s]);J.useEffect(()=>{o&&t.chain().updateAttributes(Ml.name,{defaultShowPicker:!1}).focus().run()},[t,o]);const c=J.useMemo(()=>{try{return k1.renderToString(`${s}`)}catch{return s}},[s]),d=J.useMemo(()=>`${s}`.trim()?x.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:c||""}}):null,[s,c]);return x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{asChild:!0,children:x.jsx(Ve,{tooltip:e==null?void 0:e.tooltip,icon:e==null?void 0:e.icon})}),x.jsxs(Xn,{hideWhenDetached:!0,className:"richtext-w-full richtext-h-full richtext-p-2",align:"start",side:"bottom",children:[x.jsx(Kn,{className:"richtext-mb-[6px]",children:r("editor.formula.dialog.text")}),x.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[16px]",children:x.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm",children:x.jsx(Kh,{value:s,onChange:f=>a(f.target.value),autoFocus:!0,required:!0,rows:3,defaultValue:i,className:"richtext-w-full",placeholder:"Text"})})}),d&&x.jsx("div",{className:"richtext-my-[10px] richtext-p-[10px] richtext-rounded-[6px] !richtext-border-[1px] richtext-max-w-[286px] richtext-whitespace-nowrap richtext-overflow-auto",children:d}),x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]",children:[x.jsx(Mt,{onClick:l,className:"richtext-flex-1",children:"Submit"}),x.jsx("a",{href:"https://katex.org/docs/supported",target:"_blank",rel:"noreferrer noopener",children:x.jsx(He.HelpCircle,{size:16})})]})]})]})}function mee(t,e=1){let r=0,n=0,i=0;if(t.startsWith("rgb")){const o=t.replace(/\s/g,"").match(/rgb\((.*)\)$/)[1].split(",");r=+o[0],n=+o[1],i=+o[2]}else if(t.startsWith("#")){let o=t.replace("#","");o.length===3&&(o=`${o[0]}${o[0]}${o[1]}${o[1]}${o[2]}${o[2]}`),r=Number.parseInt(o.substring(0,2),16),n=Number.parseInt(o.substring(2,4),16),i=Number.parseInt(o.substring(4,6),16)}else return t;return e>1&&e<=100&&(e=e/100),`rgba(${r},${n},${i},${e})`}function gee({node:t}){const e=lG(),{text:r}=t.attrs,n=J.useMemo(()=>{const s="rgb(254, 242, 237)";return e==="dark"?mee(s,.75):s},[e]),i=J.useMemo(()=>{try{return k1.renderToString(`${r}`)}catch{return r}},[r]),o=J.useMemo(()=>r.trim()?x.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:i}}):x.jsx("span",{contentEditable:!1,children:"Not enter a formula"}),[r,i]);return x.jsx(gi,{style:{display:"inline-block",backgroundColor:n},as:"span",children:o})}function yee(t){return e=>e.getAttribute(t)}const Ml=Nt.create({name:"katex",group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){return{HTMLAttributes:{class:"katex"},button:({editor:t,t:e})=>({component:pee,componentProps:{editor:t,action:()=>{},isActive:()=>!1,disabled:!1,icon:"KatexIcon",tooltip:e("editor.katex.tooltip")}})}},addAttributes(){return{text:{default:"",parseHTML:yee("text")},defaultShowPicker:{default:!1}}},parseHTML(){return[{tag:"span.katex"}]},renderHTML({HTMLAttributes:t}){return["span",lt(this.options&&this.options.HTMLAttributes||{},t)]},addCommands(){return{setKatex:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Wh({find:/^\$katex\$$/,type:this.type,getAttributes:()=>({defaultShowPicker:!0})})]},addNodeView(){return ko(gee)}});function vee(t){const e=document.createElement("iframe");e.setAttribute("style","position: absolute; width: 0; height: 0; top: 0; left: 0;"),document.body.appendChild(e),e.textContent=`
272
+ <!DOCTYPE html>
273
+ <html lang="en">
274
+ <head>
275
+ <title>Echo Editor</title>
276
+ <meta charset="UTF-8">
277
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
278
+ </head>
279
+ <body class="is-print">
280
+ <div class="tiptap ProseMirror" translate="no" aria-expanded="false">
281
+ ${t}
282
+ </div>
283
+ </body>
284
+ </html>
285
+ `;const r=e.contentWindow,n=e.contentDocument||e.contentWindow&&e.contentWindow.document,i=document.createElement("link");i.rel="stylesheet",i.href="https://cdn.jsdelivr.net/npm/reactjs-tiptap-editor@latest/lib/style.css",n.head.appendChild(i),n&&(n.open(),n.write(t),n.close()),r&&(e.onload=function(){try{setTimeout(()=>{r.focus();try{r.document.execCommand("print",!1)||r.print()}catch{r.print()}r.close()},10)}catch(o){console.error(o)}setTimeout(()=>{document.body.removeChild(e)},100)})}function bee(t){const e=t.getHTML();return e?(vee(e),!0):!1}const wee=yt.create({name:"exportPdf",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>{bee(e)},icon:"ExportPdf",tooltip:r("editor.exportPdf.tooltip"),isActive:()=>!1,disabled:!1}})}}});function xee(t,e){const r=atob(t.split(",")[1]),n=Array.from({length:r.length});for(let o=0;o<r.length;o++)n[o]=r.charCodeAt(o);const i=new Uint8Array(n);return new Blob([i],{type:e})}function See(t,e){return new File([t],e,{type:t.type})}function kee(t){const[e,r]=J.useState(!1),[n,i]=J.useState(),o=J.useRef();function s(){o.current.click()}function a(f){const p=f.target.files[0];i(p),p&&c()}async function l(f){var S;const m=new DOMParser().parseFromString(f,"text/html"),g=m.querySelectorAll("img");if(!g.length)return m.body.innerHTML;if(LM(t.editor,"image")){const w=(S=t.editor.extensionManager.extensions.find(T=>T.name==="importWord"))==null?void 0:S.options;if(w&&typeof w.upload=="function"){const T=[];for(const j of g){const $=j.getAttribute("src"),W=xee($,"image/jpeg"),Y=See(W,"image.jpeg");T.push(Y)}const M=await w.upload(T);for(let j=0;j<g.length;j++){const $=g[j];$.setAttribute("src",M[j].src);const W=$.parentElement;(W==null?void 0:W.tagName)==="P"&&(W.insertAdjacentElement("beforebegin",$),!W.hasChildNodes()&&W.textContent===""&&W.remove())}return m.body.innerHTML}else return console.warn("Image Upload method found, skip image conversion"),m.body.innerHTML}else return console.error("Image extension not found, unable to convert image"),m.body.innerHTML}async function c(){if(t.convert){const f=await t.convert(n);d(f)}else{const f=new FormData,p=JSON.stringify({collaboration_features:{comments:!0,user_id:"e3",track_changes:!0},formatting:{resets:"none",defaults:"inline",styles:"inline",comments:"basic"}});f.append("config",p),f.append("file",n),r(!0),fetch("https://docx-converter.cke-cs.com/v2/convert/docx-html",{method:"POST",body:f}).then(m=>m.json()).then(async m=>{d(m.html)}).catch(m=>{console.error("Error:",m),r(!1)})}}async function d(f){const p=await l(f);t.editor.chain().setContent(p,!0).run(),r(!1)}return x.jsxs("div",{children:[x.jsx(Ve,{loading:e,disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,action:s}),x.jsx("input",{type:"file",accept:".docx",ref:o,style:{display:"none"},onChange:a})]})}const _ee=yt.create({name:"importWord",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:void 0,convert:void 0,button:({editor:e,extension:r,t:n})=>{const{convert:i}=r.options;return{component:kee,componentProps:{convert:i,action:()=>e.commands.setHorizontalRule(),disabled:!e.can().setHorizontalRule(),icon:"Word",shortcutKeys:["alt","mod","S"],tooltip:n("editor.importWrod.tooltip")}}}}}});var Eee=Object.defineProperty,Cee=Object.defineProperties,Tee=Object.getOwnPropertyDescriptors,rA=Object.getOwnPropertySymbols,Aee=Object.prototype.hasOwnProperty,Ree=Object.prototype.propertyIsEnumerable,u1=(t,e,r)=>e in t?Eee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vt=(t,e)=>{for(var r in e||(e={}))Aee.call(e,r)&&u1(t,r,e[r]);if(rA)for(var r of rA(e))Ree.call(e,r)&&u1(t,r,e[r]);return t},_a=(t,e)=>Cee(t,Tee(e)),Ae=(t,e,r)=>(u1(t,typeof e!="symbol"?e+"":e,r),r),ym=(t,e,r)=>new Promise((n,i)=>{var o=l=>{try{a(r.next(l))}catch(c){i(c)}},s=l=>{try{a(r.throw(l))}catch(c){i(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);a((r=r.apply(t,e)).next())});class wy{constructor(e){Ae(this,"rootKey"),this.rootKey=e}}const Iee=Object.seal({});class Te extends wy{constructor(e){super(e),Ae(this,"root"),this.root=new Array}prepForXml(e){var r;e.stack.push(this);const n=this.root.map(i=>i instanceof wy?i.prepForXml(e):i).filter(i=>i!==void 0);return e.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((r=n[0])!=null&&r._attr)?n[0]:n:Iee}}addChildElement(e){return this.root.push(e),this}}class vs extends Te{prepForXml(e){const r=super.prepForXml(e);if(r&&(typeof r[this.rootKey]!="object"||Object.keys(r[this.rootKey]).length))return r}}class Xe extends wy{constructor(e){super("_attr"),Ae(this,"xmlKeys"),this.root=e}prepForXml(e){const r={};return Object.keys(this.root).forEach(n=>{const i=this.root[n];if(i!==void 0){const o=this.xmlKeys&&this.xmlKeys[n]||n;r[o]=i}}),{_attr:r}}}class bs extends wy{constructor(e){super("_attr"),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:i,value:o})=>_a(vt({},n),{[i]:o}),{})}}}class sr extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}}var mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r3={},ek={exports:{}},Uu=typeof Reflect=="object"?Reflect:null,nA=Uu&&typeof Uu.apply=="function"?Uu.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},Qm;Uu&&typeof Uu.ownKeys=="function"?Qm=Uu.ownKeys:Object.getOwnPropertySymbols?Qm=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Qm=function(e){return Object.getOwnPropertyNames(e)};function Oee(t){console&&console.warn&&console.warn(t)}var n3=Number.isNaN||function(e){return e!==e};function Bt(){Bt.init.call(this)}ek.exports=Bt;ek.exports.once=Pee;Bt.EventEmitter=Bt;Bt.prototype._events=void 0;Bt.prototype._eventsCount=0;Bt.prototype._maxListeners=void 0;var iA=10;function uv(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Bt,"defaultMaxListeners",{enumerable:!0,get:function(){return iA},set:function(t){if(typeof t!="number"||t<0||n3(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");iA=t}});Bt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Bt.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||n3(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function i3(t){return t._maxListeners===void 0?Bt.defaultMaxListeners:t._maxListeners}Bt.prototype.getMaxListeners=function(){return i3(this)};Bt.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var s;if(r.length>0&&(s=r[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(l===void 0)return!1;if(typeof l=="function")nA(l,this,r);else for(var c=l.length,d=c3(l,c),n=0;n<c;++n)nA(d[n],this,r);return!0};function o3(t,e,r,n){var i,o,s;if(uv(r),o=t._events,o===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),s===void 0)s=o[e]=r,++t._eventsCount;else if(typeof s=="function"?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),i=i3(t),i>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,Oee(a)}return t}Bt.prototype.addListener=function(e,r){return o3(this,e,r,!1)};Bt.prototype.on=Bt.prototype.addListener;Bt.prototype.prependListener=function(e,r){return o3(this,e,r,!0)};function Mee(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s3(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Mee.bind(n);return i.listener=r,n.wrapFn=i,i}Bt.prototype.once=function(e,r){return uv(r),this.on(e,s3(this,e,r)),this};Bt.prototype.prependOnceListener=function(e,r){return uv(r),this.prependListener(e,s3(this,e,r)),this};Bt.prototype.removeListener=function(e,r){var n,i,o,s,a;if(uv(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(o=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){a=n[s].listener,o=s;break}if(o<0)return this;o===0?n.shift():Nee(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||r)}return this};Bt.prototype.off=Bt.prototype.removeListener;Bt.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),s;for(i=0;i<o.length;++i)s=o[i],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function a3(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Dee(i):c3(i,i.length)}Bt.prototype.listeners=function(e){return a3(this,e,!0)};Bt.prototype.rawListeners=function(e){return a3(this,e,!1)};Bt.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):l3.call(t,e)};Bt.prototype.listenerCount=l3;function l3(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Bt.prototype.eventNames=function(){return this._eventsCount>0?Qm(this._events):[]};function c3(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function Nee(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Dee(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function Pee(t,e){return new Promise(function(r,n){function i(s){t.removeListener(e,o),n(s)}function o(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}u3(t,e,o,{once:!0}),e!=="error"&&Lee(t,i,{once:!0})})}function Lee(t,e,r){typeof t.on=="function"&&u3(t,"error",e,r)}function u3(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var tk=ek.exports,d1={exports:{}};typeof Object.create=="function"?d1.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:d1.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var dc=d1.exports;function Fee(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d3={exports:{}},ur=d3.exports={},co,uo;function f1(){throw new Error("setTimeout has not been defined")}function h1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?co=setTimeout:co=f1}catch{co=f1}try{typeof clearTimeout=="function"?uo=clearTimeout:uo=h1}catch{uo=h1}})();function f3(t){if(co===setTimeout)return setTimeout(t,0);if((co===f1||!co)&&setTimeout)return co=setTimeout,setTimeout(t,0);try{return co(t,0)}catch{try{return co.call(null,t,0)}catch{return co.call(this,t,0)}}}function jee(t){if(uo===clearTimeout)return clearTimeout(t);if((uo===h1||!uo)&&clearTimeout)return uo=clearTimeout,clearTimeout(t);try{return uo(t)}catch{try{return uo.call(null,t)}catch{return uo.call(this,t)}}}var is=[],Wu=!1,Nl,eg=-1;function Bee(){!Wu||!Nl||(Wu=!1,Nl.length?is=Nl.concat(is):eg=-1,is.length&&h3())}function h3(){if(!Wu){var t=f3(Bee);Wu=!0;for(var e=is.length;e;){for(Nl=is,is=[];++eg<e;)Nl&&Nl[eg].run();eg=-1,e=is.length}Nl=null,Wu=!1,jee(t)}}ur.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];is.push(new p3(t,e)),is.length===1&&!Wu&&f3(h3)};function p3(t,e){this.fun=t,this.array=e}p3.prototype.run=function(){this.fun.apply(null,this.array)};ur.title="browser";ur.browser=!0;ur.env={};ur.argv=[];ur.version="";ur.versions={};function ws(){}ur.on=ws;ur.addListener=ws;ur.once=ws;ur.off=ws;ur.removeListener=ws;ur.removeAllListeners=ws;ur.emit=ws;ur.prependListener=ws;ur.prependOnceListener=ws;ur.listeners=function(t){return[]};ur.binding=function(t){throw new Error("process.binding is not supported")};ur.cwd=function(){return"/"};ur.chdir=function(t){throw new Error("process.chdir is not supported")};ur.umask=function(){return 0};var zee=d3.exports;const gt=Fee(zee);var Dw,oA;function m3(){return oA||(oA=1,Dw=tk.EventEmitter),Dw}var Pw={},Lf={},sA;function Hee(){if(sA)return Lf;sA=1,Lf.byteLength=a,Lf.toByteArray=c,Lf.fromByteArray=p;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)t[i]=n[i],e[n.charCodeAt(i)]=i;e[45]=62,e[95]=63;function s(m){var g=m.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=m.indexOf("=");b===-1&&(b=g);var S=b===g?0:4-b%4;return[b,S]}function a(m){var g=s(m),b=g[0],S=g[1];return(b+S)*3/4-S}function l(m,g,b){return(g+b)*3/4-b}function c(m){var g,b=s(m),S=b[0],w=b[1],T=new r(l(m,S,w)),M=0,j=w>0?S-4:S,$;for($=0;$<j;$+=4)g=e[m.charCodeAt($)]<<18|e[m.charCodeAt($+1)]<<12|e[m.charCodeAt($+2)]<<6|e[m.charCodeAt($+3)],T[M++]=g>>16&255,T[M++]=g>>8&255,T[M++]=g&255;return w===2&&(g=e[m.charCodeAt($)]<<2|e[m.charCodeAt($+1)]>>4,T[M++]=g&255),w===1&&(g=e[m.charCodeAt($)]<<10|e[m.charCodeAt($+1)]<<4|e[m.charCodeAt($+2)]>>2,T[M++]=g>>8&255,T[M++]=g&255),T}function d(m){return t[m>>18&63]+t[m>>12&63]+t[m>>6&63]+t[m&63]}function f(m,g,b){for(var S,w=[],T=g;T<b;T+=3)S=(m[T]<<16&16711680)+(m[T+1]<<8&65280)+(m[T+2]&255),w.push(d(S));return w.join("")}function p(m){for(var g,b=m.length,S=b%3,w=[],T=16383,M=0,j=b-S;M<j;M+=T)w.push(f(m,M,M+T>j?j:M+T));return S===1?(g=m[b-1],w.push(t[g>>2]+t[g<<4&63]+"==")):S===2&&(g=(m[b-2]<<8)+m[b-1],w.push(t[g>>10]+t[g>>4&63]+t[g<<2&63]+"=")),w.join("")}return Lf}var vm={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var aA;function $ee(){return aA||(aA=1,vm.read=function(t,e,r,n,i){var o,s,a=i*8-n-1,l=(1<<a)-1,c=l>>1,d=-7,f=r?i-1:0,p=r?-1:1,m=t[e+f];for(f+=p,o=m&(1<<-d)-1,m>>=-d,d+=a;d>0;o=o*256+t[e+f],f+=p,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=n;d>0;s=s*256+t[e+f],f+=p,d-=8);if(o===0)o=1-c;else{if(o===l)return s?NaN:(m?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-c}return(m?-1:1)*s*Math.pow(2,o-n)},vm.write=function(t,e,r,n,i,o){var s,a,l,c=o*8-i-1,d=(1<<c)-1,f=d>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:o-1,g=n?1:-1,b=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?e+=p/l:e+=p*Math.pow(2,1-f),e*l>=2&&(s++,l/=2),s+f>=d?(a=0,s=d):s+f>=1?(a=(e*l-1)*Math.pow(2,i),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+m]=a&255,m+=g,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+m]=s&255,m+=g,s/=256,c-=8);t[r+m-g]|=b*128}),vm}/*!
286
+ * The buffer module from node.js, for the browser.
287
+ *
288
+ * @author Feross Aboukhadijeh <https://feross.org>
289
+ * @license MIT
290
+ */var lA;function dv(){return lA||(lA=1,function(t){var e=Hee(),r=$ee(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=T,t.INSPECT_MAX_BYTES=50;var i=2147483647;t.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var F=new Uint8Array(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,Uint8Array.prototype),Object.setPrototypeOf(F,k),F.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(F){if(F>i)throw new RangeError('The value "'+F+'" is invalid for option "size"');var k=new Uint8Array(F);return Object.setPrototypeOf(k,a.prototype),k}function a(F,k,_){if(typeof F=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(F)}return l(F,k,_)}a.poolSize=8192;function l(F,k,_){if(typeof F=="string")return p(F,k);if(ArrayBuffer.isView(F))return g(F);if(F==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F);if(we(F,ArrayBuffer)||F&&we(F.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(we(F,SharedArrayBuffer)||F&&we(F.buffer,SharedArrayBuffer)))return b(F,k,_);if(typeof F=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var N=F.valueOf&&F.valueOf();if(N!=null&&N!==F)return a.from(N,k,_);var Q=S(F);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof F[Symbol.toPrimitive]=="function")return a.from(F[Symbol.toPrimitive]("string"),k,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F)}a.from=function(F,k,_){return l(F,k,_)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(F){if(typeof F!="number")throw new TypeError('"size" argument must be of type number');if(F<0)throw new RangeError('The value "'+F+'" is invalid for option "size"')}function d(F,k,_){return c(F),F<=0?s(F):k!==void 0?typeof _=="string"?s(F).fill(k,_):s(F).fill(k):s(F)}a.alloc=function(F,k,_){return d(F,k,_)};function f(F){return c(F),s(F<0?0:w(F)|0)}a.allocUnsafe=function(F){return f(F)},a.allocUnsafeSlow=function(F){return f(F)};function p(F,k){if((typeof k!="string"||k==="")&&(k="utf8"),!a.isEncoding(k))throw new TypeError("Unknown encoding: "+k);var _=M(F,k)|0,N=s(_),Q=N.write(F,k);return Q!==_&&(N=N.slice(0,Q)),N}function m(F){for(var k=F.length<0?0:w(F.length)|0,_=s(k),N=0;N<k;N+=1)_[N]=F[N]&255;return _}function g(F){if(we(F,Uint8Array)){var k=new Uint8Array(F);return b(k.buffer,k.byteOffset,k.byteLength)}return m(F)}function b(F,k,_){if(k<0||F.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(F.byteLength<k+(_||0))throw new RangeError('"length" is outside of buffer bounds');var N;return k===void 0&&_===void 0?N=new Uint8Array(F):_===void 0?N=new Uint8Array(F,k):N=new Uint8Array(F,k,_),Object.setPrototypeOf(N,a.prototype),N}function S(F){if(a.isBuffer(F)){var k=w(F.length)|0,_=s(k);return _.length===0||F.copy(_,0,0,k),_}if(F.length!==void 0)return typeof F.length!="number"||O(F.length)?s(0):m(F);if(F.type==="Buffer"&&Array.isArray(F.data))return m(F.data)}function w(F){if(F>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return F|0}function T(F){return+F!=F&&(F=0),a.alloc(+F)}a.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==a.prototype},a.compare=function(k,_){if(we(k,Uint8Array)&&(k=a.from(k,k.offset,k.byteLength)),we(_,Uint8Array)&&(_=a.from(_,_.offset,_.byteLength)),!a.isBuffer(k)||!a.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===_)return 0;for(var N=k.length,Q=_.length,pe=0,oe=Math.min(N,Q);pe<oe;++pe)if(k[pe]!==_[pe]){N=k[pe],Q=_[pe];break}return N<Q?-1:Q<N?1:0},a.isEncoding=function(k){switch(String(k).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(k,_){if(!Array.isArray(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return a.alloc(0);var N;if(_===void 0)for(_=0,N=0;N<k.length;++N)_+=k[N].length;var Q=a.allocUnsafe(_),pe=0;for(N=0;N<k.length;++N){var oe=k[N];if(we(oe,Uint8Array))pe+oe.length>Q.length?a.from(oe).copy(Q,pe):Uint8Array.prototype.set.call(Q,oe,pe);else if(a.isBuffer(oe))oe.copy(Q,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=oe.length}return Q};function M(F,k){if(a.isBuffer(F))return F.length;if(ArrayBuffer.isView(F)||we(F,ArrayBuffer))return F.byteLength;if(typeof F!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof F);var _=F.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&_===0)return 0;for(var Q=!1;;)switch(k){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return D(F).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return q(F).length;default:if(Q)return N?-1:D(F).length;k=(""+k).toLowerCase(),Q=!0}}a.byteLength=M;function j(F,k,_){var N=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,k>>>=0,_<=k))return"";for(F||(F="utf8");;)switch(F){case"hex":return ye(this,k,_);case"utf8":case"utf-8":return R(this,k,_);case"ascii":return he(this,k,_);case"latin1":case"binary":return Fe(this,k,_);case"base64":return ne(this,k,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ze(this,k,_);default:if(N)throw new TypeError("Unknown encoding: "+F);F=(F+"").toLowerCase(),N=!0}}a.prototype._isBuffer=!0;function $(F,k,_){var N=F[k];F[k]=F[_],F[_]=N}a.prototype.swap16=function(){var k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var _=0;_<k;_+=2)$(this,_,_+1);return this},a.prototype.swap32=function(){var k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var _=0;_<k;_+=4)$(this,_,_+3),$(this,_+1,_+2);return this},a.prototype.swap64=function(){var k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var _=0;_<k;_+=8)$(this,_,_+7),$(this,_+1,_+6),$(this,_+2,_+5),$(this,_+3,_+4);return this},a.prototype.toString=function(){var k=this.length;return k===0?"":arguments.length===0?R(this,0,k):j.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(k){if(!a.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:a.compare(this,k)===0},a.prototype.inspect=function(){var k="",_=t.INSPECT_MAX_BYTES;return k=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(k+=" ... "),"<Buffer "+k+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(k,_,N,Q,pe){if(we(k,Uint8Array)&&(k=a.from(k,k.offset,k.byteLength)),!a.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(_===void 0&&(_=0),N===void 0&&(N=k?k.length:0),Q===void 0&&(Q=0),pe===void 0&&(pe=this.length),_<0||N>k.length||Q<0||pe>this.length)throw new RangeError("out of range index");if(Q>=pe&&_>=N)return 0;if(Q>=pe)return-1;if(_>=N)return 1;if(_>>>=0,N>>>=0,Q>>>=0,pe>>>=0,this===k)return 0;for(var oe=pe-Q,Re=N-_,Ne=Math.min(oe,Re),De=this.slice(Q,pe),We=k.slice(_,N),Je=0;Je<Ne;++Je)if(De[Je]!==We[Je]){oe=De[Je],Re=We[Je];break}return oe<Re?-1:Re<oe?1:0};function W(F,k,_,N,Q){if(F.length===0)return-1;if(typeof _=="string"?(N=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,O(_)&&(_=Q?0:F.length-1),_<0&&(_=F.length+_),_>=F.length){if(Q)return-1;_=F.length-1}else if(_<0)if(Q)_=0;else return-1;if(typeof k=="string"&&(k=a.from(k,N)),a.isBuffer(k))return k.length===0?-1:Y(F,k,_,N,Q);if(typeof k=="number")return k=k&255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(F,k,_):Uint8Array.prototype.lastIndexOf.call(F,k,_):Y(F,[k],_,N,Q);throw new TypeError("val must be string, number or Buffer")}function Y(F,k,_,N,Q){var pe=1,oe=F.length,Re=k.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(F.length<2||k.length<2)return-1;pe=2,oe/=2,Re/=2,_/=2}function Ne(Gt,Ar){return pe===1?Gt[Ar]:Gt.readUInt16BE(Ar*pe)}var De;if(Q){var We=-1;for(De=_;De<oe;De++)if(Ne(F,De)===Ne(k,We===-1?0:De-We)){if(We===-1&&(We=De),De-We+1===Re)return We*pe}else We!==-1&&(De-=De-We),We=-1}else for(_+Re>oe&&(_=oe-Re),De=_;De>=0;De--){for(var Je=!0,Ye=0;Ye<Re;Ye++)if(Ne(F,De+Ye)!==Ne(k,Ye)){Je=!1;break}if(Je)return De}return-1}a.prototype.includes=function(k,_,N){return this.indexOf(k,_,N)!==-1},a.prototype.indexOf=function(k,_,N){return W(this,k,_,N,!0)},a.prototype.lastIndexOf=function(k,_,N){return W(this,k,_,N,!1)};function ee(F,k,_,N){_=Number(_)||0;var Q=F.length-_;N?(N=Number(N),N>Q&&(N=Q)):N=Q;var pe=k.length;N>pe/2&&(N=pe/2);for(var oe=0;oe<N;++oe){var Re=parseInt(k.substr(oe*2,2),16);if(O(Re))return oe;F[_+oe]=Re}return oe}function P(F,k,_,N){return Z(D(k,F.length-_),F,_,N)}function fe(F,k,_,N){return Z(ae(k),F,_,N)}function de(F,k,_,N){return Z(q(k),F,_,N)}function U(F,k,_,N){return Z(ie(k,F.length-_),F,_,N)}a.prototype.write=function(k,_,N,Q){if(_===void 0)Q="utf8",N=this.length,_=0;else if(N===void 0&&typeof _=="string")Q=_,N=this.length,_=0;else if(isFinite(_))_=_>>>0,isFinite(N)?(N=N>>>0,Q===void 0&&(Q="utf8")):(Q=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-_;if((N===void 0||N>pe)&&(N=pe),k.length>0&&(N<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");for(var oe=!1;;)switch(Q){case"hex":return ee(this,k,_,N);case"utf8":case"utf-8":return P(this,k,_,N);case"ascii":case"latin1":case"binary":return fe(this,k,_,N);case"base64":return de(this,k,_,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,k,_,N);default:if(oe)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),oe=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(F,k,_){return k===0&&_===F.length?e.fromByteArray(F):e.fromByteArray(F.slice(k,_))}function R(F,k,_){_=Math.min(F.length,_);for(var N=[],Q=k;Q<_;){var pe=F[Q],oe=null,Re=pe>239?4:pe>223?3:pe>191?2:1;if(Q+Re<=_){var Ne,De,We,Je;switch(Re){case 1:pe<128&&(oe=pe);break;case 2:Ne=F[Q+1],(Ne&192)===128&&(Je=(pe&31)<<6|Ne&63,Je>127&&(oe=Je));break;case 3:Ne=F[Q+1],De=F[Q+2],(Ne&192)===128&&(De&192)===128&&(Je=(pe&15)<<12|(Ne&63)<<6|De&63,Je>2047&&(Je<55296||Je>57343)&&(oe=Je));break;case 4:Ne=F[Q+1],De=F[Q+2],We=F[Q+3],(Ne&192)===128&&(De&192)===128&&(We&192)===128&&(Je=(pe&15)<<18|(Ne&63)<<12|(De&63)<<6|We&63,Je>65535&&Je<1114112&&(oe=Je))}}oe===null?(oe=65533,Re=1):oe>65535&&(oe-=65536,N.push(oe>>>10&1023|55296),oe=56320|oe&1023),N.push(oe),Q+=Re}return Ce(N)}var le=4096;function Ce(F){var k=F.length;if(k<=le)return String.fromCharCode.apply(String,F);for(var _="",N=0;N<k;)_+=String.fromCharCode.apply(String,F.slice(N,N+=le));return _}function he(F,k,_){var N="";_=Math.min(F.length,_);for(var Q=k;Q<_;++Q)N+=String.fromCharCode(F[Q]&127);return N}function Fe(F,k,_){var N="";_=Math.min(F.length,_);for(var Q=k;Q<_;++Q)N+=String.fromCharCode(F[Q]);return N}function ye(F,k,_){var N=F.length;(!k||k<0)&&(k=0),(!_||_<0||_>N)&&(_=N);for(var Q="",pe=k;pe<_;++pe)Q+=xe[F[pe]];return Q}function ze(F,k,_){for(var N=F.slice(k,_),Q="",pe=0;pe<N.length-1;pe+=2)Q+=String.fromCharCode(N[pe]+N[pe+1]*256);return Q}a.prototype.slice=function(k,_){var N=this.length;k=~~k,_=_===void 0?N:~~_,k<0?(k+=N,k<0&&(k=0)):k>N&&(k=N),_<0?(_+=N,_<0&&(_=0)):_>N&&(_=N),_<k&&(_=k);var Q=this.subarray(k,_);return Object.setPrototypeOf(Q,a.prototype),Q};function ue(F,k,_){if(F%1!==0||F<0)throw new RangeError("offset is not uint");if(F+k>_)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(k,_,N){k=k>>>0,_=_>>>0,N||ue(k,_,this.length);for(var Q=this[k],pe=1,oe=0;++oe<_&&(pe*=256);)Q+=this[k+oe]*pe;return Q},a.prototype.readUintBE=a.prototype.readUIntBE=function(k,_,N){k=k>>>0,_=_>>>0,N||ue(k,_,this.length);for(var Q=this[k+--_],pe=1;_>0&&(pe*=256);)Q+=this[k+--_]*pe;return Q},a.prototype.readUint8=a.prototype.readUInt8=function(k,_){return k=k>>>0,_||ue(k,1,this.length),this[k]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(k,_){return k=k>>>0,_||ue(k,2,this.length),this[k]|this[k+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(k,_){return k=k>>>0,_||ue(k,2,this.length),this[k]<<8|this[k+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(k,_){return k=k>>>0,_||ue(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(k,_){return k=k>>>0,_||ue(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},a.prototype.readIntLE=function(k,_,N){k=k>>>0,_=_>>>0,N||ue(k,_,this.length);for(var Q=this[k],pe=1,oe=0;++oe<_&&(pe*=256);)Q+=this[k+oe]*pe;return pe*=128,Q>=pe&&(Q-=Math.pow(2,8*_)),Q},a.prototype.readIntBE=function(k,_,N){k=k>>>0,_=_>>>0,N||ue(k,_,this.length);for(var Q=_,pe=1,oe=this[k+--Q];Q>0&&(pe*=256);)oe+=this[k+--Q]*pe;return pe*=128,oe>=pe&&(oe-=Math.pow(2,8*_)),oe},a.prototype.readInt8=function(k,_){return k=k>>>0,_||ue(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},a.prototype.readInt16LE=function(k,_){k=k>>>0,_||ue(k,2,this.length);var N=this[k]|this[k+1]<<8;return N&32768?N|4294901760:N},a.prototype.readInt16BE=function(k,_){k=k>>>0,_||ue(k,2,this.length);var N=this[k+1]|this[k]<<8;return N&32768?N|4294901760:N},a.prototype.readInt32LE=function(k,_){return k=k>>>0,_||ue(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},a.prototype.readInt32BE=function(k,_){return k=k>>>0,_||ue(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},a.prototype.readFloatLE=function(k,_){return k=k>>>0,_||ue(k,4,this.length),r.read(this,k,!0,23,4)},a.prototype.readFloatBE=function(k,_){return k=k>>>0,_||ue(k,4,this.length),r.read(this,k,!1,23,4)},a.prototype.readDoubleLE=function(k,_){return k=k>>>0,_||ue(k,8,this.length),r.read(this,k,!0,52,8)},a.prototype.readDoubleBE=function(k,_){return k=k>>>0,_||ue(k,8,this.length),r.read(this,k,!1,52,8)};function V(F,k,_,N,Q,pe){if(!a.isBuffer(F))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>Q||k<pe)throw new RangeError('"value" argument is out of bounds');if(_+N>F.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(k,_,N,Q){if(k=+k,_=_>>>0,N=N>>>0,!Q){var pe=Math.pow(2,8*N)-1;V(this,k,_,N,pe,0)}var oe=1,Re=0;for(this[_]=k&255;++Re<N&&(oe*=256);)this[_+Re]=k/oe&255;return _+N},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(k,_,N,Q){if(k=+k,_=_>>>0,N=N>>>0,!Q){var pe=Math.pow(2,8*N)-1;V(this,k,_,N,pe,0)}var oe=N-1,Re=1;for(this[_+oe]=k&255;--oe>=0&&(Re*=256);)this[_+oe]=k/Re&255;return _+N},a.prototype.writeUint8=a.prototype.writeUInt8=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,1,255,0),this[_]=k&255,_+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,2,65535,0),this[_]=k&255,this[_+1]=k>>>8,_+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,2,65535,0),this[_]=k>>>8,this[_+1]=k&255,_+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,4,4294967295,0),this[_+3]=k>>>24,this[_+2]=k>>>16,this[_+1]=k>>>8,this[_]=k&255,_+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,4,4294967295,0),this[_]=k>>>24,this[_+1]=k>>>16,this[_+2]=k>>>8,this[_+3]=k&255,_+4},a.prototype.writeIntLE=function(k,_,N,Q){if(k=+k,_=_>>>0,!Q){var pe=Math.pow(2,8*N-1);V(this,k,_,N,pe-1,-pe)}var oe=0,Re=1,Ne=0;for(this[_]=k&255;++oe<N&&(Re*=256);)k<0&&Ne===0&&this[_+oe-1]!==0&&(Ne=1),this[_+oe]=(k/Re>>0)-Ne&255;return _+N},a.prototype.writeIntBE=function(k,_,N,Q){if(k=+k,_=_>>>0,!Q){var pe=Math.pow(2,8*N-1);V(this,k,_,N,pe-1,-pe)}var oe=N-1,Re=1,Ne=0;for(this[_+oe]=k&255;--oe>=0&&(Re*=256);)k<0&&Ne===0&&this[_+oe+1]!==0&&(Ne=1),this[_+oe]=(k/Re>>0)-Ne&255;return _+N},a.prototype.writeInt8=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,1,127,-128),k<0&&(k=255+k+1),this[_]=k&255,_+1},a.prototype.writeInt16LE=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,2,32767,-32768),this[_]=k&255,this[_+1]=k>>>8,_+2},a.prototype.writeInt16BE=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,2,32767,-32768),this[_]=k>>>8,this[_+1]=k&255,_+2},a.prototype.writeInt32LE=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,4,2147483647,-2147483648),this[_]=k&255,this[_+1]=k>>>8,this[_+2]=k>>>16,this[_+3]=k>>>24,_+4},a.prototype.writeInt32BE=function(k,_,N){return k=+k,_=_>>>0,N||V(this,k,_,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[_]=k>>>24,this[_+1]=k>>>16,this[_+2]=k>>>8,this[_+3]=k&255,_+4};function me(F,k,_,N,Q,pe){if(_+N>F.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function ge(F,k,_,N,Q){return k=+k,_=_>>>0,Q||me(F,k,_,4),r.write(F,k,_,N,23,4),_+4}a.prototype.writeFloatLE=function(k,_,N){return ge(this,k,_,!0,N)},a.prototype.writeFloatBE=function(k,_,N){return ge(this,k,_,!1,N)};function ke(F,k,_,N,Q){return k=+k,_=_>>>0,Q||me(F,k,_,8),r.write(F,k,_,N,52,8),_+8}a.prototype.writeDoubleLE=function(k,_,N){return ke(this,k,_,!0,N)},a.prototype.writeDoubleBE=function(k,_,N){return ke(this,k,_,!1,N)},a.prototype.copy=function(k,_,N,Q){if(!a.isBuffer(k))throw new TypeError("argument should be a Buffer");if(N||(N=0),!Q&&Q!==0&&(Q=this.length),_>=k.length&&(_=k.length),_||(_=0),Q>0&&Q<N&&(Q=N),Q===N||k.length===0||this.length===0)return 0;if(_<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),k.length-_<Q-N&&(Q=k.length-_+N);var pe=Q-N;return this===k&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(_,N,Q):Uint8Array.prototype.set.call(k,this.subarray(N,Q),_),pe},a.prototype.fill=function(k,_,N,Q){if(typeof k=="string"){if(typeof _=="string"?(Q=_,_=0,N=this.length):typeof N=="string"&&(Q=N,N=this.length),Q!==void 0&&typeof Q!="string")throw new TypeError("encoding must be a string");if(typeof Q=="string"&&!a.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);if(k.length===1){var pe=k.charCodeAt(0);(Q==="utf8"&&pe<128||Q==="latin1")&&(k=pe)}}else typeof k=="number"?k=k&255:typeof k=="boolean"&&(k=Number(k));if(_<0||this.length<_||this.length<N)throw new RangeError("Out of range index");if(N<=_)return this;_=_>>>0,N=N===void 0?this.length:N>>>0,k||(k=0);var oe;if(typeof k=="number")for(oe=_;oe<N;++oe)this[oe]=k;else{var Re=a.isBuffer(k)?k:a.from(k,Q),Ne=Re.length;if(Ne===0)throw new TypeError('The value "'+k+'" is invalid for argument "value"');for(oe=0;oe<N-_;++oe)this[oe+_]=Re[oe%Ne]}return this};var ce=/[^+/0-9A-Za-z-_]/g;function L(F){if(F=F.split("=")[0],F=F.trim().replace(ce,""),F.length<2)return"";for(;F.length%4!==0;)F=F+"=";return F}function D(F,k){k=k||1/0;for(var _,N=F.length,Q=null,pe=[],oe=0;oe<N;++oe){if(_=F.charCodeAt(oe),_>55295&&_<57344){if(!Q){if(_>56319){(k-=3)>-1&&pe.push(239,191,189);continue}else if(oe+1===N){(k-=3)>-1&&pe.push(239,191,189);continue}Q=_;continue}if(_<56320){(k-=3)>-1&&pe.push(239,191,189),Q=_;continue}_=(Q-55296<<10|_-56320)+65536}else Q&&(k-=3)>-1&&pe.push(239,191,189);if(Q=null,_<128){if((k-=1)<0)break;pe.push(_)}else if(_<2048){if((k-=2)<0)break;pe.push(_>>6|192,_&63|128)}else if(_<65536){if((k-=3)<0)break;pe.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((k-=4)<0)break;pe.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return pe}function ae(F){for(var k=[],_=0;_<F.length;++_)k.push(F.charCodeAt(_)&255);return k}function ie(F,k){for(var _,N,Q,pe=[],oe=0;oe<F.length&&!((k-=2)<0);++oe)_=F.charCodeAt(oe),N=_>>8,Q=_%256,pe.push(Q),pe.push(N);return pe}function q(F){return e.toByteArray(L(F))}function Z(F,k,_,N){for(var Q=0;Q<N&&!(Q+_>=k.length||Q>=F.length);++Q)k[Q+_]=F[Q];return Q}function we(F,k){return F instanceof k||F!=null&&F.constructor!=null&&F.constructor.name!=null&&F.constructor.name===k.name}function O(F){return F!==F}var xe=function(){for(var F="0123456789abcdef",k=new Array(256),_=0;_<16;++_)for(var N=_*16,Q=0;Q<16;++Q)k[N+Q]=F[_]+F[Q];return k}()}(Pw)),Pw}var Lw={},Fw={},jw,cA;function g3(){return cA||(cA=1,jw=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r 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]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),jw}var Bw,uA;function rk(){if(uA)return Bw;uA=1;var t=g3();return Bw=function(){return t()&&!!Symbol.toStringTag},Bw}var zw,dA;function Uee(){if(dA)return zw;dA=1;var t=typeof Symbol<"u"&&Symbol,e=g3();return zw=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},zw}var Hw,fA;function Wee(){if(fA)return Hw;fA=1;var t={foo:{}},e=Object;return Hw=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)},Hw}var $w,hA;function Vee(){if(hA)return $w;hA=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(l,c){for(var d=[],f=0;f<l.length;f+=1)d[f]=l[f];for(var p=0;p<c.length;p+=1)d[p+l.length]=c[p];return d},o=function(l,c){for(var d=[],f=c,p=0;f<l.length;f+=1,p+=1)d[p]=l[f];return d},s=function(a,l){for(var c="",d=0;d<a.length;d+=1)c+=a[d],d+1<a.length&&(c+=l);return c};return $w=function(l){var c=this;if(typeof c!="function"||e.apply(c)!==n)throw new TypeError(t+c);for(var d=o(arguments,1),f,p=function(){if(this instanceof f){var w=c.apply(this,i(d,arguments));return Object(w)===w?w:this}return c.apply(l,i(d,arguments))},m=r(0,c.length-d.length),g=[],b=0;b<m;b++)g[b]="$"+b;if(f=Function("binder","return function ("+s(g,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var S=function(){};S.prototype=c.prototype,f.prototype=new S,S.prototype=null}return f},$w}var Uw,pA;function nk(){if(pA)return Uw;pA=1;var t=Vee();return Uw=Function.prototype.bind||t,Uw}var Ww,mA;function Gee(){if(mA)return Ww;mA=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=nk();return Ww=r.call(t,e),Ww}var Vw,gA;function Id(){if(gA)return Vw;gA=1;var t,e=SyntaxError,r=Function,n=TypeError,i=function(U){try{return r('"use strict"; return ('+U+").constructor;")()}catch{}},o=Object.getOwnPropertyDescriptor;if(o)try{o({},"")}catch{o=null}var s=function(){throw new n},a=o?function(){try{return arguments.callee,s}catch{try{return o(arguments,"callee").get}catch{return s}}}():s,l=Uee()(),c=Wee()(),d=Object.getPrototypeOf||(c?function(U){return U.__proto__}:null),f={},p=typeof Uint8Array>"u"||!d?t:d(Uint8Array),m={"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":l&&d?d([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":r,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l&&d?d(d([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!l||!d?t:d(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!l||!d?t:d(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l&&d?d(""[Symbol.iterator]()):t,"%Symbol%":l?Symbol:t,"%SyntaxError%":e,"%ThrowTypeError%":a,"%TypedArray%":p,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet};if(d)try{null.error}catch(U){var g=d(d(U));m["%Error.prototype%"]=g}var b=function U(ne){var R;if(ne==="%AsyncFunction%")R=i("async function () {}");else if(ne==="%GeneratorFunction%")R=i("function* () {}");else if(ne==="%AsyncGeneratorFunction%")R=i("async function* () {}");else if(ne==="%AsyncGenerator%"){var le=U("%AsyncGeneratorFunction%");le&&(R=le.prototype)}else if(ne==="%AsyncIteratorPrototype%"){var Ce=U("%AsyncGenerator%");Ce&&d&&(R=d(Ce.prototype))}return m[ne]=R,R},S={"%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"]},w=nk(),T=Gee(),M=w.call(Function.call,Array.prototype.concat),j=w.call(Function.apply,Array.prototype.splice),$=w.call(Function.call,String.prototype.replace),W=w.call(Function.call,String.prototype.slice),Y=w.call(Function.call,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,fe=function(ne){var R=W(ne,0,1),le=W(ne,-1);if(R==="%"&&le!=="%")throw new e("invalid intrinsic syntax, expected closing `%`");if(le==="%"&&R!=="%")throw new e("invalid intrinsic syntax, expected opening `%`");var Ce=[];return $(ne,ee,function(he,Fe,ye,ze){Ce[Ce.length]=ye?$(ze,P,"$1"):Fe||he}),Ce},de=function(ne,R){var le=ne,Ce;if(T(S,le)&&(Ce=S[le],le="%"+Ce[0]+"%"),T(m,le)){var he=m[le];if(he===f&&(he=b(le)),typeof he>"u"&&!R)throw new n("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:Ce,name:le,value:he}}throw new e("intrinsic "+ne+" does not exist!")};return Vw=function(ne,R){if(typeof ne!="string"||ne.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof R!="boolean")throw new n('"allowMissing" argument must be a boolean');if(Y(/^%?[^%]*%?$/,ne)===null)throw new e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var le=fe(ne),Ce=le.length>0?le[0]:"",he=de("%"+Ce+"%",R),Fe=he.name,ye=he.value,ze=!1,ue=he.alias;ue&&(Ce=ue[0],j(le,M([0,1],ue)));for(var V=1,me=!0;V<le.length;V+=1){var ge=le[V],ke=W(ge,0,1),ce=W(ge,-1);if((ke==='"'||ke==="'"||ke==="`"||ce==='"'||ce==="'"||ce==="`")&&ke!==ce)throw new e("property names with quotes must have matching quotes");if((ge==="constructor"||!me)&&(ze=!0),Ce+="."+ge,Fe="%"+Ce+"%",T(m,Fe))ye=m[Fe];else if(ye!=null){if(!(ge in ye)){if(!R)throw new n("base intrinsic for "+ne+" exists, but the property is not available.");return}if(o&&V+1>=le.length){var L=o(ye,ge);me=!!L,me&&"get"in L&&!("originalValue"in L.get)?ye=L.get:ye=ye[ge]}else me=T(ye,ge),ye=ye[ge];me&&!ze&&(m[Fe]=ye)}}return ye},Vw}var Gw={exports:{}},Kw,yA;function y3(){if(yA)return Kw;yA=1;var t=Id(),e=t("%Object.defineProperty%",!0),r=function(){if(e)try{return e({},"a",{value:1}),!0}catch{return!1}return!1};return r.hasArrayLengthDefineBug=function(){if(!r())return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Kw=r,Kw}var qw,vA;function ik(){if(vA)return qw;vA=1;var t=Id(),e=t("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return qw=e,qw}var Xw,bA;function Kee(){if(bA)return Xw;bA=1;var t=y3()(),e=Id(),r=t&&e("%Object.defineProperty%",!0);if(r)try{r({},"a",{value:1})}catch{r=!1}var n=e("%SyntaxError%"),i=e("%TypeError%"),o=ik();return Xw=function(a,l,c){if(!a||typeof a!="object"&&typeof a!="function")throw new i("`obj` must be an object or a function`");if(typeof l!="string"&&typeof l!="symbol")throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var d=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,m=arguments.length>6?arguments[6]:!1,g=!!o&&o(a,l);if(r)r(a,l,{configurable:p===null&&g?g.configurable:!p,enumerable:d===null&&g?g.enumerable:!d,value:c,writable:f===null&&g?g.writable:!f});else if(m||!d&&!f&&!p)a[l]=c;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Xw}var Yw,wA;function qee(){if(wA)return Yw;wA=1;var t=Id(),e=Kee(),r=y3()(),n=ik(),i=t("%TypeError%"),o=t("%Math.floor%");return Yw=function(a,l){if(typeof a!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||o(l)!==l)throw new i("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],d=!0,f=!0;if("length"in a&&n){var p=n(a,"length");p&&!p.configurable&&(d=!1),p&&!p.writable&&(f=!1)}return(d||f||!c)&&(r?e(a,"length",l,!0,!0):e(a,"length",l)),a},Yw}var xA;function v3(){return xA||(xA=1,function(t){var e=nk(),r=Id(),n=qee(),i=r("%TypeError%"),o=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(s,o),l=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(p){if(typeof p!="function")throw new i("a function is required");var m=a(e,s,arguments);return n(m,1+c(0,p.length-(arguments.length-1)),!0)};var d=function(){return a(e,o,arguments)};l?l(t.exports,"apply",{value:d}):t.exports.apply=d}(Gw)),Gw.exports}var Jw,SA;function b3(){if(SA)return Jw;SA=1;var t=Id(),e=v3(),r=e(t("String.prototype.indexOf"));return Jw=function(i,o){var s=t(i,!!o);return typeof s=="function"&&r(i,".prototype.")>-1?e(s):s},Jw}var Zw,kA;function Xee(){if(kA)return Zw;kA=1;var t=rk()(),e=b3(),r=e("Object.prototype.toString"),n=function(a){return t&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:r(a)==="[object Arguments]"},i=function(a){return n(a)?!0:a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&r(a)!=="[object Array]"&&r(a.callee)==="[object Function]"},o=function(){return n(arguments)}();return n.isLegacyArguments=i,Zw=o?n:i,Zw}var Qw,_A;function Yee(){if(_A)return Qw;_A=1;var t=Object.prototype.toString,e=Function.prototype.toString,r=/^\s*(?:function)?\*/,n=rk()(),i=Object.getPrototypeOf,o=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},s;return Qw=function(l){if(typeof l!="function")return!1;if(r.test(e.call(l)))return!0;if(!n){var c=t.call(l);return c==="[object GeneratorFunction]"}if(!i)return!1;if(typeof s>"u"){var d=o();s=d?i(d):!1}return i(l)===s},Qw}var e0,EA;function Jee(){if(EA)return e0;EA=1;var t=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,r)}catch(T){T!==n&&(e=null)}else e=null;var i=/^\s*class\b/,o=function(M){try{var j=t.call(M);return i.test(j)}catch{return!1}},s=function(M){try{return o(M)?!1:(t.call(M),!0)}catch{return!1}},a=Object.prototype.toString,l="[object Object]",c="[object Function]",d="[object GeneratorFunction]",f="[object HTMLAllCollection]",p="[object HTML document.all class]",m="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,b=!(0 in[,]),S=function(){return!1};if(typeof document=="object"){var w=document.all;a.call(w)===a.call(document.all)&&(S=function(M){if((b||!M)&&(typeof M>"u"||typeof M=="object"))try{var j=a.call(M);return(j===f||j===p||j===m||j===l)&&M("")==null}catch{}return!1})}return e0=e?function(M){if(S(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{e(M,null,r)}catch(j){if(j!==n)return!1}return!o(M)&&s(M)}:function(M){if(S(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(g)return s(M);if(o(M))return!1;var j=a.call(M);return j!==c&&j!==d&&!/^\[object HTML/.test(j)?!1:s(M)},e0}var t0,CA;function Zee(){if(CA)return t0;CA=1;var t=Jee(),e=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(l,c,d){for(var f=0,p=l.length;f<p;f++)r.call(l,f)&&(d==null?c(l[f],f,l):c.call(d,l[f],f,l))},i=function(l,c,d){for(var f=0,p=l.length;f<p;f++)d==null?c(l.charAt(f),f,l):c.call(d,l.charAt(f),f,l)},o=function(l,c,d){for(var f in l)r.call(l,f)&&(d==null?c(l[f],f,l):c.call(d,l[f],f,l))},s=function(l,c,d){if(!t(c))throw new TypeError("iterator must be a function");var f;arguments.length>=3&&(f=d),e.call(l)==="[object Array]"?n(l,c,f):typeof l=="string"?i(l,c,f):o(l,c,f)};return t0=s,t0}var r0,TA;function Qee(){if(TA)return r0;TA=1;var t=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],e=typeof globalThis>"u"?mo:globalThis;return r0=function(){for(var n=[],i=0;i<t.length;i++)typeof e[t[i]]=="function"&&(n[n.length]=t[i]);return n},r0}var n0,AA;function w3(){if(AA)return n0;AA=1;var t=Zee(),e=Qee(),r=v3(),n=b3(),i=ik(),o=n("Object.prototype.toString"),s=rk()(),a=typeof globalThis>"u"?mo:globalThis,l=e(),c=n("String.prototype.slice"),d=Object.getPrototypeOf,f=n("Array.prototype.indexOf",!0)||function(S,w){for(var T=0;T<S.length;T+=1)if(S[T]===w)return T;return-1},p={__proto__:null};s&&i&&d?t(l,function(b){var S=new a[b];if(Symbol.toStringTag in S){var w=d(S),T=i(w,Symbol.toStringTag);if(!T){var M=d(w);T=i(M,Symbol.toStringTag)}p["$"+b]=r(T.get)}}):t(l,function(b){var S=new a[b],w=S.slice||S.set;w&&(p["$"+b]=r(w))});var m=function(S){var w=!1;return t(p,function(T,M){if(!w)try{"$"+T(S)===M&&(w=c(M,1))}catch{}}),w},g=function(S){var w=!1;return t(p,function(T,M){if(!w)try{T(S),w=c(M,1)}catch{}}),w};return n0=function(S){if(!S||typeof S!="object")return!1;if(!s){var w=c(o(S),8,-1);return f(l,w)>-1?w:w!=="Object"?!1:g(S)}return i?m(S):null},n0}var i0,RA;function ete(){if(RA)return i0;RA=1;var t=w3();return i0=function(r){return!!t(r)},i0}var IA;function tte(){return IA||(IA=1,function(t){var e=Xee(),r=Yee(),n=w3(),i=ete();function o(N){return N.call.bind(N)}var s=typeof BigInt<"u",a=typeof Symbol<"u",l=o(Object.prototype.toString),c=o(Number.prototype.valueOf),d=o(String.prototype.valueOf),f=o(Boolean.prototype.valueOf);if(s)var p=o(BigInt.prototype.valueOf);if(a)var m=o(Symbol.prototype.valueOf);function g(N,Q){if(typeof N!="object")return!1;try{return Q(N),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=i;function b(N){return typeof Promise<"u"&&N instanceof Promise||N!==null&&typeof N=="object"&&typeof N.then=="function"&&typeof N.catch=="function"}t.isPromise=b;function S(N){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(N):i(N)||me(N)}t.isArrayBufferView=S;function w(N){return n(N)==="Uint8Array"}t.isUint8Array=w;function T(N){return n(N)==="Uint8ClampedArray"}t.isUint8ClampedArray=T;function M(N){return n(N)==="Uint16Array"}t.isUint16Array=M;function j(N){return n(N)==="Uint32Array"}t.isUint32Array=j;function $(N){return n(N)==="Int8Array"}t.isInt8Array=$;function W(N){return n(N)==="Int16Array"}t.isInt16Array=W;function Y(N){return n(N)==="Int32Array"}t.isInt32Array=Y;function ee(N){return n(N)==="Float32Array"}t.isFloat32Array=ee;function P(N){return n(N)==="Float64Array"}t.isFloat64Array=P;function fe(N){return n(N)==="BigInt64Array"}t.isBigInt64Array=fe;function de(N){return n(N)==="BigUint64Array"}t.isBigUint64Array=de;function U(N){return l(N)==="[object Map]"}U.working=typeof Map<"u"&&U(new Map);function ne(N){return typeof Map>"u"?!1:U.working?U(N):N instanceof Map}t.isMap=ne;function R(N){return l(N)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function le(N){return typeof Set>"u"?!1:R.working?R(N):N instanceof Set}t.isSet=le;function Ce(N){return l(N)==="[object WeakMap]"}Ce.working=typeof WeakMap<"u"&&Ce(new WeakMap);function he(N){return typeof WeakMap>"u"?!1:Ce.working?Ce(N):N instanceof WeakMap}t.isWeakMap=he;function Fe(N){return l(N)==="[object WeakSet]"}Fe.working=typeof WeakSet<"u"&&Fe(new WeakSet);function ye(N){return Fe(N)}t.isWeakSet=ye;function ze(N){return l(N)==="[object ArrayBuffer]"}ze.working=typeof ArrayBuffer<"u"&&ze(new ArrayBuffer);function ue(N){return typeof ArrayBuffer>"u"?!1:ze.working?ze(N):N instanceof ArrayBuffer}t.isArrayBuffer=ue;function V(N){return l(N)==="[object DataView]"}V.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&V(new DataView(new ArrayBuffer(1),0,1));function me(N){return typeof DataView>"u"?!1:V.working?V(N):N instanceof DataView}t.isDataView=me;var ge=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ke(N){return l(N)==="[object SharedArrayBuffer]"}function ce(N){return typeof ge>"u"?!1:(typeof ke.working>"u"&&(ke.working=ke(new ge)),ke.working?ke(N):N instanceof ge)}t.isSharedArrayBuffer=ce;function L(N){return l(N)==="[object AsyncFunction]"}t.isAsyncFunction=L;function D(N){return l(N)==="[object Map Iterator]"}t.isMapIterator=D;function ae(N){return l(N)==="[object Set Iterator]"}t.isSetIterator=ae;function ie(N){return l(N)==="[object Generator]"}t.isGeneratorObject=ie;function q(N){return l(N)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=q;function Z(N){return g(N,c)}t.isNumberObject=Z;function we(N){return g(N,d)}t.isStringObject=we;function O(N){return g(N,f)}t.isBooleanObject=O;function xe(N){return s&&g(N,p)}t.isBigIntObject=xe;function F(N){return a&&g(N,m)}t.isSymbolObject=F;function k(N){return Z(N)||we(N)||O(N)||xe(N)||F(N)}t.isBoxedPrimitive=k;function _(N){return typeof Uint8Array<"u"&&(ue(N)||ce(N))}t.isAnyArrayBuffer=_,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(N){Object.defineProperty(t,N,{enumerable:!1,value:function(){throw new Error(N+" is not supported in userland")}})})}(Fw)),Fw}var o0,OA;function rte(){return OA||(OA=1,o0=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),o0}var MA;function x3(){return MA||(MA=1,function(t){var e=Object.getOwnPropertyDescriptors||function(me){for(var ge=Object.keys(me),ke={},ce=0;ce<ge.length;ce++)ke[ge[ce]]=Object.getOwnPropertyDescriptor(me,ge[ce]);return ke},r=/%[sdj%]/g;t.format=function(V){if(!$(V)){for(var me=[],ge=0;ge<arguments.length;ge++)me.push(s(arguments[ge]));return me.join(" ")}for(var ge=1,ke=arguments,ce=ke.length,L=String(V).replace(r,function(ae){if(ae==="%%")return"%";if(ge>=ce)return ae;switch(ae){case"%s":return String(ke[ge++]);case"%d":return Number(ke[ge++]);case"%j":try{return JSON.stringify(ke[ge++])}catch{return"[Circular]"}default:return ae}}),D=ke[ge];ge<ce;D=ke[++ge])T(D)||!P(D)?L+=" "+D:L+=" "+s(D);return L},t.deprecate=function(V,me){if(typeof gt<"u"&&gt.noDeprecation===!0)return V;if(typeof gt>"u")return function(){return t.deprecate(V,me).apply(this,arguments)};var ge=!1;function ke(){if(!ge){if(gt.throwDeprecation)throw new Error(me);gt.traceDeprecation?console.trace(me):console.error(me),ge=!0}return V.apply(this,arguments)}return ke};var n={},i=/^$/;if(gt.env.NODE_DEBUG){var o=gt.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}t.debuglog=function(V){if(V=V.toUpperCase(),!n[V])if(i.test(V)){var me=gt.pid;n[V]=function(){var ge=t.format.apply(t,arguments);console.error("%s %d: %s",V,me,ge)}}else n[V]=function(){};return n[V]};function s(V,me){var ge={seen:[],stylize:l};return arguments.length>=3&&(ge.depth=arguments[2]),arguments.length>=4&&(ge.colors=arguments[3]),w(me)?ge.showHidden=me:me&&t._extend(ge,me),Y(ge.showHidden)&&(ge.showHidden=!1),Y(ge.depth)&&(ge.depth=2),Y(ge.colors)&&(ge.colors=!1),Y(ge.customInspect)&&(ge.customInspect=!0),ge.colors&&(ge.stylize=a),d(ge,V,ge.depth)}t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(V,me){var ge=s.styles[me];return ge?"\x1B["+s.colors[ge][0]+"m"+V+"\x1B["+s.colors[ge][1]+"m":V}function l(V,me){return V}function c(V){var me={};return V.forEach(function(ge,ke){me[ge]=!0}),me}function d(V,me,ge){if(V.customInspect&&me&&U(me.inspect)&&me.inspect!==t.inspect&&!(me.constructor&&me.constructor.prototype===me)){var ke=me.inspect(ge,V);return $(ke)||(ke=d(V,ke,ge)),ke}var ce=f(V,me);if(ce)return ce;var L=Object.keys(me),D=c(L);if(V.showHidden&&(L=Object.getOwnPropertyNames(me)),de(me)&&(L.indexOf("message")>=0||L.indexOf("description")>=0))return p(me);if(L.length===0){if(U(me)){var ae=me.name?": "+me.name:"";return V.stylize("[Function"+ae+"]","special")}if(ee(me))return V.stylize(RegExp.prototype.toString.call(me),"regexp");if(fe(me))return V.stylize(Date.prototype.toString.call(me),"date");if(de(me))return p(me)}var ie="",q=!1,Z=["{","}"];if(S(me)&&(q=!0,Z=["[","]"]),U(me)){var we=me.name?": "+me.name:"";ie=" [Function"+we+"]"}if(ee(me)&&(ie=" "+RegExp.prototype.toString.call(me)),fe(me)&&(ie=" "+Date.prototype.toUTCString.call(me)),de(me)&&(ie=" "+p(me)),L.length===0&&(!q||me.length==0))return Z[0]+ie+Z[1];if(ge<0)return ee(me)?V.stylize(RegExp.prototype.toString.call(me),"regexp"):V.stylize("[Object]","special");V.seen.push(me);var O;return q?O=m(V,me,ge,D,L):O=L.map(function(xe){return g(V,me,ge,D,xe,q)}),V.seen.pop(),b(O,ie,Z)}function f(V,me){if(Y(me))return V.stylize("undefined","undefined");if($(me)){var ge="'"+JSON.stringify(me).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return V.stylize(ge,"string")}if(j(me))return V.stylize(""+me,"number");if(w(me))return V.stylize(""+me,"boolean");if(T(me))return V.stylize("null","null")}function p(V){return"["+Error.prototype.toString.call(V)+"]"}function m(V,me,ge,ke,ce){for(var L=[],D=0,ae=me.length;D<ae;++D)Fe(me,String(D))?L.push(g(V,me,ge,ke,String(D),!0)):L.push("");return ce.forEach(function(ie){ie.match(/^\d+$/)||L.push(g(V,me,ge,ke,ie,!0))}),L}function g(V,me,ge,ke,ce,L){var D,ae,ie;if(ie=Object.getOwnPropertyDescriptor(me,ce)||{value:me[ce]},ie.get?ie.set?ae=V.stylize("[Getter/Setter]","special"):ae=V.stylize("[Getter]","special"):ie.set&&(ae=V.stylize("[Setter]","special")),Fe(ke,ce)||(D="["+ce+"]"),ae||(V.seen.indexOf(ie.value)<0?(T(ge)?ae=d(V,ie.value,null):ae=d(V,ie.value,ge-1),ae.indexOf(`
291
+ `)>-1&&(L?ae=ae.split(`
292
+ `).map(function(q){return" "+q}).join(`
293
+ `).slice(2):ae=`
294
+ `+ae.split(`
295
+ `).map(function(q){return" "+q}).join(`
296
+ `))):ae=V.stylize("[Circular]","special")),Y(D)){if(L&&ce.match(/^\d+$/))return ae;D=JSON.stringify(""+ce),D.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(D=D.slice(1,-1),D=V.stylize(D,"name")):(D=D.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),D=V.stylize(D,"string"))}return D+": "+ae}function b(V,me,ge){var ke=V.reduce(function(ce,L){return L.indexOf(`
297
+ `)>=0,ce+L.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ke>60?ge[0]+(me===""?"":me+`
298
+ `)+" "+V.join(`,
299
+ `)+" "+ge[1]:ge[0]+me+" "+V.join(", ")+" "+ge[1]}t.types=tte();function S(V){return Array.isArray(V)}t.isArray=S;function w(V){return typeof V=="boolean"}t.isBoolean=w;function T(V){return V===null}t.isNull=T;function M(V){return V==null}t.isNullOrUndefined=M;function j(V){return typeof V=="number"}t.isNumber=j;function $(V){return typeof V=="string"}t.isString=$;function W(V){return typeof V=="symbol"}t.isSymbol=W;function Y(V){return V===void 0}t.isUndefined=Y;function ee(V){return P(V)&&R(V)==="[object RegExp]"}t.isRegExp=ee,t.types.isRegExp=ee;function P(V){return typeof V=="object"&&V!==null}t.isObject=P;function fe(V){return P(V)&&R(V)==="[object Date]"}t.isDate=fe,t.types.isDate=fe;function de(V){return P(V)&&(R(V)==="[object Error]"||V instanceof Error)}t.isError=de,t.types.isNativeError=de;function U(V){return typeof V=="function"}t.isFunction=U;function ne(V){return V===null||typeof V=="boolean"||typeof V=="number"||typeof V=="string"||typeof V=="symbol"||typeof V>"u"}t.isPrimitive=ne,t.isBuffer=rte();function R(V){return Object.prototype.toString.call(V)}function le(V){return V<10?"0"+V.toString(10):V.toString(10)}var Ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function he(){var V=new Date,me=[le(V.getHours()),le(V.getMinutes()),le(V.getSeconds())].join(":");return[V.getDate(),Ce[V.getMonth()],me].join(" ")}t.log=function(){console.log("%s - %s",he(),t.format.apply(t,arguments))},t.inherits=dc,t._extend=function(V,me){if(!me||!P(me))return V;for(var ge=Object.keys(me),ke=ge.length;ke--;)V[ge[ke]]=me[ge[ke]];return V};function Fe(V,me){return Object.prototype.hasOwnProperty.call(V,me)}var ye=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(me){if(typeof me!="function")throw new TypeError('The "original" argument must be of type Function');if(ye&&me[ye]){var ge=me[ye];if(typeof ge!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ge,ye,{value:ge,enumerable:!1,writable:!1,configurable:!0}),ge}function ge(){for(var ke,ce,L=new Promise(function(ie,q){ke=ie,ce=q}),D=[],ae=0;ae<arguments.length;ae++)D.push(arguments[ae]);D.push(function(ie,q){ie?ce(ie):ke(q)});try{me.apply(this,D)}catch(ie){ce(ie)}return L}return Object.setPrototypeOf(ge,Object.getPrototypeOf(me)),ye&&Object.defineProperty(ge,ye,{value:ge,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ge,e(me))},t.promisify.custom=ye;function ze(V,me){if(!V){var ge=new Error("Promise was rejected with a falsy value");ge.reason=V,V=ge}return me(V)}function ue(V){if(typeof V!="function")throw new TypeError('The "original" argument must be of type Function');function me(){for(var ge=[],ke=0;ke<arguments.length;ke++)ge.push(arguments[ke]);var ce=ge.pop();if(typeof ce!="function")throw new TypeError("The last argument must be of type Function");var L=this,D=function(){return ce.apply(L,arguments)};V.apply(this,ge).then(function(ae){gt.nextTick(D.bind(null,null,ae))},function(ae){gt.nextTick(ze.bind(null,ae,D))})}return Object.setPrototypeOf(me,Object.getPrototypeOf(V)),Object.defineProperties(me,e(V)),me}t.callbackify=ue}(Lw)),Lw}var s0,NA;function nte(){if(NA)return s0;NA=1;function t(p,m){var g=Object.keys(p);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(p);m&&(b=b.filter(function(S){return Object.getOwnPropertyDescriptor(p,S).enumerable})),g.push.apply(g,b)}return g}function e(p){for(var m=1;m<arguments.length;m++){var g=arguments[m]!=null?arguments[m]:{};m%2?t(Object(g),!0).forEach(function(b){r(p,b,g[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(g)):t(Object(g)).forEach(function(b){Object.defineProperty(p,b,Object.getOwnPropertyDescriptor(g,b))})}return p}function r(p,m,g){return m in p?Object.defineProperty(p,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[m]=g,p}function n(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function i(p,m){for(var g=0;g<m.length;g++){var b=m[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}function o(p,m,g){return m&&i(p.prototype,m),p}var s=dv(),a=s.Buffer,l=x3(),c=l.inspect,d=c&&c.custom||"inspect";function f(p,m,g){a.prototype.copy.call(p,m,g)}return s0=function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return o(p,[{key:"push",value:function(g){var b={data:g,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(g){var b={data:g,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var b=this.head,S=""+b.data;b=b.next;)S+=g+b.data;return S}},{key:"concat",value:function(g){if(this.length===0)return a.alloc(0);for(var b=a.allocUnsafe(g>>>0),S=this.head,w=0;S;)f(S.data,b,w),w+=S.data.length,S=S.next;return b}},{key:"consume",value:function(g,b){var S;return g<this.head.data.length?(S=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?S=this.shift():S=b?this._getString(g):this._getBuffer(g),S}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var b=this.head,S=1,w=b.data;for(g-=w.length;b=b.next;){var T=b.data,M=g>T.length?T.length:g;if(M===T.length?w+=T:w+=T.slice(0,g),g-=M,g===0){M===T.length?(++S,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=T.slice(M));break}++S}return this.length-=S,w}},{key:"_getBuffer",value:function(g){var b=a.allocUnsafe(g),S=this.head,w=1;for(S.data.copy(b),g-=S.data.length;S=S.next;){var T=S.data,M=g>T.length?T.length:g;if(T.copy(b,b.length-g,0,M),g-=M,g===0){M===T.length?(++w,S.next?this.head=S.next:this.head=this.tail=null):(this.head=S,S.data=T.slice(M));break}++w}return this.length-=w,b}},{key:d,value:function(g,b){return c(this,e({},b,{depth:0,customInspect:!1}))}}]),p}(),s0}var a0,DA;function S3(){if(DA)return a0;DA=1;function t(s,a){var l=this,c=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return c||d?(a?a(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,gt.nextTick(i,this,s)):gt.nextTick(i,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(f){!a&&f?l._writableState?l._writableState.errorEmitted?gt.nextTick(r,l):(l._writableState.errorEmitted=!0,gt.nextTick(e,l,f)):gt.nextTick(e,l,f):a?(gt.nextTick(r,l),a(f)):gt.nextTick(r,l)}),this)}function e(s,a){i(s,a),r(s)}function r(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(s,a){s.emit("error",a)}function o(s,a){var l=s._readableState,c=s._writableState;l&&l.autoDestroy||c&&c.autoDestroy?s.destroy(a):s.emit("error",a)}return a0={destroy:t,undestroy:n,errorOrDestroy:o},a0}var l0={},PA;function Od(){if(PA)return l0;PA=1;function t(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,a.__proto__=l}var e={};function r(a,l,c){c||(c=Error);function d(p,m,g){return typeof l=="string"?l:l(p,m,g)}var f=function(p){t(m,p);function m(g,b,S){return p.call(this,d(g,b,S))||this}return m}(c);f.prototype.name=c.name,f.prototype.code=a,e[a]=f}function n(a,l){if(Array.isArray(a)){var c=a.length;return a=a.map(function(d){return String(d)}),c>2?"one of ".concat(l," ").concat(a.slice(0,c-1).join(", "),", or ")+a[c-1]:c===2?"one of ".concat(l," ").concat(a[0]," or ").concat(a[1]):"of ".concat(l," ").concat(a[0])}else return"of ".concat(l," ").concat(String(a))}function i(a,l,c){return a.substr(0,l.length)===l}function o(a,l,c){return(c===void 0||c>a.length)&&(c=a.length),a.substring(c-l.length,c)===l}function s(a,l,c){return typeof c!="number"&&(c=0),c+l.length>a.length?!1:a.indexOf(l,c)!==-1}return r("ERR_INVALID_OPT_VALUE",function(a,l){return'The value "'+l+'" is invalid for option "'+a+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(a,l,c){var d;typeof l=="string"&&i(l,"not ")?(d="must not be",l=l.replace(/^not /,"")):d="must be";var f;if(o(a," argument"))f="The ".concat(a," ").concat(d," ").concat(n(l,"type"));else{var p=s(a,".")?"property":"argument";f='The "'.concat(a,'" ').concat(p," ").concat(d," ").concat(n(l,"type"))}return f+=". Received type ".concat(typeof c),f},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),l0.codes=e,l0}var c0,LA;function k3(){if(LA)return c0;LA=1;var t=Od().codes.ERR_INVALID_OPT_VALUE;function e(n,i,o){return n.highWaterMark!=null?n.highWaterMark:i?n[o]:null}function r(n,i,o,s){var a=e(i,s,o);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var l=s?o:"highWaterMark";throw new t(l,a)}return Math.floor(a)}return n.objectMode?16:16*1024}return c0={getHighWaterMark:r},c0}var u0,FA;function ite(){if(FA)return u0;FA=1,u0=t;function t(r,n){if(e("noDeprecation"))return r;var i=!1;function o(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return r.apply(this,arguments)}return o}function e(r){try{if(!mo.localStorage)return!1}catch{return!1}var n=mo.localStorage[r];return n==null?!1:String(n).toLowerCase()==="true"}return u0}var d0,jA;function _3(){if(jA)return d0;jA=1,d0=ee;function t(ce){var L=this;this.next=null,this.entry=null,this.finish=function(){ke(L,ce)}}var e;ee.WritableState=W;var r={deprecate:ite()},n=m3(),i=dv().Buffer,o=mo.Uint8Array||function(){};function s(ce){return i.from(ce)}function a(ce){return i.isBuffer(ce)||ce instanceof o}var l=S3(),c=k3(),d=c.getHighWaterMark,f=Od().codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,b=f.ERR_STREAM_CANNOT_PIPE,S=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,T=f.ERR_STREAM_WRITE_AFTER_END,M=f.ERR_UNKNOWN_ENCODING,j=l.errorOrDestroy;dc(ee,n);function $(){}function W(ce,L,D){e=e||hd(),ce=ce||{},typeof D!="boolean"&&(D=L instanceof e),this.objectMode=!!ce.objectMode,D&&(this.objectMode=this.objectMode||!!ce.writableObjectMode),this.highWaterMark=d(this,ce,"writableHighWaterMark",D),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ae=ce.decodeStrings===!1;this.decodeStrings=!ae,this.defaultEncoding=ce.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){Ce(L,ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ce.emitClose!==!1,this.autoDestroy=!!ce.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}W.prototype.getBuffer=function(){for(var L=this.bufferedRequest,D=[];L;)D.push(L),L=L.next;return D},function(){try{Object.defineProperty(W.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Y;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Y=Function.prototype[Symbol.hasInstance],Object.defineProperty(ee,Symbol.hasInstance,{value:function(L){return Y.call(this,L)?!0:this!==ee?!1:L&&L._writableState instanceof W}})):Y=function(L){return L instanceof this};function ee(ce){e=e||hd();var L=this instanceof e;if(!L&&!Y.call(ee,this))return new ee(ce);this._writableState=new W(ce,this,L),this.writable=!0,ce&&(typeof ce.write=="function"&&(this._write=ce.write),typeof ce.writev=="function"&&(this._writev=ce.writev),typeof ce.destroy=="function"&&(this._destroy=ce.destroy),typeof ce.final=="function"&&(this._final=ce.final)),n.call(this)}ee.prototype.pipe=function(){j(this,new b)};function P(ce,L){var D=new T;j(ce,D),gt.nextTick(L,D)}function fe(ce,L,D,ae){var ie;return D===null?ie=new w:typeof D!="string"&&!L.objectMode&&(ie=new p("chunk",["string","Buffer"],D)),ie?(j(ce,ie),gt.nextTick(ae,ie),!1):!0}ee.prototype.write=function(ce,L,D){var ae=this._writableState,ie=!1,q=!ae.objectMode&&a(ce);return q&&!i.isBuffer(ce)&&(ce=s(ce)),typeof L=="function"&&(D=L,L=null),q?L="buffer":L||(L=ae.defaultEncoding),typeof D!="function"&&(D=$),ae.ending?P(this,D):(q||fe(this,ae,ce,D))&&(ae.pendingcb++,ie=U(this,ae,q,ce,L,D)),ie},ee.prototype.cork=function(){this._writableState.corked++},ee.prototype.uncork=function(){var ce=this._writableState;ce.corked&&(ce.corked--,!ce.writing&&!ce.corked&&!ce.bufferProcessing&&ce.bufferedRequest&&ye(this,ce))},ee.prototype.setDefaultEncoding=function(L){if(typeof L=="string"&&(L=L.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((L+"").toLowerCase())>-1))throw new M(L);return this._writableState.defaultEncoding=L,this},Object.defineProperty(ee.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function de(ce,L,D){return!ce.objectMode&&ce.decodeStrings!==!1&&typeof L=="string"&&(L=i.from(L,D)),L}Object.defineProperty(ee.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function U(ce,L,D,ae,ie,q){if(!D){var Z=de(L,ae,ie);ae!==Z&&(D=!0,ie="buffer",ae=Z)}var we=L.objectMode?1:ae.length;L.length+=we;var O=L.length<L.highWaterMark;if(O||(L.needDrain=!0),L.writing||L.corked){var xe=L.lastBufferedRequest;L.lastBufferedRequest={chunk:ae,encoding:ie,isBuf:D,callback:q,next:null},xe?xe.next=L.lastBufferedRequest:L.bufferedRequest=L.lastBufferedRequest,L.bufferedRequestCount+=1}else ne(ce,L,!1,we,ae,ie,q);return O}function ne(ce,L,D,ae,ie,q,Z){L.writelen=ae,L.writecb=Z,L.writing=!0,L.sync=!0,L.destroyed?L.onwrite(new S("write")):D?ce._writev(ie,L.onwrite):ce._write(ie,q,L.onwrite),L.sync=!1}function R(ce,L,D,ae,ie){--L.pendingcb,D?(gt.nextTick(ie,ae),gt.nextTick(me,ce,L),ce._writableState.errorEmitted=!0,j(ce,ae)):(ie(ae),ce._writableState.errorEmitted=!0,j(ce,ae),me(ce,L))}function le(ce){ce.writing=!1,ce.writecb=null,ce.length-=ce.writelen,ce.writelen=0}function Ce(ce,L){var D=ce._writableState,ae=D.sync,ie=D.writecb;if(typeof ie!="function")throw new g;if(le(D),L)R(ce,D,ae,L,ie);else{var q=ze(D)||ce.destroyed;!q&&!D.corked&&!D.bufferProcessing&&D.bufferedRequest&&ye(ce,D),ae?gt.nextTick(he,ce,D,q,ie):he(ce,D,q,ie)}}function he(ce,L,D,ae){D||Fe(ce,L),L.pendingcb--,ae(),me(ce,L)}function Fe(ce,L){L.length===0&&L.needDrain&&(L.needDrain=!1,ce.emit("drain"))}function ye(ce,L){L.bufferProcessing=!0;var D=L.bufferedRequest;if(ce._writev&&D&&D.next){var ae=L.bufferedRequestCount,ie=new Array(ae),q=L.corkedRequestsFree;q.entry=D;for(var Z=0,we=!0;D;)ie[Z]=D,D.isBuf||(we=!1),D=D.next,Z+=1;ie.allBuffers=we,ne(ce,L,!0,L.length,ie,"",q.finish),L.pendingcb++,L.lastBufferedRequest=null,q.next?(L.corkedRequestsFree=q.next,q.next=null):L.corkedRequestsFree=new t(L),L.bufferedRequestCount=0}else{for(;D;){var O=D.chunk,xe=D.encoding,F=D.callback,k=L.objectMode?1:O.length;if(ne(ce,L,!1,k,O,xe,F),D=D.next,L.bufferedRequestCount--,L.writing)break}D===null&&(L.lastBufferedRequest=null)}L.bufferedRequest=D,L.bufferProcessing=!1}ee.prototype._write=function(ce,L,D){D(new m("_write()"))},ee.prototype._writev=null,ee.prototype.end=function(ce,L,D){var ae=this._writableState;return typeof ce=="function"?(D=ce,ce=null,L=null):typeof L=="function"&&(D=L,L=null),ce!=null&&this.write(ce,L),ae.corked&&(ae.corked=1,this.uncork()),ae.ending||ge(this,ae,D),this},Object.defineProperty(ee.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ze(ce){return ce.ending&&ce.length===0&&ce.bufferedRequest===null&&!ce.finished&&!ce.writing}function ue(ce,L){ce._final(function(D){L.pendingcb--,D&&j(ce,D),L.prefinished=!0,ce.emit("prefinish"),me(ce,L)})}function V(ce,L){!L.prefinished&&!L.finalCalled&&(typeof ce._final=="function"&&!L.destroyed?(L.pendingcb++,L.finalCalled=!0,gt.nextTick(ue,ce,L)):(L.prefinished=!0,ce.emit("prefinish")))}function me(ce,L){var D=ze(L);if(D&&(V(ce,L),L.pendingcb===0&&(L.finished=!0,ce.emit("finish"),L.autoDestroy))){var ae=ce._readableState;(!ae||ae.autoDestroy&&ae.endEmitted)&&ce.destroy()}return D}function ge(ce,L,D){L.ending=!0,me(ce,L),D&&(L.finished?gt.nextTick(D):ce.once("finish",D)),L.ended=!0,ce.writable=!1}function ke(ce,L,D){var ae=ce.entry;for(ce.entry=null;ae;){var ie=ae.callback;L.pendingcb--,ie(D),ae=ae.next}L.corkedRequestsFree.next=ce}return Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(L){this._writableState&&(this._writableState.destroyed=L)}}),ee.prototype.destroy=l.destroy,ee.prototype._undestroy=l.undestroy,ee.prototype._destroy=function(ce,L){L(ce)},d0}var f0,BA;function hd(){if(BA)return f0;BA=1;var t=Object.keys||function(c){var d=[];for(var f in c)d.push(f);return d};f0=s;var e=E3(),r=_3();dc(s,e);for(var n=t(r.prototype),i=0;i<n.length;i++){var o=n[i];s.prototype[o]||(s.prototype[o]=r.prototype[o])}function s(c){if(!(this instanceof s))return new s(c);e.call(this,c),r.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||gt.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),f0}var h0={},bm={exports:{}},zA;function ote(){return zA||(zA=1,function(t,e){var r=dv(),n=r.Buffer;function i(s,a){for(var l in s)a[l]=s[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=o);function o(s,a,l){return n(s,a,l)}i(n,o),o.from=function(s,a,l){if(typeof s=="number")throw new TypeError("Argument must not be a number");return n(s,a,l)},o.alloc=function(s,a,l){if(typeof s!="number")throw new TypeError("Argument must be a number");var c=n(s);return a!==void 0?typeof l=="string"?c.fill(a,l):c.fill(a):c.fill(0),c},o.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n(s)},o.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(s)}}(bm,bm.exports)),bm.exports}var HA;function p1(){if(HA)return h0;HA=1;var t=ote().Buffer,e=t.isEncoding||function(w){switch(w=""+w,w&&w.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(w){if(!w)return"utf8";for(var T;;)switch(w){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return w;default:if(T)return;w=(""+w).toLowerCase(),T=!0}}function n(w){var T=r(w);if(typeof T!="string"&&(t.isEncoding===e||!e(w)))throw new Error("Unknown encoding: "+w);return T||w}h0.StringDecoder=i;function i(w){this.encoding=n(w);var T;switch(this.encoding){case"utf16le":this.text=f,this.end=p,T=4;break;case"utf8":this.fillLast=l,T=4;break;case"base64":this.text=m,this.end=g,T=3;break;default:this.write=b,this.end=S;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(T)}i.prototype.write=function(w){if(w.length===0)return"";var T,M;if(this.lastNeed){if(T=this.fillLast(w),T===void 0)return"";M=this.lastNeed,this.lastNeed=0}else M=0;return M<w.length?T?T+this.text(w,M):this.text(w,M):T||""},i.prototype.end=d,i.prototype.text=c,i.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length};function o(w){return w<=127?0:w>>5===6?2:w>>4===14?3:w>>3===30?4:w>>6===2?-1:-2}function s(w,T,M){var j=T.length-1;if(j<M)return 0;var $=o(T[j]);return $>=0?($>0&&(w.lastNeed=$-1),$):--j<M||$===-2?0:($=o(T[j]),$>=0?($>0&&(w.lastNeed=$-2),$):--j<M||$===-2?0:($=o(T[j]),$>=0?($>0&&($===2?$=0:w.lastNeed=$-3),$):0))}function a(w,T,M){if((T[0]&192)!==128)return w.lastNeed=0,"�";if(w.lastNeed>1&&T.length>1){if((T[1]&192)!==128)return w.lastNeed=1,"�";if(w.lastNeed>2&&T.length>2&&(T[2]&192)!==128)return w.lastNeed=2,"�"}}function l(w){var T=this.lastTotal-this.lastNeed,M=a(this,w);if(M!==void 0)return M;if(this.lastNeed<=w.length)return w.copy(this.lastChar,T,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,T,0,w.length),this.lastNeed-=w.length}function c(w,T){var M=s(this,w,T);if(!this.lastNeed)return w.toString("utf8",T);this.lastTotal=M;var j=w.length-(M-this.lastNeed);return w.copy(this.lastChar,0,j),w.toString("utf8",T,j)}function d(w){var T=w&&w.length?this.write(w):"";return this.lastNeed?T+"�":T}function f(w,T){if((w.length-T)%2===0){var M=w.toString("utf16le",T);if(M){var j=M.charCodeAt(M.length-1);if(j>=55296&&j<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],M.slice(0,-1)}return M}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",T,w.length-1)}function p(w){var T=w&&w.length?this.write(w):"";if(this.lastNeed){var M=this.lastTotal-this.lastNeed;return T+this.lastChar.toString("utf16le",0,M)}return T}function m(w,T){var M=(w.length-T)%3;return M===0?w.toString("base64",T):(this.lastNeed=3-M,this.lastTotal=3,M===1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",T,w.length-M))}function g(w){var T=w&&w.length?this.write(w):"";return this.lastNeed?T+this.lastChar.toString("base64",0,3-this.lastNeed):T}function b(w){return w.toString(this.encoding)}function S(w){return w&&w.length?this.write(w):""}return h0}var p0,$A;function ok(){if($A)return p0;$A=1;var t=Od().codes.ERR_STREAM_PREMATURE_CLOSE;function e(o){var s=!1;return function(){if(!s){s=!0;for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];o.apply(this,l)}}}function r(){}function n(o){return o.setHeader&&typeof o.abort=="function"}function i(o,s,a){if(typeof s=="function")return i(o,null,s);s||(s={}),a=e(a||r);var l=s.readable||s.readable!==!1&&o.readable,c=s.writable||s.writable!==!1&&o.writable,d=function(){o.writable||p()},f=o._writableState&&o._writableState.finished,p=function(){c=!1,f=!0,l||a.call(o)},m=o._readableState&&o._readableState.endEmitted,g=function(){l=!1,m=!0,c||a.call(o)},b=function(M){a.call(o,M)},S=function(){var M;if(l&&!m)return(!o._readableState||!o._readableState.ended)&&(M=new t),a.call(o,M);if(c&&!f)return(!o._writableState||!o._writableState.ended)&&(M=new t),a.call(o,M)},w=function(){o.req.on("finish",p)};return n(o)?(o.on("complete",p),o.on("abort",S),o.req?w():o.on("request",w)):c&&!o._writableState&&(o.on("end",d),o.on("close",d)),o.on("end",g),o.on("finish",p),s.error!==!1&&o.on("error",b),o.on("close",S),function(){o.removeListener("complete",p),o.removeListener("abort",S),o.removeListener("request",w),o.req&&o.req.removeListener("finish",p),o.removeListener("end",d),o.removeListener("close",d),o.removeListener("finish",p),o.removeListener("end",g),o.removeListener("error",b),o.removeListener("close",S)}}return p0=i,p0}var m0,UA;function ste(){if(UA)return m0;UA=1;var t;function e(w,T,M){return T in w?Object.defineProperty(w,T,{value:M,enumerable:!0,configurable:!0,writable:!0}):w[T]=M,w}var r=ok(),n=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),a=Symbol("lastPromise"),l=Symbol("handlePromise"),c=Symbol("stream");function d(w,T){return{value:w,done:T}}function f(w){var T=w[n];if(T!==null){var M=w[c].read();M!==null&&(w[a]=null,w[n]=null,w[i]=null,T(d(M,!1)))}}function p(w){gt.nextTick(f,w)}function m(w,T){return function(M,j){w.then(function(){if(T[s]){M(d(void 0,!0));return}T[l](M,j)},j)}}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((t={get stream(){return this[c]},next:function(){var T=this,M=this[o];if(M!==null)return Promise.reject(M);if(this[s])return Promise.resolve(d(void 0,!0));if(this[c].destroyed)return new Promise(function(Y,ee){gt.nextTick(function(){T[o]?ee(T[o]):Y(d(void 0,!0))})});var j=this[a],$;if(j)$=new Promise(m(j,this));else{var W=this[c].read();if(W!==null)return Promise.resolve(d(W,!1));$=new Promise(this[l])}return this[a]=$,$}},e(t,Symbol.asyncIterator,function(){return this}),e(t,"return",function(){var T=this;return new Promise(function(M,j){T[c].destroy(null,function($){if($){j($);return}M(d(void 0,!0))})})}),t),g),S=function(T){var M,j=Object.create(b,(M={},e(M,c,{value:T,writable:!0}),e(M,n,{value:null,writable:!0}),e(M,i,{value:null,writable:!0}),e(M,o,{value:null,writable:!0}),e(M,s,{value:T._readableState.endEmitted,writable:!0}),e(M,l,{value:function(W,Y){var ee=j[c].read();ee?(j[a]=null,j[n]=null,j[i]=null,W(d(ee,!1))):(j[n]=W,j[i]=Y)},writable:!0}),M));return j[a]=null,r(T,function($){if($&&$.code!=="ERR_STREAM_PREMATURE_CLOSE"){var W=j[i];W!==null&&(j[a]=null,j[n]=null,j[i]=null,W($)),j[o]=$;return}var Y=j[n];Y!==null&&(j[a]=null,j[n]=null,j[i]=null,Y(d(void 0,!0))),j[s]=!0}),T.on("readable",p.bind(null,j)),j};return m0=S,m0}var g0,WA;function ate(){return WA||(WA=1,g0=function(){throw new Error("Readable.from is not available in the browser")}),g0}var y0,VA;function E3(){if(VA)return y0;VA=1,y0=P;var t;P.ReadableState=ee,tk.EventEmitter;var e=function(Z,we){return Z.listeners(we).length},r=m3(),n=dv().Buffer,i=mo.Uint8Array||function(){};function o(q){return n.from(q)}function s(q){return n.isBuffer(q)||q instanceof i}var a=x3(),l;a&&a.debuglog?l=a.debuglog("stream"):l=function(){};var c=nte(),d=S3(),f=k3(),p=f.getHighWaterMark,m=Od().codes,g=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,S=m.ERR_METHOD_NOT_IMPLEMENTED,w=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,T,M,j;dc(P,r);var $=d.errorOrDestroy,W=["error","close","destroy","pause","resume"];function Y(q,Z,we){if(typeof q.prependListener=="function")return q.prependListener(Z,we);!q._events||!q._events[Z]?q.on(Z,we):Array.isArray(q._events[Z])?q._events[Z].unshift(we):q._events[Z]=[we,q._events[Z]]}function ee(q,Z,we){t=t||hd(),q=q||{},typeof we!="boolean"&&(we=Z instanceof t),this.objectMode=!!q.objectMode,we&&(this.objectMode=this.objectMode||!!q.readableObjectMode),this.highWaterMark=p(this,q,"readableHighWaterMark",we),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=q.emitClose!==!1,this.autoDestroy=!!q.autoDestroy,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(T||(T=p1().StringDecoder),this.decoder=new T(q.encoding),this.encoding=q.encoding)}function P(q){if(t=t||hd(),!(this instanceof P))return new P(q);var Z=this instanceof t;this._readableState=new ee(q,this,Z),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),r.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Z){this._readableState&&(this._readableState.destroyed=Z)}}),P.prototype.destroy=d.destroy,P.prototype._undestroy=d.undestroy,P.prototype._destroy=function(q,Z){Z(q)},P.prototype.push=function(q,Z){var we=this._readableState,O;return we.objectMode?O=!0:typeof q=="string"&&(Z=Z||we.defaultEncoding,Z!==we.encoding&&(q=n.from(q,Z),Z=""),O=!0),fe(this,q,Z,!1,O)},P.prototype.unshift=function(q){return fe(this,q,null,!0,!1)};function fe(q,Z,we,O,xe){l("readableAddChunk",Z);var F=q._readableState;if(Z===null)F.reading=!1,Ce(q,F);else{var k;if(xe||(k=U(F,Z)),k)$(q,k);else if(F.objectMode||Z&&Z.length>0)if(typeof Z!="string"&&!F.objectMode&&Object.getPrototypeOf(Z)!==n.prototype&&(Z=o(Z)),O)F.endEmitted?$(q,new w):de(q,F,Z,!0);else if(F.ended)$(q,new b);else{if(F.destroyed)return!1;F.reading=!1,F.decoder&&!we?(Z=F.decoder.write(Z),F.objectMode||Z.length!==0?de(q,F,Z,!1):ye(q,F)):de(q,F,Z,!1)}else O||(F.reading=!1,ye(q,F))}return!F.ended&&(F.length<F.highWaterMark||F.length===0)}function de(q,Z,we,O){Z.flowing&&Z.length===0&&!Z.sync?(Z.awaitDrain=0,q.emit("data",we)):(Z.length+=Z.objectMode?1:we.length,O?Z.buffer.unshift(we):Z.buffer.push(we),Z.needReadable&&he(q)),ye(q,Z)}function U(q,Z){var we;return!s(Z)&&typeof Z!="string"&&Z!==void 0&&!q.objectMode&&(we=new g("chunk",["string","Buffer","Uint8Array"],Z)),we}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(q){T||(T=p1().StringDecoder);var Z=new T(q);this._readableState.decoder=Z,this._readableState.encoding=this._readableState.decoder.encoding;for(var we=this._readableState.buffer.head,O="";we!==null;)O+=Z.write(we.data),we=we.next;return this._readableState.buffer.clear(),O!==""&&this._readableState.buffer.push(O),this._readableState.length=O.length,this};var ne=1073741824;function R(q){return q>=ne?q=ne:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function le(q,Z){return q<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:q!==q?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:(q>Z.highWaterMark&&(Z.highWaterMark=R(q)),q<=Z.length?q:Z.ended?Z.length:(Z.needReadable=!0,0))}P.prototype.read=function(q){l("read",q),q=parseInt(q,10);var Z=this._readableState,we=q;if(q!==0&&(Z.emittedReadable=!1),q===0&&Z.needReadable&&((Z.highWaterMark!==0?Z.length>=Z.highWaterMark:Z.length>0)||Z.ended))return l("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?D(this):he(this),null;if(q=le(q,Z),q===0&&Z.ended)return Z.length===0&&D(this),null;var O=Z.needReadable;l("need readable",O),(Z.length===0||Z.length-q<Z.highWaterMark)&&(O=!0,l("length less than watermark",O)),Z.ended||Z.reading?(O=!1,l("reading or ended",O)):O&&(l("do read"),Z.reading=!0,Z.sync=!0,Z.length===0&&(Z.needReadable=!0),this._read(Z.highWaterMark),Z.sync=!1,Z.reading||(q=le(we,Z)));var xe;return q>0?xe=L(q,Z):xe=null,xe===null?(Z.needReadable=Z.length<=Z.highWaterMark,q=0):(Z.length-=q,Z.awaitDrain=0),Z.length===0&&(Z.ended||(Z.needReadable=!0),we!==q&&Z.ended&&D(this)),xe!==null&&this.emit("data",xe),xe};function Ce(q,Z){if(l("onEofChunk"),!Z.ended){if(Z.decoder){var we=Z.decoder.end();we&&we.length&&(Z.buffer.push(we),Z.length+=Z.objectMode?1:we.length)}Z.ended=!0,Z.sync?he(q):(Z.needReadable=!1,Z.emittedReadable||(Z.emittedReadable=!0,Fe(q)))}}function he(q){var Z=q._readableState;l("emitReadable",Z.needReadable,Z.emittedReadable),Z.needReadable=!1,Z.emittedReadable||(l("emitReadable",Z.flowing),Z.emittedReadable=!0,gt.nextTick(Fe,q))}function Fe(q){var Z=q._readableState;l("emitReadable_",Z.destroyed,Z.length,Z.ended),!Z.destroyed&&(Z.length||Z.ended)&&(q.emit("readable"),Z.emittedReadable=!1),Z.needReadable=!Z.flowing&&!Z.ended&&Z.length<=Z.highWaterMark,ce(q)}function ye(q,Z){Z.readingMore||(Z.readingMore=!0,gt.nextTick(ze,q,Z))}function ze(q,Z){for(;!Z.reading&&!Z.ended&&(Z.length<Z.highWaterMark||Z.flowing&&Z.length===0);){var we=Z.length;if(l("maybeReadMore read 0"),q.read(0),we===Z.length)break}Z.readingMore=!1}P.prototype._read=function(q){$(this,new S("_read()"))},P.prototype.pipe=function(q,Z){var we=this,O=this._readableState;switch(O.pipesCount){case 0:O.pipes=q;break;case 1:O.pipes=[O.pipes,q];break;default:O.pipes.push(q);break}O.pipesCount+=1,l("pipe count=%d opts=%j",O.pipesCount,Z);var xe=(!Z||Z.end!==!1)&&q!==gt.stdout&&q!==gt.stderr,F=xe?_:We;O.endEmitted?gt.nextTick(F):we.once("end",F),q.on("unpipe",k);function k(Je,Ye){l("onunpipe"),Je===we&&Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,pe())}function _(){l("onend"),q.end()}var N=ue(we);q.on("drain",N);var Q=!1;function pe(){l("cleanup"),q.removeListener("close",Ne),q.removeListener("finish",De),q.removeListener("drain",N),q.removeListener("error",Re),q.removeListener("unpipe",k),we.removeListener("end",_),we.removeListener("end",We),we.removeListener("data",oe),Q=!0,O.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&N()}we.on("data",oe);function oe(Je){l("ondata");var Ye=q.write(Je);l("dest.write",Ye),Ye===!1&&((O.pipesCount===1&&O.pipes===q||O.pipesCount>1&&ie(O.pipes,q)!==-1)&&!Q&&(l("false write response, pause",O.awaitDrain),O.awaitDrain++),we.pause())}function Re(Je){l("onerror",Je),We(),q.removeListener("error",Re),e(q,"error")===0&&$(q,Je)}Y(q,"error",Re);function Ne(){q.removeListener("finish",De),We()}q.once("close",Ne);function De(){l("onfinish"),q.removeListener("close",Ne),We()}q.once("finish",De);function We(){l("unpipe"),we.unpipe(q)}return q.emit("pipe",we),O.flowing||(l("pipe resume"),we.resume()),q};function ue(q){return function(){var we=q._readableState;l("pipeOnDrain",we.awaitDrain),we.awaitDrain&&we.awaitDrain--,we.awaitDrain===0&&e(q,"data")&&(we.flowing=!0,ce(q))}}P.prototype.unpipe=function(q){var Z=this._readableState,we={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return q&&q!==Z.pipes?this:(q||(q=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,q&&q.emit("unpipe",this,we),this);if(!q){var O=Z.pipes,xe=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var F=0;F<xe;F++)O[F].emit("unpipe",this,{hasUnpiped:!1});return this}var k=ie(Z.pipes,q);return k===-1?this:(Z.pipes.splice(k,1),Z.pipesCount-=1,Z.pipesCount===1&&(Z.pipes=Z.pipes[0]),q.emit("unpipe",this,we),this)},P.prototype.on=function(q,Z){var we=r.prototype.on.call(this,q,Z),O=this._readableState;return q==="data"?(O.readableListening=this.listenerCount("readable")>0,O.flowing!==!1&&this.resume()):q==="readable"&&!O.endEmitted&&!O.readableListening&&(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,l("on readable",O.length,O.reading),O.length?he(this):O.reading||gt.nextTick(me,this)),we},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(q,Z){var we=r.prototype.removeListener.call(this,q,Z);return q==="readable"&&gt.nextTick(V,this),we},P.prototype.removeAllListeners=function(q){var Z=r.prototype.removeAllListeners.apply(this,arguments);return(q==="readable"||q===void 0)&&gt.nextTick(V,this),Z};function V(q){var Z=q._readableState;Z.readableListening=q.listenerCount("readable")>0,Z.resumeScheduled&&!Z.paused?Z.flowing=!0:q.listenerCount("data")>0&&q.resume()}function me(q){l("readable nexttick read 0"),q.read(0)}P.prototype.resume=function(){var q=this._readableState;return q.flowing||(l("resume"),q.flowing=!q.readableListening,ge(this,q)),q.paused=!1,this};function ge(q,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,gt.nextTick(ke,q,Z))}function ke(q,Z){l("resume",Z.reading),Z.reading||q.read(0),Z.resumeScheduled=!1,q.emit("resume"),ce(q),Z.flowing&&!Z.reading&&q.read(0)}P.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ce(q){var Z=q._readableState;for(l("flow",Z.flowing);Z.flowing&&q.read()!==null;);}P.prototype.wrap=function(q){var Z=this,we=this._readableState,O=!1;q.on("end",function(){if(l("wrapped end"),we.decoder&&!we.ended){var k=we.decoder.end();k&&k.length&&Z.push(k)}Z.push(null)}),q.on("data",function(k){if(l("wrapped data"),we.decoder&&(k=we.decoder.write(k)),!(we.objectMode&&k==null)&&!(!we.objectMode&&(!k||!k.length))){var _=Z.push(k);_||(O=!0,q.pause())}});for(var xe in q)this[xe]===void 0&&typeof q[xe]=="function"&&(this[xe]=function(_){return function(){return q[_].apply(q,arguments)}}(xe));for(var F=0;F<W.length;F++)q.on(W[F],this.emit.bind(this,W[F]));return this._read=function(k){l("wrapped _read",k),O&&(O=!1,q.resume())},this},typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return M===void 0&&(M=ste()),M(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Z){this._readableState&&(this._readableState.flowing=Z)}}),P._fromList=L,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function L(q,Z){if(Z.length===0)return null;var we;return Z.objectMode?we=Z.buffer.shift():!q||q>=Z.length?(Z.decoder?we=Z.buffer.join(""):Z.buffer.length===1?we=Z.buffer.first():we=Z.buffer.concat(Z.length),Z.buffer.clear()):we=Z.buffer.consume(q,Z.decoder),we}function D(q){var Z=q._readableState;l("endReadable",Z.endEmitted),Z.endEmitted||(Z.ended=!0,gt.nextTick(ae,Z,q))}function ae(q,Z){if(l("endReadableNT",q.endEmitted,q.length),!q.endEmitted&&q.length===0&&(q.endEmitted=!0,Z.readable=!1,Z.emit("end"),q.autoDestroy)){var we=Z._writableState;(!we||we.autoDestroy&&we.finished)&&Z.destroy()}}typeof Symbol=="function"&&(P.from=function(q,Z){return j===void 0&&(j=ate()),j(P,q,Z)});function ie(q,Z){for(var we=0,O=q.length;we<O;we++)if(q[we]===Z)return we;return-1}return y0}var v0,GA;function C3(){if(GA)return v0;GA=1,v0=a;var t=Od().codes,e=t.ERR_METHOD_NOT_IMPLEMENTED,r=t.ERR_MULTIPLE_CALLBACK,n=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=t.ERR_TRANSFORM_WITH_LENGTH_0,o=hd();dc(a,o);function s(d,f){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(m===null)return this.emit("error",new r);p.writechunk=null,p.writecb=null,f!=null&&this.push(f),m(d);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function a(d){if(!(this instanceof a))return new a(d);o.call(this,d),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",l)}function l(){var d=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,p){c(d,f,p)}):c(this,null,null)}a.prototype.push=function(d,f){return this._transformState.needTransform=!1,o.prototype.push.call(this,d,f)},a.prototype._transform=function(d,f,p){p(new e("_transform()"))},a.prototype._write=function(d,f,p){var m=this._transformState;if(m.writecb=p,m.writechunk=d,m.writeencoding=f,!m.transforming){var g=this._readableState;(m.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},a.prototype._read=function(d){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(d,f){o.prototype._destroy.call(this,d,function(p){f(p)})};function c(d,f,p){if(f)return d.emit("error",f);if(p!=null&&d.push(p),d._writableState.length)throw new i;if(d._transformState.transforming)throw new n;return d.push(null)}return v0}var b0,KA;function lte(){if(KA)return b0;KA=1,b0=e;var t=C3();dc(e,t);function e(r){if(!(this instanceof e))return new e(r);t.call(this,r)}return e.prototype._transform=function(r,n,i){i(null,r)},b0}var w0,qA;function cte(){if(qA)return w0;qA=1;var t;function e(p){var m=!1;return function(){m||(m=!0,p.apply(void 0,arguments))}}var r=Od().codes,n=r.ERR_MISSING_ARGS,i=r.ERR_STREAM_DESTROYED;function o(p){if(p)throw p}function s(p){return p.setHeader&&typeof p.abort=="function"}function a(p,m,g,b){b=e(b);var S=!1;p.on("close",function(){S=!0}),t===void 0&&(t=ok()),t(p,{readable:m,writable:g},function(T){if(T)return b(T);S=!0,b()});var w=!1;return function(T){if(!S&&!w){if(w=!0,s(p))return p.abort();if(typeof p.destroy=="function")return p.destroy();b(T||new i("pipe"))}}}function l(p){p()}function c(p,m){return p.pipe(m)}function d(p){return!p.length||typeof p[p.length-1]!="function"?o:p.pop()}function f(){for(var p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];var b=d(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new n("streams");var S,w=m.map(function(T,M){var j=M<m.length-1,$=M>0;return a(T,j,$,function(W){S||(S=W),W&&w.forEach(l),!j&&(w.forEach(l),b(S))})});return m.reduce(c)}return w0=f,w0}var sk=vi,ak=tk.EventEmitter,ute=dc;ute(vi,ak);vi.Readable=E3();vi.Writable=_3();vi.Duplex=hd();vi.Transform=C3();vi.PassThrough=lte();vi.finished=ok();vi.pipeline=cte();vi.Stream=vi;function vi(){ak.call(this)}vi.prototype.pipe=function(t,e){var r=this;function n(d){t.writable&&t.write(d)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",s),r.on("close",a));var o=!1;function s(){o||(o=!0,t.end())}function a(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}function l(d){if(c(),ak.listenerCount(this,"error")===0)throw d}r.on("error",l),t.on("error",l);function c(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",s),r.removeListener("close",a),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t};(function(t){(function(e){e.parser=function(L,D){return new n(L,D)},e.SAXParser=n,e.SAXStream=d,e.createStream=c,e.MAX_BUFFER_LENGTH=64*1024;var r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(L,D){if(!(this instanceof n))return new n(L,D);var ae=this;o(ae),ae.q=ae.c="",ae.bufferCheckPosition=e.MAX_BUFFER_LENGTH,ae.opt=D||{},ae.opt.lowercase=ae.opt.lowercase||ae.opt.lowercasetags,ae.looseCase=ae.opt.lowercase?"toLowerCase":"toUpperCase",ae.tags=[],ae.closed=ae.closedRoot=ae.sawRoot=!1,ae.tag=ae.error=null,ae.strict=!!L,ae.noscript=!!(L||ae.opt.noscript),ae.state=P.BEGIN,ae.strictEntities=ae.opt.strictEntities,ae.ENTITIES=ae.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),ae.attribList=[],ae.opt.xmlns&&(ae.ns=Object.create(b)),ae.trackPosition=ae.opt.position!==!1,ae.trackPosition&&(ae.position=ae.line=ae.column=0),de(ae,"onready")}Object.create||(Object.create=function(L){function D(){}D.prototype=L;var ae=new D;return ae}),Object.keys||(Object.keys=function(L){var D=[];for(var ae in L)L.hasOwnProperty(ae)&&D.push(ae);return D});function i(L){for(var D=Math.max(e.MAX_BUFFER_LENGTH,10),ae=0,ie=0,q=r.length;ie<q;ie++){var Z=L[r[ie]].length;if(Z>D)switch(r[ie]){case"textNode":ne(L);break;case"cdata":U(L,"oncdata",L.cdata),L.cdata="";break;case"script":U(L,"onscript",L.script),L.script="";break;default:le(L,"Max buffer length exceeded: "+r[ie])}ae=Math.max(ae,Z)}var we=e.MAX_BUFFER_LENGTH-ae;L.bufferCheckPosition=we+L.position}function o(L){for(var D=0,ae=r.length;D<ae;D++)L[r[D]]=""}function s(L){ne(L),L.cdata!==""&&(U(L,"oncdata",L.cdata),L.cdata=""),L.script!==""&&(U(L,"onscript",L.script),L.script="")}n.prototype={end:function(){Ce(this)},write:ce,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){s(this)}};var a;try{a=sk.Stream}catch{a=function(){}}var l=e.EVENTS.filter(function(L){return L!=="error"&&L!=="end"});function c(L,D){return new d(L,D)}function d(L,D){if(!(this instanceof d))return new d(L,D);a.apply(this),this._parser=new n(L,D),this.writable=!0,this.readable=!0;var ae=this;this._parser.onend=function(){ae.emit("end")},this._parser.onerror=function(ie){ae.emit("error",ie),ae._parser.error=null},this._decoder=null,l.forEach(function(ie){Object.defineProperty(ae,"on"+ie,{get:function(){return ae._parser["on"+ie]},set:function(q){if(!q)return ae.removeAllListeners(ie),ae._parser["on"+ie]=q,q;ae.on(ie,q)},enumerable:!0,configurable:!1})})}d.prototype=Object.create(a.prototype,{constructor:{value:d}}),d.prototype.write=function(L){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(L)){if(!this._decoder){var D=p1().StringDecoder;this._decoder=new D("utf8")}L=this._decoder.write(L)}return this._parser.write(L.toString()),this.emit("data",L),!0},d.prototype.end=function(L){return L&&L.length&&this.write(L),this._parser.end(),!0},d.prototype.on=function(L,D){var ae=this;return!ae._parser["on"+L]&&l.indexOf(L)!==-1&&(ae._parser["on"+L]=function(){var ie=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ie.splice(0,0,L),ae.emit.apply(ae,ie)}),a.prototype.on.call(ae,L,D)};var f="[CDATA[",p="DOCTYPE",m="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/2000/xmlns/",b={xml:m,xmlns:g},S=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,w=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,M=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function j(L){return L===" "||L===`
300
+ `||L==="\r"||L===" "}function $(L){return L==='"'||L==="'"}function W(L){return L===">"||j(L)}function Y(L,D){return L.test(D)}function ee(L,D){return!Y(L,D)}var P=0;e.STATE={BEGIN:P++,BEGIN_WHITESPACE:P++,TEXT:P++,TEXT_ENTITY:P++,OPEN_WAKA:P++,SGML_DECL:P++,SGML_DECL_QUOTED:P++,DOCTYPE:P++,DOCTYPE_QUOTED:P++,DOCTYPE_DTD:P++,DOCTYPE_DTD_QUOTED:P++,COMMENT_STARTING:P++,COMMENT:P++,COMMENT_ENDING:P++,COMMENT_ENDED:P++,CDATA:P++,CDATA_ENDING:P++,CDATA_ENDING_2:P++,PROC_INST:P++,PROC_INST_BODY:P++,PROC_INST_ENDING:P++,OPEN_TAG:P++,OPEN_TAG_SLASH:P++,ATTRIB:P++,ATTRIB_NAME:P++,ATTRIB_NAME_SAW_WHITE:P++,ATTRIB_VALUE:P++,ATTRIB_VALUE_QUOTED:P++,ATTRIB_VALUE_CLOSED:P++,ATTRIB_VALUE_UNQUOTED:P++,ATTRIB_VALUE_ENTITY_Q:P++,ATTRIB_VALUE_ENTITY_U:P++,CLOSE_TAG:P++,CLOSE_TAG_SAW_WHITE:P++,SCRIPT:P++,SCRIPT_ENDING:P++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(L){var D=e.ENTITIES[L],ae=typeof D=="number"?String.fromCharCode(D):D;e.ENTITIES[L]=ae});for(var fe in e.STATE)e.STATE[e.STATE[fe]]=fe;P=e.STATE;function de(L,D,ae){L[D]&&L[D](ae)}function U(L,D,ae){L.textNode&&ne(L),de(L,D,ae)}function ne(L){L.textNode=R(L.opt,L.textNode),L.textNode&&de(L,"ontext",L.textNode),L.textNode=""}function R(L,D){return L.trim&&(D=D.trim()),L.normalize&&(D=D.replace(/\s+/g," ")),D}function le(L,D){return ne(L),L.trackPosition&&(D+=`
301
+ Line: `+L.line+`
302
+ Column: `+L.column+`
303
+ Char: `+L.c),D=new Error(D),L.error=D,de(L,"onerror",D),L}function Ce(L){return L.sawRoot&&!L.closedRoot&&he(L,"Unclosed root tag"),L.state!==P.BEGIN&&L.state!==P.BEGIN_WHITESPACE&&L.state!==P.TEXT&&le(L,"Unexpected end"),ne(L),L.c="",L.closed=!0,de(L,"onend"),n.call(L,L.strict,L.opt),L}function he(L,D){if(typeof L!="object"||!(L instanceof n))throw new Error("bad call to strictFail");L.strict&&le(L,D)}function Fe(L){L.strict||(L.tagName=L.tagName[L.looseCase]());var D=L.tags[L.tags.length-1]||L,ae=L.tag={name:L.tagName,attributes:{}};L.opt.xmlns&&(ae.ns=D.ns),L.attribList.length=0,U(L,"onopentagstart",ae)}function ye(L,D){var ae=L.indexOf(":"),ie=ae<0?["",L]:L.split(":"),q=ie[0],Z=ie[1];return D&&L==="xmlns"&&(q="xmlns",Z=""),{prefix:q,local:Z}}function ze(L){if(L.strict||(L.attribName=L.attribName[L.looseCase]()),L.attribList.indexOf(L.attribName)!==-1||L.tag.attributes.hasOwnProperty(L.attribName)){L.attribName=L.attribValue="";return}if(L.opt.xmlns){var D=ye(L.attribName,!0),ae=D.prefix,ie=D.local;if(ae==="xmlns")if(ie==="xml"&&L.attribValue!==m)he(L,"xml: prefix must be bound to "+m+`
304
+ Actual: `+L.attribValue);else if(ie==="xmlns"&&L.attribValue!==g)he(L,"xmlns: prefix must be bound to "+g+`
305
+ Actual: `+L.attribValue);else{var q=L.tag,Z=L.tags[L.tags.length-1]||L;q.ns===Z.ns&&(q.ns=Object.create(Z.ns)),q.ns[ie]=L.attribValue}L.attribList.push([L.attribName,L.attribValue])}else L.tag.attributes[L.attribName]=L.attribValue,U(L,"onattribute",{name:L.attribName,value:L.attribValue});L.attribName=L.attribValue=""}function ue(L,D){if(L.opt.xmlns){var ae=L.tag,ie=ye(L.tagName);ae.prefix=ie.prefix,ae.local=ie.local,ae.uri=ae.ns[ie.prefix]||"",ae.prefix&&!ae.uri&&(he(L,"Unbound namespace prefix: "+JSON.stringify(L.tagName)),ae.uri=ie.prefix);var q=L.tags[L.tags.length-1]||L;ae.ns&&q.ns!==ae.ns&&Object.keys(ae.ns).forEach(function(oe){U(L,"onopennamespace",{prefix:oe,uri:ae.ns[oe]})});for(var Z=0,we=L.attribList.length;Z<we;Z++){var O=L.attribList[Z],xe=O[0],F=O[1],k=ye(xe,!0),_=k.prefix,N=k.local,Q=_===""?"":ae.ns[_]||"",pe={name:xe,value:F,prefix:_,local:N,uri:Q};_&&_!=="xmlns"&&!Q&&(he(L,"Unbound namespace prefix: "+JSON.stringify(_)),pe.uri=_),L.tag.attributes[xe]=pe,U(L,"onattribute",pe)}L.attribList.length=0}L.tag.isSelfClosing=!!D,L.sawRoot=!0,L.tags.push(L.tag),U(L,"onopentag",L.tag),D||(!L.noscript&&L.tagName.toLowerCase()==="script"?L.state=P.SCRIPT:L.state=P.TEXT,L.tag=null,L.tagName=""),L.attribName=L.attribValue="",L.attribList.length=0}function V(L){if(!L.tagName){he(L,"Weird empty close tag."),L.textNode+="</>",L.state=P.TEXT;return}if(L.script){if(L.tagName!=="script"){L.script+="</"+L.tagName+">",L.tagName="",L.state=P.SCRIPT;return}U(L,"onscript",L.script),L.script=""}var D=L.tags.length,ae=L.tagName;L.strict||(ae=ae[L.looseCase]());for(var ie=ae;D--;){var q=L.tags[D];if(q.name!==ie)he(L,"Unexpected close tag");else break}if(D<0){he(L,"Unmatched closing tag: "+L.tagName),L.textNode+="</"+L.tagName+">",L.state=P.TEXT;return}L.tagName=ae;for(var Z=L.tags.length;Z-- >D;){var we=L.tag=L.tags.pop();L.tagName=L.tag.name,U(L,"onclosetag",L.tagName);var O={};for(var xe in we.ns)O[xe]=we.ns[xe];var F=L.tags[L.tags.length-1]||L;L.opt.xmlns&&we.ns!==F.ns&&Object.keys(we.ns).forEach(function(k){var _=we.ns[k];U(L,"onclosenamespace",{prefix:k,uri:_})})}D===0&&(L.closedRoot=!0),L.tagName=L.attribValue=L.attribName="",L.attribList.length=0,L.state=P.TEXT}function me(L){var D=L.entity,ae=D.toLowerCase(),ie,q="";return L.ENTITIES[D]?L.ENTITIES[D]:L.ENTITIES[ae]?L.ENTITIES[ae]:(D=ae,D.charAt(0)==="#"&&(D.charAt(1)==="x"?(D=D.slice(2),ie=parseInt(D,16),q=ie.toString(16)):(D=D.slice(1),ie=parseInt(D,10),q=ie.toString(10))),D=D.replace(/^0+/,""),isNaN(ie)||q.toLowerCase()!==D?(he(L,"Invalid character entity"),"&"+L.entity+";"):String.fromCodePoint(ie))}function ge(L,D){D==="<"?(L.state=P.OPEN_WAKA,L.startTagPosition=L.position):j(D)||(he(L,"Non-whitespace before first tag."),L.textNode=D,L.state=P.TEXT)}function ke(L,D){var ae="";return D<L.length&&(ae=L.charAt(D)),ae}function ce(L){var D=this;if(this.error)throw this.error;if(D.closed)return le(D,"Cannot write after close. Assign an onready handler.");if(L===null)return Ce(D);typeof L=="object"&&(L=L.toString());for(var ae=0,ie="";ie=ke(L,ae++),D.c=ie,!!ie;)switch(D.trackPosition&&(D.position++,ie===`
306
+ `?(D.line++,D.column=0):D.column++),D.state){case P.BEGIN:if(D.state=P.BEGIN_WHITESPACE,ie==="\uFEFF")continue;ge(D,ie);continue;case P.BEGIN_WHITESPACE:ge(D,ie);continue;case P.TEXT:if(D.sawRoot&&!D.closedRoot){for(var q=ae-1;ie&&ie!=="<"&&ie!=="&";)ie=ke(L,ae++),ie&&D.trackPosition&&(D.position++,ie===`
307
+ `?(D.line++,D.column=0):D.column++);D.textNode+=L.substring(q,ae-1)}ie==="<"&&!(D.sawRoot&&D.closedRoot&&!D.strict)?(D.state=P.OPEN_WAKA,D.startTagPosition=D.position):(!j(ie)&&(!D.sawRoot||D.closedRoot)&&he(D,"Text data outside of root node."),ie==="&"?D.state=P.TEXT_ENTITY:D.textNode+=ie);continue;case P.SCRIPT:ie==="<"?D.state=P.SCRIPT_ENDING:D.script+=ie;continue;case P.SCRIPT_ENDING:ie==="/"?D.state=P.CLOSE_TAG:(D.script+="<"+ie,D.state=P.SCRIPT);continue;case P.OPEN_WAKA:if(ie==="!")D.state=P.SGML_DECL,D.sgmlDecl="";else if(!j(ie))if(Y(S,ie))D.state=P.OPEN_TAG,D.tagName=ie;else if(ie==="/")D.state=P.CLOSE_TAG,D.tagName="";else if(ie==="?")D.state=P.PROC_INST,D.procInstName=D.procInstBody="";else{if(he(D,"Unencoded <"),D.startTagPosition+1<D.position){var Z=D.position-D.startTagPosition;ie=new Array(Z).join(" ")+ie}D.textNode+="<"+ie,D.state=P.TEXT}continue;case P.SGML_DECL:(D.sgmlDecl+ie).toUpperCase()===f?(U(D,"onopencdata"),D.state=P.CDATA,D.sgmlDecl="",D.cdata=""):D.sgmlDecl+ie==="--"?(D.state=P.COMMENT,D.comment="",D.sgmlDecl=""):(D.sgmlDecl+ie).toUpperCase()===p?(D.state=P.DOCTYPE,(D.doctype||D.sawRoot)&&he(D,"Inappropriately located doctype declaration"),D.doctype="",D.sgmlDecl=""):ie===">"?(U(D,"onsgmldeclaration",D.sgmlDecl),D.sgmlDecl="",D.state=P.TEXT):($(ie)&&(D.state=P.SGML_DECL_QUOTED),D.sgmlDecl+=ie);continue;case P.SGML_DECL_QUOTED:ie===D.q&&(D.state=P.SGML_DECL,D.q=""),D.sgmlDecl+=ie;continue;case P.DOCTYPE:ie===">"?(D.state=P.TEXT,U(D,"ondoctype",D.doctype),D.doctype=!0):(D.doctype+=ie,ie==="["?D.state=P.DOCTYPE_DTD:$(ie)&&(D.state=P.DOCTYPE_QUOTED,D.q=ie));continue;case P.DOCTYPE_QUOTED:D.doctype+=ie,ie===D.q&&(D.q="",D.state=P.DOCTYPE);continue;case P.DOCTYPE_DTD:D.doctype+=ie,ie==="]"?D.state=P.DOCTYPE:$(ie)&&(D.state=P.DOCTYPE_DTD_QUOTED,D.q=ie);continue;case P.DOCTYPE_DTD_QUOTED:D.doctype+=ie,ie===D.q&&(D.state=P.DOCTYPE_DTD,D.q="");continue;case P.COMMENT:ie==="-"?D.state=P.COMMENT_ENDING:D.comment+=ie;continue;case P.COMMENT_ENDING:ie==="-"?(D.state=P.COMMENT_ENDED,D.comment=R(D.opt,D.comment),D.comment&&U(D,"oncomment",D.comment),D.comment=""):(D.comment+="-"+ie,D.state=P.COMMENT);continue;case P.COMMENT_ENDED:ie!==">"?(he(D,"Malformed comment"),D.comment+="--"+ie,D.state=P.COMMENT):D.state=P.TEXT;continue;case P.CDATA:ie==="]"?D.state=P.CDATA_ENDING:D.cdata+=ie;continue;case P.CDATA_ENDING:ie==="]"?D.state=P.CDATA_ENDING_2:(D.cdata+="]"+ie,D.state=P.CDATA);continue;case P.CDATA_ENDING_2:ie===">"?(D.cdata&&U(D,"oncdata",D.cdata),U(D,"onclosecdata"),D.cdata="",D.state=P.TEXT):ie==="]"?D.cdata+="]":(D.cdata+="]]"+ie,D.state=P.CDATA);continue;case P.PROC_INST:ie==="?"?D.state=P.PROC_INST_ENDING:j(ie)?D.state=P.PROC_INST_BODY:D.procInstName+=ie;continue;case P.PROC_INST_BODY:if(!D.procInstBody&&j(ie))continue;ie==="?"?D.state=P.PROC_INST_ENDING:D.procInstBody+=ie;continue;case P.PROC_INST_ENDING:ie===">"?(U(D,"onprocessinginstruction",{name:D.procInstName,body:D.procInstBody}),D.procInstName=D.procInstBody="",D.state=P.TEXT):(D.procInstBody+="?"+ie,D.state=P.PROC_INST_BODY);continue;case P.OPEN_TAG:Y(w,ie)?D.tagName+=ie:(Fe(D),ie===">"?ue(D):ie==="/"?D.state=P.OPEN_TAG_SLASH:(j(ie)||he(D,"Invalid character in tag name"),D.state=P.ATTRIB));continue;case P.OPEN_TAG_SLASH:ie===">"?(ue(D,!0),V(D)):(he(D,"Forward-slash in opening tag not followed by >"),D.state=P.ATTRIB);continue;case P.ATTRIB:if(j(ie))continue;ie===">"?ue(D):ie==="/"?D.state=P.OPEN_TAG_SLASH:Y(S,ie)?(D.attribName=ie,D.attribValue="",D.state=P.ATTRIB_NAME):he(D,"Invalid attribute name");continue;case P.ATTRIB_NAME:ie==="="?D.state=P.ATTRIB_VALUE:ie===">"?(he(D,"Attribute without value"),D.attribValue=D.attribName,ze(D),ue(D)):j(ie)?D.state=P.ATTRIB_NAME_SAW_WHITE:Y(w,ie)?D.attribName+=ie:he(D,"Invalid attribute name");continue;case P.ATTRIB_NAME_SAW_WHITE:if(ie==="=")D.state=P.ATTRIB_VALUE;else{if(j(ie))continue;he(D,"Attribute without value"),D.tag.attributes[D.attribName]="",D.attribValue="",U(D,"onattribute",{name:D.attribName,value:""}),D.attribName="",ie===">"?ue(D):Y(S,ie)?(D.attribName=ie,D.state=P.ATTRIB_NAME):(he(D,"Invalid attribute name"),D.state=P.ATTRIB)}continue;case P.ATTRIB_VALUE:if(j(ie))continue;$(ie)?(D.q=ie,D.state=P.ATTRIB_VALUE_QUOTED):(he(D,"Unquoted attribute value"),D.state=P.ATTRIB_VALUE_UNQUOTED,D.attribValue=ie);continue;case P.ATTRIB_VALUE_QUOTED:if(ie!==D.q){ie==="&"?D.state=P.ATTRIB_VALUE_ENTITY_Q:D.attribValue+=ie;continue}ze(D),D.q="",D.state=P.ATTRIB_VALUE_CLOSED;continue;case P.ATTRIB_VALUE_CLOSED:j(ie)?D.state=P.ATTRIB:ie===">"?ue(D):ie==="/"?D.state=P.OPEN_TAG_SLASH:Y(S,ie)?(he(D,"No whitespace between attributes"),D.attribName=ie,D.attribValue="",D.state=P.ATTRIB_NAME):he(D,"Invalid attribute name");continue;case P.ATTRIB_VALUE_UNQUOTED:if(!W(ie)){ie==="&"?D.state=P.ATTRIB_VALUE_ENTITY_U:D.attribValue+=ie;continue}ze(D),ie===">"?ue(D):D.state=P.ATTRIB;continue;case P.CLOSE_TAG:if(D.tagName)ie===">"?V(D):Y(w,ie)?D.tagName+=ie:D.script?(D.script+="</"+D.tagName,D.tagName="",D.state=P.SCRIPT):(j(ie)||he(D,"Invalid tagname in closing tag"),D.state=P.CLOSE_TAG_SAW_WHITE);else{if(j(ie))continue;ee(S,ie)?D.script?(D.script+="</"+ie,D.state=P.SCRIPT):he(D,"Invalid tagname in closing tag."):D.tagName=ie}continue;case P.CLOSE_TAG_SAW_WHITE:if(j(ie))continue;ie===">"?V(D):he(D,"Invalid characters in closing tag");continue;case P.TEXT_ENTITY:case P.ATTRIB_VALUE_ENTITY_Q:case P.ATTRIB_VALUE_ENTITY_U:var we,O;switch(D.state){case P.TEXT_ENTITY:we=P.TEXT,O="textNode";break;case P.ATTRIB_VALUE_ENTITY_Q:we=P.ATTRIB_VALUE_QUOTED,O="attribValue";break;case P.ATTRIB_VALUE_ENTITY_U:we=P.ATTRIB_VALUE_UNQUOTED,O="attribValue";break}ie===";"?(D[O]+=me(D),D.entity="",D.state=we):Y(D.entity.length?M:T,ie)?D.entity+=ie:(he(D,"Invalid character in entity name"),D[O]+="&"+D.entity+ie,D.entity="",D.state=we);continue;default:throw new Error(D,"Unknown state: "+D.state)}return D.position>=D.bufferCheckPosition&&i(D),D}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var L=String.fromCharCode,D=Math.floor,ae=function(){var ie=16384,q=[],Z,we,O=-1,xe=arguments.length;if(!xe)return"";for(var F="";++O<xe;){var k=Number(arguments[O]);if(!isFinite(k)||k<0||k>1114111||D(k)!==k)throw RangeError("Invalid code point: "+k);k<=65535?q.push(k):(k-=65536,Z=(k>>10)+55296,we=k%1024+56320,q.push(Z,we)),(O+1===xe||q.length>ie)&&(F+=L.apply(null,q),q.length=0)}return F};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:ae,configurable:!0,writable:!0}):String.fromCodePoint=ae}()})(t)})(r3);var lk={isArray:function(t){return Array.isArray?Array.isArray(t):Object.prototype.toString.call(t)==="[object Array]"}},dte=lk.isArray,ck={copyOptions:function(t){var e,r={};for(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return r},ensureFlagExists:function(t,e){(!(t in e)||typeof e[t]!="boolean")&&(e[t]=!1)},ensureSpacesExists:function(t){(!("spaces"in t)||typeof t.spaces!="number"&&typeof t.spaces!="string")&&(t.spaces=0)},ensureAlwaysArrayExists:function(t){(!("alwaysArray"in t)||typeof t.alwaysArray!="boolean"&&!dte(t.alwaysArray))&&(t.alwaysArray=!1)},ensureKeyExists:function(t,e){(!(t+"Key"in e)||typeof e[t+"Key"]!="string")&&(e[t+"Key"]=e.compact?"_"+t:t)},checkFnExists:function(t,e){return t+"Fn"in e}},fte=r3,Pt=ck,Vu=lk.isArray,Ie,at;function hte(t){return Ie=Pt.copyOptions(t),Pt.ensureFlagExists("ignoreDeclaration",Ie),Pt.ensureFlagExists("ignoreInstruction",Ie),Pt.ensureFlagExists("ignoreAttributes",Ie),Pt.ensureFlagExists("ignoreText",Ie),Pt.ensureFlagExists("ignoreComment",Ie),Pt.ensureFlagExists("ignoreCdata",Ie),Pt.ensureFlagExists("ignoreDoctype",Ie),Pt.ensureFlagExists("compact",Ie),Pt.ensureFlagExists("alwaysChildren",Ie),Pt.ensureFlagExists("addParent",Ie),Pt.ensureFlagExists("trim",Ie),Pt.ensureFlagExists("nativeType",Ie),Pt.ensureFlagExists("nativeTypeAttributes",Ie),Pt.ensureFlagExists("sanitize",Ie),Pt.ensureFlagExists("instructionHasAttributes",Ie),Pt.ensureFlagExists("captureSpacesBetweenElements",Ie),Pt.ensureAlwaysArrayExists(Ie),Pt.ensureKeyExists("declaration",Ie),Pt.ensureKeyExists("instruction",Ie),Pt.ensureKeyExists("attributes",Ie),Pt.ensureKeyExists("text",Ie),Pt.ensureKeyExists("comment",Ie),Pt.ensureKeyExists("cdata",Ie),Pt.ensureKeyExists("doctype",Ie),Pt.ensureKeyExists("type",Ie),Pt.ensureKeyExists("name",Ie),Pt.ensureKeyExists("elements",Ie),Pt.ensureKeyExists("parent",Ie),Ie}function T3(t){var e=Number(t);if(!isNaN(e))return e;var r=t.toLowerCase();return r==="true"?!0:r==="false"?!1:t}function Qh(t,e){var r;if(Ie.compact){if(!at[Ie[t+"Key"]]&&(Vu(Ie.alwaysArray)?Ie.alwaysArray.indexOf(Ie[t+"Key"])!==-1:Ie.alwaysArray)&&(at[Ie[t+"Key"]]=[]),at[Ie[t+"Key"]]&&!Vu(at[Ie[t+"Key"]])&&(at[Ie[t+"Key"]]=[at[Ie[t+"Key"]]]),t+"Fn"in Ie&&typeof e=="string"&&(e=Ie[t+"Fn"](e,at)),t==="instruction"&&("instructionFn"in Ie||"instructionNameFn"in Ie)){for(r in e)if(e.hasOwnProperty(r))if("instructionFn"in Ie)e[r]=Ie.instructionFn(e[r],r,at);else{var n=e[r];delete e[r],e[Ie.instructionNameFn(r,n,at)]=n}}Vu(at[Ie[t+"Key"]])?at[Ie[t+"Key"]].push(e):at[Ie[t+"Key"]]=e}else{at[Ie.elementsKey]||(at[Ie.elementsKey]=[]);var i={};if(i[Ie.typeKey]=t,t==="instruction"){for(r in e)if(e.hasOwnProperty(r))break;i[Ie.nameKey]="instructionNameFn"in Ie?Ie.instructionNameFn(r,e,at):r,Ie.instructionHasAttributes?(i[Ie.attributesKey]=e[r][Ie.attributesKey],"instructionFn"in Ie&&(i[Ie.attributesKey]=Ie.instructionFn(i[Ie.attributesKey],r,at))):("instructionFn"in Ie&&(e[r]=Ie.instructionFn(e[r],r,at)),i[Ie.instructionKey]=e[r])}else t+"Fn"in Ie&&(e=Ie[t+"Fn"](e,at)),i[Ie[t+"Key"]]=e;Ie.addParent&&(i[Ie.parentKey]=at),at[Ie.elementsKey].push(i)}}function A3(t){if("attributesFn"in Ie&&t&&(t=Ie.attributesFn(t,at)),(Ie.trim||"attributeValueFn"in Ie||"attributeNameFn"in Ie||Ie.nativeTypeAttributes)&&t){var e;for(e in t)if(t.hasOwnProperty(e)&&(Ie.trim&&(t[e]=t[e].trim()),Ie.nativeTypeAttributes&&(t[e]=T3(t[e])),"attributeValueFn"in Ie&&(t[e]=Ie.attributeValueFn(t[e],e,at)),"attributeNameFn"in Ie)){var r=t[e];delete t[e],t[Ie.attributeNameFn(e,t[e],at)]=r}}return t}function pte(t){var e={};if(t.body&&(t.name.toLowerCase()==="xml"||Ie.instructionHasAttributes)){for(var r=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,n;(n=r.exec(t.body))!==null;)e[n[1]]=n[2]||n[3]||n[4];e=A3(e)}if(t.name.toLowerCase()==="xml"){if(Ie.ignoreDeclaration)return;at[Ie.declarationKey]={},Object.keys(e).length&&(at[Ie.declarationKey][Ie.attributesKey]=e),Ie.addParent&&(at[Ie.declarationKey][Ie.parentKey]=at)}else{if(Ie.ignoreInstruction)return;Ie.trim&&(t.body=t.body.trim());var i={};Ie.instructionHasAttributes&&Object.keys(e).length?(i[t.name]={},i[t.name][Ie.attributesKey]=e):i[t.name]=t.body,Qh("instruction",i)}}function mte(t,e){var r;if(typeof t=="object"&&(e=t.attributes,t=t.name),e=A3(e),"elementNameFn"in Ie&&(t=Ie.elementNameFn(t,at)),Ie.compact){if(r={},!Ie.ignoreAttributes&&e&&Object.keys(e).length){r[Ie.attributesKey]={};var n;for(n in e)e.hasOwnProperty(n)&&(r[Ie.attributesKey][n]=e[n])}!(t in at)&&(Vu(Ie.alwaysArray)?Ie.alwaysArray.indexOf(t)!==-1:Ie.alwaysArray)&&(at[t]=[]),at[t]&&!Vu(at[t])&&(at[t]=[at[t]]),Vu(at[t])?at[t].push(r):at[t]=r}else at[Ie.elementsKey]||(at[Ie.elementsKey]=[]),r={},r[Ie.typeKey]="element",r[Ie.nameKey]=t,!Ie.ignoreAttributes&&e&&Object.keys(e).length&&(r[Ie.attributesKey]=e),Ie.alwaysChildren&&(r[Ie.elementsKey]=[]),at[Ie.elementsKey].push(r);r[Ie.parentKey]=at,at=r}function gte(t){Ie.ignoreText||!t.trim()&&!Ie.captureSpacesBetweenElements||(Ie.trim&&(t=t.trim()),Ie.nativeType&&(t=T3(t)),Ie.sanitize&&(t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),Qh("text",t))}function yte(t){Ie.ignoreComment||(Ie.trim&&(t=t.trim()),Qh("comment",t))}function vte(t){var e=at[Ie.parentKey];Ie.addParent||delete at[Ie.parentKey],at=e}function bte(t){Ie.ignoreCdata||(Ie.trim&&(t=t.trim()),Qh("cdata",t))}function wte(t){Ie.ignoreDoctype||(t=t.replace(/^ /,""),Ie.trim&&(t=t.trim()),Qh("doctype",t))}function xte(t){t.note=t}var R3=function(t,e){var r=fte.parser(!0,{}),n={};if(at=n,Ie=hte(e),r.opt={strictEntities:!0},r.onopentag=mte,r.ontext=gte,r.oncomment=yte,r.onclosetag=vte,r.onerror=xte,r.oncdata=bte,r.ondoctype=wte,r.onprocessinginstruction=pte,r.write(t).close(),n[Ie.elementsKey]){var i=n[Ie.elementsKey];delete n[Ie.elementsKey],n[Ie.elementsKey]=i,delete n.text}return n},XA=ck,Ste=R3;function kte(t){var e=XA.copyOptions(t);return XA.ensureSpacesExists(e),e}var _te=function(t,e){var r,n,i,o;return r=kte(e),n=Ste(t,r),o="compact"in r&&r.compact?"_parent":"parent","addParent"in r&&r.addParent?i=JSON.stringify(n,function(s,a){return s===o?"_":a},r.spaces):i=JSON.stringify(n,null,r.spaces),i.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},Vt=ck,Ete=lk.isArray,qr,Xr;function Cte(t){var e=Vt.copyOptions(t);return Vt.ensureFlagExists("ignoreDeclaration",e),Vt.ensureFlagExists("ignoreInstruction",e),Vt.ensureFlagExists("ignoreAttributes",e),Vt.ensureFlagExists("ignoreText",e),Vt.ensureFlagExists("ignoreComment",e),Vt.ensureFlagExists("ignoreCdata",e),Vt.ensureFlagExists("ignoreDoctype",e),Vt.ensureFlagExists("compact",e),Vt.ensureFlagExists("indentText",e),Vt.ensureFlagExists("indentCdata",e),Vt.ensureFlagExists("indentAttributes",e),Vt.ensureFlagExists("indentInstruction",e),Vt.ensureFlagExists("fullTagEmptyElement",e),Vt.ensureFlagExists("noQuotesForNativeAttributes",e),Vt.ensureSpacesExists(e),typeof e.spaces=="number"&&(e.spaces=Array(e.spaces+1).join(" ")),Vt.ensureKeyExists("declaration",e),Vt.ensureKeyExists("instruction",e),Vt.ensureKeyExists("attributes",e),Vt.ensureKeyExists("text",e),Vt.ensureKeyExists("comment",e),Vt.ensureKeyExists("cdata",e),Vt.ensureKeyExists("doctype",e),Vt.ensureKeyExists("type",e),Vt.ensureKeyExists("name",e),Vt.ensureKeyExists("elements",e),e}function ho(t,e,r){return(!r&&t.spaces?`
308
+ `:"")+Array(e+1).join(t.spaces)}function fv(t,e,r){if(e.ignoreAttributes)return"";"attributesFn"in e&&(t=e.attributesFn(t,Xr,qr));var n,i,o,s,a=[];for(n in t)t.hasOwnProperty(n)&&t[n]!==null&&t[n]!==void 0&&(s=e.noQuotesForNativeAttributes&&typeof t[n]!="string"?"":'"',i=""+t[n],i=i.replace(/"/g,"&quot;"),o="attributeNameFn"in e?e.attributeNameFn(n,i,Xr,qr):n,a.push(e.spaces&&e.indentAttributes?ho(e,r+1,!1):" "),a.push(o+"="+s+("attributeValueFn"in e?e.attributeValueFn(i,n,Xr,qr):i)+s));return t&&Object.keys(t).length&&e.spaces&&e.indentAttributes&&a.push(ho(e,r,!1)),a.join("")}function I3(t,e,r){return qr=t,Xr="xml",e.ignoreDeclaration?"":"<?xml"+fv(t[e.attributesKey],e,r)+"?>"}function O3(t,e,r){if(e.ignoreInstruction)return"";var n;for(n in t)if(t.hasOwnProperty(n))break;var i="instructionNameFn"in e?e.instructionNameFn(n,t[n],Xr,qr):n;if(typeof t[n]=="object")return qr=t,Xr=i,"<?"+i+fv(t[n][e.attributesKey],e,r)+"?>";var o=t[n]?t[n]:"";return"instructionFn"in e&&(o=e.instructionFn(o,n,Xr,qr)),"<?"+i+(o?" "+o:"")+"?>"}function M3(t,e){return e.ignoreComment?"":"<!--"+("commentFn"in e?e.commentFn(t,Xr,qr):t)+"-->"}function N3(t,e){return e.ignoreCdata?"":"<![CDATA["+("cdataFn"in e?e.cdataFn(t,Xr,qr):t.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function D3(t,e){return e.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in e?e.doctypeFn(t,Xr,qr):t)+">"}function uk(t,e){return e.ignoreText?"":(t=""+t,t=t.replace(/&amp;/g,"&"),t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in e?e.textFn(t,Xr,qr):t)}function Tte(t,e){var r;if(t.elements&&t.elements.length)for(r=0;r<t.elements.length;++r)switch(t.elements[r][e.typeKey]){case"text":if(e.indentText)return!0;break;case"cdata":if(e.indentCdata)return!0;break;case"instruction":if(e.indentInstruction)return!0;break;case"doctype":case"comment":case"element":return!0;default:return!0}return!1}function Ate(t,e,r){qr=t,Xr=t.name;var n=[],i="elementNameFn"in e?e.elementNameFn(t.name,t):t.name;n.push("<"+i),t[e.attributesKey]&&n.push(fv(t[e.attributesKey],e,r));var o=t[e.elementsKey]&&t[e.elementsKey].length||t[e.attributesKey]&&t[e.attributesKey]["xml:space"]==="preserve";return o||("fullTagEmptyElementFn"in e?o=e.fullTagEmptyElementFn(t.name,t):o=e.fullTagEmptyElement),o?(n.push(">"),t[e.elementsKey]&&t[e.elementsKey].length&&(n.push(P3(t[e.elementsKey],e,r+1)),qr=t,Xr=t.name),n.push(e.spaces&&Tte(t,e)?`
309
+ `+Array(r+1).join(e.spaces):""),n.push("</"+i+">")):n.push("/>"),n.join("")}function P3(t,e,r,n){return t.reduce(function(i,o){var s=ho(e,r,n&&!i);switch(o.type){case"element":return i+s+Ate(o,e,r);case"comment":return i+s+M3(o[e.commentKey],e);case"doctype":return i+s+D3(o[e.doctypeKey],e);case"cdata":return i+(e.indentCdata?s:"")+N3(o[e.cdataKey],e);case"text":return i+(e.indentText?s:"")+uk(o[e.textKey],e);case"instruction":var a={};return a[o[e.nameKey]]=o[e.attributesKey]?o:o[e.instructionKey],i+(e.indentInstruction?s:"")+O3(a,e,r)}},"")}function L3(t,e,r){var n;for(n in t)if(t.hasOwnProperty(n))switch(n){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||r)return!0;break;case e.cdataKey:if(e.indentCdata||r)return!0;break;case e.instructionKey:if(e.indentInstruction||r)return!0;break;case e.doctypeKey:case e.commentKey:return!0;default:return!0}return!1}function Rte(t,e,r,n,i){qr=t,Xr=e;var o="elementNameFn"in r?r.elementNameFn(e,t):e;if(typeof t>"u"||t===null||t==="")return"fullTagEmptyElementFn"in r&&r.fullTagEmptyElementFn(e,t)||r.fullTagEmptyElement?"<"+o+"></"+o+">":"<"+o+"/>";var s=[];if(e){if(s.push("<"+o),typeof t!="object")return s.push(">"+uk(t,r)+"</"+o+">"),s.join("");t[r.attributesKey]&&s.push(fv(t[r.attributesKey],r,n));var a=L3(t,r,!0)||t[r.attributesKey]&&t[r.attributesKey]["xml:space"]==="preserve";if(a||("fullTagEmptyElementFn"in r?a=r.fullTagEmptyElementFn(e,t):a=r.fullTagEmptyElement),a)s.push(">");else return s.push("/>"),s.join("")}return s.push(F3(t,r,n+1,!1)),qr=t,Xr=e,e&&s.push((i?ho(r,n,!1):"")+"</"+o+">"),s.join("")}function F3(t,e,r,n){var i,o,s,a=[];for(o in t)if(t.hasOwnProperty(o))for(s=Ete(t[o])?t[o]:[t[o]],i=0;i<s.length;++i){switch(o){case e.declarationKey:a.push(I3(s[i],e,r));break;case e.instructionKey:a.push((e.indentInstruction?ho(e,r,n):"")+O3(s[i],e,r));break;case e.attributesKey:case e.parentKey:break;case e.textKey:a.push((e.indentText?ho(e,r,n):"")+uk(s[i],e));break;case e.cdataKey:a.push((e.indentCdata?ho(e,r,n):"")+N3(s[i],e));break;case e.doctypeKey:a.push(ho(e,r,n)+D3(s[i],e));break;case e.commentKey:a.push(ho(e,r,n)+M3(s[i],e));break;default:a.push(ho(e,r,n)+Rte(s[i],o,e,r,L3(s[i],e)))}n=n&&!a.length}return a.join("")}var j3=function(t,e){e=Cte(e);var r=[];return qr=t,Xr="_root_",e.compact?r.push(F3(t,e,0,!0)):(t[e.declarationKey]&&r.push(I3(t[e.declarationKey],e,0)),t[e.elementsKey]&&t[e.elementsKey].length&&r.push(P3(t[e.elementsKey],e,0,!r.length))),r.join("")},Ite=j3,Ote=function(t,e){t instanceof Buffer&&(t=t.toString());var r=null;if(typeof t=="string")try{r=JSON.parse(t)}catch{throw new Error("The JSON structure is invalid")}else r=t;return Ite(r,e)},Mte=R3,Nte=_te,Dte=j3,Pte=Ote,B3={xml2js:Mte,xml2json:Nte,js2xml:Dte,json2xml:Pte};const dk=t=>{switch(t.type){case void 0:case"element":const e=new Fte(t.name,t.attributes),r=t.elements||[];for(const n of r){const i=dk(n);i!==void 0&&e.push(i)}return e;case"text":return t.text;default:return}};class Lte extends Xe{}class Fte extends Te{static fromXmlString(e){const r=B3.xml2js(e,{compact:!1});return dk(r)}constructor(e,r){super(e),r&&this.root.push(new Lte(r))}push(e){this.root.push(e)}}class jte extends Te{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}class z3 extends Te{constructor(e,r){super(e),r&&(this.root=r.root)}}const Zr=t=>{if(isNaN(t))throw new Error(`Invalid value '${t}' specified. Must be an integer.`);return Math.floor(t)},hv=t=>{const e=Zr(t);if(e<0)throw new Error(`Invalid value '${t}' specified. Must be a positive integer.`);return e},H3=(t,e)=>{const r=e*2;if(t.length!==r||isNaN(+`0x${t}`))throw new Error(`Invalid hex value '${t}'. Expected ${r} digit hex value`);return t},YA=t=>H3(t,1),fk=t=>{const e=t.slice(-2),r=t.substring(0,t.length-2);return`${Number(r)}${e}`},$3=t=>{const e=fk(t);if(parseFloat(e)<0)throw new Error(`Invalid value '${e}' specified. Expected a positive number.`);return e},pd=t=>{if(t==="auto")return t;const e=t.charAt(0)==="#"?t.substring(1):t;return H3(e,3)},ss=t=>typeof t=="string"?fk(t):Zr(t),Bte=t=>typeof t=="string"?$3(t):hv(t),Br=t=>typeof t=="string"?$3(t):hv(t),zte=t=>{const e=t.substring(0,t.length-1);return`${Number(e)}%`},Hte=t=>typeof t=="number"?Zr(t):t.slice(-1)==="%"?zte(t):fk(t),$te=hv,Ute=hv,Wte=t=>t.toISOString();class Be extends Te{constructor(e,r=!0){super(e),r!==!0&&this.root.push(new sr({val:r}))}}class x0 extends Te{constructor(e,r){super(e),this.root.push(new sr({val:Bte(r)}))}}class $l extends Te{constructor(e,r){super(e),this.root.push(new sr({val:r}))}}const Ff=(t,e)=>new hr({name:t,attributes:{value:{key:"w:val",value:e}}});class hk extends Te{constructor(e,r){super(e),this.root.push(new sr({val:r}))}}class Vte extends Te{constructor(e,r){super(e),this.root.push(new sr({val:r}))}}class bl extends Te{constructor(e,r){super(e),this.root.push(r)}}class hr extends Te{constructor({name:e,attributes:r,children:n}){super(e),r&&this.root.push(new bs(r)),n&&this.root.push(...n)}}const An={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"};class Gte extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class U3 extends Te{constructor(e){super("w:jc"),this.root.push(new Gte({val:e}))}}class jt extends Te{constructor(e,{color:r,size:n,space:i,style:o}){super(e),this.root.push(new Kte({style:o,color:r===void 0?void 0:pd(r),size:n===void 0?void 0:$te(n),space:i===void 0?void 0:Ute(i)}))}}class Kte extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{style:"w:val",color:"w:color",size:"w:sz",space:"w:space"})}}const pk={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"};class qte extends vs{constructor(e){super("w:pBdr"),e.top&&this.root.push(new jt("w:top",e.top)),e.bottom&&this.root.push(new jt("w:bottom",e.bottom)),e.left&&this.root.push(new jt("w:left",e.left)),e.right&&this.root.push(new jt("w:right",e.right))}}class Xte extends Te{constructor(){super("w:pBdr");const e=new jt("w:bottom",{color:"auto",space:1,style:pk.SINGLE,size:6});this.root.push(e)}}class Yte extends Te{constructor({start:e,end:r,left:n,right:i,hanging:o,firstLine:s}){super("w:ind"),this.root.push(new bs({start:{key:"w:start",value:e===void 0?void 0:ss(e)},end:{key:"w:end",value:r===void 0?void 0:ss(r)},left:{key:"w:left",value:n===void 0?void 0:ss(n)},right:{key:"w:right",value:i===void 0?void 0:ss(i)},hanging:{key:"w:hanging",value:o===void 0?void 0:Br(o)},firstLine:{key:"w:firstLine",value:s===void 0?void 0:Br(s)}}))}}let Jte=class extends Te{constructor(){super("w:br")}};const mk={BEGIN:"begin",END:"end",SEPARATE:"separate"};class gk extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{type:"w:fldCharType",dirty:"w:dirty"})}}class Vf extends Te{constructor(e){super("w:fldChar"),this.root.push(new gk({type:mk.BEGIN,dirty:e}))}}class Gf extends Te{constructor(e){super("w:fldChar"),this.root.push(new gk({type:mk.SEPARATE,dirty:e}))}}class Kf extends Te{constructor(e){super("w:fldChar"),this.root.push(new gk({type:mk.END,dirty:e}))}}const Zl={DEFAULT:"default",PRESERVE:"preserve"};class Ql extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{space:"xml:space"})}}class Zte extends Te{constructor(){super("w:instrText"),this.root.push(new Ql({space:Zl.PRESERVE})),this.root.push("PAGE")}}class Qte extends Te{constructor(){super("w:instrText"),this.root.push(new Ql({space:Zl.PRESERVE})),this.root.push("NUMPAGES")}}class ere extends Te{constructor(){super("w:instrText"),this.root.push(new Ql({space:Zl.PRESERVE})),this.root.push("SECTIONPAGES")}}class tre extends Te{constructor(){super("w:instrText"),this.root.push(new Ql({space:Zl.PRESERVE})),this.root.push("SECTION")}}class rre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{fill:"w:fill",color:"w:color",type:"w:val"})}}class pv extends Te{constructor({fill:e,color:r,type:n}){super("w:shd"),this.root.push(new rre({fill:e===void 0?void 0:pd(e),color:r===void 0?void 0:pd(r),type:n}))}}const nre={CLEAR:"clear",DIAGONAL_CROSS:"diagCross",DIAGONAL_STRIPE:"diagStripe",HORIZONTAL_CROSS:"horzCross",HORIZONTAL_STRIPE:"horzStripe",NIL:"nil",PERCENT_5:"pct5",PERCENT_10:"pct10",PERCENT_12:"pct12",PERCENT_15:"pct15",PERCENT_20:"pct20",PERCENT_25:"pct25",PERCENT_30:"pct30",PERCENT_35:"pct35",PERCENT_37:"pct37",PERCENT_40:"pct40",PERCENT_45:"pct45",PERCENT_50:"pct50",PERCENT_55:"pct55",PERCENT_60:"pct60",PERCENT_62:"pct62",PERCENT_65:"pct65",PERCENT_70:"pct70",PERCENT_75:"pct75",PERCENT_80:"pct80",PERCENT_85:"pct85",PERCENT_87:"pct87",PERCENT_90:"pct90",PERCENT_95:"pct95",REVERSE_DIAGONAL_STRIPE:"reverseDiagStripe",SOLID:"solid",THIN_DIAGONAL_CROSS:"thinDiagCross",THIN_DIAGONAL_STRIPE:"thinDiagStripe",THIN_HORIZONTAL_CROSS:"thinHorzCross",THIN_REVERSE_DIAGONAL_STRIPE:"thinReverseDiagStripe",THIN_VERTICAL_STRIPE:"thinVertStripe",VERTICAL_STRIPE:"vertStripe"};class ire extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}const ore={DOT:"dot"};class sre extends Te{constructor(e){super("w:em"),this.root.push(new sr({val:e}))}}class are extends sre{constructor(e=ore.DOT){super(e)}}class lre extends Te{constructor(e){super("w:spacing"),this.root.push(new sr({val:ss(e)}))}}class cre extends Te{constructor(e){super("w:color"),this.root.push(new sr({val:pd(e)}))}}class ure extends Te{constructor(e){super("w:highlight"),this.root.push(new sr({val:e}))}}class dre extends Te{constructor(e){super("w:highlightCs"),this.root.push(new sr({val:e}))}}const fre=t=>new hr({name:"w:lang",attributes:{value:{key:"w:val",value:t.value},eastAsia:{key:"w:eastAsia",value:t.eastAsia},bidirectional:{key:"w:bidi",value:t.bidirectional}}});class JA extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"})}}class S0 extends Te{constructor(e,r){if(super("w:rFonts"),typeof e=="string"){const n=e;this.root.push(new JA({ascii:n,cs:n,eastAsia:n,hAnsi:n,hint:r}))}else{const n=e;this.root.push(new JA(n))}}}let W3=class extends Te{constructor(e){super("w:vertAlign"),this.root.push(new sr({val:e}))}};class hre extends W3{constructor(){super("superscript")}}class pre extends W3{constructor(){super("subscript")}}const V3={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"};class mre extends Te{constructor(e=V3.SINGLE,r){super("w:u"),this.root.push(new sr({val:e,color:r===void 0?void 0:pd(r)}))}}class fc extends vs{constructor(e){var r,n;if(super("w:rPr"),!e)return;e.noProof!==void 0&&this.push(new Be("w:noProof",e.noProof)),e.bold!==void 0&&this.push(new Be("w:b",e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new Be("w:bCs",(r=e.boldComplexScript)!=null?r:e.bold)),e.italics!==void 0&&this.push(new Be("w:i",e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new Be("w:iCs",(n=e.italicsComplexScript)!=null?n:e.italics)),e.underline&&this.push(new mre(e.underline.type,e.underline.color)),e.effect&&this.push(new $l("w:effect",e.effect)),e.emphasisMark&&this.push(new are(e.emphasisMark.type)),e.color&&this.push(new cre(e.color)),e.kern&&this.push(new x0("w:kern",e.kern)),e.position&&this.push(new $l("w:position",e.position)),e.size!==void 0&&this.push(new x0("w:sz",e.size));const i=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;i&&this.push(new x0("w:szCs",i)),e.rightToLeft!==void 0&&this.push(new Be("w:rtl",e.rightToLeft)),e.smallCaps!==void 0?this.push(new Be("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new Be("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new Be("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new Be("w:dstrike",e.doubleStrike)),e.subScript&&this.push(new pre),e.superScript&&this.push(new hre),e.style&&this.push(new $l("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(new S0(e.font)):"name"in e.font?this.push(new S0(e.font.name,e.font.hint)):this.push(new S0(e.font))),e.highlight&&this.push(new ure(e.highlight));const o=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;o&&this.push(new dre(o)),e.characterSpacing&&this.push(new lre(e.characterSpacing)),e.emboss!==void 0&&this.push(new Be("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new Be("w:imprint",e.imprint)),e.shading&&this.push(new pv(e.shading)),e.revision&&this.push(new gre(e.revision)),e.border&&this.push(new jt("w:bdr",e.border)),e.snapToGrid!==void 0&&this.push(new Be("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new Be("w:vanish",e.vanish)),e.specVanish&&this.push(new Be("w:specVanish",e.vanish)),e.scale!==void 0&&this.push(new hk("w:w",e.scale)),e.language&&this.push(fre(e.language)),e.math&&this.push(new Be("w:oMath",e.math))}push(e){this.root.push(e)}}class gre extends Te{constructor(e){super("w:rPrChange"),this.root.push(new ire({id:e.id,author:e.author,date:e.date})),this.addChildElement(new fc(e))}}class m1 extends Te{constructor(e){var r;super("w:t"),typeof e=="string"?(this.root.push(new Ql({space:Zl.PRESERVE})),this.root.push(e)):(this.root.push(new Ql({space:(r=e.space)!=null?r:Zl.DEFAULT})),this.root.push(e.text))}}const wm={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class hc extends Te{constructor(e){if(super("w:r"),Ae(this,"properties"),this.properties=new fc(e),this.root.push(this.properties),e.break)for(let r=0;r<e.break;r++)this.root.push(new Jte);if(e.children)for(const r of e.children){if(typeof r=="string"){switch(r){case wm.CURRENT:this.root.push(new Vf),this.root.push(new Zte),this.root.push(new Gf),this.root.push(new Kf);break;case wm.TOTAL_PAGES:this.root.push(new Vf),this.root.push(new Qte),this.root.push(new Gf),this.root.push(new Kf);break;case wm.TOTAL_PAGES_IN_SECTION:this.root.push(new Vf),this.root.push(new ere),this.root.push(new Gf),this.root.push(new Kf);break;case wm.CURRENT_SECTION:this.root.push(new Vf),this.root.push(new tre),this.root.push(new Gf),this.root.push(new Kf);break;default:this.root.push(new m1(r));break}continue}this.root.push(r)}else e.text&&this.root.push(new m1(e.text))}}class Li extends hc{constructor(e){if(typeof e=="string")return super({}),this.root.push(new m1(e)),this;super(e)}}let yre="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",vre=(t,e=21)=>(r=e)=>{let n="",i=r;for(;i--;)n+=t[Math.random()*t.length|0];return n},bre=(t=21)=>{let e="",r=t;for(;r--;)e+=yre[Math.random()*64|0];return e};const zn=t=>Math.floor(t*72*20),mv=(t=0)=>{let e=t;return()=>++e},wre=()=>mv(),xre=()=>mv(1),Sre=()=>mv(),kre=()=>mv(),xy=()=>bre().toLowerCase(),jf=t=>vre("1234567890abcdef",t)(),_re=()=>`${jf(8)}-${jf(4)}-${jf(4)}-${jf(4)}-${jf(12)}`,Ere={CHARACTER:"character",COLUMN:"column",INSIDE_MARGIN:"insideMargin",LEFT_MARGIN:"leftMargin",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",RIGHT_MARGIN:"rightMargin"},Cre={BOTTOM_MARGIN:"bottomMargin",INSIDE_MARGIN:"insideMargin",LINE:"line",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",PARAGRAPH:"paragraph",TOP_MARGIN:"topMargin"};class Tre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{x:"x",y:"y"})}}class Are extends Te{constructor(){super("wp:simplePos"),this.root.push(new Tre({x:0,y:0}))}}class G3 extends Te{constructor(e){super("wp:align"),this.root.push(e)}}class K3 extends Te{constructor(e){super("wp:posOffset"),this.root.push(e.toString())}}class Rre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{relativeFrom:"relativeFrom"})}}class Ire extends Te{constructor(e){if(super("wp:positionH"),this.root.push(new Rre({relativeFrom:e.relative||Ere.PAGE})),e.align)this.root.push(new G3(e.align));else if(e.offset!==void 0)this.root.push(new K3(e.offset));else throw new Error("There is no configuration provided for floating position (Align or offset)")}}class Ore extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{relativeFrom:"relativeFrom"})}}class Mre extends Te{constructor(e){if(super("wp:positionV"),this.root.push(new Ore({relativeFrom:e.relative||Cre.PAGE})),e.align)this.root.push(new G3(e.align));else if(e.offset!==void 0)this.root.push(new K3(e.offset));else throw new Error("There is no configuration provided for floating position (Align or offset)")}}class Nre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{uri:"uri"})}}const Dre=t=>new hr({name:"asvg:svgBlip",attributes:{asvg:{key:"xmlns:asvg",value:"http://schemas.microsoft.com/office/drawing/2016/SVG/main"},embed:{key:"r:embed",value:`rId{${t.fileName}}`}}}),Pre=t=>new hr({name:"a:ext",attributes:{uri:{key:"uri",value:"{96DAC541-7B7A-43D3-8B79-37D633B846F1}"}},children:[Dre(t)]}),Lre=t=>new hr({name:"a:extLst",children:[Pre(t)]}),Fre=t=>new hr({name:"a:blip",attributes:{embed:{key:"r:embed",value:`rId{${t.type==="svg"?t.fallback.fileName:t.fileName}}`},cstate:{key:"cstate",value:"none"}},children:t.type==="svg"?[Lre(t)]:[]});class jre extends Te{constructor(){super("a:srcRect")}}class Bre extends Te{constructor(){super("a:fillRect")}}class zre extends Te{constructor(){super("a:stretch"),this.root.push(new Bre)}}class Hre extends Te{constructor(e){super("pic:blipFill"),this.root.push(Fre(e)),this.root.push(new jre),this.root.push(new zre)}}class $re extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{noChangeAspect:"noChangeAspect",noChangeArrowheads:"noChangeArrowheads"})}}class Ure extends Te{constructor(){super("a:picLocks"),this.root.push(new $re({noChangeAspect:1,noChangeArrowheads:1}))}}class Wre extends Te{constructor(){super("pic:cNvPicPr"),this.root.push(new Ure)}}const q3=(t,e)=>new hr({name:"a:hlinkClick",attributes:_a(vt({},e?{xmlns:{key:"xmlns:a",value:"http://schemas.openxmlformats.org/drawingml/2006/main"}}:{}),{id:{key:"r:id",value:`rId${t}`}})});class Vre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{id:"id",name:"name",descr:"descr"})}}class Gre extends Te{constructor(){super("pic:cNvPr"),this.root.push(new Vre({id:0,name:"",descr:""}))}prepForXml(e){for(let r=e.stack.length-1;r>=0;r--){const n=e.stack[r];if(n instanceof gv){this.root.push(q3(n.linkId,!1));break}}return super.prepForXml(e)}}class Kre extends Te{constructor(){super("pic:nvPicPr"),this.root.push(new Gre),this.root.push(new Wre)}}class qre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{xmlns:"xmlns:pic"})}}class Xre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{cx:"cx",cy:"cy"})}}class Yre extends Te{constructor(e,r){super("a:ext"),Ae(this,"attributes"),this.attributes=new Xre({cx:e,cy:r}),this.root.push(this.attributes)}}class Jre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{x:"x",y:"y"})}}class Zre extends Te{constructor(){super("a:off"),this.root.push(new Jre({x:0,y:0}))}}class Qre extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{flipVertical:"flipV",flipHorizontal:"flipH",rotation:"rot"})}}class ene extends Te{constructor(e){var r,n;super("a:xfrm"),Ae(this,"extents"),this.root.push(new Qre({flipVertical:(r=e.flip)==null?void 0:r.vertical,flipHorizontal:(n=e.flip)==null?void 0:n.horizontal,rotation:e.rotation})),this.extents=new Yre(e.emus.x,e.emus.y),this.root.push(new Zre),this.root.push(this.extents)}}const X3=()=>new hr({name:"a:noFill"}),tne=t=>new hr({name:"a:schemeClr",attributes:{value:{key:"val",value:t.value}}}),rne=t=>new hr({name:"a:srgbClr",attributes:{value:{key:"val",value:t.value}}}),ZA=t=>new hr({name:"a:solidFill",children:[t.type==="rgb"?rne(t):tne(t)]}),nne=t=>new hr({name:"a:ln",attributes:{width:{key:"w",value:t.width},cap:{key:"cap",value:t.cap},compoundLine:{key:"cmpd",value:t.compoundLine},align:{key:"algn",value:t.align}},children:[t.type==="noFill"?X3():t.solidFillType==="rgb"?ZA({type:"rgb",value:t.value}):ZA({type:"scheme",value:t.value})]});class ine extends Te{constructor(){super("a:avLst")}}class one extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{prst:"prst"})}}class sne extends Te{constructor(){super("a:prstGeom"),this.root.push(new one({prst:"rect"})),this.root.push(new ine)}}class ane extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{bwMode:"bwMode"})}}class lne extends Te{constructor({outline:e,transform:r}){super("pic:spPr"),Ae(this,"form"),this.root.push(new ane({bwMode:"auto"})),this.form=new ene(r),this.root.push(this.form),this.root.push(new sne),e&&(this.root.push(X3()),this.root.push(nne(e)))}}class cne extends Te{constructor({mediaData:e,transform:r,outline:n}){super("pic:pic"),this.root.push(new qre({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.root.push(new Kre),this.root.push(new Hre(e)),this.root.push(new lne({transform:r,outline:n}))}}class une extends Te{constructor({mediaData:e,transform:r,outline:n}){super("a:graphicData"),Ae(this,"pic"),this.root.push(new Nre({uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.pic=new cne({mediaData:e,transform:r,outline:n}),this.root.push(this.pic)}}class dne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{a:"xmlns:a"})}}class Y3 extends Te{constructor({mediaData:e,transform:r,outline:n}){super("a:graphic"),Ae(this,"data"),this.root.push(new dne({a:"http://schemas.openxmlformats.org/drawingml/2006/main"})),this.data=new une({mediaData:e,transform:r,outline:n}),this.root.push(this.data)}}const xm={NONE:0,SQUARE:1,TIGHT:2,TOP_AND_BOTTOM:3},fne={BOTH_SIDES:"bothSides",LEFT:"left",RIGHT:"right",LARGEST:"largest"};class QA extends Te{constructor(){super("wp:wrapNone")}}class hne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{distT:"distT",distB:"distB",distL:"distL",distR:"distR",wrapText:"wrapText"})}}class pne extends Te{constructor(e,r={top:0,bottom:0,left:0,right:0}){super("wp:wrapSquare"),this.root.push(new hne({wrapText:e.side||fne.BOTH_SIDES,distT:r.top,distB:r.bottom,distL:r.left,distR:r.right}))}}class mne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{distT:"distT",distB:"distB"})}}class gne extends Te{constructor(e={top:0,bottom:0}){super("wp:wrapTight"),this.root.push(new mne({distT:e.top,distB:e.bottom}))}}class yne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{distT:"distT",distB:"distB"})}}class vne extends Te{constructor(e={top:0,bottom:0}){super("wp:wrapTopAndBottom"),this.root.push(new yne({distT:e.top,distB:e.bottom}))}}class J3 extends Te{constructor({name:e,description:r,title:n}={name:"",description:"",title:""}){super("wp:docPr"),Ae(this,"docPropertiesUniqueNumericId",Sre()),this.root.push(new bs({id:{key:"id",value:this.docPropertiesUniqueNumericId()},name:{key:"name",value:e},description:{key:"descr",value:r},title:{key:"title",value:n}}))}prepForXml(e){for(let r=e.stack.length-1;r>=0;r--){const n=e.stack[r];if(n instanceof gv){this.root.push(q3(n.linkId,!0));break}}return super.prepForXml(e)}}const Z3=({top:t,right:e,bottom:r,left:n})=>new hr({name:"wp:effectExtent",attributes:{top:{key:"t",value:t},right:{key:"r",value:e},bottom:{key:"b",value:r},left:{key:"l",value:n}}});class bne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{cx:"cx",cy:"cy"})}}class Q3 extends Te{constructor(e,r){super("wp:extent"),Ae(this,"attributes"),this.attributes=new bne({cx:e,cy:r}),this.root.push(this.attributes)}}class wne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{xmlns:"xmlns:a",noChangeAspect:"noChangeAspect"})}}class xne extends Te{constructor(){super("a:graphicFrameLocks"),this.root.push(new wne({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:1}))}}class eP extends Te{constructor(){super("wp:cNvGraphicFramePr"),this.root.push(new xne)}}class Sne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{distT:"distT",distB:"distB",distL:"distL",distR:"distR",allowOverlap:"allowOverlap",behindDoc:"behindDoc",layoutInCell:"layoutInCell",locked:"locked",relativeHeight:"relativeHeight",simplePos:"simplePos"})}}class kne extends Te{constructor({mediaData:e,transform:r,drawingOptions:n}){super("wp:anchor");const i=vt({allowOverlap:!0,behindDocument:!1,lockAnchor:!1,layoutInCell:!0,verticalPosition:{},horizontalPosition:{}},n.floating);if(this.root.push(new Sne({distT:i.margins&&i.margins.top||0,distB:i.margins&&i.margins.bottom||0,distL:i.margins&&i.margins.left||0,distR:i.margins&&i.margins.right||0,simplePos:"0",allowOverlap:i.allowOverlap===!0?"1":"0",behindDoc:i.behindDocument===!0?"1":"0",locked:i.lockAnchor===!0?"1":"0",layoutInCell:i.layoutInCell===!0?"1":"0",relativeHeight:i.zIndex?i.zIndex:r.emus.y})),this.root.push(new Are),this.root.push(new Ire(i.horizontalPosition)),this.root.push(new Mre(i.verticalPosition)),this.root.push(new Q3(r.emus.x,r.emus.y)),this.root.push(Z3({top:0,right:0,bottom:0,left:0})),n.floating!==void 0&&n.floating.wrap!==void 0)switch(n.floating.wrap.type){case xm.SQUARE:this.root.push(new pne(n.floating.wrap,n.floating.margins));break;case xm.TIGHT:this.root.push(new gne(n.floating.margins));break;case xm.TOP_AND_BOTTOM:this.root.push(new vne(n.floating.margins));break;case xm.NONE:default:this.root.push(new QA)}else this.root.push(new QA);this.root.push(new J3(n.docProperties)),this.root.push(new eP),this.root.push(new Y3({mediaData:e,transform:r,outline:n.outline}))}}const _ne=({mediaData:t,transform:e,docProperties:r,outline:n})=>{var i,o,s,a;return new hr({name:"wp:inline",attributes:{distanceTop:{key:"distT",value:0},distanceBottom:{key:"distB",value:0},distanceLeft:{key:"distL",value:0},distanceRight:{key:"distR",value:0}},children:[new Q3(e.emus.x,e.emus.y),Z3(n?{top:((i=n.width)!=null?i:9525)*2,right:((o=n.width)!=null?o:9525)*2,bottom:((s=n.width)!=null?s:9525)*2,left:((a=n.width)!=null?a:9525)*2}:{top:0,right:0,bottom:0,left:0}),new J3(r),new eP,new Y3({mediaData:t,transform:e,outline:n})]})};class Ene extends Te{constructor(e,r={}){super("w:drawing"),r.floating?this.root.push(new kne({mediaData:e,transform:e.transformation,drawingOptions:r})):this.root.push(_ne({mediaData:e,transform:e.transformation,docProperties:r.docProperties,outline:r.outline}))}}const Cne=t=>{if(typeof atob=="function"){const e=";base64,",r=t.indexOf(e),n=r===-1?0:r+e.length;return new Uint8Array(atob(t.substring(n)).split("").map(i=>i.charCodeAt(0)))}else{const e=require("buffer");return new e.Buffer(t,"base64")}},Tne=t=>typeof t=="string"?Cne(t):t,k0=(t,e)=>({data:Tne(t.data),fileName:e,transformation:{pixels:{x:Math.round(t.transformation.width),y:Math.round(t.transformation.height)},emus:{x:Math.round(t.transformation.width*9525),y:Math.round(t.transformation.height*9525)},flip:t.transformation.flip,rotation:t.transformation.rotation?t.transformation.rotation*6e4:void 0}});class Ane extends hc{constructor(e){super({}),Ae(this,"key"),Ae(this,"fallbackKey",`${xy()}.png`),Ae(this,"imageData"),this.key=`${xy()}.${e.type}`,this.imageData=e.type==="svg"?_a(vt({type:e.type},k0(e,this.key)),{fallback:vt({type:e.fallback.type},k0(_a(vt({},e.fallback),{transformation:e.transformation}),this.fallbackKey))}):vt({type:e.type},k0(e,this.key));const r=new Ene(this.imageData,{floating:e.floating,docProperties:e.altText,outline:e.outline});this.root.push(r)}prepForXml(e){return e.file.Media.addImage(this.key,this.imageData),this.imageData.type==="svg"&&e.file.Media.addImage(this.fallbackKey,this.imageData.fallback),super.prepForXml(e)}}class Rne extends Te{constructor(e){super("w:instrText"),this.root.push(new Ql({space:Zl.PRESERVE})),this.root.push(`SEQ ${e}`)}}class Ine extends hc{constructor(e){super({}),this.root.push(new Vf(!0)),this.root.push(new Rne(e)),this.root.push(new Gf),this.root.push(new Kf)}}class One extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{instr:"w:instr"})}}class Mne extends Te{constructor(e,r){super("w:fldSimple"),this.root.push(new One({instr:e})),r!==void 0&&this.root.push(new Li(r))}}class Nne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class Dne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}}class Pne extends Te{constructor({id:e,initials:r,author:n,date:i=new Date,children:o}){super("w:comment"),this.root.push(new Nne({id:e,initials:r,author:n,date:i.toISOString()}));for(const s of o)this.root.push(s)}}class Lne extends Te{constructor({children:e}){super("w:comments"),this.root.push(new Dne({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const r of e)this.root.push(new Pne(r))}}class Fne extends Te{constructor(){super("w:pageBreakBefore")}}const g1={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"};class jne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule"})}}class Bne extends Te{constructor(e){super("w:spacing"),this.root.push(new jne(e))}}const wu={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"};let Sm=class extends Te{constructor(e){super("w:pStyle"),this.root.push(new sr({val:e}))}};class zne extends Te{constructor(e){super("w:tabs");for(const r of e)this.root.push(new $ne(r))}}const Sy={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"},eR={MAX:9026};class Hne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val",pos:"w:pos",leader:"w:leader"})}}class $ne extends Te{constructor({type:e,position:r,leader:n}){super("w:tab"),this.root.push(new Hne({val:e,pos:r,leader:n}))}}class _0 extends Te{constructor(e,r){super("w:numPr"),this.root.push(new Une(r)),this.root.push(new Wne(e))}}class Une extends Te{constructor(e){if(super("w:ilvl"),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new sr({val:e}))}}class Wne extends Te{constructor(e){super("w:numId"),this.root.push(new sr({val:typeof e=="string"?`{${e}}`:e}))}}class tP extends Te{constructor(){super(...arguments),Ae(this,"fileChild",Symbol())}}class Vne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"})}}const Gne={EXTERNAL:"External"};class Kne extends Te{constructor(e,r,n,i){super("Relationship"),this.root.push(new Vne({id:e,type:r,target:n,targetMode:i}))}}class qne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}class gv extends Te{constructor(e,r,n){super("w:hyperlink"),Ae(this,"linkId"),this.linkId=r;const i={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},o=new qne(i);this.root.push(o),e.forEach(s=>{this.root.push(s)})}}class Xne extends gv{constructor(e){super(e.children,xy(),e.anchor)}}class rP extends Te{constructor(e){super("w:externalHyperlink"),this.options=e}}class Yne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class Jne extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{id:"w:id"})}}class nP{constructor(e){Ae(this,"bookmarkUniqueNumericId",kre()),Ae(this,"start"),Ae(this,"children"),Ae(this,"end");const r=this.bookmarkUniqueNumericId();this.start=new Zne(e.id,r),this.children=e.children,this.end=new Qne(r)}}class Zne extends Te{constructor(e,r){super("w:bookmarkStart");const n=new Yne({name:e,id:r});this.root.push(n)}}class Qne extends Te{constructor(e){super("w:bookmarkEnd");const r=new Jne({id:e});this.root.push(r)}}class eie extends Te{constructor(e){super("w:outlineLvl"),this.level=e,this.root.push(new sr({val:e}))}}class tie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{verticalAlign:"w:val"})}}class iP extends Te{constructor(e){super("w:vAlign"),this.root.push(new tie({verticalAlign:e}))}}const Gu={DEFAULT:"default",FIRST:"first",EVEN:"even"};class rie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{type:"w:type",id:"r:id"})}}const tR={HEADER:"w:headerReference",FOOTER:"w:footerReference"};class E0 extends Te{constructor(e,r){super(e),this.root.push(new rie({type:r.type||Gu.DEFAULT,id:`rId${r.id}`}))}}class nie extends Te{constructor({space:e,count:r,separate:n,equalWidth:i,children:o}){super("w:cols"),this.root.push(new bs({space:{key:"w:space",value:e===void 0?void 0:Br(e)},count:{key:"w:num",value:r===void 0?void 0:Zr(r)},separate:{key:"w:sep",value:n},equalWidth:{key:"w:equalWidth",value:i}})),!i&&o&&o.forEach(s=>this.addChildElement(s))}}class iie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{type:"w:type",linePitch:"w:linePitch",charSpace:"w:charSpace"})}}class oie extends Te{constructor(e,r,n){super("w:docGrid"),this.root.push(new iie({type:n,linePitch:Zr(e),charSpace:r?Zr(r):void 0}))}}const sie=({countBy:t,start:e,restart:r,distance:n})=>new hr({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:t===void 0?void 0:Zr(t)},start:{key:"w:start",value:e===void 0?void 0:Zr(e)},restart:{key:"w:restart",value:r},distance:{key:"w:distance",value:n===void 0?void 0:Br(n)}}});class rR extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class aie extends vs{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new rR({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new rR({})),e.pageBorderTop&&this.root.push(new jt("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(new jt("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(new jt("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(new jt("w:right",e.pageBorderRight))}}class lie extends Te{constructor(e,r,n,i,o,s,a){super("w:pgMar"),this.root.push(new bs({top:{key:"w:top",value:ss(e)},right:{key:"w:right",value:Br(r)},bottom:{key:"w:bottom",value:ss(n)},left:{key:"w:left",value:Br(i)},header:{key:"w:header",value:Br(o)},footer:{key:"w:footer",value:Br(s)},gutter:{key:"w:gutter",value:Br(a)}}))}}class cie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{start:"w:start",formatType:"w:fmt",separator:"w:chapSep"})}}class uie extends Te{constructor({start:e,formatType:r,separator:n}){super("w:pgNumType"),this.root.push(new cie({start:e===void 0?void 0:Zr(e),formatType:r,separator:n}))}}const oP={PORTRAIT:"portrait",LANDSCAPE:"landscape"};class die extends Te{constructor(e,r,n){super("w:pgSz");const i=n===oP.LANDSCAPE,o=Br(e),s=Br(r);this.root.push(new bs({width:{key:"w:w",value:i?s:o},height:{key:"w:h",value:i?o:s},orientation:{key:"w:orient",value:n}}))}}class fie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class hie extends Te{constructor(e){super("w:textDirection"),this.root.push(new fie({val:e}))}}const pie={NEXT_PAGE:"nextPage",NEXT_COLUMN:"nextColumn",CONTINUOUS:"continuous",EVEN_PAGE:"evenPage",ODD_PAGE:"oddPage"};class mie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class gie extends Te{constructor(e){super("w:type"),this.root.push(new mie({val:e}))}}const wl={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},C0={WIDTH:11906,HEIGHT:16838,ORIENTATION:oP.PORTRAIT};class yie extends Te{constructor({page:{size:{width:e=C0.WIDTH,height:r=C0.HEIGHT,orientation:n=C0.ORIENTATION}={},margin:{top:i=wl.TOP,right:o=wl.RIGHT,bottom:s=wl.BOTTOM,left:a=wl.LEFT,header:l=wl.HEADER,footer:c=wl.FOOTER,gutter:d=wl.GUTTER}={},pageNumbers:f={},borders:p,textDirection:m}={},grid:{linePitch:g=360,charSpace:b,type:S}={},headerWrapperGroup:w={},footerWrapperGroup:T={},lineNumbers:M,titlePage:j,verticalAlign:$,column:W,type:Y}={}){super("w:sectPr"),this.addHeaderFooterGroup(tR.HEADER,w),this.addHeaderFooterGroup(tR.FOOTER,T),Y&&this.root.push(new gie(Y)),this.root.push(new die(e,r,n)),this.root.push(new lie(i,o,s,a,l,c,d)),p&&this.root.push(new aie(p)),M&&this.root.push(sie(M)),this.root.push(new uie(f)),W&&this.root.push(new nie(W)),$&&this.root.push(new iP($)),j!==void 0&&this.root.push(new Be("w:titlePg",j)),m&&this.root.push(new hie(m)),this.root.push(new oie(g,b,S))}addHeaderFooterGroup(e,r){r.default&&this.root.push(new E0(e,{type:Gu.DEFAULT,id:r.default.View.ReferenceId})),r.first&&this.root.push(new E0(e,{type:Gu.FIRST,id:r.first.View.ReferenceId})),r.even&&this.root.push(new E0(e,{type:Gu.EVEN,id:r.even.View.ReferenceId}))}}class vie extends Te{constructor(){super("w:body"),Ae(this,"sections",[])}addSection(e){const r=this.sections.pop();this.root.push(this.createSectionParagraph(r)),this.sections.push(new yie(e))}prepForXml(e){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const r=new va({}),n=new md({});return n.push(e),r.addChildElement(n),r}}class ep extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",aink:"xmlns:aink",am3d:"xmlns:am3d",w16cex:"xmlns:w16cex",w16cid:"xmlns:w16cid",w16:"xmlns:w16",w16sdtdh:"xmlns:w16sdtdh",w16se:"xmlns:w16se"})}}class bie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class wie extends Te{constructor(e){super("w:background"),this.root.push(new bie({color:e.color===void 0?void 0:pd(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:YA(e.themeShade),themeTint:e.themeTint===void 0?void 0:YA(e.themeTint)}))}}class xie extends Te{constructor(e){super("w:document"),Ae(this,"body"),this.root.push(new ep({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",Ignorable:"w14 w15 wp14"})),this.body=new vie,e.background&&this.root.push(new wie(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class Sie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{xmlns:"xmlns"})}}class Md extends Te{constructor(){super("Relationships"),this.root.push(new Sie({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}createRelationship(e,r,n,i){const o=new Kne(`rId${e}`,r,n,i);return this.root.push(o),o}get RelationshipCount(){return this.root.length-1}}class sP{constructor(e){Ae(this,"document"),Ae(this,"relationships"),this.document=new xie(e),this.relationships=new Md}get View(){return this.document}get Relationships(){return this.relationships}}class kie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class _ie extends Te{constructor(){super("w:wordWrap"),this.root.push(new kie({val:0}))}}const Eie=t=>{var e,r;return new hr({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:t.anchorLock},dropCap:{key:"w:dropCap",value:t.dropCap},width:{key:"w:w",value:t.width},height:{key:"w:h",value:t.height},x:{key:"w:x",value:t.position?t.position.x:void 0},y:{key:"w:y",value:t.position?t.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:t.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:t.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(e=t.space)==null?void 0:e.horizontal},spaceVertical:{key:"w:vSpace",value:(r=t.space)==null?void 0:r.vertical},rule:{key:"w:hRule",value:t.rule},alignmentX:{key:"w:xAlign",value:t.alignment?t.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:t.alignment?t.alignment.y:void 0},lines:{key:"w:lines",value:t.lines},wrap:{key:"w:wrap",value:t.wrap}}})};class md extends vs{constructor(e){var r,n;if(super("w:pPr"),Ae(this,"numberingReferences",[]),!e)return this;e.heading&&this.push(new Sm(e.heading)),e.bullet&&this.push(new Sm("ListParagraph")),e.numbering&&!e.style&&!e.heading&&(e.numbering.custom||this.push(new Sm("ListParagraph"))),e.style&&this.push(new Sm(e.style)),e.keepNext!==void 0&&this.push(new Be("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new Be("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new Fne),e.frame&&this.push(Eie(e.frame)),e.widowControl!==void 0&&this.push(new Be("w:widowControl",e.widowControl)),e.bullet&&this.push(new _0(1,e.bullet.level)),e.numbering?(this.numberingReferences.push({reference:e.numbering.reference,instance:(r=e.numbering.instance)!=null?r:0}),this.push(new _0(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))):e.numbering===!1&&this.push(new _0(0,0)),e.border&&this.push(new qte(e.border)),e.thematicBreak&&this.push(new Xte),e.shading&&this.push(new pv(e.shading)),e.wordWrap&&this.push(new _ie),e.overflowPunctuation&&this.push(new Be("w:overflowPunct",e.overflowPunctuation));const i=[...e.rightTabStop!==void 0?[{type:Sy.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:Sy.LEFT,position:e.leftTabStop}]:[]];i.length>0&&this.push(new zne(i)),e.bidirectional!==void 0&&this.push(new Be("w:bidi",e.bidirectional)),e.spacing&&this.push(new Bne(e.spacing)),e.indent&&this.push(new Yte(e.indent)),e.contextualSpacing!==void 0&&this.push(new Be("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(new U3(e.alignment)),e.outlineLevel!==void 0&&this.push(new eie(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new Be("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new Be("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new fc(e.run))}push(e){this.root.push(e)}prepForXml(e){if(e.viewWrapper instanceof sP)for(const r of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(r.reference,r.instance);return super.prepForXml(e)}}class va extends tP{constructor(e){if(super("w:p"),Ae(this,"properties"),typeof e=="string")return this.properties=new md({}),this.root.push(this.properties),this.root.push(new Li(e)),this;if(this.properties=new md(e),this.root.push(this.properties),e.text&&this.root.push(new Li(e.text)),e.children)for(const r of e.children){if(r instanceof nP){this.root.push(r.start);for(const n of r.children)this.root.push(n);this.root.push(r.end);continue}this.root.push(r)}}prepForXml(e){for(const r of this.root)if(r instanceof rP){const n=this.root.indexOf(r),i=new gv(r.options.children,xy());e.viewWrapper.Relationships.createRelationship(i.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",r.options.link,Gne.EXTERNAL),this.root[n]=i}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}let nR=class extends Te{constructor(e){super("m:oMath");for(const r of e.children)this.root.push(r)}};class Cie extends Te{constructor(e){super("m:t"),this.root.push(e)}}class iR extends Te{constructor(e){super("m:r"),this.root.push(new Cie(e))}}class Tie extends Te{constructor(e){super("w:tblGrid");for(const r of e)this.root.push(new Aie(r))}}class Aie extends Te{constructor(e){super("w:gridCol"),e!==void 0&&this.root.push(new bs({width:{key:"w:w",value:Br(e)}}))}}const aP={TABLE:"w:tblCellMar",TABLE_CELL:"w:tcMar"};class lP extends vs{constructor(e,{marginUnitType:r=y1.DXA,top:n,left:i,bottom:o,right:s}){super(e),n!==void 0&&this.root.push(new Dl("w:top",{type:r,size:n})),i!==void 0&&this.root.push(new Dl("w:left",{type:r,size:i})),o!==void 0&&this.root.push(new Dl("w:bottom",{type:r,size:o})),s!==void 0&&this.root.push(new Dl("w:right",{type:r,size:s}))}}const y1={AUTO:"auto",DXA:"dxa",NIL:"nil",PERCENTAGE:"pct"};class Dl extends Te{constructor(e,{type:r=y1.AUTO,size:n}){super(e);let i=n;r===y1.PERCENTAGE&&typeof n=="number"&&(i=`${n}%`),this.root.push(new bs({type:{key:"w:type",value:r},size:{key:"w:w",value:Hte(i)}}))}}class Rie extends vs{constructor(e){super("w:tcBorders"),e.top&&this.root.push(new jt("w:top",e.top)),e.start&&this.root.push(new jt("w:start",e.start)),e.left&&this.root.push(new jt("w:left",e.left)),e.bottom&&this.root.push(new jt("w:bottom",e.bottom)),e.end&&this.root.push(new jt("w:end",e.end)),e.right&&this.root.push(new jt("w:right",e.right))}}class Iie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class Oie extends Te{constructor(e){super("w:gridSpan"),this.root.push(new Iie({val:Zr(e)}))}}const cP={CONTINUE:"continue",RESTART:"restart"};class Mie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class oR extends Te{constructor(e){super("w:vMerge"),this.root.push(new Mie({val:e}))}}class Nie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class Die extends Te{constructor(e){super("w:textDirection"),this.root.push(new Nie({val:e}))}}class Pie extends vs{constructor(e){super("w:tcPr"),e.width&&this.root.push(new Dl("w:tcW",e.width)),e.columnSpan&&this.root.push(new Oie(e.columnSpan)),e.verticalMerge?this.root.push(new oR(e.verticalMerge)):e.rowSpan&&e.rowSpan>1&&this.root.push(new oR(cP.RESTART)),e.borders&&this.root.push(new Rie(e.borders)),e.shading&&this.root.push(new pv(e.shading)),e.margins&&this.root.push(new lP(aP.TABLE_CELL,e.margins)),e.textDirection&&this.root.push(new Die(e.textDirection)),e.verticalAlign&&this.root.push(new iP(e.verticalAlign))}}class yk extends Te{constructor(e){super("w:tc"),this.options=e,this.root.push(new Pie(e));for(const r of e.children)this.root.push(r)}prepForXml(e){return this.root[this.root.length-1]instanceof va||this.root.push(new va({})),super.prepForXml(e)}}const xu={style:pk.NONE,size:0,color:"auto"},Su={style:pk.SINGLE,size:4,color:"auto"};class uP extends Te{constructor(e){super("w:tblBorders"),e.top?this.root.push(new jt("w:top",e.top)):this.root.push(new jt("w:top",Su)),e.left?this.root.push(new jt("w:left",e.left)):this.root.push(new jt("w:left",Su)),e.bottom?this.root.push(new jt("w:bottom",e.bottom)):this.root.push(new jt("w:bottom",Su)),e.right?this.root.push(new jt("w:right",e.right)):this.root.push(new jt("w:right",Su)),e.insideHorizontal?this.root.push(new jt("w:insideH",e.insideHorizontal)):this.root.push(new jt("w:insideH",Su)),e.insideVertical?this.root.push(new jt("w:insideV",e.insideVertical)):this.root.push(new jt("w:insideV",Su))}}Ae(uP,"NONE",{top:xu,bottom:xu,left:xu,right:xu,insideHorizontal:xu,insideVertical:xu});class Lie extends Te{constructor({horizontalAnchor:e,verticalAnchor:r,absoluteHorizontalPosition:n,relativeHorizontalPosition:i,absoluteVerticalPosition:o,relativeVerticalPosition:s,bottomFromText:a,topFromText:l,leftFromText:c,rightFromText:d,overlap:f}){super("w:tblpPr"),this.root.push(new bs({leftFromText:{key:"w:leftFromText",value:c===void 0?void 0:Br(c)},rightFromText:{key:"w:rightFromText",value:d===void 0?void 0:Br(d)},topFromText:{key:"w:topFromText",value:l===void 0?void 0:Br(l)},bottomFromText:{key:"w:bottomFromText",value:a===void 0?void 0:Br(a)},absoluteHorizontalPosition:{key:"w:tblpX",value:n===void 0?void 0:ss(n)},absoluteVerticalPosition:{key:"w:tblpY",value:o===void 0?void 0:ss(o)},horizontalAnchor:{key:"w:horzAnchor",value:e===void 0?void 0:e},relativeHorizontalPosition:{key:"w:tblpXSpec",value:i},relativeVerticalPosition:{key:"w:tblpYSpec",value:s},verticalAnchor:{key:"w:vertAnchor",value:r}})),f&&this.root.push(new Vte("w:tblOverlap",f))}}class Fie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{type:"w:type"})}}class jie extends Te{constructor(e){super("w:tblLayout"),this.root.push(new Fie({type:e}))}}class Bie extends vs{constructor(e){super("w:tblPr"),e.style&&this.root.push(new $l("w:tblStyle",e.style)),e.float&&this.root.push(new Lie(e.float)),e.visuallyRightToLeft!==void 0&&this.root.push(new Be("w:bidiVisual",e.visuallyRightToLeft)),e.width&&this.root.push(new Dl("w:tblW",e.width)),e.alignment&&this.root.push(new U3(e.alignment)),e.indent&&this.root.push(new Dl("w:tblInd",e.indent)),e.borders&&this.root.push(new uP(e.borders)),e.shading&&this.root.push(new pv(e.shading)),e.layout&&this.root.push(new jie(e.layout)),e.cellMargin&&this.root.push(new lP(aP.TABLE,e.cellMargin))}}class zie extends tP{constructor({rows:e,width:r,columnWidths:n=Array(Math.max(...e.map(p=>p.CellCount))).fill(100),margins:i,indent:o,float:s,layout:a,style:l,borders:c,alignment:d,visuallyRightToLeft:f}){super("w:tbl"),this.root.push(new Bie({borders:c??{},width:r??{size:100},indent:o,float:s,layout:a,style:l,alignment:d,cellMargin:i,visuallyRightToLeft:f})),this.root.push(new Tie(n));for(const p of e)this.root.push(p);e.forEach((p,m)=>{if(m===e.length-1)return;let g=0;p.cells.forEach(b=>{if(b.options.rowSpan&&b.options.rowSpan>1){const S=new yk({rowSpan:b.options.rowSpan-1,columnSpan:b.options.columnSpan,borders:b.options.borders,children:[],verticalMerge:cP.CONTINUE});e[m+1].addCellToColumnIndex(S,g)}g+=b.options.columnSpan||1})})}}class Hie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{value:"w:val",rule:"w:hRule"})}}class $ie extends Te{constructor(e,r){super("w:trHeight"),this.root.push(new Hie({value:Br(e),rule:r}))}}class Uie extends vs{constructor(e){super("w:trPr"),e.cantSplit!==void 0&&this.root.push(new Be("w:cantSplit",e.cantSplit)),e.tableHeader!==void 0&&this.root.push(new Be("w:tblHeader",e.tableHeader)),e.height&&this.root.push(new $ie(e.height.value,e.height.rule))}}class Wie extends Te{constructor(e){super("w:tr"),this.options=e,this.root.push(new Uie(e));for(const r of e.children)this.root.push(r)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter(e=>e instanceof yk)}addCellToIndex(e,r){this.root.splice(r+1,0,e)}addCellToColumnIndex(e,r){const n=this.columnIndexToRootIndex(r,!0);this.addCellToIndex(e,n-1)}rootIndexToColumnIndex(e){if(e<1||e>=this.root.length)throw new Error(`cell 'rootIndex' should between 1 to ${this.root.length-1}`);let r=0;for(let n=1;n<e;n++){const i=this.root[n];r+=i.options.columnSpan||1}return r}columnIndexToRootIndex(e,r=!1){if(e<0)throw new Error("cell 'columnIndex' should not less than zero");let n=0,i=1;for(;n<=e;){if(i>=this.root.length){if(r)return this.root.length;throw new Error(`cell 'columnIndex' should not great than ${n-1}`)}const o=this.root[i];i+=1,n+=o&&o.options.columnSpan||1}return i-1}}class Vie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Gie extends Te{constructor(){super("Properties"),this.root.push(new Vie({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class Kie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{xmlns:"xmlns"})}}class qie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{contentType:"ContentType",extension:"Extension"})}}class Jo extends Te{constructor(e,r){super("Default"),this.root.push(new qie({contentType:e,extension:r}))}}class Xie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{contentType:"ContentType",partName:"PartName"})}}class fi extends Te{constructor(e,r){super("Override"),this.root.push(new Xie({contentType:e,partName:r}))}}class Yie extends Te{constructor(){super("Types"),this.root.push(new Kie({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(new Jo("image/png","png")),this.root.push(new Jo("image/jpeg","jpeg")),this.root.push(new Jo("image/jpeg","jpg")),this.root.push(new Jo("image/bmp","bmp")),this.root.push(new Jo("image/gif","gif")),this.root.push(new Jo("image/svg+xml","svg")),this.root.push(new Jo("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(new Jo("application/xml","xml")),this.root.push(new Jo("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(new fi("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(e){this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}class Jie extends Te{constructor(e){super("cp:coreProperties"),this.root.push(new ep({cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"})),e.title&&this.root.push(new bl("dc:title",e.title)),e.subject&&this.root.push(new bl("dc:subject",e.subject)),e.creator&&this.root.push(new bl("dc:creator",e.creator)),e.keywords&&this.root.push(new bl("cp:keywords",e.keywords)),e.description&&this.root.push(new bl("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new bl("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new bl("cp:revision",String(e.revision))),this.root.push(new sR("dcterms:created")),this.root.push(new sR("dcterms:modified"))}}class sR extends Te{constructor(e){super(e),this.root.push(new ep({type:"dcterms:W3CDTF"})),this.root.push(Wte(new Date))}}class Zie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Qie extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{fmtid:"fmtid",pid:"pid",name:"name"})}}class eoe extends Te{constructor(e,r){super("property"),this.root.push(new Qie({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:r.name})),this.root.push(new toe(r.value))}}class toe extends Te{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class roe extends Te{constructor(e){super("Properties"),Ae(this,"nextId"),Ae(this,"properties",[]),this.root.push(new Zie({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const r of e)this.addCustomProperty(r)}prepForXml(e){return this.properties.forEach(r=>this.root.push(r)),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new eoe(this.nextId++,e))}}class noe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}}let ioe=class extends z3{constructor(e,r){super("w:ftr",r),Ae(this,"refId"),this.refId=e,r||this.root.push(new noe({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class ooe{constructor(e,r,n){Ae(this,"footer"),Ae(this,"relationships"),this.media=e,this.footer=new ioe(r,n),this.relationships=new Md}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class soe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class aoe extends Te{constructor(){super("w:footnoteRef")}}class loe extends hc{constructor(){super({style:"FootnoteReference"}),this.root.push(new aoe)}}const aR={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class T0 extends Te{constructor(e){super("w:footnote"),this.root.push(new soe({type:e.type,id:e.id}));for(let r=0;r<e.children.length;r++){const n=e.children[r];r===0&&n.addRunToFront(new loe),this.root.push(n)}}}class coe extends Te{constructor(){super("w:continuationSeparator")}}class uoe extends hc{constructor(){super({}),this.root.push(new coe)}}class doe extends Te{constructor(){super("w:separator")}}class foe extends hc{constructor(){super({}),this.root.push(new doe)}}class hoe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class poe extends Te{constructor(){super("w:footnotes"),this.root.push(new hoe({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new T0({id:-1,type:aR.SEPERATOR,children:[new va({spacing:{after:0,line:240,lineRule:g1.AUTO},children:[new foe]})]});this.root.push(e);const r=new T0({id:0,type:aR.CONTINUATION_SEPERATOR,children:[new va({spacing:{after:0,line:240,lineRule:g1.AUTO},children:[new uoe]})]});this.root.push(r)}createFootNote(e,r){const n=new T0({id:e,children:r});this.root.push(n)}}class moe{constructor(){Ae(this,"footnotess"),Ae(this,"relationships"),this.footnotess=new poe,this.relationships=new Md}get View(){return this.footnotess}get Relationships(){return this.relationships}}class goe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"})}}let yoe=class extends z3{constructor(e,r){super("w:hdr",r),Ae(this,"refId"),this.refId=e,r||this.root.push(new goe({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class voe{constructor(e,r,n){Ae(this,"header"),Ae(this,"relationships"),this.media=e,this.header=new yoe(r,n),this.relationships=new Md}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}}class boe{constructor(){Ae(this,"map"),this.map=new Map}addImage(e,r){this.map.set(e,r)}get Array(){return Array.from(this.map.values())}}const $n={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH__DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULLSTOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PARENTHESES:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW1:"hebrew1",HEBREW2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText",CUSTOM:"custom"};class woe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{ilvl:"w:ilvl",tentative:"w15:tentative"})}}class xoe extends Te{constructor(e){super("w:numFmt"),this.root.push(new sr({val:e}))}}class Soe extends Te{constructor(e){super("w:lvlText"),this.root.push(new sr({val:e}))}}class koe extends Te{constructor(e){super("w:lvlJc"),this.root.push(new sr({val:e}))}}class _oe extends Te{constructor(e){super("w:suff"),this.root.push(new sr({val:e}))}}class Eoe extends Te{constructor(){super("w:isLgl")}}class Coe extends Te{constructor({level:e,format:r,text:n,alignment:i=An.START,start:o=1,style:s,suffix:a,isLegalNumberingStyle:l}){if(super("w:lvl"),Ae(this,"paragraphProperties"),Ae(this,"runProperties"),this.root.push(new hk("w:start",Zr(o))),r&&this.root.push(new xoe(r)),a&&this.root.push(new _oe(a)),l&&this.root.push(new Eoe),n&&this.root.push(new Soe(n)),this.root.push(new koe(i)),this.paragraphProperties=new md(s&&s.paragraph),this.runProperties=new fc(s&&s.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new woe({ilvl:Zr(e),tentative:1}))}}class Toe extends Coe{}class Aoe extends Te{constructor(e){super("w:multiLevelType"),this.root.push(new sr({val:e}))}}class Roe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class lR extends Te{constructor(e,r){super("w:abstractNum"),Ae(this,"id"),this.root.push(new Roe({abstractNumId:Zr(e),restartNumberingAfterBreak:0})),this.root.push(new Aoe("hybridMultilevel")),this.id=e;for(const n of r)this.root.push(new Toe(n))}}class Ioe extends Te{constructor(e){super("w:abstractNumId"),this.root.push(new sr({val:e}))}}class Ooe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{numId:"w:numId"})}}class cR extends Te{constructor(e){if(super("w:num"),Ae(this,"numId"),Ae(this,"reference"),Ae(this,"instance"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new Ooe({numId:Zr(e.numId)})),this.root.push(new Ioe(Zr(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const r of e.overrideLevels)this.root.push(new Noe(r.num,r.start))}}class Moe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{ilvl:"w:ilvl"})}}class Noe extends Te{constructor(e,r){super("w:lvlOverride"),this.root.push(new Moe({ilvl:e})),r!==void 0&&this.root.push(new Poe(r))}}class Doe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class Poe extends Te{constructor(e){super("w:startOverride"),this.root.push(new Doe({val:e}))}}class Loe extends Te{constructor(e){super("w:numbering"),Ae(this,"abstractNumberingMap",new Map),Ae(this,"concreteNumberingMap",new Map),Ae(this,"referenceConfigMap",new Map),Ae(this,"abstractNumUniqueNumericId",wre()),Ae(this,"concreteNumUniqueNumericId",xre()),this.root.push(new ep({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const r=new lR(this.abstractNumUniqueNumericId(),[{level:0,format:$n.BULLET,text:"●",alignment:An.LEFT,style:{paragraph:{indent:{left:zn(.5),hanging:zn(.25)}}}},{level:1,format:$n.BULLET,text:"○",alignment:An.LEFT,style:{paragraph:{indent:{left:zn(1),hanging:zn(.25)}}}},{level:2,format:$n.BULLET,text:"■",alignment:An.LEFT,style:{paragraph:{indent:{left:2160,hanging:zn(.25)}}}},{level:3,format:$n.BULLET,text:"●",alignment:An.LEFT,style:{paragraph:{indent:{left:2880,hanging:zn(.25)}}}},{level:4,format:$n.BULLET,text:"○",alignment:An.LEFT,style:{paragraph:{indent:{left:3600,hanging:zn(.25)}}}},{level:5,format:$n.BULLET,text:"■",alignment:An.LEFT,style:{paragraph:{indent:{left:4320,hanging:zn(.25)}}}},{level:6,format:$n.BULLET,text:"●",alignment:An.LEFT,style:{paragraph:{indent:{left:5040,hanging:zn(.25)}}}},{level:7,format:$n.BULLET,text:"●",alignment:An.LEFT,style:{paragraph:{indent:{left:5760,hanging:zn(.25)}}}},{level:8,format:$n.BULLET,text:"●",alignment:An.LEFT,style:{paragraph:{indent:{left:6480,hanging:zn(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new cR({numId:1,abstractNumId:r.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",r);for(const n of e.config)this.abstractNumberingMap.set(n.reference,new lR(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}prepForXml(e){for(const r of this.abstractNumberingMap.values())this.root.push(r);for(const r of this.concreteNumberingMap.values())this.root.push(r);return super.prepForXml(e)}createConcreteNumberingInstance(e,r){const n=this.abstractNumberingMap.get(e);if(!n)return;const i=`${e}-${r}`;if(this.concreteNumberingMap.has(i))return;const o=this.referenceConfigMap.get(e),s=o&&o[0].start,a={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:r,overrideLevels:[s&&Number.isInteger(s)?{num:0,start:s}:{num:0,start:1}]};this.concreteNumberingMap.set(i,new cR(a))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class Foe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{version:"w:val",name:"w:name",uri:"w:uri"})}}class joe extends Te{constructor(e){super("w:compatSetting"),this.root.push(new Foe({version:e,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class Boe extends Te{constructor(e){super("w:compat"),e.version&&this.root.push(new joe(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new Be("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new Be("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new Be("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new Be("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new Be("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new Be("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new Be("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new Be("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new Be("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new Be("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new Be("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new Be("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new Be("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new Be("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new Be("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new Be("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new Be("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new Be("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new Be("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new Be("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new Be("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new Be("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new Be("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new Be("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new Be("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new Be("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new Be("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new Be("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new Be("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new Be("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new Be("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new Be("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new Be("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new Be("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new Be("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new Be("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new Be("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new Be("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new Be("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new Be("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new Be("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new Be("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new Be("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new Be("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new Be("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new Be("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new Be("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new Be("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new Be("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new Be("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new Be("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new Be("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new Be("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new Be("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new Be("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new Be("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new Be("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new Be("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new Be("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new Be("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new Be("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new Be("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new Be("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new Be("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new Be("w:cachedColBalance",e.cachedColumnBalance))}}class zoe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class Hoe extends Te{constructor(e){var r,n,i,o;super("w:settings"),this.root.push(new zoe({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new Be("w:displayBackgroundShape",!0)),e.trackRevisions!==void 0&&this.root.push(new Be("w:trackRevisions",e.trackRevisions)),e.evenAndOddHeaders!==void 0&&this.root.push(new Be("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new Be("w:updateFields",e.updateFields)),e.defaultTabStop!==void 0&&this.root.push(new hk("w:defaultTabStop",e.defaultTabStop)),this.root.push(new Boe(_a(vt({},(r=e.compatibility)!=null?r:{}),{version:(o=(i=(n=e.compatibility)==null?void 0:n.version)!=null?i:e.compatibilityModeVersion)!=null?o:15})))}}class dP extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{val:"w:val"})}}class $oe extends Te{constructor(e){super("w:name"),this.root.push(new dP({val:e}))}}class Uoe extends Te{constructor(e){super("w:uiPriority"),this.root.push(new dP({val:Zr(e)}))}}class Woe extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class fP extends Te{constructor(e,r){super("w:style"),this.root.push(new Woe(e)),r.name&&this.root.push(new $oe(r.name)),r.basedOn&&this.root.push(new $l("w:basedOn",r.basedOn)),r.next&&this.root.push(new $l("w:next",r.next)),r.link&&this.root.push(new $l("w:link",r.link)),r.uiPriority!==void 0&&this.root.push(new Uoe(r.uiPriority)),r.semiHidden!==void 0&&this.root.push(new Be("w:semiHidden",r.semiHidden)),r.unhideWhenUsed!==void 0&&this.root.push(new Be("w:unhideWhenUsed",r.unhideWhenUsed)),r.quickFormat!==void 0&&this.root.push(new Be("w:qFormat",r.quickFormat))}}class yv extends fP{constructor(e){super({type:"paragraph",styleId:e.id},e),Ae(this,"paragraphProperties"),Ae(this,"runProperties"),this.paragraphProperties=new md(e.paragraph),this.runProperties=new fc(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class vv extends fP{constructor(e){super({type:"character",styleId:e.id},vt({uiPriority:99,unhideWhenUsed:!0},e)),Ae(this,"runProperties"),this.runProperties=new fc(e.run),this.root.push(this.runProperties)}}class La extends yv{constructor(e){super(vt({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}}class Voe extends La{constructor(e){super(vt({id:"Title",name:"Title"},e))}}class Goe extends La{constructor(e){super(vt({id:"Heading1",name:"Heading 1"},e))}}class Koe extends La{constructor(e){super(vt({id:"Heading2",name:"Heading 2"},e))}}class qoe extends La{constructor(e){super(vt({id:"Heading3",name:"Heading 3"},e))}}class Xoe extends La{constructor(e){super(vt({id:"Heading4",name:"Heading 4"},e))}}class Yoe extends La{constructor(e){super(vt({id:"Heading5",name:"Heading 5"},e))}}class Joe extends La{constructor(e){super(vt({id:"Heading6",name:"Heading 6"},e))}}class Zoe extends La{constructor(e){super(vt({id:"Strong",name:"Strong"},e))}}class Qoe extends yv{constructor(e){super(vt({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class ese extends yv{constructor(e){super(vt({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:g1.AUTO}},run:{size:20}},e))}}class tse extends vv{constructor(e){super(vt({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class rse extends vv{constructor(e){super(vt({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class nse extends vv{constructor(e){super(vt({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:V3.SINGLE}}},e))}}class v1 extends Te{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const r of e.importedStyles)this.root.push(r);if(e.paragraphStyles)for(const r of e.paragraphStyles)this.root.push(new yv(r));if(e.characterStyles)for(const r of e.characterStyles)this.root.push(new vv(r))}}class ise extends Te{constructor(e){super("w:pPrDefault"),this.root.push(new md(e))}}class ose extends Te{constructor(e){super("w:rPrDefault"),this.root.push(new fc(e))}}class sse extends Te{constructor(e){super("w:docDefaults"),Ae(this,"runPropertiesDefaults"),Ae(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new ose(e.run),this.paragraphPropertiesDefaults=new ise(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class ase{newInstance(e){const r=B3.xml2js(e,{compact:!1});let n;for(const s of r.elements||[])s.name==="w:styles"&&(n=s);if(n===void 0)throw new Error("can not find styles element");const i=n.elements||[];return new v1({initialStyles:new jte(n.attributes),importedStyles:i.map(s=>dk(s))})}}class uR{newInstance(e={}){var r;return{initialStyles:new ep({mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",Ignorable:"w14 w15"}),importedStyles:[new sse((r=e.document)!=null?r:{}),new Voe(vt({run:{size:56}},e.title)),new Goe(vt({run:{color:"2E74B5",size:32}},e.heading1)),new Koe(vt({run:{color:"2E74B5",size:26}},e.heading2)),new qoe(vt({run:{color:"1F4D78",size:24}},e.heading3)),new Xoe(vt({run:{color:"2E74B5",italics:!0}},e.heading4)),new Yoe(vt({run:{color:"2E74B5"}},e.heading5)),new Joe(vt({run:{color:"1F4D78"}},e.heading6)),new Zoe(vt({run:{bold:!0}},e.strong)),new Qoe(e.listParagraph||{}),new nse(e.hyperlink||{}),new tse(e.footnoteReference||{}),new ese(e.footnoteText||{}),new rse(e.footnoteTextChar||{})]}}}const km=({id:t,fontKey:e,subsetted:r},n)=>new hr({name:n,attributes:vt({id:{key:"r:id",value:t}},e?{fontKey:{key:"w:fontKey",value:`{${e}}`}}:{}),children:[...r?[new Be("w:subsetted",r)]:[]]}),lse=({name:t,altName:e,panose1:r,charset:n,family:i,notTrueType:o,pitch:s,sig:a,embedRegular:l,embedBold:c,embedItalic:d,embedBoldItalic:f})=>new hr({name:"w:font",attributes:{name:{key:"w:name",value:t}},children:[...e?[Ff("w:altName",e)]:[],...r?[Ff("w:panose1",r)]:[],...n?[Ff("w:charset",n)]:[],...i?[Ff("w:family",i)]:[],...o?[new Be("w:notTrueType",o)]:[],...s?[Ff("w:pitch",s)]:[],...a?[new hr({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:a.usb0},usb1:{key:"w:usb1",value:a.usb1},usb2:{key:"w:usb2",value:a.usb2},usb3:{key:"w:usb3",value:a.usb3},csb0:{key:"w:csb0",value:a.csb0},csb1:{key:"w:csb1",value:a.csb1}}})]:[],...l?[km(l,"w:embedRegular")]:[],...c?[km(c,"w:embedBold")]:[],...d?[km(d,"w:embedItalic")]:[],...f?[km(f,"w:embedBoldItalic")]:[]]}),cse=({name:t,index:e,fontKey:r,characterSet:n})=>lse({name:t,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:r,id:`rId${e}`}}),use=t=>new hr({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:t.map((e,r)=>cse({name:e.name,index:r+1,fontKey:e.fontKey}))});class dse{constructor(e){Ae(this,"fontTable"),Ae(this,"relationships"),Ae(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(r=>_a(vt({},r),{fontKey:_re()})),this.fontTable=use(this.fontOptionsWithKey),this.relationships=new Md;for(let r=0;r<e.length;r++)this.relationships.createRelationship(r+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",`fonts/${e[r].name}.odttf`)}get View(){return this.fontTable}get Relationships(){return this.relationships}}let fse=class{constructor(e){Ae(this,"currentRelationshipId",1),Ae(this,"documentWrapper"),Ae(this,"headers",[]),Ae(this,"footers",[]),Ae(this,"coreProperties"),Ae(this,"numbering"),Ae(this,"media"),Ae(this,"fileRelationships"),Ae(this,"footnotesWrapper"),Ae(this,"settings"),Ae(this,"contentTypes"),Ae(this,"customProperties"),Ae(this,"appProperties"),Ae(this,"styles"),Ae(this,"comments"),Ae(this,"fontWrapper");var r,n,i,o,s,a,l,c;if(this.coreProperties=new Jie(_a(vt({},e),{creator:(r=e.creator)!=null?r:"Un-named",revision:(n=e.revision)!=null?n:1,lastModifiedBy:(i=e.lastModifiedBy)!=null?i:"Un-named"})),this.numbering=new Loe(e.numbering?e.numbering:{config:[]}),this.comments=new Lne((o=e.comments)!=null?o:{children:[]}),this.fileRelationships=new Md,this.customProperties=new roe((s=e.customProperties)!=null?s:[]),this.appProperties=new Gie,this.footnotesWrapper=new moe,this.contentTypes=new Yie,this.documentWrapper=new sP({background:e.background}),this.settings=new Hoe({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:(a=e.features)==null?void 0:a.trackRevisions,updateFields:(l=e.features)==null?void 0:l.updateFields,defaultTabStop:e.defaultTabStop}),this.media=new boe,e.externalStyles!==void 0){const d=new ase;this.styles=d.newInstance(e.externalStyles)}else if(e.styles){const f=new uR().newInstance(e.styles.default);this.styles=new v1(vt(vt({},f),e.styles))}else{const d=new uR;this.styles=new v1(d.newInstance())}this.addDefaultRelationships();for(const d of e.sections)this.addSection(d);if(e.footnotes)for(const d in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(d),e.footnotes[d].children);this.fontWrapper=new dse((c=e.fonts)!=null?c:[])}addSection({headers:e={},footers:r={},children:n,properties:i}){this.documentWrapper.View.Body.addSection(_a(vt({},i),{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:r.default?this.createFooter(r.default):void 0,first:r.first?this.createFooter(r.first):void 0,even:r.even?this.createFooter(r.even):void 0}}));for(const o of n)this.documentWrapper.View.add(o)}createHeader(e){const r=new voe(this.media,this.currentRelationshipId++);for(const n of e.options.children)r.add(n);return this.addHeaderToDocument(r),r}createFooter(e){const r=new ooe(this.media,this.currentRelationshipId++);for(const n of e.options.children)r.add(n);return this.addFooterToDocument(r),r}addHeaderToDocument(e,r=Gu.DEFAULT){this.headers.push({header:e,type:r}),this.documentWrapper.Relationships.createRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,r=Gu.DEFAULT){this.footers.push({footer:e,type:r}),this.documentWrapper.Relationships.createRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.createRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.createRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.createRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.createRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml")}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map(e=>e.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get FontTable(){return this.fontWrapper}};class hse extends Xe{constructor(){super(...arguments),Ae(this,"xmlKeys",{id:"w:id"})}}class pse extends Te{constructor(e){super("w:footnoteReference"),this.root.push(new hse({id:e}))}}class mse extends hc{constructor(e){super({style:"FootnoteReference"}),this.root.push(new pse(e))}}function _m(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var hP={exports:{}};(function(t,e){(function(r){t.exports=r()})(function(){return function r(n,i,o){function s(c,d){if(!i[c]){if(!n[c]){var f=typeof _m=="function"&&_m;if(!d&&f)return f(c,!0);if(a)return a(c,!0);var p=new Error("Cannot find module '"+c+"'");throw p.code="MODULE_NOT_FOUND",p}var m=i[c]={exports:{}};n[c][0].call(m.exports,function(g){var b=n[c][1][g];return s(b||g)},m,m.exports,r,n,i,o)}return i[c].exports}for(var a=typeof _m=="function"&&_m,l=0;l<o.length;l++)s(o[l]);return s}({1:[function(r,n,i){var o=r("./utils"),s=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var c,d,f,p,m,g,b,S=[],w=0,T=l.length,M=T,j=o.getTypeOf(l)!=="string";w<l.length;)M=T-w,f=j?(c=l[w++],d=w<T?l[w++]:0,w<T?l[w++]:0):(c=l.charCodeAt(w++),d=w<T?l.charCodeAt(w++):0,w<T?l.charCodeAt(w++):0),p=c>>2,m=(3&c)<<4|d>>4,g=1<M?(15&d)<<2|f>>6:64,b=2<M?63&f:64,S.push(a.charAt(p)+a.charAt(m)+a.charAt(g)+a.charAt(b));return S.join("")},i.decode=function(l){var c,d,f,p,m,g,b=0,S=0,w="data:";if(l.substr(0,w.length)===w)throw new Error("Invalid base64 input, it looks like a data url.");var T,M=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&M--,l.charAt(l.length-2)===a.charAt(64)&&M--,M%1!=0)throw new Error("Invalid base64 input, bad content length.");for(T=s.uint8array?new Uint8Array(0|M):new Array(0|M);b<l.length;)c=a.indexOf(l.charAt(b++))<<2|(p=a.indexOf(l.charAt(b++)))>>4,d=(15&p)<<4|(m=a.indexOf(l.charAt(b++)))>>2,f=(3&m)<<6|(g=a.indexOf(l.charAt(b++))),T[S++]=c,m!==64&&(T[S++]=d),g!==64&&(T[S++]=f);return T}},{"./support":30,"./utils":32}],2:[function(r,n,i){var o=r("./external"),s=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function c(d,f,p,m,g){this.compressedSize=d,this.uncompressedSize=f,this.crc32=p,this.compression=m,this.compressedContent=g}c.prototype={getContentWorker:function(){var d=new s(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new s(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,f,p){return d.pipe(new a).pipe(new l("uncompressedSize")).pipe(f.compressWorker(p)).pipe(new l("compressedSize")).withStreamInfo("compression",f)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,i){var o=r("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},i.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,i){var o=r("./utils"),s=function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(c,d,f,p){var m=s,g=p+f;c^=-1;for(var b=p;b<g;b++)c=c>>>8^m[255&(c^d[b])];return-1^c}(0|l,a,a.length,0):function(c,d,f,p){var m=s,g=p+f;c^=-1;for(var b=p;b<g;b++)c=c>>>8^m[255&(c^d.charCodeAt(b))];return-1^c}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(r,n,i){var o=null;o=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:o}},{lie:37}],7:[function(r,n,i){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),c=o?"uint8array":"array";function d(f,p){l.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=p,this.meta={}}i.magic="\b\0",a.inherits(d,l),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,f.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(p){f.push({data:p,meta:f.meta})}},i.compressWorker=function(f){return new d("Deflate",f)},i.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,i){function o(m,g){var b,S="";for(b=0;b<g;b++)S+=String.fromCharCode(255&m),m>>>=8;return S}function s(m,g,b,S,w,T){var M,j,$=m.file,W=m.compression,Y=T!==c.utf8encode,ee=a.transformTo("string",T($.name)),P=a.transformTo("string",c.utf8encode($.name)),fe=$.comment,de=a.transformTo("string",T(fe)),U=a.transformTo("string",c.utf8encode(fe)),ne=P.length!==$.name.length,R=U.length!==fe.length,le="",Ce="",he="",Fe=$.dir,ye=$.date,ze={crc32:0,compressedSize:0,uncompressedSize:0};g&&!b||(ze.crc32=m.crc32,ze.compressedSize=m.compressedSize,ze.uncompressedSize=m.uncompressedSize);var ue=0;g&&(ue|=8),Y||!ne&&!R||(ue|=2048);var V=0,me=0;Fe&&(V|=16),w==="UNIX"?(me=798,V|=function(ke,ce){var L=ke;return ke||(L=ce?16893:33204),(65535&L)<<16}($.unixPermissions,Fe)):(me=20,V|=function(ke){return 63&(ke||0)}($.dosPermissions)),M=ye.getUTCHours(),M<<=6,M|=ye.getUTCMinutes(),M<<=5,M|=ye.getUTCSeconds()/2,j=ye.getUTCFullYear()-1980,j<<=4,j|=ye.getUTCMonth()+1,j<<=5,j|=ye.getUTCDate(),ne&&(Ce=o(1,1)+o(d(ee),4)+P,le+="up"+o(Ce.length,2)+Ce),R&&(he=o(1,1)+o(d(de),4)+U,le+="uc"+o(he.length,2)+he);var ge="";return ge+=`
310
+ \0`,ge+=o(ue,2),ge+=W.magic,ge+=o(M,2),ge+=o(j,2),ge+=o(ze.crc32,4),ge+=o(ze.compressedSize,4),ge+=o(ze.uncompressedSize,4),ge+=o(ee.length,2),ge+=o(le.length,2),{fileRecord:f.LOCAL_FILE_HEADER+ge+ee+le,dirRecord:f.CENTRAL_FILE_HEADER+o(me,2)+ge+o(de.length,2)+"\0\0\0\0"+o(V,4)+o(S,4)+ee+le+de}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),f=r("../signature");function p(m,g,b,S){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=b,this.encodeFileName=S,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(p,l),p.prototype.push=function(m){var g=m.meta.percent||0,b=this.entriesCount,S=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,l.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:b?(g+100*(b-S-1))/b:100}}))},p.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var g=this.streamFiles&&!m.file.dir;if(g){var b=s(m,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:b.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(m){this.accumulate=!1;var g=this.streamFiles&&!m.file.dir,b=s(m,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(b.dirRecord),g)this.push({data:function(S){return f.DATA_DESCRIPTOR+o(S.crc32,4)+o(S.compressedSize,4)+o(S.uncompressedSize,4)}(m),meta:{percent:100}});else for(this.push({data:b.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var m=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var b=this.bytesWritten-m,S=function(w,T,M,j,$){var W=a.transformTo("string",$(j));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(w,2)+o(w,2)+o(T,4)+o(M,4)+o(W.length,2)+W}(this.dirRecords.length,b,m,this.zipComment,this.encodeFileName);this.push({data:S,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(m){this._sources.push(m);var g=this;return m.on("data",function(b){g.processChunk(b)}),m.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),m.on("error",function(b){g.error(b)}),this},p.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(m){var g=this._sources;if(!l.prototype.error.call(this,m))return!1;for(var b=0;b<g.length;b++)try{g[b].error(m)}catch{}return!0},p.prototype.lock=function(){l.prototype.lock.call(this);for(var m=this._sources,g=0;g<m.length;g++)m[g].lock()},n.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,i){var o=r("../compressions"),s=r("./ZipFileWorker");i.generateWorker=function(a,l,c){var d=new s(l.streamFiles,c,l.platform,l.encodeFileName),f=0;try{a.forEach(function(p,m){f++;var g=function(T,M){var j=T||M,$=o[j];if(!$)throw new Error(j+" is not a valid compression method !");return $}(m.options.compression,l.compression),b=m.options.compressionOptions||l.compressionOptions||{},S=m.dir,w=m.date;m._compressWorker(g,b).withStreamInfo("file",{name:p,dir:S,date:w,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(p){d.error(p)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,i){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new o;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(o.prototype=r("./object")).loadAsync=r("./load"),o.support=r("./support"),o.defaults=r("./defaults"),o.version="3.10.1",o.loadAsync=function(s,a){return new o().loadAsync(s,a)},o.external=r("./external"),n.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,i){var o=r("./utils"),s=r("./external"),a=r("./utf8"),l=r("./zipEntries"),c=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(p){return new s.Promise(function(m,g){var b=p.decompressed.getContentWorker().pipe(new c);b.on("error",function(S){g(S)}).on("end",function(){b.streamInfo.crc32!==p.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}n.exports=function(p,m){var g=this;return m=o.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(p)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",p,!0,m.optimizedBinaryString,m.base64).then(function(b){var S=new l(m);return S.load(b),S}).then(function(b){var S=[s.Promise.resolve(b)],w=b.files;if(m.checkCRC32)for(var T=0;T<w.length;T++)S.push(f(w[T]));return s.Promise.all(S)}).then(function(b){for(var S=b.shift(),w=S.files,T=0;T<w.length;T++){var M=w[T],j=M.fileNameStr,$=o.resolve(M.fileNameStr);g.file($,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:m.createFolders}),M.dir||(g.file($).unsafeOriginalName=j)}return S.zipComment.length&&(g.comment=S.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,i){var o=r("../utils"),s=r("../stream/GenericWorker");function a(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}o.inherits(a,s),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(d){c.push({data:d,meta:{percent:0}})}).on("error",function(d){c.isPaused?this.generatedError=d:c.error(d)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,i){var o=r("readable-stream").Readable;function s(a,l,c){o.call(this,l),this._helper=a;var d=this;a.on("data",function(f,p){d.push(f)||d._helper.pause(),c&&c(p)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}r("../utils").inherits(s,o),s.prototype._read=function(){this._helper.resume()},n.exports=s},{"../utils":32,"readable-stream":16}],14:[function(r,n,i){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,s);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,s)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var s=new Buffer(o);return s.fill(0),s},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(r,n,i){function o($,W,Y){var ee,P=a.getTypeOf(W),fe=a.extend(Y||{},d);fe.date=fe.date||new Date,fe.compression!==null&&(fe.compression=fe.compression.toUpperCase()),typeof fe.unixPermissions=="string"&&(fe.unixPermissions=parseInt(fe.unixPermissions,8)),fe.unixPermissions&&16384&fe.unixPermissions&&(fe.dir=!0),fe.dosPermissions&&16&fe.dosPermissions&&(fe.dir=!0),fe.dir&&($=w($)),fe.createFolders&&(ee=S($))&&T.call(this,ee,!0);var de=P==="string"&&fe.binary===!1&&fe.base64===!1;Y&&Y.binary!==void 0||(fe.binary=!de),(W instanceof f&&W.uncompressedSize===0||fe.dir||!W||W.length===0)&&(fe.base64=!1,fe.binary=!0,W="",fe.compression="STORE",P="string");var U=null;U=W instanceof f||W instanceof l?W:g.isNode&&g.isStream(W)?new b($,W):a.prepareContent($,W,fe.binary,fe.optimizedBinaryString,fe.base64);var ne=new p($,U,fe);this.files[$]=ne}var s=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),c=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),p=r("./zipObject"),m=r("./generate"),g=r("./nodejsUtils"),b=r("./nodejs/NodejsStreamInputAdapter"),S=function($){$.slice(-1)==="/"&&($=$.substring(0,$.length-1));var W=$.lastIndexOf("/");return 0<W?$.substring(0,W):""},w=function($){return $.slice(-1)!=="/"&&($+="/"),$},T=function($,W){return W=W!==void 0?W:d.createFolders,$=w($),this.files[$]||o.call(this,$,null,{dir:!0,createFolders:W}),this.files[$]};function M($){return Object.prototype.toString.call($)==="[object RegExp]"}var j={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function($){var W,Y,ee;for(W in this.files)ee=this.files[W],(Y=W.slice(this.root.length,W.length))&&W.slice(0,this.root.length)===this.root&&$(Y,ee)},filter:function($){var W=[];return this.forEach(function(Y,ee){$(Y,ee)&&W.push(ee)}),W},file:function($,W,Y){if(arguments.length!==1)return $=this.root+$,o.call(this,$,W,Y),this;if(M($)){var ee=$;return this.filter(function(fe,de){return!de.dir&&ee.test(fe)})}var P=this.files[this.root+$];return P&&!P.dir?P:null},folder:function($){if(!$)return this;if(M($))return this.filter(function(P,fe){return fe.dir&&$.test(P)});var W=this.root+$,Y=T.call(this,W),ee=this.clone();return ee.root=Y.name,ee},remove:function($){$=this.root+$;var W=this.files[$];if(W||($.slice(-1)!=="/"&&($+="/"),W=this.files[$]),W&&!W.dir)delete this.files[$];else for(var Y=this.filter(function(P,fe){return fe.name.slice(0,$.length)===$}),ee=0;ee<Y.length;ee++)delete this.files[Y[ee].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function($){var W,Y={};try{if((Y=a.extend($||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=Y.type.toLowerCase(),Y.compression=Y.compression.toUpperCase(),Y.type==="binarystring"&&(Y.type="string"),!Y.type)throw new Error("No output type specified.");a.checkSupport(Y.type),Y.platform!=="darwin"&&Y.platform!=="freebsd"&&Y.platform!=="linux"&&Y.platform!=="sunos"||(Y.platform="UNIX"),Y.platform==="win32"&&(Y.platform="DOS");var ee=Y.comment||this.comment||"";W=m.generateWorker(this,Y,ee)}catch(P){(W=new l("error")).error(P)}return new c(W,Y.type||"string",Y.mimeType)},generateAsync:function($,W){return this.generateInternalStream($).accumulate(W)},generateNodeStream:function($,W){return($=$||{}).type||($.type="nodebuffer"),this.generateInternalStream($).toNodejsStream(W)}};n.exports=j},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,n,i){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,i){var o=r("./DataReader");function s(a){o.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(s,o),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===l&&this.data[p+1]===c&&this.data[p+2]===d&&this.data[p+3]===f)return p-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),p=this.readData(4);return l===p[0]&&c===p[1]&&d===p[2]&&f===p[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],18:[function(r,n,i){var o=r("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=s},{"../utils":32}],19:[function(r,n,i){var o=r("./Uint8ArrayReader");function s(a){o.call(this,a)}r("../utils").inherits(s,o),s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,i){var o=r("./DataReader");function s(a){o.call(this,a)}r("../utils").inherits(s,o),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,n,i){var o=r("./ArrayReader");function s(a){o.call(this,a)}r("../utils").inherits(s,o),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,i){var o=r("../utils"),s=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(f){var p=o.getTypeOf(f);return o.checkSupport(p),p!=="string"||s.uint8array?p==="nodebuffer"?new c(f):s.uint8array?new d(o.transformTo("uint8array",f)):new a(o.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,i){var o=r("./GenericWorker"),s=r("../utils");function a(l){o.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(a,o),a.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,i){var o=r("./GenericWorker"),s=r("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,o),a.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,i){var o=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(a,s),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,i){var o=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=o.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}o.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,i){function o(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(l){a.processChunk(l)}),s.on("end",function(){a.end()}),s.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},n.exports=o},{}],29:[function(r,n,i){var o=r("../utils"),s=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),d=r("../external"),f=null;if(c.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(g,b){return new d.Promise(function(S,w){var T=[],M=g._internalType,j=g._outputType,$=g._mimeType;g.on("data",function(W,Y){T.push(W),b&&b(Y)}).on("error",function(W){T=[],w(W)}).on("end",function(){try{var W=function(Y,ee,P){switch(Y){case"blob":return o.newBlob(o.transformTo("arraybuffer",ee),P);case"base64":return l.encode(ee);default:return o.transformTo(Y,ee)}}(j,function(Y,ee){var P,fe=0,de=null,U=0;for(P=0;P<ee.length;P++)U+=ee[P].length;switch(Y){case"string":return ee.join("");case"array":return Array.prototype.concat.apply([],ee);case"uint8array":for(de=new Uint8Array(U),P=0;P<ee.length;P++)de.set(ee[P],fe),fe+=ee[P].length;return de;case"nodebuffer":return Buffer.concat(ee);default:throw new Error("concat : unsupported type '"+Y+"'")}}(M,T),$);S(W)}catch(Y){w(Y)}T=[]}).resume()})}function m(g,b,S){var w=b;switch(b){case"blob":case"arraybuffer":w="uint8array";break;case"base64":w="string"}try{this._internalType=w,this._outputType=b,this._mimeType=S,o.checkSupport(w),this._worker=g.pipe(new s(w)),g.lock()}catch(T){this._worker=new a("error"),this._worker.error(T)}}m.prototype={accumulate:function(g){return p(this,g)},on:function(g,b){var S=this;return g==="data"?this._worker.on(g,function(w){b.call(S,w.data,w.meta)}):this._worker.on(g,function(){o.delay(b,arguments,S)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},g)}},n.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var o=new ArrayBuffer(0);try{i.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(o),i.blob=s.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!r("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,i){for(var o=r("./utils"),s=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function p(){l.call(this,"utf-8 encode")}i.utf8encode=function(m){return s.nodebuffer?a.newBufferFrom(m,"utf-8"):function(g){var b,S,w,T,M,j=g.length,$=0;for(T=0;T<j;T++)(64512&(S=g.charCodeAt(T)))==55296&&T+1<j&&(64512&(w=g.charCodeAt(T+1)))==56320&&(S=65536+(S-55296<<10)+(w-56320),T++),$+=S<128?1:S<2048?2:S<65536?3:4;for(b=s.uint8array?new Uint8Array($):new Array($),T=M=0;M<$;T++)(64512&(S=g.charCodeAt(T)))==55296&&T+1<j&&(64512&(w=g.charCodeAt(T+1)))==56320&&(S=65536+(S-55296<<10)+(w-56320),T++),S<128?b[M++]=S:(S<2048?b[M++]=192|S>>>6:(S<65536?b[M++]=224|S>>>12:(b[M++]=240|S>>>18,b[M++]=128|S>>>12&63),b[M++]=128|S>>>6&63),b[M++]=128|63&S);return b}(m)},i.utf8decode=function(m){return s.nodebuffer?o.transformTo("nodebuffer",m).toString("utf-8"):function(g){var b,S,w,T,M=g.length,j=new Array(2*M);for(b=S=0;b<M;)if((w=g[b++])<128)j[S++]=w;else if(4<(T=c[w]))j[S++]=65533,b+=T-1;else{for(w&=T===2?31:T===3?15:7;1<T&&b<M;)w=w<<6|63&g[b++],T--;1<T?j[S++]=65533:w<65536?j[S++]=w:(w-=65536,j[S++]=55296|w>>10&1023,j[S++]=56320|1023&w)}return j.length!==S&&(j.subarray?j=j.subarray(0,S):j.length=S),o.applyFromCharCode(j)}(m=o.transformTo(s.uint8array?"uint8array":"array",m))},o.inherits(f,l),f.prototype.processChunk=function(m){var g=o.transformTo(s.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var b=g;(g=new Uint8Array(b.length+this.leftOver.length)).set(this.leftOver,0),g.set(b,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var S=function(T,M){var j;for((M=M||T.length)>T.length&&(M=T.length),j=M-1;0<=j&&(192&T[j])==128;)j--;return j<0||j===0?M:j+c[T[j]]>M?j:M}(g),w=g;S!==g.length&&(s.uint8array?(w=g.subarray(0,S),this.leftOver=g.subarray(S,g.length)):(w=g.slice(0,S),this.leftOver=g.slice(S,g.length))),this.push({data:i.utf8decode(w),meta:m.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=f,o.inherits(p,l),p.prototype.processChunk=function(m){this.push({data:i.utf8encode(m.data),meta:m.meta})},i.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,i){var o=r("./support"),s=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(b){return b}function d(b,S){for(var w=0;w<b.length;++w)S[w]=255&b.charCodeAt(w);return S}r("setimmediate"),i.newBlob=function(b,S){i.checkSupport("blob");try{return new Blob([b],{type:S})}catch{try{var w=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return w.append(b),w.getBlob(S)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(b,S,w){var T=[],M=0,j=b.length;if(j<=w)return String.fromCharCode.apply(null,b);for(;M<j;)S==="array"||S==="nodebuffer"?T.push(String.fromCharCode.apply(null,b.slice(M,Math.min(M+w,j)))):T.push(String.fromCharCode.apply(null,b.subarray(M,Math.min(M+w,j)))),M+=w;return T.join("")},stringifyByChar:function(b){for(var S="",w=0;w<b.length;w++)S+=String.fromCharCode(b[w]);return S},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function p(b){var S=65536,w=i.getTypeOf(b),T=!0;if(w==="uint8array"?T=f.applyCanBeUsed.uint8array:w==="nodebuffer"&&(T=f.applyCanBeUsed.nodebuffer),T)for(;1<S;)try{return f.stringifyByChunk(b,w,S)}catch{S=Math.floor(S/2)}return f.stringifyByChar(b)}function m(b,S){for(var w=0;w<b.length;w++)S[w]=b[w];return S}i.applyFromCharCode=p;var g={};g.string={string:c,array:function(b){return d(b,new Array(b.length))},arraybuffer:function(b){return g.string.uint8array(b).buffer},uint8array:function(b){return d(b,new Uint8Array(b.length))},nodebuffer:function(b){return d(b,a.allocBuffer(b.length))}},g.array={string:p,array:c,arraybuffer:function(b){return new Uint8Array(b).buffer},uint8array:function(b){return new Uint8Array(b)},nodebuffer:function(b){return a.newBufferFrom(b)}},g.arraybuffer={string:function(b){return p(new Uint8Array(b))},array:function(b){return m(new Uint8Array(b),new Array(b.byteLength))},arraybuffer:c,uint8array:function(b){return new Uint8Array(b)},nodebuffer:function(b){return a.newBufferFrom(new Uint8Array(b))}},g.uint8array={string:p,array:function(b){return m(b,new Array(b.length))},arraybuffer:function(b){return b.buffer},uint8array:c,nodebuffer:function(b){return a.newBufferFrom(b)}},g.nodebuffer={string:p,array:function(b){return m(b,new Array(b.length))},arraybuffer:function(b){return g.nodebuffer.uint8array(b).buffer},uint8array:function(b){return m(b,new Uint8Array(b.length))},nodebuffer:c},i.transformTo=function(b,S){if(S=S||"",!b)return S;i.checkSupport(b);var w=i.getTypeOf(S);return g[w][b](S)},i.resolve=function(b){for(var S=b.split("/"),w=[],T=0;T<S.length;T++){var M=S[T];M==="."||M===""&&T!==0&&T!==S.length-1||(M===".."?w.pop():w.push(M))}return w.join("/")},i.getTypeOf=function(b){return typeof b=="string"?"string":Object.prototype.toString.call(b)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(b)?"nodebuffer":o.uint8array&&b instanceof Uint8Array?"uint8array":o.arraybuffer&&b instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(b){if(!o[b.toLowerCase()])throw new Error(b+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(b){var S,w,T="";for(w=0;w<(b||"").length;w++)T+="\\x"+((S=b.charCodeAt(w))<16?"0":"")+S.toString(16).toUpperCase();return T},i.delay=function(b,S,w){setImmediate(function(){b.apply(w||null,S||[])})},i.inherits=function(b,S){function w(){}w.prototype=S.prototype,b.prototype=new w},i.extend=function(){var b,S,w={};for(b=0;b<arguments.length;b++)for(S in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],S)&&w[S]===void 0&&(w[S]=arguments[b][S]);return w},i.prepareContent=function(b,S,w,T,M){return l.Promise.resolve(S).then(function(j){return o.blob&&(j instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(j))!==-1)&&typeof FileReader<"u"?new l.Promise(function($,W){var Y=new FileReader;Y.onload=function(ee){$(ee.target.result)},Y.onerror=function(ee){W(ee.target.error)},Y.readAsArrayBuffer(j)}):j}).then(function(j){var $=i.getTypeOf(j);return $?($==="arraybuffer"?j=i.transformTo("uint8array",j):$==="string"&&(M?j=s.decode(j):w&&T!==!0&&(j=function(W){return d(W,o.uint8array?new Uint8Array(W.length):new Array(W.length))}(j))),j):l.Promise.reject(new Error("Can't read the data of '"+b+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,i){var o=r("./reader/readerFor"),s=r("./utils"),a=r("./signature"),l=r("./zipEntry"),c=r("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var p=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(p)+", expected "+s.pretty(f)+")")}},isSignature:function(f,p){var m=this.reader.index;this.reader.setIndex(f);var g=this.reader.readString(4)===p;return this.reader.setIndex(m),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),p=c.uint8array?"uint8array":"array",m=s.transformTo(p,f);this.zipComment=this.loadOptions.decodeFileName(m)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,p,m,g=this.zip64EndOfCentralSize-44;0<g;)f=this.reader.readInt(2),p=this.reader.readInt(4),m=this.reader.readData(p),this.zip64ExtensibleData[f]={id:f,length:p,value:m}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,p;for(f=0;f<this.files.length;f++)p=this.files[f],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var p=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var g=p-m;if(0<g)this.isSignature(p,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,i){var o=r("./reader/readerFor"),s=r("./utils"),a=r("./compressedObject"),l=r("./crc32"),c=r("./utf8"),d=r("./compressions"),f=r("./support");function p(m,g){this.options=m,this.loadOptions=g}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var g,b;if(m.skip(22),this.fileNameLength=m.readInt(2),b=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(b),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=function(S){for(var w in d)if(Object.prototype.hasOwnProperty.call(d,w)&&d[w].magic===S)return d[w];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var g=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(g),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=o(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var g,b,S,w=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<w;)g=m.readInt(2),b=m.readInt(2),S=m.readData(b),this.extraFields[g]={id:g,length:b,value:S};m.setIndex(w)},handleUTF8:function(){var m=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var b=s.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(b)}var S=this.findExtraFieldUnicodeComment();if(S!==null)this.fileCommentStr=S;else{var w=s.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(w)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var g=o(m.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:c.utf8decode(g.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var g=o(m.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:c.utf8decode(g.readData(m.length-5))}return null}},n.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,i){function o(g,b,S){this.name=g,this.dir=S.dir,this.date=S.date,this.comment=S.comment,this.unixPermissions=S.unixPermissions,this.dosPermissions=S.dosPermissions,this._data=b,this._dataBinary=S.binary,this.options={compression:S.compression,compressionOptions:S.compressionOptions}}var s=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),c=r("./compressedObject"),d=r("./stream/GenericWorker");o.prototype={internalStream:function(g){var b=null,S="string";try{if(!g)throw new Error("No output type specified.");var w=(S=g.toLowerCase())==="string"||S==="text";S!=="binarystring"&&S!=="text"||(S="string"),b=this._decompressWorker();var T=!this._dataBinary;T&&!w&&(b=b.pipe(new l.Utf8EncodeWorker)),!T&&w&&(b=b.pipe(new l.Utf8DecodeWorker))}catch(M){(b=new d("error")).error(M)}return new s(b,S,"")},async:function(g,b){return this.internalStream(g).accumulate(b)},nodeStream:function(g,b){return this.internalStream(g||"nodebuffer").toNodejsStream(b)},_compressWorker:function(g,b){if(this._data instanceof c&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var S=this._decompressWorker();return this._dataBinary||(S=S.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(S,g,b)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},m=0;m<f.length;m++)o.prototype[f[m]]=p;n.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,i){(function(o){var s,a,l=o.MutationObserver||o.WebKitMutationObserver;if(l){var c=0,d=new l(g),f=o.document.createTextNode("");d.observe(f,{characterData:!0}),s=function(){f.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)s="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var b=o.document.createElement("script");b.onreadystatechange=function(){g(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},o.document.documentElement.appendChild(b)}:function(){setTimeout(g,0)};else{var p=new o.MessageChannel;p.port1.onmessage=g,s=function(){p.port2.postMessage(0)}}var m=[];function g(){var b,S;a=!0;for(var w=m.length;w;){for(S=m,m=[],b=-1;++b<w;)S[b]();w=m.length}a=!1}n.exports=function(b){m.push(b)!==1||a||s()}}).call(this,typeof mo<"u"?mo:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,i){var o=r("immediate");function s(){}var a={},l=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function f(w){if(typeof w!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,w!==s&&b(this,w)}function p(w,T,M){this.promise=w,typeof T=="function"&&(this.onFulfilled=T,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function m(w,T,M){o(function(){var j;try{j=T(M)}catch($){return a.reject(w,$)}j===w?a.reject(w,new TypeError("Cannot resolve promise with itself")):a.resolve(w,j)})}function g(w){var T=w&&w.then;if(w&&(typeof w=="object"||typeof w=="function")&&typeof T=="function")return function(){T.apply(w,arguments)}}function b(w,T){var M=!1;function j(Y){M||(M=!0,a.reject(w,Y))}function $(Y){M||(M=!0,a.resolve(w,Y))}var W=S(function(){T($,j)});W.status==="error"&&j(W.value)}function S(w,T){var M={};try{M.value=w(T),M.status="success"}catch(j){M.status="error",M.value=j}return M}(n.exports=f).prototype.finally=function(w){if(typeof w!="function")return this;var T=this.constructor;return this.then(function(M){return T.resolve(w()).then(function(){return M})},function(M){return T.resolve(w()).then(function(){throw M})})},f.prototype.catch=function(w){return this.then(null,w)},f.prototype.then=function(w,T){if(typeof w!="function"&&this.state===c||typeof T!="function"&&this.state===l)return this;var M=new this.constructor(s);return this.state!==d?m(M,this.state===c?w:T,this.outcome):this.queue.push(new p(M,w,T)),M},p.prototype.callFulfilled=function(w){a.resolve(this.promise,w)},p.prototype.otherCallFulfilled=function(w){m(this.promise,this.onFulfilled,w)},p.prototype.callRejected=function(w){a.reject(this.promise,w)},p.prototype.otherCallRejected=function(w){m(this.promise,this.onRejected,w)},a.resolve=function(w,T){var M=S(g,T);if(M.status==="error")return a.reject(w,M.value);var j=M.value;if(j)b(w,j);else{w.state=c,w.outcome=T;for(var $=-1,W=w.queue.length;++$<W;)w.queue[$].callFulfilled(T)}return w},a.reject=function(w,T){w.state=l,w.outcome=T;for(var M=-1,j=w.queue.length;++M<j;)w.queue[M].callRejected(T);return w},f.resolve=function(w){return w instanceof this?w:a.resolve(new this(s),w)},f.reject=function(w){var T=new this(s);return a.reject(T,w)},f.all=function(w){var T=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=w.length,j=!1;if(!M)return this.resolve([]);for(var $=new Array(M),W=0,Y=-1,ee=new this(s);++Y<M;)P(w[Y],Y);return ee;function P(fe,de){T.resolve(fe).then(function(U){$[de]=U,++W!==M||j||(j=!0,a.resolve(ee,$))},function(U){j||(j=!0,a.reject(ee,U))})}},f.race=function(w){var T=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=w.length,j=!1;if(!M)return this.resolve([]);for(var $=-1,W=new this(s);++$<M;)Y=w[$],T.resolve(Y).then(function(ee){j||(j=!0,a.resolve(W,ee))},function(ee){j||(j=!0,a.reject(W,ee))});var Y;return W}},{immediate:36}],38:[function(r,n,i){var o={};(0,r("./lib/utils/common").assign)(o,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,i){var o=r("./zlib/deflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),c=r("./zlib/zstream"),d=Object.prototype.toString,f=0,p=-1,m=0,g=8;function b(w){if(!(this instanceof b))return new b(w);this.options=s.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},w||{});var T=this.options;T.raw&&0<T.windowBits?T.windowBits=-T.windowBits:T.gzip&&0<T.windowBits&&T.windowBits<16&&(T.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var M=o.deflateInit2(this.strm,T.level,T.method,T.windowBits,T.memLevel,T.strategy);if(M!==f)throw new Error(l[M]);if(T.header&&o.deflateSetHeader(this.strm,T.header),T.dictionary){var j;if(j=typeof T.dictionary=="string"?a.string2buf(T.dictionary):d.call(T.dictionary)==="[object ArrayBuffer]"?new Uint8Array(T.dictionary):T.dictionary,(M=o.deflateSetDictionary(this.strm,j))!==f)throw new Error(l[M]);this._dict_set=!0}}function S(w,T){var M=new b(T);if(M.push(w,!0),M.err)throw M.msg||l[M.err];return M.result}b.prototype.push=function(w,T){var M,j,$=this.strm,W=this.options.chunkSize;if(this.ended)return!1;j=T===~~T?T:T===!0?4:0,typeof w=="string"?$.input=a.string2buf(w):d.call(w)==="[object ArrayBuffer]"?$.input=new Uint8Array(w):$.input=w,$.next_in=0,$.avail_in=$.input.length;do{if($.avail_out===0&&($.output=new s.Buf8(W),$.next_out=0,$.avail_out=W),(M=o.deflate($,j))!==1&&M!==f)return this.onEnd(M),!(this.ended=!0);$.avail_out!==0&&($.avail_in!==0||j!==4&&j!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf($.output,$.next_out))):this.onData(s.shrinkBuf($.output,$.next_out)))}while((0<$.avail_in||$.avail_out===0)&&M!==1);return j===4?(M=o.deflateEnd(this.strm),this.onEnd(M),this.ended=!0,M===f):j!==2||(this.onEnd(f),!($.avail_out=0))},b.prototype.onData=function(w){this.chunks.push(w)},b.prototype.onEnd=function(w){w===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=w,this.msg=this.strm.msg},i.Deflate=b,i.deflate=S,i.deflateRaw=function(w,T){return(T=T||{}).raw=!0,S(w,T)},i.gzip=function(w,T){return(T=T||{}).gzip=!0,S(w,T)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,i){var o=r("./zlib/inflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),c=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),p=Object.prototype.toString;function m(b){if(!(this instanceof m))return new m(b);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},b||{});var S=this.options;S.raw&&0<=S.windowBits&&S.windowBits<16&&(S.windowBits=-S.windowBits,S.windowBits===0&&(S.windowBits=-15)),!(0<=S.windowBits&&S.windowBits<16)||b&&b.windowBits||(S.windowBits+=32),15<S.windowBits&&S.windowBits<48&&!(15&S.windowBits)&&(S.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var w=o.inflateInit2(this.strm,S.windowBits);if(w!==l.Z_OK)throw new Error(c[w]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function g(b,S){var w=new m(S);if(w.push(b,!0),w.err)throw w.msg||c[w.err];return w.result}m.prototype.push=function(b,S){var w,T,M,j,$,W,Y=this.strm,ee=this.options.chunkSize,P=this.options.dictionary,fe=!1;if(this.ended)return!1;T=S===~~S?S:S===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof b=="string"?Y.input=a.binstring2buf(b):p.call(b)==="[object ArrayBuffer]"?Y.input=new Uint8Array(b):Y.input=b,Y.next_in=0,Y.avail_in=Y.input.length;do{if(Y.avail_out===0&&(Y.output=new s.Buf8(ee),Y.next_out=0,Y.avail_out=ee),(w=o.inflate(Y,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&P&&(W=typeof P=="string"?a.string2buf(P):p.call(P)==="[object ArrayBuffer]"?new Uint8Array(P):P,w=o.inflateSetDictionary(this.strm,W)),w===l.Z_BUF_ERROR&&fe===!0&&(w=l.Z_OK,fe=!1),w!==l.Z_STREAM_END&&w!==l.Z_OK)return this.onEnd(w),!(this.ended=!0);Y.next_out&&(Y.avail_out!==0&&w!==l.Z_STREAM_END&&(Y.avail_in!==0||T!==l.Z_FINISH&&T!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=a.utf8border(Y.output,Y.next_out),j=Y.next_out-M,$=a.buf2string(Y.output,M),Y.next_out=j,Y.avail_out=ee-j,j&&s.arraySet(Y.output,Y.output,M,j,0),this.onData($)):this.onData(s.shrinkBuf(Y.output,Y.next_out)))),Y.avail_in===0&&Y.avail_out===0&&(fe=!0)}while((0<Y.avail_in||Y.avail_out===0)&&w!==l.Z_STREAM_END);return w===l.Z_STREAM_END&&(T=l.Z_FINISH),T===l.Z_FINISH?(w=o.inflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===l.Z_OK):T!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(Y.avail_out=0))},m.prototype.onData=function(b){this.chunks.push(b)},m.prototype.onEnd=function(b){b===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},i.Inflate=m,i.inflate=g,i.inflateRaw=function(b,S){return(S=S||{}).raw=!0,g(b,S)},i.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,i){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(l[f]=d[f])}}return l},i.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,d,f,p){if(c.subarray&&l.subarray)l.set(c.subarray(d,d+f),p);else for(var m=0;m<f;m++)l[p+m]=c[d+m]},flattenChunks:function(l){var c,d,f,p,m,g;for(c=f=0,d=l.length;c<d;c++)f+=l[c].length;for(g=new Uint8Array(f),c=p=0,d=l.length;c<d;c++)m=l[c],g.set(m,p),p+=m.length;return g}},a={arraySet:function(l,c,d,f,p){for(var m=0;m<f;m++)l[p+m]=c[d+m]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,s)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(o)},{}],42:[function(r,n,i){var o=r("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new o.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function d(f,p){if(p<65537&&(f.subarray&&a||!f.subarray&&s))return String.fromCharCode.apply(null,o.shrinkBuf(f,p));for(var m="",g=0;g<p;g++)m+=String.fromCharCode(f[g]);return m}l[254]=l[254]=1,i.string2buf=function(f){var p,m,g,b,S,w=f.length,T=0;for(b=0;b<w;b++)(64512&(m=f.charCodeAt(b)))==55296&&b+1<w&&(64512&(g=f.charCodeAt(b+1)))==56320&&(m=65536+(m-55296<<10)+(g-56320),b++),T+=m<128?1:m<2048?2:m<65536?3:4;for(p=new o.Buf8(T),b=S=0;S<T;b++)(64512&(m=f.charCodeAt(b)))==55296&&b+1<w&&(64512&(g=f.charCodeAt(b+1)))==56320&&(m=65536+(m-55296<<10)+(g-56320),b++),m<128?p[S++]=m:(m<2048?p[S++]=192|m>>>6:(m<65536?p[S++]=224|m>>>12:(p[S++]=240|m>>>18,p[S++]=128|m>>>12&63),p[S++]=128|m>>>6&63),p[S++]=128|63&m);return p},i.buf2binstring=function(f){return d(f,f.length)},i.binstring2buf=function(f){for(var p=new o.Buf8(f.length),m=0,g=p.length;m<g;m++)p[m]=f.charCodeAt(m);return p},i.buf2string=function(f,p){var m,g,b,S,w=p||f.length,T=new Array(2*w);for(m=g=0;m<w;)if((b=f[m++])<128)T[g++]=b;else if(4<(S=l[b]))T[g++]=65533,m+=S-1;else{for(b&=S===2?31:S===3?15:7;1<S&&m<w;)b=b<<6|63&f[m++],S--;1<S?T[g++]=65533:b<65536?T[g++]=b:(b-=65536,T[g++]=55296|b>>10&1023,T[g++]=56320|1023&b)}return d(T,g)},i.utf8border=function(f,p){var m;for((p=p||f.length)>f.length&&(p=f.length),m=p-1;0<=m&&(192&f[m])==128;)m--;return m<0||m===0?p:m+l[f[m]]>p?m:p}},{"./common":41}],43:[function(r,n,i){n.exports=function(o,s,a,l){for(var c=65535&o|0,d=o>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(c=c+s[l++]|0)|0,--f;);c%=65521,d%=65521}return c|d<<16|0}},{}],44:[function(r,n,i){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,n,i){var o=function(){for(var s,a=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;a[l]=s}return a}();n.exports=function(s,a,l,c){var d=o,f=c+l;s^=-1;for(var p=c;p<f;p++)s=s>>>8^d[255&(s^a[p])];return-1^s}},{}],46:[function(r,n,i){var o,s=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),d=r("./messages"),f=0,p=4,m=0,g=-2,b=-1,S=4,w=2,T=8,M=9,j=286,$=30,W=19,Y=2*j+1,ee=15,P=3,fe=258,de=fe+P+1,U=42,ne=113,R=1,le=2,Ce=3,he=4;function Fe(O,xe){return O.msg=d[xe],xe}function ye(O){return(O<<1)-(4<O?9:0)}function ze(O){for(var xe=O.length;0<=--xe;)O[xe]=0}function ue(O){var xe=O.state,F=xe.pending;F>O.avail_out&&(F=O.avail_out),F!==0&&(s.arraySet(O.output,xe.pending_buf,xe.pending_out,F,O.next_out),O.next_out+=F,xe.pending_out+=F,O.total_out+=F,O.avail_out-=F,xe.pending-=F,xe.pending===0&&(xe.pending_out=0))}function V(O,xe){a._tr_flush_block(O,0<=O.block_start?O.block_start:-1,O.strstart-O.block_start,xe),O.block_start=O.strstart,ue(O.strm)}function me(O,xe){O.pending_buf[O.pending++]=xe}function ge(O,xe){O.pending_buf[O.pending++]=xe>>>8&255,O.pending_buf[O.pending++]=255&xe}function ke(O,xe){var F,k,_=O.max_chain_length,N=O.strstart,Q=O.prev_length,pe=O.nice_match,oe=O.strstart>O.w_size-de?O.strstart-(O.w_size-de):0,Re=O.window,Ne=O.w_mask,De=O.prev,We=O.strstart+fe,Je=Re[N+Q-1],Ye=Re[N+Q];O.prev_length>=O.good_match&&(_>>=2),pe>O.lookahead&&(pe=O.lookahead);do if(Re[(F=xe)+Q]===Ye&&Re[F+Q-1]===Je&&Re[F]===Re[N]&&Re[++F]===Re[N+1]){N+=2,F++;do;while(Re[++N]===Re[++F]&&Re[++N]===Re[++F]&&Re[++N]===Re[++F]&&Re[++N]===Re[++F]&&Re[++N]===Re[++F]&&Re[++N]===Re[++F]&&Re[++N]===Re[++F]&&Re[++N]===Re[++F]&&N<We);if(k=fe-(We-N),N=We-fe,Q<k){if(O.match_start=xe,pe<=(Q=k))break;Je=Re[N+Q-1],Ye=Re[N+Q]}}while((xe=De[xe&Ne])>oe&&--_!=0);return Q<=O.lookahead?Q:O.lookahead}function ce(O){var xe,F,k,_,N,Q,pe,oe,Re,Ne,De=O.w_size;do{if(_=O.window_size-O.lookahead-O.strstart,O.strstart>=De+(De-de)){for(s.arraySet(O.window,O.window,De,De,0),O.match_start-=De,O.strstart-=De,O.block_start-=De,xe=F=O.hash_size;k=O.head[--xe],O.head[xe]=De<=k?k-De:0,--F;);for(xe=F=De;k=O.prev[--xe],O.prev[xe]=De<=k?k-De:0,--F;);_+=De}if(O.strm.avail_in===0)break;if(Q=O.strm,pe=O.window,oe=O.strstart+O.lookahead,Re=_,Ne=void 0,Ne=Q.avail_in,Re<Ne&&(Ne=Re),F=Ne===0?0:(Q.avail_in-=Ne,s.arraySet(pe,Q.input,Q.next_in,Ne,oe),Q.state.wrap===1?Q.adler=l(Q.adler,pe,Ne,oe):Q.state.wrap===2&&(Q.adler=c(Q.adler,pe,Ne,oe)),Q.next_in+=Ne,Q.total_in+=Ne,Ne),O.lookahead+=F,O.lookahead+O.insert>=P)for(N=O.strstart-O.insert,O.ins_h=O.window[N],O.ins_h=(O.ins_h<<O.hash_shift^O.window[N+1])&O.hash_mask;O.insert&&(O.ins_h=(O.ins_h<<O.hash_shift^O.window[N+P-1])&O.hash_mask,O.prev[N&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=N,N++,O.insert--,!(O.lookahead+O.insert<P)););}while(O.lookahead<de&&O.strm.avail_in!==0)}function L(O,xe){for(var F,k;;){if(O.lookahead<de){if(ce(O),O.lookahead<de&&xe===f)return R;if(O.lookahead===0)break}if(F=0,O.lookahead>=P&&(O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+P-1])&O.hash_mask,F=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),F!==0&&O.strstart-F<=O.w_size-de&&(O.match_length=ke(O,F)),O.match_length>=P)if(k=a._tr_tally(O,O.strstart-O.match_start,O.match_length-P),O.lookahead-=O.match_length,O.match_length<=O.max_lazy_match&&O.lookahead>=P){for(O.match_length--;O.strstart++,O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+P-1])&O.hash_mask,F=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart,--O.match_length!=0;);O.strstart++}else O.strstart+=O.match_length,O.match_length=0,O.ins_h=O.window[O.strstart],O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+1])&O.hash_mask;else k=a._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++;if(k&&(V(O,!1),O.strm.avail_out===0))return R}return O.insert=O.strstart<P-1?O.strstart:P-1,xe===p?(V(O,!0),O.strm.avail_out===0?Ce:he):O.last_lit&&(V(O,!1),O.strm.avail_out===0)?R:le}function D(O,xe){for(var F,k,_;;){if(O.lookahead<de){if(ce(O),O.lookahead<de&&xe===f)return R;if(O.lookahead===0)break}if(F=0,O.lookahead>=P&&(O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+P-1])&O.hash_mask,F=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),O.prev_length=O.match_length,O.prev_match=O.match_start,O.match_length=P-1,F!==0&&O.prev_length<O.max_lazy_match&&O.strstart-F<=O.w_size-de&&(O.match_length=ke(O,F),O.match_length<=5&&(O.strategy===1||O.match_length===P&&4096<O.strstart-O.match_start)&&(O.match_length=P-1)),O.prev_length>=P&&O.match_length<=O.prev_length){for(_=O.strstart+O.lookahead-P,k=a._tr_tally(O,O.strstart-1-O.prev_match,O.prev_length-P),O.lookahead-=O.prev_length-1,O.prev_length-=2;++O.strstart<=_&&(O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+P-1])&O.hash_mask,F=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),--O.prev_length!=0;);if(O.match_available=0,O.match_length=P-1,O.strstart++,k&&(V(O,!1),O.strm.avail_out===0))return R}else if(O.match_available){if((k=a._tr_tally(O,0,O.window[O.strstart-1]))&&V(O,!1),O.strstart++,O.lookahead--,O.strm.avail_out===0)return R}else O.match_available=1,O.strstart++,O.lookahead--}return O.match_available&&(k=a._tr_tally(O,0,O.window[O.strstart-1]),O.match_available=0),O.insert=O.strstart<P-1?O.strstart:P-1,xe===p?(V(O,!0),O.strm.avail_out===0?Ce:he):O.last_lit&&(V(O,!1),O.strm.avail_out===0)?R:le}function ae(O,xe,F,k,_){this.good_length=O,this.max_lazy=xe,this.nice_length=F,this.max_chain=k,this.func=_}function ie(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=T,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(2*Y),this.dyn_dtree=new s.Buf16(2*(2*$+1)),this.bl_tree=new s.Buf16(2*(2*W+1)),ze(this.dyn_ltree),ze(this.dyn_dtree),ze(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(ee+1),this.heap=new s.Buf16(2*j+1),ze(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*j+1),ze(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function q(O){var xe;return O&&O.state?(O.total_in=O.total_out=0,O.data_type=w,(xe=O.state).pending=0,xe.pending_out=0,xe.wrap<0&&(xe.wrap=-xe.wrap),xe.status=xe.wrap?U:ne,O.adler=xe.wrap===2?0:1,xe.last_flush=f,a._tr_init(xe),m):Fe(O,g)}function Z(O){var xe=q(O);return xe===m&&function(F){F.window_size=2*F.w_size,ze(F.head),F.max_lazy_match=o[F.level].max_lazy,F.good_match=o[F.level].good_length,F.nice_match=o[F.level].nice_length,F.max_chain_length=o[F.level].max_chain,F.strstart=0,F.block_start=0,F.lookahead=0,F.insert=0,F.match_length=F.prev_length=P-1,F.match_available=0,F.ins_h=0}(O.state),xe}function we(O,xe,F,k,_,N){if(!O)return g;var Q=1;if(xe===b&&(xe=6),k<0?(Q=0,k=-k):15<k&&(Q=2,k-=16),_<1||M<_||F!==T||k<8||15<k||xe<0||9<xe||N<0||S<N)return Fe(O,g);k===8&&(k=9);var pe=new ie;return(O.state=pe).strm=O,pe.wrap=Q,pe.gzhead=null,pe.w_bits=k,pe.w_size=1<<pe.w_bits,pe.w_mask=pe.w_size-1,pe.hash_bits=_+7,pe.hash_size=1<<pe.hash_bits,pe.hash_mask=pe.hash_size-1,pe.hash_shift=~~((pe.hash_bits+P-1)/P),pe.window=new s.Buf8(2*pe.w_size),pe.head=new s.Buf16(pe.hash_size),pe.prev=new s.Buf16(pe.w_size),pe.lit_bufsize=1<<_+6,pe.pending_buf_size=4*pe.lit_bufsize,pe.pending_buf=new s.Buf8(pe.pending_buf_size),pe.d_buf=1*pe.lit_bufsize,pe.l_buf=3*pe.lit_bufsize,pe.level=xe,pe.strategy=N,pe.method=F,Z(O)}o=[new ae(0,0,0,0,function(O,xe){var F=65535;for(F>O.pending_buf_size-5&&(F=O.pending_buf_size-5);;){if(O.lookahead<=1){if(ce(O),O.lookahead===0&&xe===f)return R;if(O.lookahead===0)break}O.strstart+=O.lookahead,O.lookahead=0;var k=O.block_start+F;if((O.strstart===0||O.strstart>=k)&&(O.lookahead=O.strstart-k,O.strstart=k,V(O,!1),O.strm.avail_out===0)||O.strstart-O.block_start>=O.w_size-de&&(V(O,!1),O.strm.avail_out===0))return R}return O.insert=0,xe===p?(V(O,!0),O.strm.avail_out===0?Ce:he):(O.strstart>O.block_start&&(V(O,!1),O.strm.avail_out),R)}),new ae(4,4,8,4,L),new ae(4,5,16,8,L),new ae(4,6,32,32,L),new ae(4,4,16,16,D),new ae(8,16,32,32,D),new ae(8,16,128,128,D),new ae(8,32,128,256,D),new ae(32,128,258,1024,D),new ae(32,258,258,4096,D)],i.deflateInit=function(O,xe){return we(O,xe,T,15,8,0)},i.deflateInit2=we,i.deflateReset=Z,i.deflateResetKeep=q,i.deflateSetHeader=function(O,xe){return O&&O.state?O.state.wrap!==2?g:(O.state.gzhead=xe,m):g},i.deflate=function(O,xe){var F,k,_,N;if(!O||!O.state||5<xe||xe<0)return O?Fe(O,g):g;if(k=O.state,!O.output||!O.input&&O.avail_in!==0||k.status===666&&xe!==p)return Fe(O,O.avail_out===0?-5:g);if(k.strm=O,F=k.last_flush,k.last_flush=xe,k.status===U)if(k.wrap===2)O.adler=0,me(k,31),me(k,139),me(k,8),k.gzhead?(me(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),me(k,255&k.gzhead.time),me(k,k.gzhead.time>>8&255),me(k,k.gzhead.time>>16&255),me(k,k.gzhead.time>>24&255),me(k,k.level===9?2:2<=k.strategy||k.level<2?4:0),me(k,255&k.gzhead.os),k.gzhead.extra&&k.gzhead.extra.length&&(me(k,255&k.gzhead.extra.length),me(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(O.adler=c(O.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=69):(me(k,0),me(k,0),me(k,0),me(k,0),me(k,0),me(k,k.level===9?2:2<=k.strategy||k.level<2?4:0),me(k,3),k.status=ne);else{var Q=T+(k.w_bits-8<<4)<<8;Q|=(2<=k.strategy||k.level<2?0:k.level<6?1:k.level===6?2:3)<<6,k.strstart!==0&&(Q|=32),Q+=31-Q%31,k.status=ne,ge(k,Q),k.strstart!==0&&(ge(k,O.adler>>>16),ge(k,65535&O.adler)),O.adler=1}if(k.status===69)if(k.gzhead.extra){for(_=k.pending;k.gzindex<(65535&k.gzhead.extra.length)&&(k.pending!==k.pending_buf_size||(k.gzhead.hcrc&&k.pending>_&&(O.adler=c(O.adler,k.pending_buf,k.pending-_,_)),ue(O),_=k.pending,k.pending!==k.pending_buf_size));)me(k,255&k.gzhead.extra[k.gzindex]),k.gzindex++;k.gzhead.hcrc&&k.pending>_&&(O.adler=c(O.adler,k.pending_buf,k.pending-_,_)),k.gzindex===k.gzhead.extra.length&&(k.gzindex=0,k.status=73)}else k.status=73;if(k.status===73)if(k.gzhead.name){_=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>_&&(O.adler=c(O.adler,k.pending_buf,k.pending-_,_)),ue(O),_=k.pending,k.pending===k.pending_buf_size)){N=1;break}N=k.gzindex<k.gzhead.name.length?255&k.gzhead.name.charCodeAt(k.gzindex++):0,me(k,N)}while(N!==0);k.gzhead.hcrc&&k.pending>_&&(O.adler=c(O.adler,k.pending_buf,k.pending-_,_)),N===0&&(k.gzindex=0,k.status=91)}else k.status=91;if(k.status===91)if(k.gzhead.comment){_=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>_&&(O.adler=c(O.adler,k.pending_buf,k.pending-_,_)),ue(O),_=k.pending,k.pending===k.pending_buf_size)){N=1;break}N=k.gzindex<k.gzhead.comment.length?255&k.gzhead.comment.charCodeAt(k.gzindex++):0,me(k,N)}while(N!==0);k.gzhead.hcrc&&k.pending>_&&(O.adler=c(O.adler,k.pending_buf,k.pending-_,_)),N===0&&(k.status=103)}else k.status=103;if(k.status===103&&(k.gzhead.hcrc?(k.pending+2>k.pending_buf_size&&ue(O),k.pending+2<=k.pending_buf_size&&(me(k,255&O.adler),me(k,O.adler>>8&255),O.adler=0,k.status=ne)):k.status=ne),k.pending!==0){if(ue(O),O.avail_out===0)return k.last_flush=-1,m}else if(O.avail_in===0&&ye(xe)<=ye(F)&&xe!==p)return Fe(O,-5);if(k.status===666&&O.avail_in!==0)return Fe(O,-5);if(O.avail_in!==0||k.lookahead!==0||xe!==f&&k.status!==666){var pe=k.strategy===2?function(oe,Re){for(var Ne;;){if(oe.lookahead===0&&(ce(oe),oe.lookahead===0)){if(Re===f)return R;break}if(oe.match_length=0,Ne=a._tr_tally(oe,0,oe.window[oe.strstart]),oe.lookahead--,oe.strstart++,Ne&&(V(oe,!1),oe.strm.avail_out===0))return R}return oe.insert=0,Re===p?(V(oe,!0),oe.strm.avail_out===0?Ce:he):oe.last_lit&&(V(oe,!1),oe.strm.avail_out===0)?R:le}(k,xe):k.strategy===3?function(oe,Re){for(var Ne,De,We,Je,Ye=oe.window;;){if(oe.lookahead<=fe){if(ce(oe),oe.lookahead<=fe&&Re===f)return R;if(oe.lookahead===0)break}if(oe.match_length=0,oe.lookahead>=P&&0<oe.strstart&&(De=Ye[We=oe.strstart-1])===Ye[++We]&&De===Ye[++We]&&De===Ye[++We]){Je=oe.strstart+fe;do;while(De===Ye[++We]&&De===Ye[++We]&&De===Ye[++We]&&De===Ye[++We]&&De===Ye[++We]&&De===Ye[++We]&&De===Ye[++We]&&De===Ye[++We]&&We<Je);oe.match_length=fe-(Je-We),oe.match_length>oe.lookahead&&(oe.match_length=oe.lookahead)}if(oe.match_length>=P?(Ne=a._tr_tally(oe,1,oe.match_length-P),oe.lookahead-=oe.match_length,oe.strstart+=oe.match_length,oe.match_length=0):(Ne=a._tr_tally(oe,0,oe.window[oe.strstart]),oe.lookahead--,oe.strstart++),Ne&&(V(oe,!1),oe.strm.avail_out===0))return R}return oe.insert=0,Re===p?(V(oe,!0),oe.strm.avail_out===0?Ce:he):oe.last_lit&&(V(oe,!1),oe.strm.avail_out===0)?R:le}(k,xe):o[k.level].func(k,xe);if(pe!==Ce&&pe!==he||(k.status=666),pe===R||pe===Ce)return O.avail_out===0&&(k.last_flush=-1),m;if(pe===le&&(xe===1?a._tr_align(k):xe!==5&&(a._tr_stored_block(k,0,0,!1),xe===3&&(ze(k.head),k.lookahead===0&&(k.strstart=0,k.block_start=0,k.insert=0))),ue(O),O.avail_out===0))return k.last_flush=-1,m}return xe!==p?m:k.wrap<=0?1:(k.wrap===2?(me(k,255&O.adler),me(k,O.adler>>8&255),me(k,O.adler>>16&255),me(k,O.adler>>24&255),me(k,255&O.total_in),me(k,O.total_in>>8&255),me(k,O.total_in>>16&255),me(k,O.total_in>>24&255)):(ge(k,O.adler>>>16),ge(k,65535&O.adler)),ue(O),0<k.wrap&&(k.wrap=-k.wrap),k.pending!==0?m:1)},i.deflateEnd=function(O){var xe;return O&&O.state?(xe=O.state.status)!==U&&xe!==69&&xe!==73&&xe!==91&&xe!==103&&xe!==ne&&xe!==666?Fe(O,g):(O.state=null,xe===ne?Fe(O,-3):m):g},i.deflateSetDictionary=function(O,xe){var F,k,_,N,Q,pe,oe,Re,Ne=xe.length;if(!O||!O.state||(N=(F=O.state).wrap)===2||N===1&&F.status!==U||F.lookahead)return g;for(N===1&&(O.adler=l(O.adler,xe,Ne,0)),F.wrap=0,Ne>=F.w_size&&(N===0&&(ze(F.head),F.strstart=0,F.block_start=0,F.insert=0),Re=new s.Buf8(F.w_size),s.arraySet(Re,xe,Ne-F.w_size,F.w_size,0),xe=Re,Ne=F.w_size),Q=O.avail_in,pe=O.next_in,oe=O.input,O.avail_in=Ne,O.next_in=0,O.input=xe,ce(F);F.lookahead>=P;){for(k=F.strstart,_=F.lookahead-(P-1);F.ins_h=(F.ins_h<<F.hash_shift^F.window[k+P-1])&F.hash_mask,F.prev[k&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=k,k++,--_;);F.strstart=k,F.lookahead=P-1,ce(F)}return F.strstart+=F.lookahead,F.block_start=F.strstart,F.insert=F.lookahead,F.lookahead=0,F.match_length=F.prev_length=P-1,F.match_available=0,O.next_in=pe,O.input=oe,O.avail_in=Q,F.wrap=N,m},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,i){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,n,i){n.exports=function(o,s){var a,l,c,d,f,p,m,g,b,S,w,T,M,j,$,W,Y,ee,P,fe,de,U,ne,R,le;a=o.state,l=o.next_in,R=o.input,c=l+(o.avail_in-5),d=o.next_out,le=o.output,f=d-(s-o.avail_out),p=d+(o.avail_out-257),m=a.dmax,g=a.wsize,b=a.whave,S=a.wnext,w=a.window,T=a.hold,M=a.bits,j=a.lencode,$=a.distcode,W=(1<<a.lenbits)-1,Y=(1<<a.distbits)-1;e:do{M<15&&(T+=R[l++]<<M,M+=8,T+=R[l++]<<M,M+=8),ee=j[T&W];t:for(;;){if(T>>>=P=ee>>>24,M-=P,(P=ee>>>16&255)===0)le[d++]=65535&ee;else{if(!(16&P)){if(!(64&P)){ee=j[(65535&ee)+(T&(1<<P)-1)];continue t}if(32&P){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}fe=65535&ee,(P&=15)&&(M<P&&(T+=R[l++]<<M,M+=8),fe+=T&(1<<P)-1,T>>>=P,M-=P),M<15&&(T+=R[l++]<<M,M+=8,T+=R[l++]<<M,M+=8),ee=$[T&Y];r:for(;;){if(T>>>=P=ee>>>24,M-=P,!(16&(P=ee>>>16&255))){if(!(64&P)){ee=$[(65535&ee)+(T&(1<<P)-1)];continue r}o.msg="invalid distance code",a.mode=30;break e}if(de=65535&ee,M<(P&=15)&&(T+=R[l++]<<M,(M+=8)<P&&(T+=R[l++]<<M,M+=8)),m<(de+=T&(1<<P)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(T>>>=P,M-=P,(P=d-f)<de){if(b<(P=de-P)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(ne=w,(U=0)===S){if(U+=g-P,P<fe){for(fe-=P;le[d++]=w[U++],--P;);U=d-de,ne=le}}else if(S<P){if(U+=g+S-P,(P-=S)<fe){for(fe-=P;le[d++]=w[U++],--P;);if(U=0,S<fe){for(fe-=P=S;le[d++]=w[U++],--P;);U=d-de,ne=le}}}else if(U+=S-P,P<fe){for(fe-=P;le[d++]=w[U++],--P;);U=d-de,ne=le}for(;2<fe;)le[d++]=ne[U++],le[d++]=ne[U++],le[d++]=ne[U++],fe-=3;fe&&(le[d++]=ne[U++],1<fe&&(le[d++]=ne[U++]))}else{for(U=d-de;le[d++]=le[U++],le[d++]=le[U++],le[d++]=le[U++],2<(fe-=3););fe&&(le[d++]=le[U++],1<fe&&(le[d++]=le[U++]))}break}}break}}while(l<c&&d<p);l-=fe=M>>3,T&=(1<<(M-=fe<<3))-1,o.next_in=l,o.next_out=d,o.avail_in=l<c?c-l+5:5-(l-c),o.avail_out=d<p?p-d+257:257-(d-p),a.hold=T,a.bits=M}},{}],49:[function(r,n,i){var o=r("../utils/common"),s=r("./adler32"),a=r("./crc32"),l=r("./inffast"),c=r("./inftrees"),d=1,f=2,p=0,m=-2,g=1,b=852,S=592;function w(U){return(U>>>24&255)+(U>>>8&65280)+((65280&U)<<8)+((255&U)<<24)}function T(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function M(U){var ne;return U&&U.state?(ne=U.state,U.total_in=U.total_out=ne.total=0,U.msg="",ne.wrap&&(U.adler=1&ne.wrap),ne.mode=g,ne.last=0,ne.havedict=0,ne.dmax=32768,ne.head=null,ne.hold=0,ne.bits=0,ne.lencode=ne.lendyn=new o.Buf32(b),ne.distcode=ne.distdyn=new o.Buf32(S),ne.sane=1,ne.back=-1,p):m}function j(U){var ne;return U&&U.state?((ne=U.state).wsize=0,ne.whave=0,ne.wnext=0,M(U)):m}function $(U,ne){var R,le;return U&&U.state?(le=U.state,ne<0?(R=0,ne=-ne):(R=1+(ne>>4),ne<48&&(ne&=15)),ne&&(ne<8||15<ne)?m:(le.window!==null&&le.wbits!==ne&&(le.window=null),le.wrap=R,le.wbits=ne,j(U))):m}function W(U,ne){var R,le;return U?(le=new T,(U.state=le).window=null,(R=$(U,ne))!==p&&(U.state=null),R):m}var Y,ee,P=!0;function fe(U){if(P){var ne;for(Y=new o.Buf32(512),ee=new o.Buf32(32),ne=0;ne<144;)U.lens[ne++]=8;for(;ne<256;)U.lens[ne++]=9;for(;ne<280;)U.lens[ne++]=7;for(;ne<288;)U.lens[ne++]=8;for(c(d,U.lens,0,288,Y,0,U.work,{bits:9}),ne=0;ne<32;)U.lens[ne++]=5;c(f,U.lens,0,32,ee,0,U.work,{bits:5}),P=!1}U.lencode=Y,U.lenbits=9,U.distcode=ee,U.distbits=5}function de(U,ne,R,le){var Ce,he=U.state;return he.window===null&&(he.wsize=1<<he.wbits,he.wnext=0,he.whave=0,he.window=new o.Buf8(he.wsize)),le>=he.wsize?(o.arraySet(he.window,ne,R-he.wsize,he.wsize,0),he.wnext=0,he.whave=he.wsize):(le<(Ce=he.wsize-he.wnext)&&(Ce=le),o.arraySet(he.window,ne,R-le,Ce,he.wnext),(le-=Ce)?(o.arraySet(he.window,ne,R-le,le,0),he.wnext=le,he.whave=he.wsize):(he.wnext+=Ce,he.wnext===he.wsize&&(he.wnext=0),he.whave<he.wsize&&(he.whave+=Ce))),0}i.inflateReset=j,i.inflateReset2=$,i.inflateResetKeep=M,i.inflateInit=function(U){return W(U,15)},i.inflateInit2=W,i.inflate=function(U,ne){var R,le,Ce,he,Fe,ye,ze,ue,V,me,ge,ke,ce,L,D,ae,ie,q,Z,we,O,xe,F,k,_=0,N=new o.Buf8(4),Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!U||!U.state||!U.output||!U.input&&U.avail_in!==0)return m;(R=U.state).mode===12&&(R.mode=13),Fe=U.next_out,Ce=U.output,ze=U.avail_out,he=U.next_in,le=U.input,ye=U.avail_in,ue=R.hold,V=R.bits,me=ye,ge=ze,xe=p;e:for(;;)switch(R.mode){case g:if(R.wrap===0){R.mode=13;break}for(;V<16;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(2&R.wrap&&ue===35615){N[R.check=0]=255&ue,N[1]=ue>>>8&255,R.check=a(R.check,N,2,0),V=ue=0,R.mode=2;break}if(R.flags=0,R.head&&(R.head.done=!1),!(1&R.wrap)||(((255&ue)<<8)+(ue>>8))%31){U.msg="incorrect header check",R.mode=30;break}if((15&ue)!=8){U.msg="unknown compression method",R.mode=30;break}if(V-=4,O=8+(15&(ue>>>=4)),R.wbits===0)R.wbits=O;else if(O>R.wbits){U.msg="invalid window size",R.mode=30;break}R.dmax=1<<O,U.adler=R.check=1,R.mode=512&ue?10:12,V=ue=0;break;case 2:for(;V<16;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(R.flags=ue,(255&R.flags)!=8){U.msg="unknown compression method",R.mode=30;break}if(57344&R.flags){U.msg="unknown header flags set",R.mode=30;break}R.head&&(R.head.text=ue>>8&1),512&R.flags&&(N[0]=255&ue,N[1]=ue>>>8&255,R.check=a(R.check,N,2,0)),V=ue=0,R.mode=3;case 3:for(;V<32;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}R.head&&(R.head.time=ue),512&R.flags&&(N[0]=255&ue,N[1]=ue>>>8&255,N[2]=ue>>>16&255,N[3]=ue>>>24&255,R.check=a(R.check,N,4,0)),V=ue=0,R.mode=4;case 4:for(;V<16;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}R.head&&(R.head.xflags=255&ue,R.head.os=ue>>8),512&R.flags&&(N[0]=255&ue,N[1]=ue>>>8&255,R.check=a(R.check,N,2,0)),V=ue=0,R.mode=5;case 5:if(1024&R.flags){for(;V<16;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}R.length=ue,R.head&&(R.head.extra_len=ue),512&R.flags&&(N[0]=255&ue,N[1]=ue>>>8&255,R.check=a(R.check,N,2,0)),V=ue=0}else R.head&&(R.head.extra=null);R.mode=6;case 6:if(1024&R.flags&&(ye<(ke=R.length)&&(ke=ye),ke&&(R.head&&(O=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),o.arraySet(R.head.extra,le,he,ke,O)),512&R.flags&&(R.check=a(R.check,le,ke,he)),ye-=ke,he+=ke,R.length-=ke),R.length))break e;R.length=0,R.mode=7;case 7:if(2048&R.flags){if(ye===0)break e;for(ke=0;O=le[he+ke++],R.head&&O&&R.length<65536&&(R.head.name+=String.fromCharCode(O)),O&&ke<ye;);if(512&R.flags&&(R.check=a(R.check,le,ke,he)),ye-=ke,he+=ke,O)break e}else R.head&&(R.head.name=null);R.length=0,R.mode=8;case 8:if(4096&R.flags){if(ye===0)break e;for(ke=0;O=le[he+ke++],R.head&&O&&R.length<65536&&(R.head.comment+=String.fromCharCode(O)),O&&ke<ye;);if(512&R.flags&&(R.check=a(R.check,le,ke,he)),ye-=ke,he+=ke,O)break e}else R.head&&(R.head.comment=null);R.mode=9;case 9:if(512&R.flags){for(;V<16;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(ue!==(65535&R.check)){U.msg="header crc mismatch",R.mode=30;break}V=ue=0}R.head&&(R.head.hcrc=R.flags>>9&1,R.head.done=!0),U.adler=R.check=0,R.mode=12;break;case 10:for(;V<32;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}U.adler=R.check=w(ue),V=ue=0,R.mode=11;case 11:if(R.havedict===0)return U.next_out=Fe,U.avail_out=ze,U.next_in=he,U.avail_in=ye,R.hold=ue,R.bits=V,2;U.adler=R.check=1,R.mode=12;case 12:if(ne===5||ne===6)break e;case 13:if(R.last){ue>>>=7&V,V-=7&V,R.mode=27;break}for(;V<3;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}switch(R.last=1&ue,V-=1,3&(ue>>>=1)){case 0:R.mode=14;break;case 1:if(fe(R),R.mode=20,ne!==6)break;ue>>>=2,V-=2;break e;case 2:R.mode=17;break;case 3:U.msg="invalid block type",R.mode=30}ue>>>=2,V-=2;break;case 14:for(ue>>>=7&V,V-=7&V;V<32;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if((65535&ue)!=(ue>>>16^65535)){U.msg="invalid stored block lengths",R.mode=30;break}if(R.length=65535&ue,V=ue=0,R.mode=15,ne===6)break e;case 15:R.mode=16;case 16:if(ke=R.length){if(ye<ke&&(ke=ye),ze<ke&&(ke=ze),ke===0)break e;o.arraySet(Ce,le,he,ke,Fe),ye-=ke,he+=ke,ze-=ke,Fe+=ke,R.length-=ke;break}R.mode=12;break;case 17:for(;V<14;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(R.nlen=257+(31&ue),ue>>>=5,V-=5,R.ndist=1+(31&ue),ue>>>=5,V-=5,R.ncode=4+(15&ue),ue>>>=4,V-=4,286<R.nlen||30<R.ndist){U.msg="too many length or distance symbols",R.mode=30;break}R.have=0,R.mode=18;case 18:for(;R.have<R.ncode;){for(;V<3;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}R.lens[Q[R.have++]]=7&ue,ue>>>=3,V-=3}for(;R.have<19;)R.lens[Q[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,F={bits:R.lenbits},xe=c(0,R.lens,0,19,R.lencode,0,R.work,F),R.lenbits=F.bits,xe){U.msg="invalid code lengths set",R.mode=30;break}R.have=0,R.mode=19;case 19:for(;R.have<R.nlen+R.ndist;){for(;ae=(_=R.lencode[ue&(1<<R.lenbits)-1])>>>16&255,ie=65535&_,!((D=_>>>24)<=V);){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(ie<16)ue>>>=D,V-=D,R.lens[R.have++]=ie;else{if(ie===16){for(k=D+2;V<k;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(ue>>>=D,V-=D,R.have===0){U.msg="invalid bit length repeat",R.mode=30;break}O=R.lens[R.have-1],ke=3+(3&ue),ue>>>=2,V-=2}else if(ie===17){for(k=D+3;V<k;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}V-=D,O=0,ke=3+(7&(ue>>>=D)),ue>>>=3,V-=3}else{for(k=D+7;V<k;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}V-=D,O=0,ke=11+(127&(ue>>>=D)),ue>>>=7,V-=7}if(R.have+ke>R.nlen+R.ndist){U.msg="invalid bit length repeat",R.mode=30;break}for(;ke--;)R.lens[R.have++]=O}}if(R.mode===30)break;if(R.lens[256]===0){U.msg="invalid code -- missing end-of-block",R.mode=30;break}if(R.lenbits=9,F={bits:R.lenbits},xe=c(d,R.lens,0,R.nlen,R.lencode,0,R.work,F),R.lenbits=F.bits,xe){U.msg="invalid literal/lengths set",R.mode=30;break}if(R.distbits=6,R.distcode=R.distdyn,F={bits:R.distbits},xe=c(f,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,F),R.distbits=F.bits,xe){U.msg="invalid distances set",R.mode=30;break}if(R.mode=20,ne===6)break e;case 20:R.mode=21;case 21:if(6<=ye&&258<=ze){U.next_out=Fe,U.avail_out=ze,U.next_in=he,U.avail_in=ye,R.hold=ue,R.bits=V,l(U,ge),Fe=U.next_out,Ce=U.output,ze=U.avail_out,he=U.next_in,le=U.input,ye=U.avail_in,ue=R.hold,V=R.bits,R.mode===12&&(R.back=-1);break}for(R.back=0;ae=(_=R.lencode[ue&(1<<R.lenbits)-1])>>>16&255,ie=65535&_,!((D=_>>>24)<=V);){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(ae&&!(240&ae)){for(q=D,Z=ae,we=ie;ae=(_=R.lencode[we+((ue&(1<<q+Z)-1)>>q)])>>>16&255,ie=65535&_,!(q+(D=_>>>24)<=V);){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}ue>>>=q,V-=q,R.back+=q}if(ue>>>=D,V-=D,R.back+=D,R.length=ie,ae===0){R.mode=26;break}if(32&ae){R.back=-1,R.mode=12;break}if(64&ae){U.msg="invalid literal/length code",R.mode=30;break}R.extra=15&ae,R.mode=22;case 22:if(R.extra){for(k=R.extra;V<k;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}R.length+=ue&(1<<R.extra)-1,ue>>>=R.extra,V-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=23;case 23:for(;ae=(_=R.distcode[ue&(1<<R.distbits)-1])>>>16&255,ie=65535&_,!((D=_>>>24)<=V);){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(!(240&ae)){for(q=D,Z=ae,we=ie;ae=(_=R.distcode[we+((ue&(1<<q+Z)-1)>>q)])>>>16&255,ie=65535&_,!(q+(D=_>>>24)<=V);){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}ue>>>=q,V-=q,R.back+=q}if(ue>>>=D,V-=D,R.back+=D,64&ae){U.msg="invalid distance code",R.mode=30;break}R.offset=ie,R.extra=15&ae,R.mode=24;case 24:if(R.extra){for(k=R.extra;V<k;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}R.offset+=ue&(1<<R.extra)-1,ue>>>=R.extra,V-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){U.msg="invalid distance too far back",R.mode=30;break}R.mode=25;case 25:if(ze===0)break e;if(ke=ge-ze,R.offset>ke){if((ke=R.offset-ke)>R.whave&&R.sane){U.msg="invalid distance too far back",R.mode=30;break}ce=ke>R.wnext?(ke-=R.wnext,R.wsize-ke):R.wnext-ke,ke>R.length&&(ke=R.length),L=R.window}else L=Ce,ce=Fe-R.offset,ke=R.length;for(ze<ke&&(ke=ze),ze-=ke,R.length-=ke;Ce[Fe++]=L[ce++],--ke;);R.length===0&&(R.mode=21);break;case 26:if(ze===0)break e;Ce[Fe++]=R.length,ze--,R.mode=21;break;case 27:if(R.wrap){for(;V<32;){if(ye===0)break e;ye--,ue|=le[he++]<<V,V+=8}if(ge-=ze,U.total_out+=ge,R.total+=ge,ge&&(U.adler=R.check=R.flags?a(R.check,Ce,ge,Fe-ge):s(R.check,Ce,ge,Fe-ge)),ge=ze,(R.flags?ue:w(ue))!==R.check){U.msg="incorrect data check",R.mode=30;break}V=ue=0}R.mode=28;case 28:if(R.wrap&&R.flags){for(;V<32;){if(ye===0)break e;ye--,ue+=le[he++]<<V,V+=8}if(ue!==(4294967295&R.total)){U.msg="incorrect length check",R.mode=30;break}V=ue=0}R.mode=29;case 29:xe=1;break e;case 30:xe=-3;break e;case 31:return-4;case 32:default:return m}return U.next_out=Fe,U.avail_out=ze,U.next_in=he,U.avail_in=ye,R.hold=ue,R.bits=V,(R.wsize||ge!==U.avail_out&&R.mode<30&&(R.mode<27||ne!==4))&&de(U,U.output,U.next_out,ge-U.avail_out)?(R.mode=31,-4):(me-=U.avail_in,ge-=U.avail_out,U.total_in+=me,U.total_out+=ge,R.total+=ge,R.wrap&&ge&&(U.adler=R.check=R.flags?a(R.check,Ce,ge,U.next_out-ge):s(R.check,Ce,ge,U.next_out-ge)),U.data_type=R.bits+(R.last?64:0)+(R.mode===12?128:0)+(R.mode===20||R.mode===15?256:0),(me==0&&ge===0||ne===4)&&xe===p&&(xe=-5),xe)},i.inflateEnd=function(U){if(!U||!U.state)return m;var ne=U.state;return ne.window&&(ne.window=null),U.state=null,p},i.inflateGetHeader=function(U,ne){var R;return U&&U.state&&2&(R=U.state).wrap?((R.head=ne).done=!1,p):m},i.inflateSetDictionary=function(U,ne){var R,le=ne.length;return U&&U.state?(R=U.state).wrap!==0&&R.mode!==11?m:R.mode===11&&s(1,ne,le,0)!==R.check?-3:de(U,ne,le,le)?(R.mode=31,-4):(R.havedict=1,p):m},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,i){var o=r("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(d,f,p,m,g,b,S,w){var T,M,j,$,W,Y,ee,P,fe,de=w.bits,U=0,ne=0,R=0,le=0,Ce=0,he=0,Fe=0,ye=0,ze=0,ue=0,V=null,me=0,ge=new o.Buf16(16),ke=new o.Buf16(16),ce=null,L=0;for(U=0;U<=15;U++)ge[U]=0;for(ne=0;ne<m;ne++)ge[f[p+ne]]++;for(Ce=de,le=15;1<=le&&ge[le]===0;le--);if(le<Ce&&(Ce=le),le===0)return g[b++]=20971520,g[b++]=20971520,w.bits=1,0;for(R=1;R<le&&ge[R]===0;R++);for(Ce<R&&(Ce=R),U=ye=1;U<=15;U++)if(ye<<=1,(ye-=ge[U])<0)return-1;if(0<ye&&(d===0||le!==1))return-1;for(ke[1]=0,U=1;U<15;U++)ke[U+1]=ke[U]+ge[U];for(ne=0;ne<m;ne++)f[p+ne]!==0&&(S[ke[f[p+ne]]++]=ne);if(Y=d===0?(V=ce=S,19):d===1?(V=s,me-=257,ce=a,L-=257,256):(V=l,ce=c,-1),U=R,W=b,Fe=ne=ue=0,j=-1,$=(ze=1<<(he=Ce))-1,d===1&&852<ze||d===2&&592<ze)return 1;for(;;){for(ee=U-Fe,fe=S[ne]<Y?(P=0,S[ne]):S[ne]>Y?(P=ce[L+S[ne]],V[me+S[ne]]):(P=96,0),T=1<<U-Fe,R=M=1<<he;g[W+(ue>>Fe)+(M-=T)]=ee<<24|P<<16|fe|0,M!==0;);for(T=1<<U-1;ue&T;)T>>=1;if(T!==0?(ue&=T-1,ue+=T):ue=0,ne++,--ge[U]==0){if(U===le)break;U=f[p+S[ne]]}if(Ce<U&&(ue&$)!==j){for(Fe===0&&(Fe=Ce),W+=R,ye=1<<(he=U-Fe);he+Fe<le&&!((ye-=ge[he+Fe])<=0);)he++,ye<<=1;if(ze+=1<<he,d===1&&852<ze||d===2&&592<ze)return 1;g[j=ue&$]=Ce<<24|he<<16|W-b|0}}return ue!==0&&(g[W+ue]=U-Fe<<24|64<<16|0),w.bits=Ce,0}},{"../utils/common":41}],51:[function(r,n,i){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,n,i){var o=r("../utils/common"),s=0,a=1;function l(_){for(var N=_.length;0<=--N;)_[N]=0}var c=0,d=29,f=256,p=f+1+d,m=30,g=19,b=2*p+1,S=15,w=16,T=7,M=256,j=16,$=17,W=18,Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ee=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],fe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],de=new Array(2*(p+2));l(de);var U=new Array(2*m);l(U);var ne=new Array(512);l(ne);var R=new Array(256);l(R);var le=new Array(d);l(le);var Ce,he,Fe,ye=new Array(m);function ze(_,N,Q,pe,oe){this.static_tree=_,this.extra_bits=N,this.extra_base=Q,this.elems=pe,this.max_length=oe,this.has_stree=_&&_.length}function ue(_,N){this.dyn_tree=_,this.max_code=0,this.stat_desc=N}function V(_){return _<256?ne[_]:ne[256+(_>>>7)]}function me(_,N){_.pending_buf[_.pending++]=255&N,_.pending_buf[_.pending++]=N>>>8&255}function ge(_,N,Q){_.bi_valid>w-Q?(_.bi_buf|=N<<_.bi_valid&65535,me(_,_.bi_buf),_.bi_buf=N>>w-_.bi_valid,_.bi_valid+=Q-w):(_.bi_buf|=N<<_.bi_valid&65535,_.bi_valid+=Q)}function ke(_,N,Q){ge(_,Q[2*N],Q[2*N+1])}function ce(_,N){for(var Q=0;Q|=1&_,_>>>=1,Q<<=1,0<--N;);return Q>>>1}function L(_,N,Q){var pe,oe,Re=new Array(S+1),Ne=0;for(pe=1;pe<=S;pe++)Re[pe]=Ne=Ne+Q[pe-1]<<1;for(oe=0;oe<=N;oe++){var De=_[2*oe+1];De!==0&&(_[2*oe]=ce(Re[De]++,De))}}function D(_){var N;for(N=0;N<p;N++)_.dyn_ltree[2*N]=0;for(N=0;N<m;N++)_.dyn_dtree[2*N]=0;for(N=0;N<g;N++)_.bl_tree[2*N]=0;_.dyn_ltree[2*M]=1,_.opt_len=_.static_len=0,_.last_lit=_.matches=0}function ae(_){8<_.bi_valid?me(_,_.bi_buf):0<_.bi_valid&&(_.pending_buf[_.pending++]=_.bi_buf),_.bi_buf=0,_.bi_valid=0}function ie(_,N,Q,pe){var oe=2*N,Re=2*Q;return _[oe]<_[Re]||_[oe]===_[Re]&&pe[N]<=pe[Q]}function q(_,N,Q){for(var pe=_.heap[Q],oe=Q<<1;oe<=_.heap_len&&(oe<_.heap_len&&ie(N,_.heap[oe+1],_.heap[oe],_.depth)&&oe++,!ie(N,pe,_.heap[oe],_.depth));)_.heap[Q]=_.heap[oe],Q=oe,oe<<=1;_.heap[Q]=pe}function Z(_,N,Q){var pe,oe,Re,Ne,De=0;if(_.last_lit!==0)for(;pe=_.pending_buf[_.d_buf+2*De]<<8|_.pending_buf[_.d_buf+2*De+1],oe=_.pending_buf[_.l_buf+De],De++,pe===0?ke(_,oe,N):(ke(_,(Re=R[oe])+f+1,N),(Ne=Y[Re])!==0&&ge(_,oe-=le[Re],Ne),ke(_,Re=V(--pe),Q),(Ne=ee[Re])!==0&&ge(_,pe-=ye[Re],Ne)),De<_.last_lit;);ke(_,M,N)}function we(_,N){var Q,pe,oe,Re=N.dyn_tree,Ne=N.stat_desc.static_tree,De=N.stat_desc.has_stree,We=N.stat_desc.elems,Je=-1;for(_.heap_len=0,_.heap_max=b,Q=0;Q<We;Q++)Re[2*Q]!==0?(_.heap[++_.heap_len]=Je=Q,_.depth[Q]=0):Re[2*Q+1]=0;for(;_.heap_len<2;)Re[2*(oe=_.heap[++_.heap_len]=Je<2?++Je:0)]=1,_.depth[oe]=0,_.opt_len--,De&&(_.static_len-=Ne[2*oe+1]);for(N.max_code=Je,Q=_.heap_len>>1;1<=Q;Q--)q(_,Re,Q);for(oe=We;Q=_.heap[1],_.heap[1]=_.heap[_.heap_len--],q(_,Re,1),pe=_.heap[1],_.heap[--_.heap_max]=Q,_.heap[--_.heap_max]=pe,Re[2*oe]=Re[2*Q]+Re[2*pe],_.depth[oe]=(_.depth[Q]>=_.depth[pe]?_.depth[Q]:_.depth[pe])+1,Re[2*Q+1]=Re[2*pe+1]=oe,_.heap[1]=oe++,q(_,Re,1),2<=_.heap_len;);_.heap[--_.heap_max]=_.heap[1],function(Ye,Gt){var Ar,pr,en,Ct,Yn,Nn,rr=Gt.dyn_tree,Jn=Gt.max_code,$i=Gt.stat_desc.static_tree,dr=Gt.stat_desc.has_stree,Hr=Gt.stat_desc.extra_bits,tn=Gt.stat_desc.extra_base,mt=Gt.stat_desc.max_length,Rr=0;for(Ct=0;Ct<=S;Ct++)Ye.bl_count[Ct]=0;for(rr[2*Ye.heap[Ye.heap_max]+1]=0,Ar=Ye.heap_max+1;Ar<b;Ar++)mt<(Ct=rr[2*rr[2*(pr=Ye.heap[Ar])+1]+1]+1)&&(Ct=mt,Rr++),rr[2*pr+1]=Ct,Jn<pr||(Ye.bl_count[Ct]++,Yn=0,tn<=pr&&(Yn=Hr[pr-tn]),Nn=rr[2*pr],Ye.opt_len+=Nn*(Ct+Yn),dr&&(Ye.static_len+=Nn*($i[2*pr+1]+Yn)));if(Rr!==0){do{for(Ct=mt-1;Ye.bl_count[Ct]===0;)Ct--;Ye.bl_count[Ct]--,Ye.bl_count[Ct+1]+=2,Ye.bl_count[mt]--,Rr-=2}while(0<Rr);for(Ct=mt;Ct!==0;Ct--)for(pr=Ye.bl_count[Ct];pr!==0;)Jn<(en=Ye.heap[--Ar])||(rr[2*en+1]!==Ct&&(Ye.opt_len+=(Ct-rr[2*en+1])*rr[2*en],rr[2*en+1]=Ct),pr--)}}(_,N),L(Re,Je,_.bl_count)}function O(_,N,Q){var pe,oe,Re=-1,Ne=N[1],De=0,We=7,Je=4;for(Ne===0&&(We=138,Je=3),N[2*(Q+1)+1]=65535,pe=0;pe<=Q;pe++)oe=Ne,Ne=N[2*(pe+1)+1],++De<We&&oe===Ne||(De<Je?_.bl_tree[2*oe]+=De:oe!==0?(oe!==Re&&_.bl_tree[2*oe]++,_.bl_tree[2*j]++):De<=10?_.bl_tree[2*$]++:_.bl_tree[2*W]++,Re=oe,Je=(De=0)===Ne?(We=138,3):oe===Ne?(We=6,3):(We=7,4))}function xe(_,N,Q){var pe,oe,Re=-1,Ne=N[1],De=0,We=7,Je=4;for(Ne===0&&(We=138,Je=3),pe=0;pe<=Q;pe++)if(oe=Ne,Ne=N[2*(pe+1)+1],!(++De<We&&oe===Ne)){if(De<Je)for(;ke(_,oe,_.bl_tree),--De!=0;);else oe!==0?(oe!==Re&&(ke(_,oe,_.bl_tree),De--),ke(_,j,_.bl_tree),ge(_,De-3,2)):De<=10?(ke(_,$,_.bl_tree),ge(_,De-3,3)):(ke(_,W,_.bl_tree),ge(_,De-11,7));Re=oe,Je=(De=0)===Ne?(We=138,3):oe===Ne?(We=6,3):(We=7,4)}}l(ye);var F=!1;function k(_,N,Q,pe){ge(_,(c<<1)+(pe?1:0),3),function(oe,Re,Ne,De){ae(oe),me(oe,Ne),me(oe,~Ne),o.arraySet(oe.pending_buf,oe.window,Re,Ne,oe.pending),oe.pending+=Ne}(_,N,Q)}i._tr_init=function(_){F||(function(){var N,Q,pe,oe,Re,Ne=new Array(S+1);for(oe=pe=0;oe<d-1;oe++)for(le[oe]=pe,N=0;N<1<<Y[oe];N++)R[pe++]=oe;for(R[pe-1]=oe,oe=Re=0;oe<16;oe++)for(ye[oe]=Re,N=0;N<1<<ee[oe];N++)ne[Re++]=oe;for(Re>>=7;oe<m;oe++)for(ye[oe]=Re<<7,N=0;N<1<<ee[oe]-7;N++)ne[256+Re++]=oe;for(Q=0;Q<=S;Q++)Ne[Q]=0;for(N=0;N<=143;)de[2*N+1]=8,N++,Ne[8]++;for(;N<=255;)de[2*N+1]=9,N++,Ne[9]++;for(;N<=279;)de[2*N+1]=7,N++,Ne[7]++;for(;N<=287;)de[2*N+1]=8,N++,Ne[8]++;for(L(de,p+1,Ne),N=0;N<m;N++)U[2*N+1]=5,U[2*N]=ce(N,5);Ce=new ze(de,Y,f+1,p,S),he=new ze(U,ee,0,m,S),Fe=new ze(new Array(0),P,0,g,T)}(),F=!0),_.l_desc=new ue(_.dyn_ltree,Ce),_.d_desc=new ue(_.dyn_dtree,he),_.bl_desc=new ue(_.bl_tree,Fe),_.bi_buf=0,_.bi_valid=0,D(_)},i._tr_stored_block=k,i._tr_flush_block=function(_,N,Q,pe){var oe,Re,Ne=0;0<_.level?(_.strm.data_type===2&&(_.strm.data_type=function(De){var We,Je=4093624447;for(We=0;We<=31;We++,Je>>>=1)if(1&Je&&De.dyn_ltree[2*We]!==0)return s;if(De.dyn_ltree[18]!==0||De.dyn_ltree[20]!==0||De.dyn_ltree[26]!==0)return a;for(We=32;We<f;We++)if(De.dyn_ltree[2*We]!==0)return a;return s}(_)),we(_,_.l_desc),we(_,_.d_desc),Ne=function(De){var We;for(O(De,De.dyn_ltree,De.l_desc.max_code),O(De,De.dyn_dtree,De.d_desc.max_code),we(De,De.bl_desc),We=g-1;3<=We&&De.bl_tree[2*fe[We]+1]===0;We--);return De.opt_len+=3*(We+1)+5+5+4,We}(_),oe=_.opt_len+3+7>>>3,(Re=_.static_len+3+7>>>3)<=oe&&(oe=Re)):oe=Re=Q+5,Q+4<=oe&&N!==-1?k(_,N,Q,pe):_.strategy===4||Re===oe?(ge(_,2+(pe?1:0),3),Z(_,de,U)):(ge(_,4+(pe?1:0),3),function(De,We,Je,Ye){var Gt;for(ge(De,We-257,5),ge(De,Je-1,5),ge(De,Ye-4,4),Gt=0;Gt<Ye;Gt++)ge(De,De.bl_tree[2*fe[Gt]+1],3);xe(De,De.dyn_ltree,We-1),xe(De,De.dyn_dtree,Je-1)}(_,_.l_desc.max_code+1,_.d_desc.max_code+1,Ne+1),Z(_,_.dyn_ltree,_.dyn_dtree)),D(_),pe&&ae(_)},i._tr_tally=function(_,N,Q){return _.pending_buf[_.d_buf+2*_.last_lit]=N>>>8&255,_.pending_buf[_.d_buf+2*_.last_lit+1]=255&N,_.pending_buf[_.l_buf+_.last_lit]=255&Q,_.last_lit++,N===0?_.dyn_ltree[2*Q]++:(_.matches++,N--,_.dyn_ltree[2*(R[Q]+f+1)]++,_.dyn_dtree[2*V(N)]++),_.last_lit===_.lit_bufsize-1},i._tr_align=function(_){ge(_,2,3),ke(_,M,de),function(N){N.bi_valid===16?(me(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(_)}},{"../utils/common":41}],53:[function(r,n,i){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,i){(function(o){(function(s,a){if(!s.setImmediate){var l,c,d,f,p=1,m={},g=!1,b=s.document,S=Object.getPrototypeOf&&Object.getPrototypeOf(s);S=S&&S.setTimeout?S:s,l={}.toString.call(s.process)==="[object process]"?function(j){gt.nextTick(function(){T(j)})}:function(){if(s.postMessage&&!s.importScripts){var j=!0,$=s.onmessage;return s.onmessage=function(){j=!1},s.postMessage("","*"),s.onmessage=$,j}}()?(f="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",M,!1):s.attachEvent("onmessage",M),function(j){s.postMessage(f+j,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(j){T(j.data)},function(j){d.port2.postMessage(j)}):b&&"onreadystatechange"in b.createElement("script")?(c=b.documentElement,function(j){var $=b.createElement("script");$.onreadystatechange=function(){T(j),$.onreadystatechange=null,c.removeChild($),$=null},c.appendChild($)}):function(j){setTimeout(T,0,j)},S.setImmediate=function(j){typeof j!="function"&&(j=new Function(""+j));for(var $=new Array(arguments.length-1),W=0;W<$.length;W++)$[W]=arguments[W+1];var Y={callback:j,args:$};return m[p]=Y,l(p),p++},S.clearImmediate=w}function w(j){delete m[j]}function T(j){if(g)setTimeout(T,0,j);else{var $=m[j];if($){g=!0;try{(function(W){var Y=W.callback,ee=W.args;switch(ee.length){case 0:Y();break;case 1:Y(ee[0]);break;case 2:Y(ee[0],ee[1]);break;case 3:Y(ee[0],ee[1],ee[2]);break;default:Y.apply(a,ee)}})($)}finally{w(j),g=!1}}}}function M(j){j.source===s&&typeof j.data=="string"&&j.data.indexOf(f)===0&&T(+j.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof mo<"u"?mo:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(hP);var gse=hP.exports;const yse=t3(gse);var ky={exports:{}},vse={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;"};function bse(t){return t&&t.replace?t.replace(/([&"<>'])/g,function(e,r){return vse[r]}):t}var wse=bse,b1=wse,dR=sk.Stream,xse=" ";function Sse(t,e){typeof e!="object"&&(e={indent:e});var r=e.stream?new dR:null,n="",i=!1,o=e.indent?e.indent===!0?xse:e.indent:"",s=!0;function a(p){s?gt.nextTick(p):p()}function l(p,m){if(m!==void 0&&(n+=m),p&&!i&&(r=r||new dR,i=!0),p&&i){var g=n;a(function(){r.emit("data",g)}),n=""}}function c(p,m){vk(l,_y(p,o,o?1:0),m)}function d(){if(r){var p=n;a(function(){r.emit("data",p),r.emit("end"),r.readable=!1,r.emit("close")})}}function f(p){var m=p.encoding||"UTF-8",g={version:"1.0",encoding:m};p.standalone&&(g.standalone=p.standalone),c({"?xml":{_attr:g}}),n=n.replace("/>","?>")}return a(function(){s=!1}),e.declaration&&f(e.declaration),t&&t.forEach?t.forEach(function(p,m){var g;m+1===t.length&&(g=d),c(p,g)}):c(t,d),r?(r.readable=!0,r):n}function kse(){var t=Array.prototype.slice.call(arguments),e={_elem:_y(t)};return e.push=function(r){if(!this.append)throw new Error("not assigned to a parent!");var n=this,i=this._elem.indent;vk(this.append,_y(r,i,this._elem.icount+(i?1:0)),function(){n.append(!0)})},e.close=function(r){r!==void 0&&this.push(r),this.end&&this.end()},e}function _se(t,e){return new Array(e||0).join(t||"")}function _y(t,e,r){r=r||0;var n=_se(e,r),i,o=t,s=!1;if(typeof t=="object"){var a=Object.keys(t);if(i=a[0],o=t[i],o&&o._elem)return o._elem.name=i,o._elem.icount=r,o._elem.indent=e,o._elem.indents=n,o._elem.interrupt=o,o._elem}var l=[],c=[],d;function f(p){var m=Object.keys(p);m.forEach(function(g){l.push(Ese(g,p[g]))})}switch(typeof o){case"object":if(o===null)break;o._attr&&f(o._attr),o._cdata&&c.push(("<![CDATA["+o._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),o.forEach&&(d=!1,c.push(""),o.forEach(function(p){if(typeof p=="object"){var m=Object.keys(p)[0];m=="_attr"?f(p._attr):c.push(_y(p,e,r+1))}else c.pop(),d=!0,c.push(b1(p))}),d||c.push(""));break;default:c.push(b1(o))}return{name:i,interrupt:s,attributes:l,content:c,icount:r,indents:n,indent:e}}function vk(t,e,r){if(typeof e!="object")return t(!1,e);var n=e.interrupt?1:e.content.length;function i(){for(;e.content.length;){var s=e.content.shift();if(s!==void 0){if(o(s))return;vk(t,s)}}t(!1,(n>1?e.indents:"")+(e.name?"</"+e.name+">":"")+(e.indent&&!r?`
311
+ `:"")),r&&r()}function o(s){return s.interrupt?(s.interrupt.append=t,s.interrupt.end=i,s.interrupt=!1,t(!0),!0):!1}if(t(!1,e.indents+(e.name?"<"+e.name:"")+(e.attributes.length?" "+e.attributes.join(" "):"")+(n?e.name?">":"":e.name?"/>":"")+(e.indent&&n>1?`
312
+ `:"")),!n)return t(!1,e.indent?`
313
+ `:"");o(e)||i()}function Ese(t,e){return t+'="'+b1(e)+'"'}ky.exports=Sse;ky.exports.element=ky.exports.Element=kse;var Cse=ky.exports;const lr=t3(Cse),fR=0,hR=32,Tse=32,Ase=(t,e)=>{const r=e.replace(/-/g,"");if(r.length!==Tse)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const i=r.replace(/(..)/g,"$1 ").trim().split(" ").map(l=>parseInt(l,16));i.reverse();const s=t.slice(fR,hR).map((l,c)=>l^i[c%i.length]);return Buffer.concat([t.slice(0,fR),s,t.slice(hR)])};class Rse{format(e,r={stack:[]}){const n=e.prepForXml(r);if(n)return n;throw Error("XMLComponent did not format correctly")}}class Ise{replace(e,r,n){let i=e;return r.forEach((o,s)=>{i=i.replace(new RegExp(`{${o.fileName}}`,"g"),(n+s).toString())}),i}getMediaData(e,r){return r.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class Ose{replace(e,r){let n=e;for(const i of r)n=n.replace(new RegExp(`{${i.reference}-${i.instance}}`,"g"),i.numId.toString());return n}}class Mse{constructor(){Ae(this,"formatter"),Ae(this,"imageReplacer"),Ae(this,"numberingReplacer"),this.formatter=new Rse,this.imageReplacer=new Ise,this.numberingReplacer=new Ose}compile(e,r){const n=new yse,i=this.xmlifyFile(e,r),o=new Map(Object.entries(i));for(const[,s]of o)if(Array.isArray(s))for(const a of s)n.file(a.path,a.data);else n.file(s.path,s.data);for(const s of e.Media.Array)s.type!=="svg"?n.file(`word/media/${s.fileName}`,s.data):(n.file(`word/media/${s.fileName}`,s.data),n.file(`word/media/${s.fallback.fileName}`,s.fallback.data));for(const{data:s,name:a,fontKey:l}of e.FontTable.fontOptionsWithKey){const[c]=a.split(".");n.file(`word/fonts/${c}.odttf`,Ase(s,l))}return n}xmlifyFile(e,r){const n=e.Document.Relationships.RelationshipCount+1,i=lr(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),o=this.imageReplacer.getMediaData(i,e.Media);return{Relationships:{data:(o.forEach((s,a)=>{e.Document.Relationships.createRelationship(n+a,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${s.fileName}`)}),lr(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const s=this.imageReplacer.replace(i,o,n);return this.numberingReplacer.replace(s,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const s=lr(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(s,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:lr(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:lr(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:lr(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((s,a)=>{const l=lr(this.formatter.format(s.View,{viewWrapper:s,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(l,e.Media).forEach((d,f)=>{s.Relationships.createRelationship(f,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${d.fileName}`)}),{data:lr(this.formatter.format(s.Relationships,{viewWrapper:s,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${a+1}.xml.rels`}}),FooterRelationships:e.Footers.map((s,a)=>{const l=lr(this.formatter.format(s.View,{viewWrapper:s,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(l,e.Media).forEach((d,f)=>{s.Relationships.createRelationship(f,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${d.fileName}`)}),{data:lr(this.formatter.format(s.Relationships,{viewWrapper:s,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${a+1}.xml.rels`}}),Headers:e.Headers.map((s,a)=>{const l=lr(this.formatter.format(s.View,{viewWrapper:s,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),c=this.imageReplacer.getMediaData(l,e.Media),d=this.imageReplacer.replace(l,c,0);return{data:this.numberingReplacer.replace(d,e.Numbering.ConcreteNumbering),path:`word/header${a+1}.xml`}}),Footers:e.Footers.map((s,a)=>{const l=lr(this.formatter.format(s.View,{viewWrapper:s,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),c=this.imageReplacer.getMediaData(l,e.Media),d=this.imageReplacer.replace(l,c,0);return{data:this.numberingReplacer.replace(d,e.Numbering.ConcreteNumbering),path:`word/footer${a+1}.xml`}}),ContentTypes:{data:lr(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:lr(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:lr(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:lr(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"word/footnotes.xml"},FootNotesRelationships:{data:lr(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"word/_rels/footnotes.xml.rels"},Settings:{data:lr(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:lr(this.formatter.format(e.Comments,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/comments.xml"},FontTable:{data:lr(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:lr(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:r,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const Nse={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:" "},Bf=t=>t===!0?Nse.WITH_2_BLANKS:t===!1?void 0:t;class pP{static toString(e,r){return ym(this,null,function*(){return yield this.compiler.compile(e,Bf(r)).generateAsync({type:"string",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBuffer(e,r){return ym(this,null,function*(){return yield this.compiler.compile(e,Bf(r)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBase64String(e,r){return ym(this,null,function*(){return yield this.compiler.compile(e,Bf(r)).generateAsync({type:"base64",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBlob(e,r){return ym(this,null,function*(){return yield this.compiler.compile(e,Bf(r)).generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toStream(e,r){const n=new sk.Stream;return this.compiler.compile(e,Bf(r)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(o=>{n.emit("data",o),n.emit("end")}),n}}Ae(pP,"compiler",new Mse);var bk={exports:{}};function Dse(t){return t.toString("ascii",0,2)==="BM"}function Pse(t){return{width:t.readUInt32LE(18),height:Math.abs(t.readInt32LE(22))}}var Lse={detect:Dse,calculate:Pse},Fse=1,jse=6,Bse=16;function zse(t){var e;return t.readUInt16LE(0)!==0?!1:(e=t.readUInt16LE(2),e===Fse)}function pR(t,e){var r=t.readUInt8(e);return r===0?256:r}function mR(t,e){var r=jse+e*Bse;return{width:pR(t,r),height:pR(t,r+1)}}function Hse(t){var e=t.readUInt16LE(4),r=mR(t,0),n;if(e===1)return r;for(r.images=[{width:r.width,height:r.height}],n=1;n<e;n+=1)r.images.push(mR(t,n));return r}var mP={detect:zse,calculate:Hse},$se=2;function Use(t){var e;return t.readUInt16LE(0)!==0?!1:(e=t.readUInt16LE(2),e===$se)}var Wse={detect:Use,calculate:mP.calculate};function Vse(t){return t.readUInt32LE(0)===542327876}function Gse(t){return{height:t.readUInt32LE(12),width:t.readUInt32LE(16)}}var Kse={detect:Vse,calculate:Gse},qse=/^GIF8[79]a/;function Xse(t){var e=t.toString("ascii",0,6);return qse.test(e)}function Yse(t){return{width:t.readUInt16LE(6),height:t.readUInt16LE(8)}}var Jse={detect:Xse,calculate:Yse};function Zse(t){var e=t.toString("hex",0,2);return e==="ffd8"}function Qse(t,e){return{height:t.readUInt16BE(e),width:t.readUInt16BE(e+2)}}function eae(t,e){if(e>t.length)throw new TypeError("Corrupt JPG, exceeded buffer limits");if(t[e]!==255)throw new TypeError("Invalid JPG, marker table corrupted")}function tae(t){t=t.slice(4);for(var e,r;t.length;){if(e=t.readUInt16BE(0),eae(t,e),r=t[e+1],r===192||r===193||r===194)return Qse(t,e+5);t=t.slice(e+2)}throw new TypeError("Invalid JPG, no size found")}var rae={detect:Zse,calculate:tae},nae=`PNG\r
314
+ 
315
+ `,iae="IHDR",gP="CgBI";function oae(t){if(nae===t.toString("ascii",1,8)){var e=t.toString("ascii",12,16);if(e===gP&&(e=t.toString("ascii",28,32)),e!==iae)throw new TypeError("invalid png");return!0}}function sae(t){return t.toString("ascii",12,16)===gP?{width:t.readUInt32BE(32),height:t.readUInt32BE(36)}:{width:t.readUInt32BE(16),height:t.readUInt32BE(20)}}var aae={detect:oae,calculate:sae};function lae(t){return t.toString("ascii",0,4)==="8BPS"}function cae(t){return{width:t.readUInt32BE(18),height:t.readUInt32BE(14)}}var uae={detect:lae,calculate:cae},dae=/<svg[^>]+[^>]*>/;function fae(t){return dae.test(t)}var tg={root:/<svg\s[^>]+>/,width:/\bwidth=(['"])([^%]+?)\1/,height:/\bheight=(['"])([^%]+?)\1/,viewbox:/\bviewBox=(['"])(.+?)\1/};function hae(t){var e=t.split(" ");return{width:parseInt(e[2],10),height:parseInt(e[3],10)}}function pae(t){var e=t.match(tg.width),r=t.match(tg.height),n=t.match(tg.viewbox);return{width:e&&parseInt(e[2],10),height:r&&parseInt(r[2],10),viewbox:n&&hae(n[2])}}function mae(t){return{width:t.width,height:t.height}}function gae(t){var e=t.viewbox.width/t.viewbox.height;return t.width?{width:t.width,height:Math.floor(t.width/e)}:t.height?{width:Math.floor(t.height*e),height:t.height}:{width:t.viewbox.width,height:t.viewbox.height}}function yae(t){var e=t.toString("utf8").match(tg.root);if(e){var r=pae(e[0]);if(r.width&&r.height)return mae(r);if(r.viewbox)return gae(r)}throw new TypeError("invalid svg")}var vae={detect:fae,calculate:yae};function bae(t){var e=t.toString("ascii",0,4)==="RIFF",r=t.toString("ascii",8,12)==="WEBP",n=t.toString("ascii",12,15)==="VP8";return e&&r&&n}function wae(t){var e=t.toString("ascii",12,16);if(t=t.slice(20,30),e==="VP8X"){var r=t[0],n=(r&192)===0,i=(r&1)===0;return n&&i?xae(t):!1}if(e==="VP8 "&&t[0]!==47)return kae(t);var o=t.toString("hex",3,6);return e==="VP8L"&&o!=="9d012a"?Sae(t):!1}function xae(t){return{width:1+t.readUIntLE(4,3),height:1+t.readUIntLE(7,3)}}function Sae(t){return{width:1+((t[2]&63)<<8|t[1]),height:1+((t[4]&15)<<10|t[3]<<2|(t[2]&192)>>6)}}function kae(t){return{width:t.readInt16LE(6)&16383,height:t.readInt16LE(8)&16383}}var _ae={detect:bae,calculate:wae},Eae={bmp:Lse,cur:Wse,dds:Kse,gif:Jse,ico:mP,jpg:rae,png:aae,psd:uae,svg:vae,webp:_ae},yP=Eae,gR=yP,Cae=function(t){var e,r;for(e in gR)if(r=gR[e].detect(t),r)return e},w1=yP,Tae=Cae;function Aae(t){var e=Tae(t);if(e in w1){var r=w1[e].calculate(t);if(r!==!1)return r.type=e,r}throw new TypeError("unsupported file type: "+e)}bk.exports=function(t){if(Buffer.isBuffer(t))return Aae(t);throw new TypeError("expecting only a buffer as input")};bk.exports.types=Object.keys(w1);var Rae=bk.exports;const Iae=Y1(Rae);function vP(t){return{alignment:An.START,style:{paragraph:{indent:{left:zn(t),hanging:zn(.18)}}}}}const Oae=Array(3).fill([$n.DECIMAL,$n.LOWER_LETTER,$n.LOWER_ROMAN]).flat().map((t,e)=>Object.assign({level:e,format:t,text:`%${e+1}.`},vP((e+1)/2))),Mae=Array(3).fill(["●","○","■"]).flat().map((t,e)=>Object.assign({level:e,format:$n.BULLET,text:t},vP((e+1)/2))),Nae={numbered:Oae,bullets:Mae};function Dae(t,e){return{reference:t,levels:Nae[e]}}function yR(){return Math.random().toString(36).substr(2,9)}function Pae(t){return new fse({footnotes:t.footnotes,numbering:{config:t.numbering},sections:[{properties:{type:pie.CONTINUOUS},children:t.children}]})}function vR(t){let e="";return t.forEach(r=>{r.isText&&(e+=r.text)}),e}const A0=600;function bR(t,e,r,n){const i=r?[new Li(r)]:[],o=[];return new nP({id:t,children:[...i,new Ine(e),...o]})}class Lae{constructor(e,r,n){this.footnotes={},this.current=[],this.maxImageWidth=A0,this.$footnoteCounter=0,this.nodes=e,this.marks=r,this.options=n??{},this.children=[],this.numbering=[]}renderContent(e,r){e.forEach((n,i,o)=>{r&&this.addParagraphOptions(r),this.render(n,e,o)})}render(e,r,n){if(typeof r=="number")throw new Error("!");if(!this.nodes[e.type.name])throw new Error(`Token type \`${e.type.name}\` not supported by Word renderer`);this.nodes[e.type.name](this,e,r,n)}renderMarks(e,r){return r.map(n=>{var i,o;return(o=(i=this.marks)[n.type.name])===null||o===void 0?void 0:o.call(i,this,e,n)}).reduce((n,i)=>Object.assign(Object.assign({},n),i),{})}renderInline(e){let r;const n=()=>{if(!r)return;const s=new rP({link:r.link,children:this.current});this.current=[...r.stack,s],r=void 0},i=s=>{const a=s===(r==null?void 0:r.link);this.addRunOptions({style:"Hyperlink"});{if(r&&a)return;r&&!a&&n()}r={link:s,stack:this.current},this.current=[]},o=(s,a,l)=>{const c=s.marks.filter(f=>f.type.name==="link"),d=c.length>0;d?i(c[0].attrs.href):!d&&r&&n(),s.isText?this.text(s.text,this.renderMarks(s,[...s.marks])):this.render(s,e,l)};e.forEach(o),n()}renderList(e,r){if(this.currentNumbering){const{reference:n,level:i}=this.currentNumbering;this.currentNumbering={reference:n,level:i+1}}else{const n=yR();this.numbering.push(Dae(n,r)),this.currentNumbering={reference:n,level:0}}if(this.renderContent(e),this.currentNumbering.level===0)delete this.currentNumbering;else{const{reference:n,level:i}=this.currentNumbering;this.currentNumbering={reference:n,level:i-1}}}renderListItem(e){if(!this.currentNumbering)throw new Error("Trying to create a list item without a list?");this.addParagraphOptions({numbering:this.currentNumbering}),this.renderContent(e)}addParagraphOptions(e){this.nextParentParagraphOpts=Object.assign(Object.assign({},this.nextParentParagraphOpts),e)}addRunOptions(e){this.nextRunOpts=Object.assign(Object.assign({},this.nextRunOpts),e)}text(e,r){e&&(this.current.push(new Li(Object.assign(Object.assign({text:e},this.nextRunOpts),r))),delete this.nextRunOpts)}math(e,r={inline:!0}){var n;if(r.inline||!r.numbered){this.current.push(new nR({children:[new iR(e)]}));return}const i=(n=r.id)!==null&&n!==void 0?n:yR();this.current=[new Li(" "),new nR({children:[new iR(e)]}),new Li(" ("),bR(i,"Equation"),new Li(")")],this.addParagraphOptions({tabStops:[{type:Sy.CENTER,position:eR.MAX/2},{type:Sy.RIGHT,position:eR.MAX}]})}image(e,r=70,n="center",i){const o=this.options.getImageBuffer(e),s=Iae(o),a=s.height/s.width,l=this.maxImageWidth*(r/100);this.current.push(new Ane(Object.assign(Object.assign({},i),{data:o,transformation:Object.assign(Object.assign({},(i==null?void 0:i.transformation)||{}),{width:l,height:l*a})})));let c;switch(n){case"right":c=An.RIGHT;break;case"left":c=An.LEFT;break;default:c=An.CENTER}this.addParagraphOptions({alignment:c})}table(e,r={}){const{getCellOptions:n,getRowOptions:i,tableOptions:o}=r,s=this.children,a=[];e.content.forEach(c=>{const d=[];let f=!0;c.content.forEach(p=>{p.type.name!=="table_header"&&(f=!1)}),this.maxImageWidth=A0/c.content.childCount,c.content.forEach(p=>{var m,g;this.children=[],this.renderContent(p);const b={children:this.children},S=(m=p.attrs.colspan)!==null&&m!==void 0?m:1,w=(g=p.attrs.rowspan)!==null&&g!==void 0?g:1;S>1&&(b.columnSpan=S),w>1&&(b.rowSpan=w),d.push(new yk(Object.assign(Object.assign({},b),(n==null?void 0:n(p))||{})))}),a.push(new Wie(Object.assign(Object.assign({},(i==null?void 0:i(c))||{}),{children:d,tableHeader:f})))}),this.maxImageWidth=A0;const l=new zie(Object.assign(Object.assign({},o),{rows:a}));s.push(l),s.push(new va("")),this.children=s}captionLabel(e,r,{suffix:n}={suffix:": "}){this.current.push(bR(e,r,`${r} `),new Li(n))}footnote(e){const{current:r,nextRunOpts:n}=this;this.current=[],delete this.nextRunOpts,this.$footnoteCounter+=1,this.renderInline(e),this.footnotes[this.$footnoteCounter]={children:[new va({children:this.current})]},this.current=r,this.nextRunOpts=n,this.current.push(new mse(this.$footnoteCounter))}closeBlock(e,r){const n=new va(Object.assign(Object.assign({children:this.current},this.nextParentParagraphOpts),r));this.current=[],delete this.nextParentParagraphOpts,this.children.push(n)}createReference(e,r,n){const i=[];r&&i.push(new Li(r)),i.push(new Mne(`REF ${e} \\h`)),n&&i.push(new Li(n));const o=new Xne({anchor:e,children:i});this.current.push(o)}}class Fae{constructor(e,r){this.nodes=e,this.marks=r}serialize(e,r){const n=new Lae(this.nodes,this.marks,r);return n.renderContent(e),Pae(n)}}const xl={text(t,e){var r;t.text((r=e.text)!==null&&r!==void 0?r:"")},paragraph(t,e){t.renderInline(e),t.closeBlock(e)},heading(t,e){t.renderInline(e);const r=[wu.HEADING_1,wu.HEADING_2,wu.HEADING_3,wu.HEADING_4,wu.HEADING_5,wu.HEADING_6][e.attrs.level-1];t.closeBlock(e,{heading:r})},blockquote(t,e){t.renderContent(e,{style:"IntenseQuote"})},code_block(t,e){t.renderContent(e),t.closeBlock(e)},horizontal_rule(t,e){t.closeBlock(e,{thematicBreak:!0}),t.closeBlock(e)},hard_break(t){t.addRunOptions({break:1})},ordered_list(t,e){t.renderList(e,"numbered")},bullet_list(t,e){t.renderList(e,"bullets")},list_item(t,e){t.renderListItem(e)},image(t,e){const{src:r}=e.attrs;t.image(r),t.closeBlock(e)},math(t,e){t.math(vR(e),{inline:!0})},equation(t,e){const{id:r,numbered:n}=e.attrs;t.math(vR(e),{inline:!1,numbered:n,id:r}),t.closeBlock(e)},table(t,e){t.table(e)}},jae={em(){return{italics:!0}},strong(){return{bold:!0}},italic(){return{italics:!0}},bold(){return{bold:!0}},link(){return{}},code(){return{font:{name:"Monospace"},color:"000000",shading:{type:nre.SOLID,color:"D2D3D2",fill:"D2D3D2"}}},abbr(){return{}},subscript(){return{subScript:!0}},superscript(){return{superScript:!0}},strikethrough(){return{strike:!0}},underline(){return{underline:{}}},smallcaps(){return{smallCaps:!0}},allcaps(){return{allCaps:!0}}},Bae=typeof window<"u";function zae(t,e){if(Bae){const r=window.URL.createObjectURL(t),n=document.createElement("a");return n.href=r,n.download=e,n.click(),window.URL.revokeObjectURL(r),Promise.resolve()}return console.error("Download is not supported in Node.js"),Promise.resolve()}const Hae={...xl,hardBreak:xl.hard_break,codeBlock:xl.code_block,orderedList:xl.ordered_list,listItem:xl.list_item,bulletList:xl.bullet_list,horizontalRule:xl.horizontal_rule,image(t,e){t.renderInline(e),t.closeBlock(e)}},$ae=new Fae(Hae,jae),Uae=yt.create({name:"exportWord",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r})=>({component:Ve,componentProps:{icon:"ExportWord",action:()=>{e==null||e.commands.exportToWord()},tooltip:r("editor.exportWord.tooltip"),isActive:()=>!1,disabled:!1}})}},addCommands(){return{exportToWord:()=>async({editor:t})=>{const e={getImageBuffer:async n=>{const o=await(await fetch(n)).arrayBuffer();return new Uint8Array(o)}},r=$ae.serialize(t.state.doc,e);return pP.toBlob(r).then(n=>zae(new Blob([n]),"export-document.docx")),!0}}}}),Wae="_toc_aag8a_1",Vae="_visible_aag8a_7",Gae="_list_aag8a_11",Kae="_item_aag8a_16",Em={toc:Wae,visible:Vae,list:Gae,item:Kae,"item--3":"_item--3_aag8a_19","item--4":"_item--4_aag8a_22","item--5":"_item--5_aag8a_25","item--6":"_item--6_aag8a_28"};function qae(t){const e=[],r=[e];return t.forEach(n=>{let i=-1,o=r[n.level+i];for(;!o;)i-=1,o=r[n.level+i];o.push({...n,children:r[n.level]=[]})}),e}function Xae({editor:t}){const e=Yy(),[r,n]=J.useState([]),{t:i}=Et(),o=J.useCallback(()=>{const s=[],a=t.state.tr;t.state.doc.descendants((l,c)=>{if(l.type.name==="heading"){const d=`heading-${s.length+1}`;l.attrs.id!==d&&a.setNodeMarkup(c,void 0,{...l.attrs,id:d}),s.push({level:l.attrs.level,text:l.textContent,id:d})}}),a.setMeta("addToHistory",!1),a.setMeta("preventUpdate",!0),t.view.dispatch(a),n(s),t.eventEmitter&&t.eventEmitter.emit("TableOfContents",qae(s))},[t]);return J.useEffect(()=>{if(t){if(!t.options.editable){o();return}return t.on("update",o),()=>{t.off("update",o)}}},[t,o]),J.useEffect(()=>{o()},[]),x.jsx(gi,{className:Gr("tableOfContent",Em.toc,e&&Em.visible),children:e?x.jsxs("div",{style:{position:"relative"},children:[x.jsx("p",{className:"richtext-mb-[8px] text-[20px] richtext-font-semibold",children:i("editor.table_of_content")}),x.jsx("ul",{className:Em.list,children:r.map((s,a)=>x.jsx("li",{className:Em.item,style:{paddingLeft:`${s.level-1}rem`},children:x.jsx("a",{href:`#${s.id}`,children:s.text})},`table-of-content-${a}`))})]}):null})}function Yae(t){return t&&t.type.name==="title"}function Jae(t,e){const n=[t.getJSON()],i=[];for(;n.length;){const o=n.shift();o.type===e&&i.push(o),o.content&&o.content.length&&n.push(...o.content)}return i}function Zae(t,...e){const[r,n]=J.useState(!1);return J.useEffect(()=>{const i=()=>{n(t.isActive.apply(t,e))};return t.on("selectionUpdate",i),t.on("transaction",i),()=>{t.off("selectionUpdate",i),t.off("transaction",i)}},[t,e,n]),r}function Qae({editor:t,icon:e,tooltip:r}){const n=Zae(t,bP.name),i=J.useCallback(()=>{if(n){t.chain().focus().removeTableOfContents().run();return}t.chain().focus().setTableOfContents().run()},[t,n]);return x.jsx(Ve,{action:i,isActive:()=>n||!1,icon:e,tooltip:r})}const bP=Nt.create({name:"tableOfContents",group:"block",atom:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),onHasOneBeforeInsert:()=>{},resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!1,button:({editor:e,t:r})=>({component:Qae,componentProps:{disabled:!1,icon:"BookMarked",tooltip:r("editor.table.tooltip"),editor:e}})}},parseHTML(){return[{tag:"toc"}]},renderHTML({HTMLAttributes:t}){return["toc",lt(t)]},addNodeView(){return ko(Xae)},addCommands(){return{setTableOfContents:()=>({commands:t,editor:e,view:r})=>{if(Jae(e,this.name).length){this.options.onHasOneBeforeInsert();return}const i=r.props.state.doc.content.firstChild;if(Yae(i)){const o=(i.firstChild&&i.firstChild.nodeSize||0)+1;return t.insertContentAt(o,{type:this.name})}return t.insertContent({type:this.name})},removeTableOfContents:()=>({state:t,dispatch:e})=>{const{tr:r}=t,n=t.schema.nodes.tableOfContents;return t.doc.descendants((i,o)=>{if(i.type===n){const s=o,a=o+i.nodeSize;r.delete(s,a)}}),r.docChanged?(e(r),!0):!1}}},addGlobalAttributes(){return[{types:["heading"],attributes:{id:{default:null}}}]}});function ele(t){var r;const e=J.useMemo(()=>{var o;const n=(o=t==null?void 0:t.items)==null?void 0:o.find(s=>s.isActive());return n&&!n.default?{...n,icon:n.icon?n.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{disabled:t==null?void 0:t.disabled,asChild:!0,children:x.jsx(Ve,{customClass:"!richtext-w-12 richtext-h-12",icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,children:x.jsx(Rt,{className:"richtext-w-3 richtext-h-3 richtext-ml-1 richtext-text-zinc-500",name:"MenuDown"})})}),x.jsx(Xn,{className:"richtext-min-w-4 richtext-w-full !richtext-p-[4px] richtext-flex richtext-flex-row richtext-gap-1",align:"start",side:"bottom",children:(r=t==null?void 0:t.items)==null?void 0:r.map((n,i)=>{var o,s;return x.jsxs(Sd,{children:[x.jsx(kd,{asChild:!0,children:x.jsx(qh,{size:"sm",onClick:n==null?void 0:n.action,className:"richtext-p-1 richtext-w-7 richtext-h-7",pressed:e.title===n.title,"data-state":e.title===n.title?"on":"off",children:(n==null?void 0:n.icon)&&x.jsx(Rt,{name:n.icon})})}),x.jsxs(sc,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[x.jsx("span",{children:n.title}),!!((o=n.shortcutKeys)!=null&&o.length)&&x.jsx("span",{children:(s=n.shortcutKeys)==null?void 0:s.map(a=>Hy(a)).join(" ")})]})]},`text-align-${i}`)})})]})}const tle=yt.create({name:"text-direction",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph"],directions:["auto","ltr","rtl"],defaultDirection:"auto",button({editor:e,extension:r,t:n}){var l;const i=((l=r.options)==null?void 0:l.directions)||[],o={auto:"TextDirection",ltr:"LeftToRight",rtl:"RightToLeft"},s=i.map(c=>({title:n(`editor.textDirection.${c}.tooltip`),icon:o[c],isActive:()=>!1,action:()=>{var d,f,p,m;if(c==="auto"){(f=(d=e.commands)==null?void 0:d.unsetTextDirection)==null||f.call(d);return}(m=(p=e.commands)==null?void 0:p.setTextDirection)==null||m.call(p,c)},disabled:!1})),a=s.filter(c=>c.disabled).length===s.length;return{component:ele,componentProps:{icon:"TextDirection",tooltip:n("editor.textDirection.tooltip"),disabled:a,items:s}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{dir:{default:this.options.defaultDirection,parseHTML:t=>t.attributes.dir&&this.options.directions.includes(t.attributes.dir)?t.attributes.dir.value:this.options.defaultDirection,renderHTML:t=>({dir:t.dir})}}}]},addCommands(){return{setTextDirection:t=>({commands:e})=>this.options.directions.includes(t)?this.options.types.every(r=>e.updateAttributes(r,{dir:t})):!1,unsetTextDirection:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"dir"))}}}),rle=new St("mention"),nle=Nt.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:t,node:e}){var r;return`${t.suggestion.char}${(r=e.attrs.label)!==null&&r!==void 0?r:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e}){var r;return["span",lt(this.HTMLAttributes,t.HTMLAttributes),`${t.suggestion.char}${(r=e.attrs.label)!==null&&r!==void 0?r:e.attrs.id}`]},suggestion:{char:"@",pluginKey:rle,command:({editor:t,range:e,props:r})=>{var n,i,o;const s=t.view.state.selection.$to.nodeAfter;((n=s==null?void 0:s.text)===null||n===void 0?void 0:n.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:r},{type:"text",text:" "}]).run(),(o=(i=t.view.dom.ownerDocument.defaultView)===null||i===void 0?void 0:i.getSelection())===null||o===void 0||o.collapseToEnd()},allow:({state:t,range:e})=>{const r=t.doc.resolve(e.from),n=t.schema.nodes[this.name];return!!r.parent.type.contentMatch.matchType(n)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",lt({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})];const r={...this.options};r.HTMLAttributes=lt({"data-type":this.name},this.options.HTMLAttributes,e);const n=this.options.renderHTML({options:r,node:t});return typeof n=="string"?["span",lt({"data-type":this.name},this.options.HTMLAttributes,e),n]:n},renderText({node:t}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:t})):this.options.renderText({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let r=!1;const{selection:n}=e,{empty:i,anchor:o}=n;return i?(e.doc.nodesBetween(o-1,o,(s,a)=>{if(s.type.name===this.name)return r=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",a,a+s.nodeSize),!1}),r):!1})}},addProseMirrorPlugins(){return[JS({editor:this.editor,...this.options.suggestion})]}}),ile="_listUsers_en3pm_1",ole="_itemUser_en3pm_10",sle="_selectedUser_en3pm_31",Cm={listUsers:ile,itemUser:ole,selectedUser:sle},ale=J.forwardRef((t,e)=>{const r=J.useRef(),[n,i]=J.useState(0),o=c=>{const d=t.items[c];d&&t.command({id:d,label:d})},s=()=>{i((n+t.items.length-1)%t.items.length)},a=()=>{i((n+1)%t.items.length)},l=()=>{o(n)};return J.useEffect(()=>i(0),[t.items]),J.useEffect(()=>{if(Number.isNaN(n+1))return;const c=r.current.querySelector(`span:nth-of-type(${n+1})`);c&&E1(c,{behavior:"smooth",scrollMode:"if-needed"})},[n]),J.useImperativeHandle(e,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(s(),!0):c.key==="ArrowDown"?(a(),!0):c.key==="Enter"?(l(),!0):!1})),x.jsx("div",{className:Gr("listUsers",Cm.listUsers),children:x.jsx("div",{ref:r,children:t.items.length?t.items.map((c,d)=>x.jsx("span",{className:Gr("itemUser",Cm.itemUser,d===n?Cm.selectedUser:""),onClick:()=>o(d),children:c},d)):x.jsx("div",{className:Gr("itemUserEmpty",Cm.itemUser),children:"Empty"})})})}),lle=[{id:"1",name:"John Doe"},{id:"2",name:"Jane Doe"},{id:"3",name:"Alice"},{id:"4",name:"Bob"}],cle={items:async({query:t})=>lle.map(r=>r.name).filter(r=>r.toLowerCase().startsWith(t.toLowerCase())),render:()=>{let t,e;return{onStart:r=>{t=new Wy(ale,{props:r,editor:r.editor}),e=gd("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"})},onUpdate(r){t.updateProps(r),e[0].setProps({getReferenceClientRect:r.clientRect})},onKeyDown(r){var n;return r.event.key==="Escape"?(e[0].hide(),!0):(n=t.ref)==null?void 0:n.onKeyDown(r)},onExit(){e[0].destroy(),t.destroy()}}}},ule=nle.extend({addAttributes(){return{id:{default:"",parseHTML:fn("id")},label:{default:"",parseHTML:fn("label")}}}}).configure({HTMLAttributes:{class:"mention"},suggestion:cle});var pc={},Sl={};/**
316
+ * @license React
317
+ * react-dom-server-legacy.browser.production.min.js
318
+ *
319
+ * Copyright (c) Facebook, Inc. and its affiliates.
320
+ *
321
+ * This source code is licensed under the MIT license found in the
322
+ * LICENSE file in the root directory of this source tree.
323
+ */var wR;function dle(){if(wR)return Sl;wR=1;var t=J;function e(C){for(var z="https://reactjs.org/docs/error-decoder.html?invariant="+C,X=1;X<arguments.length;X++)z+="&args[]="+encodeURIComponent(arguments[X]);return"Minified React error #"+C+"; visit "+z+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=Object.prototype.hasOwnProperty,n=/^[: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(C){return r.call(o,C)?!0:r.call(i,C)?!1:n.test(C)?o[C]=!0:(i[C]=!0,!1)}function a(C,z,X,re,_e,ve,Oe){this.acceptsBooleans=z===2||z===3||z===4,this.attributeName=re,this.attributeNamespace=_e,this.mustUseProperty=X,this.propertyName=C,this.type=z,this.sanitizeURL=ve,this.removeEmptyString=Oe}var l={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(C){l[C]=new a(C,0,!1,C,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(C){var z=C[0];l[z]=new a(z,1,!1,C[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(C){l[C]=new a(C,2,!1,C.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(C){l[C]=new a(C,2,!1,C,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(C){l[C]=new a(C,3,!1,C.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(C){l[C]=new a(C,3,!0,C,null,!1,!1)}),["capture","download"].forEach(function(C){l[C]=new a(C,4,!1,C,null,!1,!1)}),["cols","rows","size","span"].forEach(function(C){l[C]=new a(C,6,!1,C,null,!1,!1)}),["rowSpan","start"].forEach(function(C){l[C]=new a(C,5,!1,C.toLowerCase(),null,!1,!1)});var c=/[\-:]([a-z])/g;function d(C){return C[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(C){var z=C.replace(c,d);l[z]=new a(z,1,!1,C,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(C){var z=C.replace(c,d);l[z]=new a(z,1,!1,C,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(C){var z=C.replace(c,d);l[z]=new a(z,1,!1,C,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(C){l[C]=new a(C,1,!1,C.toLowerCase(),null,!1,!1)}),l.xlinkHref=new a("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(C){l[C]=new a(C,1,!1,C.toLowerCase(),null,!0,!0)});var f={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},p=["Webkit","ms","Moz","O"];Object.keys(f).forEach(function(C){p.forEach(function(z){z=z+C.charAt(0).toUpperCase()+C.substring(1),f[z]=f[C]})});var m=/["'&<>]/;function g(C){if(typeof C=="boolean"||typeof C=="number")return""+C;C=""+C;var z=m.exec(C);if(z){var X="",re,_e=0;for(re=z.index;re<C.length;re++){switch(C.charCodeAt(re)){case 34:z="&quot;";break;case 38:z="&amp;";break;case 39:z="&#x27;";break;case 60:z="&lt;";break;case 62:z="&gt;";break;default:continue}_e!==re&&(X+=C.substring(_e,re)),_e=re+1,X+=z}C=_e!==re?X+C.substring(_e,re):X}return C}var b=/([A-Z])/g,S=/^ms-/,w=Array.isArray;function T(C,z){return{insertionMode:C,selectedValue:z}}function M(C,z,X){switch(z){case"select":return T(1,X.value!=null?X.value:X.defaultValue);case"svg":return T(2,null);case"math":return T(3,null);case"foreignObject":return T(1,null);case"table":return T(4,null);case"thead":case"tbody":case"tfoot":return T(5,null);case"colgroup":return T(7,null);case"tr":return T(6,null)}return 4<=C.insertionMode||C.insertionMode===0?T(1,null):C}var j=new Map;function $(C,z,X){if(typeof X!="object")throw Error(e(62));z=!0;for(var re in X)if(r.call(X,re)){var _e=X[re];if(_e!=null&&typeof _e!="boolean"&&_e!==""){if(re.indexOf("--")===0){var ve=g(re);_e=g((""+_e).trim())}else{ve=re;var Oe=j.get(ve);Oe!==void 0||(Oe=g(ve.replace(b,"-$1").toLowerCase().replace(S,"-ms-")),j.set(ve,Oe)),ve=Oe,_e=typeof _e=="number"?_e===0||r.call(f,re)?""+_e:_e+"px":g((""+_e).trim())}z?(z=!1,C.push(' style="',ve,":",_e)):C.push(";",ve,":",_e)}}z||C.push('"')}function W(C,z,X,re){switch(X){case"style":$(C,z,re);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<X.length)||X[0]!=="o"&&X[0]!=="O"||X[1]!=="n"&&X[1]!=="N"){if(z=l.hasOwnProperty(X)?l[X]:null,z!==null){switch(typeof re){case"function":case"symbol":return;case"boolean":if(!z.acceptsBooleans)return}switch(X=z.attributeName,z.type){case 3:re&&C.push(" ",X,'=""');break;case 4:re===!0?C.push(" ",X,'=""'):re!==!1&&C.push(" ",X,'="',g(re),'"');break;case 5:isNaN(re)||C.push(" ",X,'="',g(re),'"');break;case 6:!isNaN(re)&&1<=re&&C.push(" ",X,'="',g(re),'"');break;default:z.sanitizeURL&&(re=""+re),C.push(" ",X,'="',g(re),'"')}}else if(s(X)){switch(typeof re){case"function":case"symbol":return;case"boolean":if(z=X.toLowerCase().slice(0,5),z!=="data-"&&z!=="aria-")return}C.push(" ",X,'="',g(re),'"')}}}function Y(C,z,X){if(z!=null){if(X!=null)throw Error(e(60));if(typeof z!="object"||!("__html"in z))throw Error(e(61));z=z.__html,z!=null&&C.push(""+z)}}function ee(C){var z="";return t.Children.forEach(C,function(X){X!=null&&(z+=X)}),z}function P(C,z,X,re){C.push(U(X));var _e=X=null,ve;for(ve in z)if(r.call(z,ve)){var Oe=z[ve];if(Oe!=null)switch(ve){case"children":X=Oe;break;case"dangerouslySetInnerHTML":_e=Oe;break;default:W(C,re,ve,Oe)}}return C.push(">"),Y(C,_e,X),typeof X=="string"?(C.push(g(X)),null):X}var fe=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,de=new Map;function U(C){var z=de.get(C);if(z===void 0){if(!fe.test(C))throw Error(e(65,C));z="<"+C,de.set(C,z)}return z}function ne(C,z,X,re,_e){switch(z){case"select":C.push(U("select"));var ve=null,Oe=null;for(tt in X)if(r.call(X,tt)){var $e=X[tt];if($e!=null)switch(tt){case"children":ve=$e;break;case"dangerouslySetInnerHTML":Oe=$e;break;case"defaultValue":case"value":break;default:W(C,re,tt,$e)}}return C.push(">"),Y(C,Oe,ve),ve;case"option":Oe=_e.selectedValue,C.push(U("option"));var Qe=$e=null,nt=null,tt=null;for(ve in X)if(r.call(X,ve)){var wt=X[ve];if(wt!=null)switch(ve){case"children":$e=wt;break;case"selected":nt=wt;break;case"dangerouslySetInnerHTML":tt=wt;break;case"value":Qe=wt;default:W(C,re,ve,wt)}}if(Oe!=null)if(X=Qe!==null?""+Qe:ee($e),w(Oe)){for(re=0;re<Oe.length;re++)if(""+Oe[re]===X){C.push(' selected=""');break}}else""+Oe===X&&C.push(' selected=""');else nt&&C.push(' selected=""');return C.push(">"),Y(C,tt,$e),$e;case"textarea":C.push(U("textarea")),tt=Oe=ve=null;for($e in X)if(r.call(X,$e)&&(Qe=X[$e],Qe!=null))switch($e){case"children":tt=Qe;break;case"value":ve=Qe;break;case"defaultValue":Oe=Qe;break;case"dangerouslySetInnerHTML":throw Error(e(91));default:W(C,re,$e,Qe)}if(ve===null&&Oe!==null&&(ve=Oe),C.push(">"),tt!=null){if(ve!=null)throw Error(e(92));if(w(tt)&&1<tt.length)throw Error(e(93));ve=""+tt}return typeof ve=="string"&&ve[0]===`
324
+ `&&C.push(`
325
+ `),ve!==null&&C.push(g(""+ve)),null;case"input":C.push(U("input")),Qe=tt=$e=ve=null;for(Oe in X)if(r.call(X,Oe)&&(nt=X[Oe],nt!=null))switch(Oe){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,"input"));case"defaultChecked":Qe=nt;break;case"defaultValue":$e=nt;break;case"checked":tt=nt;break;case"value":ve=nt;break;default:W(C,re,Oe,nt)}return tt!==null?W(C,re,"checked",tt):Qe!==null&&W(C,re,"checked",Qe),ve!==null?W(C,re,"value",ve):$e!==null&&W(C,re,"value",$e),C.push("/>"),null;case"menuitem":C.push(U("menuitem"));for(var vr in X)if(r.call(X,vr)&&(ve=X[vr],ve!=null))switch(vr){case"children":case"dangerouslySetInnerHTML":throw Error(e(400));default:W(C,re,vr,ve)}return C.push(">"),null;case"title":C.push(U("title")),ve=null;for(wt in X)if(r.call(X,wt)&&(Oe=X[wt],Oe!=null))switch(wt){case"children":ve=Oe;break;case"dangerouslySetInnerHTML":throw Error(e(434));default:W(C,re,wt,Oe)}return C.push(">"),ve;case"listing":case"pre":C.push(U(z)),Oe=ve=null;for(Qe in X)if(r.call(X,Qe)&&($e=X[Qe],$e!=null))switch(Qe){case"children":ve=$e;break;case"dangerouslySetInnerHTML":Oe=$e;break;default:W(C,re,Qe,$e)}if(C.push(">"),Oe!=null){if(ve!=null)throw Error(e(60));if(typeof Oe!="object"||!("__html"in Oe))throw Error(e(61));X=Oe.__html,X!=null&&(typeof X=="string"&&0<X.length&&X[0]===`
326
+ `?C.push(`
327
+ `,X):C.push(""+X))}return typeof ve=="string"&&ve[0]===`
328
+ `&&C.push(`
329
+ `),ve;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":C.push(U(z));for(var br in X)if(r.call(X,br)&&(ve=X[br],ve!=null))switch(br){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,z));default:W(C,re,br,ve)}return C.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 P(C,X,z,re);case"html":return _e.insertionMode===0&&C.push("<!DOCTYPE html>"),P(C,X,z,re);default:if(z.indexOf("-")===-1&&typeof X.is!="string")return P(C,X,z,re);C.push(U(z)),Oe=ve=null;for(nt in X)if(r.call(X,nt)&&($e=X[nt],$e!=null))switch(nt){case"children":ve=$e;break;case"dangerouslySetInnerHTML":Oe=$e;break;case"style":$(C,re,$e);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:s(nt)&&typeof $e!="function"&&typeof $e!="symbol"&&C.push(" ",nt,'="',g($e),'"')}return C.push(">"),Y(C,Oe,ve),ve}}function R(C,z,X){if(C.push('<!--$?--><template id="'),X===null)throw Error(e(395));return C.push(X),C.push('"></template>')}function le(C,z,X,re){switch(X.insertionMode){case 0:case 1:return C.push('<div hidden id="'),C.push(z.segmentPrefix),z=re.toString(16),C.push(z),C.push('">');case 2:return C.push('<svg aria-hidden="true" style="display:none" id="'),C.push(z.segmentPrefix),z=re.toString(16),C.push(z),C.push('">');case 3:return C.push('<math aria-hidden="true" style="display:none" id="'),C.push(z.segmentPrefix),z=re.toString(16),C.push(z),C.push('">');case 4:return C.push('<table hidden id="'),C.push(z.segmentPrefix),z=re.toString(16),C.push(z),C.push('">');case 5:return C.push('<table hidden><tbody id="'),C.push(z.segmentPrefix),z=re.toString(16),C.push(z),C.push('">');case 6:return C.push('<table hidden><tr id="'),C.push(z.segmentPrefix),z=re.toString(16),C.push(z),C.push('">');case 7:return C.push('<table hidden><colgroup id="'),C.push(z.segmentPrefix),z=re.toString(16),C.push(z),C.push('">');default:throw Error(e(397))}}function Ce(C,z){switch(z.insertionMode){case 0:case 1:return C.push("</div>");case 2:return C.push("</svg>");case 3:return C.push("</math>");case 4:return C.push("</table>");case 5:return C.push("</tbody></table>");case 6:return C.push("</tr></table>");case 7:return C.push("</colgroup></table>");default:throw Error(e(397))}}var he=/[<\u2028\u2029]/g;function Fe(C){return JSON.stringify(C).replace(he,function(z){switch(z){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 ye(C,z){return z=z===void 0?"":z,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:z+"P:",segmentPrefix:z+"S:",boundaryPrefix:z+"B:",idPrefix:z,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:C}}function ze(C,z,X,re){return X.generateStaticMarkup?(C.push(g(z)),!1):(z===""?C=re:(re&&C.push("<!-- -->"),C.push(g(z)),C=!0),C)}var ue=Object.assign,V=Symbol.for("react.element"),me=Symbol.for("react.portal"),ge=Symbol.for("react.fragment"),ke=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),D=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),O=Symbol.for("react.scope"),xe=Symbol.for("react.debug_trace_mode"),F=Symbol.for("react.legacy_hidden"),k=Symbol.for("react.default_value"),_=Symbol.iterator;function N(C){if(C==null)return null;if(typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case ge:return"Fragment";case me:return"Portal";case ce:return"Profiler";case ke:return"StrictMode";case ie:return"Suspense";case q:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case D:return(C.displayName||"Context")+".Consumer";case L:return(C._context.displayName||"Context")+".Provider";case ae:var z=C.render;return C=C.displayName,C||(C=z.displayName||z.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case Z:return z=C.displayName||null,z!==null?z:N(C.type)||"Memo";case we:z=C._payload,C=C._init;try{return N(C(z))}catch{}}return null}var Q={};function pe(C,z){if(C=C.contextTypes,!C)return Q;var X={},re;for(re in C)X[re]=z[re];return X}var oe=null;function Re(C,z){if(C!==z){C.context._currentValue2=C.parentValue,C=C.parent;var X=z.parent;if(C===null){if(X!==null)throw Error(e(401))}else{if(X===null)throw Error(e(401));Re(C,X)}z.context._currentValue2=z.value}}function Ne(C){C.context._currentValue2=C.parentValue,C=C.parent,C!==null&&Ne(C)}function De(C){var z=C.parent;z!==null&&De(z),C.context._currentValue2=C.value}function We(C,z){if(C.context._currentValue2=C.parentValue,C=C.parent,C===null)throw Error(e(402));C.depth===z.depth?Re(C,z):We(C,z)}function Je(C,z){var X=z.parent;if(X===null)throw Error(e(402));C.depth===X.depth?Re(C,X):Je(C,X),z.context._currentValue2=z.value}function Ye(C){var z=oe;z!==C&&(z===null?De(C):C===null?Ne(z):z.depth===C.depth?Re(z,C):z.depth>C.depth?We(z,C):Je(z,C),oe=C)}var Gt={isMounted:function(){return!1},enqueueSetState:function(C,z){C=C._reactInternals,C.queue!==null&&C.queue.push(z)},enqueueReplaceState:function(C,z){C=C._reactInternals,C.replace=!0,C.queue=[z]},enqueueForceUpdate:function(){}};function Ar(C,z,X,re){var _e=C.state!==void 0?C.state:null;C.updater=Gt,C.props=X,C.state=_e;var ve={queue:[],replace:!1};C._reactInternals=ve;var Oe=z.contextType;if(C.context=typeof Oe=="object"&&Oe!==null?Oe._currentValue2:re,Oe=z.getDerivedStateFromProps,typeof Oe=="function"&&(Oe=Oe(X,_e),_e=Oe==null?_e:ue({},_e,Oe),C.state=_e),typeof z.getDerivedStateFromProps!="function"&&typeof C.getSnapshotBeforeUpdate!="function"&&(typeof C.UNSAFE_componentWillMount=="function"||typeof C.componentWillMount=="function"))if(z=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),z!==C.state&&Gt.enqueueReplaceState(C,C.state,null),ve.queue!==null&&0<ve.queue.length)if(z=ve.queue,Oe=ve.replace,ve.queue=null,ve.replace=!1,Oe&&z.length===1)C.state=z[0];else{for(ve=Oe?z[0]:C.state,_e=!0,Oe=Oe?1:0;Oe<z.length;Oe++){var $e=z[Oe];$e=typeof $e=="function"?$e.call(C,ve,X,re):$e,$e!=null&&(_e?(_e=!1,ve=ue({},ve,$e)):ue(ve,$e))}C.state=ve}else ve.queue=null}var pr={id:1,overflow:""};function en(C,z,X){var re=C.id;C=C.overflow;var _e=32-Ct(re)-1;re&=~(1<<_e),X+=1;var ve=32-Ct(z)+_e;if(30<ve){var Oe=_e-_e%5;return ve=(re&(1<<Oe)-1).toString(32),re>>=Oe,_e-=Oe,{id:1<<32-Ct(z)+_e|X<<_e|re,overflow:ve+C}}return{id:1<<ve|X<<_e|re,overflow:C}}var Ct=Math.clz32?Math.clz32:rr,Yn=Math.log,Nn=Math.LN2;function rr(C){return C>>>=0,C===0?32:31-(Yn(C)/Nn|0)|0}function Jn(C,z){return C===z&&(C!==0||1/C===1/z)||C!==C&&z!==z}var $i=typeof Object.is=="function"?Object.is:Jn,dr=null,Hr=null,tn=null,mt=null,Rr=!1,Ui=!1,ki=0,yn=null,Wi=0;function Dn(){if(dr===null)throw Error(e(321));return dr}function nr(){if(0<Wi)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function Ao(){return mt===null?tn===null?(Rr=!1,tn=mt=nr()):(Rr=!0,mt=tn):mt.next===null?(Rr=!1,mt=mt.next=nr()):(Rr=!0,mt=mt.next),mt}function Ro(){Hr=dr=null,Ui=!1,tn=null,Wi=0,mt=yn=null}function xs(C,z){return typeof z=="function"?z(C):z}function Jt(C,z,X){if(dr=Dn(),mt=Ao(),Rr){var re=mt.queue;if(z=re.dispatch,yn!==null&&(X=yn.get(re),X!==void 0)){yn.delete(re),re=mt.memoizedState;do re=C(re,X.action),X=X.next;while(X!==null);return mt.memoizedState=re,[re,z]}return[mt.memoizedState,z]}return C=C===xs?typeof z=="function"?z():z:X!==void 0?X(z):z,mt.memoizedState=C,C=mt.queue={last:null,dispatch:null},C=C.dispatch=Fa.bind(null,dr,C),[mt.memoizedState,C]}function Io(C,z){if(dr=Dn(),mt=Ao(),z=z===void 0?null:z,mt!==null){var X=mt.memoizedState;if(X!==null&&z!==null){var re=X[1];e:if(re===null)re=!1;else{for(var _e=0;_e<re.length&&_e<z.length;_e++)if(!$i(z[_e],re[_e])){re=!1;break e}re=!0}if(re)return X[0]}}return C=C(),mt.memoizedState=[C,z],C}function Fa(C,z,X){if(25<=Wi)throw Error(e(301));if(C===dr)if(Ui=!0,C={action:X,next:null},yn===null&&(yn=new Map),X=yn.get(z),X===void 0)yn.set(z,C);else{for(z=X;z.next!==null;)z=z.next;z.next=C}}function ja(){throw Error(e(394))}function vn(){}var Oo={readContext:function(C){return C._currentValue2},useContext:function(C){return Dn(),C._currentValue2},useMemo:Io,useReducer:Jt,useRef:function(C){dr=Dn(),mt=Ao();var z=mt.memoizedState;return z===null?(C={current:C},mt.memoizedState=C):z},useState:function(C){return Jt(xs,C)},useInsertionEffect:vn,useLayoutEffect:function(){},useCallback:function(C,z){return Io(function(){return C},z)},useImperativeHandle:vn,useEffect:vn,useDebugValue:vn,useDeferredValue:function(C){return Dn(),C},useTransition:function(){return Dn(),[!1,ja]},useId:function(){var C=Hr.treeContext,z=C.overflow;C=C.id,C=(C&~(1<<32-Ct(C)-1)).toString(32)+z;var X=Vi;if(X===null)throw Error(e(404));return z=ki++,C=":"+X.idPrefix+"R"+C,0<z&&(C+="H"+z.toString(32)),C+":"},useMutableSource:function(C,z){return Dn(),z(C._source)},useSyncExternalStore:function(C,z,X){if(X===void 0)throw Error(e(407));return X()}},Vi=null,Zn=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Ir(C){return console.error(C),null}function bn(){}function Gi(C,z,X,re,_e,ve,Oe,$e,Qe){var nt=[],tt=new Set;return z={destination:null,responseState:z,progressiveChunkSize:re===void 0?12800:re,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:tt,pingedTasks:nt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:_e===void 0?Ir:_e,onAllReady:bn,onShellReady:Oe===void 0?bn:Oe,onShellError:bn,onFatalError:bn},X=ei(z,0,null,X,!1,!1),X.parentFlushed=!0,C=Qn(z,C,null,X,tt,Q,null,pr),nt.push(C),z}function Qn(C,z,X,re,_e,ve,Oe,$e){C.allPendingTasks++,X===null?C.pendingRootTasks++:X.pendingTasks++;var Qe={node:z,ping:function(){var nt=C.pingedTasks;nt.push(Qe),nt.length===1&&gr(C)},blockedBoundary:X,blockedSegment:re,abortSet:_e,legacyContext:ve,context:Oe,treeContext:$e};return _e.add(Qe),Qe}function ei(C,z,X,re,_e,ve){return{status:0,id:-1,index:z,parentFlushed:!1,chunks:[],children:[],formatContext:re,boundary:X,lastPushedText:_e,textEmbedded:ve}}function wn(C,z){if(C=C.onError(z),C!=null&&typeof C!="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 C+'" instead');return C}function ti(C,z){var X=C.onShellError;X(z),X=C.onFatalError,X(z),C.destination!==null?(C.status=2,C.destination.destroy(z)):(C.status=1,C.fatalError=z)}function Or(C,z,X,re,_e){for(dr={},Hr=z,ki=0,C=X(re,_e);Ui;)Ui=!1,ki=0,Wi+=1,mt=null,C=X(re,_e);return Ro(),C}function Ss(C,z,X,re){var _e=X.render(),ve=re.childContextTypes;if(ve!=null){var Oe=z.legacyContext;if(typeof X.getChildContext!="function")re=Oe;else{X=X.getChildContext();for(var $e in X)if(!($e in ve))throw Error(e(108,N(re)||"Unknown",$e));re=ue({},Oe,X)}z.legacyContext=re,Zt(C,z,_e),z.legacyContext=Oe}else Zt(C,z,_e)}function ks(C,z){if(C&&C.defaultProps){z=ue({},z),C=C.defaultProps;for(var X in C)z[X]===void 0&&(z[X]=C[X]);return z}return z}function Pn(C,z,X,re,_e){if(typeof X=="function")if(X.prototype&&X.prototype.isReactComponent){_e=pe(X,z.legacyContext);var ve=X.contextType;ve=new X(re,typeof ve=="object"&&ve!==null?ve._currentValue2:_e),Ar(ve,X,re,_e),Ss(C,z,ve,X)}else{ve=pe(X,z.legacyContext),_e=Or(C,z,X,re,ve);var Oe=ki!==0;if(typeof _e=="object"&&_e!==null&&typeof _e.render=="function"&&_e.$$typeof===void 0)Ar(_e,X,re,ve),Ss(C,z,_e,X);else if(Oe){re=z.treeContext,z.treeContext=en(re,1,0);try{Zt(C,z,_e)}finally{z.treeContext=re}}else Zt(C,z,_e)}else if(typeof X=="string"){switch(_e=z.blockedSegment,ve=ne(_e.chunks,X,re,C.responseState,_e.formatContext),_e.lastPushedText=!1,Oe=_e.formatContext,_e.formatContext=M(Oe,X,re),Sn(C,z,ve),_e.formatContext=Oe,X){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:_e.chunks.push("</",X,">")}_e.lastPushedText=!1}else{switch(X){case F:case xe:case ke:case ce:case ge:Zt(C,z,re.children);return;case q:Zt(C,z,re.children);return;case O:throw Error(e(343));case ie:e:{X=z.blockedBoundary,_e=z.blockedSegment,ve=re.fallback,re=re.children,Oe=new Set;var $e={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:Oe,errorDigest:null},Qe=ei(C,_e.chunks.length,$e,_e.formatContext,!1,!1);_e.children.push(Qe),_e.lastPushedText=!1;var nt=ei(C,0,null,_e.formatContext,!1,!1);nt.parentFlushed=!0,z.blockedBoundary=$e,z.blockedSegment=nt;try{if(Sn(C,z,re),C.responseState.generateStaticMarkup||nt.lastPushedText&&nt.textEmbedded&&nt.chunks.push("<!-- -->"),nt.status=1,rn($e,nt),$e.pendingTasks===0)break e}catch(tt){nt.status=4,$e.forceClientRender=!0,$e.errorDigest=wn(C,tt)}finally{z.blockedBoundary=X,z.blockedSegment=_e}z=Qn(C,ve,X,Qe,Oe,z.legacyContext,z.context,z.treeContext),C.pingedTasks.push(z)}return}if(typeof X=="object"&&X!==null)switch(X.$$typeof){case ae:if(re=Or(C,z,X.render,re,_e),ki!==0){X=z.treeContext,z.treeContext=en(X,1,0);try{Zt(C,z,re)}finally{z.treeContext=X}}else Zt(C,z,re);return;case Z:X=X.type,re=ks(X,re),Pn(C,z,X,re,_e);return;case L:if(_e=re.children,X=X._context,re=re.value,ve=X._currentValue2,X._currentValue2=re,Oe=oe,oe=re={parent:Oe,depth:Oe===null?0:Oe.depth+1,context:X,parentValue:ve,value:re},z.context=re,Zt(C,z,_e),C=oe,C===null)throw Error(e(403));re=C.parentValue,C.context._currentValue2=re===k?C.context._defaultValue:re,C=oe=C.parent,z.context=C;return;case D:re=re.children,re=re(X._currentValue2),Zt(C,z,re);return;case we:_e=X._init,X=_e(X._payload),re=ks(X,re),Pn(C,z,X,re,void 0);return}throw Error(e(130,X==null?X:typeof X,""))}}function Zt(C,z,X){if(z.node=X,typeof X=="object"&&X!==null){switch(X.$$typeof){case V:Pn(C,z,X.type,X.props,X.ref);return;case me:throw Error(e(257));case we:var re=X._init;X=re(X._payload),Zt(C,z,X);return}if(w(X)){xn(C,z,X);return}if(X===null||typeof X!="object"?re=null:(re=_&&X[_]||X["@@iterator"],re=typeof re=="function"?re:null),re&&(re=re.call(X))){if(X=re.next(),!X.done){var _e=[];do _e.push(X.value),X=re.next();while(!X.done);xn(C,z,_e)}return}throw C=Object.prototype.toString.call(X),Error(e(31,C==="[object Object]"?"object with keys {"+Object.keys(X).join(", ")+"}":C))}typeof X=="string"?(re=z.blockedSegment,re.lastPushedText=ze(z.blockedSegment.chunks,X,C.responseState,re.lastPushedText)):typeof X=="number"&&(re=z.blockedSegment,re.lastPushedText=ze(z.blockedSegment.chunks,""+X,C.responseState,re.lastPushedText))}function xn(C,z,X){for(var re=X.length,_e=0;_e<re;_e++){var ve=z.treeContext;z.treeContext=en(ve,re,_e);try{Sn(C,z,X[_e])}finally{z.treeContext=ve}}}function Sn(C,z,X){var re=z.blockedSegment.formatContext,_e=z.legacyContext,ve=z.context;try{return Zt(C,z,X)}catch(Qe){if(Ro(),typeof Qe=="object"&&Qe!==null&&typeof Qe.then=="function"){X=Qe;var Oe=z.blockedSegment,$e=ei(C,Oe.chunks.length,null,Oe.formatContext,Oe.lastPushedText,!0);Oe.children.push($e),Oe.lastPushedText=!1,C=Qn(C,z.node,z.blockedBoundary,$e,z.abortSet,z.legacyContext,z.context,z.treeContext).ping,X.then(C,C),z.blockedSegment.formatContext=re,z.legacyContext=_e,z.context=ve,Ye(ve)}else throw z.blockedSegment.formatContext=re,z.legacyContext=_e,z.context=ve,Ye(ve),Qe}}function ri(C){var z=C.blockedBoundary;C=C.blockedSegment,C.status=3,kn(this,z,C)}function Ki(C,z,X){var re=C.blockedBoundary;C.blockedSegment.status=3,re===null?(z.allPendingTasks--,z.status!==2&&(z.status=2,z.destination!==null&&z.destination.push(null))):(re.pendingTasks--,re.forceClientRender||(re.forceClientRender=!0,C=X===void 0?Error(e(432)):X,re.errorDigest=z.onError(C),re.parentFlushed&&z.clientRenderedBoundaries.push(re)),re.fallbackAbortableTasks.forEach(function(_e){return Ki(_e,z,X)}),re.fallbackAbortableTasks.clear(),z.allPendingTasks--,z.allPendingTasks===0&&(re=z.onAllReady,re()))}function rn(C,z){if(z.chunks.length===0&&z.children.length===1&&z.children[0].boundary===null){var X=z.children[0];X.id=z.id,X.parentFlushed=!0,X.status===1&&rn(C,X)}else C.completedSegments.push(z)}function kn(C,z,X){if(z===null){if(X.parentFlushed){if(C.completedRootSegment!==null)throw Error(e(389));C.completedRootSegment=X}C.pendingRootTasks--,C.pendingRootTasks===0&&(C.onShellError=bn,z=C.onShellReady,z())}else z.pendingTasks--,z.forceClientRender||(z.pendingTasks===0?(X.parentFlushed&&X.status===1&&rn(z,X),z.parentFlushed&&C.completedBoundaries.push(z),z.fallbackAbortableTasks.forEach(ri,C),z.fallbackAbortableTasks.clear()):X.parentFlushed&&X.status===1&&(rn(z,X),z.completedSegments.length===1&&z.parentFlushed&&C.partialBoundaries.push(z)));C.allPendingTasks--,C.allPendingTasks===0&&(C=C.onAllReady,C())}function gr(C){if(C.status!==2){var z=oe,X=Zn.current;Zn.current=Oo;var re=Vi;Vi=C.responseState;try{var _e=C.pingedTasks,ve;for(ve=0;ve<_e.length;ve++){var Oe=_e[ve],$e=C,Qe=Oe.blockedSegment;if(Qe.status===0){Ye(Oe.context);try{Zt($e,Oe,Oe.node),$e.responseState.generateStaticMarkup||Qe.lastPushedText&&Qe.textEmbedded&&Qe.chunks.push("<!-- -->"),Oe.abortSet.delete(Oe),Qe.status=1,kn($e,Oe.blockedBoundary,Qe)}catch(wr){if(Ro(),typeof wr=="object"&&wr!==null&&typeof wr.then=="function"){var nt=Oe.ping;wr.then(nt,nt)}else{Oe.abortSet.delete(Oe),Qe.status=4;var tt=Oe.blockedBoundary,wt=wr,vr=wn($e,wt);if(tt===null?ti($e,wt):(tt.pendingTasks--,tt.forceClientRender||(tt.forceClientRender=!0,tt.errorDigest=vr,tt.parentFlushed&&$e.clientRenderedBoundaries.push(tt))),$e.allPendingTasks--,$e.allPendingTasks===0){var br=$e.onAllReady;br()}}}finally{}}}_e.splice(0,ve),C.destination!==null&&yr(C,C.destination)}catch(wr){wn(C,wr),ti(C,wr)}finally{Vi=re,Zn.current=X,X===Oo&&Ye(z)}}}function ni(C,z,X){switch(X.parentFlushed=!0,X.status){case 0:var re=X.id=C.nextSegmentId++;return X.lastPushedText=!1,X.textEmbedded=!1,C=C.responseState,z.push('<template id="'),z.push(C.placeholderPrefix),C=re.toString(16),z.push(C),z.push('"></template>');case 1:X.status=2;var _e=!0;re=X.chunks;var ve=0;X=X.children;for(var Oe=0;Oe<X.length;Oe++){for(_e=X[Oe];ve<_e.index;ve++)z.push(re[ve]);_e=_i(C,z,_e)}for(;ve<re.length-1;ve++)z.push(re[ve]);return ve<re.length&&(_e=z.push(re[ve])),_e;default:throw Error(e(390))}}function _i(C,z,X){var re=X.boundary;if(re===null)return ni(C,z,X);if(re.parentFlushed=!0,re.forceClientRender)return C.responseState.generateStaticMarkup||(re=re.errorDigest,z.push("<!--$!-->"),z.push("<template"),re&&(z.push(' data-dgst="'),re=g(re),z.push(re),z.push('"')),z.push("></template>")),ni(C,z,X),C=C.responseState.generateStaticMarkup?!0:z.push("<!--/$-->"),C;if(0<re.pendingTasks){re.rootSegmentID=C.nextSegmentId++,0<re.completedSegments.length&&C.partialBoundaries.push(re);var _e=C.responseState,ve=_e.nextSuspenseID++;return _e=_e.boundaryPrefix+ve.toString(16),re=re.id=_e,R(z,C.responseState,re),ni(C,z,X),z.push("<!--/$-->")}if(re.byteSize>C.progressiveChunkSize)return re.rootSegmentID=C.nextSegmentId++,C.completedBoundaries.push(re),R(z,C.responseState,re.id),ni(C,z,X),z.push("<!--/$-->");if(C.responseState.generateStaticMarkup||z.push("<!--$-->"),X=re.completedSegments,X.length!==1)throw Error(e(391));return _i(C,z,X[0]),C=C.responseState.generateStaticMarkup?!0:z.push("<!--/$-->"),C}function qi(C,z,X){return le(z,C.responseState,X.formatContext,X.id),_i(C,z,X),Ce(z,X.formatContext)}function $r(C,z,X){for(var re=X.completedSegments,_e=0;_e<re.length;_e++)_n(C,z,X,re[_e]);if(re.length=0,C=C.responseState,re=X.id,X=X.rootSegmentID,z.push(C.startInlineScript),C.sentCompleteBoundaryFunction?z.push('$RC("'):(C.sentCompleteBoundaryFunction=!0,z.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("')),re===null)throw Error(e(395));return X=X.toString(16),z.push(re),z.push('","'),z.push(C.segmentPrefix),z.push(X),z.push('")<\/script>')}function _n(C,z,X,re){if(re.status===2)return!0;var _e=re.id;if(_e===-1){if((re.id=X.rootSegmentID)===-1)throw Error(e(392));return qi(C,z,re)}return qi(C,z,re),C=C.responseState,z.push(C.startInlineScript),C.sentCompleteSegmentFunction?z.push('$RS("'):(C.sentCompleteSegmentFunction=!0,z.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("')),z.push(C.segmentPrefix),_e=_e.toString(16),z.push(_e),z.push('","'),z.push(C.placeholderPrefix),z.push(_e),z.push('")<\/script>')}function yr(C,z){try{var X=C.completedRootSegment;if(X!==null&&C.pendingRootTasks===0){_i(C,z,X),C.completedRootSegment=null;var re=C.responseState.bootstrapChunks;for(X=0;X<re.length-1;X++)z.push(re[X]);X<re.length&&z.push(re[X])}var _e=C.clientRenderedBoundaries,ve;for(ve=0;ve<_e.length;ve++){var Oe=_e[ve];re=z;var $e=C.responseState,Qe=Oe.id,nt=Oe.errorDigest,tt=Oe.errorMessage,wt=Oe.errorComponentStack;if(re.push($e.startInlineScript),$e.sentClientRenderFunction?re.push('$RX("'):($e.sentClientRenderFunction=!0,re.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("')),Qe===null)throw Error(e(395));if(re.push(Qe),re.push('"'),nt||tt||wt){re.push(",");var vr=Fe(nt||"");re.push(vr)}if(tt||wt){re.push(",");var br=Fe(tt||"");re.push(br)}if(wt){re.push(",");var wr=Fe(wt);re.push(wr)}if(!re.push(")<\/script>")){C.destination=null,ve++,_e.splice(0,ve);return}}_e.splice(0,ve);var ii=C.completedBoundaries;for(ve=0;ve<ii.length;ve++)if(!$r(C,z,ii[ve])){C.destination=null,ve++,ii.splice(0,ve);return}ii.splice(0,ve);var En=C.partialBoundaries;for(ve=0;ve<En.length;ve++){var Yi=En[ve];e:{_e=C,Oe=z;var oi=Yi.completedSegments;for($e=0;$e<oi.length;$e++)if(!_n(_e,Oe,Yi,oi[$e])){$e++,oi.splice(0,$e);var Ei=!1;break e}oi.splice(0,$e),Ei=!0}if(!Ei){C.destination=null,ve++,En.splice(0,ve);return}}En.splice(0,ve);var Ln=C.completedBoundaries;for(ve=0;ve<Ln.length;ve++)if(!$r(C,z,Ln[ve])){C.destination=null,ve++,Ln.splice(0,ve);return}Ln.splice(0,ve)}finally{C.allPendingTasks===0&&C.pingedTasks.length===0&&C.clientRenderedBoundaries.length===0&&C.completedBoundaries.length===0&&z.push(null)}}function Xi(C,z){try{var X=C.abortableTasks;X.forEach(function(re){return Ki(re,C,z)}),X.clear(),C.destination!==null&&yr(C,C.destination)}catch(re){wn(C,re),ti(C,re)}}function ar(){}function Mr(C,z,X,re){var _e=!1,ve=null,Oe="",$e={push:function(nt){return nt!==null&&(Oe+=nt),!0},destroy:function(nt){_e=!0,ve=nt}},Qe=!1;if(C=Gi(C,ye(X,z?z.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,ar,void 0,function(){Qe=!0}),gr(C),Xi(C,re),C.status===1)C.status=2,$e.destroy(C.fatalError);else if(C.status!==2&&C.destination===null){C.destination=$e;try{yr(C,$e)}catch(nt){wn(C,nt),ti(C,nt)}}if(_e)throw ve;if(!Qe)throw Error(e(426));return Oe}return Sl.renderToNodeStream=function(){throw Error(e(207))},Sl.renderToStaticMarkup=function(C,z){return Mr(C,z,!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')},Sl.renderToStaticNodeStream=function(){throw Error(e(208))},Sl.renderToString=function(C,z){return Mr(C,z,!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')},Sl.version="18.3.1",Sl}var Tm={};/**
330
+ * @license React
331
+ * react-dom-server.browser.production.min.js
332
+ *
333
+ * Copyright (c) Facebook, Inc. and its affiliates.
334
+ *
335
+ * This source code is licensed under the MIT license found in the
336
+ * LICENSE file in the root directory of this source tree.
337
+ */var xR;function fle(){if(xR)return Tm;xR=1;var t=J;function e(A){for(var B="https://reactjs.org/docs/error-decoder.html?invariant="+A,G=1;G<arguments.length;G++)B+="&args[]="+encodeURIComponent(arguments[G]);return"Minified React error #"+A+"; visit "+B+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=null,n=0;function i(A,B){if(B.length!==0)if(512<B.length)0<n&&(A.enqueue(new Uint8Array(r.buffer,0,n)),r=new Uint8Array(512),n=0),A.enqueue(B);else{var G=r.length-n;G<B.length&&(G===0?A.enqueue(r):(r.set(B.subarray(0,G),n),A.enqueue(r),B=B.subarray(G)),r=new Uint8Array(512),n=0),r.set(B,n),n+=B.length}}function o(A,B){return i(A,B),!0}function s(A){r&&0<n&&(A.enqueue(new Uint8Array(r.buffer,0,n)),r=null,n=0)}var a=new TextEncoder;function l(A){return a.encode(A)}function c(A){return a.encode(A)}function d(A,B){typeof A.error=="function"?A.error(B):A.close()}var f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,m={},g={};function b(A){return f.call(g,A)?!0:f.call(m,A)?!1:p.test(A)?g[A]=!0:(m[A]=!0,!1)}function S(A,B,G,te,Ee,Se,Me){this.acceptsBooleans=B===2||B===3||B===4,this.attributeName=te,this.attributeNamespace=Ee,this.mustUseProperty=G,this.propertyName=A,this.type=B,this.sanitizeURL=Se,this.removeEmptyString=Me}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(A){w[A]=new S(A,0,!1,A,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(A){var B=A[0];w[B]=new S(B,1,!1,A[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(A){w[A]=new S(A,2,!1,A.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(A){w[A]=new S(A,2,!1,A,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(A){w[A]=new S(A,3,!1,A.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(A){w[A]=new S(A,3,!0,A,null,!1,!1)}),["capture","download"].forEach(function(A){w[A]=new S(A,4,!1,A,null,!1,!1)}),["cols","rows","size","span"].forEach(function(A){w[A]=new S(A,6,!1,A,null,!1,!1)}),["rowSpan","start"].forEach(function(A){w[A]=new S(A,5,!1,A.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function M(A){return A[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(A){var B=A.replace(T,M);w[B]=new S(B,1,!1,A,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(A){var B=A.replace(T,M);w[B]=new S(B,1,!1,A,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(A){var B=A.replace(T,M);w[B]=new S(B,1,!1,A,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(A){w[A]=new S(A,1,!1,A.toLowerCase(),null,!1,!1)}),w.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(A){w[A]=new S(A,1,!1,A.toLowerCase(),null,!0,!0)});var j={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},$=["Webkit","ms","Moz","O"];Object.keys(j).forEach(function(A){$.forEach(function(B){B=B+A.charAt(0).toUpperCase()+A.substring(1),j[B]=j[A]})});var W=/["'&<>]/;function Y(A){if(typeof A=="boolean"||typeof A=="number")return""+A;A=""+A;var B=W.exec(A);if(B){var G="",te,Ee=0;for(te=B.index;te<A.length;te++){switch(A.charCodeAt(te)){case 34:B="&quot;";break;case 38:B="&amp;";break;case 39:B="&#x27;";break;case 60:B="&lt;";break;case 62:B="&gt;";break;default:continue}Ee!==te&&(G+=A.substring(Ee,te)),Ee=te+1,G+=B}A=Ee!==te?G+A.substring(Ee,te):G}return A}var ee=/([A-Z])/g,P=/^ms-/,fe=Array.isArray,de=c("<script>"),U=c("<\/script>"),ne=c('<script src="'),R=c('<script type="module" src="'),le=c('" async=""><\/script>'),Ce=/(<\/|<)(s)(cript)/gi;function he(A,B,G,te){return""+B+(G==="s"?"\\u0073":"\\u0053")+te}function Fe(A,B,G,te,Ee){A=A===void 0?"":A,B=B===void 0?de:c('<script nonce="'+Y(B)+'">');var Se=[];if(G!==void 0&&Se.push(B,l((""+G).replace(Ce,he)),U),te!==void 0)for(G=0;G<te.length;G++)Se.push(ne,l(Y(te[G])),le);if(Ee!==void 0)for(te=0;te<Ee.length;te++)Se.push(R,l(Y(Ee[te])),le);return{bootstrapChunks:Se,startInlineScript:B,placeholderPrefix:c(A+"P:"),segmentPrefix:c(A+"S:"),boundaryPrefix:A+"B:",idPrefix:A,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function ye(A,B){return{insertionMode:A,selectedValue:B}}function ze(A){return ye(A==="http://www.w3.org/2000/svg"?2:A==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function ue(A,B,G){switch(B){case"select":return ye(1,G.value!=null?G.value:G.defaultValue);case"svg":return ye(2,null);case"math":return ye(3,null);case"foreignObject":return ye(1,null);case"table":return ye(4,null);case"thead":case"tbody":case"tfoot":return ye(5,null);case"colgroup":return ye(7,null);case"tr":return ye(6,null)}return 4<=A.insertionMode||A.insertionMode===0?ye(1,null):A}var V=c("<!-- -->");function me(A,B,G,te){return B===""?te:(te&&A.push(V),A.push(l(Y(B))),!0)}var ge=new Map,ke=c(' style="'),ce=c(":"),L=c(";");function D(A,B,G){if(typeof G!="object")throw Error(e(62));B=!0;for(var te in G)if(f.call(G,te)){var Ee=G[te];if(Ee!=null&&typeof Ee!="boolean"&&Ee!==""){if(te.indexOf("--")===0){var Se=l(Y(te));Ee=l(Y((""+Ee).trim()))}else{Se=te;var Me=ge.get(Se);Me!==void 0||(Me=c(Y(Se.replace(ee,"-$1").toLowerCase().replace(P,"-ms-"))),ge.set(Se,Me)),Se=Me,Ee=typeof Ee=="number"?Ee===0||f.call(j,te)?l(""+Ee):l(Ee+"px"):l(Y((""+Ee).trim()))}B?(B=!1,A.push(ke,Se,ce,Ee)):A.push(L,Se,ce,Ee)}}B||A.push(q)}var ae=c(" "),ie=c('="'),q=c('"'),Z=c('=""');function we(A,B,G,te){switch(G){case"style":D(A,B,te);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<G.length)||G[0]!=="o"&&G[0]!=="O"||G[1]!=="n"&&G[1]!=="N"){if(B=w.hasOwnProperty(G)?w[G]:null,B!==null){switch(typeof te){case"function":case"symbol":return;case"boolean":if(!B.acceptsBooleans)return}switch(G=l(B.attributeName),B.type){case 3:te&&A.push(ae,G,Z);break;case 4:te===!0?A.push(ae,G,Z):te!==!1&&A.push(ae,G,ie,l(Y(te)),q);break;case 5:isNaN(te)||A.push(ae,G,ie,l(Y(te)),q);break;case 6:!isNaN(te)&&1<=te&&A.push(ae,G,ie,l(Y(te)),q);break;default:B.sanitizeURL&&(te=""+te),A.push(ae,G,ie,l(Y(te)),q)}}else if(b(G)){switch(typeof te){case"function":case"symbol":return;case"boolean":if(B=G.toLowerCase().slice(0,5),B!=="data-"&&B!=="aria-")return}A.push(ae,l(G),ie,l(Y(te)),q)}}}var O=c(">"),xe=c("/>");function F(A,B,G){if(B!=null){if(G!=null)throw Error(e(60));if(typeof B!="object"||!("__html"in B))throw Error(e(61));B=B.__html,B!=null&&A.push(l(""+B))}}function k(A){var B="";return t.Children.forEach(A,function(G){G!=null&&(B+=G)}),B}var _=c(' selected=""');function N(A,B,G,te){A.push(Re(G));var Ee=G=null,Se;for(Se in B)if(f.call(B,Se)){var Me=B[Se];if(Me!=null)switch(Se){case"children":G=Me;break;case"dangerouslySetInnerHTML":Ee=Me;break;default:we(A,te,Se,Me)}}return A.push(O),F(A,Ee,G),typeof G=="string"?(A.push(l(Y(G))),null):G}var Q=c(`
338
+ `),pe=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,oe=new Map;function Re(A){var B=oe.get(A);if(B===void 0){if(!pe.test(A))throw Error(e(65,A));B=c("<"+A),oe.set(A,B)}return B}var Ne=c("<!DOCTYPE html>");function De(A,B,G,te,Ee){switch(B){case"select":A.push(Re("select"));var Se=null,Me=null;for(ct in G)if(f.call(G,ct)){var Ue=G[ct];if(Ue!=null)switch(ct){case"children":Se=Ue;break;case"dangerouslySetInnerHTML":Me=Ue;break;case"defaultValue":case"value":break;default:we(A,te,ct,Ue)}}return A.push(O),F(A,Me,Se),Se;case"option":Me=Ee.selectedValue,A.push(Re("option"));var it=Ue=null,ut=null,ct=null;for(Se in G)if(f.call(G,Se)){var Dt=G[Se];if(Dt!=null)switch(Se){case"children":Ue=Dt;break;case"selected":ut=Dt;break;case"dangerouslySetInnerHTML":ct=Dt;break;case"value":it=Dt;default:we(A,te,Se,Dt)}}if(Me!=null)if(G=it!==null?""+it:k(Ue),fe(Me)){for(te=0;te<Me.length;te++)if(""+Me[te]===G){A.push(_);break}}else""+Me===G&&A.push(_);else ut&&A.push(_);return A.push(O),F(A,ct,Ue),Ue;case"textarea":A.push(Re("textarea")),ct=Me=Se=null;for(Ue in G)if(f.call(G,Ue)&&(it=G[Ue],it!=null))switch(Ue){case"children":ct=it;break;case"value":Se=it;break;case"defaultValue":Me=it;break;case"dangerouslySetInnerHTML":throw Error(e(91));default:we(A,te,Ue,it)}if(Se===null&&Me!==null&&(Se=Me),A.push(O),ct!=null){if(Se!=null)throw Error(e(92));if(fe(ct)&&1<ct.length)throw Error(e(93));Se=""+ct}return typeof Se=="string"&&Se[0]===`
339
+ `&&A.push(Q),Se!==null&&A.push(l(Y(""+Se))),null;case"input":A.push(Re("input")),it=ct=Ue=Se=null;for(Me in G)if(f.call(G,Me)&&(ut=G[Me],ut!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,"input"));case"defaultChecked":it=ut;break;case"defaultValue":Ue=ut;break;case"checked":ct=ut;break;case"value":Se=ut;break;default:we(A,te,Me,ut)}return ct!==null?we(A,te,"checked",ct):it!==null&&we(A,te,"checked",it),Se!==null?we(A,te,"value",Se):Ue!==null&&we(A,te,"value",Ue),A.push(xe),null;case"menuitem":A.push(Re("menuitem"));for(var Dr in G)if(f.call(G,Dr)&&(Se=G[Dr],Se!=null))switch(Dr){case"children":case"dangerouslySetInnerHTML":throw Error(e(400));default:we(A,te,Dr,Se)}return A.push(O),null;case"title":A.push(Re("title")),Se=null;for(Dt in G)if(f.call(G,Dt)&&(Me=G[Dt],Me!=null))switch(Dt){case"children":Se=Me;break;case"dangerouslySetInnerHTML":throw Error(e(434));default:we(A,te,Dt,Me)}return A.push(O),Se;case"listing":case"pre":A.push(Re(B)),Me=Se=null;for(it in G)if(f.call(G,it)&&(Ue=G[it],Ue!=null))switch(it){case"children":Se=Ue;break;case"dangerouslySetInnerHTML":Me=Ue;break;default:we(A,te,it,Ue)}if(A.push(O),Me!=null){if(Se!=null)throw Error(e(60));if(typeof Me!="object"||!("__html"in Me))throw Error(e(61));G=Me.__html,G!=null&&(typeof G=="string"&&0<G.length&&G[0]===`
340
+ `?A.push(Q,l(G)):A.push(l(""+G)))}return typeof Se=="string"&&Se[0]===`
341
+ `&&A.push(Q),Se;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":A.push(Re(B));for(var on in G)if(f.call(G,on)&&(Se=G[on],Se!=null))switch(on){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,B));default:we(A,te,on,Se)}return A.push(xe),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 N(A,G,B,te);case"html":return Ee.insertionMode===0&&A.push(Ne),N(A,G,B,te);default:if(B.indexOf("-")===-1&&typeof G.is!="string")return N(A,G,B,te);A.push(Re(B)),Me=Se=null;for(ut in G)if(f.call(G,ut)&&(Ue=G[ut],Ue!=null))switch(ut){case"children":Se=Ue;break;case"dangerouslySetInnerHTML":Me=Ue;break;case"style":D(A,te,Ue);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:b(ut)&&typeof Ue!="function"&&typeof Ue!="symbol"&&A.push(ae,l(ut),ie,l(Y(Ue)),q)}return A.push(O),F(A,Me,Se),Se}}var We=c("</"),Je=c(">"),Ye=c('<template id="'),Gt=c('"></template>'),Ar=c("<!--$-->"),pr=c('<!--$?--><template id="'),en=c('"></template>'),Ct=c("<!--$!-->"),Yn=c("<!--/$-->"),Nn=c("<template"),rr=c('"'),Jn=c(' data-dgst="');c(' data-msg="'),c(' data-stck="');var $i=c("></template>");function dr(A,B,G){if(i(A,pr),G===null)throw Error(e(395));return i(A,G),o(A,en)}var Hr=c('<div hidden id="'),tn=c('">'),mt=c("</div>"),Rr=c('<svg aria-hidden="true" style="display:none" id="'),Ui=c('">'),ki=c("</svg>"),yn=c('<math aria-hidden="true" style="display:none" id="'),Wi=c('">'),Dn=c("</math>"),nr=c('<table hidden id="'),Ao=c('">'),Ro=c("</table>"),xs=c('<table hidden><tbody id="'),Jt=c('">'),Io=c("</tbody></table>"),Fa=c('<table hidden><tr id="'),ja=c('">'),vn=c("</tr></table>"),Oo=c('<table hidden><colgroup id="'),Vi=c('">'),Zn=c("</colgroup></table>");function Ir(A,B,G,te){switch(G.insertionMode){case 0:case 1:return i(A,Hr),i(A,B.segmentPrefix),i(A,l(te.toString(16))),o(A,tn);case 2:return i(A,Rr),i(A,B.segmentPrefix),i(A,l(te.toString(16))),o(A,Ui);case 3:return i(A,yn),i(A,B.segmentPrefix),i(A,l(te.toString(16))),o(A,Wi);case 4:return i(A,nr),i(A,B.segmentPrefix),i(A,l(te.toString(16))),o(A,Ao);case 5:return i(A,xs),i(A,B.segmentPrefix),i(A,l(te.toString(16))),o(A,Jt);case 6:return i(A,Fa),i(A,B.segmentPrefix),i(A,l(te.toString(16))),o(A,ja);case 7:return i(A,Oo),i(A,B.segmentPrefix),i(A,l(te.toString(16))),o(A,Vi);default:throw Error(e(397))}}function bn(A,B){switch(B.insertionMode){case 0:case 1:return o(A,mt);case 2:return o(A,ki);case 3:return o(A,Dn);case 4:return o(A,Ro);case 5:return o(A,Io);case 6:return o(A,vn);case 7:return o(A,Zn);default:throw Error(e(397))}}var Gi=c('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("'),Qn=c('$RS("'),ei=c('","'),wn=c('")<\/script>'),ti=c('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("'),Or=c('$RC("'),Ss=c('","'),ks=c('")<\/script>'),Pn=c('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("'),Zt=c('$RX("'),xn=c('"'),Sn=c(")<\/script>"),ri=c(","),Ki=/[<\u2028\u2029]/g;function rn(A){return JSON.stringify(A).replace(Ki,function(B){switch(B){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 kn=Object.assign,gr=Symbol.for("react.element"),ni=Symbol.for("react.portal"),_i=Symbol.for("react.fragment"),qi=Symbol.for("react.strict_mode"),$r=Symbol.for("react.profiler"),_n=Symbol.for("react.provider"),yr=Symbol.for("react.context"),Xi=Symbol.for("react.forward_ref"),ar=Symbol.for("react.suspense"),Mr=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),X=Symbol.for("react.scope"),re=Symbol.for("react.debug_trace_mode"),_e=Symbol.for("react.legacy_hidden"),ve=Symbol.for("react.default_value"),Oe=Symbol.iterator;function $e(A){if(A==null)return null;if(typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case _i:return"Fragment";case ni:return"Portal";case $r:return"Profiler";case qi:return"StrictMode";case ar:return"Suspense";case Mr:return"SuspenseList"}if(typeof A=="object")switch(A.$$typeof){case yr:return(A.displayName||"Context")+".Consumer";case _n:return(A._context.displayName||"Context")+".Provider";case Xi:var B=A.render;return A=A.displayName,A||(A=B.displayName||B.name||"",A=A!==""?"ForwardRef("+A+")":"ForwardRef"),A;case C:return B=A.displayName||null,B!==null?B:$e(A.type)||"Memo";case z:B=A._payload,A=A._init;try{return $e(A(B))}catch{}}return null}var Qe={};function nt(A,B){if(A=A.contextTypes,!A)return Qe;var G={},te;for(te in A)G[te]=B[te];return G}var tt=null;function wt(A,B){if(A!==B){A.context._currentValue=A.parentValue,A=A.parent;var G=B.parent;if(A===null){if(G!==null)throw Error(e(401))}else{if(G===null)throw Error(e(401));wt(A,G)}B.context._currentValue=B.value}}function vr(A){A.context._currentValue=A.parentValue,A=A.parent,A!==null&&vr(A)}function br(A){var B=A.parent;B!==null&&br(B),A.context._currentValue=A.value}function wr(A,B){if(A.context._currentValue=A.parentValue,A=A.parent,A===null)throw Error(e(402));A.depth===B.depth?wt(A,B):wr(A,B)}function ii(A,B){var G=B.parent;if(G===null)throw Error(e(402));A.depth===G.depth?wt(A,G):ii(A,G),B.context._currentValue=B.value}function En(A){var B=tt;B!==A&&(B===null?br(A):A===null?vr(B):B.depth===A.depth?wt(B,A):B.depth>A.depth?wr(B,A):ii(B,A),tt=A)}var Yi={isMounted:function(){return!1},enqueueSetState:function(A,B){A=A._reactInternals,A.queue!==null&&A.queue.push(B)},enqueueReplaceState:function(A,B){A=A._reactInternals,A.replace=!0,A.queue=[B]},enqueueForceUpdate:function(){}};function oi(A,B,G,te){var Ee=A.state!==void 0?A.state:null;A.updater=Yi,A.props=G,A.state=Ee;var Se={queue:[],replace:!1};A._reactInternals=Se;var Me=B.contextType;if(A.context=typeof Me=="object"&&Me!==null?Me._currentValue:te,Me=B.getDerivedStateFromProps,typeof Me=="function"&&(Me=Me(G,Ee),Ee=Me==null?Ee:kn({},Ee,Me),A.state=Ee),typeof B.getDerivedStateFromProps!="function"&&typeof A.getSnapshotBeforeUpdate!="function"&&(typeof A.UNSAFE_componentWillMount=="function"||typeof A.componentWillMount=="function"))if(B=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),B!==A.state&&Yi.enqueueReplaceState(A,A.state,null),Se.queue!==null&&0<Se.queue.length)if(B=Se.queue,Me=Se.replace,Se.queue=null,Se.replace=!1,Me&&B.length===1)A.state=B[0];else{for(Se=Me?B[0]:A.state,Ee=!0,Me=Me?1:0;Me<B.length;Me++){var Ue=B[Me];Ue=typeof Ue=="function"?Ue.call(A,Se,G,te):Ue,Ue!=null&&(Ee?(Ee=!1,Se=kn({},Se,Ue)):kn(Se,Ue))}A.state=Se}else Se.queue=null}var Ei={id:1,overflow:""};function Ln(A,B,G){var te=A.id;A=A.overflow;var Ee=32-Ci(te)-1;te&=~(1<<Ee),G+=1;var Se=32-Ci(B)+Ee;if(30<Se){var Me=Ee-Ee%5;return Se=(te&(1<<Me)-1).toString(32),te>>=Me,Ee-=Me,{id:1<<32-Ci(B)+Ee|G<<Ee|te,overflow:Se+A}}return{id:1<<Se|G<<Ee|te,overflow:A}}var Ci=Math.clz32?Math.clz32:_s,Nd=Math.log,Dd=Math.LN2;function _s(A){return A>>>=0,A===0?32:31-(Nd(A)/Dd|0)|0}function Cn(A,B){return A===B&&(A!==0||1/A===1/B)||A!==A&&B!==B}var Pd=typeof Object.is=="function"?Object.is:Cn,Fn=null,Ba=null,Es=null,It=null,Ti=!1,Cs=!1,Ai=0,si=null,Ts=0;function ai(){if(Fn===null)throw Error(e(321));return Fn}function nn(){if(0<Ts)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function za(){return It===null?Es===null?(Ti=!1,Es=It=nn()):(Ti=!0,It=Es):It.next===null?(Ti=!1,It=It.next=nn()):(Ti=!0,It=It.next),It}function Mo(){Ba=Fn=null,Cs=!1,Es=null,Ts=0,It=si=null}function mc(A,B){return typeof B=="function"?B(A):B}function As(A,B,G){if(Fn=ai(),It=za(),Ti){var te=It.queue;if(B=te.dispatch,si!==null&&(G=si.get(te),G!==void 0)){si.delete(te),te=It.memoizedState;do te=A(te,G.action),G=G.next;while(G!==null);return It.memoizedState=te,[te,B]}return[It.memoizedState,B]}return A=A===mc?typeof B=="function"?B():B:G!==void 0?G(B):B,It.memoizedState=A,A=It.queue={last:null,dispatch:null},A=A.dispatch=Ld.bind(null,Fn,A),[It.memoizedState,A]}function gc(A,B){if(Fn=ai(),It=za(),B=B===void 0?null:B,It!==null){var G=It.memoizedState;if(G!==null&&B!==null){var te=G[1];e:if(te===null)te=!1;else{for(var Ee=0;Ee<te.length&&Ee<B.length;Ee++)if(!Pd(B[Ee],te[Ee])){te=!1;break e}te=!0}if(te)return G[0]}}return A=A(),It.memoizedState=[A,B],A}function Ld(A,B,G){if(25<=Ts)throw Error(e(301));if(A===Fn)if(Cs=!0,A={action:G,next:null},si===null&&(si=new Map),G=si.get(B),G===void 0)si.set(B,A);else{for(B=G;B.next!==null;)B=B.next;B.next=A}}function Fd(){throw Error(e(394))}function Rs(){}var yc={readContext:function(A){return A._currentValue},useContext:function(A){return ai(),A._currentValue},useMemo:gc,useReducer:As,useRef:function(A){Fn=ai(),It=za();var B=It.memoizedState;return B===null?(A={current:A},It.memoizedState=A):B},useState:function(A){return As(mc,A)},useInsertionEffect:Rs,useLayoutEffect:function(){},useCallback:function(A,B){return gc(function(){return A},B)},useImperativeHandle:Rs,useEffect:Rs,useDebugValue:Rs,useDeferredValue:function(A){return ai(),A},useTransition:function(){return ai(),[!1,Fd]},useId:function(){var A=Ba.treeContext,B=A.overflow;A=A.id,A=(A&~(1<<32-Ci(A)-1)).toString(32)+B;var G=No;if(G===null)throw Error(e(404));return B=Ai++,A=":"+G.idPrefix+"R"+A,0<B&&(A+="H"+B.toString(32)),A+":"},useMutableSource:function(A,B){return ai(),B(A._source)},useSyncExternalStore:function(A,B,G){if(G===void 0)throw Error(e(407));return G()}},No=null,Ha=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function jd(A){return console.error(A),null}function Ji(){}function $a(A,B,G,te,Ee,Se,Me,Ue,it){var ut=[],ct=new Set;return B={destination:null,responseState:B,progressiveChunkSize:te===void 0?12800:te,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:ct,pingedTasks:ut,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:Ee===void 0?jd:Ee,onAllReady:Se===void 0?Ji:Se,onShellReady:Me===void 0?Ji:Me,onShellError:Ue===void 0?Ji:Ue,onFatalError:it===void 0?Ji:it},G=Zi(B,0,null,G,!1,!1),G.parentFlushed=!0,A=Ua(B,A,null,G,ct,Qe,null,Ei),ut.push(A),B}function Ua(A,B,G,te,Ee,Se,Me,Ue){A.allPendingTasks++,G===null?A.pendingRootTasks++:G.pendingTasks++;var it={node:B,ping:function(){var ut=A.pingedTasks;ut.push(it),ut.length===1&&_c(A)},blockedBoundary:G,blockedSegment:te,abortSet:Ee,legacyContext:Se,context:Me,treeContext:Ue};return Ee.add(it),it}function Zi(A,B,G,te,Ee,Se){return{status:0,id:-1,index:B,parentFlushed:!1,chunks:[],children:[],formatContext:te,boundary:G,lastPushedText:Ee,textEmbedded:Se}}function Do(A,B){if(A=A.onError(B),A!=null&&typeof A!="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 A+'" instead');return A}function Is(A,B){var G=A.onShellError;G(B),G=A.onFatalError,G(B),A.destination!==null?(A.status=2,d(A.destination,B)):(A.status=1,A.fatalError=B)}function vc(A,B,G,te,Ee){for(Fn={},Ba=B,Ai=0,A=G(te,Ee);Cs;)Cs=!1,Ai=0,Ts+=1,It=null,A=G(te,Ee);return Mo(),A}function bc(A,B,G,te){var Ee=G.render(),Se=te.childContextTypes;if(Se!=null){var Me=B.legacyContext;if(typeof G.getChildContext!="function")te=Me;else{G=G.getChildContext();for(var Ue in G)if(!(Ue in Se))throw Error(e(108,$e(te)||"Unknown",Ue));te=kn({},Me,G)}B.legacyContext=te,Nr(A,B,Ee),B.legacyContext=Me}else Nr(A,B,Ee)}function wc(A,B){if(A&&A.defaultProps){B=kn({},B),A=A.defaultProps;for(var G in A)B[G]===void 0&&(B[G]=A[G]);return B}return B}function Os(A,B,G,te,Ee){if(typeof G=="function")if(G.prototype&&G.prototype.isReactComponent){Ee=nt(G,B.legacyContext);var Se=G.contextType;Se=new G(te,typeof Se=="object"&&Se!==null?Se._currentValue:Ee),oi(Se,G,te,Ee),bc(A,B,Se,G)}else{Se=nt(G,B.legacyContext),Ee=vc(A,B,G,te,Se);var Me=Ai!==0;if(typeof Ee=="object"&&Ee!==null&&typeof Ee.render=="function"&&Ee.$$typeof===void 0)oi(Ee,G,te,Se),bc(A,B,Ee,G);else if(Me){te=B.treeContext,B.treeContext=Ln(te,1,0);try{Nr(A,B,Ee)}finally{B.treeContext=te}}else Nr(A,B,Ee)}else if(typeof G=="string"){switch(Ee=B.blockedSegment,Se=De(Ee.chunks,G,te,A.responseState,Ee.formatContext),Ee.lastPushedText=!1,Me=Ee.formatContext,Ee.formatContext=ue(Me,G,te),Ms(A,B,Se),Ee.formatContext=Me,G){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:Ee.chunks.push(We,l(G),Je)}Ee.lastPushedText=!1}else{switch(G){case _e:case re:case qi:case $r:case _i:Nr(A,B,te.children);return;case Mr:Nr(A,B,te.children);return;case X:throw Error(e(343));case ar:e:{G=B.blockedBoundary,Ee=B.blockedSegment,Se=te.fallback,te=te.children,Me=new Set;var Ue={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:Me,errorDigest:null},it=Zi(A,Ee.chunks.length,Ue,Ee.formatContext,!1,!1);Ee.children.push(it),Ee.lastPushedText=!1;var ut=Zi(A,0,null,Ee.formatContext,!1,!1);ut.parentFlushed=!0,B.blockedBoundary=Ue,B.blockedSegment=ut;try{if(Ms(A,B,te),ut.lastPushedText&&ut.textEmbedded&&ut.chunks.push(V),ut.status=1,Ns(Ue,ut),Ue.pendingTasks===0)break e}catch(ct){ut.status=4,Ue.forceClientRender=!0,Ue.errorDigest=Do(A,ct)}finally{B.blockedBoundary=G,B.blockedSegment=Ee}B=Ua(A,Se,G,it,Me,B.legacyContext,B.context,B.treeContext),A.pingedTasks.push(B)}return}if(typeof G=="object"&&G!==null)switch(G.$$typeof){case Xi:if(te=vc(A,B,G.render,te,Ee),Ai!==0){G=B.treeContext,B.treeContext=Ln(G,1,0);try{Nr(A,B,te)}finally{B.treeContext=G}}else Nr(A,B,te);return;case C:G=G.type,te=wc(G,te),Os(A,B,G,te,Ee);return;case _n:if(Ee=te.children,G=G._context,te=te.value,Se=G._currentValue,G._currentValue=te,Me=tt,tt=te={parent:Me,depth:Me===null?0:Me.depth+1,context:G,parentValue:Se,value:te},B.context=te,Nr(A,B,Ee),A=tt,A===null)throw Error(e(403));te=A.parentValue,A.context._currentValue=te===ve?A.context._defaultValue:te,A=tt=A.parent,B.context=A;return;case yr:te=te.children,te=te(G._currentValue),Nr(A,B,te);return;case z:Ee=G._init,G=Ee(G._payload),te=wc(G,te),Os(A,B,G,te,void 0);return}throw Error(e(130,G==null?G:typeof G,""))}}function Nr(A,B,G){if(B.node=G,typeof G=="object"&&G!==null){switch(G.$$typeof){case gr:Os(A,B,G.type,G.props,G.ref);return;case ni:throw Error(e(257));case z:var te=G._init;G=te(G._payload),Nr(A,B,G);return}if(fe(G)){xc(A,B,G);return}if(G===null||typeof G!="object"?te=null:(te=Oe&&G[Oe]||G["@@iterator"],te=typeof te=="function"?te:null),te&&(te=te.call(G))){if(G=te.next(),!G.done){var Ee=[];do Ee.push(G.value),G=te.next();while(!G.done);xc(A,B,Ee)}return}throw A=Object.prototype.toString.call(G),Error(e(31,A==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":A))}typeof G=="string"?(te=B.blockedSegment,te.lastPushedText=me(B.blockedSegment.chunks,G,A.responseState,te.lastPushedText)):typeof G=="number"&&(te=B.blockedSegment,te.lastPushedText=me(B.blockedSegment.chunks,""+G,A.responseState,te.lastPushedText))}function xc(A,B,G){for(var te=G.length,Ee=0;Ee<te;Ee++){var Se=B.treeContext;B.treeContext=Ln(Se,te,Ee);try{Ms(A,B,G[Ee])}finally{B.treeContext=Se}}}function Ms(A,B,G){var te=B.blockedSegment.formatContext,Ee=B.legacyContext,Se=B.context;try{return Nr(A,B,G)}catch(it){if(Mo(),typeof it=="object"&&it!==null&&typeof it.then=="function"){G=it;var Me=B.blockedSegment,Ue=Zi(A,Me.chunks.length,null,Me.formatContext,Me.lastPushedText,!0);Me.children.push(Ue),Me.lastPushedText=!1,A=Ua(A,B.node,B.blockedBoundary,Ue,B.abortSet,B.legacyContext,B.context,B.treeContext).ping,G.then(A,A),B.blockedSegment.formatContext=te,B.legacyContext=Ee,B.context=Se,En(Se)}else throw B.blockedSegment.formatContext=te,B.legacyContext=Ee,B.context=Se,En(Se),it}}function Bd(A){var B=A.blockedBoundary;A=A.blockedSegment,A.status=3,kc(this,B,A)}function Sc(A,B,G){var te=A.blockedBoundary;A.blockedSegment.status=3,te===null?(B.allPendingTasks--,B.status!==2&&(B.status=2,B.destination!==null&&B.destination.close())):(te.pendingTasks--,te.forceClientRender||(te.forceClientRender=!0,A=G===void 0?Error(e(432)):G,te.errorDigest=B.onError(A),te.parentFlushed&&B.clientRenderedBoundaries.push(te)),te.fallbackAbortableTasks.forEach(function(Ee){return Sc(Ee,B,G)}),te.fallbackAbortableTasks.clear(),B.allPendingTasks--,B.allPendingTasks===0&&(te=B.onAllReady,te()))}function Ns(A,B){if(B.chunks.length===0&&B.children.length===1&&B.children[0].boundary===null){var G=B.children[0];G.id=B.id,G.parentFlushed=!0,G.status===1&&Ns(A,G)}else A.completedSegments.push(B)}function kc(A,B,G){if(B===null){if(G.parentFlushed){if(A.completedRootSegment!==null)throw Error(e(389));A.completedRootSegment=G}A.pendingRootTasks--,A.pendingRootTasks===0&&(A.onShellError=Ji,B=A.onShellReady,B())}else B.pendingTasks--,B.forceClientRender||(B.pendingTasks===0?(G.parentFlushed&&G.status===1&&Ns(B,G),B.parentFlushed&&A.completedBoundaries.push(B),B.fallbackAbortableTasks.forEach(Bd,A),B.fallbackAbortableTasks.clear()):G.parentFlushed&&G.status===1&&(Ns(B,G),B.completedSegments.length===1&&B.parentFlushed&&A.partialBoundaries.push(B)));A.allPendingTasks--,A.allPendingTasks===0&&(A=A.onAllReady,A())}function _c(A){if(A.status!==2){var B=tt,G=Ha.current;Ha.current=yc;var te=No;No=A.responseState;try{var Ee=A.pingedTasks,Se;for(Se=0;Se<Ee.length;Se++){var Me=Ee[Se],Ue=A,it=Me.blockedSegment;if(it.status===0){En(Me.context);try{Nr(Ue,Me,Me.node),it.lastPushedText&&it.textEmbedded&&it.chunks.push(V),Me.abortSet.delete(Me),it.status=1,kc(Ue,Me.blockedBoundary,it)}catch(sn){if(Mo(),typeof sn=="object"&&sn!==null&&typeof sn.then=="function"){var ut=Me.ping;sn.then(ut,ut)}else{Me.abortSet.delete(Me),it.status=4;var ct=Me.blockedBoundary,Dt=sn,Dr=Do(Ue,Dt);if(ct===null?Is(Ue,Dt):(ct.pendingTasks--,ct.forceClientRender||(ct.forceClientRender=!0,ct.errorDigest=Dr,ct.parentFlushed&&Ue.clientRenderedBoundaries.push(ct))),Ue.allPendingTasks--,Ue.allPendingTasks===0){var on=Ue.onAllReady;on()}}}finally{}}}Ee.splice(0,Se),A.destination!==null&&Wa(A,A.destination)}catch(sn){Do(A,sn),Is(A,sn)}finally{No=te,Ha.current=G,G===yc&&En(B)}}}function Ds(A,B,G){switch(G.parentFlushed=!0,G.status){case 0:var te=G.id=A.nextSegmentId++;return G.lastPushedText=!1,G.textEmbedded=!1,A=A.responseState,i(B,Ye),i(B,A.placeholderPrefix),A=l(te.toString(16)),i(B,A),o(B,Gt);case 1:G.status=2;var Ee=!0;te=G.chunks;var Se=0;G=G.children;for(var Me=0;Me<G.length;Me++){for(Ee=G[Me];Se<Ee.index;Se++)i(B,te[Se]);Ee=Ps(A,B,Ee)}for(;Se<te.length-1;Se++)i(B,te[Se]);return Se<te.length&&(Ee=o(B,te[Se])),Ee;default:throw Error(e(390))}}function Ps(A,B,G){var te=G.boundary;if(te===null)return Ds(A,B,G);if(te.parentFlushed=!0,te.forceClientRender)te=te.errorDigest,o(B,Ct),i(B,Nn),te&&(i(B,Jn),i(B,l(Y(te))),i(B,rr)),o(B,$i),Ds(A,B,G);else if(0<te.pendingTasks){te.rootSegmentID=A.nextSegmentId++,0<te.completedSegments.length&&A.partialBoundaries.push(te);var Ee=A.responseState,Se=Ee.nextSuspenseID++;Ee=c(Ee.boundaryPrefix+Se.toString(16)),te=te.id=Ee,dr(B,A.responseState,te),Ds(A,B,G)}else if(te.byteSize>A.progressiveChunkSize)te.rootSegmentID=A.nextSegmentId++,A.completedBoundaries.push(te),dr(B,A.responseState,te.id),Ds(A,B,G);else{if(o(B,Ar),G=te.completedSegments,G.length!==1)throw Error(e(391));Ps(A,B,G[0])}return o(B,Yn)}function Ec(A,B,G){return Ir(B,A.responseState,G.formatContext,G.id),Ps(A,B,G),bn(B,G.formatContext)}function Cc(A,B,G){for(var te=G.completedSegments,Ee=0;Ee<te.length;Ee++)Tc(A,B,G,te[Ee]);if(te.length=0,A=A.responseState,te=G.id,G=G.rootSegmentID,i(B,A.startInlineScript),A.sentCompleteBoundaryFunction?i(B,Or):(A.sentCompleteBoundaryFunction=!0,i(B,ti)),te===null)throw Error(e(395));return G=l(G.toString(16)),i(B,te),i(B,Ss),i(B,A.segmentPrefix),i(B,G),o(B,ks)}function Tc(A,B,G,te){if(te.status===2)return!0;var Ee=te.id;if(Ee===-1){if((te.id=G.rootSegmentID)===-1)throw Error(e(392));return Ec(A,B,te)}return Ec(A,B,te),A=A.responseState,i(B,A.startInlineScript),A.sentCompleteSegmentFunction?i(B,Qn):(A.sentCompleteSegmentFunction=!0,i(B,Gi)),i(B,A.segmentPrefix),Ee=l(Ee.toString(16)),i(B,Ee),i(B,ei),i(B,A.placeholderPrefix),i(B,Ee),o(B,wn)}function Wa(A,B){r=new Uint8Array(512),n=0;try{var G=A.completedRootSegment;if(G!==null&&A.pendingRootTasks===0){Ps(A,B,G),A.completedRootSegment=null;var te=A.responseState.bootstrapChunks;for(G=0;G<te.length-1;G++)i(B,te[G]);G<te.length&&o(B,te[G])}var Ee=A.clientRenderedBoundaries,Se;for(Se=0;Se<Ee.length;Se++){var Me=Ee[Se];te=B;var Ue=A.responseState,it=Me.id,ut=Me.errorDigest,ct=Me.errorMessage,Dt=Me.errorComponentStack;if(i(te,Ue.startInlineScript),Ue.sentClientRenderFunction?i(te,Zt):(Ue.sentClientRenderFunction=!0,i(te,Pn)),it===null)throw Error(e(395));i(te,it),i(te,xn),(ut||ct||Dt)&&(i(te,ri),i(te,l(rn(ut||"")))),(ct||Dt)&&(i(te,ri),i(te,l(rn(ct||"")))),Dt&&(i(te,ri),i(te,l(rn(Dt)))),o(te,Sn)}Ee.splice(0,Se);var Dr=A.completedBoundaries;for(Se=0;Se<Dr.length;Se++)Cc(A,B,Dr[Se]);Dr.splice(0,Se),s(B),r=new Uint8Array(512),n=0;var on=A.partialBoundaries;for(Se=0;Se<on.length;Se++){var sn=on[Se];e:{Ee=A,Me=B;var Ls=sn.completedSegments;for(Ue=0;Ue<Ls.length;Ue++)if(!Tc(Ee,Me,sn,Ls[Ue])){Ue++,Ls.splice(0,Ue);var Rc=!1;break e}Ls.splice(0,Ue),Rc=!0}if(!Rc){A.destination=null,Se++,on.splice(0,Se);return}}on.splice(0,Se);var Po=A.completedBoundaries;for(Se=0;Se<Po.length;Se++)Cc(A,B,Po[Se]);Po.splice(0,Se)}finally{s(B),A.allPendingTasks===0&&A.pingedTasks.length===0&&A.clientRenderedBoundaries.length===0&&A.completedBoundaries.length===0&&B.close()}}function Ac(A,B){try{var G=A.abortableTasks;G.forEach(function(te){return Sc(te,A,B)}),G.clear(),A.destination!==null&&Wa(A,A.destination)}catch(te){Do(A,te),Is(A,te)}}return Tm.renderToReadableStream=function(A,B){return new Promise(function(G,te){var Ee,Se,Me=new Promise(function(ct,Dt){Se=ct,Ee=Dt}),Ue=$a(A,Fe(B?B.identifierPrefix:void 0,B?B.nonce:void 0,B?B.bootstrapScriptContent:void 0,B?B.bootstrapScripts:void 0,B?B.bootstrapModules:void 0),ze(B?B.namespaceURI:void 0),B?B.progressiveChunkSize:void 0,B?B.onError:void 0,Se,function(){var ct=new ReadableStream({type:"bytes",pull:function(Dt){if(Ue.status===1)Ue.status=2,d(Dt,Ue.fatalError);else if(Ue.status!==2&&Ue.destination===null){Ue.destination=Dt;try{Wa(Ue,Dt)}catch(Dr){Do(Ue,Dr),Is(Ue,Dr)}}},cancel:function(){Ac(Ue)}},{highWaterMark:0});ct.allReady=Me,G(ct)},function(ct){Me.catch(function(){}),te(ct)},Ee);if(B&&B.signal){var it=B.signal,ut=function(){Ac(Ue,it.reason),it.removeEventListener("abort",ut)};it.addEventListener("abort",ut)}_c(Ue)})},Tm.version="18.3.1",Tm}var kl={};/**
342
+ * @license React
343
+ * react-dom-server-legacy.browser.development.js
344
+ *
345
+ * Copyright (c) Facebook, Inc. and its affiliates.
346
+ *
347
+ * This source code is licensed under the MIT license found in the
348
+ * LICENSE file in the root directory of this source tree.
349
+ */var SR;function hle(){return SR||(SR=1,process.env.NODE_ENV!=="production"&&function(){var t=J,e="18.3.1",r=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(u){{for(var h=arguments.length,y=new Array(h>1?h-1:0),E=1;E<h;E++)y[E-1]=arguments[E];o("warn",u,y)}}function i(u){{for(var h=arguments.length,y=new Array(h>1?h-1:0),E=1;E<h;E++)y[E-1]=arguments[E];o("error",u,y)}}function o(u,h,y){{var E=r.ReactDebugCurrentFrame,I=E.getStackAddendum();I!==""&&(h+="%s",y=y.concat([I]));var H=y.map(function(K){return String(K)});H.unshift("Warning: "+h),Function.prototype.apply.call(console[u],console,H)}}function s(u){u()}function a(u){}function l(u,h){c(u,h)}function c(u,h){return u.push(h)}function d(u){}function f(u){u.push(null)}function p(u){return u}function m(u){return u}function g(u,h){u.destroy(h)}function b(u){{var h=typeof Symbol=="function"&&Symbol.toStringTag,y=h&&u[Symbol.toStringTag]||u.constructor.name||"Object";return y}}function S(u){try{return w(u),!1}catch{return!0}}function w(u){return""+u}function T(u,h){if(S(u))return i("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",h,b(u)),w(u)}function M(u,h){if(S(u))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.",h,b(u)),w(u)}function j(u){if(S(u))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.",b(u)),w(u)}var $=Object.prototype.hasOwnProperty,W=0,Y=1,ee=2,P=3,fe=4,de=5,U=6,ne=":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",R=ne+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",le=new RegExp("^["+ne+"]["+R+"]*$"),Ce={},he={};function Fe(u){return $.call(he,u)?!0:$.call(Ce,u)?!1:le.test(u)?(he[u]=!0,!0):(Ce[u]=!0,i("Invalid attribute name: `%s`",u),!1)}function ye(u,h,y,E){if(y!==null&&y.type===W)return!1;switch(typeof h){case"function":case"symbol":return!0;case"boolean":{if(y!==null)return!y.acceptsBooleans;var I=u.toLowerCase().slice(0,5);return I!=="data-"&&I!=="aria-"}default:return!1}}function ze(u){return V.hasOwnProperty(u)?V[u]:null}function ue(u,h,y,E,I,H,K){this.acceptsBooleans=h===ee||h===P||h===fe,this.attributeName=E,this.attributeNamespace=I,this.mustUseProperty=y,this.propertyName=u,this.type=h,this.sanitizeURL=H,this.removeEmptyString=K}var V={},me=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];me.forEach(function(u){V[u]=new ue(u,W,!1,u,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var h=u[0],y=u[1];V[h]=new ue(h,Y,!1,y,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(u){V[u]=new ue(u,ee,!1,u.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){V[u]=new ue(u,ee,!1,u,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(u){V[u]=new ue(u,P,!1,u.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(u){V[u]=new ue(u,P,!0,u,null,!1,!1)}),["capture","download"].forEach(function(u){V[u]=new ue(u,fe,!1,u,null,!1,!1)}),["cols","rows","size","span"].forEach(function(u){V[u]=new ue(u,U,!1,u,null,!1,!1)}),["rowSpan","start"].forEach(function(u){V[u]=new ue(u,de,!1,u.toLowerCase(),null,!1,!1)});var ge=/[\-\:]([a-z])/g,ke=function(u){return u[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(u){var h=u.replace(ge,ke);V[h]=new ue(h,Y,!1,u,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(u){var h=u.replace(ge,ke);V[h]=new ue(h,Y,!1,u,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(u){var h=u.replace(ge,ke);V[h]=new ue(h,Y,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(u){V[u]=new ue(u,Y,!1,u.toLowerCase(),null,!1,!1)});var ce="xlinkHref";V[ce]=new ue("xlinkHref",Y,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(u){V[u]=new ue(u,Y,!1,u.toLowerCase(),null,!0,!0)});var L={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 D(u,h){return u+h.charAt(0).toUpperCase()+h.substring(1)}var ae=["Webkit","ms","Moz","O"];Object.keys(L).forEach(function(u){ae.forEach(function(h){L[D(h,u)]=L[u]})});var ie={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function q(u,h){ie[h.type]||h.onChange||h.onInput||h.readOnly||h.disabled||h.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`."),h.onChange||h.readOnly||h.disabled||h.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 Z(u,h){if(u.indexOf("-")===-1)return typeof h.is=="string";switch(u){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 we={"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},O={},xe=new RegExp("^(aria)-["+R+"]*$"),F=new RegExp("^(aria)[A-Z]["+R+"]*$");function k(u,h){{if($.call(O,h)&&O[h])return!0;if(F.test(h)){var y="aria-"+h.slice(4).toLowerCase(),E=we.hasOwnProperty(y)?y:null;if(E==null)return i("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",h),O[h]=!0,!0;if(h!==E)return i("Invalid ARIA attribute `%s`. Did you mean `%s`?",h,E),O[h]=!0,!0}if(xe.test(h)){var I=h.toLowerCase(),H=we.hasOwnProperty(I)?I:null;if(H==null)return O[h]=!0,!1;if(h!==H)return i("Unknown ARIA attribute `%s`. Did you mean `%s`?",h,H),O[h]=!0,!0}}return!0}function _(u,h){{var y=[];for(var E in h){var I=k(u,E);I||y.push(E)}var H=y.map(function(K){return"`"+K+"`"}).join(", ");y.length===1?i("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",H,u):y.length>1&&i("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",H,u)}}function N(u,h){Z(u,h)||_(u,h)}var Q=!1;function pe(u,h){{if(u!=="input"&&u!=="textarea"&&u!=="select")return;h!=null&&h.value===null&&!Q&&(Q=!0,u==="select"&&h.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.",u):i("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",u))}}var oe={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"},Re=function(){};{var Ne={},De=/^on./,We=/^on[^A-Z]/,Je=new RegExp("^(aria)-["+R+"]*$"),Ye=new RegExp("^(aria)[A-Z]["+R+"]*$");Re=function(u,h,y,E){if($.call(Ne,h)&&Ne[h])return!0;var I=h.toLowerCase();if(I==="onfocusin"||I==="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."),Ne[h]=!0,!0;if(E!=null){var H=E.registrationNameDependencies,K=E.possibleRegistrationNames;if(H.hasOwnProperty(h))return!0;var se=K.hasOwnProperty(I)?K[I]:null;if(se!=null)return i("Invalid event handler property `%s`. Did you mean `%s`?",h,se),Ne[h]=!0,!0;if(De.test(h))return i("Unknown event handler property `%s`. It will be ignored.",h),Ne[h]=!0,!0}else if(De.test(h))return We.test(h)&&i("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",h),Ne[h]=!0,!0;if(Je.test(h)||Ye.test(h))return!0;if(I==="innerhtml")return i("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Ne[h]=!0,!0;if(I==="aria")return i("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Ne[h]=!0,!0;if(I==="is"&&y!==null&&y!==void 0&&typeof y!="string")return i("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof y),Ne[h]=!0,!0;if(typeof y=="number"&&isNaN(y))return i("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",h),Ne[h]=!0,!0;var be=ze(h),Pe=be!==null&&be.type===W;if(oe.hasOwnProperty(I)){var je=oe[I];if(je!==h)return i("Invalid DOM property `%s`. Did you mean `%s`?",h,je),Ne[h]=!0,!0}else if(!Pe&&h!==I)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.",h,I),Ne[h]=!0,!0;return typeof y=="boolean"&&ye(h,y,be)?(y?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()}.',y,h,h,y,h):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.',y,h,h,y,h,h,h),Ne[h]=!0,!0):Pe?!0:ye(h,y,be)?(Ne[h]=!0,!1):((y==="false"||y==="true")&&be!==null&&be.type===P&&(i("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",y,h,y==="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".',h,y),Ne[h]=!0),!0)}}var Gt=function(u,h,y){{var E=[];for(var I in h){var H=Re(u,I,h[I],y);H||E.push(I)}var K=E.map(function(se){return"`"+se+"`"}).join(", ");E.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,u):E.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,u)}};function Ar(u,h,y){Z(u,h)||Gt(u,h,y)}var pr=function(){};{var en=/^(?:webkit|moz|o)[A-Z]/,Ct=/^-ms-/,Yn=/-(.)/g,Nn=/;\s*$/,rr={},Jn={},$i=!1,dr=!1,Hr=function(u){return u.replace(Yn,function(h,y){return y.toUpperCase()})},tn=function(u){rr.hasOwnProperty(u)&&rr[u]||(rr[u]=!0,i("Unsupported style property %s. Did you mean %s?",u,Hr(u.replace(Ct,"ms-"))))},mt=function(u){rr.hasOwnProperty(u)&&rr[u]||(rr[u]=!0,i("Unsupported vendor-prefixed style property %s. Did you mean %s?",u,u.charAt(0).toUpperCase()+u.slice(1)))},Rr=function(u,h){Jn.hasOwnProperty(h)&&Jn[h]||(Jn[h]=!0,i(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,u,h.replace(Nn,"")))},Ui=function(u,h){$i||($i=!0,i("`NaN` is an invalid value for the `%s` css style property.",u))},ki=function(u,h){dr||(dr=!0,i("`Infinity` is an invalid value for the `%s` css style property.",u))};pr=function(u,h){u.indexOf("-")>-1?tn(u):en.test(u)?mt(u):Nn.test(h)&&Rr(u,h),typeof h=="number"&&(isNaN(h)?Ui(u,h):isFinite(h)||ki(u,h))}}var yn=pr,Wi=/["'&<>]/;function Dn(u){j(u);var h=""+u,y=Wi.exec(h);if(!y)return h;var E,I="",H,K=0;for(H=y.index;H<h.length;H++){switch(h.charCodeAt(H)){case 34:E="&quot;";break;case 38:E="&amp;";break;case 39:E="&#x27;";break;case 60:E="&lt;";break;case 62:E="&gt;";break;default:continue}K!==H&&(I+=h.substring(K,H)),K=H+1,I+=E}return K!==H?I+h.substring(K,H):I}function nr(u){return typeof u=="boolean"||typeof u=="number"?""+u:Dn(u)}var Ao=/([A-Z])/g,Ro=/^ms-/;function xs(u){return u.replace(Ao,"-$1").toLowerCase().replace(Ro,"-ms-")}var Jt=/^[\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,Io=!1;function Fa(u){!Io&&Jt.test(u)&&(Io=!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(u)))}var ja=Array.isArray;function vn(u){return ja(u)}var Oo="<script>";function Vi(u,h,y,E,I){var H=u===void 0?"":u,K=Oo,se=[];return{bootstrapChunks:se,startInlineScript:K,placeholderPrefix:H+"P:",segmentPrefix:H+"S:",boundaryPrefix:H+"B:",idPrefix:H,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}var Zn=0,Ir=1,bn=2,Gi=3,Qn=4,ei=5,wn=6,ti=7;function Or(u,h){return{insertionMode:u,selectedValue:h}}function Ss(u,h,y){switch(h){case"select":return Or(Ir,y.value!=null?y.value:y.defaultValue);case"svg":return Or(bn,null);case"math":return Or(Gi,null);case"foreignObject":return Or(Ir,null);case"table":return Or(Qn,null);case"thead":case"tbody":case"tfoot":return Or(ei,null);case"colgroup":return Or(ti,null);case"tr":return Or(wn,null)}return u.insertionMode>=Qn||u.insertionMode===Zn?Or(Ir,null):u}var ks=null;function Pn(u){var h=u.nextSuspenseID++;return u.boundaryPrefix+h.toString(16)}function Zt(u,h,y){var E=u.idPrefix,I=":"+E+"R"+h;return y>0&&(I+="H"+y.toString(32)),I+":"}function xn(u){return nr(u)}var Sn="<!-- -->";function ri(u,h,y,E){return h===""?E:(E&&u.push(Sn),u.push(xn(h)),!0)}function Ki(u,h,y,E){y&&E&&u.push(Sn)}var rn=new Map;function kn(u){var h=rn.get(u);if(h!==void 0)return h;var y=nr(xs(u));return rn.set(u,y),y}var gr=' style="',ni=":",_i=";";function qi(u,h,y){if(typeof y!="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 E=!0;for(var I in y)if($.call(y,I)){var H=y[I];if(!(H==null||typeof H=="boolean"||H==="")){var K=void 0,se=void 0,be=I.indexOf("--")===0;be?(K=nr(I),M(H,I),se=nr((""+H).trim())):(yn(I,H),K=kn(I),typeof H=="number"?H!==0&&!$.call(L,I)?se=H+"px":se=""+H:(M(H,I),se=nr((""+H).trim()))),E?(E=!1,u.push(gr,K,ni,se)):u.push(_i,K,ni,se)}}E||u.push(yr)}var $r=" ",_n='="',yr='"',Xi='=""';function ar(u,h,y,E){switch(y){case"style":{qi(u,h,E);return}case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(y.length>2&&(y[0]==="o"||y[0]==="O")&&(y[1]==="n"||y[1]==="N"))){var I=ze(y);if(I!==null){switch(typeof E){case"function":case"symbol":return;case"boolean":if(!I.acceptsBooleans)return}var H=I.attributeName,K=H;switch(I.type){case P:E&&u.push($r,K,Xi);return;case fe:E===!0?u.push($r,K,Xi):E===!1||u.push($r,K,_n,nr(E),yr);return;case de:isNaN(E)||u.push($r,K,_n,nr(E),yr);break;case U:!isNaN(E)&&E>=1&&u.push($r,K,_n,nr(E),yr);break;default:I.sanitizeURL&&(T(E,H),E=""+E,Fa(E)),u.push($r,K,_n,nr(E),yr)}}else if(Fe(y)){switch(typeof E){case"function":case"symbol":return;case"boolean":{var se=y.toLowerCase().slice(0,5);if(se!=="data-"&&se!=="aria-")return}}u.push($r,y,_n,nr(E),yr)}}}var Mr=">",C="/>";function z(u,h,y){if(h!=null){if(y!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof h!="object"||!("__html"in h))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 E=h.__html;E!=null&&(j(E),u.push(""+E))}}var X=!1,re=!1,_e=!1,ve=!1,Oe=!1,$e=!1,Qe=!1;function nt(u,h){{var y=u[h];if(y!=null){var E=vn(y);u.multiple&&!E?i("The `%s` prop supplied to <select> must be an array if `multiple` is true.",h):!u.multiple&&E&&i("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",h)}}}function tt(u,h,y){q("select",h),nt(h,"value"),nt(h,"defaultValue"),h.value!==void 0&&h.defaultValue!==void 0&&!_e&&(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"),_e=!0),u.push(Cn("select"));var E=null,I=null;for(var H in h)if($.call(h,H)){var K=h[H];if(K==null)continue;switch(H){case"children":E=K;break;case"dangerouslySetInnerHTML":I=K;break;case"defaultValue":case"value":break;default:ar(u,y,H,K);break}}return u.push(Mr),z(u,I,E),E}function wt(u){var h="";return t.Children.forEach(u,function(y){y!=null&&(h+=y,!Oe&&typeof y!="string"&&typeof y!="number"&&(Oe=!0,i("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),h}var vr=' selected=""';function br(u,h,y,E){var I=E.selectedValue;u.push(Cn("option"));var H=null,K=null,se=null,be=null;for(var Pe in h)if($.call(h,Pe)){var je=h[Pe];if(je==null)continue;switch(Pe){case"children":H=je;break;case"selected":se=je,Qe||(i("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Qe=!0);break;case"dangerouslySetInnerHTML":be=je;break;case"value":K=je;default:ar(u,y,Pe,je);break}}if(I!=null){var Ke;if(K!==null?(T(K,"value"),Ke=""+K):(be!==null&&($e||($e=!0,i("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),Ke=wt(H)),vn(I))for(var st=0;st<I.length;st++){T(I[st],"value");var kt=""+I[st];if(kt===Ke){u.push(vr);break}}else T(I,"select.value"),""+I===Ke&&u.push(vr)}else se&&u.push(vr);return u.push(Mr),z(u,be,H),H}function wr(u,h,y){q("input",h),h.checked!==void 0&&h.defaultChecked!==void 0&&!re&&(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",h.type),re=!0),h.value!==void 0&&h.defaultValue!==void 0&&!X&&(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",h.type),X=!0),u.push(Cn("input"));var E=null,I=null,H=null,K=null;for(var se in h)if($.call(h,se)){var be=h[se];if(be==null)continue;switch(se){case"children":case"dangerouslySetInnerHTML":throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"defaultChecked":K=be;break;case"defaultValue":I=be;break;case"checked":H=be;break;case"value":E=be;break;default:ar(u,y,se,be);break}}return H!==null?ar(u,y,"checked",H):K!==null&&ar(u,y,"checked",K),E!==null?ar(u,y,"value",E):I!==null&&ar(u,y,"value",I),u.push(C),null}function ii(u,h,y){q("textarea",h),h.value!==void 0&&h.defaultValue!==void 0&&!ve&&(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"),ve=!0),u.push(Cn("textarea"));var E=null,I=null,H=null;for(var K in h)if($.call(h,K)){var se=h[K];if(se==null)continue;switch(K){case"children":H=se;break;case"value":E=se;break;case"defaultValue":I=se;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:ar(u,y,K,se);break}}if(E===null&&I!==null&&(E=I),u.push(Mr),H!=null){if(i("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),E!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(vn(H)){if(H.length>1)throw new Error("<textarea> can only have at most one child.");j(H[0]),E=""+H[0]}j(H),E=""+H}return typeof E=="string"&&E[0]===`
350
+ `&&u.push(Ci),E!==null&&(T(E,"value"),u.push(xn(""+E))),null}function En(u,h,y,E){u.push(Cn(y));for(var I in h)if($.call(h,I)){var H=h[I];if(H==null)continue;switch(I){case"children":case"dangerouslySetInnerHTML":throw new Error(y+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ar(u,E,I,H);break}}return u.push(C),null}function Yi(u,h,y){u.push(Cn("menuitem"));for(var E in h)if($.call(h,E)){var I=h[E];if(I==null)continue;switch(E){case"children":case"dangerouslySetInnerHTML":throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:ar(u,y,E,I);break}}return u.push(Mr),null}function oi(u,h,y){u.push(Cn("title"));var E=null;for(var I in h)if($.call(h,I)){var H=h[I];if(H==null)continue;switch(I){case"children":E=H;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:ar(u,y,I,H);break}}u.push(Mr);{var K=Array.isArray(E)&&E.length<2?E[0]||null:E;Array.isArray(E)&&E.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 E}function Ei(u,h,y,E){u.push(Cn(y));var I=null,H=null;for(var K in h)if($.call(h,K)){var se=h[K];if(se==null)continue;switch(K){case"children":I=se;break;case"dangerouslySetInnerHTML":H=se;break;default:ar(u,E,K,se);break}}return u.push(Mr),z(u,H,I),typeof I=="string"?(u.push(xn(I)),null):I}function Ln(u,h,y,E){u.push(Cn(y));var I=null,H=null;for(var K in h)if($.call(h,K)){var se=h[K];if(se==null)continue;switch(K){case"children":I=se;break;case"dangerouslySetInnerHTML":H=se;break;case"style":qi(u,E,se);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:Fe(K)&&typeof se!="function"&&typeof se!="symbol"&&u.push($r,K,_n,nr(se),yr);break}}return u.push(Mr),z(u,H,I),I}var Ci=`
351
+ `;function Nd(u,h,y,E){u.push(Cn(y));var I=null,H=null;for(var K in h)if($.call(h,K)){var se=h[K];if(se==null)continue;switch(K){case"children":I=se;break;case"dangerouslySetInnerHTML":H=se;break;default:ar(u,E,K,se);break}}if(u.push(Mr),H!=null){if(I!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof H!="object"||!("__html"in H))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 be=H.__html;be!=null&&(typeof be=="string"&&be.length>0&&be[0]===`
352
+ `?u.push(Ci,be):(j(be),u.push(""+be)))}return typeof I=="string"&&I[0]===`
353
+ `&&u.push(Ci),I}var Dd=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,_s=new Map;function Cn(u){var h=_s.get(u);if(h===void 0){if(!Dd.test(u))throw new Error("Invalid tag: "+u);h="<"+u,_s.set(u,h)}return h}var Pd="<!DOCTYPE html>";function Fn(u,h,y,E,I){switch(N(h,y),pe(h,y),Ar(h,y,null),!y.suppressContentEditableWarning&&y.contentEditable&&y.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."),I.insertionMode!==bn&&I.insertionMode!==Gi&&h.indexOf("-")===-1&&typeof y.is!="string"&&h.toLowerCase()!==h&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",h),h){case"select":return tt(u,y,E);case"option":return br(u,y,E,I);case"textarea":return ii(u,y,E);case"input":return wr(u,y,E);case"menuitem":return Yi(u,y,E);case"title":return oi(u,y,E);case"listing":case"pre":return Nd(u,y,h,E);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 En(u,y,h,E);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 Ei(u,y,h,E);case"html":return I.insertionMode===Zn&&u.push(Pd),Ei(u,y,h,E);default:return h.indexOf("-")===-1&&typeof y.is!="string"?Ei(u,y,h,E):Ln(u,y,h,E)}}var Ba="</",Es=">";function It(u,h,y){switch(h){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:u.push(Ba,h,Es)}}function Ti(u,h){for(var y=h.bootstrapChunks,E=0;E<y.length-1;E++)l(u,y[E]);return E<y.length?c(u,y[E]):!0}var Cs='<template id="',Ai='"></template>';function si(u,h,y){l(u,Cs),l(u,h.placeholderPrefix);var E=y.toString(16);return l(u,E),c(u,Ai)}var Ts="<!--$-->",ai='<!--$?--><template id="',nn='"></template>',za="<!--$!-->",Mo="<!--/$-->",mc="<template",As='"',gc=' data-dgst="',Ld=' data-msg="',Fd=' data-stck="',Rs="></template>";function yc(u,h){return c(u,Ts)}function No(u,h,y){if(l(u,ai),y===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return l(u,y),c(u,nn)}function Ha(u,h,y,E,I){var H;return H=c(u,za),l(u,mc),y&&(l(u,gc),l(u,nr(y)),l(u,As)),E&&(l(u,Ld),l(u,nr(E)),l(u,As)),I&&(l(u,Fd),l(u,nr(I)),l(u,As)),H=c(u,Rs),H}function jd(u,h){return c(u,Mo)}function Ji(u,h){return c(u,Mo)}function $a(u,h){return c(u,Mo)}var Ua='<div hidden id="',Zi='">',Do="</div>",Is='<svg aria-hidden="true" style="display:none" id="',vc='">',bc="</svg>",wc='<math aria-hidden="true" style="display:none" id="',Os='">',Nr="</math>",xc='<table hidden id="',Ms='">',Bd="</table>",Sc='<table hidden><tbody id="',Ns='">',kc="</tbody></table>",_c='<table hidden><tr id="',Ds='">',Ps="</tr></table>",Ec='<table hidden><colgroup id="',Cc='">',Tc="</colgroup></table>";function Wa(u,h,y,E){switch(y.insertionMode){case Zn:case Ir:return l(u,Ua),l(u,h.segmentPrefix),l(u,E.toString(16)),c(u,Zi);case bn:return l(u,Is),l(u,h.segmentPrefix),l(u,E.toString(16)),c(u,vc);case Gi:return l(u,wc),l(u,h.segmentPrefix),l(u,E.toString(16)),c(u,Os);case Qn:return l(u,xc),l(u,h.segmentPrefix),l(u,E.toString(16)),c(u,Ms);case ei:return l(u,Sc),l(u,h.segmentPrefix),l(u,E.toString(16)),c(u,Ns);case wn:return l(u,_c),l(u,h.segmentPrefix),l(u,E.toString(16)),c(u,Ds);case ti:return l(u,Ec),l(u,h.segmentPrefix),l(u,E.toString(16)),c(u,Cc);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function Ac(u,h){switch(h.insertionMode){case Zn:case Ir:return c(u,Do);case bn:return c(u,bc);case Gi:return c(u,Nr);case Qn:return c(u,Bd);case ei:return c(u,kc);case wn:return c(u,Ps);case ti:return c(u,Tc);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var A="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)}",B='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()}}',G='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())}',te=A+';$RS("',Ee='$RS("',Se='","',Me='")<\/script>';function Ue(u,h,y){l(u,h.startInlineScript),h.sentCompleteSegmentFunction?l(u,Ee):(h.sentCompleteSegmentFunction=!0,l(u,te)),l(u,h.segmentPrefix);var E=y.toString(16);return l(u,E),l(u,Se),l(u,h.placeholderPrefix),l(u,E),c(u,Me)}var it=B+';$RC("',ut='$RC("',ct='","',Dt='")<\/script>';function Dr(u,h,y,E){if(l(u,h.startInlineScript),h.sentCompleteBoundaryFunction?l(u,ut):(h.sentCompleteBoundaryFunction=!0,l(u,it)),y===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var I=E.toString(16);return l(u,y),l(u,ct),l(u,h.segmentPrefix),l(u,I),c(u,Dt)}var on=G+';$RX("',sn='$RX("',Ls='"',Rc=")<\/script>",Po=",";function bv(u,h,y,E,I,H){if(l(u,h.startInlineScript),h.sentClientRenderFunction?l(u,sn):(h.sentClientRenderFunction=!0,l(u,on)),y===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return l(u,y),l(u,Ls),(E||I||H)&&(l(u,Po),l(u,zd(E||""))),(I||H)&&(l(u,Po),l(u,zd(I||""))),H&&(l(u,Po),l(u,zd(H))),c(u,Rc)}var wv=/[<\u2028\u2029]/g;function zd(u){var h=JSON.stringify(u);return h.replace(wv,function(y){switch(y){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 xv(u,h){var y=Vi(h);return{bootstrapChunks:y.bootstrapChunks,startInlineScript:y.startInlineScript,placeholderPrefix:y.placeholderPrefix,segmentPrefix:y.segmentPrefix,boundaryPrefix:y.boundaryPrefix,idPrefix:y.idPrefix,nextSuspenseID:y.nextSuspenseID,sentCompleteSegmentFunction:y.sentCompleteSegmentFunction,sentCompleteBoundaryFunction:y.sentCompleteBoundaryFunction,sentClientRenderFunction:y.sentClientRenderFunction,generateStaticMarkup:u}}function Sv(){return{insertionMode:Ir,selectedValue:null}}function tp(u,h,y,E){return y.generateStaticMarkup?(u.push(nr(h)),!1):ri(u,h,y,E)}function rp(u,h,y,E){if(!h.generateStaticMarkup)return Ki(u,h,y,E)}function kv(u,h){return h.generateStaticMarkup?!0:yc(u)}function _v(u,h,y,E,I){return h.generateStaticMarkup?!0:Ha(u,h,y,E,I)}function Ev(u,h){return h.generateStaticMarkup?!0:jd(u)}function Cv(u,h){return h.generateStaticMarkup?!0:$a(u)}var Ur=Object.assign,Tv=Symbol.for("react.element"),np=Symbol.for("react.portal"),Ic=Symbol.for("react.fragment"),an=Symbol.for("react.strict_mode"),ip=Symbol.for("react.profiler"),Oc=Symbol.for("react.provider"),Mc=Symbol.for("react.context"),Nc=Symbol.for("react.forward_ref"),Dc=Symbol.for("react.suspense"),Va=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),Fs=Symbol.for("react.lazy"),Hd=Symbol.for("react.scope"),$d=Symbol.for("react.debug_trace_mode"),Ud=Symbol.for("react.legacy_hidden"),Pc=Symbol.for("react.default_value"),op=Symbol.iterator,Av="@@iterator";function Rv(u){if(u===null||typeof u!="object")return null;var h=op&&u[op]||u[Av];return typeof h=="function"?h:null}function Iv(u,h,y){var E=u.displayName;if(E)return E;var I=h.displayName||h.name||"";return I!==""?y+"("+I+")":y}function Wd(u){return u.displayName||"Context"}function Wt(u){if(u==null)return null;if(typeof u.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case Ic:return"Fragment";case np:return"Portal";case ip:return"Profiler";case an:return"StrictMode";case Dc:return"Suspense";case Va:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case Mc:var h=u;return Wd(h)+".Consumer";case Oc:var y=u;return Wd(y._context)+".Provider";case Nc:return Iv(u,u.render,"ForwardRef");case Ga:var E=u.displayName||null;return E!==null?E:Wt(u.type)||"Memo";case Fs:{var I=u,H=I._payload,K=I._init;try{return Wt(K(H))}catch{return null}}}return null}var Ka=0,sp,Vd,zt,js,Gd,Kd,qd;function Xd(){}Xd.__reactDisabledLog=!0;function ap(){{if(Ka===0){sp=console.log,Vd=console.info,zt=console.warn,js=console.error,Gd=console.group,Kd=console.groupCollapsed,qd=console.groupEnd;var u={configurable:!0,enumerable:!0,value:Xd,writable:!0};Object.defineProperties(console,{info:u,log:u,warn:u,error:u,group:u,groupCollapsed:u,groupEnd:u})}Ka++}}function lp(){{if(Ka--,Ka===0){var u={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ur({},u,{value:sp}),info:Ur({},u,{value:Vd}),warn:Ur({},u,{value:zt}),error:Ur({},u,{value:js}),group:Ur({},u,{value:Gd}),groupCollapsed:Ur({},u,{value:Kd}),groupEnd:Ur({},u,{value:qd})})}Ka<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Lc=r.ReactCurrentDispatcher,Fc;function qa(u,h,y){{if(Fc===void 0)try{throw Error()}catch(I){var E=I.stack.trim().match(/\n( *(at )?)/);Fc=E&&E[1]||""}return`
354
+ `+Fc+u}}var Yd=!1,Bs;{var Jd=typeof WeakMap=="function"?WeakMap:Map;Bs=new Jd}function Lo(u,h){if(!u||Yd)return"";{var y=Bs.get(u);if(y!==void 0)return y}var E;Yd=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var H;H=Lc.current,Lc.current=null,ap();try{if(h){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(mr){E=mr}Reflect.construct(u,[],K)}else{try{K.call()}catch(mr){E=mr}u.call(K.prototype)}}else{try{throw Error()}catch(mr){E=mr}u()}}catch(mr){if(mr&&E&&typeof mr.stack=="string"){for(var se=mr.stack.split(`
355
+ `),be=E.stack.split(`
356
+ `),Pe=se.length-1,je=be.length-1;Pe>=1&&je>=0&&se[Pe]!==be[je];)je--;for(;Pe>=1&&je>=0;Pe--,je--)if(se[Pe]!==be[je]){if(Pe!==1||je!==1)do if(Pe--,je--,je<0||se[Pe]!==be[je]){var Ke=`
357
+ `+se[Pe].replace(" at new "," at ");return u.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",u.displayName)),typeof u=="function"&&Bs.set(u,Ke),Ke}while(Pe>=1&&je>=0);break}}}finally{Yd=!1,Lc.current=H,lp(),Error.prepareStackTrace=I}var st=u?u.displayName||u.name:"",kt=st?qa(st):"";return typeof u=="function"&&Bs.set(u,kt),kt}function Zd(u,h,y){return Lo(u,!0)}function Xa(u,h,y){return Lo(u,!1)}function Ov(u){var h=u.prototype;return!!(h&&h.isReactComponent)}function Ya(u,h,y){if(u==null)return"";if(typeof u=="function")return Lo(u,Ov(u));if(typeof u=="string")return qa(u);switch(u){case Dc:return qa("Suspense");case Va:return qa("SuspenseList")}if(typeof u=="object")switch(u.$$typeof){case Nc:return Xa(u.render);case Ga:return Ya(u.type,h,y);case Fs:{var E=u,I=E._payload,H=E._init;try{return Ya(H(I),h,y)}catch{}}}return""}var cp={},Qd=r.ReactDebugCurrentFrame;function jc(u){if(u){var h=u._owner,y=Ya(u.type,u._source,h?h.type:null);Qd.setExtraStackFrame(y)}else Qd.setExtraStackFrame(null)}function Bc(u,h,y,E,I){{var H=Function.call.bind($);for(var K in u)if(H(u,K)){var se=void 0;try{if(typeof u[K]!="function"){var be=Error((E||"React class")+": "+y+" type `"+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[K]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw be.name="Invariant Violation",be}se=u[K](h,K,E,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Pe){se=Pe}se&&!(se instanceof Error)&&(jc(I),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).",E||"React class",y,K,typeof se),jc(null)),se instanceof Error&&!(se.message in cp)&&(cp[se.message]=!0,jc(I),i("Failed %s type: %s",y,se.message),jc(null))}}}var zc;zc={};var Ja={};Object.freeze(Ja);function Za(u,h){{var y=u.contextTypes;if(!y)return Ja;var E={};for(var I in y)E[I]=h[I];{var H=Wt(u)||"Unknown";Bc(y,E,"context",H)}return E}}function up(u,h,y,E){{if(typeof u.getChildContext!="function"){{var I=Wt(h)||"Unknown";zc[I]||(zc[I]=!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.",I,I))}return y}var H=u.getChildContext();for(var K in H)if(!(K in E))throw new Error((Wt(h)||"Unknown")+'.getChildContext(): key "'+K+'" is not defined in childContextTypes.');{var se=Wt(h)||"Unknown";Bc(E,H,"child context",se)}return Ur({},y,H)}}var Fo;Fo={};var Hc=null,Qi=null;function ef(u){u.context._currentValue2=u.parentValue}function jo(u){u.context._currentValue2=u.value}function $c(u,h){if(u!==h){ef(u);var y=u.parent,E=h.parent;if(y===null){if(E!==null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.")}else{if(E===null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.");$c(y,E)}jo(h)}}function eo(u){ef(u);var h=u.parent;h!==null&&eo(h)}function Uc(u){var h=u.parent;h!==null&&Uc(h),jo(u)}function Wc(u,h){ef(u);var y=u.parent;if(y===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");y.depth===h.depth?$c(y,h):Wc(y,h)}function Qa(u,h){var y=h.parent;if(y===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");u.depth===y.depth?$c(u,y):Qa(u,y),jo(h)}function el(u){var h=Qi,y=u;h!==y&&(h===null?Uc(y):y===null?eo(h):h.depth===y.depth?$c(h,y):h.depth>y.depth?Wc(h,y):Qa(h,y),Qi=y)}function dp(u,h){var y;y=u._currentValue2,u._currentValue2=h,u._currentRenderer2!==void 0&&u._currentRenderer2!==null&&u._currentRenderer2!==Fo&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer2=Fo;var E=Qi,I={parent:E,depth:E===null?0:E.depth+1,context:u,parentValue:y,value:h};return Qi=I,I}function fp(u){var h=Qi;if(h===null)throw new Error("Tried to pop a Context at the root of the app. This is a bug in React.");h.context!==u&&i("The parent context is not the expected context. This is probably a bug in React.");{var y=h.parentValue;y===Pc?h.context._currentValue2=h.context._defaultValue:h.context._currentValue2=y,u._currentRenderer2!==void 0&&u._currentRenderer2!==null&&u._currentRenderer2!==Fo&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer2=Fo}return Qi=h.parent}function hp(){return Qi}function to(u){var h=u._currentValue2;return h}function tf(u){return u._reactInternals}function Mv(u,h){u._reactInternals=h}var pp={},zs={},tl,rf,Vc,Gc,Kc,Hs,rl,nl,qc;{tl=new Set,rf=new Set,Vc=new Set,rl=new Set,Gc=new Set,nl=new Set,qc=new Set;var il=new Set;Hs=function(u,h){if(!(u===null||typeof u=="function")){var y=h+"_"+u;il.has(y)||(il.add(y),i("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",h,u))}},Kc=function(u,h){if(h===void 0){var y=Wt(u)||"Component";Gc.has(y)||(Gc.add(y),i("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",y))}}}function Xc(u,h){{var y=u.constructor,E=y&&Wt(y)||"ReactClass",I=E+"."+h;if(pp[I])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.
358
+
359
+ Please check the code for the %s component.`,h,h,E),pp[I]=!0}}var Yc={isMounted:function(u){return!1},enqueueSetState:function(u,h,y){var E=tf(u);E.queue===null?Xc(u,"setState"):(E.queue.push(h),y!=null&&Hs(y,"setState"))},enqueueReplaceState:function(u,h,y){var E=tf(u);E.replace=!0,E.queue=[h],y!=null&&Hs(y,"setState")},enqueueForceUpdate:function(u,h){var y=tf(u);y.queue===null?Xc(u,"forceUpdate"):h!=null&&Hs(h,"setState")}};function nf(u,h,y,E,I){var H=y(I,E);Kc(h,H);var K=H==null?E:Ur({},E,H);return K}function mp(u,h,y){var E=Ja,I=u.contextType;if("contextType"in u){var H=I===null||I!==void 0&&I.$$typeof===Mc&&I._context===void 0;if(!H&&!qc.has(u)){qc.add(u);var K="";I===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 I!="object"?K=" However, it is set to a "+typeof I+".":I.$$typeof===Oc?K=" Did you accidentally pass the Context.Provider instead?":I._context!==void 0?K=" Did you accidentally pass the Context.Consumer instead?":K=" However, it is set to an object with keys {"+Object.keys(I).join(", ")+"}.",i("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Wt(u)||"Component",K)}}typeof I=="object"&&I!==null?E=to(I):E=y;var se=new u(h,E);{if(typeof u.getDerivedStateFromProps=="function"&&(se.state===null||se.state===void 0)){var be=Wt(u)||"Component";tl.has(be)||(tl.add(be),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.",be,se.state===null?"null":"undefined",be))}if(typeof u.getDerivedStateFromProps=="function"||typeof se.getSnapshotBeforeUpdate=="function"){var Pe=null,je=null,Ke=null;if(typeof se.componentWillMount=="function"&&se.componentWillMount.__suppressDeprecationWarning!==!0?Pe="componentWillMount":typeof se.UNSAFE_componentWillMount=="function"&&(Pe="UNSAFE_componentWillMount"),typeof se.componentWillReceiveProps=="function"&&se.componentWillReceiveProps.__suppressDeprecationWarning!==!0?je="componentWillReceiveProps":typeof se.UNSAFE_componentWillReceiveProps=="function"&&(je="UNSAFE_componentWillReceiveProps"),typeof se.componentWillUpdate=="function"&&se.componentWillUpdate.__suppressDeprecationWarning!==!0?Ke="componentWillUpdate":typeof se.UNSAFE_componentWillUpdate=="function"&&(Ke="UNSAFE_componentWillUpdate"),Pe!==null||je!==null||Ke!==null){var st=Wt(u)||"Component",kt=typeof u.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Vc.has(st)||(Vc.add(st),i(`Unsafe legacy lifecycles will not be called for components using new component APIs.
360
+
361
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
362
+
363
+ The above lifecycles should be removed. Learn more about this warning here:
364
+ https://reactjs.org/link/unsafe-component-lifecycles`,st,kt,Pe!==null?`
365
+ `+Pe:"",je!==null?`
366
+ `+je:"",Ke!==null?`
367
+ `+Ke:""))}}}return se}function gp(u,h,y){{var E=Wt(h)||"Component",I=u.render;I||(h.prototype&&typeof h.prototype.render=="function"?i("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",E):i("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",E)),u.getInitialState&&!u.getInitialState.isReactClassApproved&&!u.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?",E),u.getDefaultProps&&!u.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.",E),u.propTypes&&i("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",E),u.contextType&&i("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",E),u.contextTypes&&i("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",E),h.contextType&&h.contextTypes&&!nl.has(h)&&(nl.add(h),i("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",E)),typeof u.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.",E),h.prototype&&h.prototype.isPureReactComponent&&typeof u.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.",Wt(h)||"A pure component"),typeof u.componentDidUnmount=="function"&&i("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",E),typeof u.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().",E),typeof u.componentWillRecieveProps=="function"&&i("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",E),typeof u.UNSAFE_componentWillRecieveProps=="function"&&i("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",E);var H=u.props!==y;u.props!==void 0&&H&&i("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",E,E),u.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.",E,E),typeof u.getSnapshotBeforeUpdate=="function"&&typeof u.componentDidUpdate!="function"&&!rf.has(h)&&(rf.add(h),i("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Wt(h))),typeof u.getDerivedStateFromProps=="function"&&i("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",E),typeof u.getDerivedStateFromError=="function"&&i("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",E),typeof h.getSnapshotBeforeUpdate=="function"&&i("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",E);var K=u.state;K&&(typeof K!="object"||vn(K))&&i("%s.state: must be set to an object or null",E),typeof u.getChildContext=="function"&&typeof h.childContextTypes!="object"&&i("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",E)}}function yp(u,h){var y=h.state;if(typeof h.componentWillMount=="function"){if(h.componentWillMount.__suppressDeprecationWarning!==!0){var E=Wt(u)||"Unknown";zs[E]||(n(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
368
+
369
+ * Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.
370
+
371
+ Please update the following components: %s`,E),zs[E]=!0)}h.componentWillMount()}typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&(i("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Wt(u)||"Component"),Yc.enqueueReplaceState(h,h.state,null))}function Nv(u,h,y,E){if(u.queue!==null&&u.queue.length>0){var I=u.queue,H=u.replace;if(u.queue=null,u.replace=!1,H&&I.length===1)h.state=I[0];else{for(var K=H?I[0]:h.state,se=!0,be=H?1:0;be<I.length;be++){var Pe=I[be],je=typeof Pe=="function"?Pe.call(h,K,y,E):Pe;je!=null&&(se?(se=!1,K=Ur({},K,je)):Ur(K,je))}h.state=K}}else u.queue=null}function vp(u,h,y,E){gp(u,h,y);var I=u.state!==void 0?u.state:null;u.updater=Yc,u.props=y,u.state=I;var H={queue:[],replace:!1};Mv(u,H);var K=h.contextType;if(typeof K=="object"&&K!==null?u.context=to(K):u.context=E,u.state===y){var se=Wt(h)||"Component";rl.has(se)||(rl.add(se),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.",se))}var be=h.getDerivedStateFromProps;typeof be=="function"&&(u.state=nf(u,h,be,I,y)),typeof h.getDerivedStateFromProps!="function"&&typeof u.getSnapshotBeforeUpdate!="function"&&(typeof u.UNSAFE_componentWillMount=="function"||typeof u.componentWillMount=="function")&&(yp(h,u),Nv(H,u,y,E))}var Dv={id:1,overflow:""};function Pv(u){var h=u.overflow,y=u.id,E=y&~Lv(y);return E.toString(32)+h}function of(u,h,y){var E=u.id,I=u.overflow,H=ol(E)-1,K=E&~(1<<H),se=y+1,be=ol(h)+H;if(be>30){var Pe=H-H%5,je=(1<<Pe)-1,Ke=(K&je).toString(32),st=K>>Pe,kt=H-Pe,mr=ol(h)+kt,Vo=se<<kt,Go=Vo|st,Ni=Ke+I;return{id:1<<mr|Go,overflow:Ni}}else{var qs=se<<H,pb=qs|K,xP=I;return{id:1<<be|pb,overflow:xP}}}function ol(u){return 32-Fv(u)}function Lv(u){return 1<<ol(u)-1}var Fv=Math.clz32?Math.clz32:jv,sf=Math.log,Jc=Math.LN2;function jv(u){var h=u>>>0;return h===0?32:31-(sf(h)/Jc|0)|0}function Bv(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var zv=typeof Object.is=="function"?Object.is:Bv,Ri=null,af=null,Zc=null,Lt=null,ln=!1,$s=!1,Bo=0,xt=null,ro=0,Qc=25,cn=!1,un;function li(){if(Ri===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:
372
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
373
+ 2. You might be breaking the Rules of Hooks
374
+ 3. You might have more than one copy of React in the same app
375
+ 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"),Ri}function Hv(u,h){if(h===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.",un),!1;u.length!==h.length&&i(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
376
+
377
+ Previous: %s
378
+ Incoming: %s`,un,"["+u.join(", ")+"]","["+h.join(", ")+"]");for(var y=0;y<h.length&&y<u.length;y++)if(!zv(u[y],h[y]))return!1;return!0}function jn(){if(ro>0)throw new Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function no(){return Lt===null?Zc===null?(ln=!1,Zc=Lt=jn()):(ln=!0,Lt=Zc):Lt.next===null?(ln=!1,Lt=Lt.next=jn()):(ln=!0,Lt=Lt.next),Lt}function zo(u,h){Ri=h,af=u,cn=!1,Bo=0}function $v(u,h,y,E){for(;$s;)$s=!1,Bo=0,ro+=1,Lt=null,y=u(h,E);return sl(),y}function lf(){var u=Bo!==0;return u}function sl(){cn=!1,Ri=null,af=null,$s=!1,Zc=null,ro=0,xt=null,Lt=null}function Uv(u){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()."),to(u)}function Wv(u){return un="useContext",li(),to(u)}function eu(u,h){return typeof h=="function"?h(u):h}function cf(u){return un="useState",bp(eu,u)}function bp(u,h,y){if(u!==eu&&(un="useReducer"),Ri=li(),Lt=no(),ln){var E=Lt.queue,I=E.dispatch;if(xt!==null){var H=xt.get(E);if(H!==void 0){xt.delete(E);var K=Lt.memoizedState,se=H;do{var be=se.action;cn=!0,K=u(K,be),cn=!1,se=se.next}while(se!==null);return Lt.memoizedState=K,[K,I]}}return[Lt.memoizedState,I]}else{cn=!0;var Pe;u===eu?Pe=typeof h=="function"?h():h:Pe=y!==void 0?y(h):h,cn=!1,Lt.memoizedState=Pe;var je=Lt.queue={last:null,dispatch:null},Ke=je.dispatch=xp.bind(null,Ri,je);return[Lt.memoizedState,Ke]}}function wp(u,h){Ri=li(),Lt=no();var y=h===void 0?null:h;if(Lt!==null){var E=Lt.memoizedState;if(E!==null&&y!==null){var I=E[1];if(Hv(y,I))return E[0]}}cn=!0;var H=u();return cn=!1,Lt.memoizedState=[H,y],H}function uf(u){Ri=li(),Lt=no();var h=Lt.memoizedState;if(h===null){var y={current:u};return Object.seal(y),Lt.memoizedState=y,y}else return h}function Vv(u,h){un="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 xp(u,h,y){if(ro>=Qc)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(u===Ri){$s=!0;var E={action:y,next:null};xt===null&&(xt=new Map);var I=xt.get(h);if(I===void 0)xt.set(h,E);else{for(var H=I;H.next!==null;)H=H.next;H.next=E}}}function Sp(u,h){return wp(function(){return u},h)}function Gv(u,h,y){return li(),h(u._source)}function Kv(u,h,y){if(y===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return y()}function qv(u){return li(),u}function Xv(){throw new Error("startTransition cannot be called during server rendering.")}function Yv(){return li(),[!1,Xv]}function Jv(){var u=af,h=Pv(u.treeContext),y=df;if(y===null)throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");var E=Bo++;return Zt(y,h,E)}function tu(){}var kp={readContext:Uv,useContext:Wv,useMemo:wp,useReducer:bp,useRef:uf,useState:cf,useInsertionEffect:tu,useLayoutEffect:Vv,useCallback:Sp,useImperativeHandle:tu,useEffect:tu,useDebugValue:tu,useDeferredValue:qv,useTransition:Yv,useId:Jv,useMutableSource:Gv,useSyncExternalStore:Kv},df=null;function _p(u){df=u}function ru(u){try{var h="",y=u;do{switch(y.tag){case 0:h+=qa(y.type,null,null);break;case 1:h+=Xa(y.type,null,null);break;case 2:h+=Zd(y.type,null,null);break}y=y.parent}while(y);return h}catch(E){return`
379
+ Error generating stack: `+E.message+`
380
+ `+E.stack}}var nu=r.ReactCurrentDispatcher,al=r.ReactDebugCurrentFrame,iu=0,Us=1,ou=2,su=3,au=4,Ws=0,ff=1,Ho=2,Ep=12800;function Zv(u){return console.error(u),null}function Vs(){}function Gs(u,h,y,E,I,H,K,se,be){var Pe=[],je=new Set,Ke={destination:null,responseState:h,progressiveChunkSize:E===void 0?Ep:E,status:Ws,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:je,pingedTasks:Pe,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:I===void 0?Zv:I,onAllReady:Vs,onShellReady:K===void 0?Vs:K,onShellError:Vs,onFatalError:Vs},st=lu(Ke,0,null,y,!1,!1);st.parentFlushed=!0;var kt=$o(Ke,u,null,st,je,Ja,Hc,Dv);return Pe.push(kt),Ke}function Qv(u,h){var y=u.pingedTasks;y.push(h),y.length===1&&s(function(){return Sf(u)})}function eb(u,h){return{id:ks,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:h,errorDigest:null}}function $o(u,h,y,E,I,H,K,se){u.allPendingTasks++,y===null?u.pendingRootTasks++:y.pendingTasks++;var be={node:h,ping:function(){return Qv(u,be)},blockedBoundary:y,blockedSegment:E,abortSet:I,legacyContext:H,context:K,treeContext:se};return be.componentStack=null,I.add(be),be}function lu(u,h,y,E,I,H){return{status:iu,id:-1,index:h,parentFlushed:!1,chunks:[],children:[],formatContext:E,boundary:y,lastPushedText:I,textEmbedded:H}}var Ii=null;function hf(){return Ii===null||Ii.componentStack===null?"":ru(Ii.componentStack)}function Uo(u,h){u.componentStack={tag:0,parent:u.componentStack,type:h}}function ll(u,h){u.componentStack={tag:1,parent:u.componentStack,type:h}}function Oi(u,h){u.componentStack={tag:2,parent:u.componentStack,type:h}}function ci(u){u.componentStack===null?i("Unexpectedly popped too many stack frames. This is a bug in React."):u.componentStack=u.componentStack.parent}var Mi=null;function cu(u,h){{var y;typeof h=="string"?y=h:h&&typeof h.message=="string"?y=h.message:y=String(h);var E=Mi||hf();Mi=null,u.errorMessage=y,u.errorComponentStack=E}}function cl(u,h){var y=u.onError(h);if(y!=null&&typeof y!="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 y+'" instead');return y}function Bn(u,h){var y=u.onShellError;y(h);var E=u.onFatalError;E(h),u.destination!==null?(u.status=Ho,g(u.destination,h)):(u.status=ff,u.fatalError=h)}function ul(u,h,y){Uo(h,"Suspense");var E=h.blockedBoundary,I=h.blockedSegment,H=y.fallback,K=y.children,se=new Set,be=eb(u,se),Pe=I.chunks.length,je=lu(u,Pe,be,I.formatContext,!1,!1);I.children.push(je),I.lastPushedText=!1;var Ke=lu(u,0,null,I.formatContext,!1,!1);Ke.parentFlushed=!0,h.blockedBoundary=be,h.blockedSegment=Ke;try{if(Pr(u,h,K),rp(Ke.chunks,u.responseState,Ke.lastPushedText,Ke.textEmbedded),Ke.status=Us,Ks(be,Ke),be.pendingTasks===0){ci(h);return}}catch(kt){Ke.status=au,be.forceClientRender=!0,be.errorDigest=cl(u,kt),cu(be,kt)}finally{h.blockedBoundary=E,h.blockedSegment=I}var st=$o(u,H,E,je,se,h.legacyContext,h.context,h.treeContext);st.componentStack=h.componentStack,u.pingedTasks.push(st),ci(h)}function pf(u,h,y,E){Uo(h,y);var I=h.blockedSegment,H=Fn(I.chunks,y,E,u.responseState,I.formatContext);I.lastPushedText=!1;var K=I.formatContext;I.formatContext=Ss(K,y,E),Pr(u,h,H),I.formatContext=K,It(I.chunks,y),I.lastPushedText=!1,ci(h)}function dl(u){return u.prototype&&u.prototype.isReactComponent}function fl(u,h,y,E,I){var H={};zo(h,H);var K=y(E,I);return $v(y,E,K,I)}function Cp(u,h,y,E,I){var H=y.render();y.props!==I&&(gf||i("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Wt(E)||"a component"),gf=!0);{var K=E.childContextTypes;if(K!=null){var se=h.legacyContext,be=up(y,E,se,K);h.legacyContext=be,dn(u,h,H),h.legacyContext=se;return}}dn(u,h,H)}function tb(u,h,y,E){Oi(h,y);var I=Za(y,h.legacyContext),H=mp(y,E,I);vp(H,y,E,I),Cp(u,h,H,y,E),ci(h)}var Tp={},hl={},mf={},Ap={},gf=!1,pl={},yf=!1,vf=!1,bf=!1;function Rp(u,h,y,E){var I;if(I=Za(y,h.legacyContext),ll(h,y),y.prototype&&typeof y.prototype.render=="function"){var H=Wt(y)||"Unknown";Tp[H]||(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.",H,H),Tp[H]=!0)}var K=fl(u,h,y,E,I),se=lf();if(typeof K=="object"&&K!==null&&typeof K.render=="function"&&K.$$typeof===void 0){var be=Wt(y)||"Unknown";hl[be]||(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.",be,be,be),hl[be]=!0)}if(typeof K=="object"&&K!==null&&typeof K.render=="function"&&K.$$typeof===void 0){{var Pe=Wt(y)||"Unknown";hl[Pe]||(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.",Pe,Pe,Pe),hl[Pe]=!0)}vp(K,y,E,I),Cp(u,h,K,y,E)}else if(Ip(y),se){var je=h.treeContext,Ke=1,st=0;h.treeContext=of(je,Ke,st);try{dn(u,h,K)}finally{h.treeContext=je}}else dn(u,h,K);ci(h)}function Ip(u){{if(u&&u.childContextTypes&&i("%s(...): childContextTypes cannot be defined on a function component.",u.displayName||u.name||"Component"),u.defaultProps!==void 0){var h=Wt(u)||"Unknown";pl[h]||(i("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",h),pl[h]=!0)}if(typeof u.getDerivedStateFromProps=="function"){var y=Wt(u)||"Unknown";Ap[y]||(i("%s: Function components do not support getDerivedStateFromProps.",y),Ap[y]=!0)}if(typeof u.contextType=="object"&&u.contextType!==null){var E=Wt(u)||"Unknown";mf[E]||(i("%s: Function components do not support contextType.",E),mf[E]=!0)}}}function wf(u,h){if(u&&u.defaultProps){var y=Ur({},h),E=u.defaultProps;for(var I in E)y[I]===void 0&&(y[I]=E[I]);return y}return h}function Op(u,h,y,E,I){ll(h,y.render);var H=fl(u,h,y.render,E,I),K=lf();if(K){var se=h.treeContext,be=1,Pe=0;h.treeContext=of(se,be,Pe);try{dn(u,h,H)}finally{h.treeContext=se}}else dn(u,h,H);ci(h)}function rb(u,h,y,E,I){var H=y.type,K=wf(H,E);xf(u,h,H,K,I)}function nb(u,h,y,E){y._context===void 0?y!==y.Consumer&&(bf||(bf=!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?"))):y=y._context;var I=E.children;typeof I!="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 H=to(y),K=I(H);dn(u,h,K)}function Mp(u,h,y,E){var I=y._context,H=E.value,K=E.children,se;se=h.context,h.context=dp(I,H),dn(u,h,K),h.context=fp(I),se!==h.context&&i("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function ib(u,h,y,E,I){Uo(h,"Lazy");var H=y._payload,K=y._init,se=K(H),be=wf(se,E);xf(u,h,se,be,I),ci(h)}function xf(u,h,y,E,I){if(typeof y=="function")if(dl(y)){tb(u,h,y,E);return}else{Rp(u,h,y,E);return}if(typeof y=="string"){pf(u,h,y,E);return}switch(y){case Ud:case $d:case an:case ip:case Ic:{dn(u,h,E.children);return}case Va:{Uo(h,"SuspenseList"),dn(u,h,E.children),ci(h);return}case Hd:throw new Error("ReactDOMServer does not yet support scope components.");case Dc:{ul(u,h,E);return}}if(typeof y=="object"&&y!==null)switch(y.$$typeof){case Nc:{Op(u,h,y,E,I);return}case Ga:{rb(u,h,y,E,I);return}case Oc:{Mp(u,h,y,E);return}case Mc:{nb(u,h,y,E);return}case Fs:{ib(u,h,y,E);return}}var H="";throw(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(H+=" 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: "+(y==null?y:typeof y)+"."+H))}function ob(u,h){typeof Symbol=="function"&&u[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),u.entries===h&&(vf||i("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),vf=!0)}function dn(u,h,y){try{return sb(u,h,y)}catch(E){throw typeof E=="object"&&E!==null&&typeof E.then=="function"||(Mi=Mi!==null?Mi:hf()),E}}function sb(u,h,y){if(h.node=y,typeof y=="object"&&y!==null){switch(y.$$typeof){case Tv:{var E=y,I=E.type,H=E.props,K=E.ref;xf(u,h,I,H,K);return}case np: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 Fs:{var se=y,be=se._payload,Pe=se._init,je;try{je=Pe(be)}catch(qs){throw typeof qs=="object"&&qs!==null&&typeof qs.then=="function"&&Uo(h,"Lazy"),qs}dn(u,h,je);return}}if(vn(y)){uu(u,h,y);return}var Ke=Rv(y);if(Ke){ob(y,Ke);var st=Ke.call(y);if(st){var kt=st.next();if(!kt.done){var mr=[];do mr.push(kt.value),kt=st.next();while(!kt.done);uu(u,h,mr);return}return}}var Vo=Object.prototype.toString.call(y);throw new Error("Objects are not valid as a React child (found: "+(Vo==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":Vo)+"). If you meant to render a collection of children, use an array instead.")}if(typeof y=="string"){var Go=h.blockedSegment;Go.lastPushedText=tp(h.blockedSegment.chunks,y,u.responseState,Go.lastPushedText);return}if(typeof y=="number"){var Ni=h.blockedSegment;Ni.lastPushedText=tp(h.blockedSegment.chunks,""+y,u.responseState,Ni.lastPushedText);return}typeof y=="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 uu(u,h,y){for(var E=y.length,I=0;I<E;I++){var H=h.treeContext;h.treeContext=of(H,E,I);try{Pr(u,h,y[I])}finally{h.treeContext=H}}}function ab(u,h,y){var E=h.blockedSegment,I=E.chunks.length,H=lu(u,I,null,E.formatContext,E.lastPushedText,!0);E.children.push(H),E.lastPushedText=!1;var K=$o(u,h.node,h.blockedBoundary,H,h.abortSet,h.legacyContext,h.context,h.treeContext);h.componentStack!==null&&(K.componentStack=h.componentStack.parent);var se=K.ping;y.then(se,se)}function Pr(u,h,y){var E=h.blockedSegment.formatContext,I=h.legacyContext,H=h.context,K=null;K=h.componentStack;try{return dn(u,h,y)}catch(se){if(sl(),typeof se=="object"&&se!==null&&typeof se.then=="function"){ab(u,h,se),h.blockedSegment.formatContext=E,h.legacyContext=I,h.context=H,el(H),h.componentStack=K;return}else throw h.blockedSegment.formatContext=E,h.legacyContext=I,h.context=H,el(H),h.componentStack=K,se}}function lb(u,h,y,E){var I=cl(u,E);if(h===null?Bn(u,E):(h.pendingTasks--,h.forceClientRender||(h.forceClientRender=!0,h.errorDigest=I,cu(h,E),h.parentFlushed&&u.clientRenderedBoundaries.push(h))),u.allPendingTasks--,u.allPendingTasks===0){var H=u.onAllReady;H()}}function Np(u){var h=this,y=u.blockedBoundary,E=u.blockedSegment;E.status=su,Pp(h,y,E)}function Dp(u,h,y){var E=u.blockedBoundary,I=u.blockedSegment;if(I.status=su,E===null)h.allPendingTasks--,h.status!==Ho&&(h.status=Ho,h.destination!==null&&f(h.destination));else{if(E.pendingTasks--,!E.forceClientRender){E.forceClientRender=!0;var H=y===void 0?new Error("The render was aborted by the server without a reason."):y;E.errorDigest=h.onError(H);{var K="The server did not finish this Suspense boundary: ";H&&typeof H.message=="string"?H=K+H.message:H=K+String(H);var se=Ii;Ii=u;try{cu(E,H)}finally{Ii=se}}E.parentFlushed&&h.clientRenderedBoundaries.push(E)}if(E.fallbackAbortableTasks.forEach(function(Pe){return Dp(Pe,h,y)}),E.fallbackAbortableTasks.clear(),h.allPendingTasks--,h.allPendingTasks===0){var be=h.onAllReady;be()}}}function Ks(u,h){if(h.chunks.length===0&&h.children.length===1&&h.children[0].boundary===null){var y=h.children[0];y.id=h.id,y.parentFlushed=!0,y.status===Us&&Ks(u,y)}else{var E=u.completedSegments;E.push(h)}}function Pp(u,h,y){if(h===null){if(y.parentFlushed){if(u.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");u.completedRootSegment=y}if(u.pendingRootTasks--,u.pendingRootTasks===0){u.onShellError=Vs;var E=u.onShellReady;E()}}else if(h.pendingTasks--,!h.forceClientRender){if(h.pendingTasks===0)y.parentFlushed&&y.status===Us&&Ks(h,y),h.parentFlushed&&u.completedBoundaries.push(h),h.fallbackAbortableTasks.forEach(Np,u),h.fallbackAbortableTasks.clear();else if(y.parentFlushed&&y.status===Us){Ks(h,y);var I=h.completedSegments;I.length===1&&h.parentFlushed&&u.partialBoundaries.push(h)}}if(u.allPendingTasks--,u.allPendingTasks===0){var H=u.onAllReady;H()}}function cb(u,h){var y=h.blockedSegment;if(y.status===iu){el(h.context);var E=null;E=Ii,Ii=h;try{dn(u,h,h.node),rp(y.chunks,u.responseState,y.lastPushedText,y.textEmbedded),h.abortSet.delete(h),y.status=Us,Pp(u,h.blockedBoundary,y)}catch(H){if(sl(),typeof H=="object"&&H!==null&&typeof H.then=="function"){var I=h.ping;H.then(I,I)}else h.abortSet.delete(h),y.status=au,lb(u,h.blockedBoundary,y,H)}finally{Ii=E}}}function Sf(u){if(u.status!==Ho){var h=hp(),y=nu.current;nu.current=kp;var E;E=al.getCurrentStack,al.getCurrentStack=hf;var I=df;_p(u.responseState);try{var H=u.pingedTasks,K;for(K=0;K<H.length;K++){var se=H[K];cb(u,se)}H.splice(0,K),u.destination!==null&&fu(u,u.destination)}catch(be){cl(u,be),Bn(u,be)}finally{_p(I),nu.current=y,al.getCurrentStack=E,y===kp&&el(h)}}}function Wo(u,h,y){switch(y.parentFlushed=!0,y.status){case iu:{var E=y.id=u.nextSegmentId++;return y.lastPushedText=!1,y.textEmbedded=!1,si(h,u.responseState,E)}case Us:{y.status=ou;for(var I=!0,H=y.chunks,K=0,se=y.children,be=0;be<se.length;be++){for(var Pe=se[be];K<Pe.index;K++)l(h,H[K]);I=ml(u,h,Pe)}for(;K<H.length-1;K++)l(h,H[K]);return K<H.length&&(I=c(h,H[K])),I}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function ml(u,h,y){var E=y.boundary;if(E===null)return Wo(u,h,y);if(E.parentFlushed=!0,E.forceClientRender)return _v(h,u.responseState,E.errorDigest,E.errorMessage,E.errorComponentStack),Wo(u,h,y),Cv(h,u.responseState);if(E.pendingTasks>0){E.rootSegmentID=u.nextSegmentId++,E.completedSegments.length>0&&u.partialBoundaries.push(E);var I=E.id=Pn(u.responseState);return No(h,u.responseState,I),Wo(u,h,y),Ji(h,u.responseState)}else{if(E.byteSize>u.progressiveChunkSize)return E.rootSegmentID=u.nextSegmentId++,u.completedBoundaries.push(E),No(h,u.responseState,E.id),Wo(u,h,y),Ji(h,u.responseState);kv(h,u.responseState);var H=E.completedSegments;if(H.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var K=H[0];return ml(u,h,K),Ev(h,u.responseState)}}function ub(u,h,y){return bv(h,u.responseState,y.id,y.errorDigest,y.errorMessage,y.errorComponentStack)}function kf(u,h,y){return Wa(h,u.responseState,y.formatContext,y.id),ml(u,h,y),Ac(h,y.formatContext)}function gl(u,h,y){for(var E=y.completedSegments,I=0;I<E.length;I++){var H=E[I];Lp(u,h,y,H)}return E.length=0,Dr(h,u.responseState,y.id,y.rootSegmentID)}function du(u,h,y){for(var E=y.completedSegments,I=0;I<E.length;I++){var H=E[I];if(!Lp(u,h,y,H))return I++,E.splice(0,I),!1}return E.splice(0,I),!0}function Lp(u,h,y,E){if(E.status===ou)return!0;var I=E.id;if(I===-1){var H=E.id=y.rootSegmentID;if(H===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return kf(u,h,E)}else return kf(u,h,E),Ue(h,u.responseState,I)}function fu(u,h){try{var y=u.completedRootSegment;y!==null&&u.pendingRootTasks===0&&(ml(u,h,y),u.completedRootSegment=null,Ti(h,u.responseState));var E=u.clientRenderedBoundaries,I;for(I=0;I<E.length;I++){var H=E[I];if(!ub(u,h,H)){u.destination=null,I++,E.splice(0,I);return}}E.splice(0,I);var K=u.completedBoundaries;for(I=0;I<K.length;I++){var se=K[I];if(!gl(u,h,se)){u.destination=null,I++,K.splice(0,I);return}}K.splice(0,I);var be=u.partialBoundaries;for(I=0;I<be.length;I++){var Pe=be[I];if(!du(u,h,Pe)){u.destination=null,I++,be.splice(0,I);return}}be.splice(0,I);var je=u.completedBoundaries;for(I=0;I<je.length;I++){var Ke=je[I];if(!gl(u,h,Ke)){u.destination=null,I++,je.splice(0,I);return}}je.splice(0,I)}finally{u.allPendingTasks===0&&u.pingedTasks.length===0&&u.clientRenderedBoundaries.length===0&&u.completedBoundaries.length===0&&(u.abortableTasks.size!==0&&i("There was still abortable task at the root when we closed. This is a bug in React."),f(h))}}function Fp(u){s(function(){return Sf(u)})}function db(u,h){if(u.status===ff){u.status=Ho,g(h,u.fatalError);return}if(u.status!==Ho&&u.destination===null){u.destination=h;try{fu(u,h)}catch(y){cl(u,y),Bn(u,y)}}}function jp(u,h){try{var y=u.abortableTasks;y.forEach(function(E){return Dp(E,u,h)}),y.clear(),u.destination!==null&&fu(u,u.destination)}catch(E){cl(u,E),Bn(u,E)}}function _f(){}function Bp(u,h,y,E){var I=!1,H=null,K="",se={push:function(Ke){return Ke!==null&&(K+=Ke),!0},destroy:function(Ke){I=!0,H=Ke}},be=!1;function Pe(){be=!0}var je=Gs(u,xv(y,h?h.identifierPrefix:void 0),Sv(),1/0,_f,void 0,Pe);if(Fp(je),jp(je,E),db(je,se),I)throw H;if(!be)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 K}function fb(u,h){return Bp(u,h,!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 zp(u,h){return Bp(u,h,!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 hb(){throw new Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.")}function v(){throw new Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.")}kl.renderToNodeStream=hb,kl.renderToStaticMarkup=zp,kl.renderToStaticNodeStream=v,kl.renderToString=fb,kl.version=e}()),kl}var Am={};/**
381
+ * @license React
382
+ * react-dom-server.browser.development.js
383
+ *
384
+ * Copyright (c) Facebook, Inc. and its affiliates.
385
+ *
386
+ * This source code is licensed under the MIT license found in the
387
+ * LICENSE file in the root directory of this source tree.
388
+ */var kR;function ple(){return kR||(kR=1,process.env.NODE_ENV!=="production"&&function(){var t=J,e="18.3.1",r=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(v){{for(var u=arguments.length,h=new Array(u>1?u-1:0),y=1;y<u;y++)h[y-1]=arguments[y];o("warn",v,h)}}function i(v){{for(var u=arguments.length,h=new Array(u>1?u-1:0),y=1;y<u;y++)h[y-1]=arguments[y];o("error",v,h)}}function o(v,u,h){{var y=r.ReactDebugCurrentFrame,E=y.getStackAddendum();E!==""&&(u+="%s",h=h.concat([E]));var I=h.map(function(H){return String(H)});I.unshift("Warning: "+u),Function.prototype.apply.call(console[v],console,I)}}function s(v){v()}var a=512,l=null,c=0;function d(v){l=new Uint8Array(a),c=0}function f(v,u){if(u.length!==0){if(u.length>a){c>0&&(v.enqueue(new Uint8Array(l.buffer,0,c)),l=new Uint8Array(a),c=0),v.enqueue(u);return}var h=u,y=l.length-c;y<h.length&&(y===0?v.enqueue(l):(l.set(h.subarray(0,y),c),v.enqueue(l),h=h.subarray(y)),l=new Uint8Array(a),c=0),l.set(h,c),c+=h.length}}function p(v,u){return f(v,u),!0}function m(v){l&&c>0&&(v.enqueue(new Uint8Array(l.buffer,0,c)),l=null,c=0)}function g(v){v.close()}var b=new TextEncoder;function S(v){return b.encode(v)}function w(v){return b.encode(v)}function T(v,u){typeof v.error=="function"?v.error(u):v.close()}function M(v){{var u=typeof Symbol=="function"&&Symbol.toStringTag,h=u&&v[Symbol.toStringTag]||v.constructor.name||"Object";return h}}function j(v){try{return $(v),!1}catch{return!0}}function $(v){return""+v}function W(v,u){if(j(v))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,M(v)),$(v)}function Y(v,u){if(j(v))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,M(v)),$(v)}function ee(v){if(j(v))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.",M(v)),$(v)}var P=Object.prototype.hasOwnProperty,fe=0,de=1,U=2,ne=3,R=4,le=5,Ce=6,he=":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",Fe=he+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ye=new RegExp("^["+he+"]["+Fe+"]*$"),ze={},ue={};function V(v){return P.call(ue,v)?!0:P.call(ze,v)?!1:ye.test(v)?(ue[v]=!0,!0):(ze[v]=!0,i("Invalid attribute name: `%s`",v),!1)}function me(v,u,h,y){if(h!==null&&h.type===fe)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":{if(h!==null)return!h.acceptsBooleans;var E=v.toLowerCase().slice(0,5);return E!=="data-"&&E!=="aria-"}default:return!1}}function ge(v){return ce.hasOwnProperty(v)?ce[v]:null}function ke(v,u,h,y,E,I,H){this.acceptsBooleans=u===U||u===ne||u===R,this.attributeName=y,this.attributeNamespace=E,this.mustUseProperty=h,this.propertyName=v,this.type=u,this.sanitizeURL=I,this.removeEmptyString=H}var ce={},L=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];L.forEach(function(v){ce[v]=new ke(v,fe,!1,v,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(v){var u=v[0],h=v[1];ce[u]=new ke(u,de,!1,h,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(v){ce[v]=new ke(v,U,!1,v.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(v){ce[v]=new ke(v,U,!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"].forEach(function(v){ce[v]=new ke(v,ne,!1,v.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(v){ce[v]=new ke(v,ne,!0,v,null,!1,!1)}),["capture","download"].forEach(function(v){ce[v]=new ke(v,R,!1,v,null,!1,!1)}),["cols","rows","size","span"].forEach(function(v){ce[v]=new ke(v,Ce,!1,v,null,!1,!1)}),["rowSpan","start"].forEach(function(v){ce[v]=new ke(v,le,!1,v.toLowerCase(),null,!1,!1)});var D=/[\-\:]([a-z])/g,ae=function(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"].forEach(function(v){var u=v.replace(D,ae);ce[u]=new ke(u,de,!1,v,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(v){var u=v.replace(D,ae);ce[u]=new ke(u,de,!1,v,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(v){var u=v.replace(D,ae);ce[u]=new ke(u,de,!1,v,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(v){ce[v]=new ke(v,de,!1,v.toLowerCase(),null,!1,!1)});var ie="xlinkHref";ce[ie]=new ke("xlinkHref",de,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(v){ce[v]=new ke(v,de,!1,v.toLowerCase(),null,!0,!0)});var q={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 Z(v,u){return v+u.charAt(0).toUpperCase()+u.substring(1)}var we=["Webkit","ms","Moz","O"];Object.keys(q).forEach(function(v){we.forEach(function(u){q[Z(u,v)]=q[v]})});var O={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function xe(v,u){O[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 F(v,u){if(v.indexOf("-")===-1)return typeof u.is=="string";switch(v){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 k={"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},_={},N=new RegExp("^(aria)-["+Fe+"]*$"),Q=new RegExp("^(aria)[A-Z]["+Fe+"]*$");function pe(v,u){{if(P.call(_,u)&&_[u])return!0;if(Q.test(u)){var h="aria-"+u.slice(4).toLowerCase(),y=k.hasOwnProperty(h)?h:null;if(y==null)return i("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",u),_[u]=!0,!0;if(u!==y)return i("Invalid ARIA attribute `%s`. Did you mean `%s`?",u,y),_[u]=!0,!0}if(N.test(u)){var E=u.toLowerCase(),I=k.hasOwnProperty(E)?E:null;if(I==null)return _[u]=!0,!1;if(u!==I)return i("Unknown ARIA attribute `%s`. Did you mean `%s`?",u,I),_[u]=!0,!0}}return!0}function oe(v,u){{var h=[];for(var y in u){var E=pe(v,y);E||h.push(y)}var I=h.map(function(H){return"`"+H+"`"}).join(", ");h.length===1?i("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",I,v):h.length>1&&i("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",I,v)}}function Re(v,u){F(v,u)||oe(v,u)}var Ne=!1;function De(v,u){{if(v!=="input"&&v!=="textarea"&&v!=="select")return;u!=null&&u.value===null&&!Ne&&(Ne=!0,v==="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.",v):i("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",v))}}var We={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"},Je=function(){};{var Ye={},Gt=/^on./,Ar=/^on[^A-Z]/,pr=new RegExp("^(aria)-["+Fe+"]*$"),en=new RegExp("^(aria)[A-Z]["+Fe+"]*$");Je=function(v,u,h,y){if(P.call(Ye,u)&&Ye[u])return!0;var E=u.toLowerCase();if(E==="onfocusin"||E==="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."),Ye[u]=!0,!0;if(y!=null){var I=y.registrationNameDependencies,H=y.possibleRegistrationNames;if(I.hasOwnProperty(u))return!0;var K=H.hasOwnProperty(E)?H[E]:null;if(K!=null)return i("Invalid event handler property `%s`. Did you mean `%s`?",u,K),Ye[u]=!0,!0;if(Gt.test(u))return i("Unknown event handler property `%s`. It will be ignored.",u),Ye[u]=!0,!0}else if(Gt.test(u))return Ar.test(u)&&i("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",u),Ye[u]=!0,!0;if(pr.test(u)||en.test(u))return!0;if(E==="innerhtml")return i("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Ye[u]=!0,!0;if(E==="aria")return i("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Ye[u]=!0,!0;if(E==="is"&&h!==null&&h!==void 0&&typeof h!="string")return i("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof h),Ye[u]=!0,!0;if(typeof h=="number"&&isNaN(h))return i("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",u),Ye[u]=!0,!0;var se=ge(u),be=se!==null&&se.type===fe;if(We.hasOwnProperty(E)){var Pe=We[E];if(Pe!==u)return i("Invalid DOM property `%s`. Did you mean `%s`?",u,Pe),Ye[u]=!0,!0}else if(!be&&u!==E)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,E),Ye[u]=!0,!0;return typeof h=="boolean"&&me(u,h,se)?(h?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()}.',h,u,u,h,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.',h,u,u,h,u,u,u),Ye[u]=!0,!0):be?!0:me(u,h,se)?(Ye[u]=!0,!1):((h==="false"||h==="true")&&se!==null&&se.type===ne&&(i("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",h,u,h==="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,h),Ye[u]=!0),!0)}}var Ct=function(v,u,h){{var y=[];for(var E in u){var I=Je(v,E,u[E],h);I||y.push(E)}var H=y.map(function(K){return"`"+K+"`"}).join(", ");y.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 ",H,v):y.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 ",H,v)}};function Yn(v,u,h){F(v,u)||Ct(v,u,h)}var Nn=function(){};{var rr=/^(?:webkit|moz|o)[A-Z]/,Jn=/^-ms-/,$i=/-(.)/g,dr=/;\s*$/,Hr={},tn={},mt=!1,Rr=!1,Ui=function(v){return v.replace($i,function(u,h){return h.toUpperCase()})},ki=function(v){Hr.hasOwnProperty(v)&&Hr[v]||(Hr[v]=!0,i("Unsupported style property %s. Did you mean %s?",v,Ui(v.replace(Jn,"ms-"))))},yn=function(v){Hr.hasOwnProperty(v)&&Hr[v]||(Hr[v]=!0,i("Unsupported vendor-prefixed style property %s. Did you mean %s?",v,v.charAt(0).toUpperCase()+v.slice(1)))},Wi=function(v,u){tn.hasOwnProperty(u)&&tn[u]||(tn[u]=!0,i(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,v,u.replace(dr,"")))},Dn=function(v,u){mt||(mt=!0,i("`NaN` is an invalid value for the `%s` css style property.",v))},nr=function(v,u){Rr||(Rr=!0,i("`Infinity` is an invalid value for the `%s` css style property.",v))};Nn=function(v,u){v.indexOf("-")>-1?ki(v):rr.test(v)?yn(v):dr.test(u)&&Wi(v,u),typeof u=="number"&&(isNaN(u)?Dn(v,u):isFinite(u)||nr(v,u))}}var Ao=Nn,Ro=/["'&<>]/;function xs(v){ee(v);var u=""+v,h=Ro.exec(u);if(!h)return u;var y,E="",I,H=0;for(I=h.index;I<u.length;I++){switch(u.charCodeAt(I)){case 34:y="&quot;";break;case 38:y="&amp;";break;case 39:y="&#x27;";break;case 60:y="&lt;";break;case 62:y="&gt;";break;default:continue}H!==I&&(E+=u.substring(H,I)),H=I+1,E+=y}return H!==I?E+u.substring(H,I):E}function Jt(v){return typeof v=="boolean"||typeof v=="number"?""+v:xs(v)}var Io=/([A-Z])/g,Fa=/^ms-/;function ja(v){return v.replace(Io,"-$1").toLowerCase().replace(Fa,"-ms-")}var vn=/^[\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,Oo=!1;function Vi(v){!Oo&&vn.test(v)&&(Oo=!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(v)))}var Zn=Array.isArray;function Ir(v){return Zn(v)}var bn=w("<script>"),Gi=w("<\/script>"),Qn=w('<script src="'),ei=w('<script type="module" src="'),wn=w('" async=""><\/script>');function ti(v){return ee(v),(""+v).replace(Or,Ss)}var Or=/(<\/|<)(s)(cript)/gi,Ss=function(v,u,h,y){return""+u+(h==="s"?"\\u0073":"\\u0053")+y};function ks(v,u,h,y,E){var I=v===void 0?"":v,H=u===void 0?bn:w('<script nonce="'+Jt(u)+'">'),K=[];if(h!==void 0&&K.push(H,S(ti(h)),Gi),y!==void 0)for(var se=0;se<y.length;se++)K.push(Qn,S(Jt(y[se])),wn);if(E!==void 0)for(var be=0;be<E.length;be++)K.push(ei,S(Jt(E[be])),wn);return{bootstrapChunks:K,startInlineScript:H,placeholderPrefix:w(I+"P:"),segmentPrefix:w(I+"S:"),boundaryPrefix:I+"B:",idPrefix:I,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}var Pn=0,Zt=1,xn=2,Sn=3,ri=4,Ki=5,rn=6,kn=7;function gr(v,u){return{insertionMode:v,selectedValue:u}}function ni(v){var u=v==="http://www.w3.org/2000/svg"?xn:v==="http://www.w3.org/1998/Math/MathML"?Sn:Pn;return gr(u,null)}function _i(v,u,h){switch(u){case"select":return gr(Zt,h.value!=null?h.value:h.defaultValue);case"svg":return gr(xn,null);case"math":return gr(Sn,null);case"foreignObject":return gr(Zt,null);case"table":return gr(ri,null);case"thead":case"tbody":case"tfoot":return gr(Ki,null);case"colgroup":return gr(kn,null);case"tr":return gr(rn,null)}return v.insertionMode>=ri||v.insertionMode===Pn?gr(Zt,null):v}var qi=null;function $r(v){var u=v.nextSuspenseID++;return w(v.boundaryPrefix+u.toString(16))}function _n(v,u,h){var y=v.idPrefix,E=":"+y+"R"+u;return h>0&&(E+="H"+h.toString(32)),E+":"}function yr(v){return Jt(v)}var Xi=w("<!-- -->");function ar(v,u,h,y){return u===""?y:(y&&v.push(Xi),v.push(S(yr(u))),!0)}function Mr(v,u,h,y){h&&y&&v.push(Xi)}var C=new Map;function z(v){var u=C.get(v);if(u!==void 0)return u;var h=w(Jt(ja(v)));return C.set(v,h),h}var X=w(' style="'),re=w(":"),_e=w(";");function ve(v,u,h){if(typeof h!="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 y=!0;for(var E in h)if(P.call(h,E)){var I=h[E];if(!(I==null||typeof I=="boolean"||I==="")){var H=void 0,K=void 0,se=E.indexOf("--")===0;se?(H=S(Jt(E)),Y(I,E),K=S(Jt((""+I).trim()))):(Ao(E,I),H=z(E),typeof I=="number"?I!==0&&!P.call(q,E)?K=S(I+"px"):K=S(""+I):(Y(I,E),K=S(Jt((""+I).trim())))),y?(y=!1,v.push(X,H,re,K)):v.push(_e,H,re,K)}}y||v.push(Qe)}var Oe=w(" "),$e=w('="'),Qe=w('"'),nt=w('=""');function tt(v,u,h,y){switch(h){case"style":{ve(v,u,y);return}case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(h.length>2&&(h[0]==="o"||h[0]==="O")&&(h[1]==="n"||h[1]==="N"))){var E=ge(h);if(E!==null){switch(typeof y){case"function":case"symbol":return;case"boolean":if(!E.acceptsBooleans)return}var I=E.attributeName,H=S(I);switch(E.type){case ne:y&&v.push(Oe,H,nt);return;case R:y===!0?v.push(Oe,H,nt):y===!1||v.push(Oe,H,$e,S(Jt(y)),Qe);return;case le:isNaN(y)||v.push(Oe,H,$e,S(Jt(y)),Qe);break;case Ce:!isNaN(y)&&y>=1&&v.push(Oe,H,$e,S(Jt(y)),Qe);break;default:E.sanitizeURL&&(W(y,I),y=""+y,Vi(y)),v.push(Oe,H,$e,S(Jt(y)),Qe)}}else if(V(h)){switch(typeof y){case"function":case"symbol":return;case"boolean":{var K=h.toLowerCase().slice(0,5);if(K!=="data-"&&K!=="aria-")return}}v.push(Oe,S(h),$e,S(Jt(y)),Qe)}}}var wt=w(">"),vr=w("/>");function br(v,u,h){if(u!=null){if(h!=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 y=u.__html;y!=null&&(ee(y),v.push(S(""+y)))}}var wr=!1,ii=!1,En=!1,Yi=!1,oi=!1,Ei=!1,Ln=!1;function Ci(v,u){{var h=v[u];if(h!=null){var y=Ir(h);v.multiple&&!y?i("The `%s` prop supplied to <select> must be an array if `multiple` is true.",u):!v.multiple&&y&&i("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",u)}}}function Nd(v,u,h){xe("select",u),Ci(u,"value"),Ci(u,"defaultValue"),u.value!==void 0&&u.defaultValue!==void 0&&!En&&(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"),En=!0),v.push(nn("select"));var y=null,E=null;for(var I in u)if(P.call(u,I)){var H=u[I];if(H==null)continue;switch(I){case"children":y=H;break;case"dangerouslySetInnerHTML":E=H;break;case"defaultValue":case"value":break;default:tt(v,h,I,H);break}}return v.push(wt),br(v,E,y),y}function Dd(v){var u="";return t.Children.forEach(v,function(h){h!=null&&(u+=h,!oi&&typeof h!="string"&&typeof h!="number"&&(oi=!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 _s=w(' selected=""');function Cn(v,u,h,y){var E=y.selectedValue;v.push(nn("option"));var I=null,H=null,K=null,se=null;for(var be in u)if(P.call(u,be)){var Pe=u[be];if(Pe==null)continue;switch(be){case"children":I=Pe;break;case"selected":K=Pe,Ln||(i("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Ln=!0);break;case"dangerouslySetInnerHTML":se=Pe;break;case"value":H=Pe;default:tt(v,h,be,Pe);break}}if(E!=null){var je;if(H!==null?(W(H,"value"),je=""+H):(se!==null&&(Ei||(Ei=!0,i("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),je=Dd(I)),Ir(E))for(var Ke=0;Ke<E.length;Ke++){W(E[Ke],"value");var st=""+E[Ke];if(st===je){v.push(_s);break}}else W(E,"select.value"),""+E===je&&v.push(_s)}else K&&v.push(_s);return v.push(wt),br(v,se,I),I}function Pd(v,u,h){xe("input",u),u.checked!==void 0&&u.defaultChecked!==void 0&&!ii&&(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),ii=!0),u.value!==void 0&&u.defaultValue!==void 0&&!wr&&(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),wr=!0),v.push(nn("input"));var y=null,E=null,I=null,H=null;for(var K in u)if(P.call(u,K)){var se=u[K];if(se==null)continue;switch(K){case"children":case"dangerouslySetInnerHTML":throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"defaultChecked":H=se;break;case"defaultValue":E=se;break;case"checked":I=se;break;case"value":y=se;break;default:tt(v,h,K,se);break}}return I!==null?tt(v,h,"checked",I):H!==null&&tt(v,h,"checked",H),y!==null?tt(v,h,"value",y):E!==null&&tt(v,h,"value",E),v.push(vr),null}function Fn(v,u,h){xe("textarea",u),u.value!==void 0&&u.defaultValue!==void 0&&!Yi&&(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"),Yi=!0),v.push(nn("textarea"));var y=null,E=null,I=null;for(var H in u)if(P.call(u,H)){var K=u[H];if(K==null)continue;switch(H){case"children":I=K;break;case"value":y=K;break;case"defaultValue":E=K;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:tt(v,h,H,K);break}}if(y===null&&E!==null&&(y=E),v.push(wt),I!=null){if(i("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),y!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Ir(I)){if(I.length>1)throw new Error("<textarea> can only have at most one child.");ee(I[0]),y=""+I[0]}ee(I),y=""+I}return typeof y=="string"&&y[0]===`
389
+ `&&v.push(Ai),y!==null&&(W(y,"value"),v.push(S(yr(""+y)))),null}function Ba(v,u,h,y){v.push(nn(h));for(var E in u)if(P.call(u,E)){var I=u[E];if(I==null)continue;switch(E){case"children":case"dangerouslySetInnerHTML":throw new Error(h+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:tt(v,y,E,I);break}}return v.push(vr),null}function Es(v,u,h){v.push(nn("menuitem"));for(var y in u)if(P.call(u,y)){var E=u[y];if(E==null)continue;switch(y){case"children":case"dangerouslySetInnerHTML":throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:tt(v,h,y,E);break}}return v.push(wt),null}function It(v,u,h){v.push(nn("title"));var y=null;for(var E in u)if(P.call(u,E)){var I=u[E];if(I==null)continue;switch(E){case"children":y=I;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:tt(v,h,E,I);break}}v.push(wt);{var H=Array.isArray(y)&&y.length<2?y[0]||null:y;Array.isArray(y)&&y.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"):H!=null&&H.$$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"):H!=null&&typeof H!="string"&&typeof H!="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 y}function Ti(v,u,h,y){v.push(nn(h));var E=null,I=null;for(var H in u)if(P.call(u,H)){var K=u[H];if(K==null)continue;switch(H){case"children":E=K;break;case"dangerouslySetInnerHTML":I=K;break;default:tt(v,y,H,K);break}}return v.push(wt),br(v,I,E),typeof E=="string"?(v.push(S(yr(E))),null):E}function Cs(v,u,h,y){v.push(nn(h));var E=null,I=null;for(var H in u)if(P.call(u,H)){var K=u[H];if(K==null)continue;switch(H){case"children":E=K;break;case"dangerouslySetInnerHTML":I=K;break;case"style":ve(v,y,K);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:V(H)&&typeof K!="function"&&typeof K!="symbol"&&v.push(Oe,S(H),$e,S(Jt(K)),Qe);break}}return v.push(wt),br(v,I,E),E}var Ai=w(`
390
+ `);function si(v,u,h,y){v.push(nn(h));var E=null,I=null;for(var H in u)if(P.call(u,H)){var K=u[H];if(K==null)continue;switch(H){case"children":E=K;break;case"dangerouslySetInnerHTML":I=K;break;default:tt(v,y,H,K);break}}if(v.push(wt),I!=null){if(E!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof I!="object"||!("__html"in I))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 se=I.__html;se!=null&&(typeof se=="string"&&se.length>0&&se[0]===`
391
+ `?v.push(Ai,S(se)):(ee(se),v.push(S(""+se))))}return typeof E=="string"&&E[0]===`
392
+ `&&v.push(Ai),E}var Ts=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ai=new Map;function nn(v){var u=ai.get(v);if(u===void 0){if(!Ts.test(v))throw new Error("Invalid tag: "+v);u=w("<"+v),ai.set(v,u)}return u}var za=w("<!DOCTYPE html>");function Mo(v,u,h,y,E){switch(Re(u,h),De(u,h),Yn(u,h,null),!h.suppressContentEditableWarning&&h.contentEditable&&h.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."),E.insertionMode!==xn&&E.insertionMode!==Sn&&u.indexOf("-")===-1&&typeof h.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 Nd(v,h,y);case"option":return Cn(v,h,y,E);case"textarea":return Fn(v,h,y);case"input":return Pd(v,h,y);case"menuitem":return Es(v,h,y);case"title":return It(v,h,y);case"listing":case"pre":return si(v,h,u,y);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 Ba(v,h,u,y);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 Ti(v,h,u,y);case"html":return E.insertionMode===Pn&&v.push(za),Ti(v,h,u,y);default:return u.indexOf("-")===-1&&typeof h.is!="string"?Ti(v,h,u,y):Cs(v,h,u,y)}}var mc=w("</"),As=w(">");function gc(v,u,h){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:v.push(mc,S(u),As)}}function Ld(v,u){for(var h=u.bootstrapChunks,y=0;y<h.length-1;y++)f(v,h[y]);return y<h.length?p(v,h[y]):!0}var Fd=w('<template id="'),Rs=w('"></template>');function yc(v,u,h){f(v,Fd),f(v,u.placeholderPrefix);var y=S(h.toString(16));return f(v,y),p(v,Rs)}var No=w("<!--$-->"),Ha=w('<!--$?--><template id="'),jd=w('"></template>'),Ji=w("<!--$!-->"),$a=w("<!--/$-->"),Ua=w("<template"),Zi=w('"'),Do=w(' data-dgst="'),Is=w(' data-msg="'),vc=w(' data-stck="'),bc=w("></template>");function wc(v,u){return p(v,No)}function Os(v,u,h){if(f(v,Ha),h===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return f(v,h),p(v,jd)}function Nr(v,u,h,y,E){var I;return I=p(v,Ji),f(v,Ua),h&&(f(v,Do),f(v,S(Jt(h))),f(v,Zi)),y&&(f(v,Is),f(v,S(Jt(y))),f(v,Zi)),E&&(f(v,vc),f(v,S(Jt(E))),f(v,Zi)),I=p(v,bc),I}function xc(v,u){return p(v,$a)}function Ms(v,u){return p(v,$a)}function Bd(v,u){return p(v,$a)}var Sc=w('<div hidden id="'),Ns=w('">'),kc=w("</div>"),_c=w('<svg aria-hidden="true" style="display:none" id="'),Ds=w('">'),Ps=w("</svg>"),Ec=w('<math aria-hidden="true" style="display:none" id="'),Cc=w('">'),Tc=w("</math>"),Wa=w('<table hidden id="'),Ac=w('">'),A=w("</table>"),B=w('<table hidden><tbody id="'),G=w('">'),te=w("</tbody></table>"),Ee=w('<table hidden><tr id="'),Se=w('">'),Me=w("</tr></table>"),Ue=w('<table hidden><colgroup id="'),it=w('">'),ut=w("</colgroup></table>");function ct(v,u,h,y){switch(h.insertionMode){case Pn:case Zt:return f(v,Sc),f(v,u.segmentPrefix),f(v,S(y.toString(16))),p(v,Ns);case xn:return f(v,_c),f(v,u.segmentPrefix),f(v,S(y.toString(16))),p(v,Ds);case Sn:return f(v,Ec),f(v,u.segmentPrefix),f(v,S(y.toString(16))),p(v,Cc);case ri:return f(v,Wa),f(v,u.segmentPrefix),f(v,S(y.toString(16))),p(v,Ac);case Ki:return f(v,B),f(v,u.segmentPrefix),f(v,S(y.toString(16))),p(v,G);case rn:return f(v,Ee),f(v,u.segmentPrefix),f(v,S(y.toString(16))),p(v,Se);case kn:return f(v,Ue),f(v,u.segmentPrefix),f(v,S(y.toString(16))),p(v,it);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function Dt(v,u){switch(u.insertionMode){case Pn:case Zt:return p(v,kc);case xn:return p(v,Ps);case Sn:return p(v,Tc);case ri:return p(v,A);case Ki:return p(v,te);case rn:return p(v,Me);case kn:return p(v,ut);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var Dr="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)}",on='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()}}',sn='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())}',Ls=w(Dr+';$RS("'),Rc=w('$RS("'),Po=w('","'),bv=w('")<\/script>');function wv(v,u,h){f(v,u.startInlineScript),u.sentCompleteSegmentFunction?f(v,Rc):(u.sentCompleteSegmentFunction=!0,f(v,Ls)),f(v,u.segmentPrefix);var y=S(h.toString(16));return f(v,y),f(v,Po),f(v,u.placeholderPrefix),f(v,y),p(v,bv)}var zd=w(on+';$RC("'),xv=w('$RC("'),Sv=w('","'),tp=w('")<\/script>');function rp(v,u,h,y){if(f(v,u.startInlineScript),u.sentCompleteBoundaryFunction?f(v,xv):(u.sentCompleteBoundaryFunction=!0,f(v,zd)),h===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var E=S(y.toString(16));return f(v,h),f(v,Sv),f(v,u.segmentPrefix),f(v,E),p(v,tp)}var kv=w(sn+';$RX("'),_v=w('$RX("'),Ev=w('"'),Cv=w(")<\/script>"),Ur=w(",");function Tv(v,u,h,y,E,I){if(f(v,u.startInlineScript),u.sentClientRenderFunction?f(v,_v):(u.sentClientRenderFunction=!0,f(v,kv)),h===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return f(v,h),f(v,Ev),(y||E||I)&&(f(v,Ur),f(v,S(Ic(y||"")))),(E||I)&&(f(v,Ur),f(v,S(Ic(E||"")))),I&&(f(v,Ur),f(v,S(Ic(I)))),p(v,Cv)}var np=/[<\u2028\u2029]/g;function Ic(v){var u=JSON.stringify(v);return u.replace(np,function(h){switch(h){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 an=Object.assign,ip=Symbol.for("react.element"),Oc=Symbol.for("react.portal"),Mc=Symbol.for("react.fragment"),Nc=Symbol.for("react.strict_mode"),Dc=Symbol.for("react.profiler"),Va=Symbol.for("react.provider"),Ga=Symbol.for("react.context"),Fs=Symbol.for("react.forward_ref"),Hd=Symbol.for("react.suspense"),$d=Symbol.for("react.suspense_list"),Ud=Symbol.for("react.memo"),Pc=Symbol.for("react.lazy"),op=Symbol.for("react.scope"),Av=Symbol.for("react.debug_trace_mode"),Rv=Symbol.for("react.legacy_hidden"),Iv=Symbol.for("react.default_value"),Wd=Symbol.iterator,Wt="@@iterator";function Ka(v){if(v===null||typeof v!="object")return null;var u=Wd&&v[Wd]||v[Wt];return typeof u=="function"?u:null}function sp(v,u,h){var y=v.displayName;if(y)return y;var E=u.displayName||u.name||"";return E!==""?h+"("+E+")":h}function Vd(v){return v.displayName||"Context"}function zt(v){if(v==null)return null;if(typeof v.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case Mc:return"Fragment";case Oc:return"Portal";case Dc:return"Profiler";case Nc:return"StrictMode";case Hd:return"Suspense";case $d:return"SuspenseList"}if(typeof v=="object")switch(v.$$typeof){case Ga:var u=v;return Vd(u)+".Consumer";case Va:var h=v;return Vd(h._context)+".Provider";case Fs:return sp(v,v.render,"ForwardRef");case Ud:var y=v.displayName||null;return y!==null?y:zt(v.type)||"Memo";case Pc:{var E=v,I=E._payload,H=E._init;try{return zt(H(I))}catch{return null}}}return null}var js=0,Gd,Kd,qd,Xd,ap,lp,Lc;function Fc(){}Fc.__reactDisabledLog=!0;function qa(){{if(js===0){Gd=console.log,Kd=console.info,qd=console.warn,Xd=console.error,ap=console.group,lp=console.groupCollapsed,Lc=console.groupEnd;var v={configurable:!0,enumerable:!0,value:Fc,writable:!0};Object.defineProperties(console,{info:v,log:v,warn:v,error:v,group:v,groupCollapsed:v,groupEnd:v})}js++}}function Yd(){{if(js--,js===0){var v={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:an({},v,{value:Gd}),info:an({},v,{value:Kd}),warn:an({},v,{value:qd}),error:an({},v,{value:Xd}),group:an({},v,{value:ap}),groupCollapsed:an({},v,{value:lp}),groupEnd:an({},v,{value:Lc})})}js<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Bs=r.ReactCurrentDispatcher,Jd;function Lo(v,u,h){{if(Jd===void 0)try{throw Error()}catch(E){var y=E.stack.trim().match(/\n( *(at )?)/);Jd=y&&y[1]||""}return`
393
+ `+Jd+v}}var Zd=!1,Xa;{var Ov=typeof WeakMap=="function"?WeakMap:Map;Xa=new Ov}function Ya(v,u){if(!v||Zd)return"";{var h=Xa.get(v);if(h!==void 0)return h}var y;Zd=!0;var E=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var I;I=Bs.current,Bs.current=null,qa();try{if(u){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(kt){y=kt}Reflect.construct(v,[],H)}else{try{H.call()}catch(kt){y=kt}v.call(H.prototype)}}else{try{throw Error()}catch(kt){y=kt}v()}}catch(kt){if(kt&&y&&typeof kt.stack=="string"){for(var K=kt.stack.split(`
394
+ `),se=y.stack.split(`
395
+ `),be=K.length-1,Pe=se.length-1;be>=1&&Pe>=0&&K[be]!==se[Pe];)Pe--;for(;be>=1&&Pe>=0;be--,Pe--)if(K[be]!==se[Pe]){if(be!==1||Pe!==1)do if(be--,Pe--,Pe<0||K[be]!==se[Pe]){var je=`
396
+ `+K[be].replace(" at new "," at ");return v.displayName&&je.includes("<anonymous>")&&(je=je.replace("<anonymous>",v.displayName)),typeof v=="function"&&Xa.set(v,je),je}while(be>=1&&Pe>=0);break}}}finally{Zd=!1,Bs.current=I,Yd(),Error.prepareStackTrace=E}var Ke=v?v.displayName||v.name:"",st=Ke?Lo(Ke):"";return typeof v=="function"&&Xa.set(v,st),st}function cp(v,u,h){return Ya(v,!0)}function Qd(v,u,h){return Ya(v,!1)}function jc(v){var u=v.prototype;return!!(u&&u.isReactComponent)}function Bc(v,u,h){if(v==null)return"";if(typeof v=="function")return Ya(v,jc(v));if(typeof v=="string")return Lo(v);switch(v){case Hd:return Lo("Suspense");case $d:return Lo("SuspenseList")}if(typeof v=="object")switch(v.$$typeof){case Fs:return Qd(v.render);case Ud:return Bc(v.type,u,h);case Pc:{var y=v,E=y._payload,I=y._init;try{return Bc(I(E),u,h)}catch{}}}return""}var zc={},Ja=r.ReactDebugCurrentFrame;function Za(v){if(v){var u=v._owner,h=Bc(v.type,v._source,u?u.type:null);Ja.setExtraStackFrame(h)}else Ja.setExtraStackFrame(null)}function up(v,u,h,y,E){{var I=Function.call.bind(P);for(var H in v)if(I(v,H)){var K=void 0;try{if(typeof v[H]!="function"){var se=Error((y||"React class")+": "+h+" type `"+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof v[H]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw se.name="Invariant Violation",se}K=v[H](u,H,y,h,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(be){K=be}K&&!(K instanceof Error)&&(Za(E),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).",y||"React class",h,H,typeof K),Za(null)),K instanceof Error&&!(K.message in zc)&&(zc[K.message]=!0,Za(E),i("Failed %s type: %s",h,K.message),Za(null))}}}var Fo;Fo={};var Hc={};Object.freeze(Hc);function Qi(v,u){{var h=v.contextTypes;if(!h)return Hc;var y={};for(var E in h)y[E]=u[E];{var I=zt(v)||"Unknown";up(h,y,"context",I)}return y}}function ef(v,u,h,y){{if(typeof v.getChildContext!="function"){{var E=zt(u)||"Unknown";Fo[E]||(Fo[E]=!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.",E,E))}return h}var I=v.getChildContext();for(var H in I)if(!(H in y))throw new Error((zt(u)||"Unknown")+'.getChildContext(): key "'+H+'" is not defined in childContextTypes.');{var K=zt(u)||"Unknown";up(y,I,"child context",K)}return an({},h,I)}}var jo;jo={};var $c=null,eo=null;function Uc(v){v.context._currentValue=v.parentValue}function Wc(v){v.context._currentValue=v.value}function Qa(v,u){if(v!==u){Uc(v);var h=v.parent,y=u.parent;if(h===null){if(y!==null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.")}else{if(y===null)throw new Error("The stacks must reach the root at the same time. This is a bug in React.");Qa(h,y)}Wc(u)}}function el(v){Uc(v);var u=v.parent;u!==null&&el(u)}function dp(v){var u=v.parent;u!==null&&dp(u),Wc(v)}function fp(v,u){Uc(v);var h=v.parent;if(h===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?Qa(h,u):fp(h,u)}function hp(v,u){var h=u.parent;if(h===null)throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");v.depth===h.depth?Qa(v,h):hp(v,h),Wc(u)}function to(v){var u=eo,h=v;u!==h&&(u===null?dp(h):h===null?el(u):u.depth===h.depth?Qa(u,h):u.depth>h.depth?fp(u,h):hp(u,h),eo=h)}function tf(v,u){var h;h=v._currentValue,v._currentValue=u,v._currentRenderer!==void 0&&v._currentRenderer!==null&&v._currentRenderer!==jo&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),v._currentRenderer=jo;var y=eo,E={parent:y,depth:y===null?0:y.depth+1,context:v,parentValue:h,value:u};return eo=E,E}function Mv(v){var u=eo;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!==v&&i("The parent context is not the expected context. This is probably a bug in React.");{var h=u.parentValue;h===Iv?u.context._currentValue=u.context._defaultValue:u.context._currentValue=h,v._currentRenderer!==void 0&&v._currentRenderer!==null&&v._currentRenderer!==jo&&i("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),v._currentRenderer=jo}return eo=u.parent}function pp(){return eo}function zs(v){var u=v._currentValue;return u}function tl(v){return v._reactInternals}function rf(v,u){v._reactInternals=u}var Vc={},Gc={},Kc,Hs,rl,nl,qc,il,Xc,Yc,nf;{Kc=new Set,Hs=new Set,rl=new Set,Xc=new Set,nl=new Set,Yc=new Set,nf=new Set;var mp=new Set;il=function(v,u){if(!(v===null||typeof v=="function")){var h=u+"_"+v;mp.has(h)||(mp.add(h),i("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",u,v))}},qc=function(v,u){if(u===void 0){var h=zt(v)||"Component";nl.has(h)||(nl.add(h),i("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",h))}}}function gp(v,u){{var h=v.constructor,y=h&&zt(h)||"ReactClass",E=y+"."+u;if(Vc[E])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.
397
+
398
+ Please check the code for the %s component.`,u,u,y),Vc[E]=!0}}var yp={isMounted:function(v){return!1},enqueueSetState:function(v,u,h){var y=tl(v);y.queue===null?gp(v,"setState"):(y.queue.push(u),h!=null&&il(h,"setState"))},enqueueReplaceState:function(v,u,h){var y=tl(v);y.replace=!0,y.queue=[u],h!=null&&il(h,"setState")},enqueueForceUpdate:function(v,u){var h=tl(v);h.queue===null?gp(v,"forceUpdate"):u!=null&&il(u,"setState")}};function Nv(v,u,h,y,E){var I=h(E,y);qc(u,I);var H=I==null?y:an({},y,I);return H}function vp(v,u,h){var y=Hc,E=v.contextType;if("contextType"in v){var I=E===null||E!==void 0&&E.$$typeof===Ga&&E._context===void 0;if(!I&&!nf.has(v)){nf.add(v);var H="";E===void 0?H=" 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 E!="object"?H=" However, it is set to a "+typeof E+".":E.$$typeof===Va?H=" Did you accidentally pass the Context.Provider instead?":E._context!==void 0?H=" Did you accidentally pass the Context.Consumer instead?":H=" However, it is set to an object with keys {"+Object.keys(E).join(", ")+"}.",i("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",zt(v)||"Component",H)}}typeof E=="object"&&E!==null?y=zs(E):y=h;var K=new v(u,y);{if(typeof v.getDerivedStateFromProps=="function"&&(K.state===null||K.state===void 0)){var se=zt(v)||"Component";Kc.has(se)||(Kc.add(se),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.",se,K.state===null?"null":"undefined",se))}if(typeof v.getDerivedStateFromProps=="function"||typeof K.getSnapshotBeforeUpdate=="function"){var be=null,Pe=null,je=null;if(typeof K.componentWillMount=="function"&&K.componentWillMount.__suppressDeprecationWarning!==!0?be="componentWillMount":typeof K.UNSAFE_componentWillMount=="function"&&(be="UNSAFE_componentWillMount"),typeof K.componentWillReceiveProps=="function"&&K.componentWillReceiveProps.__suppressDeprecationWarning!==!0?Pe="componentWillReceiveProps":typeof K.UNSAFE_componentWillReceiveProps=="function"&&(Pe="UNSAFE_componentWillReceiveProps"),typeof K.componentWillUpdate=="function"&&K.componentWillUpdate.__suppressDeprecationWarning!==!0?je="componentWillUpdate":typeof K.UNSAFE_componentWillUpdate=="function"&&(je="UNSAFE_componentWillUpdate"),be!==null||Pe!==null||je!==null){var Ke=zt(v)||"Component",st=typeof v.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";rl.has(Ke)||(rl.add(Ke),i(`Unsafe legacy lifecycles will not be called for components using new component APIs.
399
+
400
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
401
+
402
+ The above lifecycles should be removed. Learn more about this warning here:
403
+ https://reactjs.org/link/unsafe-component-lifecycles`,Ke,st,be!==null?`
404
+ `+be:"",Pe!==null?`
405
+ `+Pe:"",je!==null?`
406
+ `+je:""))}}}return K}function Dv(v,u,h){{var y=zt(u)||"Component",E=v.render;E||(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?",y):i("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",y)),v.getInitialState&&!v.getInitialState.isReactClassApproved&&!v.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?",y),v.getDefaultProps&&!v.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.",y),v.propTypes&&i("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",y),v.contextType&&i("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",y),v.contextTypes&&i("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",y),u.contextType&&u.contextTypes&&!Yc.has(u)&&(Yc.add(u),i("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",y)),typeof v.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.",y),u.prototype&&u.prototype.isPureReactComponent&&typeof v.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.",zt(u)||"A pure component"),typeof v.componentDidUnmount=="function"&&i("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",y),typeof v.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().",y),typeof v.componentWillRecieveProps=="function"&&i("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",y),typeof v.UNSAFE_componentWillRecieveProps=="function"&&i("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",y);var I=v.props!==h;v.props!==void 0&&I&&i("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",y,y),v.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.",y,y),typeof v.getSnapshotBeforeUpdate=="function"&&typeof v.componentDidUpdate!="function"&&!Hs.has(u)&&(Hs.add(u),i("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",zt(u))),typeof v.getDerivedStateFromProps=="function"&&i("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",y),typeof v.getDerivedStateFromError=="function"&&i("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",y),typeof u.getSnapshotBeforeUpdate=="function"&&i("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",y);var H=v.state;H&&(typeof H!="object"||Ir(H))&&i("%s.state: must be set to an object or null",y),typeof v.getChildContext=="function"&&typeof u.childContextTypes!="object"&&i("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",y)}}function Pv(v,u){var h=u.state;if(typeof u.componentWillMount=="function"){if(u.componentWillMount.__suppressDeprecationWarning!==!0){var y=zt(v)||"Unknown";Gc[y]||(n(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
407
+
408
+ * Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.
409
+
410
+ Please update the following components: %s`,y),Gc[y]=!0)}u.componentWillMount()}typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&(i("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",zt(v)||"Component"),yp.enqueueReplaceState(u,u.state,null))}function of(v,u,h,y){if(v.queue!==null&&v.queue.length>0){var E=v.queue,I=v.replace;if(v.queue=null,v.replace=!1,I&&E.length===1)u.state=E[0];else{for(var H=I?E[0]:u.state,K=!0,se=I?1:0;se<E.length;se++){var be=E[se],Pe=typeof be=="function"?be.call(u,H,h,y):be;Pe!=null&&(K?(K=!1,H=an({},H,Pe)):an(H,Pe))}u.state=H}}else v.queue=null}function ol(v,u,h,y){Dv(v,u,h);var E=v.state!==void 0?v.state:null;v.updater=yp,v.props=h,v.state=E;var I={queue:[],replace:!1};rf(v,I);var H=u.contextType;if(typeof H=="object"&&H!==null?v.context=zs(H):v.context=y,v.state===h){var K=zt(u)||"Component";Xc.has(K)||(Xc.add(K),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.",K))}var se=u.getDerivedStateFromProps;typeof se=="function"&&(v.state=Nv(v,u,se,E,h)),typeof u.getDerivedStateFromProps!="function"&&typeof v.getSnapshotBeforeUpdate!="function"&&(typeof v.UNSAFE_componentWillMount=="function"||typeof v.componentWillMount=="function")&&(Pv(u,v),of(I,v,h,y))}var Lv={id:1,overflow:""};function Fv(v){var u=v.overflow,h=v.id,y=h&~jv(h);return y.toString(32)+u}function sf(v,u,h){var y=v.id,E=v.overflow,I=Jc(y)-1,H=y&~(1<<I),K=h+1,se=Jc(u)+I;if(se>30){var be=I-I%5,Pe=(1<<be)-1,je=(H&Pe).toString(32),Ke=H>>be,st=I-be,kt=Jc(u)+st,mr=K<<st,Vo=mr|Ke,Go=je+E;return{id:1<<kt|Vo,overflow:Go}}else{var Ni=K<<I,qs=Ni|H,pb=E;return{id:1<<se|qs,overflow:pb}}}function Jc(v){return 32-Bv(v)}function jv(v){return 1<<Jc(v)-1}var Bv=Math.clz32?Math.clz32:af,zv=Math.log,Ri=Math.LN2;function af(v){var u=v>>>0;return u===0?32:31-(zv(u)/Ri|0)|0}function Zc(v,u){return v===u&&(v!==0||1/v===1/u)||v!==v&&u!==u}var Lt=typeof Object.is=="function"?Object.is:Zc,ln=null,$s=null,Bo=null,xt=null,ro=!1,Qc=!1,cn=0,un=null,li=0,Hv=25,jn=!1,no;function zo(){if(ln===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:
411
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
412
+ 2. You might be breaking the Rules of Hooks
413
+ 3. You might have more than one copy of React in the same app
414
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return jn&&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"),ln}function $v(v,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.",no),!1;v.length!==u.length&&i(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
415
+
416
+ Previous: %s
417
+ Incoming: %s`,no,"["+v.join(", ")+"]","["+u.join(", ")+"]");for(var h=0;h<u.length&&h<v.length;h++)if(!Lt(v[h],u[h]))return!1;return!0}function lf(){if(li>0)throw new Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function sl(){return xt===null?Bo===null?(ro=!1,Bo=xt=lf()):(ro=!0,xt=Bo):xt.next===null?(ro=!1,xt=xt.next=lf()):(ro=!0,xt=xt.next),xt}function Uv(v,u){ln=u,$s=v,jn=!1,cn=0}function Wv(v,u,h,y){for(;Qc;)Qc=!1,cn=0,li+=1,xt=null,h=v(u,y);return cf(),h}function eu(){var v=cn!==0;return v}function cf(){jn=!1,ln=null,$s=null,Qc=!1,Bo=null,li=0,un=null,xt=null}function bp(v){return jn&&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()."),zs(v)}function wp(v){return no="useContext",zo(),zs(v)}function uf(v,u){return typeof u=="function"?u(v):u}function Vv(v){return no="useState",xp(uf,v)}function xp(v,u,h){if(v!==uf&&(no="useReducer"),ln=zo(),xt=sl(),ro){var y=xt.queue,E=y.dispatch;if(un!==null){var I=un.get(y);if(I!==void 0){un.delete(y);var H=xt.memoizedState,K=I;do{var se=K.action;jn=!0,H=v(H,se),jn=!1,K=K.next}while(K!==null);return xt.memoizedState=H,[H,E]}}return[xt.memoizedState,E]}else{jn=!0;var be;v===uf?be=typeof u=="function"?u():u:be=h!==void 0?h(u):u,jn=!1,xt.memoizedState=be;var Pe=xt.queue={last:null,dispatch:null},je=Pe.dispatch=qv.bind(null,ln,Pe);return[xt.memoizedState,je]}}function Sp(v,u){ln=zo(),xt=sl();var h=u===void 0?null:u;if(xt!==null){var y=xt.memoizedState;if(y!==null&&h!==null){var E=y[1];if($v(h,E))return y[0]}}jn=!0;var I=v();return jn=!1,xt.memoizedState=[I,h],I}function Gv(v){ln=zo(),xt=sl();var u=xt.memoizedState;if(u===null){var h={current:v};return Object.seal(h),xt.memoizedState=h,h}else return u}function Kv(v,u){no="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 qv(v,u,h){if(li>=Hv)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(v===ln){Qc=!0;var y={action:h,next:null};un===null&&(un=new Map);var E=un.get(u);if(E===void 0)un.set(u,y);else{for(var I=E;I.next!==null;)I=I.next;I.next=y}}}function Xv(v,u){return Sp(function(){return v},u)}function Yv(v,u,h){return zo(),u(v._source)}function Jv(v,u,h){if(h===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return h()}function tu(v){return zo(),v}function kp(){throw new Error("startTransition cannot be called during server rendering.")}function df(){return zo(),[!1,kp]}function _p(){var v=$s,u=Fv(v.treeContext),h=al;if(h===null)throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");var y=cn++;return _n(h,u,y)}function ru(){}var nu={readContext:bp,useContext:wp,useMemo:Sp,useReducer:xp,useRef:Gv,useState:Vv,useInsertionEffect:ru,useLayoutEffect:Kv,useCallback:Xv,useImperativeHandle:ru,useEffect:ru,useDebugValue:ru,useDeferredValue:tu,useTransition:df,useId:_p,useMutableSource:Yv,useSyncExternalStore:Jv},al=null;function iu(v){al=v}function Us(v){try{var u="",h=v;do{switch(h.tag){case 0:u+=Lo(h.type,null,null);break;case 1:u+=Qd(h.type,null,null);break;case 2:u+=cp(h.type,null,null);break}h=h.parent}while(h);return u}catch(y){return`
418
+ Error generating stack: `+y.message+`
419
+ `+y.stack}}var ou=r.ReactCurrentDispatcher,su=r.ReactDebugCurrentFrame,au=0,Ws=1,ff=2,Ho=3,Ep=4,Zv=0,Vs=1,Gs=2,Qv=12800;function eb(v){return console.error(v),null}function $o(){}function lu(v,u,h,y,E,I,H,K,se){var be=[],Pe=new Set,je={destination:null,responseState:u,progressiveChunkSize:y===void 0?Qv:y,status:Zv,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:Pe,pingedTasks:be,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:E===void 0?eb:E,onAllReady:I===void 0?$o:I,onShellReady:H===void 0?$o:H,onShellError:K===void 0?$o:K,onFatalError:se===void 0?$o:se},Ke=ll(je,0,null,h,!1,!1);Ke.parentFlushed=!0;var st=Uo(je,v,null,Ke,Pe,Hc,$c,Lv);return be.push(st),je}function Ii(v,u){var h=v.pingedTasks;h.push(u),h.length===1&&s(function(){return kf(v)})}function hf(v,u){return{id:qi,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:u,errorDigest:null}}function Uo(v,u,h,y,E,I,H,K){v.allPendingTasks++,h===null?v.pendingRootTasks++:h.pendingTasks++;var se={node:u,ping:function(){return Ii(v,se)},blockedBoundary:h,blockedSegment:y,abortSet:E,legacyContext:I,context:H,treeContext:K};return se.componentStack=null,E.add(se),se}function ll(v,u,h,y,E,I){return{status:au,id:-1,index:u,parentFlushed:!1,chunks:[],children:[],formatContext:y,boundary:h,lastPushedText:E,textEmbedded:I}}var Oi=null;function ci(){return Oi===null||Oi.componentStack===null?"":Us(Oi.componentStack)}function Mi(v,u){v.componentStack={tag:0,parent:v.componentStack,type:u}}function cu(v,u){v.componentStack={tag:1,parent:v.componentStack,type:u}}function cl(v,u){v.componentStack={tag:2,parent:v.componentStack,type:u}}function Bn(v){v.componentStack===null?i("Unexpectedly popped too many stack frames. This is a bug in React."):v.componentStack=v.componentStack.parent}var ul=null;function pf(v,u){{var h;typeof u=="string"?h=u:u&&typeof u.message=="string"?h=u.message:h=String(u);var y=ul||ci();ul=null,v.errorMessage=h,v.errorComponentStack=y}}function dl(v,u){var h=v.onError(u);if(h!=null&&typeof h!="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 h+'" instead');return h}function fl(v,u){var h=v.onShellError;h(u);var y=v.onFatalError;y(u),v.destination!==null?(v.status=Gs,T(v.destination,u)):(v.status=Vs,v.fatalError=u)}function Cp(v,u,h){Mi(u,"Suspense");var y=u.blockedBoundary,E=u.blockedSegment,I=h.fallback,H=h.children,K=new Set,se=hf(v,K),be=E.chunks.length,Pe=ll(v,be,se,E.formatContext,!1,!1);E.children.push(Pe),E.lastPushedText=!1;var je=ll(v,0,null,E.formatContext,!1,!1);je.parentFlushed=!0,u.blockedBoundary=se,u.blockedSegment=je;try{if(Ks(v,u,H),Mr(je.chunks,v.responseState,je.lastPushedText,je.textEmbedded),je.status=Ws,Wo(se,je),se.pendingTasks===0){Bn(u);return}}catch(st){je.status=Ep,se.forceClientRender=!0,se.errorDigest=dl(v,st),pf(se,st)}finally{u.blockedBoundary=y,u.blockedSegment=E}var Ke=Uo(v,I,y,Pe,K,u.legacyContext,u.context,u.treeContext);Ke.componentStack=u.componentStack,v.pingedTasks.push(Ke),Bn(u)}function tb(v,u,h,y){Mi(u,h);var E=u.blockedSegment,I=Mo(E.chunks,h,y,v.responseState,E.formatContext);E.lastPushedText=!1;var H=E.formatContext;E.formatContext=_i(H,h,y),Ks(v,u,I),E.formatContext=H,gc(E.chunks,h),E.lastPushedText=!1,Bn(u)}function Tp(v){return v.prototype&&v.prototype.isReactComponent}function hl(v,u,h,y,E){var I={};Uv(u,I);var H=h(y,E);return Wv(h,y,H,E)}function mf(v,u,h,y,E){var I=h.render();h.props!==E&&(bf||i("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",zt(y)||"a component"),bf=!0);{var H=y.childContextTypes;if(H!=null){var K=u.legacyContext,se=ef(h,y,K,H);u.legacyContext=se,Pr(v,u,I),u.legacyContext=K;return}}Pr(v,u,I)}function Ap(v,u,h,y){cl(u,h);var E=Qi(h,u.legacyContext),I=vp(h,y,E);ol(I,h,y,E),mf(v,u,I,h,y),Bn(u)}var gf={},pl={},yf={},vf={},bf=!1,Rp={},Ip=!1,wf=!1,Op=!1;function rb(v,u,h,y){var E;if(E=Qi(h,u.legacyContext),cu(u,h),h.prototype&&typeof h.prototype.render=="function"){var I=zt(h)||"Unknown";gf[I]||(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.",I,I),gf[I]=!0)}var H=hl(v,u,h,y,E),K=eu();if(typeof H=="object"&&H!==null&&typeof H.render=="function"&&H.$$typeof===void 0){var se=zt(h)||"Unknown";pl[se]||(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.",se,se,se),pl[se]=!0)}if(typeof H=="object"&&H!==null&&typeof H.render=="function"&&H.$$typeof===void 0){{var be=zt(h)||"Unknown";pl[be]||(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.",be,be,be),pl[be]=!0)}ol(H,h,y,E),mf(v,u,H,h,y)}else if(nb(h),K){var Pe=u.treeContext,je=1,Ke=0;u.treeContext=sf(Pe,je,Ke);try{Pr(v,u,H)}finally{u.treeContext=Pe}}else Pr(v,u,H);Bn(u)}function nb(v){{if(v&&v.childContextTypes&&i("%s(...): childContextTypes cannot be defined on a function component.",v.displayName||v.name||"Component"),v.defaultProps!==void 0){var u=zt(v)||"Unknown";Rp[u]||(i("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",u),Rp[u]=!0)}if(typeof v.getDerivedStateFromProps=="function"){var h=zt(v)||"Unknown";vf[h]||(i("%s: Function components do not support getDerivedStateFromProps.",h),vf[h]=!0)}if(typeof v.contextType=="object"&&v.contextType!==null){var y=zt(v)||"Unknown";yf[y]||(i("%s: Function components do not support contextType.",y),yf[y]=!0)}}}function Mp(v,u){if(v&&v.defaultProps){var h=an({},u),y=v.defaultProps;for(var E in y)h[E]===void 0&&(h[E]=y[E]);return h}return u}function ib(v,u,h,y,E){cu(u,h.render);var I=hl(v,u,h.render,y,E),H=eu();if(H){var K=u.treeContext,se=1,be=0;u.treeContext=sf(K,se,be);try{Pr(v,u,I)}finally{u.treeContext=K}}else Pr(v,u,I);Bn(u)}function xf(v,u,h,y,E){var I=h.type,H=Mp(I,y);uu(v,u,I,H,E)}function ob(v,u,h,y){h._context===void 0?h!==h.Consumer&&(Op||(Op=!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?"))):h=h._context;var E=y.children;typeof E!="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 I=zs(h),H=E(I);Pr(v,u,H)}function dn(v,u,h,y){var E=h._context,I=y.value,H=y.children,K;K=u.context,u.context=tf(E,I),Pr(v,u,H),u.context=Mv(E),K!==u.context&&i("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function sb(v,u,h,y,E){Mi(u,"Lazy");var I=h._payload,H=h._init,K=H(I),se=Mp(K,y);uu(v,u,K,se,E),Bn(u)}function uu(v,u,h,y,E){if(typeof h=="function")if(Tp(h)){Ap(v,u,h,y);return}else{rb(v,u,h,y);return}if(typeof h=="string"){tb(v,u,h,y);return}switch(h){case Rv:case Av:case Nc:case Dc:case Mc:{Pr(v,u,y.children);return}case $d:{Mi(u,"SuspenseList"),Pr(v,u,y.children),Bn(u);return}case op:throw new Error("ReactDOMServer does not yet support scope components.");case Hd:{Cp(v,u,y);return}}if(typeof h=="object"&&h!==null)switch(h.$$typeof){case Fs:{ib(v,u,h,y,E);return}case Ud:{xf(v,u,h,y,E);return}case Va:{dn(v,u,h,y);return}case Ga:{ob(v,u,h,y);return}case Pc:{sb(v,u,h,y);return}}var I="";throw(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(I+=" 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: "+(h==null?h:typeof h)+"."+I))}function ab(v,u){typeof Symbol=="function"&&v[Symbol.toStringTag]==="Generator"&&(Ip||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."),Ip=!0),v.entries===u&&(wf||i("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),wf=!0)}function Pr(v,u,h){try{return lb(v,u,h)}catch(y){throw typeof y=="object"&&y!==null&&typeof y.then=="function"||(ul=ul!==null?ul:ci()),y}}function lb(v,u,h){if(u.node=h,typeof h=="object"&&h!==null){switch(h.$$typeof){case ip:{var y=h,E=y.type,I=y.props,H=y.ref;uu(v,u,E,I,H);return}case Oc: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 Pc:{var K=h,se=K._payload,be=K._init,Pe;try{Pe=be(se)}catch(Ni){throw typeof Ni=="object"&&Ni!==null&&typeof Ni.then=="function"&&Mi(u,"Lazy"),Ni}Pr(v,u,Pe);return}}if(Ir(h)){Np(v,u,h);return}var je=Ka(h);if(je){ab(h,je);var Ke=je.call(h);if(Ke){var st=Ke.next();if(!st.done){var kt=[];do kt.push(st.value),st=Ke.next();while(!st.done);Np(v,u,kt);return}return}}var mr=Object.prototype.toString.call(h);throw new Error("Objects are not valid as a React child (found: "+(mr==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":mr)+"). If you meant to render a collection of children, use an array instead.")}if(typeof h=="string"){var Vo=u.blockedSegment;Vo.lastPushedText=ar(u.blockedSegment.chunks,h,v.responseState,Vo.lastPushedText);return}if(typeof h=="number"){var Go=u.blockedSegment;Go.lastPushedText=ar(u.blockedSegment.chunks,""+h,v.responseState,Go.lastPushedText);return}typeof h=="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 Np(v,u,h){for(var y=h.length,E=0;E<y;E++){var I=u.treeContext;u.treeContext=sf(I,y,E);try{Ks(v,u,h[E])}finally{u.treeContext=I}}}function Dp(v,u,h){var y=u.blockedSegment,E=y.chunks.length,I=ll(v,E,null,y.formatContext,y.lastPushedText,!0);y.children.push(I),y.lastPushedText=!1;var H=Uo(v,u.node,u.blockedBoundary,I,u.abortSet,u.legacyContext,u.context,u.treeContext);u.componentStack!==null&&(H.componentStack=u.componentStack.parent);var K=H.ping;h.then(K,K)}function Ks(v,u,h){var y=u.blockedSegment.formatContext,E=u.legacyContext,I=u.context,H=null;H=u.componentStack;try{return Pr(v,u,h)}catch(K){if(cf(),typeof K=="object"&&K!==null&&typeof K.then=="function"){Dp(v,u,K),u.blockedSegment.formatContext=y,u.legacyContext=E,u.context=I,to(I),u.componentStack=H;return}else throw u.blockedSegment.formatContext=y,u.legacyContext=E,u.context=I,to(I),u.componentStack=H,K}}function Pp(v,u,h,y){var E=dl(v,y);if(u===null?fl(v,y):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=E,pf(u,y),u.parentFlushed&&v.clientRenderedBoundaries.push(u))),v.allPendingTasks--,v.allPendingTasks===0){var I=v.onAllReady;I()}}function cb(v){var u=this,h=v.blockedBoundary,y=v.blockedSegment;y.status=Ho,ml(u,h,y)}function Sf(v,u,h){var y=v.blockedBoundary,E=v.blockedSegment;if(E.status=Ho,y===null)u.allPendingTasks--,u.status!==Gs&&(u.status=Gs,u.destination!==null&&g(u.destination));else{if(y.pendingTasks--,!y.forceClientRender){y.forceClientRender=!0;var I=h===void 0?new Error("The render was aborted by the server without a reason."):h;y.errorDigest=u.onError(I);{var H="The server did not finish this Suspense boundary: ";I&&typeof I.message=="string"?I=H+I.message:I=H+String(I);var K=Oi;Oi=v;try{pf(y,I)}finally{Oi=K}}y.parentFlushed&&u.clientRenderedBoundaries.push(y)}if(y.fallbackAbortableTasks.forEach(function(be){return Sf(be,u,h)}),y.fallbackAbortableTasks.clear(),u.allPendingTasks--,u.allPendingTasks===0){var se=u.onAllReady;se()}}}function Wo(v,u){if(u.chunks.length===0&&u.children.length===1&&u.children[0].boundary===null){var h=u.children[0];h.id=u.id,h.parentFlushed=!0,h.status===Ws&&Wo(v,h)}else{var y=v.completedSegments;y.push(u)}}function ml(v,u,h){if(u===null){if(h.parentFlushed){if(v.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");v.completedRootSegment=h}if(v.pendingRootTasks--,v.pendingRootTasks===0){v.onShellError=$o;var y=v.onShellReady;y()}}else if(u.pendingTasks--,!u.forceClientRender){if(u.pendingTasks===0)h.parentFlushed&&h.status===Ws&&Wo(u,h),u.parentFlushed&&v.completedBoundaries.push(u),u.fallbackAbortableTasks.forEach(cb,v),u.fallbackAbortableTasks.clear();else if(h.parentFlushed&&h.status===Ws){Wo(u,h);var E=u.completedSegments;E.length===1&&u.parentFlushed&&v.partialBoundaries.push(u)}}if(v.allPendingTasks--,v.allPendingTasks===0){var I=v.onAllReady;I()}}function ub(v,u){var h=u.blockedSegment;if(h.status===au){to(u.context);var y=null;y=Oi,Oi=u;try{Pr(v,u,u.node),Mr(h.chunks,v.responseState,h.lastPushedText,h.textEmbedded),u.abortSet.delete(u),h.status=Ws,ml(v,u.blockedBoundary,h)}catch(I){if(cf(),typeof I=="object"&&I!==null&&typeof I.then=="function"){var E=u.ping;I.then(E,E)}else u.abortSet.delete(u),h.status=Ep,Pp(v,u.blockedBoundary,h,I)}finally{Oi=y}}}function kf(v){if(v.status!==Gs){var u=pp(),h=ou.current;ou.current=nu;var y;y=su.getCurrentStack,su.getCurrentStack=ci;var E=al;iu(v.responseState);try{var I=v.pingedTasks,H;for(H=0;H<I.length;H++){var K=I[H];ub(v,K)}I.splice(0,H),v.destination!==null&&_f(v,v.destination)}catch(se){dl(v,se),fl(v,se)}finally{iu(E),ou.current=h,su.getCurrentStack=y,h===nu&&to(u)}}}function gl(v,u,h){switch(h.parentFlushed=!0,h.status){case au:{var y=h.id=v.nextSegmentId++;return h.lastPushedText=!1,h.textEmbedded=!1,yc(u,v.responseState,y)}case Ws:{h.status=ff;for(var E=!0,I=h.chunks,H=0,K=h.children,se=0;se<K.length;se++){for(var be=K[se];H<be.index;H++)f(u,I[H]);E=du(v,u,be)}for(;H<I.length-1;H++)f(u,I[H]);return H<I.length&&(E=p(u,I[H])),E}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function du(v,u,h){var y=h.boundary;if(y===null)return gl(v,u,h);if(y.parentFlushed=!0,y.forceClientRender)return Nr(u,v.responseState,y.errorDigest,y.errorMessage,y.errorComponentStack),gl(v,u,h),Bd(u,v.responseState);if(y.pendingTasks>0){y.rootSegmentID=v.nextSegmentId++,y.completedSegments.length>0&&v.partialBoundaries.push(y);var E=y.id=$r(v.responseState);return Os(u,v.responseState,E),gl(v,u,h),Ms(u,v.responseState)}else{if(y.byteSize>v.progressiveChunkSize)return y.rootSegmentID=v.nextSegmentId++,v.completedBoundaries.push(y),Os(u,v.responseState,y.id),gl(v,u,h),Ms(u,v.responseState);wc(u,v.responseState);var I=y.completedSegments;if(I.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var H=I[0];return du(v,u,H),xc(u,v.responseState)}}function Lp(v,u,h){return Tv(u,v.responseState,h.id,h.errorDigest,h.errorMessage,h.errorComponentStack)}function fu(v,u,h){return ct(u,v.responseState,h.formatContext,h.id),du(v,u,h),Dt(u,h.formatContext)}function Fp(v,u,h){for(var y=h.completedSegments,E=0;E<y.length;E++){var I=y[E];jp(v,u,h,I)}return y.length=0,rp(u,v.responseState,h.id,h.rootSegmentID)}function db(v,u,h){for(var y=h.completedSegments,E=0;E<y.length;E++){var I=y[E];if(!jp(v,u,h,I))return E++,y.splice(0,E),!1}return y.splice(0,E),!0}function jp(v,u,h,y){if(y.status===ff)return!0;var E=y.id;if(E===-1){var I=y.id=h.rootSegmentID;if(I===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return fu(v,u,y)}else return fu(v,u,y),wv(u,v.responseState,E)}function _f(v,u){d();try{var h=v.completedRootSegment;h!==null&&v.pendingRootTasks===0&&(du(v,u,h),v.completedRootSegment=null,Ld(u,v.responseState));var y=v.clientRenderedBoundaries,E;for(E=0;E<y.length;E++){var I=y[E];Lp(v,u,I)}y.splice(0,E);var H=v.completedBoundaries;for(E=0;E<H.length;E++){var K=H[E];Fp(v,u,K)}H.splice(0,E),m(u),d(u);var se=v.partialBoundaries;for(E=0;E<se.length;E++){var be=se[E];if(!db(v,u,be)){v.destination=null,E++,se.splice(0,E);return}}se.splice(0,E);var Pe=v.completedBoundaries;for(E=0;E<Pe.length;E++){var je=Pe[E];Fp(v,u,je)}Pe.splice(0,E)}finally{m(u),v.allPendingTasks===0&&v.pingedTasks.length===0&&v.clientRenderedBoundaries.length===0&&v.completedBoundaries.length===0&&(v.abortableTasks.size!==0&&i("There was still abortable task at the root when we closed. This is a bug in React."),g(u))}}function Bp(v){s(function(){return kf(v)})}function fb(v,u){if(v.status===Vs){v.status=Gs,T(u,v.fatalError);return}if(v.status!==Gs&&v.destination===null){v.destination=u;try{_f(v,u)}catch(h){dl(v,h),fl(v,h)}}}function zp(v,u){try{var h=v.abortableTasks;h.forEach(function(y){return Sf(y,v,u)}),h.clear(),v.destination!==null&&_f(v,v.destination)}catch(y){dl(v,y),fl(v,y)}}function hb(v,u){return new Promise(function(h,y){var E,I,H=new Promise(function(Ke,st){I=Ke,E=st});function K(){var Ke=new ReadableStream({type:"bytes",pull:function(st){fb(be,st)},cancel:function(st){zp(be)}},{highWaterMark:0});Ke.allReady=H,h(Ke)}function se(Ke){H.catch(function(){}),y(Ke)}var be=lu(v,ks(u?u.identifierPrefix:void 0,u?u.nonce:void 0,u?u.bootstrapScriptContent:void 0,u?u.bootstrapScripts:void 0,u?u.bootstrapModules:void 0),ni(u?u.namespaceURI:void 0),u?u.progressiveChunkSize:void 0,u?u.onError:void 0,I,K,se,E);if(u&&u.signal){var Pe=u.signal,je=function(){zp(be,Pe.reason),Pe.removeEventListener("abort",je)};Pe.addEventListener("abort",je)}Bp(be)})}Am.renderToReadableStream=hb,Am.version=e}()),Am}var ec,x1;process.env.NODE_ENV==="production"?(ec=dle(),x1=fle()):(ec=hle(),x1=ple());pc.version=ec.version;pc.renderToString=ec.renderToString;pc.renderToStaticMarkup=ec.renderToStaticMarkup;pc.renderToNodeStream=ec.renderToNodeStream;pc.renderToStaticNodeStream=ec.renderToStaticNodeStream;pc.renderToReadableStream=x1.renderToReadableStream;function mle(t){const e=pc.renderToStaticMarkup(t),i=new DOMParser().parseFromString(e,"image/svg+xml").documentElement,o=["svg",{...Array.from(i.attributes).reduce((s,a)=>(s[a.name]=a.value,s),{})}];return Array.from(i.childNodes).forEach(s=>{if(s.nodeType===1){const a=[s.tagName.toLowerCase(),Array.from(s.attributes).reduce((l,c)=>(l[c.name]=c.value,l),{})];s.textContent&&a.push(s.textContent),o.push(a)}}),o}const gle={audio:x.jsx(He.LucideAudioLines,{}),video:x.jsx(He.LucideVideo,{}),file:x.jsx(He.LucideFile,{}),image:x.jsx(He.LucideImage,{}),pdf:x.jsx(ON,{}),word:x.jsx(MN,{}),excel:x.jsx(He.LucideSheet,{}),ppt:x.jsx(He.LucideTableProperties,{})};function wP(t,e=!1){const r=u9(t),n=gle[r]||x.jsx(x.Fragment,{});return e?mle(n):n}const yle="_attachment_1x1ms_1",vle="_wrap_1x1ms_2",R0={attachment:yle,wrap:vle};function ble({editor:t,node:e,updateAttributes:r,deleteNode:n,extension:i}){var $;const o=J.useRef(),s=Yy(),{hasTrigger:a,fileName:l,fileSize:c,fileExt:d,fileType:f,url:p,error:m}=e.attrs,[g,b]=J.useState(!1),{t:S}=Et(),w=($=i==null?void 0:i.options)==null?void 0:$.upload,T=J.useCallback(()=>{!s||p||s&&o.current.click()},[s,p]),M=J.useCallback(async W=>{const Y=W.target.files&&W.target.files[0];if(!Y)return;const ee={fileName:l9(Y.name),fileSize:Y.size,fileType:Y.type,fileExt:c9(Y.name)};b(!0);try{const P=await w(Y);r({...ee,url:P}),b(!1)}catch(P){r({error:`File upload fail: ${P&&P.message}`||"Unknown error"}),b(!1),o.current.value=""}},[b,r]);J.useEffect(()=>{!p&&!a&&(T(),r({hasTrigger:!0}))},[p,a,T,r]);const j=J.useCallback(()=>n(),[t]);return s&&!p?x.jsx(gi,{children:x.jsxs("div",{className:Gr(R0.wrap,"render-wrapper"),children:[x.jsx("p",{style:{cursor:"pointer"},onClick:T,children:g?x.jsx("span",{children:S("editor.attachment.uploading")}):x.jsx("span",{children:S("editor.attachment.please_upload")})}),x.jsx("input",{ref:o,type:"file",hidden:!0,onChange:M})]})}):p?x.jsx(gi,{children:x.jsxs("div",{className:Gr(R0.wrap,"render-wrapper"),onClick:T,children:[x.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[4px]",children:[x.jsx("span",{children:wP(f)}),x.jsxs("span",{children:[l,".",d]}),x.jsxs("span",{children:["(",UM(c),")"]})]}),x.jsx(Ve,{icon:"Trash2",action:j,tooltip:S("editor.delete")})]})}):m!=="null"?x.jsx(gi,{children:x.jsx("div",{className:Gr(R0.wrap,"render-wrapper"),onClick:T,children:x.jsx("p",{children:m})})}):x.jsx(x.Fragment,{})}const wle=Nt.create({name:"attachment",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"attachment"},button:({editor:e,t:r})=>({component:Ve,componentProps:{action:()=>e.chain().focus().setAttachment().run(),isActive:()=>!1,disabled:!1,icon:"Attachment",tooltip:r("editor.attachment.tooltip")}})}},parseHTML(){return[{tag:"div[class=attachment]"}]},renderHTML({HTMLAttributes:t}){const{url:e="",fileName:r="",fileSize:n="",fileType:i="",fileExt:o=""}=t||{};return["div",lt(this.options.HTMLAttributes||{},t||{}),e?["a",{href:e||"#"},["span",{class:"attachment__icon"},wP(i,!0)],["span",{class:"attachment__text"},`${r}.${o} (${UM(n)})`]]:["div",{class:"attachment__placeholder"}]]},addAttributes(){return{fileName:{default:null,parseHTML:fn("filename")},fileSize:{default:null,parseHTML:fn("filesize")},fileType:{default:null,parseHTML:fn("filetype")},fileExt:{default:null,parseHTML:fn("fileext")},url:{default:null,parseHTML:fn("url")},hasTrigger:{default:!1,parseHTML:t=>fn("hastrigger")(t)==="true"},error:{default:null,parseHTML:fn("error")}}},addCommands(){return{setAttachment:(t={})=>({chain:e})=>e().insertContent({type:this.name,attrs:t}).run()}},addNodeView(){return ko(ble)}}),Rm={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function xle(t){var W,Y;const[e,r]=J.useState({width:nd,height:nd}),[n,i]=J.useState({width:0,height:0}),[o]=J.useState([Rm.TOP_LEFT,Rm.TOP_RIGHT,Rm.BOTTOM_LEFT,Rm.BOTTOM_RIGHT]),[s,a]=J.useState(!1),[l,c]=J.useState({x:0,y:0,w:0,h:0,dir:""}),{align:d}=(W=t==null?void 0:t.node)==null?void 0:W.attrs,f=J.useMemo(()=>{var R;const{src:ee,alt:P,width:fe,height:de}=(R=t==null?void 0:t.node)==null?void 0:R.attrs,U=Lg(fe)?`${fe}px`:fe,ne=Lg(de)?`${de}px`:de;return{src:ee||void 0,alt:P||void 0,style:{width:U||void 0,height:ne||void 0}}},[(Y=t==null?void 0:t.node)==null?void 0:Y.attrs]),p=J.useMemo(()=>{const{style:{width:ee}}=f;return{width:ee==="100%"?ee:void 0}},[f]);function m(ee){i({width:ee.target.width,height:ee.target.height})}function g(){const{editor:ee,getPos:P}=t;ee.commands.setNodeSelection(P())}const b=J.useCallback(Xl(()=>{const{editor:ee}=t,{width:P}=getComputedStyle(ee.view.dom);r(fe=>({...fe,width:Number.parseInt(P,10)}))},id),[t==null?void 0:t.editor]);function S(ee,P){ee.preventDefault(),ee.stopPropagation();const fe=n.width,de=n.height,U=fe/de;let ne=Number(t.node.attrs.width),R=Number(t.node.attrs.height);const le=e.width;ne&&!R?(ne=ne>le?le:ne,R=Math.round(ne/U)):R&&!ne?(ne=Math.round(R*U),ne=ne>le?le:ne):!ne&&!R?(ne=fe>le?le:fe,R=Math.round(ne/U)):ne=ne>le?le:ne,us.flushSync(()=>{a(!0),c({x:ee.clientX,y:ee.clientY,w:ne,h:R,dir:P})})}const w=J.useCallback(Xl(ee=>{if(ee.preventDefault(),ee.stopPropagation(),!s)return;const{x:P,w:fe,dir:de}=l,U=(ee.clientX-P)*(/l/.test(de)?-1:1),ne=hN(fe+U,yS,e.width);t.updateAttributes({width:ne,height:null})},id),[s,l,e,t.updateAttributes]),T=J.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),s&&(us.flushSync(()=>{c({x:0,y:0,w:0,h:0,dir:""}),a(!1)}),g())},[s,g]),M=J.useCallback(()=>{document==null||document.addEventListener("mousemove",w,!0),document==null||document.addEventListener("mouseup",T,!0)},[w,T]),j=J.useCallback(()=>{document==null||document.removeEventListener("mousemove",w,!0),document==null||document.removeEventListener("mouseup",T,!0)},[w,T]);J.useEffect(()=>(s?M():j(),()=>{j()}),[s,M,j]);const $=J.useMemo(()=>new ResizeObserver(()=>b()),[b]);return J.useEffect(()=>($.observe(t.editor.view.dom),()=>{$.disconnect()}),[t.editor.view.dom,$]),x.jsx(gi,{className:"image-view",style:{...p,width:"100%",textAlign:d},children:x.jsxs("div",{draggable:"true","data-drag-handle":!0,className:`image-view__body ${t!=null&&t.selected?"image-view__body--focused":""} ${s?"image-view__body--resizing":""}`,style:p,children:[x.jsx("img",{src:f.src,alt:f.alt,style:f.style,height:"auto",className:"image-view__body__image block",onLoad:m,onClick:g}),(t==null?void 0:t.editor.view.editable)&&((t==null?void 0:t.selected)||s)&&x.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(ee=>x.jsx("span",{className:`image-resizer__handler image-resizer__handler--${ee}`,onMouseDown:P=>S(P,ee)},`image-dir-${ee}`))})]})})}function Sle({selectImage:t,giphyApiKey:e,children:r}){const[n,i]=J.useState([]),[o]=J.useState(15),s=J.useRef(null),a=(c,d="search")=>{if(!e)return;const p=`${d==="search"?`https://api.giphy.com/v1/gifs/search?q=${c}`:`https://api.giphy.com/v1/gifs/trending?q=${c}`}&limit=${o}&api_key=${e}`;fetch(p).then(m=>m.json()).then(m=>{i(m.data)}).catch(m=>{console.log(m)})};J.useEffect(()=>{a("","trend")},[]);const l=J.useCallback(tv(c=>{if(!c.target.value){a("","trend");return}a(c.target.value)},350),[]);return x.jsxs(xi,{modal:!0,children:[x.jsx(Si,{asChild:!0,children:r}),x.jsx(Xn,{hideWhenDetached:!0,className:"richtext-w-full richtext-h-full richtext-p-2",align:"start",side:"bottom",children:e?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"richtext-w-full richtext-mb-[10px]",children:x.jsx(hn,{ref:s,type:"text",placeholder:"Search GIF",onChange:l})}),x.jsx("div",{className:"richtext-max-h-[280px] richtext-overflow-y-auto",children:x.jsx("div",{className:"richtext-grid richtext-grid-cols-2 richtext-gap-1 ",children:n!=null&&n.length?n==null?void 0:n.map(c=>x.jsx("img",{alt:"giphy",className:"richtext-text-center richtext-cursor-pointer",onClick:d=>t(c),height:c.images.fixed_width_downsampled.height,width:c.images.fixed_width_downsampled.width,src:c.images.fixed_width_downsampled.url},`giphy-${c.id}`)):x.jsx("p",{children:"No GIFs found"})})})]}):x.jsx("div",{children:x.jsx("p",{children:"Missing Giphy API Key"})})})]})}function kle({editor:t,icon:e,giphyApiKey:r,...n}){const i=o=>{const{url:s}=o.images.original;t.chain().focus().setImageGif({src:s}).run()};return x.jsx(Sle,{selectImage:i,giphyApiKey:r,children:x.jsx(Ve,{tooltip:n==null?void 0:n.tooltip,icon:e})})}const wk=ZS.extend({name:"imageGif",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),inline:!1,content:"",marks:"",group:"block",GIPHY_API_KEY:"",draggable:!1,selectable:!0,atom:!0,button:({editor:e,extension:r,t:n})=>{var o;const i=((o=r==null?void 0:r.options)==null?void 0:o.GIPHY_API_KEY)||"";return{component:kle,componentProps:{editor:e,action:()=>{},isActive:()=>!1,disabled:!1,icon:"GifIcon",tooltip:n("editor.imageGif.tooltip"),giphyApiKey:i}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:e=>{const r=e.style.width||e.getAttribute("width")||"10";return r===void 0?null:Number.parseInt(`${r}`,10)},renderHTML:e=>({width:e.width})},align:{default:"center",parseHTML:e=>e.getAttribute("align"),renderHTML:e=>({align:e.align})}}},addNodeView(){return ko(xle)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),setImageGif:e=>({commands:r})=>r.insertContent({type:this.name,attrs:e}),updateImageGif:e=>({commands:r})=>r.updateAttributes(this.name,e),setAlignImageGif:e=>({commands:r})=>r.updateAttributes(this.name,{align:e})}},renderHTML({HTMLAttributes:t}){const{align:e}=t;return["div",{style:e?`text-align: ${e};`:"",class:"imageGIf"},["img",lt({height:"auto"},this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"div[class=imageGIf]",getAttrs:t=>{const e=t.querySelector("img"),r=e==null?void 0:e.getAttribute("width");return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),title:e==null?void 0:e.getAttribute("title"),width:r?Number.parseInt(r,10):null,align:(e==null?void 0:e.getAttribute("align"))||t.style.textAlign||null}}}]}}),_R=`graph TB
420
+ a-->b`,_le=({editor:t,upload:e})=>{const[r,n]=J.useState(_R),[i,o]=J.useState(""),[s,a]=J.useState(!1),l=J.useRef(null),c=async p=>{try{const{svg:m}=await rg.render("mermaid-svg",p);o(m)}catch{o("")}},d=()=>{rg.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,theme:"base"}),c(r)};J.useEffect(()=>{s&&d()},[s]),J.useEffect(()=>{s&&c(r)},[r]);const f=async()=>{if(r!==""){if(r){const p=l.current.querySelector("svg"),{width:m,height:g}=p.getBoundingClientRect(),b=`mermaid-${$M()}.svg`;let S=HM(p.outerHTML);if(e){const w=bS(S,b);S=await e(w)}t==null||t.chain().focus().setMermaid({type:"mermaid",src:S,alt:encodeURIComponent(r),width:m,height:g},!!r).run()}a(!1)}};return x.jsxs(ac,{open:s,onOpenChange:a,children:[x.jsx(lc,{asChild:!0,children:x.jsx(Ve,{icon:"Mermaid",tooltip:"Mermaid",action:()=>a(!0)})}),x.jsxs(Ma,{className:"!richtext-max-w-[1300px] richtext-z-[99999]",children:[x.jsx(Na,{children:"Mermaid"}),x.jsx("div",{style:{height:"100%",borderWidth:1},children:x.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[x.jsx(Kh,{className:"richtext-flex-1",value:r,onChange:p=>n(p.target.value),autoFocus:!0,required:!0,rows:10,defaultValue:_R,placeholder:"Text",style:{color:"hsl(var(--richtext-foreground))"}}),x.jsx("div",{className:"richtext-flex-1 richtext-flex richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",style:{height:"100%",borderWidth:1,minHeight:500,background:"#fff"},ref:l,dangerouslySetInnerHTML:{__html:i}})]})}),x.jsx(_d,{children:x.jsx(Mt,{type:"button",onClick:f,children:"Save changes"})})]})]})},Im={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function Ele({editor:t,node:e,updateAttributes:r,getPos:n,selected:i}){const[o,s]=J.useState({width:nd,height:nd}),[a,l]=J.useState({width:0,height:0}),[c]=J.useState([Im.TOP_LEFT,Im.TOP_RIGHT,Im.BOTTOM_LEFT,Im.BOTTOM_RIGHT]),[d,f]=J.useState(!1),[p,m]=J.useState({x:0,y:0,w:0,h:0,dir:""}),{align:g}=e==null?void 0:e.attrs,b=J.useMemo(()=>{const{src:fe,alt:de,width:U,height:ne}=e==null?void 0:e.attrs,R=X0(U)?`${U}px`:U,le=X0(ne)?`${ne}px`:ne;return{src:fe||void 0,alt:de||void 0,style:{width:R||void 0,height:le||void 0}}},[e==null?void 0:e.attrs]),S=J.useMemo(()=>{const{style:{width:fe}}=b;return{width:fe==="100%"?fe:void 0}},[b]);function w(fe){l({width:fe.target.width,height:fe.target.height})}function T(){t.commands.setNodeSelection(n())}const M=J.useCallback(Xl(()=>{const{width:fe}=getComputedStyle(t.view.dom);s(de=>({...de,width:Number.parseInt(fe,10)}))},id),[t]);function j(fe,de){fe.preventDefault(),fe.stopPropagation();const U=a.width,ne=a.height,R=U/ne;let le=Number(e.attrs.width),Ce=Number(e.attrs.height);const he=o.width;le&&!Ce?(le=le>he?he:le,Ce=Math.round(le/R)):Ce&&!le?(le=Math.round(Ce*R),le=le>he?he:le):!le&&!Ce?(le=U>he?he:U,Ce=Math.round(le/R)):le=le>he?he:le,us.flushSync(()=>{f(!0),m({x:fe.clientX,y:fe.clientY,w:le,h:Ce,dir:de})})}const $=J.useCallback(Xl(fe=>{if(fe.preventDefault(),fe.stopPropagation(),!d)return;const{x:de,w:U,dir:ne}=p,R=(fe.clientX-de)*(/l/.test(ne)?-1:1),le=PM(U+R,yS,o.width);r({width:le,height:null})},id),[d,p,o,r]),W=J.useCallback(fe=>{fe.preventDefault(),fe.stopPropagation(),d&&(us.flushSync(()=>{m({x:0,y:0,w:0,h:0,dir:""}),f(!1)}),T())},[d,T]),Y=J.useCallback(()=>{document==null||document.addEventListener("mousemove",$,!0),document==null||document.addEventListener("mouseup",W,!0)},[$,W]),ee=J.useCallback(()=>{document==null||document.removeEventListener("mousemove",$,!0),document==null||document.removeEventListener("mouseup",W,!0)},[$,W]);J.useEffect(()=>(d?Y():ee(),()=>{ee()}),[d,Y,ee]);const P=J.useMemo(()=>new ResizeObserver(()=>M()),[M]);return J.useEffect(()=>(P.observe(t.view.dom),()=>{P.disconnect()}),[t.view.dom,P]),x.jsx(gi,{className:"image-view",style:{...S,width:"100%",textAlign:g},children:x.jsxs("div",{draggable:"true","data-drag-handle":!0,className:`image-view__body ${i?"image-view__body--focused":""} ${d?"image-view__body--resizing":""}`,style:{...S,background:"#fff"},children:[x.jsx("img",{src:b.src,alt:b.alt,style:b.style,height:"auto",className:"image-view__body__image block",onLoad:w,onClick:T}),t.view.editable&&(i||d)&&x.jsx("div",{className:"image-resizer",children:c==null?void 0:c.map(fe=>x.jsx("span",{className:`image-resizer__handler image-resizer__handler--${fe}`,onMouseDown:de=>j(de,fe)},`image-dir-${fe}`))})]})})}const S1=ZS.extend({name:"mermaid",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),inline:!1,content:"",marks:"",group:"block",draggable:!1,selectable:!0,atom:!0,HTMLAttributes:{class:"mermaid"},button:({editor:e,t:r,extension:n})=>{var i;return{component:_le,componentProps:{action:()=>{},isActive:()=>!1,disabled:!1,editor:e,icon:"Mermaid",tooltip:r("editor.mermaid.tooltip"),upload:(i=n==null?void 0:n.options)==null?void 0:i.upload}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:e=>{const r=e.style.width||e.getAttribute("width")||"10";return r===void 0?null:Number.parseInt(`${r}`,10)},renderHTML:e=>({width:e.width})},height:{default:null,parseHTML:e=>{const r=e.style.height||e.getAttribute("height")||"10";return r===void 0?null:Number.parseInt(`${r}`,10)},renderHTML:e=>({height:e.height})},align:{default:"center",parseHTML:e=>e.getAttribute("align"),renderHTML:e=>({align:e.align})}}},addNodeView(){return ko(Ele)},addCommands(){return{setMermaid:(t,e)=>({commands:r,editor:n})=>e?r.insertContent({type:this.name,attrs:t}):r.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:t}),setAlignImageMermaid:t=>({commands:e})=>e.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:t}){const{align:e}=t;return["div",{style:e?`text-align: ${e};`:"",class:"imageMermaid"},["img",lt(this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"div[class=imageMermaid]",getAttrs:t=>{const e=t.querySelector("img"),r=e==null?void 0:e.getAttribute("width"),n=e==null?void 0:e.getAttribute("height");return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),width:r?Number.parseInt(r,10):null,height:n?Number.parseInt(n,10):null,align:(e==null?void 0:e.getAttribute("align"))||t.style.textAlign||null}}}]}});function Cle(){var o;const t=J.useRef({editor:null}),[e,r]=J.useState(!1),[n,i]=J.useState(null);return J.useEffect(()=>{var s;(s=t.current)!=null&&s.editor&&(r(!0),i(t.current.editor))},[t,(o=t.current)==null?void 0:o.editor]),{isReady:e,editor:n,editorRef:t}}exports.Attachment=wle;exports.BaseKit=HJ;exports.Blockquote=_Y;exports.Bold=uX;exports.BubbleMenu=qn;exports.BulletList=hY;exports.Clear=pY;exports.Code=CX;exports.CodeBlock=ED;exports.Color=sY;exports.Column=lv;exports.ColumnActionButton=LJ;exports.Emoji=hee;exports.Excalidraw=Cl;exports.ExportPdf=wee;exports.ExportWord=Uae;exports.FontFamily=qX;exports.FontSize=rY;exports.FormatPainter=PQ;exports.Heading=JX;exports.Highlight=uY;exports.History=dJ;exports.HorizontalRule=ZY;exports.Iframe=Tl;exports.Image=$D;exports.ImageGif=wk;exports.ImportWord=_ee;exports.Indent=VJ;exports.Italic=gX;exports.Katex=Ml;exports.LineHeight=JJ;exports.Link=YY;exports.Mention=ule;exports.Mermaid=S1;exports.MoreMark=WJ;exports.MultiColumn=dd;exports.OrderedList=yY;exports.SearchAndReplace=QD;exports.SlashCommand=oZ;exports.Strike=SX;exports.SubAndSuperScript=$J;exports.Table=DQ;exports.TableOfContents=bP;exports.TaskList=xY;exports.TextAlign=eY;exports.TextDirection=tle;exports.Twitter=Ng;exports.Underline=vX;exports.Video=UD;exports.default=vG;exports.en=_M;exports.hu_HU=AM;exports.locale=k7;exports.pt_BR=EM;exports.useEditorState=Cle;exports.vi=CM;exports.zh_CN=TM;