@witty-works/editor 2.5.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! @witty-works/editor 2.5.0 (ca58242a) | MIT | https://witty.works | third-party licenses: witty-editor.js.LICENSE.txt */
1
+ /*! @witty-works/editor 2.6.1 (4c007490) | MIT | https://witty.works | third-party licenses: witty-editor.js.LICENSE.txt */
2
2
  (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.witty-works-button{cursor:pointer!important;box-shadow:none!important;font:inherit!important;color:inherit!important;text-align:inherit!important;text-transform:none!important;line-height:inherit!important;background-color:#0000!important;border:none!important;outline:none!important;margin:0!important;padding:0!important}#witty-works-ext-popover{display:"flex";box-sizing:border-box;z-index:2147483647;background-color:#fff;border-radius:5px;min-width:272px;padding:0 8px;box-shadow:1px 0 18px 7px #3232321a}#witty-works-ext-popover-content{flex-direction:column;display:flex}.witty-works-ext-wittyworks-popover-alternative-btn-container{flex-direction:row;align-items:center;display:flex;margin-bottom:.5em!important}.witty-works-ext-wittyworks-popover-alternative-btn-container:hover .witty-works-ext-wittyworks-popover-alternative-btn{background-color:#5fca7d4d}.witty-works-ext-wittyworks-popover-alternative-btn-container:hover .witty-works-ext-wittyworks-popover-alternative-context{color:#365e3b}.witty-works-ext-wittyworks-popover-alternative-btn{cursor:pointer;font:inherit;text-align:left;background-color:#f1fff3;border:none;border-radius:4px;padding:3px 8px;display:table}.witty-works-ext-wittyworks-popover-alternative-btn.witty-works-ext-remove-text{text-decoration:line-through!important}button.witty-works-ext-dropdown-select{background:0 0}#witty-works-ext-popover button:focus-visible,#witty-works-ext-popover a:focus-visible{outline-offset:1px;outline:2px solid #9489db!important}.witty-works-ext-ignore-color-transformer{filter:invert(38%)sepia(2%)saturate(0%)hue-rotate(73deg)brightness()contrast(89%)}.witty-works-ext-ignore-color-transformer:hover{filter:invert(39%)sepia(86%)saturate(747%)hue-rotate(323deg)brightness(109%)contrast(80%);color:#8b1b1b;cursor:pointer}.witty-works-ext-lato-small-paragraph-title-h4{color:#000;font-family:Lato,Arial,Helvetica,sans-serif;font-size:22px;font-style:normal;font-weight:600;line-height:28px}.witty-works-ext-lato-popover-text{color:#000;font-family:Lato,Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:20px}.witty-works-ext-lato-popover-text-green{color:#365e3b;font-family:Lato,Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:20px}.witty-works-ext-lato-popover-text-gray{color:#656565;font-family:Lato,Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:20px}.witty-works-ext-lato-popover-text-light-gray{color:#ddd;stroke:#ddd;font-family:Lato,Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:20px}.witty-works-ext-lato-popup-title{color:#000;font-family:Lato,Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:700;line-height:20px}.witty-works-ext-lato-popup-text{color:#000;font-family:Lato,Arial,Helvetica,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.witty-works-ext-lato-popup-text-purple{color:#9489db;font-family:Lato,Arial,Helvetica,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:20px;text-decoration-line:underline}.witty-works-ext-button{cursor:pointer;border:none;gap:10px;margin-right:1em;padding:10px 15px;font-family:Lato,Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:14px;display:flex}.witty-works-ext-primary-button-red{color:#fff;background:#f06464;border-radius:8px}.witty-works-ext-primary-button-purple{color:#fff;background:#9489db;border-radius:8px}.witty-works-ext-secondary-button-purple{color:#8b1b1b;background:#fff;border:1px solid #8b1b1b;border-radius:8px}.witty-works-ext-secondary-button-red{color:#f06464;border:1px solid #f06464;border-radius:8px;padding:.4em}.witty-works-ext-ignore-button{padding:2px 6px}.witty-works-ext-strong-gradient-background{background:linear-gradient(114.59deg,#f06464 1.6%,#f277d0 32.79%,#9489db 71.64%,#37d1e5 101.91%,#5acfb9 131.52%)}.witty-works-ext-light-gray-background{background:#eee}.witty-works-ext-dark-gray-background{background:#ddd}.witty-works-ext-section{flex-direction:column;justify-content:space-around;padding-bottom:0;display:flex;padding:1em!important}.witty-works-ext-ignore-section{flex-direction:row;align-items:center;padding-bottom:0;font-size:12px;display:flex;white-space:nowrap!important;justify-content:flex-start!important;margin-right:.5em!important;padding:0 0 1em .3em!important}.witty-works-ext-wittyworks-container{align-items:left;flex-direction:column;padding-bottom:.5em;display:flex}.witty-works-ext-container-rounded{border-radius:8px}.witty-works-ext-container-row{align-items:center;display:flex;flex-direction:row!important}.witty-works-ext-rephrasing ins{color:#00f!important}.witty-works-ext-rephrasing del{color:red!important}.witty-works-ext-justify-start{justify-content:flex-start!important}.witty-works-ext-justify-end{justify-content:flex-end!important}.witty-works-ext-justify-space-between{justify-content:space-between!important}.witty-works-ext-center{flex-direction:column;justify-content:center;align-items:center;display:flex}.witty-works-ext-full-padding{padding:1em}.witty-works-ext-left{flex-direction:column;justify-content:center;align-items:flex-start;display:flex}.witty-works-ext-margin-right{display:flex;margin-right:.5em!important}.witty-works-ext-margin-left{margin-left:.5em!important}.witty-works-ext-margin-top{margin-top:1em!important}.witty-works-ext-margin-top-half{margin-top:.5em!important}.witty-works-ext-margin-bottom{margin-bottom:1em!important}.witty-works-ext-body{color:#000;font-family:Lato,Arial,Helvetica,sans-serif}#witty-works-ext-popup-root{flex-direction:column;min-width:300px;display:flex}.witty-works-ext-header{justify-content:space-between;padding:1em 1em 1.3em;display:flex}.witty-works-ext-header svg{cursor:pointer}.witty-works-ext-separator{background-color:#f1f2f2;border:0;width:calc(100% + 16px);height:1px;margin-left:-8px;overflow:hidden}.witty-works-ext-cursor-pointer{cursor:pointer}.witty-works-ext-margin-auto{margin-top:auto;margin-bottom:auto}.witty-works-ext-learning-bite-dig-deeper{background-color:#fff;border:none;justify-content:space-between;align-items:center;min-width:800px;min-height:320px;margin:1em 1em .4em;display:flex}.witty-works-ext-dropdown-select{cursor:pointer;color:#8b1b1b;border:1px solid #8b1b1b;border-radius:8px;gap:10px;margin-right:1em;padding:10px 15px;font-family:Lato,Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:14px;display:flex}.witty-works-dig-deeper{cursor:pointer;color:#fff;background-color:#8b1b1b;border-radius:8px;gap:10px;max-width:fit-content;margin-top:20px;margin-right:1em;padding:10px 15px;font-family:Lato,Arial,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:14px;display:flex}.witty-preferences{color:#1a1a1a;font-family:Lato,Arial,Helvetica,sans-serif;font-size:15px;line-height:1.5}.witty-preferences section+section{border-top:1px solid #e6e6e6;margin-top:1.6em;padding-top:1.2em}.witty-preferences h2{margin:0 0 .6em;font-size:17px}.witty-preferences label{margin-top:1.2em;margin-bottom:.3em;font-weight:600;display:block}.witty-preferences input[type=checkbox]{width:auto;margin:0}.witty-preferences label:has(input[type=checkbox]){align-items:center;margin-top:.5em;font-weight:400;display:flex}.witty-options-muted{color:#666;font-size:.92em}.witty-category-group{margin-top:1.4em}.witty-category-group h3{color:#4a4a4a;text-transform:uppercase;letter-spacing:.04em;margin:0 0 .4em;font-size:14px}.witty-category{align-items:center;gap:.7em;padding:.32em 0;display:flex}.witty-category-label{flex:1}.witty-category-level{color:#666;text-align:right;min-width:5.5em;font-size:.88em}.witty-category-toggle{cursor:pointer;background:#ccc;border:0;border-radius:11px;flex:none;width:46px;height:22px;padding:0;transition:background .12s ease-in-out;position:relative}.witty-category-toggle .witty-category-knob{background:#fff;border-radius:50%;width:16px;height:16px;transition:left .12s ease-in-out;position:absolute;top:3px;left:3px}.witty-category-toggle.is-on{background:#5fca7d}.witty-category-toggle.is-on .witty-category-knob{left:27px}.witty-category-toggle.is-middle{background:#a8dfb8}.witty-category-toggle.is-middle .witty-category-knob{left:15px}.witty-category-toggle.is-locked{cursor:not-allowed;opacity:.55}.witty-category-toggle:focus-visible{outline-offset:2px;outline:2px solid #55b8e9}.witty-format-field{margin-top:1.2em}.witty-format-field label{margin-top:0}.witty-format-field p{margin:.2em 0 .5em}.witty-format-field select{box-sizing:border-box;width:100%;font:inherit;background:#fff;border:1px solid #ccc;border-radius:4px;padding:8px 10px}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
3
3
  var WittyEditor=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},c=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),l=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},u=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},d=(e,r,i)=>(i=e==null?{}:t(a(e)),u(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),f=e=>o.call(e,`module.exports`)?e[`module.exports`]:u(n({},`__esModule`,{value:!0}),e),p=Object.defineProperty,m=(e,t)=>{let n={};for(var r in e)p(n,r,{get:e[r],enumerable:!0});return t||p(n,Symbol.toStringTag,{value:`Module`}),n};function h(e){this.content=e}h.prototype={constructor:h,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new h(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new h(n)},addToStart:function(e,t){return new h([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new h(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new h(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=h.from(e),e.size?new h(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=h.from(e),e.size?new h(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=h.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},h.from=function(e){if(e instanceof h)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new h(t)};function g(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r<e.length&&r<t.length&&y(e.charCodeAt(r-1))&&v(e.charCodeAt(r))&&n--,n}if(i.content.size||a.content.size){let e=g(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function _(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,i=e.length,a=t.length;for(;i>0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i<e.length&&y(e.charCodeAt(i-1))&&v(e.charCodeAt(i))&&(n++,r++),{a:n,b:r}}if(o.content.size||s.content.size){let e=_(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}function v(e){return e>=56320&&e<57344}function y(e){return e>=55296&&e<56320}var b=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return g(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return _(this,e,t,n)}findIndex(e){if(e==0)return S(0,e);if(e==this.size)return S(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?S(t+1,i):S(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};b.empty=new b([],0);var x={index:0,offset:0};function S(e,t){return x.index=e,x.offset=t,x}function C(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!C(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!C(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var w=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&C(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};w.none=[];var T=class extends Error{},E=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=O(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(D(this.content,t+this.openStart,n+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(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(b.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};E.empty=new E(b.empty,0,0);function D(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(D(a.content,t-i-1,n-i-1)))}function O(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=O(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function ee(e,t,n){if(n.openStart>e.depth)throw new T(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new T(`Inconsistent open depths`);return te(e,t,n,0)}function te(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=te(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}if(!n.content.size)return ie(a,oe(e,t,r));if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return ie(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}{let{start:i,end:o}=se(n,e);return ie(a,ae(e,i,o,t,r))}}function ne(e,t){if(!t.type.compatibleContent(e.type))throw new T(`Cannot join `+t.type.name+` onto `+e.type.name)}function re(e,t,n){let r=e.node(n);return ne(r,t.node(n)),r}function k(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function A(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(k(e.nodeAfter,r),a++));for(let e=a;e<o;e++)k(i.child(e),r);t&&t.depth==n&&t.textOffset&&k(t.nodeBefore,r)}function ie(e,t){if(!e.type.validContent(t))throw new T(`Invalid content for node `+e.type.name);return e.copy(t)}function ae(e,t,n,r,i){let a=e.depth>i&&re(e,t,i+1),o=r.depth>i&&re(n,r,i+1),s=[];return A(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(ne(a,o),k(ie(a,ae(e,t,n,r,i+1)),s)):(a&&k(ie(a,oe(e,t,i+1)),s),A(t,n,i,s),o&&k(ie(o,oe(n,r,i+1)),s)),A(r,null,i,s),new b(s)}function oe(e,t,n){let r=[];return A(null,e,n,r),e.depth>n&&k(ie(re(e,t,n+1),oe(e,t,n+1)),r),A(t,null,n,r),new b(r)}function se(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(b.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var ce=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw 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 RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return w.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new fe(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 t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=de.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else de.set(t,r=new le);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%ue,i}},le=class{constructor(){this.elts=[],this.i=0}},ue=12,de=new WeakMap,fe=class{constructor(e,t,n){this.$from=e,this.$to=t,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)}},pe=Object.create(null),me=class e{constructor(e,t,n,r=w.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||b.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&C(this.attrs,t||e.defaultAttrs||pe)&&w.sameSet(this.marks,n||w.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return E.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new E(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return ee(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return ce.resolveCached(this,e)}resolveNoCache(e){return ce.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}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()+`)`),ge(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=b.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.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),_e(this.type.attrs,this.attrs,`node`,this.type.name);let e=w.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];_e(n.type.attrs,n.attrs,`mark`,n.type.name),e=n.addToSet(e)}if(!w.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=b.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};me.prototype.text=void 0;var he=class e extends me{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ge(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function ge(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function _e(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var ve=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new ye(t,n);if(r.next==null)return e.empty;let i=be(r);r.next&&r.err(`Unexpected trailing text`);let a=Ae(De(i));return je(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return b.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
4
4
  `)}};ve.empty=new ve(!0);var ye=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function be(e){let t=[];do t.push(xe(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function xe(e){let t=[];do t.push(Se(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function Se(e){let t=Ee(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=we(e,t);else break;return t}function Ce(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function we(e,t){let n=Ce(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:Ce(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function Te(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function Ee(e){if(e.eat(`(`)){let t=be(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=Te(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function De(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function Oe(e,t){return t-e}function ke(e,t){let n=[];return r(t),n.sort(Oe);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Ae(e){let t=Object.create(null);return n(ke(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);ke(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new ve(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(Oe);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function je(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function Me(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Ne(e,t){let n=Object.create(null);for(let r in e){let i=e[r],a=t&&t[r];if(a===void 0){if(i.hasDefault)a=i.default;else throw RangeError(`No value supplied for attribute `+r)}else i.validate&&i.validate(a);n[r]=a}return n}function Pe(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Le(e,r,t[r]);return n}var Fe=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=Pe(e,n.attrs),this.defaultAttrs=Me(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==ve.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:Ne(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new me(this,this.computeAttrs(e),b.from(t),w.setFrom(n))}createChecked(e=null,t,n){return t=b.from(t),this.checkContent(t),new me(this,this.computeAttrs(e),t,w.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=b.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(b.empty,!0);return i?new me(this,e,t.append(i),w.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:w.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function Ie(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var Le=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?Ie(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},Re=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Pe(e,r.attrs),this.excluded=null;let i=Me(this.attrs);this.instance=i?new w(this,i):null}create(e=null){return!e&&this.instance?this.instance:new w(this,Ne(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}},ze=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=h.from(e.nodes),t.marks=h.from(e.marks||{}),this.nodes=Fe.compile(this.spec.nodes,this),this.marks=Re.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=ve.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?Be(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:Be(this,n.split(` `))}this.nodeFromJSON=e=>me.fromJSON(this,e),this.markFromJSON=e=>w.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof Fe))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new he(n,n.defaultAttrs,e,w.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function Be(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function Ve(e){return e.tag!=null}function He(e){return e.style!=null}var Ue=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(Ve(e))this.tags.push(e);else if(He(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new Qe(this,t,!1);return n.addAll(e,w.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Qe(this,t,!0);return n.addAll(e,w.none,t.from,t.to),E.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(et(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=tt(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=tt(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},We={address:!0,article:!0,aside:!0,blockquote:!0,body:!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},Ge={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ke={ol:!0,ul:!0},qe=1,Je=2,Ye=4;function Xe(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?qe:0)|(t===`full`?Je:0)}var Ze=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=w.none,this.match=i||(a&Ye?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&qe)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!We.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Qe=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=Xe(null,t.preserveWhitespace,0)|(n?Ye:0);i=r?new Ze(r.type,r.attrs,w.none,!0,t.topMatch||r.type.contentMatch,a):n?new Ze(null,null,w.none,!0,null,a):new Ze(e.schema.topNodeType,null,w.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&Je?`full`:this.localPreserveWS||(r.options&qe)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
@@ -9,16 +9,16 @@ var WittyEditor=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`
9
9
  `),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:zr(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(ui&&l.focusNode&&l.focusNode!=s.node&&l.focusNode.nodeType==1){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&mi)&&Wr(o.node,o.offset,l.anchorNode,l.anchorOffset)&&Wr(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&ui)){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?ea:$i,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=ta:i.markDirty(e-r,t-r);return}i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?ea:ta}n=a}this.dirty=ea}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?ea:$i;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},ra=class extends na{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(a.nodeType!=1){let e=document.createElement(`span`);e.appendChild(a),a=e}a.hasAttribute(`contenteditable`)||(a.contentEditable=`false`),a.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==Qi&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},ia=class extends na{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},aa=class e extends na{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return(!o||!o.dom)&&(o=rt.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&ta||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ta&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Qi){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=Qi}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=Ea(a,n,o,r)),t>0&&(a=Ea(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},oa=class e extends na{constructor(e,t,n,r,i,a,o){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=rt.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=_a(u,r,n),l?c=new ua(t,n,r,i,u,d||null,f,l):n.isText?new ca(t,n,r,i,u,f):new e(t,n,r,i,u,d||null,f)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(t.preserveWhitespace=`full`),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}if(!t.contentElement){let n=e&&e.find(t=>t.nodeType==1&&e.indexOf(t.parentNode)<0&&this.dom.contains(t));n?t.contentElement=n:t.getContent=()=>b.empty}}return t}matchesNode(e,t,n){return this.dirty==Qi&&e.eq(this.node)&&va(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new ba(this,a&&a.node,e);Ca(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?w.none:this.node.child(i).marks,n,e,i),s.placeWidget(t,e,r)},(t,a,c,l)=>{s.syncToMarks(t.marks,n,e,l);let u;s.findNodeMatch(t,a,c,l)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,c,u,e)||s.updateNextNode(t,a,c,e,l,r)||s.addNode(t,a,c,e,r),r+=t.nodeSize}),s.syncToMarks([],n,e,0),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==ea)&&(a&&this.protectLocalComposition(e,a),da(this.contentDOM,this.children,e),hi&&wa(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof M)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=Ta(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new ia(this,i,t,r);e.input.compositionNodes.push(a),this.children=Ea(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==ta||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Qi}updateOuterDeco(e){if(va(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=ha(this.dom,this.nodeDOM,ma(this.outerDeco,this.node,t),ma(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function sa(e,t,n,r,i){_a(r,t,e);let a=new oa(void 0,e,t,n,r,r,r);return a.contentDOM&&a.updateChildren(i,0),a}var ca=class e extends oa{constructor(e,t,n,r,i,a){super(e,t,n,r,i,null,a)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==ta||this.dirty!=Qi&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Qi||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=Qi,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=ta)}get domAtom(){return!1}isText(e){return this.node.text==e}},la=class extends na{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Qi&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},ua=class extends oa{constructor(e,t,n,r,i,a,o,s){super(e,t,n,r,i,a,o),this.spec=s}update(e,t,n,r){if(this.dirty==ta)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}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 da(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=ya(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof aa){let t=r?r.previousSibling:e.lastChild;da(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=ya(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var fa=function(e){e&&(this.nodeName=e)};fa.prototype=Object.create(null);var pa=[new fa];function ma(e,t,n){if(e.length==0)return pa;let r=n?pa[0]:new fa,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o){o.nodeName&&i.push(r=new fa(o.nodeName));for(let e in o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new fa(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a))}}}return i}function ha(e,t,n,r){if(n==pa&&r==pa)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName?i=t:(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=pa[0],i=t)}ga(i,o||pa[0],a)}return i}function ga(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function _a(e,t,n){return ha(e,e,pa,ma(t,n,e.nodeType!=1))}function va(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ya(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var ba=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=xa(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=Qi,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i<0&&this.index<this.top.children.length){let t=this.top.children[this.index];t instanceof aa&&t.dirty!=ta&&t.mark.type==e[a].type&&t.spec.update&&!this.isLocked(t.dom)&&t.spec.update(e[a])&&(t.mark=e[a],i=this.index,this.changed=!0)}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=aa.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==ta&&a.dom==a.contentDOM&&(a.dirty=ea),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof oa){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=ta&&va(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=ea,u.updateChildren(r,a+1),u.dirty=Qi),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!va(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=oa.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=oa.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new ra(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof aa;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof ca)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((mi||fi)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new la(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}};function xa(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof aa)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function Sa(e,t){return e.type.side-t.type.side}function Ca(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u){if(d){d.sort(Sa);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c)}let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function wa(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function Ta(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function Ea(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&=(a.push(i),void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function Da(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(Qr(n)){for(c=o;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&N.isSelectable(e)&&i.parent&&!(e.isInline&&Xr(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new N(o==e?s:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=Ra(e,u,s,n)}return l}function Oa(e){return e.editable?e.hasFocus():Ba(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function ka(e,t=!1){let n=e.state.selection;if(Ia(e,n),!Oa(e))return;let r=e.input.mouseDown;if(!t&&fi&&r){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Wr(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)&&r.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Fa(e);else{let{anchor:r,head:i}=n,a,o;Aa&&!(n instanceof M)&&(n.$from.parent.inlineContent||(a=ja(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=ja(e,n.to))),e.docView.setSelection(r,i,e,t),Aa&&(a&&Na(a),o&&Na(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&Pa(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}var Aa=mi||fi&&pi<63;function ja(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(mi&&i&&i.contentEditable==`false`)return Ma(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return Ma(i);if(a)return Ma(a)}}function Ma(e){return e.contentEditable=`true`,mi&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Na(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function Pa(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!Oa(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function Fa(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,zr(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&ci&&li<=11&&(n.disabled=!0,n.disabled=!1)}function Ia(e,t){if(t instanceof N){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(La(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else La(e)}function La(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function Ra(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||M.between(t,n,r)}function za(e){return e.editable&&!e.hasFocus()?!1:Ba(e)}function Ba(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function Va(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Wr(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Ha(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&j.findFrom(a,t)}function Ua(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Wa(e,t,n){let r=e.state.selection;if(r instanceof M){if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return Ua(e,new M(r.$anchor,a))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=Ha(e.state,t);return n&&n instanceof N?Ua(e,n):!1}if(!(gi&&n.indexOf(`m`)>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?N.isSelectable(i)?Ua(e,new N(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):yi?Ua(e,new M(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1:!1}}else if(r instanceof N&&r.node.isInline)return Ua(e,new M(t>0?r.$to:r.$from));else{let n=Ha(e.state,t);return n?Ua(e,n):!1}}function Ga(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ka(e,t){let n=e.pmViewDesc;return n?n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`):e.nodeType==1&&e.contentEditable==`false`}function qa(e,t){return t<0?Ja(e):Ya(e)}function Ja(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(ui&&n.nodeType==1&&r<Ga(n)&&Ka(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let e=n.childNodes[r-1];if(Ka(e,-1))i=n,a=--r;else if(e.nodeType==3)n=e,r=n.nodeValue.length;else break}}else if(Xa(n))break;else{let t=n.previousSibling;for(;t&&Ka(t,-1);)i=n.parentNode,a=zr(t),t=t.previousSibling;if(t)n=t,r=Ga(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?$a(e,n,r):i&&$a(e,i,a)}function Ya(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Ga(n),a,o;for(;;)if(r<i){if(n.nodeType!=1)break;let e=n.childNodes[r];if(Ka(e,1))a=n,o=++r;else break}else if(Xa(n))break;else{let t=n.nextSibling;for(;t&&Ka(t,1);)a=t.parentNode,o=zr(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=Ga(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&$a(e,a,o)}function Xa(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Za(e,t){for(;e&&t==e.childNodes.length&&!Zr(e);)t=zr(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=0}}function Qa(e,t){for(;e&&!t&&!Zr(e);)t=zr(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function $a(e,t,n){if(t.nodeType!=3){let e,r;(r=Za(t,n))?(t=r,n=0):(e=Qa(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(Qr(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&ka(e)},50)}function eo(e,t){let n=e.state.doc.resolve(t);if(!(fi||_i)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}return getComputedStyle(e.dom).direction==`rtl`?`rtl`:`ltr`}function to(e,t,n){let r=e.state.selection;if(r instanceof M&&!r.empty||n.indexOf(`s`)>-1||gi&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=Ha(e.state,t);if(n&&n instanceof N)return Ua(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof jn?j.near(n,t):j.findFrom(n,t);return o?Ua(e,o):!1}return!1}function no(e,t){if(!(e.state.selection instanceof M))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function ro(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function io(e){if(!mi||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable==`false`){let n=t.firstChild;ro(e,n,`true`),setTimeout(()=>ro(e,n,`false`),20)}return!1}function ao(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function oo(e,t){let n=t.keyCode,r=ao(t);if(n==8||gi&&n==72&&r==`c`)return no(e,-1)||qa(e,-1);if(n==46&&!t.shiftKey||gi&&n==68&&r==`c`)return no(e,1)||qa(e,1);if(n==13||n==27)return!0;if(n==37||gi&&n==66&&r==`c`){let t=n==37?eo(e,e.state.selection.from)==`ltr`?-1:1:-1;return Wa(e,t,r)||qa(e,t)}if(n==39||gi&&n==70&&r==`c`){let t=n==39?eo(e,e.state.selection.from)==`ltr`?1:-1:1;return Wa(e,t,r)||qa(e,t)}return n==38||gi&&n==80&&r==`c`?to(e,-1,r)||qa(e,-1):n==40||gi&&n==78&&r==`c`?io(e)||to(e,1,r)||qa(e,1):!(r!=(gi?`m`:`c`)||n!=66&&n!=73&&n!=89&&n!=90)}function so(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||rt.fromSchema(e.state.schema),s=_o(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&l.nodeType==1&&(u=go[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&l.nodeType==1&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
10
10
 
11
11
  `),slice:t}}function co(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=!!t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return s=new E(b.from(e.state.schema.text(t.replace(/\r\n?/g,`
12
- `))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=rt.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=bo(n),yi&&xo(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&e.nodeType!=1;)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||Ue.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!lo.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=So(F(s,+u[1],+u[2]),u[4]);else if(s=E.maxOpen(uo(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=F(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var lo=/^(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 uo(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&po(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=mo(a[a.length-1],i.length));let n=fo(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return b.from(a)}return e}function fo(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,b.from(e));return e}function po(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=po(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(b.from(fo(n,e,i+1))))}}function mo(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,mo(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(b.empty,!0);return e.copy(n.append(r))}function ho(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=ho(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(b.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function F(e,t,n){return t<e.openStart&&(e=new E(ho(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new E(ho(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var go={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]};function _o(){return document.implementation.createHTMLDocument(`title`)}var vo=null;function yo(e){let t=window.trustedTypes;if(!t)return e;if(!vo){if(vo=t.defaultPolicy)try{return vo.createHTML(e)}catch{}vo=t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e})}return vo.createHTML(e)}function bo(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=_o(),r=n.body,i=/<([a-z][^>\s]+)/i.exec(e),a;if((a=i&&go[i[1].toLowerCase()])&&(e=a.map(e=>`<`+e+`>`).join(``)+e+a.map(e=>`</`+e+`>`).reverse().join(``)),r.innerHTML=yo(e),a)for(let e=0;e<a.length;e++)r=r.querySelector(a[e])||r;for(let e=0;e<n.styleSheets.length;e++){let t=n.styleSheets[e];for(let e=0;e<t.rules.length;e++){let n=t.rules[e];if(n instanceof CSSStyleRule){let e=r.querySelectorAll(n.selectorText);for(let t=0;t<e.length;t++)e[t].style.cssText+=n.style.cssText}}}return r}function xo(e){let t=e.querySelectorAll(fi?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function So(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;try{i=b.from(t.create(r[e+1],i))}catch{break}a++,o++}return new E(i,a,o)}var Co={},wo={},To={touchstart:!0,touchmove:!0},Eo=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Do(e){for(let t in Co){let n=Co[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{Mo(e,t)&&!jo(e,t)&&(e.editable||!(t.type in wo))&&n(e,t)},To[t]?{passive:!0}:void 0)}mi&&e.dom.addEventListener(`input`,()=>null),Ao(e)}function Oo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ko(e){e.input.mouseDown&&e.input.mouseDown.done(),e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Ao(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>jo(e,t))})}function jo(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function Mo(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function No(e,t){!jo(e,t)&&Co[t.type]&&(e.editable||!(t.type in wo))&&Co[t.type](e,t)}wo.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Xo(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(vi&&fi&&n.keyCode==13))){if(n.keyCode!=229&&e.domObserver.forceFlush(),hi&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,$r(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||oo(e,n)?n.preventDefault():Oo(e,`key`)}},wo.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},wo.keypress=(e,t)=>{let n=t;if(Xo(e)||!n.charCode||n.ctrlKey&&!n.altKey||gi&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof M)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function Po(e){return{left:e.clientX,top:e.clientY}}function Fo(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Io(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function Lo(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n==`pointer`&&r.setMeta(`pointer`,!0),e.dispatch(r)}function Ro(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&N.isSelectable(r)?(Lo(e,new N(n),`pointer`),!0):!1}function zo(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof N&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(N.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i!=null&&(Lo(e,N.create(e.state.doc,i),`pointer`),!0)}function Bo(e,t,n,r,i){return Io(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?zo(e,n):Ro(e,n))}function Vo(e,t,n,r){return Io(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function Ho(e,t,n,r){return Io(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||Uo(e,n,r)}function Uo(e,t,n){if(n.button!=0)return!1;let r=Wo(e,t,!0),i=e.state.doc;return r?(Lo(e,r,`pointer`),r instanceof M&&i.eq(e.state.doc)&&(e.input.mouseDown=new Yo(e,r)),!0):!1}function Wo(e,t,n){let r=e.state.doc;if(t==-1)return r.inlineContent?M.create(r,0,r.content.size):null;let i=r.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e),a=i.before(e);if(t.inlineContent)return M.create(r,a+1,a+1+t.content.size);if(n&&N.isSelectable(t))return N.create(r,a)}return null}function Go(e){return ns(e)}var Ko=gi?`metaKey`:`ctrlKey`;Co.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Go(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&Fo(n,e.input.lastClick)&&!n[Ko]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let o=e.posAtCoords(Po(n));o&&(a==`singleClick`?e.input.mouseDown=new Jo(e,o,n,!!r):(a==`doubleClick`?Vo:Ho)(e,o.pos,o.inside,n)?n.preventDefault():Oo(e,`pointer`))};var qo=class{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},Jo=class extends qo{constructor(e,t,n,r){super(e),this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[Ko],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&s.nodeDOM.nodeType==1?s.nodeDOM:null;let{selection:c}=e.state;n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof N&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!!(this.target&&ui&&!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()),Oo(e,`pointer`)}done(){super.done(),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(()=>{this.view.isDestroyed||ka(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Po(e))),this.updateAllowDefault(e),this.allowDefault||!t?Oo(this.view,`pointer`):Bo(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||mi&&this.mightDrag&&!this.mightDrag.node.isAtom||fi&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Lo(this.view,j.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):Oo(this.view,`pointer`)}move(e){this.updateAllowDefault(e),Oo(this.view,`pointer`),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},Yo=class extends qo{constructor(e,t){super(e),this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Oo(this.view,`pointer`);let t=this.view.posAtCoords(Po(e)),n=t&&Wo(this.view,t.inside,!1);if(!n)return;let{doc:r}=this.view.state,i=this.startSelection,[a,o]=n.from<i.from?[i.to,n.from]:[i.from,n.to];Lo(this.view,M.create(r,a,o),`pointer`)}};Co.touchstart=e=>{e.input.lastTouch=Date.now(),Go(e),Oo(e,`pointer`)},Co.touchmove=e=>{e.input.lastTouch=Date.now(),Oo(e,`pointer`)},Co.contextmenu=e=>Go(e);function Xo(e,t){return e.composing?!0:mi&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var Zo=vi?5e3:-1;wo.compositionstart=wo.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof M&&t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||fi&&_i&&Qo(e)))e.markCursor=e.state.storedMarks||n.marks(),ns(e,!0),e.markCursor=null;else if(ns(e,!t.selection.empty),ui&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&n.nodeType==1&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(t.nodeType==3){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}$o(e,Zo)};function Qo(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable==`false`}wo.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,$o(e,20))};function $o(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ns(e),t))}function es(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function ts(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Jr(t.focusNode,t.focusOffset),r=Yr(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(e&&e.isText(n.nodeValue))return r}}return n||r}function ns(e,t=!1){if(!(vi&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),es(e),t||e.docView&&e.docView.dirty){let n=Da(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function rs(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var is=ci&&li<15||hi&&bi<604;Co.copy=wo.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=is?null:n.clipboardData,{dom:o,text:s}=so(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):rs(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function as(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function ss(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?cs(e,r.value,null,i,t):cs(e,r.textContent,r.innerHTML,i,t)},50)}function cs(e,t,n,r,i){let a=co(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||E.empty)))return!0;if(!a)return!1;let o=as(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function ls(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}wo.paste=(e,t)=>{let n=t;if(e.composing&&!vi)return;let r=is?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&cs(e,ls(r),r.getData(`text/html`),i,n)?n.preventDefault():ss(e,n)};var us=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},ds=gi?`altKey`:`ctrlKey`;function fs(e,t){let n;return e.someProp(`dragCopies`,e=>{n||=e(t)}),n==null?!t[ds]:!n}Co.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(Po(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof N?i.to-1:i.to))){if(r&&r.mightDrag)o=N.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=N.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=so(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!fi||pi>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(is?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,is||n.dataTransfer.setData(`text/plain`,c),e.dragging=new us(l,fs(e,n),o)},Co.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},wo.dragover=wo.dragenter=(e,t)=>t.preventDefault(),wo.drop=(e,t)=>{try{ps(e,t,e.dragging)}finally{e.dragging=null}};function ps(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Po(t));if(!r)return;let i=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp(`transformPasted`,t=>{a=t(a,e,!1)}):a=co(e,ls(t.dataTransfer),is?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&fs(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||E.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?rn(e.state.doc,i.pos,a):i.pos;s??=i.pos;let c=e.state.tr;if(o){let{node:e}=n;e?e.replace(c):c.deleteSelection()}let l=c.mapping.map(s),u=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=c.doc;if(u?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),c.doc.eq(d))return;let f=c.doc.resolve(l);if(u&&N.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new N(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),c.setSelection(Ra(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}Co.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ka(e)},20))},Co.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},Co.beforeinput=(e,t)=>{if(vi&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,$r(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let e in wo)Co[e]=wo[e];function ms(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var hs=class e{constructor(e,t){this.toDOM=e,this.spec=t||bs,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new vs(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ms(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},gs=class e{constructor(e,t){this.attrs=e,this.spec=t||bs}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new vs(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&ms(this.attrs,t.attrs)&&ms(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},_s=class e{constructor(e,t){this.attrs=e,this.spec=t||bs}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new vs(i.pos-n,a.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&&ms(this.attrs,t.attrs)&&ms(this.spec,t.spec)}destroy(){}},vs=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new hs(n,r))}static inline(t,n,r,i){return new e(t,n,new gs(r,i))}static node(t,n,r,i){return new e(t,n,new _s(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof gs}get widget(){return this.type instanceof hs}},ys=[],bs={},xs=class e{constructor(e,t){this.local=e.length?e:ys,this.children=t.length?t:ys}static create(e,t){return t.length?ks(t,e,0,bs):Ss}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==Ss||e.maps.length==0?this:this.mapInner(e,t,0,0,n||bs)}mapInner(t,n,r,i,a){let o;for(let e=0;e<this.local.length;e++){let s=this.local[e].map(t,r,i);s&&s.type.valid(n,s)?(o||=[]).push(s):a.onRemove&&a.onRemove(this.local[e].spec)}return this.children.length?ws(this.children,o||[],t,n,r,i,a):o?new e(o.sort(As),ys):Ss}add(t,n){return n.length?this==Ss?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=Ds(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,ks(s,e,o+1,bs)),a+=3}});let o=Ts(a?Os(n):n,-r);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new e(o.length?this.local.concat(o).sort(As):this.local,i||this.children)}remove(e){return e.length==0||this==Ss?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==Ss?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):Ss}forChild(t,n){if(this==Ss)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof gs){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(As),ys);return r?new Cs([t,r]):t}return r||Ss}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return js(this.localsInner(e))}localsInner(e){if(this==Ss)return ys;if(e.inlineContent||!this.local.some(gs.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof gs||t.push(this.local[e]);return t}forEachSet(e){e(this)}};xs.empty=new xs([],[]),xs.removeOverlap=js;var Ss=xs.empty,Cs=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,bs));return e.from(r)}forChild(t,n){if(n.isLeaf)return xs.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=Ss&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length){if(!t)t=i;else{n&&=(t=t.slice(),!1);for(let e=0;e<i.length;e++)t.push(i[e])}}}return t?js(n?t:t.sort(As)):ys}static from(t){switch(t.length){case 0:return Ss;case 1:return t[0];default:return new e(t.every(e=>e instanceof xs)?t:t.reduce((e,t)=>e.concat(t instanceof xs?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function ws(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==Ss?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=ks(Es(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new xs(t.sort(As),s)}function Ts(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new vs(i.from+t,i.to+t,i.type))}return n}function Es(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function Ds(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function Os(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function ks(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=Ds(e,t,o+n);if(s){a=!0;let e=ks(s,t,n+o+1,r);e!=Ss&&i.push(o,o+t.nodeSize,e)}});let o=Ts(a?Os(e):e,-n).sort(As);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||(r.onRemove&&r.onRemove(o[e].spec),o.splice(e--,1));return o.length||i.length?new xs(o,i):Ss}function As(e,t){return e.from-t.from||e.to-t.to}function js(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),Ms(t,i+1,a.copy(r.to,a.to)));continue}a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),Ms(t,i,r.copy(a.from,r.to)));break}}return t}function Ms(e,t,n){for(;t<e.length&&As(n,e[t])>0;)t++;e.splice(t,0,n)}function Ns(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=Ss&&t.push(r)}),e.cursorWrapper&&t.push(xs.create(e.state.doc,[e.cursorWrapper.deco])),Cs.from(t)}var Ps={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Fs=ci&&li<=11,Is=class{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}},Ls=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Is,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);ci&&li<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():mi&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Fs&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.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,Ps)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(za(this.view)){if(this.suppressingSelectionUpdates)return ka(this.view);if(ci&&li<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Wr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=Br(n))t.add(n);for(let r=e.anchorNode;r;r=Br(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.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 t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&za(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(s.some(e=>e.nodeName==`BR`)&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||fi&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some(e=>e.type==`childList`&&e.removedNodes.length))){for(let e of s)if(e.nodeName==`BR`&&e.parentNode){let t=e.nextSibling;for(;t&&t.nodeType==1;){if(t.contentEditable==`false`){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(ui&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||Us(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Qr(n)&&(c=Da(e))&&c.eq(j.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ka(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),Bs(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Ws(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||ka(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.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 n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),r.nodeType==3&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(ci&&li<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?zr(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?zr(i):e.target.childNodes.length;return{from:o,to:n.localPosFromDOM(e.target,s,1)}}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})}},Rs=new WeakMap,zs=!1;function Bs(e){if(!Rs.has(e)&&(Rs.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=ui,zs)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.`),zs=!0}}function Vs(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return Wr(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Hs(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return Vs(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?Vs(e,n):null}function Us(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function Ws(e,t){let{focusNode:n,focusOffset:r}=e.domSelectionRange();for(let i of t)if(i.parentNode?.nodeName==`TR`){let t=i.nextSibling;for(;t&&t.nodeName!=`TD`&&t.nodeName!=`TH`;)t=t.nextSibling;if(t){let a=t;for(;;){let e=a.firstChild;if(!e||e.nodeType!=1||e.contentEditable==`false`||/^(BR|IMG)$/.test(e.nodeName))break;a=e}a.insertBefore(i,a.firstChild),n==i&&e.domSelection().collapse(i,r)}else i.parentNode.removeChild(i)}}function Gs(e,t,n,r){let{node:i,fromOffset:a,toOffset:o,from:s,to:c}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,d=l.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:l.anchorOffset}],Qr(l)||u.push({node:l.focusNode,offset:l.focusOffset})),fi&&e.input.lastKeyCode===8)for(let e=o;e>a;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){o=e;break}if(!n||n.size)break}let f=e.state.doc,p=e.someProp(`domParser`)||Ue.fromSchema(e.state.schema),m=f.resolve(s),h=null,g=p.parse(i,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:a,to:o,preserveWhitespace:m.parent.type.whitespace!=`pre`||`full`,findPositions:u,ruleFromNode:Ks(r),context:m});if(u&&u[0].pos!=null){let e=u[0].pos,t=u[1]&&u[1].pos;t??=e,h={anchor:e+s,head:t+s}}return{doc:g,sel:h,from:s,to:c}}var Ks=e=>t=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);if(t.nodeName==`BR`&&t.parentNode){if(mi&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}if(t.parentNode.lastChild==t||mi&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName==`IMG`&&t.getAttribute(`mark-placeholder`))return{ignore:!0};return null},qs=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Js(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Da(e,t);if(n&&!e.state.selection.eq(n)){if(fi&&vi&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,$r(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=Gs(e,t,n,i),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=ec(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(hi&&e.input.lastIOSEnter>Date.now()-225||vi)&&i.some(e=>e.nodeType==1&&!qs.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,$r(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m){if(r&&c instanceof M&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=Ys(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof M&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),ci&&li<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((hi&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&Qs(l.doc,h.pos,g.pos))&&e.someProp(`handleKeyDown`,t=>t(e,$r(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Zs(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,$r(8,`Backspace`)))){vi&&fi&&e.domObserver.suppressSelectionUpdates();return}fi&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),vi&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,$r(13,`Enter`))})},20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=Ys(e,n.doc,l.sel);t&&!(fi&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||ci&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v){if(h.pos==g.pos){ci&&li<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ka(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=Xs(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-+!g.textOffset){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}else e.dispatch(x())}else e.dispatch(x())}function Ys(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Ra(e,t.resolve(n.anchor),t.resolve(n.head))}function Xs(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(b.from(l).eq(e))return{mark:s,type:o}}function Zs(e,t,n,r,i){if(n-t<=i.pos-r.pos||$s(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve($s(a,!0,!0));return!o.parent.isTextblock||o.pos>n||$s(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Qs(e,t,n){let r=0,i=0;return e.nodesBetween(t,n,(e,a)=>{e.isTextblock&&a>=t&&a<n?r++:(e.isText?/\S/.test(e.text.slice(Math.max(0,t-a),Math.min(e.nodeSize,n-a))):e.isLeaf)&&i++}),i==0&&r==1}function $s(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function ec(e,t,n,r,i){let a=e.findDiffStart(t,n),o=n+e.size,s=n+t.size;if(a==null)return null;let{a:c,b:l}=e.findDiffEnd(t,o,s);if(i==`end`){let e=Math.max(0,a-Math.min(c,l));r-=c+e-a}if(c<a&&o<s){let e=r<=a&&r>=c?a-r:0;a-=e,l=a+(l-c),c=a}else if(l<a){let e=r<=a&&r>=l?a-r:0;a-=e,c=a+(c-l),l=a}return{start:a,endA:c,endB:l}}var tc=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Eo,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(cc),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=ic(this),rc(this),this.nodeViews=oc(this),this.docView=sa(this.state.doc,nc(this),Ns(this),this.dom,this),this.domObserver=new Ls(this,(e,t,n,r)=>Js(this,e,t,n,r)),this.domObserver.start(),Do(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ao(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(cc),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(es(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=oc(this);sc(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ao(this),this.editable=ic(this),rc(this);let o=Ns(this),s=nc(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&Ti(this);if(i){this.domObserver.stop();let t=l&&(ci||fi)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&ac(n.selection,e.selection);if(l){let n=fi?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=ts(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=sa(e.doc,s,o,this.dom,this)),n&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(t=!0)}let i=this.input.mouseDown;t||!(i&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Va(this)&&i.delaySelUpdate())?ka(this,t):(Ia(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&Di(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(e.nodeType==1?e:e.parentNode)&&!this.someProp(`handleScrollToSelection`,e=>e(this))){if(this.state.selection instanceof N){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&wi(this,t.getBoundingClientRect(),e)}else wi(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 e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new us(e.slice,e.move,r<0?void 0:N.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(ci){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&&Ai(this.dom),ka(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Li(this,e)}coordsAtPos(e,t=1){return Vi(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return Zi(this,t||this.state,e)}pasteHTML(e,t){return cs(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return cs(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return so(this,e)}destroy(){this.docView&&(ko(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ns(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Ur())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return No(this,e)}domSelectionRange(){let e=this.domSelection();return e?mi&&this.root.nodeType===11&&ei(this.dom.ownerDocument)==this.dom&&Hs(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};tc.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function nc(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[vs.node(0,e.state.doc.content.size,t)]}function rc(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:vs.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function ic(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function ac(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function oc(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function sc(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function cc(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}for(var lc={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:`'`},uc={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},dc=typeof navigator<`u`&&/Mac/.test(navigator.platform),fc=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),pc=0;pc<10;pc++)lc[48+pc]=lc[96+pc]=String(pc);for(var pc=1;pc<=24;pc++)lc[pc+111]=`F`+pc;for(var pc=65;pc<=90;pc++)lc[pc]=String.fromCharCode(pc+32),uc[pc]=String.fromCharCode(pc);for(var mc in lc)uc.hasOwnProperty(mc)||(uc[mc]=lc[mc]);function hc(e){var t=!(dc&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||fc&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?uc:lc)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var gc=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),_c=typeof navigator<`u`&&/Win/.test(navigator.platform);function vc(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e++){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))gc?o=!0:i=!0;else throw Error(`Unrecognized modifier name: `+n)}return r&&(n=`Alt-`+n),i&&(n=`Ctrl-`+n),o&&(n=`Meta-`+n),a&&(n=`Shift-`+n),n}function yc(e){let t=Object.create(null);for(let n in e)t[vc(n)]=e[n];return t}function bc(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function xc(e){return new Gn({props:{handleKeyDown:Sc(e)}})}function Sc(e){let t=yc(e);return function(e,n){let r=hc(n),i,a=t[bc(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[bc(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(_c&&n.ctrlKey&&n.altKey)&&(i=lc[n.keyCode])&&i!=r){let r=t[bc(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}function Cc(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}}}var wc=class e{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(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(a);return!i.getMeta(`preventDispatch`)&&!this.hasCustomState&&r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o=[],s=!!e,c=e||i.tr,l=()=>(!s&&t&&!c.getMeta(`preventDispatch`)&&!this.hasCustomState&&a.dispatch(c),o.every(e=>e===!0)),u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(c,t),i=n(...e)(r);return o.push(i),u}])),run:l};return u}static createFakeChain(){let e=new Proxy({},{get:(t,n)=>{if(n!==`then`)return n===`run`?()=>!1:()=>e}});return e}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}static createFallbackCan(){let t=e.createFakeChain();return new Proxy({chain:()=>t},{get:(e,t)=>{if(t!==`then`)return t===`chain`?e.chain:()=>!1}})}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o={tr:e,editor:r,view:a,state:Cc({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(o)]))}};return o}},Tc=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{if(!e.isDestroyed){var n;t.dom.blur(),(n=window)==null||(n=n.getSelection())==null||n.removeAllRanges()}}),!0),Ec=(e=!0)=>({commands:t})=>t.setContent(``,{emitUpdate:e}),Dc=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,a=r.resolve(i.map(n)),o=r.resolve(i.map(n+e.nodeSize)),s=a.blockRange(o);if(!s)return;let c=Lt(s);if(e.type.isTextblock){let{defaultType:e}=a.parent.contentMatchAt(a.index());t.setNodeMarkup(s.start,e)}(c||c===0)&&t.lift(s,c)})}),!0},Oc=e=>t=>e(t),kc=()=>({state:e,dispatch:t})=>mr(e,t),Ac=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,a=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let o=r.mapping.map(t);return r.insert(o,a.content),r.setSelection(new M(r.doc.resolve(Math.max(o-1,0)))),!0},jc=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;--n)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1};function Mc(e,t){if(typeof e==`string`){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var Nc=e=>({tr:t,state:n,dispatch:r})=>{let i=Mc(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;--e)if(a.node(e).type===i){if(r){let n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},Pc=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},Fc=e=>e.content?/^text(\*|\+)/.test(e.content):!1,Ic=(e,t,n)=>{if(!e.parent.isInline||n===`left`&&e.pos>e.start()||n===`right`&&e.pos<e.end())return e.pos;let r=t.nodes[e.parent.type.name].spec;return Fc(r)?n===`left`?e.start()-1:e.end()+1:e.pos},Lc=(e,t,n)=>({from:Ic(e,n,`left`),to:Ic(t,n,`right`)}),Rc=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let n=e.tr,{ranges:r}=e.selection,i=n.steps.length;r.forEach(t=>{let r=n.mapping.slice(i),{from:a,to:o}=Lc(n.doc.resolve(r.map(t.$from.pos)),n.doc.resolve(r.map(t.$to.pos)),e.schema);n.deleteRange(a,o)}),n.selection.empty||n.setSelection(M.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),t(n)}return!0},zc=()=>({commands:e})=>e.keyboardShortcut(`Enter`),Bc=()=>({state:e,dispatch:t})=>pr(e,t);function Vc(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function Hc(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:Vc(t[r])?t[r].test(e[r]):t[r]===e[r])}function Uc(e,t,n={}){return e.find(e=>e.type===t&&Hc(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function Wc(e,t,n={}){return!!Uc(e,t,n)}function Gc(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if((!r.node||!r.node.marks.some(e=>e.type===t))&&(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!Uc([...r.node.marks],t,n))return;let i=r.index,a=e.start()+r.offset,o=i+1,s=a+r.node.nodeSize;for(;i>0&&Wc([...e.parent.child(i-1).marks],t,n);)--i,a-=e.parent.child(i).nodeSize;for(;o<e.parent.childCount&&Wc([...e.parent.child(o).marks],t,n);)s+=e.parent.child(o).nodeSize,o+=1;return{from:a,to:s}}function Kc(e,t){if(typeof e==`string`){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var qc=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=Kc(e,r.schema),{doc:o,selection:s}=n,{$from:c,from:l,to:u}=s;if(i){let e=Gc(c,a,t);if(e&&e.from<=l&&e.to>=u){let t=M.create(o,e.from,e.to);n.setSelection(t)}}return!0},Jc=e=>t=>{let n=typeof e==`function`?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function Yc(e){return e instanceof M}function Xc(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Zc(e,t=null){if(!t)return null;let n=j.atStart(e),r=j.atEnd(e);if(t===`start`||t===!0)return n;if(t===`end`)return r;let i=n.from,a=r.to;return t===`all`?M.create(e,Xc(0,i,a),Xc(e.content.size,i,a)):M.create(e,Xc(t,i,a),Xc(t,i,a))}function Qc(){return[`Android`].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function $c(){return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}function el(){return typeof navigator<`u`&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var tl=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:a})=>{t={scrollIntoView:!0,...t};let o=()=>{($c()||Qc())&&r.dom.focus(),el()&&!$c()&&!Qc()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(a&&e===null&&!Yc(n.state.selection))return o(),!0;let s=Zc(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return a&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},nl=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),rl=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),il=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;--n){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&il(r)}return e};function al(e){if(typeof window>`u`)throw Error(`[tiptap error]: there is no window object available, so this function cannot be used`);let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,`text/html`).body;return il(n)}function ol(e){return typeof e?.nodesBetween==`function`}function sl(e,t,n){if(ol(e))return e;let r=typeof e==`object`&&!!e;n={slice:!0,parseOptions:{},...n};let i=typeof e==`string`;if(r)try{if(Array.isArray(e)&&e.length>0)return b.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error(`[tiptap error]: Invalid JSON content`,{cause:r});return console.warn(`[tiptap warn]: Invalid content.`,`Passed value:`,e,`Error:`,r),sl(``,t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i=``,a=new ze({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:`inline*`,group:`block`,parseDOM:[{tag:`*`,getAttrs:e=>(r=!0,i=typeof e==`string`?e:e.outerHTML,null)}]}})});if(n.slice?Ue.fromSchema(a).parseSlice(al(e),n.parseOptions):Ue.fromSchema(a).parse(al(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error(`[tiptap error]: Invalid HTML content`,{cause:Error(`Invalid element found: ${i}`)})}let r=Ue.fromSchema(t);return n.slice?r.parseSlice(al(e),n.parseOptions).content:r.parse(al(e),n.parseOptions)}return sl(``,t,n)}function cl(e){return!(`type`in e)}function ll(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof At||i instanceof jt))return;let a=e.mapping.maps[r],o=0;a.forEach((e,t,n,r)=>{o===0&&(o=r)}),e.setSelection(j.near(e.doc.resolve(o),n))}var ul=(e,t,n)=>({tr:r,dispatch:i,editor:a})=>{if(i){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let i,o=e=>{a.emit(`contentError`,{editor:a,error:e,disableCollaboration:()=>{`collaboration`in a.storage&&typeof a.storage.collaboration==`object`&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},s={preserveWhitespace:`full`,...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{sl(t,a.schema,{parseOptions:s,errorOnInvalidContent:!0})}catch(e){o(e)}try{i=sl(t,a.schema,{parseOptions:s,errorOnInvalidContent:n.errorOnInvalidContent??a.options.enableContentCheck})}catch(e){return o(e),!1}let{from:c,to:l}=typeof e==`number`?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0,f=cl(i)?i.content:[i];if(f.forEach(e=>{e.check(),u=u?e.isText&&e.marks.length===0:!1,d=d?e.isBlock:!1}),c===l&&d){let{parent:e}=r.doc.resolve(c);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(--c,l+=1)}let p;if(u)p=Array.isArray(t)?t.map(e=>e.text||``).join(``):ol(t)?f.map(e=>e.text??``).join(``):typeof t==`object`&&t&&t.text?t.text:t,r.insertText(p,c,l);else{p=b.from(f);let e=r.doc.resolve(c),t=e.node(),n=e.parentOffset===0,i=t.isText||t.isTextblock,a=t.content.size>0;n&&i&&a&&d&&(c=Math.max(0,c-1)),r.replaceWith(c,l,f)}n.updateSelection&&ll(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta(`applyInputRules`,{from:c,text:p}),n.applyPasteRules&&r.setMeta(`applyPasteRules`,{from:c,text:p})}return!0};function dl(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var fl=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{pos:i,attrs:a,content:o,updateSelection:s=!0}=e,c;c=typeof i==`number`?t.doc.resolve(i):i||t.selection.$from;let l=dl(c.parent.contentMatchAt(c.index()));if(!l)return!1;let u=Object.keys(l.spec.attrs||{}),d=a?Object.fromEntries(Object.entries(a).filter(([e])=>u.includes(e))):{},f;if(o){let e=sl(o,r.schema);f=l.createAndFill(d,e)}else f=l.createAndFill(d);return f?(n&&(t.insert(c.pos,f),s&&ll(t,t.steps.length-1,-1)),!0):!1},pl=()=>({state:e,dispatch:t})=>cr(e,t),ml=()=>({state:e,dispatch:t})=>lr(e,t),hl=()=>({state:e,dispatch:t})=>Zn(e,t),gl=()=>({state:e,dispatch:t})=>ar(e,t),_l=()=>({state:e,dispatch:t,tr:n})=>{try{let r=en(e.doc,e.selection.$from.pos,-1);return r!=null&&(n.join(r,2),t&&t(n),!0)}catch{return!1}},vl=()=>({state:e,dispatch:t,tr:n})=>{try{let r=en(e.doc,e.selection.$from.pos,1);return r!=null&&(n.join(r,2),t&&t(n),!0)}catch{return!1}},yl=()=>({state:e,dispatch:t})=>Qn(e,t),bl=()=>({state:e,dispatch:t})=>$n(e,t);function xl(){return typeof navigator<`u`&&/Mac/.test(navigator.platform)}function Sl(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n===`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))$c()||xl()?o=!0:i=!0;else throw Error(`Unrecognized modifier name: ${n}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),a&&(n=`Shift-${n}`),n}var Cl=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let a=Sl(e).split(/-(?!$)/),o=a.find(e=>![`Alt`,`Ctrl`,`Meta`,`Shift`].includes(e)),s=new KeyboardEvent(`keydown`,{key:o===`Space`?` `:o,altKey:a.includes(`Alt`),ctrlKey:a.includes(`Ctrl`),metaKey:a.includes(`Meta`),shiftKey:a.includes(`Shift`),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{n.someProp(`handleKeyDown`,e=>e(n,s))})?.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function wl(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?Mc(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);s.push({node:e,from:n,to:a})});let c=i-r,l=s.filter(e=>!o||o.name===e.node.type.name).filter(e=>Hc(e.node.attrs,n,{strict:!1}));return a?!!l.length:l.reduce((e,t)=>e+t.to-t.from,0)>=c}var Tl=(e,t={})=>({state:n,dispatch:r})=>wl(n,Mc(e,n.schema),t)?ur(n,r):!1,El=()=>({state:e,dispatch:t})=>hr(e,t),Dl=e=>({state:t,dispatch:n})=>Fr(Mc(e,t.schema))(t,n),Ol=()=>({state:e,dispatch:t})=>dr(e,t);function kl(e,t){return t.nodes[e]?`node`:t.marks[e]?`mark`:null}function Al(e,t){let n=typeof t==`string`?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var jl=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=kl(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Mc(e,r.schema)),s===`mark`&&(o=Kc(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,Al(e.attrs,t))),o&&e.marks.length&&e.marks.forEach(a=>{o===a.type&&(c=!0,i&&n.addMark(r,r+e.nodeSize,o.create(Al(a.attrs,t))))})})}),c},Ml=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Nl=()=>({tr:e,dispatch:t})=>{if(t){let t=new jn(e.doc);e.setSelection(t)}return!0},Pl=()=>({state:e,dispatch:t})=>nr(e,t),Fl=()=>({state:e,dispatch:t})=>or(e,t),Il=()=>({state:e,dispatch:t})=>vr(e,t),Ll=()=>({state:e,dispatch:t})=>wr(e,t),Rl=()=>({state:e,dispatch:t})=>Cr(e,t);function zl(e,t,n={},r={}){return sl(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var Bl=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{let{doc:c}=a;if(r.preserveWhitespace!==`full`){let s=zl(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});if(o){let e=cl(s)?s.content:[s];a.replaceWith(0,c.content.size,e).setMeta(`preventUpdate`,!n)}return!0}return o&&a.setMeta(`preventUpdate`,!n),s.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function Vl(e,t){let n=Kc(t,e.schema),{from:r,to:i,empty:a}=e.selection,o=[];a?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{o.push(...e.marks)});let s=o.find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}function Hl(e,t){let n=new wn(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function Ul(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&r.push({node:e,pos:t})}),r}function Wl(e,t){for(let n=e.depth;n>0;--n){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Gl(e){return t=>Wl(t.$from,e)}function I(e,t,n){return e.config[t]===void 0&&e.parent?I(e.parent,t,n):typeof e.config[t]==`function`?e.config[t].bind({...n,parent:e.parent?I(e.parent,t,n):null}):e.config[t]}function L(e){return e.map(e=>{let t=I(e,`addExtensions`,{name:e.name,options:e.options,storage:e.storage});return t?[e,...L(t())]:e}).flat(10)}function Kl(e,t){let n=rt.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement(`div`);return r.appendChild(n),r.innerHTML}function R(e){return typeof e==`function`}function z(e,t=void 0,...n){return R(e)?t?e.bind(t)(...n):e(...n):e}function ql(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Jl(e){return{baseExtensions:e.filter(e=>e.type===`extension`),nodeExtensions:e.filter(e=>e.type===`node`),markExtensions:e.filter(e=>e.type===`mark`)}}function Yl(e){let t=[],{nodeExtensions:n,markExtensions:r}=Jl(e),i=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(e=>e.name!==`text`).map(e=>e.name),s=r.map(e=>e.name),c=[...o,...s];return e.forEach(e=>{let n=I(e,`addGlobalAttributes`,{name:e.name,options:e.options,storage:e.storage,extensions:i});n&&n().forEach(e=>{let n;n=Array.isArray(e.types)?e.types:e.types===`*`?c:e.types===`nodes`?o:e.types===`marks`?s:[],n.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})})})})}),i.forEach(e=>{let n=I(e,`addAttributes`,{name:e.name,options:e.options,storage:e.storage});if(!n)return;let r=n();Object.entries(r).forEach(([n,r])=>{let i={...a,...r};typeof i?.default==`function`&&(i.default=i.default()),i?.isRequired&&i?.default===void 0&&delete i.default,t.push({type:e.name,name:n,attribute:i})})}),t}function Xl(e){let t=[],n=``,r=!1,i=!1,a=0,o=e.length;for(let s=0;s<o;s+=1){let o=e[s];if(o===`'`&&!i){r=!r,n+=o;continue}if(o===`"`&&!r){i=!i,n+=o;continue}if(!r&&!i){if(o===`(`){a+=1,n+=o;continue}if(o===`)`&&a>0){--a,n+=o;continue}if(o===`;`&&a===0){t.push(n),n=``;continue}}n+=o}return n&&t.push(n),t}function Zl(e){let t=[],n=Xl(e||``),r=n.length;for(let e=0;e<r;e+=1){let r=n[e],i=r.indexOf(`:`);if(i===-1)continue;let a=r.slice(0,i).trim(),o=r.slice(i+1).trim();a&&o&&t.push([a,o])}return t}function Ql(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(e===`__proto__`){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0});return}if(!n[e]){n[e]=t;return}if(e===`class`){let r=t?String(t).split(` `):[],i=n[e]?n[e].split(` `):[],a=r.filter(e=>!i.includes(e));n[e]=[...i,...a].join(` `)}else if(e===`style`){let r=new Map([...Zl(n[e]),...Zl(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join(`; `)}else n[e]=t}),n},{})}function $l(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>Ql(e,t),{})}function eu(e){return typeof e==`string`?e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e===`true`||e!==`false`&&e:e}function tu(e,t){return`style`in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let i=t.reduce((e,t)=>{let r=t.attribute.parseHTML?t.attribute.parseHTML(n):eu(n.getAttribute(t.name));return r==null?e:{...e,[t.name]:r}},{});return{...r,...i}}}}function nu(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>e===`attrs`&&ql(t)?!1:t!=null))}function ru(e){var t,n;let r={};return!(e!=null&&(t=e.attribute)!=null&&t.isRequired)&&`default`in(e?.attribute||{})&&(r.default=e.attribute.default),(e==null||(n=e.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function iu(e,t){let n=Yl(e),{nodeExtensions:r,markExtensions:i}=Jl(e),a=r.find(e=>I(e,`topNode`))?.name;return new ze({topNode:a,nodes:Object.fromEntries(r.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=nu({...e.reduce((e,t)=>{let n=I(t,`extendNodeSchema`,a);return{...e,...n?n(r):{}}},{}),content:z(I(r,`content`,a)),marks:z(I(r,`marks`,a)),group:z(I(r,`group`,a)),inline:z(I(r,`inline`,a)),atom:z(I(r,`atom`,a)),selectable:z(I(r,`selectable`,a)),draggable:z(I(r,`draggable`,a)),code:z(I(r,`code`,a)),whitespace:z(I(r,`whitespace`,a)),linebreakReplacement:z(I(r,`linebreakReplacement`,a)),defining:z(I(r,`defining`,a)),isolating:z(I(r,`isolating`,a)),attrs:Object.fromEntries(i.map(ru))}),s=z(I(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>tu(e,i)));let c=I(r,`renderHTML`,a);c&&(o.toDOM=e=>c({node:e,HTMLAttributes:$l(e,i)}));let l=I(r,`renderText`,a);return l&&(o.toText=l),[r.name,o]})),marks:Object.fromEntries(i.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=nu({...e.reduce((e,t)=>{let n=I(t,`extendMarkSchema`,a);return{...e,...n?n(r):{}}},{}),inclusive:z(I(r,`inclusive`,a)),excludes:z(I(r,`excludes`,a)),group:z(I(r,`group`,a)),spanning:z(I(r,`spanning`,a)),code:z(I(r,`code`,a)),attrs:Object.fromEntries(i.map(ru))}),s=z(I(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>tu(e,i)));let c=I(r,`renderHTML`,a);return c&&(o.toDOM=e=>c({mark:e,HTMLAttributes:$l(e,i)})),[r.name,o]}))})}function au(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return Array.from(new Set(t))}function ou(e){return e.sort((e,t)=>{let n=I(e,`priority`)||100,r=I(t,`priority`)||100;return n>r?-1:+(n<r)})}function su(e){let t=ou(L(e)),n=au(t.map(e=>e.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(`, `)}]. This can lead to issues.`),t}function cu(e,t,n){let{from:r,to:i}=t,{blockSeparator:a=`
12
+ `))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=rt.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=bo(n),yi&&xo(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&e.nodeType!=1;)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||Ue.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!lo.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=So(F(s,+u[1],+u[2]),u[4]);else if(s=E.maxOpen(uo(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=F(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var lo=/^(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 uo(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&po(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=mo(a[a.length-1],i.length));let n=fo(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return b.from(a)}return e}function fo(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,b.from(e));return e}function po(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=po(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(b.from(fo(n,e,i+1))))}}function mo(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,mo(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(b.empty,!0);return e.copy(n.append(r))}function ho(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=ho(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(b.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function F(e,t,n){return t<e.openStart&&(e=new E(ho(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new E(ho(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var go={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]};function _o(){return document.implementation.createHTMLDocument(`title`)}var vo=null;function yo(e){let t=window.trustedTypes;if(!t)return e;if(!vo){if(vo=t.defaultPolicy)try{return vo.createHTML(e)}catch{}vo=t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e})}return vo.createHTML(e)}function bo(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=_o(),r=n.body,i=/<([a-z][^>\s]+)/i.exec(e),a;if((a=i&&go[i[1].toLowerCase()])&&(e=a.map(e=>`<`+e+`>`).join(``)+e+a.map(e=>`</`+e+`>`).reverse().join(``)),r.innerHTML=yo(e),a)for(let e=0;e<a.length;e++)r=r.querySelector(a[e])||r;for(let e=0;e<n.styleSheets.length;e++){let t=n.styleSheets[e];for(let e=0;e<t.rules.length;e++){let n=t.rules[e];if(n instanceof CSSStyleRule){let e=r.querySelectorAll(n.selectorText);for(let t=0;t<e.length;t++)e[t].style.cssText+=n.style.cssText}}}return r}function xo(e){let t=e.querySelectorAll(fi?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function So(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;try{i=b.from(t.create(r[e+1],i))}catch{break}a++,o++}return new E(i,a,o)}var Co={},wo={},To={touchstart:!0,touchmove:!0},Eo=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Do(e){for(let t in Co){let n=Co[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{Mo(e,t)&&!jo(e,t)&&(e.editable||!(t.type in wo))&&n(e,t)},To[t]?{passive:!0}:void 0)}mi&&e.dom.addEventListener(`input`,()=>null),Ao(e)}function Oo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ko(e){e.input.mouseDown&&e.input.mouseDown.done(),e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Ao(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>jo(e,t))})}function jo(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function Mo(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function No(e,t){!jo(e,t)&&Co[t.type]&&(e.editable||!(t.type in wo))&&Co[t.type](e,t)}wo.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Xo(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(vi&&fi&&n.keyCode==13))){if(n.keyCode!=229&&e.domObserver.forceFlush(),hi&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,$r(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||oo(e,n)?n.preventDefault():Oo(e,`key`)}},wo.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},wo.keypress=(e,t)=>{let n=t;if(Xo(e)||!n.charCode||n.ctrlKey&&!n.altKey||gi&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof M)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function Po(e){return{left:e.clientX,top:e.clientY}}function Fo(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Io(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function Lo(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n==`pointer`&&r.setMeta(`pointer`,!0),e.dispatch(r)}function Ro(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&N.isSelectable(r)?(Lo(e,new N(n),`pointer`),!0):!1}function zo(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof N&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(N.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i!=null&&(Lo(e,N.create(e.state.doc,i),`pointer`),!0)}function Bo(e,t,n,r,i){return Io(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?zo(e,n):Ro(e,n))}function Vo(e,t,n,r){return Io(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function Ho(e,t,n,r){return Io(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||Uo(e,n,r)}function Uo(e,t,n){if(n.button!=0)return!1;let r=Wo(e,t,!0),i=e.state.doc;return r?(Lo(e,r,`pointer`),r instanceof M&&i.eq(e.state.doc)&&(e.input.mouseDown=new Yo(e,r)),!0):!1}function Wo(e,t,n){let r=e.state.doc;if(t==-1)return r.inlineContent?M.create(r,0,r.content.size):null;let i=r.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e),a=i.before(e);if(t.inlineContent)return M.create(r,a+1,a+1+t.content.size);if(n&&N.isSelectable(t))return N.create(r,a)}return null}function Go(e){return ns(e)}var Ko=gi?`metaKey`:`ctrlKey`;Co.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Go(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&Fo(n,e.input.lastClick)&&!n[Ko]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let o=e.posAtCoords(Po(n));o&&(a==`singleClick`?e.input.mouseDown=new Jo(e,o,n,!!r):(a==`doubleClick`?Vo:Ho)(e,o.pos,o.inside,n)?n.preventDefault():Oo(e,`pointer`))};var qo=class{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},Jo=class extends qo{constructor(e,t,n,r){super(e),this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[Ko],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&s.nodeDOM.nodeType==1?s.nodeDOM:null;let{selection:c}=e.state;n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof N&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!!(this.target&&ui&&!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()),Oo(e,`pointer`)}done(){super.done(),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(()=>{this.view.isDestroyed||ka(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Po(e))),this.updateAllowDefault(e),this.allowDefault||!t?Oo(this.view,`pointer`):Bo(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||mi&&this.mightDrag&&!this.mightDrag.node.isAtom||fi&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Lo(this.view,j.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):Oo(this.view,`pointer`)}move(e){this.updateAllowDefault(e),Oo(this.view,`pointer`),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},Yo=class extends qo{constructor(e,t){super(e),this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Oo(this.view,`pointer`);let t=this.view.posAtCoords(Po(e)),n=t&&Wo(this.view,t.inside,!1);if(!n)return;let{doc:r}=this.view.state,i=this.startSelection,[a,o]=n.from<i.from?[i.to,n.from]:[i.from,n.to];Lo(this.view,M.create(r,a,o),`pointer`)}};Co.touchstart=e=>{e.input.lastTouch=Date.now(),Go(e),Oo(e,`pointer`)},Co.touchmove=e=>{e.input.lastTouch=Date.now(),Oo(e,`pointer`)},Co.contextmenu=e=>Go(e);function Xo(e,t){return e.composing?!0:mi&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var Zo=vi?5e3:-1;wo.compositionstart=wo.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof M&&t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||fi&&_i&&Qo(e)))e.markCursor=e.state.storedMarks||n.marks(),ns(e,!0),e.markCursor=null;else if(ns(e,!t.selection.empty),ui&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&n.nodeType==1&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(t.nodeType==3){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}$o(e,Zo)};function Qo(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable==`false`}wo.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,$o(e,20))};function $o(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ns(e),t))}function es(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function ts(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Jr(t.focusNode,t.focusOffset),r=Yr(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(e&&e.isText(n.nodeValue))return r}}return n||r}function ns(e,t=!1){if(!(vi&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),es(e),t||e.docView&&e.docView.dirty){let n=Da(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function rs(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var is=ci&&li<15||hi&&bi<604;Co.copy=wo.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=is?null:n.clipboardData,{dom:o,text:s}=so(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):rs(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function as(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function ss(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?cs(e,r.value,null,i,t):cs(e,r.textContent,r.innerHTML,i,t)},50)}function cs(e,t,n,r,i){let a=co(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||E.empty)))return!0;if(!a)return!1;let o=as(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function ls(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}wo.paste=(e,t)=>{let n=t;if(e.composing&&!vi)return;let r=is?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&cs(e,ls(r),r.getData(`text/html`),i,n)?n.preventDefault():ss(e,n)};var us=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},ds=gi?`altKey`:`ctrlKey`;function fs(e,t){let n;return e.someProp(`dragCopies`,e=>{n||=e(t)}),n==null?!t[ds]:!n}Co.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(Po(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof N?i.to-1:i.to))){if(r&&r.mightDrag)o=N.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=N.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=so(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!fi||pi>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(is?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,is||n.dataTransfer.setData(`text/plain`,c),e.dragging=new us(l,fs(e,n),o)},Co.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},wo.dragover=wo.dragenter=(e,t)=>t.preventDefault(),wo.drop=(e,t)=>{try{ps(e,t,e.dragging)}finally{e.dragging=null}};function ps(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Po(t));if(!r)return;let i=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp(`transformPasted`,t=>{a=t(a,e,!1)}):a=co(e,ls(t.dataTransfer),is?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&fs(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||E.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?rn(e.state.doc,i.pos,a):i.pos;s??=i.pos;let c=e.state.tr;if(o){let{node:e}=n;e?e.replace(c):c.deleteSelection()}let l=c.mapping.map(s),u=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=c.doc;if(u?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),c.doc.eq(d))return;let f=c.doc.resolve(l);if(u&&N.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new N(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),c.setSelection(Ra(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}Co.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ka(e)},20))},Co.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},Co.beforeinput=(e,t)=>{if(vi&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,$r(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let e in wo)Co[e]=wo[e];function ms(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var hs=class e{constructor(e,t){this.toDOM=e,this.spec=t||bs,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new vs(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ms(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},gs=class e{constructor(e,t){this.attrs=e,this.spec=t||bs}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new vs(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&ms(this.attrs,t.attrs)&&ms(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},_s=class e{constructor(e,t){this.attrs=e,this.spec=t||bs}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new vs(i.pos-n,a.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&&ms(this.attrs,t.attrs)&&ms(this.spec,t.spec)}destroy(){}},vs=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new hs(n,r))}static inline(t,n,r,i){return new e(t,n,new gs(r,i))}static node(t,n,r,i){return new e(t,n,new _s(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof gs}get widget(){return this.type instanceof hs}},ys=[],bs={},xs=class e{constructor(e,t){this.local=e.length?e:ys,this.children=t.length?t:ys}static create(e,t){return t.length?ks(t,e,0,bs):Ss}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==Ss||e.maps.length==0?this:this.mapInner(e,t,0,0,n||bs)}mapInner(t,n,r,i,a){let o;for(let e=0;e<this.local.length;e++){let s=this.local[e].map(t,r,i);s&&s.type.valid(n,s)?(o||=[]).push(s):a.onRemove&&a.onRemove(this.local[e].spec)}return this.children.length?ws(this.children,o||[],t,n,r,i,a):o?new e(o.sort(As),ys):Ss}add(t,n){return n.length?this==Ss?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=Ds(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,ks(s,e,o+1,bs)),a+=3}});let o=Ts(a?Os(n):n,-r);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new e(o.length?this.local.concat(o).sort(As):this.local,i||this.children)}remove(e){return e.length==0||this==Ss?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==Ss?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):Ss}forChild(t,n){if(this==Ss)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof gs){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(As),ys);return r?new Cs([t,r]):t}return r||Ss}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return js(this.localsInner(e))}localsInner(e){if(this==Ss)return ys;if(e.inlineContent||!this.local.some(gs.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof gs||t.push(this.local[e]);return t}forEachSet(e){e(this)}};xs.empty=new xs([],[]),xs.removeOverlap=js;var Ss=xs.empty,Cs=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,bs));return e.from(r)}forChild(t,n){if(n.isLeaf)return xs.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=Ss&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length){if(!t)t=i;else{n&&=(t=t.slice(),!1);for(let e=0;e<i.length;e++)t.push(i[e])}}}return t?js(n?t:t.sort(As)):ys}static from(t){switch(t.length){case 0:return Ss;case 1:return t[0];default:return new e(t.every(e=>e instanceof xs)?t:t.reduce((e,t)=>e.concat(t instanceof xs?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function ws(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==Ss?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=ks(Es(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new xs(t.sort(As),s)}function Ts(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new vs(i.from+t,i.to+t,i.type))}return n}function Es(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function Ds(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function Os(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function ks(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=Ds(e,t,o+n);if(s){a=!0;let e=ks(s,t,n+o+1,r);e!=Ss&&i.push(o,o+t.nodeSize,e)}});let o=Ts(a?Os(e):e,-n).sort(As);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||(r.onRemove&&r.onRemove(o[e].spec),o.splice(e--,1));return o.length||i.length?new xs(o,i):Ss}function As(e,t){return e.from-t.from||e.to-t.to}function js(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),Ms(t,i+1,a.copy(r.to,a.to)));continue}a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),Ms(t,i,r.copy(a.from,r.to)));break}}return t}function Ms(e,t,n){for(;t<e.length&&As(n,e[t])>0;)t++;e.splice(t,0,n)}function Ns(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=Ss&&t.push(r)}),e.cursorWrapper&&t.push(xs.create(e.state.doc,[e.cursorWrapper.deco])),Cs.from(t)}var Ps={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Fs=ci&&li<=11,Is=class{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}},Ls=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Is,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);ci&&li<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():mi&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Fs&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.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,Ps)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(za(this.view)){if(this.suppressingSelectionUpdates)return ka(this.view);if(ci&&li<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Wr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=Br(n))t.add(n);for(let r=e.anchorNode;r;r=Br(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.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 t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&za(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(s.some(e=>e.nodeName==`BR`)&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||fi&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some(e=>e.type==`childList`&&e.removedNodes.length))){for(let e of s)if(e.nodeName==`BR`&&e.parentNode){let t=e.nextSibling;for(;t&&t.nodeType==1;){if(t.contentEditable==`false`){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(ui&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||Us(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Qr(n)&&(c=Da(e))&&c.eq(j.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ka(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),Bs(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Ws(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||ka(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.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 n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),r.nodeType==3&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(ci&&li<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?zr(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?zr(i):e.target.childNodes.length;return{from:o,to:n.localPosFromDOM(e.target,s,1)}}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})}},Rs=new WeakMap,zs=!1;function Bs(e){if(!Rs.has(e)&&(Rs.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=ui,zs)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.`),zs=!0}}function Vs(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return Wr(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Hs(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return Vs(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?Vs(e,n):null}function Us(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function Ws(e,t){let{focusNode:n,focusOffset:r}=e.domSelectionRange();for(let i of t)if(i.parentNode?.nodeName==`TR`){let t=i.nextSibling;for(;t&&t.nodeName!=`TD`&&t.nodeName!=`TH`;)t=t.nextSibling;if(t){let a=t;for(;;){let e=a.firstChild;if(!e||e.nodeType!=1||e.contentEditable==`false`||/^(BR|IMG)$/.test(e.nodeName))break;a=e}a.insertBefore(i,a.firstChild),n==i&&e.domSelection().collapse(i,r)}else i.parentNode.removeChild(i)}}function Gs(e,t,n,r){let{node:i,fromOffset:a,toOffset:o,from:s,to:c}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,d=l.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:l.anchorOffset}],Qr(l)||u.push({node:l.focusNode,offset:l.focusOffset})),fi&&e.input.lastKeyCode===8)for(let e=o;e>a;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){o=e;break}if(!n||n.size)break}let f=e.state.doc,p=e.someProp(`domParser`)||Ue.fromSchema(e.state.schema),m=f.resolve(s),h=null,g=p.parse(i,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:a,to:o,preserveWhitespace:m.parent.type.whitespace!=`pre`||`full`,findPositions:u,ruleFromNode:Ks(r),context:m});if(u&&u[0].pos!=null){let e=u[0].pos,t=u[1]&&u[1].pos;t??=e,h={anchor:e+s,head:t+s}}return{doc:g,sel:h,from:s,to:c}}var Ks=e=>t=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);if(t.nodeName==`BR`&&t.parentNode){if(mi&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}if(t.parentNode.lastChild==t||mi&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName==`IMG`&&t.getAttribute(`mark-placeholder`))return{ignore:!0};return null},qs=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Js(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Da(e,t);if(n&&!e.state.selection.eq(n)){if(fi&&vi&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,$r(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=Gs(e,t,n,i),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=ec(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(hi&&e.input.lastIOSEnter>Date.now()-225||vi)&&i.some(e=>e.nodeType==1&&!qs.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,$r(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m){if(r&&c instanceof M&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=Ys(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof M&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),ci&&li<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((hi&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&Qs(l.doc,h.pos,g.pos))&&e.someProp(`handleKeyDown`,t=>t(e,$r(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Zs(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,$r(8,`Backspace`)))){vi&&fi&&e.domObserver.suppressSelectionUpdates();return}fi&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),vi&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,$r(13,`Enter`))})},20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=Ys(e,n.doc,l.sel);t&&!(fi&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||ci&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v){if(h.pos==g.pos){ci&&li<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ka(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=Xs(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-+!g.textOffset){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}else e.dispatch(x())}else e.dispatch(x())}function Ys(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Ra(e,t.resolve(n.anchor),t.resolve(n.head))}function Xs(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(b.from(l).eq(e))return{mark:s,type:o}}function Zs(e,t,n,r,i){if(n-t<=i.pos-r.pos||$s(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve($s(a,!0,!0));return!o.parent.isTextblock||o.pos>n||$s(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Qs(e,t,n){let r=0,i=0;return e.nodesBetween(t,n,(e,a)=>{e.isTextblock&&a>=t&&a<n?r++:(e.isText?/\S/.test(e.text.slice(Math.max(0,t-a),Math.min(e.nodeSize,n-a))):e.isLeaf)&&i++}),i==0&&r==1}function $s(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function ec(e,t,n,r,i){let a=e.findDiffStart(t,n),o=n+e.size,s=n+t.size;if(a==null)return null;let{a:c,b:l}=e.findDiffEnd(t,o,s);if(i==`end`){let e=Math.max(0,a-Math.min(c,l));r-=c+e-a}if(c<a&&o<s){let e=r<=a&&r>=c?a-r:0;a-=e,l=a+(l-c),c=a}else if(l<a){let e=r<=a&&r>=l?a-r:0;a-=e,c=a+(c-l),l=a}return{start:a,endA:c,endB:l}}var tc=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Eo,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(cc),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=ic(this),rc(this),this.nodeViews=oc(this),this.docView=sa(this.state.doc,nc(this),Ns(this),this.dom,this),this.domObserver=new Ls(this,(e,t,n,r)=>Js(this,e,t,n,r)),this.domObserver.start(),Do(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ao(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(cc),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(es(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=oc(this);sc(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ao(this),this.editable=ic(this),rc(this);let o=Ns(this),s=nc(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&Ti(this);if(i){this.domObserver.stop();let t=l&&(ci||fi)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&ac(n.selection,e.selection);if(l){let n=fi?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=ts(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=sa(e.doc,s,o,this.dom,this)),n&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(t=!0)}let i=this.input.mouseDown;t||!(i&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Va(this)&&i.delaySelUpdate())?ka(this,t):(Ia(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&Di(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(e.nodeType==1?e:e.parentNode)&&!this.someProp(`handleScrollToSelection`,e=>e(this))){if(this.state.selection instanceof N){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&wi(this,t.getBoundingClientRect(),e)}else wi(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 e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new us(e.slice,e.move,r<0?void 0:N.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(ci){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&&Ai(this.dom),ka(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Li(this,e)}coordsAtPos(e,t=1){return Vi(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return Zi(this,t||this.state,e)}pasteHTML(e,t){return cs(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return cs(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return so(this,e)}destroy(){this.docView&&(ko(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ns(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Ur())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return No(this,e)}domSelectionRange(){let e=this.domSelection();return e?mi&&this.root.nodeType===11&&ei(this.dom.ownerDocument)==this.dom&&Hs(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};tc.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function nc(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[vs.node(0,e.state.doc.content.size,t)]}function rc(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:vs.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function ic(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function ac(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function oc(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function sc(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function cc(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}for(var lc={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:`'`},uc={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},dc=typeof navigator<`u`&&/Mac/.test(navigator.platform),fc=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),pc=0;pc<10;pc++)lc[48+pc]=lc[96+pc]=String(pc);for(var pc=1;pc<=24;pc++)lc[pc+111]=`F`+pc;for(var pc=65;pc<=90;pc++)lc[pc]=String.fromCharCode(pc+32),uc[pc]=String.fromCharCode(pc);for(var mc in lc)uc.hasOwnProperty(mc)||(uc[mc]=lc[mc]);function hc(e){var t=!(dc&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||fc&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?uc:lc)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var gc=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),_c=typeof navigator<`u`&&/Win/.test(navigator.platform);function vc(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e++){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))gc?o=!0:i=!0;else throw Error(`Unrecognized modifier name: `+n)}return r&&(n=`Alt-`+n),i&&(n=`Ctrl-`+n),o&&(n=`Meta-`+n),a&&(n=`Shift-`+n),n}function yc(e){let t=Object.create(null);for(let n in e)t[vc(n)]=e[n];return t}function bc(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function xc(e){return new Gn({props:{handleKeyDown:Sc(e)}})}function Sc(e){let t=yc(e);return function(e,n){let r=hc(n),i,a=t[bc(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[bc(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(_c&&n.ctrlKey&&n.altKey)&&(i=lc[n.keyCode])&&i!=r){let r=t[bc(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}function Cc(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}}}var wc=class e{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(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(a);return!i.getMeta(`preventDispatch`)&&!this.hasCustomState&&r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o=[],s=!!e,c=e||i.tr,l=()=>(!s&&t&&!c.getMeta(`preventDispatch`)&&!this.hasCustomState&&a.dispatch(c),o.every(e=>e===!0)),u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(c,t),i=n(...e)(r);return o.push(i),u}])),run:l};return u}static createFakeChain(){let e=new Proxy({},{get:(t,n)=>{if(n!==`then`)return n===`run`?()=>!1:()=>e}});return e}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}static createFallbackCan(){let t=e.createFakeChain();return new Proxy({chain:()=>t},{get:(e,t)=>{if(t!==`then`)return t===`chain`?e.chain:()=>!1}})}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o={tr:e,editor:r,view:a,state:Cc({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(o)]))}};return o}},Tc=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{if(!e.isDestroyed){var n;t.dom.blur(),(n=window)==null||(n=n.getSelection())==null||n.removeAllRanges()}}),!0),Ec=(e=!0)=>({commands:t})=>t.setContent(``,{emitUpdate:e}),Dc=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,a=r.resolve(i.map(n)),o=r.resolve(i.map(n+e.nodeSize)),s=a.blockRange(o);if(!s)return;let c=Lt(s);if(e.type.isTextblock){let{defaultType:e}=a.parent.contentMatchAt(a.index());t.setNodeMarkup(s.start,e)}(c||c===0)&&t.lift(s,c)})}),!0},Oc=e=>t=>e(t),kc=()=>({state:e,dispatch:t})=>mr(e,t),Ac=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,a=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let o=r.mapping.map(t);return r.insert(o,a.content),r.setSelection(new M(r.doc.resolve(Math.max(o-1,0)))),!0},jc=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;--n)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1};function Mc(e,t){if(typeof e==`string`){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var Nc=e=>({tr:t,state:n,dispatch:r})=>{let i=Mc(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;--e)if(a.node(e).type===i){if(r){let n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},Pc=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},Fc=e=>e.content?/^text(\*|\+)/.test(e.content):!1,Ic=(e,t,n)=>{if(!e.parent.isInline||n===`left`&&e.pos>e.start()||n===`right`&&e.pos<e.end())return e.pos;let r=t.nodes[e.parent.type.name].spec;return Fc(r)?n===`left`?e.start()-1:e.end()+1:e.pos},Lc=(e,t,n)=>({from:Ic(e,n,`left`),to:Ic(t,n,`right`)}),Rc=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let n=e.tr,{ranges:r}=e.selection,i=n.steps.length;r.forEach(t=>{let r=n.mapping.slice(i),{from:a,to:o}=Lc(n.doc.resolve(r.map(t.$from.pos)),n.doc.resolve(r.map(t.$to.pos)),e.schema);n.deleteRange(a,o)}),n.selection.empty||n.setSelection(M.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),t(n)}return!0},zc=()=>({commands:e})=>e.keyboardShortcut(`Enter`),Bc=()=>({state:e,dispatch:t})=>pr(e,t);function Vc(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function Hc(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:Vc(t[r])?t[r].test(e[r]):t[r]===e[r])}function Uc(e,t,n={}){return e.find(e=>e.type===t&&Hc(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function Wc(e,t,n={}){return!!Uc(e,t,n)}function Gc(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if((!r.node||!r.node.marks.some(e=>e.type===t))&&(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!Uc([...r.node.marks],t,n))return;let i=r.index,a=e.start()+r.offset,o=i+1,s=a+r.node.nodeSize;for(;i>0&&Wc([...e.parent.child(i-1).marks],t,n);)--i,a-=e.parent.child(i).nodeSize;for(;o<e.parent.childCount&&Wc([...e.parent.child(o).marks],t,n);)s+=e.parent.child(o).nodeSize,o+=1;return{from:a,to:s}}function Kc(e,t){if(typeof e==`string`){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var qc=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=Kc(e,r.schema),{doc:o,selection:s}=n,{$from:c,from:l,to:u}=s;if(i){let e=Gc(c,a,t);if(e&&e.from<=l&&e.to>=u){let t=M.create(o,e.from,e.to);n.setSelection(t)}}return!0},Jc=e=>t=>{let n=typeof e==`function`?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function Yc(e){return e instanceof M}function Xc(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Zc(e,t=null){if(!t)return null;let n=j.atStart(e),r=j.atEnd(e);if(t===`start`||t===!0)return n;if(t===`end`)return r;let i=n.from,a=r.to;return t===`all`?M.create(e,Xc(0,i,a),Xc(e.content.size,i,a)):M.create(e,Xc(t,i,a),Xc(t,i,a))}function Qc(){return[`Android`].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function $c(){return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}function el(){return typeof navigator<`u`&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var tl=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:a})=>{t={scrollIntoView:!0,...t};let o=()=>{($c()||Qc())&&r.dom.focus(),el()&&!$c()&&!Qc()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(a&&e===null&&!Yc(n.state.selection))return o(),!0;let s=Zc(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return a&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},nl=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),rl=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),il=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;--n){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&il(r)}return e};function al(e){if(typeof window>`u`)throw Error(`[tiptap error]: there is no window object available, so this function cannot be used`);let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,`text/html`).body;return il(n)}function ol(e){return typeof e?.nodesBetween==`function`}function sl(e,t,n){if(ol(e))return e;let r=typeof e==`object`&&!!e;n={slice:!0,parseOptions:{},...n};let i=typeof e==`string`;if(r)try{if(Array.isArray(e)&&e.length>0)return b.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error(`[tiptap error]: Invalid JSON content`,{cause:r});return console.warn(`[tiptap warn]: Invalid content.`,`Passed value:`,e,`Error:`,r),sl(``,t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i=``,a=new ze({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:`inline*`,group:`block`,parseDOM:[{tag:`*`,getAttrs:e=>(r=!0,i=typeof e==`string`?e:e.outerHTML,null)}]}})});if(n.slice?Ue.fromSchema(a).parseSlice(al(e),n.parseOptions):Ue.fromSchema(a).parse(al(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error(`[tiptap error]: Invalid HTML content`,{cause:Error(`Invalid element found: ${i}`)})}let r=Ue.fromSchema(t);return n.slice?r.parseSlice(al(e),n.parseOptions).content:r.parse(al(e),n.parseOptions)}return sl(``,t,n)}function cl(e){return!(`type`in e)}function ll(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof At||i instanceof jt))return;let a=e.mapping.maps[r],o=0;a.forEach((e,t,n,r)=>{o===0&&(o=r)}),e.setSelection(j.near(e.doc.resolve(o),n))}var ul=(e,t,n)=>({tr:r,dispatch:i,editor:a})=>{if(i){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let i,o=e=>{a.emit(`contentError`,{editor:a,error:e,disableCollaboration:()=>{`collaboration`in a.storage&&typeof a.storage.collaboration==`object`&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},s={preserveWhitespace:`full`,...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{sl(t,a.schema,{parseOptions:s,errorOnInvalidContent:!0})}catch(e){o(e)}try{i=sl(t,a.schema,{parseOptions:s,errorOnInvalidContent:n.errorOnInvalidContent??a.options.enableContentCheck})}catch(e){return o(e),!1}let{from:c,to:l}=typeof e==`number`?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0,f=cl(i)?i.content:[i];if(f.forEach(e=>{e.check(),u=u?e.isText&&e.marks.length===0:!1,d=d?e.isBlock:!1}),c===l&&d){let{parent:e}=r.doc.resolve(c);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(--c,l+=1)}let p;if(u)p=Array.isArray(t)?t.map(e=>e.text||``).join(``):ol(t)?f.map(e=>e.text??``).join(``):typeof t==`object`&&t&&t.text?t.text:t,r.insertText(p,c,l);else{p=b.from(f);let e=r.doc.resolve(c),t=e.node(),n=e.parentOffset===0,i=t.isText||t.isTextblock,a=t.content.size>0;n&&i&&a&&d&&(c=Math.max(0,c-1)),r.replaceWith(c,l,f)}n.updateSelection&&ll(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta(`applyInputRules`,{from:c,text:p}),n.applyPasteRules&&r.setMeta(`applyPasteRules`,{from:c,text:p})}return!0};function dl(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var fl=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{pos:i,attrs:a,content:o,updateSelection:s=!0}=e,c;c=typeof i==`number`?t.doc.resolve(i):i||t.selection.$from;let l=dl(c.parent.contentMatchAt(c.index()));if(!l)return!1;let u=Object.keys(l.spec.attrs||{}),d=a?Object.fromEntries(Object.entries(a).filter(([e])=>u.includes(e))):{},f;if(o){let e=sl(o,r.schema);f=l.createAndFill(d,e)}else f=l.createAndFill(d);return f?(n&&(t.insert(c.pos,f),s&&ll(t,t.steps.length-1,-1)),!0):!1},pl=()=>({state:e,dispatch:t})=>cr(e,t),ml=()=>({state:e,dispatch:t})=>lr(e,t),hl=()=>({state:e,dispatch:t})=>Zn(e,t),gl=()=>({state:e,dispatch:t})=>ar(e,t),_l=()=>({state:e,dispatch:t,tr:n})=>{try{let r=en(e.doc,e.selection.$from.pos,-1);return r!=null&&(n.join(r,2),t&&t(n),!0)}catch{return!1}},vl=()=>({state:e,dispatch:t,tr:n})=>{try{let r=en(e.doc,e.selection.$from.pos,1);return r!=null&&(n.join(r,2),t&&t(n),!0)}catch{return!1}},yl=()=>({state:e,dispatch:t})=>Qn(e,t),bl=()=>({state:e,dispatch:t})=>$n(e,t);function xl(){return typeof navigator<`u`&&/Mac/.test(navigator.platform)}function Sl(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n===`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))$c()||xl()?o=!0:i=!0;else throw Error(`Unrecognized modifier name: ${n}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),a&&(n=`Shift-${n}`),n}var Cl=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let a=Sl(e).split(/-(?!$)/),o=a.find(e=>![`Alt`,`Ctrl`,`Meta`,`Shift`].includes(e)),s=new KeyboardEvent(`keydown`,{key:o===`Space`?` `:o,altKey:a.includes(`Alt`),ctrlKey:a.includes(`Ctrl`),metaKey:a.includes(`Meta`),shiftKey:a.includes(`Shift`),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{n.someProp(`handleKeyDown`,e=>e(n,s))})?.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function wl(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?Mc(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);s.push({node:e,from:n,to:a})});let c=i-r,l=s.filter(e=>!o||o.name===e.node.type.name).filter(e=>Hc(e.node.attrs,n,{strict:!1}));return a?!!l.length:l.reduce((e,t)=>e+t.to-t.from,0)>=c}var Tl=(e,t={})=>({state:n,dispatch:r})=>wl(n,Mc(e,n.schema),t)?ur(n,r):!1,El=()=>({state:e,dispatch:t})=>hr(e,t),Dl=e=>({state:t,dispatch:n})=>Fr(Mc(e,t.schema))(t,n),Ol=()=>({state:e,dispatch:t})=>dr(e,t);function kl(e,t){return t.nodes[e]?`node`:t.marks[e]?`mark`:null}function Al(e,t){let n=typeof t==`string`?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var jl=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=kl(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Mc(e,r.schema)),s===`mark`&&(o=Kc(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,Al(e.attrs,t))),o&&e.marks.length&&e.marks.forEach(a=>{o===a.type&&(c=!0,i&&n.addMark(r,r+e.nodeSize,o.create(Al(a.attrs,t))))})})}),c},Ml=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Nl=()=>({tr:e,dispatch:t})=>{if(t){let t=new jn(e.doc);e.setSelection(t)}return!0},Pl=()=>({state:e,dispatch:t})=>nr(e,t),Fl=()=>({state:e,dispatch:t})=>or(e,t),Il=()=>({state:e,dispatch:t})=>vr(e,t),Ll=()=>({state:e,dispatch:t})=>wr(e,t),Rl=()=>({state:e,dispatch:t})=>Cr(e,t);function zl(e,t,n={},r={}){return sl(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var Bl=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{let{doc:c}=a;if(r.preserveWhitespace!==`full`){let s=zl(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});if(o){let e=cl(s)?s.content:[s];a.replaceWith(0,c.content.size,e).setMeta(`preventUpdate`,!n)}return!0}return o&&a.setMeta(`preventUpdate`,!n),s.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function Vl(e,t){let n=Kc(t,e.schema),{from:r,to:i,empty:a}=e.selection,o=[];a?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{o.push(...e.marks)});let s=o.find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}function Hl(e,t){let n=new wn(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function Ul(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&r.push({node:e,pos:t})}),r}function Wl(e,t){for(let n=e.depth;n>0;--n){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Gl(e){return t=>Wl(t.$from,e)}function I(e,t,n){return e.config[t]===void 0&&e.parent?I(e.parent,t,n):typeof e.config[t]==`function`?e.config[t].bind({...n,parent:e.parent?I(e.parent,t,n):null}):e.config[t]}function Kl(e){return e.map(e=>{let t=I(e,`addExtensions`,{name:e.name,options:e.options,storage:e.storage});return t?[e,...Kl(t())]:e}).flat(10)}function ql(e,t){let n=rt.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement(`div`);return r.appendChild(n),r.innerHTML}function L(e){return typeof e==`function`}function R(e,t=void 0,...n){return L(e)?t?e.bind(t)(...n):e(...n):e}function Jl(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Yl(e){return{baseExtensions:e.filter(e=>e.type===`extension`),nodeExtensions:e.filter(e=>e.type===`node`),markExtensions:e.filter(e=>e.type===`mark`)}}function Xl(e){let t=[],{nodeExtensions:n,markExtensions:r}=Yl(e),i=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(e=>e.name!==`text`).map(e=>e.name),s=r.map(e=>e.name),c=[...o,...s];return e.forEach(e=>{let n=I(e,`addGlobalAttributes`,{name:e.name,options:e.options,storage:e.storage,extensions:i});n&&n().forEach(e=>{let n;n=Array.isArray(e.types)?e.types:e.types===`*`?c:e.types===`nodes`?o:e.types===`marks`?s:[],n.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})})})})}),i.forEach(e=>{let n=I(e,`addAttributes`,{name:e.name,options:e.options,storage:e.storage});if(!n)return;let r=n();Object.entries(r).forEach(([n,r])=>{let i={...a,...r};typeof i?.default==`function`&&(i.default=i.default()),i?.isRequired&&i?.default===void 0&&delete i.default,t.push({type:e.name,name:n,attribute:i})})}),t}function Zl(e){let t=[],n=``,r=!1,i=!1,a=0,o=e.length;for(let s=0;s<o;s+=1){let o=e[s];if(o===`'`&&!i){r=!r,n+=o;continue}if(o===`"`&&!r){i=!i,n+=o;continue}if(!r&&!i){if(o===`(`){a+=1,n+=o;continue}if(o===`)`&&a>0){--a,n+=o;continue}if(o===`;`&&a===0){t.push(n),n=``;continue}}n+=o}return n&&t.push(n),t}function Ql(e){let t=[],n=Zl(e||``),r=n.length;for(let e=0;e<r;e+=1){let r=n[e],i=r.indexOf(`:`);if(i===-1)continue;let a=r.slice(0,i).trim(),o=r.slice(i+1).trim();a&&o&&t.push([a,o])}return t}function $l(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(e===`__proto__`){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0});return}if(!n[e]){n[e]=t;return}if(e===`class`){let r=t?String(t).split(` `):[],i=n[e]?n[e].split(` `):[],a=r.filter(e=>!i.includes(e));n[e]=[...i,...a].join(` `)}else if(e===`style`){let r=new Map([...Ql(n[e]),...Ql(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join(`; `)}else n[e]=t}),n},{})}function eu(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>$l(e,t),{})}function tu(e){return typeof e==`string`?e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e===`true`||e!==`false`&&e:e}function nu(e,t){return`style`in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let i=t.reduce((e,t)=>{let r=t.attribute.parseHTML?t.attribute.parseHTML(n):tu(n.getAttribute(t.name));return r==null?e:{...e,[t.name]:r}},{});return{...r,...i}}}}function ru(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>e===`attrs`&&Jl(t)?!1:t!=null))}function iu(e){var t,n;let r={};return!(e!=null&&(t=e.attribute)!=null&&t.isRequired)&&`default`in(e?.attribute||{})&&(r.default=e.attribute.default),(e==null||(n=e.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function au(e,t){let n=Xl(e),{nodeExtensions:r,markExtensions:i}=Yl(e),a=r.find(e=>I(e,`topNode`))?.name;return new ze({topNode:a,nodes:Object.fromEntries(r.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=ru({...e.reduce((e,t)=>{let n=I(t,`extendNodeSchema`,a);return{...e,...n?n(r):{}}},{}),content:R(I(r,`content`,a)),marks:R(I(r,`marks`,a)),group:R(I(r,`group`,a)),inline:R(I(r,`inline`,a)),atom:R(I(r,`atom`,a)),selectable:R(I(r,`selectable`,a)),draggable:R(I(r,`draggable`,a)),code:R(I(r,`code`,a)),whitespace:R(I(r,`whitespace`,a)),linebreakReplacement:R(I(r,`linebreakReplacement`,a)),defining:R(I(r,`defining`,a)),isolating:R(I(r,`isolating`,a)),attrs:Object.fromEntries(i.map(iu))}),s=R(I(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>nu(e,i)));let c=I(r,`renderHTML`,a);c&&(o.toDOM=e=>c({node:e,HTMLAttributes:eu(e,i)}));let l=I(r,`renderText`,a);return l&&(o.toText=l),[r.name,o]})),marks:Object.fromEntries(i.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=ru({...e.reduce((e,t)=>{let n=I(t,`extendMarkSchema`,a);return{...e,...n?n(r):{}}},{}),inclusive:R(I(r,`inclusive`,a)),excludes:R(I(r,`excludes`,a)),group:R(I(r,`group`,a)),spanning:R(I(r,`spanning`,a)),code:R(I(r,`code`,a)),attrs:Object.fromEntries(i.map(iu))}),s=R(I(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>nu(e,i)));let c=I(r,`renderHTML`,a);return c&&(o.toDOM=e=>c({mark:e,HTMLAttributes:eu(e,i)})),[r.name,o]}))})}function ou(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return Array.from(new Set(t))}function su(e){return e.sort((e,t)=>{let n=I(e,`priority`)||100,r=I(t,`priority`)||100;return n>r?-1:+(n<r)})}function cu(e){let t=su(Kl(e)),n=ou(t.map(e=>e.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(`, `)}]. This can lead to issues.`),t}function lu(e,t,n){let{from:r,to:i}=t,{blockSeparator:a=`
13
13
 
14
- `,textSerializers:o={}}=n||{},s=``;return e.nodesBetween(r,i,(e,n,c,l)=>{e.isBlock&&n>r&&(s+=a);let u=o?.[e.type.name];if(u)return c&&(s+=u({node:e,pos:n,parent:c,index:l,range:t})),!1;if(e.isText){var d;s+=e==null||(d=e.text)==null?void 0:d.slice(Math.max(r,n)-n,i-n)}}),s}function lu(e,t){return cu(e,{from:0,to:e.content.size},t)}function uu(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function du(e,t){let n=Mc(t,e.schema),{from:r,to:i}=e.selection,a=[];e.doc.nodesBetween(r,i,e=>{a.push(e)});let o=a.reverse().find(e=>e.type.name===n.name);return o?{...o.attrs}:{}}function fu(e,t){let n=kl(typeof t==`string`?t:t.name,e.schema);return n===`node`?du(e,t):n===`mark`?Vl(e,t):{}}function pu(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function mu(e){let t=pu(e);return t.length===1?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function hu(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((e,i)=>{let a=[];if(e.ranges.length)e.forEach((e,t)=>{a.push({from:e,to:t})});else{let{from:e,to:t}=n[i];if(e===void 0||t===void 0)return;a.push({from:e,to:t})}a.forEach(({from:e,to:n})=>{let a=t.slice(i).map(e,-1),o=t.slice(i).map(n),s=t.invert().map(a,-1),c=t.invert().map(o);r.push({oldRange:{from:s,to:c},newRange:{from:a,to:o}})})}),mu(r)}function gu(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=Gc(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{e&&e?.nodeSize!==void 0&&r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}var _u=(e,t,n,r=20)=>{let i=e.doc.resolve(n),a=r,o=null;for(;a>0&&o===null;){let e=i.node(a);e?.type.name===t?o=e:--a}return[o,a]},vu=e=>{let t=e.depth-1;if(t<0)return null;let n=e.index(t);return n===0?null:e.node(t).child(n-1)};function yu(e,t){return t.nodes[e]||t.marks[e]||null}function bu(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return r?r.attribute.keepOnSplit:!1}))}var xu=(e,t=500)=>{let n=``,r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,a)=>{var o;let s=(o=e.type.spec).toText?.call(o,{node:e,pos:t,parent:i,index:a})||e.textContent||`%leaf%`;n+=e.isAtom&&!e.isText?s:s.slice(0,Math.max(0,r-t))}),n};function Su(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?Kc(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!a||a.name===e.type.name).find(e=>Hc(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(a&&e.inlineContent&&!e.type.allowsMarkType(a))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),c=Math.min(i,t+e.nodeSize),l=c-n;o+=l,s.push(...e.marks.map(e=>({mark:e,from:n,to:c})))})}),o===0)return!1;let c=s.filter(e=>!a||a.name===e.mark.type.name).filter(e=>Hc(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=s.filter(e=>!a||e.mark.type!==a&&e.mark.type.excludes(a)).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+l:c)>=o}function Cu(e,t,n={}){if(!t)return wl(e,null,n)||Su(e,null,n);let r=kl(t,e.schema);return r===`node`?wl(e,t,n):r===`mark`&&Su(e,t,n)}var wu=(e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=Gl(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Tu=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function Eu(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function Du(e,t){let{nodeExtensions:n}=Jl(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=z(I(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`&&i.split(` `).includes(`list`)}function Ou(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name===`hardBreak`)return!0;if(e.isText)return!/\S/.test(e.text??``)}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(e=>{r!==!1&&(Ou(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function ku(e){return e instanceof N}var Au=class e{constructor(e){this.position=e}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}};function ju(e,t){let n=t.mapping.mapResult(e.position);return{position:new Au(n.pos),mapResult:n}}function Mu(e){return new Au(e)}function Nu(e,t,n){let{selection:r}=t,i=null;if(Yc(r)&&(i=r.$cursor),i){let t=e.storedMarks??i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:a}=r;return a.some(({$from:t,$to:r})=>{let i=t.depth===0&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}var Pu=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=Kc(e,r.schema);if(i){if(o){let e=Vl(r,c);n.addStoredMark(c.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(o,s,c.create({...e.attrs,...t}))}):n.addMark(o,s,c.create(t))})})}return Nu(r,n,c)},Fu=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Iu=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=Mc(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>Er(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>Er(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},Lu=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=Xc(e,0,n.content.size),i=N.create(n,r);t.setSelection(i)}return!0},Ru=(e,t)=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=r,o,s;return typeof t==`number`?(o=t,s=t):t&&`from`in t&&`to`in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},zu=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=M.atStart(n).from,o=M.atEnd(n).to,s=Xc(r,a,o),c=Xc(i,a,o),l=M.create(n,s,c);t.setSelection(l)}return!0},Bu=e=>({state:t,dispatch:n})=>Rr(Mc(e,t.schema))(t,n);function Vu(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>t?.includes(e.type.name));e.tr.ensureMarks(r)}}var Hu=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:a,doc:o}=t,{$from:s,$to:c}=a,l=i.extensionManager.attributes,u=bu(l,s.node().type.name,s.node().attrs);if(a instanceof N&&a.node.isBlock)return!s.parentOffset||!Yt(o,s.pos)?!1:(r&&(e&&Vu(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=c.parentOffset===c.parent.content.size,f=s.depth===0?void 0:dl(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=Yt(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!m&&Yt(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(m&&(a instanceof M&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let e=t.mapping.map(s.before()),n=t.doc.resolve(e);s.node(-1).canReplaceWith(n.index(),n.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&Vu(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},Uu=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=Mc(e,r.schema),{$from:s,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||s.depth<2||!s.sameParent(c))return!1;let u=s.node(-1);if(u.type!==o)return!1;let d=a.extensionManager.attributes;if(s.parent.content.size===0&&s.node(-1).childCount===s.indexAfter(-1)){if(s.depth===2||s.node(-3).type!==o||s.index(-2)!==s.node(-2).childCount-1)return!1;if(i){let e=b.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=b.from(s.node(t).copy(e));let i=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3,a={...bu(d,s.node().type.name,s.node().attrs),...t},c=o.contentMatch.defaultType?.createAndFill(a)||void 0;e=e.append(b.from(o.createAndFill(null,c)||void 0));let l=s.before(s.depth-(r-1));n.replace(l,s.after(-i),new E(e,4-r,0));let u=-1;n.doc.nodesBetween(l,n.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&e.content.size===0&&(u=t+1)}),u>-1&&n.setSelection(M.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...bu(d,u.type.name,u.attrs),...t},m={...bu(d,s.node().type.name,s.node().attrs),...t};n.delete(s.pos,c.pos);let h=f?[{type:o,attrs:p},{type:f,attrs:m}]:[{type:o,attrs:p}];if(!Yt(n.doc,s.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,c=t||e.$to.parentOffset&&e.$from.marks();if(n.split(s.pos,2,h).scrollIntoView(),!c||!i)return!0;let l=c.filter(e=>o.includes(e.type.name));n.ensureMarks(l)}return!0};function Wu(e){return!e||e===`1`?null:e}function Gu(e,t){return Wu(e)===Wu(t)}var Ku=(e,t)=>{let n=Gl(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===i?.type&&Zt(e.doc,n.pos))||!Gu(n.node.attrs.type,i?.attrs.type)||e.join(n.pos),!0},qu=(e,t)=>{let n=Gl(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===i?.type&&Zt(e.doc,r))||!Gu(n.node.attrs.type,i?.attrs.type)||e.join(r),!0};function Ju(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return M.between(r,i)}var Yu=(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:l,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=Mc(e,o.schema),m=Mc(t,o.schema),{selection:h,storedMarks:g}=o,{$from:_,$to:v}=h,y=_.blockRange(v),b=g||h.$to.parentOffset&&h.$from.marks();if(!y)return!1;let x=Gl(e=>Du(e.type.name,d))(h),S=h.from===0&&h.to===o.doc.content.size,C=o.doc.content.content,w=C.length===1?C[0]:null,T=S&&w&&Du(w.type.name,d)?{node:w,pos:0,depth:0}:null,E=x??T,D=!!x&&y.depth>=1&&y.depth-x.depth<=1,O=!!T;if((D||O)&&E){if(E.node.type===p)return S&&O?c().command(({tr:e,dispatch:t})=>{let n=Ju(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(Du(E.node.type.name,d)&&p.validContent(E.node.content))return c().command(()=>(a.setNodeMarkup(E.pos,p),!0)).command(()=>Ku(a,p)).command(()=>qu(a,p)).run()}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>Ku(a,p)).command(()=>qu(a,p)).run():c().command(()=>{let e=u().wrapInList(p,r),t=b.filter(e=>f.includes(e.type.name));return a.ensureMarks(t),e?!0:l.clearNodes()}).wrapInList(p,r).command(()=>Ku(a,p)).command(()=>qu(a,p)).run()},Xu=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=Kc(e,r.schema);return Su(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},Zu=(e,t,n={})=>({state:r,commands:i})=>{let a=Mc(e,r.schema),o=Mc(t,r.schema),s=wl(r,a,n),c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),s?i.setNode(o,c):i.setNode(a,{...c,...n})},Qu=(e,t={})=>({state:n,commands:r})=>{let i=Mc(e,n.schema);return wl(n,i,t)?r.lift(i):r.wrapIn(i,t)},$u=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;--e)t.step(n.steps[e].invert(n.docs[e]));if(a.text){let n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},ed=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{ignoreClearable:i=!1}=e,{selection:a}=t,{empty:o,ranges:s}=a;if(o)return!0;let{nonClearableMarks:c}=r.extensionManager;if(n){let e=Object.values(r.schema.marks).filter(e=>i||!c.includes(e.name));s.forEach(n=>{for(let r of e)t.removeMark(n.$from.pos,n.$to.pos,r)})}return!0},td=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=Kc(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=Gc(c,s,c.marks().find(e=>e.type===s)?.attrs);r&&(e=r.from,t=r.to),n.removeMark(e,t,s)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},nd=e=>({tr:t,state:n,dispatch:r})=>{let{selection:i}=n,a,o;return typeof e==`number`?(a=e,o=e):e&&`from`in e&&`to`in e?(a=e.from,o=e.to):(a=i.from,o=i.to),r&&t.doc.nodesBetween(a,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},rd=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=kl(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Mc(e,r.schema)),s===`mark`&&(o=Kc(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{let s=e.$from.pos,l=e.$to.pos,u,d,f,p;n.selection.empty?r.doc.nodesBetween(s,l,(e,t)=>{a&&a===e.type&&(c=!0,f=Math.max(t,s),p=Math.min(t+e.nodeSize,l),u=t,d=e)}):r.doc.nodesBetween(s,l,(e,r)=>{r<s&&a&&a===e.type&&(c=!0,f=Math.max(r,s),p=Math.min(r+e.nodeSize,l),u=r,d=e),r>=s&&r<=l&&(a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),o&&e.marks.length&&e.marks.forEach(a=>{if(o===a.type&&(c=!0,i)){let i=Math.max(r,s),c=Math.min(r+e.nodeSize,l);n.addMark(i,c,o.create({...a.attrs,...t}))}}))}),d&&(u!==void 0&&i&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),o&&d.marks.length&&d.marks.forEach(e=>{o===e.type&&i&&n.addMark(f,p,o.create({...e.attrs,...t}))}))}),c},id=new Jn(`__tiptap_decorations__`),ad=e=>({tr:t,dispatch:n})=>(n&&t.setMeta(id,{type:`force`,name:e}),!0),od=(e,t={})=>({state:n,dispatch:r})=>Tr(Mc(e,n.schema),t)(n,r),sd=(e,t={})=>({state:n,dispatch:r})=>Mr(Mc(e,n.schema),t)(n,r),cd=m({blur:()=>Tc,clearContent:()=>Ec,clearNodes:()=>Dc,command:()=>Oc,createParagraphNear:()=>kc,cut:()=>Ac,deleteCurrentNode:()=>jc,deleteNode:()=>Nc,deleteRange:()=>Pc,deleteSelection:()=>Rc,enter:()=>zc,exitCode:()=>Bc,extendMarkRange:()=>qc,first:()=>Jc,focus:()=>tl,forEach:()=>nl,insertContent:()=>rl,insertContentAt:()=>ul,insertDefaultBlock:()=>fl,joinBackward:()=>hl,joinDown:()=>ml,joinForward:()=>gl,joinItemBackward:()=>_l,joinItemForward:()=>vl,joinTextblockBackward:()=>yl,joinTextblockForward:()=>bl,joinUp:()=>pl,keyboardShortcut:()=>Cl,lift:()=>Tl,liftEmptyBlock:()=>El,liftListItem:()=>Dl,newlineInCode:()=>Ol,resetAttributes:()=>jl,scrollIntoView:()=>Ml,selectAll:()=>Nl,selectNodeBackward:()=>Pl,selectNodeForward:()=>Fl,selectParentNode:()=>Il,selectTextblockEnd:()=>Ll,selectTextblockStart:()=>Rl,setContent:()=>Bl,setMark:()=>Pu,setMeta:()=>Fu,setNode:()=>Iu,setNodeSelection:()=>Lu,setTextDirection:()=>Ru,setTextSelection:()=>zu,sinkListItem:()=>Bu,splitBlock:()=>Hu,splitListItem:()=>Uu,toggleList:()=>Yu,toggleMark:()=>Xu,toggleNode:()=>Zu,toggleWrap:()=>Qu,undoInputRule:()=>$u,unsetAllMarks:()=>ed,unsetMark:()=>td,unsetTextDirection:()=>nd,updateAttributes:()=>rd,updateDecorations:()=>ad,wrapIn:()=>od,wrapInList:()=>sd}),ld=new WeakMap;function ud(e,t){ld.set(e,(ld.get(e)??0)+1);try{return t()}finally{let t=(ld.get(e)??1)-1;t>0?ld.set(e,t):ld.delete(e)}}function dd(e){return ld.has(e)}var fd=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},pd=typeof process<`u`&&!1;function md(e){return e.kind===`widget`}function hd(e,t){let n=[],r=new Set;for(let i of e)i.kind===`widget`&&md(i)&&r.add(i.key),n.push(i.toPMDecoration(t));return{decorations:n,widgetKeys:r}}function gd(e,t,n){let{decorations:r,widgetKeys:i}=hd(t,n);return{set:xs.create(e,r),widgetKeys:i}}function _d({position:e,from:t,to:n,docSize:r}){return e<t?!1:e<n||e===n&&n===r}function vd({decorations:e,from:t,to:n,docSize:r,extensionName:i,warnedExtensions:a}){return e.filter(e=>_d({position:e.anchor,from:t,to:n,docSize:r})?!0:(e.anchor===n||a.has(i)||(a.add(i),console.warn(`[tiptap warn]: Extension "${i}" returned a decoration outside the requested range [${t}, ${n}). It was ignored.`)),!1))}function yd(e){let t=e.spec?.key;return typeof t==`string`?t:void 0}function bd(e){let t=new Map,n=new Map;for(let r of e.find()){let e=yd(r);if(!e)continue;let i=r.spec.extensionName??`unknown`,a=t.get(e)??new Set;a.add(i),t.set(e,a),n.set(e,(n.get(e)??0)+1)}return Array.from(t,([e,t])=>({key:e,extensions:t})).filter(({key:e})=>(n.get(e)??0)>1)}function xd(e){return e.jsonID===`attr`}function Sd(e){let t=!1;if(e.getMap().forEach(()=>{t=!0}),t||xd(e))return!0;let n=e;return typeof n.from==`number`&&typeof n.to==`number`}function Cd(e,t){let n=null,r=0,i=0;for(let a=0;a<e.childCount&&!(i>t.to);a+=1){let o=i+e.child(a).nodeSize;o>=t.from&&(n===null&&(n=i),r=o),i=o}return n===null?null:{from:n,to:r}}function wd(e,t){if(e.steps.some(e=>!Sd(e)))return{type:`full`};let n=hu(e).map(({newRange:e})=>e);e.steps.forEach((t,r)=>{if(!xd(t))return;let i=e.mapping.slice(r);n.push({from:i.map(t.pos,-1),to:i.map(t.pos+1)})});let r=[];for(let e of n){let n=Cd(t,e);n&&r.push(n)}r.sort((e,t)=>e.from-t.from);let i=[];for(let e of r){let t=i[i.length-1];t&&e.from<=t.to?t.to=Math.max(t.to,e.to):i.push({...e})}return{type:`ranges`,ranges:i}}function Td(e,t,n,r){return e.map(t,n,{onRemove:e=>{let t=e?.key;typeof t==`string`&&r.delete(t)}})}function Ed(e,t,n){let r=t.decorationSetsByExtension[e]??xs.empty,i=new Set(t.widgetKeysByExtension[e]??[]);return{set:Td(r,n.mapping,n.doc,i),widgetKeys:i}}function Dd(e,t){let n=Object.values(t).flatMap(e=>e.find());return xs.create(e,n)}function Od(e){let t=new Set;for(let n of Object.values(e))for(let e of n)t.add(e);return t}function kd(e,t){switch(t.update??`document`){case`document`:if(t.createInRange)throw Error(`[tiptap error]: Extension "${e}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case`changedRanges`:if(!t.createInRange)throw Error(`[tiptap error]: Extension "${e}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case`manual`:if(t.createInRange)throw Error(`[tiptap error]: Extension "${e}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(t.shouldUpdate)throw Error(`[tiptap error]: Extension "${e}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw Error(`[tiptap error]: Extension "${e}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}function B(e,t,n){return n?!0:e.update===`manual`?!1:e.shouldUpdate?e.shouldUpdate(t):t.tr.docChanged}var Ad=new Set,jd=class{constructor(e){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:e})=>{let t=id.getState(e);t&&this.warnDuplicateWidgetKeys(t)},this.editor=e.editor,this.entries=this.resolveEntries(e.entries),this.entries.forEach(({name:e,spec:t})=>kd(e,t)),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on(`beforeTransaction`,this.handleBeforeTransaction)}destroy(){this.editor.off(`beforeTransaction`,this.handleBeforeTransaction)}liveWidgetKeys(){return id.getState(this.editor.state)?.widgetKeys??Ad}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(e){let t=[];for(let{name:n,addDecorations:r}of e){let e=r();e&&t.push({name:n,spec:e})}return t}createPlugin(){let{editor:e,entries:t}=this;return new Gn({key:id,state:{init:(e,n)=>{let r={},i={};for(let{name:e,spec:a}of t){let{set:t,widgetKeys:o}=this.buildFullSet(e,a,n);r[e]=t,i[e]=o}let a={decorationSetsByExtension:r,widgetKeysByExtension:i,mergedDecorationSet:this.buildMergedSet(n.doc,r),widgetKeys:Od(i)};return this.warnDuplicateWidgetKeys(a),a},apply:(n,r,i,a)=>{let o=n.getMeta(id),s=o?.type===`force`&&!o.name,c=o?.type===`force`?o.name:void 0,l={},u={},d=new Set;return ud(e,()=>{for(let{name:o,spec:f}of t){let t=s||c===o;if(!B(f,{editor:e,tr:n,oldState:i,newState:a},t)){let e=Ed(o,r,n);l[o]=e.set,u[o]=e.widgetKeys}else if(f.update===`changedRanges`&&n.docChanged&&!t){let e=this.applyChangedRangesRecompute(o,f,r,n,a);l[o]=e.set,u[o]=e.widgetKeys,d.add(o)}else{let{set:e,widgetKeys:t}=this.buildFullSet(o,f,a);l[o]=e,u[o]=t,d.add(o)}}}),d.size===0&&!n.docChanged?r:{decorationSetsByExtension:l,widgetKeysByExtension:u,mergedDecorationSet:this.mergeAfterApply({entries:t,previous:r,tr:n,decorationSetsByExtension:l,recomputedNames:d}),widgetKeys:Od(u)}}},props:{decorations(e){return id.getState(e)?.mergedDecorationSet??xs.empty}}})}applyChangedRangesRecompute(e,t,n,r,i){let a=wd(r,i.doc);return a.type===`full`?this.buildFullSet(e,t,i):this.rebuildRanges(e,t,n,r,i,a.ranges)}rebuildRanges(e,t,n,r,i,a){let o=n.decorationSetsByExtension[e]??xs.empty,s=new Set(n.widgetKeysByExtension[e]??[]),c=Td(o,r.mapping,r.doc,s),l=i.doc.content.size;for(let{from:n,to:r}of a){let a=c.find(n,r).filter(e=>_d({position:e.from,from:n,to:r,docSize:l}));for(let e of a){let t=yd(e);t&&s.delete(t)}c=c.remove(a);let{decorations:o,widgetKeys:u}=hd(vd({decorations:this.runCreate(e,`createInRange`,()=>t.createInRange({editor:this.editor,state:i,view:this.mountedView,from:n,to:r})),from:n,to:r,docSize:l,extensionName:e,warnedExtensions:this.warnedOutOfRangeExtensions}),e);c=c.add(i.doc,o);for(let e of u)s.add(e)}return{set:c,widgetKeys:s}}buildFullSet(e,t,n){let r=this.runCreate(e,`create`,()=>t.create({editor:this.editor,state:n,view:this.mountedView}));return gd(n.doc,r,e)}runCreate(e,t,n){try{return n()}catch(n){return console.error(`[tiptap error]: Extension "${e}" threw in \`addDecorations().${t}()\`. Its decorations were dropped for this update.`,n),[]}}warnDuplicateWidgetKeys(e){if(!pd)return;if(e.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let t=bd(e.mergedDecorationSet),n=new Set(t.map(({key:e})=>e));for(let{key:e,extensions:n}of t){if(this.warnedWidgetKeys.has(e))continue;let t=Array.from(n).map(e=>`"${e}"`).join(`, `);console.warn(`[tiptap warn]: Duplicate widget decoration key "${e}" in extension${n.size===1?``:`s`} ${t}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(e,t){let n=Object.keys(t);return n.length===1?t[n[0]]:Dd(e,t)}mergeAfterApply({entries:e,previous:t,tr:n,decorationSetsByExtension:r,recomputedNames:i}){return e.length===1?r[e[0].name]:i.size===0?t.mergedDecorationSet.map(n.mapping,n.doc):Dd(n.doc,r)}};function Md(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof N){let e=r.index();return r.parent.canReplaceWith(e,e+1,t)}let i=r.depth;for(;i>=0;){let e=r.index(i);if(r.node(i).contentMatchAt(e).matchType(t))return!0;--i}return!1}function Nd(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:``}]`);if(r!==null)return r;let i=document.createElement(`style`);return t&&i.setAttribute(`nonce`,t),i.setAttribute(`data-tiptap-style${n?`-${n}`:``}`,``),i.innerHTML=e,document.getElementsByTagName(`head`)[0].appendChild(i),i}function Pd(e){return typeof e==`number`}function Fd(e){return Object.prototype.toString.call(e).slice(8,-1)}function Id(e){return Fd(e)===`Object`&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Ld(e,t,n){let r=e.split(`
14
+ `,textSerializers:o={}}=n||{},s=``;return e.nodesBetween(r,i,(e,n,c,l)=>{e.isBlock&&n>r&&(s+=a);let u=o?.[e.type.name];if(u)return c&&(s+=u({node:e,pos:n,parent:c,index:l,range:t})),!1;if(e.isText){var d;s+=e==null||(d=e.text)==null?void 0:d.slice(Math.max(r,n)-n,i-n)}}),s}function uu(e,t){return lu(e,{from:0,to:e.content.size},t)}function du(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function fu(e,t){let n=Mc(t,e.schema),{from:r,to:i}=e.selection,a=[];e.doc.nodesBetween(r,i,e=>{a.push(e)});let o=a.reverse().find(e=>e.type.name===n.name);return o?{...o.attrs}:{}}function pu(e,t){let n=kl(typeof t==`string`?t:t.name,e.schema);return n===`node`?fu(e,t):n===`mark`?Vl(e,t):{}}function mu(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function hu(e){let t=mu(e);return t.length===1?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function gu(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((e,i)=>{let a=[];if(e.ranges.length)e.forEach((e,t)=>{a.push({from:e,to:t})});else{let{from:e,to:t}=n[i];if(e===void 0||t===void 0)return;a.push({from:e,to:t})}a.forEach(({from:e,to:n})=>{let a=t.slice(i).map(e,-1),o=t.slice(i).map(n),s=t.invert().map(a,-1),c=t.invert().map(o);r.push({oldRange:{from:s,to:c},newRange:{from:a,to:o}})})}),hu(r)}function _u(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=Gc(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{e&&e?.nodeSize!==void 0&&r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}var vu=(e,t,n,r=20)=>{let i=e.doc.resolve(n),a=r,o=null;for(;a>0&&o===null;){let e=i.node(a);e?.type.name===t?o=e:--a}return[o,a]},yu=e=>{let t=e.depth-1;if(t<0)return null;let n=e.index(t);return n===0?null:e.node(t).child(n-1)};function bu(e,t){return t.nodes[e]||t.marks[e]||null}function xu(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return r?r.attribute.keepOnSplit:!1}))}var Su=(e,t=500)=>{let n=``,r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,a)=>{var o;let s=(o=e.type.spec).toText?.call(o,{node:e,pos:t,parent:i,index:a})||e.textContent||`%leaf%`;n+=e.isAtom&&!e.isText?s:s.slice(0,Math.max(0,r-t))}),n};function Cu(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?Kc(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!a||a.name===e.type.name).find(e=>Hc(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(a&&e.inlineContent&&!e.type.allowsMarkType(a))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),c=Math.min(i,t+e.nodeSize),l=c-n;o+=l,s.push(...e.marks.map(e=>({mark:e,from:n,to:c})))})}),o===0)return!1;let c=s.filter(e=>!a||a.name===e.mark.type.name).filter(e=>Hc(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=s.filter(e=>!a||e.mark.type!==a&&e.mark.type.excludes(a)).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+l:c)>=o}function wu(e,t,n={}){if(!t)return wl(e,null,n)||Cu(e,null,n);let r=kl(t,e.schema);return r===`node`?wl(e,t,n):r===`mark`&&Cu(e,t,n)}var Tu=(e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=Gl(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Eu=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function Du(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function Ou(e,t){let{nodeExtensions:n}=Yl(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=R(I(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`&&i.split(` `).includes(`list`)}function ku(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name===`hardBreak`)return!0;if(e.isText)return!/\S/.test(e.text??``)}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(e=>{r!==!1&&(ku(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function Au(e){return e instanceof N}var ju=class e{constructor(e){this.position=e}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}};function Mu(e,t){let n=t.mapping.mapResult(e.position);return{position:new ju(n.pos),mapResult:n}}function Nu(e){return new ju(e)}function Pu(e,t,n){let{selection:r}=t,i=null;if(Yc(r)&&(i=r.$cursor),i){let t=e.storedMarks??i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:a}=r;return a.some(({$from:t,$to:r})=>{let i=t.depth===0&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}var Fu=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=Kc(e,r.schema);if(i){if(o){let e=Vl(r,c);n.addStoredMark(c.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(o,s,c.create({...e.attrs,...t}))}):n.addMark(o,s,c.create(t))})})}return Pu(r,n,c)},Iu=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Lu=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=Mc(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>Er(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>Er(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},Ru=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=Xc(e,0,n.content.size),i=N.create(n,r);t.setSelection(i)}return!0},zu=(e,t)=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=r,o,s;return typeof t==`number`?(o=t,s=t):t&&`from`in t&&`to`in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},Bu=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=M.atStart(n).from,o=M.atEnd(n).to,s=Xc(r,a,o),c=Xc(i,a,o),l=M.create(n,s,c);t.setSelection(l)}return!0},Vu=e=>({state:t,dispatch:n})=>Rr(Mc(e,t.schema))(t,n);function Hu(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>t?.includes(e.type.name));e.tr.ensureMarks(r)}}var Uu=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:a,doc:o}=t,{$from:s,$to:c}=a,l=i.extensionManager.attributes,u=xu(l,s.node().type.name,s.node().attrs);if(a instanceof N&&a.node.isBlock)return!s.parentOffset||!Yt(o,s.pos)?!1:(r&&(e&&Hu(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=c.parentOffset===c.parent.content.size,f=s.depth===0?void 0:dl(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=Yt(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!m&&Yt(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(m&&(a instanceof M&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let e=t.mapping.map(s.before()),n=t.doc.resolve(e);s.node(-1).canReplaceWith(n.index(),n.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&Hu(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},Wu=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=Mc(e,r.schema),{$from:s,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||s.depth<2||!s.sameParent(c))return!1;let u=s.node(-1);if(u.type!==o)return!1;let d=a.extensionManager.attributes;if(s.parent.content.size===0&&s.node(-1).childCount===s.indexAfter(-1)){if(s.depth===2||s.node(-3).type!==o||s.index(-2)!==s.node(-2).childCount-1)return!1;if(i){let e=b.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=b.from(s.node(t).copy(e));let i=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3,a={...xu(d,s.node().type.name,s.node().attrs),...t},c=o.contentMatch.defaultType?.createAndFill(a)||void 0;e=e.append(b.from(o.createAndFill(null,c)||void 0));let l=s.before(s.depth-(r-1));n.replace(l,s.after(-i),new E(e,4-r,0));let u=-1;n.doc.nodesBetween(l,n.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&e.content.size===0&&(u=t+1)}),u>-1&&n.setSelection(M.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...xu(d,u.type.name,u.attrs),...t},m={...xu(d,s.node().type.name,s.node().attrs),...t};n.delete(s.pos,c.pos);let h=f?[{type:o,attrs:p},{type:f,attrs:m}]:[{type:o,attrs:p}];if(!Yt(n.doc,s.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,c=t||e.$to.parentOffset&&e.$from.marks();if(n.split(s.pos,2,h).scrollIntoView(),!c||!i)return!0;let l=c.filter(e=>o.includes(e.type.name));n.ensureMarks(l)}return!0};function Gu(e){return!e||e===`1`?null:e}function Ku(e,t){return Gu(e)===Gu(t)}var qu=(e,t)=>{let n=Gl(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===i?.type&&Zt(e.doc,n.pos))||!Ku(n.node.attrs.type,i?.attrs.type)||e.join(n.pos),!0},Ju=(e,t)=>{let n=Gl(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===i?.type&&Zt(e.doc,r))||!Ku(n.node.attrs.type,i?.attrs.type)||e.join(r),!0};function Yu(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return M.between(r,i)}var Xu=(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:l,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=Mc(e,o.schema),m=Mc(t,o.schema),{selection:h,storedMarks:g}=o,{$from:_,$to:v}=h,y=_.blockRange(v),b=g||h.$to.parentOffset&&h.$from.marks();if(!y)return!1;let x=Gl(e=>Ou(e.type.name,d))(h),S=h.from===0&&h.to===o.doc.content.size,C=o.doc.content.content,w=C.length===1?C[0]:null,T=S&&w&&Ou(w.type.name,d)?{node:w,pos:0,depth:0}:null,E=x??T,D=!!x&&y.depth>=1&&y.depth-x.depth<=1,O=!!T;if((D||O)&&E){if(E.node.type===p)return S&&O?c().command(({tr:e,dispatch:t})=>{let n=Yu(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(Ou(E.node.type.name,d)&&p.validContent(E.node.content))return c().command(()=>(a.setNodeMarkup(E.pos,p),!0)).command(()=>qu(a,p)).command(()=>Ju(a,p)).run()}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>qu(a,p)).command(()=>Ju(a,p)).run():c().command(()=>{let e=u().wrapInList(p,r),t=b.filter(e=>f.includes(e.type.name));return a.ensureMarks(t),e?!0:l.clearNodes()}).wrapInList(p,r).command(()=>qu(a,p)).command(()=>Ju(a,p)).run()},Zu=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=Kc(e,r.schema);return Cu(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},Qu=(e,t,n={})=>({state:r,commands:i})=>{let a=Mc(e,r.schema),o=Mc(t,r.schema),s=wl(r,a,n),c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),s?i.setNode(o,c):i.setNode(a,{...c,...n})},$u=(e,t={})=>({state:n,commands:r})=>{let i=Mc(e,n.schema);return wl(n,i,t)?r.lift(i):r.wrapIn(i,t)},ed=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;--e)t.step(n.steps[e].invert(n.docs[e]));if(a.text){let n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},td=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{ignoreClearable:i=!1}=e,{selection:a}=t,{empty:o,ranges:s}=a;if(o)return!0;let{nonClearableMarks:c}=r.extensionManager;if(n){let e=Object.values(r.schema.marks).filter(e=>i||!c.includes(e.name));s.forEach(n=>{for(let r of e)t.removeMark(n.$from.pos,n.$to.pos,r)})}return!0},nd=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=Kc(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=Gc(c,s,c.marks().find(e=>e.type===s)?.attrs);r&&(e=r.from,t=r.to),n.removeMark(e,t,s)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},rd=e=>({tr:t,state:n,dispatch:r})=>{let{selection:i}=n,a,o;return typeof e==`number`?(a=e,o=e):e&&`from`in e&&`to`in e?(a=e.from,o=e.to):(a=i.from,o=i.to),r&&t.doc.nodesBetween(a,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},id=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=kl(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Mc(e,r.schema)),s===`mark`&&(o=Kc(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{let s=e.$from.pos,l=e.$to.pos,u,d,f,p;n.selection.empty?r.doc.nodesBetween(s,l,(e,t)=>{a&&a===e.type&&(c=!0,f=Math.max(t,s),p=Math.min(t+e.nodeSize,l),u=t,d=e)}):r.doc.nodesBetween(s,l,(e,r)=>{r<s&&a&&a===e.type&&(c=!0,f=Math.max(r,s),p=Math.min(r+e.nodeSize,l),u=r,d=e),r>=s&&r<=l&&(a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),o&&e.marks.length&&e.marks.forEach(a=>{if(o===a.type&&(c=!0,i)){let i=Math.max(r,s),c=Math.min(r+e.nodeSize,l);n.addMark(i,c,o.create({...a.attrs,...t}))}}))}),d&&(u!==void 0&&i&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),o&&d.marks.length&&d.marks.forEach(e=>{o===e.type&&i&&n.addMark(f,p,o.create({...e.attrs,...t}))}))}),c},ad=new Jn(`__tiptap_decorations__`),od=e=>({tr:t,dispatch:n})=>(n&&t.setMeta(ad,{type:`force`,name:e}),!0),sd=(e,t={})=>({state:n,dispatch:r})=>Tr(Mc(e,n.schema),t)(n,r),cd=(e,t={})=>({state:n,dispatch:r})=>Mr(Mc(e,n.schema),t)(n,r),ld=m({blur:()=>Tc,clearContent:()=>Ec,clearNodes:()=>Dc,command:()=>Oc,createParagraphNear:()=>kc,cut:()=>Ac,deleteCurrentNode:()=>jc,deleteNode:()=>Nc,deleteRange:()=>Pc,deleteSelection:()=>Rc,enter:()=>zc,exitCode:()=>Bc,extendMarkRange:()=>qc,first:()=>Jc,focus:()=>tl,forEach:()=>nl,insertContent:()=>rl,insertContentAt:()=>ul,insertDefaultBlock:()=>fl,joinBackward:()=>hl,joinDown:()=>ml,joinForward:()=>gl,joinItemBackward:()=>_l,joinItemForward:()=>vl,joinTextblockBackward:()=>yl,joinTextblockForward:()=>bl,joinUp:()=>pl,keyboardShortcut:()=>Cl,lift:()=>Tl,liftEmptyBlock:()=>El,liftListItem:()=>Dl,newlineInCode:()=>Ol,resetAttributes:()=>jl,scrollIntoView:()=>Ml,selectAll:()=>Nl,selectNodeBackward:()=>Pl,selectNodeForward:()=>Fl,selectParentNode:()=>Il,selectTextblockEnd:()=>Ll,selectTextblockStart:()=>Rl,setContent:()=>Bl,setMark:()=>Fu,setMeta:()=>Iu,setNode:()=>Lu,setNodeSelection:()=>Ru,setTextDirection:()=>zu,setTextSelection:()=>Bu,sinkListItem:()=>Vu,splitBlock:()=>Uu,splitListItem:()=>Wu,toggleList:()=>Xu,toggleMark:()=>Zu,toggleNode:()=>Qu,toggleWrap:()=>$u,undoInputRule:()=>ed,unsetAllMarks:()=>td,unsetMark:()=>nd,unsetTextDirection:()=>rd,updateAttributes:()=>id,updateDecorations:()=>od,wrapIn:()=>sd,wrapInList:()=>cd}),ud=new WeakMap;function dd(e,t){ud.set(e,(ud.get(e)??0)+1);try{return t()}finally{let t=(ud.get(e)??1)-1;t>0?ud.set(e,t):ud.delete(e)}}function fd(e){return ud.has(e)}var pd=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},md=typeof process<`u`&&!1;function hd(e){return e.kind===`widget`}function gd(e,t){let n=[],r=new Set;for(let i of e)i.kind===`widget`&&hd(i)&&r.add(i.key),n.push(i.toPMDecoration(t));return{decorations:n,widgetKeys:r}}function _d(e,t,n){let{decorations:r,widgetKeys:i}=gd(t,n);return{set:xs.create(e,r),widgetKeys:i}}function vd({position:e,from:t,to:n,docSize:r}){return e<t?!1:e<n||e===n&&n===r}function yd({decorations:e,from:t,to:n,docSize:r,extensionName:i,warnedExtensions:a}){return e.filter(e=>vd({position:e.anchor,from:t,to:n,docSize:r})?!0:(e.anchor===n||a.has(i)||(a.add(i),console.warn(`[tiptap warn]: Extension "${i}" returned a decoration outside the requested range [${t}, ${n}). It was ignored.`)),!1))}function bd(e){let t=e.spec?.key;return typeof t==`string`?t:void 0}function xd(e){let t=new Map,n=new Map;for(let r of e.find()){let e=bd(r);if(!e)continue;let i=r.spec.extensionName??`unknown`,a=t.get(e)??new Set;a.add(i),t.set(e,a),n.set(e,(n.get(e)??0)+1)}return Array.from(t,([e,t])=>({key:e,extensions:t})).filter(({key:e})=>(n.get(e)??0)>1)}function Sd(e){return e.jsonID===`attr`}function Cd(e){let t=!1;if(e.getMap().forEach(()=>{t=!0}),t||Sd(e))return!0;let n=e;return typeof n.from==`number`&&typeof n.to==`number`}function wd(e,t){let n=null,r=0,i=0;for(let a=0;a<e.childCount&&!(i>t.to);a+=1){let o=i+e.child(a).nodeSize;o>=t.from&&(n===null&&(n=i),r=o),i=o}return n===null?null:{from:n,to:r}}function Td(e,t){if(e.steps.some(e=>!Cd(e)))return{type:`full`};let n=gu(e).map(({newRange:e})=>e);e.steps.forEach((t,r)=>{if(!Sd(t))return;let i=e.mapping.slice(r);n.push({from:i.map(t.pos,-1),to:i.map(t.pos+1)})});let r=[];for(let e of n){let n=wd(t,e);n&&r.push(n)}r.sort((e,t)=>e.from-t.from);let i=[];for(let e of r){let t=i[i.length-1];t&&e.from<=t.to?t.to=Math.max(t.to,e.to):i.push({...e})}return{type:`ranges`,ranges:i}}function Ed(e,t,n,r){return e.map(t,n,{onRemove:e=>{let t=e?.key;typeof t==`string`&&r.delete(t)}})}function Dd(e,t,n){let r=t.decorationSetsByExtension[e]??xs.empty,i=new Set(t.widgetKeysByExtension[e]??[]);return{set:Ed(r,n.mapping,n.doc,i),widgetKeys:i}}function Od(e,t){let n=Object.values(t).flatMap(e=>e.find());return xs.create(e,n)}function kd(e){let t=new Set;for(let n of Object.values(e))for(let e of n)t.add(e);return t}function Ad(e,t){switch(t.update??`document`){case`document`:if(t.createInRange)throw Error(`[tiptap error]: Extension "${e}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case`changedRanges`:if(!t.createInRange)throw Error(`[tiptap error]: Extension "${e}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case`manual`:if(t.createInRange)throw Error(`[tiptap error]: Extension "${e}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(t.shouldUpdate)throw Error(`[tiptap error]: Extension "${e}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw Error(`[tiptap error]: Extension "${e}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}function z(e,t,n){return n?!0:e.update===`manual`?!1:e.shouldUpdate?e.shouldUpdate(t):t.tr.docChanged}var jd=new Set,Md=class{constructor(e){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:e})=>{let t=ad.getState(e);t&&this.warnDuplicateWidgetKeys(t)},this.editor=e.editor,this.entries=this.resolveEntries(e.entries),this.entries.forEach(({name:e,spec:t})=>Ad(e,t)),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on(`beforeTransaction`,this.handleBeforeTransaction)}destroy(){this.editor.off(`beforeTransaction`,this.handleBeforeTransaction)}liveWidgetKeys(){return ad.getState(this.editor.state)?.widgetKeys??jd}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(e){let t=[];for(let{name:n,addDecorations:r}of e){let e=r();e&&t.push({name:n,spec:e})}return t}createPlugin(){let{editor:e,entries:t}=this;return new Gn({key:ad,state:{init:(e,n)=>{let r={},i={};for(let{name:e,spec:a}of t){let{set:t,widgetKeys:o}=this.buildFullSet(e,a,n);r[e]=t,i[e]=o}let a={decorationSetsByExtension:r,widgetKeysByExtension:i,mergedDecorationSet:this.buildMergedSet(n.doc,r),widgetKeys:kd(i)};return this.warnDuplicateWidgetKeys(a),a},apply:(n,r,i,a)=>{let o=n.getMeta(ad),s=o?.type===`force`&&!o.name,c=o?.type===`force`?o.name:void 0,l={},u={},d=new Set;return dd(e,()=>{for(let{name:o,spec:f}of t){let t=s||c===o;if(!z(f,{editor:e,tr:n,oldState:i,newState:a},t)){let e=Dd(o,r,n);l[o]=e.set,u[o]=e.widgetKeys}else if(f.update===`changedRanges`&&n.docChanged&&!t){let e=this.applyChangedRangesRecompute(o,f,r,n,a);l[o]=e.set,u[o]=e.widgetKeys,d.add(o)}else{let{set:e,widgetKeys:t}=this.buildFullSet(o,f,a);l[o]=e,u[o]=t,d.add(o)}}}),d.size===0&&!n.docChanged?r:{decorationSetsByExtension:l,widgetKeysByExtension:u,mergedDecorationSet:this.mergeAfterApply({entries:t,previous:r,tr:n,decorationSetsByExtension:l,recomputedNames:d}),widgetKeys:kd(u)}}},props:{decorations(e){return ad.getState(e)?.mergedDecorationSet??xs.empty}}})}applyChangedRangesRecompute(e,t,n,r,i){let a=Td(r,i.doc);return a.type===`full`?this.buildFullSet(e,t,i):this.rebuildRanges(e,t,n,r,i,a.ranges)}rebuildRanges(e,t,n,r,i,a){let o=n.decorationSetsByExtension[e]??xs.empty,s=new Set(n.widgetKeysByExtension[e]??[]),c=Ed(o,r.mapping,r.doc,s),l=i.doc.content.size;for(let{from:n,to:r}of a){let a=c.find(n,r).filter(e=>vd({position:e.from,from:n,to:r,docSize:l}));for(let e of a){let t=bd(e);t&&s.delete(t)}c=c.remove(a);let{decorations:o,widgetKeys:u}=gd(yd({decorations:this.runCreate(e,`createInRange`,()=>t.createInRange({editor:this.editor,state:i,view:this.mountedView,from:n,to:r})),from:n,to:r,docSize:l,extensionName:e,warnedExtensions:this.warnedOutOfRangeExtensions}),e);c=c.add(i.doc,o);for(let e of u)s.add(e)}return{set:c,widgetKeys:s}}buildFullSet(e,t,n){let r=this.runCreate(e,`create`,()=>t.create({editor:this.editor,state:n,view:this.mountedView}));return _d(n.doc,r,e)}runCreate(e,t,n){try{return n()}catch(n){return console.error(`[tiptap error]: Extension "${e}" threw in \`addDecorations().${t}()\`. Its decorations were dropped for this update.`,n),[]}}warnDuplicateWidgetKeys(e){if(!md)return;if(e.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let t=xd(e.mergedDecorationSet),n=new Set(t.map(({key:e})=>e));for(let{key:e,extensions:n}of t){if(this.warnedWidgetKeys.has(e))continue;let t=Array.from(n).map(e=>`"${e}"`).join(`, `);console.warn(`[tiptap warn]: Duplicate widget decoration key "${e}" in extension${n.size===1?``:`s`} ${t}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(e,t){let n=Object.keys(t);return n.length===1?t[n[0]]:Od(e,t)}mergeAfterApply({entries:e,previous:t,tr:n,decorationSetsByExtension:r,recomputedNames:i}){return e.length===1?r[e[0].name]:i.size===0?t.mergedDecorationSet.map(n.mapping,n.doc):Od(n.doc,r)}};function Nd(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof N){let e=r.index();return r.parent.canReplaceWith(e,e+1,t)}let i=r.depth;for(;i>=0;){let e=r.index(i);if(r.node(i).contentMatchAt(e).matchType(t))return!0;--i}return!1}function Pd(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:``}]`);if(r!==null)return r;let i=document.createElement(`style`);return t&&i.setAttribute(`nonce`,t),i.setAttribute(`data-tiptap-style${n?`-${n}`:``}`,``),i.innerHTML=e,document.getElementsByTagName(`head`)[0].appendChild(i),i}function Fd(e){return typeof e==`number`}function Id(e){return Object.prototype.toString.call(e).slice(8,-1)}function Ld(e){return Id(e)===`Object`&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Rd(e,t,n){let r=e.split(`
15
15
  `),i=[],a=``,o=0,s=t.baseIndentSize||2;for(;o<r.length;){let e=r[o],u=e.match(t.itemPattern);if(!u){if(i.length>0)break;if(e.trim()===``){o+=1,a=`${a}${e}\n`;continue}return}let d=t.extractItemData(u),{indentLevel:f,mainContent:p}=d;a=`${a}${e}\n`;let m=[p];for(o+=1;o<r.length;){var c;let e=r[o];if(e.trim()===``){var l;let t=r.slice(o+1).findIndex(e=>e.trim()!==``);if(t===-1)break;if((((l=r[o+1+t].match(/^(\s*)/))==null||(l=l[1])==null?void 0:l.length)||0)>f){m.push(e),a=`${a}${e}\n`,o+=1;continue}break}if((((c=e.match(/^(\s*)/))==null||(c=c[1])==null?void 0:c.length)||0)>f)m.push(e),a=`${a}${e}\n`,o+=1;else break}let h,g=m.slice(1);if(g.length>0){let e=g.map(e=>e.slice(f+s)).join(`
16
- `);e.trim()&&(h=t.customNestedParser?t.customNestedParser(e):n.blockTokens(e))}let _=t.createToken(d,h);i.push(_)}if(i.length!==0)return{items:i,raw:a}}var Rd=4;function zd(e){let t=0;for(let n of e)t=n===` `?t+Rd-t%Rd:t+1;return t}function Bd(e,t,n,r,i){if(!e||!Array.isArray(e.content))return``;let a=typeof n==`function`?n(r):n,[o,...s]=e.content,c=`${a}${t.renderChildren([o])}`;return s&&s.length>0&&s.forEach((e,n)=>{let r=t.renderChild?.call(t,e,n+1)??t.renderChildren([e]);if(r!=null){let n=e=>{if(!i?.alignNestedToPrefix)return t.indent(e);let n=t.indent(``),r=zd(a);return(zd(n)>=r?n:` `.repeat(r))+e},o=r.split(`
16
+ `);e.trim()&&(h=t.customNestedParser?t.customNestedParser(e):n.blockTokens(e))}let _=t.createToken(d,h);i.push(_)}if(i.length!==0)return{items:i,raw:a}}var zd=4;function Bd(e){let t=0;for(let n of e)t=n===` `?t+zd-t%zd:t+1;return t}function Vd(e,t,n,r,i){if(!e||!Array.isArray(e.content))return``;let a=typeof n==`function`?n(r):n,[o,...s]=e.content,c=`${a}${t.renderChildren([o])}`;return s&&s.length>0&&s.forEach((e,n)=>{let r=t.renderChild?.call(t,e,n+1)??t.renderChildren([e]);if(r!=null){let n=e=>{if(!i?.alignNestedToPrefix)return t.indent(e);let n=t.indent(``),r=Bd(a);return(Bd(n)>=r?n:` `.repeat(r))+e},o=r.split(`
17
17
  `).map(e=>n(e||``)).join(`
18
- `);c+=e.type===`paragraph`?`\n\n${o}`:`\n${o}`}}),c}function Vd(e,t){let n={...e};return Id(e)&&Id(t)&&Object.keys(t).forEach(r=>{Id(t[r])&&Id(e[r])?n[r]=Vd(e[r],t[r]):n[r]=t[r]}),n}function Hd(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var Ud=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},Wd=(e,t)=>{if(Vc(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn(`[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".`),r.push(n.replaceWith)),r};function Gd(e){let{editor:t,from:n,to:r,text:i,rules:a,plugin:o}=e,{view:s}=t;if(s.composing)return!1;let c=s.state.doc.resolve(n);if(c.parent.type.spec.code||(c.nodeBefore||c.nodeAfter)?.marks.find(e=>e.type.spec.code))return!1;let l=!1,u=xu(c)+i;return a.forEach(e=>{if(l)return;let a=Wd(u,e.find);if(!a)return;let d=a[0].length-i.length;if(d>0){let e=c.parentOffset-d;if(e<0||c.parent.textBetween(e,c.parentOffset)!==a[0].slice(0,d))return}let f=s.state.tr,p=Cc({state:s.state,transaction:f}),m={from:n-(a[0].length-i.length),to:r},{commands:h,chain:g,can:_}=new wc({editor:t,state:p});e.handler({state:p,range:m,match:a,commands:h,chain:g,can:_})!==null&&f.steps.length&&(e.undoable&&f.setMeta(o,{transform:f,from:n,to:r,text:i}),s.dispatch(f),l=!0)}),l}function Kd(e){let{editor:t,rules:n}=e,r=new Gn({state:{init(){return null},apply(e,i,a){let o=e.getMeta(r);if(o)return o;let s=e.getMeta(`applyInputRules`);return s&&setTimeout(()=>{let{text:e}=s;e=typeof e==`string`?e:Kl(b.from(e),a.schema);let{from:i}=s,o=i+e.length;Gd({editor:t,from:i,to:o,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput(e,i,a,o){return Gd({editor:t,from:i,to:a,text:o,rules:n,plugin:r})},handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&Gd({editor:t,from:i.pos,to:i.pos,text:``,rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if(i.key!==`Enter`)return!1;let{$cursor:a}=e.state.selection;return a?Gd({editor:t,from:a.pos,to:a.pos,text:`
19
- `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var qd=class{constructor(e={}){this.type=`extendable`,this.parent=null,this.child=null,this.name=``,this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...z(I(this,`addOptions`,{name:this.name}))}}get storage(){return{...z(I(this,`addStorage`,{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>Vd(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name=`name`in e?e.name:t.parent.name,t}},Jd=class e extends qd{constructor(...e){super(...e),this.type=`mark`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>e?.type.name===t.name))return!1;let a=i.find(e=>e?.type.name===t.name);return a&&n.removeStoredMark(a),n.insertText(` `,r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},Yd=class{constructor(e){this.find=e.find,this.handler=e.handler}},Xd=(e,t,n)=>{if(Vc(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn(`[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".`),n.push(t.replaceWith)),n}):[]};function Zd(e){let{editor:t,state:n,from:r,to:i,rule:a,pasteEvent:o,dropEvent:s}=e,{commands:c,chain:l,can:u}=new wc({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{var f;if((f=e.type)!=null&&(f=f.spec)!=null&&f.code||!(e.isText||e.isTextblock||e.isInline))return;let p=e.content?.size??e.nodeSize??0,m=Math.max(r,t),h=Math.min(i,t+p);m>=h||Xd(e.isText?e.text||``:e.textBetween(m-t,h-t,void 0,``),a.find,o).forEach(e=>{if(e.index===void 0)return;let t=m+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:i,match:e,commands:c,chain:l,can:u,pasteEvent:o,dropEvent:s});d.push(f)})}),d.every(e=>e!==null)}var Qd=null,$d=e=>{var t;let n=new ClipboardEvent(`paste`,{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData(`text/html`,e),n};function ef(e){let{editor:t,rules:n}=e,r=null,i=!1,a=!1,o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,s;try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}let c=({state:e,from:n,to:r,rule:i,pasteEvt:a})=>{let c=e.tr,l=Cc({state:e,transaction:c});if(Zd({editor:t,state:l,from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:a,dropEvent:s})&&c.steps.length){try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}return o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,c}};return n.map(e=>new Gn({view(e){let n=n=>{r=e.dom.parentElement?.contains(n.target)?e.dom.parentElement:null,r&&(Qd=t)},i=()=>{Qd&&=null};return window.addEventListener(`dragstart`,n),window.addEventListener(`dragend`,i),{destroy(){window.removeEventListener(`dragstart`,n),window.removeEventListener(`dragend`,i)}}},props:{handleDOMEvents:{drop:(e,t)=>{if(a=r===e.dom.parentElement,s=t,!a){let e=Qd;e?.isEditable&&setTimeout(()=>{let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{let n=t.clipboardData?.getData(`text/html`);return o=t,i=!!n?.includes(`data-pm-slice`),!1}}},appendTransaction:(t,n,r)=>{let s=t[0],l=s.getMeta(`uiEvent`)===`paste`&&!i,u=s.getMeta(`uiEvent`)===`drop`&&!a,d=s.getMeta(`applyPasteRules`),f=!!d;if(!l&&!u&&!f)return;if(f){let{text:t}=d;t=typeof t==`string`?t:Kl(b.from(t),r.schema);let{from:n}=d,i=n+t.length,a=$d(t);return c({rule:e,state:r,from:n,to:{b:i},pasteEvt:a})}let p=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);if(Pd(p)&&m&&p!==m.b)return c({rule:e,state:r,from:p,to:m,pasteEvt:o})}}))}var tf=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=t,this.baseExtensions=e,this.extensions=su(e),this.schema=iu(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=I(t,`addCommands`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:yu(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this,t=ou([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:yu(t.name,this.schema)},r=[],i=I(t,`addKeyboardShortcuts`,n),a={};if(t.type===`mark`&&I(t,`exitable`,n)&&(a.ArrowRight=()=>Jd.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(([t,n])=>[t,()=>n({editor:e})]));a={...a,...t}}let o=xc(a);r.push(o);let s=I(t,`addInputRules`,n);if(Eu(t,e.options.enableInputRules)&&s){let t=s();if(t&&t.length){let n=Kd({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let c=I(t,`addPasteRules`,n);if(Eu(t,e.options.enablePasteRules)&&c){let t=c();if(t&&t.length){let n=ef({editor:e,rules:t});r.push(...n)}}let l=I(t,`addProseMirrorPlugins`,n);if(l){let e=l();r.push(...e)}return r}),n=this.createDecorationPlugin();return n&&t.push(n),t}createDecorationPlugin(){var e;let{editor:t}=this;(e=this.decorationManager)==null||e.destroy();let n=[];return this.extensions.forEach(e=>{let r=I(e,`addDecorations`,{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:yu(e.name,this.schema)});r&&n.push({name:e.name,addDecorations:r})}),this.decorationManager=new jd({editor:t,entries:n}),this.decorationManager.plugin}get attributes(){return Yl(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Jl(this.extensions);return Object.fromEntries(t.filter(e=>!!I(e,`addNodeView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=I(t,`addNodeView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Mc(t.name,this.schema)});if(!r)return[];let i=r();return i?[t.name,(r,a,o,s,c)=>{let l=$l(r,n);return i({node:r,view:a,getPos:o,decorations:s,innerDecorations:c,editor:e,extension:t,HTMLAttributes:l})}]:[]}))}dispatchTransaction(e){let{editor:t}=this;return ou([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:yu(n.name,this.schema)},i=I(n,`dispatchTransaction`,r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return ou([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:yu(n.name,this.schema)},i=I(n,`transformPastedHTML`,r);return i?(t,n)=>{let a=e(t,n);return i.call(r,a)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=Jl(this.extensions);return Object.fromEntries(t.filter(e=>!!I(e,`addMarkView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=I(t,`addMarkView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Kc(t.name,this.schema)});return r?[t.name,(i,a,o)=>{let s=$l(i,n);return r()({mark:i,view:a,inline:o,editor:e,extension:t,HTMLAttributes:s,updateAttributes:t=>{Hd(i,e,t)}})}]:[]}))}destroy(){var e;(e=this.decorationManager)==null||e.destroy(),this.extensions.forEach(e=>{let t=e;for(;t.parent;){let e=t.parent;e.child===t&&(e.child=null),t=e}}),this.extensions=[],this.baseExtensions=[],this.decorationManager=null,this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>[e.name,e.storage])),e.forEach(e=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:yu(e.name,this.schema)};e.type===`mark`&&((z(I(e,`keepOnSplit`,t))??!0)&&this.splittableMarks.push(e.name),(z(I(e,`clearable`,t))??!0)||this.nonClearableMarks.push(e.name));let n=I(e,`onBeforeCreate`,t),r=I(e,`onCreate`,t),i=I(e,`onUpdate`,t),a=I(e,`onSelectionUpdate`,t),o=I(e,`onTransaction`,t),s=I(e,`onFocus`,t),c=I(e,`onBlur`,t),l=I(e,`onDestroy`,t);n&&this.editor.on(`beforeCreate`,n),r&&this.editor.on(`create`,r),i&&this.editor.on(`update`,i),a&&this.editor.on(`selectionUpdate`,a),o&&this.editor.on(`transaction`,o),s&&this.editor.on(`focus`,s),c&&this.editor.on(`blur`,c),l&&this.editor.on(`destroy`,l)})}};tf.resolve=su,tf.sort=ou,tf.flatten=L;var nf=class e extends qd{constructor(...e){super(...e),this.type=`extension`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},rf=nf.create({name:`clipboardTextSerializer`,addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Gn({key:new Jn(`clipboardTextSerializer`),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,a=uu(n),{blockSeparator:o}=this.options,s={...o===void 0?{}:{blockSeparator:o},textSerializers:a};return[...i.ranges].sort((e,t)=>e.$from.pos-t.$from.pos).map(({$from:e,$to:t})=>cu(r,{from:e.pos,to:t.pos},s)).join(o??`
18
+ `);c+=e.type===`paragraph`?`\n\n${o}`:`\n${o}`}}),c}function Hd(e,t){let n={...e};return Ld(e)&&Ld(t)&&Object.keys(t).forEach(r=>{Ld(t[r])&&Ld(e[r])?n[r]=Hd(e[r],t[r]):n[r]=t[r]}),n}function Ud(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var Wd=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},Gd=(e,t)=>{if(Vc(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn(`[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".`),r.push(n.replaceWith)),r};function Kd(e){let{editor:t,from:n,to:r,text:i,rules:a,plugin:o}=e,{view:s}=t;if(s.composing)return!1;let c=s.state.doc.resolve(n);if(c.parent.type.spec.code||(c.nodeBefore||c.nodeAfter)?.marks.find(e=>e.type.spec.code))return!1;let l=!1,u=Su(c)+i;return a.forEach(e=>{if(l)return;let a=Gd(u,e.find);if(!a)return;let d=a[0].length-i.length;if(d>0){let e=c.parentOffset-d;if(e<0||c.parent.textBetween(e,c.parentOffset)!==a[0].slice(0,d))return}let f=s.state.tr,p=Cc({state:s.state,transaction:f}),m={from:n-(a[0].length-i.length),to:r},{commands:h,chain:g,can:_}=new wc({editor:t,state:p});e.handler({state:p,range:m,match:a,commands:h,chain:g,can:_})!==null&&f.steps.length&&(e.undoable&&f.setMeta(o,{transform:f,from:n,to:r,text:i}),s.dispatch(f),l=!0)}),l}function qd(e){let{editor:t,rules:n}=e,r=new Gn({state:{init(){return null},apply(e,i,a){let o=e.getMeta(r);if(o)return o;let s=e.getMeta(`applyInputRules`);return s&&setTimeout(()=>{let{text:e}=s;e=typeof e==`string`?e:ql(b.from(e),a.schema);let{from:i}=s,o=i+e.length;Kd({editor:t,from:i,to:o,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput(e,i,a,o){return Kd({editor:t,from:i,to:a,text:o,rules:n,plugin:r})},handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&Kd({editor:t,from:i.pos,to:i.pos,text:``,rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if(i.key!==`Enter`)return!1;let{$cursor:a}=e.state.selection;return a?Kd({editor:t,from:a.pos,to:a.pos,text:`
19
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var Jd=class{constructor(e={}){this.type=`extendable`,this.parent=null,this.child=null,this.name=``,this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...R(I(this,`addOptions`,{name:this.name}))}}get storage(){return{...R(I(this,`addStorage`,{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>Hd(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name=`name`in e?e.name:t.parent.name,t}},Yd=class e extends Jd{constructor(...e){super(...e),this.type=`mark`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>e?.type.name===t.name))return!1;let a=i.find(e=>e?.type.name===t.name);return a&&n.removeStoredMark(a),n.insertText(` `,r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},Xd=class{constructor(e){this.find=e.find,this.handler=e.handler}},Zd=(e,t,n)=>{if(Vc(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn(`[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".`),n.push(t.replaceWith)),n}):[]};function Qd(e){let{editor:t,state:n,from:r,to:i,rule:a,pasteEvent:o,dropEvent:s}=e,{commands:c,chain:l,can:u}=new wc({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{var f;if((f=e.type)!=null&&(f=f.spec)!=null&&f.code||!(e.isText||e.isTextblock||e.isInline))return;let p=e.content?.size??e.nodeSize??0,m=Math.max(r,t),h=Math.min(i,t+p);m>=h||Zd(e.isText?e.text||``:e.textBetween(m-t,h-t,void 0,``),a.find,o).forEach(e=>{if(e.index===void 0)return;let t=m+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:i,match:e,commands:c,chain:l,can:u,pasteEvent:o,dropEvent:s});d.push(f)})}),d.every(e=>e!==null)}var $d=null,ef=e=>{var t;let n=new ClipboardEvent(`paste`,{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData(`text/html`,e),n};function tf(e){let{editor:t,rules:n}=e,r=null,i=!1,a=!1,o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,s;try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}let c=({state:e,from:n,to:r,rule:i,pasteEvt:a})=>{let c=e.tr,l=Cc({state:e,transaction:c});if(Qd({editor:t,state:l,from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:a,dropEvent:s})&&c.steps.length){try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}return o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,c}};return n.map(e=>new Gn({view(e){let n=n=>{r=e.dom.parentElement?.contains(n.target)?e.dom.parentElement:null,r&&($d=t)},i=()=>{$d&&=null};return window.addEventListener(`dragstart`,n),window.addEventListener(`dragend`,i),{destroy(){window.removeEventListener(`dragstart`,n),window.removeEventListener(`dragend`,i)}}},props:{handleDOMEvents:{drop:(e,t)=>{if(a=r===e.dom.parentElement,s=t,!a){let e=$d;e?.isEditable&&setTimeout(()=>{let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{let n=t.clipboardData?.getData(`text/html`);return o=t,i=!!n?.includes(`data-pm-slice`),!1}}},appendTransaction:(t,n,r)=>{let s=t[0],l=s.getMeta(`uiEvent`)===`paste`&&!i,u=s.getMeta(`uiEvent`)===`drop`&&!a,d=s.getMeta(`applyPasteRules`),f=!!d;if(!l&&!u&&!f)return;if(f){let{text:t}=d;t=typeof t==`string`?t:ql(b.from(t),r.schema);let{from:n}=d,i=n+t.length,a=ef(t);return c({rule:e,state:r,from:n,to:{b:i},pasteEvt:a})}let p=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);if(Fd(p)&&m&&p!==m.b)return c({rule:e,state:r,from:p,to:m,pasteEvt:o})}}))}var nf=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=t,this.baseExtensions=e,this.extensions=cu(e),this.schema=au(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=I(t,`addCommands`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:bu(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this,t=su([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:bu(t.name,this.schema)},r=[],i=I(t,`addKeyboardShortcuts`,n),a={};if(t.type===`mark`&&I(t,`exitable`,n)&&(a.ArrowRight=()=>Yd.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(([t,n])=>[t,()=>n({editor:e})]));a={...a,...t}}let o=xc(a);r.push(o);let s=I(t,`addInputRules`,n);if(Du(t,e.options.enableInputRules)&&s){let t=s();if(t&&t.length){let n=qd({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let c=I(t,`addPasteRules`,n);if(Du(t,e.options.enablePasteRules)&&c){let t=c();if(t&&t.length){let n=tf({editor:e,rules:t});r.push(...n)}}let l=I(t,`addProseMirrorPlugins`,n);if(l){let e=l();r.push(...e)}return r}),n=this.createDecorationPlugin();return n&&t.push(n),t}createDecorationPlugin(){var e;let{editor:t}=this;(e=this.decorationManager)==null||e.destroy();let n=[];return this.extensions.forEach(e=>{let r=I(e,`addDecorations`,{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:bu(e.name,this.schema)});r&&n.push({name:e.name,addDecorations:r})}),this.decorationManager=new Md({editor:t,entries:n}),this.decorationManager.plugin}get attributes(){return Xl(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Yl(this.extensions);return Object.fromEntries(t.filter(e=>!!I(e,`addNodeView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=I(t,`addNodeView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Mc(t.name,this.schema)});if(!r)return[];let i=r();return i?[t.name,(r,a,o,s,c)=>{let l=eu(r,n);return i({node:r,view:a,getPos:o,decorations:s,innerDecorations:c,editor:e,extension:t,HTMLAttributes:l})}]:[]}))}dispatchTransaction(e){let{editor:t}=this;return su([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:bu(n.name,this.schema)},i=I(n,`dispatchTransaction`,r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return su([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:bu(n.name,this.schema)},i=I(n,`transformPastedHTML`,r);return i?(t,n)=>{let a=e(t,n);return i.call(r,a)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=Yl(this.extensions);return Object.fromEntries(t.filter(e=>!!I(e,`addMarkView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=I(t,`addMarkView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Kc(t.name,this.schema)});return r?[t.name,(i,a,o)=>{let s=eu(i,n);return r()({mark:i,view:a,inline:o,editor:e,extension:t,HTMLAttributes:s,updateAttributes:t=>{Ud(i,e,t)}})}]:[]}))}destroy(){var e;(e=this.decorationManager)==null||e.destroy(),this.extensions.forEach(e=>{let t=e;for(;t.parent;){let e=t.parent;e.child===t&&(e.child=null),t=e}}),this.extensions=[],this.baseExtensions=[],this.decorationManager=null,this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>[e.name,e.storage])),e.forEach(e=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:bu(e.name,this.schema)};e.type===`mark`&&((R(I(e,`keepOnSplit`,t))??!0)&&this.splittableMarks.push(e.name),(R(I(e,`clearable`,t))??!0)||this.nonClearableMarks.push(e.name));let n=I(e,`onBeforeCreate`,t),r=I(e,`onCreate`,t),i=I(e,`onUpdate`,t),a=I(e,`onSelectionUpdate`,t),o=I(e,`onTransaction`,t),s=I(e,`onFocus`,t),c=I(e,`onBlur`,t),l=I(e,`onDestroy`,t);n&&this.editor.on(`beforeCreate`,n),r&&this.editor.on(`create`,r),i&&this.editor.on(`update`,i),a&&this.editor.on(`selectionUpdate`,a),o&&this.editor.on(`transaction`,o),s&&this.editor.on(`focus`,s),c&&this.editor.on(`blur`,c),l&&this.editor.on(`destroy`,l)})}};nf.resolve=cu,nf.sort=su,nf.flatten=Kl;var rf=class e extends Jd{constructor(...e){super(...e),this.type=`extension`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},af=rf.create({name:`clipboardTextSerializer`,addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Gn({key:new Jn(`clipboardTextSerializer`),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,a=du(n),{blockSeparator:o}=this.options,s={...o===void 0?{}:{blockSeparator:o},textSerializers:a};return[...i.ranges].sort((e,t)=>e.$from.pos-t.$from.pos).map(({$from:e,$to:t})=>lu(r,{from:e.pos,to:t.pos},s)).join(o??`
20
20
 
21
- `)}}})]}}),af=nf.create({name:`commands`,addCommands(){return{...cd}}}),of=nf.create({name:`delete`,onUpdate({transaction:e,appendedTransactions:t}){var n;let r=()=>{var n,r;if(((n=this.editor.options.coreExtensionOptions)==null||(n=n.delete)==null||(r=n.filterTransaction)==null?void 0:r.call(n,e))??e.getMeta(`y-sync$`))return;let i=Hl(e.before,[e,...t]);hu(i).forEach(t=>{i.mapping.mapResult(t.oldRange.from).deletedAfter&&i.mapping.mapResult(t.oldRange.to).deletedBefore&&i.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,r)=>{let a=r+n.nodeSize-2,o=t.oldRange.from<=r&&a<=t.oldRange.to;this.editor.emit(`delete`,{type:`node`,node:n,from:r,to:a,newFrom:i.mapping.map(r),newTo:i.mapping.map(a),deletedRange:t.oldRange,newRange:t.newRange,partial:!o,editor:this.editor,transaction:e,combinedTransform:i})})});let a=i.mapping;i.steps.forEach((t,n)=>{if(t instanceof Dt){let r=a.slice(n).map(t.from,-1),o=a.slice(n).map(t.to),s=a.invert().map(r,-1),c=a.invert().map(o),l=r>0&&i.doc.nodeAt(r-1)?.marks.some(e=>e.eq(t.mark)),u=i.doc.nodeAt(o)?.marks.some(e=>e.eq(t.mark));this.editor.emit(`delete`,{type:`mark`,mark:t.mark,from:t.from,to:t.to,deletedRange:{from:s,to:c},newRange:{from:r,to:o},partial:!!(u||l),editor:this.editor,transaction:e,combinedTransform:i})}})};((n=this.editor.options.coreExtensionOptions)==null||(n=n.delete)==null?void 0:n.async)??!0?setTimeout(r,0):r()}}),sf=nf.create({name:`drop`,addProseMirrorPlugins(){return[new Gn({key:new Jn(`tiptapDrop`),props:{handleDrop:(e,t,n,r)=>{this.editor.emit(`drop`,{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),cf=nf.create({name:`editable`,addProseMirrorPlugins(){return[new Gn({key:new Jn(`editable`),props:{editable:()=>this.editor.options.editable}})]}}),lf=new Jn(`focusEvents`),uf=nf.create({name:`focusEvents`,addProseMirrorPlugins(){let{editor:e}=this;return[new Gn({key:lf,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta(`focus`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta(`blur`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1}}}})]}}),df=nf.create({name:`keymap`,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:a}=n,{pos:o,parent:s}=a,c=a.parent.isTextblock&&o>0?t.doc.resolve(o-1):a,l=c.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=l&&c.parent.childCount===1?u===a.pos:j.atStart(r).from===o;return!i||!s.type.isTextblock||s.textContent.length||!d||d&&a.parent.type.name===`paragraph`?!1:e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return $c()||xl()?i:r},addProseMirrorPlugins(){return[new Gn({key:new Jn(`clearDocument`),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta(`composition`)))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta(`preventClearDocument`));if(!r||i)return;let{empty:a,from:o,to:s}=t.selection,c=j.atStart(t.doc).from,l=j.atEnd(t.doc).to;if(a||o!==c||s!==l||!Ou(n.doc))return;let u=n.tr,d=Cc({state:n,transaction:u}),{commands:f}=new wc({editor:this.editor,state:d});if(f.clearNodes(),u.steps.length)return u}})]}}),ff=nf.create({name:`paste`,addProseMirrorPlugins(){return[new Gn({key:new Jn(`tiptapPaste`),props:{handlePaste:(e,t,n)=>{this.editor.emit(`paste`,{editor:this.editor,event:t,slice:n})}}})]}}),pf=nf.create({name:`tabindex`,addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new Gn({key:new Jn(`tabindex`),props:{attributes:()=>!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:this.options.value??`0`}}})]}}),mf=nf.create({name:`textDirection`,addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Jl(this.extensions);return[{types:e.filter(e=>e.name!==`text`).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute(`dir`);return t&&(t===`ltr`||t===`rtl`||t===`auto`)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Gn({key:new Jn(`textDirection`),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),hf=!1;function gf(e){if(hf)return;hf=!0;let t;try{t=At.fromJSON(e,{from:0,to:0}).slice.content}catch{return}t instanceof b||console.warn(`[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.`)}var _f=class e{get name(){return this.node.type.name}constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){return this.actualDepth??this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=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}t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,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}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new e(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let i=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,o=n.isInline,s=this.pos+r+ +!a;if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let c=this.resolvedPos.doc.resolve(s);if(!i&&!o&&c.depth<=this.depth)return;let l=new e(c,this.editor,i,i||o?n:null);i&&(l.actualDepth=this.depth+1),t.push(l)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e){if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==t[i])break}}else n=r}r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||this.children.length===0)return r;let i=Object.keys(t);return this.children.forEach(a=>{n&&r.length>0||(a.node.type.name===e&&i.every(e=>t[e]===a.node.attrs[e])&&r.push(a),!(n&&r.length>0)&&(r=r.concat(a.querySelectorAll(e,t,n))))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},vf=`.ProseMirror {
21
+ `)}}})]}}),of=rf.create({name:`commands`,addCommands(){return{...ld}}}),sf=rf.create({name:`delete`,onUpdate({transaction:e,appendedTransactions:t}){var n;let r=()=>{var n,r;if(((n=this.editor.options.coreExtensionOptions)==null||(n=n.delete)==null||(r=n.filterTransaction)==null?void 0:r.call(n,e))??e.getMeta(`y-sync$`))return;let i=Hl(e.before,[e,...t]);gu(i).forEach(t=>{i.mapping.mapResult(t.oldRange.from).deletedAfter&&i.mapping.mapResult(t.oldRange.to).deletedBefore&&i.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,r)=>{let a=r+n.nodeSize-2,o=t.oldRange.from<=r&&a<=t.oldRange.to;this.editor.emit(`delete`,{type:`node`,node:n,from:r,to:a,newFrom:i.mapping.map(r),newTo:i.mapping.map(a),deletedRange:t.oldRange,newRange:t.newRange,partial:!o,editor:this.editor,transaction:e,combinedTransform:i})})});let a=i.mapping;i.steps.forEach((t,n)=>{if(t instanceof Dt){let r=a.slice(n).map(t.from,-1),o=a.slice(n).map(t.to),s=a.invert().map(r,-1),c=a.invert().map(o),l=r>0&&i.doc.nodeAt(r-1)?.marks.some(e=>e.eq(t.mark)),u=i.doc.nodeAt(o)?.marks.some(e=>e.eq(t.mark));this.editor.emit(`delete`,{type:`mark`,mark:t.mark,from:t.from,to:t.to,deletedRange:{from:s,to:c},newRange:{from:r,to:o},partial:!!(u||l),editor:this.editor,transaction:e,combinedTransform:i})}})};((n=this.editor.options.coreExtensionOptions)==null||(n=n.delete)==null?void 0:n.async)??!0?setTimeout(r,0):r()}}),cf=rf.create({name:`drop`,addProseMirrorPlugins(){return[new Gn({key:new Jn(`tiptapDrop`),props:{handleDrop:(e,t,n,r)=>{this.editor.emit(`drop`,{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),lf=rf.create({name:`editable`,addProseMirrorPlugins(){return[new Gn({key:new Jn(`editable`),props:{editable:()=>this.editor.options.editable}})]}}),uf=new Jn(`focusEvents`),df=rf.create({name:`focusEvents`,addProseMirrorPlugins(){let{editor:e}=this;return[new Gn({key:uf,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta(`focus`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta(`blur`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1}}}})]}}),ff=rf.create({name:`keymap`,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:a}=n,{pos:o,parent:s}=a,c=a.parent.isTextblock&&o>0?t.doc.resolve(o-1):a,l=c.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=l&&c.parent.childCount===1?u===a.pos:j.atStart(r).from===o;return!i||!s.type.isTextblock||s.textContent.length||!d||d&&a.parent.type.name===`paragraph`?!1:e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return $c()||xl()?i:r},addProseMirrorPlugins(){return[new Gn({key:new Jn(`clearDocument`),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta(`composition`)))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta(`preventClearDocument`));if(!r||i)return;let{empty:a,from:o,to:s}=t.selection,c=j.atStart(t.doc).from,l=j.atEnd(t.doc).to;if(a||o!==c||s!==l||!ku(n.doc))return;let u=n.tr,d=Cc({state:n,transaction:u}),{commands:f}=new wc({editor:this.editor,state:d});if(f.clearNodes(),u.steps.length)return u}})]}}),pf=rf.create({name:`paste`,addProseMirrorPlugins(){return[new Gn({key:new Jn(`tiptapPaste`),props:{handlePaste:(e,t,n)=>{this.editor.emit(`paste`,{editor:this.editor,event:t,slice:n})}}})]}}),mf=rf.create({name:`tabindex`,addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new Gn({key:new Jn(`tabindex`),props:{attributes:()=>!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:this.options.value??`0`}}})]}}),hf=rf.create({name:`textDirection`,addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Yl(this.extensions);return[{types:e.filter(e=>e.name!==`text`).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute(`dir`);return t&&(t===`ltr`||t===`rtl`||t===`auto`)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Gn({key:new Jn(`textDirection`),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),gf=!1;function _f(e){if(gf)return;gf=!0;let t;try{t=At.fromJSON(e,{from:0,to:0}).slice.content}catch{return}t instanceof b||console.warn(`[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.`)}var vf=class e{get name(){return this.node.type.name}constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){return this.actualDepth??this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=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}t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,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}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new e(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let i=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,o=n.isInline,s=this.pos+r+ +!a;if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let c=this.resolvedPos.doc.resolve(s);if(!i&&!o&&c.depth<=this.depth)return;let l=new e(c,this.editor,i,i||o?n:null);i&&(l.actualDepth=this.depth+1),t.push(l)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e){if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==t[i])break}}else n=r}r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||this.children.length===0)return r;let i=Object.keys(t);return this.children.forEach(a=>{n&&r.length>0||(a.node.type.name===e&&i.every(e=>t[e]===a.node.attrs[e])&&r.push(a),!(n&&r.length>0)&&(r=r.concat(a.querySelectorAll(e,t,n))))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},yf=`.ProseMirror {
22
22
  position: relative;
23
23
  }
24
24
 
@@ -88,18 +88,18 @@ img.ProseMirror-separator {
88
88
 
89
89
  .ProseMirror-focused .ProseMirror-gapcursor {
90
90
  display: block;
91
- }`,yf=class extends fd{constructor(e={}){super(),this.css=null,this.className=`tiptap`,this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:typeof document<`u`?document.createElement(`div`):null,content:``,injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:ju,createMappablePosition:Mu},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on(`beforeCreate`,this.options.onBeforeCreate),this.emit(`beforeCreate`,{editor:this}),this.on(`mount`,this.options.onMount),this.on(`unmount`,this.options.onUnmount),this.on(`contentError`,this.options.onContentError),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:e,slice:t,moved:n})=>this.options.onDrop(e,t,n)),this.on(`paste`,({event:e,slice:t})=>this.options.onPaste(e,t)),this.on(`delete`,this.options.onDelete);let t=this.createDoc();if(!this.editorState){let e=Zc(t,this.options.autofocus);this.editorState=Un.create({doc:t,schema:this.schema,selection:e||void 0})}gf(this.schema),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>`u`)throw Error(`[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`);this.createView(e),this.emit(`mount`,{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit(`create`,{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){this.editorState=this.editorView.state;let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove==`function`?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn(`Failed to remove CSS element:`,e)}this.css=null,this.emit(`unmount`,{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager?this.commandManager.chain():wc.createFakeChain()}can(){return this.commandManager?this.commandManager.can():wc.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<`u`&&(this.css=Nd(vf,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit(`update`,{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t===`state`)return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return pd&&!this.hasWarnedStaleDecorationRead&&dd(this)&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=R(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t=typeof e==`string`?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let n=[...this.options.enableCoreExtensions?[cf,rf.configure({blockSeparator:(e=this.options.coreExtensionOptions)==null||(e=e.clipboardTextSerializer)==null?void 0:e.blockSeparator}),af,uf,df,pf.configure({value:(t=this.options.coreExtensionOptions)==null||(t=t.tabindex)==null?void 0:t.value}),sf,ff,of,mf.configure({direction:this.options.textDirection})].filter(e=>typeof this.options.enableCoreExtensions!=`object`||this.options.enableCoreExtensions[e.name]!==!1):[],...this.options.extensions].filter(e=>[`extension`,`node`,`mark`].includes(e?.type));this.extensionManager=new tf(n,this)}createCommandManager(){this.commandManager=new wc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=zl(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||![`[tiptap error]: Invalid JSON content`,`[tiptap error]: Invalid HTML content`].includes(e.message))throw e;let t=zl(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Un.create({doc:t,schema:this.schema,selection:Zc(t,this.options.autofocus)||void 0}),this.emit(`contentError`,{editor:this,error:e,disableCollaboration:()=>{`collaboration`in this.storage&&typeof this.storage.collaboration==`object`&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>e.name!==`collaboration`),this.createExtensionManager()}}),this.editorState.doc}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,a=t.transformPastedHTML,o=this.extensionManager.transformPastedHTML(a);this.editorView=new tc(e,{...t,attributes:{role:`textbox`,...t?.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.prependClass(),this.injectCSS();let c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>this.capturedTransaction?.step(e));return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),a=this.state;if(this.emit(`beforeTransaction`,{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit(`transaction`,{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit(`selectionUpdate`,{editor:this,transaction:e});let o=n.findLast(e=>e.getMeta(`focus`)||e.getMeta(`blur`)),s=o?.getMeta(`focus`),c=o?.getMeta(`blur`);s&&this.emit(`focus`,{editor:this,event:s.event,transaction:o}),c&&this.emit(`blur`,{editor:this,event:c.event,transaction:o}),!(e.getMeta(`preventUpdate`)||!n.some(e=>e.docChanged)||a.doc.eq(t.doc))&&this.emit(`update`,{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return fu(this.state,e)}isActive(e,t){let n=typeof e==`string`?e:null,r=typeof e==`string`?t:e;return Cu(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Kl(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
91
+ }`,bf=class extends pd{constructor(e={}){super(),this.css=null,this.className=`tiptap`,this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:typeof document<`u`?document.createElement(`div`):null,content:``,injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Mu,createMappablePosition:Nu},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on(`beforeCreate`,this.options.onBeforeCreate),this.emit(`beforeCreate`,{editor:this}),this.on(`mount`,this.options.onMount),this.on(`unmount`,this.options.onUnmount),this.on(`contentError`,this.options.onContentError),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:e,slice:t,moved:n})=>this.options.onDrop(e,t,n)),this.on(`paste`,({event:e,slice:t})=>this.options.onPaste(e,t)),this.on(`delete`,this.options.onDelete);let t=this.createDoc();if(!this.editorState){let e=Zc(t,this.options.autofocus);this.editorState=Un.create({doc:t,schema:this.schema,selection:e||void 0})}_f(this.schema),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>`u`)throw Error(`[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`);this.createView(e),this.emit(`mount`,{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit(`create`,{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){this.editorState=this.editorView.state;let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove==`function`?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn(`Failed to remove CSS element:`,e)}this.css=null,this.emit(`unmount`,{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager?this.commandManager.chain():wc.createFakeChain()}can(){return this.commandManager?this.commandManager.can():wc.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<`u`&&(this.css=Pd(yf,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit(`update`,{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t===`state`)return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return md&&!this.hasWarnedStaleDecorationRead&&fd(this)&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=L(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t=typeof e==`string`?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let n=[...this.options.enableCoreExtensions?[lf,af.configure({blockSeparator:(e=this.options.coreExtensionOptions)==null||(e=e.clipboardTextSerializer)==null?void 0:e.blockSeparator}),of,df,ff,mf.configure({value:(t=this.options.coreExtensionOptions)==null||(t=t.tabindex)==null?void 0:t.value}),cf,pf,sf,hf.configure({direction:this.options.textDirection})].filter(e=>typeof this.options.enableCoreExtensions!=`object`||this.options.enableCoreExtensions[e.name]!==!1):[],...this.options.extensions].filter(e=>[`extension`,`node`,`mark`].includes(e?.type));this.extensionManager=new nf(n,this)}createCommandManager(){this.commandManager=new wc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=zl(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||![`[tiptap error]: Invalid JSON content`,`[tiptap error]: Invalid HTML content`].includes(e.message))throw e;let t=zl(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Un.create({doc:t,schema:this.schema,selection:Zc(t,this.options.autofocus)||void 0}),this.emit(`contentError`,{editor:this,error:e,disableCollaboration:()=>{`collaboration`in this.storage&&typeof this.storage.collaboration==`object`&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>e.name!==`collaboration`),this.createExtensionManager()}}),this.editorState.doc}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,a=t.transformPastedHTML,o=this.extensionManager.transformPastedHTML(a);this.editorView=new tc(e,{...t,attributes:{role:`textbox`,...t?.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.prependClass(),this.injectCSS();let c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>this.capturedTransaction?.step(e));return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),a=this.state;if(this.emit(`beforeTransaction`,{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit(`transaction`,{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit(`selectionUpdate`,{editor:this,transaction:e});let o=n.findLast(e=>e.getMeta(`focus`)||e.getMeta(`blur`)),s=o?.getMeta(`focus`),c=o?.getMeta(`blur`);s&&this.emit(`focus`,{editor:this,event:s.event,transaction:o}),c&&this.emit(`blur`,{editor:this,event:c.event,transaction:o}),!(e.getMeta(`preventUpdate`)||!n.some(e=>e.docChanged)||a.doc.eq(t.doc))&&this.emit(`update`,{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return pu(this.state,e)}isActive(e,t){let n=typeof e==`string`?e:null,r=typeof e==`string`?t:e;return wu(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return ql(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
92
92
 
93
- `,textSerializers:n={}}=e||{};return lu(this.state.doc,{blockSeparator:t,textSerializers:{...uu(this.schema),...n}})}get isEmpty(){return Ou(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit(`destroy`),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){return this.editorView?.isDestroyed??!0}$node(e,t){return this.$doc?.querySelector(e,t)||null}$nodes(e,t){return this.$doc?.querySelectorAll(e,t)||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new _f(t,this,!1,n)}get $doc(){return this.$pos(0)}};function bf(e){return new Ud({find:e.find,handler:({state:t,range:n,match:r})=>{let i=z(e.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:a}=t,o=r[r.length-1],s=r[0];if(o){let r=s.search(/\S/),c=n.from+s.indexOf(o),l=c+o.length;if(gu(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>c).length)return null;l<n.to&&a.delete(l,n.to),c>n.from&&a.delete(n.from+r,c);let u=n.from+r+o.length;a.addMark(n.from+r,u,e.type.create(i||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}function xf(e){return new Ud({find:e.find,handler:({state:t,range:n,match:r})=>{let i=z(e.getAttributes,void 0,r)||{},{tr:a}=t,o=n.from,s=n.to,c=e.type.create(i);if(r[1]){let e=o+r[0].lastIndexOf(r[1]);e>s?e=s:s=e+r[1].length;let t=r[0][r[0].length-1];a.insertText(t,o+r[0].length-1),a.replaceWith(e,s,c)}else if(r[0]){let t=e.type.isInline?o:o-1;a.insert(t,e.type.create(i)).delete(a.mapping.map(o),a.mapping.map(s))}a.scrollIntoView()},undoable:e.undoable})}function Sf(e){return new Ud({find:e.find,handler:({state:t,range:n,match:r})=>{let i=t.doc.resolve(n.from),a=z(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)},undoable:e.undoable})}function Cf(e){return new Ud({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{let a=z(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),s=o.doc.resolve(n.from).blockRange(),c=s&&zt(s,e.type,a);if(!c)return null;if(o.wrap(s,c),e.keepMarks&&e.editor){let{selection:n,storedMarks:r}=t,{splittableMarks:i}=e.editor.extensionManager,a=r||n.$to.parentOffset&&n.$from.marks();if(a){let e=a.filter(e=>i.includes(e.type.name));o.ensureMarks(e)}}if(e.keepAttributes){let t=e.type.name===`bulletList`||e.type.name===`orderedList`?`listItem`:`taskList`;i().updateAttributes(t,a).run()}let l=o.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&Zt(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&o.join(n.from-1)},undoable:e.undoable})}var wf=class e extends qd{constructor(...e){super(...e),this.type=`node`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function Tf(e){return new Yd({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=z(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(gu(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var Ef=new WeakSet,Df=new WeakSet;function Of(e){let t=e;return Ef.add(t),t}function kf(e){return Array.isArray(e)&&Ef.has(e)}function Af(e){return e.flatMap(e=>e==null?[]:Array.isArray(e)&&Df.has(e)&&!kf(e)?Af(e):[e])}function jf(e,t){if(e===`slot`)return 0;if(e instanceof Function){let n=e(t);return Array.isArray(n)&&!kf(n)&&!Df.has(n)?Of(n):n}let{children:n,...r}=t??{};if(e===`svg`)throw Error(`SVG elements are not supported in the JSX syntax, use the array syntax instead`);if(Array.isArray(n)){if(kf(n))return Of([e,r,n]);if(n.length===0)return Of([e,r]);let t=Af(n);return t.length===0?Of([e,r]):Of([e,r,...t])}return Of(n==null?[e,r]:[e,r,n])}var Mf=(e,t)=>jf(e,t),Nf=(e,t)=>{let{state:n}=e,{selection:r}=n;if(!r.empty)return!1;let{$from:i}=r;if(i.parentOffset!==0)return!1;let a=i.depth-1;if(a<0)return!1;let o=i.node(a),s=i.index(a);if(s===0)return!1;if(o.type===t)return e.commands.lift(t.name);let c=o.child(s-1);if(c.type!==t||!c.lastChild?.isTextblock)return!1;let l=i.before()-1-1;return e.commands.command(({tr:e,dispatch:t})=>{if(!t)return!0;let n=i.parent.content,r=new E(n,0,0);return e.replace(l,i.after(),r),e.setSelection(M.create(e.doc,l+n.size)),e.scrollIntoView(),t(e),!0})},Pf=/^\s*>\s$/,Ff=wf.create({name:`blockquote`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,group:`block`,defining:!0,parseHTML(){return[{tag:`blockquote`}]},renderHTML({HTMLAttributes:e}){return Mf(`blockquote`,{...Ql(this.options.HTMLAttributes,e),children:Mf(`slot`,{})})},parseMarkdown:(e,t)=>{let n=t.parseBlockChildren??t.parseChildren;return t.createNode(`blockquote`,void 0,n(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return``;let n=[];return e.content.forEach((e,r)=>{let i=(t.renderChild?.call(t,e,r)??t.renderChildren([e])).split(`
93
+ `,textSerializers:n={}}=e||{};return uu(this.state.doc,{blockSeparator:t,textSerializers:{...du(this.schema),...n}})}get isEmpty(){return ku(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit(`destroy`),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){return this.editorView?.isDestroyed??!0}$node(e,t){return this.$doc?.querySelector(e,t)||null}$nodes(e,t){return this.$doc?.querySelectorAll(e,t)||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new vf(t,this,!1,n)}get $doc(){return this.$pos(0)}};function xf(e){return new Wd({find:e.find,handler:({state:t,range:n,match:r})=>{let i=R(e.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:a}=t,o=r[r.length-1],s=r[0];if(o){let r=s.search(/\S/),c=n.from+s.indexOf(o),l=c+o.length;if(_u(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>c).length)return null;l<n.to&&a.delete(l,n.to),c>n.from&&a.delete(n.from+r,c);let u=n.from+r+o.length;a.addMark(n.from+r,u,e.type.create(i||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}function Sf(e){return new Wd({find:e.find,handler:({state:t,range:n,match:r})=>{let i=R(e.getAttributes,void 0,r)||{},{tr:a}=t,o=n.from,s=n.to,c=e.type.create(i);if(r[1]){let e=o+r[0].lastIndexOf(r[1]);e>s?e=s:s=e+r[1].length;let t=r[0][r[0].length-1];a.insertText(t,o+r[0].length-1),a.replaceWith(e,s,c)}else if(r[0]){let t=e.type.isInline?o:o-1;a.insert(t,e.type.create(i)).delete(a.mapping.map(o),a.mapping.map(s))}a.scrollIntoView()},undoable:e.undoable})}function Cf(e){return new Wd({find:e.find,handler:({state:t,range:n,match:r})=>{let i=t.doc.resolve(n.from),a=R(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)},undoable:e.undoable})}function wf(e){return new Wd({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{let a=R(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),s=o.doc.resolve(n.from).blockRange(),c=s&&zt(s,e.type,a);if(!c)return null;if(o.wrap(s,c),e.keepMarks&&e.editor){let{selection:n,storedMarks:r}=t,{splittableMarks:i}=e.editor.extensionManager,a=r||n.$to.parentOffset&&n.$from.marks();if(a){let e=a.filter(e=>i.includes(e.type.name));o.ensureMarks(e)}}if(e.keepAttributes){let t=e.type.name===`bulletList`||e.type.name===`orderedList`?`listItem`:`taskList`;i().updateAttributes(t,a).run()}let l=o.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&Zt(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&o.join(n.from-1)},undoable:e.undoable})}var Tf=class e extends Jd{constructor(...e){super(...e),this.type=`node`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function Ef(e){return new Xd({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=R(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(_u(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var Df=new WeakSet,Of=new WeakSet;function kf(e){let t=e;return Df.add(t),t}function Af(e){return Array.isArray(e)&&Df.has(e)}function jf(e){return e.flatMap(e=>e==null?[]:Array.isArray(e)&&Of.has(e)&&!Af(e)?jf(e):[e])}function Mf(e,t){if(e===`slot`)return 0;if(e instanceof Function){let n=e(t);return Array.isArray(n)&&!Af(n)&&!Of.has(n)?kf(n):n}let{children:n,...r}=t??{};if(e===`svg`)throw Error(`SVG elements are not supported in the JSX syntax, use the array syntax instead`);if(Array.isArray(n)){if(Af(n))return kf([e,r,n]);if(n.length===0)return kf([e,r]);let t=jf(n);return t.length===0?kf([e,r]):kf([e,r,...t])}return kf(n==null?[e,r]:[e,r,n])}var Nf=(e,t)=>Mf(e,t),Pf=(e,t)=>{let{state:n}=e,{selection:r}=n;if(!r.empty)return!1;let{$from:i}=r;if(i.parentOffset!==0)return!1;let a=i.depth-1;if(a<0)return!1;let o=i.node(a),s=i.index(a);if(s===0)return!1;if(o.type===t)return e.commands.lift(t.name);let c=o.child(s-1);if(c.type!==t||!c.lastChild?.isTextblock)return!1;let l=i.before()-1-1;return e.commands.command(({tr:e,dispatch:t})=>{if(!t)return!0;let n=i.parent.content,r=new E(n,0,0);return e.replace(l,i.after(),r),e.setSelection(M.create(e.doc,l+n.size)),e.scrollIntoView(),t(e),!0})},Ff=/^\s*>\s$/,If=Tf.create({name:`blockquote`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,group:`block`,defining:!0,parseHTML(){return[{tag:`blockquote`}]},renderHTML({HTMLAttributes:e}){return Nf(`blockquote`,{...$l(this.options.HTMLAttributes,e),children:Nf(`slot`,{})})},parseMarkdown:(e,t)=>{let n=t.parseBlockChildren??t.parseChildren;return t.createNode(`blockquote`,void 0,n(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return``;let n=[];return e.content.forEach((e,r)=>{let i=(t.renderChild?.call(t,e,r)??t.renderChildren([e])).split(`
94
94
  `).map(e=>e.trim()===``?`>`:`> ${e}`);n.push(i.join(`
95
95
  `))}),n.join(`
96
96
  >
97
- `)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>Nf(this.editor,this.type)}},addInputRules(){return[Cf({find:Pf,type:this.type})]}}),If=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Lf=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Rf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,zf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Bf=Jd.create({name:`bold`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!==`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name===this.name},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Mf(`strong`,{...Ql(this.options.HTMLAttributes,e),children:Mf(`slot`,{})})},markdownTokenName:`strong`,parseMarkdown:(e,t)=>t.applyMark(`bold`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<strong>`,close:`</strong>`}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bf({find:If,type:this.type}),bf({find:Rf,type:this.type})]},addPasteRules(){return[Tf({find:Lf,type:this.type}),Tf({find:zf,type:this.type})]}}),Vf=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},Hf=e=>{let t=/`([^`]+)`(?!`)/g,n=[],r;for(;(r=t.exec(e))!==null;)r.index>0&&e[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},Uf=Jd.create({name:`code`,addOptions(){return{HTMLAttributes:{}}},excludes:`_`,code:!0,exitable:!0,parseHTML(){return[{tag:`code`}]},renderHTML({HTMLAttributes:e}){return[`code`,Ql(this.options.HTMLAttributes,e),0]},markdownTokenName:`codespan`,parseMarkdown:(e,t)=>t.applyMark(`code`,[{type:`text`,text:e.text||``}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:``,addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[bf({find:Vf,type:this.type})]},addPasteRules(){return[Tf({find:Hf,type:this.type})]}}),Wf=4,Gf=/^```([a-z]+)?[\s\n]$/,Kf=/^~~~([a-z]+)?[\s\n]$/,qf=wf.create({name:`codeBlock`,addOptions(){return{languageClassPrefix:`language-`,exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Wf,HTMLAttributes:{}}},content:`text*`,marks:``,group:`block`,code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{let{languageClassPrefix:t}=this.options;return t&&[...e.firstElementChild?.classList||[]].filter(e=>e.startsWith(t)).map(e=>e.replace(t,``))[0]||null},rendered:!1}}},parseHTML(){return[{tag:`pre`,preserveWhitespace:`full`}]},renderHTML({node:e,HTMLAttributes:t}){return[`pre`,Ql(this.options.HTMLAttributes,t),[`code`,{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:`code`,parseMarkdown:(e,t)=>e.raw?.startsWith("```")===!1&&e.raw?.startsWith(`~~~`)===!1&&e.codeBlockStyle!==`indented`?[]:t.createNode(`codeBlock`,{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[]),renderMarkdown:(e,t)=>{let n=``,r=e.attrs?.language||``;return n=e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join(`
98
- `):`\`\`\`${r}\n\n\`\`\``,n},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,`paragraph`,e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??Wf,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;if(i.parent.type!==this.type)return!1;let o=` `.repeat(t);return a?e.commands.insertContent(o):e.commands.command(({tr:e})=>{let{from:t,to:i}=r,a=n.doc.textBetween(t,i,`
97
+ `)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>Pf(this.editor,this.type)}},addInputRules(){return[wf({find:Ff,type:this.type})]}}),Lf=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Rf=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,zf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Bf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Vf=Yd.create({name:`bold`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!==`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name===this.name},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Nf(`strong`,{...$l(this.options.HTMLAttributes,e),children:Nf(`slot`,{})})},markdownTokenName:`strong`,parseMarkdown:(e,t)=>t.applyMark(`bold`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<strong>`,close:`</strong>`}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[xf({find:Lf,type:this.type}),xf({find:zf,type:this.type})]},addPasteRules(){return[Ef({find:Rf,type:this.type}),Ef({find:Bf,type:this.type})]}}),Hf=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},Uf=e=>{let t=/`([^`]+)`(?!`)/g,n=[],r;for(;(r=t.exec(e))!==null;)r.index>0&&e[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},Wf=Yd.create({name:`code`,addOptions(){return{HTMLAttributes:{}}},excludes:`_`,code:!0,exitable:!0,parseHTML(){return[{tag:`code`}]},renderHTML({HTMLAttributes:e}){return[`code`,$l(this.options.HTMLAttributes,e),0]},markdownTokenName:`codespan`,parseMarkdown:(e,t)=>t.applyMark(`code`,[{type:`text`,text:e.text||``}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:``,addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[xf({find:Hf,type:this.type})]},addPasteRules(){return[Ef({find:Uf,type:this.type})]}}),Gf=4,Kf=/^```([a-z]+)?[\s\n]$/,qf=/^~~~([a-z]+)?[\s\n]$/,Jf=Tf.create({name:`codeBlock`,addOptions(){return{languageClassPrefix:`language-`,exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Gf,HTMLAttributes:{}}},content:`text*`,marks:``,group:`block`,code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{let{languageClassPrefix:t}=this.options;return t&&[...e.firstElementChild?.classList||[]].filter(e=>e.startsWith(t)).map(e=>e.replace(t,``))[0]||null},rendered:!1}}},parseHTML(){return[{tag:`pre`,preserveWhitespace:`full`}]},renderHTML({node:e,HTMLAttributes:t}){return[`pre`,$l(this.options.HTMLAttributes,t),[`code`,{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:`code`,parseMarkdown:(e,t)=>e.raw?.startsWith("```")===!1&&e.raw?.startsWith(`~~~`)===!1&&e.codeBlockStyle!==`indented`?[]:t.createNode(`codeBlock`,{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[]),renderMarkdown:(e,t)=>{let n=``,r=e.attrs?.language||``;return n=e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join(`
98
+ `):`\`\`\`${r}\n\n\`\`\``,n},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,`paragraph`,e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??Gf,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;if(i.parent.type!==this.type)return!1;let o=` `.repeat(t);return a?e.commands.insertContent(o):e.commands.command(({tr:e})=>{let{from:t,to:i}=r,a=n.doc.textBetween(t,i,`
99
99
  `,`
100
100
  `).split(`
101
101
  `).map(e=>o+e).join(`
102
- `);return e.replaceWith(t,i,n.schema.text(a)),!0})},"Shift-Tab":({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??Wf,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;return i.parent.type===this.type?a?e.commands.command(({tr:e})=>{let{pos:r}=i,a=i.start(),o=i.end(),s=n.doc.textBetween(a,o,`
102
+ `);return e.replaceWith(t,i,n.schema.text(a)),!0})},"Shift-Tab":({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??Gf,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;return i.parent.type===this.type?a?e.commands.command(({tr:e})=>{let{pos:r}=i,a=i.start(),o=i.end(),s=n.doc.textBetween(a,o,`
103
103
  `,`
104
104
  `).split(`
105
105
  `),c=0,l=0,u=r-a;for(let e=0;e<s.length;e+=1){if(l+s[e].length>=u){c=e;break}l+=s[e].length+1}let d=s[c].match(/^ */)?.[0]||``,f=Math.min(d.length,t);if(f===0)return!0;let p=a;for(let e=0;e<c;e+=1)p+=s[e].length+1;return e.delete(p,p+f),r-p<=f&&e.setSelection(M.create(e.doc,p)),!0}):e.commands.command(({tr:e})=>{let{from:i,to:a}=r,o=n.doc.textBetween(i,a,`
@@ -108,48 +108,48 @@ img.ProseMirror-separator {
108
108
  `).map(e=>{let n=e.match(/^ */)?.[0]||``,r=Math.min(n.length,t);return e.slice(r)}).join(`
109
109
  `);return e.replaceWith(i,a,n.schema.text(o)),!0}):!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let a=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
110
110
 
111
- `);return!a||!o?!1:e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type||r.parentOffset!==0)return!1;let a=r.before();return a>0?!1:e.commands.insertDefaultBlock({pos:a})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:a}=n;if(!a||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return o===void 0?!1:r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(j.near(r.resolve(o))),!0)):e.commands.exitCode()}}},addInputRules(){return[Sf({find:Gf,type:this.type,getAttributes:e=>({language:e[1]})}),Sf({find:Kf,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Gn({key:new Jn(`codeBlockVSCodeHandler`),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData(`text/plain`),r=t.clipboardData.getData(`vscode-editor-data`),i=(r?JSON.parse(r):void 0)?.mode;if(!n||!i)return!1;let{tr:a,schema:o}=e.state,s=o.text(n.replace(/\r\n?/g,`
112
- `));return a.replaceSelectionWith(this.type.create({language:i},s)),a.selection.$from.parent.type!==this.type&&a.setSelection(M.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta(`paste`,!0),e.dispatch(a),!0}}})]}}),Jf=wf.create({name:`doc`,topNode:!0,content:`block+`,renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
111
+ `);return!a||!o?!1:e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type||r.parentOffset!==0)return!1;let a=r.before();return a>0?!1:e.commands.insertDefaultBlock({pos:a})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:a}=n;if(!a||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return o===void 0?!1:r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(j.near(r.resolve(o))),!0)):e.commands.exitCode()}}},addInputRules(){return[Cf({find:Kf,type:this.type,getAttributes:e=>({language:e[1]})}),Cf({find:qf,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Gn({key:new Jn(`codeBlockVSCodeHandler`),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData(`text/plain`),r=t.clipboardData.getData(`vscode-editor-data`),i=(r?JSON.parse(r):void 0)?.mode;if(!n||!i)return!1;let{tr:a,schema:o}=e.state,s=o.text(n.replace(/\r\n?/g,`
112
+ `));return a.replaceSelectionWith(this.type.create({language:i},s)),a.selection.$from.parent.type!==this.type&&a.setSelection(M.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta(`paste`,!0),e.dispatch(a),!0}}})]}}),Yf=Tf.create({name:`doc`,topNode:!0,content:`block+`,renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
113
113
 
114
- `):``}),Yf=wf.create({name:`hardBreak`,markdownTokenName:`br`,addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:`inline`,selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:`br`}]},renderHTML({HTMLAttributes:e}){return[`br`,Ql(this.options.HTMLAttributes,e)]},renderText(){return`
114
+ `):``}),Xf=Tf.create({name:`hardBreak`,markdownTokenName:`br`,addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:`inline`,selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:`br`}]},renderHTML({HTMLAttributes:e}){return[`br`,$l(this.options.HTMLAttributes,e)]},renderText(){return`
115
115
  `},renderMarkdown:()=>`
116
- `,parseMarkdown:()=>({type:`hardBreak`}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,s=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&s&&a){let t=s.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Xf=wf.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(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Ql(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode(`heading`,{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{let n=e.attrs?.level?parseInt(e.attrs.level,10):1,r=`#`.repeat(n);return e.content?`${r} ${t.renderChildren(e.content)}`:``},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,`paragraph`,e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Sf({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),Zf=wf.create({name:`horizontalRule`,addOptions(){return{HTMLAttributes:{},nextNodeType:`paragraph`}},group:`block`,parseHTML(){return[{tag:`hr`}]},renderHTML({HTMLAttributes:e}){return[`hr`,Ql(this.options.HTMLAttributes,e)]},markdownTokenName:`hr`,parseMarkdown:(e,t)=>t.createNode(`horizontalRule`),renderMarkdown:()=>`---`,addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!Md(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,i=e();return ku(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(M.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(N.create(t.doc,n.pos)):t.setSelection(M.create(t.doc,n.pos));else{let i=(e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType)?.create();i&&(t.insert(r,i),t.setSelection(M.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[xf({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Qf=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,$f=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,ep=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,tp=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,np=Jd.create({name:`italic`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`em`},{tag:`i`,getAttrs:e=>e.style.fontStyle!==`normal`&&null},{style:`font-style=normal`,clearMark:e=>e.type.name===this.name},{style:`font-style=italic`}]},renderHTML({HTMLAttributes:e}){return[`em`,Ql(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:`em`,parseMarkdown:(e,t)=>t.applyMark(`italic`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<em>`,close:`</em>`}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bf({find:Qf,type:this.type}),bf({find:ep,type:this.type})]},addPasteRules(){return[Tf({find:$f,type:this.type}),Tf({find:tp,type:this.type})]}}),rp=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`,ip=`ελ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`,ap=`numeric`,op=`ascii`,sp=`alpha`,cp=`asciinumeric`,lp=`alphanumeric`,up=`domain`,dp=`emoji`,fp=`scheme`,pp=`slashscheme`,mp=`whitespace`;function hp(e,t){return e in t||(t[e]=[]),t[e]}function gp(e,t,n){t[ap]&&(t[cp]=!0,t[lp]=!0),t[op]&&(t[cp]=!0,t[sp]=!0),t[cp]&&(t[lp]=!0),t[sp]&&(t[lp]=!0),t[lp]&&(t[up]=!0),t[dp]&&(t[up]=!0);for(let r in t){let t=hp(r,n);t.indexOf(e)<0&&t.push(e)}}function _p(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function vp(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}vp.groups={},vp.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r||=vp.groups;let i;return t&&t.j?i=t:(i=new vp(t),n&&r&&gp(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,a=e.length;if(!a)return i;for(let t=0;t<a-1;t++)i=i.tt(e[t]);return i.tt(e[a-1],t,n,r)},tt(e,t,n,r){r||=vp.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let a=t,o,s=i.go(e);return s?(o=new vp,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new vp,a&&(r&&(o.t&&typeof o.t==`string`?gp(a,Object.assign(_p(o.t,r),n),r):n&&gp(a,n,r)),o.t=a),i.j[e]=o,o}};var V=(e,t,n,r,i)=>e.ta(t,n,r,i),yp=(e,t,n,r,i)=>e.tr(t,n,r,i),bp=(e,t,n,r,i)=>e.ts(t,n,r,i),H=(e,t,n,r,i)=>e.tt(t,n,r,i),xp=`WORD`,Sp=`UWORD`,Cp=`ASCIINUMERICAL`,wp=`ALPHANUMERICAL`,Tp=`LOCALHOST`,Ep=`TLD`,Dp=`UTLD`,Op=`SCHEME`,kp=`SLASH_SCHEME`,Ap=`NUM`,jp=`WS`,Mp=`NL`,Np=`OPENBRACE`,Pp=`CLOSEBRACE`,Fp=`OPENBRACKET`,Ip=`CLOSEBRACKET`,Lp=`OPENPAREN`,Rp=`CLOSEPAREN`,zp=`OPENANGLEBRACKET`,Bp=`CLOSEANGLEBRACKET`,Vp=`FULLWIDTHLEFTPAREN`,Hp=`FULLWIDTHRIGHTPAREN`,Up=`LEFTCORNERBRACKET`,Wp=`RIGHTCORNERBRACKET`,Gp=`LEFTWHITECORNERBRACKET`,Kp=`RIGHTWHITECORNERBRACKET`,qp=`FULLWIDTHLESSTHAN`,Jp=`FULLWIDTHGREATERTHAN`,Yp=`AMPERSAND`,Xp=`APOSTROPHE`,Zp=`ASTERISK`,Qp=`AT`,$p=`BACKSLASH`,em=`BACKTICK`,tm=`CARET`,nm=`COLON`,rm=`COMMA`,im=`DOLLAR`,am=`DOT`,om=`EQUALS`,sm=`EXCLAMATION`,cm=`HYPHEN`,lm=`PERCENT`,um=`PIPE`,dm=`PLUS`,fm=`POUND`,pm=`QUERY`,mm=`QUOTE`,hm=`FULLWIDTHMIDDLEDOT`,gm=`SEMI`,_m=`SLASH`,vm=`TILDE`,ym=`UNDERSCORE`,bm=`EMOJI`,xm=`SYM`,Sm=Object.freeze({__proto__:null,ALPHANUMERICAL:wp,AMPERSAND:Yp,APOSTROPHE:Xp,ASCIINUMERICAL:Cp,ASTERISK:Zp,AT:Qp,BACKSLASH:$p,BACKTICK:em,CARET:tm,CLOSEANGLEBRACKET:Bp,CLOSEBRACE:Pp,CLOSEBRACKET:Ip,CLOSEPAREN:Rp,COLON:nm,COMMA:rm,DOLLAR:im,DOT:am,EMOJI:bm,EQUALS:om,EXCLAMATION:sm,FULLWIDTHGREATERTHAN:Jp,FULLWIDTHLEFTPAREN:Vp,FULLWIDTHLESSTHAN:qp,FULLWIDTHMIDDLEDOT:hm,FULLWIDTHRIGHTPAREN:Hp,HYPHEN:cm,LEFTCORNERBRACKET:Up,LEFTWHITECORNERBRACKET:Gp,LOCALHOST:Tp,NL:Mp,NUM:Ap,OPENANGLEBRACKET:zp,OPENBRACE:Np,OPENBRACKET:Fp,OPENPAREN:Lp,PERCENT:lm,PIPE:um,PLUS:dm,POUND:fm,QUERY:pm,QUOTE:mm,RIGHTCORNERBRACKET:Wp,RIGHTWHITECORNERBRACKET:Kp,SCHEME:Op,SEMI:gm,SLASH:_m,SLASH_SCHEME:kp,SYM:xm,TILDE:vm,TLD:Ep,UNDERSCORE:ym,UTLD:Dp,UWORD:Sp,WORD:xp,WS:jp}),Cm=/[a-z]/,wm=/\p{L}/u,Tm=/\p{Emoji}/u,Em=/\d/,Dm=/\s/,Om=`\r`,km=`
117
- `,Am=`️`,jm=`‍`,Mm=``,Nm=null,Pm=null;function Fm(e=[]){let t={};vp.groups=t;let n=new vp;Nm??=zm(rp),Pm??=zm(ip),H(n,`'`,Xp),H(n,`{`,Np),H(n,`}`,Pp),H(n,`[`,Fp),H(n,`]`,Ip),H(n,`(`,Lp),H(n,`)`,Rp),H(n,`<`,zp),H(n,`>`,Bp),H(n,`(`,Vp),H(n,`)`,Hp),H(n,`「`,Up),H(n,`」`,Wp),H(n,`『`,Gp),H(n,`』`,Kp),H(n,`<`,qp),H(n,`>`,Jp),H(n,`&`,Yp),H(n,`*`,Zp),H(n,`@`,Qp),H(n,"`",em),H(n,`^`,tm),H(n,`:`,nm),H(n,`,`,rm),H(n,`$`,im),H(n,`.`,am),H(n,`=`,om),H(n,`!`,sm),H(n,`-`,cm),H(n,`%`,lm),H(n,`|`,um),H(n,`+`,dm),H(n,`#`,fm),H(n,`?`,pm),H(n,`"`,mm),H(n,`/`,_m),H(n,`;`,gm),H(n,`~`,vm),H(n,`_`,ym),H(n,`\\`,$p),H(n,`・`,hm);let r=yp(n,Em,Ap,{[ap]:!0});yp(r,Em,r);let i=yp(r,Cm,Cp,{[cp]:!0}),a=yp(r,wm,wp,{[lp]:!0}),o=yp(n,Cm,xp,{[op]:!0});yp(o,Em,i),yp(o,Cm,o),yp(i,Em,i),yp(i,Cm,i);let s=yp(n,wm,Sp,{[sp]:!0});yp(s,Cm),yp(s,Em,a),yp(s,wm,s),yp(a,Em,a),yp(a,Cm),yp(a,wm,a);let c=H(n,km,Mp,{[mp]:!0}),l=H(n,Om,jp,{[mp]:!0}),u=yp(n,Dm,jp,{[mp]:!0});H(n,Mm,u),H(l,km,c),H(l,Mm,u),yp(l,Dm,u),H(u,Om),H(u,km),yp(u,Dm,u),H(u,Mm,u);let d=yp(n,Tm,bm,{[dp]:!0});H(d,`#`),yp(d,Tm,d),H(d,Am,d);let f=H(d,jm);H(f,`#`),yp(f,Tm,d);let p=[[Cm,o],[Em,i]],m=[[Cm,null],[wm,s],[Em,a]];for(let e=0;e<Nm.length;e++)Rm(n,Nm[e],Ep,xp,p);for(let e=0;e<Pm.length;e++)Rm(n,Pm[e],Dp,Sp,m);gp(Ep,{tld:!0,ascii:!0},t),gp(Dp,{utld:!0,alpha:!0},t),Rm(n,`file`,Op,xp,p),Rm(n,`mailto`,Op,xp,p),Rm(n,`http`,kp,xp,p),Rm(n,`https`,kp,xp,p),Rm(n,`ftp`,kp,xp,p),Rm(n,`ftps`,kp,xp,p),gp(Op,{scheme:!0,ascii:!0},t),gp(kp,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[fp]:!0}:{[pp]:!0};r.indexOf(`-`)>=0?i[up]=!0:Cm.test(r)?Em.test(r)?i[cp]=!0:i[op]=!0:i[ap]=!0,bp(n,r,r,i)}return bp(n,`localhost`,Tp,{ascii:!0}),n.jd=new vp(xm),{start:n,tokens:Object.assign({groups:t},Sm)}}function Im(e,t){let n=Lm(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],a=0,o=0;for(;o<r;){let s=e,c=null,l=0,u=null,d=-1,f=-1;for(;o<r&&(c=s.go(n[o]));)s=c,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[o].length,f++),l+=n[o].length,a+=n[o].length,o++;a-=d,o-=f,l-=d,i.push({t:u.t,v:t.slice(a-l,a),s:a-l,e:a})}return i}function Lm(e){let t=[],n=e.length,r=0;for(;r<n;){let i=e.charCodeAt(r),a,o=i<55296||i>56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function Rm(e,t,n,r,i){let a,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?a=e.j[o]:(a=new vp(r),a.jr=i.slice(),e.j[o]=a),e=a}return a=new vp(n),a.jr=i.slice(),e.j[t[o-1]]=a,a}function zm(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;`0123456789`.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(``));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}var Bm={defaultProtocol:`http`,events:null,format:Hm,formatHref:Hm,nl2br:!1,tagName:`a`,target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Vm(e,t=null){let n=Object.assign({},Bm);e&&(n=Object.assign(n,e instanceof Vm?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}Vm.prototype={o:Bm,ignoreTags:[],defaultRender(e){return e},check(e){return this.get(`validate`,e.toString(),e)},get(e,t,n){let r=t!=null,i=this.o[e];return i&&(typeof i==`object`?(i=n.t in i?i[n.t]:Bm[e],typeof i==`function`&&r&&(i=i(t,n))):typeof i==`function`&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r==`function`&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get(`render`,null,e)||this.defaultRender)(t,e.t,e)}};function Hm(e){return e}function Um(e,t){this.t=`token`,this.v=e,this.tk=t}Um.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get(`truncate`,t,this),r=e.get(`format`,t,this);return n&&r.length>n?r.substring(0,n)+`…`:r},toFormattedHref(e){return e.get(`formatHref`,this.toHref(e.get(`defaultProtocol`)),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Bm.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get(`validate`,this.toString(),this)},render(e){let t=this,n=this.toHref(e.get(`defaultProtocol`)),r=e.get(`formatHref`,n,this),i=e.get(`tagName`,n,t),a=this.toFormattedString(e),o={},s=e.get(`className`,n,t),c=e.get(`target`,n,t),l=e.get(`rel`,n,t),u=e.getObj(`attributes`,n,t),d=e.getObj(`events`,n,t);return o.href=r,s&&(o.class=s),c&&(o.target=c),l&&(o.rel=l),u&&Object.assign(o,u),{tagName:i,attributes:o,content:a,eventListeners:d}}};function Wm(e,t){class n extends Um{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}var Gm=Wm(`email`,{isLink:!0,toHref(){return`mailto:`+this.toString()}}),Km=Wm(`text`),qm=Wm(`nl`),Jm=Wm(`url`,{isLink:!0,toHref(e=Bm.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Tp&&e[1].t===nm}}),Ym=e=>new vp(e);function Xm({groups:e}){let t=e.domain.concat([Yp,Zp,Qp,$p,em,tm,im,om,cm,Ap,lm,um,dm,fm,_m,xm,vm,ym]),n=[Xp,nm,rm,am,sm,lm,pm,mm,gm,zp,Bp,Np,Pp,Ip,Fp,Lp,Rp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp],r=[Yp,Xp,Zp,$p,em,tm,im,om,cm,Np,Pp,lm,um,dm,fm,pm,_m,xm,vm,ym],i=Ym(),a=H(i,vm);V(a,r,a),V(a,e.domain,a);let o=Ym(),s=Ym(),c=Ym();V(i,e.domain,o),V(i,e.scheme,s),V(i,e.slashscheme,c),V(o,r,a),V(o,e.domain,o);let l=H(o,Qp);H(a,Qp,l),H(s,Qp,l),H(c,Qp,l);let u=H(a,am);V(u,r,a),V(u,e.domain,a);let d=Ym();V(l,e.domain,d),V(d,e.domain,d);let f=H(d,am);V(f,e.domain,d);let p=Ym(Gm);V(f,e.tld,p),V(f,e.utld,p),H(l,Tp,p);let m=H(d,cm);H(m,cm,m),V(m,e.domain,d),V(p,e.domain,d),H(p,am,f),H(p,cm,m);let h=H(o,cm),g=H(o,am);H(h,cm,h),V(h,e.domain,o),V(g,r,a),V(g,e.domain,o);let _=Ym(Jm);V(g,e.tld,_),V(g,e.utld,_),V(_,e.domain,o),V(_,r,a),H(_,am,g),H(_,cm,h),H(_,Qp,l);let v=H(_,nm),y=Ym(Jm);V(v,e.numeric,y);let b=Ym(Jm),x=Ym();V(b,t,b),V(b,n,x),V(x,t,b),V(x,n,x),H(_,_m,b),H(y,_m,b);let S=H(s,nm),C=H(H(H(c,nm),_m),_m);V(s,e.domain,o),H(s,am,g),H(s,cm,h),V(c,e.domain,o),H(c,am,g),H(c,cm,h),V(S,e.domain,b),H(S,_m,b),H(S,pm,b),V(C,e.domain,b),V(C,t,b),H(C,_m,b);let w=[[Np,Pp],[Fp,Ip],[Lp,Rp],[zp,Bp],[Vp,Hp],[Up,Wp],[Gp,Kp],[qp,Jp]];for(let e=0;e<w.length;e++){let[r,i]=w[e],a=H(b,r);H(x,r,a);let o=Ym(Jm);V(a,t,o);let s=Ym();V(a,n,s),H(a,i,b),V(o,t,o),V(o,n,s),V(s,t,o),V(s,n,s),H(o,i,b),H(s,i,b)}return H(i,Tp,_),H(i,Mp,qm),{start:i,tokens:Sm}}function Zm(e,t,n){let r=n.length,i=0,a=[],o=[];for(;i<r;){let s=e,c=null,l=null,u=0,d=null,f=-1;for(;i<r&&!(c=s.go(n[i].t));)o.push(n[i++]);for(;i<r&&(l=c||s.go(n[i].t));)c=null,s=l,s.accepts()?(f=0,d=s):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(o.push(n[i]),i++);else{o.length>0&&(a.push(Qm(Km,t,o)),o=[]),i-=f,u-=f;let e=d.t,r=n.slice(i-u,i);a.push(Qm(e,t,r))}}return o.length>0&&a.push(Qm(Km,t,o)),a}function Qm(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}var $m=typeof console<`u`&&console&&console.warn||(()=>{}),eh=`until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`,th={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function nh(){return vp.groups={},th.scanner=null,th.parser=null,th.tokenQueue=[],th.pluginQueue=[],th.customSchemes=[],th.initialized=!1,th}function rh(e,t=!1){if(th.initialized&&$m(`linkifyjs: already initialized - will not register custom scheme "${e}" ${eh}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
116
+ `,parseMarkdown:()=>({type:`hardBreak`}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,s=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&s&&a){let t=s.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Zf=Tf.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(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,$l(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode(`heading`,{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{let n=e.attrs?.level?parseInt(e.attrs.level,10):1,r=`#`.repeat(n);return e.content?`${r} ${t.renderChildren(e.content)}`:``},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,`paragraph`,e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Cf({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),Qf=Tf.create({name:`horizontalRule`,addOptions(){return{HTMLAttributes:{},nextNodeType:`paragraph`}},group:`block`,parseHTML(){return[{tag:`hr`}]},renderHTML({HTMLAttributes:e}){return[`hr`,$l(this.options.HTMLAttributes,e)]},markdownTokenName:`hr`,parseMarkdown:(e,t)=>t.createNode(`horizontalRule`),renderMarkdown:()=>`---`,addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!Nd(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,i=e();return Au(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(M.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(N.create(t.doc,n.pos)):t.setSelection(M.create(t.doc,n.pos));else{let i=(e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType)?.create();i&&(t.insert(r,i),t.setSelection(M.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Sf({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),$f=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,ep=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,tp=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,np=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,rp=Yd.create({name:`italic`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`em`},{tag:`i`,getAttrs:e=>e.style.fontStyle!==`normal`&&null},{style:`font-style=normal`,clearMark:e=>e.type.name===this.name},{style:`font-style=italic`}]},renderHTML({HTMLAttributes:e}){return[`em`,$l(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:`em`,parseMarkdown:(e,t)=>t.applyMark(`italic`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<em>`,close:`</em>`}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[xf({find:$f,type:this.type}),xf({find:tp,type:this.type})]},addPasteRules(){return[Ef({find:ep,type:this.type}),Ef({find:np,type:this.type})]}}),ip=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`,ap=`ελ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`,op=`numeric`,sp=`ascii`,cp=`alpha`,lp=`asciinumeric`,up=`alphanumeric`,dp=`domain`,fp=`emoji`,pp=`scheme`,mp=`slashscheme`,hp=`whitespace`;function gp(e,t){return e in t||(t[e]=[]),t[e]}function _p(e,t,n){t[op]&&(t[lp]=!0,t[up]=!0),t[sp]&&(t[lp]=!0,t[cp]=!0),t[lp]&&(t[up]=!0),t[cp]&&(t[up]=!0),t[up]&&(t[dp]=!0),t[fp]&&(t[dp]=!0);for(let r in t){let t=gp(r,n);t.indexOf(e)<0&&t.push(e)}}function vp(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function yp(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}yp.groups={},yp.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r||=yp.groups;let i;return t&&t.j?i=t:(i=new yp(t),n&&r&&_p(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,a=e.length;if(!a)return i;for(let t=0;t<a-1;t++)i=i.tt(e[t]);return i.tt(e[a-1],t,n,r)},tt(e,t,n,r){r||=yp.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let a=t,o,s=i.go(e);return s?(o=new yp,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new yp,a&&(r&&(o.t&&typeof o.t==`string`?_p(a,Object.assign(vp(o.t,r),n),r):n&&_p(a,n,r)),o.t=a),i.j[e]=o,o}};var B=(e,t,n,r,i)=>e.ta(t,n,r,i),bp=(e,t,n,r,i)=>e.tr(t,n,r,i),xp=(e,t,n,r,i)=>e.ts(t,n,r,i),V=(e,t,n,r,i)=>e.tt(t,n,r,i),Sp=`WORD`,Cp=`UWORD`,wp=`ASCIINUMERICAL`,Tp=`ALPHANUMERICAL`,Ep=`LOCALHOST`,Dp=`TLD`,Op=`UTLD`,kp=`SCHEME`,Ap=`SLASH_SCHEME`,jp=`NUM`,Mp=`WS`,Np=`NL`,Pp=`OPENBRACE`,Fp=`CLOSEBRACE`,Ip=`OPENBRACKET`,Lp=`CLOSEBRACKET`,Rp=`OPENPAREN`,zp=`CLOSEPAREN`,Bp=`OPENANGLEBRACKET`,Vp=`CLOSEANGLEBRACKET`,Hp=`FULLWIDTHLEFTPAREN`,Up=`FULLWIDTHRIGHTPAREN`,Wp=`LEFTCORNERBRACKET`,Gp=`RIGHTCORNERBRACKET`,Kp=`LEFTWHITECORNERBRACKET`,qp=`RIGHTWHITECORNERBRACKET`,Jp=`FULLWIDTHLESSTHAN`,Yp=`FULLWIDTHGREATERTHAN`,Xp=`AMPERSAND`,Zp=`APOSTROPHE`,Qp=`ASTERISK`,$p=`AT`,em=`BACKSLASH`,tm=`BACKTICK`,nm=`CARET`,rm=`COLON`,im=`COMMA`,am=`DOLLAR`,om=`DOT`,sm=`EQUALS`,cm=`EXCLAMATION`,lm=`HYPHEN`,um=`PERCENT`,dm=`PIPE`,fm=`PLUS`,pm=`POUND`,mm=`QUERY`,hm=`QUOTE`,gm=`FULLWIDTHMIDDLEDOT`,_m=`SEMI`,vm=`SLASH`,ym=`TILDE`,bm=`UNDERSCORE`,xm=`EMOJI`,Sm=`SYM`,Cm=Object.freeze({__proto__:null,ALPHANUMERICAL:Tp,AMPERSAND:Xp,APOSTROPHE:Zp,ASCIINUMERICAL:wp,ASTERISK:Qp,AT:$p,BACKSLASH:em,BACKTICK:tm,CARET:nm,CLOSEANGLEBRACKET:Vp,CLOSEBRACE:Fp,CLOSEBRACKET:Lp,CLOSEPAREN:zp,COLON:rm,COMMA:im,DOLLAR:am,DOT:om,EMOJI:xm,EQUALS:sm,EXCLAMATION:cm,FULLWIDTHGREATERTHAN:Yp,FULLWIDTHLEFTPAREN:Hp,FULLWIDTHLESSTHAN:Jp,FULLWIDTHMIDDLEDOT:gm,FULLWIDTHRIGHTPAREN:Up,HYPHEN:lm,LEFTCORNERBRACKET:Wp,LEFTWHITECORNERBRACKET:Kp,LOCALHOST:Ep,NL:Np,NUM:jp,OPENANGLEBRACKET:Bp,OPENBRACE:Pp,OPENBRACKET:Ip,OPENPAREN:Rp,PERCENT:um,PIPE:dm,PLUS:fm,POUND:pm,QUERY:mm,QUOTE:hm,RIGHTCORNERBRACKET:Gp,RIGHTWHITECORNERBRACKET:qp,SCHEME:kp,SEMI:_m,SLASH:vm,SLASH_SCHEME:Ap,SYM:Sm,TILDE:ym,TLD:Dp,UNDERSCORE:bm,UTLD:Op,UWORD:Cp,WORD:Sp,WS:Mp}),wm=/[a-z]/,Tm=/\p{L}/u,Em=/\p{Emoji}/u,Dm=/\d/,Om=/\s/,km=`\r`,Am=`
117
+ `,jm=`️`,Mm=`‍`,Nm=``,Pm=null,Fm=null;function Im(e=[]){let t={};yp.groups=t;let n=new yp;Pm??=Bm(ip),Fm??=Bm(ap),V(n,`'`,Zp),V(n,`{`,Pp),V(n,`}`,Fp),V(n,`[`,Ip),V(n,`]`,Lp),V(n,`(`,Rp),V(n,`)`,zp),V(n,`<`,Bp),V(n,`>`,Vp),V(n,`(`,Hp),V(n,`)`,Up),V(n,`「`,Wp),V(n,`」`,Gp),V(n,`『`,Kp),V(n,`』`,qp),V(n,`<`,Jp),V(n,`>`,Yp),V(n,`&`,Xp),V(n,`*`,Qp),V(n,`@`,$p),V(n,"`",tm),V(n,`^`,nm),V(n,`:`,rm),V(n,`,`,im),V(n,`$`,am),V(n,`.`,om),V(n,`=`,sm),V(n,`!`,cm),V(n,`-`,lm),V(n,`%`,um),V(n,`|`,dm),V(n,`+`,fm),V(n,`#`,pm),V(n,`?`,mm),V(n,`"`,hm),V(n,`/`,vm),V(n,`;`,_m),V(n,`~`,ym),V(n,`_`,bm),V(n,`\\`,em),V(n,`・`,gm);let r=bp(n,Dm,jp,{[op]:!0});bp(r,Dm,r);let i=bp(r,wm,wp,{[lp]:!0}),a=bp(r,Tm,Tp,{[up]:!0}),o=bp(n,wm,Sp,{[sp]:!0});bp(o,Dm,i),bp(o,wm,o),bp(i,Dm,i),bp(i,wm,i);let s=bp(n,Tm,Cp,{[cp]:!0});bp(s,wm),bp(s,Dm,a),bp(s,Tm,s),bp(a,Dm,a),bp(a,wm),bp(a,Tm,a);let c=V(n,Am,Np,{[hp]:!0}),l=V(n,km,Mp,{[hp]:!0}),u=bp(n,Om,Mp,{[hp]:!0});V(n,Nm,u),V(l,Am,c),V(l,Nm,u),bp(l,Om,u),V(u,km),V(u,Am),bp(u,Om,u),V(u,Nm,u);let d=bp(n,Em,xm,{[fp]:!0});V(d,`#`),bp(d,Em,d),V(d,jm,d);let f=V(d,Mm);V(f,`#`),bp(f,Em,d);let p=[[wm,o],[Dm,i]],m=[[wm,null],[Tm,s],[Dm,a]];for(let e=0;e<Pm.length;e++)zm(n,Pm[e],Dp,Sp,p);for(let e=0;e<Fm.length;e++)zm(n,Fm[e],Op,Cp,m);_p(Dp,{tld:!0,ascii:!0},t),_p(Op,{utld:!0,alpha:!0},t),zm(n,`file`,kp,Sp,p),zm(n,`mailto`,kp,Sp,p),zm(n,`http`,Ap,Sp,p),zm(n,`https`,Ap,Sp,p),zm(n,`ftp`,Ap,Sp,p),zm(n,`ftps`,Ap,Sp,p),_p(kp,{scheme:!0,ascii:!0},t),_p(Ap,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[pp]:!0}:{[mp]:!0};r.indexOf(`-`)>=0?i[dp]=!0:wm.test(r)?Dm.test(r)?i[lp]=!0:i[sp]=!0:i[op]=!0,xp(n,r,r,i)}return xp(n,`localhost`,Ep,{ascii:!0}),n.jd=new yp(Sm),{start:n,tokens:Object.assign({groups:t},Cm)}}function Lm(e,t){let n=Rm(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],a=0,o=0;for(;o<r;){let s=e,c=null,l=0,u=null,d=-1,f=-1;for(;o<r&&(c=s.go(n[o]));)s=c,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[o].length,f++),l+=n[o].length,a+=n[o].length,o++;a-=d,o-=f,l-=d,i.push({t:u.t,v:t.slice(a-l,a),s:a-l,e:a})}return i}function Rm(e){let t=[],n=e.length,r=0;for(;r<n;){let i=e.charCodeAt(r),a,o=i<55296||i>56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function zm(e,t,n,r,i){let a,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?a=e.j[o]:(a=new yp(r),a.jr=i.slice(),e.j[o]=a),e=a}return a=new yp(n),a.jr=i.slice(),e.j[t[o-1]]=a,a}function Bm(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;`0123456789`.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(``));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}var Vm={defaultProtocol:`http`,events:null,format:Um,formatHref:Um,nl2br:!1,tagName:`a`,target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Hm(e,t=null){let n=Object.assign({},Vm);e&&(n=Object.assign(n,e instanceof Hm?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}Hm.prototype={o:Vm,ignoreTags:[],defaultRender(e){return e},check(e){return this.get(`validate`,e.toString(),e)},get(e,t,n){let r=t!=null,i=this.o[e];return i&&(typeof i==`object`?(i=n.t in i?i[n.t]:Vm[e],typeof i==`function`&&r&&(i=i(t,n))):typeof i==`function`&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r==`function`&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get(`render`,null,e)||this.defaultRender)(t,e.t,e)}};function Um(e){return e}function Wm(e,t){this.t=`token`,this.v=e,this.tk=t}Wm.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get(`truncate`,t,this),r=e.get(`format`,t,this);return n&&r.length>n?r.substring(0,n)+`…`:r},toFormattedHref(e){return e.get(`formatHref`,this.toHref(e.get(`defaultProtocol`)),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Vm.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get(`validate`,this.toString(),this)},render(e){let t=this,n=this.toHref(e.get(`defaultProtocol`)),r=e.get(`formatHref`,n,this),i=e.get(`tagName`,n,t),a=this.toFormattedString(e),o={},s=e.get(`className`,n,t),c=e.get(`target`,n,t),l=e.get(`rel`,n,t),u=e.getObj(`attributes`,n,t),d=e.getObj(`events`,n,t);return o.href=r,s&&(o.class=s),c&&(o.target=c),l&&(o.rel=l),u&&Object.assign(o,u),{tagName:i,attributes:o,content:a,eventListeners:d}}};function Gm(e,t){class n extends Wm{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}var Km=Gm(`email`,{isLink:!0,toHref(){return`mailto:`+this.toString()}}),qm=Gm(`text`),Jm=Gm(`nl`),Ym=Gm(`url`,{isLink:!0,toHref(e=Vm.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Ep&&e[1].t===rm}}),Xm=e=>new yp(e);function Zm({groups:e}){let t=e.domain.concat([Xp,Qp,$p,em,tm,nm,am,sm,lm,jp,um,dm,fm,pm,vm,Sm,ym,bm]),n=[Zp,rm,im,om,cm,um,mm,hm,_m,Bp,Vp,Pp,Fp,Lp,Ip,Rp,zp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp],r=[Xp,Zp,Qp,em,tm,nm,am,sm,lm,Pp,Fp,um,dm,fm,pm,mm,vm,Sm,ym,bm],i=Xm(),a=V(i,ym);B(a,r,a),B(a,e.domain,a);let o=Xm(),s=Xm(),c=Xm();B(i,e.domain,o),B(i,e.scheme,s),B(i,e.slashscheme,c),B(o,r,a),B(o,e.domain,o);let l=V(o,$p);V(a,$p,l),V(s,$p,l),V(c,$p,l);let u=V(a,om);B(u,r,a),B(u,e.domain,a);let d=Xm();B(l,e.domain,d),B(d,e.domain,d);let f=V(d,om);B(f,e.domain,d);let p=Xm(Km);B(f,e.tld,p),B(f,e.utld,p),V(l,Ep,p);let m=V(d,lm);V(m,lm,m),B(m,e.domain,d),B(p,e.domain,d),V(p,om,f),V(p,lm,m);let h=V(o,lm),g=V(o,om);V(h,lm,h),B(h,e.domain,o),B(g,r,a),B(g,e.domain,o);let _=Xm(Ym);B(g,e.tld,_),B(g,e.utld,_),B(_,e.domain,o),B(_,r,a),V(_,om,g),V(_,lm,h),V(_,$p,l);let v=V(_,rm),y=Xm(Ym);B(v,e.numeric,y);let b=Xm(Ym),x=Xm();B(b,t,b),B(b,n,x),B(x,t,b),B(x,n,x),V(_,vm,b),V(y,vm,b);let S=V(s,rm),C=V(V(V(c,rm),vm),vm);B(s,e.domain,o),V(s,om,g),V(s,lm,h),B(c,e.domain,o),V(c,om,g),V(c,lm,h),B(S,e.domain,b),V(S,vm,b),V(S,mm,b),B(C,e.domain,b),B(C,t,b),V(C,vm,b);let w=[[Pp,Fp],[Ip,Lp],[Rp,zp],[Bp,Vp],[Hp,Up],[Wp,Gp],[Kp,qp],[Jp,Yp]];for(let e=0;e<w.length;e++){let[r,i]=w[e],a=V(b,r);V(x,r,a);let o=Xm(Ym);B(a,t,o);let s=Xm();B(a,n,s),V(a,i,b),B(o,t,o),B(o,n,s),B(s,t,o),B(s,n,s),V(o,i,b),V(s,i,b)}return V(i,Ep,_),V(i,Np,Jm),{start:i,tokens:Cm}}function Qm(e,t,n){let r=n.length,i=0,a=[],o=[];for(;i<r;){let s=e,c=null,l=null,u=0,d=null,f=-1;for(;i<r&&!(c=s.go(n[i].t));)o.push(n[i++]);for(;i<r&&(l=c||s.go(n[i].t));)c=null,s=l,s.accepts()?(f=0,d=s):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(o.push(n[i]),i++);else{o.length>0&&(a.push($m(qm,t,o)),o=[]),i-=f,u-=f;let e=d.t,r=n.slice(i-u,i);a.push($m(e,t,r))}}return o.length>0&&a.push($m(qm,t,o)),a}function $m(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}var eh=typeof console<`u`&&console&&console.warn||(()=>{}),th=`until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`,nh={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function rh(){return yp.groups={},nh.scanner=null,nh.parser=null,nh.tokenQueue=[],nh.pluginQueue=[],nh.customSchemes=[],nh.initialized=!1,nh}function ih(e,t=!1){if(nh.initialized&&eh(`linkifyjs: already initialized - will not register custom scheme "${e}" ${th}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
118
118
  1. Must only contain digits, lowercase ASCII letters or "-"
119
119
  2. Cannot start or end with "-"
120
- 3. "-" cannot repeat`);th.customSchemes.push([e,t])}function ih(){th.scanner=Fm(th.customSchemes);for(let e=0;e<th.tokenQueue.length;e++)th.tokenQueue[e][1]({scanner:th.scanner});th.parser=Xm(th.scanner.tokens);for(let e=0;e<th.pluginQueue.length;e++)th.pluginQueue[e][1]({scanner:th.scanner,parser:th.parser});return th.initialized=!0,th}function ah(e){return th.initialized||ih(),Zm(th.parser.start,e,Im(th.scanner.start,e))}ah.scan=Im;function oh(e,t=null,n=null){if(t&&typeof t==`object`){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new Vm(n),i=ah(e),a=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&a.push(n.toFormattedObject(r))}return a}var sh=`[\0- \xA0 ᠎ -\u2029  ]`,ch=new RegExp(sh),lh=RegExp(`${sh}$`),uh=new RegExp(sh,`g`);function dh(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?[`()`,`[]`].includes(e[0].value+e[2].value):!1}function fh(e){return new Gn({key:new Jn(`autolink`),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),a=t.some(e=>e.getMeta(`preventAutolink`));if(!i||a)return;let{tr:o}=r;if(hu(Hl(n.doc,[...t])).forEach(({newRange:t})=>{let n=Ul(r.doc,t,e=>e.isTextblock),i,a;if(n.length>1)i=n[0],a=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0,` `);else if(n.length){let e=r.doc.textBetween(t.from,t.to,` `,` `);if(!lh.test(e))return;i=n[0],a=r.doc.textBetween(i.pos,t.to,void 0,` `)}if(i&&a){let t=a.split(ch).filter(Boolean);if(t.length<=0)return!1;let n=t[t.length-1],s=i.pos+a.lastIndexOf(n);if(!n)return!1;let c=ah(n).map(t=>t.toObject(e.defaultProtocol));if(!dh(c))return!1;c.filter(e=>e.isLink).map(e=>({...e,from:s+e.start+1,to:s+e.end+1})).filter(e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{gu(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||o.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),o.steps.length)return o}})}function ph(e){return new Gn({key:new Jn(`handleClickLink`),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let t=r.target;if(!t)return!1;let n=e.editor.view.dom;i=t.closest(`a`),i&&!n.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=fu(t.state,e.type.name),r=i.href??n.href,o=i.target??n.target;r&&(window.open(r,o),a=!0)}return a}}})}var mh=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,hh=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function gh(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;--r)n+=1;return n%2==1}function _h(e,t){let n=0,r=0;for(;r<t;){if(e[r]!=="`"){r+=1;continue}if(n===0&&gh(e,r)){r+=1;continue}let i=0;for(;r<t&&e[r]==="`";)i+=1,r+=1;n===0?n=i:i===n&&(n=0)}return n>0}function vh(e,t,n){let[,r,i]=t;return(t.index?e[t.index-1]:void 0)===`!`||gh(e,t.index??0)||_h(e,t.index??0)?!1:!!r.trim()&&n(i)}function yh(e){let[t,n,r,,i,a,o]=e,s=i??a??o;return{index:e.index??0,text:t,replaceWith:n,data:{href:r,title:s||null,markdown:!0}}}function bh(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function xh(e){return{href:e.data?.href,title:e.data?.title??null}}function Sh(e){let t=bf({find:t=>{let n=mh.exec(t);return!n||!vh(t,n,e.isAllowedHref)?null:yh(n)},type:e.type,getAttributes:xh});return new Ud({find:t.find,handler:e=>{let n=t.handler(e);return n!==null&&e.state.tr.steps.length&&e.state.tr.setMeta(`preventAutolink`,!0),n}})}function Ch(e){let t=Tf({find:t=>{let n=[];for(let r of t.matchAll(hh))vh(t,r,e.isAllowedHref)&&n.push(yh(r));let r=(e.findPlainUrls?.call(e,t)??[]).filter(e=>!n.some(t=>bh(t,e)));return[...n,...r]},type:e.type,getAttributes:xh});return new Yd({find:t.find,handler:e=>{let n=t.handler(e);return n!==null&&e.state.tr.steps.length&&e.match.data?.markdown&&e.state.tr.setMeta(`preventAutolink`,!0),n}})}function wh(e){return new Gn({key:new Jn(`handlePasteLink`),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:a}=t,{selection:o}=a,{empty:s}=o;if(s)return!1;let c=``;r.content.forEach(e=>{c+=e.textContent});let l=oh(c,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===c);return!c||!l||i!==void 0&&!i(l.value)?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}function Th(e,t){let n=[`http`,`https`,`ftp`,`ftps`,`mailto`,`tel`,`callto`,`sms`,`cid`,`xmpp`];return t&&t.forEach(e=>{let t=typeof e==`string`?e:e.scheme;t&&n.push(t)}),!e||e.replace(uh,``).match(RegExp(`^(?:(?:${n.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,`\\$&`)).join(`|`)}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,`i`))}var Eh=Jd.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(e=>{if(typeof e==`string`){rh(e);return}rh(e.scheme,e.optionalSlashes)})},onDestroy(){nh()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer nofollow`,class:null},isAllowedUri:(e,t)=>!!Th(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes(`@`))return!0;let r=(e.includes(`@`)?e.split(`@`).pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute(`href`)}},target:{default:this.options.HTMLAttributes.target??null},rel:{default:this.options.HTMLAttributes.rel??null},class:{default:this.options.HTMLAttributes.class??null},title:{default:null}}},parseHTML(){return[{tag:`a[href]`,getAttrs:e=>{let t=e.getAttribute(`href`);return!t||!this.options.isAllowedUri(t,{defaultValidate:e=>!!Th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!Th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?[`a`,Ql(this.options.HTMLAttributes,e),0]:[`a`,Ql(this.options.HTMLAttributes,{...e,href:``}),0]},markdownTokenName:`link`,parseMarkdown:(e,t)=>t.applyMark(`link`,t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{let n=e.attrs?.href??``,r=e.attrs?.title??``,i=t.renderChildren(e);return r?`[${i}](${n} "${r}")`:`[${i}](${n})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:e=>!!Th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta(`preventAutolink`,!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:e=>!!Th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()}},addInputRules(){return this.options.markdownLinks?[Sh({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!Th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options;oh(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!Th(e,n),protocols:n,defaultProtocol:r})).forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t};return this.options.markdownLinks?[Ch({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!Th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[Tf({find:e,type:this.type,getAttributes:e=>({href:e.data?.href})})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(fh({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!Th(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(ph({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick===`whenNotEditable`||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(wh({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),Dh=`listItem`,Oh=`textStyle`,kh=/^\s*([-+*])\s$/,Ah=wf.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:e}){return[`ul`,Ql(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
121
- `):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Dh,this.editor.getAttributes(Oh)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Cf({find:kh,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Cf({find:kh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Oh),editor:this.editor})),[e]}}),jh=(e,t,n)=>{let{selection:r}=e;if(!r.empty)return null;let{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let a=-1;for(let e=i.depth;e>0;--e)if(i.node(e).type.name===t){a=e;break}if(a<0)return null;let o=i.node(a),s=i.index(a);if(s+1>=o.childCount)return null;let c=o.child(s+1);if(!n.includes(c.type.name))return null;let l=e.schema.nodes[t],u=!1;if(c.forEach(e=>{e.type===l&&e.childCount>1&&(u=!0)}),!u)return null;let d=e.doc.resolve(i.after()).nodeAfter;if(!d||!n.includes(d.type.name))return null;let f=[];return d.forEach(e=>{f.push(e)}),f.length===0?null:{listItemDepth:a,nestedList:d,nestedListPos:i.after(),insertPos:i.after(a),items:f}},Mh=(e,t,n,r)=>{let i=jh(e,n,r);if(!i)return!1;let{selection:a}=e,{nestedList:o,nestedListPos:s,insertPos:c,items:l}=i,u=e.tr;u.delete(s,s+o.nodeSize);let d=u.mapping.map(c);return u.insert(d,b.from(l)),u.setSelection(a.map(u.doc,u.mapping)),t&&t(u),!0},Nh=(e,t,n)=>Mh(e.state,e.view.dispatch,t,n),Ph=(e,t)=>nf.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>Nh(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),Fh=[[1e3,`m`],[900,`cm`],[500,`d`],[400,`cd`],[100,`c`],[90,`xc`],[50,`l`],[40,`xl`],[10,`x`],[9,`ix`],[5,`v`],[4,`iv`],[1,`i`]],Ih=`abcdefghijklmnopqrstuvwxyz`,Lh=String.raw`\d+|[ivxlcdmIVXLCDM]+|${`[a-zA-Z]{1,2}`}`;function Rh(e){let t=e,n=``;for(let[e,r]of Fh)for(;t>=e;)n+=r,t-=e;return n}function zh(e){return Rh(e).toUpperCase()}function Bh(e){let t=e.toLowerCase(),n=0,r=0;for(;n<t.length;){let e=!1;for(let[i,a]of Fh)if(t.startsWith(a,n)){r+=i,n+=a.length,e=!0;break}if(!e)return 0}return r}function Vh(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=Bh(e);return t<=0?!1:(e===e.toLowerCase()?Rh(t):zh(t))===e}function Hh(e){let t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){let e=t.charCodeAt(0)-97,n=t.charCodeAt(1)-97;return(e+1)*26+n+1}return 0}function Uh(e){if(e<=26)return Ih[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?Ih[n]:Ih[t]+Ih[n]}function Wh(e){if(e&&!/^\d+$/.test(e)){if(Vh(e))return e===e.toLowerCase()?`i`:`I`;if(/^[a-z]{1,2}$/.test(e))return`a`;if(/^[A-Z]{1,2}$/.test(e))return`A`}}function Gh(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=Wh(e);if(t===`i`||t===`I`)return Bh(e);if(t===`a`||t===`A`){let t=Hh(e);return t>0?t:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}function Kh(e,t){if(e===`numeric`)return String(t);switch(e){case`a`:return Uh(t);case`A`:return Uh(t).toUpperCase();case`i`:return Rh(t);case`I`:return zh(t);default:return String(t)}}function qh(e){if(e.length===0)return!1;let t=Wh(e[0])??`numeric`,n=Gh(e[0]);if(n<1)return!1;for(let r=0;r<e.length;r++){let i=Kh(t,n+r);if(e[r]!==i)return!1}return!0}function Jh(e){return{type:Wh(e),start:Gh(e)}}function Yh(e){let{type:t,start:n}=Jh(e),r={};return t&&(r.type=t),n!==1&&(r.start=n),r}function Xh(e,t,n=`. `){let r=t+1;if(!e||e===`1`)return`${r}${n}`;switch(e){case`a`:return`${Uh(r)}${n}`;case`A`:return`${Uh(r).toUpperCase()}${n}`;case`i`:return`${Rh(r)}${n}`;case`I`:return`${zh(r)}${n}`;default:return`${r}${n}`}}function Zh(e){let t=e.tokens?.[0];return!!(e.text&&e.tokens?.length===1&&t?.type===`list`&&t.ordered&&t.raw===e.text)}function Qh(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:`text`,raw:e,text:e}])}var $h=wf.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,Ql(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0){if(Zh(e))return{type:`listItem`,content:[{type:`paragraph`,content:Qh(e.text||``,t)}]};if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>Bd(e,t,e=>{if(e.parentType===`bulletList`)return`- `;if(e.parentType===`orderedList`){var t,n;let r=((t=e.meta)==null||(t=t.parentAttrs)==null?void 0:t.start)||1;return Xh((n=e.meta)==null||(n=n.parentAttrs)==null?void 0:n.type,r-1+(e.index||0),`. `)}return`- `},n,{alignNestedToPrefix:n?.parentType===`orderedList`}),addExtensions(){return[Ph(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),eg=(e,t)=>{let{$from:n}=t.selection,r=Mc(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},tg=(e,t)=>{let n=eg(e,t);if(!n)return!1;let[,r]=_u(t,e,n.$pos.pos+4);return r},ng=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},rg=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!wl(e.state,t)&&ng(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!wl(e.state,t)||!Tu(e.state))return!1;let{$from:r}=e.state.selection,i=r.depth-1;return r.node(i).type!==e.schema.nodes[t]||r.index(i)!==0?!1:e.chain().liftListItem(t).run()},ig=(e,t)=>{let n=tg(e,t),r=eg(e,t);return!r||!n?!1:n>r.depth},ag=(e,t)=>{let n=tg(e,t),r=eg(e,t);return!r||!n?!1:n<r.depth},og=(e,t)=>{if(!wl(e.state,t)||!wu(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:ig(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():ag(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},sg=(e,t,n)=>{let{state:r}=e,{selection:i}=r;if(!i.empty)return!1;let{$from:a}=i;if(a.parentOffset!==0||!a.parent.isTextblock||wl(r,t))return!1;let o=vu(a);if(!o||!n.includes(o.type.name))return!1;let s=o.lastChild;if(!s||s.type.name!==t)return!1;let c=a.parent;if(!s.canReplace(s.childCount,s.childCount,b.from(c)))return!1;let l=a.before(),u=a.after(),d=l-2;return e.commands.command(({tr:e,dispatch:t})=>(t&&(e.delete(l,u).insert(d,b.from(c)),e.setSelection(M.create(e.doc,d+1)),e.scrollIntoView()),!0))},cg=nf.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&og(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&og(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&rg(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&rg(e,n,r)&&(t=!0)}),t},Tab:({editor:e})=>{for(let{itemName:t,wrapperNames:n}of this.options.listTypes)if(e.state.schema.nodes[t]!==void 0&&sg(e,t,n))return!0;return!1}}}}),lg=RegExp(`^(\\s*)(${Lh})([.)])\\s+(.*)$`),ug=/^\s/,dg={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function fg(e){return lg.test(e.trimStart())}function pg(e){let t=e.trimStart();return dg.bulletItem.test(t)||fg(t)||dg.heading.test(t)||dg.thematicBreak.test(t)&&!t.startsWith(`-`)||/^>\s?/.test(t)||dg.codeFence.test(t)||dg.blockMath.test(t)}function mg(e){return Object.values(dg).some(t=>t.test(e))}function hg(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r){n.push(e);return}if(e.trim()===``){r=!0,n.push(e);return}if(t.length>0&&pg(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function gg(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(lg);if(!a)break;let[,o,s,c,l]=a,u=o.length,d=parseInt(s,10),f=isNaN(d)?Wh(s):void 0,p=isNaN(d)?Gh(s):d,m=[l],h=n+1,g=[i],_=!1;for(;h<e.length;){let t=e[h];if(t.match(lg))break;if(t.trim()===``)g.push(t),m.push(``),_=!0,h+=1;else if(t.match(ug)){let e=t.length-t.trimStart().length,n=u+s.length+1;g.push(t),m.push(t.slice(Math.min(e,n))),h+=1}else{if(_||mg(t))break;g.push(t),m.push(t),h+=1}}t.push({indent:u,number:p,type:f,content:m.join(`
120
+ 3. "-" cannot repeat`);nh.customSchemes.push([e,t])}function ah(){nh.scanner=Im(nh.customSchemes);for(let e=0;e<nh.tokenQueue.length;e++)nh.tokenQueue[e][1]({scanner:nh.scanner});nh.parser=Zm(nh.scanner.tokens);for(let e=0;e<nh.pluginQueue.length;e++)nh.pluginQueue[e][1]({scanner:nh.scanner,parser:nh.parser});return nh.initialized=!0,nh}function oh(e){return nh.initialized||ah(),Qm(nh.parser.start,e,Lm(nh.scanner.start,e))}oh.scan=Lm;function sh(e,t=null,n=null){if(t&&typeof t==`object`){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new Hm(n),i=oh(e),a=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&a.push(n.toFormattedObject(r))}return a}var ch=`[\0- \xA0 ᠎ -\u2029  ]`,lh=new RegExp(ch),uh=RegExp(`${ch}$`),dh=new RegExp(ch,`g`);function fh(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?[`()`,`[]`].includes(e[0].value+e[2].value):!1}function ph(e){return new Gn({key:new Jn(`autolink`),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),a=t.some(e=>e.getMeta(`preventAutolink`));if(!i||a)return;let{tr:o}=r;if(gu(Hl(n.doc,[...t])).forEach(({newRange:t})=>{let n=Ul(r.doc,t,e=>e.isTextblock),i,a;if(n.length>1)i=n[0],a=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0,` `);else if(n.length){let e=r.doc.textBetween(t.from,t.to,` `,` `);if(!uh.test(e))return;i=n[0],a=r.doc.textBetween(i.pos,t.to,void 0,` `)}if(i&&a){let t=a.split(lh).filter(Boolean);if(t.length<=0)return!1;let n=t[t.length-1],s=i.pos+a.lastIndexOf(n);if(!n)return!1;let c=oh(n).map(t=>t.toObject(e.defaultProtocol));if(!fh(c))return!1;c.filter(e=>e.isLink).map(e=>({...e,from:s+e.start+1,to:s+e.end+1})).filter(e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{_u(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||o.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),o.steps.length)return o}})}function mh(e){return new Gn({key:new Jn(`handleClickLink`),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let t=r.target;if(!t)return!1;let n=e.editor.view.dom;i=t.closest(`a`),i&&!n.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=pu(t.state,e.type.name),r=i.href??n.href,o=i.target??n.target;r&&(window.open(r,o),a=!0)}return a}}})}var hh=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,gh=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function _h(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;--r)n+=1;return n%2==1}function vh(e,t){let n=0,r=0;for(;r<t;){if(e[r]!=="`"){r+=1;continue}if(n===0&&_h(e,r)){r+=1;continue}let i=0;for(;r<t&&e[r]==="`";)i+=1,r+=1;n===0?n=i:i===n&&(n=0)}return n>0}function yh(e,t,n){let[,r,i]=t;return(t.index?e[t.index-1]:void 0)===`!`||_h(e,t.index??0)||vh(e,t.index??0)?!1:!!r.trim()&&n(i)}function bh(e){let[t,n,r,,i,a,o]=e,s=i??a??o;return{index:e.index??0,text:t,replaceWith:n,data:{href:r,title:s||null,markdown:!0}}}function xh(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function Sh(e){return{href:e.data?.href,title:e.data?.title??null}}function Ch(e){let t=xf({find:t=>{let n=hh.exec(t);return!n||!yh(t,n,e.isAllowedHref)?null:bh(n)},type:e.type,getAttributes:Sh});return new Wd({find:t.find,handler:e=>{let n=t.handler(e);return n!==null&&e.state.tr.steps.length&&e.state.tr.setMeta(`preventAutolink`,!0),n}})}function wh(e){let t=Ef({find:t=>{let n=[];for(let r of t.matchAll(gh))yh(t,r,e.isAllowedHref)&&n.push(bh(r));let r=(e.findPlainUrls?.call(e,t)??[]).filter(e=>!n.some(t=>xh(t,e)));return[...n,...r]},type:e.type,getAttributes:Sh});return new Xd({find:t.find,handler:e=>{let n=t.handler(e);return n!==null&&e.state.tr.steps.length&&e.match.data?.markdown&&e.state.tr.setMeta(`preventAutolink`,!0),n}})}function Th(e){return new Gn({key:new Jn(`handlePasteLink`),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:a}=t,{selection:o}=a,{empty:s}=o;if(s)return!1;let c=``;r.content.forEach(e=>{c+=e.textContent});let l=sh(c,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===c);return!c||!l||i!==void 0&&!i(l.value)?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}function Eh(e,t){let n=[`http`,`https`,`ftp`,`ftps`,`mailto`,`tel`,`callto`,`sms`,`cid`,`xmpp`];return t&&t.forEach(e=>{let t=typeof e==`string`?e:e.scheme;t&&n.push(t)}),!e||e.replace(dh,``).match(RegExp(`^(?:(?:${n.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,`\\$&`)).join(`|`)}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,`i`))}var Dh=Yd.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(e=>{if(typeof e==`string`){ih(e);return}ih(e.scheme,e.optionalSlashes)})},onDestroy(){rh()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer nofollow`,class:null},isAllowedUri:(e,t)=>!!Eh(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes(`@`))return!0;let r=(e.includes(`@`)?e.split(`@`).pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute(`href`)}},target:{default:this.options.HTMLAttributes.target??null},rel:{default:this.options.HTMLAttributes.rel??null},class:{default:this.options.HTMLAttributes.class??null},title:{default:null}}},parseHTML(){return[{tag:`a[href]`,getAttrs:e=>{let t=e.getAttribute(`href`);return!t||!this.options.isAllowedUri(t,{defaultValidate:e=>!!Eh(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!Eh(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?[`a`,$l(this.options.HTMLAttributes,e),0]:[`a`,$l(this.options.HTMLAttributes,{...e,href:``}),0]},markdownTokenName:`link`,parseMarkdown:(e,t)=>t.applyMark(`link`,t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{let n=e.attrs?.href??``,r=e.attrs?.title??``,i=t.renderChildren(e);return r?`[${i}](${n} "${r}")`:`[${i}](${n})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:e=>!!Eh(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta(`preventAutolink`,!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:e=>!!Eh(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()}},addInputRules(){return this.options.markdownLinks?[Ch({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!Eh(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options;sh(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!Eh(e,n),protocols:n,defaultProtocol:r})).forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t};return this.options.markdownLinks?[wh({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!Eh(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[Ef({find:e,type:this.type,getAttributes:e=>({href:e.data?.href})})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(ph({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!Eh(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(mh({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick===`whenNotEditable`||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(Th({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),Oh=`listItem`,kh=`textStyle`,Ah=/^\s*([-+*])\s$/,jh=Tf.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:e}){return[`ul`,$l(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
121
+ `):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Oh,this.editor.getAttributes(kh)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=wf({find:Ah,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=wf({find:Ah,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(kh),editor:this.editor})),[e]}}),Mh=(e,t,n)=>{let{selection:r}=e;if(!r.empty)return null;let{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let a=-1;for(let e=i.depth;e>0;--e)if(i.node(e).type.name===t){a=e;break}if(a<0)return null;let o=i.node(a),s=i.index(a);if(s+1>=o.childCount)return null;let c=o.child(s+1);if(!n.includes(c.type.name))return null;let l=e.schema.nodes[t],u=!1;if(c.forEach(e=>{e.type===l&&e.childCount>1&&(u=!0)}),!u)return null;let d=e.doc.resolve(i.after()).nodeAfter;if(!d||!n.includes(d.type.name))return null;let f=[];return d.forEach(e=>{f.push(e)}),f.length===0?null:{listItemDepth:a,nestedList:d,nestedListPos:i.after(),insertPos:i.after(a),items:f}},Nh=(e,t,n,r)=>{let i=Mh(e,n,r);if(!i)return!1;let{selection:a}=e,{nestedList:o,nestedListPos:s,insertPos:c,items:l}=i,u=e.tr;u.delete(s,s+o.nodeSize);let d=u.mapping.map(c);return u.insert(d,b.from(l)),u.setSelection(a.map(u.doc,u.mapping)),t&&t(u),!0},Ph=(e,t,n)=>Nh(e.state,e.view.dispatch,t,n),Fh=(e,t)=>rf.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>Ph(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),Ih=[[1e3,`m`],[900,`cm`],[500,`d`],[400,`cd`],[100,`c`],[90,`xc`],[50,`l`],[40,`xl`],[10,`x`],[9,`ix`],[5,`v`],[4,`iv`],[1,`i`]],Lh=`abcdefghijklmnopqrstuvwxyz`,Rh=String.raw`\d+|[ivxlcdmIVXLCDM]+|${`[a-zA-Z]{1,2}`}`;function zh(e){let t=e,n=``;for(let[e,r]of Ih)for(;t>=e;)n+=r,t-=e;return n}function Bh(e){return zh(e).toUpperCase()}function Vh(e){let t=e.toLowerCase(),n=0,r=0;for(;n<t.length;){let e=!1;for(let[i,a]of Ih)if(t.startsWith(a,n)){r+=i,n+=a.length,e=!0;break}if(!e)return 0}return r}function Hh(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=Vh(e);return t<=0?!1:(e===e.toLowerCase()?zh(t):Bh(t))===e}function Uh(e){let t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){let e=t.charCodeAt(0)-97,n=t.charCodeAt(1)-97;return(e+1)*26+n+1}return 0}function Wh(e){if(e<=26)return Lh[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?Lh[n]:Lh[t]+Lh[n]}function Gh(e){if(e&&!/^\d+$/.test(e)){if(Hh(e))return e===e.toLowerCase()?`i`:`I`;if(/^[a-z]{1,2}$/.test(e))return`a`;if(/^[A-Z]{1,2}$/.test(e))return`A`}}function Kh(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=Gh(e);if(t===`i`||t===`I`)return Vh(e);if(t===`a`||t===`A`){let t=Uh(e);return t>0?t:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}function qh(e,t){if(e===`numeric`)return String(t);switch(e){case`a`:return Wh(t);case`A`:return Wh(t).toUpperCase();case`i`:return zh(t);case`I`:return Bh(t);default:return String(t)}}function Jh(e){if(e.length===0)return!1;let t=Gh(e[0])??`numeric`,n=Kh(e[0]);if(n<1)return!1;for(let r=0;r<e.length;r++){let i=qh(t,n+r);if(e[r]!==i)return!1}return!0}function Yh(e){return{type:Gh(e),start:Kh(e)}}function Xh(e){let{type:t,start:n}=Yh(e),r={};return t&&(r.type=t),n!==1&&(r.start=n),r}function Zh(e,t,n=`. `){let r=t+1;if(!e||e===`1`)return`${r}${n}`;switch(e){case`a`:return`${Wh(r)}${n}`;case`A`:return`${Wh(r).toUpperCase()}${n}`;case`i`:return`${zh(r)}${n}`;case`I`:return`${Bh(r)}${n}`;default:return`${r}${n}`}}function Qh(e){let t=e.tokens?.[0];return!!(e.text&&e.tokens?.length===1&&t?.type===`list`&&t.ordered&&t.raw===e.text)}function $h(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:`text`,raw:e,text:e}])}var eg=Tf.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,$l(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0){if(Qh(e))return{type:`listItem`,content:[{type:`paragraph`,content:$h(e.text||``,t)}]};if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>Vd(e,t,e=>{if(e.parentType===`bulletList`)return`- `;if(e.parentType===`orderedList`){var t,n;let r=((t=e.meta)==null||(t=t.parentAttrs)==null?void 0:t.start)||1;return Zh((n=e.meta)==null||(n=n.parentAttrs)==null?void 0:n.type,r-1+(e.index||0),`. `)}return`- `},n,{alignNestedToPrefix:n?.parentType===`orderedList`}),addExtensions(){return[Fh(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tg=(e,t)=>{let{$from:n}=t.selection,r=Mc(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},ng=(e,t)=>{let n=tg(e,t);if(!n)return!1;let[,r]=vu(t,e,n.$pos.pos+4);return r},rg=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},ig=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!wl(e.state,t)&&rg(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!wl(e.state,t)||!Eu(e.state))return!1;let{$from:r}=e.state.selection,i=r.depth-1;return r.node(i).type!==e.schema.nodes[t]||r.index(i)!==0?!1:e.chain().liftListItem(t).run()},ag=(e,t)=>{let n=ng(e,t),r=tg(e,t);return!r||!n?!1:n>r.depth},og=(e,t)=>{let n=ng(e,t),r=tg(e,t);return!r||!n?!1:n<r.depth},sg=(e,t)=>{if(!wl(e.state,t)||!Tu(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:ag(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():og(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},cg=(e,t,n)=>{let{state:r}=e,{selection:i}=r;if(!i.empty)return!1;let{$from:a}=i;if(a.parentOffset!==0||!a.parent.isTextblock||wl(r,t))return!1;let o=yu(a);if(!o||!n.includes(o.type.name))return!1;let s=o.lastChild;if(!s||s.type.name!==t)return!1;let c=a.parent;if(!s.canReplace(s.childCount,s.childCount,b.from(c)))return!1;let l=a.before(),u=a.after(),d=l-2;return e.commands.command(({tr:e,dispatch:t})=>(t&&(e.delete(l,u).insert(d,b.from(c)),e.setSelection(M.create(e.doc,d+1)),e.scrollIntoView()),!0))},lg=rf.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&sg(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&sg(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&ig(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&ig(e,n,r)&&(t=!0)}),t},Tab:({editor:e})=>{for(let{itemName:t,wrapperNames:n}of this.options.listTypes)if(e.state.schema.nodes[t]!==void 0&&cg(e,t,n))return!0;return!1}}}}),ug=RegExp(`^(\\s*)(${Rh})([.)])\\s+(.*)$`),dg=/^\s/,fg={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function pg(e){return ug.test(e.trimStart())}function mg(e){let t=e.trimStart();return fg.bulletItem.test(t)||pg(t)||fg.heading.test(t)||fg.thematicBreak.test(t)&&!t.startsWith(`-`)||/^>\s?/.test(t)||fg.codeFence.test(t)||fg.blockMath.test(t)}function hg(e){return Object.values(fg).some(t=>t.test(e))}function gg(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r){n.push(e);return}if(e.trim()===``){r=!0,n.push(e);return}if(t.length>0&&mg(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function _g(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(ug);if(!a)break;let[,o,s,c,l]=a,u=o.length,d=parseInt(s,10),f=isNaN(d)?Gh(s):void 0,p=isNaN(d)?Kh(s):d,m=[l],h=n+1,g=[i],_=!1;for(;h<e.length;){let t=e[h];if(t.match(ug))break;if(t.trim()===``)g.push(t),m.push(``),_=!0,h+=1;else if(t.match(dg)){let e=t.length-t.trimStart().length,n=u+s.length+1;g.push(t),m.push(t.slice(Math.min(e,n))),h+=1}else{if(_||hg(t))break;g.push(t),m.push(t),h+=1}}t.push({indent:u,number:p,type:f,content:m.join(`
122
122
  `).trim(),contentLines:m,raw:g.join(`
123
- `)}),r=h,n=h}return[t,r]}var _g=RegExp(`^(${Lh})([.)])\\s+(.+)$`);function vg(e){let t=e.split(`
124
- `).filter(e=>e.trim().length>0);if(t.length===0)return null;let n=[];for(let e of t){let t=e.trim().match(_g);if(!t)return null;n.push({marker:t[1],content:t[3]})}return qh(n.map(e=>e.marker))?{type:`orderedList`,attrs:Yh(n[0].marker),content:n.map(e=>({type:`listItem`,content:[{type:`paragraph`,content:[{type:`text`,text:e.content}]}]}))}:null}function yg(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let{paragraphLines:o,blockLines:s}=hg(a.contentLines),c=o.join(`
123
+ `)}),r=h,n=h}return[t,r]}var vg=RegExp(`^(${Rh})([.)])\\s+(.+)$`);function yg(e){let t=e.split(`
124
+ `).filter(e=>e.trim().length>0);if(t.length===0)return null;let n=[];for(let e of t){let t=e.trim().match(vg);if(!t)return null;n.push({marker:t[1],content:t[3]})}return Jh(n.map(e=>e.marker))?{type:`orderedList`,attrs:Xh(n[0].marker),content:n.map(e=>({type:`listItem`,content:[{type:`paragraph`,content:[{type:`text`,text:e.content}]}]}))}:null}function bg(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let{paragraphLines:o,blockLines:s}=gg(a.contentLines),c=o.join(`
125
125
  `).trim(),l=[];c&&l.push({type:`paragraph`,raw:c,tokens:n.inlineTokens(c)});let u=s.join(`
126
- `).trim();if(u){let e=n.blockTokens(u);l.push(...e)}let d=i+1,f=[];for(;d<e.length&&e[d].indent>t;)f.push(e[d]),d+=1;if(f.length>0){let e=yg(f,Math.min(...f.map(e=>e.indent)),n);l.push({type:`list`,ordered:!0,start:f[0].number,typeMarker:f[0].type,items:e,raw:f.map(e=>e.raw).join(`
127
- `)})}r.push({type:`list_item`,raw:a.raw,tokens:l}),i=d}else i+=1}return r}function bg(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var xg=`listItem`,Sg=`textStyle`,Cg=/^(\d+)\.\s$/;function wg(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case`upper-roman`:return`I`;case`lower-roman`:return`i`;case`upper-alpha`:case`upper-latin`:return`A`;case`lower-alpha`:case`lower-latin`:return`a`;default:return null}}var Tg=wf.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:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>{let t=e.getAttribute(`type`);if(t)return t;let n=e.getAttribute(`style`);if(n){let e=wg(n);if(e)return e}let r=e.querySelector(`li`);if(r){let e=r.getAttribute(`style`);if(e){let t=wg(e);if(t)return t}}return null}}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,type:n,...r}=e,i=Ql(this.options.HTMLAttributes,r);return t!==1&&(i.start=t),n&&n!==`1`&&(i.type=n),[`ol`,i,0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.typeMarker,i=e.items?bg(e.items,t):[],a={};return n!==1&&(a.start=n),r&&(a.type=r),Object.keys(a).length>0?{type:`orderedList`,attrs:a,content:i}:{type:`orderedList`,content:i}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
126
+ `).trim();if(u){let e=n.blockTokens(u);l.push(...e)}let d=i+1,f=[];for(;d<e.length&&e[d].indent>t;)f.push(e[d]),d+=1;if(f.length>0){let e=bg(f,Math.min(...f.map(e=>e.indent)),n);l.push({type:`list`,ordered:!0,start:f[0].number,typeMarker:f[0].type,items:e,raw:f.map(e=>e.raw).join(`
127
+ `)})}r.push({type:`list_item`,raw:a.raw,tokens:l}),i=d}else i+=1}return r}function xg(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var Sg=`listItem`,Cg=`textStyle`,wg=/^(\d+)\.\s$/;function Tg(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case`upper-roman`:return`I`;case`lower-roman`:return`i`;case`upper-alpha`:case`upper-latin`:return`A`;case`lower-alpha`:case`lower-latin`:return`a`;default:return null}}var Eg=Tf.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:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>{let t=e.getAttribute(`type`);if(t)return t;let n=e.getAttribute(`style`);if(n){let e=Tg(n);if(e)return e}let r=e.querySelector(`li`);if(r){let e=r.getAttribute(`style`);if(e){let t=Tg(e);if(t)return t}}return null}}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,type:n,...r}=e,i=$l(this.options.HTMLAttributes,r);return t!==1&&(i.start=t),n&&n!==`1`&&(i.type=n),[`ol`,i,0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.typeMarker,i=e.items?xg(e.items,t):[],a={};return n!==1&&(a.start=n),r&&(a.type=r),Object.keys(a).length>0?{type:`orderedList`,attrs:a,content:i}:{type:`orderedList`,content:i}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
128
128
  `):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:()=>-1,tokenize:(e,t,n)=>{let r=e.split(`
129
- `),[i,a]=gg(r);if(i.length===0)return;let o=yg(i,i[0].indent,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,typeMarker:i[0]?.type,items:o,raw:r.slice(0,a).join(`
130
- `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(xg,this.editor.getAttributes(Sg)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new Gn({props:{handlePaste:(e,t)=>{if((t.clipboardData?.getData(`text/html`))?.trim())return!1;let n=t.clipboardData?.getData(`text/plain`);if(!n)return!1;let r=vg(n);if(!r)return!1;try{let t=e.state.schema.nodeFromJSON(r),n=e.state.tr.replaceSelectionWith(t);return e.dispatch(n),!0}catch{return!1}}}})]},addInputRules(){let e=(e,t)=>(!t.attrs.type||t.attrs.type===`1`)&&t.childCount+t.attrs.start===+e[1],t=Cf({find:Cg,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Cf({find:Cg,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Sg)}),joinPredicate:e,editor:this.editor})),[t]}}),Eg=/^\s*(\[([( |x])?\])\s$/,Dg=`position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0`,Og=(e,t,n)=>{var r;return(n==null||(r=n.checkboxLabel)==null?void 0:r.call(n,e,t))||`Task item checkbox for ${e.textContent||`empty task item`}`},kg=wf.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:e=>e.querySelector(`div`)??e}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,Ql(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>Bd(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addExtensions(){return this.options.nested?[Ph(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`);o.style.cssText=Dg;let l=e=>{let t=Og(e,e.attrs.checked,this.options.a11y);s.setAttribute(`aria-label`,t),o.textContent=t};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=$l(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[Cf({find:Eg,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),Ag=wf.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:e}){return[`ul`,Ql(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
131
- `):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=Ld(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(t){let r={type:`taskList`,raw:t.raw,items:t.items},i=e.slice(t.raw.length);return i.trim()?[r,...n.blockTokens(i)]:[r]}return n.blockTokens(e)},i=Ld(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});nf.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(Ah.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push($h.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(cg.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(Tg.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(kg.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Ag.configure(this.options.taskList)),e}});var jg=`&nbsp;`,Mg=`\xA0`,Ng=wf.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,Ql(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===jg||n[0].text===jg||n[0].raw===Mg||n[0].text===Mg)&&r.length===1&&r[0].type===`text`&&(r[0].text===jg||r[0].text===Mg)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){var i,a;let e=Array.isArray(n==null||(i=n.previousNode)==null?void 0:i.content)?n.previousNode.content:[];return(n==null||(a=n.previousNode)==null?void 0:a.type)===`paragraph`&&e.length===0?jg:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Pg=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Fg=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Ig=Jd.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,Ql(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[bf({find:Pg,type:this.type})]},addPasteRules(){return[Tf({find:Fg,type:this.type})]}}),Lg=wf.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),Rg=Jd.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,Ql(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function zg(e={}){return new Gn({view(t){return new Bg(t,e)}})}var Bg=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc){if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(!t||i)return null;let a=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=rn(this.editorView.state.doc,a,this.editorView.dragging.slice);e!=null&&(a=e)}return a}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);t!=null&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},Vg=class e extends j{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):j.near(r)}content(){return E.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new Hg(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Wg(e)||!Gg(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!N.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};Vg.prototype.visible=!1,Vg.findFrom=Vg.findGapCursorFrom,j.jsonID(`gapcursor`,Vg);var Hg=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Vg.valid(t)?new Vg(t):j.near(t)}};function Ug(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Wg(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||Ug(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Gg(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||Ug(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Kg(){return new Gn({props:{decorations:Zg,createSelectionBetween(e,t,n){return t.pos==n.pos&&Vg.valid(n)?new Vg(n):null},handleClick:Yg,handleKeyDown:qg,handleDOMEvents:{beforeinput:Xg}}})}var qg=Sc({ArrowLeft:Jg(`horiz`,-1),ArrowRight:Jg(`horiz`,1),ArrowUp:Jg(`vert`,-1),ArrowDown:Jg(`vert`,1)});function Jg(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof M){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=Vg.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new Vg(c))),!0):!1}}function Yg(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Vg.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&N.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Vg(r))),!0)}function Xg(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof Vg))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=b.empty;for(let e=r.length-1;e>=0;e--)i=b.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new E(i,0,0));return a.setSelection(M.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function Zg(e){if(!(e.selection instanceof Vg))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,xs.create(e.doc,[vs.widget(e.selection.head,t,{key:`gapcursor`})])}var Qg=200,$g=function(){};$g.prototype.append=function(e){return e.length?(e=$g.from(e),!this.length&&e||e.length<Qg&&this.leafAppend(e)||this.length<Qg&&e.leafPrepend(this)||this.appendInner(e)):this},$g.prototype.prepend=function(e){return e.length?$g.from(e).append(this):this},$g.prototype.appendInner=function(e){return new t_(this,e)},$g.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?$g.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},$g.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},$g.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},$g.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},$g.from=function(e){return e instanceof $g?e:e&&e.length?new e_(e):$g.empty};var e_=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=Qg)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=Qg)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}($g);$g.empty=new e_([]);var t_=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}($g),n_=500,r_=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new a_(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new a_(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new a_(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>s_&&(s=i_(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new xt;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new a_(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new a_(i,o,l))}else r.push(new a_(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new a_(a.maps[e]));let u=this.items.slice(0,i).append(l).append(r),d=new e(u,s);return d.emptyItemCount()>n_&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new a_(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e($g.from(i.reverse()),a)}};r_.empty=new r_($g.empty,0);function i_(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var a_=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},o_=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},s_=20;function c_(e,t,n,r){let i=n.getMeta(g_),a;if(i)return i.historyState;n.getMeta(__)&&(e=new o_(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(g_))return o.getMeta(g_).redo?new o_(e.done.addTransform(n,void 0,r,h_(t)),e.undone,u_(n.mapping.maps),e.prevTime,e.prevComposition):new o_(e.done,e.undone.addTransform(n,void 0,r,h_(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!l_(n,e.prevRanges)),s=o?d_(e.prevRanges,n.mapping):u_(n.mapping.maps);return new o_(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,h_(t)),r_.empty,s,n.time,i??e.prevComposition)}return(a=n.getMeta(`rebased`))?new o_(e.done.rebased(n,a),e.undone.rebased(n,a),d_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new o_(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),d_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function l_(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function u_(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function d_(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function f_(e,t,n){let r=h_(t),i=g_.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new o_(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(g_,{redo:n,historyState:c})}var p_=!1,m_=null;function h_(e){let t=e.plugins;if(m_!=t){p_=!1,m_=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){p_=!0;break}}return p_}var g_=new Jn(`history`),__=new Jn(`closeHistory`);function v_(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Gn({key:g_,state:{init(){return new o_(r_.empty,r_.empty,null,0,-1)},apply(t,n,r){return c_(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?b_:n==`historyRedo`?x_:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function y_(e,t){return(n,r)=>{let i=g_.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=f_(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var b_=y_(!1,!0),x_=y_(!0,!0);nf.create({name:`characterCount`,addOptions(){return{limit:null,autoTrim:!0,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Gn({key:new Jn(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit,a=this.options.autoTrim;if(i==null||i===0||a===!1){e=!0;return}let o=this.storage.characters({node:r.doc});if(o>i){let t=o-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var S_=nf.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[zg(this.options)]}});nf.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new Gn({key:new Jn(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return xs.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(vs.node(t,t+e.nodeSize,{class:this.options.className}))}),xs.create(e,a)}}})]}});var C_=nf.create({name:`gapCursor`,addProseMirrorPlugins(){return[Kg()]},extendNodeSchema(e){return{allowGapCursor:z(I(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),w_=`placeholder`,T_=new Jn(`tiptap__placeholder`);function E_(e){let{editor:t,placeholder:n,dataAttribute:r,pos:i,node:a,isEmptyDoc:o,hasAnchor:s,classes:{emptyNode:c,emptyEditor:l}}=e,u=[c];return o&&u.push(l),vs.node(i,i+a.nodeSize,{class:u.join(` `),[r]:typeof n==`function`?n({editor:t,node:a,pos:i,hasAnchor:s}):n})}function D_(e,t){return typeof e==`function`?e(t):e}function O_({editor:e,options:t,dataAttribute:n,doc:r,selection:i,from:a,to:o}){let{anchor:s}=i,c=[],l=e.isEmpty;return r.nodesBetween(a,o,(r,i)=>{let a=s>=i&&s<=i+r.nodeSize,o=!r.isLeaf&&Ou(r);return r.type.isTextblock&&(a||!t.showOnlyCurrent)&&o&&c.push(E_({editor:e,isEmptyDoc:l,dataAttribute:n,hasAnchor:a,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:D_(t.emptyNodeClass,{editor:e,node:r,pos:i,hasAnchor:a})},node:r,pos:i})),t.includeChildren}),c}function k_({editor:e,options:t,dataAttribute:n,doc:r,selection:i}){if(!e.isEditable&&t.showOnlyWhenEditable)return null;let{anchor:a}=i,o=[],s=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let i=r.resolve(a),c=i.depth>0?i.node(1):i.nodeAfter,l=i.depth>0?i.before(1):a;if(c&&c.type.isTextblock&&Ou(c)){let r=a>=l&&a<=l+c.nodeSize;o.push(E_({editor:e,isEmptyDoc:s,dataAttribute:n,hasAnchor:r,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:D_(t.emptyNodeClass,{editor:e,node:c,pos:l,hasAnchor:r})},node:c,pos:l}))}}else o.push(...O_({editor:e,options:t,dataAttribute:n,doc:r,selection:i,from:0,to:r.content.size}));return xs.create(r,o)}function A_(e,t){let n=e.resolve(t);if(n.depth===0){let e=n.nodeAfter??n.nodeBefore;if(!e)return{from:t,to:t};let r=n.nodeAfter?t:t-e.nodeSize;return{from:r,to:r+e.nodeSize}}let r=n.before(1);return{from:r,to:r+n.node(1).nodeSize}}function j_(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function M_(e,t,n){let r=[];return e.forEach((e,i)=>{let a=i,o=a+e.nodeSize,s=a+1,c=o+1;s<n&&c>t&&r.push({from:a,to:o})}),r}function N_(e){if(e.length===0)return[];let t=[...e].sort((e,t)=>e.from-t.from),n=[{...t[0]}];for(let e=1;e<t.length;e+=1){let r=n[n.length-1],i=t[e];i.from<=r.to?r.to=Math.max(r.to,i.to):n.push({...i})}return n}function P_(e,t){let n=M_(e,t.from,t.to);return n.push(j_(e,A_(e,t.from))),t.to>t.from?n.push(j_(e,A_(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&n.push(j_(e,A_(e,Math.min(t.from+1,e.content.size)))),n}function F_(e,t,n){let r=[];if(e.docChanged){let t=hu(e);for(let e of t)r.push(...P_(n.doc,e.newRange))}return e.selectionSet&&(r.push(j_(n.doc,A_(n.doc,e.mapping.map(t.selection.anchor)))),r.push(j_(n.doc,A_(n.doc,n.selection.anchor)))),N_(r)}function I_(e,t,n){let r=Math.max(0,Math.min(e,n.content.size));return{from:r,to:Math.max(r,Math.min(t,n.content.size))}}function L_({decorations:e,ranges:t,editor:n,options:r,dataAttribute:i,doc:a,selection:o}){let s=e;for(let e of t){let{from:t,to:c}=I_(e.from,e.to,a),l=s.find(t,c).filter(e=>e.from>=t&&e.to<=c);l.length&&(s=s.remove(l));let u=O_({editor:n,options:r,dataAttribute:i,doc:a,selection:o,from:t,to:c});u.length&&(s=s.add(a,u))}return s}function R_({editor:e,options:t,dataAttribute:n}){return{init(r,i){return k_({editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection})??xs.empty},apply(r,i,a,o){return!r.docChanged&&!r.selectionSet?i:L_({decorations:i.map(r.mapping,r.doc),ranges:F_(r,a,o),editor:e,options:t,dataAttribute:n,doc:o.doc,selection:o.selection})}}}function z_(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}function B_({editor:e,options:t}){let n=t.dataAttribute?`data-${z_(t.dataAttribute)}`:`data-${w_}`,r=t.showOnlyCurrent&&!t.includeChildren;return new Gn({key:T_,...r?{}:{state:R_({editor:e,options:t,dataAttribute:n})},props:{decorations:r?({doc:r,selection:i})=>k_({editor:e,options:t,dataAttribute:n,doc:r,selection:i}):n=>t.showOnlyWhenEditable&&!e.isEditable?xs.empty:T_.getState(n)??xs.empty}})}nf.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:w_,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[B_({editor:this.editor,options:this.options})]}});function V_(e,t){return!e.selection.empty&&!ku(e.selection)&&t.isEditable}function H_(e,t){return V_(e,t)&&!t.isFocused&&!t.view.dragging}function U_(){var e;(e=window.getSelection())==null||e.removeAllRanges()}function W_(e){e.focus()}nf.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Gn({key:new Jn(`selection`),props:{decorations(n){return H_(n,e)?xs.create(n.doc,[vs.inline(n.selection.from,n.selection.to,{class:t.className})]):null},handleDOMEvents:{blur(t){return V_(t.state,e)&&U_(),!1},focus(t){return V_(t.state,e)&&requestAnimationFrame(()=>{!e.isDestroyed&&t.hasFocus()&&W_(t)}),!1}}}})]}});function G_({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var K_=nf.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new Jn(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new Gn({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!G_({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!G_({node:r,types:n})}}})]}}),q_=nf.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>b_(e,t),redo:()=>({state:e,dispatch:t})=>x_(e,t)}},addProseMirrorPlugins(){return[v_(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()}}}),J_=nf.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(Bf.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(Ff.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(Ah.configure(this.options.bulletList)),this.options.code!==!1&&e.push(Uf.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(qf.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(Jf.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(S_.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(C_.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(Yf.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(Xf.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(q_.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(Zf.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(np.configure(this.options.italic)),this.options.listItem!==!1&&e.push($h.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(cg.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(Eh.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(Tg.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(Ng.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(Ig.configure(this.options.strike)),this.options.text!==!1&&e.push(Lg.configure(this.options.text)),this.options.underline!==!1&&e.push(Rg.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(K_.configure(this.options?.trailingNode)),e}}),Y_={DISABLED_SITES:[`cloud.microsoft`,`deepl.com`,`productboard.com`,`openai.com`,`chatgpt.com`],CHROME_AND_FIREFOX_SITES:[`chrome:`,`chrome-extension:`,`about:`,`moz-extension:`],EXPOSE_WITTY_ID_ALLOW_LIST:{dev:[`lndo.site`,`platformsh.site`,`witty.works`],prod:[`witty.works`]},BASE_URLS:{Prod:{api:`https://default.api.witty.works/`,dashboard:`https://dashboard.witty.works/`,posthog_url:`https://eu.posthog.com`,posthog_key:`phc_i1tlvuh1iecIOSEr0QmTEIklrsSJGhULpUwUlf8fkkl`,oauth_client_id:``},Dev:{api:`https://dev-54ta5gq-jyeciedibdzvq.fr-4.platformsh.site/`,dashboard:`https://dev-54ta5gq-56xlfiudba6c2.fr-4.platformsh.site/`,posthog_url:`https://app.posthog.com`,posthog_key:`phc_QiISRw0yFAsndXqYD0HmfGvHaOBMxb57ZRIxlimvR64`,oauth_client_id:``},Local:{api:`http://127.0.0.1:8000/`,dashboard:`https://dashboard.lndo.site/`,posthog_url:`https://app.posthog.com`,posthog_key:`phc_QiISRw0yFAsndXqYD0HmfGvHaOBMxb57ZRIxlimvR64`,oauth_client_id:`1`}},ORTHOGRAPHY:!0,SENTRY_DSN:``,SENTRY_SAMPLE_RATE:0,SENTRY_TRACE_RATE:0,API_DELAY:2e3,REPHRASE_ENABLED:!1,MAX_CHAR_LENGTH_REQUEST:1e3,MAX_CHAR_LENGTH_TOTAL:2e3,MIN_CHAR_LENGTH:50,MAX_POSTHOG_LOG_EVENTS:5e3,POSTHOG_ENABLED:!1},X_=`2.5.0`;Y_.MAX_CHAR_LENGTH_REQUEST;var Z_={...Y_.BASE_URLS},Q_=Object.keys(Z_);Q_.includes(`Prod`)||Q_[0];var $_=`https://www.witty.works/en/help/`;`${$_}`,`${$_}`,`${$_}`,`${$_}`,`${$_}`;var ev=[`gendered_roles_format`,`german_gender_ending`,`french_gender_separator`],tv=function(e){return e[e.Off=0]=`Off`,e[e.Basic=1]=`Basic`,e[e.Advanced=2]=`Advanced`,e}({}),nv=(e,t,n)=>n.includes(e)?0:t&&n.includes(t)?1:t?2:1,rv=(e,t,n,r)=>{let i=r.filter(n=>n!==e&&n!==t);return n===0?(i.push(e),t&&i.push(t)):n===1&&t&&i.push(t),i},iv={inclusive:{hover:`#BCD485`,default:`#D3E4AC`,highlight:`#BCD485`},corporate:{hover:`#6f9FED`,default:`#A1BEED`,highlight:`#6f9FED`},style:{hover:`#F6EC6B`,default:`#FFFFD3`,highlight:`#F6EC6B`},bias:{hover:`#EB9F46`,default:`#F8E7CB`,highlight:`#EB9F46`},severe:{hover:`#E6635A`,default:`#F7D4D4`,highlight:`#E6635A`}},av=(e,t)=>t===`corporate_rules`?`corporate`:e?e<1.5?`severe`:e>2.5?`style`:`bias`:`inclusive`,ov=(e,t)=>iv[av(e,t)];Y_.EXPOSE_WITTY_ID_ALLOW_LIST?.prod;var U=e=>typeof e==`string`,sv=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},cv=e=>e==null?``:String(e),lv=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},uv=/###/g,dv=e=>e&&e.includes(`###`)?e.replace(uv,`.`):e,fv=e=>!e||U(e),pv=(e,t,n)=>{let r=U(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(fv(e))return{};let t=dv(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return fv(e)?{}:{obj:e,k:dv(r[i])}},mv=(e,t,n)=>{let{obj:r,k:i}=pv(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=pv(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=pv(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},hv=(e,t,n,r)=>{let{obj:i,k:a}=pv(e,t,Object);i[a]=i[a]||[],i[a].push(n)},gv=(e,t)=>{let{obj:n,k:r}=pv(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},_v=(e,t,n)=>{let r=gv(e,n);return r===void 0?gv(t,n):r},vv=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?U(e[r])||e[r]instanceof String||U(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):vv(e[r],t[r],n):e[r]=t[r]);return e},yv=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),bv={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},xv=e=>U(e)?e.replace(/[&<>"'\/]/g,e=>bv[e]):e,Sv=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Cv=[` `,`,`,`?`,`!`,`;`],wv=new Sv(20),Tv=(e,t,n)=>{t||=``,n||=``;let r=Cv.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=wv.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Ev=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Dv=e=>e?.replace(/_/g,`-`),Ov={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},kv=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Ov,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>U(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),U(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Av=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},jv=class extends Av{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):U(n)&&i?o.push(...n.split(i)):o.push(n)));let s=gv(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!U(n)?s:Ev(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),mv(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(U(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=gv(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?vv(s,n,i):s={...s,...n},mv(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Mv={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Nv=Symbol(`i18next/PATH_KEY`);function Pv(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Nv?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Fv(e,t){let{[Nv]:n}=e(Pv()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Iv=e=>!U(e)&&typeof e!=`boolean`&&typeof e!=`number`,Lv=class e extends Av{constructor(e,t={}){super(),lv([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=kv.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Iv(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Tv(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:U(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:U(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Fv(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Fv(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!U(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Iv(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(U(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:Iv(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&U(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=U(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!U(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=U(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Mv.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return U(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Fv(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!U(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(U(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!U(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Rv=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=kv.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Dv(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Dv(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(U(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),U(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return U(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):U(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},zv={zero:0,one:1,two:2,few:3,many:4,other:5},Bv={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Vv=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=kv.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Dv(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Bv;if(!e.match(/-|_/))return Bv;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>zv[e]-zv[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Hv=(e,t,n,r=`.`,i=!0)=>{let a=_v(e,t,n);return!a&&i&&U(n)&&(a=Ev(e,n,r),a===void 0&&(a=Ev(t,n,r))),a},Uv=e=>e.replace(/\$/g,`$$$$`),Wv=class{constructor(e={}){this.logger=kv.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?xv:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?yv(i):a||`{{`,this.suffix=o?yv(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?yv(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?yv(l):``,this.nestingPrefix=d?yv(d):f||yv(`$t(`),this.nestingSuffix=p?yv(p):m||yv(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Hv(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Hv(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0){if(typeof l==`function`){let t=l(e,i,r);a=U(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!U(a)&&!this.useRawValueToEscape&&(a=cv(a));let s=t.safeValue(a);if(e=e.replace(i[0],Uv(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${yv(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!U(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!U(i))return i;U(i)||(i=cv(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Gv=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Kv=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Dv(r),i),t[o]=s),s(n)}},qv=e=>(t,n,r)=>e(Dv(n),r)(t),Jv=class{constructor(e={}){this.logger=kv.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Kv:qv;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Kv(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Gv(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Yv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Xv=class extends Av{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=kv.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{hv(n.loaded,[i],a),Yv(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();U(e)&&(e=this.languageUtils.toResolveHierarchy(e)),U(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},Zv=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),U(e[1])&&(t.defaultValue=e[1]),U(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Qv=e=>(U(e.ns)&&(e.ns=[e.ns]),U(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),U(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),$v=()=>{},ey=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},ty=class e extends Av{constructor(e={},t){if(super(),this.options=Qv(e),this.services={},this.logger=kv,this.modules={external:[]},ey(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(U(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Zv();this.options={...n,...this.options,...Qv(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?kv.init(r(this.modules.logger),this.options):kv.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Jv;let t=new Rv(this.options);this.store=new jv(this.options.resources,this.options);let n=this.services;n.logger=kv,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Vv(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Wv(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Xv(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Lv(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=$v,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=sv(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=$v){let n=t,r=U(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=sv();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=$v,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Mv.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=sv();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=U(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(U(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Fv(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Fv(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Fv(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return U(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=sv();return this.options.ns?(U(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=sv();U(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Rv(Zv());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=$v){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new jv(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Zv().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Wv(n)}return a.translator=new Lv(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();ty.createInstance,ty.dir,ty.init,ty.loadResources,ty.reloadResources,ty.use,ty.changeLanguage,ty.getFixedT,ty.t,ty.exists,ty.setDefaultNamespace,ty.hasLoadedNamespace,ty.loadNamespaces,ty.loadLanguages;var ny=c((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,k(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=k(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=k(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return k(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function A(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ae=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},oe={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=oe,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,ae)}catch(e){ae(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),ry=c(((e,t)=>{t.exports=ny()})),iy=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);dy(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},ay={},oy=(e,t,n,r)=>{dy(n)&&ay[n]||(dy(n)&&(ay[n]=new Date),iy(e,t,n,r))},sy=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},cy=(e,t,n)=>{e.loadNamespaces(t,sy(e,n))},ly=(e,t,n,r)=>{if(dy(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return cy(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,sy(e,r))},uy=(e,t,n={})=>!t.languages||!t.languages.length?(oy(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),dy=e=>typeof e==`string`,fy=e=>typeof e==`object`&&!!e,py=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,my={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},hy=e=>my[e],gy={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(py,hy),transDefaultProps:void 0},_y=(e={})=>{gy={...gy,...e}},vy=()=>gy,yy,by=e=>{yy=e},xy=()=>yy,Sy={type:`3rdParty`,init(e){_y(e.options.react),by(e)}},W=d(ry()),Cy=(0,W.createContext)(),wy=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Ty=c((e=>{var t=ry();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ey=c(((e,t)=>{t.exports=Ty()}))(),Dy={t:(e,t)=>{if(dy(t))return t;if(fy(t)&&dy(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Oy=()=>()=>{},ky=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,W.useContext)(Cy)||{},a=n||r||xy();a&&!a.reportNamespaces&&(a.reportNamespaces=new wy),a||oy(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,W.useMemo)(()=>({...vy(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=dy(l)?[l]:l||[`translation`],d=(0,W.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,W.useRef)(0),p=(0,W.useCallback)(e=>{if(!a)return Oy;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,W.useRef)(),h=(0,W.useCallback)(()=>{if(!a)return Dy;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>uy(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,W.useState)(0),{t:v,ready:y}=(0,Ey.useSyncExternalStore)(p,h,h);(0,W.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?ly(a,t.lng,d,e):cy(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,W.useRef)(null),S=(0,W.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,W.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(oy(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y){let e=!1;try{e=!1}catch{}throw e&&oy(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?ly(a,t.lng,d,n):cy(a,d,n)})}return w},{slice:Ay,forEach:jy}=[];function My(e){return jy.call(Ay.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Ny(e){return typeof e==`string`&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e))}var Py=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Fy=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Py.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!Py.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},Iy={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Fy(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},Ly={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return Iy.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&Iy.create(n,e,r,i,a)}},Ry={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},zy={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},By=null,Vy=()=>{if(By!==null)return By;try{if(By=typeof window<`u`&&window.localStorage!==null,!By)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{By=!1}return By},Hy={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&Vy())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Vy()&&window.localStorage.setItem(n,e)}},Uy=null,Wy=()=>{if(Uy!==null)return Uy;try{if(Uy=typeof window<`u`&&window.sessionStorage!==null,!Uy)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{Uy=!1}return Uy},Gy={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&Wy())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Wy()&&window.sessionStorage.setItem(n,e)}},Ky={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},qy={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},Jy={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},Yy={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Xy=!1;try{document.cookie,Xy=!0}catch{}var Zy=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];Xy||Zy.splice(1,1);var Qy=()=>({order:Zy,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),$y=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=My(t,this.options||{},Qy()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Ly),this.addDetector(Ry),this.addDetector(Hy),this.addDetector(Gy),this.addDetector(Ky),this.addDetector(qy),this.addDetector(Jy),this.addDetector(Yy),this.addDetector(zy)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!Ny(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};$y.type=`languageDetector`;var eb={pages:{popup:`pages.popup`},common:`common`,popover:`popover`,errors:`errors`,iconController:`iconController`,notifications:`notifications`,options:`options`,editor:`editor`},tb={de:`de`,en:`en`,fr:`fr`},nb={[eb.editor]:{toolbar:`Formatierung`,bold:`Fett`,italic:`Kursiv`,underline:`Unterstrichen`,heading:`Überschrift`,bulletList:`Aufzählung`,orderedList:`Nummerierte Liste`,quote:`Zitat`,undo:`Rückgängig`,redo:`Wiederholen`,settings:`Witty-Einstellungen`,closeSettings:`Einstellungen schliessen`,settingsLoading:`Einstellungen werden geladen …`,statusChecking:`Witty prüft den Text …`,statusAlerts_one:`{{count}} Hinweis`,statusAlerts_other:`{{count}} Hinweise`,statusNoAlerts:`Keine Hinweise`,statusUnauthorized:`API-Schlüssel fehlt oder wurde nicht akzeptiert`,statusFailed:`Prüfung fehlgeschlagen`,statusOutdated:`Diese Version des Witty-Editors wird nicht mehr unterstützt. Die Website muss sie aktualisieren.`,statusLanguage:`Witty kann die Sprache dieses Textes nicht erkennen.`,shortcutHint:`Mit Alt+Umschalt+W öffnest du den Hinweis an der Cursorposition.`,limitReached:`Nur ein Teil dieses Textes wurde geprüft.`,menu:`Witty-Menü`,menuSettings:`Einstellungen …`,menuSwitchGender:`Gender-Form wechseln …`,menuHelp:`Hilfe`,menuAbout:`Über Witty`,switchTitle:`Gender-Form wechseln`,switchIntro:`Schreibt alle gegenderten Formen im Text in die gewählte Form um. Mit Rückgängig machst du das in einem Schritt rückgängig.`,switchCurrent:`aktuell`,switching:`Der Text wird geprüft und umgeschrieben …`,switched_one:`{{count}} Form auf {{format}} umgestellt.`,switched_other:`{{count}} Formen auf {{format}} umgestellt.`,switchNothing:`Nichts umzustellen: Der Text verwendet bereits {{format}}.`,switchDisabled:`Das Wechseln der Gender-Form ist für dieses Konto ausgeschaltet.`,switchUnsupported:`Der Server unterstützt das Wechseln der Gender-Form noch nicht.`,switchFromInklusivum:`Nichts umgestellt: Aus dem Inklusivum kann noch nicht in eine andere Form gewechselt werden.`,switchUnsupportedTarget:`Der Server kann noch nicht auf {{format}} umstellen.`,switchUnsupportedNote:`Vom Server noch nicht unterstützt.`,switchUnavailable:`{{format}} ist keine Gender-Form, auf die umgestellt werden kann.`,switchInklusivumNote:`Zusammensetzungen und unbekannte Wörter bleiben, wie sie sind; zurück geht es noch nicht.`,switchGerman:`Deutsch`,switchFrench:`Französisch`,switchForced:`Deine Organisation legt die Gender-Form auf {{format}} fest. Der Text wurde nicht geändert.`},[eb.options]:{languageHeadline:`Sprache und Gender-Formen`,genderedRolesFormat:`Generisches Maskulinum`,genderedRolesFormatHint:`Wie soll Witty mit dem generischen Maskulinum in gegenderten Sprachen umgehen?`,germanGenderEnding:`Deutsche Gender-Endung`,germanGenderEndingHint:`Witty empfiehlt den Gendestern.`,frenchGenderSeparator:`Französisches Gender-Trennzeichen`,frenchGenderSeparatorHint:`Witty empfiehlt den Point médian.`,useApiDefault:`Standard des Servers`,levelOff:`Aus`,levelBasic:`Basis`,levelAdvanced:`Erweitert`,levelLocked:`Immer aktiv`,categoriesFailed:`Kategorien konnten nicht geladen werden.`,helpOwnServer:`Eigenen Server einrichten`,helpWithoutDashboard:`Witty ohne Dashboard betreiben`,helpCentre:`Hilfe-Center`,settingsHeadline:`Witty Einstellungen`,connectionHeadline:`Verbindung`,modeAccount:`Konto (Anmeldung über Dashboard)`,modeApiKey:`API-Schlüssel (ohne Dashboard)`,apiKey:`API-Schlüssel`,apiKeyHint:`Wird als x-key an die NLP-API gesendet. Ein Dashboard wird nicht benötigt.`,apiKeyRequired:`API-Schlüssel ist erforderlich.`,customisationHeadline:`Anpassungen`,orthography:`Rechtschreibprüfung`,llmAlternatives:`KI-Vorschläge`,categoriesHeadline:`Kategorien`,categoriesIntro:`Abgewählte Kategorien werden nicht mehr hervorgehoben.`,orgOverrideNote:`Im Konto-Modus können diese Werte von den Vorgaben deiner Organisation überschrieben werden.`,endpointHeadline:`Eigener Server`,endpointIntro:`Zeigt Witty auf deine eigene Installation. Nur ändern, wenn du weisst, was du tust.`,endpointWarning:`Achtung: Der eingetragene Server erhält jeden Text, den du in Eingabefeldern schreibst. Trage nur eine Installation ein, der du vertraust.`,dashboardUrl:`Dashboard-URL`,apiUrl:`NLP-API-URL`,oauthClientId:`OAuth Client ID`,redirectUriHint:`Registriere diese Redirect-URI im OAuth-Client deines Dashboards:`,save:`Speichern und abmelden`,reset:`Auf Standard zurücksetzen`,saved:`Gespeichert. Du wurdest abgemeldet — bitte erneut anmelden.`,resetDone:`Auf Standard zurückgesetzt. Du wurdest abgemeldet.`,invalidUrl:`Bitte eine https-URL angeben (http nur für localhost).`,clientIdRequired:`OAuth Client ID ist erforderlich.`,signOutNotice:`Beim Wechsel des Servers wirst du abgemeldet: Tokens gelten immer nur für einen Server.`,currentEndpoint:`Aktuell verwendet`},[eb.common]:{buttons:{ok:`Akzeptieren`,cancel:`Abbrechen`},languages:{en_US:`Englisch (🇺🇸 USA)`,en_GB:`Englisch (🇬🇧 Vereinigtes Königreich)`,de_DE:`Deutsch (🇩🇪 Deutschland)`,de_AT:`Deutsch (🇦🇹 Österreich)`,de_CH:`Deutsch (🇨🇭 Schweiz)`,fr_FR:`Französisch (🇫🇷 Frankreich)`,fr_CH:`Französisch (🇨🇭 Schweiz)`}},[eb.pages.popup]:{helpCentre:`Hilfe-Center`,helpSignInFailed:`Hilfe zur Fehlersuche`,extensionSettings:`Erweiterungseinstellungen`,extensionSettingsHint:`Eigener Server, API-Schlüssel und Kategorien`,enableWitty:`Witty aktivieren`,websiteSettings:`Einstellungen für {{domain}}`,developmentSettings:`Entwicklungs-Einstellungen`,spellChecking:`Grammatik & Rechtschreibung`,thanks:`Danke für deinen Beitrag!`,noSupport:`Es tut uns leid! Witty unterstützt diese Webseite noch nicht offiziell.`,vote:`Stimme für diese Webseite ab`,editor:`Nutze stattdessen den Witty Editor`,goToDashboard:`Zum Witty Editor`,overrideRecomendedSites:`Witty hier dennoch aktivieren`,backToRecomendedSites:`Witty nur auf unterstützten Webseiten aktiv`,signedOutText:`Dir entgeht was`,loginToUnlock:`Jetzt anmelden!`,biasDetection:`Erkennung von über 30 Diversitätskategorieren`,inclusiveAlternatives:`Inklusive Alternativvorschläge`,teamFeatures:`Teamfunktionen, inkl. eines geteilten Wörterbuches`,signIn:`Anmelden`,signOut:`Abmelden`,haveAccount:`Hast du schon ein Konto?`,dontHaveAccount:`Hast du noch kein Konto?`,signUp:`Registrieren`,doesWittyWork:`Funktioniert Witty hier?`,doesWittyWorkExplanation:`Lass es uns wissen.`,tryAgain:`Erneut versuchen`,understood:`Verstanden`,websiteSettingsDeactivated:`Du hast uns mitgeteilt, dass Witty auf {{Domain}} nicht funktioniert.`,tryAgainOnThisWebsite:`Erneut auf dieser Website versuchen`,enableWittyFailed:`Currently unable to sync with the Witty Dashboard, try again later.`,lockedInfo:`Diese Funktion wurde von deiner*m Team-Admin gesetzt.`,loggedInTo:`Logged in to`,popupsBlocked:`Popups sind blockiert`,popupsBlockedText:`Um dich anzumelden, kopiere bitte den Link in die Adressleiste deines Browsers.`,copyLink:`Link kopieren`,copiedConfirmation:`URL Kopiert`,signInFailed:`Anmeldung fehlgeschlagen`,signInFailedText:`Die Anmeldung konnte nicht abgeschlossen werden. Bitte versuche es erneut.`,hrFeatures:`Job Ads Add-On`,beta:`Beta`,apiKeyConfiguredNotice:`API Key konfiguriert — keine Anmeldung erforderlich.`,apiKeyAuthFailed:`API Key Authentifizierung fehlgeschlagen ({{status}}): {{message}} — überprüfe den API Key oder Endpunkt.`},[eb.popover]:{insteadTry:`Wie wär's mit ...`,learnMore:`Warum`,leanrMoreExtendedText:`Warum das so ist`,ignoreTerm:`Weniger unterstreichen?`,visitSource:`Quelle`,alertOftotal:`von`,removeSpaces:`Extra Leerzeichen entfernen`,loginToUnlock:`Jetzt anmelden!`,signedOutText:`Dir entgeht was`,biasDetection:`Erkennung von über 30 Diversitätskategorieren`,inclusiveAlternatives:`Inklusive Alternativvorschläge`,teamFeatures:`Teamfunktionen, inkl. eines geteilten Wörterbuches`,signIn:`Anmelden`,haveAccount:`Hast du schon ein Konto?`,dontHaveAccount:`Hast du noch kein Konto?`,signUp:`Registrieren`,popupsBlocked:`Popups sind blockiert`,popupsBlockedText:`Um dich anzumelden, kopiere bitte den Link in die Adressleiste deines Browsers.`,copyLink:`Link kopieren`,copiedConfirmation:`URL Kopiert`,signInFailed:`Anmeldung fehlgeschlagen`,signInFailedText:`Die Anmeldung konnte nicht abgeschlossen werden. Bitte versuche es erneut.`,missingOut:`Du verpasst etwas`,bulletPointOne:`Warum ein Begriff unterstrichen wird`,bulletPointTwo:`Inklusive Alternativen`,inclusiveBulletPointOne:`Warum dieser Begriff inklusiv ist`,inclusiveBulletPointTwo:`Weitere inklusive Begriffe`,wittyLogo:`Witty`,new:`neu`,video:`Ein Erklärungsvideo ist verfügbar`,openNewWindow:`Öffnet in einem neuen Fenster`,next:`Nächstes Ergebnis`,previous:`Vorheriges Ergebnis`,close:`Witty schliessen`,suggestionsDialog:`Witty Vorschläge`,removeText:`Entfernen:`,ignoreOnce:`Einmal ignorieren`,ignorePermanently:`Für immer ignorieren`,failedRequestText:`Bitte erneut probieren`,apiKeyConfiguredNotice:`API Key konfiguriert — keine Anmeldung erforderlich.`,lockedByAdmin:``},[eb.iconController]:{totalMaxCharLengthReachedNotificationHeadline:`Lange Texte`,totalMaxCharLengthReachedNotificationText:`Witty prüft {{limit}} Zeichen auf einmal. Dein Text hat {{total}} Zeichen — markiere weitere Abschnitte, um sie zu prüfen.`},[eb.notifications]:{pinNotificationHeadline:`Pin Witty`,pinNotificationText:`Bitte Witty an die Symbolleiste pinnen.`,totalMaxCharLengthReachedNotificationHeadline:`Lange Texte`,totalMaxCharLengthReachedNotificationText:`Witty prüft {{limit}} Zeichen auf einmal. Dein Text hat {{total}} Zeichen — markiere weitere Abschnitte, um sie zu prüfen.`,updateNotificationHeadline:`Witty wurde aktualisiert`,updateNotificationText:`Witty wurde auf die neuste Version aktualisiert.`,updateNotificationButton:`Änderungen`,minVersionNotInstalledNotificationHeadline:`Du must Witty aktualisieren`,minVersionNotInstalledNotificationText:`Um Witty weiterhin nutzen zu können, müsst Du Witty auf eine neuere Version aktualisieren.`,minVersionNotInstalledNotificationButton:`Aktualisieren`}},rb={[eb.editor]:{toolbar:`Formatting`,bold:`Bold`,italic:`Italic`,underline:`Underline`,heading:`Heading`,bulletList:`Bulleted list`,orderedList:`Numbered list`,quote:`Quote`,undo:`Undo`,redo:`Redo`,settings:`Witty settings`,closeSettings:`Close settings`,settingsLoading:`Loading settings…`,statusChecking:`Witty is checking the text…`,statusAlerts_one:`{{count}} suggestion`,statusAlerts_other:`{{count}} suggestions`,statusNoAlerts:`No suggestions`,statusUnauthorized:`API key missing or not accepted`,statusFailed:`Checking failed`,statusOutdated:`This version of the Witty editor is no longer supported. The site needs to update it.`,statusLanguage:`Witty can't tell the language of this text.`,shortcutHint:`Press Alt+Shift+W to open the suggestion at the cursor.`,limitReached:`Only part of this text was checked.`,menu:`Witty menu`,menuSettings:`Settings…`,menuSwitchGender:`Switch gender format…`,menuHelp:`Help`,menuAbout:`About Witty`,switchTitle:`Switch gender format`,switchIntro:`Rewrites every gendered form in the text into the format you choose. Undo reverses it in one step.`,switchCurrent:`current`,switching:`Checking and rewriting the text…`,switched_one:`Switched {{count}} form to {{format}}.`,switched_other:`Switched {{count}} forms to {{format}}.`,switchNothing:`Nothing to switch: the text already uses {{format}}.`,switchDisabled:`Switching the gender format is turned off for this account.`,switchUnsupported:`The server doesn't support switching the gender format yet.`,switchFromInklusivum:`Nothing switched: switching out of the Inklusivum isn't supported yet.`,switchUnsupportedTarget:`The server can't switch to {{format}} yet.`,switchUnsupportedNote:`Not supported by the server yet.`,switchUnavailable:`{{format}} is not a gender format the editor can switch to.`,switchInklusivumNote:`Compounds and words Witty doesn't know stay as written; switching back isn't possible yet.`,switchGerman:`German`,switchFrench:`French`,switchForced:`Your organisation sets the gender format to {{format}}. The text was not changed.`},[eb.options]:{languageHeadline:`Language and gender forms`,genderedRolesFormat:`Generic masculine`,genderedRolesFormatHint:`How should Witty handle the generic masculine in gendered languages like German or French?`,germanGenderEnding:`German gender ending`,germanGenderEndingHint:`Witty recommends the genderstar.`,frenchGenderSeparator:`French gender separator`,frenchGenderSeparatorHint:`Witty recommends the point médian.`,useApiDefault:`Server default`,levelOff:`Off`,levelBasic:`Basic`,levelAdvanced:`Advanced`,levelLocked:`Always on`,categoriesFailed:`Could not load categories.`,helpOwnServer:`Connect Witty to your own server`,helpWithoutDashboard:`Run Witty without the dashboard`,helpCentre:`Help Center`,settingsHeadline:`Witty settings`,connectionHeadline:`Connection`,modeAccount:`Account (sign in via dashboard)`,modeApiKey:`API key (no dashboard)`,apiKey:`API key`,apiKeyHint:`Sent as x-key to the NLP API. No dashboard required.`,apiKeyRequired:`An API key is required.`,customisationHeadline:`Customisation`,orthography:`Spell checking`,llmAlternatives:`AI suggestions`,categoriesHeadline:`Categories`,categoriesIntro:`Categories you switch off are no longer highlighted.`,orgOverrideNote:`In account mode your organisation settings may override these.`,endpointHeadline:`Custom server`,endpointIntro:`Point Witty at your own deployment. Only change this if you know what you are doing.`,endpointWarning:`Warning: the server you enter receives every text you write in input fields. Only enter a deployment you trust.`,dashboardUrl:`Dashboard URL`,apiUrl:`NLP API URL`,oauthClientId:`OAuth client ID`,redirectUriHint:`Register this redirect URI on your dashboard OAuth client:`,save:`Save and sign out`,reset:`Reset to default`,saved:`Saved. You have been signed out — please sign in again.`,resetDone:`Reset to default. You have been signed out.`,invalidUrl:`Enter an https URL (http is allowed for localhost only).`,clientIdRequired:`OAuth client ID is required.`,signOutNotice:`Changing server signs you out: tokens are only ever valid for one server.`,currentEndpoint:`Currently using`},[eb.common]:{buttons:{ok:`Ok`,cancel:`Cancel`},languages:{en_GB:`English (🇬🇧 Great Britain)`,en_US:`English (🇺🇸 USA)`,de_DE:`German (🇩🇪 Germany)`,de_AT:`German (🇦🇹 Austrian)`,de_CH:`German (🇨🇭 Switzerland)`,fr_FR:`French (🇫🇷 France)`,fr_CH:`French (🇨🇭 Switzerland)`}},[eb.pages.popup]:{helpCentre:`Help Center`,helpSignInFailed:`Troubleshooting help`,extensionSettings:`Extension settings`,extensionSettingsHint:`Custom server, API key and categories`,enableWitty:`Enable Witty`,websiteSettings:`Settings for {{domain}}`,developmentSettings:`Development Settings`,spellChecking:`Check grammar & spelling`,thanks:`Thanks for your feedback!`,noSupport:`We’re sorry! Witty doesn’t yet officially support this website.`,vote:`Vote for this website`,editor:`Use the Witty Editor instead`,goToDashboard:`Go to Witty Editor`,overrideRecomendedSites:`Try Witty here anyway`,backToRecomendedSites:`Use Witty only on supported websites`,loginToUnlock:`Log in now!`,signedOutText:`You are missing out`,biasDetection:`Bias detection in 30+ diversity dimensions`,inclusiveAlternatives:`Alternatives for inclusive writing`,teamFeatures:`Team features, incl. shared dictionaries`,signIn:`Sign In`,signOut:`Sign out`,haveAccount:`Already have an account?`,dontHaveAccount:`Don’t have an account?`,signUp:`Sign up`,doesWittyWork:`Does Witty work here?`,doesWittyWorkExplanation:`Please help us to find out.`,tryAgain:`Try again`,understood:`Understood`,websiteSettingsDeactivated:`You reported that Witty does not work on {{domain}}`,tryAgainOnThisWebsite:`Try again on this website`,enableWittyFailed:`Die Synchronisierung mit Witty Dashboard ist aktuell nicht möglich, versuchen Sie es später noch einmal.`,lockedInfo:`This feature has been locked by your team admin.`,loggedInTo:`Logged in to`,popupsBlocked:`Popups are blocked`,popupsBlockedText:`To log in, please copy and paste the link into your browser's URL bar.`,copyLink:`Copy Link`,copiedConfirmation:`link Copied`,signInFailed:`Sign-in failed`,signInFailedText:`We could not complete the sign-in. Please try again.`,hrFeatures:`Job Ads Add-On`,beta:`Beta`,apiKeyConfiguredNotice:`API key configured — no sign-in required.`,apiKeyAuthFailed:`API key authentication failed ({{status}}): {{message}} — check your API key or endpoint.`},[eb.popover]:{insteadTry:`Try instead ...`,learnMore:`Why`,leanrMoreExtendedText:`Dig deeper`,ignoreTerm:`Highlight less?`,visitSource:`Source`,alertOftotal:`of`,removeSpaces:`(Remove extra spaces)`,loginToUnlock:`Log in now!`,signedOutText:`You are missing out`,biasDetection:`Bias detection in 30+ diversity dimensions`,inclusiveAlternatives:`Alternatives for inclusive writing`,teamFeatures:`Team features, incl. shared dictionaries`,signIn:`Sign In`,haveAccount:`Already have an account?`,dontHaveAccount:`Don’t have an account?`,signUp:`Sign up`,popupsBlocked:`Popups are blocked`,popupsBlockedText:`Please copy and paste the link into your browser URL bar.`,copyLink:`Copy Link`,copiedConfirmation:`link Copied`,signInFailed:`Sign-in failed`,signInFailedText:`We could not complete the sign-in. Please try again.`,missingOut:`You are missing out`,bulletPointOne:`Why this term is biased`,bulletPointTwo:`Inclusive alternatives for this term`,inclusiveBulletPointOne:`Why this term is inclusive`,inclusiveBulletPointTwo:`More inclusive terms`,wittyLogo:`Witty`,new:`new`,video:`A video is available for more learning`,openNewWindow:`Opens in a new window`,next:`Next result`,previous:`Previous result`,close:`Close Witty`,suggestionsDialog:`Witty suggestions`,removeText:`Remove:`,ignoreOnce:`Ignore once`,ignorePermanently:`Ignore permanently`,failedRequestText:`Failed, please try again`,apiKeyConfiguredNotice:`API key configured — no sign-in required.`,lockedByAdmin:``},[eb.errors]:{errorMessageGenericTitle:`Ouch! Something went wrong!`,reloadWebsite:`Please reload the website`},[eb.iconController]:{totalMaxCharLengthReachedNotificationHeadline:`Long texts`,totalMaxCharLengthReachedNotificationText:`Witty checks {{limit}} characters at a time. Your text has {{total}} characters — select further sections to check them.`},[eb.notifications]:{pinNotificationHeadline:`Pin Witty`,pinNotificationText:`Remember to pin Witty to your browser toolbar.`,totalMaxCharLengthReachedNotificationHeadline:`Long texts`,totalMaxCharLengthReachedNotificationText:`Witty checks {{limit}} characters at a time. Your text has {{total}} characters — select further sections to check them.`,updateNotificationHeadline:`Witty was updated`,updateNotificationText:`Witty was updated to the latest version.`,updateNotificationButton:`View changes`,minVersionNotInstalledNotificationHeadline:`You need to update Witty`,minVersionNotInstalledNotificationText:`In order to continue using Witty, you need to update Witty to a newer version.`,minVersionNotInstalledNotificationButton:`How to update`}},ib={[eb.editor]:{toolbar:`Mise en forme`,bold:`Gras`,italic:`Italique`,underline:`Souligné`,heading:`Titre`,bulletList:`Liste à puces`,orderedList:`Liste numérotée`,quote:`Citation`,undo:`Annuler`,redo:`Rétablir`,settings:`Paramètres Witty`,closeSettings:`Fermer les paramètres`,settingsLoading:`Chargement des paramètres…`,statusChecking:`Witty vérifie le texte…`,statusAlerts_one:`{{count}} suggestion`,statusAlerts_other:`{{count}} suggestions`,statusNoAlerts:`Aucune suggestion`,statusUnauthorized:`Clé API manquante ou refusée`,statusFailed:`La vérification a échoué`,statusOutdated:`Cette version de l'éditeur Witty n'est plus prise en charge. Le site doit la mettre à jour.`,statusLanguage:`Witty ne reconnaît pas la langue de ce texte.`,shortcutHint:`Appuyez sur Alt+Maj+W pour ouvrir la suggestion à la position du curseur.`,limitReached:`Seule une partie de ce texte a été vérifiée.`,menu:`Menu Witty`,menuSettings:`Paramètres…`,menuSwitchGender:`Changer la forme inclusive…`,menuHelp:`Aide`,menuAbout:`À propos de Witty`,switchTitle:`Changer la forme inclusive`,switchIntro:`Réécrit toutes les formes genrées du texte dans la forme choisie. Annuler rétablit le texte en une seule étape.`,switchCurrent:`actuelle`,switching:`Vérification et réécriture du texte…`,switched_one:`{{count}} forme convertie en {{format}}.`,switched_other:`{{count}} formes converties en {{format}}.`,switchNothing:`Rien à changer : le texte utilise déjà {{format}}.`,switchDisabled:`Le changement de forme inclusive est désactivé pour ce compte.`,switchUnsupported:`Le serveur ne permet pas encore de changer la forme inclusive.`,switchFromInklusivum:`Rien n'a été converti : le passage de l'Inklusivum à une autre forme n'est pas encore possible.`,switchUnsupportedTarget:`Le serveur ne peut pas encore convertir en {{format}}.`,switchUnsupportedNote:`Pas encore pris en charge par le serveur.`,switchUnavailable:`{{format}} n'est pas une forme inclusive vers laquelle convertir.`,switchInklusivumNote:`Les mots composés et les mots inconnus restent tels quels ; le retour n'est pas encore possible.`,switchGerman:`Allemand`,switchFrench:`Français`,switchForced:`Votre organisation impose la forme inclusive {{format}}. Le texte n'a pas été modifié.`},[eb.options]:{languageHeadline:`Langue et formes de genre`,genderedRolesFormat:`Masculin générique`,genderedRolesFormatHint:`Comment Witty doit-il traiter le masculin générique dans les langues genrées ?`,germanGenderEnding:`Terminaison de genre allemande`,germanGenderEndingHint:`Witty recommande le genderstar.`,frenchGenderSeparator:`Séparateur de genre français`,frenchGenderSeparatorHint:`Witty recommande le point médian.`,useApiDefault:`Valeur par défaut du serveur`,levelOff:`Désactivé`,levelBasic:`Base`,levelAdvanced:`Avancé`,levelLocked:`Toujours actif`,categoriesFailed:`Impossible de charger les catégories.`,helpOwnServer:`Connecter Witty à votre propre serveur`,helpWithoutDashboard:`Utiliser Witty sans tableau de bord`,helpCentre:`Centre d’aide`,settingsHeadline:`Paramètres Witty`,connectionHeadline:`Connexion`,modeAccount:`Compte (connexion via le tableau de bord)`,modeApiKey:`Clé API (sans tableau de bord)`,apiKey:`Clé API`,apiKeyHint:`Envoyée comme x-key à l'API NLP. Aucun tableau de bord requis.`,apiKeyRequired:`Une clé API est requise.`,customisationHeadline:`Personnalisation`,orthography:`Correction orthographique`,llmAlternatives:`Suggestions IA`,categoriesHeadline:`Catégories`,categoriesIntro:`Les catégories désactivées ne sont plus mises en évidence.`,orgOverrideNote:`En mode compte, les paramètres de votre organisation peuvent les remplacer.`,endpointHeadline:`Serveur personnalisé`,endpointIntro:`Pointez Witty vers votre propre installation. Ne modifiez ceci que si vous savez ce que vous faites.`,endpointWarning:`Attention : le serveur indiqué reçoit tout texte que vous saisissez dans les champs. N'indiquez qu'une installation de confiance.`,dashboardUrl:`URL du tableau de bord`,apiUrl:`URL de l'API NLP`,oauthClientId:`ID client OAuth`,redirectUriHint:`Enregistrez cette URI de redirection sur le client OAuth de votre tableau de bord :`,save:`Enregistrer et se déconnecter`,reset:`Réinitialiser`,saved:`Enregistré. Vous avez été déconnecté·e — veuillez vous reconnecter.`,resetDone:`Réinitialisé. Vous avez été déconnecté·e.`,invalidUrl:`Indiquez une URL https (http uniquement pour localhost).`,clientIdRequired:`L'ID client OAuth est requis.`,signOutNotice:`Changer de serveur vous déconnecte : les jetons ne sont valables que pour un seul serveur.`,currentEndpoint:`Actuellement utilisé`},[eb.common]:{buttons:{ok:`Ok`,cancel:`Annuler`},languages:{en_US:`Anglais (🇺🇸 USA)`,en_GB:`Anglais (🇬🇧 Royaume-Uni)`,de_DE:`Allemand (🇩🇪 Allemagne)`,de_AT:`Allemand (🇦🇹 Autriche)`,de_CH:`Allemand (🇨🇭 Suisse)`,fr_FR:`Français (🇫🇷 France)`,fr_CH:`Français (🇨🇭 Suisse)`}},[eb.pages.popup]:{helpCentre:`Centre d’aide`,helpSignInFailed:`Aide au dépannage`,extensionSettings:`Paramètres de l’extension`,extensionSettingsHint:`Serveur personnalisé, clé API et catégories`,enableWitty:`Activer Witty`,websiteSettings:`Paramètres pour {{domain}}`,developmentSettings:`Paramètres de développement`,spellChecking:`Vérifier la grammaire et l'orthographe`,thanks:`Merci pour votre retour !`,noSupport:`Nous sommes désolés ! Witty ne prend pas encore officiellement en charge ce site web.`,vote:`Votez pour ce site web`,editor:`Utiliser l'éditeur Witty à la place`,goToDashboard:`Aller à l'éditeur Witty`,overrideRecomendedSites:`Essayer Witty ici quand même`,backToRecomendedSites:`Utiliser Witty uniquement sur les sites pris en charge`,loginToUnlock:`Connectez-vous maintenant !`,signedOutText:`Vous manquez quelque chose`,biasDetection:`Détection des biais dans plus de 30 dimensions de diversité`,inclusiveAlternatives:`Alternatives pour une écriture inclusive`,teamFeatures:`Fonctionnalités d'équipe, y compris des dictionnaires partagés`,signIn:`Se connecter`,signOut:`Se déconnecter`,haveAccount:`Vous avez déjà un compte ?`,dontHaveAccount:`Vous n'avez pas de compte ?`,signUp:`S'inscrire`,doesWittyWork:`Witty fonctionne-t-il ici ?`,doesWittyWorkExplanation:`Aidez-nous à le découvrir, s'il vous plaît.`,tryAgain:`Réessayer`,understood:`Compris`,websiteSettingsDeactivated:`Vous avez signalé que Witty ne fonctionne pas sur {{domain}}`,tryAgainOnThisWebsite:`Réessayez sur ce site web`,enableWittyFailed:`La synchronisation avec le tableau de bord Witty est actuellement impossible, veuillez réessayer plus tard.`,lockedInfo:`Cette fonctionnalité a été verrouillée par votre·e administrateur·trice d'équipe.`,loggedInTo:`Connecté·e à`,popupsBlocked:`Les pop-ups sont bloqués`,popupsBlockedText:`Pour vous connecter, veuillez copier et coller le lien dans la barre d'URL de votre navigateur.`,copyLink:`Copier le lien`,copiedConfirmation:`Lien copié`,signInFailed:`Échec de la connexion`,signInFailedText:`La connexion n'a pas pu aboutir. Veuillez réessayer.`,hrFeatures:`Add-on pour les offres d'emploi`,beta:`Bêta`,apiKeyConfiguredNotice:`Clé API configurée — aucune connexion requise.`,apiKeyAuthFailed:`Échec de l'authentification de la clé API ({{status}}) : {{message}} — vérifiez votre clé API ou le point de terminaison.`},[eb.popover]:{insteadTry:`Essayez plutôt ...`,learnMore:`Pourquoi`,leanrMoreExtendedText:`En savoir plus`,ignoreTerm:`Mettre moins en évidence ?`,visitSource:`Source`,alertOftotal:`de`,removeSpaces:`(Retirer les espaces supplémentaires)`,loginToUnlock:`Connectez-vous maintenant !`,signedOutText:`Vous manquez quelque chose`,biasDetection:`Détection des biais dans plus de 30 dimensions de diversité`,inclusiveAlternatives:`Alternatives pour une écriture inclusive`,teamFeatures:`Fonctionnalités d'équipe, y compris des dictionnaires partagés`,signIn:`Se connecter`,haveAccount:`Vous avez déjà un compte ?`,dontHaveAccount:`Vous n'avez pas de compte ?`,signUp:`S'inscrire`,popupsBlocked:`Les pop-ups sont bloqués`,popupsBlockedText:`Veuillez copier et coller le lien dans la barre d'URL de votre navigateur.`,copyLink:`Copier le lien`,copiedConfirmation:`Lien copié`,signInFailed:`Échec de la connexion`,signInFailedText:`La connexion n'a pas pu aboutir. Veuillez réessayer.`,missingOut:`Vous manquez quelque chose`,bulletPointOne:`Pourquoi ce terme est biaisé`,bulletPointTwo:`Alternatives inclusives pour ce terme`,inclusiveBulletPointOne:`Pourquoi ce terme est inclusif`,inclusiveBulletPointTwo:`Termes plus inclusifs`,wittyLogo:`Witty`,new:`nouveau·elle`,video:`Une vidéo d'explication est disponible`,openNewWindow:`Ouverture dans une nouvelle fenêtre`,next:`Résultat suivant`,previous:`Résultat précédent`,close:`Fermer Witty`,suggestionsDialog:`Suggestions Witty`,removeText:`Supprimer :`,ignoreOnce:`Ignorer une fois`,ignorePermanently:`Ignorer définitivement`,failedRequestText:`Échec, veuillez réessayer`,apiKeyConfiguredNotice:`Clé API configurée — aucune connexion requise.`,lockedByAdmin:``},[eb.errors]:{errorMessageGenericTitle:`Oups ! Quelque chose a mal tourné !`,reloadWebsite:`Veuillez recharger le site web`},[eb.iconController]:{totalMaxCharLengthReachedNotificationHeadline:`Textes longs`,totalMaxCharLengthReachedNotificationText:`Witty vérifie {{limit}} caractères à la fois. Votre texte compte {{total}} caractères — sélectionnez d'autres sections pour les vérifier.`},[eb.notifications]:{pinNotificationHeadline:`Épingler Witty`,pinNotificationText:`N'oubliez pas d'épingler Witty dans la barre d'outils de votre navigateur.`,totalMaxCharLengthReachedNotificationHeadline:`Textes longs`,totalMaxCharLengthReachedNotificationText:`Witty vérifie {{limit}} caractères à la fois. Votre texte compte {{total}} caractères — sélectionnez d'autres sections pour les vérifier.`,updateNotificationHeadline:`Witty a été mis à jour`,updateNotificationText:`Witty a été mis à jour vers la dernière version.`,updateNotificationButton:`Voir les changements`,minVersionNotInstalledNotificationHeadline:`Vous devez mettre à jour Witty`,minVersionNotInstalledNotificationText:`Pour continuer à utiliser Witty, vous devez mettre à jour Witty vers une version plus récente.`,minVersionNotInstalledNotificationButton:`Comment mettre à jour`}},ab={[tb.en]:rb,[tb.de]:nb,[tb.fr]:ib};delete ab.fr;var ob=()=>{ty.isInitialized||ty.use($y).use(Sy).init({detection:{order:[`navigator`]},resources:ab,fallbackLng:`en`})},sb=`v2.4/check`,cb=`v1.0/rephrase`,lb=`v2.0/config-options`,ub=e=>`v2.0/categories?locale=${encodeURIComponent(e)}`,db={Accept:`application/json`,"Content-Type":`application/json`},fb=e=>e.apiKey?{"x-key":e.apiKey}:e.token?{Authorization:`Bearer ${e.token}`}:{},pb=e=>{let{text:t,lang:n=`auto`,id:r,client:i,config:a}=e;return{text:t,lang:n,id:r,client:i,...a===void 0?{}:{config:a},...e.configHash===void 0?{}:{config_hash:e.configHash},...e.organizationConfigHash===void 0?{}:{organization_config_hash:e.organizationConfigHash}}},mb=(e,t)=>({sentence:e.raw,text:t.data.text,start:t.absOffset-e.range[0],gender_separator:t.data.gender_separator,alternatives:t.data.alternatives.filter(e=>!e.remove),lang:t.data.language||`en`}),hb=3e3,gb=e=>{if(!e)return;let t=Object.entries(e).filter(([,e])=>e!==void 0);return t.length?Object.fromEntries(t):void 0},_b=(e,t)=>{if(e?.startsWith(`de`))return t?.german_gender_ending;if(e?.startsWith(`fr`))return t?.french_gender_separator},vb=`witty-editor:${X_}`,yb=class extends Error{status;detail;types;constructor(e,t,n=[]){super(`check failed: HTTP ${e}${t?`: ${t}`:``}`),this.status=e,this.detail=t,this.types=n,this.name=`CheckHttpError`}},bb=async e=>{try{let{detail:t}=await e.json();if(typeof t==`string`)return{detail:t,types:[]};if(Array.isArray(t))return{detail:t.map(({loc:e,msg:t})=>[e?.slice(1).join(`.`),t].filter(Boolean).join(`: `)).join(`; `),types:t.flatMap(({type:e})=>e?[e]:[])}}catch{}return{types:[]}},xb=({endpoint:e,headers:t,lang:n=`auto`,client:r=vb,id:i=`witty-editor`,config:a})=>async(o,s)=>{let c=gb(a?.()),l=await fetch(`${e}${sb}`,{method:`POST`,signal:s,headers:{...db,...t?await t():{}},body:JSON.stringify(pb({text:o,lang:n,id:i,client:r,config:c}))});if(!l.ok){let{detail:e,types:t}=await bb(l);throw new yb(l.status,e,t)}return await l.json()};function Sb(e){if(e.type===`Sentence`)return e;if(`children`in e&&Array.isArray(e.children))return e.children.find(e=>e.type===`Sentence`)}var Cb=(e,t,n,r)=>`${e}-${t}-${n}-${r}`,wb=(e,t)=>{if(e===` `)return{text:``,scope:`alert`};let n=e.replace(/\(\(/g,`[`).replace(/\)\)/g,`]`),r=t?.get(n);return r?{text:r,scope:`sentence`}:{text:n,scope:`alert`}},Tb;(function(e){e.Document=`Document`,e.DocumentExit=`Document:exit`,e.Paragraph=`Paragraph`,e.ParagraphExit=`Paragraph:exit`,e.BlockQuote=`BlockQuote`,e.BlockQuoteExit=`BlockQuote:exit`,e.ListItem=`ListItem`,e.ListItemExit=`ListItem:exit`,e.List=`List`,e.ListExit=`List:exit`,e.Header=`Header`,e.HeaderExit=`Header:exit`,e.CodeBlock=`CodeBlock`,e.CodeBlockExit=`CodeBlock:exit`,e.HtmlBlock=`HtmlBlock`,e.HtmlBlockExit=`HtmlBlock:exit`,e.HorizontalRule=`HorizontalRule`,e.HorizontalRuleExit=`HorizontalRule:exit`,e.Comment=`Comment`,e.CommentExit=`Comment:exit`,e.ReferenceDef=`ReferenceDef`,e.ReferenceDefExit=`ReferenceDef:exit`,e.Str=`Str`,e.StrExit=`Str:exit`,e.Break=`Break`,e.BreakExit=`Break:exit`,e.Emphasis=`Emphasis`,e.EmphasisExit=`Emphasis:exit`,e.Strong=`Strong`,e.StrongExit=`Strong:exit`,e.Html=`Html`,e.HtmlExit=`Html:exit`,e.Link=`Link`,e.LinkExit=`Link:exit`,e.Image=`Image`,e.ImageExit=`Image:exit`,e.Code=`Code`,e.CodeExit=`Code:exit`,e.Delete=`Delete`,e.DeleteExit=`Delete:exit`,e.Table=`Table`,e.TableExit=`Table:exit`,e.TableRow=`TableRow`,e.TableRowExit=`TableRow:exit`,e.TableCell=`TableCell`,e.TableCellExit=`TableCell:exit`})(Tb||={});var Eb=c((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.binarySearch=e.upperBound=e.lowerBound=e.compare=void 0;function t(e,t){return e<t}e.compare=t;function n(e,n,r=t){let i=e.length,a=0;for(;i;){let t=i>>>1,o=a+t;r(n,e[o])?i=t:(a=o+1,i-=t+1)}return a}e.upperBound=n;function r(e,n,r=t){let i=e.length,a=0;for(;i;){let t=i>>>1,o=a+t;r(e[o],n)?(a=o+1,i-=t+1):i=t}return a}e.lowerBound=r;function i(e,n,i=t){let a=r(e,n,i);return a!==e.length&&!i(n,e[a])}e.binarySearch=i})),Db=c((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StructuredSource=void 0;var t=Eb();e.StructuredSource=class{constructor(e){this.indice=[0];let t=/[\r\n\u2028\u2029]/g,n=e.length;for(t.lastIndex=0;;){let r=t.exec(e);if(!r)break;let i=r.index;e.charCodeAt(i)===13&&e.charCodeAt(i+1)===10&&(i+=1);let a=i+1;if(n<a)break;this.indice.push(a),t.lastIndex=a}}get line(){return this.indice.length}locationToRange(e){return[this.positionToIndex(e.start),this.positionToIndex(e.end)]}rangeToLocation(e){return{start:this.indexToPosition(e[0]),end:this.indexToPosition(e[1])}}positionToIndex(e){return this.indice[e.line-1]+e.column}indexToPosition(e){let n=(0,t.upperBound)(this.indice,e);return{line:n,column:e-this.indice[n-1]}}}}))(),Ob=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},kb=class{index=0;source;textCharacters;sourceNode;contexts=[];consumedContexts=[];contextRanges=[];firstChildPadding;startOffset;constructor(e){if(typeof e==`string`)this.textCharacters=e.split(``),this.source=new Db.StructuredSource(e),this.startOffset=0,this.firstChildPadding=0;else{this.sourceNode=e,this.startOffset=this.sourceNode.range[0],this.index=this.startOffset;let t=Array.from(Array(this.sourceNode.loc.start.line-1)).fill(`
132
- `),n=Array.from(Array(this.startOffset-t.length)).fill(`∯`),r=e.raw.split(``);this.textCharacters=[...t,...n,...r],this.source=new Db.StructuredSource(this.textCharacters.join(``)),this.firstChildPadding=this.sourceNode.children[0]?this.sourceNode.children[0].range[0]-this.startOffset:0}}get length(){return this.textCharacters.length}markContextRange(e){this.contextRanges.push(e)}isInContextRange(){let e=this.offset;return this.contextRanges.some(t=>t[0]<=e&&e<t[1])}enterContext(e){this.contexts.push([e,this.index])}isInContext(e){return e?this.contexts.some(t=>t[0].key===e.key):this.contexts.length>0}leaveContext(e){let t=Ob(this.contexts,t=>t[0].key===e.key);if(t!==-1){let e=this.contexts[t];this.contexts.splice(t,1);let n=[e[1],this.index];this.consumedContexts.push({pairMark:e[0],range:[e[1],this.index],loc:this.source.rangeToLocation(n)})}}get offset(){return this.index+this.firstChildPadding}now(){let e=this.offset,t=this.source.indexToPosition(e);return{line:t.line,column:t.column,offset:e}}get hasEnd(){return this.read()===!1}read(e=0){let t=this.offset+e;return t<this.startOffset?!1:0<=t&&t<this.textCharacters.length&&this.textCharacters[t]}readNode(e=0){if(!this.sourceNode)return!1;let t=this.offset+e;if(t<this.startOffset)return!1;let n=this.sourceNode.children.filter(e=>e.range[0]<=t&&t<e.range[1]);return n.length>0&&n[n.length-1]}peek(){this.index+=1}peekNode(e){this.index+=e.range[1]-e.range[0]}seekNext(e){let t=this.now();e.seek(this);let n=this.now();return{value:this.sliceRange(t.offset,n.offset),startPosition:t,endPosition:n}}sliceRange(e,t){return this.textCharacters.slice(e,t).join(``)}},Ab=class{test(e){let t=e.read();return t?/[\r\n]/.test(t):!1}seek(e){for(;this.test(e);)e.peek()}},jb=class{test(e){let t=e.read();return t?/[^\S\n\r]/.test(t):!1}seek(e){for(;this.test(e);)e.peek()}},Mb={separatorCharacters:[`.`,`.`,`。`,`?`,`!`,`?`,`!`]},Nb=class{options;separatorCharacters;constructor(e){this.options=e,this.separatorCharacters=e&&e.separatorCharacters?e.separatorCharacters:Mb.separatorCharacters}test(e){if(e.isInContext()||e.isInContextRange())return!1;let t=e.read(),n=e.read(1);return!t||!this.separatorCharacters.includes(t)?!1:t!==`.`||!n||/[\s\t\r\n]/.test(n)}seek(e){for(;this.test(e);)e.peek()}},Pb=typeof process==`object`&&process?.env?.DEBUG===`sentence-splitter`;function Fb(e,t){Pb&&console.log(`sentence-splitter: `+e,t)}function Ib(...e){Pb&&console.log(`sentence-splitter: `,...e.map(e=>typeof e==`string`?e.replace(/\n/g,`\\n`):e))}var Lb=class{parsers;markers;constructor(e){this.parsers=e.parsers,this.markers=e.markers}test(e){return!e.hasEnd&&this.parsers.every(t=>!t.test(e))}seek(e){let t=e.readNode();if(!t){for(;this.test(e);)this.markers.forEach(t=>t.mark(e)),e.peek();return}let n=()=>{let n=e.offset;return t.range[0]<=n&&n<t.range[1]};for(;n()&&this.test(e);)Fb(e.offset,e.read()),this.markers.forEach(t=>t.mark(e)),e.peek()}},Rb={ABBREVIATIONS:`Adj.,Adm.,Adv.,Al.,Ala.,Alta.,Apr.,Arc.,Ariz.,Ark.,Art.,Assn.,Asst.,Attys.,Aug.,Ave.,Bart.,Bld.,Bldg.,Blvd.,Brig.,Bros.,Btw.,Cal.,Calif.,Capt.,Cl.,Cmdr.,Co.,Col.,Colo.,Comdr.,Con.,Conn.,Corp.,Cpl.,Cres.,Ct.,D.phil.,Dak.,Dec.,Del.,Dept.,Det.,Dist.,Dr.,Dr.phil.,Dr.philos.,Drs.,E.g.,Ens.,Esp.,Esq.,Etc.,Exp.,Expy.,Ext.,Feb.,Fed.,Fla.,Ft.,Fwy.,Fy.,Ga.,Gen.,Gov.,Hon.,Hosp.,Hr.,Hway.,Hwy.,I.e.,Ia.,Id.,Ida.,Ill.,Inc.,Ind.,Ing.,Insp.,Is.,Jan.,Jr.,Jul.,Jun.,Kan.,Kans.,Ken.,Ky.,La.,Lt.,Ltd.,Maj.,Man.,Mar.,Mass.,May.,Md.,Me.,Med.,Messrs.,Mex.,Mfg.,Mich.,Min.,Minn.,Miss.,Mlle.,Mm.,Mme.,Mo.,Mont.,Mr.,Mrs.,Ms.,Msgr.,Mssrs.,Mt.,Mtn.,Neb.,Nebr.,Nev.,No.,Nos.,Nov.,Nr.,Oct.,Ok.,Okla.,Ont.,Op.,Ord.,Ore.,P.,Pa.,Pd.,Pde.,Penn.,Penna.,Pfc.,Ph.,Ph.d.,Pl.,Plz.,Pp.,Prof.,Pvt.,Que.,Rd.,Rs.,Ref.,Rep.,Reps.,Res.,Rev.,Rt.,Sask.,Sec.,Sen.,Sens.,Sep.,Sept.,Sfc.,Sgt.,Sr.,St.,Supt.,Surg.,Tce.,Tenn.,Tex.,Univ.,Usafa.,U.S.,Ut.,Va.,V.,Ver.,Vs.,Vt.,Wash.,Wis.,Wisc.,Wy.,Wyo.,Yuk.`.split(`,`),PREPOSITIVE_ABBREVIATIONS:`Adm.,Attys.,Brig.,Capt.,Cmdr.,Col.,Cpl.,Det.,Dr.,Gen.,Gov.,Ing.,Lt.,Maj.,Mr.,Mrs.,Ms.,Mt.,Messrs.,Mssrs.,Prof.,Ph.,Rep.,Reps.,Rev.,Sen.,Sens.,Sgt.,St.,Supt.,V.,Vs.`.split(`,`),EXCLAMATION_WORDS:[`!Xũ`,`!Kung`,`ǃʼOǃKung`,`!Xuun`,`!Kung-Ekoka`,`ǃHu`,`ǃKhung`,`ǃKu`,`ǃung`,`ǃXo`,`ǃXû`,`ǃXung`,`ǃXũ`,`!Xun`,`Yahoo!`,`Y!J`,`Yum!`]},zb=e=>!e||e.length===0?!1:/^\p{Uppercase_Letter}/u.test(e),Bb=(e,t)=>e.toLowerCase()===t.toLowerCase(),Vb=e=>/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u.test(e),Hb={language:Rb},Ub=class{options;lang;constructor(e){this.options=e,this.lang=e&&e.language?e.language:Hb.language}getWord(e,t=0){let n=/\s/,r=e.read(-1);if(r&&!n.test(r)&&!Vb(r))return``;let i=``,a=t,o=``;for(;(o=e.read(a))&&!(n.test(o)||Vb(o));)i+=o,a++;return i}getPrevWord(e){let t=/\s/,n=-1,r=``;for(;(r=e.read(n))&&t.test(r);)n--;for(;(r=e.read(n))&&!t.test(r);)n--;return this.getWord(e,n+1)}mark(e){if(e.isInContextRange())return;let t=this.getWord(e);if(t.length===0)return;if(/^([a-zA-Z]\.){3,}$/.test(t)||this.lang.EXCLAMATION_WORDS.some(e=>Bb(e,t)))return e.markContextRange([e.offset,e.offset+t.length]);let n=this.lang.PREPOSITIVE_ABBREVIATIONS.some(e=>Bb(e,t)),r=/^\d+\.$/.test(t);if(n||r)return e.markContextRange([e.offset,e.offset+t.length]);let i=this.lang.ABBREVIATIONS.some(e=>Bb(e,t)),a=this.getPrevWord(e),o=this.getWord(e,t.length+1);(zb(a)&&/^\p{Uppercase_Letter}\./u.test(t)&&zb(o)||i&&!zb(o))&&e.markContextRange([e.offset,e.offset+t.length])}},Wb=[{key:`double quote`,start:`"`,end:`"`},{key:`angled bracket`,start:`[`,end:`]`},{key:`round bracket`,start:`(`,end:`)`},{key:`curly brace`,start:`{`,end:`}`},{key:`かぎ括弧`,start:`「`,end:`」`},{key:`丸括弧`,start:`(`,end:`)`},{key:`二重かぎ括弧`,start:`『`,end:`』`},{key:`波括弧`,start:`{`,end:`}`},{key:`角括弧`,start:`[`,end:`]`},{key:`重角括弧`,start:`〚`,end:`〛`},{key:`隅付き括弧`,start:`【`,end:`】`},{key:`二重隅付き括弧`,start:`《`,end:`》`}],Gb=class{PAIR_MARKS_KEY_Map=new Map(Wb.flatMap(e=>[[e.start,e],[e.end,e]]));mark(e){let t=e.read();if(!t)return;let n=this.PAIR_MARKS_KEY_Map.get(t);n&&(e.isInContext(n)?n.end===t&&(Ib(`PairMaker -> leaveContext: ${t} `),e.leaveContext(n)):n.start===t&&(Ib(`PairMaker -> enterContext: ${t} `),e.enterContext(n)))}},Kb={WhiteSpace:`WhiteSpace`,Punctuation:`Punctuation`,Sentence:`Sentence`,Str:`Str`,PairMark:`PairMark`},qb=class{sentenceNodeList=[];results=[];source;constructor(e){this.source=new kb(e)}get current(){return this.sentenceNodeList[this.sentenceNodeList.length-1]}pushNodeToCurrent(e){let t=this.current;t?t.children.push(e):this.results.push(e)}open(e){this.sentenceNodeList.push(e)}isOpened(){return this.sentenceNodeList.length>0}nextLine(e){let{value:t,startPosition:n,endPosition:r}=this.source.seekNext(e);return this.pushNodeToCurrent(Xb(t,n,r)),r}nextSpace(e){let{value:t,startPosition:n,endPosition:r}=this.source.seekNext(e);this.pushNodeToCurrent(Xb(t,n,r))}nextValue(e){let{value:t,startPosition:n,endPosition:r}=this.source.seekNext(e);this.pushNodeToCurrent(Qb(t,n,r))}close(e){let{value:t,startPosition:n,endPosition:r}=this.source.seekNext(e);n.offset!==r.offset&&!/^\s+$/.test(t)&&this.pushNodeToCurrent(Zb(t,n,r));let i=this.sentenceNodeList.pop();if(!i||i.children.length===0)return;let a=i.children[0],o=this.source.now(),s=this.source.sliceRange(a.range[0],o.offset),c=this.source.consumedContexts.sort((e,t)=>e.range[0]-t.range[0]).map(e=>({type:`PairMark`,pairMark:e.pairMark,range:e.range,loc:e.loc}));this.results.push({...i,loc:{start:a.loc.start,end:{line:o.line,column:o.column}},range:[a.range[0],o.offset],raw:s,contexts:c})}toList(){return this.results}},Jb=(e={})=>{let t=new Ab,n=new jb,r=new Nb(e.SeparatorParser),i=new Ub(e.AbbrMarker),a=new Gb;return{newLine:t,space:n,separator:r,abbrMarker:i,anyValueParser:new Lb({parsers:[t,r],markers:[i,a]})}};function Yb(e,t){let{newLine:n,space:r,separator:i,anyValueParser:a}=Jb(t),o=new qb(e),s=o.source;for(;!s.hasEnd;)n.test(s)?o.nextLine(n):r.test(s)?o.nextSpace(r):i.test(s)?o.close(i):(o.isOpened()||o.open($b()),o.nextValue(a));return o.close(r),o.toList()}function Xb(e,t,n){return{type:Kb.WhiteSpace,raw:e,value:e,loc:{start:{line:t.line,column:t.column},end:{line:n.line,column:n.column}},range:[t.offset,n.offset]}}function Zb(e,t,n){return{type:Kb.Punctuation,raw:e,value:e,loc:{start:{line:t.line,column:t.column},end:{line:n.line,column:n.column}},range:[t.offset,n.offset]}}function Qb(e,t,n){return{type:Kb.Str,raw:e,value:e,loc:{start:{line:t.line,column:t.column},end:{line:n.line,column:n.column}},range:[t.offset,n.offset]}}function $b(){return{type:Kb.Sentence,raw:``,loc:{start:{column:NaN,line:NaN},end:{column:NaN,line:NaN}},range:[NaN,NaN],children:[],contexts:[]}}var ex=(e,t)=>{let{results:n}=e,r=Yb(t).filter(e=>e.type===Kb.Sentence),i=[];return r.forEach(t=>{let r=t.range[0],a=t.range[1],o=[];n.forEach(n=>{if(n.start>=r&&n.end<=a){let r=n.start-t.range[0],i=n.end-t.range[0],a=Sb(t);a&&o.push({id:Cb(n.text,n.category,n.start,n.end),startOffset:r,absOffset:n.start,endOffset:i,popOverIsOpen:!1,data:{language:n.language||e.language,gender_separator:e.gender_separator,category:n.category,subcategory:n.subcategory,context:n.context,fullSentence:a,text:n.text,text_id:n.text_id,label:n.label,explanation:n.explanation,alternatives:n.alternatives,gravity:n.gravity,limit_reached:n.limit_reached,source:n.source,bulk:n.bulk,bulk_alternative:n.bulk_alternative}})}}),i.push({sentence:t.raw,alerts:o})}),i},tx=class e{value;static MINIMUM=100;constructor(e){this.value=e}shrink(){return this.value<=e.MINIMUM?!1:(this.value=Math.max(e.MINIMUM,Math.floor(this.value/2)),!0)}},nx=/\n\n/g,rx=e=>{let t=[],n=0,r=[];for(let t of e.matchAll(nx))r.push([n,t.index]),n=t.index+t[0].length;r.push([n,e.length]);for(let[n,i]of r){let r=e.slice(n,i);for(let e of Yb(r))e.type===Kb.Sentence&&t.push({start:n+e.range[0],end:n+e.range[1],text:e.raw})}return t},ix=(e,t,n)=>{if(!t.length)return null;let r=``,i=[],a=-1;for(let o of t){let t=a!==-1&&!/\S/.test(e.slice(a,o.start)),s=i.length?t?e.slice(a,o.start):`
129
+ `),[i,a]=_g(r);if(i.length===0)return;let o=bg(i,i[0].indent,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,typeMarker:i[0]?.type,items:o,raw:r.slice(0,a).join(`
130
+ `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Sg,this.editor.getAttributes(Cg)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new Gn({props:{handlePaste:(e,t)=>{if((t.clipboardData?.getData(`text/html`))?.trim())return!1;let n=t.clipboardData?.getData(`text/plain`);if(!n)return!1;let r=yg(n);if(!r)return!1;try{let t=e.state.schema.nodeFromJSON(r),n=e.state.tr.replaceSelectionWith(t);return e.dispatch(n),!0}catch{return!1}}}})]},addInputRules(){let e=(e,t)=>(!t.attrs.type||t.attrs.type===`1`)&&t.childCount+t.attrs.start===+e[1],t=wf({find:wg,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=wf({find:wg,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Cg)}),joinPredicate:e,editor:this.editor})),[t]}}),Dg=/^\s*(\[([( |x])?\])\s$/,Og=`position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0`,kg=(e,t,n)=>{var r;return(n==null||(r=n.checkboxLabel)==null?void 0:r.call(n,e,t))||`Task item checkbox for ${e.textContent||`empty task item`}`},Ag=Tf.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:e=>e.querySelector(`div`)??e}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,$l(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>Vd(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addExtensions(){return this.options.nested?[Fh(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`);o.style.cssText=Og;let l=e=>{let t=kg(e,e.attrs.checked,this.options.a11y);s.setAttribute(`aria-label`,t),o.textContent=t};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=eu(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[wf({find:Dg,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),jg=Tf.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:e}){return[`ul`,$l(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
131
+ `):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=Rd(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(t){let r={type:`taskList`,raw:t.raw,items:t.items},i=e.slice(t.raw.length);return i.trim()?[r,...n.blockTokens(i)]:[r]}return n.blockTokens(e)},i=Rd(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});rf.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(jh.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(eg.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(lg.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(Eg.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(Ag.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(jg.configure(this.options.taskList)),e}});var Mg=`&nbsp;`,Ng=`\xA0`,Pg=Tf.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,$l(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===Mg||n[0].text===Mg||n[0].raw===Ng||n[0].text===Ng)&&r.length===1&&r[0].type===`text`&&(r[0].text===Mg||r[0].text===Ng)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){var i,a;let e=Array.isArray(n==null||(i=n.previousNode)==null?void 0:i.content)?n.previousNode.content:[];return(n==null||(a=n.previousNode)==null?void 0:a.type)===`paragraph`&&e.length===0?Mg:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Fg=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Ig=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Lg=Yd.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,$l(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[xf({find:Fg,type:this.type})]},addPasteRules(){return[Ef({find:Ig,type:this.type})]}}),Rg=Tf.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),zg=Yd.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,$l(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Bg(e={}){return new Gn({view(t){return new Vg(t,e)}})}var Vg=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc){if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(!t||i)return null;let a=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=rn(this.editorView.state.doc,a,this.editorView.dragging.slice);e!=null&&(a=e)}return a}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);t!=null&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},Hg=class e extends j{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):j.near(r)}content(){return E.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new Ug(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Gg(e)||!Kg(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!N.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};Hg.prototype.visible=!1,Hg.findFrom=Hg.findGapCursorFrom,j.jsonID(`gapcursor`,Hg);var Ug=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Hg.valid(t)?new Hg(t):j.near(t)}};function Wg(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Gg(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||Wg(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Kg(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||Wg(e.type))return!0;if(e.inlineContent)return!1}}return!0}function qg(){return new Gn({props:{decorations:Qg,createSelectionBetween(e,t,n){return t.pos==n.pos&&Hg.valid(n)?new Hg(n):null},handleClick:Xg,handleKeyDown:Jg,handleDOMEvents:{beforeinput:Zg}}})}var Jg=Sc({ArrowLeft:Yg(`horiz`,-1),ArrowRight:Yg(`horiz`,1),ArrowUp:Yg(`vert`,-1),ArrowDown:Yg(`vert`,1)});function Yg(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof M){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=Hg.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new Hg(c))),!0):!1}}function Xg(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Hg.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&N.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Hg(r))),!0)}function Zg(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof Hg))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=b.empty;for(let e=r.length-1;e>=0;e--)i=b.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new E(i,0,0));return a.setSelection(M.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function Qg(e){if(!(e.selection instanceof Hg))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,xs.create(e.doc,[vs.widget(e.selection.head,t,{key:`gapcursor`})])}var $g=200,e_=function(){};e_.prototype.append=function(e){return e.length?(e=e_.from(e),!this.length&&e||e.length<$g&&this.leafAppend(e)||this.length<$g&&e.leafPrepend(this)||this.appendInner(e)):this},e_.prototype.prepend=function(e){return e.length?e_.from(e).append(this):this},e_.prototype.appendInner=function(e){return new n_(this,e)},e_.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?e_.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},e_.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},e_.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},e_.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},e_.from=function(e){return e instanceof e_?e:e&&e.length?new t_(e):e_.empty};var t_=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=$g)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=$g)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(e_);e_.empty=new t_([]);var n_=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(e_),r_=500,i_=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new o_(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new o_(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new o_(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>c_&&(s=a_(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new xt;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new o_(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new o_(i,o,l))}else r.push(new o_(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new o_(a.maps[e]));let u=this.items.slice(0,i).append(l).append(r),d=new e(u,s);return d.emptyItemCount()>r_&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new o_(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(e_.from(i.reverse()),a)}};i_.empty=new i_(e_.empty,0);function a_(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var o_=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},s_=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},c_=20;function l_(e,t,n,r){let i=n.getMeta(__),a;if(i)return i.historyState;n.getMeta(v_)&&(e=new s_(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(__))return o.getMeta(__).redo?new s_(e.done.addTransform(n,void 0,r,g_(t)),e.undone,d_(n.mapping.maps),e.prevTime,e.prevComposition):new s_(e.done,e.undone.addTransform(n,void 0,r,g_(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!u_(n,e.prevRanges)),s=o?f_(e.prevRanges,n.mapping):d_(n.mapping.maps);return new s_(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,g_(t)),i_.empty,s,n.time,i??e.prevComposition)}return(a=n.getMeta(`rebased`))?new s_(e.done.rebased(n,a),e.undone.rebased(n,a),f_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new s_(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),f_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function u_(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function d_(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function f_(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function p_(e,t,n){let r=g_(t),i=__.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new s_(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(__,{redo:n,historyState:c})}var m_=!1,h_=null;function g_(e){let t=e.plugins;if(h_!=t){m_=!1,h_=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){m_=!0;break}}return m_}var __=new Jn(`history`),v_=new Jn(`closeHistory`);function y_(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Gn({key:__,state:{init(){return new s_(i_.empty,i_.empty,null,0,-1)},apply(t,n,r){return l_(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?x_:n==`historyRedo`?S_:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function b_(e,t){return(n,r)=>{let i=__.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=p_(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var x_=b_(!1,!0),S_=b_(!0,!0);rf.create({name:`characterCount`,addOptions(){return{limit:null,autoTrim:!0,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Gn({key:new Jn(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit,a=this.options.autoTrim;if(i==null||i===0||a===!1){e=!0;return}let o=this.storage.characters({node:r.doc});if(o>i){let t=o-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var C_=rf.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[Bg(this.options)]}});rf.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new Gn({key:new Jn(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return xs.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(vs.node(t,t+e.nodeSize,{class:this.options.className}))}),xs.create(e,a)}}})]}});var w_=rf.create({name:`gapCursor`,addProseMirrorPlugins(){return[qg()]},extendNodeSchema(e){return{allowGapCursor:R(I(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),T_=`placeholder`,E_=new Jn(`tiptap__placeholder`);function D_(e){let{editor:t,placeholder:n,dataAttribute:r,pos:i,node:a,isEmptyDoc:o,hasAnchor:s,classes:{emptyNode:c,emptyEditor:l}}=e,u=[c];return o&&u.push(l),vs.node(i,i+a.nodeSize,{class:u.join(` `),[r]:typeof n==`function`?n({editor:t,node:a,pos:i,hasAnchor:s}):n})}function O_(e,t){return typeof e==`function`?e(t):e}function k_({editor:e,options:t,dataAttribute:n,doc:r,selection:i,from:a,to:o}){let{anchor:s}=i,c=[],l=e.isEmpty;return r.nodesBetween(a,o,(r,i)=>{let a=s>=i&&s<=i+r.nodeSize,o=!r.isLeaf&&ku(r);return r.type.isTextblock&&(a||!t.showOnlyCurrent)&&o&&c.push(D_({editor:e,isEmptyDoc:l,dataAttribute:n,hasAnchor:a,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:O_(t.emptyNodeClass,{editor:e,node:r,pos:i,hasAnchor:a})},node:r,pos:i})),t.includeChildren}),c}function A_({editor:e,options:t,dataAttribute:n,doc:r,selection:i}){if(!e.isEditable&&t.showOnlyWhenEditable)return null;let{anchor:a}=i,o=[],s=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let i=r.resolve(a),c=i.depth>0?i.node(1):i.nodeAfter,l=i.depth>0?i.before(1):a;if(c&&c.type.isTextblock&&ku(c)){let r=a>=l&&a<=l+c.nodeSize;o.push(D_({editor:e,isEmptyDoc:s,dataAttribute:n,hasAnchor:r,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:O_(t.emptyNodeClass,{editor:e,node:c,pos:l,hasAnchor:r})},node:c,pos:l}))}}else o.push(...k_({editor:e,options:t,dataAttribute:n,doc:r,selection:i,from:0,to:r.content.size}));return xs.create(r,o)}function j_(e,t){let n=e.resolve(t);if(n.depth===0){let e=n.nodeAfter??n.nodeBefore;if(!e)return{from:t,to:t};let r=n.nodeAfter?t:t-e.nodeSize;return{from:r,to:r+e.nodeSize}}let r=n.before(1);return{from:r,to:r+n.node(1).nodeSize}}function M_(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function N_(e,t,n){let r=[];return e.forEach((e,i)=>{let a=i,o=a+e.nodeSize,s=a+1,c=o+1;s<n&&c>t&&r.push({from:a,to:o})}),r}function P_(e){if(e.length===0)return[];let t=[...e].sort((e,t)=>e.from-t.from),n=[{...t[0]}];for(let e=1;e<t.length;e+=1){let r=n[n.length-1],i=t[e];i.from<=r.to?r.to=Math.max(r.to,i.to):n.push({...i})}return n}function F_(e,t){let n=N_(e,t.from,t.to);return n.push(M_(e,j_(e,t.from))),t.to>t.from?n.push(M_(e,j_(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&n.push(M_(e,j_(e,Math.min(t.from+1,e.content.size)))),n}function I_(e,t,n){let r=[];if(e.docChanged){let t=gu(e);for(let e of t)r.push(...F_(n.doc,e.newRange))}return e.selectionSet&&(r.push(M_(n.doc,j_(n.doc,e.mapping.map(t.selection.anchor)))),r.push(M_(n.doc,j_(n.doc,n.selection.anchor)))),P_(r)}function L_(e,t,n){let r=Math.max(0,Math.min(e,n.content.size));return{from:r,to:Math.max(r,Math.min(t,n.content.size))}}function R_({decorations:e,ranges:t,editor:n,options:r,dataAttribute:i,doc:a,selection:o}){let s=e;for(let e of t){let{from:t,to:c}=L_(e.from,e.to,a),l=s.find(t,c).filter(e=>e.from>=t&&e.to<=c);l.length&&(s=s.remove(l));let u=k_({editor:n,options:r,dataAttribute:i,doc:a,selection:o,from:t,to:c});u.length&&(s=s.add(a,u))}return s}function z_({editor:e,options:t,dataAttribute:n}){return{init(r,i){return A_({editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection})??xs.empty},apply(r,i,a,o){return!r.docChanged&&!r.selectionSet?i:R_({decorations:i.map(r.mapping,r.doc),ranges:I_(r,a,o),editor:e,options:t,dataAttribute:n,doc:o.doc,selection:o.selection})}}}function B_(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}function V_({editor:e,options:t}){let n=t.dataAttribute?`data-${B_(t.dataAttribute)}`:`data-${T_}`,r=t.showOnlyCurrent&&!t.includeChildren;return new Gn({key:E_,...r?{}:{state:z_({editor:e,options:t,dataAttribute:n})},props:{decorations:r?({doc:r,selection:i})=>A_({editor:e,options:t,dataAttribute:n,doc:r,selection:i}):n=>t.showOnlyWhenEditable&&!e.isEditable?xs.empty:E_.getState(n)??xs.empty}})}rf.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:T_,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[V_({editor:this.editor,options:this.options})]}});function H_(e,t){return!e.selection.empty&&!Au(e.selection)&&t.isEditable}function U_(e,t){return H_(e,t)&&!t.isFocused&&!t.view.dragging}function W_(){var e;(e=window.getSelection())==null||e.removeAllRanges()}function G_(e){e.focus()}rf.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Gn({key:new Jn(`selection`),props:{decorations(n){return U_(n,e)?xs.create(n.doc,[vs.inline(n.selection.from,n.selection.to,{class:t.className})]):null},handleDOMEvents:{blur(t){return H_(t.state,e)&&W_(),!1},focus(t){return H_(t.state,e)&&requestAnimationFrame(()=>{!e.isDestroyed&&t.hasFocus()&&G_(t)}),!1}}}})]}});function K_({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var q_=rf.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new Jn(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new Gn({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!K_({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!K_({node:r,types:n})}}})]}}),J_=rf.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>x_(e,t),redo:()=>({state:e,dispatch:t})=>S_(e,t)}},addProseMirrorPlugins(){return[y_(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()}}}),Y_=rf.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(Vf.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(If.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(jh.configure(this.options.bulletList)),this.options.code!==!1&&e.push(Wf.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(Jf.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(Yf.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(C_.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(w_.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(Xf.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(Zf.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(J_.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(Qf.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(rp.configure(this.options.italic)),this.options.listItem!==!1&&e.push(eg.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(lg.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(Dh.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(Eg.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(Pg.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(Lg.configure(this.options.strike)),this.options.text!==!1&&e.push(Rg.configure(this.options.text)),this.options.underline!==!1&&e.push(zg.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(q_.configure(this.options?.trailingNode)),e}}),X_={DISABLED_SITES:[`cloud.microsoft`,`deepl.com`,`productboard.com`,`openai.com`,`chatgpt.com`],CHROME_AND_FIREFOX_SITES:[`chrome:`,`chrome-extension:`,`about:`,`moz-extension:`],EXPOSE_WITTY_ID_ALLOW_LIST:{dev:[`lndo.site`,`platformsh.site`,`witty.works`],prod:[`witty.works`]},BASE_URLS:{Prod:{api:`https://default.api.witty.works/`,dashboard:`https://dashboard.witty.works/`,posthog_url:`https://eu.posthog.com`,posthog_key:`phc_i1tlvuh1iecIOSEr0QmTEIklrsSJGhULpUwUlf8fkkl`,oauth_client_id:``},Dev:{api:`https://dev-54ta5gq-jyeciedibdzvq.fr-4.platformsh.site/`,dashboard:`https://dev-54ta5gq-56xlfiudba6c2.fr-4.platformsh.site/`,posthog_url:`https://app.posthog.com`,posthog_key:`phc_QiISRw0yFAsndXqYD0HmfGvHaOBMxb57ZRIxlimvR64`,oauth_client_id:``},Local:{api:`http://127.0.0.1:8000/`,dashboard:`https://dashboard.lndo.site/`,posthog_url:`https://app.posthog.com`,posthog_key:`phc_QiISRw0yFAsndXqYD0HmfGvHaOBMxb57ZRIxlimvR64`,oauth_client_id:`1`}},ORTHOGRAPHY:!0,SENTRY_DSN:``,SENTRY_SAMPLE_RATE:0,SENTRY_TRACE_RATE:0,API_DELAY:2e3,REPHRASE_ENABLED:!1,MAX_CHAR_LENGTH_REQUEST:1e3,MAX_CHAR_LENGTH_TOTAL:2e3,MIN_CHAR_LENGTH:50,MAX_POSTHOG_LOG_EVENTS:5e3,POSTHOG_ENABLED:!1},Z_=`2.6.1`;X_.MAX_CHAR_LENGTH_REQUEST;var Q_={...X_.BASE_URLS},$_=Object.keys(Q_);$_.includes(`Prod`)||$_[0];var ev=`https://www.witty.works/en/help/`;`${ev}`,`${ev}`,`${ev}`,`${ev}`,`${ev}`;var tv=[`gendered_roles_format`,`german_gender_ending`,`french_gender_separator`],nv=function(e){return e[e.Off=0]=`Off`,e[e.Basic=1]=`Basic`,e[e.Advanced=2]=`Advanced`,e}({}),rv=(e,t,n)=>n.includes(e)?0:t&&n.includes(t)?1:t?2:1,iv=(e,t,n,r)=>{let i=r.filter(n=>n!==e&&n!==t);return n===0?(i.push(e),t&&i.push(t)):n===1&&t&&i.push(t),i},av={inclusive:{hover:`#BCD485`,default:`#D3E4AC`,highlight:`#BCD485`},corporate:{hover:`#6f9FED`,default:`#A1BEED`,highlight:`#6f9FED`},style:{hover:`#F6EC6B`,default:`#FFFFD3`,highlight:`#F6EC6B`},bias:{hover:`#EB9F46`,default:`#F8E7CB`,highlight:`#EB9F46`},severe:{hover:`#E6635A`,default:`#F7D4D4`,highlight:`#E6635A`}},ov=(e,t)=>t===`corporate_rules`?`corporate`:e?e<1.5?`severe`:e>2.5?`style`:`bias`:`inclusive`,sv=(e,t)=>av[ov(e,t)];X_.EXPOSE_WITTY_ID_ALLOW_LIST?.prod;var H=e=>typeof e==`string`,cv=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},lv=e=>e==null?``:String(e),uv=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},dv=/###/g,fv=e=>e&&e.includes(`###`)?e.replace(dv,`.`):e,pv=e=>!e||H(e),mv=(e,t,n)=>{let r=H(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(pv(e))return{};let t=fv(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return pv(e)?{}:{obj:e,k:fv(r[i])}},hv=(e,t,n)=>{let{obj:r,k:i}=mv(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=mv(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=mv(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},gv=(e,t,n,r)=>{let{obj:i,k:a}=mv(e,t,Object);i[a]=i[a]||[],i[a].push(n)},_v=(e,t)=>{let{obj:n,k:r}=mv(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},vv=(e,t,n)=>{let r=_v(e,n);return r===void 0?_v(t,n):r},yv=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?H(e[r])||e[r]instanceof String||H(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):yv(e[r],t[r],n):e[r]=t[r]);return e},bv=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),xv={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Sv=e=>H(e)?e.replace(/[&<>"'\/]/g,e=>xv[e]):e,Cv=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},wv=[` `,`,`,`?`,`!`,`;`],Tv=new Cv(20),Ev=(e,t,n)=>{t||=``,n||=``;let r=wv.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Tv.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Dv=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Ov=e=>e?.replace(/_/g,`-`),kv={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Av=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||kv,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>H(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),H(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},jv=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Mv=class extends jv{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):H(n)&&i?o.push(...n.split(i)):o.push(n)));let s=_v(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!H(n)?s:Dv(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),hv(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(H(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=_v(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?yv(s,n,i):s={...s,...n},hv(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Nv={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Pv=Symbol(`i18next/PATH_KEY`);function Fv(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Pv?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Iv(e,t){let{[Pv]:n}=e(Fv()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Lv=e=>!H(e)&&typeof e!=`boolean`&&typeof e!=`number`,Rv=class e extends jv{constructor(e,t={}){super(),uv([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Av.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Lv(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ev(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:H(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:H(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Iv(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Iv(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!H(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Lv(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(H(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:Lv(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&H(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=H(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!H(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=H(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Nv.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return H(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Iv(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!H(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(H(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!H(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},zv=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Av.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Ov(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Ov(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(H(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),H(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return H(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):H(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},Bv={zero:0,one:1,two:2,few:3,many:4,other:5},Vv={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Hv=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Av.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Ov(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Vv;if(!e.match(/-|_/))return Vv;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Bv[e]-Bv[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Uv=(e,t,n,r=`.`,i=!0)=>{let a=vv(e,t,n);return!a&&i&&H(n)&&(a=Dv(e,n,r),a===void 0&&(a=Dv(t,n,r))),a},Wv=e=>e.replace(/\$/g,`$$$$`),Gv=class{constructor(e={}){this.logger=Av.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Sv:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?bv(i):a||`{{`,this.suffix=o?bv(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?bv(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?bv(l):``,this.nestingPrefix=d?bv(d):f||bv(`$t(`),this.nestingSuffix=p?bv(p):m||bv(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Uv(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Uv(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0){if(typeof l==`function`){let t=l(e,i,r);a=H(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!H(a)&&!this.useRawValueToEscape&&(a=lv(a));let s=t.safeValue(a);if(e=e.replace(i[0],Wv(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${bv(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!H(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!H(i))return i;H(i)||(i=lv(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Kv=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},qv=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Ov(r),i),t[o]=s),s(n)}},Jv=e=>(t,n,r)=>e(Ov(n),r)(t),Yv=class{constructor(e={}){this.logger=Av.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?qv:Jv;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=qv(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Kv(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Xv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Zv=class extends jv{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Av.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{gv(n.loaded,[i],a),Xv(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();H(e)&&(e=this.languageUtils.toResolveHierarchy(e)),H(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},Qv=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),H(e[1])&&(t.defaultValue=e[1]),H(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),$v=e=>(H(e.ns)&&(e.ns=[e.ns]),H(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),H(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),ey=()=>{},ty=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},ny=class e extends jv{constructor(e={},t){if(super(),this.options=$v(e),this.services={},this.logger=Av,this.modules={external:[]},ty(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(H(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Qv();this.options={...n,...this.options,...$v(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Av.init(r(this.modules.logger),this.options):Av.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Yv;let t=new zv(this.options);this.store=new Mv(this.options.resources,this.options);let n=this.services;n.logger=Av,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Hv(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Gv(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Zv(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Rv(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=ey,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=cv(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ey){let n=t,r=H(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=cv();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=ey,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Nv.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=cv();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=H(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(H(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Iv(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Iv(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Iv(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return H(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=cv();return this.options.ns?(H(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=cv();H(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new zv(Qv());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=ey){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Mv(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Qv().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Gv(n)}return a.translator=new Rv(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();ny.createInstance,ny.dir,ny.init,ny.loadResources,ny.reloadResources,ny.use,ny.changeLanguage,ny.getFixedT,ny.t,ny.exists,ny.setDefaultNamespace,ny.hasLoadedNamespace,ny.loadNamespaces,ny.loadLanguages;var ry=c((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,k(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=k(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=k(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return k(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function A(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ae=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},oe={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=oe,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,ae)}catch(e){ae(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),iy=c(((e,t)=>{t.exports=ry()})),ay=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);fy(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},oy={},sy=(e,t,n,r)=>{fy(n)&&oy[n]||(fy(n)&&(oy[n]=new Date),ay(e,t,n,r))},cy=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},ly=(e,t,n)=>{e.loadNamespaces(t,cy(e,n))},uy=(e,t,n,r)=>{if(fy(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ly(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,cy(e,r))},dy=(e,t,n={})=>!t.languages||!t.languages.length?(sy(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),fy=e=>typeof e==`string`,py=e=>typeof e==`object`&&!!e,my=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,hy={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},gy=e=>hy[e],_y={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(my,gy),transDefaultProps:void 0},vy=(e={})=>{_y={..._y,...e}},yy=()=>_y,by,xy=e=>{by=e},Sy=()=>by,Cy={type:`3rdParty`,init(e){vy(e.options.react),xy(e)}},U=d(iy()),wy=(0,U.createContext)(),Ty=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Ey=c((e=>{var t=iy();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Dy=c(((e,t)=>{t.exports=Ey()}))(),Oy={t:(e,t)=>{if(fy(t))return t;if(py(t)&&fy(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},ky=()=>()=>{},Ay=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,U.useContext)(wy)||{},a=n||r||Sy();a&&!a.reportNamespaces&&(a.reportNamespaces=new Ty),a||sy(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,U.useMemo)(()=>({...yy(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=fy(l)?[l]:l||[`translation`],d=(0,U.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,U.useRef)(0),p=(0,U.useCallback)(e=>{if(!a)return ky;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,U.useRef)(),h=(0,U.useCallback)(()=>{if(!a)return Oy;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>dy(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,U.useState)(0),{t:v,ready:y}=(0,Dy.useSyncExternalStore)(p,h,h);(0,U.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?uy(a,t.lng,d,e):ly(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,U.useRef)(null),S=(0,U.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,U.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(sy(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y){let e=!1;try{e=!1}catch{}throw e&&sy(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?uy(a,t.lng,d,n):ly(a,d,n)})}return w},{slice:jy,forEach:My}=[];function Ny(e){return My.call(jy.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Py(e){return typeof e==`string`&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e))}var Fy=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Iy=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Fy.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!Fy.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},Ly={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Iy(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},Ry={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return Ly.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&Ly.create(n,e,r,i,a)}},zy={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},By={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},Vy=null,Hy=()=>{if(Vy!==null)return Vy;try{if(Vy=typeof window<`u`&&window.localStorage!==null,!Vy)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{Vy=!1}return Vy},Uy={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&Hy())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Hy()&&window.localStorage.setItem(n,e)}},Wy=null,Gy=()=>{if(Wy!==null)return Wy;try{if(Wy=typeof window<`u`&&window.sessionStorage!==null,!Wy)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{Wy=!1}return Wy},Ky={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&Gy())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Gy()&&window.sessionStorage.setItem(n,e)}},qy={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Jy={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},Yy={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},Xy={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Zy=!1;try{document.cookie,Zy=!0}catch{}var Qy=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];Zy||Qy.splice(1,1);var $y=()=>({order:Qy,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),eb=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Ny(t,this.options||{},$y()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Ry),this.addDetector(zy),this.addDetector(Uy),this.addDetector(Ky),this.addDetector(qy),this.addDetector(Jy),this.addDetector(Yy),this.addDetector(Xy),this.addDetector(By)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!Py(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};eb.type=`languageDetector`;var W={pages:{popup:`pages.popup`},common:`common`,popover:`popover`,errors:`errors`,iconController:`iconController`,notifications:`notifications`,options:`options`,editor:`editor`},tb={de:`de`,en:`en`,fr:`fr`},nb={[W.editor]:{toolbar:`Formatierung`,bold:`Fett`,italic:`Kursiv`,underline:`Unterstrichen`,heading:`Überschrift`,bulletList:`Aufzählung`,orderedList:`Nummerierte Liste`,quote:`Zitat`,undo:`Rückgängig`,redo:`Wiederholen`,settings:`Witty-Einstellungen`,closeSettings:`Einstellungen schliessen`,settingsLoading:`Einstellungen werden geladen …`,statusChecking:`Witty prüft den Text …`,statusAlerts_one:`{{count}} Hinweis`,statusAlerts_other:`{{count}} Hinweise`,statusNoAlerts:`Keine Hinweise`,statusUnauthorized:`API-Schlüssel fehlt oder wurde nicht akzeptiert`,statusFailed:`Prüfung fehlgeschlagen`,statusOutdated:`Diese Version des Witty-Editors wird nicht mehr unterstützt. Die Website muss sie aktualisieren.`,statusLanguage:`Witty kann die Sprache dieses Textes nicht erkennen.`,shortcutHint:`Mit Alt+Umschalt+W öffnest du den Hinweis an der Cursorposition.`,limitReached:`Nur ein Teil dieses Textes wurde geprüft.`,menu:`Witty-Menü`,menuSettings:`Einstellungen …`,menuSwitchGender:`Gender-Form wechseln …`,menuHelp:`Hilfe`,menuAbout:`Über Witty`,switchTitle:`Gender-Form wechseln`,switchIntro:`Schreibt alle gegenderten Formen im Text in die gewählte Form um. Mit Rückgängig machst du das in einem Schritt rückgängig.`,switchCurrent:`aktuell`,switching:`Der Text wird geprüft und umgeschrieben …`,switched_one:`{{count}} Form auf {{format}} umgestellt.`,switched_other:`{{count}} Formen auf {{format}} umgestellt.`,switchNothing:`Nichts umzustellen: Der Text verwendet bereits {{format}}.`,switchDisabled:`Das Wechseln der Gender-Form ist für dieses Konto ausgeschaltet.`,switchUnsupported:`Der Server unterstützt das Wechseln der Gender-Form noch nicht.`,switchFromInklusivum:`Nichts umgestellt: Aus dem Inklusivum kann noch nicht in eine andere Form gewechselt werden.`,switchUnsupportedTarget:`Der Server kann noch nicht auf {{format}} umstellen.`,switchUnsupportedNote:`Vom Server noch nicht unterstützt.`,switchUnavailable:`{{format}} ist keine Gender-Form, auf die umgestellt werden kann.`,switchInklusivumNote:`Zusammensetzungen und unbekannte Wörter bleiben, wie sie sind; zurück geht es noch nicht.`,switchGerman:`Deutsch`,switchFrench:`Französisch`,switchForced:`Deine Organisation legt die Gender-Form auf {{format}} fest. Der Text wurde nicht geändert.`},[W.options]:{languageHeadline:`Sprache und Gender-Formen`,genderedRolesFormat:`Generisches Maskulinum`,genderedRolesFormatHint:`Wie soll Witty mit dem generischen Maskulinum in gegenderten Sprachen umgehen?`,germanGenderEnding:`Deutsche Gender-Endung`,germanGenderEndingHint:`Witty empfiehlt den Gendestern.`,frenchGenderSeparator:`Französisches Gender-Trennzeichen`,frenchGenderSeparatorHint:`Witty empfiehlt den Point médian.`,useApiDefault:`Standard des Servers`,levelOff:`Aus`,levelBasic:`Basis`,levelAdvanced:`Erweitert`,levelLocked:`Immer aktiv`,categoriesFailed:`Kategorien konnten nicht geladen werden.`,helpOwnServer:`Eigenen Server einrichten`,helpWithoutDashboard:`Witty ohne Dashboard betreiben`,helpCentre:`Hilfe-Center`,settingsHeadline:`Witty Einstellungen`,connectionHeadline:`Verbindung`,modeAccount:`Konto (Anmeldung über Dashboard)`,modeApiKey:`API-Schlüssel (ohne Dashboard)`,apiKey:`API-Schlüssel`,apiKeyHint:`Wird als x-key an die NLP-API gesendet. Ein Dashboard wird nicht benötigt.`,apiKeyRequired:`API-Schlüssel ist erforderlich.`,customisationHeadline:`Anpassungen`,orthography:`Rechtschreibprüfung`,llmAlternatives:`KI-Vorschläge`,categoriesHeadline:`Kategorien`,categoriesIntro:`Abgewählte Kategorien werden nicht mehr hervorgehoben.`,orgOverrideNote:`Im Konto-Modus können diese Werte von den Vorgaben deiner Organisation überschrieben werden.`,endpointHeadline:`Eigener Server`,endpointIntro:`Zeigt Witty auf deine eigene Installation. Nur ändern, wenn du weisst, was du tust.`,endpointWarning:`Achtung: Der eingetragene Server erhält jeden Text, den du in Eingabefeldern schreibst. Trage nur eine Installation ein, der du vertraust.`,dashboardUrl:`Dashboard-URL`,apiUrl:`NLP-API-URL`,oauthClientId:`OAuth Client ID`,redirectUriHint:`Registriere diese Redirect-URI im OAuth-Client deines Dashboards:`,save:`Speichern und abmelden`,reset:`Auf Standard zurücksetzen`,saved:`Gespeichert. Du wurdest abgemeldet — bitte erneut anmelden.`,resetDone:`Auf Standard zurückgesetzt. Du wurdest abgemeldet.`,invalidUrl:`Bitte eine https-URL angeben (http nur für localhost).`,clientIdRequired:`OAuth Client ID ist erforderlich.`,signOutNotice:`Beim Wechsel des Servers wirst du abgemeldet: Tokens gelten immer nur für einen Server.`,currentEndpoint:`Aktuell verwendet`},[W.common]:{buttons:{ok:`Akzeptieren`,cancel:`Abbrechen`},languages:{en_US:`Englisch (🇺🇸 USA)`,en_GB:`Englisch (🇬🇧 Vereinigtes Königreich)`,de_DE:`Deutsch (🇩🇪 Deutschland)`,de_AT:`Deutsch (🇦🇹 Österreich)`,de_CH:`Deutsch (🇨🇭 Schweiz)`,fr_FR:`Französisch (🇫🇷 Frankreich)`,fr_CH:`Französisch (🇨🇭 Schweiz)`}},[W.pages.popup]:{helpCentre:`Hilfe-Center`,helpSignInFailed:`Hilfe zur Fehlersuche`,extensionSettings:`Erweiterungseinstellungen`,extensionSettingsHint:`Eigener Server, API-Schlüssel und Kategorien`,enableWitty:`Witty aktivieren`,websiteSettings:`Einstellungen für {{domain}}`,developmentSettings:`Entwicklungs-Einstellungen`,spellChecking:`Grammatik & Rechtschreibung`,thanks:`Danke für deinen Beitrag!`,noSupport:`Es tut uns leid! Witty unterstützt diese Webseite noch nicht offiziell.`,vote:`Stimme für diese Webseite ab`,editor:`Nutze stattdessen den Witty Editor`,goToDashboard:`Zum Witty Editor`,overrideRecomendedSites:`Witty hier dennoch aktivieren`,backToRecomendedSites:`Witty nur auf unterstützten Webseiten aktiv`,signedOutText:`Dir entgeht was`,loginToUnlock:`Jetzt anmelden!`,biasDetection:`Erkennung von über 30 Diversitätskategorieren`,inclusiveAlternatives:`Inklusive Alternativvorschläge`,teamFeatures:`Teamfunktionen, inkl. eines geteilten Wörterbuches`,signIn:`Anmelden`,signOut:`Abmelden`,haveAccount:`Hast du schon ein Konto?`,dontHaveAccount:`Hast du noch kein Konto?`,signUp:`Registrieren`,doesWittyWork:`Funktioniert Witty hier?`,doesWittyWorkExplanation:`Lass es uns wissen.`,tryAgain:`Erneut versuchen`,understood:`Verstanden`,websiteSettingsDeactivated:`Du hast uns mitgeteilt, dass Witty auf {{Domain}} nicht funktioniert.`,tryAgainOnThisWebsite:`Erneut auf dieser Website versuchen`,enableWittyFailed:`Currently unable to sync with the Witty Dashboard, try again later.`,lockedInfo:`Diese Funktion wurde von deiner*m Team-Admin gesetzt.`,loggedInTo:`Logged in to`,popupsBlocked:`Popups sind blockiert`,popupsBlockedText:`Um dich anzumelden, kopiere bitte den Link in die Adressleiste deines Browsers.`,copyLink:`Link kopieren`,copiedConfirmation:`URL Kopiert`,signInFailed:`Anmeldung fehlgeschlagen`,signInFailedText:`Die Anmeldung konnte nicht abgeschlossen werden. Bitte versuche es erneut.`,hrFeatures:`Job Ads Add-On`,beta:`Beta`,apiKeyConfiguredNotice:`API Key konfiguriert — keine Anmeldung erforderlich.`,apiKeyAuthFailed:`API Key Authentifizierung fehlgeschlagen ({{status}}): {{message}} — überprüfe den API Key oder Endpunkt.`},[W.popover]:{insteadTry:`Wie wär's mit ...`,learnMore:`Warum`,leanrMoreExtendedText:`Warum das so ist`,ignoreTerm:`Weniger unterstreichen?`,visitSource:`Quelle`,alertOftotal:`von`,removeSpaces:`Extra Leerzeichen entfernen`,loginToUnlock:`Jetzt anmelden!`,signedOutText:`Dir entgeht was`,biasDetection:`Erkennung von über 30 Diversitätskategorieren`,inclusiveAlternatives:`Inklusive Alternativvorschläge`,teamFeatures:`Teamfunktionen, inkl. eines geteilten Wörterbuches`,signIn:`Anmelden`,haveAccount:`Hast du schon ein Konto?`,dontHaveAccount:`Hast du noch kein Konto?`,signUp:`Registrieren`,popupsBlocked:`Popups sind blockiert`,popupsBlockedText:`Um dich anzumelden, kopiere bitte den Link in die Adressleiste deines Browsers.`,copyLink:`Link kopieren`,copiedConfirmation:`URL Kopiert`,signInFailed:`Anmeldung fehlgeschlagen`,signInFailedText:`Die Anmeldung konnte nicht abgeschlossen werden. Bitte versuche es erneut.`,missingOut:`Du verpasst etwas`,bulletPointOne:`Warum ein Begriff unterstrichen wird`,bulletPointTwo:`Inklusive Alternativen`,inclusiveBulletPointOne:`Warum dieser Begriff inklusiv ist`,inclusiveBulletPointTwo:`Weitere inklusive Begriffe`,wittyLogo:`Witty`,new:`neu`,video:`Ein Erklärungsvideo ist verfügbar`,openNewWindow:`Öffnet in einem neuen Fenster`,next:`Nächstes Ergebnis`,previous:`Vorheriges Ergebnis`,close:`Witty schliessen`,suggestionsDialog:`Witty Vorschläge`,removeText:`Entfernen:`,ignoreOnce:`Einmal ignorieren`,ignorePermanently:`Für immer ignorieren`,failedRequestText:`Bitte erneut probieren`,apiKeyConfiguredNotice:`API Key konfiguriert — keine Anmeldung erforderlich.`,lockedByAdmin:``},[W.iconController]:{totalMaxCharLengthReachedNotificationHeadline:`Lange Texte`,totalMaxCharLengthReachedNotificationText:`Witty prüft {{limit}} Zeichen auf einmal. Dein Text hat {{total}} Zeichen — markiere weitere Abschnitte, um sie zu prüfen.`},[W.notifications]:{pinNotificationHeadline:`Pin Witty`,pinNotificationText:`Bitte Witty an die Symbolleiste pinnen.`,totalMaxCharLengthReachedNotificationHeadline:`Lange Texte`,totalMaxCharLengthReachedNotificationText:`Witty prüft {{limit}} Zeichen auf einmal. Dein Text hat {{total}} Zeichen — markiere weitere Abschnitte, um sie zu prüfen.`,updateNotificationHeadline:`Witty wurde aktualisiert`,updateNotificationText:`Witty wurde auf die neuste Version aktualisiert.`,updateNotificationButton:`Änderungen`,minVersionNotInstalledNotificationHeadline:`Du must Witty aktualisieren`,minVersionNotInstalledNotificationText:`Um Witty weiterhin nutzen zu können, müsst Du Witty auf eine neuere Version aktualisieren.`,minVersionNotInstalledNotificationButton:`Aktualisieren`}},rb={[W.editor]:{toolbar:`Formatting`,bold:`Bold`,italic:`Italic`,underline:`Underline`,heading:`Heading`,bulletList:`Bulleted list`,orderedList:`Numbered list`,quote:`Quote`,undo:`Undo`,redo:`Redo`,settings:`Witty settings`,closeSettings:`Close settings`,settingsLoading:`Loading settings…`,statusChecking:`Witty is checking the text…`,statusAlerts_one:`{{count}} suggestion`,statusAlerts_other:`{{count}} suggestions`,statusNoAlerts:`No suggestions`,statusUnauthorized:`API key missing or not accepted`,statusFailed:`Checking failed`,statusOutdated:`This version of the Witty editor is no longer supported. The site needs to update it.`,statusLanguage:`Witty can't tell the language of this text.`,shortcutHint:`Press Alt+Shift+W to open the suggestion at the cursor.`,limitReached:`Only part of this text was checked.`,menu:`Witty menu`,menuSettings:`Settings…`,menuSwitchGender:`Switch gender format…`,menuHelp:`Help`,menuAbout:`About Witty`,switchTitle:`Switch gender format`,switchIntro:`Rewrites every gendered form in the text into the format you choose. Undo reverses it in one step.`,switchCurrent:`current`,switching:`Checking and rewriting the text…`,switched_one:`Switched {{count}} form to {{format}}.`,switched_other:`Switched {{count}} forms to {{format}}.`,switchNothing:`Nothing to switch: the text already uses {{format}}.`,switchDisabled:`Switching the gender format is turned off for this account.`,switchUnsupported:`The server doesn't support switching the gender format yet.`,switchFromInklusivum:`Nothing switched: switching out of the Inklusivum isn't supported yet.`,switchUnsupportedTarget:`The server can't switch to {{format}} yet.`,switchUnsupportedNote:`Not supported by the server yet.`,switchUnavailable:`{{format}} is not a gender format the editor can switch to.`,switchInklusivumNote:`Compounds and words Witty doesn't know stay as written; switching back isn't possible yet.`,switchGerman:`German`,switchFrench:`French`,switchForced:`Your organisation sets the gender format to {{format}}. The text was not changed.`},[W.options]:{languageHeadline:`Language and gender forms`,genderedRolesFormat:`Generic masculine`,genderedRolesFormatHint:`How should Witty handle the generic masculine in gendered languages like German or French?`,germanGenderEnding:`German gender ending`,germanGenderEndingHint:`Witty recommends the genderstar.`,frenchGenderSeparator:`French gender separator`,frenchGenderSeparatorHint:`Witty recommends the point médian.`,useApiDefault:`Server default`,levelOff:`Off`,levelBasic:`Basic`,levelAdvanced:`Advanced`,levelLocked:`Always on`,categoriesFailed:`Could not load categories.`,helpOwnServer:`Connect Witty to your own server`,helpWithoutDashboard:`Run Witty without the dashboard`,helpCentre:`Help Center`,settingsHeadline:`Witty settings`,connectionHeadline:`Connection`,modeAccount:`Account (sign in via dashboard)`,modeApiKey:`API key (no dashboard)`,apiKey:`API key`,apiKeyHint:`Sent as x-key to the NLP API. No dashboard required.`,apiKeyRequired:`An API key is required.`,customisationHeadline:`Customisation`,orthography:`Spell checking`,llmAlternatives:`AI suggestions`,categoriesHeadline:`Categories`,categoriesIntro:`Categories you switch off are no longer highlighted.`,orgOverrideNote:`In account mode your organisation settings may override these.`,endpointHeadline:`Custom server`,endpointIntro:`Point Witty at your own deployment. Only change this if you know what you are doing.`,endpointWarning:`Warning: the server you enter receives every text you write in input fields. Only enter a deployment you trust.`,dashboardUrl:`Dashboard URL`,apiUrl:`NLP API URL`,oauthClientId:`OAuth client ID`,redirectUriHint:`Register this redirect URI on your dashboard OAuth client:`,save:`Save and sign out`,reset:`Reset to default`,saved:`Saved. You have been signed out — please sign in again.`,resetDone:`Reset to default. You have been signed out.`,invalidUrl:`Enter an https URL (http is allowed for localhost only).`,clientIdRequired:`OAuth client ID is required.`,signOutNotice:`Changing server signs you out: tokens are only ever valid for one server.`,currentEndpoint:`Currently using`},[W.common]:{buttons:{ok:`Ok`,cancel:`Cancel`},languages:{en_GB:`English (🇬🇧 Great Britain)`,en_US:`English (🇺🇸 USA)`,de_DE:`German (🇩🇪 Germany)`,de_AT:`German (🇦🇹 Austrian)`,de_CH:`German (🇨🇭 Switzerland)`,fr_FR:`French (🇫🇷 France)`,fr_CH:`French (🇨🇭 Switzerland)`}},[W.pages.popup]:{helpCentre:`Help Center`,helpSignInFailed:`Troubleshooting help`,extensionSettings:`Extension settings`,extensionSettingsHint:`Custom server, API key and categories`,enableWitty:`Enable Witty`,websiteSettings:`Settings for {{domain}}`,developmentSettings:`Development Settings`,spellChecking:`Check grammar & spelling`,thanks:`Thanks for your feedback!`,noSupport:`We’re sorry! Witty doesn’t yet officially support this website.`,vote:`Vote for this website`,editor:`Use the Witty Editor instead`,goToDashboard:`Go to Witty Editor`,overrideRecomendedSites:`Try Witty here anyway`,backToRecomendedSites:`Use Witty only on supported websites`,loginToUnlock:`Log in now!`,signedOutText:`You are missing out`,biasDetection:`Bias detection in 30+ diversity dimensions`,inclusiveAlternatives:`Alternatives for inclusive writing`,teamFeatures:`Team features, incl. shared dictionaries`,signIn:`Sign In`,signOut:`Sign out`,haveAccount:`Already have an account?`,dontHaveAccount:`Don’t have an account?`,signUp:`Sign up`,doesWittyWork:`Does Witty work here?`,doesWittyWorkExplanation:`Please help us to find out.`,tryAgain:`Try again`,understood:`Understood`,websiteSettingsDeactivated:`You reported that Witty does not work on {{domain}}`,tryAgainOnThisWebsite:`Try again on this website`,enableWittyFailed:`Die Synchronisierung mit Witty Dashboard ist aktuell nicht möglich, versuchen Sie es später noch einmal.`,lockedInfo:`This feature has been locked by your team admin.`,loggedInTo:`Logged in to`,popupsBlocked:`Popups are blocked`,popupsBlockedText:`To log in, please copy and paste the link into your browser's URL bar.`,copyLink:`Copy Link`,copiedConfirmation:`link Copied`,signInFailed:`Sign-in failed`,signInFailedText:`We could not complete the sign-in. Please try again.`,hrFeatures:`Job Ads Add-On`,beta:`Beta`,apiKeyConfiguredNotice:`API key configured — no sign-in required.`,apiKeyAuthFailed:`API key authentication failed ({{status}}): {{message}} — check your API key or endpoint.`},[W.popover]:{insteadTry:`Try instead ...`,learnMore:`Why`,leanrMoreExtendedText:`Dig deeper`,ignoreTerm:`Highlight less?`,visitSource:`Source`,alertOftotal:`of`,removeSpaces:`(Remove extra spaces)`,loginToUnlock:`Log in now!`,signedOutText:`You are missing out`,biasDetection:`Bias detection in 30+ diversity dimensions`,inclusiveAlternatives:`Alternatives for inclusive writing`,teamFeatures:`Team features, incl. shared dictionaries`,signIn:`Sign In`,haveAccount:`Already have an account?`,dontHaveAccount:`Don’t have an account?`,signUp:`Sign up`,popupsBlocked:`Popups are blocked`,popupsBlockedText:`Please copy and paste the link into your browser URL bar.`,copyLink:`Copy Link`,copiedConfirmation:`link Copied`,signInFailed:`Sign-in failed`,signInFailedText:`We could not complete the sign-in. Please try again.`,missingOut:`You are missing out`,bulletPointOne:`Why this term is biased`,bulletPointTwo:`Inclusive alternatives for this term`,inclusiveBulletPointOne:`Why this term is inclusive`,inclusiveBulletPointTwo:`More inclusive terms`,wittyLogo:`Witty`,new:`new`,video:`A video is available for more learning`,openNewWindow:`Opens in a new window`,next:`Next result`,previous:`Previous result`,close:`Close Witty`,suggestionsDialog:`Witty suggestions`,removeText:`Remove:`,ignoreOnce:`Ignore once`,ignorePermanently:`Ignore permanently`,failedRequestText:`Failed, please try again`,apiKeyConfiguredNotice:`API key configured — no sign-in required.`,lockedByAdmin:``},[W.errors]:{errorMessageGenericTitle:`Ouch! Something went wrong!`,reloadWebsite:`Please reload the website`},[W.iconController]:{totalMaxCharLengthReachedNotificationHeadline:`Long texts`,totalMaxCharLengthReachedNotificationText:`Witty checks {{limit}} characters at a time. Your text has {{total}} characters — select further sections to check them.`},[W.notifications]:{pinNotificationHeadline:`Pin Witty`,pinNotificationText:`Remember to pin Witty to your browser toolbar.`,totalMaxCharLengthReachedNotificationHeadline:`Long texts`,totalMaxCharLengthReachedNotificationText:`Witty checks {{limit}} characters at a time. Your text has {{total}} characters — select further sections to check them.`,updateNotificationHeadline:`Witty was updated`,updateNotificationText:`Witty was updated to the latest version.`,updateNotificationButton:`View changes`,minVersionNotInstalledNotificationHeadline:`You need to update Witty`,minVersionNotInstalledNotificationText:`In order to continue using Witty, you need to update Witty to a newer version.`,minVersionNotInstalledNotificationButton:`How to update`}},ib={[W.editor]:{toolbar:`Mise en forme`,bold:`Gras`,italic:`Italique`,underline:`Souligné`,heading:`Titre`,bulletList:`Liste à puces`,orderedList:`Liste numérotée`,quote:`Citation`,undo:`Annuler`,redo:`Rétablir`,settings:`Paramètres Witty`,closeSettings:`Fermer les paramètres`,settingsLoading:`Chargement des paramètres…`,statusChecking:`Witty vérifie le texte…`,statusAlerts_one:`{{count}} suggestion`,statusAlerts_other:`{{count}} suggestions`,statusNoAlerts:`Aucune suggestion`,statusUnauthorized:`Clé API manquante ou refusée`,statusFailed:`La vérification a échoué`,statusOutdated:`Cette version de l'éditeur Witty n'est plus prise en charge. Le site doit la mettre à jour.`,statusLanguage:`Witty ne reconnaît pas la langue de ce texte.`,shortcutHint:`Appuyez sur Alt+Maj+W pour ouvrir la suggestion à la position du curseur.`,limitReached:`Seule une partie de ce texte a été vérifiée.`,menu:`Menu Witty`,menuSettings:`Paramètres…`,menuSwitchGender:`Changer la forme inclusive…`,menuHelp:`Aide`,menuAbout:`À propos de Witty`,switchTitle:`Changer la forme inclusive`,switchIntro:`Réécrit toutes les formes genrées du texte dans la forme choisie. Annuler rétablit le texte en une seule étape.`,switchCurrent:`actuelle`,switching:`Vérification et réécriture du texte…`,switched_one:`{{count}} forme convertie en {{format}}.`,switched_other:`{{count}} formes converties en {{format}}.`,switchNothing:`Rien à changer : le texte utilise déjà {{format}}.`,switchDisabled:`Le changement de forme inclusive est désactivé pour ce compte.`,switchUnsupported:`Le serveur ne permet pas encore de changer la forme inclusive.`,switchFromInklusivum:`Rien n'a été converti : le passage de l'Inklusivum à une autre forme n'est pas encore possible.`,switchUnsupportedTarget:`Le serveur ne peut pas encore convertir en {{format}}.`,switchUnsupportedNote:`Pas encore pris en charge par le serveur.`,switchUnavailable:`{{format}} n'est pas une forme inclusive vers laquelle convertir.`,switchInklusivumNote:`Les mots composés et les mots inconnus restent tels quels ; le retour n'est pas encore possible.`,switchGerman:`Allemand`,switchFrench:`Français`,switchForced:`Votre organisation impose la forme inclusive {{format}}. Le texte n'a pas été modifié.`},[W.options]:{languageHeadline:`Langue et formes de genre`,genderedRolesFormat:`Masculin générique`,genderedRolesFormatHint:`Comment Witty doit-il traiter le masculin générique dans les langues genrées ?`,germanGenderEnding:`Terminaison de genre allemande`,germanGenderEndingHint:`Witty recommande le genderstar.`,frenchGenderSeparator:`Séparateur de genre français`,frenchGenderSeparatorHint:`Witty recommande le point médian.`,useApiDefault:`Valeur par défaut du serveur`,levelOff:`Désactivé`,levelBasic:`Base`,levelAdvanced:`Avancé`,levelLocked:`Toujours actif`,categoriesFailed:`Impossible de charger les catégories.`,helpOwnServer:`Connecter Witty à votre propre serveur`,helpWithoutDashboard:`Utiliser Witty sans tableau de bord`,helpCentre:`Centre d’aide`,settingsHeadline:`Paramètres Witty`,connectionHeadline:`Connexion`,modeAccount:`Compte (connexion via le tableau de bord)`,modeApiKey:`Clé API (sans tableau de bord)`,apiKey:`Clé API`,apiKeyHint:`Envoyée comme x-key à l'API NLP. Aucun tableau de bord requis.`,apiKeyRequired:`Une clé API est requise.`,customisationHeadline:`Personnalisation`,orthography:`Correction orthographique`,llmAlternatives:`Suggestions IA`,categoriesHeadline:`Catégories`,categoriesIntro:`Les catégories désactivées ne sont plus mises en évidence.`,orgOverrideNote:`En mode compte, les paramètres de votre organisation peuvent les remplacer.`,endpointHeadline:`Serveur personnalisé`,endpointIntro:`Pointez Witty vers votre propre installation. Ne modifiez ceci que si vous savez ce que vous faites.`,endpointWarning:`Attention : le serveur indiqué reçoit tout texte que vous saisissez dans les champs. N'indiquez qu'une installation de confiance.`,dashboardUrl:`URL du tableau de bord`,apiUrl:`URL de l'API NLP`,oauthClientId:`ID client OAuth`,redirectUriHint:`Enregistrez cette URI de redirection sur le client OAuth de votre tableau de bord :`,save:`Enregistrer et se déconnecter`,reset:`Réinitialiser`,saved:`Enregistré. Vous avez été déconnecté·e — veuillez vous reconnecter.`,resetDone:`Réinitialisé. Vous avez été déconnecté·e.`,invalidUrl:`Indiquez une URL https (http uniquement pour localhost).`,clientIdRequired:`L'ID client OAuth est requis.`,signOutNotice:`Changer de serveur vous déconnecte : les jetons ne sont valables que pour un seul serveur.`,currentEndpoint:`Actuellement utilisé`},[W.common]:{buttons:{ok:`Ok`,cancel:`Annuler`},languages:{en_US:`Anglais (🇺🇸 USA)`,en_GB:`Anglais (🇬🇧 Royaume-Uni)`,de_DE:`Allemand (🇩🇪 Allemagne)`,de_AT:`Allemand (🇦🇹 Autriche)`,de_CH:`Allemand (🇨🇭 Suisse)`,fr_FR:`Français (🇫🇷 France)`,fr_CH:`Français (🇨🇭 Suisse)`}},[W.pages.popup]:{helpCentre:`Centre d’aide`,helpSignInFailed:`Aide au dépannage`,extensionSettings:`Paramètres de l’extension`,extensionSettingsHint:`Serveur personnalisé, clé API et catégories`,enableWitty:`Activer Witty`,websiteSettings:`Paramètres pour {{domain}}`,developmentSettings:`Paramètres de développement`,spellChecking:`Vérifier la grammaire et l'orthographe`,thanks:`Merci pour votre retour !`,noSupport:`Nous sommes désolés ! Witty ne prend pas encore officiellement en charge ce site web.`,vote:`Votez pour ce site web`,editor:`Utiliser l'éditeur Witty à la place`,goToDashboard:`Aller à l'éditeur Witty`,overrideRecomendedSites:`Essayer Witty ici quand même`,backToRecomendedSites:`Utiliser Witty uniquement sur les sites pris en charge`,loginToUnlock:`Connectez-vous maintenant !`,signedOutText:`Vous manquez quelque chose`,biasDetection:`Détection des biais dans plus de 30 dimensions de diversité`,inclusiveAlternatives:`Alternatives pour une écriture inclusive`,teamFeatures:`Fonctionnalités d'équipe, y compris des dictionnaires partagés`,signIn:`Se connecter`,signOut:`Se déconnecter`,haveAccount:`Vous avez déjà un compte ?`,dontHaveAccount:`Vous n'avez pas de compte ?`,signUp:`S'inscrire`,doesWittyWork:`Witty fonctionne-t-il ici ?`,doesWittyWorkExplanation:`Aidez-nous à le découvrir, s'il vous plaît.`,tryAgain:`Réessayer`,understood:`Compris`,websiteSettingsDeactivated:`Vous avez signalé que Witty ne fonctionne pas sur {{domain}}`,tryAgainOnThisWebsite:`Réessayez sur ce site web`,enableWittyFailed:`La synchronisation avec le tableau de bord Witty est actuellement impossible, veuillez réessayer plus tard.`,lockedInfo:`Cette fonctionnalité a été verrouillée par votre·e administrateur·trice d'équipe.`,loggedInTo:`Connecté·e à`,popupsBlocked:`Les pop-ups sont bloqués`,popupsBlockedText:`Pour vous connecter, veuillez copier et coller le lien dans la barre d'URL de votre navigateur.`,copyLink:`Copier le lien`,copiedConfirmation:`Lien copié`,signInFailed:`Échec de la connexion`,signInFailedText:`La connexion n'a pas pu aboutir. Veuillez réessayer.`,hrFeatures:`Add-on pour les offres d'emploi`,beta:`Bêta`,apiKeyConfiguredNotice:`Clé API configurée — aucune connexion requise.`,apiKeyAuthFailed:`Échec de l'authentification de la clé API ({{status}}) : {{message}} — vérifiez votre clé API ou le point de terminaison.`},[W.popover]:{insteadTry:`Essayez plutôt ...`,learnMore:`Pourquoi`,leanrMoreExtendedText:`En savoir plus`,ignoreTerm:`Mettre moins en évidence ?`,visitSource:`Source`,alertOftotal:`de`,removeSpaces:`(Retirer les espaces supplémentaires)`,loginToUnlock:`Connectez-vous maintenant !`,signedOutText:`Vous manquez quelque chose`,biasDetection:`Détection des biais dans plus de 30 dimensions de diversité`,inclusiveAlternatives:`Alternatives pour une écriture inclusive`,teamFeatures:`Fonctionnalités d'équipe, y compris des dictionnaires partagés`,signIn:`Se connecter`,haveAccount:`Vous avez déjà un compte ?`,dontHaveAccount:`Vous n'avez pas de compte ?`,signUp:`S'inscrire`,popupsBlocked:`Les pop-ups sont bloqués`,popupsBlockedText:`Veuillez copier et coller le lien dans la barre d'URL de votre navigateur.`,copyLink:`Copier le lien`,copiedConfirmation:`Lien copié`,signInFailed:`Échec de la connexion`,signInFailedText:`La connexion n'a pas pu aboutir. Veuillez réessayer.`,missingOut:`Vous manquez quelque chose`,bulletPointOne:`Pourquoi ce terme est biaisé`,bulletPointTwo:`Alternatives inclusives pour ce terme`,inclusiveBulletPointOne:`Pourquoi ce terme est inclusif`,inclusiveBulletPointTwo:`Termes plus inclusifs`,wittyLogo:`Witty`,new:`nouveau·elle`,video:`Une vidéo d'explication est disponible`,openNewWindow:`Ouverture dans une nouvelle fenêtre`,next:`Résultat suivant`,previous:`Résultat précédent`,close:`Fermer Witty`,suggestionsDialog:`Suggestions Witty`,removeText:`Supprimer :`,ignoreOnce:`Ignorer une fois`,ignorePermanently:`Ignorer définitivement`,failedRequestText:`Échec, veuillez réessayer`,apiKeyConfiguredNotice:`Clé API configurée — aucune connexion requise.`,lockedByAdmin:``},[W.errors]:{errorMessageGenericTitle:`Oups ! Quelque chose a mal tourné !`,reloadWebsite:`Veuillez recharger le site web`},[W.iconController]:{totalMaxCharLengthReachedNotificationHeadline:`Textes longs`,totalMaxCharLengthReachedNotificationText:`Witty vérifie {{limit}} caractères à la fois. Votre texte compte {{total}} caractères — sélectionnez d'autres sections pour les vérifier.`},[W.notifications]:{pinNotificationHeadline:`Épingler Witty`,pinNotificationText:`N'oubliez pas d'épingler Witty dans la barre d'outils de votre navigateur.`,totalMaxCharLengthReachedNotificationHeadline:`Textes longs`,totalMaxCharLengthReachedNotificationText:`Witty vérifie {{limit}} caractères à la fois. Votre texte compte {{total}} caractères — sélectionnez d'autres sections pour les vérifier.`,updateNotificationHeadline:`Witty a été mis à jour`,updateNotificationText:`Witty a été mis à jour vers la dernière version.`,updateNotificationButton:`Voir les changements`,minVersionNotInstalledNotificationHeadline:`Vous devez mettre à jour Witty`,minVersionNotInstalledNotificationText:`Pour continuer à utiliser Witty, vous devez mettre à jour Witty vers une version plus récente.`,minVersionNotInstalledNotificationButton:`Comment mettre à jour`}},ab={[tb.en]:rb,[tb.de]:nb,[tb.fr]:ib};delete ab.fr;var ob=()=>{ny.isInitialized||ny.use(eb).use(Cy).init({detection:{order:[`navigator`]},resources:ab,fallbackLng:`en`})},sb=e=>{switch((e??``).toLowerCase().split(`-`)[0]){case`de`:return`de`;case`fr`:return`fr`;default:return`en`}},cb=e=>{switch((e??``).toLowerCase()){case`de-de`:return`de-DE`;case`de-ch`:return`de-CH`;case`de-at`:return`de-AT`;case`en-us`:return`en-US`;case`en-gb`:return`en-GB`;case`fr-fr`:return`fr-FR`;default:return sb(e)}},lb=`v2.4/check`,ub=`v1.0/rephrase`,db=`v2.0/config-options`,fb=e=>`v2.0/categories?locale=${cb(e)}`,pb={Accept:`application/json`,"Content-Type":`application/json`},mb=e=>e.apiKey?{"x-key":e.apiKey}:e.token?{Authorization:`Bearer ${e.token}`}:{},hb=e=>{let{text:t,lang:n=`auto`,id:r,client:i,config:a}=e;return{text:t,lang:n,id:r,client:i,...a===void 0?{}:{config:a},...e.configHash===void 0?{}:{config_hash:e.configHash},...e.organizationConfigHash===void 0?{}:{organization_config_hash:e.organizationConfigHash}}},gb=(e,t)=>({sentence:e.raw,text:t.data.text,start:t.absOffset-e.range[0],gender_separator:t.data.gender_separator,alternatives:t.data.alternatives.filter(e=>!e.remove),lang:t.data.language||`en`}),_b=3e3,vb=e=>{if(!e)return;let t=Object.entries(e).filter(([,e])=>e!==void 0);return t.length?Object.fromEntries(t):void 0},yb=3e4,bb=class extends Error{constructor(e){super(`check failed: no answer within ${e/1e3}s`),this.name=`CheckTimeoutError`}},xb=(e,t)=>{if(e?.startsWith(`de`))return t?.german_gender_ending;if(e?.startsWith(`fr`))return t?.french_gender_separator},Sb=(e,t)=>{let n;try{n=new URL(e??`/`,t)}catch{throw TypeError(`endpoint is not a URL: ${String(e)}`)}if(n.protocol!==`https:`&&n.protocol!==`http:`)throw TypeError(`endpoint must be an http(s) URL: ${String(e)}`);return n.search=``,n.hash=``,n.pathname.endsWith(`/`)||(n.pathname=`${n.pathname}/`),n.href},Cb=`witty-editor:${Z_}`,wb=class extends Error{status;detail;types;constructor(e,t,n=[]){super(`check failed: HTTP ${e}${t?`: ${t}`:``}`),this.status=e,this.detail=t,this.types=n,this.name=`CheckHttpError`}},Tb=async e=>{try{let{detail:t}=await e.json();if(typeof t==`string`)return{detail:t,types:[]};if(Array.isArray(t))return{detail:t.map(({loc:e,msg:t})=>[e?.slice(1).join(`.`),t].filter(Boolean).join(`: `)).join(`; `),types:t.flatMap(({type:e})=>e?[e]:[])}}catch{}return{types:[]}},Eb=({endpoint:e,headers:t,lang:n=`auto`,client:r=Cb,id:i=`witty-editor`,config:a,timeoutMs:o=yb})=>async(s,c)=>{let l=vb(a?.()),u=new AbortController,d=()=>u.abort();c.aborted&&d(),c.addEventListener(`abort`,d);let f=!1,p=setTimeout(()=>{f=!0,u.abort()},o);try{let a=await fetch(`${e}${lb}`,{method:`POST`,signal:u.signal,headers:{...pb,...t?await t():{}},body:JSON.stringify(hb({text:s,lang:n,id:i,client:r,config:l}))});if(!a.ok){let{detail:e,types:t}=await Tb(a);throw new wb(a.status,e,t)}return await a.json()}catch(e){throw f?new bb(o):e}finally{clearTimeout(p),c.removeEventListener(`abort`,d)}};function Db(e){if(e.type===`Sentence`)return e;if(`children`in e&&Array.isArray(e.children))return e.children.find(e=>e.type===`Sentence`)}var Ob=(e,t,n,r)=>`${e}-${t}-${n}-${r}`,kb=(e,t)=>{if(e===` `)return{text:``,scope:`alert`};let n=e.replace(/\(\(/g,`[`).replace(/\)\)/g,`]`),r=t?.get(n);return r?{text:r,scope:`sentence`}:{text:n,scope:`alert`}},Ab;(function(e){e.Document=`Document`,e.DocumentExit=`Document:exit`,e.Paragraph=`Paragraph`,e.ParagraphExit=`Paragraph:exit`,e.BlockQuote=`BlockQuote`,e.BlockQuoteExit=`BlockQuote:exit`,e.ListItem=`ListItem`,e.ListItemExit=`ListItem:exit`,e.List=`List`,e.ListExit=`List:exit`,e.Header=`Header`,e.HeaderExit=`Header:exit`,e.CodeBlock=`CodeBlock`,e.CodeBlockExit=`CodeBlock:exit`,e.HtmlBlock=`HtmlBlock`,e.HtmlBlockExit=`HtmlBlock:exit`,e.HorizontalRule=`HorizontalRule`,e.HorizontalRuleExit=`HorizontalRule:exit`,e.Comment=`Comment`,e.CommentExit=`Comment:exit`,e.ReferenceDef=`ReferenceDef`,e.ReferenceDefExit=`ReferenceDef:exit`,e.Str=`Str`,e.StrExit=`Str:exit`,e.Break=`Break`,e.BreakExit=`Break:exit`,e.Emphasis=`Emphasis`,e.EmphasisExit=`Emphasis:exit`,e.Strong=`Strong`,e.StrongExit=`Strong:exit`,e.Html=`Html`,e.HtmlExit=`Html:exit`,e.Link=`Link`,e.LinkExit=`Link:exit`,e.Image=`Image`,e.ImageExit=`Image:exit`,e.Code=`Code`,e.CodeExit=`Code:exit`,e.Delete=`Delete`,e.DeleteExit=`Delete:exit`,e.Table=`Table`,e.TableExit=`Table:exit`,e.TableRow=`TableRow`,e.TableRowExit=`TableRow:exit`,e.TableCell=`TableCell`,e.TableCellExit=`TableCell:exit`})(Ab||={});var jb=c((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.binarySearch=e.upperBound=e.lowerBound=e.compare=void 0;function t(e,t){return e<t}e.compare=t;function n(e,n,r=t){let i=e.length,a=0;for(;i;){let t=i>>>1,o=a+t;r(n,e[o])?i=t:(a=o+1,i-=t+1)}return a}e.upperBound=n;function r(e,n,r=t){let i=e.length,a=0;for(;i;){let t=i>>>1,o=a+t;r(e[o],n)?(a=o+1,i-=t+1):i=t}return a}e.lowerBound=r;function i(e,n,i=t){let a=r(e,n,i);return a!==e.length&&!i(n,e[a])}e.binarySearch=i})),Mb=c((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StructuredSource=void 0;var t=jb();e.StructuredSource=class{constructor(e){this.indice=[0];let t=/[\r\n\u2028\u2029]/g,n=e.length;for(t.lastIndex=0;;){let r=t.exec(e);if(!r)break;let i=r.index;e.charCodeAt(i)===13&&e.charCodeAt(i+1)===10&&(i+=1);let a=i+1;if(n<a)break;this.indice.push(a),t.lastIndex=a}}get line(){return this.indice.length}locationToRange(e){return[this.positionToIndex(e.start),this.positionToIndex(e.end)]}rangeToLocation(e){return{start:this.indexToPosition(e[0]),end:this.indexToPosition(e[1])}}positionToIndex(e){return this.indice[e.line-1]+e.column}indexToPosition(e){let n=(0,t.upperBound)(this.indice,e);return{line:n,column:e-this.indice[n-1]}}}}))(),Nb=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},Pb=class{index=0;source;textCharacters;sourceNode;contexts=[];consumedContexts=[];contextRanges=[];firstChildPadding;startOffset;constructor(e){if(typeof e==`string`)this.textCharacters=e.split(``),this.source=new Mb.StructuredSource(e),this.startOffset=0,this.firstChildPadding=0;else{this.sourceNode=e,this.startOffset=this.sourceNode.range[0],this.index=this.startOffset;let t=Array.from(Array(this.sourceNode.loc.start.line-1)).fill(`
132
+ `),n=Array.from(Array(this.startOffset-t.length)).fill(`∯`),r=e.raw.split(``);this.textCharacters=[...t,...n,...r],this.source=new Mb.StructuredSource(this.textCharacters.join(``)),this.firstChildPadding=this.sourceNode.children[0]?this.sourceNode.children[0].range[0]-this.startOffset:0}}get length(){return this.textCharacters.length}markContextRange(e){this.contextRanges.push(e)}isInContextRange(){let e=this.offset;return this.contextRanges.some(t=>t[0]<=e&&e<t[1])}enterContext(e){this.contexts.push([e,this.index])}isInContext(e){return e?this.contexts.some(t=>t[0].key===e.key):this.contexts.length>0}leaveContext(e){let t=Nb(this.contexts,t=>t[0].key===e.key);if(t!==-1){let e=this.contexts[t];this.contexts.splice(t,1);let n=[e[1],this.index];this.consumedContexts.push({pairMark:e[0],range:[e[1],this.index],loc:this.source.rangeToLocation(n)})}}get offset(){return this.index+this.firstChildPadding}now(){let e=this.offset,t=this.source.indexToPosition(e);return{line:t.line,column:t.column,offset:e}}get hasEnd(){return this.read()===!1}read(e=0){let t=this.offset+e;return t<this.startOffset?!1:0<=t&&t<this.textCharacters.length&&this.textCharacters[t]}readNode(e=0){if(!this.sourceNode)return!1;let t=this.offset+e;if(t<this.startOffset)return!1;let n=this.sourceNode.children.filter(e=>e.range[0]<=t&&t<e.range[1]);return n.length>0&&n[n.length-1]}peek(){this.index+=1}peekNode(e){this.index+=e.range[1]-e.range[0]}seekNext(e){let t=this.now();e.seek(this);let n=this.now();return{value:this.sliceRange(t.offset,n.offset),startPosition:t,endPosition:n}}sliceRange(e,t){return this.textCharacters.slice(e,t).join(``)}},Fb=class{test(e){let t=e.read();return t?/[\r\n]/.test(t):!1}seek(e){for(;this.test(e);)e.peek()}},Ib=class{test(e){let t=e.read();return t?/[^\S\n\r]/.test(t):!1}seek(e){for(;this.test(e);)e.peek()}},Lb={separatorCharacters:[`.`,`.`,`。`,`?`,`!`,`?`,`!`]},Rb=class{options;separatorCharacters;constructor(e){this.options=e,this.separatorCharacters=e&&e.separatorCharacters?e.separatorCharacters:Lb.separatorCharacters}test(e){if(e.isInContext()||e.isInContextRange())return!1;let t=e.read(),n=e.read(1);return!t||!this.separatorCharacters.includes(t)?!1:t!==`.`||!n||/[\s\t\r\n]/.test(n)}seek(e){for(;this.test(e);)e.peek()}},zb=typeof process==`object`&&process?.env?.DEBUG===`sentence-splitter`;function Bb(e,t){zb&&console.log(`sentence-splitter: `+e,t)}function Vb(...e){zb&&console.log(`sentence-splitter: `,...e.map(e=>typeof e==`string`?e.replace(/\n/g,`\\n`):e))}var Hb=class{parsers;markers;constructor(e){this.parsers=e.parsers,this.markers=e.markers}test(e){return!e.hasEnd&&this.parsers.every(t=>!t.test(e))}seek(e){let t=e.readNode();if(!t){for(;this.test(e);)this.markers.forEach(t=>t.mark(e)),e.peek();return}let n=()=>{let n=e.offset;return t.range[0]<=n&&n<t.range[1]};for(;n()&&this.test(e);)Bb(e.offset,e.read()),this.markers.forEach(t=>t.mark(e)),e.peek()}},Ub={ABBREVIATIONS:`Adj.,Adm.,Adv.,Al.,Ala.,Alta.,Apr.,Arc.,Ariz.,Ark.,Art.,Assn.,Asst.,Attys.,Aug.,Ave.,Bart.,Bld.,Bldg.,Blvd.,Brig.,Bros.,Btw.,Cal.,Calif.,Capt.,Cl.,Cmdr.,Co.,Col.,Colo.,Comdr.,Con.,Conn.,Corp.,Cpl.,Cres.,Ct.,D.phil.,Dak.,Dec.,Del.,Dept.,Det.,Dist.,Dr.,Dr.phil.,Dr.philos.,Drs.,E.g.,Ens.,Esp.,Esq.,Etc.,Exp.,Expy.,Ext.,Feb.,Fed.,Fla.,Ft.,Fwy.,Fy.,Ga.,Gen.,Gov.,Hon.,Hosp.,Hr.,Hway.,Hwy.,I.e.,Ia.,Id.,Ida.,Ill.,Inc.,Ind.,Ing.,Insp.,Is.,Jan.,Jr.,Jul.,Jun.,Kan.,Kans.,Ken.,Ky.,La.,Lt.,Ltd.,Maj.,Man.,Mar.,Mass.,May.,Md.,Me.,Med.,Messrs.,Mex.,Mfg.,Mich.,Min.,Minn.,Miss.,Mlle.,Mm.,Mme.,Mo.,Mont.,Mr.,Mrs.,Ms.,Msgr.,Mssrs.,Mt.,Mtn.,Neb.,Nebr.,Nev.,No.,Nos.,Nov.,Nr.,Oct.,Ok.,Okla.,Ont.,Op.,Ord.,Ore.,P.,Pa.,Pd.,Pde.,Penn.,Penna.,Pfc.,Ph.,Ph.d.,Pl.,Plz.,Pp.,Prof.,Pvt.,Que.,Rd.,Rs.,Ref.,Rep.,Reps.,Res.,Rev.,Rt.,Sask.,Sec.,Sen.,Sens.,Sep.,Sept.,Sfc.,Sgt.,Sr.,St.,Supt.,Surg.,Tce.,Tenn.,Tex.,Univ.,Usafa.,U.S.,Ut.,Va.,V.,Ver.,Vs.,Vt.,Wash.,Wis.,Wisc.,Wy.,Wyo.,Yuk.`.split(`,`),PREPOSITIVE_ABBREVIATIONS:`Adm.,Attys.,Brig.,Capt.,Cmdr.,Col.,Cpl.,Det.,Dr.,Gen.,Gov.,Ing.,Lt.,Maj.,Mr.,Mrs.,Ms.,Mt.,Messrs.,Mssrs.,Prof.,Ph.,Rep.,Reps.,Rev.,Sen.,Sens.,Sgt.,St.,Supt.,V.,Vs.`.split(`,`),EXCLAMATION_WORDS:[`!Xũ`,`!Kung`,`ǃʼOǃKung`,`!Xuun`,`!Kung-Ekoka`,`ǃHu`,`ǃKhung`,`ǃKu`,`ǃung`,`ǃXo`,`ǃXû`,`ǃXung`,`ǃXũ`,`!Xun`,`Yahoo!`,`Y!J`,`Yum!`]},Wb=e=>!e||e.length===0?!1:/^\p{Uppercase_Letter}/u.test(e),Gb=(e,t)=>e.toLowerCase()===t.toLowerCase(),Kb=e=>/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u.test(e),qb={language:Ub},Jb=class{options;lang;constructor(e){this.options=e,this.lang=e&&e.language?e.language:qb.language}getWord(e,t=0){let n=/\s/,r=e.read(-1);if(r&&!n.test(r)&&!Kb(r))return``;let i=``,a=t,o=``;for(;(o=e.read(a))&&!(n.test(o)||Kb(o));)i+=o,a++;return i}getPrevWord(e){let t=/\s/,n=-1,r=``;for(;(r=e.read(n))&&t.test(r);)n--;for(;(r=e.read(n))&&!t.test(r);)n--;return this.getWord(e,n+1)}mark(e){if(e.isInContextRange())return;let t=this.getWord(e);if(t.length===0)return;if(/^([a-zA-Z]\.){3,}$/.test(t)||this.lang.EXCLAMATION_WORDS.some(e=>Gb(e,t)))return e.markContextRange([e.offset,e.offset+t.length]);let n=this.lang.PREPOSITIVE_ABBREVIATIONS.some(e=>Gb(e,t)),r=/^\d+\.$/.test(t);if(n||r)return e.markContextRange([e.offset,e.offset+t.length]);let i=this.lang.ABBREVIATIONS.some(e=>Gb(e,t)),a=this.getPrevWord(e),o=this.getWord(e,t.length+1);(Wb(a)&&/^\p{Uppercase_Letter}\./u.test(t)&&Wb(o)||i&&!Wb(o))&&e.markContextRange([e.offset,e.offset+t.length])}},Yb=[{key:`double quote`,start:`"`,end:`"`},{key:`angled bracket`,start:`[`,end:`]`},{key:`round bracket`,start:`(`,end:`)`},{key:`curly brace`,start:`{`,end:`}`},{key:`かぎ括弧`,start:`「`,end:`」`},{key:`丸括弧`,start:`(`,end:`)`},{key:`二重かぎ括弧`,start:`『`,end:`』`},{key:`波括弧`,start:`{`,end:`}`},{key:`角括弧`,start:`[`,end:`]`},{key:`重角括弧`,start:`〚`,end:`〛`},{key:`隅付き括弧`,start:`【`,end:`】`},{key:`二重隅付き括弧`,start:`《`,end:`》`}],Xb=class{PAIR_MARKS_KEY_Map=new Map(Yb.flatMap(e=>[[e.start,e],[e.end,e]]));mark(e){let t=e.read();if(!t)return;let n=this.PAIR_MARKS_KEY_Map.get(t);n&&(e.isInContext(n)?n.end===t&&(Vb(`PairMaker -> leaveContext: ${t} `),e.leaveContext(n)):n.start===t&&(Vb(`PairMaker -> enterContext: ${t} `),e.enterContext(n)))}},Zb={WhiteSpace:`WhiteSpace`,Punctuation:`Punctuation`,Sentence:`Sentence`,Str:`Str`,PairMark:`PairMark`},Qb=class{sentenceNodeList=[];results=[];source;constructor(e){this.source=new Pb(e)}get current(){return this.sentenceNodeList[this.sentenceNodeList.length-1]}pushNodeToCurrent(e){let t=this.current;t?t.children.push(e):this.results.push(e)}open(e){this.sentenceNodeList.push(e)}isOpened(){return this.sentenceNodeList.length>0}nextLine(e){let{value:t,startPosition:n,endPosition:r}=this.source.seekNext(e);return this.pushNodeToCurrent(tx(t,n,r)),r}nextSpace(e){let{value:t,startPosition:n,endPosition:r}=this.source.seekNext(e);this.pushNodeToCurrent(tx(t,n,r))}nextValue(e){let{value:t,startPosition:n,endPosition:r}=this.source.seekNext(e);this.pushNodeToCurrent(rx(t,n,r))}close(e){let{value:t,startPosition:n,endPosition:r}=this.source.seekNext(e);n.offset!==r.offset&&!/^\s+$/.test(t)&&this.pushNodeToCurrent(nx(t,n,r));let i=this.sentenceNodeList.pop();if(!i||i.children.length===0)return;let a=i.children[0],o=this.source.now(),s=this.source.sliceRange(a.range[0],o.offset),c=this.source.consumedContexts.sort((e,t)=>e.range[0]-t.range[0]).map(e=>({type:`PairMark`,pairMark:e.pairMark,range:e.range,loc:e.loc}));this.results.push({...i,loc:{start:a.loc.start,end:{line:o.line,column:o.column}},range:[a.range[0],o.offset],raw:s,contexts:c})}toList(){return this.results}},$b=(e={})=>{let t=new Fb,n=new Ib,r=new Rb(e.SeparatorParser),i=new Jb(e.AbbrMarker),a=new Xb;return{newLine:t,space:n,separator:r,abbrMarker:i,anyValueParser:new Hb({parsers:[t,r],markers:[i,a]})}};function ex(e,t){let{newLine:n,space:r,separator:i,anyValueParser:a}=$b(t),o=new Qb(e),s=o.source;for(;!s.hasEnd;)n.test(s)?o.nextLine(n):r.test(s)?o.nextSpace(r):i.test(s)?o.close(i):(o.isOpened()||o.open(ix()),o.nextValue(a));return o.close(r),o.toList()}function tx(e,t,n){return{type:Zb.WhiteSpace,raw:e,value:e,loc:{start:{line:t.line,column:t.column},end:{line:n.line,column:n.column}},range:[t.offset,n.offset]}}function nx(e,t,n){return{type:Zb.Punctuation,raw:e,value:e,loc:{start:{line:t.line,column:t.column},end:{line:n.line,column:n.column}},range:[t.offset,n.offset]}}function rx(e,t,n){return{type:Zb.Str,raw:e,value:e,loc:{start:{line:t.line,column:t.column},end:{line:n.line,column:n.column}},range:[t.offset,n.offset]}}function ix(){return{type:Zb.Sentence,raw:``,loc:{start:{column:NaN,line:NaN},end:{column:NaN,line:NaN}},range:[NaN,NaN],children:[],contexts:[]}}var ax=(e,t)=>{let{results:n}=e,r=ex(t).filter(e=>e.type===Zb.Sentence),i=[];return r.forEach(t=>{let r=t.range[0],a=t.range[1],o=[];n.forEach(n=>{if(n.start>=r&&n.end<=a){let r=n.start-t.range[0],i=n.end-t.range[0],a=Db(t);a&&o.push({id:Ob(n.text,n.category,n.start,n.end),startOffset:r,absOffset:n.start,endOffset:i,popOverIsOpen:!1,data:{language:n.language||e.language,gender_separator:e.gender_separator,category:n.category,subcategory:n.subcategory,context:n.context,fullSentence:a,text:n.text,text_id:n.text_id,label:n.label,explanation:n.explanation,alternatives:n.alternatives,gravity:n.gravity,limit_reached:n.limit_reached,source:n.source,bulk:n.bulk,bulk_alternative:n.bulk_alternative}})}}),i.push({sentence:t.raw,alerts:o})}),i},ox=class e{value;static MINIMUM=100;constructor(e){this.value=e}shrink(){return this.value<=e.MINIMUM?!1:(this.value=Math.max(e.MINIMUM,Math.floor(this.value/2)),!0)}},sx=/\n\n/g,cx=e=>{let t=[],n=0,r=[];for(let t of e.matchAll(sx))r.push([n,t.index]),n=t.index+t[0].length;r.push([n,e.length]);for(let[n,i]of r){let r=e.slice(n,i);for(let e of ex(r))e.type===Zb.Sentence&&t.push({start:n+e.range[0],end:n+e.range[1],text:e.raw})}return t},lx=(e,t,n)=>{if(!t.length)return null;let r=``,i=[],a=-1;for(let o of t){let t=a!==-1&&!/\S/.test(e.slice(a,o.start)),s=i.length?t?e.slice(a,o.start):`
133
133
 
134
- `:``,c=s.length+o.text.length;if(i.length&&r.length+c>n)break;r+=s,i.push({sentence:o,offset:r.length}),r+=o.text,a=o.end}return{text:r,parts:i}},ax=(e,t)=>{let n=new Map(e.parts.map(e=>[e.sentence,[]]));for(let r of t){let t=e.parts.find(({sentence:e,offset:t})=>r.start>=t&&r.end<=t+e.text.length);t&&n.get(t.sentence)?.push({...r,start:r.start-t.offset,end:r.end-t.offset})}return n},ox=class{capacity;entries=new Map;scope=``;constructor(e=5e3){this.capacity=e}useScope(e){e!==this.scope&&(this.scope=e,this.entries.clear())}clear(){this.entries.clear()}get(e){let t=this.entries.get(e.text);return t&&(this.entries.delete(e.text),this.entries.set(e.text,t)),t}set(e,t){for(this.entries.delete(e.text),this.entries.set(e.text,t);this.entries.size>this.capacity;)this.entries.delete(this.entries.keys().next().value)}},sx=`
134
+ `:``,c=s.length+o.text.length;if(i.length&&r.length+c>n)break;r+=s,i.push({sentence:o,offset:r.length}),r+=o.text,a=o.end}return{text:r,parts:i}},ux=(e,t)=>{let n=new Map(e.parts.map(e=>[e.sentence,[]]));for(let r of t){let t=e.parts.find(({sentence:e,offset:t})=>r.start>=t&&r.end<=t+e.text.length);t&&n.get(t.sentence)?.push({...r,start:r.start-t.offset,end:r.end-t.offset})}return n},dx=class{capacity;entries=new Map;scope=``;constructor(e=5e3){this.capacity=e}useScope(e){e!==this.scope&&(this.scope=e,this.entries.clear())}clear(){this.entries.clear()}get(e){let t=this.entries.get(e.text);return t&&(this.entries.delete(e.text),this.entries.set(e.text,t)),t}set(e,t){for(this.entries.delete(e.text),this.entries.set(e.text,t);this.entries.size>this.capacity;)this.entries.delete(this.entries.keys().next().value)}},fx=`
135
135
 
136
- `,cx=`
137
- `,lx=``,ux=new Set([`codeBlock`]),dx=new Set([`code`]),fx=e=>{let t=``,n=[],r=!1,i=(e,r)=>{if(e){if(r!==null){let i=n[n.length-1];i&&i.textEnd===t.length&&i.pos+(i.textEnd-i.textStart)===r?i.textEnd+=e.length:n.push({textStart:t.length,textEnd:t.length+e.length,pos:r})}t+=e}},a=()=>{t.endsWith(lx)||i(lx,null)};return e.descendants((e,t)=>ux.has(e.type.name)?!1:e.isTextblock?(r&&i(sx,null),r=!0,!0):e.isText?(e.marks.some(e=>dx.has(e.type.name))?a():i(e.text??``,t),!1):e.type.name===`hardBreak`?(i(cx,null),!1):e.isInline&&e.isAtom?(a(),!1):!0),{text:t,segments:n}},px=(e,t)=>{let n=0,r=e.segments.length-1;for(;n<=r;){let i=n+r>>1,a=e.segments[i];if(t<a.textStart)r=i-1;else if(t>=a.textEnd)n=i+1;else return a}},mx=(e,t,n)=>{if(t<0||n<=t||n>e.text.length)return null;let r=px(e,t);return!r||n>r.textEnd?null:{from:r.pos+(t-r.textStart),to:r.pos+(n-r.textStart)}},hx=new Jn(`wittyCheck`),gx=({data:e},t,n)=>`${e.category}:${e.text}:${t}:${n}`,_x=({data:e},t)=>[`witty-alert`,`witty-alert--${av(e.gravity,e.subcategory)}`,e.category===`orthography`&&`witty-alert--dotted`,t&&`witty-alert--selected`].filter(Boolean).join(` `),vx=(e,t)=>vs.inline(e.from,e.to,{class:_x(e.detail,e.id===t),"data-alert-id":e.id},{alert:e}),yx=e=>({...e.spec.alert,from:e.from,to:e.to}),bx=(e,t,n)=>xs.create(t,e.find().map(e=>vx(yx(e),n))),xx=e=>hx.getState(e)?.limitReached??!1,Sx=e=>hx.getState(e)?.languages??{},Cx=e=>(hx.getState(e)?.decorations.find()??[]).map(yx),wx=e=>{let t=[];return e.mapping.maps.forEach((n,r)=>{let i=e.mapping.slice(r+1);n.forEach((e,n,r,a)=>{t.push([i.map(r,-1),i.map(a,1)])})}),t},Tx=0,Ex=(e,t,n,r,i)=>{let a=new Map;for(let e of r.find()){let t=e.spec.alert;a.set(gx(t.detail,e.from,e.to),t.id)}let o=[];for(let r of e){let e=t.map(r.from,1),s=t.map(r.to,-1);if(n.textBetween(e,s)!==r.detail.data.text)continue;let c=gx(r.detail,e,s),l=a.get(c)??`alert-${Tx+=1}`;o.push(vx({...r,id:l,from:e,to:s},i))}return xs.create(n,o)},Dx=(e,t)=>{let n=e.getMeta(hx);if(n?.type===`recheck`)return{...t,recheckRequests:t.recheckRequests+1};if(n?.type===`clear`)return{...t,decorations:xs.empty,pending:null,selectedId:null,limitReached:!1,languages:{}};if(n?.type===`select`)return{...t,selectedId:n.id,decorations:bx(t.decorations,e.doc,n.id)};if(n?.type===`dismiss`)return{...t,decorations:t.decorations.remove(t.decorations.find().filter(e=>yx(e).detail.data.text===n.text))};if(n?.type===`start`)return{...t,pending:{id:n.id,mapping:new xt}};if(n?.type===`results`)return t.pending?.id===n.id?{...t,decorations:Ex(n.alerts,t.pending.mapping,e.doc,t.decorations,t.selectedId),pending:null,limitReached:n.limitReached,languages:n.languages}:t;if(!e.docChanged)return t;let r=t.decorations.map(e.mapping,e.doc);for(let[t,n]of wx(e)){let e=r.find(t,n).filter(e=>e.from<n&&e.to>t);e.length&&(r=r.remove(e))}return{...t,decorations:r,pending:t.pending&&{id:t.pending.id,mapping:new xt([...t.pending.mapping.maps,...e.mapping.maps])}}},Ox=class{view;options;timer;inFlight;checkId=0;deferredByComposition=!1;destroyed=!1;cache=new ox;budget;language=``;constructor(e,t){this.view=e,this.options=t,this.budget=new tx(t.maxRequestLength??1e3),this.schedule()}update(e,t){let n=hx.getState(e.state)?.recheckRequests!==hx.getState(t)?.recheckRequests;n&&this.cache.clear(),(n||e.state.doc!==t.doc)&&this.schedule()}compositionEnded(){this.deferredByComposition&&(this.deferredByComposition=!1,this.schedule())}schedule(){clearTimeout(this.timer),this.timer=setTimeout(()=>this.run(),this.options.delay)}run(){if(this.destroyed)return;if(this.view.composing){this.deferredByComposition=!0;return}this.inFlight?.abort();let e=new AbortController;this.inFlight=e;let t=this.checkId+=1,{doc:n}=this.view.state,r=fx(n);this.cache.useScope(this.options.cacheScope?.()??``);let i=this.options.maxTextLength??2e4,a=rx(r.text),o=a.filter(({end:e})=>e<=i),s=o.length<a.length,c=ix(r.text,o.filter(e=>!this.cache.get(e)),this.budget.value);this.view.dispatch(this.view.state.tr.setMeta(hx,{type:`start`,id:t}).setMeta(`addToHistory`,!1)),(c?this.options.check(c.text,e.signal):Promise.resolve(null)).then(n=>{if(e.signal.aborted||this.destroyed)return;if(n&&c){n.language&&(this.language=n.language);let e=!!n.limit_reached;if(!(e&&c.parts.length>1&&this.budget.shrink())){let t=ax(c,n.results??[]);for(let[r,i]of t)this.cache.set(r,{results:i.map(e=>({...e,language:e.language||n.language})),partial:e,language:n.language})}}let i=[],a=!1,l=!1,u={};for(let e of o){let t=this.cache.get(e);if(!t){l=!0;continue}a||=t.partial;let n=t.language?.slice(0,2);n&&(u[n]=(u[n]??0)+e.text.length);for(let n of t.results)i.push({...n,start:n.start+e.start,end:n.end+e.start})}let d=[];for(let{alerts:e}of ex({...n??{},results:i,language:this.language,limit_reached:a},r.text))for(let t of e){if(this.options.isIgnored?.(t))continue;let e=t.absOffset,n=e+t.data.text.length,i=mx(r,e,n),a={...t,startOffset:e,endOffset:n};i&&d.push({...i,detail:a})}this.view.dispatch(this.view.state.tr.setMeta(hx,{type:`results`,id:t,alerts:d,limitReached:s||a,languages:u,complete:!l}).setMeta(`addToHistory`,!1)),l&&(clearTimeout(this.timer),this.timer=setTimeout(()=>this.run(),0))}).catch(t=>{e.signal.aborted||this.destroyed||this.options.onError?.(t)})}destroy(){this.destroyed=!0,clearTimeout(this.timer),this.inFlight?.abort()}},kx=e=>{let t;return new Gn({key:hx,state:{init:()=>({decorations:xs.empty,pending:null,recheckRequests:0,selectedId:null,limitReached:!1,languages:{}}),apply:Dx},props:{decorations:e=>hx.getState(e)?.decorations,handleDOMEvents:{compositionend:()=>(setTimeout(()=>t?.compositionEnded()),!1)}},view:n=>(t=new Ox(n,e),t)})},Ax=e=>e.dispatch(e.state.tr.setMeta(hx,{type:`recheck`}).setMeta(`addToHistory`,!1)),jx=e=>e.dispatch(e.state.tr.setMeta(hx,{type:`clear`}).setMeta(`addToHistory`,!1)),Mx=(e,t)=>e.dispatch(e.state.tr.setMeta(hx,{type:`select`,id:t}).setMeta(`addToHistory`,!1)),Nx=(e,t)=>e.dispatch(e.state.tr.setMeta(hx,{type:`dismiss`,text:t}).setMeta(`addToHistory`,!1)),Px=nf.create({name:`wittyCheck`,addOptions(){return{check:()=>Promise.reject(Error(`WittyCheck: no checker`)),delay:500}},addProseMirrorPlugins(){return[kx(this.options)]}}),Fx=`gender_format`,Ix=`de-e`,Lx={de:[`/in`,`/-in`,`_in`,`*in`,`:in`,`(-)`,`()`,`In`,Ix],fr:[`·`,`·s`,`.`,`.s`,`/`,`/s`]},Rx={de:`german_gender_ending`,fr:`french_gender_separator`},zx=e=>Lx.de.includes(e)?`de`:Lx.fr.includes(e)?`fr`:null,Bx=(e,t)=>e?.slice(0,2)===t,Vx=`gendered_denominations_ending_advanced`,Hx=(e,t,n=`de`)=>{let r=e.disabled_categories??[],i=r.filter(e=>e!==Vx&&e!==Vx.replace(/_advanced$/,``)),a=i.length!==r.length||e.gendered_roles_format===`none`||e.gendered_roles_format===`binary_gender`;return{config:{...e,[Rx[n]]:t,...e.disabled_categories?{disabled_categories:i}:{},gendered_roles_format:`inclusive_gender`},needed:a}},Ux=({alternatives:e,bulk_alternative:t})=>{let n;return t==null?n=e?.length===1?e[0]:void 0:Number.isInteger(t)&&(n=e?.[t]),typeof n?.text==`string`?n.text:null},Wx=(e,t=`de`,n=Fx)=>e.flatMap(({from:e,to:r,detail:i})=>{if(i.data.bulk!==n||!Bx(i.data.language,t))return[];let a=Ux(i.data);return a===null?[]:[{from:e,to:r,text:a}]}),Gx=(e,t)=>{let n=e.tr;for(let{from:e,to:r,text:i}of[...t].sort((e,t)=>t.from-e.from))n.insertText(i,e,r);return n},Kx=/\p{Ll}(?:([*_:]|\/-?)in(?:nen)?|(In)(?:nen)?|\((-?)in(?:nen)?\))(?!\p{L})/gu,qx=e=>{let[,t,n,r]=e;return n?`In`:r===void 0?`${t}in`:r?`(-)`:`()`},Jx=(e,t)=>[...e.matchAll(Kx)].some(e=>qx(e)!==t),Yx=(e,t,n)=>{let r=n.filter(({detail:e})=>e.data.subcategory===Vx);return r.some(({detail:e})=>!e.data.bulk)?`unsupported`:!r.length&&Jx(e,t)?`disabled`:`nothing`},Xx=(e,t,n,r,{language:i=`de`,previous:a}={})=>{let o=e.responses.filter(e=>Bx(e.language,i)),s=o.find(({separator:e})=>e&&e!==t)?.separator;if(s)return{outcome:`forced`,applied:s};let c=Wx(r,i);if(c.length)return{outcome:`switched`,apply:c};if(!o.length)return{outcome:`nothing`};let l=o.flatMap(({bulkActions:e})=>e?[e]:[]);return l.length?l.some(e=>e.includes(`gender_format`))?{outcome:a===`de-e`&&t!==`de-e`?`fromInklusivum`:`nothing`}:{outcome:i===`fr`||t===`de-e`?`unsupported`:`disabled`}:i===`fr`?{outcome:`unsupported`}:{outcome:Yx(n,t,r)}},Zx=c((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Qx=c(((e,t)=>{t.exports=Zx()})),$x=c((e=>{var t=ry();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),eS=c(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=$x()})),tS=c((e=>{var t=Qx(),n=ry(),r=eS();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?ne(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,k=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function se(e){return{current:e}}function ce(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function le(e,t){oe++,ae[oe]=e.current,e.current=t}var ue=se(null),de=se(null),fe=se(null),pe=se(null);function me(e,t){switch(le(fe,t),le(de,e),le(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qd(t),e=$d(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ce(ue),le(ue,e)}function he(){ce(ue),ce(de),ce(fe)}function ge(e){e.memoizedState!==null&&le(pe,e);var t=ue.current,n=$d(t,e.type);t!==n&&(le(de,e),le(ue,n))}function _e(e){de.current===e&&(ce(ue),ce(de)),pe.current===e&&(ce(pe),lp._currentValue=ie)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1<e.stack.indexOf(`
136
+ `,px=`
137
+ `,mx=``,hx=new Set([`codeBlock`]),gx=new Set([`code`]),_x=e=>{let t=``,n=[],r=!1,i=(e,r)=>{if(e){if(r!==null){let i=n[n.length-1];i&&i.textEnd===t.length&&i.pos+(i.textEnd-i.textStart)===r?i.textEnd+=e.length:n.push({textStart:t.length,textEnd:t.length+e.length,pos:r})}t+=e}},a=()=>{t.endsWith(mx)||i(mx,null)};return e.descendants((e,t)=>hx.has(e.type.name)?!1:e.isTextblock?(r&&i(fx,null),r=!0,!0):e.isText?(e.marks.some(e=>gx.has(e.type.name))?a():i(e.text??``,t),!1):e.type.name===`hardBreak`?(i(px,null),!1):e.isInline&&e.isAtom?(a(),!1):!0),{text:t,segments:n}},vx=(e,t)=>{let n=0,r=e.segments.length-1;for(;n<=r;){let i=n+r>>1,a=e.segments[i];if(t<a.textStart)r=i-1;else if(t>=a.textEnd)n=i+1;else return a}},yx=(e,t,n)=>{if(t<0||n<=t||n>e.text.length)return null;let r=vx(e,t);return!r||n>r.textEnd?null:{from:r.pos+(t-r.textStart),to:r.pos+(n-r.textStart)}},bx=new Jn(`wittyCheck`),xx=({data:e},t,n)=>`${e.category}:${e.text}:${t}:${n}`,Sx=({data:e},t)=>[`witty-alert`,`witty-alert--${ov(e.gravity,e.subcategory)}`,e.category===`orthography`&&`witty-alert--dotted`,t&&`witty-alert--selected`].filter(Boolean).join(` `),Cx=(e,t)=>vs.inline(e.from,e.to,{class:Sx(e.detail,e.id===t),"data-alert-id":e.id},{alert:e}),wx=e=>({...e.spec.alert,from:e.from,to:e.to}),Tx=(e,t,n)=>xs.create(t,e.find().map(e=>Cx(wx(e),n))),Ex=e=>bx.getState(e)?.limitReached??!1,Dx=e=>bx.getState(e)?.languages??{},Ox=e=>(bx.getState(e)?.decorations.find()??[]).map(wx),kx=e=>{let t=[];return e.mapping.maps.forEach((n,r)=>{let i=e.mapping.slice(r+1);n.forEach((e,n,r,a)=>{t.push([i.map(r,-1),i.map(a,1)])})}),t},Ax=0,jx=(e,t,n,r,i)=>{let a=new Map;for(let e of r.find()){let t=e.spec.alert;a.set(xx(t.detail,e.from,e.to),t.id)}let o=[];for(let r of e){let e=t.map(r.from,1),s=t.map(r.to,-1);if(n.textBetween(e,s)!==r.detail.data.text)continue;let c=xx(r.detail,e,s),l=a.get(c)??`alert-${Ax+=1}`;o.push(Cx({...r,id:l,from:e,to:s},i))}return xs.create(n,o)},Mx=(e,t)=>{let n=e.getMeta(bx);if(n?.type===`recheck`)return{...t,recheckRequests:t.recheckRequests+1};if(n?.type===`clear`)return{...t,decorations:xs.empty,pending:null,selectedId:null,limitReached:!1,languages:{}};if(n?.type===`select`)return{...t,selectedId:n.id,decorations:Tx(t.decorations,e.doc,n.id)};if(n?.type===`dismiss`)return{...t,decorations:t.decorations.remove(t.decorations.find().filter(e=>wx(e).detail.data.text===n.text))};if(n?.type===`start`)return{...t,pending:{id:n.id,mapping:new xt}};if(n?.type===`results`)return t.pending?.id===n.id?{...t,decorations:jx(n.alerts,t.pending.mapping,e.doc,t.decorations,t.selectedId),pending:null,limitReached:n.limitReached,languages:n.languages}:t;if(!e.docChanged)return t;let r=t.decorations.map(e.mapping,e.doc);for(let[t,n]of kx(e)){let e=r.find(t,n).filter(e=>e.from<n&&e.to>t);e.length&&(r=r.remove(e))}return{...t,decorations:r,pending:t.pending&&{id:t.pending.id,mapping:new xt([...t.pending.mapping.maps,...e.mapping.maps])}}},Nx=class{view;options;timer;inFlight;checkId=0;deferredByComposition=!1;destroyed=!1;cache=new dx;budget;language=``;constructor(e,t){this.view=e,this.options=t,this.budget=new ox(t.maxRequestLength??1e3),this.schedule()}update(e,t){let n=bx.getState(e.state)?.recheckRequests!==bx.getState(t)?.recheckRequests;n&&this.cache.clear(),(n||e.state.doc!==t.doc)&&this.schedule()}compositionEnded(){this.deferredByComposition&&(this.deferredByComposition=!1,this.schedule())}schedule(){clearTimeout(this.timer),this.timer=setTimeout(()=>this.run(),this.options.delay)}run(){if(this.destroyed)return;if(this.view.composing){this.deferredByComposition=!0;return}this.inFlight?.abort();let e=new AbortController;this.inFlight=e;let t=this.checkId+=1,{doc:n}=this.view.state,r=_x(n);this.cache.useScope(this.options.cacheScope?.()??``);let i=this.options.maxTextLength??2e4,a=cx(r.text),o=a.filter(({end:e})=>e<=i),s=o.length<a.length,c=lx(r.text,o.filter(e=>!this.cache.get(e)),this.budget.value);this.view.dispatch(this.view.state.tr.setMeta(bx,{type:`start`,id:t}).setMeta(`addToHistory`,!1)),(c?this.options.check(c.text,e.signal):Promise.resolve(null)).then(n=>{if(e.signal.aborted||this.destroyed)return;if(n&&c){n.language&&(this.language=n.language);let e=!!n.limit_reached;if(!(e&&c.parts.length>1&&this.budget.shrink())){let t=ux(c,n.results??[]);for(let[r,i]of t)this.cache.set(r,{results:i.map(e=>({...e,language:e.language||n.language})),partial:e,language:n.language})}}let i=[],a=!1,l=!1,u={};for(let e of o){let t=this.cache.get(e);if(!t){l=!0;continue}a||=t.partial;let n=t.language?.slice(0,2);n&&(u[n]=(u[n]??0)+e.text.length);for(let n of t.results)i.push({...n,start:n.start+e.start,end:n.end+e.start})}let d=[];for(let{alerts:e}of ax({...n??{},results:i,language:this.language,limit_reached:a},r.text))for(let t of e){if(this.options.isIgnored?.(t))continue;let e=t.absOffset,n=e+t.data.text.length,i=yx(r,e,n),a={...t,startOffset:e,endOffset:n};i&&d.push({...i,detail:a})}this.view.dispatch(this.view.state.tr.setMeta(bx,{type:`results`,id:t,alerts:d,limitReached:s||a,languages:u,complete:!l}).setMeta(`addToHistory`,!1)),l&&(clearTimeout(this.timer),this.timer=setTimeout(()=>this.run(),0))}).catch(t=>{e.signal.aborted||this.destroyed||this.options.onError?.(t)})}destroy(){this.destroyed=!0,clearTimeout(this.timer),this.inFlight?.abort()}},Px=e=>{let t;return new Gn({key:bx,state:{init:()=>({decorations:xs.empty,pending:null,recheckRequests:0,selectedId:null,limitReached:!1,languages:{}}),apply:Mx},props:{decorations:e=>bx.getState(e)?.decorations,handleDOMEvents:{compositionend:()=>(setTimeout(()=>t?.compositionEnded()),!1)}},view:n=>(t=new Nx(n,e),t)})},Fx=e=>e.dispatch(e.state.tr.setMeta(bx,{type:`recheck`}).setMeta(`addToHistory`,!1)),Ix=e=>e.dispatch(e.state.tr.setMeta(bx,{type:`clear`}).setMeta(`addToHistory`,!1)),Lx=(e,t)=>e.dispatch(e.state.tr.setMeta(bx,{type:`select`,id:t}).setMeta(`addToHistory`,!1)),Rx=(e,t)=>e.dispatch(e.state.tr.setMeta(bx,{type:`dismiss`,text:t}).setMeta(`addToHistory`,!1)),zx=rf.create({name:`wittyCheck`,addOptions(){return{check:()=>Promise.reject(Error(`WittyCheck: no checker`)),delay:500}},addProseMirrorPlugins(){return[Px(this.options)]}}),Bx=class extends Error{constructor(){super(`the editor was destroyed`),this.name=`EditorDestroyedError`}},Vx=()=>{let e=new Set,t=!1,n=t=>{e.forEach(e=>e.reject(t)),e.clear()};return{next:()=>new Promise((n,r)=>{if(t){r(new Bx);return}e.add({armed:!1,resolve:n,reject:r})}),started:()=>{e.forEach(e=>{e.armed=!0})},completed:t=>{for(let n of e)n.armed&&(n.resolve(t),e.delete(n))},failed:n,destroy:()=>{t=!0,n(new Bx)}}},Hx=c((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ux=c(((e,t)=>{t.exports=Hx()})),Wx=c((e=>{var t=iy();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),Gx=c(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Wx()})),Kx=c((e=>{var t=Ux(),n=iy(),r=Gx();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?ne(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,k=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function se(e){return{current:e}}function ce(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function le(e,t){oe++,ae[oe]=e.current,e.current=t}var ue=se(null),de=se(null),fe=se(null),pe=se(null);function me(e,t){switch(le(fe,t),le(de,e),le(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ce(ue),le(ue,e)}function he(){ce(ue),ce(de),ce(fe)}function ge(e){e.memoizedState!==null&&le(pe,e);var t=ue.current,n=ef(t,e.type);t!==n&&(le(de,e),le(ue,n))}function _e(e){de.current===e&&(ce(ue),ce(de)),pe.current===e&&(ce(pe),up._currentValue=ie)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1<e.stack.indexOf(`
138
138
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
139
139
  `+ve+e+ye}var xe=!1;function Se(e,t){if(!e||xe)return``;xe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
140
140
  `),l=s.split(`
141
141
  `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
142
142
  `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
143
143
  Error generating stack: `+e.message+`
144
- `+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $e(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-He(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&rt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function rt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-He(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function it(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-He(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function at(e,t){var n=t&-t;return n=n&42?1:ot(n),(n&(e.suspendedLanes|t))===0?n:0}function ot(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function st(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ct(){var e=A.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function lt(e,t){var n=A.p;try{return A.p=e,t()}finally{A.p=n}}var ut=Math.random().toString(36).slice(2),dt=`__reactFiber$`+ut,ft=`__reactProps$`+ut,pt=`__reactContainer$`+ut,mt=`__reactEvents$`+ut,ht=`__reactListeners$`+ut,gt=`__reactHandles$`+ut,_t=`__reactResources$`+ut,vt=`__reactMarker$`+ut;function yt(e){delete e[dt],delete e[ft],delete e[mt],delete e[ht],delete e[gt]}function bt(e){var t=e[dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sf(e);e!==null;){if(n=e[dt])return n;e=Sf(e)}return t}e=n,n=e.parentNode}return null}function xt(e){if(e=e[dt]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function St(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ct(e){var t=e[_t];return t||=e[_t]={hoistableStyles:new Map,hoistableScripts:new Map},t}function wt(e){e[vt]=!0}var Tt=new Set,Et={};function Dt(e,t){Ot(e,t),Ot(e+`Capture`,t)}function Ot(e,t){for(Et[e]=t,e=0;e<t.length;e++)Tt.add(t[e])}var kt=RegExp(`^[: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]*$`),At={},jt={};function Mt(e){return Te.call(jt,e)?!0:Te.call(At,e)?!1:kt.test(e)?jt[e]=!0:(At[e]=!0,!1)}function Nt(e,t,n){if(Mt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Pt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ft(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function It(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Lt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Rt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zt(e){if(!e._valueTracker){var t=Lt(e)?`checked`:`value`;e._valueTracker=Rt(e,t,``+e[t])}}function Bt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Lt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Vt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ht=/[\n"\\]/g;function Ut(e){return e.replace(Ht,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Wt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+It(t)):e.value!==``+It(t)&&(e.value=``+It(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Kt(e,o,It(n)):Kt(e,o,It(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+It(s):e.removeAttribute(`name`)}function Gt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){zt(e);return}n=n==null?``:``+It(n),t=t==null?n:``+It(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),zt(e)}function Kt(e,t,n){t===`number`&&Vt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+It(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Jt(e,t,n){if(t!=null&&(t=``+It(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+It(n)}function Yt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=It(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),zt(e)}function Xt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function $t(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Qt(e,o,t[o])}function en(e){if(e.indexOf(`-`)===-1)return!1;switch(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!1;default:return!0}}var tn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),nn=/^[\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;function rn(e){return nn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function an(){}var on=null;function sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cn=null,ln=null;function un(e){var t=xt(e);if(t&&(e=t.stateNode)){var n=e[ft]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Wt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ut(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ft]||null;if(!a)throw Error(i(90));Wt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Bt(r)}break a;case`textarea`:Jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&qt(e,!!n.multiple,t,!1)}}}var dn=!1;function fn(e,t,n){if(dn)return e(t,n);dn=!0;try{return e(t)}finally{if(dn=!1,(cn!==null||ln!==null)&&(ku(),cn&&(t=cn,e=ln,ln=cn=null,un(t),e)))for(t=0;t<e.length;t++)un(e[t])}}function pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ft]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var mn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,hn=!1;if(mn)try{var gn={};Object.defineProperty(gn,"passive",{get:function(){hn=!0}}),window.addEventListener(`test`,gn,gn),window.removeEventListener(`test`,gn,gn)}catch{hn=!1}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return yn=i.slice(e,1<r?1-r:void 0)}function xn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Sn(){return!0}function Cn(){return!1}function wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Sn:Cn,this.isPropagationStopped=Cn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Sn)},persist:function(){},isPersistent:Sn}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},j=wn(Tn),En=f({},Tn,{view:0,detail:0}),Dn=wn(En),On,M,kn,N=f({},En,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==kn&&(kn&&e.type===`mousemove`?(On=e.screenX-kn.screenX,M=e.screenY-kn.screenY):M=On=0,kn=e),On)},movementY:function(e){return`movementY`in e?e.movementY:M}}),An=wn(N),jn=wn(f({},N,{dataTransfer:0})),Mn=wn(f({},En,{relatedTarget:0})),Nn=wn(f({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=wn(f({},Tn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=wn(f({},Tn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=wn(f({},En,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=xn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?xn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?xn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=wn(f({},N,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=wn(f({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=wn(f({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=wn(f({},N,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Kn=wn(f({},Tn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=mn&&`CompositionEvent`in window,Yn=null;mn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=mn&&`TextEvent`in window&&!Yn,Zn=mn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=bn(),yn=vn=_n=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){cn?ln?ln.push(r):ln=[r]:cn=r,t=Id(t,`onChange`),0<t.length&&(n=new j(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){kd(e,0)}function dr(e){if(Bt(St(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(mn){var mr;if(mn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,sn(e)),fn(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Te.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=mn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Vt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Id(Nr,`onSelect`),0<r.length&&(t=new j(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};mn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),Dt(t,[e])}var Qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&oi(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-He(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<bu)throw bu=0,xu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,n,r){return new li(e,t,n,r)}function di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var n=e.alternate;return n===null?(n=ui(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function pi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)di(e)&&(s=1);else if(typeof e==`string`)s=ep(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ui(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return hi(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ui(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ui(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ui(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ui(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function hi(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function gi(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function _i(e){var t=ui(18,null,null,0);return t.stateNode=e,t}function vi(e,t,n){return t=ui(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function bi(e,t){if(typeof e==`object`&&e){var n=yi.get(e);return n===void 0?(t={value:e,source:t,stack:we(t)},yi.set(e,t),t):n}return{value:e,source:t,stack:we(t)}}var xi=[],Si=0,Ci=null,wi=0,Ti=[],Ei=0,Di=null,Oi=1,ki=``;function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ci,Ci=e,wi=t}function ji(e,t,n){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Di=e;var r=Oi;e=ki;var i=32-He(r)-1;r&=~(1<<i),n+=1;var a=32-He(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Oi=1<<32-He(t)+i|n<<i|r,ki=a+e}else Oi=1<<a|n<<i|r,ki=e}function Mi(e){e.return!==null&&(Ai(e,1),ji(e,1,0))}function Ni(e){for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null;for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,ki=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null}function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Oi=t.id,ki=t.overflow,Di=e}var Fi=null,Ii=null,P=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[dt]=e,t[ft]=r,n){case`dialog`:B(`cancel`,t),B(`close`,t);break;case`iframe`:case`object`:case`embed`:B(`load`,t);break;case`video`:case`audio`:for(n=0;n<Dd.length;n++)B(Dd[n],t);break;case`source`:B(`error`,t);break;case`img`:case`image`:case`link`:B(`error`,t),B(`load`,t);break;case`details`:B(`toggle`,t);break;case`input`:B(`invalid`,t),Gt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:B(`invalid`,t);break;case`textarea`:B(`invalid`,t),Yt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Hd(t.textContent,n)?(r.popover!=null&&(B(`beforetoggle`,t),B(`toggle`,t)),r.onScroll!=null&&B(`scroll`,t),r.onScrollEnd!=null&&B(`scrollend`,t),r.onClick!=null&&(t.onclick=an),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Fi=e.return;Fi;)switch(Fi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Fi=Fi.return}}function Ui(e){if(e!==Fi)return!1;if(!P)return Hi(e),P=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||ef(e.type,e.memoizedProps)),n=!n),n&&Ii&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=xf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=xf(e)}else t===27?(t=Ii,lf(e.type)?(e=bf,bf=null,Ii=e):Ii=t):Ii=Fi?yf(e.stateNode.nextSibling):null;return!0}function Wi(){Ii=Fi=null,P=!1}function Gi(){var e=Li;return e!==null&&(ou===null?ou=e:ou.push.apply(ou,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=se(null),Ji=null,Yi=null;function Xi(e,t,n){le(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,ce(qi)}function Qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function $i(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===pe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lp]:e.push(lp))}a=a.return}e!==null&&$i(t,e,n,r),t.flags|=262144}function ta(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ra(e){return aa(Ji,e)}function ia(e,t){return Ji===null&&na(e),aa(e,t)}function aa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(i(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var oa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},sa=t.unstable_scheduleCallback,ca=t.unstable_NormalPriority,la={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ua(){return{controller:new oa,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&sa(ca,function(){e.controller.abort()})}var fa=null,pa=0,ma=0,ha=null;function ga(e,t){if(fa===null){var n=fa=[];pa=0,ma=xd(),ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return pa++,t.then(_a,_a),t}function _a(){if(--pa===0&&fa!==null){ha!==null&&(ha.status=`fulfilled`);var e=fa;fa=null,ma=0,ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ya=k.S;k.S=function(e,t){lu=Ae(),typeof t==`object`&&t&&typeof t.then==`function`&&ga(e,t),ya!==null&&ya(e,t)};var ba=se(null);function xa(){var e=ba.current;return e===null?Kl.pooledCache:e}function Sa(e,t){t===null?le(ba,ba.current):le(ba,t.pool)}function Ca(){var e=xa();return e===null?null:{parent:la._currentValue,pool:e}}var wa=Error(i(460)),Ta=Error(i(474)),Ea=Error(i(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(an,an),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(an,an);else{if(e=Kl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,wa}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,wa):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===wa||e===Ea)throw Error(i(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Aa(i)===t.type)?(t=a(t,n.props),La(t,n),t.return=e,t):(t=mi(n.type,n.key,n.props,null,e.mode,r),La(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=hi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=gi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=mi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case h:return t=vi(t,e.mode,n),t.return=e,t;case T:return t=Aa(t),f(e,t,n)}if(re(t)||ee(t))return t=hi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===b)return f(e,ia(e,t),n);Ra(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Aa(n),p(e,t,n,r)}if(re(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===b)return p(e,t,ia(e,n),r);Ra(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Aa(r),_(e,t,n,r,i)}if(re(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ia(r),i);if(r.$$typeof===b)return _(e,t,n,ia(t,r),i);Ra(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),P&&Ai(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return P&&Ai(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),P&&Ai(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),P&&Ai(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return P&&Ai(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),P&&Ai(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Aa(o),x(e,r,o,c)}if(re(o))return v(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ia(o),c);if(o.$$typeof===b)return x(e,r,ia(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=x(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,L&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ha;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(z&p)===p:(r&p)===p){p!==0&&p===ma&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ha=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),eu|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var eo=se(null),to=se(0);function no(e,t){e=Ql,le(to,e),le(eo,t),Ql=e|t.baseLanes}function ro(){le(to,Ql),le(eo,eo.current)}function io(){Ql=to.current,ce(eo),ce(to)}var ao=se(null),oo=null;function so(e){var t=e.alternate;le(po,po.current&1),le(ao,e),oo===null&&(t===null||eo.current!==null||t.memoizedState!==null)&&(oo=e)}function co(e){le(po,po.current),le(ao,e),oo===null&&(oo=e)}function lo(e){e.tag===22?(le(po,po.current),le(ao,e),oo===null&&(oo=e)):uo(e)}function uo(){le(po,po.current),le(ao,ao.current)}function fo(e){ce(ao),oo===e&&(oo=null),ce(po)}var po=se(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gf(n)||_f(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,F=null,go=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function To(){throw Error(i(321))}function Eo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function Do(e,t,n,r,i,a){return ho=a,F=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Gs:Ks,bo=!1,a=n(r,i),bo=!1,yo&&(a=ko(t,n,r,i)),Oo(e),a}function Oo(e){k.H=Ws;var t=go!==null&&go.next!==null;if(ho=0,_o=go=F=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||lc||(e=e.dependencies,e!==null&&ta(e)&&(lc=!0))}function ko(e,t,n,r){F=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=go=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}k.H=qs,o=t(n,r)}while(yo);return o}function Ao(){var e=k.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(go===null?null:go.memoizedState)!==e&&(F.flags|=1024),t}function jo(){var e=xo!==0;return xo=0,e}function Mo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function No(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}ho=0,_o=go=F=null,yo=!1,So=xo=0,Co=null}function Po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?F.memoizedState=_o=e:_o=_o.next=e,_o}function Fo(){if(go===null){var e=F.alternate;e=e===null?null:e.memoizedState}else e=go.next;var t=_o===null?F.memoizedState:_o.next;if(t!==null)_o=t,go=e;else{if(e===null)throw F.alternate===null?Error(i(467)):Error(i(310));go=e,e={memoizedState:go.memoizedState,baseState:go.baseState,baseQueue:go.baseQueue,queue:go.queue,next:null},_o===null?F.memoizedState=_o=e:_o=_o.next=e}return _o}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=ka(Co,e,t),t=F,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Gs:Ks),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===b)return ra(e)}throw Error(i(438,String(e)))}function zo(e){var t=null,n=F.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=F.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Io(),F.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(Fo(),go,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(z&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ma&&(d=!0);else if((ho&p)===p){u=u.next,p===ma&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,F.lanes|=p,eu|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,F.lanes|=f,eu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(lc=!0,d&&(n=ha,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=Fo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);wr(o,t.memoizedState)||(lc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=F,a=Fo(),o=P;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!wr((go||a).memoizedState,n);if(s&&(a.memoizedState=n,lc=!0),a=a.queue,gs(qo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,ds(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),Kl===null)throw Error(i(349));o||ho&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=F.updateQueue,t===null?(t=Io(),F.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Yo(e){var t=ai(e,2);t!==null&&wu(t,e,2)}function Xo(e){var t=Po();if(typeof e==`function`){var n=e;if(e=n(),bo){Ve(!0);try{n()}finally{Ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,go,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,a){if(Vs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};k.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=k.T,o={};k.T=o;try{var s=n(i,r),c=k.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),k.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(P){var n=Kl.formState;if(n!==null){a:{var r=F;if(P){if(Ii){b:{for(var i=Ii,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=yf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ii=yf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=Po(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Rs.bind(null,F,r),r.dispatch=n,r=Xo(!1),a=Bs.bind(null,F,!1,r.queue),r=Po(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,F,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ss(e){return cs(Fo(),go,e)}function cs(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===wa?Ea:e}else r=t;t=Fo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(F.flags|=2048,ds(9,{destroy:void 0},ls.bind(null,i,n),null)),[r,a,e]}function ls(e,t){e.action=t}function us(e){var t=Fo(),n=go;if(n!==null)return cs(t,n,e);Fo(),t=t.memoizedState,n=Fo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=F.updateQueue,t===null&&(t=Io(),F.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function fs(){return Fo().memoizedState}function ps(e,t,n,r){var i=Po();F.flags|=e,i.memoizedState=ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var i=Fo();r=r===void 0?null:r;var a=i.memoizedState.inst;go!==null&&r!==null&&Eo(r,go.memoizedState.deps)?i.memoizedState=ds(t,a,n,r):(F.flags|=e,i.memoizedState=ds(1|t,a,n,r))}function hs(e,t){ps(8390656,8,e,t)}function gs(e,t){ms(2048,8,e,t)}function _s(e){F.flags|=4;var t=F.updateQueue;if(t===null)t=Io(),F.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vs(e){var t=Fo().memoizedState;return _s({ref:t,nextImpl:e}),function(){if(L&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ys(e,t){return ms(4,2,e,t)}function bs(e,t){return ms(4,4,e,t)}function xs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ss(e,t,n){n=n==null?null:n.concat([e]),ms(4,4,xs.bind(null,t,e),n)}function Cs(){}function ws(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ts(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Eo(t,r[1]))return r[0];if(r=e(),bo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r}function Es(e,t,n){return n===void 0||ho&1073741824&&!(z&261930)?e.memoizedState=t:(e.memoizedState=n,e=Cu(),F.lanes|=e,eu|=e,n)}function Ds(e,t,n,r){return wr(n,t)?n:eo.current===null?!(ho&42)||ho&1073741824&&!(z&261930)?(lc=!0,e.memoizedState=n):(e=Cu(),F.lanes|=e,eu|=e,t):(e=Es(e,n,r),wr(e,t)||(lc=!0),e)}function Os(e,t,n,r,i){var a=A.p;A.p=a!==0&&8>a?a:8;var o=k.T,s={};k.T=s,Bs(e,!1,t,n);try{var c=i(),l=k.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,va(c,r),Su(e)):zs(e,t,r,Su(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},Su())}finally{A.p=a,o!==null&&s.types!==null&&(o.types=s.types),k.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=js(e).queue;Os(e,a,t,ie,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},Su())}function Ns(){return ra(lp)}function Ps(){return Fo().memoizedState}function Fs(){return Fo().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Su();e=Ga(n);var r=Ka(t,e,n);r!==null&&(wu(r,t,n),qa(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=Su();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=ii(e,t,n,r),n!==null&&(wu(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,Su())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),Kl===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return wu(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:xd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&wu(t,e,2)}function Vs(e){var t=e.alternate;return e===F||t!==null&&t===F}function Hs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var Ws={readContext:ra,use:Ro,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To};Ws.useEffectEvent=To;var Gs={readContext:ra,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(bo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(bo){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ls.bind(null,F,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Rs.bind(null,F,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Po(),e,t)},useTransition:function(){var e=Xo(!1);return e=Os.bind(null,F,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=F,a=Po();if(P){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Kl===null)throw Error(i(349));z&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(qo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Po(),t=Kl.identifierPrefix;if(P){var n=ki,r=Oi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ns,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Po();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Bs.bind(null,F,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Po().memoizedState=Is.bind(null,F)},useEffectEvent:function(e){var t=Po(),n={impl:e};return t.memoizedState=n,function(){if(L&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:ra,use:Ro,useCallback:ws,useContext:ra,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Vo,useRef:fs,useState:function(){return Vo(Bo)},useDebugValue:Cs,useDeferredValue:function(e,t){return Ds(Fo(),go.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ps,useHostTransitionStatus:Ns,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){return Zo(Fo(),go,e,t)},useMemoCache:zo,useCacheRefresh:Fs};Ks.useEffectEvent=vs;var qs={readContext:ra,use:Ro,useCallback:ws,useContext:ra,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Uo,useRef:fs,useState:function(){return Uo(Bo)},useDebugValue:Cs,useDeferredValue:function(e,t){var n=Fo();return go===null?Es(n,e,t):Ds(n,go.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ps,useHostTransitionStatus:Ns,useFormState:us,useActionState:us,useOptimistic:function(e,t){var n=Fo();return go===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,go,e,t)},useMemoCache:zo,useCacheRefresh:Fs};qs.useEffectEvent=vs;function Js(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ys={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Su(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(wu(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Su(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(wu(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Su(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(wu(t,e,n),qa(t,e,n))}};function Xs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Zs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ys.enqueueReplaceState(t,t.state,null)}function Qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function $s(e){Qr(e)}function ec(e){console.error(e)}function tc(e){Qr(e)}function nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ic(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){nc(e,t)},n}function ac(e){return e=Ga(e),e.tag=3,e}function oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){rc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){rc(t,n,r),typeof i!=`function`&&(fu===null?fu=new Set([this]):fu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function sc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ea(t,n,a,!0),n=ao.current,n!==null){switch(n.tag){case 31:case 13:return oo===null?Iu():n.alternate===null&&$l===0&&($l=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),td(e,r,a)),!1;case 22:return n.flags|=65536,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),td(e,r,a)),!1}throw Error(i(435,n.tag))}return td(e,r,a),Iu(),!1}if(P)return t=ao.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=bi(r,n),a=ic(e.stateNode,r,a),Ja(e,a),$l!==4&&($l=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=bi(o,n),au===null?au=[o]:au.push(o),$l!==4&&($l=2),t===null)return!0;r=bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ic(n.stateNode,r,e),Ja(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(fu===null||!fu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ac(a),oc(a,e,n,r),Ja(n,a),!1}n=n.return}while(n!==null);return!1}var cc=Error(i(461)),lc=!1;function uc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function dc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return na(t),r=Do(e,t,n,o,a,i),s=jo(),e!==null&&!lc?(Mo(e,t,i),Fc(e,t,i)):(P&&s&&Mi(t),t.flags|=1,uc(e,t,r,i),t.child)}function fc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,pc(e,t,a,r,i)):(e=mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ic(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Fc(e,t,i)}return t.flags|=1,e=fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function pc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref){if(lc=!1,t.pendingProps=r=a,Ic(e,i))e.flags&131072&&(lc=!0);else return t.lanes=e.lanes,Fc(e,t,i)}}return xc(e,t,n,r,i)}function mc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return gc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sa(t,a===null?null:a.cachePool),a===null?ro():no(t,a),lo(t);else return r=t.lanes=536870912,gc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Sa(t,null),ro(),uo(t)):(Sa(t,a.cachePool),no(t,a),uo(t),t.memoizedState=null);return uc(e,t,i,n),t.child}function hc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gc(e,t,n,r,i){var a=xa();return a=a===null?null:{parent:la._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Sa(t,null),ro(),lo(t),e!==null&&ea(e,t,r,!0),t.childLanes=i,null}function _c(e,t){return t=Ac({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vc(e,t,n){return Ba(t,e.child,null,n),e=_c(t,t.pendingProps),e.flags|=2,fo(t),t.memoizedState=null,e}function yc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(P){if(r.mode===`hidden`)return e=_c(t,r),t.lanes=536870912,hc(null,e);if(co(t),(e=Ii)?(e=hf(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return _c(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(co(t),a){if(t.flags&256)t.flags&=-257,t=vc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(lc||ea(e,t,n,!1),a=(n&e.childLanes)!==0,lc||a){if(r=Kl,r!==null&&(s=at(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),wu(r,e,s),cc;Iu(),t=vc(e,t,n)}else e=o.treeContext,Ii=yf(s.nextSibling),Fi=t,P=!0,Li=null,Ri=!1,e!==null&&Pi(t,e),t=_c(t,r),t.flags|=4096;return t}return e=fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function bc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xc(e,t,n,r,i){return na(t),n=Do(e,t,n,r,void 0,i),r=jo(),e!==null&&!lc?(Mo(e,t,i),Fc(e,t,i)):(P&&r&&Mi(t),t.flags|=1,uc(e,t,n,i),t.child)}function Sc(e,t,n,r,i,a){return na(t),t.updateQueue=null,n=ko(t,r,n,i),Oo(e),r=jo(),e!==null&&!lc?(Mo(e,t,a),Fc(e,t,a)):(P&&r&&Mi(t),t.flags|=1,uc(e,t,n,a),t.child)}function Cc(e,t,n,r,i){if(na(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=ra(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ys,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ra(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Js(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ys.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=ra(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Zs(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Js(t,n,d,r),l=t.memoizedState),(c=Ha||Xs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=ra(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Zs(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&ta(e.dependencies)?(typeof s==`function`&&(Js(t,n,s,r),p=t.memoizedState),(u=Ha||Xs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ta(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,bc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):uc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Fc(e,t,i),e}function wc(e,t,n,r){return Wi(),t.flags|=256,uc(e,t,n,r),t.child}var Tc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(e){return{baseLanes:e,cachePool:Ca()}}function Dc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ru),e}function Oc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(po.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(P){if(a?so(t):uo(t),(e=Ii)?(e=hf(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Bi(t);return _f(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(uo(t),a=t.mode,c=Ac({mode:`hidden`,children:c},a),r=hi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Ec(n),r.childLanes=Dc(e,s,n),t.memoizedState=Tc,hc(null,r)):(so(t),kc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(so(t),t.flags&=-257,t=jc(e,t,n)):t.memoizedState===null?(uo(t),c=r.fallback,a=t.mode,r=Ac({mode:`visible`,children:r.children},a),c=hi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=Ec(n),r.childLanes=Dc(e,s,n),t.memoizedState=Tc,t=hc(null,r)):(uo(t),t.child=e.child,t.flags|=128,t=null);else if(so(t),_f(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=jc(e,t,n)}else if(lc||ea(e,t,n,!1),s=(n&e.childLanes)!==0,lc||s){if(s=Kl,s!==null&&(r=at(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),wu(s,e,r),cc;gf(c)||Iu(),t=jc(e,t,n)}else gf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ii=yf(c.nextSibling),Fi=t,P=!0,Li=null,Ri=!1,e!==null&&Pi(t,e),t=kc(t,r.children),t.flags|=4096);return t}return a?(uo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=fi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=hi(c,a,n,null),c.flags|=2):c=fi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,hc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Ec(n):(a=c.cachePool,a===null?a=Ca():(l=la._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Dc(e,s,n),t.memoizedState=Tc,hc(e.child,r)):(so(t),n=e.child,e=n.sibling,n=fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function kc(e,t){return t=Ac({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ac(e,t){return e=ui(22,e,null,t),e.lanes=0,e}function jc(e,t,n){return Ba(t,e.child,null,n),e=kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function Nc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Pc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=po.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,le(po,o),uc(e,t,r,n),r=P?wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mc(e,n,t);else if(e.tag===19)Mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Nc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Nc(t,!0,n,null,a,r);break;case`together`:Nc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Fc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),eu|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ic(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ta(e)))}function Lc(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),Xi(t,la,e.memoizedState.cache),Wi();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(so(t),e=Fc(e,t,n),e===null?null:e.sibling):Oc(e,t,n):(so(t),t.flags|=128,null);so(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Pc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),le(po,po.current),r)break;return null;case 22:return t.lanes=0,mc(e,t,n,t.pendingProps);case 24:Xi(t,la,e.memoizedState.cache)}return Fc(e,t,n)}function Rc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)lc=!0;else{if(!Ic(e,n)&&!(t.flags&128))return lc=!1,Lc(e,t,n);lc=!!(e.flags&131072)}}else lc=!1,P&&t.flags&1048576&&ji(t,wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)di(e)?(r=Qs(e,r),t.tag=1,t=Cc(null,t,e,r,n)):(t.tag=0,t=xc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=dc(null,t,e,r,n);break a}if(a===w){t.tag=14,t=fc(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return xc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Qs(r,t.pendingProps),Cc(e,t,r,a,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,la,r),r!==o.cache&&$i(t,[la],n,!0),Xa(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=wc(e,t,r,n);break a}if(r!==a){a=bi(Error(i(424)),t),Ki(a),t=wc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ii=yf(e.firstChild),Fi=t,P=!0,Li=null,Ri=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Fc(e,t,n);break a}uc(e,t,r,n)}t=t.child}return t;case 26:return bc(e,t),e===null?(n=Bf(t.type,null,t.pendingProps,null))?t.memoizedState=n:P||(n=t.type,e=t.pendingProps,r=Zd(fe.current).createElement(n),r[dt]=t,r[ft]=e,Gd(r,n,e),wt(r),t.stateNode=r):t.memoizedState=Bf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&P&&(r=t.stateNode=Cf(t.type,t.pendingProps,fe.current),Fi=t,Ri=!0,a=Ii,lf(t.type)?(bf=a,Ii=yf(r.firstChild)):Ii=a),uc(e,t,t.pendingProps.children,n),bc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&P&&((a=r=Ii)&&(r=pf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Fi=t,Ii=yf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),ge(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,ef(a,o)?r=null:s!==null&&ef(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Do(e,t,Ao,null,null,n),lp._currentValue=a),bc(e,t),uc(e,t,r,n),t.child;case 6:return e===null&&P&&((e=n=Ii)&&(n=mf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Fi=t,Ii=null,e=!0)),e||Bi(t)),null;case 13:return Oc(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):uc(e,t,r,n),t.child;case 11:return dc(e,t,t.type,t.pendingProps,n);case 7:return uc(e,t,t.pendingProps,n),t.child;case 8:return uc(e,t,t.pendingProps.children,n),t.child;case 12:return uc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),uc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,na(t),a=ra(a),r=r(a),t.flags|=1,uc(e,t,r,n),t.child;case 14:return fc(e,t,t.type,t.pendingProps,n);case 15:return pc(e,t,t.type,t.pendingProps,n);case 19:return Pc(e,t,n);case 31:return yc(e,t,n);case 22:return mc(e,t,n,t.pendingProps);case 24:return na(t),r=ra(la),e===null?(a=xa(),a===null&&(a=Kl,o=ua(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Xi(t,la,a)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Xi(t,la,r),r!==a.cache&&$i(t,[la],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Xi(t,la,r))),uc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function zc(e){e.flags|=4}function Bc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Nu())e.flags|=8192;else throw ja=Da,Ta}}else e.flags&=-16777217}function Vc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!tp(t)){if(Nu())e.flags|=8192;else throw ja=Da,Ta}}function Hc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:$e(),e.lanes|=t,iu|=t)}function Uc(e,t){if(!P)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Wc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gc(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wc(t),null;case 1:return Wc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(la),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?zc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),Wc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(zc(t),o===null?(Wc(t),Bc(t,a,null,r,n)):(Wc(t),Vc(t,o))):o?o===e.memoizedState?(Wc(t),t.flags&=-16777217):(zc(t),Wc(t),Vc(t,o)):(e=e.memoizedProps,e!==r&&zc(t),Wc(t),Bc(t,a,e,r,n)),null;case 27:if(_e(t),n=fe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Wc(t),null}e=ue.current,Ui(t)?Vi(t,e):(e=Cf(a,r,n),t.stateNode=e,zc(t))}return Wc(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Wc(t),null}if(o=ue.current,Ui(t))Vi(t,o);else{var s=Zd(fe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[dt]=t,o[ft]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Gd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&zc(t)}}return Wc(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Hd(e.nodeValue,n)),e||Bi(t,!0)}else e=Zd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return Wc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[dt]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(i(558))}return Wc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[dt]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Hc(t,t.updateQueue),Wc(t),null);case 4:return he(),e===null&&Md(t.stateNode.containerInfo),Wc(t),null;case 10:return Zi(t.type),Wc(t),null;case 19:if(ce(po),r=t.memoizedState,r===null)return Wc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Uc(r,!1);else{if($l!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,Uc(r,!1),e=o.updateQueue,t.updateQueue=e,Hc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return le(po,po.current&1|2),P&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>uu&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Hc(t,e),Uc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!P)return Wc(t),null}else 2*Ae()-r.renderingStartTime>uu&&n!==536870912&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Wc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=po.current,le(po,a?n&1|2:n&1),P&&Ai(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Wc(t),t.subtreeFlags&6&&(t.flags|=8192)):Wc(t),n=t.updateQueue,n!==null&&Hc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ce(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(la),Wc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Kc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(la),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(po),null;case 4:return he(),null;case 10:return Zi(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&ce(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(la),null;case 25:return null;default:return null}}function qc(e,t){switch(Ni(t),t.tag){case 3:Zi(la),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:ce(po);break;case 10:Zi(t.type);break;case 22:case 23:fo(t),io(),e!==null&&ce(ba);break;case 24:Zi(la)}}function Jc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ed(t,t.return,e)}}function Yc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ed(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ed(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){ed(e,e.return,t)}}}function Zc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ed(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ed(e,t,n)}}function $c(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ed(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ed(e,t,n)}else n.current=null}}function el(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ed(e,e.return,t)}}function tl(e,t,n){try{var r=e.stateNode;Kd(r,e.type,n,t),r[ft]=t}catch(t){ed(e,e.return,t)}}function nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&lf(e.type)||e.tag===4}function rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&lf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=an));else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Gd(t,r,n),t[dt]=e,t[ft]=n}catch(t){ed(e,e.return,t)}}var sl=!1,cl=!1,ll=!1,ul=typeof WeakSet==`function`?WeakSet:Set,dl=null;function fl(e,t){if(e=e.containerInfo,Yd=vp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Xd={focusedElem:e,selectionRange:n},vp=!1,dl=t;dl!==null;)if(t=dl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,dl=e;else for(;dl!==null;){switch(t=dl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){ed(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ff(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ff(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,dl=e;break}dl=t.return}}function pl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ol(e,n),r&4&&Jc(5,n);break;case 1:if(Ol(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ed(n,n.return,e)}else{var i=Qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ed(n,n.return,e)}}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Ol(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{$a(e,t)}catch(e){ed(n,n.return,e)}}break;case 27:t===null&&r&4&&ol(n);case 26:case 5:Ol(e,n),t===null&&r&4&&el(n),r&512&&Qc(n,n.return);break;case 12:Ol(e,n);break;case 31:Ol(e,n),r&4&&yl(e,n);break;case 13:Ol(e,n),r&4&&bl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=id.bind(null,n),vf(e,n))));break;case 22:if(r=n.memoizedState!==null||sl,!r){t=t!==null&&t.memoizedState!==null||cl,i=sl;var a=cl;sl=r,(cl=t)&&!a?Al(e,n,!!(n.subtreeFlags&8772)):Ol(e,n),sl=i,cl=a}break;case 30:break;default:Ol(e,n)}}function ml(e){var t=e.alternate;t!==null&&(e.alternate=null,ml(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var hl=null,gl=!1;function _l(e,t,n){for(n=n.child;n!==null;)vl(e,t,n),n=n.sibling}function vl(e,t,n){if(Be&&typeof Be.onCommitFiberUnmount==`function`)try{Be.onCommitFiberUnmount(ze,n)}catch{}switch(n.tag){case 26:cl||$c(n,t),_l(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:cl||$c(n,t);var r=hl,i=gl;lf(n.type)&&(hl=n.stateNode,gl=!1),_l(e,t,n),wf(n.stateNode),hl=r,gl=i;break;case 5:cl||$c(n,t);case 6:if(r=hl,i=gl,hl=null,_l(e,t,n),hl=r,gl=i,hl!==null){if(gl)try{(hl.nodeType===9?hl.body:hl.nodeName===`HTML`?hl.ownerDocument.body:hl).removeChild(n.stateNode)}catch(e){ed(n,t,e)}else try{hl.removeChild(n.stateNode)}catch(e){ed(n,t,e)}}break;case 18:hl!==null&&(gl?(e=hl,uf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):uf(hl,n.stateNode));break;case 4:r=hl,i=gl,hl=n.stateNode.containerInfo,gl=!0,_l(e,t,n),hl=r,gl=i;break;case 0:case 11:case 14:case 15:Yc(2,n,t),cl||Yc(4,n,t),_l(e,t,n);break;case 1:cl||($c(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),_l(e,t,n);break;case 21:_l(e,t,n);break;case 22:cl=(r=cl)||n.memoizedState!==null,_l(e,t,n),cl=r;break;default:_l(e,t,n)}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){ed(t,t.return,e)}}}function bl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){ed(t,t.return,e)}}function xl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ul),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ul),t;default:throw Error(i(435,e.tag))}}function Sl(e,t){var n=xl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ad.bind(null,e,t);t.then(r,r)}})}function Cl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(lf(c.type)){hl=c.stateNode,gl=!1;break a}break;case 5:hl=c.stateNode,gl=!1;break a;case 3:case 4:hl=c.stateNode.containerInfo,gl=!0;break a}c=c.return}if(hl===null)throw Error(i(160));vl(o,s,a),hl=null,gl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tl(t,e),t=t.sibling}var wl=null;function Tl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Cl(t,e),El(e),r&4&&(Yc(3,e,e.return),Jc(3,e),Yc(5,e,e.return));break;case 1:Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),r&64&&sl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=wl;if(Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[vt]||o[dt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Gd(o,r,n),o[dt]=e,wt(o),r=o;break a;case`link`:var s=Qf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Gd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Qf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Gd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[dt]=e,wt(o),r=o}e.stateNode=r}else $f(a,e.type,e.stateNode)}else e.stateNode=qf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&tl(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?$f(a,e.type,e.stateNode):qf(a,r,e.memoizedProps))}break;case 27:Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),n!==null&&r&4&&tl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),e.flags&32){a=e.stateNode;try{Xt(a,``)}catch(t){ed(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,tl(e,a,n===null?a:n.memoizedProps)),r&1024&&(ll=!0);break;case 6:if(Cl(t,e),El(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){ed(e,e.return,t)}}break;case 3:if(Zf=null,a=wl,wl=Df(t.containerInfo),Cl(t,e),wl=a,El(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){ed(e,e.return,t)}ll&&(ll=!1,Dl(e));break;case 4:r=wl,wl=Df(e.stateNode.containerInfo),Cl(t,e),El(e),wl=r;break;case 12:Cl(t,e),El(e);break;case 31:Cl(t,e),El(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 13:Cl(t,e),El(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(cu=Ae()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=sl,d=cl;if(sl=u||a,cl=d||l,Cl(t,e),cl=d,sl=u,El(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||sl||cl||kl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){ed(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){ed(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?df(m,!0):df(l.stateNode,!1)}catch(e){ed(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Sl(e,n))));break;case 19:Cl(t,e),El(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 30:break;case 21:break;default:Cl(t,e),El(e)}}function El(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(nl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;al(e,rl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Xt(o,``),n.flags&=-33),al(e,rl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;il(e,rl(e),s);break;default:throw Error(i(161))}}catch(t){ed(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pl(e,t.alternate,t),t=t.sibling}function kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Yc(4,t,t.return),kl(t);break;case 1:$c(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),kl(t);break;case 27:wf(t.stateNode);case 26:case 5:$c(t,t.return),kl(t);break;case 22:t.memoizedState===null&&kl(t);break;case 30:kl(t);break;default:kl(t)}e=e.sibling}}function Al(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Al(i,a,n),Jc(4,a);break;case 1:if(Al(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ed(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){ed(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:ol(a);case 26:case 5:Al(i,a,n),n&&r===null&&o&4&&el(a),Qc(a,a.return);break;case 12:Al(i,a,n);break;case 31:Al(i,a,n),n&&o&4&&yl(i,a);break;case 13:Al(i,a,n),n&&o&4&&bl(i,a);break;case 22:a.memoizedState===null&&Al(i,a,n),Qc(a,a.return);break;case 30:break;default:Al(i,a,n)}t=t.sibling}}function jl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&da(n))}function Ml(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function Nl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pl(e,t,n,r),t=t.sibling}function Pl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Nl(e,t,n,r),i&2048&&Jc(9,t);break;case 1:Nl(e,t,n,r);break;case 3:Nl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e)));break;case 12:if(i&2048){Nl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){ed(t,t.return,e)}}else Nl(e,t,n,r);break;case 31:Nl(e,t,n,r);break;case 13:Nl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Nl(e,t,n,r):(a._visibility|=2,Fl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Nl(e,t,n,r):Il(e,t),i&2048&&jl(o,t);break;case 24:Nl(e,t,n,r),i&2048&&Ml(t.alternate,t);break;default:Nl(e,t,n,r)}}function Fl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Fl(a,o,s,c,i),Jc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Fl(a,o,s,c,i)):u._visibility&2?Fl(a,o,s,c,i):Il(a,o),i&&l&2048&&jl(o.alternate,o);break;case 24:Fl(a,o,s,c,i),i&&l&2048&&Ml(o.alternate,o);break;default:Fl(a,o,s,c,i)}t=t.sibling}}function Il(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Il(n,r),i&2048&&jl(r.alternate,r);break;case 24:Il(n,r),i&2048&&Ml(r.alternate,r);break;default:Il(n,r)}t=t.sibling}}var Ll=8192;function Rl(e,t,n){if(e.subtreeFlags&Ll)for(e=e.child;e!==null;)zl(e,t,n),e=e.sibling}function zl(e,t,n){switch(e.tag){case 26:Rl(e,t,n),e.flags&Ll&&e.memoizedState!==null&&np(n,wl,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,n);break;case 3:case 4:var r=wl;wl=Df(e.stateNode.containerInfo),Rl(e,t,n),wl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ll,Ll=16777216,Rl(e,t,n),Ll=r):Rl(e,t,n));break;default:Rl(e,t,n)}}function Bl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];dl=r,Wl(r,e)}Bl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hl(e),e=e.sibling}function Hl(e){switch(e.tag){case 0:case 11:case 15:Vl(e),e.flags&2048&&Yc(9,e,e.return);break;case 3:Vl(e);break;case 12:Vl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ul(e)):Vl(e);break;default:Vl(e)}}function Ul(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];dl=r,Wl(r,e)}Bl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yc(8,t,t.return),Ul(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ul(t));break;default:Ul(t)}e=e.sibling}}function Wl(e,t){for(;dl!==null;){var n=dl;switch(n.tag){case 0:case 11:case 15:Yc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,dl=r;else a:for(n=e;dl!==null;){r=dl;var i=r.sibling,a=r.return;if(ml(r),r===n){dl=null;break a}if(i!==null){i.return=a,dl=i;break a}dl=a}}}var Gl={getCacheForType:function(e){var t=ra(la),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ra(la).controller.signal}},I=typeof WeakMap==`function`?WeakMap:Map,L=0,Kl=null,R=null,z=0,ql=0,Jl=null,Yl=!1,Xl=!1,Zl=!1,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=null,ou=null,su=!1,cu=0,lu=0,uu=1/0,du=null,fu=null,pu=0,mu=null,hu=null,gu=0,_u=0,vu=null,yu=null,bu=0,xu=null;function Su(){return L&2&&z!==0?z&-z:k.T===null?ct():xd()}function Cu(){if(ru===0){if(!(z&536870912)||P){var e=qe;qe<<=1,!(qe&3932160)&&(qe=262144),ru=e}else ru=536870912}return e=ao.current,e!==null&&(e.flags|=32),ru}function wu(e,t,n){(e===Kl&&(ql===2||ql===9)||e.cancelPendingCommit!==null)&&(ju(e,0),Ou(e,z,ru,!1)),tt(e,n),(!(L&2)||e!==Kl)&&(e===Kl&&(!(L&2)&&(tu|=n),$l===4&&Ou(e,z,ru,!1)),pd(e))}function Tu(e,t,n){if(L&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ze(e,t),a=r?zu(e,t):Lu(e,t,!0),o=r;do{if(a===0){Xl&&!r&&Ou(e,t,0,!1);break}if(n=e.current.alternate,o&&!Du(n)){a=Lu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=au;var l=c.current.memoizedState.isDehydrated;if(l&&(ju(c,s).flags|=256),s=Lu(c,s,!1),s!==2){if(Zl&&!l){c.errorRecoveryDisabledLanes|=o,tu|=o,a=4;break a}o=ou,ou=a,o!==null&&(ou===null?ou=o:ou.push.apply(ou,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ju(e,0),Ou(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ou(r,t,ru,!Yl);break a;case 2:ou=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=cu+300-Ae(),10<a)){if(Ou(r,t,ru,!Yl),Xe(r,0,!0)!==0)break a;gu=t,r.timeoutHandle=rf(Eu.bind(null,r,n,ou,du,su,t,ru,tu,iu,Yl,o,`Throttled`,-0,0),a);break a}Eu(r,n,ou,du,su,t,ru,tu,iu,Yl,o,null,-0,0)}break}while(1);pd(e)}function Eu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:an},zl(t,a,d);var m=(a&62914560)===a?cu-Ae():(a&4194048)===a?lu-Ae():0;if(m=ip(d,m),m!==null){gu=a,e.cancelPendingCommit=m(Ku.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Ou(e,a,o,!l);return}}Ku(e,t,a,n,r,i,o,s,c)}function Du(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ou(e,t,n,r){t&=~nu,t&=~tu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-He(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&rt(e,n,t)}function ku(){return L&6?!0:(md(0,!1),!1)}function Au(){if(R!==null){if(ql===0)var e=R.return;else e=R,Yi=Ji=null,No(e),Pa=null,Fa=0,e=R;for(;e!==null;)qc(e.alternate,e),e=e.return;R=null}}function ju(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,af(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),gu=0,Au(),Kl=e,R=n=fi(e.current,null),z=t,ql=0,Jl=null,Yl=!1,Xl=Ze(e,t),Zl=!1,iu=ru=nu=tu=eu=$l=0,ou=au=null,su=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-He(r),a=1<<i;t|=e[i],r&=~a}return Ql=t,ni(),n}function Mu(e,t){F=null,k.H=Ws,t===wa||t===Ea?(t=Ma(),ql=3):t===Ta?(t=Ma(),ql=4):ql=t===cc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Jl=t,R===null&&($l=1,nc(e,bi(t,e.current)))}function Nu(){var e=ao.current;return e===null?!0:(z&4194048)===z?oo===null:(z&62914560)===z||z&536870912?e===oo:!1}function Pu(){var e=k.H;return k.H=Ws,e===null?Ws:e}function Fu(){var e=k.A;return k.A=Gl,e}function Iu(){$l=4,Yl||(z&4194048)!==z&&ao.current!==null||(Xl=!0),!(eu&134217727)&&!(tu&134217727)||Kl===null||Ou(Kl,z,ru,!1)}function Lu(e,t,n){var r=L;L|=2;var i=Pu(),a=Fu();(Kl!==e||z!==t)&&(du=null,ju(e,t)),t=!1;var o=$l;a:do try{if(ql!==0&&R!==null){var s=R,c=Jl;switch(ql){case 8:Au(),o=6;break a;case 3:case 2:case 9:case 6:ao.current===null&&(t=!0);var l=ql;if(ql=0,Jl=null,Uu(e,s,c,l),n&&Xl){o=0;break a}break;default:l=ql,ql=0,Jl=null,Uu(e,s,c,l)}}Ru(),o=$l;break}catch(t){Mu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,L=r,k.H=i,k.A=a,R===null&&(Kl=null,z=0,ni()),o}function Ru(){for(;R!==null;)Vu(R)}function zu(e,t){var n=L;L|=2;var r=Pu(),a=Fu();Kl!==e||z!==t?(du=null,uu=Ae()+500,ju(e,t)):Xl=Ze(e,t);a:do try{if(ql!==0&&R!==null){t=R;var o=Jl;b:switch(ql){case 1:ql=0,Jl=null,Uu(e,t,o,1);break;case 2:case 9:if(Oa(o)){ql=0,Jl=null,Hu(t);break}t=function(){ql!==2&&ql!==9||Kl!==e||(ql=7),pd(e)},o.then(t,t);break a;case 3:ql=7;break a;case 4:ql=5;break a;case 7:Oa(o)?(ql=0,Jl=null,Hu(t)):(ql=0,Jl=null,Uu(e,t,o,7));break;case 5:var s=null;switch(R.tag){case 26:s=R.memoizedState;case 5:case 27:var c=R;if(s?tp(s):c.stateNode.complete){ql=0,Jl=null;var l=c.sibling;if(l!==null)R=l;else{var u=c.return;u===null?R=null:(R=u,Wu(u))}break b}}ql=0,Jl=null,Uu(e,t,o,5);break;case 6:ql=0,Jl=null,Uu(e,t,o,6);break;case 8:Au(),$l=6;break a;default:throw Error(i(462))}}Bu();break}catch(t){Mu(e,t)}while(1);return Yi=Ji=null,k.H=r,k.A=a,L=n,R===null?(Kl=null,z=0,ni(),$l):0}function Bu(){for(;R!==null&&!Oe();)Vu(R)}function Vu(e){var t=Rc(e.alternate,e,Ql);e.memoizedProps=e.pendingProps,t===null?Wu(e):R=t}function Hu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Sc(n,t,t.pendingProps,t.type,void 0,z);break;case 11:t=Sc(n,t,t.pendingProps,t.type.render,t.ref,z);break;case 5:No(t);default:qc(n,t),t=R=pi(t,Ql),t=Rc(n,t,Ql)}e.memoizedProps=e.pendingProps,t===null?Wu(e):R=t}function Uu(e,t,n,r){Yi=Ji=null,No(t),Pa=null,Fa=0;var i=t.return;try{if(sc(e,i,t,n,z)){$l=1,nc(e,bi(n,e.current)),R=null;return}}catch(t){if(i!==null)throw R=i,t;$l=1,nc(e,bi(n,e.current)),R=null;return}t.flags&32768?(P||r===1?e=!0:Xl||z&536870912?e=!1:(Yl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),Gu(t,e)):Wu(t)}function Wu(e){var t=e;do{if(t.flags&32768){Gu(t,Yl);return}e=t.return;var n=Gc(t.alternate,t,Ql);if(n!==null){R=n;return}if(t=t.sibling,t!==null){R=t;return}R=t=e}while(t!==null);$l===0&&($l=5)}function Gu(e,t){do{var n=Kc(e.alternate,e);if(n!==null){n.flags&=32767,R=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){R=e;return}R=e=n}while(e!==null);$l=6,R=null}function Ku(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Zu();while(pu!==0);if(L&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ti,nt(e,n,o,s,c,l),e===Kl&&(R=Kl=null,z=0),hu=t,mu=e,gu=n,_u=o,vu=a,yu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,od(Pe,function(){return Qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=k.T,k.T=null,a=A.p,A.p=2,s=L,L|=4;try{fl(e,t,n)}finally{L=s,A.p=a,k.T=r}}pu=1,qu(),Ju(),Yu()}}function qu(){if(pu===1){pu=0;var e=mu,t=hu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=L;L|=4;try{Tl(t,e);var a=Xd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vp=!!Yd,Xd=Yd=null}finally{L=i,A.p=r,k.T=n}}e.current=t,pu=2}}function Ju(){if(pu===2){pu=0;var e=mu,t=hu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=L;L|=4;try{pl(e,t.alternate,t)}finally{L=i,A.p=r,k.T=n}}pu=3}}function Yu(){if(pu===4||pu===3){pu=0,ke();var e=mu,t=hu,n=gu,r=yu;t.subtreeFlags&10256||t.flags&10256?pu=5:(pu=0,hu=mu=null,Xu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(fu=null),st(n),t=t.stateNode,Be&&typeof Be.onCommitFiberRoot==`function`)try{Be.onCommitFiberRoot(ze,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=k.T,i=A.p,A.p=2,k.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{k.T=t,A.p=i}}gu&3&&Zu(),pd(e),i=e.pendingLanes,n&261930&&i&42?e===xu?bu++:(bu=0,xu=e):bu=0,md(0,!1)}}function Xu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function Zu(){return qu(),Ju(),Yu(),Qu()}function Qu(){if(pu!==5)return!1;var e=mu,t=_u;_u=0;var n=st(gu),r=k.T,a=A.p;try{A.p=32>n?32:n,k.T=null,n=vu,vu=null;var o=mu,s=gu;if(pu=0,hu=mu=null,gu=0,L&6)throw Error(i(331));var c=L;if(L|=4,Hl(o.current),Pl(o,o.current,s,n),L=c,md(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{A.p=a,k.T=r,Xu(e,t)}}function $u(e,t,n){t=bi(n,t),t=ic(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(tt(e,2),pd(e))}function ed(e,t,n){if(e.tag===3)$u(e,e,n);else for(;t!==null;){if(t.tag===3){$u(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(fu===null||!fu.has(r))){e=bi(n,e),n=ac(2),r=Ka(t,n,2),r!==null&&(oc(n,r,t,e),tt(r,2),pd(r));break}}t=t.return}}function td(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new I;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Zl=!0,i.add(n),e=nd.bind(null,e,t,n),t.then(e,e))}function nd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Kl===e&&(z&n)===n&&($l===4||$l===3&&(z&62914560)===z&&300>Ae()-cu?!(L&2)&&ju(e,0):nu|=n,iu===z&&(iu=0)),pd(e)}function rd(e,t){t===0&&(t=$e()),e=ai(e,t),e!==null&&(tt(e,t),pd(e))}function id(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rd(e,n)}function ad(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),rd(e,n)}function od(e,t){return Ee(e,t)}var sd=null,cd=null,ld=!1,ud=!1,dd=!1,fd=0;function pd(e){e!==cd&&e.next===null&&(cd===null?sd=cd=e:cd=cd.next=e),ud=!0,ld||(ld=!0,bd())}function md(e,t){if(!dd&&ud){dd=!0;do for(var n=!1,r=sd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,yd(r,a))}else a=z,a=Xe(r,r===Kl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,yd(r,a))}r=r.next}while(n);dd=!1}}function hd(){gd()}function gd(){ud=ld=!1;var e=0;fd!==0&&nf()&&(e=fd);for(var t=Ae(),n=null,r=sd;r!==null;){var i=r.next,a=_d(r,t);a===0?(r.next=null,n===null?sd=i:n.next=i,i===null&&(cd=n)):(n=r,(e!==0||a&3)&&(ud=!0)),r=i}pu!==0&&pu!==5||md(e,!1),fd!==0&&(fd=0)}function _d(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-He(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Kl,n=z,n=Xe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(ql===2||ql===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&De(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&De(r),st(n)){case 2:case 8:n=Ne;break;case 32:n=Pe;break;case 268435456:n=Ie;break;default:n=Pe}return r=vd.bind(null,e),n=Ee(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&De(r),e.callbackPriority=2,e.callbackNode=null,2}function vd(e,t){if(pu!==0&&pu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zu()&&e.callbackNode!==n)return null;var r=z;return r=Xe(e,e===Kl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Tu(e,r,t),_d(e,Ae()),e.callbackNode!=null&&e.callbackNode===n?vd.bind(null,e):null)}function yd(e,t){if(Zu())return null;Tu(e,t,!0)}function bd(){sf(function(){L&6?Ee(Me,hd):gd()})}function xd(){if(fd===0){var e=ma;e===0&&(e=Ke,Ke<<=1,!(Ke&261888)&&(Ke=256)),fd=e}return fd}function Sd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:rn(``+e)}function Cd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function wd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Sd((i[ft]||null).action),o=r.submitter;o&&(t=(t=o[ft]||null)?Sd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new j(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(fd!==0){var e=o?Cd(i,o):new FormData(i);As(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Cd(i,o):new FormData(i),As(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Td=0;Td<Xr.length;Td++){var Ed=Xr[Td];Zr(Ed.toLowerCase(),`on`+(Ed[0].toUpperCase()+Ed.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Ot(`onMouseEnter`,[`mouseout`,`mouseover`]),Ot(`onMouseLeave`,[`mouseout`,`mouseover`]),Ot(`onPointerEnter`,[`pointerout`,`pointerover`]),Ot(`onPointerLeave`,[`pointerout`,`pointerover`]),Dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Dd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Od=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Dd));function kd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}}}}function B(e,t){var n=t[mt];n===void 0&&(n=t[mt]=new Set);var r=e+`__bubble`;n.has(r)||(Nd(t,e,2,!1),n.add(r))}function Ad(e,t,n){var r=0;t&&(r|=4),Nd(n,e,r,t)}var jd=`_reactListening`+Math.random().toString(36).slice(2);function Md(e){if(!e[jd]){e[jd]=!0,Tt.forEach(function(t){t!==`selectionchange`&&(Od.has(t)||Ad(t,!1,e),Ad(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jd]||(t[jd]=!0,Ad(`selectionchange`,!1,t))}}function Nd(e,t,n,r){switch(Cp(t)){case 2:var i=V;break;case 8:i=yp;break;default:i=bp}n=i.bind(null,t,n,e),i=void 0,!hn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Pd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=bt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}fn(function(){var r=a,i=sn(n),s=[];a:{var c=Yr.get(e);if(c!==void 0){var l=j,u=e;switch(e){case`keypress`:if(xn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Hr:case Ur:case Wr:l=Nn;break;case Jr:l=Wn;break;case`scroll`:case`scrollend`:l=Dn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=pn(m,p),g!=null&&d.push(Fd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==on&&(u=n.relatedTarget||n.fromElement)&&(bt(u)||u[pt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?bt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:St(l),h=u==null?c:St(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,bt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ld,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Rd(s,c,l,d,!1),u!==null&&f!==null&&Rd(s,f,u,d,!0)}}a:{if(c=r?St(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c)){if(pr)v=Sr;else{v=br;var y=yr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&en(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Kt(c,`number`,c.value)}switch(y=r?St(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(s,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(s,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=bn()):(_n=i,vn=`value`in _n?_n.value:_n.textContent,nr=!0)),y=Id(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Id(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),wd(s,e,r,n,i)}kd(s,t)})}function Fd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=pn(e,n),i!=null&&r.unshift(Fd(e,i,a)),i=pn(e,t),i!=null&&r.push(Fd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ld(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=pn(n,a),l!=null&&o.unshift(Fd(n,l,c))):i||(l=pn(n,a),l!=null&&o.push(Fd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var zd=/\r\n?/g,Bd=/\u0000|\uFFFD/g;function Vd(e){return(typeof e==`string`?e:``+e).replace(zd,`
145
- `).replace(Bd,``)}function Hd(e,t){return t=Vd(t),Vd(e)===t}function Ud(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Xt(e,``+r);break;case`className`:Pt(e,`class`,r);break;case`tabIndex`:Pt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Pt(e,n,r);break;case`style`:$t(e,r,o);break;case`data`:if(t!==`object`){Pt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ud(e,t,`name`,a.name,a,null),Ud(e,t,`formEncType`,a.formEncType,a,null),Ud(e,t,`formMethod`,a.formMethod,a,null),Ud(e,t,`formTarget`,a.formTarget,a,null)):(Ud(e,t,`encType`,a.encType,a,null),Ud(e,t,`method`,a.method,a,null),Ud(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=an);break;case`onScroll`:r!=null&&B(`scroll`,e);break;case`onScrollEnd`:r!=null&&B(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=rn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:B(`beforetoggle`,e),B(`toggle`,e),Nt(e,`popover`,r);break;case`xlinkActuate`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Nt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=tn.get(n)||n,Nt(e,n,r))}}function Wd(e,t,n,r,a,o){switch(n){case`style`:$t(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Xt(e,``+r);break;case`onScroll`:r!=null&&B(`scroll`,e);break;case`onScrollEnd`:r!=null&&B(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=an);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Et.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ft]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Nt(e,n,r)}}}function Gd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:B(`error`,e),B(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ud(e,t,o,s,n,null)}}a&&Ud(e,t,`srcSet`,n.srcSet,n,null),r&&Ud(e,t,`src`,n.src,n,null);return;case`input`:B(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Ud(e,t,r,d,n,null)}}Gt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in B(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ud(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&qt(e,!!r,n,!0):qt(e,!!r,t,!1);return;case`textarea`:for(s in B(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Ud(e,t,s,c,n,null)}Yt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Ud(e,t,l,r,n,null)}return;case`dialog`:B(`beforetoggle`,e),B(`toggle`,e),B(`cancel`,e),B(`close`,e);break;case`iframe`:case`object`:B(`load`,e);break;case`video`:case`audio`:for(r=0;r<Dd.length;r++)B(Dd[r],e);break;case`image`:B(`error`,e),B(`load`,e);break;case`details`:B(`toggle`,e);break;case`embed`:case`source`:case`link`:B(`error`,e),B(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ud(e,t,u,r,n,null)}return;default:if(en(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Wd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ud(e,t,c,r,n,null))}function Kd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Ud(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Ud(e,t,p,m,r,f)}}Wt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Ud(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ud(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?qt(e,!!n,n?[]:``,!1):qt(e,!!n,t,!0)):qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ud(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Ud(e,t,s,a,r,o)}Jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Ud(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ud(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Ud(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Ud(e,t,u,p,r,m)}return;default:if(en(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Wd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Wd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ud(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Ud(e,t,f,p,r,m)}function qd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Jd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&qd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&qd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Yd=null,Xd=null;function Zd(e){return e.nodeType===9?e:e.ownerDocument}function Qd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function $d(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function ef(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tf=null;function nf(){var e=window.event;return e&&e.type===`popstate`?e!==tf&&(tf=e,!0):(tf=null,!1)}var rf=typeof setTimeout==`function`?setTimeout:void 0,af=typeof clearTimeout==`function`?clearTimeout:void 0,of=typeof Promise==`function`?Promise:void 0,sf=typeof queueMicrotask==`function`?queueMicrotask:of===void 0?rf:function(e){return of.resolve(null).then(e).catch(cf)};function cf(e){setTimeout(function(){throw e})}function lf(e){return e===`head`}function uf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)wf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,wf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[vt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&wf(e.ownerDocument.body)}n=i}while(n);Hp(t)}function df(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function ff(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ff(n),yt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[vt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=yf(e.nextSibling),e===null)break}return null}function mf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=yf(e.nextSibling),e===null))return null;return e}function hf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=yf(e.nextSibling),e===null))return null;return e}function gf(e){return e.data===`$?`||e.data===`$~`}function _f(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function yf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var bf=null;function xf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return yf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Cf(e,t,n){switch(t=Zd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function wf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var Tf=new Map,Ef=new Set;function Df(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Of=A.d;A.d={f:kf,r:Af,D:Nf,C:Pf,L:Ff,m:If,X:Rf,S:Lf,M:zf};function kf(){var e=Of.f(),t=ku();return e||t}function Af(e){var t=xt(e);t!==null&&t.tag===5&&t.type===`form`?Ms(t):Of.r(e)}var jf=typeof document>`u`?null:document;function Mf(e,t,n){var r=jf;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Gd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Nf(e){Of.D(e),Mf(`dns-prefetch`,e,null)}function Pf(e,t){Of.C(e,t),Mf(`preconnect`,e,t)}function Ff(e,t,n){Of.L(e,t,n);var r=jf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Tf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Tf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Gd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function If(e,t){Of.m(e,t);var n=jf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Tf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Tf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Gd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function Lf(e,t,n){Of.S(e,t,n);var r=jf;if(r&&e){var i=Ct(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Tf.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);wt(c),Gd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rf(e,t){Of.X(e,t);var n=jf;if(n&&e){var r=Ct(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),wt(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t){Of.M(e,t);var n=jf;if(n&&e){var r=Ct(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),wt(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var a=(a=fe.current)?Df(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Vf(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Vf(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Tf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Tf.set(e,n),o||Wf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Gf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Vf(e){return`href="`+Ut(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Gd(t,`link`,n),wt(t),e.head.appendChild(t))}function Gf(e){return`[src="`+Ut(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),Gd(r,`style`,a),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Vf(n.href);var o=e.querySelector(Hf(a));if(o)return t.state.loading|=4,t.instance=o,wt(o),o;r=Uf(n),(a=Tf.get(a))&&Yf(r,a),o=(e.ownerDocument||e).createElement(`link`),wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Gd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(a=e.querySelector(Kf(o)))?(t.instance=a,wt(a),a):(r=n,(a=Tf.get(o))&&(r=f({},n),Xf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),wt(a),Gd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Jf(r,n.precedence,e));return t.instance}function Jf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Zf=null;function Qf(e,t,n){if(Zf===null){var r=new Map,i=Zf=new Map;i.set(n,r)}else i=Zf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[vt]||a[dt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function $f(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ep(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function tp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function np(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ap.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Tf.get(i))&&Yf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Gd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ap.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rp=0;function ip(e,t){return e.stylesheets&&e.count===0&&sp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rp===0&&(rp=62500*Jd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ap(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var op=null;function sp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,op=new Map,t.forEach(cp,e),op=null,ap.call(e))}function cp(e,t){if(!(t.state.loading&4)){var n=op.get(e);if(n)var r=n.get(null);else{n=new Map,op.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ap.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lp={$$typeof:b,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function up(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function dp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new up(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=ua(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function fp(e){return e?(e=ci,e):ci}function pp(e,t,n,r,i,a){i=fp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(wu(n,e,t),qa(n,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hp(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function gp(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&wu(t,e,67108864),hp(e,67108864)}}function _p(e){if(e.tag===13||e.tag===31){var t=Su();t=ot(t);var n=ai(e,t);n!==null&&wu(n,e,t),hp(e,t)}}var vp=!0;function V(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=2,bp(e,t,n,r)}finally{A.p=a,k.T=i}}function yp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=8,bp(e,t,n,r)}finally{A.p=a,k.T=i}}function bp(e,t,n,r){if(vp){var i=H(r);if(i===null)Pd(e,t,r,xp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=xt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ye(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-He(o);s.entanglements[1]|=c,o&=~c}pd(a),!(L&6)&&(uu=Ae()+500,md(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&wu(s,a,2),ku(),hp(a,2)}if(a=H(r),a===null&&Pd(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Pd(e,t,r,null,n)}}function H(e){return e=sn(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=bt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xp=e,null}function Cp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var wp=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,Ap=[],jp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mp(e,t){switch(e){case`focusin`:case`focusout`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.delete(t.pointerId)}}function Np(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=xt(t),t!==null&&gp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Tp=Np(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Np(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Np(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Np(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=bt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,lt(e.priority,function(){_p(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,lt(e.priority,function(){_p(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=H(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);on=r,n.target.dispatchEvent(r),on=null}else return t=xt(n),t!==null&&gp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){wp=!1,Tp!==null&&Ip(Tp)&&(Tp=null),Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op.forEach(Lp),kp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sp(r||n)===null)continue;break}var a=xt(n);a!==null&&(e.splice(t,3),t-=3,As(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Tp!==null&&zp(Tp,e),Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<Ap.length;n++){var r=Ap[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ap.length&&(n=Ap[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&Ap.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ft]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ft]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;pp(n,Su(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pp(e.current,2,null,e,null,null),ku(),t[pt]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ap.length&&t!==0&&t<Ap[n].priority;n++);Ap.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.8`)throw Error(i(527,Kp,`19.2.8`));A.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:k,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{ze=Jp.inject(qp),Be=Jp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=$s,s=ec,c=tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dp(e,1,!1,null,null,n,r,null,o,s,c,Up),e[pt]=t.current,Md(e),new Wp(t)}})),nS=c(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=tS()}))(),rS=Math.min,iS=Math.max,aS=Math.round,oS=e=>({x:e,y:e}),sS={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function cS(e,t,n){return iS(e,rS(t,n))}function lS(e,t){return typeof e==`function`?e(t):e}function uS(e){return e.split(`-`)[0]}function dS(e){return e.split(`-`)[1]}function fS(e){return e===`x`?`y`:`x`}function pS(e){return e===`y`?`height`:`width`}function mS(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function hS(e){return fS(mS(e))}function gS(e,t,n){n===void 0&&(n=!1);let r=dS(e),i=hS(e),a=pS(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=TS(o)),[o,TS(o)]}function _S(e){let t=TS(e);return[vS(e),t,vS(t)]}function vS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var yS=[`left`,`right`],bS=[`right`,`left`],xS=[`top`,`bottom`],SS=[`bottom`,`top`];function CS(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bS:yS:t?yS:bS;case`left`:case`right`:return t?xS:SS;default:return[]}}function wS(e,t,n,r){let i=dS(e),a=CS(uS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vS)))),a}function TS(e){let t=uS(e);return sS[t]+e.slice(t.length)}function ES(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function DS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ES(e)}function OS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function kS(e,t,n){let{reference:r,floating:i}=e,a=mS(t),o=hS(t),s=pS(o),c=uS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=dS(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function AS(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=lS(t,e),p=DS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=OS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=OS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var jS=50,MS=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:AS},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=kS(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<jS&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=kS(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},NS=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=lS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=uS(r),_=mS(o),v=uS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[TS(o)]:_S(o)),x=p!==`none`;!d&&x&&b.push(...wS(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=gS(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===mS(t)||T.every(e=>mS(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=mS(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},PS=new Set([`left`,`top`]);async function FS(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=uS(n),s=dS(n),c=mS(n)===`y`,l=PS.has(o)?-1:1,u=a&&c?-1:1,d=lS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var IS=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await FS(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},LS=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=lS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=mS(i),p=fS(f),m=u[p],h=u[f],g=(e,t)=>cS(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function RS(){return typeof window<`u`}function zS(e){return HS(e)?(e.nodeName||``).toLowerCase():`#document`}function BS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function VS(e){return((HS(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function HS(e){return RS()?e instanceof Node||e instanceof BS(e).Node:!1}function US(e){return RS()?e instanceof Element||e instanceof BS(e).Element:!1}function WS(e){return RS()?e instanceof HTMLElement||e instanceof BS(e).HTMLElement:!1}function GS(e){return!RS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof BS(e).ShadowRoot}function KS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=rC(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function qS(e){return/^(table|td|th)$/.test(zS(e))}function JS(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var YS=/transform|translate|scale|rotate|perspective|filter/,XS=/paint|layout|strict|content/,ZS=e=>!!e&&e!==`none`,QS;function $S(e){let t=US(e)?rC(e):e;return ZS(t.transform)||ZS(t.translate)||ZS(t.scale)||ZS(t.rotate)||ZS(t.perspective)||!tC()&&(ZS(t.backdropFilter)||ZS(t.filter))||YS.test(t.willChange||``)||XS.test(t.contain||``)}function eC(e){let t=aC(e);for(;WS(t)&&!nC(t);){if($S(t))return t;if(JS(t))return null;t=aC(t)}return null}function tC(){return QS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),QS}function nC(e){return/^(html|body|#document)$/.test(zS(e))}function rC(e){return BS(e).getComputedStyle(e)}function iC(e){return US(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function aC(e){if(zS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||GS(e)&&e.host||VS(e);return GS(t)?t.host:t}function oC(e){let t=aC(e);return nC(t)?(e.ownerDocument||e).body:WS(t)&&KS(t)?t:oC(t)}function sC(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=oC(e),i=r===e.ownerDocument?.body,a=BS(r);if(i){let e=cC(a);return t.concat(a,a.visualViewport||[],KS(r)?r:[],e&&n?sC(e):[])}return t.concat(r,sC(r,[],n))}function cC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lC(e){let t=rC(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=WS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=aS(n)!==a||aS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function uC(e){return US(e)?e:e.contextElement}function dC(e){let t=uC(e);if(!WS(t))return oS(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lC(t),o=(a?aS(n.width):n.width)/r,s=(a?aS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var fC=oS(0);function pC(e){let t=BS(e);return!tC()||!t.visualViewport?fC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mC(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===BS(e)}function hC(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=uC(e),o=oS(1);t&&(r?US(r)&&(o=dC(r)):o=dC(e));let s=mC(a,n,r)?pC(a):oS(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=BS(a),t=US(r)?BS(r):r,n=e,i=cC(n);for(;i&&t!==n;){let e=dC(i),t=i.getBoundingClientRect(),r=rC(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=BS(i),i=cC(n)}}return OS({width:u,height:d,x:c,y:l})}function gC(e,t){let n=iC(e).scrollLeft;return t?t.left+n:hC(VS(e)).left+n}function _C(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-gC(e,n),y:n.top+t.scrollTop}}function vC(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=VS(r),s=t?JS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=oS(1),u=oS(0),d=WS(r);if((d||!a)&&((zS(r)!==`body`||KS(o))&&(c=iC(r)),d)){let e=hC(r);l=dC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?_C(o,c):oS(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function yC(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function bC(e){let t=iC(e),n=e.ownerDocument.body,r=iS(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=iS(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+gC(e),o=-t.scrollTop;return rC(n).direction===`rtl`&&(a+=iS(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var xC=25;function SC(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=BS(e),a=VS(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!tC()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(gC(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=xC&&(s-=o)}return{width:s,height:c,x:l,y:u}}function CC(e,t){let n=hC(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=dC(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function wC(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=SC(e,n,t);else if(t===`document`)r=bC(VS(e));else if(US(t))r=CC(t,n);else{let n=pC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return OS(r)}function TC(e,t){let n=t.get(e);if(n)return n;let r=sC(e,[],!1).filter(e=>US(e)&&zS(e)!==`body`),i=null,a=rC(e).position===`fixed`,o=a?aC(e):e;for(;US(o)&&!nC(o);){let e=rC(o),t=$S(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=aC(o)}return t.set(e,r),r}function EC(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?JS(t)?[]:TC(t,this._c):[].concat(n),r],o=wC(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=wC(t,a[e],i);s=iS(n.top,s),c=rS(n.right,c),l=rS(n.bottom,l),u=iS(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function DC(e){let{width:t,height:n}=lC(e);return{width:t,height:n}}function OC(e,t,n){let r=WS(t),i=VS(t),a=n===`fixed`,o=hC(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=oS(0);if((r||!a)&&((zS(t)!==`body`||KS(i))&&(s=iC(t)),r)){let e=hC(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=gC(i));let l=i&&!r&&!a?_C(i,s):oS(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function kC(e){return rC(e).position===`static`}function AC(e,t){if(!WS(e)||rC(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return VS(e)===n&&(n=n.ownerDocument.body),n}function jC(e,t){let n=BS(e);if(JS(e))return n;if(!WS(e)){let t=aC(e);for(;t&&!nC(t);){if(US(t)&&!kC(t))return t;t=aC(t)}return n}let r=AC(e,t);for(;r&&qS(r)&&kC(r);)r=AC(r,t);return r&&nC(r)&&kC(r)&&!$S(r)?n:r||eC(e)||n}var MC=async function(e){let t=this.getOffsetParent||jC,n=this.getDimensions,r=await n(e.floating);return{reference:OC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NC(e){return rC(e).direction===`rtl`}var PC={convertOffsetParentRelativeRectToViewportRelativeRect:vC,getDocumentElement:VS,getClippingRect:EC,getOffsetParent:jC,getElementRects:MC,getClientRects:yC,getDimensions:DC,getScale:dC,isElement:US,isRTL:NC},FC=IS,IC=LS,LC=NS,RC=(e,t,n)=>{let r=new Map,i=n??{},a={...PC,...i.platform,_c:r};return MS(e,t,{...i,platform:a})},zC=d(eS(),1),BC=typeof document<`u`?W.useLayoutEffect:function(){};function VC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!VC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!VC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function HC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UC(e,t){let n=HC(e);return Math.round(t*n)/n}function WC(e){let t=W.useRef(e);return BC(()=>{t.current=e}),t}function GC(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);VC(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=WC(c),D=WC(i),O=WC(l),ee=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),RC(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};te.current&&!VC(w.current,t)&&(w.current=t,zC.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);BC(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=W.useRef(!1);BC(()=>(te.current=!0,()=>{te.current=!1}),[]),BC(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,ee);ee()}},[b,x,ee,E,T]);let ne=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),re=W.useMemo(()=>({reference:b,floating:x}),[b,x]),k=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!re.floating)return e;let t=UC(re.floating,u.x),r=UC(re.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...HC(re.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,re.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:ee,refs:ne,elements:re,floatingStyles:k}),[u,ee,ne,re,k])}var KC=(e,t)=>{let n=FC(e);return{name:n.name,fn:n.fn,options:[e,t]}},qC=(e,t)=>{let n=IC(e);return{name:n.name,fn:n.fn,options:[e,t]}},JC=(e,t)=>{let n=LC(e);return{name:n.name,fn:n.fn,options:[e,t]}},YC=e=>{let[t,n]=W.useState(e),r=W.useRef(t);return[t,W.useCallback(function(e){r.current=typeof e==`function`?e(r.current):e,n(r.current)},[]),r]},XC=({analytics:e,element:t,data:n,prevData:r,hide:i,updateTextWithAlternative:a,addIgnoredTerm:o,movePopoverNextOrPrev:s,setLLMSuggestionsRequest:c,getLLMSuggestions:l,llmAlternativesEnabled:u,ignoreTermPermanently:d,onAlternativeAccepted:f})=>{let[p,m]=(0,W.useState)(null),[h,g,_]=YC(!1),[v,y]=(0,W.useState)(``),[b,x]=(0,W.useState)(``),[S,C]=(0,W.useState)(``),w=(0,W.useRef)(null);(0,W.useEffect)(()=>()=>{w.current!==null&&clearTimeout(w.current)},[]);let T=l({alert:n.alert}),E=(0,W.useRef)(null);(0,W.useEffect)(()=>{r&&r.alert.id===n.alert.id||E.current!==n.alert.id&&(E.current=n.alert.id,e.popoverLogs(n.alert,`popover_open`))},[n.alert.id]),(0,W.useEffect)(()=>{u&&n.alert.data.alternatives.length>0&&c({alert:n.alert})},[n.alert.id,u]);let D=(t=!1)=>{t&&e.popoverLogs(n.alert,`popover_close`),g(!1),i();let r=window.document.getElementsByTagName(`ww-popover`);Array.from(r).forEach(e=>{e.remove()})},O=(t,r)=>{t.preventDefault(),t.stopImmediatePropagation(),e.alternativeLog(n.alert,r),f(),a(r)};return{analytics:e,alternativeHovered:p,setAlternativeHovered:m,showLearningBite:h,setShowLearningBite:g,showLearningBiteRef:_,isLoading:v,isSuccess:b,isFailure:S,llmAlternativesResponse:T,hidePopover:D,clickAlternative:O,alternativeKeyDown:e=>n=>{(n.key===`Enter`||n.key===` `)&&(t.focus?.(),O(n.nativeEvent,e))},handleIgnoreClick:r=>()=>{e.ignoreLog(n.alert),r===`ignore_once`?(o(n.alert.data?.text),D()):r===`ignore_permanently`&&(y(r),x(``),C(``),d(n.alert.data?.text).then(()=>{y(``),o(n.alert.data?.text),x(r),w.current=window.setTimeout(()=>{let e=!!document.getElementById(`witty-works-ext-popover`)?.contains(document.activeElement);D(),e&&t.focus?.()},1e3)}).catch(()=>{y(``),C(r)}))},goToAdjacentAlert:e=>{s(e),g(!1)}}},ZC=c((e=>{var t=Symbol.for(`react.transitional.element`);function n(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.jsx=n,e.jsxs=n})),G=c(((e,t)=>{t.exports=ZC()}))(),QC=e=>(0,G.jsx)(`svg`,{width:15,height:14,viewBox:`0 0 15 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.6103 8.89864C7.80556 8.70338 8.12214 8.70338 8.31741 8.89864L13.1493 13.7305C13.3445 13.9258 13.6611 13.9258 13.8564 13.7305L14.5352 13.0517C14.7304 12.8565 14.7304 12.5399 14.5352 12.3446L9.7033 7.51275C9.50804 7.31749 9.50804 7.0009 9.7033 6.80564L14.8536 1.65535C15.0488 1.46009 15.0488 1.14351 14.8536 0.948248L14.1748 0.269463C13.9795 0.074201 13.663 0.0742007 13.4677 0.269463L8.31741 5.41975C8.12214 5.61501 7.80556 5.61501 7.6103 5.41975L2.46001 0.269463C2.26475 0.0742007 1.94817 0.074201 1.7529 0.269463L1.07412 0.948248C0.878858 1.14351 0.878858 1.46009 1.07412 1.65535L6.22441 6.80564C6.41967 7.0009 6.41967 7.31749 6.22441 7.51275L1.39254 12.3446C1.19727 12.5399 1.19727 12.8565 1.39254 13.0517L2.07132 13.7305C2.26658 13.9258 2.58317 13.9258 2.77843 13.7305L7.6103 8.89864Z`,fill:`#656565`})}),$C=e=>(0,G.jsxs)(`svg`,{width:25,height:14,viewBox:`0 0 25 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,...e,children:[(0,G.jsx)(`rect`,{width:25,height:14,fill:`url(#pattern0)`}),(0,G.jsxs)(`defs`,{children:[(0,G.jsx)(`pattern`,{id:`pattern0`,patternContentUnits:`objectBoundingBox`,width:1,height:1,children:(0,G.jsx)(`use`,{xlinkHref:`#image0_554_760`,transform:`translate(0 -0.0197228) scale(0.0149254 0.0266525)`})}),(0,G.jsx)(`image`,{id:`image0_554_760`,width:67,height:39,xlinkHref:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAAnCAYAAABUr/U/AAAOXUlEQVRoBb1aaVBbV5bm3yx/OlM9NTM1P8bT1VVdNVM1mUnVVCbVhnhh8R5vsbHTsUN3XJlkpivt6p6qTjpO4thG7LsQAsRqwDbesI3BNhixb1rfE0JIbxF670GMtycksZmEb+oKRIQiEWzcoeqW3t3P+d75Luec+6KiQv6mUqgT3mSqz5tMyeGKT2Ga9qYaZrxphhlfun7Gl6Gf8WbpZyZzBmbduQOzT/P6Zh8X9M5OFPTMTSi75ybU3XMTxR1zYlGvxOUPHgjZbk3VmkLHtTIVI5eoGVmlZuSCYkbOK2XlLA0rp5excmoFJ+eWsrqCEkabU8Jos0tZbUY5r00v57WKSl57tprXnjnPa7+s4bWnLji1n1505vz+yuhrETfHOeMGn8I87lNQWLWkmOBL18OXpYc3exDenAF48vowWdALd2EP5KIuyMWdkEu0kMvaIFe0Qq66B7nmDp7W3AVb1F8SUYiQjqtKfkOlyjFdWsSgSM2gQM0it4RFVimLjDIOqRUckqsWfwuKV/alVXBQVHE4V83jq/M8vqzl8fkFJ/50yYk/Xnbidw2j+N0N162T152vrNgWp02v+JLN06uCsASSN9mMqUwdvNkD8Ob2w5PfC4+SANEFt7oT7pIOyKVayOVteFpxD3I1AaIZ7rrbcF9qxJNLjbAV9/7bCgEiVGpVDqNGxUBdxKBQzSKvmEV2KYtMDYfvlOWQU8L6SzBIBIizBIgaHl/WOXEqAES9Ex83uPDbm6P47U0X/vemk1qx/ZSCMq4FiOUx6Xp48/rhKSBAdGNS1YXJ4g64iTVolqyh8h7k83ch196GfLERk/W3MHm5AZPXri14Gq7VrxAgTKW+0B5dpmJQUsRApWaQX7yksIZFejmHlMrFt55WvggGASJ9yVqCgfiCAHHxO4v4uGEUHzW68FHjKP6n0YUPG0fx4W1Xrl+ERXr8ADVCqONVmOHJ74GnsBvuok5MlnRgslQLd9l9uCtaIFfdhbvmjh8I96VbcF++AffVawveG1fmPTcufzt5+7rwtL7+J2EwWG6qUjnGA/RQLtEjW7OSHmerOb+lZBGAgmhDLOJ0DY8AEJ/6qTGKkw2j+O8m11IhzwI+aHLhg6ZROYnQZUpBn1p+4yuUNs/7kik5XJlUULI7e9AnF/TMycruOVndNfdU3T73pFT77JGm7dmj8vvPHlW2Pnt4vuXZk0uN85PXr857Gi5/6228Outtangy1XLb5WtpOr6sechDnZI5SehRHESPnCV6ZGhYObWckxVVnJxSyTkzStn2tHK2PaWCbT9bzfvL6fN8++d1zvZTF5ztn1xytn9S72z/v6vO9hNNLt37zaPjJ5pdOHFH8Jf3m134zR0XkprFzVE+Ba0NBwaxmBAZX6gqX7/wz96blxc8jde83rs3H0y1NrFT7Xep6e62K5EWrFQ55AA9yMFIzgRCg2wNr400Z63tHzQxP//1XQG/ubdYku66kHRPwLstrtNR3mTz9XBgTCVTJ9a6wQ+N8zY3FPru3RKn2+7Ypjpb9b6ejvap/s7bXl3X5tC51YV2DaEHOTT99CCHpoZFZhm3kKnh1/2CkprFnUT591oFvNci4FirgGP3BbyjFZKips+ZE8OB4VVQ3lBBX7Q+2XLzjSntPXqqo7VvqrezZXqgu2Fa31c7azb+PnRNTaFjfpEeS4emnx4sMkvY66FjX6R+vEWQjrW6/CC8e1/Er9oEvNMm4JBW+g//ej6FeT4cID4FpXmRDcPNmepqL5/p72ia1vVenjMNVkzTJuXskDlthh9eftuVhcx1Qg+/TxHsN2jY+XBrPm/b8Vbhc6L8YhH9IBzRCkhsF8zLaxGlI4Dx7cxLOjt8g52xPn1/3SxlKJmlTTkzw5Zz84z9k1nOEUcEqVXyG0qLmIUAPQI+BXGu0kvZ/GVhX/Dh6K3xvz163+U5qhVxtE3AEa2II+0CDncIONgp7FuxLKFFOEC8KXTfioHrqMwMGc/MWan0ecb2xSxv/8Mzp+PDOdH1LsbH/7pCxWjD0SNdw8nr2HJ56tE2oZIon9gh4rAfBBGHOgXs7xI7lwcFHnznTCfDgqGg8DTVGh0Yt57fGSsVO8/YP511Oj6eGeXfnxsTEr958GB3910hcZkeQS438R0yypwn17Mnmbu/Y/xfDhMQOgQc6hSJJeBgp4QD3SLe6h0LH6NMKcxMKCCTKRQepVCP1isQmQ+G+YtnTuajb1z88W/Gxw/MT0xsg2diY3UZy32PHosu9/jL2PftdpfpYJcAUg50iTjQI2Ffj4Q9vUJtxPXnki2vepOphQAgHgUFOYXG41QaUhq17jdENn72QPyvbx482DP/+PFWPH78+q2ro2cIPYJd7swllzu1yrVuizzUKSTt75awv1vA/h4Re3sk7O0lQIie6C7330QEg3R4lpwwr4LCZAqNJ6k0HqbRkFLpuVUnrrETovhX8w/HYyDLr816PL8oVTNy2Ii0nDeucclVh+3tESeIFeztEfwgvNUrYk+fhB19YuqqE0kniWA9Cmqe0ONpKo1HqTS+9lsGDT7NcucHF1jDALgf/GzG7f5ZbZXzj2Ej0nJu4Vzt+h2s/Z1CEVH+rV4JARB29YnYOSBKaxBzcchjBZ3iXqLHRJoFY2k0hHQ/GAt85vqFBPCXAH5SrHLMB9PDH3CVcyAJmTULG2FgbOvE3+/pk6Z294nY3SeB/O7ql7CjX0TsoLg9wrTwzRNptEzoMZ5KQ0yjMZpuAZthwXDmkDX8jOdrVasYDaFHaESaUv5yHKzd3ULL7n4Ju/pF7BqQiDVgu05CwqA48HySRkVFfZ1O73xAzoo0Gq50C/gMCxwEjIwhmLKGdz73gkETNEp+Q3ERsxBI2AQiUpKbOFvJrdvr3d0rxe7sJ3SQsJ2AMChh26CIBP0YYgekXwSJsvZHV6rFSqzCmW4Bk2HBSMYQhjIJGNZ1OUJFakZL6BGcqiMJG0Ul91LioZ39oo0AQEqCTvSXeL2EWMNYxdq1DxlJzgdnmmWBy7DAnjkEa+YQLJlWAga6s60pIcPXVC0s5KKLipgFQg+/yx2UsDlTvX4Ha0eP8IcEPwgStukkxOtExBkkxBrHfK/bPD9dk5CRBg2nW64TetgyCBBDoLKsMGRb0ZdjndfmhCRTIy0S1K4qZpjCQBpvKSIl9Eiu4tbt2O0cfPgPCTrhKbGCQIk1jGGrQcIWo3QmSIwXf7RmDM0TetBZVhizrNBlD6MvZxhtubbnOvUL1M7E0IiUuNz+fGbd+h2sHQOumnj9oiXEGccQa5Cw1TiGTQaRe3HtQ2YasoZPEqswZ1mhz7aiP2cYPTnDaM+xLbTmjrwaMjxitVDNyMv0CEr3n6vmmYiT1tgRpxt9LUEvzMQZRL8lEBC2GCVsNo0hhg6JSte4ZsRhhqzhR4Qeg9nD6M0ZRmeODdpcG5ry7WtSJL+YO7nsUwTRI6WSW/jsJThY23Su3niDgFiD6Adhi2kMm00Sos1Sd0SlXrSjK9caHaBHN7GKXBvu59lwL28EV5UjPxi3KIuZ6eBLoEA2+3TN9x2sfSbtK0nGniPv9Q9+ekjfsmoWneizQ8cfjze4EGcUsNVvDRLeNEmIocYQY/z6X19U51XndeXa+gg9OpasoiVvBHfyR9CQb1/1X2JuCadZQY+lS6BzVdx8qFX4gdB3Pjxm6sCvTN14xzgwe6zTtm01wbYZnc44owtbjQK2EBDMi0D8khpb8+3dauuH7etR8hs6cmwLhB6teTbczR/B7fwR3My340KhPayzpFTyG5RqZj5wCRSISMmh+cV5/ntzkga7rySZ2/AdGH04MmiaCCtQVFTUdr0rJcHkRKzJhS1mAW+aRURTY9holmZepR78XaR5L6W9OW9E05a7SI/m/BHcyrfjeoEd9UrHAkndhW6Sr2G1wfQI3JGerebDRsG/1nfbgsE4auxDolGHgwPD6aFrbzQ++scEE+eJNzmx1eTCJkpEDC1hIz2GNyzSZ6Hj/yz15rwRL6FHY/4IbuTbcbXAjktKB0jqLnhDpYbfoCxmFwL5TP8dKfE0qzh8VhfewUrq02mCwThCwDDp8LbBPL9PK6+4JN5uYG8kmDjEmZ3YYnbhTVpEtEXCL4fGbMFy/FmfyYEZoMe1AjsuKx24UOhAjYpBYTG3nJDJ1bBMgB6BiJTQ46saflV3/j1913SAJotg6PG2yYi9OmtjQLF4I/ef280s4s0cYiknNlEuxFgWwdhoGUsMjPtRfq8WOFwNBXZcUTpwUelAXaED1eRKUM36U3VZpc7E0Ig08AnBqdrRVQO9pF7DyWUwTP04bNTjoMmI/UYau3X214mCO8wOxzYzizgzh820E2/SLsQMidg4JK2wzh8FjLpiLvpygX2hfskqzqsYVKoYkDvSwmJmWlnM+OmxGJGyIC63opIj30msyS95Vz849o6pG0eCwTBReMs0NLWDGnm8nbIjgWIRS3HYRMCwCIihXbPRRunffxQAQjepLmK0hB61hQ5UqRiUB31CEBqREnqcreYX/lTHr8ljPaQ3Rx819Cz4wTAtWsY+E4U95iHsNA9jG2VHPM1iC81hk4WAMYoYmq8JlfFHq1dUOF85r3LMEXpUqBgE35GGRqT+Q/Oi87lM+JDO2Jpo7sdhkx4HTEYQMHaZh7DDPIwEyoG4JTA20zwB5OsfTfFIG6nL2URCD/JhSbhLIEIPYhWna1c/NCOt/7bJ8OgQAcNsxF4CBmXFdmoRjHiaQSyxDJqbixlyruqYRVr/pbfnlrKJKjUzFyki/bKWs56ueP5wnwgap7f+034zPbSfgGEOBoPQhMEWmp3cbHU+X07zpSMQZsH0Mj4/Q8OyqeWs/2OSr87zfZ/Vrz8094NiGH5jO2W7v42yjSXQdjGOYnSxNJsWRowXbvp/SRXI2cTQoJkAAAAASUVORK5CYII=`})]})]}),ew=e=>(0,G.jsx)(`svg`,{width:10,height:16,viewBox:`0 0 10 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.09928 8L0.795978 1.6967L2.21019 0.282485L9.92771 8L2.21019 15.7175L0.795978 14.3033L7.09928 8Z`,fill:`#656565`})}),tw=e=>(0,G.jsx)(`svg`,{width:10,height:16,viewBox:`0 0 10 16`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`nonzero`,clipRule:`nonzero`,d:`M2.88607 8L9.18937 1.6967L7.77516 0.282485L0.057645 8L7.77516 15.7175L9.18937 14.3033L2.88607 8Z`,fill:`#656565`})}),nw=e=>(0,G.jsx)(`svg`,{width:21,height:14,viewBox:`0 0 21 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{d:`M20.7821 1.17019C20.6468 1.09075 20.4797 1.08765 20.3417 1.16226L15.5234 3.77075V2.20562C15.522 0.988049 14.5268 0.00137851 13.2988 0H2.22458C0.996541 0.00137851 0.00139036 0.988049 0 2.20562V10.9144C0.00139036 12.1319 0.996541 13.1186 2.22458 13.12H13.2988C14.5268 13.1186 15.522 12.1319 15.5234 10.9144V9.37768L20.3418 11.9862C20.4797 12.0608 20.647 12.0579 20.7821 11.9784C20.9173 11.8988 21 11.7546 21 11.599V1.54945C21 1.39368 20.9171 1.24962 20.7821 1.17019ZM14.6332 10.9146C14.6325 11.6452 14.0353 12.2371 13.2984 12.2379H2.22458C1.48769 12.2371 0.8907 11.6452 0.889831 10.9146V2.20562C0.8907 1.47518 1.48769 0.88311 2.22458 0.882248H13.2988C14.0355 0.88311 14.6327 1.47518 14.6335 2.20562L14.6332 10.9146ZM20.1102 10.8556L15.5234 8.37257V4.77586L20.1102 2.29298V10.8556Z`,fill:`#F06464`})}),rw=e=>(0,G.jsx)(`svg`,{width:14.5,height:14.5,viewBox:`0 0 50 50`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{d:`m37.5 22.5416c-.5526 0-1.0825.2195-1.4732.6102s-.6102.9206-.6102 1.4732v14.9583c0 .5525-.2195 1.0824-.6102 1.4731s-.9206.6102-1.4731.6102h-22.9167c-.55251 0-1.08241-.2195-1.47311-.6102s-.6102-.9206-.6102-1.4731v-22.9167c0-.5525.2195-1.0824.6102-1.4731s.9206-.6102 1.47311-.6102h14.9584c.5525 0 1.0824-.2195 1.4731-.6102s.6102-.9206.6102-1.4731c0-.5526-.2195-1.0825-.6102-1.4732s-.9206-.6102-1.4731-.6102h-14.9584c-1.65758 0-3.24729.6585-4.41939 1.8306s-1.83058 2.7618-1.83058 4.4194v22.9167c0 1.6576.65848 3.2473 1.83058 4.4194s2.76181 1.8306 4.41939 1.8306h22.9167c1.6576 0 3.2473-.6585 4.4194-1.8306s1.8306-2.7618 1.8306-4.4194v-14.9583c0-.5526-.2195-1.0825-.6102-1.4732s-.9206-.6102-1.4731-.6102zm8.1666-17.08331c-.2114-.50906-.6159-.91359-1.125-1.125-.2504-.10675-.5194-.16337-.7916-.16666h-12.5c-.5526 0-1.0825.21949-1.4732.61019s-.6102.9206-.6102 1.47314c0 .55253.2195 1.08244.6102 1.47314s.9206.61019 1.4732.61019h7.4791l-21.4583 21.43751c-.1953.1937-.3503.4241-.456.678-.1058.2538-.1603.5261-.1603.8012 0 .275.0545.5473.1603.8012.1057.2538.2607.4843.456.6779.1937.1953.4241.3503.678.456.2538.1058.5261.1603.8012.1603.275 0 .5473-.0545.8012-.1603.2538-.1057.4843-.2607.6779-.456l21.4375-21.4583v7.4792c0 .5525.2195 1.0824.6102 1.4731s.9206.6102 1.4732.6102c.5525 0 1.0824-.2195 1.4731-.6102s.6102-.9206.6102-1.4731v-12.50004c-.0033-.27225-.0599-.5412-.1667-.79167z`,fill:`#ffffff`})}),iw=e=>(0,G.jsx)(`svg`,{width:14.5,height:14.5,viewBox:`0 0 50 50`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{d:`m37.5 22.5416c-.5526 0-1.0825.2195-1.4732.6102s-.6102.9206-.6102 1.4732v14.9583c0 .5525-.2195 1.0824-.6102 1.4731s-.9206.6102-1.4731.6102h-22.9167c-.55251 0-1.08241-.2195-1.47311-.6102s-.6102-.9206-.6102-1.4731v-22.9167c0-.5525.2195-1.0824.6102-1.4731s.9206-.6102 1.47311-.6102h14.9584c.5525 0 1.0824-.2195 1.4731-.6102s.6102-.9206.6102-1.4731c0-.5526-.2195-1.0825-.6102-1.4732s-.9206-.6102-1.4731-.6102h-14.9584c-1.65758 0-3.24729.6585-4.41939 1.8306s-1.83058 2.7618-1.83058 4.4194v22.9167c0 1.6576.65848 3.2473 1.83058 4.4194s2.76181 1.8306 4.41939 1.8306h22.9167c1.6576 0 3.2473-.6585 4.4194-1.8306s1.8306-2.7618 1.8306-4.4194v-14.9583c0-.5526-.2195-1.0825-.6102-1.4732s-.9206-.6102-1.4731-.6102zm8.1666-17.08331c-.2114-.50906-.6159-.91359-1.125-1.125-.2504-.10675-.5194-.16337-.7916-.16666h-12.5c-.5526 0-1.0825.21949-1.4732.61019s-.6102.9206-.6102 1.47314c0 .55253.2195 1.08244.6102 1.47314s.9206.61019 1.4732.61019h7.4791l-21.4583 21.43751c-.1953.1937-.3503.4241-.456.678-.1058.2538-.1603.5261-.1603.8012 0 .275.0545.5473.1603.8012.1057.2538.2607.4843.456.6779.1937.1953.4241.3503.678.456.2538.1058.5261.1603.8012.1603.275 0 .5473-.0545.8012-.1603.2538-.1057.4843-.2607.6779-.456l21.4375-21.4583v7.4792c0 .5525.2195 1.0824.6102 1.4731s.9206.6102 1.4732.6102c.5525 0 1.0824-.2195 1.4731-.6102s.6102-.9206.6102-1.4731v-12.50004c-.0033-.27225-.0599-.5412-.1667-.79167z`,fill:`#656565`})}),aw=e=>(0,G.jsx)(`svg`,{width:16,height:10,viewBox:`0 0 16 10`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.79599 2.82817L13.996 9.23311L15.433 7.84208L7.84197 0.00011482L8.50898e-06 7.59114L1.39104 9.02816L7.79599 2.82817Z`,fill:`#f06464`})}),ow=e=>(0,G.jsx)(`svg`,{width:16,height:10,viewBox:`0 0 16 10`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.71753 6.60685L1.41423 0.303546L1.3929e-05 1.71776L7.71753 9.43527L15.435 1.71776L14.0208 0.303546L7.71753 6.60685Z`,fill:`#f06464`})}),sw=Object.defineProperty,cw=(e,t)=>{let n={};for(var r in e)sw(n,r,{get:e[r],enumerable:!0});return t||sw(n,Symbol.toStringTag,{value:`Module`}),n},lw=Tw(),K=e=>bw(e,lw),uw=Tw();K.write=e=>bw(e,uw);var dw=Tw();K.onStart=e=>bw(e,dw);var fw=Tw();K.onFrame=e=>bw(e,fw);var pw=Tw();K.onFinish=e=>bw(e,pw);var mw=[];K.setTimeout=(e,t)=>{let n=K.now()+t,r=()=>{let e=mw.findIndex(e=>e.cancel==r);~e&&mw.splice(e,1),vw-=+!!~e},i={time:n,handler:e,cancel:r};return mw.splice(hw(n),0,i),vw+=1,xw(),i};var hw=e=>~(~mw.findIndex(t=>t.time>e)||~mw.length);K.cancel=e=>{dw.delete(e),fw.delete(e),pw.delete(e),lw.delete(e),uw.delete(e)},K.sync=e=>{yw=!0,K.batchedUpdates(e),yw=!1},K.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,K.onStart(n)}return r.handler=e,r.cancel=()=>{dw.delete(n),t=null},r};var gw=typeof window<`u`?window.requestAnimationFrame:()=>{};K.use=e=>gw=e,K.now=typeof performance<`u`?()=>performance.now():Date.now,K.batchedUpdates=e=>e(),K.catch=console.error,K.frameLoop=`always`,K.onDemand=()=>{},K.advance=()=>{K.frameLoop===`demand`?ww():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var _w=-1,vw=0,yw=!1;function bw(e,t){yw?(t.delete(e),e(0)):(t.add(e),xw(),K.frameLoop===`demand`&&K.onDemand())}function xw(){_w<0&&(_w=0,K.frameLoop!==`demand`&&gw(Cw))}function Sw(){_w=-1}function Cw(){~_w&&(gw(Cw),K.batchedUpdates(ww))}function ww(){let e=_w;_w=K.now();let t=hw(_w);if(t&&(Ew(mw.splice(0,t),e=>e.handler()),vw-=t),!vw){Sw();return}dw.flush(),lw.flush(e?Math.min(64,_w-e):16.667),fw.flush(),uw.flush(),pw.flush(),K.frameLoop===`demand`&&vw>0&&K.onDemand()}function Tw(){let e=new Set,t=e;return{add(n){vw+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return vw-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,vw-=t.size,Ew(t,t=>t(n)&&e.add(t)),vw+=e.size,t=e)}}}function Ew(e,t){e.forEach(e=>{try{t(e)}catch(e){K.catch(e)}})}function Dw(){}var Ow=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),q={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function kw(e,t){if(q.arr(e)){if(!q.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var J=(e,t)=>e.forEach(t);function Aw(e,t,n){if(q.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var jw=e=>q.und(e)?[]:q.arr(e)?e:[e];function Mw(e,t){if(e.size){let n=Array.from(e);e.clear(),J(n,t)}}var Nw=(e,...t)=>Mw(e,e=>e(...t)),Pw=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Fw=cw({assign:()=>Vw,colors:()=>Rw,createStringInterpolator:()=>Iw,skipAnimation:()=>zw,to:()=>Lw,willAdvance:()=>Bw}),Iw,Lw,Rw=null,zw=!1,Bw=Dw,Vw=e=>{e.to&&(Lw=e.to),e.now&&(K.now=e.now),e.colors!==void 0&&(Rw=e.colors),e.skipAnimation!=null&&(zw=e.skipAnimation),e.createStringInterpolator&&(Iw=e.createStringInterpolator),e.requestAnimationFrame&&K.use(e.requestAnimationFrame),e.batchedUpdates&&(K.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Bw=e.willAdvance),e.frameLoop&&(K.frameLoop=e.frameLoop),e.onDemand&&(K.onDemand=e.onDemand)},Hw=new Set,Uw=[],Ww=[],Gw=0,Kw={get idle(){return!Hw.size&&!Uw.length},start(e){Gw>e.priority?(Hw.add(e),K.onStart(qw)):(Jw(e),K(Xw))},advance:Xw,sort(e){if(Gw)K.onFrame(()=>Kw.sort(e));else{let t=Uw.indexOf(e);~t&&(Uw.splice(t,1),Yw(e))}},clear(){Uw=[],Hw.clear()}};function qw(){Hw.forEach(Jw),Hw.clear(),K(Xw)}function Jw(e){Uw.includes(e)||Yw(e)}function Yw(e){Uw.splice(Zw(Uw,t=>t.priority>e.priority),0,e)}function Xw(e){let t=Ww;for(let n=0;n<Uw.length;n++){let r=Uw[n];Gw=r.priority,r.idle||(Bw(r),r.advance(e),r.idle||t.push(r))}return Gw=0,Ww=Uw,Ww.length=0,Uw=t,Uw.length>0}function Zw(e,t){let n=e.findIndex(t);return n<0?e.length:n}var Qw=(e,t,n)=>Math.min(Math.max(n,e),t),$w={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},eT=`[-+]?\\d*\\.?\\d+`,tT=`[-+]?\\d*\\.?\\d+%`;function nT(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var rT=RegExp(`rgb`+nT(eT,eT,eT)),iT=RegExp(`rgba`+nT(eT,eT,eT,eT)),aT=RegExp(`hsl`+nT(eT,tT,tT)),oT=RegExp(`hsla`+nT(eT,tT,tT,eT)),sT=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cT=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,lT=/^#([0-9a-fA-F]{6})$/,uT=/^#([0-9a-fA-F]{8})$/;function dT(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=lT.exec(e))?parseInt(t[1]+`ff`,16)>>>0:Rw&&Rw[e]!==void 0?Rw[e]:(t=rT.exec(e))?(mT(t[1])<<24|mT(t[2])<<16|mT(t[3])<<8|255)>>>0:(t=iT.exec(e))?(mT(t[1])<<24|mT(t[2])<<16|mT(t[3])<<8|gT(t[4]))>>>0:(t=sT.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=uT.exec(e))?parseInt(t[1],16)>>>0:(t=cT.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=aT.exec(e))?(pT(hT(t[1]),_T(t[2]),_T(t[3]))|255)>>>0:(t=oT.exec(e))?(pT(hT(t[1]),_T(t[2]),_T(t[3]))|gT(t[4]))>>>0:null}function fT(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pT(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=fT(i,r,e+1/3),o=fT(i,r,e),s=fT(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function mT(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function hT(e){return(parseFloat(e)%360+360)%360/360}function gT(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function _T(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function vT(e){let t=dT(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var yT=(e,t,n)=>{if(q.fun(e))return e;if(q.arr(e))return yT({range:e,output:t,extrapolate:n});if(q.str(e.output[0]))return Iw(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=xT(e,a);return bT(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function bT(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function xT(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var ST=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return Qw(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},CT=1.70158,wT=CT*1.525,TT=2.70158,ET=2*Math.PI/3,DT=2*Math.PI/4.5,OT=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},kT={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>TT*e*e*e-CT*e*e,easeOutBack:e=>1+TT*(e-1)**3+CT*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(7.189819*e-wT)/2:((2*e-2)**2*(3.5949095*(e*2-2)+wT)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*ET),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*ET)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*DT))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*DT)/2+1,easeInBounce:e=>1-OT(1-e),easeOutBounce:OT,easeInOutBounce:e=>e<.5?(1-OT(1-2*e))/2:(1+OT(2*e-1))/2,steps:ST},AT=Symbol.for(`FluidValue.get`),jT=Symbol.for(`FluidValue.observers`),MT=e=>!!(e&&e[AT]),NT=e=>e&&e[AT]?e[AT]():e,PT=e=>e[jT]||null;function FT(e,t){e.eventObserved?e.eventObserved(t):e(t)}function IT(e,t){let n=e[jT];n&&n.forEach(e=>{FT(e,t)})}var LT=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);RT(this,e)}},RT=(e,t)=>VT(e,AT,t);function zT(e,t){if(e[AT]){let n=e[jT];n||VT(e,jT,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function BT(e,t){let n=e[jT];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[jT]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var VT=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),HT=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,UT=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,WT=RegExp(`(${HT.source})(%|[a-z]+)`,`i`),GT=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,KT=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,qT=e=>{let[t,n]=JT(e);if(!t||Pw())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&KT.test(n)?qT(n):n||e},JT=e=>{let t=KT.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},YT,XT=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,ZT=e=>e.match(HT)??[],QT=e=>{YT||=Rw?RegExp(`(${Object.keys(Rw).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>NT(e).replace(KT,qT).replace(UT,vT).replace(YT,vT)),n=t.map(e=>ZT(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>yT({...e,output:t})),i=e.range||[0,1],a=t.map(e=>ZT(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!WT.test(t[0])&&t.find(e=>WT.test(e))?.replace(HT,``),s=0;return t[0].replace(HT,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(GT,XT)}},$T=`react-spring: `,eE=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${$T}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},tE=eE(console.warn);function nE(){tE(`${$T}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var rE=eE(console.warn);function iE(){rE(`${$T}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function aE(e){return q.str(e)&&(e[0]==`#`||/\d/.test(e)||!Pw()&&KT.test(e)||e in(Rw||{}))}var oE=Pw()?W.useEffect:W.useLayoutEffect,sE=()=>{let e=(0,W.useRef)(!1);return oE(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function cE(){let e=(0,W.useState)()[1],t=sE();return()=>{t.current&&e(Math.random())}}var lE=e=>(0,W.useEffect)(e,uE),uE=[];function dE(e){let t=(0,W.useRef)(void 0);return(0,W.useEffect)(()=>{t.current=e}),t.current}var fE=Symbol.for(`Animated:node`),pE=e=>!!e&&e[fE]===e,mE=e=>e&&e[fE],hE=(e,t)=>Ow(e,fE,t),gE=e=>e&&e[fE]&&e[fE].getPayload(),_E=class{constructor(){hE(this,this)}getPayload(){return this.payload||[]}},vE=class e extends _E{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,q.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return q.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,q.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},yE=class e extends vE{constructor(e){super(0),this._string=null,this._toString=yT({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(q.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=yT({output:[this.getValue(),e]})),this._value=0,super.reset()}},bE={dependencies:null},xE=class extends _E{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Aw(this.source,(n,r)=>{pE(n)?t[r]=n.getValue(e):MT(n)?t[r]=NT(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&J(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return Aw(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){bE.dependencies&&MT(e)&&bE.dependencies.add(e);let t=gE(e);t&&J(t,e=>this.add(e))}},SE=class e extends xE{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(CE)),!0)}};function CE(e){return(aE(e)?yE:vE).create(e)}function wE(e){let t=mE(e);return t?t.constructor:q.arr(e)?SE:aE(e)?yE:vE}var TE=(e,t)=>{let n=!q.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,W.forwardRef)((r,i)=>{let a=(0,W.useRef)(null),o=n&&(0,W.useCallback)(e=>{a.current=OE(i,e)},[i]),[s,c]=DE(r,t),l=cE(),u=()=>{let e=a.current;(!n||e)&&(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new EE(u,c),f=(0,W.useRef)(void 0);oE(()=>(f.current=d,J(c,e=>zT(e,d)),()=>{f.current&&(J(f.current.deps,e=>BT(e,f.current)),K.cancel(f.current.update))})),(0,W.useEffect)(u,[]),lE(()=>()=>{let e=f.current;J(e.deps,t=>BT(t,e))});let p=t.getComponentProps(s.getValue());return W.createElement(e,{...p,ref:o})})},EE=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&K.write(this.update)}};function DE(e,t){let n=new Set;return bE.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new xE(e),bE.dependencies=null,[e,n]}function OE(e,t){return e&&(q.fun(e)?e(t):e.current=t),t}var kE=Symbol.for(`AnimatedComponent`),AE=new WeakMap,jE=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new xE(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=ME(e)||`Anonymous`;if(q.str(e))e=a[e]||(a[e]=TE(e,i));else{let t=e[kE]??AE.get(e);if(!t){t=TE(e,i);try{e[kE]=t}catch{}AE.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return Aw(e,(t,n)=>{q.arr(e)&&(n=ME(t)),a[n]=a(t)}),{animated:a}},ME=e=>q.str(e)?e:e&&q.str(e.displayName)?e.displayName:q.fun(e)&&e.name||null;function NE(e,...t){return q.fun(e)?e(...t):e}var PE=(e,t)=>e===!0||!!(t&&e&&(q.fun(e)?e(t):jw(e).includes(t))),FE=(e,t)=>q.obj(e)?t&&e[t]:e,IE=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,LE=e=>e,RE=(e,t=LE)=>{let n=zE;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);q.und(n)||(r[i]=n)}return r},zE=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],BE={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function VE(e){let t={},n=0;if(Aw(e,(e,r)=>{BE[r]||(t[r]=e,n++)}),n)return t}function HE(e){let t=VE(e);if(t){let n={to:t};return Aw(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function UE(e){let t=NT(e);return q.arr(t)?t.map(UE):aE(t)?Fw.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function WE(e){for(let t in e)return!0;return!1}function GE(e){return q.fun(e)||q.arr(e)&&q.obj(e[0])}function KE(e,t){e.ref?.delete(e),t?.delete(e)}function qE(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var JE={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:kT.linear,clamp:!1},YE=class{constructor(){this.velocity=0,Object.assign(this,JE)}};function XE(e,t,n){n&&(n={...n},ZE(n,t),t={...n,...t}),ZE(e,t),Object.assign(e,t);for(let t in JE)e[t]??(e[t]=JE[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return q.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function ZE(e,t){if(!q.und(t.decay))e.duration=void 0;else{let n=!q.und(t.tension)||!q.und(t.friction);(n||!q.und(t.frequency)||!q.und(t.damping)||!q.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var QE=[],$E=class{constructor(){this.changed=!1,this.values=QE,this.toValues=null,this.fromValues=QE,this.config=new YE,this.immediate=!1}};function eD(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=PE(n.cancel??r?.cancel,t);if(u)p();else{q.und(n.pause)||(i.paused=PE(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||PE(e,t)),c=NE(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-K.now()}function f(){c>0&&!Fw.skipAnimation?(i.delayed=!0,l=K.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var tD=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?iD(e.get()):t.every(e=>e.noop)?nD(e.get()):rD(e.get(),t.every(e=>e.finished)),nD=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),rD=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),iD=e=>({value:e,cancelled:!0,finished:!1});function aD(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=RE(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&iD(r)||i!==n.asyncId&&rD(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new sD,o=new cD;return(async()=>{p(a);let s=q.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,Aw(l,(e,t)=>{q.und(s[t])&&(s[t]=e)}),Fw.skipAnimation){if(++m>1024)throw oD(n),o.result=rD(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=q.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=rD(r.get(),!0,!1)}catch(e){if(e instanceof sD)g=e.result;else if(e instanceof cD)g=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return q.fun(o)&&K.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function oD(e,t){Mw(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var sD=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},cD=class extends Error{constructor(){super(`SkipAnimationSignal`)}},lD=e=>e instanceof dD,uD=1,dD=class extends LT{constructor(...e){super(...e),this.id=uD++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=mE(this);return e&&e.getValue()}to(...e){return Fw.to(this,e)}interpolate(...e){return nE(),Fw.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){IT(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Kw.sort(this),IT(this,{type:`priority`,parent:this,priority:e})}},fD=Symbol.for(`SpringPhase`),pD=1,mD=2,hD=4,gD=e=>(e[fD]&pD)>0,_D=e=>(e[fD]&mD)>0,vD=e=>(e[fD]&hD)>0,yD=(e,t)=>t?e[fD]|=3:e[fD]&=-3,bD=(e,t)=>t?e[fD]|=hD:e[fD]&=-5,xD=class extends dD{constructor(e,t){if(super(),this.animation=new $E,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!q.und(e)||!q.und(t)){let n=q.obj(e)?{...e}:{...t,from:e};q.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(_D(this)||this._state.asyncTo)||vD(this)}get goal(){return NT(this.animation.to)}get velocity(){let e=mE(this);return e instanceof vE?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return gD(this)}get isAnimating(){return _D(this)}get isPaused(){return vD(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=gE(r.to);!o&&MT(r.to)&&(i=jw(NT(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==yE?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=q.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!q.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!q.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=mE(this),c=s.getValue();if(t){let e=NT(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return K.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(_D(this)){let{to:e,config:t}=this.animation;K.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return q.und(e)?(n=this.queue||[],this.queue=[]):n=[q.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>tD(this,e))}stop(e){let{to:t}=this.animation;return q.und(t)||this._focus(this.get()),oD(this._state,e&&this._lastCallId),K.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=q.obj(n)?n[t]:n,(n==null||GE(n))&&(n=void 0),r=q.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return gD(this)||(e.reverse&&([n,r]=[r,n]),r=NT(r),q.und(r)?mE(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,RE(e,(e,t)=>/^on/.test(t)?FE(e,n):e)),DD(this,e,`onProps`),OD(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return eD(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{vD(this)||(bD(this,!0),Nw(a.pauseQueue),OD(this,`onPause`,rD(this,SD(this,this.animation.to)),this))},resume:()=>{vD(this)&&(bD(this,!1),_D(this)&&this._resume(),Nw(a.resumeQueue),OD(this,`onResume`,rD(this,SD(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=CD(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(iD(this));let r=!q.und(e.to),i=!q.und(e.from);if(r||i){if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(iD(this))}let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||q.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!kw(d,l);f&&(s.from=d),d=NT(d);let p=!kw(u,c);p&&this._focus(u);let m=GE(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&XE(h,NE(t.config,a),t.config===o.config?void 0:NE(o.config,a));let v=mE(this);if(!v||q.und(u))return n(rD(this,!0));let y=q.und(t.reset)?i&&!t.default:!q.und(d)&&PE(t.reset,a),b=y?d:this.get(),x=UE(u),S=q.num(x)||q.arr(x)||aE(x),C=!m&&(!S||PE(o.immediate||t.immediate,a));if(p){let e=wE(u);if(e!==v.constructor){if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}}let w=v.constructor,T=MT(u),E=!1;if(!T){let e=y||!gD(this)&&f;(p||e)&&(E=kw(UE(b),x),T=!E),(!kw(s.immediate,C)&&!C||!kw(h.decay,g)||!kw(h.velocity,_))&&(T=!0)}if(E&&_D(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||MT(c))&&(s.values=v.getPayload(),s.toValues=MT(u)?null:w==yE?[1]:jw(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;J(ED,e=>DD(this,t,e));let r=rD(this,SD(this,c));Nw(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&K.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?NE(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(aD(t.to,t,this._state,this)):T?this._start():_D(this)&&!p?this._pendingCalls.add(n):n(nD(b))}_focus(e){let t=this.animation;e!==t.to&&(PT(this)&&this._detach(),t.to=e,PT(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;MT(t)&&(zT(t,this),lD(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;MT(e)&&BT(e,this)}_set(e,t=!0){let n=NT(e);if(!q.und(n)){let e=mE(this);if(!e||!kw(n,e.getValue())){let r=wE(n);!e||e.constructor!=r?hE(this,r.create(n)):e.setValue(n),e&&K.batchedUpdates(()=>{this._onChange(n,t)})}}return mE(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,OD(this,`onStart`,rD(this,SD(this,e.to)),this))}_onChange(e,t){let n=rD(e,!1);t||(this._onStart(),NE(this.animation.onChange,n,this)),NE(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;mE(this).reset(NT(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),_D(this)||(yD(this,!0),vD(this)||this._resume())}_resume(){Fw.skipAnimation?this.finish():Kw.start(this)}_stop(e,t){if(_D(this)){yD(this,!1);let n=this.animation;J(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),IT(this,{type:`idle`,parent:this});let r=t?iD(this.get()):rD(this.get(),SD(this,e??n.to));Nw(this._pendingCalls,r),n.changed=!1,OD(this,`onRest`,r,this)}}};function SD(e,t){let n=UE(t);return kw(UE(e.get()),n)}function CD(e,t=e.loop,n=e.to){let r=NE(t);if(r){let i=r!==!0&&HE(r),a=(i||e).reverse,o=!i||i.reset;return wD({...e,loop:t,default:!1,pause:void 0,to:!a||GE(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function wD(e){let{to:t,from:n}=e=HE(e),r=new Set;return q.obj(t)&&TD(t,r),q.obj(n)&&TD(n,r),e.keys=r.size?Array.from(r):null,e}function TD(e,t){Aw(e,(e,n)=>e!=null&&t.add(n))}var ED=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function DD(e,t,n){e.animation[n]=t[n]===IE(t,n)?void 0:FE(t[n],e.key)}function OD(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var kD=[`onStart`,`onChange`,`onRest`],AD=1,jD=class{constructor(e,t){this.id=AD++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];q.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(wD(e)),this}start(e){let{queue:t}=this;return e?t=jw(e).map(wD):this.queue=[],this._flush?this._flush(this,t):(RD(this,t),MD(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;J(jw(t),t=>n[t].stop(!!e))}else oD(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(q.und(e))this.start({pause:!0});else{let t=this.springs;J(jw(e),e=>t[e].pause())}return this}resume(e){if(q.und(e))this.start({pause:!1});else{let t=this.springs;J(jw(e),e=>t[e].resume())}return this}each(e){Aw(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Mw(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&Mw(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,Mw(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;K.onFrame(this._onFrame)}};function MD(e,t){return Promise.all(t.map(t=>ND(e,t))).then(t=>tD(e,t))}async function ND(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=q.obj(t.default)&&t.default;o&&(t.loop=!1);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=q.arr(i)||q.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):J(kD,n=>{let r=t[n];if(q.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),l&&(l[n]=t[n])}});let p=e._state;t.pause===!p.paused?(p.paused=t.pause,Nw(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||IE(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(eD(++e._lastAsyncId,{props:t,state:p,actions:{pause:Dw,resume:Dw,start(t,n){h?(oD(p,e._lastAsyncId),n(iD(e))):(t.onRest=s,n(aD(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=tD(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=CD(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),RD(e,[n]),ND(e,n,!0)}return c&&K.batchedUpdates(()=>c(g,e,e.item)),g}function PD(e,t){let n={...e.springs};return t&&J(jw(t),e=>{q.und(e.keys)&&(e=wD(e)),q.obj(e.to)||(e={...e,to:void 0}),LD(n,e,e=>ID(e))}),FD(e,n),n}function FD(e,t){Aw(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,zT(t,e))})}function ID(e,t){let n=new xD;return n.key=e,t&&zT(n,t),n}function LD(e,t,n){t.keys&&J(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function RD(e,t){J(t,t=>{LD(e.springs,t,t=>ID(t,e))})}var zD=W.createContext({pause:!1,immediate:!1}),BD=()=>{let e=[],t=function(t){iE();let r=[];return J(e,(e,i)=>{if(q.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return J(e,e=>e.pause(...arguments)),this},t.resume=function(){return J(e,e=>e.resume(...arguments)),this},t.set=function(t){J(e,(e,n)=>{let r=q.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return J(e,(e,r)=>{if(q.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return J(e,e=>e.stop(...arguments)),this},t.update=function(t){return J(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return q.fun(e)?e(n,t):e};return t._getProps=n,t};function VD(e,t,n){let r=q.fun(t)&&t,{reset:i,sort:a,trail:o=0,reverse:s=!1,expires:c=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:d,config:f}=r?r():t,p=(0,W.useMemo)(()=>r||arguments.length==3?BD():void 0,[]),m=jw(e),h=[],g=(0,W.useRef)(null),_=i?null:g.current;oE(()=>{g.current=h}),lE(()=>(J(h,e=>{p?.add(e.ctrl),e.ctrl.ref=void 0}),()=>{J(g.current,e=>{e.expired&&clearTimeout(e.expirationId),KE(e.ctrl,p),e.ctrl.stop(!0)})}));let v=UD(m,r?r():t,_),y=i&&g.current||[];oE(()=>J(y,({ctrl:e,item:t,key:n})=>{KE(e,p),NE(u,t,n)}));let b=[];if(_&&J(_,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):(t=b[t]=v.indexOf(e.key),~t&&(h[t]=e))}),J(m,(e,t)=>{h[t]||(h[t]={key:v[t],item:e,phase:`mount`,ctrl:new jD},h[t].ctrl.item=e)}),b.length){let e=-1,{leave:n}=r?r():t;J(b,(t,r)=>{let i=_[r];~t?(e=h.indexOf(i),h[e]={...i,item:m[t]}):n&&h.splice(++e,0,i)})}q.fun(a)&&h.sort((e,t)=>a(e.item,t.item));let x=-o,S=[],C=cE(),w=RE(t),T=new Map,E=(0,W.useRef)(new Map),D=(0,W.useRef)(!1);if(J(h,(e,n)=>{let i=e.key,a=e.phase,s=r?r():t,u,p,m=NE(s.delay||0,i);if(a==`mount`)u=s.enter,p=`enter`;else{let e=v.indexOf(i)<0;if(a!=`leave`){if(e)u=s.leave,p=`leave`;else if(u=s.update)p=`update`;else return}else if(!e)u=s.enter,p=`enter`;else return}if(u=NE(u,e.item,n),u=q.obj(u)?HE(u):{to:u},!u.config){let t=f||w.config;u.config=NE(t,e.item,n,p)}x+=o;let h={...w,delay:m+x,ref:d,immediate:s.immediate,reset:!1,...u};if(p==`enter`&&q.und(h.from)){let i=r?r():t;h.from=NE(q.und(i.initial)||_?i.from:i.initial,e.item,n)}let{onResolve:y}=h;h.onResolve=e=>{NE(y,e);let t=g.current,n=t.find(e=>e.key===i);if(n&&!(e.cancelled&&n.phase!=`update`)&&n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if(n.phase==`leave`){E.current.delete(n);let t=NE(c,n.item);if(t!==!1){let r=t===!0?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(C,r));return}}}e&&t.some(e=>e.expired)&&(l&&(D.current=!0),C())}};let b=PD(e.ctrl,h);S.push({payload:h,propsDelay:m}),p===`leave`&&l?E.current.set(e,{phase:p,springs:b,payload:h}):T.set(e,{phase:p,springs:b,payload:h})}),s&&o){let e=S.length;J(S,({payload:t,propsDelay:n},r)=>{t.delay=n+(e-1-r)*o})}let O=(0,W.useContext)(zD),ee=O!==dE(O)&&WE(O);oE(()=>{ee&&J(h,e=>{e.ctrl.start({default:O})})},[O]),J(T,(e,t)=>{if(E.current.size){let e=h.findIndex(e=>e.key===t.key);h.splice(e,1)}}),oE(()=>{J(E.current.size?E.current:T,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,p?.add(r),ee&&e==`enter`&&r.start({default:O}),t&&(qE(r,t.ref),r.ref&&!D.current?r.update(t):(r.start(t),D.current&&=!1))})},i?void 0:n);let te=e=>W.createElement(W.Fragment,null,h.map((t,n)=>{let r=T.get(t)||E.current.get(t),{springs:i}=r||t.ctrl,a=r?{...t,phase:r.phase}:t,o=e({...i},t.item,a,n),s=q.str(t.key)||q.num(t.key)?t.key:t.ctrl.id,c=o?.props??{},l=c?.ref;return o&&o.type?W.createElement(o.type,{...c,key:s,ref:l}):o}));return p?[te,p]:te}var HD=1;function UD(e,{key:t,keys:n=t},r){if(n===null){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&n.phase!==`leave`&&!t.has(n));return n?(t.add(n),n.key):HD++})}return q.und(n)?e:q.fun(n)?e.map(n):jw(n)}var WD=class extends dD{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=yT(...t);let n=this._get(),r=wE(n);hE(this,r.create(n))}advance(e){let t=this._get();kw(t,this.get())||(mE(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&KD(this._active)&&qD(this)}_get(){let e=q.arr(this.source)?this.source.map(NT):jw(NT(this.source));return this.calc(...e)}_start(){this.idle&&!KD(this._active)&&(this.idle=!1,J(gE(this),e=>{e.done=!1}),Fw.skipAnimation?(K.batchedUpdates(()=>this.advance()),qD(this)):Kw.start(this))}_attach(){let e=1;J(jw(this.source),t=>{MT(t)&&zT(t,this),lD(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){J(jw(this.source),e=>{MT(e)&&BT(e,this)}),this._active.clear(),qD(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=jw(this.source).reduce((e,t)=>Math.max(e,(lD(t)?t.priority:0)+1),0))}};function GD(e){return e.idle!==!1}function KD(e){return!e.size||Array.from(e).every(GD)}function qD(e){e.idle||(e.idle=!0,J(gE(e),e=>{e.done=!0}),IT(e,{type:`idle`,parent:e}))}Fw.assign({createStringInterpolator:QT,to:(e,t)=>new WD(e,t)}),Kw.advance;var JD=/^--/;function YD(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!JD.test(e)&&!(QD.hasOwnProperty(e)&&QD[e])?t+`px`:(``+t).trim()}var XD={};function ZD(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:XD[t]||(XD[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=YD(t,i[t]);JD.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var QD={animationIterationCount:!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,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},$D=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),eO=[`Webkit`,`Ms`,`Moz`,`O`];QD=Object.keys(QD).reduce((e,t)=>(eO.forEach(n=>e[$D(n,t)]=e[t]),e),QD);var tO=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,nO=/^(translate)/,rO=/^(rotate|skew)/,iO=(e,t)=>q.num(e)&&e!==0?e+t:e,aO=(e,t)=>q.arr(e)?e.every(e=>aO(e,t)):q.num(e)?e===t:parseFloat(e)===t,oO=class extends xE{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>iO(e,`px`)).join(`,`)})`,aO(e,0)])),Aw(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(tO.test(t)){if(delete r[t],q.und(e))return;let n=nO.test(t)?`px`:rO.test(t)?`deg`:``;i.push(jw(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${iO(i,n)})`,aO(i,0)]:e=>[`${t}(${e.map(e=>iO(e,n)).join(`,`)})`,aO(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new sO(i,a)),super(r)}},sO=class extends LT{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return J(this.inputs,(n,r)=>{let i=NT(n[0]),[a,o]=this.transforms[r](q.arr(i)?i:n.map(NT));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&J(this.inputs,e=>J(e,e=>MT(e)&&zT(e,this)))}observerRemoved(e){e==0&&J(this.inputs,e=>J(e,e=>MT(e)&&BT(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),IT(this,e)}},cO=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);Fw.assign({batchedUpdates:zC.unstable_batchedUpdates,createStringInterpolator:QT,colors:$w});var lO=jE(cO,{applyAnimatedValues:ZD,createAnimatedStyle:e=>new oO(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,uO=e=>(0,G.jsx)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`})}),dO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`})]}),fO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.25638 6.33803C1.50583 4.83684 2.49311 3 4.05053 3V4.7747C3.72017 4.7747 3.51074 5.16433 3.66995 5.48277L2.25638 6.33803Z`,fill:`#9489DB`})]}),pO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`})]}),mO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3ZM8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317Z`,fill:`#9489DB`})]}),hO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M15.7489 3C14.9733 3 14.2643 3.48204 13.9175 4.24516L15.3604 5.03882C15.434 4.87695 15.5844 4.7747 15.7489 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M20.9495 4.7747H15.7489V3H20.9495C22.5069 3 23.4942 4.83684 22.7436 6.33803L21.3301 5.48277C21.4893 5.16433 21.2798 4.7747 20.9495 4.7747Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`})]}),gO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M17.9964 15.833L22.7436 6.33803L21.3301 5.48277L16.5828 14.9778L17.9964 15.833Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.25638 6.33803C1.50583 4.83684 2.49311 3 4.05053 3V4.7747C3.72017 4.7747 3.51074 5.16433 3.66995 5.48277L2.25638 6.33803ZM6.93059 15.687L8.34416 14.8317C8.51289 15.1692 8.95664 15.1596 9.11322 14.8151L10.519 15.687C9.75015 17.2339 7.71306 17.252 6.93059 15.687ZM15.3604 5.03882C15.434 4.87695 15.5844 4.7747 15.7489 4.7747H20.9495C21.2798 4.7747 21.4893 5.16433 21.3301 5.48277L22.7436 6.33803C23.4942 4.83684 22.5069 3 20.9495 3H15.7489C14.9733 3 14.2643 3.48204 13.9175 4.24516L15.3604 5.03882Z`,fill:`#9489DB`})]}),_O=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M14.4244 15.865C15.2179 17.3926 17.2257 17.3746 17.9964 15.833L16.5828 14.9778C16.4193 15.3047 15.9934 15.3086 15.8251 14.9846L14.4244 15.865Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.0406 13.2011L14.4244 15.865L15.8251 14.9846L14.4413 12.3206L13.0406 13.2011Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.3408 11.9904C12.954 12.2335 12.8196 12.7756 13.0406 13.2011L14.4413 12.3206C14.2203 11.8951 13.7276 11.7473 13.3408 11.9904Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M15.7489 3C14.9733 3 14.2643 3.48204 13.9175 4.24516L15.3604 5.03882C15.434 4.87695 15.5844 4.7747 15.7489 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M20.9495 3H15.7489V4.7747H20.9495V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M22.7436 6.33803C23.4942 4.83684 22.5069 3 20.9495 3V4.7747C21.2798 4.7747 21.4893 5.16433 21.3301 5.48277L22.7436 6.33803Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M17.9964 15.833L22.7436 6.33803L21.3301 5.48277L16.5828 14.9778L17.9964 15.833Z`,fill:`#9489DB`})]}),vO=()=>{let e=[W.createElement(uO,null),W.createElement(dO,null),W.createElement(fO,null),W.createElement(pO,null),W.createElement(mO,null),W.createElement(hO,null),W.createElement(gO,null),W.createElement(_O,null)],[t,n]=(0,W.useState)(!0),[r,i]=(0,W.useState)(!0);(0,W.useEffect)(()=>()=>{i(!1)},[]);let a=VD(e,{loop:t,from:{opacity:0},enter:{opacity:1},trail:100,config:{duration:1500},onRest:()=>r&&n(!t)})((e,t)=>W.createElement(lO.div,{style:{...e,gridRowStart:1,gridColumnStart:1}},t));return W.createElement(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`}},a)},yO=e=>(0,G.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM18.8485 9.24853C19.3172 8.7799 19.3172 8.0201 18.8485 7.55147C18.3799 7.08284 17.6201 7.08284 17.1515 7.55147L9.6 15.1029L6.84853 12.3515C6.3799 11.8828 5.6201 11.8828 5.15147 12.3515C4.68284 12.8201 4.68284 13.5799 5.15147 14.0485L9.6 18.4971L18.8485 9.24853Z`,fill:`#5FCA7D`})}),bO=e=>(0,G.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M21.4286 12C21.4286 17.2073 17.2073 21.4286 12 21.4286C6.79274 21.4286 2.57143 17.2073 2.57143 12C2.57143 6.79274 6.79274 2.57143 12 2.57143C17.2073 2.57143 21.4286 6.79274 21.4286 12ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM7.37141 8.66656L10.7049 12.0001L7.37144 15.3336L8.58362 16.5458L11.9171 13.2123L15.2506 16.5458L16.4628 15.3336L13.1293 12.0001L16.4628 8.66656L15.2506 7.45438L11.9171 10.7879L8.58359 7.45438L7.37141 8.66656Z`,fill:`#E6635A`})}),xO=e=>(0,G.jsx)(`svg`,{width:14,height:14,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.5 7C12.5 10.0376 10.0376 12.5 7 12.5C3.96243 12.5 1.5 10.0376 1.5 7C1.5 3.96243 3.96243 1.5 7 1.5C10.0376 1.5 12.5 3.96243 12.5 7ZM14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7ZM4.3 5.05546L6.24455 7.00002L4.30002 8.94455L5.00712 9.65166L6.95166 7.70712L8.89619 9.65166L9.6033 8.94455L7.65877 7.00002L9.60332 5.05546L8.89621 4.34836L6.95166 6.29291L5.00711 4.34836L4.3 5.05546Z`,fill:`#E6635A`})}),SO=document,CO=()=>SO,{min:wO,max:TO}=Math,EO=(e,t=0,n=1)=>wO(TO(t,e),n),DO=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=EO(e[t],0,255)):t===3&&(e[t]=EO(e[t],0,1));return e},OO={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])OO[`[object ${e}]`]=e.toLowerCase();function Y(e){return OO[Object.prototype.toString.call(e)]||`object`}var X=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):Y(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),kO=e=>{if(e.length<2)return null;let t=e.length-1;return Y(e[t])==`string`?e[t].toLowerCase():null},{PI:AO,min:jO,max:MO}=Math,NO=e=>Math.round(e*100)/100,PO=e=>Math.round(e*100)/100,FO=AO*2,IO=AO/3,LO=AO/180,RO=180/AO;function zO(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var Z={format:{},autodetect:[]},Q=class{constructor(...e){let t=this;if(Y(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=kO(e),r=!1;if(!n){r=!0,Z.sorted||=(Z.autodetect=Z.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of Z.autodetect)if(n=t.test(...e),n)break}if(Z.format[n])t._rgb=DO(Z.format[n].apply(null,r?e:e.slice(0,-1)));else throw Error(`unknown format: `+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return Y(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}},BO=`3.2.0`,$=(...e)=>new Q(...e);$.version=BO;var VO={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,laserlemon:`#ffff54`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrod:`#fafad2`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,maroon2:`#7f0000`,maroon3:`#b03060`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,purple2:`#7f007f`,purple3:`#a020f0`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},HO=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,UO=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,WO=e=>{if(e.match(HO)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return[t>>16,t>>8&255,t&255,1]}if(e.match(UO)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);let t=parseInt(e,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((t&255)/255*100)/100]}throw Error(`unknown hex color: ${e}`)},{round:GO}=Math,KO=(...e)=>{let[t,n,r,i]=X(e,`rgba`),a=kO(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=GO(t),n=GO(n),r=GO(r);let o=`000000`+(t<<16|n<<8|r).toString(16);o=o.substr(o.length-6);let s=`0`+GO(i*255).toString(16);switch(s=s.substr(s.length-2),a.toLowerCase()){case`rgba`:return`#${o}${s}`;case`argb`:return`#${s}${o}`;default:return`#${o}`}};Q.prototype.name=function(){let e=KO(this._rgb,`rgb`);for(let t of Object.keys(VO))if(VO[t]===e)return t.toLowerCase();return e},Z.format.named=e=>{if(e=e.toLowerCase(),VO[e])return WO(VO[e]);throw Error(`unknown color name: `+e)},Z.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Y(e)===`string`&&VO[e.toLowerCase()])return`named`}}),Q.prototype.alpha=function(e,t=!1){return e!==void 0&&Y(e)===`number`?t?(this._rgb[3]=e,this):new Q([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},Q.prototype.clipped=function(){return this._rgb._clipped||!1};var qO={Kn:18,labWhitePoint:`d65`,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},JO=new Map([[`a`,[1.0985,.35585]],[`b`,[1.0985,.35585]],[`c`,[.98074,1.18232]],[`d50`,[.96422,.82521]],[`d55`,[.95682,.92149]],[`d65`,[.95047,1.08883]],[`e`,[1,1,1]],[`f2`,[.99186,.67393]],[`f7`,[.95041,1.08747]],[`f11`,[1.00962,.6435]],[`icc`,[.96422,.82521]]]);function YO(e){let t=JO.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);qO.labWhitePoint=e,qO.Xn=t[0],qO.Zn=t[1]}function XO(){return qO.labWhitePoint}var ZO=(...e)=>{e=X(e,`lab`);let[t,n,r]=e,[i,a,o]=QO(t,n,r),[s,c,l]=ek(i,a,o);return[s,c,l,e.length>3?e[3]:1]},QO=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=qO,l=(e+16)/116,u=.002*t+l,d=l-.005*n,f=u*u*u,p=d*d*d,m=f>r?f:(116*u-16)/i,h=e>a?((e+16)/116)**3:e/i,g=p>r?p:(116*d-16)/i;return[m*o,h*s,g*c]},$O=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},ek=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=qO,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,f=s*r.m02+c*r.m12+l*r.m22,p=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,m=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,h=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,g=(e*r.m00+t*r.m10+n*r.m20)*(p/u),_=(e*r.m01+t*r.m11+n*r.m21)*(m/d),v=(e*r.m02+t*r.m12+n*r.m22)*(h/f),y=g*i.m00+_*i.m10+v*i.m20,b=g*i.m01+_*i.m11+v*i.m21,x=g*i.m02+_*i.m12+v*i.m22,S=$O(y*a.m00+b*a.m10+x*a.m20),C=$O(y*a.m01+b*a.m11+x*a.m21),w=$O(y*a.m02+b*a.m12+x*a.m22);return[S*255,C*255,w*255]},tk=(...e)=>{let[t,n,r,...i]=X(e,`rgb`),[a,o,s]=ik(t,n,r),[c,l,u]=nk(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function nk(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=qO,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,f=l>o?l**(1/3):(s*l+16)/116,p=u>o?u**(1/3):(s*u+16)/116;return[116*f-16,500*(d-f),200*(f-p)]}function rk(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}var ik=(e,t,n)=>{e=rk(e/255),t=rk(t/255),n=rk(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=qO,f=e*r.m00+t*r.m10+n*r.m20,p=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22,h=o*i.m00+s*i.m10+c*i.m20,g=o*i.m01+s*i.m11+c*i.m21,_=o*i.m02+s*i.m12+c*i.m22,v=f*i.m00+p*i.m10+m*i.m20,y=f*i.m01+p*i.m11+m*i.m21,b=f*i.m02+p*i.m12+m*i.m22;return v*=h/l,y*=g/u,b*=_/d,f=v*a.m00+y*a.m10+b*a.m20,p=v*a.m01+y*a.m11+b*a.m21,m=v*a.m02+y*a.m12+b*a.m22,[f,p,m]};Q.prototype.lab=function(){return tk(this._rgb)},Object.assign($,{lab:(...e)=>new Q(...e,`lab`),getLabWhitePoint:XO,setLabWhitePoint:YO}),Z.format.lab=ZO,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`lab`),Y(e)===`array`&&e.length===3)return`lab`}}),Q.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=qO.Kn*e,new Q(n,`lab`).alpha(t.alpha(),!0)},Q.prototype.brighten=function(e=1){return this.darken(-e)},Q.prototype.darker=Q.prototype.darken,Q.prototype.brighter=Q.prototype.brighten,Q.prototype.get=function(e){let[t,n]=e.split(`.`),r=this[t]();if(n){let e=t.indexOf(n)-(t.substr(0,2)===`ok`?2:0);if(e>-1)return r[e];throw Error(`unknown channel ${n} in mode ${t}`)}return r};var{pow:ak}=Math,ok=1e-7,sk=20;Q.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&Y(e)===`number`){if(e===0)return new Q([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new Q([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=sk,i=(n,a)=>{let o=n.interpolate(a,.5,t),s=o.luminance();return Math.abs(e-s)<ok||!r--?o:s>e?i(n,o):i(o,a)};return new Q([...(n>e?i(new Q([0,0,0]),this):i(this,new Q([255,255,255]))).rgb(),this._rgb[3]])}return ck(...this._rgb.slice(0,3))};var ck=(e,t,n)=>(e=lk(e),t=lk(t),n=lk(n),.2126*e+.7152*t+.0722*n),lk=e=>(e/=255,e<=.03928?e/12.92:ak((e+.055)/1.055,2.4)),uk={},dk=(e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!uk[i]&&!r.length&&(i=Object.keys(uk)[0]),!uk[i])throw Error(`interpolation mode ${i} is not defined`);return Y(e)!==`object`&&(e=new Q(e)),Y(t)!==`object`&&(t=new Q(t)),uk[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};Q.prototype.mix=Q.prototype.interpolate=function(e,t=.5,...n){return dk(this,e,t,...n)},Q.prototype.premultiply=function(e=!1){let t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new Q([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};var{sin:fk,cos:pk}=Math,mk=(...e)=>{let[t,n,r]=X(e,`lch`);return isNaN(r)&&(r=0),r*=LO,[t,pk(r)*n,fk(r)*n]},hk=(...e)=>{e=X(e,`lch`);let[t,n,r]=e,[i,a,o]=mk(t,n,r),[s,c,l]=ZO(i,a,o);return[s,c,l,e.length>3?e[3]:1]},gk=(...e)=>hk(...zO(X(e,`hcl`))),{sqrt:_k,atan2:vk,round:yk}=Math,bk=(...e)=>{let[t,n,r]=X(e,`lab`),i=_k(n*n+r*r),a=(vk(r,n)*RO+360)%360;return yk(i*1e4)===0&&(a=NaN),[t,i,a]},xk=(...e)=>{let[t,n,r,...i]=X(e,`rgb`),[a,o,s]=tk(t,n,r),[c,l,u]=bk(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};Q.prototype.lch=function(){return xk(this._rgb)},Q.prototype.hcl=function(){return zO(xk(this._rgb))},Object.assign($,{lch:(...e)=>new Q(...e,`lch`),hcl:(...e)=>new Q(...e,`hcl`)}),Z.format.lch=hk,Z.format.hcl=gk,[`lch`,`hcl`].forEach(e=>Z.autodetect.push({p:2,test:(...t)=>{if(t=X(t,e),Y(t)===`array`&&t.length===3)return e}})),Q.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=qO.Kn*e,n[1]<0&&(n[1]=0),new Q(n,`lch`).alpha(t.alpha(),!0)},Q.prototype.desaturate=function(e=1){return this.saturate(-e)},Q.prototype.set=function(e,t,n=!1){let[r,i]=e.split(`.`),a=this[r]();if(i){let e=r.indexOf(i)-(r.substr(0,2)===`ok`?2:0);if(e>-1){if(Y(t)==`string`)switch(t.charAt(0)){case`+`:a[e]+=+t;break;case`-`:a[e]+=+t;break;case`*`:a[e]*=+t.substr(1);break;case`/`:a[e]/=+t.substr(1);break;default:a[e]=+t}else if(Y(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new Q(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}return a},Q.prototype.tint=function(e=.5,...t){return dk(this,`white`,e,...t)},Q.prototype.shade=function(e=.5,...t){return dk(this,`black`,e,...t)},uk.rgb=(e,t,n)=>{let r=e._rgb,i=t._rgb;return new Q(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)};var{sqrt:Sk,pow:Ck}=Math;uk.lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new Q(Sk(Ck(r,2)*(1-n)+Ck(o,2)*n),Sk(Ck(i,2)*(1-n)+Ck(s,2)*n),Sk(Ck(a,2)*(1-n)+Ck(c,2)*n),`rgb`)},uk.lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new Q(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};var wk=(e,t,n,r)=>{let i,a;r===`hsl`?(i=e.hsl(),a=t.hsl()):r===`hsv`?(i=e.hsv(),a=t.hsv()):r===`hcg`?(i=e.hcg(),a=t.hcg()):r===`hsi`?(i=e.hsi(),a=t.hsi()):r===`lch`||r===`hcl`?(r=`hcl`,i=e.hcl(),a=t.hcl()):r===`oklch`&&(i=e.oklch().reverse(),a=t.oklch().reverse());let o,s,c,l,u,d;(r.substr(0,1)===`h`||r===`oklch`)&&([o,c,u]=i,[s,l,d]=a);let f,p,m,h;return!isNaN(o)&&!isNaN(s)?(h=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,p=o+n*h):isNaN(o)?isNaN(s)?p=NaN:(p=s,(u==1||u==0)&&r!=`hsv`&&(f=l)):(p=o,(d==1||d==0)&&r!=`hsv`&&(f=c)),f===void 0&&(f=c+n*(l-c)),m=u+n*(d-u),r===`oklch`?new Q([m,f,p],r):new Q([p,f,m],r)},Tk=(e,t,n)=>wk(e,t,n,`lch`);uk.lch=Tk,uk.hcl=Tk;var Ek=e=>{if(Y(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},Dk=(...e)=>{let[t,n,r]=X(e,`rgb`);return(t<<16)+(n<<8)+r};Q.prototype.num=function(){return Dk(this._rgb)},Object.assign($,{num:(...e)=>new Q(...e,`num`)}),Z.format.num=Ek,Z.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Y(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}}),uk.num=(e,t,n)=>{let r=e.num();return new Q(r+n*(t.num()-r),`num`)};var{floor:Ok}=Math,kk=(...e)=>{e=X(e,`hcg`);let[t,n,r]=e,i,a,o;r*=255;let s=n*255;if(n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=Ok(t),c=t-e,l=r*(1-n),u=l+s*(1-c),d=l+s*c,f=l+s;switch(e){case 0:[i,a,o]=[f,d,l];break;case 1:[i,a,o]=[u,f,l];break;case 2:[i,a,o]=[l,f,d];break;case 3:[i,a,o]=[l,u,f];break;case 4:[i,a,o]=[d,l,f];break;case 5:[i,a,o]=[f,l,u]}}return[i,a,o,e.length>3?e[3]:1]},Ak=(...e)=>{let[t,n,r]=X(e,`rgb`),i=jO(t,n,r),a=MO(t,n,r),o=a-i,s=o*100/255,c=i/(255-o)*100,l;return o===0?l=NaN:(t===a&&(l=(n-r)/o),n===a&&(l=2+(r-t)/o),r===a&&(l=4+(t-n)/o),l*=60,l<0&&(l+=360)),[l,s,c]};Q.prototype.hcg=function(){return Ak(this._rgb)},$.hcg=(...e)=>new Q(...e,`hcg`),Z.format.hcg=kk,Z.autodetect.push({p:1,test:(...e)=>{if(e=X(e,`hcg`),Y(e)===`array`&&e.length===3)return`hcg`}}),uk.hcg=(e,t,n)=>wk(e,t,n,`hcg`);var{cos:jk}=Math,Mk=(...e)=>{e=X(e,`hsi`);let[t,n,r]=e,i,a,o;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-n)/3,i=(1+n*jk(FO*t)/jk(IO-FO*t))/3,a=1-(o+i)):t<2/3?(t-=1/3,i=(1-n)/3,a=(1+n*jk(FO*t)/jk(IO-FO*t))/3,o=1-(i+a)):(t-=2/3,a=(1-n)/3,o=(1+n*jk(FO*t)/jk(IO-FO*t))/3,i=1-(a+o)),i=EO(r*i*3),a=EO(r*a*3),o=EO(r*o*3),[i*255,a*255,o*255,e.length>3?e[3]:1]},{min:Nk,sqrt:Pk,acos:Fk}=Math,Ik=(...e)=>{let[t,n,r]=X(e,`rgb`);t/=255,n/=255,r/=255;let i,a=Nk(t,n,r),o=(t+n+r)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(t-n+(t-r))/2,i/=Pk((t-n)*(t-n)+(t-r)*(n-r)),i=Fk(i),r>n&&(i=FO-i),i/=FO),[i*360,s,o]};Q.prototype.hsi=function(){return Ik(this._rgb)},$.hsi=(...e)=>new Q(...e,`hsi`),Z.format.hsi=Mk,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`hsi`),Y(e)===`array`&&e.length===3)return`hsi`}}),uk.hsi=(e,t,n)=>wk(e,t,n,`hsi`);var Lk=(...e)=>{e=X(e,`hsl`);let[t,n,r]=e,i,a,o;if(n===0)i=a=o=r*255;else{let e=[0,0,0],s=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,l=2*r-c,u=t/360;e[0]=u+1/3,e[1]=u,e[2]=u-1/3;for(let t=0;t<3;t++)e[t]<0&&(e[t]+=1),e[t]>1&&--e[t],6*e[t]<1?s[t]=l+(c-l)*6*e[t]:2*e[t]<1?s[t]=c:3*e[t]<2?s[t]=l+(c-l)*(2/3-e[t])*6:s[t]=l;[i,a,o]=[s[0]*255,s[1]*255,s[2]*255]}return e.length>3?[i,a,o,e[3]]:[i,a,o,1]},Rk=(...e)=>{e=X(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=jO(t,n,r),a=MO(t,n,r),o=(a+i)/2,s,c;return a===i?(s=0,c=NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?c=(n-r)/(a-i):n==a?c=2+(r-t)/(a-i):r==a&&(c=4+(t-n)/(a-i)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,s,o,e[3]]:[c,s,o]};Q.prototype.hsl=function(){return Rk(this._rgb)},$.hsl=(...e)=>new Q(...e,`hsl`),Z.format.hsl=Lk,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`hsl`),Y(e)===`array`&&e.length===3)return`hsl`}}),uk.hsl=(e,t,n)=>wk(e,t,n,`hsl`);var{floor:zk}=Math,Bk=(...e)=>{e=X(e,`hsv`);let[t,n,r]=e,i,a,o;if(r*=255,n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=zk(t),s=t-e,c=r*(1-n),l=r*(1-n*s),u=r*(1-n*(1-s));switch(e){case 0:[i,a,o]=[r,u,c];break;case 1:[i,a,o]=[l,r,c];break;case 2:[i,a,o]=[c,r,u];break;case 3:[i,a,o]=[c,l,r];break;case 4:[i,a,o]=[u,c,r];break;case 5:[i,a,o]=[r,c,l]}}return[i,a,o,e.length>3?e[3]:1]},{min:Vk,max:Hk}=Math,Uk=(...e)=>{e=X(e,`rgb`);let[t,n,r]=e,i=Vk(t,n,r),a=Hk(t,n,r),o=a-i,s,c,l;return l=a/255,a===0?(s=NaN,c=0):(c=o/a,t===a&&(s=(n-r)/o),n===a&&(s=2+(r-t)/o),r===a&&(s=4+(t-n)/o),s*=60,s<0&&(s+=360)),[s,c,l]};Q.prototype.hsv=function(){return Uk(this._rgb)},$.hsv=(...e)=>new Q(...e,`hsv`),Z.format.hsv=Bk,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`hsv`),Y(e)===`array`&&e.length===3)return`hsv`}}),uk.hsv=(e,t,n)=>wk(e,t,n,`hsv`);function Wk(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>Array.isArray(e)?e.reduce((e,n,r)=>e+n*(t[r]||0),0):t.reduce((t,n)=>t+n*e,0)));return n===1&&(a=a[0]),r===1?a.map(e=>e[0]):a}var Gk=(...e)=>{e=X(e,`lab`);let[t,n,r,...i]=e,[a,o,s]=Kk([t,n,r]),[c,l,u]=ek(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function Kk(e){return Wk([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],Wk([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}var qk=(...e)=>{let[t,n,r,...i]=X(e,`rgb`);return[...Jk(ik(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function Jk(e){return Wk([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Wk([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}Q.prototype.oklab=function(){return qk(this._rgb)},Object.assign($,{oklab:(...e)=>new Q(...e,`oklab`)}),Z.format.oklab=Gk,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`oklab`),Y(e)===`array`&&e.length===3)return`oklab`}}),uk.oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new Q(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)},uk.oklch=(e,t,n)=>wk(e,t,n,`oklch`);var{pow:Yk,sqrt:Xk,PI:Zk,cos:Qk,sin:$k,atan2:eA}=Math,tA=(e,t=`lrgb`,n=null)=>{let r=e.length;n||=Array.from(Array(r)).map(()=>1);let i=r/n.reduce(function(e,t){return e+t});if(n.forEach((e,t)=>{n[t]*=i}),e=e.map(e=>new Q(e)),t===`lrgb`)return nA(e,n);let a=e.shift(),o=a.get(t),s=[],c=0,l=0;for(let e=0;e<o.length;e++)if(o[e]=(o[e]||0)*n[0],s.push(isNaN(o[e])?0:n[0]),t.charAt(e)===`h`&&!isNaN(o[e])){let t=o[e]/180*Zk;c+=Qk(t)*n[0],l+=$k(t)*n[0]}let u=a.alpha()*n[0];e.forEach((e,r)=>{let i=e.get(t);u+=e.alpha()*n[r+1];for(let e=0;e<o.length;e++)if(!isNaN(i[e])){if(s[e]+=n[r+1],t.charAt(e)===`h`){let t=i[e]/180*Zk;c+=Qk(t)*n[r+1],l+=$k(t)*n[r+1]}else o[e]+=i[e]*n[r+1]}});for(let e=0;e<o.length;e++)if(t.charAt(e)===`h`){let t=eA(l/s[e],c/s[e])/Zk*180;for(;t<0;)t+=360;for(;t>=360;)t-=360;o[e]=t}else o[e]=o[e]/s[e];return u/=r,new Q(o,t).alpha(u>.99999?1:u,!0)},nA=(e,t)=>{let n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){let a=e[i],o=t[i]/n,s=a._rgb;r[0]+=Yk(s[0],2)*o,r[1]+=Yk(s[1],2)*o,r[2]+=Yk(s[2],2)*o,r[3]+=s[3]*o}return r[0]=Xk(r[0]),r[1]=Xk(r[1]),r[2]=Xk(r[2]),r[3]>.9999999&&(r[3]=1),new Q(DO(r))},{pow:rA}=Math;function iA(e){let t=`rgb`,n=$(`#ccc`),r=0,i=[0,1],a=[0,1],o=[],s=[0,0],c=!1,l=[],u=!1,d=0,f=1,p=!1,m={},h=!0,g=1,_=function(e){if(e||=[`#fff`,`#000`],e&&Y(e)===`string`&&$.brewer&&$.brewer[e.toLowerCase()]&&(e=$.brewer[e.toLowerCase()]),Y(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=$(e[t]);o.length=0;for(let t=0;t<e.length;t++)o.push(t/(e.length-1))}return S(),l=e},v=function(e){if(c!=null){let t=c.length-1,n=0;for(;n<t&&e>=c[n];)n++;return n-1}return 0},y=e=>e,b=e=>e,x=function(e,r){let i,a;if(r??=!1,isNaN(e)||e===null)return n;a=r?e:c&&c.length>2?v(e)/(c.length-2):f===d?1:(e-d)/(f-d),a=b(a),r||(a=y(a)),g!==1&&(a=rA(a,g)),a=s[0]+a*(1-s[0]-s[1]),a=EO(a,0,1);let u=Math.floor(a*1e4);if(h&&m[u])i=m[u];else{if(Y(l)===`array`)for(let e=0;e<o.length;e++){let n=o[e];if(a<=n){i=l[e];break}if(a>=n&&e===o.length-1){i=l[e];break}if(a>n&&a<o[e+1]){a=(a-n)/(o[e+1]-n),i=$.interpolate(l[e],l[e+1],a,t);break}}else Y(l)===`function`&&(i=l(a));h&&(m[u]=i)}return i};var S=()=>m={};_(e);let C=function(e){let t=$(x(e));return u&&t[u]?t[u]():t};return C.classes=function(e){if(e!=null){if(Y(e)===`array`)c=e,i=[e[0],e[e.length-1]];else{let t=$.analyze(i);c=e===0?[t.min,t.max]:$.limits(t,`e`,e)}return C}return c},C.domain=function(e){if(!arguments.length)return a;a=e.slice(0),d=e[0],f=e[e.length-1],o=[];let t=l.length;if(e.length===t&&d!==f)for(let t of Array.from(e))o.push((t-d)/(f-d));else{for(let e=0;e<t;e++)o.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-d)/(f-d));n.every((e,n)=>t[n]===e)||(b=e=>{if(e<=0||e>=1)return e;let r=0;for(;e>=n[r+1];)r++;let i=(e-n[r])/(n[r+1]-n[r]);return t[r]+i*(t[r+1]-t[r])})}}return i=[d,f],C},C.mode=function(e){return arguments.length?(t=e,S(),C):t},C.range=function(e,t){return _(e,t),C},C.out=function(e){return u=e,C},C.spread=function(e){return arguments.length?(r=e,C):r},C.correctLightness=function(e){return e??=!0,p=e,S(),y=p?function(e){let t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],r=t>n,i=x(e,!0).lab()[0],a=t+(n-t)*e,o=i-a,s=0,c=1,l=20;for(;Math.abs(o)>.01&&l-->0;)(function(){return r&&(o*=-1),o<0?(s=e,e+=(c-e)*.5):(c=e,e+=(s-e)*.5),i=x(e,!0).lab()[0],o=i-a})();return e}:e=>e,C},C.padding=function(e){return e==null?s:(Y(e)===`number`&&(e=[e,e]),s=e,C)},C.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=l.slice(0);else if(t===1)r=[C(.5)];else if(t>1){let e=i[0],n=i[1]-e;r=aA(0,t,!1).map(r=>C(e+r/(t-1)*n))}else{e=[];let t=[];if(c&&c.length>2)for(let e=1,n=c.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((c[e-1]+c[e])*.5);else t=i;r=t.map(e=>C(e))}return $[n]&&(r=r.map(e=>e[n]())),r},C.cache=function(e){return e==null?h:(h=e,C)},C.gamma=function(e){return e==null?g:(g=e,C)},C.nodata=function(e){return e==null?n:(n=$(e),C)},C}function aA(e,t,n){let r=[],i=e<t,a=n?i?t+1:t-1:t;for(let t=e;i?t<a:t>a;i?t++:t--)r.push(t);return r}var oA=function(e){let t=[1,1];for(let n=1;n<e;n++){let e=[1];for(let n=1;n<=t.length;n++)e[n]=(t[n]||0)+t[n-1];t=e}return t},sA=function(e){let t,n,r,i;if(e=e.map(e=>new Q(e)),e.length===2)[n,r]=e.map(e=>e.lab()),t=function(e){return new Q([0,1,2].map(t=>n[t]+e*(r[t]-n[t])),`lab`)};else if(e.length===3)[n,r,i]=e.map(e=>e.lab()),t=function(e){return new Q([0,1,2].map(t=>(1-e)*(1-e)*n[t]+2*(1-e)*e*r[t]+e*e*i[t]),`lab`)};else if(e.length===4){let a;[n,r,i,a]=e.map(e=>e.lab()),t=function(e){return new Q([0,1,2].map(t=>(1-e)*(1-e)*(1-e)*n[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*i[t]+e*e*e*a[t]),`lab`)}}else if(e.length>=5){let n,r,i;n=e.map(e=>e.lab()),i=e.length-1,r=oA(i),t=function(e){let t=1-e;return new Q([0,1,2].map(a=>n.reduce((n,o,s)=>n+r[s]*t**(i-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return t},cA=e=>{let t=sA(e);return t.scale=()=>iA(t),t},{round:lA}=Math;Q.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(lA)},Q.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:lA(t):t)},Object.assign($,{rgb:(...e)=>new Q(...e,`rgb`)}),Z.format.rgb=(...e)=>{let t=X(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},Z.autodetect.push({p:3,test:(...e)=>{if(e=X(e,`rgba`),Y(e)===`array`&&(e.length===3||e.length===4&&Y(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});var uA=(e,t,n)=>{if(!uA[n])throw Error(`unknown blend mode `+n);return uA[n](e,t)},dA=e=>(t,n)=>{let r=$(n).rgb(),i=$(t).rgb();return $.rgb(e(r,i))},fA=e=>(t,n)=>{let r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r};uA.normal=dA(fA(e=>e)),uA.multiply=dA(fA((e,t)=>e*t/255)),uA.screen=dA(fA((e,t)=>255*(1-(1-e/255)*(1-t/255)))),uA.overlay=dA(fA((e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)))),uA.darken=dA(fA((e,t)=>e>t?t:e)),uA.lighten=dA(fA((e,t)=>e>t?e:t)),uA.dodge=dA(fA((e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e))),uA.burn=dA(fA((e,t)=>255*(1-(1-t/255)/(e/255))));var{pow:pA,sin:mA,cos:hA}=Math;function gA(e=300,t=-1.5,n=1,r=1,i=[0,1]){let a=0,o;Y(i)===`array`?o=i[1]-i[0]:(o=0,i=[i,i]);let s=function(s){let c=FO*((e+120)/360+t*s),l=pA(i[0]+o*s,r),u=(a===0?n:n[0]+s*a)*l*(1-l)/2,d=hA(c),f=mA(c),p=l+u*(-.14861*d+1.78277*f),m=l+u*(-.29227*d-.90649*f),h=l+1.97294*d*u;return $(DO([p*255,m*255,h*255,1]))};return s.start=function(t){return t==null?e:(e=t,s)},s.rotations=function(e){return e==null?t:(t=e,s)},s.gamma=function(e){return e==null?r:(r=e,s)},s.hue=function(e){return e==null?n:(n=e,Y(n)===`array`?(a=n[1]-n[0],a===0&&(n=n[1])):a=0,s)},s.lightness=function(e){return e==null?i:(Y(e)===`array`?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=()=>$.scale(s),s.hue(n),s}var _A=`0123456789abcdef`,{floor:vA,random:yA}=Math,bA=(e=yA)=>{let t=`#`;for(let n=0;n<6;n++)t+=_A.charAt(vA(e()*16));return new Q(t,`hex`)},{log:xA,pow:SA,floor:CA,abs:wA}=Math;function TA(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Y(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&Y(e)===`object`&&(e=e[t]),e!=null&&!isNaN(e)&&(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(e,t)=>EA(n,e,t),n}function EA(e,t=`equal`,n=7){Y(e)==`array`&&(e=TA(e));let{min:r,max:i}=e,a=e.values.sort((e,t)=>e-t);if(n===1)return[r,i];let o=[];if(t.substr(0,1)===`c`&&(o.push(r),o.push(i)),t.substr(0,1)===`e`){o.push(r);for(let e=1;e<n;e++)o.push(r+e/n*(i-r));o.push(i)}else if(t.substr(0,1)===`l`){if(r<=0)throw Error(`Logarithmic scales are only possible for values > 0`);let e=Math.LOG10E*xA(r),t=Math.LOG10E*xA(i);o.push(r);for(let r=1;r<n;r++)o.push(SA(10,e+r/n*(t-e)));o.push(i)}else if(t.substr(0,1)===`q`){o.push(r);for(let e=1;e<n;e++){let t=(a.length-1)*e/n,r=CA(t);if(r===t)o.push(a[r]);else{let e=t-r;o.push(a[r]*(1-e)+a[r+1]*e)}}o.push(i)}else if(t.substr(0,1)===`k`){let e,t=a.length,s=Array(t),c=Array(n),l=!0,u=0,d=null;d=[],d.push(r);for(let e=1;e<n;e++)d.push(r+e/n*(i-r));for(d.push(i);l;){for(let e=0;e<n;e++)c[e]=0;for(let e=0;e<t;e++){let t=a[e],r=Number.MAX_VALUE,i;for(let a=0;a<n;a++){let n=wA(d[a]-t);n<r&&(r=n,i=a),c[i]++,s[e]=i}}let r=Array(n);for(let e=0;e<n;e++)r[e]=null;for(let n=0;n<t;n++)e=s[n],r[e]===null?r[e]=a[n]:r[e]+=a[n];for(let e=0;e<n;e++)r[e]*=1/c[e];l=!1;for(let e=0;e<n;e++)if(r[e]!==d[e]){l=!0;break}d=r,u++,u>200&&(l=!1)}let f={};for(let e=0;e<n;e++)f[e]=[];for(let n=0;n<t;n++)e=s[n],f[e].push(a[n]);let p=[];for(let e=0;e<n;e++)p.push(f[e][0]),p.push(f[e][f[e].length-1]);p=p.sort((e,t)=>e-t),o.push(p[0]);for(let e=1;e<p.length;e+=2){let t=p[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var DA=(e,t)=>{e=new Q(e),t=new Q(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},OA=.027,kA=5e-4,AA=.1,jA=1.14,MA=.022,NA=1.414,PA=(e,t)=>{e=new Q(e),t=new Q(t),e.alpha()<1&&(e=dk(t,e,e.alpha(),`rgb`));let n=FA(...e.rgb()),r=FA(...t.rgb()),i=n>=MA?n:n+(MA-n)**+NA,a=r>=MA?r:r+(MA-r)**+NA,o=a**.56-i**.57,s=a**.65-i**.62,c=Math.abs(a-i)<kA?0:i<a?o*jA:s*jA;return(Math.abs(c)<AA?0:c>0?c-OA:c+OA)*100};function FA(e,t,n){return .2126729*(e/255)**2.4+.7151522*(t/255)**2.4+.072175*(n/255)**2.4}var{sqrt:IA,pow:LA,min:RA,max:zA,atan2:BA,abs:VA,cos:HA,sin:UA,exp:WA,PI:GA}=Math;function KA(e,t,n=1,r=1,i=1){var a=function(e){return 360*e/(2*GA)},o=function(e){return 2*GA*e/360};e=new Q(e),t=new Q(t);let[s,c,l]=Array.from(e.lab()),[u,d,f]=Array.from(t.lab()),p=(s+u)/2,m=(IA(LA(c,2)+LA(l,2))+IA(LA(d,2)+LA(f,2)))/2,h=.5*(1-IA(LA(m,7)/(LA(m,7)+LA(25,7)))),g=c*(1+h),_=d*(1+h),v=IA(LA(g,2)+LA(l,2)),y=IA(LA(_,2)+LA(f,2)),b=(v+y)/2,x=a(BA(l,g)),S=a(BA(f,_)),C=x>=0?x:x+360,w=S>=0?S:S+360,T=VA(C-w)>180?(C+w+360)/2:(C+w)/2,E=1-.17*HA(o(T-30))+.24*HA(o(2*T))+.32*HA(o(3*T+6))-.2*HA(o(4*T-63)),D=w-C;D=VA(D)<=180?D:w<=C?D+360:D-360,D=2*IA(v*y)*UA(o(D)/2);let O=u-s,ee=y-v,te=1+.015*LA(p-50,2)/IA(20+LA(p-50,2)),ne=1+.045*b,re=1+.015*b*E,k=30*WA(-LA((T-275)/25,2)),A=-(2*IA(LA(b,7)/(LA(b,7)+LA(25,7))))*UA(2*o(k));return zA(0,RA(100,IA(LA(O/(n*te),2)+LA(ee/(r*ne),2)+LA(D/(i*re),2)+A*(ee/(r*ne))*(D/(i*re)))))}function qA(e,t,n=`lab`){e=new Q(e),t=new Q(t);let r=e.get(n),i=t.get(n),a=0;for(let e in r){let t=(r[e]||0)-(i[e]||0);a+=t*t}return Math.sqrt(a)}var JA=(...e)=>{try{return new Q(...e),!0}catch{return!1}},YA={cool(){return iA([$.hsl(180,1,.9),$.hsl(250,.7,.4)])},hot(){return iA([`#000`,`#f00`,`#ff0`,`#fff`],[0,.25,.75,1]).mode(`rgb`)}},XA={OrRd:[`#fff7ec`,`#fee8c8`,`#fdd49e`,`#fdbb84`,`#fc8d59`,`#ef6548`,`#d7301f`,`#b30000`,`#7f0000`],PuBu:[`#fff7fb`,`#ece7f2`,`#d0d1e6`,`#a6bddb`,`#74a9cf`,`#3690c0`,`#0570b0`,`#045a8d`,`#023858`],BuPu:[`#f7fcfd`,`#e0ecf4`,`#bfd3e6`,`#9ebcda`,`#8c96c6`,`#8c6bb1`,`#88419d`,`#810f7c`,`#4d004b`],Oranges:[`#fff5eb`,`#fee6ce`,`#fdd0a2`,`#fdae6b`,`#fd8d3c`,`#f16913`,`#d94801`,`#a63603`,`#7f2704`],BuGn:[`#f7fcfd`,`#e5f5f9`,`#ccece6`,`#99d8c9`,`#66c2a4`,`#41ae76`,`#238b45`,`#006d2c`,`#00441b`],YlOrBr:[`#ffffe5`,`#fff7bc`,`#fee391`,`#fec44f`,`#fe9929`,`#ec7014`,`#cc4c02`,`#993404`,`#662506`],YlGn:[`#ffffe5`,`#f7fcb9`,`#d9f0a3`,`#addd8e`,`#78c679`,`#41ab5d`,`#238443`,`#006837`,`#004529`],Reds:[`#fff5f0`,`#fee0d2`,`#fcbba1`,`#fc9272`,`#fb6a4a`,`#ef3b2c`,`#cb181d`,`#a50f15`,`#67000d`],RdPu:[`#fff7f3`,`#fde0dd`,`#fcc5c0`,`#fa9fb5`,`#f768a1`,`#dd3497`,`#ae017e`,`#7a0177`,`#49006a`],Greens:[`#f7fcf5`,`#e5f5e0`,`#c7e9c0`,`#a1d99b`,`#74c476`,`#41ab5d`,`#238b45`,`#006d2c`,`#00441b`],YlGnBu:[`#ffffd9`,`#edf8b1`,`#c7e9b4`,`#7fcdbb`,`#41b6c4`,`#1d91c0`,`#225ea8`,`#253494`,`#081d58`],Purples:[`#fcfbfd`,`#efedf5`,`#dadaeb`,`#bcbddc`,`#9e9ac8`,`#807dba`,`#6a51a3`,`#54278f`,`#3f007d`],GnBu:[`#f7fcf0`,`#e0f3db`,`#ccebc5`,`#a8ddb5`,`#7bccc4`,`#4eb3d3`,`#2b8cbe`,`#0868ac`,`#084081`],Greys:[`#ffffff`,`#f0f0f0`,`#d9d9d9`,`#bdbdbd`,`#969696`,`#737373`,`#525252`,`#252525`,`#000000`],YlOrRd:[`#ffffcc`,`#ffeda0`,`#fed976`,`#feb24c`,`#fd8d3c`,`#fc4e2a`,`#e31a1c`,`#bd0026`,`#800026`],PuRd:[`#f7f4f9`,`#e7e1ef`,`#d4b9da`,`#c994c7`,`#df65b0`,`#e7298a`,`#ce1256`,`#980043`,`#67001f`],Blues:[`#f7fbff`,`#deebf7`,`#c6dbef`,`#9ecae1`,`#6baed6`,`#4292c6`,`#2171b5`,`#08519c`,`#08306b`],PuBuGn:[`#fff7fb`,`#ece2f0`,`#d0d1e6`,`#a6bddb`,`#67a9cf`,`#3690c0`,`#02818a`,`#016c59`,`#014636`],Viridis:[`#440154`,`#482777`,`#3f4a8a`,`#31678e`,`#26838f`,`#1f9d8a`,`#6cce5a`,`#b6de2b`,`#fee825`],Spectral:[`#9e0142`,`#d53e4f`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#e6f598`,`#abdda4`,`#66c2a5`,`#3288bd`,`#5e4fa2`],RdYlGn:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#d9ef8b`,`#a6d96a`,`#66bd63`,`#1a9850`,`#006837`],RdBu:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#f7f7f7`,`#d1e5f0`,`#92c5de`,`#4393c3`,`#2166ac`,`#053061`],PiYG:[`#8e0152`,`#c51b7d`,`#de77ae`,`#f1b6da`,`#fde0ef`,`#f7f7f7`,`#e6f5d0`,`#b8e186`,`#7fbc41`,`#4d9221`,`#276419`],PRGn:[`#40004b`,`#762a83`,`#9970ab`,`#c2a5cf`,`#e7d4e8`,`#f7f7f7`,`#d9f0d3`,`#a6dba0`,`#5aae61`,`#1b7837`,`#00441b`],RdYlBu:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee090`,`#ffffbf`,`#e0f3f8`,`#abd9e9`,`#74add1`,`#4575b4`,`#313695`],BrBG:[`#543005`,`#8c510a`,`#bf812d`,`#dfc27d`,`#f6e8c3`,`#f5f5f5`,`#c7eae5`,`#80cdc1`,`#35978f`,`#01665e`,`#003c30`],RdGy:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#ffffff`,`#e0e0e0`,`#bababa`,`#878787`,`#4d4d4d`,`#1a1a1a`],PuOr:[`#7f3b08`,`#b35806`,`#e08214`,`#fdb863`,`#fee0b6`,`#f7f7f7`,`#d8daeb`,`#b2abd2`,`#8073ac`,`#542788`,`#2d004b`],Set2:[`#66c2a5`,`#fc8d62`,`#8da0cb`,`#e78ac3`,`#a6d854`,`#ffd92f`,`#e5c494`,`#b3b3b3`],Accent:[`#7fc97f`,`#beaed4`,`#fdc086`,`#ffff99`,`#386cb0`,`#f0027f`,`#bf5b17`,`#666666`],Set1:[`#e41a1c`,`#377eb8`,`#4daf4a`,`#984ea3`,`#ff7f00`,`#ffff33`,`#a65628`,`#f781bf`,`#999999`],Set3:[`#8dd3c7`,`#ffffb3`,`#bebada`,`#fb8072`,`#80b1d3`,`#fdb462`,`#b3de69`,`#fccde5`,`#d9d9d9`,`#bc80bd`,`#ccebc5`,`#ffed6f`],Dark2:[`#1b9e77`,`#d95f02`,`#7570b3`,`#e7298a`,`#66a61e`,`#e6ab02`,`#a6761d`,`#666666`],Paired:[`#a6cee3`,`#1f78b4`,`#b2df8a`,`#33a02c`,`#fb9a99`,`#e31a1c`,`#fdbf6f`,`#ff7f00`,`#cab2d6`,`#6a3d9a`,`#ffff99`,`#b15928`],Pastel2:[`#b3e2cd`,`#fdcdac`,`#cbd5e8`,`#f4cae4`,`#e6f5c9`,`#fff2ae`,`#f1e2cc`,`#cccccc`],Pastel1:[`#fbb4ae`,`#b3cde3`,`#ccebc5`,`#decbe4`,`#fed9a6`,`#ffffcc`,`#e5d8bd`,`#fddaec`,`#f2f2f2`]},ZA=Object.keys(XA),QA=new Map(ZA.map(e=>[e.toLowerCase(),e])),$A=typeof Proxy==`function`?new Proxy(XA,{get(e,t){let n=t.toLowerCase();if(QA.has(n))return e[QA.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(ZA)}}):XA,ej=(...e)=>{e=X(e,`cmyk`);let[t,n,r,i]=e,a=e.length>4?e[4]:1;return i===1?[0,0,0,a]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),a]},{max:tj}=Math,nj=(...e)=>{let[t,n,r]=X(e,`rgb`);t/=255,n/=255,r/=255;let i=1-tj(t,tj(n,r)),a=i<1?1/(1-i):0;return[(1-t-i)*a,(1-n-i)*a,(1-r-i)*a,i]};Q.prototype.cmyk=function(){return nj(this._rgb)},Object.assign($,{cmyk:(...e)=>new Q(...e,`cmyk`)}),Z.format.cmyk=ej,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`cmyk`),Y(e)===`array`&&e.length===4)return`cmyk`}});var rj=(...e)=>{let t=X(e,`hsla`),n=kO(e)||`lsa`;return t[0]=NO(t[0]||0)+`deg`,t[1]=NO(t[1]*100)+`%`,t[2]=NO(t[2]*100)+`%`,n===`hsla`||t.length>3&&t[3]<1?(t[3]=`/ `+(t.length>3?t[3]:1),n=`hsla`):t.length=3,`${n.substr(0,3)}(${t.join(` `)})`},ij=(...e)=>{let t=X(e,`lab`),n=kO(e)||`lab`;return t[0]=NO(t[0])+`%`,t[1]=NO(t[1]),t[2]=NO(t[2]),n===`laba`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(` `)})`},aj=(...e)=>{let t=X(e,`lch`),n=kO(e)||`lab`;return t[0]=NO(t[0])+`%`,t[1]=NO(t[1]),t[2]=isNaN(t[2])?`none`:NO(t[2])+`deg`,n===`lcha`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(` `)})`},oj=(...e)=>{let t=X(e,`lab`);return t[0]=NO(t[0]*100)+`%`,t[1]=PO(t[1]),t[2]=PO(t[2]),t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(` `)})`},sj=(...e)=>{let[t,n,r,...i]=X(e,`rgb`),[a,o,s]=qk(t,n,r),[c,l,u]=bk(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},cj=(...e)=>{let t=X(e,`lch`);return t[0]=NO(t[0]*100)+`%`,t[1]=PO(t[1]),t[2]=isNaN(t[2])?`none`:NO(t[2])+`deg`,t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(` `)})`},{round:lj}=Math,uj=(...e)=>{let t=X(e,`rgba`),n=kO(e)||`rgb`;if(n.substr(0,3)===`hsl`)return rj(Rk(t),n);if(n.substr(0,3)===`lab`){let e=XO();YO(`d50`);let r=ij(tk(t),n);return YO(e),r}if(n.substr(0,3)===`lch`){let e=XO();YO(`d50`);let r=aj(xk(t),n);return YO(e),r}return n.substr(0,5)===`oklab`?oj(qk(t)):n.substr(0,5)===`oklch`?cj(sj(t)):(t[0]=lj(t[0]),t[1]=lj(t[1]),t[2]=lj(t[2]),(n===`rgba`||t.length>3&&t[3]<1)&&(t[3]=`/ `+(t.length>3?t[3]:1),n=`rgba`),`${n.substr(0,3)}(${t.slice(0,n===`rgb`?3:4).join(` `)})`)},dj=(...e)=>{e=X(e,`lch`);let[t,n,r,...i]=e,[a,o,s]=mk(t,n,r),[c,l,u]=Gk(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},fj=`((?:-?\\d+)|(?:-?\\d+(?:\\.\\d+)?)%|none)`,pj=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%?)|none)`,mj=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%)|none)`,hj=`\\s*`,gj=`\\s+`,_j=`\\s*,\\s*`,vj=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:deg)?)|none)`,yj=`\\s*(?:\\/\\s*((?:[01]|[01]?\\.\\d+)|\\d+(?:\\.\\d+)?%))?`,bj=RegExp(`^rgba?\\(`+hj+[fj,fj,fj].join(gj)+yj+`\\)$`),xj=RegExp(`^rgb\\(`+hj+[fj,fj,fj].join(_j)+hj+`\\)$`),Sj=RegExp(`^rgba\\(`+hj+[fj,fj,fj,pj].join(_j)+hj+`\\)$`),Cj=RegExp(`^hsla?\\(`+hj+[vj,mj,mj].join(gj)+yj+`\\)$`),wj=RegExp(`^hsl?\\(`+hj+[vj,mj,mj].join(_j)+hj+`\\)$`),Tj=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ej=RegExp(`^lab\\(`+hj+[pj,pj,pj].join(gj)+yj+`\\)$`),Dj=RegExp(`^lch\\(`+hj+[pj,pj,vj].join(gj)+yj+`\\)$`),Oj=RegExp(`^oklab\\(`+hj+[pj,pj,pj].join(gj)+yj+`\\)$`),kj=RegExp(`^oklch\\(`+hj+[pj,pj,vj].join(gj)+yj+`\\)$`),{round:Aj}=Math,jj=e=>e.map((e,t)=>t<=2?EO(Aj(e),0,255):e),Mj=(e,t=0,n=100,r=!1)=>(typeof e==`string`&&e.endsWith(`%`)&&(e=parseFloat(e.substring(0,e.length-1))/100,e=r?t+(e+1)*.5*(n-t):t+e*(n-t)),+e),Nj=(e,t)=>e===`none`?t:e,Pj=e=>{if(e=e.toLowerCase().trim(),e===`transparent`)return[0,0,0,0];let t;if(Z.format.named)try{return Z.format.named(e)}catch{}if((t=e.match(bj))||(t=e.match(xj))){let e=t.slice(1,4);for(let t=0;t<3;t++)e[t]=+Mj(Nj(e[t],0),0,255);e=jj(e);let n=t[4]===void 0?1:+Mj(t[4],0,1);return e[3]=n,e}if(t=e.match(Sj)){let e=t.slice(1,5);for(let t=0;t<4;t++)e[t]=+Mj(e[t],0,255);return e}if((t=e.match(Cj))||(t=e.match(wj))){let e=t.slice(1,4);e[0]=+Nj(e[0].replace(`deg`,``),0),e[1]=Mj(Nj(e[1],0),0,100)*.01,e[2]=Mj(Nj(e[2],0),0,100)*.01;let n=jj(Lk(e));return n[3]=t[4]===void 0?1:+Mj(t[4],0,1),n}if(t=e.match(Tj)){let e=t.slice(1,4);e[1]*=.01,e[2]*=.01;let n=Lk(e);for(let e=0;e<3;e++)n[e]=Aj(n[e]);return n[3]=+t[4],n}if(t=e.match(Ej)){let e=t.slice(1,4);e[0]=Mj(Nj(e[0],0),0,100),e[1]=Mj(Nj(e[1],0),-125,125,!0),e[2]=Mj(Nj(e[2],0),-125,125,!0);let n=XO();YO(`d50`);let r=jj(ZO(e));return YO(n),r[3]=t[4]===void 0?1:+Mj(t[4],0,1),r}if(t=e.match(Dj)){let e=t.slice(1,4);e[0]=Mj(e[0],0,100),e[1]=Mj(Nj(e[1],0),0,150,!1),e[2]=+Nj(e[2].replace(`deg`,``),0);let n=XO();YO(`d50`);let r=jj(hk(e));return YO(n),r[3]=t[4]===void 0?1:+Mj(t[4],0,1),r}if(t=e.match(Oj)){let e=t.slice(1,4);e[0]=Mj(Nj(e[0],0),0,1),e[1]=Mj(Nj(e[1],0),-.4,.4,!0),e[2]=Mj(Nj(e[2],0),-.4,.4,!0);let n=jj(Gk(e));return n[3]=t[4]===void 0?1:+Mj(t[4],0,1),n}if(t=e.match(kj)){let e=t.slice(1,4);e[0]=Mj(Nj(e[0],0),0,1),e[1]=Mj(Nj(e[1],0),0,.4,!1),e[2]=+Nj(e[2].replace(`deg`,``),0);let n=jj(dj(e));return n[3]=t[4]===void 0?1:+Mj(t[4],0,1),n}};Pj.test=e=>bj.test(e)||Cj.test(e)||Ej.test(e)||Dj.test(e)||Oj.test(e)||kj.test(e)||xj.test(e)||Sj.test(e)||wj.test(e)||Tj.test(e)||e===`transparent`,Q.prototype.css=function(e){return uj(this._rgb,e)},$.css=(...e)=>new Q(...e,`css`),Z.format.css=Pj,Z.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Y(e)===`string`&&Pj.test(e))return`css`}}),Z.format.gl=(...e)=>{let t=X(e,`rgba`);return t[0]*=255,t[1]*=255,t[2]*=255,t},$.gl=(...e)=>new Q(...e,`gl`),Q.prototype.gl=function(){let e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},Q.prototype.hex=function(e){return KO(this._rgb,e)},$.hex=(...e)=>new Q(...e,`hex`),Z.format.hex=WO,Z.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&Y(e)===`string`&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return`hex`}});var{log:Fj}=Math,Ij=e=>{let t=e/100,n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*Fj(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*Fj(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*Fj(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*Fj(r),i=255),[n,r,i,1]},{round:Lj}=Math,Rj=(...e)=>{let t=X(e,`rgb`),n=t[0],r=t[2],i=1e3,a=4e4,o;for(;a-i>.4;){o=(a+i)*.5;let e=Ij(o);e[2]/e[0]>=r/n?a=o:i=o}return Lj(o)};Q.prototype.temp=Q.prototype.kelvin=Q.prototype.temperature=function(){return Rj(this._rgb)};var zj=(...e)=>new Q(...e,`temp`);Object.assign($,{temp:zj,kelvin:zj,temperature:zj}),Z.format.temp=Z.format.kelvin=Z.format.temperature=Ij,Q.prototype.oklch=function(){return sj(this._rgb)},Object.assign($,{oklch:(...e)=>new Q(...e,`oklch`)}),Z.format.oklch=dj,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`oklch`),Y(e)===`array`&&e.length===3)return`oklch`}}),Object.assign($,{analyze:TA,average:tA,bezier:cA,blend:uA,brewer:$A,Color:Q,colors:VO,contrast:DA,contrastAPCA:PA,cubehelix:gA,deltaE:KA,distance:qA,input:Z,interpolate:dk,limits:EA,mix:dk,random:bA,scale:iA,scales:YA,valid:JA});var Bj=()=>window.location.hostname.includes(`greenhouse`),Vj=()=>window.location.hostname.includes(`typo3`),Hj=e=>Vj()||Bj()||Uj(e),Uj=e=>!!e.ownerDocument.defaultView?.frameElement,Wj=e=>{let t=getComputedStyle(e),n=t.position===`absolute`,r=/(auto|scroll)/;if(t.position===`fixed`)return document.body;for(let i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position===`static`)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.body},Gj=c((e=>{e.CASE_SENSITIVE_TAG_NAMES_MAP=`animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{})}));function Kj(e){return e.type===qj.Tag||e.type===qj.Script||e.type===qj.Style}var qj,Jj=s((()=>{(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(qj||={}),qj.Root,qj.Text,qj.Directive,qj.Comment,qj.Script,qj.Style,qj.Tag,qj.CDATA,qj.Doctype}));function Yj(e){return Kj(e)}function Xj(e){return e.type===qj.CDATA}function Zj(e){return e.type===qj.Text}function Qj(e){return e.type===qj.Comment}function $j(e){return e.type===qj.Directive}function eM(e){return e.type===qj.Root}function tM(e){return Object.hasOwn(e,`children`)}function nM(e,t=!1){let n;if(Zj(e))n=new oM(e.data);else if(Qj(e))n=new sM(e.data);else if(Yj(e)){let r=t?rM(e.children):[],i=new fM(e.name,{...e.attribs},r);for(let e of r)e.parent=i;e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(Xj(e)){let r=t?rM(e.children):[],i=new uM(r);for(let e of r)e.parent=i;n=i}else if(eM(e)){let r=t?rM(e.children):[],i=new dM(r);for(let e of r)e.parent=i;e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if($j(e)){let t=new cM(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function rM(e){let t=e.map(e=>nM(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}var iM,aM,oM,sM,cM,lM,uM,dM,fM,pM=s((()=>{Jj(),iM=class{parent=null;prev=null;next=null;startIndex=null;endIndex=null;get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return nM(this,e)}},aM=class extends iM{data;constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},oM=class extends aM{type=qj.Text;get nodeType(){return 3}},sM=class extends aM{type=qj.Comment;get nodeType(){return 8}},cM=class extends aM{type=qj.Directive;name;constructor(e,t){super(t),this.name=e}get nodeType(){return 1}"x-name";"x-publicId";"x-systemId"},lM=class extends iM{children;constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},uM=class extends lM{type=qj.CDATA;get nodeType(){return 4}},dM=class extends lM{type=qj.Root;get nodeType(){return 9}},fM=class extends lM{name;attribs;type;constructor(e,t,n=[],r=e===`script`?qj.Script:e===`style`?qj.Style:qj.Tag){super(n),this.name=e,this.attribs=t,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}namespace;"x-attribsNamespace";"x-attribsPrefix"}})),mM=l({CDATA:()=>uM,Comment:()=>sM,DataNode:()=>aM,Document:()=>dM,DomHandler:()=>gM,Element:()=>fM,Node:()=>iM,NodeWithChildren:()=>lM,ProcessingInstruction:()=>cM,Text:()=>oM,cloneNode:()=>nM,default:()=>gM,hasChildren:()=>tM,isCDATA:()=>Xj,isComment:()=>Qj,isDirective:()=>$j,isDocument:()=>eM,isTag:()=>Yj,isText:()=>Zj}),hM,gM,_M=s((()=>{Jj(),pM(),pM(),hM={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},gM=class{dom=[];root=new dM(this.dom);callback;options;elementCB;done=!1;tagStack=[this.root];lastNode=null;parser=null;constructor(e,t,n){typeof t==`function`&&(n=t,t=hM),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??hM,this.elementCB=n??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new dM(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){let n=this.options.xmlMode?qj.Tag:void 0,r=new fM(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)}ontext(e){let{lastNode:t}=this;if(t&&t.type===qj.Text)t.data+=e,this.options.withEndIndices&&this.parser&&(t.endIndex=this.parser.endIndex);else{let t=new oM(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===qj.Comment){this.lastNode.data+=e;return}let t=new sM(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){let e=new oM(``),t=new uM([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){let n=new cM(e,t);this.addNode(n)}handleCallback(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e}addNode(e){let t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&this.parser&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null}}})),vM=c((e=>{var t=Gj(),n=(_M(),f(mM)),r=`\r`,i=new RegExp(r,`g`),a=`__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`,o=new RegExp(a,`g`);function s(e){return t.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function c(e){let t={},n=0,r=e.length;for(;n<r;n++){let r=e[n];t[r.name]=r.value}return t}function l(e){return e=e.toLowerCase(),s(e)||e}function u(e,t){let n=`<`+t,r=e.toLowerCase().indexOf(n);if(r===-1)return!1;let i=e[r+n.length];return i===`>`||i===` `||i===` `||i===`
146
- `||i===`\r`||i===`/`}function d(e){return e.replace(i,a)}function p(e){return e.replace(o,r)}function m(e,t=null,r){let i=[],a,o=0,s=e.length;for(;o<s;o++){let r=e[o];switch(r.nodeType){case 1:{let e=l(r.nodeName);a=new n.Element(e,c(r.attributes)),a.children=m(e===`template`?r.content.childNodes:r.childNodes,a);break}case 3:a=new n.Text(p(r.nodeValue??``));break;case 8:a=new n.Comment(r.nodeValue??``);break;default:continue}let s=i[o-1]??null;s&&(s.next=a),a.parent=t,a.prev=s,a.next=null,i.push(a)}return r&&(a=new n.ProcessingInstruction(r.substring(0,r.indexOf(` `)).toLowerCase(),r),a.next=i[0]??null,a.parent=t,i.unshift(a),i[1]&&(i[1].prev=i[0])),i}e.escapeSpecialCharacters=d,e.formatDOM=m,e.hasOpenTag=u})),yM=c((e=>{var t=vM(),n=`html`,r=`head`,i=`body`,a=/<([a-zA-Z]+[0-9]?)/;function o(e,t){return t?t.createHTML(e):e}var s=(e,t,n)=>{throw Error("This browser does not support `document.implementation.createHTMLDocument`")},c=(e,t,n)=>{throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},l=typeof window==`object`&&window.DOMParser;if(typeof l==`function`){let e=new l;c=(t,n,r)=>(n&&(t=`<${n}>${t}</${n}>`),e.parseFromString(t,`text/html`)),s=c}if(typeof document==`object`&&document.implementation){let e=document.implementation.createHTMLDocument();s=function(t,n,r){if(n){let i=e.documentElement.querySelector(n);return i&&(i.innerHTML=o(t,r)),e}return e.documentElement.innerHTML=o(t,r),e}}var u=typeof document==`object`&&document.createElement(`template`),d;u&&u.content&&(d=(e,t)=>(u.innerHTML=o(e,t),u.content.childNodes));var f=()=>document.createDocumentFragment().childNodes;function p(e,o){e=t.escapeSpecialCharacters(e);let l=a.exec(e)?.[1]?.toLowerCase();switch(l){case n:{let a=c(e);if(!t.hasOpenTag(e,r)){let e=a.querySelector(r);e?.parentNode?.removeChild(e)}if(!t.hasOpenTag(e,i)){let e=a.querySelector(i);e?.parentNode?.removeChild(e)}return a.querySelectorAll(n)}case r:case i:{let n=s(e,void 0,o).querySelectorAll(l);return t.hasOpenTag(e,i)&&t.hasOpenTag(e,r)?n[0].parentNode?.childNodes??f():n}default:return d?d(e,o):s(e,i,o).querySelector(i)?.childNodes??f()}}e.default=p})),bM=c((e=>{Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=vM(),n=yM(),r=/<(![a-zA-Z\s]+)>/;function i(e,i){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];let a=r.exec(e),o=a?a[1]:void 0;return t.formatDOM(n.default(e,i?.trustedTypePolicy),null,o)}e.default=i})),xM=c((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":`acceptCharset`,accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:`className`,classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:`htmlFor`,form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":`httpEquiv`,icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":`accentHeight`,accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":`alignmentBaseline`,allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":`arabicForm`,ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":`baselineShift`,baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":`capHeight`,clip:0,clipPath:1,"clip-path":`clipPath`,clipPathUnits:1,clipRule:1,"clip-rule":`clipRule`,color:0,colorInterpolation:1,"color-interpolation":`colorInterpolation`,colorInterpolationFilters:1,"color-interpolation-filters":`colorInterpolationFilters`,colorProfile:1,"color-profile":`colorProfile`,colorRendering:1,"color-rendering":`colorRendering`,contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":`dominantBaseline`,dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":`enableBackground`,end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":`fillOpacity`,fillRule:1,"fill-rule":`fillRule`,filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":`floodOpacity`,floodColor:1,"flood-color":`floodColor`,focusable:0,fontFamily:1,"font-family":`fontFamily`,fontSize:1,"font-size":`fontSize`,fontSizeAdjust:1,"font-size-adjust":`fontSizeAdjust`,fontStretch:1,"font-stretch":`fontStretch`,fontStyle:1,"font-style":`fontStyle`,fontVariant:1,"font-variant":`fontVariant`,fontWeight:1,"font-weight":`fontWeight`,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":`glyphName`,glyphOrientationHorizontal:1,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphOrientationVertical:1,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":`horizAdvX`,horizOriginX:1,"horiz-origin-x":`horizOriginX`,ideographic:0,imageRendering:1,"image-rendering":`imageRendering`,in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":`letterSpacing`,lightingColor:1,"lighting-color":`lightingColor`,limitingConeAngle:1,local:0,markerEnd:1,"marker-end":`markerEnd`,markerHeight:1,markerMid:1,"marker-mid":`markerMid`,markerStart:1,"marker-start":`markerStart`,markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":`overlinePosition`,overlineThickness:1,"overline-thickness":`overlineThickness`,paintOrder:1,"paint-order":`paintOrder`,panose1:0,"panose-1":`panose1`,pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":`pointerEvents`,points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":`renderingIntent`,repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":`shapeRendering`,slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":`stopColor`,stopOpacity:1,"stop-opacity":`stopOpacity`,strikethroughPosition:1,"strikethrough-position":`strikethroughPosition`,strikethroughThickness:1,"strikethrough-thickness":`strikethroughThickness`,string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":`strokeDasharray`,strokeDashoffset:1,"stroke-dashoffset":`strokeDashoffset`,strokeLinecap:1,"stroke-linecap":`strokeLinecap`,strokeLinejoin:1,"stroke-linejoin":`strokeLinejoin`,strokeMiterlimit:1,"stroke-miterlimit":`strokeMiterlimit`,strokeWidth:1,"stroke-width":`strokeWidth`,strokeOpacity:1,"stroke-opacity":`strokeOpacity`,suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":`textAnchor`,textDecoration:1,"text-decoration":`textDecoration`,textLength:1,textRendering:1,"text-rendering":`textRendering`,to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":`underlinePosition`,underlineThickness:1,"underline-thickness":`underlineThickness`,unicode:0,unicodeBidi:1,"unicode-bidi":`unicodeBidi`,unicodeRange:1,"unicode-range":`unicodeRange`,unitsPerEm:1,"units-per-em":`unitsPerEm`,unselectable:0,vAlphabetic:1,"v-alphabetic":`vAlphabetic`,values:0,vectorEffect:1,"vector-effect":`vectorEffect`,version:0,vertAdvY:1,"vert-adv-y":`vertAdvY`,vertOriginX:1,"vert-origin-x":`vertOriginX`,vertOriginY:1,"vert-origin-y":`vertOriginY`,vHanging:1,"v-hanging":`vHanging`,vIdeographic:1,"v-ideographic":`vIdeographic`,viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":`vMathematical`,vocab:0,widths:0,wordSpacing:1,"word-spacing":`wordSpacing`,writingMode:1,"writing-mode":`writingMode`,x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":`xHeight`,xlinkActuate:1,"xlink:actuate":`xlinkActuate`,xlinkArcrole:1,"xlink:arcrole":`xlinkArcrole`,xlinkHref:1,"xlink:href":`xlinkHref`,xlinkRole:1,"xlink:role":`xlinkRole`,xlinkShow:1,"xlink:show":`xlinkShow`,xlinkTitle:1,"xlink:title":`xlinkTitle`,xlinkType:1,"xlink:type":`xlinkType`,xmlBase:1,"xml:base":`xmlBase`,xmlLang:1,"xml:lang":`xmlLang`,xmlns:0,"xml:space":`xmlSpace`,xmlnsXlink:1,"xmlns:xlink":`xmlnsXlink`,xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),SM=c((e=>{var t=0,n=1,r=2,i=3,a=4,o=5,s=6;function c(e){return u.hasOwnProperty(e)?u[e]:null}function l(e,t,n,o,s,c,l){this.acceptsBooleans=t===r||t===i||t===a,this.attributeName=o,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=l}var u={};[`children`,`dangerouslySetInnerHTML`,`defaultValue`,`defaultChecked`,`innerHTML`,`suppressContentEditableWarning`,`suppressHydrationWarning`,`style`].forEach(e=>{u[e]=new l(e,t,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(([e,t])=>{u[e]=new l(e,n,!1,t,null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(e=>{u[e]=new l(e,r,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(e=>{u[e]=new l(e,r,!1,e,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(e=>{u[e]=new l(e,i,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(e=>{u[e]=new l(e,i,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(e=>{u[e]=new l(e,a,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(e=>{u[e]=new l(e,s,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(e=>{u[e]=new l(e,o,!1,e.toLowerCase(),null,!1,!1)});var d=/[\-\:]([a-z])/g,f=e=>e[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(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,null,!1,!1)}),[`xlink:actuate`,`xlink:arcrole`,`xlink:role`,`xlink:show`,`xlink:title`,`xlink:type`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!1,!1)});var p=`xlinkHref`;u[p]=new l(`xlinkHref`,n,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!0,!0)});var{CAMELCASE:m,SAME:h,possibleStandardNames:g}=xM(),_=RegExp.prototype.test.bind(RegExp(`^(data|aria)-[: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]*$`)),v=Object.keys(g).reduce((e,t)=>{let n=g[t];return n===h?e[t]=t:n===m?e[t.toLowerCase()]=t:e[t]=n,e},{});e.BOOLEAN=i,e.BOOLEANISH_STRING=r,e.NUMERIC=o,e.OVERLOADED_BOOLEAN=a,e.POSITIVE_NUMERIC=s,e.RESERVED=t,e.STRING=n,e.getPropertyInfo=c,e.isCustomAttribute=_,e.possibleStandardNames=v})),CM=c(((e,t)=>{var n=/\/\*(?:[^*]|\*(?!\/))*\*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,c=/^[;\s]*/;function l(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function d(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
147
- `);u=~n?e.length-n:u+e.length}function f(){var e={line:l,column:u};return function(t){return t.position=new p(e),g(),t}}function p(e){this.start=e,this.end={line:l,column:u},this.source=t.source}p.prototype.content=e;function m(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function h(t){var n=t.exec(e);if(n){var r=n[0];return d(r),e=e.slice(r.length),n}}function g(){h(i)}function _(e){for(var t;t=v();)e.push(t);return e}function v(){var t=f();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return m(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,d(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function y(){var e=f(),t=h(a);if(t){if(v(),!h(o))return m(`property missing ':'`);var r=h(s),i=e({type:`declaration`,property:t[0].replace(n,``).trim(),value:r?r[0].replace(n,``).trim():``});return h(c),i}}function b(){var e=[];_(e);for(var t;t=y();)e.push(t),_(e);return e}return g(),b()}t.exports=l})),wM=c(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e},l=(e,t,i)=>(i=e==null?{}:n(o(e)),c(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),u=CM();u=l(u);function d(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,u.default)(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}t.exports=d})),TM=c(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e},l=(e,t,i)=>(i=e==null?{}:n(o(e)),c(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),u=wM();u=l(u);var d=/^--[a-zA-Z0-9_-]+$/,f=/-([a-z])/g,p=/^[^-]+$/,m=/^-(webkit|moz|ms|o|khtml)-/,h=/^-(ms)-/,g=e=>!e||p.test(e)||d.test(e),_=(e,t)=>t.toUpperCase(),v=(e,t)=>`${t}-`,y=(e,t={})=>g(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(h,v):e.replace(m,v),e.replace(f,_));function b(e,t){let n={};return!e||typeof e!=`string`||(0,u.default)(e,(e,r)=>{e&&r&&(n[y(e,t)]=r)}),n}t.exports=b})),EM=c((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=a,e.setStyleProp=s;var n=ry(),r=t(TM()),i=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function a(e,t){return e.includes(`-`)?!i.has(e):!!(t&&typeof t.is==`string`)}var o={reactCompat:!0};function s(e,t){if(typeof e==`string`){if(!e.trim()){t.style={};return}try{t.style=(0,r.default)(e,o)}catch{t.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(`.`)[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set([`tr`,`tbody`,`thead`,`tfoot`,`colgroup`,`table`,`head`,`html`,`frameset`]),e.canTextBeChildOfNode=t=>!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(t.name),e.returnFirstArg=e=>e})),DM=c((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=SM(),n=EM(),r=[`checked`,`value`],i=[`input`,`select`,`textarea`],a={reset:!0,submit:!0};function o(e={},o){let c={},l=!!(e.type&&a[e.type]);for(let a in e){let u=e[a];if((0,t.isCustomAttribute)(a)){c[a]=u;continue}let d=a.toLowerCase(),f=s(d);if(f){let e=(0,t.getPropertyInfo)(f);switch(r.includes(f)&&i.includes(o)&&!l&&(f=s(`default`+d)),c[f]=u,e?.type){case t.BOOLEAN:c[f]=!0;break;case t.OVERLOADED_BOOLEAN:u===``&&(c[f]=!0)}continue}n.PRESERVE_CUSTOM_ATTRIBUTES&&(c[a]=u)}return(0,n.setStyleProp)(e.style,c),c}function s(e){return t.possibleStandardNames[e]}}));function OM(e){return e.type===kM.Tag||e.type===kM.Script||e.type===kM.Style}var kM,AM=s((()=>{(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(kM||={}),kM.Root,kM.Text,kM.Directive,kM.Comment,kM.Script,kM.Style,kM.Tag,kM.CDATA,kM.Doctype}));function jM(e){return OM(e)}function MM(e){return e.type===kM.CDATA}function NM(e){return e.type===kM.Text}function PM(e){return e.type===kM.Comment}function FM(e){return e.type===kM.Directive}function IM(e){return e.type===kM.Root}function LM(e){return Object.hasOwn(e,`children`)}function RM(e,t=!1){let n;if(NM(e))n=new HM(e.data);else if(PM(e))n=new UM(e.data);else if(jM(e)){let r=t?zM(e.children):[],i=new JM(e.name,{...e.attribs},r);for(let e of r)e.parent=i;e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(MM(e)){let r=t?zM(e.children):[],i=new KM(r);for(let e of r)e.parent=i;n=i}else if(IM(e)){let r=t?zM(e.children):[],i=new qM(r);for(let e of r)e.parent=i;e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if(FM(e)){let t=new WM(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function zM(e){let t=e.map(e=>RM(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}var BM,VM,HM,UM,WM,GM,KM,qM,JM,YM=s((()=>{AM(),BM=class{parent=null;prev=null;next=null;startIndex=null;endIndex=null;get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return RM(this,e)}},VM=class extends BM{data;constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},HM=class extends VM{type=kM.Text;get nodeType(){return 3}},UM=class extends VM{type=kM.Comment;get nodeType(){return 8}},WM=class extends VM{type=kM.Directive;name;constructor(e,t){super(t),this.name=e}get nodeType(){return 1}"x-name";"x-publicId";"x-systemId"},GM=class extends BM{children;constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},KM=class extends GM{type=kM.CDATA;get nodeType(){return 4}},qM=class extends GM{type=kM.Root;get nodeType(){return 9}},JM=class extends GM{name;attribs;type;constructor(e,t,n=[],r=e===`script`?kM.Script:e===`style`?kM.Style:kM.Tag){super(n),this.name=e,this.attribs=t,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}namespace;"x-attribsNamespace";"x-attribsPrefix"}})),XM=l({CDATA:()=>KM,Comment:()=>UM,DataNode:()=>VM,Document:()=>qM,DomHandler:()=>QM,Element:()=>JM,Node:()=>BM,NodeWithChildren:()=>GM,ProcessingInstruction:()=>WM,Text:()=>HM,cloneNode:()=>RM,default:()=>QM,hasChildren:()=>LM,isCDATA:()=>MM,isComment:()=>PM,isDirective:()=>FM,isDocument:()=>IM,isTag:()=>jM,isText:()=>NM}),ZM,QM,$M=s((()=>{AM(),YM(),YM(),ZM={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},QM=class{dom=[];root=new qM(this.dom);callback;options;elementCB;done=!1;tagStack=[this.root];lastNode=null;parser=null;constructor(e,t,n){typeof t==`function`&&(n=t,t=ZM),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??ZM,this.elementCB=n??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new qM(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){let n=this.options.xmlMode?kM.Tag:void 0,r=new JM(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)}ontext(e){let{lastNode:t}=this;if(t&&t.type===kM.Text)t.data+=e,this.options.withEndIndices&&this.parser&&(t.endIndex=this.parser.endIndex);else{let t=new HM(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===kM.Comment){this.lastNode.data+=e;return}let t=new UM(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){let e=new HM(``),t=new KM([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){let n=new WM(e,t);this.addNode(n)}handleCallback(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e}addNode(e){let t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&this.parser&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null}}})),eN=c((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=($M(),f(XM)),r=ry(),i=t(DM()),a=EM(),o={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e,t={}){let n=[],r=typeof t.replace==`function`,u=t.transform??a.returnFirstArg,{cloneElement:d,createElement:f,isValidElement:p}=t.library??o,m=e.length;c(e);for(let o=0;o<m;o++){let c=e[o];if(r){let e=t.replace?.call(t,c,o);if(p(e)){m>1&&(e=d(e,{key:e.key??o})),n.push(u(e,c,o));continue}}if(c.type===`text`){let e=!c.data.trim().length;if(e&&c.parent&&!(0,a.canTextBeChildOfNode)(c.parent)||t.trim&&e)continue;n.push(u(c.data,c,o));continue}let h=c,g={};l(h)?((0,a.setStyleProp)(h.attribs.style,h.attribs),g=h.attribs):h.attribs&&(g=(0,i.default)(h.attribs,h.name));let _;switch(c.type){case`script`:case`style`:c.children[0]&&(g.dangerouslySetInnerHTML={__html:c.children[0].data});break;case`tag`:c.name===`textarea`&&c.children[0]?g.defaultValue=c.children[0].data:c.children?.length&&(_=s(c.children,t));break;default:continue}m>1&&(g.key=o),n.push(u(f(c.name,g,_),c,o))}return n.length===1?n[0]:n}function c(e){for(let t of e)(t.type===`tag`||t.type===`script`||t.type===`style`)&&(Object.setPrototypeOf(t,n.Element.prototype),c(t.children))}function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&e.type===`tag`&&(0,a.isCustomComponent)(e.name,e.attribs)}})),tN=d(c((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=o;var n=t(bM());e.htmlToDOM=n.default,e.attributesToProps=t(DM()).default;var r=t(eN());e.domToReact=r.default;var i=($M(),f(XM));Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function o(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];let i=Object.assign(Object.assign({},t?.htmlparser2??a),{trustedTypePolicy:t?.trustedTypePolicy});return(0,r.default)((0,n.default)(e,i),t)}}))(),1),nN=tN.default.default||tN.default,rN=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends rN{};function iN(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function aN(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function oN(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function sN(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function cN(e,t){return oN(e,t,``)}function lN(e,t){return sN(e,t,``)}function uN(e,t){return t.slice(0,dN(e,t))}function dN(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function fN(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function pN(e,t){if(t)return hN(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function mN(e,t){if(t)return hN(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function hN(e,t){if(!t)return[mN(e),pN(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=fN(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var gN=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,_N=RegExp(`[${gN}]+|\\s+|[^${gN}]`,`ug`),vN=new class extends rN{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=fN(e,r)}else n=e.match(_N)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&bN(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&bN(n,i,r,null,t.intlSegmenter),e}};function yN(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?SN(e,t,n):vN.diff(e,t,n)}function bN(e,t,n,r,i){if(t&&n){let[a,o]=hN(t.value,i),[s,c]=hN(n.value,i);if(e){let r=iN(a,s);e.value=sN(e.value,s,r),t.value=cN(t.value,r),n.value=cN(n.value,r)}if(r){let e=aN(o,c);r.value=oN(r.value,c,e),t.value=lN(t.value,e),n.value=lN(n.value,e)}}else if(n){if(e){let e=mN(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=mN(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=mN(r.value,i),[a,o]=hN(t.value,i),s=iN(n,a);t.value=cN(t.value,s);let c=aN(cN(n,s),o);t.value=lN(t.value,c),r.value=oN(r.value,n,c),e.value=sN(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=mN(r.value,i),n=uN(pN(t.value,i),e);t.value=lN(t.value,n)}else if(e){let n=uN(pN(e.value,i),mN(t.value,i));t.value=cN(t.value,n)}}var xN=new class extends rN{tokenize(e){let t=RegExp(`(\\r?\\n)|[${gN}]+|[^\\S\\n\\r]+|[^${gN}]`,`ug`);return e.match(t)||[]}};function SN(e,t,n){return xN.diff(e,t,n)}new class extends rN{constructor(){super(...arguments),this.tokenize=CN}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
144
+ `+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $e(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-He(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&rt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function rt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-He(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function it(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-He(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function at(e,t){var n=t&-t;return n=n&42?1:ot(n),(n&(e.suspendedLanes|t))===0?n:0}function ot(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function st(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ct(){var e=A.p;return e===0?(e=window.event,e===void 0?32:wp(e.type)):e}function lt(e,t){var n=A.p;try{return A.p=e,t()}finally{A.p=n}}var ut=Math.random().toString(36).slice(2),dt=`__reactFiber$`+ut,ft=`__reactProps$`+ut,pt=`__reactContainer$`+ut,mt=`__reactEvents$`+ut,ht=`__reactListeners$`+ut,gt=`__reactHandles$`+ut,_t=`__reactResources$`+ut,vt=`__reactMarker$`+ut;function yt(e){delete e[dt],delete e[ft],delete e[mt],delete e[ht],delete e[gt]}function bt(e){var t=e[dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cf(e);e!==null;){if(n=e[dt])return n;e=Cf(e)}return t}e=n,n=e.parentNode}return null}function xt(e){if(e=e[dt]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function St(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ct(e){var t=e[_t];return t||=e[_t]={hoistableStyles:new Map,hoistableScripts:new Map},t}function wt(e){e[vt]=!0}var Tt=new Set,Et={};function Dt(e,t){Ot(e,t),Ot(e+`Capture`,t)}function Ot(e,t){for(Et[e]=t,e=0;e<t.length;e++)Tt.add(t[e])}var kt=RegExp(`^[: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]*$`),At={},jt={};function Mt(e){return Te.call(jt,e)?!0:Te.call(At,e)?!1:kt.test(e)?jt[e]=!0:(At[e]=!0,!1)}function Nt(e,t,n){if(Mt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Pt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ft(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function It(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Lt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Rt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zt(e){if(!e._valueTracker){var t=Lt(e)?`checked`:`value`;e._valueTracker=Rt(e,t,``+e[t])}}function Bt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Lt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Vt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ht=/[\n"\\]/g;function Ut(e){return e.replace(Ht,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Wt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+It(t)):e.value!==``+It(t)&&(e.value=``+It(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Kt(e,o,It(n)):Kt(e,o,It(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+It(s):e.removeAttribute(`name`)}function Gt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){zt(e);return}n=n==null?``:``+It(n),t=t==null?n:``+It(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),zt(e)}function Kt(e,t,n){t===`number`&&Vt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+It(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Jt(e,t,n){if(t!=null&&(t=``+It(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+It(n)}function Yt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=It(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),zt(e)}function Xt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function $t(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Qt(e,o,t[o])}function en(e){if(e.indexOf(`-`)===-1)return!1;switch(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!1;default:return!0}}var tn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),nn=/^[\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;function rn(e){return nn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function an(){}var on=null;function sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cn=null,ln=null;function un(e){var t=xt(e);if(t&&(e=t.stateNode)){var n=e[ft]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Wt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ut(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ft]||null;if(!a)throw Error(i(90));Wt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Bt(r)}break a;case`textarea`:Jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&qt(e,!!n.multiple,t,!1)}}}var dn=!1;function fn(e,t,n){if(dn)return e(t,n);dn=!0;try{return e(t)}finally{if(dn=!1,(cn!==null||ln!==null)&&(Au(),cn&&(t=cn,e=ln,ln=cn=null,un(t),e)))for(t=0;t<e.length;t++)un(e[t])}}function pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ft]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var mn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,hn=!1;if(mn)try{var gn={};Object.defineProperty(gn,"passive",{get:function(){hn=!0}}),window.addEventListener(`test`,gn,gn),window.removeEventListener(`test`,gn,gn)}catch{hn=!1}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return yn=i.slice(e,1<r?1-r:void 0)}function xn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Sn(){return!0}function Cn(){return!1}function wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Sn:Cn,this.isPropagationStopped=Cn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Sn)},persist:function(){},isPersistent:Sn}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},j=wn(Tn),En=f({},Tn,{view:0,detail:0}),Dn=wn(En),On,M,kn,N=f({},En,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==kn&&(kn&&e.type===`mousemove`?(On=e.screenX-kn.screenX,M=e.screenY-kn.screenY):M=On=0,kn=e),On)},movementY:function(e){return`movementY`in e?e.movementY:M}}),An=wn(N),jn=wn(f({},N,{dataTransfer:0})),Mn=wn(f({},En,{relatedTarget:0})),Nn=wn(f({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=wn(f({},Tn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=wn(f({},Tn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=wn(f({},En,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=xn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?xn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?xn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=wn(f({},N,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=wn(f({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=wn(f({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=wn(f({},N,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Kn=wn(f({},Tn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=mn&&`CompositionEvent`in window,Yn=null;mn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=mn&&`TextEvent`in window&&!Yn,Zn=mn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=bn(),yn=vn=_n=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){cn?ln?ln.push(r):ln=[r]:cn=r,t=Ld(t,`onChange`),0<t.length&&(n=new j(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){Ad(e,0)}function dr(e){if(Bt(St(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(mn){var mr;if(mn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,sn(e)),fn(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Te.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=mn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Vt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Ld(Nr,`onSelect`),0<r.length&&(t=new j(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};mn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),Dt(t,[e])}var Qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&oi(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-He(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<xu)throw xu=0,Su=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,n,r){return new li(e,t,n,r)}function di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var n=e.alternate;return n===null?(n=ui(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function pi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)di(e)&&(s=1);else if(typeof e==`string`)s=tp(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ui(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return hi(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ui(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ui(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ui(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ui(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function hi(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function gi(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function _i(e){var t=ui(18,null,null,0);return t.stateNode=e,t}function vi(e,t,n){return t=ui(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function bi(e,t){if(typeof e==`object`&&e){var n=yi.get(e);return n===void 0?(t={value:e,source:t,stack:we(t)},yi.set(e,t),t):n}return{value:e,source:t,stack:we(t)}}var xi=[],Si=0,Ci=null,wi=0,Ti=[],Ei=0,Di=null,Oi=1,ki=``;function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ci,Ci=e,wi=t}function ji(e,t,n){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Di=e;var r=Oi;e=ki;var i=32-He(r)-1;r&=~(1<<i),n+=1;var a=32-He(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Oi=1<<32-He(t)+i|n<<i|r,ki=a+e}else Oi=1<<a|n<<i|r,ki=e}function Mi(e){e.return!==null&&(Ai(e,1),ji(e,1,0))}function Ni(e){for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null;for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,ki=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null}function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Oi=t.id,ki=t.overflow,Di=e}var Fi=null,Ii=null,P=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[dt]=e,t[ft]=r,n){case`dialog`:z(`cancel`,t),z(`close`,t);break;case`iframe`:case`object`:case`embed`:z(`load`,t);break;case`video`:case`audio`:for(n=0;n<Od.length;n++)z(Od[n],t);break;case`source`:z(`error`,t);break;case`img`:case`image`:case`link`:z(`error`,t),z(`load`,t);break;case`details`:z(`toggle`,t);break;case`input`:z(`invalid`,t),Gt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:z(`invalid`,t);break;case`textarea`:z(`invalid`,t),Yt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ud(t.textContent,n)?(r.popover!=null&&(z(`beforetoggle`,t),z(`toggle`,t)),r.onScroll!=null&&z(`scroll`,t),r.onScrollEnd!=null&&z(`scrollend`,t),r.onClick!=null&&(t.onclick=an),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Fi=e.return;Fi;)switch(Fi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Fi=Fi.return}}function Ui(e){if(e!==Fi)return!1;if(!P)return Hi(e),P=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||tf(e.type,e.memoizedProps)),n=!n),n&&Ii&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=Sf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=Sf(e)}else t===27?(t=Ii,uf(e.type)?(e=xf,xf=null,Ii=e):Ii=t):Ii=Fi?bf(e.stateNode.nextSibling):null;return!0}function Wi(){Ii=Fi=null,P=!1}function Gi(){var e=Li;return e!==null&&(su===null?su=e:su.push.apply(su,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=se(null),Ji=null,Yi=null;function Xi(e,t,n){le(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,ce(qi)}function Qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function $i(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===pe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}a=a.return}e!==null&&$i(t,e,n,r),t.flags|=262144}function ta(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ra(e){return aa(Ji,e)}function ia(e,t){return Ji===null&&na(e),aa(e,t)}function aa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(i(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var oa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},sa=t.unstable_scheduleCallback,ca=t.unstable_NormalPriority,la={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ua(){return{controller:new oa,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&sa(ca,function(){e.controller.abort()})}var fa=null,pa=0,ma=0,ha=null;function ga(e,t){if(fa===null){var n=fa=[];pa=0,ma=Sd(),ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return pa++,t.then(_a,_a),t}function _a(){if(--pa===0&&fa!==null){ha!==null&&(ha.status=`fulfilled`);var e=fa;fa=null,ma=0,ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ya=k.S;k.S=function(e,t){uu=Ae(),typeof t==`object`&&t&&typeof t.then==`function`&&ga(e,t),ya!==null&&ya(e,t)};var ba=se(null);function xa(){var e=ba.current;return e===null?ql.pooledCache:e}function Sa(e,t){t===null?le(ba,ba.current):le(ba,t.pool)}function Ca(){var e=xa();return e===null?null:{parent:la._currentValue,pool:e}}var wa=Error(i(460)),Ta=Error(i(474)),Ea=Error(i(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(an,an),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(an,an);else{if(e=ql,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,wa}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,wa):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===wa||e===Ea)throw Error(i(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Aa(i)===t.type)?(t=a(t,n.props),La(t,n),t.return=e,t):(t=mi(n.type,n.key,n.props,null,e.mode,r),La(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=hi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=gi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=mi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case h:return t=vi(t,e.mode,n),t.return=e,t;case T:return t=Aa(t),f(e,t,n)}if(re(t)||ee(t))return t=hi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===b)return f(e,ia(e,t),n);Ra(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Aa(n),p(e,t,n,r)}if(re(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===b)return p(e,t,ia(e,n),r);Ra(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Aa(r),_(e,t,n,r,i)}if(re(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ia(r),i);if(r.$$typeof===b)return _(e,t,n,ia(t,r),i);Ra(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),P&&Ai(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return P&&Ai(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),P&&Ai(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),P&&Ai(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return P&&Ai(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),P&&Ai(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Aa(o),x(e,r,o,c)}if(re(o))return v(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ia(o),c);if(o.$$typeof===b)return x(e,r,ia(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=x(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ha;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(R&p)===p:(r&p)===p){p!==0&&p===ma&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ha=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),tu|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var eo=se(null),to=se(0);function no(e,t){e=$l,le(to,e),le(eo,t),$l=e|t.baseLanes}function ro(){le(to,$l),le(eo,eo.current)}function io(){$l=to.current,ce(eo),ce(to)}var ao=se(null),oo=null;function so(e){var t=e.alternate;le(po,po.current&1),le(ao,e),oo===null&&(t===null||eo.current!==null||t.memoizedState!==null)&&(oo=e)}function co(e){le(po,po.current),le(ao,e),oo===null&&(oo=e)}function lo(e){e.tag===22?(le(po,po.current),le(ao,e),oo===null&&(oo=e)):uo(e)}function uo(){le(po,po.current),le(ao,ao.current)}function fo(e){ce(ao),oo===e&&(oo=null),ce(po)}var po=se(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_f(n)||vf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,F=null,go=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function To(){throw Error(i(321))}function Eo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function Do(e,t,n,r,i,a){return ho=a,F=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Gs:Ks,bo=!1,a=n(r,i),bo=!1,yo&&(a=ko(t,n,r,i)),Oo(e),a}function Oo(e){k.H=Ws;var t=go!==null&&go.next!==null;if(ho=0,_o=go=F=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||lc||(e=e.dependencies,e!==null&&ta(e)&&(lc=!0))}function ko(e,t,n,r){F=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=go=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}k.H=qs,o=t(n,r)}while(yo);return o}function Ao(){var e=k.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(go===null?null:go.memoizedState)!==e&&(F.flags|=1024),t}function jo(){var e=xo!==0;return xo=0,e}function Mo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function No(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}ho=0,_o=go=F=null,yo=!1,So=xo=0,Co=null}function Po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?F.memoizedState=_o=e:_o=_o.next=e,_o}function Fo(){if(go===null){var e=F.alternate;e=e===null?null:e.memoizedState}else e=go.next;var t=_o===null?F.memoizedState:_o.next;if(t!==null)_o=t,go=e;else{if(e===null)throw F.alternate===null?Error(i(467)):Error(i(310));go=e,e={memoizedState:go.memoizedState,baseState:go.baseState,baseQueue:go.baseQueue,queue:go.queue,next:null},_o===null?F.memoizedState=_o=e:_o=_o.next=e}return _o}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=ka(Co,e,t),t=F,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Gs:Ks),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===b)return ra(e)}throw Error(i(438,String(e)))}function zo(e){var t=null,n=F.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=F.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Io(),F.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(Fo(),go,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(R&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ma&&(d=!0);else if((ho&p)===p){u=u.next,p===ma&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,F.lanes|=p,tu|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,F.lanes|=f,tu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(lc=!0,d&&(n=ha,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=Fo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);wr(o,t.memoizedState)||(lc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=F,a=Fo(),o=P;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!wr((go||a).memoizedState,n);if(s&&(a.memoizedState=n,lc=!0),a=a.queue,gs(qo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,ds(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),ql===null)throw Error(i(349));o||ho&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=F.updateQueue,t===null?(t=Io(),F.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Yo(e){var t=ai(e,2);t!==null&&Tu(t,e,2)}function Xo(e){var t=Po();if(typeof e==`function`){var n=e;if(e=n(),bo){Ve(!0);try{n()}finally{Ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,go,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,a){if(Vs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};k.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=k.T,o={};k.T=o;try{var s=n(i,r),c=k.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),k.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(P){var n=ql.formState;if(n!==null){a:{var r=F;if(P){if(Ii){b:{for(var i=Ii,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=bf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ii=bf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=Po(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Rs.bind(null,F,r),r.dispatch=n,r=Xo(!1),a=Bs.bind(null,F,!1,r.queue),r=Po(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,F,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ss(e){return cs(Fo(),go,e)}function cs(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===wa?Ea:e}else r=t;t=Fo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(F.flags|=2048,ds(9,{destroy:void 0},ls.bind(null,i,n),null)),[r,a,e]}function ls(e,t){e.action=t}function us(e){var t=Fo(),n=go;if(n!==null)return cs(t,n,e);Fo(),t=t.memoizedState,n=Fo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=F.updateQueue,t===null&&(t=Io(),F.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function fs(){return Fo().memoizedState}function ps(e,t,n,r){var i=Po();F.flags|=e,i.memoizedState=ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var i=Fo();r=r===void 0?null:r;var a=i.memoizedState.inst;go!==null&&r!==null&&Eo(r,go.memoizedState.deps)?i.memoizedState=ds(t,a,n,r):(F.flags|=e,i.memoizedState=ds(1|t,a,n,r))}function hs(e,t){ps(8390656,8,e,t)}function gs(e,t){ms(2048,8,e,t)}function _s(e){F.flags|=4;var t=F.updateQueue;if(t===null)t=Io(),F.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vs(e){var t=Fo().memoizedState;return _s({ref:t,nextImpl:e}),function(){if(Kl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ys(e,t){return ms(4,2,e,t)}function bs(e,t){return ms(4,4,e,t)}function xs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ss(e,t,n){n=n==null?null:n.concat([e]),ms(4,4,xs.bind(null,t,e),n)}function Cs(){}function ws(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ts(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Eo(t,r[1]))return r[0];if(r=e(),bo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r}function Es(e,t,n){return n===void 0||ho&1073741824&&!(R&261930)?e.memoizedState=t:(e.memoizedState=n,e=wu(),F.lanes|=e,tu|=e,n)}function Ds(e,t,n,r){return wr(n,t)?n:eo.current===null?!(ho&42)||ho&1073741824&&!(R&261930)?(lc=!0,e.memoizedState=n):(e=wu(),F.lanes|=e,tu|=e,t):(e=Es(e,n,r),wr(e,t)||(lc=!0),e)}function Os(e,t,n,r,i){var a=A.p;A.p=a!==0&&8>a?a:8;var o=k.T,s={};k.T=s,Bs(e,!1,t,n);try{var c=i(),l=k.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,va(c,r),Cu(e)):zs(e,t,r,Cu(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},Cu())}finally{A.p=a,o!==null&&s.types!==null&&(o.types=s.types),k.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=js(e).queue;Os(e,a,t,ie,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},Cu())}function Ns(){return ra(up)}function Ps(){return Fo().memoizedState}function Fs(){return Fo().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Cu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(Tu(r,t,n),qa(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=Cu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=ii(e,t,n,r),n!==null&&(Tu(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,Cu())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),ql===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Tu(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Tu(t,e,2)}function Vs(e){var t=e.alternate;return e===F||t!==null&&t===F}function Hs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var Ws={readContext:ra,use:Ro,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To};Ws.useEffectEvent=To;var Gs={readContext:ra,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(bo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(bo){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ls.bind(null,F,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Rs.bind(null,F,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Po(),e,t)},useTransition:function(){var e=Xo(!1);return e=Os.bind(null,F,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=F,a=Po();if(P){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));R&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(qo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Po(),t=ql.identifierPrefix;if(P){var n=ki,r=Oi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ns,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Po();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Bs.bind(null,F,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Po().memoizedState=Is.bind(null,F)},useEffectEvent:function(e){var t=Po(),n={impl:e};return t.memoizedState=n,function(){if(Kl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:ra,use:Ro,useCallback:ws,useContext:ra,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Vo,useRef:fs,useState:function(){return Vo(Bo)},useDebugValue:Cs,useDeferredValue:function(e,t){return Ds(Fo(),go.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ps,useHostTransitionStatus:Ns,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){return Zo(Fo(),go,e,t)},useMemoCache:zo,useCacheRefresh:Fs};Ks.useEffectEvent=vs;var qs={readContext:ra,use:Ro,useCallback:ws,useContext:ra,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Uo,useRef:fs,useState:function(){return Uo(Bo)},useDebugValue:Cs,useDeferredValue:function(e,t){var n=Fo();return go===null?Es(n,e,t):Ds(n,go.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ps,useHostTransitionStatus:Ns,useFormState:us,useActionState:us,useOptimistic:function(e,t){var n=Fo();return go===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,go,e,t)},useMemoCache:zo,useCacheRefresh:Fs};qs.useEffectEvent=vs;function Js(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ys={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Tu(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Tu(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Cu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(Tu(t,e,n),qa(t,e,n))}};function Xs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Zs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ys.enqueueReplaceState(t,t.state,null)}function Qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function $s(e){Qr(e)}function ec(e){console.error(e)}function tc(e){Qr(e)}function nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ic(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){nc(e,t)},n}function ac(e){return e=Ga(e),e.tag=3,e}function oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){rc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){rc(t,n,r),typeof i!=`function`&&(pu===null?pu=new Set([this]):pu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function sc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ea(t,n,a,!0),n=ao.current,n!==null){switch(n.tag){case 31:case 13:return oo===null?Lu():n.alternate===null&&eu===0&&(eu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),nd(e,r,a)),!1;case 22:return n.flags|=65536,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),nd(e,r,a)),!1}throw Error(i(435,n.tag))}return nd(e,r,a),Lu(),!1}if(P)return t=ao.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=bi(r,n),a=ic(e.stateNode,r,a),Ja(e,a),eu!==4&&(eu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=bi(o,n),ou===null?ou=[o]:ou.push(o),eu!==4&&(eu=2),t===null)return!0;r=bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ic(n.stateNode,r,e),Ja(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(pu===null||!pu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ac(a),oc(a,e,n,r),Ja(n,a),!1}n=n.return}while(n!==null);return!1}var cc=Error(i(461)),lc=!1;function uc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function dc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return na(t),r=Do(e,t,n,o,a,i),s=jo(),e!==null&&!lc?(Mo(e,t,i),Fc(e,t,i)):(P&&s&&Mi(t),t.flags|=1,uc(e,t,r,i),t.child)}function fc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,pc(e,t,a,r,i)):(e=mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ic(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Fc(e,t,i)}return t.flags|=1,e=fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function pc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref){if(lc=!1,t.pendingProps=r=a,Ic(e,i))e.flags&131072&&(lc=!0);else return t.lanes=e.lanes,Fc(e,t,i)}}return xc(e,t,n,r,i)}function mc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return gc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sa(t,a===null?null:a.cachePool),a===null?ro():no(t,a),lo(t);else return r=t.lanes=536870912,gc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Sa(t,null),ro(),uo(t)):(Sa(t,a.cachePool),no(t,a),uo(t),t.memoizedState=null);return uc(e,t,i,n),t.child}function hc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gc(e,t,n,r,i){var a=xa();return a=a===null?null:{parent:la._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Sa(t,null),ro(),lo(t),e!==null&&ea(e,t,r,!0),t.childLanes=i,null}function _c(e,t){return t=Ac({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vc(e,t,n){return Ba(t,e.child,null,n),e=_c(t,t.pendingProps),e.flags|=2,fo(t),t.memoizedState=null,e}function yc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(P){if(r.mode===`hidden`)return e=_c(t,r),t.lanes=536870912,hc(null,e);if(co(t),(e=Ii)?(e=gf(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return _c(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(co(t),a){if(t.flags&256)t.flags&=-257,t=vc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(lc||ea(e,t,n,!1),a=(n&e.childLanes)!==0,lc||a){if(r=ql,r!==null&&(s=at(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),Tu(r,e,s),cc;Lu(),t=vc(e,t,n)}else e=o.treeContext,Ii=bf(s.nextSibling),Fi=t,P=!0,Li=null,Ri=!1,e!==null&&Pi(t,e),t=_c(t,r),t.flags|=4096;return t}return e=fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function bc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xc(e,t,n,r,i){return na(t),n=Do(e,t,n,r,void 0,i),r=jo(),e!==null&&!lc?(Mo(e,t,i),Fc(e,t,i)):(P&&r&&Mi(t),t.flags|=1,uc(e,t,n,i),t.child)}function Sc(e,t,n,r,i,a){return na(t),t.updateQueue=null,n=ko(t,r,n,i),Oo(e),r=jo(),e!==null&&!lc?(Mo(e,t,a),Fc(e,t,a)):(P&&r&&Mi(t),t.flags|=1,uc(e,t,n,a),t.child)}function Cc(e,t,n,r,i){if(na(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=ra(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ys,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ra(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Js(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ys.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=ra(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Zs(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Js(t,n,d,r),l=t.memoizedState),(c=Ha||Xs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=ra(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Zs(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&ta(e.dependencies)?(typeof s==`function`&&(Js(t,n,s,r),p=t.memoizedState),(u=Ha||Xs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ta(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,bc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):uc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Fc(e,t,i),e}function wc(e,t,n,r){return Wi(),t.flags|=256,uc(e,t,n,r),t.child}var Tc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(e){return{baseLanes:e,cachePool:Ca()}}function Dc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=iu),e}function Oc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(po.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(P){if(a?so(t):uo(t),(e=Ii)?(e=gf(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Bi(t);return vf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(uo(t),a=t.mode,c=Ac({mode:`hidden`,children:c},a),r=hi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Ec(n),r.childLanes=Dc(e,s,n),t.memoizedState=Tc,hc(null,r)):(so(t),kc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(so(t),t.flags&=-257,t=jc(e,t,n)):t.memoizedState===null?(uo(t),c=r.fallback,a=t.mode,r=Ac({mode:`visible`,children:r.children},a),c=hi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=Ec(n),r.childLanes=Dc(e,s,n),t.memoizedState=Tc,t=hc(null,r)):(uo(t),t.child=e.child,t.flags|=128,t=null);else if(so(t),vf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=jc(e,t,n)}else if(lc||ea(e,t,n,!1),s=(n&e.childLanes)!==0,lc||s){if(s=ql,s!==null&&(r=at(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),Tu(s,e,r),cc;_f(c)||Lu(),t=jc(e,t,n)}else _f(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ii=bf(c.nextSibling),Fi=t,P=!0,Li=null,Ri=!1,e!==null&&Pi(t,e),t=kc(t,r.children),t.flags|=4096);return t}return a?(uo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=fi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=hi(c,a,n,null),c.flags|=2):c=fi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,hc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Ec(n):(a=c.cachePool,a===null?a=Ca():(l=la._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Dc(e,s,n),t.memoizedState=Tc,hc(e.child,r)):(so(t),n=e.child,e=n.sibling,n=fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function kc(e,t){return t=Ac({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ac(e,t){return e=ui(22,e,null,t),e.lanes=0,e}function jc(e,t,n){return Ba(t,e.child,null,n),e=kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function Nc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Pc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=po.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,le(po,o),uc(e,t,r,n),r=P?wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mc(e,n,t);else if(e.tag===19)Mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Nc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Nc(t,!0,n,null,a,r);break;case`together`:Nc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Fc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tu|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ic(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ta(e)))}function Lc(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),Xi(t,la,e.memoizedState.cache),Wi();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(so(t),e=Fc(e,t,n),e===null?null:e.sibling):Oc(e,t,n):(so(t),t.flags|=128,null);so(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Pc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),le(po,po.current),r)break;return null;case 22:return t.lanes=0,mc(e,t,n,t.pendingProps);case 24:Xi(t,la,e.memoizedState.cache)}return Fc(e,t,n)}function Rc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)lc=!0;else{if(!Ic(e,n)&&!(t.flags&128))return lc=!1,Lc(e,t,n);lc=!!(e.flags&131072)}}else lc=!1,P&&t.flags&1048576&&ji(t,wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)di(e)?(r=Qs(e,r),t.tag=1,t=Cc(null,t,e,r,n)):(t.tag=0,t=xc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=dc(null,t,e,r,n);break a}if(a===w){t.tag=14,t=fc(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return xc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Qs(r,t.pendingProps),Cc(e,t,r,a,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,la,r),r!==o.cache&&$i(t,[la],n,!0),Xa(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=wc(e,t,r,n);break a}if(r!==a){a=bi(Error(i(424)),t),Ki(a),t=wc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ii=bf(e.firstChild),Fi=t,P=!0,Li=null,Ri=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Fc(e,t,n);break a}uc(e,t,r,n)}t=t.child}return t;case 26:return bc(e,t),e===null?(n=Vf(t.type,null,t.pendingProps,null))?t.memoizedState=n:P||(n=t.type,e=t.pendingProps,r=Qd(fe.current).createElement(n),r[dt]=t,r[ft]=e,Kd(r,n,e),wt(r),t.stateNode=r):t.memoizedState=Vf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&P&&(r=t.stateNode=wf(t.type,t.pendingProps,fe.current),Fi=t,Ri=!0,a=Ii,uf(t.type)?(xf=a,Ii=bf(r.firstChild)):Ii=a),uc(e,t,t.pendingProps.children,n),bc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&P&&((a=r=Ii)&&(r=mf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Fi=t,Ii=bf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),ge(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,tf(a,o)?r=null:s!==null&&tf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Do(e,t,Ao,null,null,n),up._currentValue=a),bc(e,t),uc(e,t,r,n),t.child;case 6:return e===null&&P&&((e=n=Ii)&&(n=hf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Fi=t,Ii=null,e=!0)),e||Bi(t)),null;case 13:return Oc(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):uc(e,t,r,n),t.child;case 11:return dc(e,t,t.type,t.pendingProps,n);case 7:return uc(e,t,t.pendingProps,n),t.child;case 8:return uc(e,t,t.pendingProps.children,n),t.child;case 12:return uc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),uc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,na(t),a=ra(a),r=r(a),t.flags|=1,uc(e,t,r,n),t.child;case 14:return fc(e,t,t.type,t.pendingProps,n);case 15:return pc(e,t,t.type,t.pendingProps,n);case 19:return Pc(e,t,n);case 31:return yc(e,t,n);case 22:return mc(e,t,n,t.pendingProps);case 24:return na(t),r=ra(la),e===null?(a=xa(),a===null&&(a=ql,o=ua(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Xi(t,la,a)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Xi(t,la,r),r!==a.cache&&$i(t,[la],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Xi(t,la,r))),uc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function zc(e){e.flags|=4}function Bc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Pu())e.flags|=8192;else throw ja=Da,Ta}}else e.flags&=-16777217}function Vc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!np(t)){if(Pu())e.flags|=8192;else throw ja=Da,Ta}}function Hc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:$e(),e.lanes|=t,au|=t)}function Uc(e,t){if(!P)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Wc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gc(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wc(t),null;case 1:return Wc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(la),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?zc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),Wc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(zc(t),o===null?(Wc(t),Bc(t,a,null,r,n)):(Wc(t),Vc(t,o))):o?o===e.memoizedState?(Wc(t),t.flags&=-16777217):(zc(t),Wc(t),Vc(t,o)):(e=e.memoizedProps,e!==r&&zc(t),Wc(t),Bc(t,a,e,r,n)),null;case 27:if(_e(t),n=fe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Wc(t),null}e=ue.current,Ui(t)?Vi(t,e):(e=wf(a,r,n),t.stateNode=e,zc(t))}return Wc(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Wc(t),null}if(o=ue.current,Ui(t))Vi(t,o);else{var s=Qd(fe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[dt]=t,o[ft]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&zc(t)}}return Wc(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Bi(t,!0)}else e=Qd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return Wc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[dt]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(i(558))}return Wc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[dt]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Hc(t,t.updateQueue),Wc(t),null);case 4:return he(),e===null&&Nd(t.stateNode.containerInfo),Wc(t),null;case 10:return Zi(t.type),Wc(t),null;case 19:if(ce(po),r=t.memoizedState,r===null)return Wc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Uc(r,!1);else{if(eu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,Uc(r,!1),e=o.updateQueue,t.updateQueue=e,Hc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return le(po,po.current&1|2),P&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>du&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Hc(t,e),Uc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!P)return Wc(t),null}else 2*Ae()-r.renderingStartTime>du&&n!==536870912&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Wc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=po.current,le(po,a?n&1|2:n&1),P&&Ai(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Wc(t),t.subtreeFlags&6&&(t.flags|=8192)):Wc(t),n=t.updateQueue,n!==null&&Hc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ce(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(la),Wc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Kc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(la),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(po),null;case 4:return he(),null;case 10:return Zi(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&ce(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(la),null;case 25:return null;default:return null}}function qc(e,t){switch(Ni(t),t.tag){case 3:Zi(la),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:ce(po);break;case 10:Zi(t.type);break;case 22:case 23:fo(t),io(),e!==null&&ce(ba);break;case 24:Zi(la)}}function Jc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){td(t,t.return,e)}}function Yc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){td(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){td(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){td(e,e.return,t)}}}function Zc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){td(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){td(e,t,n)}}function $c(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){td(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){td(e,t,n)}else n.current=null}}function el(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){td(e,e.return,t)}}function tl(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[ft]=t}catch(t){td(e,e.return,t)}}function nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=an));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[dt]=e,t[ft]=n}catch(t){td(e,e.return,t)}}var sl=!1,cl=!1,ll=!1,ul=typeof WeakSet==`function`?WeakSet:Set,dl=null;function fl(e,t){if(e=e.containerInfo,Xd=yp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},yp=!1,dl=t;dl!==null;)if(t=dl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,dl=e;else for(;dl!==null;){switch(t=dl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){td(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:pf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,dl=e;break}dl=t.return}}function pl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ol(e,n),r&4&&Jc(5,n);break;case 1:if(Ol(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){td(n,n.return,e)}else{var i=Qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){td(n,n.return,e)}}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Ol(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{$a(e,t)}catch(e){td(n,n.return,e)}}break;case 27:t===null&&r&4&&ol(n);case 26:case 5:Ol(e,n),t===null&&r&4&&el(n),r&512&&Qc(n,n.return);break;case 12:Ol(e,n);break;case 31:Ol(e,n),r&4&&yl(e,n);break;case 13:Ol(e,n),r&4&&bl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ad.bind(null,n),yf(e,n))));break;case 22:if(r=n.memoizedState!==null||sl,!r){t=t!==null&&t.memoizedState!==null||cl,i=sl;var a=cl;sl=r,(cl=t)&&!a?Al(e,n,!!(n.subtreeFlags&8772)):Ol(e,n),sl=i,cl=a}break;case 30:break;default:Ol(e,n)}}function ml(e){var t=e.alternate;t!==null&&(e.alternate=null,ml(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var hl=null,gl=!1;function _l(e,t,n){for(n=n.child;n!==null;)vl(e,t,n),n=n.sibling}function vl(e,t,n){if(Be&&typeof Be.onCommitFiberUnmount==`function`)try{Be.onCommitFiberUnmount(ze,n)}catch{}switch(n.tag){case 26:cl||$c(n,t),_l(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:cl||$c(n,t);var r=hl,i=gl;uf(n.type)&&(hl=n.stateNode,gl=!1),_l(e,t,n),Tf(n.stateNode),hl=r,gl=i;break;case 5:cl||$c(n,t);case 6:if(r=hl,i=gl,hl=null,_l(e,t,n),hl=r,gl=i,hl!==null){if(gl)try{(hl.nodeType===9?hl.body:hl.nodeName===`HTML`?hl.ownerDocument.body:hl).removeChild(n.stateNode)}catch(e){td(n,t,e)}else try{hl.removeChild(n.stateNode)}catch(e){td(n,t,e)}}break;case 18:hl!==null&&(gl?(e=hl,df(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Up(e)):df(hl,n.stateNode));break;case 4:r=hl,i=gl,hl=n.stateNode.containerInfo,gl=!0,_l(e,t,n),hl=r,gl=i;break;case 0:case 11:case 14:case 15:Yc(2,n,t),cl||Yc(4,n,t),_l(e,t,n);break;case 1:cl||($c(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),_l(e,t,n);break;case 21:_l(e,t,n);break;case 22:cl=(r=cl)||n.memoizedState!==null,_l(e,t,n),cl=r;break;default:_l(e,t,n)}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Up(e)}catch(e){td(t,t.return,e)}}}function bl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Up(e)}catch(e){td(t,t.return,e)}}function xl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ul),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ul),t;default:throw Error(i(435,e.tag))}}function Sl(e,t){var n=xl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=od.bind(null,e,t);t.then(r,r)}})}function Cl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(uf(c.type)){hl=c.stateNode,gl=!1;break a}break;case 5:hl=c.stateNode,gl=!1;break a;case 3:case 4:hl=c.stateNode.containerInfo,gl=!0;break a}c=c.return}if(hl===null)throw Error(i(160));vl(o,s,a),hl=null,gl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tl(t,e),t=t.sibling}var wl=null;function Tl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Cl(t,e),El(e),r&4&&(Yc(3,e,e.return),Jc(3,e),Yc(5,e,e.return));break;case 1:Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),r&64&&sl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=wl;if(Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[vt]||o[dt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Kd(o,r,n),o[dt]=e,wt(o),r=o;break a;case`link`:var s=$f(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Kd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=$f(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Kd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[dt]=e,wt(o),r=o}e.stateNode=r}else ep(a,e.type,e.stateNode)}else e.stateNode=Jf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&tl(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?ep(a,e.type,e.stateNode):Jf(a,r,e.memoizedProps))}break;case 27:Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),n!==null&&r&4&&tl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),e.flags&32){a=e.stateNode;try{Xt(a,``)}catch(t){td(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,tl(e,a,n===null?a:n.memoizedProps)),r&1024&&(ll=!0);break;case 6:if(Cl(t,e),El(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){td(e,e.return,t)}}break;case 3:if(Qf=null,a=wl,wl=Of(t.containerInfo),Cl(t,e),wl=a,El(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Up(t.containerInfo)}catch(t){td(e,e.return,t)}ll&&(ll=!1,Dl(e));break;case 4:r=wl,wl=Of(e.stateNode.containerInfo),Cl(t,e),El(e),wl=r;break;case 12:Cl(t,e),El(e);break;case 31:Cl(t,e),El(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 13:Cl(t,e),El(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lu=Ae()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=sl,d=cl;if(sl=u||a,cl=d||l,Cl(t,e),cl=d,sl=u,El(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||sl||cl||kl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){td(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){td(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ff(m,!0):ff(l.stateNode,!1)}catch(e){td(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Sl(e,n))));break;case 19:Cl(t,e),El(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 30:break;case 21:break;default:Cl(t,e),El(e)}}function El(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(nl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;al(e,rl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Xt(o,``),n.flags&=-33),al(e,rl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;il(e,rl(e),s);break;default:throw Error(i(161))}}catch(t){td(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pl(e,t.alternate,t),t=t.sibling}function kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Yc(4,t,t.return),kl(t);break;case 1:$c(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),kl(t);break;case 27:Tf(t.stateNode);case 26:case 5:$c(t,t.return),kl(t);break;case 22:t.memoizedState===null&&kl(t);break;case 30:kl(t);break;default:kl(t)}e=e.sibling}}function Al(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Al(i,a,n),Jc(4,a);break;case 1:if(Al(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){td(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){td(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:ol(a);case 26:case 5:Al(i,a,n),n&&r===null&&o&4&&el(a),Qc(a,a.return);break;case 12:Al(i,a,n);break;case 31:Al(i,a,n),n&&o&4&&yl(i,a);break;case 13:Al(i,a,n),n&&o&4&&bl(i,a);break;case 22:a.memoizedState===null&&Al(i,a,n),Qc(a,a.return);break;case 30:break;default:Al(i,a,n)}t=t.sibling}}function jl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&da(n))}function Ml(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function Nl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pl(e,t,n,r),t=t.sibling}function Pl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Nl(e,t,n,r),i&2048&&Jc(9,t);break;case 1:Nl(e,t,n,r);break;case 3:Nl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e)));break;case 12:if(i&2048){Nl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){td(t,t.return,e)}}else Nl(e,t,n,r);break;case 31:Nl(e,t,n,r);break;case 13:Nl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Nl(e,t,n,r):(a._visibility|=2,Fl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Nl(e,t,n,r):Il(e,t),i&2048&&jl(o,t);break;case 24:Nl(e,t,n,r),i&2048&&Ml(t.alternate,t);break;default:Nl(e,t,n,r)}}function Fl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Fl(a,o,s,c,i),Jc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Fl(a,o,s,c,i)):u._visibility&2?Fl(a,o,s,c,i):Il(a,o),i&&l&2048&&jl(o.alternate,o);break;case 24:Fl(a,o,s,c,i),i&&l&2048&&Ml(o.alternate,o);break;default:Fl(a,o,s,c,i)}t=t.sibling}}function Il(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Il(n,r),i&2048&&jl(r.alternate,r);break;case 24:Il(n,r),i&2048&&Ml(r.alternate,r);break;default:Il(n,r)}t=t.sibling}}var Ll=8192;function Rl(e,t,n){if(e.subtreeFlags&Ll)for(e=e.child;e!==null;)zl(e,t,n),e=e.sibling}function zl(e,t,n){switch(e.tag){case 26:Rl(e,t,n),e.flags&Ll&&e.memoizedState!==null&&rp(n,wl,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,n);break;case 3:case 4:var r=wl;wl=Of(e.stateNode.containerInfo),Rl(e,t,n),wl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ll,Ll=16777216,Rl(e,t,n),Ll=r):Rl(e,t,n));break;default:Rl(e,t,n)}}function Bl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];dl=r,Wl(r,e)}Bl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hl(e),e=e.sibling}function Hl(e){switch(e.tag){case 0:case 11:case 15:Vl(e),e.flags&2048&&Yc(9,e,e.return);break;case 3:Vl(e);break;case 12:Vl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ul(e)):Vl(e);break;default:Vl(e)}}function Ul(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];dl=r,Wl(r,e)}Bl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yc(8,t,t.return),Ul(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ul(t));break;default:Ul(t)}e=e.sibling}}function Wl(e,t){for(;dl!==null;){var n=dl;switch(n.tag){case 0:case 11:case 15:Yc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,dl=r;else a:for(n=e;dl!==null;){r=dl;var i=r.sibling,a=r.return;if(ml(r),r===n){dl=null;break a}if(i!==null){i.return=a,dl=i;break a}dl=a}}}var Gl={getCacheForType:function(e){var t=ra(la),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ra(la).controller.signal}},I=typeof WeakMap==`function`?WeakMap:Map,Kl=0,ql=null,L=null,R=0,Jl=0,Yl=null,Xl=!1,Zl=!1,Ql=!1,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=null,su=null,cu=!1,lu=0,uu=0,du=1/0,fu=null,pu=null,mu=0,hu=null,gu=null,_u=0,vu=0,yu=null,bu=null,xu=0,Su=null;function Cu(){return Kl&2&&R!==0?R&-R:k.T===null?ct():Sd()}function wu(){if(iu===0){if(!(R&536870912)||P){var e=qe;qe<<=1,!(qe&3932160)&&(qe=262144),iu=e}else iu=536870912}return e=ao.current,e!==null&&(e.flags|=32),iu}function Tu(e,t,n){(e===ql&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)&&(Mu(e,0),ku(e,R,iu,!1)),tt(e,n),(!(Kl&2)||e!==ql)&&(e===ql&&(!(Kl&2)&&(nu|=n),eu===4&&ku(e,R,iu,!1)),md(e))}function Eu(e,t,n){if(Kl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ze(e,t),a=r?Bu(e,t):Ru(e,t,!0),o=r;do{if(a===0){Zl&&!r&&ku(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ou(n)){a=Ru(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ou;var l=c.current.memoizedState.isDehydrated;if(l&&(Mu(c,s).flags|=256),s=Ru(c,s,!1),s!==2){if(Ql&&!l){c.errorRecoveryDisabledLanes|=o,nu|=o,a=4;break a}o=su,su=a,o!==null&&(su===null?su=o:su.push.apply(su,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Mu(e,0),ku(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:ku(r,t,iu,!Xl);break a;case 2:su=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=lu+300-Ae(),10<a)){if(ku(r,t,iu,!Xl),Xe(r,0,!0)!==0)break a;_u=t,r.timeoutHandle=af(Du.bind(null,r,n,su,fu,cu,t,iu,nu,au,Xl,o,`Throttled`,-0,0),a);break a}Du(r,n,su,fu,cu,t,iu,nu,au,Xl,o,null,-0,0)}break}while(1);md(e)}function Du(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:an},zl(t,a,d);var m=(a&62914560)===a?lu-Ae():(a&4194048)===a?uu-Ae():0;if(m=ap(d,m),m!==null){_u=a,e.cancelPendingCommit=m(qu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ku(e,a,o,!l);return}}qu(e,t,a,n,r,i,o,s,c)}function Ou(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ku(e,t,n,r){t&=~ru,t&=~nu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-He(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&rt(e,n,t)}function Au(){return Kl&6?!0:(hd(0,!1),!1)}function ju(){if(L!==null){if(Jl===0)var e=L.return;else e=L,Yi=Ji=null,No(e),Pa=null,Fa=0,e=L;for(;e!==null;)qc(e.alternate,e),e=e.return;L=null}}function Mu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,of(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),_u=0,ju(),ql=e,L=n=fi(e.current,null),R=t,Jl=0,Yl=null,Xl=!1,Zl=Ze(e,t),Ql=!1,au=iu=ru=nu=tu=eu=0,su=ou=null,cu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-He(r),a=1<<i;t|=e[i],r&=~a}return $l=t,ni(),n}function Nu(e,t){F=null,k.H=Ws,t===wa||t===Ea?(t=Ma(),Jl=3):t===Ta?(t=Ma(),Jl=4):Jl=t===cc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Yl=t,L===null&&(eu=1,nc(e,bi(t,e.current)))}function Pu(){var e=ao.current;return e===null?!0:(R&4194048)===R?oo===null:(R&62914560)===R||R&536870912?e===oo:!1}function Fu(){var e=k.H;return k.H=Ws,e===null?Ws:e}function Iu(){var e=k.A;return k.A=Gl,e}function Lu(){eu=4,Xl||(R&4194048)!==R&&ao.current!==null||(Zl=!0),!(tu&134217727)&&!(nu&134217727)||ql===null||ku(ql,R,iu,!1)}function Ru(e,t,n){var r=Kl;Kl|=2;var i=Fu(),a=Iu();(ql!==e||R!==t)&&(fu=null,Mu(e,t)),t=!1;var o=eu;a:do try{if(Jl!==0&&L!==null){var s=L,c=Yl;switch(Jl){case 8:ju(),o=6;break a;case 3:case 2:case 9:case 6:ao.current===null&&(t=!0);var l=Jl;if(Jl=0,Yl=null,Wu(e,s,c,l),n&&Zl){o=0;break a}break;default:l=Jl,Jl=0,Yl=null,Wu(e,s,c,l)}}zu(),o=eu;break}catch(t){Nu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,Kl=r,k.H=i,k.A=a,L===null&&(ql=null,R=0,ni()),o}function zu(){for(;L!==null;)Hu(L)}function Bu(e,t){var n=Kl;Kl|=2;var r=Fu(),a=Iu();ql!==e||R!==t?(fu=null,du=Ae()+500,Mu(e,t)):Zl=Ze(e,t);a:do try{if(Jl!==0&&L!==null){t=L;var o=Yl;b:switch(Jl){case 1:Jl=0,Yl=null,Wu(e,t,o,1);break;case 2:case 9:if(Oa(o)){Jl=0,Yl=null,Uu(t);break}t=function(){Jl!==2&&Jl!==9||ql!==e||(Jl=7),md(e)},o.then(t,t);break a;case 3:Jl=7;break a;case 4:Jl=5;break a;case 7:Oa(o)?(Jl=0,Yl=null,Uu(t)):(Jl=0,Yl=null,Wu(e,t,o,7));break;case 5:var s=null;switch(L.tag){case 26:s=L.memoizedState;case 5:case 27:var c=L;if(s?np(s):c.stateNode.complete){Jl=0,Yl=null;var l=c.sibling;if(l!==null)L=l;else{var u=c.return;u===null?L=null:(L=u,Gu(u))}break b}}Jl=0,Yl=null,Wu(e,t,o,5);break;case 6:Jl=0,Yl=null,Wu(e,t,o,6);break;case 8:ju(),eu=6;break a;default:throw Error(i(462))}}Vu();break}catch(t){Nu(e,t)}while(1);return Yi=Ji=null,k.H=r,k.A=a,Kl=n,L===null?(ql=null,R=0,ni(),eu):0}function Vu(){for(;L!==null&&!Oe();)Hu(L)}function Hu(e){var t=Rc(e.alternate,e,$l);e.memoizedProps=e.pendingProps,t===null?Gu(e):L=t}function Uu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Sc(n,t,t.pendingProps,t.type,void 0,R);break;case 11:t=Sc(n,t,t.pendingProps,t.type.render,t.ref,R);break;case 5:No(t);default:qc(n,t),t=L=pi(t,$l),t=Rc(n,t,$l)}e.memoizedProps=e.pendingProps,t===null?Gu(e):L=t}function Wu(e,t,n,r){Yi=Ji=null,No(t),Pa=null,Fa=0;var i=t.return;try{if(sc(e,i,t,n,R)){eu=1,nc(e,bi(n,e.current)),L=null;return}}catch(t){if(i!==null)throw L=i,t;eu=1,nc(e,bi(n,e.current)),L=null;return}t.flags&32768?(P||r===1?e=!0:Zl||R&536870912?e=!1:(Xl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ku(t,e)):Gu(t)}function Gu(e){var t=e;do{if(t.flags&32768){Ku(t,Xl);return}e=t.return;var n=Gc(t.alternate,t,$l);if(n!==null){L=n;return}if(t=t.sibling,t!==null){L=t;return}L=t=e}while(t!==null);eu===0&&(eu=5)}function Ku(e,t){do{var n=Kc(e.alternate,e);if(n!==null){n.flags&=32767,L=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){L=e;return}L=e=n}while(e!==null);eu=6,L=null}function qu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Qu();while(mu!==0);if(Kl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ti,nt(e,n,o,s,c,l),e===ql&&(L=ql=null,R=0),gu=t,hu=e,_u=n,vu=o,yu=a,bu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sd(Pe,function(){return $u(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=k.T,k.T=null,a=A.p,A.p=2,s=Kl,Kl|=4;try{fl(e,t,n)}finally{Kl=s,A.p=a,k.T=r}}mu=1,Ju(),Yu(),Xu()}}function Ju(){if(mu===1){mu=0;var e=hu,t=gu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=Kl;Kl|=4;try{Tl(t,e);var a=Zd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yp=!!Xd,Zd=Xd=null}finally{Kl=i,A.p=r,k.T=n}}e.current=t,mu=2}}function Yu(){if(mu===2){mu=0;var e=hu,t=gu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=Kl;Kl|=4;try{pl(e,t.alternate,t)}finally{Kl=i,A.p=r,k.T=n}}mu=3}}function Xu(){if(mu===4||mu===3){mu=0,ke();var e=hu,t=gu,n=_u,r=bu;t.subtreeFlags&10256||t.flags&10256?mu=5:(mu=0,gu=hu=null,Zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(pu=null),st(n),t=t.stateNode,Be&&typeof Be.onCommitFiberRoot==`function`)try{Be.onCommitFiberRoot(ze,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=k.T,i=A.p,A.p=2,k.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{k.T=t,A.p=i}}_u&3&&Qu(),md(e),i=e.pendingLanes,n&261930&&i&42?e===Su?xu++:(xu=0,Su=e):xu=0,hd(0,!1)}}function Zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function Qu(){return Ju(),Yu(),Xu(),$u()}function $u(){if(mu!==5)return!1;var e=hu,t=vu;vu=0;var n=st(_u),r=k.T,a=A.p;try{A.p=32>n?32:n,k.T=null,n=yu,yu=null;var o=hu,s=_u;if(mu=0,gu=hu=null,_u=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Hl(o.current),Pl(o,o.current,s,n),Kl=c,hd(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{A.p=a,k.T=r,Zu(e,t)}}function ed(e,t,n){t=bi(n,t),t=ic(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(tt(e,2),md(e))}function td(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pu===null||!pu.has(r))){e=bi(n,e),n=ac(2),r=Ka(t,n,2),r!==null&&(oc(n,r,t,e),tt(r,2),md(r));break}}t=t.return}}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new I;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ql=!0,i.add(n),e=rd.bind(null,e,t,n),t.then(e,e))}function rd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(R&n)===n&&(eu===4||eu===3&&(R&62914560)===R&&300>Ae()-lu?!(Kl&2)&&Mu(e,0):ru|=n,au===R&&(au=0)),md(e)}function id(e,t){t===0&&(t=$e()),e=ai(e,t),e!==null&&(tt(e,t),md(e))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function od(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),id(e,n)}function sd(e,t){return Ee(e,t)}var cd=null,ld=null,ud=!1,dd=!1,fd=!1,pd=0;function md(e){e!==ld&&e.next===null&&(ld===null?cd=ld=e:ld=ld.next=e),dd=!0,ud||(ud=!0,xd())}function hd(e,t){if(!fd&&dd){fd=!0;do for(var n=!1,r=cd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=R,a=Xe(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,bd(r,a))}r=r.next}while(n);fd=!1}}function gd(){_d()}function _d(){dd=ud=!1;var e=0;pd!==0&&rf()&&(e=pd);for(var t=Ae(),n=null,r=cd;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?cd=i:n.next=i,i===null&&(ld=n)):(n=r,(e!==0||a&3)&&(dd=!0)),r=i}mu!==0&&mu!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-He(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ql,n=R,n=Xe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&De(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&De(r),st(n)){case 2:case 8:n=Ne;break;case 32:n=Pe;break;case 268435456:n=Ie;break;default:n=Pe}return r=yd.bind(null,e),n=Ee(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&De(r),e.callbackPriority=2,e.callbackNode=null,2}function yd(e,t){if(mu!==0&&mu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Qu()&&e.callbackNode!==n)return null;var r=R;return r=Xe(e,e===ql?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Eu(e,r,t),vd(e,Ae()),e.callbackNode!=null&&e.callbackNode===n?yd.bind(null,e):null)}function bd(e,t){if(Qu())return null;Eu(e,t,!0)}function xd(){cf(function(){Kl&6?Ee(Me,gd):_d()})}function Sd(){if(pd===0){var e=ma;e===0&&(e=Ke,Ke<<=1,!(Ke&261888)&&(Ke=256)),pd=e}return pd}function Cd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:rn(``+e)}function wd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Td(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Cd((i[ft]||null).action),o=r.submitter;o&&(t=(t=o[ft]||null)?Cd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new j(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(pd!==0){var e=o?wd(i,o):new FormData(i);As(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?wd(i,o):new FormData(i),As(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Ed=0;Ed<Xr.length;Ed++){var Dd=Xr[Ed];Zr(Dd.toLowerCase(),`on`+(Dd[0].toUpperCase()+Dd.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Ot(`onMouseEnter`,[`mouseout`,`mouseover`]),Ot(`onMouseLeave`,[`mouseout`,`mouseover`]),Ot(`onPointerEnter`,[`pointerout`,`pointerover`]),Ot(`onPointerLeave`,[`pointerout`,`pointerover`]),Dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Od=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),kd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Od));function Ad(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}}}}function z(e,t){var n=t[mt];n===void 0&&(n=t[mt]=new Set);var r=e+`__bubble`;n.has(r)||(Pd(t,e,2,!1),n.add(r))}function jd(e,t,n){var r=0;t&&(r|=4),Pd(n,e,r,t)}var Md=`_reactListening`+Math.random().toString(36).slice(2);function Nd(e){if(!e[Md]){e[Md]=!0,Tt.forEach(function(t){t!==`selectionchange`&&(kd.has(t)||jd(t,!1,e),jd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Md]||(t[Md]=!0,jd(`selectionchange`,!1,t))}}function Pd(e,t,n,r){switch(wp(t)){case 2:var i=B;break;case 8:i=bp;break;default:i=xp}n=i.bind(null,t,n,e),i=void 0,!hn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Fd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=bt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}fn(function(){var r=a,i=sn(n),s=[];a:{var c=Yr.get(e);if(c!==void 0){var l=j,u=e;switch(e){case`keypress`:if(xn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Hr:case Ur:case Wr:l=Nn;break;case Jr:l=Wn;break;case`scroll`:case`scrollend`:l=Dn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=pn(m,p),g!=null&&d.push(Id(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==on&&(u=n.relatedTarget||n.fromElement)&&(bt(u)||u[pt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?bt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:St(l),h=u==null?c:St(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,bt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Rd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&zd(s,c,l,d,!1),u!==null&&f!==null&&zd(s,f,u,d,!0)}}a:{if(c=r?St(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c)){if(pr)v=Sr;else{v=br;var y=yr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&en(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Kt(c,`number`,c.value)}switch(y=r?St(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(s,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(s,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=bn()):(_n=i,vn=`value`in _n?_n.value:_n.textContent,nr=!0)),y=Ld(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Ld(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Td(s,e,r,n,i)}Ad(s,t)})}function Id(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ld(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=pn(e,n),i!=null&&r.unshift(Id(e,i,a)),i=pn(e,t),i!=null&&r.push(Id(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Rd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=pn(n,a),l!=null&&o.unshift(Id(n,l,c))):i||(l=pn(n,a),l!=null&&o.push(Id(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Bd=/\r\n?/g,Vd=/\u0000|\uFFFD/g;function Hd(e){return(typeof e==`string`?e:``+e).replace(Bd,`
145
+ `).replace(Vd,``)}function Ud(e,t){return t=Hd(t),Hd(e)===t}function Wd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Xt(e,``+r);break;case`className`:Pt(e,`class`,r);break;case`tabIndex`:Pt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Pt(e,n,r);break;case`style`:$t(e,r,o);break;case`data`:if(t!==`object`){Pt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Wd(e,t,`name`,a.name,a,null),Wd(e,t,`formEncType`,a.formEncType,a,null),Wd(e,t,`formMethod`,a.formMethod,a,null),Wd(e,t,`formTarget`,a.formTarget,a,null)):(Wd(e,t,`encType`,a.encType,a,null),Wd(e,t,`method`,a.method,a,null),Wd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=an);break;case`onScroll`:r!=null&&z(`scroll`,e);break;case`onScrollEnd`:r!=null&&z(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=rn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:z(`beforetoggle`,e),z(`toggle`,e),Nt(e,`popover`,r);break;case`xlinkActuate`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Nt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=tn.get(n)||n,Nt(e,n,r))}}function Gd(e,t,n,r,a,o){switch(n){case`style`:$t(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Xt(e,``+r);break;case`onScroll`:r!=null&&z(`scroll`,e);break;case`onScrollEnd`:r!=null&&z(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=an);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Et.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ft]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Nt(e,n,r)}}}function Kd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:z(`error`,e),z(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Wd(e,t,o,s,n,null)}}a&&Wd(e,t,`srcSet`,n.srcSet,n,null),r&&Wd(e,t,`src`,n.src,n,null);return;case`input`:z(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Wd(e,t,r,d,n,null)}}Gt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in z(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Wd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&qt(e,!!r,n,!0):qt(e,!!r,t,!1);return;case`textarea`:for(s in z(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Wd(e,t,s,c,n,null)}Yt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Wd(e,t,l,r,n,null)}return;case`dialog`:z(`beforetoggle`,e),z(`toggle`,e),z(`cancel`,e),z(`close`,e);break;case`iframe`:case`object`:z(`load`,e);break;case`video`:case`audio`:for(r=0;r<Od.length;r++)z(Od[r],e);break;case`image`:z(`error`,e),z(`load`,e);break;case`details`:z(`toggle`,e);break;case`embed`:case`source`:case`link`:z(`error`,e),z(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Wd(e,t,u,r,n,null)}return;default:if(en(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Gd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Wd(e,t,c,r,n,null))}function qd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Wd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Wd(e,t,p,m,r,f)}}Wt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Wd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Wd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?qt(e,!!n,n?[]:``,!1):qt(e,!!n,t,!0)):qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Wd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Wd(e,t,s,a,r,o)}Jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Wd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Wd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Wd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Wd(e,t,u,p,r,m)}return;default:if(en(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Gd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Gd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Wd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Wd(e,t,f,p,r,m)}function Jd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Yd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Jd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Xd=null,Zd=null;function Qd(e){return e.nodeType===9?e:e.ownerDocument}function $d(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function ef(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function tf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nf=null;function rf(){var e=window.event;return e&&e.type===`popstate`?e!==nf&&(nf=e,!0):(nf=null,!1)}var af=typeof setTimeout==`function`?setTimeout:void 0,of=typeof clearTimeout==`function`?clearTimeout:void 0,sf=typeof Promise==`function`?Promise:void 0,cf=typeof queueMicrotask==`function`?queueMicrotask:sf===void 0?af:function(e){return sf.resolve(null).then(e).catch(lf)};function lf(e){setTimeout(function(){throw e})}function uf(e){return e===`head`}function df(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Up(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[vt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tf(e.ownerDocument.body)}n=i}while(n);Up(t)}function ff(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:pf(n),yt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function mf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[vt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=bf(e.nextSibling),e===null)break}return null}function hf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=bf(e.nextSibling),e===null))return null;return e}function gf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=bf(e.nextSibling),e===null))return null;return e}function _f(e){return e.data===`$?`||e.data===`$~`}function vf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function yf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function bf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var xf=null;function Sf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return bf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Cf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function wf(e,t,n){switch(t=Qd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Tf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var Ef=new Map,Df=new Set;function Of(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kf=A.d;A.d={f:Af,r:jf,D:Pf,C:Ff,L:If,m:Lf,X:zf,S:Rf,M:Bf};function Af(){var e=kf.f(),t=Au();return e||t}function jf(e){var t=xt(e);t!==null&&t.tag===5&&t.type===`form`?Ms(t):kf.r(e)}var Mf=typeof document>`u`?null:document;function Nf(e,t,n){var r=Mf;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Df.has(i)||(Df.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Pf(e){kf.D(e),Nf(`dns-prefetch`,e,null)}function Ff(e,t){kf.C(e,t),Nf(`preconnect`,e,t)}function If(e,t,n){kf.L(e,t,n);var r=Mf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Hf(e);break;case`script`:a=Kf(e)}Ef.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Ef.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Uf(a))||t===`script`&&r.querySelector(qf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Lf(e,t){kf.m(e,t);var n=Mf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Kf(e)}if(!Ef.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Ef.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(qf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function Rf(e,t,n){kf.S(e,t,n);var r=Mf;if(r&&e){var i=Ct(r).hoistableStyles,a=Hf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Uf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Ef.get(a))&&Xf(e,n);var c=o=r.createElement(`link`);wt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Yf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zf(e,t){kf.X(e,t);var n=Mf;if(n&&e){var r=Ct(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=f({src:e,async:!0},t),(t=Ef.get(i))&&Zf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t){kf.M(e,t);var n=Mf;if(n&&e){var r=Ct(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Ef.get(i))&&Zf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t,n,r){var a=(a=fe.current)?Of(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Hf(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Hf(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Uf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Ef.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ef.set(e,n),o||Gf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Kf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Hf(e){return`href="`+Ut(e)+`"`}function Uf(e){return`link[rel="stylesheet"][`+e+`]`}function Wf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Gf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),wt(t),e.head.appendChild(t))}function Kf(e){return`[src="`+Ut(e)+`"]`}function qf(e){return`script[async]`+e}function Jf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),Kd(r,`style`,a),Yf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Hf(n.href);var o=e.querySelector(Uf(a));if(o)return t.state.loading|=4,t.instance=o,wt(o),o;r=Wf(n),(a=Ef.get(a))&&Xf(r,a),o=(e.ownerDocument||e).createElement(`link`),wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,Yf(o,n.precedence,e),t.instance=o;case`script`:return o=Kf(n.src),(a=e.querySelector(qf(o)))?(t.instance=a,wt(a),a):(r=n,(a=Ef.get(o))&&(r=f({},n),Zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),wt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Yf(r,n.precedence,e));return t.instance}function Yf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Qf=null;function $f(e,t,n){if(Qf===null){var r=new Map,i=Qf=new Map;i.set(n,r)}else i=Qf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[vt]||a[dt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function ep(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function tp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function np(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function rp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Hf(r.href),a=t.querySelector(Uf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Wf(r),(i=Ef.get(i))&&Xf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Yd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:b,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=ua(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function pp(e){return e?(e=ci,e):ci}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(Tu(n,e,t),qa(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&Tu(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=Cu();t=ot(t);var n=ai(e,t);n!==null&&Tu(n,e,t),gp(e,t)}}var yp=!0;function B(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=2,xp(e,t,n,r)}finally{A.p=a,k.T=i}}function bp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=8,xp(e,t,n,r)}finally{A.p=a,k.T=i}}function xp(e,t,n,r){if(yp){var i=V(r);if(i===null)Fd(e,t,r,Sp,n),Np(e,r);else if(Fp(i,e,t,n,r))r.stopPropagation();else if(Np(e,r),t&4&&-1<Mp.indexOf(e)){for(;i!==null;){var a=xt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ye(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-He(o);s.entanglements[1]|=c,o&=~c}md(a),!(Kl&6)&&(du=Ae()+500,hd(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&Tu(s,a,2),Au(),gp(a,2)}if(a=V(r),a===null&&Fd(e,t,r,Sp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Fd(e,t,r,null,n)}}function V(e){return e=sn(e),Cp(e)}var Sp=null;function Cp(e){if(Sp=null,e=bt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sp=e,null}function wp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var Tp=!1,Ep=null,Dp=null,Op=null,kp=new Map,Ap=new Map,jp=[],Mp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Np(e,t){switch(e){case`focusin`:case`focusout`:Ep=null;break;case`dragenter`:case`dragleave`:Dp=null;break;case`mouseover`:case`mouseout`:Op=null;break;case`pointerover`:case`pointerout`:kp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ap.delete(t.pointerId)}}function Pp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=xt(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fp(e,t,n,r,i){switch(t){case`focusin`:return Ep=Pp(Ep,e,t,n,r,i),!0;case`dragenter`:return Dp=Pp(Dp,e,t,n,r,i),!0;case`mouseover`:return Op=Pp(Op,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return kp.set(a,Pp(kp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ap.set(a,Pp(Ap.get(a)||null,e,t,n,r,i)),!0}return!1}function Ip(e){var t=bt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,lt(e.priority,function(){vp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,lt(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=V(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);on=r,n.target.dispatchEvent(r),on=null}else return t=xt(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Rp(e,t,n){Lp(e)&&n.delete(t)}function zp(){Tp=!1,Ep!==null&&Lp(Ep)&&(Ep=null),Dp!==null&&Lp(Dp)&&(Dp=null),Op!==null&&Lp(Op)&&(Op=null),kp.forEach(Rp),Ap.forEach(Rp)}function Bp(e,n){e.blockedOn===n&&(e.blockedOn=null,Tp||(Tp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zp)))}var Vp=null;function Hp(e){Vp!==e&&(Vp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vp===e&&(Vp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Cp(r||n)===null)continue;break}var a=xt(n);a!==null&&(e.splice(t,3),t-=3,As(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Up(e){function t(t){return Bp(t,e)}Ep!==null&&Bp(Ep,e),Dp!==null&&Bp(Dp,e),Op!==null&&Bp(Op,e),kp.forEach(t),Ap.forEach(t);for(var n=0;n<jp.length;n++){var r=jp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jp.length&&(n=jp[0],n.blockedOn===null);)Ip(n),n.blockedOn===null&&jp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ft]||null;if(typeof a==`function`)o||Hp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ft]||null)s=o.formAction;else if(Cp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Hp(n)}}}function Wp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Gp(e){this._internalRoot=e}Kp.prototype.render=Gp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mp(n,Cu(),e,t,null,null)},Kp.prototype.unmount=Gp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),Au(),t[pt]=null}};function Kp(e){this._internalRoot=e}Kp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jp.length&&t!==0&&t<jp[n].priority;n++);jp.splice(n,0,e),n===0&&Ip(e)}};var qp=n.version;if(qp!==`19.2.8`)throw Error(i(527,qp,`19.2.8`));A.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Jp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:k,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Yp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yp.isDisabled&&Yp.supportsFiber)try{ze=Yp.inject(Jp),Be=Yp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=$s,s=ec,c=tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fp(e,1,!1,null,null,n,r,null,o,s,c,Wp),e[pt]=t.current,Nd(e),new Gp(t)}})),qx=c(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Kx()}))(),Jx=Math.min,Yx=Math.max,Xx=Math.round,Zx=e=>({x:e,y:e}),Qx={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function $x(e,t,n){return Yx(e,Jx(t,n))}function eS(e,t){return typeof e==`function`?e(t):e}function tS(e){return e.split(`-`)[0]}function nS(e){return e.split(`-`)[1]}function rS(e){return e===`x`?`y`:`x`}function iS(e){return e===`y`?`height`:`width`}function aS(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function oS(e){return rS(aS(e))}function sS(e,t,n){n===void 0&&(n=!1);let r=nS(e),i=oS(e),a=iS(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=gS(o)),[o,gS(o)]}function cS(e){let t=gS(e);return[lS(e),t,lS(t)]}function lS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var uS=[`left`,`right`],dS=[`right`,`left`],fS=[`top`,`bottom`],pS=[`bottom`,`top`];function mS(e,t,n){switch(e){case`top`:case`bottom`:return n?t?dS:uS:t?uS:dS;case`left`:case`right`:return t?fS:pS;default:return[]}}function hS(e,t,n,r){let i=nS(e),a=mS(tS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(lS)))),a}function gS(e){let t=tS(e);return Qx[t]+e.slice(t.length)}function _S(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function vS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:_S(e)}function yS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function bS(e,t,n){let{reference:r,floating:i}=e,a=aS(t),o=oS(t),s=iS(o),c=tS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=nS(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function xS(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=eS(t,e),p=vS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=yS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=yS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var SS=50,CS=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:xS},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=bS(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<SS&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=bS(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},wS=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=eS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=tS(r),_=aS(o),v=tS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[gS(o)]:cS(o)),x=p!==`none`;!d&&x&&b.push(...hS(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=sS(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===aS(t)||T.every(e=>aS(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=aS(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},TS=new Set([`left`,`top`]);async function ES(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=tS(n),s=nS(n),c=aS(n)===`y`,l=TS.has(o)?-1:1,u=a&&c?-1:1,d=eS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var DS=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ES(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},OS=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=eS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=aS(i),p=rS(f),m=u[p],h=u[f],g=(e,t)=>$x(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function kS(){return typeof window<`u`}function AS(e){return NS(e)?(e.nodeName||``).toLowerCase():`#document`}function jS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function MS(e){return((NS(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function NS(e){return kS()?e instanceof Node||e instanceof jS(e).Node:!1}function PS(e){return kS()?e instanceof Element||e instanceof jS(e).Element:!1}function FS(e){return kS()?e instanceof HTMLElement||e instanceof jS(e).HTMLElement:!1}function IS(e){return!kS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof jS(e).ShadowRoot}function LS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=JS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function RS(e){return/^(table|td|th)$/.test(AS(e))}function zS(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var BS=/transform|translate|scale|rotate|perspective|filter/,VS=/paint|layout|strict|content/,HS=e=>!!e&&e!==`none`,US;function WS(e){let t=PS(e)?JS(e):e;return HS(t.transform)||HS(t.translate)||HS(t.scale)||HS(t.rotate)||HS(t.perspective)||!KS()&&(HS(t.backdropFilter)||HS(t.filter))||BS.test(t.willChange||``)||VS.test(t.contain||``)}function GS(e){let t=XS(e);for(;FS(t)&&!qS(t);){if(WS(t))return t;if(zS(t))return null;t=XS(t)}return null}function KS(){return US??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),US}function qS(e){return/^(html|body|#document)$/.test(AS(e))}function JS(e){return jS(e).getComputedStyle(e)}function YS(e){return PS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function XS(e){if(AS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||IS(e)&&e.host||MS(e);return IS(t)?t.host:t}function ZS(e){let t=XS(e);return qS(t)?(e.ownerDocument||e).body:FS(t)&&LS(t)?t:ZS(t)}function QS(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ZS(e),i=r===e.ownerDocument?.body,a=jS(r);if(i){let e=$S(a);return t.concat(a,a.visualViewport||[],LS(r)?r:[],e&&n?QS(e):[])}return t.concat(r,QS(r,[],n))}function $S(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eC(e){let t=JS(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=FS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Xx(n)!==a||Xx(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function tC(e){return PS(e)?e:e.contextElement}function nC(e){let t=tC(e);if(!FS(t))return Zx(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=eC(t),o=(a?Xx(n.width):n.width)/r,s=(a?Xx(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var rC=Zx(0);function iC(e){let t=jS(e);return!KS()||!t.visualViewport?rC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aC(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===jS(e)}function oC(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=tC(e),o=Zx(1);t&&(r?PS(r)&&(o=nC(r)):o=nC(e));let s=aC(a,n,r)?iC(a):Zx(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=jS(a),t=PS(r)?jS(r):r,n=e,i=$S(n);for(;i&&t!==n;){let e=nC(i),t=i.getBoundingClientRect(),r=JS(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=jS(i),i=$S(n)}}return yS({width:u,height:d,x:c,y:l})}function sC(e,t){let n=YS(e).scrollLeft;return t?t.left+n:oC(MS(e)).left+n}function cC(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-sC(e,n),y:n.top+t.scrollTop}}function lC(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=MS(r),s=t?zS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Zx(1),u=Zx(0),d=FS(r);if((d||!a)&&((AS(r)!==`body`||LS(o))&&(c=YS(r)),d)){let e=oC(r);l=nC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?cC(o,c):Zx(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function uC(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function dC(e){let t=YS(e),n=e.ownerDocument.body,r=Yx(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Yx(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+sC(e),o=-t.scrollTop;return JS(n).direction===`rtl`&&(a+=Yx(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var fC=25;function pC(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=jS(e),a=MS(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!KS()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(sC(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=fC&&(s-=o)}return{width:s,height:c,x:l,y:u}}function mC(e,t){let n=oC(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=nC(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function hC(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=pC(e,n,t);else if(t===`document`)r=dC(MS(e));else if(PS(t))r=mC(t,n);else{let n=iC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return yS(r)}function gC(e,t){let n=t.get(e);if(n)return n;let r=QS(e,[],!1).filter(e=>PS(e)&&AS(e)!==`body`),i=null,a=JS(e).position===`fixed`,o=a?XS(e):e;for(;PS(o)&&!qS(o);){let e=JS(o),t=WS(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=XS(o)}return t.set(e,r),r}function _C(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?zS(t)?[]:gC(t,this._c):[].concat(n),r],o=hC(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=hC(t,a[e],i);s=Yx(n.top,s),c=Jx(n.right,c),l=Jx(n.bottom,l),u=Yx(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function vC(e){let{width:t,height:n}=eC(e);return{width:t,height:n}}function yC(e,t,n){let r=FS(t),i=MS(t),a=n===`fixed`,o=oC(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Zx(0);if((r||!a)&&((AS(t)!==`body`||LS(i))&&(s=YS(t)),r)){let e=oC(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=sC(i));let l=i&&!r&&!a?cC(i,s):Zx(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function bC(e){return JS(e).position===`static`}function xC(e,t){if(!FS(e)||JS(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return MS(e)===n&&(n=n.ownerDocument.body),n}function SC(e,t){let n=jS(e);if(zS(e))return n;if(!FS(e)){let t=XS(e);for(;t&&!qS(t);){if(PS(t)&&!bC(t))return t;t=XS(t)}return n}let r=xC(e,t);for(;r&&RS(r)&&bC(r);)r=xC(r,t);return r&&qS(r)&&bC(r)&&!WS(r)?n:r||GS(e)||n}var CC=async function(e){let t=this.getOffsetParent||SC,n=this.getDimensions,r=await n(e.floating);return{reference:yC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wC(e){return JS(e).direction===`rtl`}var TC={convertOffsetParentRelativeRectToViewportRelativeRect:lC,getDocumentElement:MS,getClippingRect:_C,getOffsetParent:SC,getElementRects:CC,getClientRects:uC,getDimensions:vC,getScale:nC,isElement:PS,isRTL:wC},EC=DS,DC=OS,OC=wS,kC=(e,t,n)=>{let r=new Map,i=n??{},a={...TC,...i.platform,_c:r};return CS(e,t,{...i,platform:a})},AC=d(Gx(),1),jC=typeof document<`u`?U.useLayoutEffect:function(){};function MC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!MC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!MC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function NC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PC(e,t){let n=NC(e);return Math.round(t*n)/n}function FC(e){let t=U.useRef(e);return jC(()=>{t.current=e}),t}function IC(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=U.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=U.useState(r);MC(f,r)||p(r);let[m,h]=U.useState(null),[g,_]=U.useState(null),v=U.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=U.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=U.useRef(null),C=U.useRef(null),w=U.useRef(u),T=c!=null,E=FC(c),D=FC(i),O=FC(l),ee=U.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),kC(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};te.current&&!MC(w.current,t)&&(w.current=t,AC.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);jC(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=U.useRef(!1);jC(()=>(te.current=!0,()=>{te.current=!1}),[]),jC(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,ee);ee()}},[b,x,ee,E,T]);let ne=U.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),re=U.useMemo(()=>({reference:b,floating:x}),[b,x]),k=U.useMemo(()=>{let e={position:n,left:0,top:0};if(!re.floating)return e;let t=PC(re.floating,u.x),r=PC(re.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...NC(re.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,re.floating,u.x,u.y]);return U.useMemo(()=>({...u,update:ee,refs:ne,elements:re,floatingStyles:k}),[u,ee,ne,re,k])}var LC=(e,t)=>{let n=EC(e);return{name:n.name,fn:n.fn,options:[e,t]}},RC=(e,t)=>{let n=DC(e);return{name:n.name,fn:n.fn,options:[e,t]}},zC=(e,t)=>{let n=OC(e);return{name:n.name,fn:n.fn,options:[e,t]}},BC=e=>{let[t,n]=U.useState(e),r=U.useRef(t);return[t,U.useCallback(function(e){r.current=typeof e==`function`?e(r.current):e,n(r.current)},[]),r]},VC=({analytics:e,element:t,data:n,prevData:r,hide:i,updateTextWithAlternative:a,addIgnoredTerm:o,movePopoverNextOrPrev:s,setLLMSuggestionsRequest:c,getLLMSuggestions:l,llmAlternativesEnabled:u,ignoreTermPermanently:d,onAlternativeAccepted:f})=>{let[p,m]=(0,U.useState)(null),[h,g,_]=BC(!1),[v,y]=(0,U.useState)(``),[b,x]=(0,U.useState)(``),[S,C]=(0,U.useState)(``),w=(0,U.useRef)(null);(0,U.useEffect)(()=>()=>{w.current!==null&&clearTimeout(w.current)},[]);let T=l({alert:n.alert}),E=(0,U.useRef)(null);(0,U.useEffect)(()=>{r&&r.alert.id===n.alert.id||E.current!==n.alert.id&&(E.current=n.alert.id,e.popoverLogs(n.alert,`popover_open`))},[n.alert.id]),(0,U.useEffect)(()=>{u&&n.alert.data.alternatives.length>0&&c({alert:n.alert})},[n.alert.id,u]);let D=(t=!1)=>{t&&e.popoverLogs(n.alert,`popover_close`),g(!1),i();let r=window.document.getElementsByTagName(`ww-popover`);Array.from(r).forEach(e=>{e.remove()})},O=(t,r)=>{t.preventDefault(),t.stopImmediatePropagation(),e.alternativeLog(n.alert,r),f(),a(r)};return{analytics:e,alternativeHovered:p,setAlternativeHovered:m,showLearningBite:h,setShowLearningBite:g,showLearningBiteRef:_,isLoading:v,isSuccess:b,isFailure:S,llmAlternativesResponse:T,hidePopover:D,clickAlternative:O,alternativeKeyDown:e=>n=>{(n.key===`Enter`||n.key===` `)&&(t.focus?.(),O(n.nativeEvent,e))},handleIgnoreClick:r=>()=>{e.ignoreLog(n.alert),r===`ignore_once`?(o(n.alert.data?.text),D()):r===`ignore_permanently`&&(y(r),x(``),C(``),d(n.alert.data?.text).then(()=>{y(``),o(n.alert.data?.text),x(r),w.current=window.setTimeout(()=>{let e=!!document.getElementById(`witty-works-ext-popover`)?.contains(document.activeElement);D(),e&&t.focus?.()},1e3)}).catch(()=>{y(``),C(r)}))},goToAdjacentAlert:e=>{s(e),g(!1)}}},HC=c((e=>{var t=Symbol.for(`react.transitional.element`);function n(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.jsx=n,e.jsxs=n})),G=c(((e,t)=>{t.exports=HC()}))(),UC=e=>(0,G.jsx)(`svg`,{width:15,height:14,viewBox:`0 0 15 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.6103 8.89864C7.80556 8.70338 8.12214 8.70338 8.31741 8.89864L13.1493 13.7305C13.3445 13.9258 13.6611 13.9258 13.8564 13.7305L14.5352 13.0517C14.7304 12.8565 14.7304 12.5399 14.5352 12.3446L9.7033 7.51275C9.50804 7.31749 9.50804 7.0009 9.7033 6.80564L14.8536 1.65535C15.0488 1.46009 15.0488 1.14351 14.8536 0.948248L14.1748 0.269463C13.9795 0.074201 13.663 0.0742007 13.4677 0.269463L8.31741 5.41975C8.12214 5.61501 7.80556 5.61501 7.6103 5.41975L2.46001 0.269463C2.26475 0.0742007 1.94817 0.074201 1.7529 0.269463L1.07412 0.948248C0.878858 1.14351 0.878858 1.46009 1.07412 1.65535L6.22441 6.80564C6.41967 7.0009 6.41967 7.31749 6.22441 7.51275L1.39254 12.3446C1.19727 12.5399 1.19727 12.8565 1.39254 13.0517L2.07132 13.7305C2.26658 13.9258 2.58317 13.9258 2.77843 13.7305L7.6103 8.89864Z`,fill:`#656565`})}),WC=e=>(0,G.jsxs)(`svg`,{width:25,height:14,viewBox:`0 0 25 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,...e,children:[(0,G.jsx)(`rect`,{width:25,height:14,fill:`url(#pattern0)`}),(0,G.jsxs)(`defs`,{children:[(0,G.jsx)(`pattern`,{id:`pattern0`,patternContentUnits:`objectBoundingBox`,width:1,height:1,children:(0,G.jsx)(`use`,{xlinkHref:`#image0_554_760`,transform:`translate(0 -0.0197228) scale(0.0149254 0.0266525)`})}),(0,G.jsx)(`image`,{id:`image0_554_760`,width:67,height:39,xlinkHref:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAAnCAYAAABUr/U/AAAOXUlEQVRoBb1aaVBbV5bm3yx/OlM9NTM1P8bT1VVdNVM1mUnVVCbVhnhh8R5vsbHTsUN3XJlkpivt6p6qTjpO4thG7LsQAsRqwDbesI3BNhixb1rfE0JIbxF670GMtycksZmEb+oKRIQiEWzcoeqW3t3P+d75Luec+6KiQv6mUqgT3mSqz5tMyeGKT2Ga9qYaZrxphhlfun7Gl6Gf8WbpZyZzBmbduQOzT/P6Zh8X9M5OFPTMTSi75ybU3XMTxR1zYlGvxOUPHgjZbk3VmkLHtTIVI5eoGVmlZuSCYkbOK2XlLA0rp5excmoFJ+eWsrqCEkabU8Jos0tZbUY5r00v57WKSl57tprXnjnPa7+s4bWnLji1n1505vz+yuhrETfHOeMGn8I87lNQWLWkmOBL18OXpYc3exDenAF48vowWdALd2EP5KIuyMWdkEu0kMvaIFe0Qq66B7nmDp7W3AVb1F8SUYiQjqtKfkOlyjFdWsSgSM2gQM0it4RFVimLjDIOqRUckqsWfwuKV/alVXBQVHE4V83jq/M8vqzl8fkFJ/50yYk/Xnbidw2j+N0N162T152vrNgWp02v+JLN06uCsASSN9mMqUwdvNkD8Ob2w5PfC4+SANEFt7oT7pIOyKVayOVteFpxD3I1AaIZ7rrbcF9qxJNLjbAV9/7bCgEiVGpVDqNGxUBdxKBQzSKvmEV2KYtMDYfvlOWQU8L6SzBIBIizBIgaHl/WOXEqAES9Ex83uPDbm6P47U0X/vemk1qx/ZSCMq4FiOUx6Xp48/rhKSBAdGNS1YXJ4g64iTVolqyh8h7k83ch196GfLERk/W3MHm5AZPXri14Gq7VrxAgTKW+0B5dpmJQUsRApWaQX7yksIZFejmHlMrFt55WvggGASJ9yVqCgfiCAHHxO4v4uGEUHzW68FHjKP6n0YUPG0fx4W1Xrl+ERXr8ADVCqONVmOHJ74GnsBvuok5MlnRgslQLd9l9uCtaIFfdhbvmjh8I96VbcF++AffVawveG1fmPTcufzt5+7rwtL7+J2EwWG6qUjnGA/RQLtEjW7OSHmerOb+lZBGAgmhDLOJ0DY8AEJ/6qTGKkw2j+O8m11IhzwI+aHLhg6ZROYnQZUpBn1p+4yuUNs/7kik5XJlUULI7e9AnF/TMycruOVndNfdU3T73pFT77JGm7dmj8vvPHlW2Pnt4vuXZk0uN85PXr857Gi5/6228Outtangy1XLb5WtpOr6sechDnZI5SehRHESPnCV6ZGhYObWckxVVnJxSyTkzStn2tHK2PaWCbT9bzfvL6fN8++d1zvZTF5ztn1xytn9S72z/v6vO9hNNLt37zaPjJ5pdOHFH8Jf3m134zR0XkprFzVE+Ba0NBwaxmBAZX6gqX7/wz96blxc8jde83rs3H0y1NrFT7Xep6e62K5EWrFQ55AA9yMFIzgRCg2wNr400Z63tHzQxP//1XQG/ubdYku66kHRPwLstrtNR3mTz9XBgTCVTJ9a6wQ+N8zY3FPru3RKn2+7Ypjpb9b6ejvap/s7bXl3X5tC51YV2DaEHOTT99CCHpoZFZhm3kKnh1/2CkprFnUT591oFvNci4FirgGP3BbyjFZKips+ZE8OB4VVQ3lBBX7Q+2XLzjSntPXqqo7VvqrezZXqgu2Fa31c7azb+PnRNTaFjfpEeS4emnx4sMkvY66FjX6R+vEWQjrW6/CC8e1/Er9oEvNMm4JBW+g//ej6FeT4cID4FpXmRDcPNmepqL5/p72ia1vVenjMNVkzTJuXskDlthh9eftuVhcx1Qg+/TxHsN2jY+XBrPm/b8Vbhc6L8YhH9IBzRCkhsF8zLaxGlI4Dx7cxLOjt8g52xPn1/3SxlKJmlTTkzw5Zz84z9k1nOEUcEqVXyG0qLmIUAPQI+BXGu0kvZ/GVhX/Dh6K3xvz163+U5qhVxtE3AEa2II+0CDncIONgp7FuxLKFFOEC8KXTfioHrqMwMGc/MWan0ecb2xSxv/8Mzp+PDOdH1LsbH/7pCxWjD0SNdw8nr2HJ56tE2oZIon9gh4rAfBBGHOgXs7xI7lwcFHnznTCfDgqGg8DTVGh0Yt57fGSsVO8/YP511Oj6eGeXfnxsTEr958GB3910hcZkeQS438R0yypwn17Mnmbu/Y/xfDhMQOgQc6hSJJeBgp4QD3SLe6h0LH6NMKcxMKCCTKRQepVCP1isQmQ+G+YtnTuajb1z88W/Gxw/MT0xsg2diY3UZy32PHosu9/jL2PftdpfpYJcAUg50iTjQI2Ffj4Q9vUJtxPXnki2vepOphQAgHgUFOYXG41QaUhq17jdENn72QPyvbx482DP/+PFWPH78+q2ro2cIPYJd7swllzu1yrVuizzUKSTt75awv1vA/h4Re3sk7O0lQIie6C7330QEg3R4lpwwr4LCZAqNJ6k0HqbRkFLpuVUnrrETovhX8w/HYyDLr816PL8oVTNy2Ii0nDeucclVh+3tESeIFeztEfwgvNUrYk+fhB19YuqqE0kniWA9Cmqe0ONpKo1HqTS+9lsGDT7NcucHF1jDALgf/GzG7f5ZbZXzj2Ej0nJu4Vzt+h2s/Z1CEVH+rV4JARB29YnYOSBKaxBzcchjBZ3iXqLHRJoFY2k0hHQ/GAt85vqFBPCXAH5SrHLMB9PDH3CVcyAJmTULG2FgbOvE3+/pk6Z294nY3SeB/O7ql7CjX0TsoLg9wrTwzRNptEzoMZ5KQ0yjMZpuAZthwXDmkDX8jOdrVasYDaFHaESaUv5yHKzd3ULL7n4Ju/pF7BqQiDVgu05CwqA48HySRkVFfZ1O73xAzoo0Gq50C/gMCxwEjIwhmLKGdz73gkETNEp+Q3ERsxBI2AQiUpKbOFvJrdvr3d0rxe7sJ3SQsJ2AMChh26CIBP0YYgekXwSJsvZHV6rFSqzCmW4Bk2HBSMYQhjIJGNZ1OUJFakZL6BGcqiMJG0Ul91LioZ39oo0AQEqCTvSXeL2EWMNYxdq1DxlJzgdnmmWBy7DAnjkEa+YQLJlWAga6s60pIcPXVC0s5KKLipgFQg+/yx2UsDlTvX4Ha0eP8IcEPwgStukkxOtExBkkxBrHfK/bPD9dk5CRBg2nW64TetgyCBBDoLKsMGRb0ZdjndfmhCRTIy0S1K4qZpjCQBpvKSIl9Eiu4tbt2O0cfPgPCTrhKbGCQIk1jGGrQcIWo3QmSIwXf7RmDM0TetBZVhizrNBlD6MvZxhtubbnOvUL1M7E0IiUuNz+fGbd+h2sHQOumnj9oiXEGccQa5Cw1TiGTQaRe3HtQ2YasoZPEqswZ1mhz7aiP2cYPTnDaM+xLbTmjrwaMjxitVDNyMv0CEr3n6vmmYiT1tgRpxt9LUEvzMQZRL8lEBC2GCVsNo0hhg6JSte4ZsRhhqzhR4Qeg9nD6M0ZRmeODdpcG5ry7WtSJL+YO7nsUwTRI6WSW/jsJThY23Su3niDgFiD6Adhi2kMm00Sos1Sd0SlXrSjK9caHaBHN7GKXBvu59lwL28EV5UjPxi3KIuZ6eBLoEA2+3TN9x2sfSbtK0nGniPv9Q9+ekjfsmoWneizQ8cfjze4EGcUsNVvDRLeNEmIocYQY/z6X19U51XndeXa+gg9OpasoiVvBHfyR9CQb1/1X2JuCadZQY+lS6BzVdx8qFX4gdB3Pjxm6sCvTN14xzgwe6zTtm01wbYZnc44owtbjQK2EBDMi0D8khpb8+3dauuH7etR8hs6cmwLhB6teTbczR/B7fwR3My340KhPayzpFTyG5RqZj5wCRSISMmh+cV5/ntzkga7rySZ2/AdGH04MmiaCCtQVFTUdr0rJcHkRKzJhS1mAW+aRURTY9holmZepR78XaR5L6W9OW9E05a7SI/m/BHcyrfjeoEd9UrHAkndhW6Sr2G1wfQI3JGerebDRsG/1nfbgsE4auxDolGHgwPD6aFrbzQ++scEE+eJNzmx1eTCJkpEDC1hIz2GNyzSZ6Hj/yz15rwRL6FHY/4IbuTbcbXAjktKB0jqLnhDpYbfoCxmFwL5TP8dKfE0qzh8VhfewUrq02mCwThCwDDp8LbBPL9PK6+4JN5uYG8kmDjEmZ3YYnbhTVpEtEXCL4fGbMFy/FmfyYEZoMe1AjsuKx24UOhAjYpBYTG3nJDJ1bBMgB6BiJTQ46saflV3/j1913SAJotg6PG2yYi9OmtjQLF4I/ef280s4s0cYiknNlEuxFgWwdhoGUsMjPtRfq8WOFwNBXZcUTpwUelAXaED1eRKUM36U3VZpc7E0Ig08AnBqdrRVQO9pF7DyWUwTP04bNTjoMmI/UYau3X214mCO8wOxzYzizgzh820E2/SLsQMidg4JK2wzh8FjLpiLvpygX2hfskqzqsYVKoYkDvSwmJmWlnM+OmxGJGyIC63opIj30msyS95Vz849o6pG0eCwTBReMs0NLWDGnm8nbIjgWIRS3HYRMCwCIihXbPRRunffxQAQjepLmK0hB61hQ5UqRiUB31CEBqREnqcreYX/lTHr8ljPaQ3Rx819Cz4wTAtWsY+E4U95iHsNA9jG2VHPM1iC81hk4WAMYoYmq8JlfFHq1dUOF85r3LMEXpUqBgE35GGRqT+Q/Oi87lM+JDO2Jpo7sdhkx4HTEYQMHaZh7DDPIwEyoG4JTA20zwB5OsfTfFIG6nL2URCD/JhSbhLIEIPYhWna1c/NCOt/7bJ8OgQAcNsxF4CBmXFdmoRjHiaQSyxDJqbixlyruqYRVr/pbfnlrKJKjUzFyki/bKWs56ueP5wnwgap7f+034zPbSfgGEOBoPQhMEWmp3cbHU+X07zpSMQZsH0Mj4/Q8OyqeWs/2OSr87zfZ/Vrz8094NiGH5jO2W7v42yjSXQdjGOYnSxNJsWRowXbvp/SRXI2cTQoJkAAAAASUVORK5CYII=`})]})]}),GC=e=>(0,G.jsx)(`svg`,{width:10,height:16,viewBox:`0 0 10 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.09928 8L0.795978 1.6967L2.21019 0.282485L9.92771 8L2.21019 15.7175L0.795978 14.3033L7.09928 8Z`,fill:`#656565`})}),KC=e=>(0,G.jsx)(`svg`,{width:10,height:16,viewBox:`0 0 10 16`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`nonzero`,clipRule:`nonzero`,d:`M2.88607 8L9.18937 1.6967L7.77516 0.282485L0.057645 8L7.77516 15.7175L9.18937 14.3033L2.88607 8Z`,fill:`#656565`})}),qC=e=>(0,G.jsx)(`svg`,{width:21,height:14,viewBox:`0 0 21 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{d:`M20.7821 1.17019C20.6468 1.09075 20.4797 1.08765 20.3417 1.16226L15.5234 3.77075V2.20562C15.522 0.988049 14.5268 0.00137851 13.2988 0H2.22458C0.996541 0.00137851 0.00139036 0.988049 0 2.20562V10.9144C0.00139036 12.1319 0.996541 13.1186 2.22458 13.12H13.2988C14.5268 13.1186 15.522 12.1319 15.5234 10.9144V9.37768L20.3418 11.9862C20.4797 12.0608 20.647 12.0579 20.7821 11.9784C20.9173 11.8988 21 11.7546 21 11.599V1.54945C21 1.39368 20.9171 1.24962 20.7821 1.17019ZM14.6332 10.9146C14.6325 11.6452 14.0353 12.2371 13.2984 12.2379H2.22458C1.48769 12.2371 0.8907 11.6452 0.889831 10.9146V2.20562C0.8907 1.47518 1.48769 0.88311 2.22458 0.882248H13.2988C14.0355 0.88311 14.6327 1.47518 14.6335 2.20562L14.6332 10.9146ZM20.1102 10.8556L15.5234 8.37257V4.77586L20.1102 2.29298V10.8556Z`,fill:`#F06464`})}),JC=e=>(0,G.jsx)(`svg`,{width:14.5,height:14.5,viewBox:`0 0 50 50`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{d:`m37.5 22.5416c-.5526 0-1.0825.2195-1.4732.6102s-.6102.9206-.6102 1.4732v14.9583c0 .5525-.2195 1.0824-.6102 1.4731s-.9206.6102-1.4731.6102h-22.9167c-.55251 0-1.08241-.2195-1.47311-.6102s-.6102-.9206-.6102-1.4731v-22.9167c0-.5525.2195-1.0824.6102-1.4731s.9206-.6102 1.47311-.6102h14.9584c.5525 0 1.0824-.2195 1.4731-.6102s.6102-.9206.6102-1.4731c0-.5526-.2195-1.0825-.6102-1.4732s-.9206-.6102-1.4731-.6102h-14.9584c-1.65758 0-3.24729.6585-4.41939 1.8306s-1.83058 2.7618-1.83058 4.4194v22.9167c0 1.6576.65848 3.2473 1.83058 4.4194s2.76181 1.8306 4.41939 1.8306h22.9167c1.6576 0 3.2473-.6585 4.4194-1.8306s1.8306-2.7618 1.8306-4.4194v-14.9583c0-.5526-.2195-1.0825-.6102-1.4732s-.9206-.6102-1.4731-.6102zm8.1666-17.08331c-.2114-.50906-.6159-.91359-1.125-1.125-.2504-.10675-.5194-.16337-.7916-.16666h-12.5c-.5526 0-1.0825.21949-1.4732.61019s-.6102.9206-.6102 1.47314c0 .55253.2195 1.08244.6102 1.47314s.9206.61019 1.4732.61019h7.4791l-21.4583 21.43751c-.1953.1937-.3503.4241-.456.678-.1058.2538-.1603.5261-.1603.8012 0 .275.0545.5473.1603.8012.1057.2538.2607.4843.456.6779.1937.1953.4241.3503.678.456.2538.1058.5261.1603.8012.1603.275 0 .5473-.0545.8012-.1603.2538-.1057.4843-.2607.6779-.456l21.4375-21.4583v7.4792c0 .5525.2195 1.0824.6102 1.4731s.9206.6102 1.4732.6102c.5525 0 1.0824-.2195 1.4731-.6102s.6102-.9206.6102-1.4731v-12.50004c-.0033-.27225-.0599-.5412-.1667-.79167z`,fill:`#ffffff`})}),YC=e=>(0,G.jsx)(`svg`,{width:14.5,height:14.5,viewBox:`0 0 50 50`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{d:`m37.5 22.5416c-.5526 0-1.0825.2195-1.4732.6102s-.6102.9206-.6102 1.4732v14.9583c0 .5525-.2195 1.0824-.6102 1.4731s-.9206.6102-1.4731.6102h-22.9167c-.55251 0-1.08241-.2195-1.47311-.6102s-.6102-.9206-.6102-1.4731v-22.9167c0-.5525.2195-1.0824.6102-1.4731s.9206-.6102 1.47311-.6102h14.9584c.5525 0 1.0824-.2195 1.4731-.6102s.6102-.9206.6102-1.4731c0-.5526-.2195-1.0825-.6102-1.4732s-.9206-.6102-1.4731-.6102h-14.9584c-1.65758 0-3.24729.6585-4.41939 1.8306s-1.83058 2.7618-1.83058 4.4194v22.9167c0 1.6576.65848 3.2473 1.83058 4.4194s2.76181 1.8306 4.41939 1.8306h22.9167c1.6576 0 3.2473-.6585 4.4194-1.8306s1.8306-2.7618 1.8306-4.4194v-14.9583c0-.5526-.2195-1.0825-.6102-1.4732s-.9206-.6102-1.4731-.6102zm8.1666-17.08331c-.2114-.50906-.6159-.91359-1.125-1.125-.2504-.10675-.5194-.16337-.7916-.16666h-12.5c-.5526 0-1.0825.21949-1.4732.61019s-.6102.9206-.6102 1.47314c0 .55253.2195 1.08244.6102 1.47314s.9206.61019 1.4732.61019h7.4791l-21.4583 21.43751c-.1953.1937-.3503.4241-.456.678-.1058.2538-.1603.5261-.1603.8012 0 .275.0545.5473.1603.8012.1057.2538.2607.4843.456.6779.1937.1953.4241.3503.678.456.2538.1058.5261.1603.8012.1603.275 0 .5473-.0545.8012-.1603.2538-.1057.4843-.2607.6779-.456l21.4375-21.4583v7.4792c0 .5525.2195 1.0824.6102 1.4731s.9206.6102 1.4732.6102c.5525 0 1.0824-.2195 1.4731-.6102s.6102-.9206.6102-1.4731v-12.50004c-.0033-.27225-.0599-.5412-.1667-.79167z`,fill:`#656565`})}),XC=e=>(0,G.jsx)(`svg`,{width:16,height:10,viewBox:`0 0 16 10`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.79599 2.82817L13.996 9.23311L15.433 7.84208L7.84197 0.00011482L8.50898e-06 7.59114L1.39104 9.02816L7.79599 2.82817Z`,fill:`#f06464`})}),ZC=e=>(0,G.jsx)(`svg`,{width:16,height:10,viewBox:`0 0 16 10`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.71753 6.60685L1.41423 0.303546L1.3929e-05 1.71776L7.71753 9.43527L15.435 1.71776L14.0208 0.303546L7.71753 6.60685Z`,fill:`#f06464`})}),QC=Object.defineProperty,$C=(e,t)=>{let n={};for(var r in e)QC(n,r,{get:e[r],enumerable:!0});return t||QC(n,Symbol.toStringTag,{value:`Module`}),n},ew=gw(),K=e=>dw(e,ew),tw=gw();K.write=e=>dw(e,tw);var nw=gw();K.onStart=e=>dw(e,nw);var rw=gw();K.onFrame=e=>dw(e,rw);var iw=gw();K.onFinish=e=>dw(e,iw);var aw=[];K.setTimeout=(e,t)=>{let n=K.now()+t,r=()=>{let e=aw.findIndex(e=>e.cancel==r);~e&&aw.splice(e,1),lw-=+!!~e},i={time:n,handler:e,cancel:r};return aw.splice(ow(n),0,i),lw+=1,fw(),i};var ow=e=>~(~aw.findIndex(t=>t.time>e)||~aw.length);K.cancel=e=>{nw.delete(e),rw.delete(e),iw.delete(e),ew.delete(e),tw.delete(e)},K.sync=e=>{uw=!0,K.batchedUpdates(e),uw=!1},K.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,K.onStart(n)}return r.handler=e,r.cancel=()=>{nw.delete(n),t=null},r};var sw=typeof window<`u`?window.requestAnimationFrame:()=>{};K.use=e=>sw=e,K.now=typeof performance<`u`?()=>performance.now():Date.now,K.batchedUpdates=e=>e(),K.catch=console.error,K.frameLoop=`always`,K.onDemand=()=>{},K.advance=()=>{K.frameLoop===`demand`?hw():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var cw=-1,lw=0,uw=!1;function dw(e,t){uw?(t.delete(e),e(0)):(t.add(e),fw(),K.frameLoop===`demand`&&K.onDemand())}function fw(){cw<0&&(cw=0,K.frameLoop!==`demand`&&sw(mw))}function pw(){cw=-1}function mw(){~cw&&(sw(mw),K.batchedUpdates(hw))}function hw(){let e=cw;cw=K.now();let t=ow(cw);if(t&&(_w(aw.splice(0,t),e=>e.handler()),lw-=t),!lw){pw();return}nw.flush(),ew.flush(e?Math.min(64,cw-e):16.667),rw.flush(),tw.flush(),iw.flush(),K.frameLoop===`demand`&&lw>0&&K.onDemand()}function gw(){let e=new Set,t=e;return{add(n){lw+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return lw-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,lw-=t.size,_w(t,t=>t(n)&&e.add(t)),lw+=e.size,t=e)}}}function _w(e,t){e.forEach(e=>{try{t(e)}catch(e){K.catch(e)}})}function vw(){}var yw=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),q={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function bw(e,t){if(q.arr(e)){if(!q.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var J=(e,t)=>e.forEach(t);function xw(e,t,n){if(q.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Sw=e=>q.und(e)?[]:q.arr(e)?e:[e];function Cw(e,t){if(e.size){let n=Array.from(e);e.clear(),J(n,t)}}var ww=(e,...t)=>Cw(e,e=>e(...t)),Tw=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ew=$C({assign:()=>Mw,colors:()=>kw,createStringInterpolator:()=>Dw,skipAnimation:()=>Aw,to:()=>Ow,willAdvance:()=>jw}),Dw,Ow,kw=null,Aw=!1,jw=vw,Mw=e=>{e.to&&(Ow=e.to),e.now&&(K.now=e.now),e.colors!==void 0&&(kw=e.colors),e.skipAnimation!=null&&(Aw=e.skipAnimation),e.createStringInterpolator&&(Dw=e.createStringInterpolator),e.requestAnimationFrame&&K.use(e.requestAnimationFrame),e.batchedUpdates&&(K.batchedUpdates=e.batchedUpdates),e.willAdvance&&(jw=e.willAdvance),e.frameLoop&&(K.frameLoop=e.frameLoop),e.onDemand&&(K.onDemand=e.onDemand)},Nw=new Set,Pw=[],Fw=[],Iw=0,Lw={get idle(){return!Nw.size&&!Pw.length},start(e){Iw>e.priority?(Nw.add(e),K.onStart(Rw)):(zw(e),K(Vw))},advance:Vw,sort(e){if(Iw)K.onFrame(()=>Lw.sort(e));else{let t=Pw.indexOf(e);~t&&(Pw.splice(t,1),Bw(e))}},clear(){Pw=[],Nw.clear()}};function Rw(){Nw.forEach(zw),Nw.clear(),K(Vw)}function zw(e){Pw.includes(e)||Bw(e)}function Bw(e){Pw.splice(Hw(Pw,t=>t.priority>e.priority),0,e)}function Vw(e){let t=Fw;for(let n=0;n<Pw.length;n++){let r=Pw[n];Iw=r.priority,r.idle||(jw(r),r.advance(e),r.idle||t.push(r))}return Iw=0,Fw=Pw,Fw.length=0,Pw=t,Pw.length>0}function Hw(e,t){let n=e.findIndex(t);return n<0?e.length:n}var Uw=(e,t,n)=>Math.min(Math.max(n,e),t),Ww={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Gw=`[-+]?\\d*\\.?\\d+`,Kw=`[-+]?\\d*\\.?\\d+%`;function qw(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var Jw=RegExp(`rgb`+qw(Gw,Gw,Gw)),Yw=RegExp(`rgba`+qw(Gw,Gw,Gw,Gw)),Xw=RegExp(`hsl`+qw(Gw,Kw,Kw)),Zw=RegExp(`hsla`+qw(Gw,Kw,Kw,Gw)),Qw=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$w=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,eT=/^#([0-9a-fA-F]{6})$/,tT=/^#([0-9a-fA-F]{8})$/;function nT(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=eT.exec(e))?parseInt(t[1]+`ff`,16)>>>0:kw&&kw[e]!==void 0?kw[e]:(t=Jw.exec(e))?(aT(t[1])<<24|aT(t[2])<<16|aT(t[3])<<8|255)>>>0:(t=Yw.exec(e))?(aT(t[1])<<24|aT(t[2])<<16|aT(t[3])<<8|sT(t[4]))>>>0:(t=Qw.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=tT.exec(e))?parseInt(t[1],16)>>>0:(t=$w.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Xw.exec(e))?(iT(oT(t[1]),cT(t[2]),cT(t[3]))|255)>>>0:(t=Zw.exec(e))?(iT(oT(t[1]),cT(t[2]),cT(t[3]))|sT(t[4]))>>>0:null}function rT(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iT(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=rT(i,r,e+1/3),o=rT(i,r,e),s=rT(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function aT(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function oT(e){return(parseFloat(e)%360+360)%360/360}function sT(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function cT(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function lT(e){let t=nT(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var uT=(e,t,n)=>{if(q.fun(e))return e;if(q.arr(e))return uT({range:e,output:t,extrapolate:n});if(q.str(e.output[0]))return Dw(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=fT(e,a);return dT(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function dT(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function fT(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var pT=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return Uw(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},mT=1.70158,hT=mT*1.525,gT=2.70158,_T=2*Math.PI/3,vT=2*Math.PI/4.5,yT=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},bT={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>gT*e*e*e-mT*e*e,easeOutBack:e=>1+gT*(e-1)**3+mT*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(7.189819*e-hT)/2:((2*e-2)**2*(3.5949095*(e*2-2)+hT)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*_T),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*_T)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*vT))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*vT)/2+1,easeInBounce:e=>1-yT(1-e),easeOutBounce:yT,easeInOutBounce:e=>e<.5?(1-yT(1-2*e))/2:(1+yT(2*e-1))/2,steps:pT},xT=Symbol.for(`FluidValue.get`),ST=Symbol.for(`FluidValue.observers`),CT=e=>!!(e&&e[xT]),wT=e=>e&&e[xT]?e[xT]():e,TT=e=>e[ST]||null;function ET(e,t){e.eventObserved?e.eventObserved(t):e(t)}function DT(e,t){let n=e[ST];n&&n.forEach(e=>{ET(e,t)})}var OT=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);kT(this,e)}},kT=(e,t)=>MT(e,xT,t);function AT(e,t){if(e[xT]){let n=e[ST];n||MT(e,ST,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function jT(e,t){let n=e[ST];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[ST]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var MT=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),NT=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,PT=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,FT=RegExp(`(${NT.source})(%|[a-z]+)`,`i`),IT=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,LT=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,RT=e=>{let[t,n]=zT(e);if(!t||Tw())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&LT.test(n)?RT(n):n||e},zT=e=>{let t=LT.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},BT,VT=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,HT=e=>e.match(NT)??[],UT=e=>{BT||=kw?RegExp(`(${Object.keys(kw).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>wT(e).replace(LT,RT).replace(PT,lT).replace(BT,lT)),n=t.map(e=>HT(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>uT({...e,output:t})),i=e.range||[0,1],a=t.map(e=>HT(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!FT.test(t[0])&&t.find(e=>FT.test(e))?.replace(NT,``),s=0;return t[0].replace(NT,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(IT,VT)}},WT=`react-spring: `,GT=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${WT}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},KT=GT(console.warn);function qT(){KT(`${WT}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var JT=GT(console.warn);function YT(){JT(`${WT}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function XT(e){return q.str(e)&&(e[0]==`#`||/\d/.test(e)||!Tw()&&LT.test(e)||e in(kw||{}))}var ZT=Tw()?U.useEffect:U.useLayoutEffect,QT=()=>{let e=(0,U.useRef)(!1);return ZT(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function $T(){let e=(0,U.useState)()[1],t=QT();return()=>{t.current&&e(Math.random())}}var eE=e=>(0,U.useEffect)(e,tE),tE=[];function nE(e){let t=(0,U.useRef)(void 0);return(0,U.useEffect)(()=>{t.current=e}),t.current}var rE=Symbol.for(`Animated:node`),iE=e=>!!e&&e[rE]===e,aE=e=>e&&e[rE],oE=(e,t)=>yw(e,rE,t),sE=e=>e&&e[rE]&&e[rE].getPayload(),cE=class{constructor(){oE(this,this)}getPayload(){return this.payload||[]}},lE=class e extends cE{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,q.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return q.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,q.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},uE=class e extends lE{constructor(e){super(0),this._string=null,this._toString=uT({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(q.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=uT({output:[this.getValue(),e]})),this._value=0,super.reset()}},dE={dependencies:null},fE=class extends cE{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return xw(this.source,(n,r)=>{iE(n)?t[r]=n.getValue(e):CT(n)?t[r]=wT(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&J(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return xw(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){dE.dependencies&&CT(e)&&dE.dependencies.add(e);let t=sE(e);t&&J(t,e=>this.add(e))}},pE=class e extends fE{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(mE)),!0)}};function mE(e){return(XT(e)?uE:lE).create(e)}function hE(e){let t=aE(e);return t?t.constructor:q.arr(e)?pE:XT(e)?uE:lE}var gE=(e,t)=>{let n=!q.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,U.forwardRef)((r,i)=>{let a=(0,U.useRef)(null),o=n&&(0,U.useCallback)(e=>{a.current=yE(i,e)},[i]),[s,c]=vE(r,t),l=$T(),u=()=>{let e=a.current;(!n||e)&&(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new _E(u,c),f=(0,U.useRef)(void 0);ZT(()=>(f.current=d,J(c,e=>AT(e,d)),()=>{f.current&&(J(f.current.deps,e=>jT(e,f.current)),K.cancel(f.current.update))})),(0,U.useEffect)(u,[]),eE(()=>()=>{let e=f.current;J(e.deps,t=>jT(t,e))});let p=t.getComponentProps(s.getValue());return U.createElement(e,{...p,ref:o})})},_E=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&K.write(this.update)}};function vE(e,t){let n=new Set;return dE.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new fE(e),dE.dependencies=null,[e,n]}function yE(e,t){return e&&(q.fun(e)?e(t):e.current=t),t}var bE=Symbol.for(`AnimatedComponent`),xE=new WeakMap,SE=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new fE(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=CE(e)||`Anonymous`;if(q.str(e))e=a[e]||(a[e]=gE(e,i));else{let t=e[bE]??xE.get(e);if(!t){t=gE(e,i);try{e[bE]=t}catch{}xE.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return xw(e,(t,n)=>{q.arr(e)&&(n=CE(t)),a[n]=a(t)}),{animated:a}},CE=e=>q.str(e)?e:e&&q.str(e.displayName)?e.displayName:q.fun(e)&&e.name||null;function wE(e,...t){return q.fun(e)?e(...t):e}var TE=(e,t)=>e===!0||!!(t&&e&&(q.fun(e)?e(t):Sw(e).includes(t))),EE=(e,t)=>q.obj(e)?t&&e[t]:e,DE=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,OE=e=>e,kE=(e,t=OE)=>{let n=AE;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);q.und(n)||(r[i]=n)}return r},AE=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],jE={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function ME(e){let t={},n=0;if(xw(e,(e,r)=>{jE[r]||(t[r]=e,n++)}),n)return t}function NE(e){let t=ME(e);if(t){let n={to:t};return xw(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function PE(e){let t=wT(e);return q.arr(t)?t.map(PE):XT(t)?Ew.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function FE(e){for(let t in e)return!0;return!1}function IE(e){return q.fun(e)||q.arr(e)&&q.obj(e[0])}function LE(e,t){e.ref?.delete(e),t?.delete(e)}function RE(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var zE={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:bT.linear,clamp:!1},BE=class{constructor(){this.velocity=0,Object.assign(this,zE)}};function VE(e,t,n){n&&(n={...n},HE(n,t),t={...n,...t}),HE(e,t),Object.assign(e,t);for(let t in zE)e[t]??(e[t]=zE[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return q.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function HE(e,t){if(!q.und(t.decay))e.duration=void 0;else{let n=!q.und(t.tension)||!q.und(t.friction);(n||!q.und(t.frequency)||!q.und(t.damping)||!q.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var UE=[],WE=class{constructor(){this.changed=!1,this.values=UE,this.toValues=null,this.fromValues=UE,this.config=new BE,this.immediate=!1}};function GE(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=TE(n.cancel??r?.cancel,t);if(u)p();else{q.und(n.pause)||(i.paused=TE(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||TE(e,t)),c=wE(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-K.now()}function f(){c>0&&!Ew.skipAnimation?(i.delayed=!0,l=K.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var KE=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?YE(e.get()):t.every(e=>e.noop)?qE(e.get()):JE(e.get(),t.every(e=>e.finished)),qE=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),JE=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),YE=e=>({value:e,cancelled:!0,finished:!1});function XE(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=kE(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&YE(r)||i!==n.asyncId&&JE(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new QE,o=new $E;return(async()=>{p(a);let s=q.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,xw(l,(e,t)=>{q.und(s[t])&&(s[t]=e)}),Ew.skipAnimation){if(++m>1024)throw ZE(n),o.result=JE(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=q.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=JE(r.get(),!0,!1)}catch(e){if(e instanceof QE)g=e.result;else if(e instanceof $E)g=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return q.fun(o)&&K.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function ZE(e,t){Cw(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var QE=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},$E=class extends Error{constructor(){super(`SkipAnimationSignal`)}},eD=e=>e instanceof nD,tD=1,nD=class extends OT{constructor(...e){super(...e),this.id=tD++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=aE(this);return e&&e.getValue()}to(...e){return Ew.to(this,e)}interpolate(...e){return qT(),Ew.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){DT(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Lw.sort(this),DT(this,{type:`priority`,parent:this,priority:e})}},rD=Symbol.for(`SpringPhase`),iD=1,aD=2,oD=4,sD=e=>(e[rD]&iD)>0,cD=e=>(e[rD]&aD)>0,lD=e=>(e[rD]&oD)>0,uD=(e,t)=>t?e[rD]|=3:e[rD]&=-3,dD=(e,t)=>t?e[rD]|=oD:e[rD]&=-5,fD=class extends nD{constructor(e,t){if(super(),this.animation=new WE,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!q.und(e)||!q.und(t)){let n=q.obj(e)?{...e}:{...t,from:e};q.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(cD(this)||this._state.asyncTo)||lD(this)}get goal(){return wT(this.animation.to)}get velocity(){let e=aE(this);return e instanceof lE?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return sD(this)}get isAnimating(){return cD(this)}get isPaused(){return lD(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=sE(r.to);!o&&CT(r.to)&&(i=Sw(wT(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==uE?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=q.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!q.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!q.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=aE(this),c=s.getValue();if(t){let e=wT(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return K.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(cD(this)){let{to:e,config:t}=this.animation;K.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return q.und(e)?(n=this.queue||[],this.queue=[]):n=[q.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>KE(this,e))}stop(e){let{to:t}=this.animation;return q.und(t)||this._focus(this.get()),ZE(this._state,e&&this._lastCallId),K.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=q.obj(n)?n[t]:n,(n==null||IE(n))&&(n=void 0),r=q.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return sD(this)||(e.reverse&&([n,r]=[r,n]),r=wT(r),q.und(r)?aE(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,kE(e,(e,t)=>/^on/.test(t)?EE(e,n):e)),vD(this,e,`onProps`),yD(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return GE(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{lD(this)||(dD(this,!0),ww(a.pauseQueue),yD(this,`onPause`,JE(this,pD(this,this.animation.to)),this))},resume:()=>{lD(this)&&(dD(this,!1),cD(this)&&this._resume(),ww(a.resumeQueue),yD(this,`onResume`,JE(this,pD(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=mD(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(YE(this));let r=!q.und(e.to),i=!q.und(e.from);if(r||i){if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(YE(this))}let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||q.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!bw(d,l);f&&(s.from=d),d=wT(d);let p=!bw(u,c);p&&this._focus(u);let m=IE(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&VE(h,wE(t.config,a),t.config===o.config?void 0:wE(o.config,a));let v=aE(this);if(!v||q.und(u))return n(JE(this,!0));let y=q.und(t.reset)?i&&!t.default:!q.und(d)&&TE(t.reset,a),b=y?d:this.get(),x=PE(u),S=q.num(x)||q.arr(x)||XT(x),C=!m&&(!S||TE(o.immediate||t.immediate,a));if(p){let e=hE(u);if(e!==v.constructor){if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}}let w=v.constructor,T=CT(u),E=!1;if(!T){let e=y||!sD(this)&&f;(p||e)&&(E=bw(PE(b),x),T=!E),(!bw(s.immediate,C)&&!C||!bw(h.decay,g)||!bw(h.velocity,_))&&(T=!0)}if(E&&cD(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||CT(c))&&(s.values=v.getPayload(),s.toValues=CT(u)?null:w==uE?[1]:Sw(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;J(_D,e=>vD(this,t,e));let r=JE(this,pD(this,c));ww(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&K.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?wE(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(XE(t.to,t,this._state,this)):T?this._start():cD(this)&&!p?this._pendingCalls.add(n):n(qE(b))}_focus(e){let t=this.animation;e!==t.to&&(TT(this)&&this._detach(),t.to=e,TT(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;CT(t)&&(AT(t,this),eD(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;CT(e)&&jT(e,this)}_set(e,t=!0){let n=wT(e);if(!q.und(n)){let e=aE(this);if(!e||!bw(n,e.getValue())){let r=hE(n);!e||e.constructor!=r?oE(this,r.create(n)):e.setValue(n),e&&K.batchedUpdates(()=>{this._onChange(n,t)})}}return aE(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,yD(this,`onStart`,JE(this,pD(this,e.to)),this))}_onChange(e,t){let n=JE(e,!1);t||(this._onStart(),wE(this.animation.onChange,n,this)),wE(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;aE(this).reset(wT(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),cD(this)||(uD(this,!0),lD(this)||this._resume())}_resume(){Ew.skipAnimation?this.finish():Lw.start(this)}_stop(e,t){if(cD(this)){uD(this,!1);let n=this.animation;J(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),DT(this,{type:`idle`,parent:this});let r=t?YE(this.get()):JE(this.get(),pD(this,e??n.to));ww(this._pendingCalls,r),n.changed=!1,yD(this,`onRest`,r,this)}}};function pD(e,t){let n=PE(t);return bw(PE(e.get()),n)}function mD(e,t=e.loop,n=e.to){let r=wE(t);if(r){let i=r!==!0&&NE(r),a=(i||e).reverse,o=!i||i.reset;return hD({...e,loop:t,default:!1,pause:void 0,to:!a||IE(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function hD(e){let{to:t,from:n}=e=NE(e),r=new Set;return q.obj(t)&&gD(t,r),q.obj(n)&&gD(n,r),e.keys=r.size?Array.from(r):null,e}function gD(e,t){xw(e,(e,n)=>e!=null&&t.add(n))}var _D=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function vD(e,t,n){e.animation[n]=t[n]===DE(t,n)?void 0:EE(t[n],e.key)}function yD(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var bD=[`onStart`,`onChange`,`onRest`],xD=1,SD=class{constructor(e,t){this.id=xD++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];q.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(hD(e)),this}start(e){let{queue:t}=this;return e?t=Sw(e).map(hD):this.queue=[],this._flush?this._flush(this,t):(kD(this,t),CD(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;J(Sw(t),t=>n[t].stop(!!e))}else ZE(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(q.und(e))this.start({pause:!0});else{let t=this.springs;J(Sw(e),e=>t[e].pause())}return this}resume(e){if(q.und(e))this.start({pause:!1});else{let t=this.springs;J(Sw(e),e=>t[e].resume())}return this}each(e){xw(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Cw(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&Cw(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,Cw(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;K.onFrame(this._onFrame)}};function CD(e,t){return Promise.all(t.map(t=>wD(e,t))).then(t=>KE(e,t))}async function wD(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=q.obj(t.default)&&t.default;o&&(t.loop=!1);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=q.arr(i)||q.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):J(bD,n=>{let r=t[n];if(q.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),l&&(l[n]=t[n])}});let p=e._state;t.pause===!p.paused?(p.paused=t.pause,ww(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||DE(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(GE(++e._lastAsyncId,{props:t,state:p,actions:{pause:vw,resume:vw,start(t,n){h?(ZE(p,e._lastAsyncId),n(YE(e))):(t.onRest=s,n(XE(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=KE(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=mD(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),kD(e,[n]),wD(e,n,!0)}return c&&K.batchedUpdates(()=>c(g,e,e.item)),g}function TD(e,t){let n={...e.springs};return t&&J(Sw(t),e=>{q.und(e.keys)&&(e=hD(e)),q.obj(e.to)||(e={...e,to:void 0}),OD(n,e,e=>DD(e))}),ED(e,n),n}function ED(e,t){xw(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,AT(t,e))})}function DD(e,t){let n=new fD;return n.key=e,t&&AT(n,t),n}function OD(e,t,n){t.keys&&J(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function kD(e,t){J(t,t=>{OD(e.springs,t,t=>DD(t,e))})}var AD=U.createContext({pause:!1,immediate:!1}),jD=()=>{let e=[],t=function(t){YT();let r=[];return J(e,(e,i)=>{if(q.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return J(e,e=>e.pause(...arguments)),this},t.resume=function(){return J(e,e=>e.resume(...arguments)),this},t.set=function(t){J(e,(e,n)=>{let r=q.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return J(e,(e,r)=>{if(q.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return J(e,e=>e.stop(...arguments)),this},t.update=function(t){return J(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return q.fun(e)?e(n,t):e};return t._getProps=n,t};function MD(e,t,n){let r=q.fun(t)&&t,{reset:i,sort:a,trail:o=0,reverse:s=!1,expires:c=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:d,config:f}=r?r():t,p=(0,U.useMemo)(()=>r||arguments.length==3?jD():void 0,[]),m=Sw(e),h=[],g=(0,U.useRef)(null),_=i?null:g.current;ZT(()=>{g.current=h}),eE(()=>(J(h,e=>{p?.add(e.ctrl),e.ctrl.ref=void 0}),()=>{J(g.current,e=>{e.expired&&clearTimeout(e.expirationId),LE(e.ctrl,p),e.ctrl.stop(!0)})}));let v=PD(m,r?r():t,_),y=i&&g.current||[];ZT(()=>J(y,({ctrl:e,item:t,key:n})=>{LE(e,p),wE(u,t,n)}));let b=[];if(_&&J(_,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):(t=b[t]=v.indexOf(e.key),~t&&(h[t]=e))}),J(m,(e,t)=>{h[t]||(h[t]={key:v[t],item:e,phase:`mount`,ctrl:new SD},h[t].ctrl.item=e)}),b.length){let e=-1,{leave:n}=r?r():t;J(b,(t,r)=>{let i=_[r];~t?(e=h.indexOf(i),h[e]={...i,item:m[t]}):n&&h.splice(++e,0,i)})}q.fun(a)&&h.sort((e,t)=>a(e.item,t.item));let x=-o,S=[],C=$T(),w=kE(t),T=new Map,E=(0,U.useRef)(new Map),D=(0,U.useRef)(!1);if(J(h,(e,n)=>{let i=e.key,a=e.phase,s=r?r():t,u,p,m=wE(s.delay||0,i);if(a==`mount`)u=s.enter,p=`enter`;else{let e=v.indexOf(i)<0;if(a!=`leave`){if(e)u=s.leave,p=`leave`;else if(u=s.update)p=`update`;else return}else if(!e)u=s.enter,p=`enter`;else return}if(u=wE(u,e.item,n),u=q.obj(u)?NE(u):{to:u},!u.config){let t=f||w.config;u.config=wE(t,e.item,n,p)}x+=o;let h={...w,delay:m+x,ref:d,immediate:s.immediate,reset:!1,...u};if(p==`enter`&&q.und(h.from)){let i=r?r():t;h.from=wE(q.und(i.initial)||_?i.from:i.initial,e.item,n)}let{onResolve:y}=h;h.onResolve=e=>{wE(y,e);let t=g.current,n=t.find(e=>e.key===i);if(n&&!(e.cancelled&&n.phase!=`update`)&&n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if(n.phase==`leave`){E.current.delete(n);let t=wE(c,n.item);if(t!==!1){let r=t===!0?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(C,r));return}}}e&&t.some(e=>e.expired)&&(l&&(D.current=!0),C())}};let b=TD(e.ctrl,h);S.push({payload:h,propsDelay:m}),p===`leave`&&l?E.current.set(e,{phase:p,springs:b,payload:h}):T.set(e,{phase:p,springs:b,payload:h})}),s&&o){let e=S.length;J(S,({payload:t,propsDelay:n},r)=>{t.delay=n+(e-1-r)*o})}let O=(0,U.useContext)(AD),ee=O!==nE(O)&&FE(O);ZT(()=>{ee&&J(h,e=>{e.ctrl.start({default:O})})},[O]),J(T,(e,t)=>{if(E.current.size){let e=h.findIndex(e=>e.key===t.key);h.splice(e,1)}}),ZT(()=>{J(E.current.size?E.current:T,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,p?.add(r),ee&&e==`enter`&&r.start({default:O}),t&&(RE(r,t.ref),r.ref&&!D.current?r.update(t):(r.start(t),D.current&&=!1))})},i?void 0:n);let te=e=>U.createElement(U.Fragment,null,h.map((t,n)=>{let r=T.get(t)||E.current.get(t),{springs:i}=r||t.ctrl,a=r?{...t,phase:r.phase}:t,o=e({...i},t.item,a,n),s=q.str(t.key)||q.num(t.key)?t.key:t.ctrl.id,c=o?.props??{},l=c?.ref;return o&&o.type?U.createElement(o.type,{...c,key:s,ref:l}):o}));return p?[te,p]:te}var ND=1;function PD(e,{key:t,keys:n=t},r){if(n===null){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&n.phase!==`leave`&&!t.has(n));return n?(t.add(n),n.key):ND++})}return q.und(n)?e:q.fun(n)?e.map(n):Sw(n)}var FD=class extends nD{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=uT(...t);let n=this._get(),r=hE(n);oE(this,r.create(n))}advance(e){let t=this._get();bw(t,this.get())||(aE(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&LD(this._active)&&RD(this)}_get(){let e=q.arr(this.source)?this.source.map(wT):Sw(wT(this.source));return this.calc(...e)}_start(){this.idle&&!LD(this._active)&&(this.idle=!1,J(sE(this),e=>{e.done=!1}),Ew.skipAnimation?(K.batchedUpdates(()=>this.advance()),RD(this)):Lw.start(this))}_attach(){let e=1;J(Sw(this.source),t=>{CT(t)&&AT(t,this),eD(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){J(Sw(this.source),e=>{CT(e)&&jT(e,this)}),this._active.clear(),RD(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=Sw(this.source).reduce((e,t)=>Math.max(e,(eD(t)?t.priority:0)+1),0))}};function ID(e){return e.idle!==!1}function LD(e){return!e.size||Array.from(e).every(ID)}function RD(e){e.idle||(e.idle=!0,J(sE(e),e=>{e.done=!0}),DT(e,{type:`idle`,parent:e}))}Ew.assign({createStringInterpolator:UT,to:(e,t)=>new FD(e,t)}),Lw.advance;var zD=/^--/;function BD(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!zD.test(e)&&!(UD.hasOwnProperty(e)&&UD[e])?t+`px`:(``+t).trim()}var VD={};function HD(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:VD[t]||(VD[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=BD(t,i[t]);zD.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var UD={animationIterationCount:!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,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},WD=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),GD=[`Webkit`,`Ms`,`Moz`,`O`];UD=Object.keys(UD).reduce((e,t)=>(GD.forEach(n=>e[WD(n,t)]=e[t]),e),UD);var KD=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,qD=/^(translate)/,JD=/^(rotate|skew)/,YD=(e,t)=>q.num(e)&&e!==0?e+t:e,XD=(e,t)=>q.arr(e)?e.every(e=>XD(e,t)):q.num(e)?e===t:parseFloat(e)===t,ZD=class extends fE{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>YD(e,`px`)).join(`,`)})`,XD(e,0)])),xw(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(KD.test(t)){if(delete r[t],q.und(e))return;let n=qD.test(t)?`px`:JD.test(t)?`deg`:``;i.push(Sw(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${YD(i,n)})`,XD(i,0)]:e=>[`${t}(${e.map(e=>YD(e,n)).join(`,`)})`,XD(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new QD(i,a)),super(r)}},QD=class extends OT{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return J(this.inputs,(n,r)=>{let i=wT(n[0]),[a,o]=this.transforms[r](q.arr(i)?i:n.map(wT));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&J(this.inputs,e=>J(e,e=>CT(e)&&AT(e,this)))}observerRemoved(e){e==0&&J(this.inputs,e=>J(e,e=>CT(e)&&jT(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),DT(this,e)}},$D=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);Ew.assign({batchedUpdates:AC.unstable_batchedUpdates,createStringInterpolator:UT,colors:Ww});var eO=SE($D,{applyAnimatedValues:HD,createAnimatedStyle:e=>new ZD(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,tO=e=>(0,G.jsx)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`})}),nO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`})]}),rO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.25638 6.33803C1.50583 4.83684 2.49311 3 4.05053 3V4.7747C3.72017 4.7747 3.51074 5.16433 3.66995 5.48277L2.25638 6.33803Z`,fill:`#9489DB`})]}),iO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`})]}),aO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3ZM8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317Z`,fill:`#9489DB`})]}),oO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M15.7489 3C14.9733 3 14.2643 3.48204 13.9175 4.24516L15.3604 5.03882C15.434 4.87695 15.5844 4.7747 15.7489 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M20.9495 4.7747H15.7489V3H20.9495C22.5069 3 23.4942 4.83684 22.7436 6.33803L21.3301 5.48277C21.4893 5.16433 21.2798 4.7747 20.9495 4.7747Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`})]}),sO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M17.9964 15.833L22.7436 6.33803L21.3301 5.48277L16.5828 14.9778L17.9964 15.833Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.25638 6.33803C1.50583 4.83684 2.49311 3 4.05053 3V4.7747C3.72017 4.7747 3.51074 5.16433 3.66995 5.48277L2.25638 6.33803ZM6.93059 15.687L8.34416 14.8317C8.51289 15.1692 8.95664 15.1596 9.11322 14.8151L10.519 15.687C9.75015 17.2339 7.71306 17.252 6.93059 15.687ZM15.3604 5.03882C15.434 4.87695 15.5844 4.7747 15.7489 4.7747H20.9495C21.2798 4.7747 21.4893 5.16433 21.3301 5.48277L22.7436 6.33803C23.4942 4.83684 22.5069 3 20.9495 3H15.7489C14.9733 3 14.2643 3.48204 13.9175 4.24516L15.3604 5.03882Z`,fill:`#9489DB`})]}),cO=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M14.4244 15.865C15.2179 17.3926 17.2257 17.3746 17.9964 15.833L16.5828 14.9778C16.4193 15.3047 15.9934 15.3086 15.8251 14.9846L14.4244 15.865Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.0406 13.2011L14.4244 15.865L15.8251 14.9846L14.4413 12.3206L13.0406 13.2011Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.3408 11.9904C12.954 12.2335 12.8196 12.7756 13.0406 13.2011L14.4413 12.3206C14.2203 11.8951 13.7276 11.7473 13.3408 11.9904Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M15.7489 3C14.9733 3 14.2643 3.48204 13.9175 4.24516L15.3604 5.03882C15.434 4.87695 15.5844 4.7747 15.7489 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M20.9495 3H15.7489V4.7747H20.9495V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M22.7436 6.33803C23.4942 4.83684 22.5069 3 20.9495 3V4.7747C21.2798 4.7747 21.4893 5.16433 21.3301 5.48277L22.7436 6.33803Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M17.9964 15.833L22.7436 6.33803L21.3301 5.48277L16.5828 14.9778L17.9964 15.833Z`,fill:`#9489DB`})]}),lO=()=>{let e=[U.createElement(tO,null),U.createElement(nO,null),U.createElement(rO,null),U.createElement(iO,null),U.createElement(aO,null),U.createElement(oO,null),U.createElement(sO,null),U.createElement(cO,null)],[t,n]=(0,U.useState)(!0),[r,i]=(0,U.useState)(!0);(0,U.useEffect)(()=>()=>{i(!1)},[]);let a=MD(e,{loop:t,from:{opacity:0},enter:{opacity:1},trail:100,config:{duration:1500},onRest:()=>r&&n(!t)})((e,t)=>U.createElement(eO.div,{style:{...e,gridRowStart:1,gridColumnStart:1}},t));return U.createElement(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`}},a)},uO=e=>(0,G.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM18.8485 9.24853C19.3172 8.7799 19.3172 8.0201 18.8485 7.55147C18.3799 7.08284 17.6201 7.08284 17.1515 7.55147L9.6 15.1029L6.84853 12.3515C6.3799 11.8828 5.6201 11.8828 5.15147 12.3515C4.68284 12.8201 4.68284 13.5799 5.15147 14.0485L9.6 18.4971L18.8485 9.24853Z`,fill:`#5FCA7D`})}),dO=e=>(0,G.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M21.4286 12C21.4286 17.2073 17.2073 21.4286 12 21.4286C6.79274 21.4286 2.57143 17.2073 2.57143 12C2.57143 6.79274 6.79274 2.57143 12 2.57143C17.2073 2.57143 21.4286 6.79274 21.4286 12ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM7.37141 8.66656L10.7049 12.0001L7.37144 15.3336L8.58362 16.5458L11.9171 13.2123L15.2506 16.5458L16.4628 15.3336L13.1293 12.0001L16.4628 8.66656L15.2506 7.45438L11.9171 10.7879L8.58359 7.45438L7.37141 8.66656Z`,fill:`#E6635A`})}),fO=e=>(0,G.jsx)(`svg`,{width:14,height:14,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.5 7C12.5 10.0376 10.0376 12.5 7 12.5C3.96243 12.5 1.5 10.0376 1.5 7C1.5 3.96243 3.96243 1.5 7 1.5C10.0376 1.5 12.5 3.96243 12.5 7ZM14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7ZM4.3 5.05546L6.24455 7.00002L4.30002 8.94455L5.00712 9.65166L6.95166 7.70712L8.89619 9.65166L9.6033 8.94455L7.65877 7.00002L9.60332 5.05546L8.89621 4.34836L6.95166 6.29291L5.00711 4.34836L4.3 5.05546Z`,fill:`#E6635A`})}),pO=document,mO=()=>pO,{min:hO,max:gO}=Math,_O=(e,t=0,n=1)=>hO(gO(t,e),n),vO=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=_O(e[t],0,255)):t===3&&(e[t]=_O(e[t],0,1));return e},yO={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])yO[`[object ${e}]`]=e.toLowerCase();function Y(e){return yO[Object.prototype.toString.call(e)]||`object`}var X=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):Y(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),bO=e=>{if(e.length<2)return null;let t=e.length-1;return Y(e[t])==`string`?e[t].toLowerCase():null},{PI:xO,min:SO,max:CO}=Math,wO=e=>Math.round(e*100)/100,TO=e=>Math.round(e*100)/100,EO=xO*2,DO=xO/3,OO=xO/180,kO=180/xO;function AO(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var Z={format:{},autodetect:[]},Q=class{constructor(...e){let t=this;if(Y(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=bO(e),r=!1;if(!n){r=!0,Z.sorted||=(Z.autodetect=Z.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of Z.autodetect)if(n=t.test(...e),n)break}if(Z.format[n])t._rgb=vO(Z.format[n].apply(null,r?e:e.slice(0,-1)));else throw Error(`unknown format: `+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return Y(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}},jO=`3.2.0`,$=(...e)=>new Q(...e);$.version=jO;var MO={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,laserlemon:`#ffff54`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrod:`#fafad2`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,maroon2:`#7f0000`,maroon3:`#b03060`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,purple2:`#7f007f`,purple3:`#a020f0`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},NO=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,PO=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,FO=e=>{if(e.match(NO)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return[t>>16,t>>8&255,t&255,1]}if(e.match(PO)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);let t=parseInt(e,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((t&255)/255*100)/100]}throw Error(`unknown hex color: ${e}`)},{round:IO}=Math,LO=(...e)=>{let[t,n,r,i]=X(e,`rgba`),a=bO(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=IO(t),n=IO(n),r=IO(r);let o=`000000`+(t<<16|n<<8|r).toString(16);o=o.substr(o.length-6);let s=`0`+IO(i*255).toString(16);switch(s=s.substr(s.length-2),a.toLowerCase()){case`rgba`:return`#${o}${s}`;case`argb`:return`#${s}${o}`;default:return`#${o}`}};Q.prototype.name=function(){let e=LO(this._rgb,`rgb`);for(let t of Object.keys(MO))if(MO[t]===e)return t.toLowerCase();return e},Z.format.named=e=>{if(e=e.toLowerCase(),MO[e])return FO(MO[e]);throw Error(`unknown color name: `+e)},Z.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Y(e)===`string`&&MO[e.toLowerCase()])return`named`}}),Q.prototype.alpha=function(e,t=!1){return e!==void 0&&Y(e)===`number`?t?(this._rgb[3]=e,this):new Q([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},Q.prototype.clipped=function(){return this._rgb._clipped||!1};var RO={Kn:18,labWhitePoint:`d65`,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},zO=new Map([[`a`,[1.0985,.35585]],[`b`,[1.0985,.35585]],[`c`,[.98074,1.18232]],[`d50`,[.96422,.82521]],[`d55`,[.95682,.92149]],[`d65`,[.95047,1.08883]],[`e`,[1,1,1]],[`f2`,[.99186,.67393]],[`f7`,[.95041,1.08747]],[`f11`,[1.00962,.6435]],[`icc`,[.96422,.82521]]]);function BO(e){let t=zO.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);RO.labWhitePoint=e,RO.Xn=t[0],RO.Zn=t[1]}function VO(){return RO.labWhitePoint}var HO=(...e)=>{e=X(e,`lab`);let[t,n,r]=e,[i,a,o]=UO(t,n,r),[s,c,l]=GO(i,a,o);return[s,c,l,e.length>3?e[3]:1]},UO=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=RO,l=(e+16)/116,u=.002*t+l,d=l-.005*n,f=u*u*u,p=d*d*d,m=f>r?f:(116*u-16)/i,h=e>a?((e+16)/116)**3:e/i,g=p>r?p:(116*d-16)/i;return[m*o,h*s,g*c]},WO=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},GO=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=RO,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,f=s*r.m02+c*r.m12+l*r.m22,p=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,m=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,h=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,g=(e*r.m00+t*r.m10+n*r.m20)*(p/u),_=(e*r.m01+t*r.m11+n*r.m21)*(m/d),v=(e*r.m02+t*r.m12+n*r.m22)*(h/f),y=g*i.m00+_*i.m10+v*i.m20,b=g*i.m01+_*i.m11+v*i.m21,x=g*i.m02+_*i.m12+v*i.m22,S=WO(y*a.m00+b*a.m10+x*a.m20),C=WO(y*a.m01+b*a.m11+x*a.m21),w=WO(y*a.m02+b*a.m12+x*a.m22);return[S*255,C*255,w*255]},KO=(...e)=>{let[t,n,r,...i]=X(e,`rgb`),[a,o,s]=YO(t,n,r),[c,l,u]=qO(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function qO(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=RO,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,f=l>o?l**(1/3):(s*l+16)/116,p=u>o?u**(1/3):(s*u+16)/116;return[116*f-16,500*(d-f),200*(f-p)]}function JO(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}var YO=(e,t,n)=>{e=JO(e/255),t=JO(t/255),n=JO(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=RO,f=e*r.m00+t*r.m10+n*r.m20,p=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22,h=o*i.m00+s*i.m10+c*i.m20,g=o*i.m01+s*i.m11+c*i.m21,_=o*i.m02+s*i.m12+c*i.m22,v=f*i.m00+p*i.m10+m*i.m20,y=f*i.m01+p*i.m11+m*i.m21,b=f*i.m02+p*i.m12+m*i.m22;return v*=h/l,y*=g/u,b*=_/d,f=v*a.m00+y*a.m10+b*a.m20,p=v*a.m01+y*a.m11+b*a.m21,m=v*a.m02+y*a.m12+b*a.m22,[f,p,m]};Q.prototype.lab=function(){return KO(this._rgb)},Object.assign($,{lab:(...e)=>new Q(...e,`lab`),getLabWhitePoint:VO,setLabWhitePoint:BO}),Z.format.lab=HO,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`lab`),Y(e)===`array`&&e.length===3)return`lab`}}),Q.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=RO.Kn*e,new Q(n,`lab`).alpha(t.alpha(),!0)},Q.prototype.brighten=function(e=1){return this.darken(-e)},Q.prototype.darker=Q.prototype.darken,Q.prototype.brighter=Q.prototype.brighten,Q.prototype.get=function(e){let[t,n]=e.split(`.`),r=this[t]();if(n){let e=t.indexOf(n)-(t.substr(0,2)===`ok`?2:0);if(e>-1)return r[e];throw Error(`unknown channel ${n} in mode ${t}`)}return r};var{pow:XO}=Math,ZO=1e-7,QO=20;Q.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&Y(e)===`number`){if(e===0)return new Q([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new Q([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=QO,i=(n,a)=>{let o=n.interpolate(a,.5,t),s=o.luminance();return Math.abs(e-s)<ZO||!r--?o:s>e?i(n,o):i(o,a)};return new Q([...(n>e?i(new Q([0,0,0]),this):i(this,new Q([255,255,255]))).rgb(),this._rgb[3]])}return $O(...this._rgb.slice(0,3))};var $O=(e,t,n)=>(e=ek(e),t=ek(t),n=ek(n),.2126*e+.7152*t+.0722*n),ek=e=>(e/=255,e<=.03928?e/12.92:XO((e+.055)/1.055,2.4)),tk={},nk=(e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!tk[i]&&!r.length&&(i=Object.keys(tk)[0]),!tk[i])throw Error(`interpolation mode ${i} is not defined`);return Y(e)!==`object`&&(e=new Q(e)),Y(t)!==`object`&&(t=new Q(t)),tk[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};Q.prototype.mix=Q.prototype.interpolate=function(e,t=.5,...n){return nk(this,e,t,...n)},Q.prototype.premultiply=function(e=!1){let t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new Q([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};var{sin:rk,cos:ik}=Math,ak=(...e)=>{let[t,n,r]=X(e,`lch`);return isNaN(r)&&(r=0),r*=OO,[t,ik(r)*n,rk(r)*n]},ok=(...e)=>{e=X(e,`lch`);let[t,n,r]=e,[i,a,o]=ak(t,n,r),[s,c,l]=HO(i,a,o);return[s,c,l,e.length>3?e[3]:1]},sk=(...e)=>ok(...AO(X(e,`hcl`))),{sqrt:ck,atan2:lk,round:uk}=Math,dk=(...e)=>{let[t,n,r]=X(e,`lab`),i=ck(n*n+r*r),a=(lk(r,n)*kO+360)%360;return uk(i*1e4)===0&&(a=NaN),[t,i,a]},fk=(...e)=>{let[t,n,r,...i]=X(e,`rgb`),[a,o,s]=KO(t,n,r),[c,l,u]=dk(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};Q.prototype.lch=function(){return fk(this._rgb)},Q.prototype.hcl=function(){return AO(fk(this._rgb))},Object.assign($,{lch:(...e)=>new Q(...e,`lch`),hcl:(...e)=>new Q(...e,`hcl`)}),Z.format.lch=ok,Z.format.hcl=sk,[`lch`,`hcl`].forEach(e=>Z.autodetect.push({p:2,test:(...t)=>{if(t=X(t,e),Y(t)===`array`&&t.length===3)return e}})),Q.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=RO.Kn*e,n[1]<0&&(n[1]=0),new Q(n,`lch`).alpha(t.alpha(),!0)},Q.prototype.desaturate=function(e=1){return this.saturate(-e)},Q.prototype.set=function(e,t,n=!1){let[r,i]=e.split(`.`),a=this[r]();if(i){let e=r.indexOf(i)-(r.substr(0,2)===`ok`?2:0);if(e>-1){if(Y(t)==`string`)switch(t.charAt(0)){case`+`:a[e]+=+t;break;case`-`:a[e]+=+t;break;case`*`:a[e]*=+t.substr(1);break;case`/`:a[e]/=+t.substr(1);break;default:a[e]=+t}else if(Y(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new Q(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}return a},Q.prototype.tint=function(e=.5,...t){return nk(this,`white`,e,...t)},Q.prototype.shade=function(e=.5,...t){return nk(this,`black`,e,...t)},tk.rgb=(e,t,n)=>{let r=e._rgb,i=t._rgb;return new Q(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)};var{sqrt:pk,pow:mk}=Math;tk.lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new Q(pk(mk(r,2)*(1-n)+mk(o,2)*n),pk(mk(i,2)*(1-n)+mk(s,2)*n),pk(mk(a,2)*(1-n)+mk(c,2)*n),`rgb`)},tk.lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new Q(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};var hk=(e,t,n,r)=>{let i,a;r===`hsl`?(i=e.hsl(),a=t.hsl()):r===`hsv`?(i=e.hsv(),a=t.hsv()):r===`hcg`?(i=e.hcg(),a=t.hcg()):r===`hsi`?(i=e.hsi(),a=t.hsi()):r===`lch`||r===`hcl`?(r=`hcl`,i=e.hcl(),a=t.hcl()):r===`oklch`&&(i=e.oklch().reverse(),a=t.oklch().reverse());let o,s,c,l,u,d;(r.substr(0,1)===`h`||r===`oklch`)&&([o,c,u]=i,[s,l,d]=a);let f,p,m,h;return!isNaN(o)&&!isNaN(s)?(h=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,p=o+n*h):isNaN(o)?isNaN(s)?p=NaN:(p=s,(u==1||u==0)&&r!=`hsv`&&(f=l)):(p=o,(d==1||d==0)&&r!=`hsv`&&(f=c)),f===void 0&&(f=c+n*(l-c)),m=u+n*(d-u),r===`oklch`?new Q([m,f,p],r):new Q([p,f,m],r)},gk=(e,t,n)=>hk(e,t,n,`lch`);tk.lch=gk,tk.hcl=gk;var _k=e=>{if(Y(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},vk=(...e)=>{let[t,n,r]=X(e,`rgb`);return(t<<16)+(n<<8)+r};Q.prototype.num=function(){return vk(this._rgb)},Object.assign($,{num:(...e)=>new Q(...e,`num`)}),Z.format.num=_k,Z.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Y(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}}),tk.num=(e,t,n)=>{let r=e.num();return new Q(r+n*(t.num()-r),`num`)};var{floor:yk}=Math,bk=(...e)=>{e=X(e,`hcg`);let[t,n,r]=e,i,a,o;r*=255;let s=n*255;if(n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=yk(t),c=t-e,l=r*(1-n),u=l+s*(1-c),d=l+s*c,f=l+s;switch(e){case 0:[i,a,o]=[f,d,l];break;case 1:[i,a,o]=[u,f,l];break;case 2:[i,a,o]=[l,f,d];break;case 3:[i,a,o]=[l,u,f];break;case 4:[i,a,o]=[d,l,f];break;case 5:[i,a,o]=[f,l,u]}}return[i,a,o,e.length>3?e[3]:1]},xk=(...e)=>{let[t,n,r]=X(e,`rgb`),i=SO(t,n,r),a=CO(t,n,r),o=a-i,s=o*100/255,c=i/(255-o)*100,l;return o===0?l=NaN:(t===a&&(l=(n-r)/o),n===a&&(l=2+(r-t)/o),r===a&&(l=4+(t-n)/o),l*=60,l<0&&(l+=360)),[l,s,c]};Q.prototype.hcg=function(){return xk(this._rgb)},$.hcg=(...e)=>new Q(...e,`hcg`),Z.format.hcg=bk,Z.autodetect.push({p:1,test:(...e)=>{if(e=X(e,`hcg`),Y(e)===`array`&&e.length===3)return`hcg`}}),tk.hcg=(e,t,n)=>hk(e,t,n,`hcg`);var{cos:Sk}=Math,Ck=(...e)=>{e=X(e,`hsi`);let[t,n,r]=e,i,a,o;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-n)/3,i=(1+n*Sk(EO*t)/Sk(DO-EO*t))/3,a=1-(o+i)):t<2/3?(t-=1/3,i=(1-n)/3,a=(1+n*Sk(EO*t)/Sk(DO-EO*t))/3,o=1-(i+a)):(t-=2/3,a=(1-n)/3,o=(1+n*Sk(EO*t)/Sk(DO-EO*t))/3,i=1-(a+o)),i=_O(r*i*3),a=_O(r*a*3),o=_O(r*o*3),[i*255,a*255,o*255,e.length>3?e[3]:1]},{min:wk,sqrt:Tk,acos:Ek}=Math,Dk=(...e)=>{let[t,n,r]=X(e,`rgb`);t/=255,n/=255,r/=255;let i,a=wk(t,n,r),o=(t+n+r)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(t-n+(t-r))/2,i/=Tk((t-n)*(t-n)+(t-r)*(n-r)),i=Ek(i),r>n&&(i=EO-i),i/=EO),[i*360,s,o]};Q.prototype.hsi=function(){return Dk(this._rgb)},$.hsi=(...e)=>new Q(...e,`hsi`),Z.format.hsi=Ck,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`hsi`),Y(e)===`array`&&e.length===3)return`hsi`}}),tk.hsi=(e,t,n)=>hk(e,t,n,`hsi`);var Ok=(...e)=>{e=X(e,`hsl`);let[t,n,r]=e,i,a,o;if(n===0)i=a=o=r*255;else{let e=[0,0,0],s=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,l=2*r-c,u=t/360;e[0]=u+1/3,e[1]=u,e[2]=u-1/3;for(let t=0;t<3;t++)e[t]<0&&(e[t]+=1),e[t]>1&&--e[t],6*e[t]<1?s[t]=l+(c-l)*6*e[t]:2*e[t]<1?s[t]=c:3*e[t]<2?s[t]=l+(c-l)*(2/3-e[t])*6:s[t]=l;[i,a,o]=[s[0]*255,s[1]*255,s[2]*255]}return e.length>3?[i,a,o,e[3]]:[i,a,o,1]},kk=(...e)=>{e=X(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=SO(t,n,r),a=CO(t,n,r),o=(a+i)/2,s,c;return a===i?(s=0,c=NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?c=(n-r)/(a-i):n==a?c=2+(r-t)/(a-i):r==a&&(c=4+(t-n)/(a-i)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,s,o,e[3]]:[c,s,o]};Q.prototype.hsl=function(){return kk(this._rgb)},$.hsl=(...e)=>new Q(...e,`hsl`),Z.format.hsl=Ok,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`hsl`),Y(e)===`array`&&e.length===3)return`hsl`}}),tk.hsl=(e,t,n)=>hk(e,t,n,`hsl`);var{floor:Ak}=Math,jk=(...e)=>{e=X(e,`hsv`);let[t,n,r]=e,i,a,o;if(r*=255,n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=Ak(t),s=t-e,c=r*(1-n),l=r*(1-n*s),u=r*(1-n*(1-s));switch(e){case 0:[i,a,o]=[r,u,c];break;case 1:[i,a,o]=[l,r,c];break;case 2:[i,a,o]=[c,r,u];break;case 3:[i,a,o]=[c,l,r];break;case 4:[i,a,o]=[u,c,r];break;case 5:[i,a,o]=[r,c,l]}}return[i,a,o,e.length>3?e[3]:1]},{min:Mk,max:Nk}=Math,Pk=(...e)=>{e=X(e,`rgb`);let[t,n,r]=e,i=Mk(t,n,r),a=Nk(t,n,r),o=a-i,s,c,l;return l=a/255,a===0?(s=NaN,c=0):(c=o/a,t===a&&(s=(n-r)/o),n===a&&(s=2+(r-t)/o),r===a&&(s=4+(t-n)/o),s*=60,s<0&&(s+=360)),[s,c,l]};Q.prototype.hsv=function(){return Pk(this._rgb)},$.hsv=(...e)=>new Q(...e,`hsv`),Z.format.hsv=jk,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`hsv`),Y(e)===`array`&&e.length===3)return`hsv`}}),tk.hsv=(e,t,n)=>hk(e,t,n,`hsv`);function Fk(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>Array.isArray(e)?e.reduce((e,n,r)=>e+n*(t[r]||0),0):t.reduce((t,n)=>t+n*e,0)));return n===1&&(a=a[0]),r===1?a.map(e=>e[0]):a}var Ik=(...e)=>{e=X(e,`lab`);let[t,n,r,...i]=e,[a,o,s]=Lk([t,n,r]),[c,l,u]=GO(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function Lk(e){return Fk([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],Fk([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}var Rk=(...e)=>{let[t,n,r,...i]=X(e,`rgb`);return[...zk(YO(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function zk(e){return Fk([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Fk([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}Q.prototype.oklab=function(){return Rk(this._rgb)},Object.assign($,{oklab:(...e)=>new Q(...e,`oklab`)}),Z.format.oklab=Ik,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`oklab`),Y(e)===`array`&&e.length===3)return`oklab`}}),tk.oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new Q(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)},tk.oklch=(e,t,n)=>hk(e,t,n,`oklch`);var{pow:Bk,sqrt:Vk,PI:Hk,cos:Uk,sin:Wk,atan2:Gk}=Math,Kk=(e,t=`lrgb`,n=null)=>{let r=e.length;n||=Array.from(Array(r)).map(()=>1);let i=r/n.reduce(function(e,t){return e+t});if(n.forEach((e,t)=>{n[t]*=i}),e=e.map(e=>new Q(e)),t===`lrgb`)return qk(e,n);let a=e.shift(),o=a.get(t),s=[],c=0,l=0;for(let e=0;e<o.length;e++)if(o[e]=(o[e]||0)*n[0],s.push(isNaN(o[e])?0:n[0]),t.charAt(e)===`h`&&!isNaN(o[e])){let t=o[e]/180*Hk;c+=Uk(t)*n[0],l+=Wk(t)*n[0]}let u=a.alpha()*n[0];e.forEach((e,r)=>{let i=e.get(t);u+=e.alpha()*n[r+1];for(let e=0;e<o.length;e++)if(!isNaN(i[e])){if(s[e]+=n[r+1],t.charAt(e)===`h`){let t=i[e]/180*Hk;c+=Uk(t)*n[r+1],l+=Wk(t)*n[r+1]}else o[e]+=i[e]*n[r+1]}});for(let e=0;e<o.length;e++)if(t.charAt(e)===`h`){let t=Gk(l/s[e],c/s[e])/Hk*180;for(;t<0;)t+=360;for(;t>=360;)t-=360;o[e]=t}else o[e]=o[e]/s[e];return u/=r,new Q(o,t).alpha(u>.99999?1:u,!0)},qk=(e,t)=>{let n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){let a=e[i],o=t[i]/n,s=a._rgb;r[0]+=Bk(s[0],2)*o,r[1]+=Bk(s[1],2)*o,r[2]+=Bk(s[2],2)*o,r[3]+=s[3]*o}return r[0]=Vk(r[0]),r[1]=Vk(r[1]),r[2]=Vk(r[2]),r[3]>.9999999&&(r[3]=1),new Q(vO(r))},{pow:Jk}=Math;function Yk(e){let t=`rgb`,n=$(`#ccc`),r=0,i=[0,1],a=[0,1],o=[],s=[0,0],c=!1,l=[],u=!1,d=0,f=1,p=!1,m={},h=!0,g=1,_=function(e){if(e||=[`#fff`,`#000`],e&&Y(e)===`string`&&$.brewer&&$.brewer[e.toLowerCase()]&&(e=$.brewer[e.toLowerCase()]),Y(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=$(e[t]);o.length=0;for(let t=0;t<e.length;t++)o.push(t/(e.length-1))}return S(),l=e},v=function(e){if(c!=null){let t=c.length-1,n=0;for(;n<t&&e>=c[n];)n++;return n-1}return 0},y=e=>e,b=e=>e,x=function(e,r){let i,a;if(r??=!1,isNaN(e)||e===null)return n;a=r?e:c&&c.length>2?v(e)/(c.length-2):f===d?1:(e-d)/(f-d),a=b(a),r||(a=y(a)),g!==1&&(a=Jk(a,g)),a=s[0]+a*(1-s[0]-s[1]),a=_O(a,0,1);let u=Math.floor(a*1e4);if(h&&m[u])i=m[u];else{if(Y(l)===`array`)for(let e=0;e<o.length;e++){let n=o[e];if(a<=n){i=l[e];break}if(a>=n&&e===o.length-1){i=l[e];break}if(a>n&&a<o[e+1]){a=(a-n)/(o[e+1]-n),i=$.interpolate(l[e],l[e+1],a,t);break}}else Y(l)===`function`&&(i=l(a));h&&(m[u]=i)}return i};var S=()=>m={};_(e);let C=function(e){let t=$(x(e));return u&&t[u]?t[u]():t};return C.classes=function(e){if(e!=null){if(Y(e)===`array`)c=e,i=[e[0],e[e.length-1]];else{let t=$.analyze(i);c=e===0?[t.min,t.max]:$.limits(t,`e`,e)}return C}return c},C.domain=function(e){if(!arguments.length)return a;a=e.slice(0),d=e[0],f=e[e.length-1],o=[];let t=l.length;if(e.length===t&&d!==f)for(let t of Array.from(e))o.push((t-d)/(f-d));else{for(let e=0;e<t;e++)o.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-d)/(f-d));n.every((e,n)=>t[n]===e)||(b=e=>{if(e<=0||e>=1)return e;let r=0;for(;e>=n[r+1];)r++;let i=(e-n[r])/(n[r+1]-n[r]);return t[r]+i*(t[r+1]-t[r])})}}return i=[d,f],C},C.mode=function(e){return arguments.length?(t=e,S(),C):t},C.range=function(e,t){return _(e,t),C},C.out=function(e){return u=e,C},C.spread=function(e){return arguments.length?(r=e,C):r},C.correctLightness=function(e){return e??=!0,p=e,S(),y=p?function(e){let t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],r=t>n,i=x(e,!0).lab()[0],a=t+(n-t)*e,o=i-a,s=0,c=1,l=20;for(;Math.abs(o)>.01&&l-->0;)(function(){return r&&(o*=-1),o<0?(s=e,e+=(c-e)*.5):(c=e,e+=(s-e)*.5),i=x(e,!0).lab()[0],o=i-a})();return e}:e=>e,C},C.padding=function(e){return e==null?s:(Y(e)===`number`&&(e=[e,e]),s=e,C)},C.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=l.slice(0);else if(t===1)r=[C(.5)];else if(t>1){let e=i[0],n=i[1]-e;r=Xk(0,t,!1).map(r=>C(e+r/(t-1)*n))}else{e=[];let t=[];if(c&&c.length>2)for(let e=1,n=c.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((c[e-1]+c[e])*.5);else t=i;r=t.map(e=>C(e))}return $[n]&&(r=r.map(e=>e[n]())),r},C.cache=function(e){return e==null?h:(h=e,C)},C.gamma=function(e){return e==null?g:(g=e,C)},C.nodata=function(e){return e==null?n:(n=$(e),C)},C}function Xk(e,t,n){let r=[],i=e<t,a=n?i?t+1:t-1:t;for(let t=e;i?t<a:t>a;i?t++:t--)r.push(t);return r}var Zk=function(e){let t=[1,1];for(let n=1;n<e;n++){let e=[1];for(let n=1;n<=t.length;n++)e[n]=(t[n]||0)+t[n-1];t=e}return t},Qk=function(e){let t,n,r,i;if(e=e.map(e=>new Q(e)),e.length===2)[n,r]=e.map(e=>e.lab()),t=function(e){return new Q([0,1,2].map(t=>n[t]+e*(r[t]-n[t])),`lab`)};else if(e.length===3)[n,r,i]=e.map(e=>e.lab()),t=function(e){return new Q([0,1,2].map(t=>(1-e)*(1-e)*n[t]+2*(1-e)*e*r[t]+e*e*i[t]),`lab`)};else if(e.length===4){let a;[n,r,i,a]=e.map(e=>e.lab()),t=function(e){return new Q([0,1,2].map(t=>(1-e)*(1-e)*(1-e)*n[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*i[t]+e*e*e*a[t]),`lab`)}}else if(e.length>=5){let n,r,i;n=e.map(e=>e.lab()),i=e.length-1,r=Zk(i),t=function(e){let t=1-e;return new Q([0,1,2].map(a=>n.reduce((n,o,s)=>n+r[s]*t**(i-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return t},$k=e=>{let t=Qk(e);return t.scale=()=>Yk(t),t},{round:eA}=Math;Q.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(eA)},Q.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:eA(t):t)},Object.assign($,{rgb:(...e)=>new Q(...e,`rgb`)}),Z.format.rgb=(...e)=>{let t=X(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},Z.autodetect.push({p:3,test:(...e)=>{if(e=X(e,`rgba`),Y(e)===`array`&&(e.length===3||e.length===4&&Y(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});var tA=(e,t,n)=>{if(!tA[n])throw Error(`unknown blend mode `+n);return tA[n](e,t)},nA=e=>(t,n)=>{let r=$(n).rgb(),i=$(t).rgb();return $.rgb(e(r,i))},rA=e=>(t,n)=>{let r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r};tA.normal=nA(rA(e=>e)),tA.multiply=nA(rA((e,t)=>e*t/255)),tA.screen=nA(rA((e,t)=>255*(1-(1-e/255)*(1-t/255)))),tA.overlay=nA(rA((e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)))),tA.darken=nA(rA((e,t)=>e>t?t:e)),tA.lighten=nA(rA((e,t)=>e>t?e:t)),tA.dodge=nA(rA((e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e))),tA.burn=nA(rA((e,t)=>255*(1-(1-t/255)/(e/255))));var{pow:iA,sin:aA,cos:oA}=Math;function sA(e=300,t=-1.5,n=1,r=1,i=[0,1]){let a=0,o;Y(i)===`array`?o=i[1]-i[0]:(o=0,i=[i,i]);let s=function(s){let c=EO*((e+120)/360+t*s),l=iA(i[0]+o*s,r),u=(a===0?n:n[0]+s*a)*l*(1-l)/2,d=oA(c),f=aA(c),p=l+u*(-.14861*d+1.78277*f),m=l+u*(-.29227*d-.90649*f),h=l+1.97294*d*u;return $(vO([p*255,m*255,h*255,1]))};return s.start=function(t){return t==null?e:(e=t,s)},s.rotations=function(e){return e==null?t:(t=e,s)},s.gamma=function(e){return e==null?r:(r=e,s)},s.hue=function(e){return e==null?n:(n=e,Y(n)===`array`?(a=n[1]-n[0],a===0&&(n=n[1])):a=0,s)},s.lightness=function(e){return e==null?i:(Y(e)===`array`?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=()=>$.scale(s),s.hue(n),s}var cA=`0123456789abcdef`,{floor:lA,random:uA}=Math,dA=(e=uA)=>{let t=`#`;for(let n=0;n<6;n++)t+=cA.charAt(lA(e()*16));return new Q(t,`hex`)},{log:fA,pow:pA,floor:mA,abs:hA}=Math;function gA(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Y(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&Y(e)===`object`&&(e=e[t]),e!=null&&!isNaN(e)&&(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(e,t)=>_A(n,e,t),n}function _A(e,t=`equal`,n=7){Y(e)==`array`&&(e=gA(e));let{min:r,max:i}=e,a=e.values.sort((e,t)=>e-t);if(n===1)return[r,i];let o=[];if(t.substr(0,1)===`c`&&(o.push(r),o.push(i)),t.substr(0,1)===`e`){o.push(r);for(let e=1;e<n;e++)o.push(r+e/n*(i-r));o.push(i)}else if(t.substr(0,1)===`l`){if(r<=0)throw Error(`Logarithmic scales are only possible for values > 0`);let e=Math.LOG10E*fA(r),t=Math.LOG10E*fA(i);o.push(r);for(let r=1;r<n;r++)o.push(pA(10,e+r/n*(t-e)));o.push(i)}else if(t.substr(0,1)===`q`){o.push(r);for(let e=1;e<n;e++){let t=(a.length-1)*e/n,r=mA(t);if(r===t)o.push(a[r]);else{let e=t-r;o.push(a[r]*(1-e)+a[r+1]*e)}}o.push(i)}else if(t.substr(0,1)===`k`){let e,t=a.length,s=Array(t),c=Array(n),l=!0,u=0,d=null;d=[],d.push(r);for(let e=1;e<n;e++)d.push(r+e/n*(i-r));for(d.push(i);l;){for(let e=0;e<n;e++)c[e]=0;for(let e=0;e<t;e++){let t=a[e],r=Number.MAX_VALUE,i;for(let a=0;a<n;a++){let n=hA(d[a]-t);n<r&&(r=n,i=a),c[i]++,s[e]=i}}let r=Array(n);for(let e=0;e<n;e++)r[e]=null;for(let n=0;n<t;n++)e=s[n],r[e]===null?r[e]=a[n]:r[e]+=a[n];for(let e=0;e<n;e++)r[e]*=1/c[e];l=!1;for(let e=0;e<n;e++)if(r[e]!==d[e]){l=!0;break}d=r,u++,u>200&&(l=!1)}let f={};for(let e=0;e<n;e++)f[e]=[];for(let n=0;n<t;n++)e=s[n],f[e].push(a[n]);let p=[];for(let e=0;e<n;e++)p.push(f[e][0]),p.push(f[e][f[e].length-1]);p=p.sort((e,t)=>e-t),o.push(p[0]);for(let e=1;e<p.length;e+=2){let t=p[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var vA=(e,t)=>{e=new Q(e),t=new Q(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},yA=.027,bA=5e-4,xA=.1,SA=1.14,CA=.022,wA=1.414,TA=(e,t)=>{e=new Q(e),t=new Q(t),e.alpha()<1&&(e=nk(t,e,e.alpha(),`rgb`));let n=EA(...e.rgb()),r=EA(...t.rgb()),i=n>=CA?n:n+(CA-n)**+wA,a=r>=CA?r:r+(CA-r)**+wA,o=a**.56-i**.57,s=a**.65-i**.62,c=Math.abs(a-i)<bA?0:i<a?o*SA:s*SA;return(Math.abs(c)<xA?0:c>0?c-yA:c+yA)*100};function EA(e,t,n){return .2126729*(e/255)**2.4+.7151522*(t/255)**2.4+.072175*(n/255)**2.4}var{sqrt:DA,pow:OA,min:kA,max:AA,atan2:jA,abs:MA,cos:NA,sin:PA,exp:FA,PI:IA}=Math;function LA(e,t,n=1,r=1,i=1){var a=function(e){return 360*e/(2*IA)},o=function(e){return 2*IA*e/360};e=new Q(e),t=new Q(t);let[s,c,l]=Array.from(e.lab()),[u,d,f]=Array.from(t.lab()),p=(s+u)/2,m=(DA(OA(c,2)+OA(l,2))+DA(OA(d,2)+OA(f,2)))/2,h=.5*(1-DA(OA(m,7)/(OA(m,7)+OA(25,7)))),g=c*(1+h),_=d*(1+h),v=DA(OA(g,2)+OA(l,2)),y=DA(OA(_,2)+OA(f,2)),b=(v+y)/2,x=a(jA(l,g)),S=a(jA(f,_)),C=x>=0?x:x+360,w=S>=0?S:S+360,T=MA(C-w)>180?(C+w+360)/2:(C+w)/2,E=1-.17*NA(o(T-30))+.24*NA(o(2*T))+.32*NA(o(3*T+6))-.2*NA(o(4*T-63)),D=w-C;D=MA(D)<=180?D:w<=C?D+360:D-360,D=2*DA(v*y)*PA(o(D)/2);let O=u-s,ee=y-v,te=1+.015*OA(p-50,2)/DA(20+OA(p-50,2)),ne=1+.045*b,re=1+.015*b*E,k=30*FA(-OA((T-275)/25,2)),A=-(2*DA(OA(b,7)/(OA(b,7)+OA(25,7))))*PA(2*o(k));return AA(0,kA(100,DA(OA(O/(n*te),2)+OA(ee/(r*ne),2)+OA(D/(i*re),2)+A*(ee/(r*ne))*(D/(i*re)))))}function RA(e,t,n=`lab`){e=new Q(e),t=new Q(t);let r=e.get(n),i=t.get(n),a=0;for(let e in r){let t=(r[e]||0)-(i[e]||0);a+=t*t}return Math.sqrt(a)}var zA=(...e)=>{try{return new Q(...e),!0}catch{return!1}},BA={cool(){return Yk([$.hsl(180,1,.9),$.hsl(250,.7,.4)])},hot(){return Yk([`#000`,`#f00`,`#ff0`,`#fff`],[0,.25,.75,1]).mode(`rgb`)}},VA={OrRd:[`#fff7ec`,`#fee8c8`,`#fdd49e`,`#fdbb84`,`#fc8d59`,`#ef6548`,`#d7301f`,`#b30000`,`#7f0000`],PuBu:[`#fff7fb`,`#ece7f2`,`#d0d1e6`,`#a6bddb`,`#74a9cf`,`#3690c0`,`#0570b0`,`#045a8d`,`#023858`],BuPu:[`#f7fcfd`,`#e0ecf4`,`#bfd3e6`,`#9ebcda`,`#8c96c6`,`#8c6bb1`,`#88419d`,`#810f7c`,`#4d004b`],Oranges:[`#fff5eb`,`#fee6ce`,`#fdd0a2`,`#fdae6b`,`#fd8d3c`,`#f16913`,`#d94801`,`#a63603`,`#7f2704`],BuGn:[`#f7fcfd`,`#e5f5f9`,`#ccece6`,`#99d8c9`,`#66c2a4`,`#41ae76`,`#238b45`,`#006d2c`,`#00441b`],YlOrBr:[`#ffffe5`,`#fff7bc`,`#fee391`,`#fec44f`,`#fe9929`,`#ec7014`,`#cc4c02`,`#993404`,`#662506`],YlGn:[`#ffffe5`,`#f7fcb9`,`#d9f0a3`,`#addd8e`,`#78c679`,`#41ab5d`,`#238443`,`#006837`,`#004529`],Reds:[`#fff5f0`,`#fee0d2`,`#fcbba1`,`#fc9272`,`#fb6a4a`,`#ef3b2c`,`#cb181d`,`#a50f15`,`#67000d`],RdPu:[`#fff7f3`,`#fde0dd`,`#fcc5c0`,`#fa9fb5`,`#f768a1`,`#dd3497`,`#ae017e`,`#7a0177`,`#49006a`],Greens:[`#f7fcf5`,`#e5f5e0`,`#c7e9c0`,`#a1d99b`,`#74c476`,`#41ab5d`,`#238b45`,`#006d2c`,`#00441b`],YlGnBu:[`#ffffd9`,`#edf8b1`,`#c7e9b4`,`#7fcdbb`,`#41b6c4`,`#1d91c0`,`#225ea8`,`#253494`,`#081d58`],Purples:[`#fcfbfd`,`#efedf5`,`#dadaeb`,`#bcbddc`,`#9e9ac8`,`#807dba`,`#6a51a3`,`#54278f`,`#3f007d`],GnBu:[`#f7fcf0`,`#e0f3db`,`#ccebc5`,`#a8ddb5`,`#7bccc4`,`#4eb3d3`,`#2b8cbe`,`#0868ac`,`#084081`],Greys:[`#ffffff`,`#f0f0f0`,`#d9d9d9`,`#bdbdbd`,`#969696`,`#737373`,`#525252`,`#252525`,`#000000`],YlOrRd:[`#ffffcc`,`#ffeda0`,`#fed976`,`#feb24c`,`#fd8d3c`,`#fc4e2a`,`#e31a1c`,`#bd0026`,`#800026`],PuRd:[`#f7f4f9`,`#e7e1ef`,`#d4b9da`,`#c994c7`,`#df65b0`,`#e7298a`,`#ce1256`,`#980043`,`#67001f`],Blues:[`#f7fbff`,`#deebf7`,`#c6dbef`,`#9ecae1`,`#6baed6`,`#4292c6`,`#2171b5`,`#08519c`,`#08306b`],PuBuGn:[`#fff7fb`,`#ece2f0`,`#d0d1e6`,`#a6bddb`,`#67a9cf`,`#3690c0`,`#02818a`,`#016c59`,`#014636`],Viridis:[`#440154`,`#482777`,`#3f4a8a`,`#31678e`,`#26838f`,`#1f9d8a`,`#6cce5a`,`#b6de2b`,`#fee825`],Spectral:[`#9e0142`,`#d53e4f`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#e6f598`,`#abdda4`,`#66c2a5`,`#3288bd`,`#5e4fa2`],RdYlGn:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#d9ef8b`,`#a6d96a`,`#66bd63`,`#1a9850`,`#006837`],RdBu:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#f7f7f7`,`#d1e5f0`,`#92c5de`,`#4393c3`,`#2166ac`,`#053061`],PiYG:[`#8e0152`,`#c51b7d`,`#de77ae`,`#f1b6da`,`#fde0ef`,`#f7f7f7`,`#e6f5d0`,`#b8e186`,`#7fbc41`,`#4d9221`,`#276419`],PRGn:[`#40004b`,`#762a83`,`#9970ab`,`#c2a5cf`,`#e7d4e8`,`#f7f7f7`,`#d9f0d3`,`#a6dba0`,`#5aae61`,`#1b7837`,`#00441b`],RdYlBu:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee090`,`#ffffbf`,`#e0f3f8`,`#abd9e9`,`#74add1`,`#4575b4`,`#313695`],BrBG:[`#543005`,`#8c510a`,`#bf812d`,`#dfc27d`,`#f6e8c3`,`#f5f5f5`,`#c7eae5`,`#80cdc1`,`#35978f`,`#01665e`,`#003c30`],RdGy:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#ffffff`,`#e0e0e0`,`#bababa`,`#878787`,`#4d4d4d`,`#1a1a1a`],PuOr:[`#7f3b08`,`#b35806`,`#e08214`,`#fdb863`,`#fee0b6`,`#f7f7f7`,`#d8daeb`,`#b2abd2`,`#8073ac`,`#542788`,`#2d004b`],Set2:[`#66c2a5`,`#fc8d62`,`#8da0cb`,`#e78ac3`,`#a6d854`,`#ffd92f`,`#e5c494`,`#b3b3b3`],Accent:[`#7fc97f`,`#beaed4`,`#fdc086`,`#ffff99`,`#386cb0`,`#f0027f`,`#bf5b17`,`#666666`],Set1:[`#e41a1c`,`#377eb8`,`#4daf4a`,`#984ea3`,`#ff7f00`,`#ffff33`,`#a65628`,`#f781bf`,`#999999`],Set3:[`#8dd3c7`,`#ffffb3`,`#bebada`,`#fb8072`,`#80b1d3`,`#fdb462`,`#b3de69`,`#fccde5`,`#d9d9d9`,`#bc80bd`,`#ccebc5`,`#ffed6f`],Dark2:[`#1b9e77`,`#d95f02`,`#7570b3`,`#e7298a`,`#66a61e`,`#e6ab02`,`#a6761d`,`#666666`],Paired:[`#a6cee3`,`#1f78b4`,`#b2df8a`,`#33a02c`,`#fb9a99`,`#e31a1c`,`#fdbf6f`,`#ff7f00`,`#cab2d6`,`#6a3d9a`,`#ffff99`,`#b15928`],Pastel2:[`#b3e2cd`,`#fdcdac`,`#cbd5e8`,`#f4cae4`,`#e6f5c9`,`#fff2ae`,`#f1e2cc`,`#cccccc`],Pastel1:[`#fbb4ae`,`#b3cde3`,`#ccebc5`,`#decbe4`,`#fed9a6`,`#ffffcc`,`#e5d8bd`,`#fddaec`,`#f2f2f2`]},HA=Object.keys(VA),UA=new Map(HA.map(e=>[e.toLowerCase(),e])),WA=typeof Proxy==`function`?new Proxy(VA,{get(e,t){let n=t.toLowerCase();if(UA.has(n))return e[UA.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(HA)}}):VA,GA=(...e)=>{e=X(e,`cmyk`);let[t,n,r,i]=e,a=e.length>4?e[4]:1;return i===1?[0,0,0,a]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),a]},{max:KA}=Math,qA=(...e)=>{let[t,n,r]=X(e,`rgb`);t/=255,n/=255,r/=255;let i=1-KA(t,KA(n,r)),a=i<1?1/(1-i):0;return[(1-t-i)*a,(1-n-i)*a,(1-r-i)*a,i]};Q.prototype.cmyk=function(){return qA(this._rgb)},Object.assign($,{cmyk:(...e)=>new Q(...e,`cmyk`)}),Z.format.cmyk=GA,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`cmyk`),Y(e)===`array`&&e.length===4)return`cmyk`}});var JA=(...e)=>{let t=X(e,`hsla`),n=bO(e)||`lsa`;return t[0]=wO(t[0]||0)+`deg`,t[1]=wO(t[1]*100)+`%`,t[2]=wO(t[2]*100)+`%`,n===`hsla`||t.length>3&&t[3]<1?(t[3]=`/ `+(t.length>3?t[3]:1),n=`hsla`):t.length=3,`${n.substr(0,3)}(${t.join(` `)})`},YA=(...e)=>{let t=X(e,`lab`),n=bO(e)||`lab`;return t[0]=wO(t[0])+`%`,t[1]=wO(t[1]),t[2]=wO(t[2]),n===`laba`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(` `)})`},XA=(...e)=>{let t=X(e,`lch`),n=bO(e)||`lab`;return t[0]=wO(t[0])+`%`,t[1]=wO(t[1]),t[2]=isNaN(t[2])?`none`:wO(t[2])+`deg`,n===`lcha`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(` `)})`},ZA=(...e)=>{let t=X(e,`lab`);return t[0]=wO(t[0]*100)+`%`,t[1]=TO(t[1]),t[2]=TO(t[2]),t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(` `)})`},QA=(...e)=>{let[t,n,r,...i]=X(e,`rgb`),[a,o,s]=Rk(t,n,r),[c,l,u]=dk(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},$A=(...e)=>{let t=X(e,`lch`);return t[0]=wO(t[0]*100)+`%`,t[1]=TO(t[1]),t[2]=isNaN(t[2])?`none`:wO(t[2])+`deg`,t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(` `)})`},{round:ej}=Math,tj=(...e)=>{let t=X(e,`rgba`),n=bO(e)||`rgb`;if(n.substr(0,3)===`hsl`)return JA(kk(t),n);if(n.substr(0,3)===`lab`){let e=VO();BO(`d50`);let r=YA(KO(t),n);return BO(e),r}if(n.substr(0,3)===`lch`){let e=VO();BO(`d50`);let r=XA(fk(t),n);return BO(e),r}return n.substr(0,5)===`oklab`?ZA(Rk(t)):n.substr(0,5)===`oklch`?$A(QA(t)):(t[0]=ej(t[0]),t[1]=ej(t[1]),t[2]=ej(t[2]),(n===`rgba`||t.length>3&&t[3]<1)&&(t[3]=`/ `+(t.length>3?t[3]:1),n=`rgba`),`${n.substr(0,3)}(${t.slice(0,n===`rgb`?3:4).join(` `)})`)},nj=(...e)=>{e=X(e,`lch`);let[t,n,r,...i]=e,[a,o,s]=ak(t,n,r),[c,l,u]=Ik(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},rj=`((?:-?\\d+)|(?:-?\\d+(?:\\.\\d+)?)%|none)`,ij=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%?)|none)`,aj=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%)|none)`,oj=`\\s*`,sj=`\\s+`,cj=`\\s*,\\s*`,lj=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:deg)?)|none)`,uj=`\\s*(?:\\/\\s*((?:[01]|[01]?\\.\\d+)|\\d+(?:\\.\\d+)?%))?`,dj=RegExp(`^rgba?\\(`+oj+[rj,rj,rj].join(sj)+uj+`\\)$`),fj=RegExp(`^rgb\\(`+oj+[rj,rj,rj].join(cj)+oj+`\\)$`),pj=RegExp(`^rgba\\(`+oj+[rj,rj,rj,ij].join(cj)+oj+`\\)$`),mj=RegExp(`^hsla?\\(`+oj+[lj,aj,aj].join(sj)+uj+`\\)$`),hj=RegExp(`^hsl?\\(`+oj+[lj,aj,aj].join(cj)+oj+`\\)$`),gj=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,_j=RegExp(`^lab\\(`+oj+[ij,ij,ij].join(sj)+uj+`\\)$`),vj=RegExp(`^lch\\(`+oj+[ij,ij,lj].join(sj)+uj+`\\)$`),yj=RegExp(`^oklab\\(`+oj+[ij,ij,ij].join(sj)+uj+`\\)$`),bj=RegExp(`^oklch\\(`+oj+[ij,ij,lj].join(sj)+uj+`\\)$`),{round:xj}=Math,Sj=e=>e.map((e,t)=>t<=2?_O(xj(e),0,255):e),Cj=(e,t=0,n=100,r=!1)=>(typeof e==`string`&&e.endsWith(`%`)&&(e=parseFloat(e.substring(0,e.length-1))/100,e=r?t+(e+1)*.5*(n-t):t+e*(n-t)),+e),wj=(e,t)=>e===`none`?t:e,Tj=e=>{if(e=e.toLowerCase().trim(),e===`transparent`)return[0,0,0,0];let t;if(Z.format.named)try{return Z.format.named(e)}catch{}if((t=e.match(dj))||(t=e.match(fj))){let e=t.slice(1,4);for(let t=0;t<3;t++)e[t]=+Cj(wj(e[t],0),0,255);e=Sj(e);let n=t[4]===void 0?1:+Cj(t[4],0,1);return e[3]=n,e}if(t=e.match(pj)){let e=t.slice(1,5);for(let t=0;t<4;t++)e[t]=+Cj(e[t],0,255);return e}if((t=e.match(mj))||(t=e.match(hj))){let e=t.slice(1,4);e[0]=+wj(e[0].replace(`deg`,``),0),e[1]=Cj(wj(e[1],0),0,100)*.01,e[2]=Cj(wj(e[2],0),0,100)*.01;let n=Sj(Ok(e));return n[3]=t[4]===void 0?1:+Cj(t[4],0,1),n}if(t=e.match(gj)){let e=t.slice(1,4);e[1]*=.01,e[2]*=.01;let n=Ok(e);for(let e=0;e<3;e++)n[e]=xj(n[e]);return n[3]=+t[4],n}if(t=e.match(_j)){let e=t.slice(1,4);e[0]=Cj(wj(e[0],0),0,100),e[1]=Cj(wj(e[1],0),-125,125,!0),e[2]=Cj(wj(e[2],0),-125,125,!0);let n=VO();BO(`d50`);let r=Sj(HO(e));return BO(n),r[3]=t[4]===void 0?1:+Cj(t[4],0,1),r}if(t=e.match(vj)){let e=t.slice(1,4);e[0]=Cj(e[0],0,100),e[1]=Cj(wj(e[1],0),0,150,!1),e[2]=+wj(e[2].replace(`deg`,``),0);let n=VO();BO(`d50`);let r=Sj(ok(e));return BO(n),r[3]=t[4]===void 0?1:+Cj(t[4],0,1),r}if(t=e.match(yj)){let e=t.slice(1,4);e[0]=Cj(wj(e[0],0),0,1),e[1]=Cj(wj(e[1],0),-.4,.4,!0),e[2]=Cj(wj(e[2],0),-.4,.4,!0);let n=Sj(Ik(e));return n[3]=t[4]===void 0?1:+Cj(t[4],0,1),n}if(t=e.match(bj)){let e=t.slice(1,4);e[0]=Cj(wj(e[0],0),0,1),e[1]=Cj(wj(e[1],0),0,.4,!1),e[2]=+wj(e[2].replace(`deg`,``),0);let n=Sj(nj(e));return n[3]=t[4]===void 0?1:+Cj(t[4],0,1),n}};Tj.test=e=>dj.test(e)||mj.test(e)||_j.test(e)||vj.test(e)||yj.test(e)||bj.test(e)||fj.test(e)||pj.test(e)||hj.test(e)||gj.test(e)||e===`transparent`,Q.prototype.css=function(e){return tj(this._rgb,e)},$.css=(...e)=>new Q(...e,`css`),Z.format.css=Tj,Z.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Y(e)===`string`&&Tj.test(e))return`css`}}),Z.format.gl=(...e)=>{let t=X(e,`rgba`);return t[0]*=255,t[1]*=255,t[2]*=255,t},$.gl=(...e)=>new Q(...e,`gl`),Q.prototype.gl=function(){let e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},Q.prototype.hex=function(e){return LO(this._rgb,e)},$.hex=(...e)=>new Q(...e,`hex`),Z.format.hex=FO,Z.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&Y(e)===`string`&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return`hex`}});var{log:Ej}=Math,Dj=e=>{let t=e/100,n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*Ej(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*Ej(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*Ej(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*Ej(r),i=255),[n,r,i,1]},{round:Oj}=Math,kj=(...e)=>{let t=X(e,`rgb`),n=t[0],r=t[2],i=1e3,a=4e4,o;for(;a-i>.4;){o=(a+i)*.5;let e=Dj(o);e[2]/e[0]>=r/n?a=o:i=o}return Oj(o)};Q.prototype.temp=Q.prototype.kelvin=Q.prototype.temperature=function(){return kj(this._rgb)};var Aj=(...e)=>new Q(...e,`temp`);Object.assign($,{temp:Aj,kelvin:Aj,temperature:Aj}),Z.format.temp=Z.format.kelvin=Z.format.temperature=Dj,Q.prototype.oklch=function(){return QA(this._rgb)},Object.assign($,{oklch:(...e)=>new Q(...e,`oklch`)}),Z.format.oklch=nj,Z.autodetect.push({p:2,test:(...e)=>{if(e=X(e,`oklch`),Y(e)===`array`&&e.length===3)return`oklch`}}),Object.assign($,{analyze:gA,average:Kk,bezier:$k,blend:tA,brewer:WA,Color:Q,colors:MO,contrast:vA,contrastAPCA:TA,cubehelix:sA,deltaE:LA,distance:RA,input:Z,interpolate:nk,limits:_A,mix:nk,random:dA,scale:Yk,scales:BA,valid:zA});var jj=()=>window.location.hostname.includes(`greenhouse`),Mj=()=>window.location.hostname.includes(`typo3`),Nj=e=>Mj()||jj()||Pj(e),Pj=e=>!!e.ownerDocument.defaultView?.frameElement,Fj=e=>{let t=getComputedStyle(e),n=t.position===`absolute`,r=/(auto|scroll)/;if(t.position===`fixed`)return document.body;for(let i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position===`static`)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.body},Ij=c((e=>{e.CASE_SENSITIVE_TAG_NAMES_MAP=`animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{})}));function Lj(e){return e.type===Rj.Tag||e.type===Rj.Script||e.type===Rj.Style}var Rj,zj=s((()=>{(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(Rj||={}),Rj.Root,Rj.Text,Rj.Directive,Rj.Comment,Rj.Script,Rj.Style,Rj.Tag,Rj.CDATA,Rj.Doctype}));function Bj(e){return Lj(e)}function Vj(e){return e.type===Rj.CDATA}function Hj(e){return e.type===Rj.Text}function Uj(e){return e.type===Rj.Comment}function Wj(e){return e.type===Rj.Directive}function Gj(e){return e.type===Rj.Root}function Kj(e){return Object.hasOwn(e,`children`)}function qj(e,t=!1){let n;if(Hj(e))n=new Zj(e.data);else if(Uj(e))n=new Qj(e.data);else if(Bj(e)){let r=t?Jj(e.children):[],i=new rM(e.name,{...e.attribs},r);for(let e of r)e.parent=i;e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(Vj(e)){let r=t?Jj(e.children):[],i=new tM(r);for(let e of r)e.parent=i;n=i}else if(Gj(e)){let r=t?Jj(e.children):[],i=new nM(r);for(let e of r)e.parent=i;e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if(Wj(e)){let t=new $j(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function Jj(e){let t=e.map(e=>qj(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}var Yj,Xj,Zj,Qj,$j,eM,tM,nM,rM,iM=s((()=>{zj(),Yj=class{parent=null;prev=null;next=null;startIndex=null;endIndex=null;get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return qj(this,e)}},Xj=class extends Yj{data;constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},Zj=class extends Xj{type=Rj.Text;get nodeType(){return 3}},Qj=class extends Xj{type=Rj.Comment;get nodeType(){return 8}},$j=class extends Xj{type=Rj.Directive;name;constructor(e,t){super(t),this.name=e}get nodeType(){return 1}"x-name";"x-publicId";"x-systemId"},eM=class extends Yj{children;constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},tM=class extends eM{type=Rj.CDATA;get nodeType(){return 4}},nM=class extends eM{type=Rj.Root;get nodeType(){return 9}},rM=class extends eM{name;attribs;type;constructor(e,t,n=[],r=e===`script`?Rj.Script:e===`style`?Rj.Style:Rj.Tag){super(n),this.name=e,this.attribs=t,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}namespace;"x-attribsNamespace";"x-attribsPrefix"}})),aM=l({CDATA:()=>tM,Comment:()=>Qj,DataNode:()=>Xj,Document:()=>nM,DomHandler:()=>sM,Element:()=>rM,Node:()=>Yj,NodeWithChildren:()=>eM,ProcessingInstruction:()=>$j,Text:()=>Zj,cloneNode:()=>qj,default:()=>sM,hasChildren:()=>Kj,isCDATA:()=>Vj,isComment:()=>Uj,isDirective:()=>Wj,isDocument:()=>Gj,isTag:()=>Bj,isText:()=>Hj}),oM,sM,cM=s((()=>{zj(),iM(),iM(),oM={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},sM=class{dom=[];root=new nM(this.dom);callback;options;elementCB;done=!1;tagStack=[this.root];lastNode=null;parser=null;constructor(e,t,n){typeof t==`function`&&(n=t,t=oM),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??oM,this.elementCB=n??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new nM(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){let n=this.options.xmlMode?Rj.Tag:void 0,r=new rM(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)}ontext(e){let{lastNode:t}=this;if(t&&t.type===Rj.Text)t.data+=e,this.options.withEndIndices&&this.parser&&(t.endIndex=this.parser.endIndex);else{let t=new Zj(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===Rj.Comment){this.lastNode.data+=e;return}let t=new Qj(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){let e=new Zj(``),t=new tM([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){let n=new $j(e,t);this.addNode(n)}handleCallback(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e}addNode(e){let t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&this.parser&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null}}})),lM=c((e=>{var t=Ij(),n=(cM(),f(aM)),r=`\r`,i=new RegExp(r,`g`),a=`__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`,o=new RegExp(a,`g`);function s(e){return t.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function c(e){let t={},n=0,r=e.length;for(;n<r;n++){let r=e[n];t[r.name]=r.value}return t}function l(e){return e=e.toLowerCase(),s(e)||e}function u(e,t){let n=`<`+t,r=e.toLowerCase().indexOf(n);if(r===-1)return!1;let i=e[r+n.length];return i===`>`||i===` `||i===` `||i===`
146
+ `||i===`\r`||i===`/`}function d(e){return e.replace(i,a)}function p(e){return e.replace(o,r)}function m(e,t=null,r){let i=[],a,o=0,s=e.length;for(;o<s;o++){let r=e[o];switch(r.nodeType){case 1:{let e=l(r.nodeName);a=new n.Element(e,c(r.attributes)),a.children=m(e===`template`?r.content.childNodes:r.childNodes,a);break}case 3:a=new n.Text(p(r.nodeValue??``));break;case 8:a=new n.Comment(r.nodeValue??``);break;default:continue}let s=i[o-1]??null;s&&(s.next=a),a.parent=t,a.prev=s,a.next=null,i.push(a)}return r&&(a=new n.ProcessingInstruction(r.substring(0,r.indexOf(` `)).toLowerCase(),r),a.next=i[0]??null,a.parent=t,i.unshift(a),i[1]&&(i[1].prev=i[0])),i}e.escapeSpecialCharacters=d,e.formatDOM=m,e.hasOpenTag=u})),uM=c((e=>{var t=lM(),n=`html`,r=`head`,i=`body`,a=/<([a-zA-Z]+[0-9]?)/;function o(e,t){return t?t.createHTML(e):e}var s=(e,t,n)=>{throw Error("This browser does not support `document.implementation.createHTMLDocument`")},c=(e,t,n)=>{throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},l=typeof window==`object`&&window.DOMParser;if(typeof l==`function`){let e=new l;c=(t,n,r)=>(n&&(t=`<${n}>${t}</${n}>`),e.parseFromString(t,`text/html`)),s=c}if(typeof document==`object`&&document.implementation){let e=document.implementation.createHTMLDocument();s=function(t,n,r){if(n){let i=e.documentElement.querySelector(n);return i&&(i.innerHTML=o(t,r)),e}return e.documentElement.innerHTML=o(t,r),e}}var u=typeof document==`object`&&document.createElement(`template`),d;u&&u.content&&(d=(e,t)=>(u.innerHTML=o(e,t),u.content.childNodes));var f=()=>document.createDocumentFragment().childNodes;function p(e,o){e=t.escapeSpecialCharacters(e);let l=a.exec(e)?.[1]?.toLowerCase();switch(l){case n:{let a=c(e);if(!t.hasOpenTag(e,r)){let e=a.querySelector(r);e?.parentNode?.removeChild(e)}if(!t.hasOpenTag(e,i)){let e=a.querySelector(i);e?.parentNode?.removeChild(e)}return a.querySelectorAll(n)}case r:case i:{let n=s(e,void 0,o).querySelectorAll(l);return t.hasOpenTag(e,i)&&t.hasOpenTag(e,r)?n[0].parentNode?.childNodes??f():n}default:return d?d(e,o):s(e,i,o).querySelector(i)?.childNodes??f()}}e.default=p})),dM=c((e=>{Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=lM(),n=uM(),r=/<(![a-zA-Z\s]+)>/;function i(e,i){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];let a=r.exec(e),o=a?a[1]:void 0;return t.formatDOM(n.default(e,i?.trustedTypePolicy),null,o)}e.default=i})),fM=c((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":`acceptCharset`,accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:`className`,classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:`htmlFor`,form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":`httpEquiv`,icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":`accentHeight`,accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":`alignmentBaseline`,allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":`arabicForm`,ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":`baselineShift`,baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":`capHeight`,clip:0,clipPath:1,"clip-path":`clipPath`,clipPathUnits:1,clipRule:1,"clip-rule":`clipRule`,color:0,colorInterpolation:1,"color-interpolation":`colorInterpolation`,colorInterpolationFilters:1,"color-interpolation-filters":`colorInterpolationFilters`,colorProfile:1,"color-profile":`colorProfile`,colorRendering:1,"color-rendering":`colorRendering`,contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":`dominantBaseline`,dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":`enableBackground`,end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":`fillOpacity`,fillRule:1,"fill-rule":`fillRule`,filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":`floodOpacity`,floodColor:1,"flood-color":`floodColor`,focusable:0,fontFamily:1,"font-family":`fontFamily`,fontSize:1,"font-size":`fontSize`,fontSizeAdjust:1,"font-size-adjust":`fontSizeAdjust`,fontStretch:1,"font-stretch":`fontStretch`,fontStyle:1,"font-style":`fontStyle`,fontVariant:1,"font-variant":`fontVariant`,fontWeight:1,"font-weight":`fontWeight`,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":`glyphName`,glyphOrientationHorizontal:1,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphOrientationVertical:1,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":`horizAdvX`,horizOriginX:1,"horiz-origin-x":`horizOriginX`,ideographic:0,imageRendering:1,"image-rendering":`imageRendering`,in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":`letterSpacing`,lightingColor:1,"lighting-color":`lightingColor`,limitingConeAngle:1,local:0,markerEnd:1,"marker-end":`markerEnd`,markerHeight:1,markerMid:1,"marker-mid":`markerMid`,markerStart:1,"marker-start":`markerStart`,markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":`overlinePosition`,overlineThickness:1,"overline-thickness":`overlineThickness`,paintOrder:1,"paint-order":`paintOrder`,panose1:0,"panose-1":`panose1`,pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":`pointerEvents`,points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":`renderingIntent`,repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":`shapeRendering`,slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":`stopColor`,stopOpacity:1,"stop-opacity":`stopOpacity`,strikethroughPosition:1,"strikethrough-position":`strikethroughPosition`,strikethroughThickness:1,"strikethrough-thickness":`strikethroughThickness`,string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":`strokeDasharray`,strokeDashoffset:1,"stroke-dashoffset":`strokeDashoffset`,strokeLinecap:1,"stroke-linecap":`strokeLinecap`,strokeLinejoin:1,"stroke-linejoin":`strokeLinejoin`,strokeMiterlimit:1,"stroke-miterlimit":`strokeMiterlimit`,strokeWidth:1,"stroke-width":`strokeWidth`,strokeOpacity:1,"stroke-opacity":`strokeOpacity`,suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":`textAnchor`,textDecoration:1,"text-decoration":`textDecoration`,textLength:1,textRendering:1,"text-rendering":`textRendering`,to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":`underlinePosition`,underlineThickness:1,"underline-thickness":`underlineThickness`,unicode:0,unicodeBidi:1,"unicode-bidi":`unicodeBidi`,unicodeRange:1,"unicode-range":`unicodeRange`,unitsPerEm:1,"units-per-em":`unitsPerEm`,unselectable:0,vAlphabetic:1,"v-alphabetic":`vAlphabetic`,values:0,vectorEffect:1,"vector-effect":`vectorEffect`,version:0,vertAdvY:1,"vert-adv-y":`vertAdvY`,vertOriginX:1,"vert-origin-x":`vertOriginX`,vertOriginY:1,"vert-origin-y":`vertOriginY`,vHanging:1,"v-hanging":`vHanging`,vIdeographic:1,"v-ideographic":`vIdeographic`,viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":`vMathematical`,vocab:0,widths:0,wordSpacing:1,"word-spacing":`wordSpacing`,writingMode:1,"writing-mode":`writingMode`,x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":`xHeight`,xlinkActuate:1,"xlink:actuate":`xlinkActuate`,xlinkArcrole:1,"xlink:arcrole":`xlinkArcrole`,xlinkHref:1,"xlink:href":`xlinkHref`,xlinkRole:1,"xlink:role":`xlinkRole`,xlinkShow:1,"xlink:show":`xlinkShow`,xlinkTitle:1,"xlink:title":`xlinkTitle`,xlinkType:1,"xlink:type":`xlinkType`,xmlBase:1,"xml:base":`xmlBase`,xmlLang:1,"xml:lang":`xmlLang`,xmlns:0,"xml:space":`xmlSpace`,xmlnsXlink:1,"xmlns:xlink":`xmlnsXlink`,xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),pM=c((e=>{var t=0,n=1,r=2,i=3,a=4,o=5,s=6;function c(e){return u.hasOwnProperty(e)?u[e]:null}function l(e,t,n,o,s,c,l){this.acceptsBooleans=t===r||t===i||t===a,this.attributeName=o,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=l}var u={};[`children`,`dangerouslySetInnerHTML`,`defaultValue`,`defaultChecked`,`innerHTML`,`suppressContentEditableWarning`,`suppressHydrationWarning`,`style`].forEach(e=>{u[e]=new l(e,t,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(([e,t])=>{u[e]=new l(e,n,!1,t,null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(e=>{u[e]=new l(e,r,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(e=>{u[e]=new l(e,r,!1,e,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(e=>{u[e]=new l(e,i,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(e=>{u[e]=new l(e,i,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(e=>{u[e]=new l(e,a,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(e=>{u[e]=new l(e,s,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(e=>{u[e]=new l(e,o,!1,e.toLowerCase(),null,!1,!1)});var d=/[\-\:]([a-z])/g,f=e=>e[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(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,null,!1,!1)}),[`xlink:actuate`,`xlink:arcrole`,`xlink:role`,`xlink:show`,`xlink:title`,`xlink:type`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!1,!1)});var p=`xlinkHref`;u[p]=new l(`xlinkHref`,n,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!0,!0)});var{CAMELCASE:m,SAME:h,possibleStandardNames:g}=fM(),_=RegExp.prototype.test.bind(RegExp(`^(data|aria)-[: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]*$`)),v=Object.keys(g).reduce((e,t)=>{let n=g[t];return n===h?e[t]=t:n===m?e[t.toLowerCase()]=t:e[t]=n,e},{});e.BOOLEAN=i,e.BOOLEANISH_STRING=r,e.NUMERIC=o,e.OVERLOADED_BOOLEAN=a,e.POSITIVE_NUMERIC=s,e.RESERVED=t,e.STRING=n,e.getPropertyInfo=c,e.isCustomAttribute=_,e.possibleStandardNames=v})),mM=c(((e,t)=>{var n=/\/\*(?:[^*]|\*(?!\/))*\*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,c=/^[;\s]*/;function l(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function d(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
147
+ `);u=~n?e.length-n:u+e.length}function f(){var e={line:l,column:u};return function(t){return t.position=new p(e),g(),t}}function p(e){this.start=e,this.end={line:l,column:u},this.source=t.source}p.prototype.content=e;function m(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function h(t){var n=t.exec(e);if(n){var r=n[0];return d(r),e=e.slice(r.length),n}}function g(){h(i)}function _(e){for(var t;t=v();)e.push(t);return e}function v(){var t=f();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return m(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,d(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function y(){var e=f(),t=h(a);if(t){if(v(),!h(o))return m(`property missing ':'`);var r=h(s),i=e({type:`declaration`,property:t[0].replace(n,``).trim(),value:r?r[0].replace(n,``).trim():``});return h(c),i}}function b(){var e=[];_(e);for(var t;t=y();)e.push(t),_(e);return e}return g(),b()}t.exports=l})),hM=c(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e},l=(e,t,i)=>(i=e==null?{}:n(o(e)),c(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),u=mM();u=l(u);function d(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,u.default)(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}t.exports=d})),gM=c(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e},l=(e,t,i)=>(i=e==null?{}:n(o(e)),c(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),u=hM();u=l(u);var d=/^--[a-zA-Z0-9_-]+$/,f=/-([a-z])/g,p=/^[^-]+$/,m=/^-(webkit|moz|ms|o|khtml)-/,h=/^-(ms)-/,g=e=>!e||p.test(e)||d.test(e),_=(e,t)=>t.toUpperCase(),v=(e,t)=>`${t}-`,y=(e,t={})=>g(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(h,v):e.replace(m,v),e.replace(f,_));function b(e,t){let n={};return!e||typeof e!=`string`||(0,u.default)(e,(e,r)=>{e&&r&&(n[y(e,t)]=r)}),n}t.exports=b})),_M=c((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=a,e.setStyleProp=s;var n=iy(),r=t(gM()),i=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function a(e,t){return e.includes(`-`)?!i.has(e):!!(t&&typeof t.is==`string`)}var o={reactCompat:!0};function s(e,t){if(typeof e==`string`){if(!e.trim()){t.style={};return}try{t.style=(0,r.default)(e,o)}catch{t.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(`.`)[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set([`tr`,`tbody`,`thead`,`tfoot`,`colgroup`,`table`,`head`,`html`,`frameset`]),e.canTextBeChildOfNode=t=>!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(t.name),e.returnFirstArg=e=>e})),vM=c((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=pM(),n=_M(),r=[`checked`,`value`],i=[`input`,`select`,`textarea`],a={reset:!0,submit:!0};function o(e={},o){let c={},l=!!(e.type&&a[e.type]);for(let a in e){let u=e[a];if((0,t.isCustomAttribute)(a)){c[a]=u;continue}let d=a.toLowerCase(),f=s(d);if(f){let e=(0,t.getPropertyInfo)(f);switch(r.includes(f)&&i.includes(o)&&!l&&(f=s(`default`+d)),c[f]=u,e?.type){case t.BOOLEAN:c[f]=!0;break;case t.OVERLOADED_BOOLEAN:u===``&&(c[f]=!0)}continue}n.PRESERVE_CUSTOM_ATTRIBUTES&&(c[a]=u)}return(0,n.setStyleProp)(e.style,c),c}function s(e){return t.possibleStandardNames[e]}}));function yM(e){return e.type===bM.Tag||e.type===bM.Script||e.type===bM.Style}var bM,xM=s((()=>{(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(bM||={}),bM.Root,bM.Text,bM.Directive,bM.Comment,bM.Script,bM.Style,bM.Tag,bM.CDATA,bM.Doctype}));function SM(e){return yM(e)}function CM(e){return e.type===bM.CDATA}function wM(e){return e.type===bM.Text}function TM(e){return e.type===bM.Comment}function EM(e){return e.type===bM.Directive}function DM(e){return e.type===bM.Root}function OM(e){return Object.hasOwn(e,`children`)}function kM(e,t=!1){let n;if(wM(e))n=new NM(e.data);else if(TM(e))n=new PM(e.data);else if(SM(e)){let r=t?AM(e.children):[],i=new zM(e.name,{...e.attribs},r);for(let e of r)e.parent=i;e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(CM(e)){let r=t?AM(e.children):[],i=new LM(r);for(let e of r)e.parent=i;n=i}else if(DM(e)){let r=t?AM(e.children):[],i=new RM(r);for(let e of r)e.parent=i;e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if(EM(e)){let t=new FM(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function AM(e){let t=e.map(e=>kM(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}var jM,MM,NM,PM,FM,IM,LM,RM,zM,BM=s((()=>{xM(),jM=class{parent=null;prev=null;next=null;startIndex=null;endIndex=null;get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return kM(this,e)}},MM=class extends jM{data;constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},NM=class extends MM{type=bM.Text;get nodeType(){return 3}},PM=class extends MM{type=bM.Comment;get nodeType(){return 8}},FM=class extends MM{type=bM.Directive;name;constructor(e,t){super(t),this.name=e}get nodeType(){return 1}"x-name";"x-publicId";"x-systemId"},IM=class extends jM{children;constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},LM=class extends IM{type=bM.CDATA;get nodeType(){return 4}},RM=class extends IM{type=bM.Root;get nodeType(){return 9}},zM=class extends IM{name;attribs;type;constructor(e,t,n=[],r=e===`script`?bM.Script:e===`style`?bM.Style:bM.Tag){super(n),this.name=e,this.attribs=t,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}namespace;"x-attribsNamespace";"x-attribsPrefix"}})),VM=l({CDATA:()=>LM,Comment:()=>PM,DataNode:()=>MM,Document:()=>RM,DomHandler:()=>UM,Element:()=>zM,Node:()=>jM,NodeWithChildren:()=>IM,ProcessingInstruction:()=>FM,Text:()=>NM,cloneNode:()=>kM,default:()=>UM,hasChildren:()=>OM,isCDATA:()=>CM,isComment:()=>TM,isDirective:()=>EM,isDocument:()=>DM,isTag:()=>SM,isText:()=>wM}),HM,UM,WM=s((()=>{xM(),BM(),BM(),HM={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},UM=class{dom=[];root=new RM(this.dom);callback;options;elementCB;done=!1;tagStack=[this.root];lastNode=null;parser=null;constructor(e,t,n){typeof t==`function`&&(n=t,t=HM),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??HM,this.elementCB=n??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new RM(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){let n=this.options.xmlMode?bM.Tag:void 0,r=new zM(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)}ontext(e){let{lastNode:t}=this;if(t&&t.type===bM.Text)t.data+=e,this.options.withEndIndices&&this.parser&&(t.endIndex=this.parser.endIndex);else{let t=new NM(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===bM.Comment){this.lastNode.data+=e;return}let t=new PM(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){let e=new NM(``),t=new LM([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){let n=new FM(e,t);this.addNode(n)}handleCallback(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e}addNode(e){let t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&this.parser&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null}}})),GM=c((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=(WM(),f(VM)),r=iy(),i=t(vM()),a=_M(),o={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e,t={}){let n=[],r=typeof t.replace==`function`,u=t.transform??a.returnFirstArg,{cloneElement:d,createElement:f,isValidElement:p}=t.library??o,m=e.length;c(e);for(let o=0;o<m;o++){let c=e[o];if(r){let e=t.replace?.call(t,c,o);if(p(e)){m>1&&(e=d(e,{key:e.key??o})),n.push(u(e,c,o));continue}}if(c.type===`text`){let e=!c.data.trim().length;if(e&&c.parent&&!(0,a.canTextBeChildOfNode)(c.parent)||t.trim&&e)continue;n.push(u(c.data,c,o));continue}let h=c,g={};l(h)?((0,a.setStyleProp)(h.attribs.style,h.attribs),g=h.attribs):h.attribs&&(g=(0,i.default)(h.attribs,h.name));let _;switch(c.type){case`script`:case`style`:c.children[0]&&(g.dangerouslySetInnerHTML={__html:c.children[0].data});break;case`tag`:c.name===`textarea`&&c.children[0]?g.defaultValue=c.children[0].data:c.children?.length&&(_=s(c.children,t));break;default:continue}m>1&&(g.key=o),n.push(u(f(c.name,g,_),c,o))}return n.length===1?n[0]:n}function c(e){for(let t of e)(t.type===`tag`||t.type===`script`||t.type===`style`)&&(Object.setPrototypeOf(t,n.Element.prototype),c(t.children))}function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&e.type===`tag`&&(0,a.isCustomComponent)(e.name,e.attribs)}})),KM=d(c((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=o;var n=t(dM());e.htmlToDOM=n.default,e.attributesToProps=t(vM()).default;var r=t(GM());e.domToReact=r.default;var i=(WM(),f(VM));Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function o(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];let i=Object.assign(Object.assign({},t?.htmlparser2??a),{trustedTypePolicy:t?.trustedTypePolicy});return(0,r.default)((0,n.default)(e,i),t)}}))(),1),qM=KM.default.default||KM.default,JM=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends JM{};function YM(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function XM(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function ZM(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function QM(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function $M(e,t){return ZM(e,t,``)}function eN(e,t){return QM(e,t,``)}function tN(e,t){return t.slice(0,nN(e,t))}function nN(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function rN(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function iN(e,t){if(t)return oN(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function aN(e,t){if(t)return oN(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function oN(e,t){if(!t)return[aN(e),iN(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=rN(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var sN=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,cN=RegExp(`[${sN}]+|\\s+|[^${sN}]`,`ug`),lN=new class extends JM{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=rN(e,r)}else n=e.match(cN)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&dN(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&dN(n,i,r,null,t.intlSegmenter),e}};function uN(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?pN(e,t,n):lN.diff(e,t,n)}function dN(e,t,n,r,i){if(t&&n){let[a,o]=oN(t.value,i),[s,c]=oN(n.value,i);if(e){let r=YM(a,s);e.value=QM(e.value,s,r),t.value=$M(t.value,r),n.value=$M(n.value,r)}if(r){let e=XM(o,c);r.value=ZM(r.value,c,e),t.value=eN(t.value,e),n.value=eN(n.value,e)}}else if(n){if(e){let e=aN(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=aN(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=aN(r.value,i),[a,o]=oN(t.value,i),s=YM(n,a);t.value=$M(t.value,s);let c=XM($M(n,s),o);t.value=eN(t.value,c),r.value=ZM(r.value,n,c),e.value=QM(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=aN(r.value,i),n=tN(iN(t.value,i),e);t.value=eN(t.value,n)}else if(e){let n=tN(iN(e.value,i),aN(t.value,i));t.value=$M(t.value,n)}}var fN=new class extends JM{tokenize(e){let t=RegExp(`(\\r?\\n)|[${sN}]+|[^\\S\\n\\r]+|[^${sN}]`,`ug`);return e.match(t)||[]}};function pN(e,t,n){return fN.diff(e,t,n)}new class extends JM{constructor(){super(...arguments),this.tokenize=mN}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
148
148
  `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
149
149
  `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
150
150
  `)&&(e=e.slice(0,-1)),t.endsWith(`
151
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function CN(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
152
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function wN(e){return e==`.`||e==`!`||e==`?`}new class extends rN{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(wN(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends rN{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends rN{constructor(){super(...arguments),this.tokenize=CN}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(TN(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function TN(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=TN(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=TN(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends rN{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var EN=e=>(new DOMParser().parseFromString(e,`text/html`).body.textContent??``).trim(),DN={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},ON=e=>e.replace(/[&<>"']/g,e=>DN[e]),kN=(e,t,n)=>{let r=yN(t,n,{intlSegmenter:new Intl.Segmenter(e,{granularity:`word`})}),i,a=``,o=``,s=0,c=r.length-1;for(let e=0;e<r.length;e++)i=r[e],i.added||i.removed?(a===``?s=e:(a.endsWith(`</ins>`)||a.endsWith(`</del>`))&&(a+=` `),c=e,o=i.added?`ins`:`del`,i.value!==`undefined`&&(a+=`<${o}>${ON(i.value)}</${o}>`)):a!==``&&e<r.length-1&&(a+=ON(i.value));let l=120-EN(a).length;if(l>0){let e=``;if(s>0&&(e=r[0].value.substring(Math.max(0,r[0].value.length-Math.min(50,l)),r[0].value.length),e!=r[0].value&&(e=e.slice(e.indexOf(` `)),e=`...`+e),a=ON(e)+a),l-=e.length,c<r.length-1&&l){let e=r[r.length-1].value.substring(0,Math.min(50,l));e!=r[r.length-1].value&&(e=e.substring(0,e.lastIndexOf(` `)),e+=`...`),a+=ON(e)}}return a},AN=({analytics:e,element:t,data:n,prevData:r,hide:i,updateTextWithAlternative:a,addIgnoredTerm:o,movePopoverNextOrPrev:s,setLLMSuggestionsRequest:c,getLLMSuggestions:l,focusOnOpen:u,llmAlternativesEnabled:d,dashboardAvailable:f,ignoreTermPermanently:p,onAlternativeAccepted:m})=>{let h=document.documentElement||document.body,{t:g,i18n:_}=ky(eb.popover),{analytics:v,alternativeHovered:y,setAlternativeHovered:b,showLearningBite:x,setShowLearningBite:S,showLearningBiteRef:C,isLoading:w,isSuccess:T,isFailure:E,llmAlternativesResponse:D,hidePopover:O,clickAlternative:ee,alternativeKeyDown:te,handleIgnoreClick:ne,goToAdjacentAlert:re}=XC({analytics:e,element:t,data:n,prevData:r,hide:i,updateTextWithAlternative:a,addIgnoredTerm:o,movePopoverNextOrPrev:s,setLLMSuggestionsRequest:c,getLLMSuggestions:l,llmAlternativesEnabled:d,ignoreTermPermanently:p,onAlternativeAccepted:m});(0,W.useEffect)(()=>{_.changeLanguage(n.alert.data?.language)},[n.alert.data?.language]);let{x:k,y:A,strategy:ie,refs:ae}=GC({placement:`bottom-start`,middleware:[(e=>({name:`elementCords`,options:e,fn:({placement:n,rects:r})=>{let i={top:0,left:0,bottom:0,right:0};if(Hj(t)){let t=document.getElementsByTagName(`iframe`),n=Array.from(t).find(t=>{try{return(t.contentDocument||t.contentWindow?.document)?.contains(e.node)}catch(e){return console.error(`Failed to access iframe content: `,e),!1}});try{n?.getBoundingClientRect()&&(i=n?.getBoundingClientRect())}catch(e){console.error(`Failed to get iframe bounding rect: `,e)}}let a=e.position.x+i.left+h.scrollLeft,o=n.includes(`bottom`)?e.position.y+e.position.height+i.top+h.scrollTop:e.position.y-r.floating.height+i.top+h.scrollTop;return{x:C.current?a/2:a,y:o}}}))(n),JC(),KC(4),qC()]});(0,W.useEffect)(()=>{ae.setReference(t),C.current=x},[ae.setReference,x]),(0,W.useEffect)(()=>(Wj(t)?.addEventListener(`scroll`,oe),t?.addEventListener(`scroll`,oe),document?.addEventListener(`click`,se),document?.addEventListener(`input`,se),CO()?.addEventListener(`click`,se),CO()?.addEventListener(`input`,se),()=>{document.removeEventListener(`click`,se),document.removeEventListener(`input`,se),Wj(t)?.removeEventListener(`scroll`,oe),t.removeEventListener(`scroll`,oe),CO().removeEventListener(`click`,se),CO().removeEventListener(`input`,se)}),[ae.floating.current]),(0,W.useEffect)(()=>{u&&ae.floating.current?.focus()},[n.alert.id,u,ae.floating.current]),(0,W.useEffect)(()=>{let e=CO(),n=e=>{if(e.key!==`Escape`)return;e.preventDefault(),e.stopPropagation();let n=ae.floating.current?.contains(document.activeElement);O(!0),n&&t.focus?.()};return document.addEventListener(`keydown`,n,!0),e!==document&&e?.addEventListener(`keydown`,n,!0),()=>{document.removeEventListener(`keydown`,n,!0),e!==document&&e?.removeEventListener(`keydown`,n,!0)}},[ae.floating.current]);let oe=()=>{O()},se=e=>{let t=!ae.floating.current?.contains(e.target),r=CO().documentElement||CO().body,i=e.pageX+r.scrollLeft,a=e.pageY-r.scrollTop,o=i>=n.position.x&&i<=n.position.x+n.position.width&&a>=n.position.y&&a<=n.position.y+n.position.height;t&&!o&&O()},ce=e=>{let t=(e=!0)=>W.createElement(`div`,{key:`default-expl-${e?`visible`:`hidden`}`,style:{visibility:e?`visible`:`hidden`,gridArea:`1 / 1`}},n.alert.data?.explanation?.text,n.alert.data?.explanation?.context&&` (`+n.alert.data?.explanation?.context+`)`);if(!D||D.loading)return t(!0);let r=n.alert.data.alternatives.map((n,r)=>{let i=le(n);return W.createElement(`div`,{key:`explanation-${r}-${n.text||`alt`}`,style:{position:`relative`,top:0,gridArea:`1 / 1`,visibility:e&&e.text===n.text?`visible`:`hidden`}},i||t(!0))});return r.push(t(e===null)),r},le=e=>{let t=D?.data?.results?.get(e.text);if(!t){let r=n.alert.startOffset-n.alert.data.fullSentence.range[0],i=n.alert.endOffset-n.alert.data.fullSentence.range[0];t=n.alert.data.fullSentence.raw.substring(0,r)+e.text+n.alert.data.fullSentence.raw.substring(i)}return W.createElement(`div`,{dangerouslySetInnerHTML:{__html:kN(n.alert.data.language,n.alert.data.fullSentence.raw,t)}})},ue=e=>{if(e&&e.text===``)return W.createElement(`i`,null,g(`removeSpaces`));{let t=/\(\((.*?)\)\)/;if(RegExp(t).exec(e.text)){let n=e.text.split(t);return W.createElement(`span`,null,n[0],`\xA0`,`[`,W.createElement(`i`,null,n[1]),`]`,`\xA0`,n[2])}return e.text.length>25&&e.context?e.text.substring(0,25)+`...`:e.text.length>35?e.text.substring(0,35)+`...`:e.text}};return W.createElement(`div`,{id:`witty-works-ext-popover`,ref:ae.setFloating,role:`dialog`,"aria-label":g(`suggestionsDialog`),tabIndex:-1,style:{position:ie,top:`${A}px`,left:`${k}px`,maxWidth:`min(${x?850:350}px, calc(100vw - 16px))`},onMouseDown:e=>e.preventDefault()},W.createElement(`div`,{id:`witty-works-ext-popover-content`,className:`witty-works-ext-lato-popover-text`},W.createElement(`div`,{className:`witty-works-ext-section witty-works-ext-wittyworks-container witty-works-ext-container-row witty-works-ext-justify-space-between`},W.createElement(`a`,{className:`witty-works-ext-margin-right witty-works-ext-cursor-pointer`,href:`https://www.witty.works/`,target:`_blank`,rel:`noreferrer`,"aria-label":g(`wittyLogo`)},W.createElement($C,{"aria-hidden":`true`})),W.createElement(`div`,{className:`witty-works-ext-container-row`},W.createElement(`button`,{className:`witty-works-ext-margin-right witty-works-ext-lato-popover-text-gray witty-works-ext-cursor-pointer witty-works-ext-margin-auto witty-works-button`,style:n.index===1?{display:`none`}:{},onClick:()=>{n.index!==1&&re(`previous`)},"aria-label":g(`previous`),title:g(`previous`)},W.createElement(tw,{alt:g(`previous`)})),W.createElement(`div`,{className:`witty-works-ext-margin-right witty-works-ext-lato-popover-text-gray witty-works-ext-margin-right`,role:`status`,"aria-live":`polite`,"aria-label":`${n.index} ${g(`alertOftotal`)} ${n.totalAlerts}`},`${n.index} ${g(`alertOftotal`)} ${n.totalAlerts}`),W.createElement(`button`,{className:`witty-works-ext-margin-right witty-works-ext-lato-popover-text-gray witty-works-ext-cursor-pointer witty-works-ext-margin-auto witty-works-button`,style:n.index===n.totalAlerts?{display:`none`}:{},onClick:()=>{n.index!==n.totalAlerts&&re(`next`)},"aria-label":g(`next`),title:g(`next`)},W.createElement(ew,{alt:g(`next`)}))),W.createElement(`button`,{className:`witty-works-ext-lato-popover-text-gray witty-works-ext-cursor-pointer witty-works-button`,onClick:()=>{O(!0)},"aria-label":g(`close`),title:g(`close`)},W.createElement(QC,{alt:g(`close`)}))),n.alert.data?.explanation?.text&&W.createElement(W.Fragment,null,W.createElement(`div`,{className:`witty-works-ext-separator`}),W.createElement(`div`,{className:`witty-works-ext-wittyworks-container witty-works-ext-container-rounded witty-works-ext-container-column witty-works-ext-full-padding witty-works-ext-justify-start witty-works-ext-margin-top`,style:{backgroundColor:ov(n.alert.data?.gravity,n.alert.data?.subcategory).default}},W.createElement(`div`,{className:`witty-works-ext-lato-popover-text witty-works-ext-justify-space-between`,style:{display:`flex`,flexDirection:x?`row`:`column`,alignItems:x?`center`:`flex-start`}},W.createElement(`div`,{className:`witty-works-ext-container-row witty-works-ext-justify-start`,style:{flex:1}},W.createElement(`div`,{style:{fontSize:`2em`,marginRight:`0.5em`,flexShrink:0,height:`100%`}},n.alert.data?.explanation?.icon_image?W.createElement(`img`,{src:n.alert.data?.explanation?.icon_image,alt:``,style:{width:`50px`}}):W.createElement(`span`,null,n.alert.data?.explanation?.icon)),W.createElement(`div`,{className:`witty-works-ext-rephrasing`,style:{flex:`0 1 252px`,minWidth:0,height:`100%`}},W.createElement(`b`,null,n.alert.data?.label.split(`:`).pop()),W.createElement(`br`,null),W.createElement(`div`,{style:{position:`relative`,display:`grid`}},ce(y)))),n.alert.data?.explanation?.url&&W.createElement(`div`,{className:`witty-works-ext-container-row witty-works-ext-justify-end witty-works-ext-lato-popover-text-gray witty-works-ext-cursor-pointer`,style:{marginTop:x?`0em`:`1em`}},W.createElement(`button`,{type:`button`,className:`witty-works-ext-dropdown-select witty-works-ext-container-row`,onClick:()=>{v.popoverLogs(n.alert,`learning_bites`),S(!x)},style:{cursor:n.alert.data?.explanation?.url?`pointer`:`default`},"aria-expanded":x,"aria-label":g(`leanrMoreExtendedText`),title:g(`leanrMoreExtendedText`)},g(`learnMore`),n.alert.data?.explanation?.content===`video`&&W.createElement(nw,{className:`witty-works-ext-margin-left`,style:{marginTop:`0.2em`},alt:g(`video`)}),W.createElement(`div`,{className:`witty-works-ext-margin-left`,style:{pointerEvents:`none`}},x?W.createElement(aw,null):W.createElement(ow,null))),n.alert.data?.source?.url&&W.createElement(`a`,{className:`witty-works-ext-dropdown-select witty-works-ext-container-row`,href:n.alert.data.source.url,target:`_new`,"aria-label":g(`visitSource`),title:g(`visitSource`)},g(`visitSource`),W.createElement(iw,{className:`witty-works-ext-margin-left`,alt:g(`openNewWindow`)})))))),W.createElement(`div`,{style:{display:x?`flex`:`none`}},W.createElement(`div`,{className:`witty-works-ext-learning-bite-dig-deeper`},W.createElement(`div`,null,W.createElement(`div`,null,nN(n.alert.data?.explanation?.long_text??``)),W.createElement(`div`,null,n.alert.data?.explanation?.url&&W.createElement(`a`,{className:`witty-works-dig-deeper witty-works-ext-container-row`,href:n.alert.data.explanation.url,target:`_new`,"aria-label":g(`leanrMoreExtendedText`),title:g(`leanrMoreExtendedText`)},g(`leanrMoreExtendedText`),W.createElement(rw,{className:`witty-works-ext-margin-left`,alt:g(`openNewWindow`)})))),n.alert.data?.explanation?.video_url&&W.createElement(`video`,{width:`500`,style:{maxWidth:`100%`},controls:!0},W.createElement(`source`,{src:n.alert.data?.explanation?.video_url,type:`video/mp4`}),`Your browser does not support the video tag.`),!n.alert.data?.explanation?.video_url&&n.alert.data?.explanation?.image_url&&W.createElement(`img`,{style:{width:`500px`,maxWidth:`100%`},src:n.alert.data?.explanation?.image_url?.src,alt:n.alert.data?.explanation?.image_url?.alt}))),W.createElement(`div`,{className:`witty-works-ext-separator`,style:{marginBottom:`1em`,marginTop:`1em`}}),n.alert.data?.alternatives?.length>0&&!x&&W.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-row`},W.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-btn-container`},g(`insteadTry`)),W.createElement(`div`,null,n.alert.data?.alternatives.map((e,t)=>e.remove?W.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-btn-container`,onMouseEnter:()=>{b(e)},onMouseLeave:()=>{b(null)},key:`${t}-${e.text||`alt`}-container`},W.createElement(`button`,{type:`button`,className:`witty-works-ext-wittyworks-popover-alternative-btn witty-works-ext-lato-popover-text-green witty-works-ext-remove-text witty-works-ext-margin-right`,key:`${t}-${e.text||`alt`}-remove-it`,onPointerDown:e=>ee(e.nativeEvent,` `),onKeyDown:te(` `),"aria-label":`${g(`removeText`)} ${n.alert.data?.text}`,title:g(`removeText`)},n.alert.data?.text),e.context&&W.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-context`},e.context)):W.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-btn-container`,key:`${t}-${e.text||`alt`}-container`,onMouseEnter:()=>{b(e)},onMouseLeave:()=>{b(null)}},W.createElement(`button`,{type:`button`,className:`witty-works-ext-wittyworks-popover-alternative-btn witty-works-ext-lato-popover-text-green witty-works-ext-margin-right`,onPointerDown:e=>ee(e.nativeEvent,n.alert.data?.alternatives[t]?.text),onKeyDown:te(n.alert.data?.alternatives[t]?.text),"aria-label":n.alert.data?.alternatives[t]?.text,title:n.alert.data?.alternatives[t]?.text},ue(e)),e&&e.context&&W.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-context`,style:{color:`black`}},e.url?W.createElement(W.Fragment,null,e.context.startsWith(`💡`)?W.createElement(W.Fragment,null,W.createElement(`span`,{style:{whiteSpace:`nowrap`}},W.createElement(`span`,null,e.context.substring(0,3)),W.createElement(`a`,{href:e.url,target:`_blank`,style:{textDecoration:`underline`,color:`black`},rel:`noopener noreferrer`,"aria-label":e.context,title:e.context},e.context.substring(3)))):W.createElement(`a`,{href:e.url,target:`_blank`,style:{textDecoration:`underline`,color:`black`,whiteSpace:`nowrap`},rel:`noopener noreferrer`,"aria-label":e.context,title:e.context},e.context)):W.createElement(`span`,{style:{color:`black`,whiteSpace:`nowrap`}},e.context))))))),!x&&W.createElement(`div`,{className:`witty-works-ext-container-row`},W.createElement(`button`,{onClick:ne(`ignore_once`),className:`witty-works-ext-ignore-section witty-works-ext-ignore-color-transformer witty-works-ext-margin-top witty-works-button`,"aria-label":g(`ignoreOnce`),title:g(`ignoreOnce`)},W.createElement(`span`,{className:`witty-works-ext-margin-right witty-works-ext-cursor-pointer`},W.createElement(xO,{alt:g(`ignoreOnce`)})),W.createElement(`span`,{className:`witty-works-ext-lato-popover-text-gray`},g(`ignoreOnce`))),f&&n?.alert?.data?.text.length<=50&&W.createElement(`button`,{onClick:ne(`ignore_permanently`),className:`witty-works-ext-ignore-section witty-works-ext-ignore-color-transformer witty-works-ext-margin-top witty-works-button`,"aria-label":g(`ignorePermanently`),title:g(`ignorePermanently`)},W.createElement(`span`,{className:`witty-works-ext-margin-right witty-works-ext-cursor-pointer`},W.createElement(xO,{alt:g(`ignorePermanently`)})),W.createElement(`span`,{className:`witty-works-ext-lato-popover-text-gray witty-works-ext-margin-right`},g(`ignorePermanently`)),w===`ignore_permanently`&&W.createElement(vO,null),T===`ignore_permanently`&&W.createElement(yO,null),E===`ignore_permanently`&&W.createElement(W.Fragment,null,W.createElement(bO,null),` `,W.createElement(`span`,{className:`witty-works-ext-margin-left`},g(`failedRequestText`))))))},jN=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString()},MN=()=>({data:null,error:null,loading:!0}),NN=e=>`${jN(e.alert.data.fullSentence.raw)}::${e.alert.data.text}`,PN=(e,t)=>({data:e?{...e,results:new Map(Object.entries(e.results))}:null,error:t||null,loading:!1}),FN=(e,t,n,r)=>{let i=wb(n,r),{from:a,to:o}=t;if(i.scope===`sentence`){let{detail:r}=t,s=r.data.fullSentence,c=t.from-(r.absOffset-s.range[0]),l=c+s.raw.length;c>=0&&l<=e.content.size&&e.textBetween(c,l)===s.raw?(a=c,o=l):i=wb(n,null)}return n===` `&&a>0&&e.textBetween(a-1,a)===` `&&--a,{from:a,to:o,text:i.text}},IN={popoverLogs:()=>void 0,alternativeLog:()=>void 0,ignoreLog:()=>void 0},LN=class{view;options;container;root;openId=null;focusOnOpen=!1;prevData=null;llmCache=new Map;rewriteGeneration=0;destroyed=!1;constructor(e,t){this.view=e,this.options=t,this.container=document.createElement(`div`),this.container.className=`witty-editor-popover`,document.body.append(this.container),this.root=(0,nS.createRoot)(this.container)}get isOpen(){return this.openId!==null}open(e,{viaKeyboard:t=!1}={}){this.destroyed||(this.focusOnOpen=t,this.openId=e,Mx(this.view,e),this.render())}openAtSelection(){let{from:e}=this.view.state.selection,t=Cx(this.view.state).find(t=>t.from<=e&&e<=t.to);return t?(this.open(t.id,{viaKeyboard:!0}),!0):!1}close(){this.openId!==null&&(this.openId=null,this.prevData=null,Mx(this.view,null),this.root.render(null))}update(){if(this.openId!==null){if(!this.current()){this.close();return}this.render()}}resetRewrites(){this.llmCache.clear(),this.rewriteGeneration+=1}destroy(){this.destroyed=!0,this.openId=null,this.root.unmount(),this.container.remove()}current(){return Cx(this.view.state).find(e=>e.id===this.openId)}render(){if(this.destroyed)return;let e=Cx(this.view.state),t=e.findIndex(e=>e.id===this.openId),n=e[t];if(!n){this.close();return}let r=this.view.coordsAtPos(n.from),i=this.view.coordsAtPos(n.to),a={index:t+1,totalAlerts:e.length,alert:n.detail,position:new DOMRect(r.left,r.top,Math.max(i.right-r.left,1),r.bottom-r.top),node:this.view.domAtPos(n.from).node};this.root.render(W.createElement(AN,{analytics:IN,element:this.view.dom,data:a,prevData:this.prevData,hide:()=>this.close(),updateTextWithAlternative:e=>this.apply(n,e),addIgnoredTerm:e=>{this.options.ignored.add(e),Nx(this.view,e)},movePopoverNextOrPrev:e=>this.move(t,e),setLLMSuggestionsRequest:e=>this.requestRewrites(e),getLLMSuggestions:e=>this.llmCache.get(NN(e)),focusOnOpen:this.focusOnOpen,llmAlternativesEnabled:this.options.llmAlternatives(),dashboardAvailable:!1,ignoreTermPermanently:()=>Promise.reject(Error(`no dashboard to persist ignores to`)),onAlternativeAccepted:()=>void 0})),this.prevData=a}move(e,t){let n=Cx(this.view.state)[e+(t===`previous`?-1:1)];n&&this.open(n.id,{viaKeyboard:this.focusOnOpen})}apply(e,t){this.close();let{state:n}=this.view,{from:r,to:i,text:a}=FN(n.doc,e,t,this.llmCache.get(NN({alert:e.detail}))?.data?.results),o=a?n.tr.insertText(a,r,i):n.tr.delete(r,i);this.view.dispatch(o.scrollIntoView()),this.view.focus()}rewriteBody(e){let t={...mb(e.alert.data.fullSentence,e.alert),client:vb},n=_b(e.alert.data.language,this.options.config());return n?{...t,gender_separator:n}:t}requestRewrites(e){let t=NN(e),n=this.llmCache.get(t);if(n&&!n.error)return;let r=this.rewriteGeneration;this.llmCache.set(t,MN()),this.render(),fetch(`${this.options.endpoint}${cb}`,{method:`POST`,headers:{...db,...this.options.headers()},body:JSON.stringify(this.rewriteBody(e)),signal:AbortSignal.timeout(this.options.llmTimeoutMs)}).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return PN(await e.json(),null)}).catch(e=>PN(null,{message:String(e)})).then(e=>{this.destroyed||r!==this.rewriteGeneration||(this.llmCache.set(t,e),this.openId!==null&&this.render())})}},RN=e=>{let t=e,n=new Set;return{get:()=>t,set(e){t={...t,...e},n.forEach(e=>e())},subscribe(e){return n.add(e),()=>{n.delete(e)}}}},zN=e=>RN(e),BN=e=>{let t={};for(let n of[`gendered_roles_format`,`german_gender_ending`,`french_gender_separator`]){let r=e[n];r&&(t[n]=r)}return t},VN=(e,t,n)=>{let r={...e};return n?r[t]=n:delete r[t],r},HN=(e,t,n)=>({...e,disabled_categories:rv(t.key,t.advanced_key,n,e.disabled_categories??[])}),UN=({categoryKey:e,label:t,value:n,hasAdvanced:r,locked:i=!1,onChange:a})=>{let{t:o}=ky(eb.options),s=[o(`levelOff`),o(`levelBasic`),o(`levelAdvanced`)][n];return W.createElement(`div`,{className:`witty-category`},W.createElement(`button`,{type:`button`,className:[`witty-category-toggle`,n>tv.Off?`is-on`:``,n===tv.Basic?`is-middle`:``,i?`is-locked`:``].filter(Boolean).join(` `),"data-category":e,"data-level":n,"aria-label":`${t}: ${s}`,"aria-disabled":i,title:i?o(`levelLocked`):s,onClick:()=>{i||a(n>=(r?tv.Advanced:tv.Basic)?tv.Off:n+1)}},W.createElement(`span`,{className:`witty-category-knob`})),W.createElement(`span`,{className:`witty-category-label`},t),W.createElement(`span`,{className:`witty-category-level`},s))},WN={gendered_roles_format:`genderedRolesFormat`,german_gender_ending:`germanGenderEnding`,french_gender_separator:`frenchGenderSeparator`},GN=({orthography:e,onOrthographyChange:t,llmAlternatives:n,onLlmAlternativesChange:r,configOptions:i,languageFormat:a,onFormatFieldChange:o,categories:s,categoryGroups:c,disabledCategories:l,onCategoryLevelChange:u,categoriesError:d=!1,idPrefix:f=``})=>{let{t:p}=ky(eb.options),m=(e,t)=>i[e]?.labels?.[t]||t;return W.createElement(W.Fragment,null,W.createElement(`section`,null,W.createElement(`h2`,null,p(`customisationHeadline`)),W.createElement(`p`,{className:`witty-options-muted`},p(`orgOverrideNote`)),W.createElement(`label`,null,W.createElement(`input`,{type:`checkbox`,id:`${f}opt-orthography`,checked:e,onChange:e=>t(e.target.checked)}),`\xA0`,p(`orthography`)),W.createElement(`label`,null,W.createElement(`input`,{type:`checkbox`,id:`${f}opt-llm-alternatives`,checked:n,onChange:e=>r(e.target.checked)}),`\xA0`,p(`llmAlternatives`))),Object.keys(i).length>0&&W.createElement(`section`,{id:`${f}language-format-section`},W.createElement(`h2`,null,p(`languageHeadline`)),W.createElement(`p`,{className:`witty-options-muted`},p(`orgOverrideNote`)),ev.filter(e=>i[e]).map(e=>{let t=i[e],n=WN[e];return W.createElement(`div`,{className:`witty-format-field`,key:e},W.createElement(`label`,{htmlFor:`${f}opt-${e}`},p(n)),W.createElement(`p`,{className:`witty-options-muted`},p(`${n}Hint`)),W.createElement(`select`,{id:`${f}opt-${e}`,"data-field":e,value:a[e]||``,onChange:t=>o(e,t.target.value)},W.createElement(`option`,{value:``},p(`useApiDefault`),t.default?` (${t.default})`:``),t.values.map(t=>W.createElement(`option`,{value:t,key:t},m(e,t)))))})),s.length>0&&W.createElement(`section`,{id:`${f}categories-section`},W.createElement(`h2`,null,p(`categoriesHeadline`)),W.createElement(`p`,{className:`witty-options-muted`},p(`categoriesIntro`)),c.map(e=>{let t=s.filter(t=>t.parent===e.key);return t.length?W.createElement(`div`,{className:`witty-category-group`,key:e.key},W.createElement(`h3`,null,e.label||e.key),t.map(e=>W.createElement(UN,{key:e.key,categoryKey:e.key,label:e.label||e.key,hasAdvanced:!!e.advanced_key,locked:e.proficiency_level===`openly_discriminating`,value:nv(e.key,e.advanced_key,l),onChange:t=>u(e,t)}))):null})),d&&W.createElement(`p`,{className:`witty-options-muted`},p(`categoriesFailed`)))},KN=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M14.4244 15.865C15.2179 17.3926 17.2257 17.3746 17.9964 15.833L16.5828 14.9778C16.4193 15.3047 15.9934 15.3086 15.8251 14.9846L14.4244 15.865Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.0406 13.2011L14.4244 15.865L15.8251 14.9846L14.4413 12.3206L13.0406 13.2011Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.3408 11.9904C12.954 12.2335 12.8196 12.7756 13.0406 13.2011L14.4413 12.3206C14.2203 11.8951 13.7276 11.7473 13.3408 11.9904Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M15.7489 3C14.9733 3 14.2643 3.48204 13.9175 4.24516L15.3604 5.03882C15.434 4.87695 15.5844 4.7747 15.7489 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M20.9495 3H15.7489V4.7747H20.9495V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M22.7436 6.33803C23.4942 4.83684 22.5069 3 20.9495 3V4.7747C21.2798 4.7747 21.4893 5.16433 21.3301 5.48277L22.7436 6.33803Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M17.9964 15.833L22.7436 6.33803L21.3301 5.48277L16.5828 14.9778L17.9964 15.833Z`,fill:`#9489DB`})]}),qN=e=>(0,G.jsxs)(`svg`,{width:25,height:24,viewBox:`0 0 25 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M14.4244 18.865C15.2179 20.3926 17.2257 20.3746 17.9964 18.833L16.5828 17.9778C16.4193 18.3047 15.9934 18.3086 15.8251 17.9846L14.4244 18.865Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.0406 16.2011L14.4244 18.865L15.8251 17.9846L14.4413 15.3206L13.0406 16.2011Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.3408 14.9904C12.954 15.2335 12.8196 15.7756 13.0406 16.2011L14.4413 15.3206C14.2203 14.8951 13.7276 14.7473 13.3408 14.9904Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 7.41595C10.7681 6.56076 10.0151 6 9.17787 6V7.7747C9.17787 7.7747 9.51518 7.89365 9.58114 8.07505L10.5101 10.6298C10.6755 11.0848 11.145 11.3061 11.5586 11.1241C11.9722 10.9421 12.1734 10.4257 12.008 9.97068L11.079 7.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 6H4.05053V7.7747H9.17787V6Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 6C2.49311 6 1.50583 7.83684 2.25638 9.33803L3.66995 8.48277C3.51074 8.16433 3.72017 7.7747 4.05053 7.7747V6Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 17.8317L3.66995 8.48277L2.25638 9.33803L6.93059 18.687L8.34416 17.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.11322 17.8151C8.95664 18.1596 8.51289 18.1692 8.34416 17.8317L6.93059 18.687C7.71306 20.252 9.75014 20.2339 10.519 18.687L9.11322 17.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 7.24516L9.11322 17.8151L10.519 18.687C10.5317 18.6613 10.5441 18.6353 10.5562 18.6088L15.3604 8.03882L13.9175 7.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M15.7489 6C14.9733 6 14.2643 6.48204 13.9175 7.24516L15.3604 8.03882C15.434 7.87695 15.5844 7.7747 15.7489 7.7747V6Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M20.9495 6H15.7489V7.7747H20.9495V6Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M22.7436 9.33803C23.4942 7.83684 22.5069 6 20.9495 6V7.7747C21.2798 7.7747 21.4893 8.16433 21.33 8.48277L22.7436 9.33803Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M17.9964 18.833L22.7436 9.33803L21.33 8.48277L16.5828 17.9778L17.9964 18.833Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M6.38 5.43V11.15C6.38 11.7633 6.34333 12.3733 6.27 12.98C6.19667 13.58 6.1 14.1933 5.98 14.82H3.88C3.76 14.1933 3.66333 13.58 3.59 12.98C3.51667 12.3733 3.48 11.7633 3.48 11.15V5.43H6.38ZM3.14 18.43C3.14 18.19 3.18333 17.9667 3.27 17.76C3.36333 17.5533 3.48667 17.3733 3.64 17.22C3.8 17.0667 3.98667 16.9467 4.2 16.86C4.41333 16.7667 4.64667 16.72 4.9 16.72C5.14667 16.72 5.37667 16.7667 5.59 16.86C5.80333 16.9467 5.99 17.0667 6.15 17.22C6.31 17.3733 6.43333 17.5533 6.52 17.76C6.61333 17.9667 6.66 18.19 6.66 18.43C6.66 18.67 6.61333 18.8967 6.52 19.11C6.43333 19.3167 6.31 19.4967 6.15 19.65C5.99 19.8033 5.80333 19.9233 5.59 20.01C5.37667 20.0967 5.14667 20.14 4.9 20.14C4.64667 20.14 4.41333 20.0967 4.2 20.01C3.98667 19.9233 3.8 19.8033 3.64 19.65C3.48667 19.4967 3.36333 19.3167 3.27 19.11C3.18333 18.8967 3.14 18.67 3.14 18.43Z`,fill:`#F06464`})]}),JN=`https://www.witty.works/en/help/how-do-i-use-the-witty-editor`,YN=`https://www.witty.works/`,XN=e=>{let t=(0,W.useRef)(0),n=(0,W.useCallback)(n=>{let r=()=>{t.current+=1,n()};return e.on(`transaction`,r),()=>{e.off(`transaction`,r)}},[e]);return(0,W.useSyncExternalStore)(n,()=>t.current)},ZN=e=>(0,W.useSyncExternalStore)(e.subscribe,e.get),QN=async e=>{let t=async t=>{let n=await fetch(`${e.endpoint}${t}`,{headers:{...db,...e.headers()}});if(!n.ok)throw Error(String(n.status));return n.json()},n=navigator.language||`en-US`,[r,i]=await Promise.allSettled([t(ub(n)),t(`${lb}?locale=${encodeURIComponent(n.split(`-`)[0])}`).catch(()=>t(lb))]),a=r.status===`fulfilled`?r.value:void 0;return{categories:a?.categories||[],categoryGroups:a?.groups||[],categoriesError:!a,configOptions:i.status===`fulfilled`&&i.value.options||{}}},$N=e=>{let t;return()=>(t??=QN(e).then(e=>(e.categoriesError&&(t=void 0),e)),t)},eP=(e,t)=>{let n=zx(t),r=n?Rx[n]:`german_gender_ending`;return e?.configOptions[r]?.labels?.[t]||t},tP=e=>{let[t,n]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let t=!0;return e().then(e=>{t&&n(e)}),()=>{t=!1}},[e]),t},nP=({id:e,store:t,loadOptions:n,onClose:r})=>{let{t:i}=ky(eb.editor),a=ZN(t),o=tP(n),{config:s}=a;return W.createElement(`div`,{id:e,className:`witty-editor-settings witty-preferences`,role:`region`,"aria-label":i(`settings`),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),r())}},W.createElement(`button`,{type:`button`,className:`witty-editor-settings-close`,"aria-label":i(`closeSettings`),title:i(`closeSettings`),onClick:r},`×`),!o&&W.createElement(`p`,{"aria-live":`polite`},i(`settingsLoading`)),W.createElement(GN,{idPrefix:`${e}-`,orthography:a.orthography,onOrthographyChange:e=>t.set({orthography:e}),llmAlternatives:a.llmAlternatives,onLlmAlternativesChange:e=>t.set({llmAlternatives:e}),configOptions:o?.configOptions??{},languageFormat:BN(s),onFormatFieldChange:(e,n)=>t.set({config:VN(s,e,n)}),categories:o?.categories??[],categoryGroups:o?.categoryGroups??[],disabledCategories:s.disabled_categories??[],onCategoryLevelChange:(e,n)=>t.set({config:HN(s,e,n)}),categoriesError:o?.categoriesError}))},rP=({id:e,label:t,items:n,anchor:r,onClose:i})=>{let a=(0,W.useRef)([]),[o,s]=(0,W.useState)(0);(0,W.useEffect)(()=>{a.current[0]?.focus()},[]);let c=e=>{let t=(e+n.length)%n.length;s(t),a.current[t]?.focus()};return W.createElement(`div`,{id:e,className:`witty-editor-menu`,role:`menu`,tabIndex:-1,"aria-label":t,onKeyDown:e=>{e.stopPropagation();let t=a.current.indexOf(document.activeElement),r=t<0?o:t,s={ArrowDown:r+1,ArrowUp:r-1,Home:0,End:n.length-1};e.key in s?(e.preventDefault(),c(s[e.key])):e.key===`Escape`?(e.preventDefault(),i(!0)):e.key===`Tab`&&i(!1)},onBlur:e=>{let t=e.relatedTarget;(!t||!e.currentTarget.contains(t)&&t!==r())&&i(!1)}},n.map((e,t)=>{let n={ref:e=>{a.current[t]=e},role:`menuitem`,tabIndex:t===o?0:-1,className:`witty-editor-menu-item`,onFocus:()=>s(t),onMouseDown:e=>e.preventDefault()};return W.createElement(`div`,{key:e.key,role:`none`},e.href?W.createElement(`a`,{...n,href:e.href,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>i(!1)},e.label):W.createElement(`button`,{...n,type:`button`,"aria-disabled":e.disabled||void 0,onClick:()=>!e.disabled&&e.run?.()},e.label,e.note&&W.createElement(`span`,{className:`witty-editor-menu-note`},e.note)))}))},iP=(e,t,n)=>{let r=eP(n,t.target),i={switched:e(`switched`,{count:t.count,format:r}),nothing:e(`switchNothing`,{format:r}),fromInklusivum:e(`switchFromInklusivum`),disabled:e(`switchDisabled`),unsupported:e(`switchUnsupportedTarget`,{format:r}),unavailable:e(`switchUnavailable`,{format:r}),forced:e(`switchForced`,{format:eP(n,t.applied??``)})}[t.outcome];return t.limitReached&&(t.outcome===`switched`||t.outcome===`nothing`)?`${i} ${e(`limitReached`)}`:i},aP=({id:e,store:t,loadOptions:n,onSwitch:r,supported:i,languages:a,onClose:o})=>{let{t:s}=ky(eb.editor),c=ZN(t),l=tP(n),[u,d]=(0,W.useState)(``),[f,p]=(0,W.useState)(!1),m=a.length>1,h=e=>{p(!0),d(s(`switching`)),r(e).then(e=>d(iP(s,e,l))).catch(()=>d(s(`statusFailed`))).finally(()=>p(!1))},g=(t,n)=>{let r=c.config[Rx[t]]===n,a=i(n),o=null;a?n===`de-e`&&(o=s(`switchInklusivumNote`)):o=s(`switchUnsupportedNote`);let u=`${e}-${t}-${Lx[t].indexOf(n)}`;return W.createElement(`li`,{key:n},W.createElement(`button`,{type:`button`,className:`witty-editor-switch-format`,"aria-disabled":f||!a||void 0,"aria-current":r||void 0,"aria-describedby":o?u:void 0,onClick:()=>!f&&a&&h(n)},eP(l,n),r&&` (${s(`switchCurrent`)})`),o&&W.createElement(`span`,{id:u,className:`witty-options-muted`},` `,o))};return W.createElement(`div`,{id:e,className:`witty-editor-settings witty-editor-switch witty-preferences`,role:`region`,"aria-label":s(`switchTitle`),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),o())}},W.createElement(`button`,{type:`button`,className:`witty-editor-settings-close`,"aria-label":s(`closeSettings`),title:s(`closeSettings`),onClick:o},`×`),W.createElement(`h2`,null,s(`switchTitle`)),W.createElement(`p`,{className:`witty-options-muted`},s(`switchIntro`)),a.map(t=>W.createElement(`section`,{key:t,"aria-labelledby":m?`${e}-${t}`:void 0},m&&W.createElement(`h3`,{id:`${e}-${t}`},s(t===`de`?`switchGerman`:`switchFrench`)),W.createElement(`ul`,{className:`witty-editor-switch-formats`,lang:t},Lx[t].map(e=>g(t,e))))),W.createElement(`p`,{className:`witty-editor-switch-result`},u))},oP=e=>{let{t}=ky(eb.editor);switch(e.state){case`checking`:return{text:t(`statusChecking`),announce:``};case`idle`:{let n=e.alerts?t(`statusAlerts`,{count:e.alerts}):t(`statusNoAlerts`),r=e.limitReached?`${n}. ${t(`limitReached`)}`:n;return{text:r,announce:r}}case`unauthorized`:return{text:t(`statusUnauthorized`),announce:t(`statusUnauthorized`)};case`outdated`:return{text:t(`statusOutdated`),announce:t(`statusOutdated`)};case`unsupportedLanguage`:return{text:t(`statusLanguage`),announce:t(`statusLanguage`)};default:return{text:t(`statusFailed`),announce:t(`statusFailed`)}}},sP=()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,cP=({status:e})=>e.state===`checking`?sP()?W.createElement(KN,{"aria-hidden":`true`,style:{opacity:.5}}):W.createElement(vO,null):e.state===`idle`?W.createElement(KN,{"aria-hidden":`true`}):W.createElement(qN,{"aria-hidden":`true`}),lP=({editor:e,store:t,status:n,loadOptions:r,onSwitch:i,switchSupported:a,switchLanguages:o})=>{let{t:s}=ky(eb.editor);XN(e);let{status:c,notice:l}=(0,W.useSyncExternalStore)(n.subscribe,n.get),u=oP(c),[d,f]=(0,W.useState)(0),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(null),_=(0,W.useId)(),v=(0,W.useRef)([]),y=(0,W.useId)(),b=()=>e.chain().focus(),x=[{key:`bold`,label:s(`bold`),glyph:`B`,run:()=>b().toggleBold().run(),active:e.isActive(`bold`),enabled:e.can().toggleBold()},{key:`italic`,label:s(`italic`),glyph:`I`,run:()=>b().toggleItalic().run(),active:e.isActive(`italic`),enabled:e.can().toggleItalic()},{key:`underline`,label:s(`underline`),glyph:`U`,run:()=>b().toggleUnderline().run(),active:e.isActive(`underline`),enabled:e.can().toggleUnderline()},{key:`heading`,label:s(`heading`),glyph:`H`,run:()=>b().toggleHeading({level:2}).run(),active:e.isActive(`heading`,{level:2}),enabled:e.can().toggleHeading({level:2})},{key:`bulletList`,label:s(`bulletList`),glyph:`•`,run:()=>b().toggleBulletList().run(),active:e.isActive(`bulletList`),enabled:e.can().toggleBulletList()},{key:`orderedList`,label:s(`orderedList`),glyph:`1.`,run:()=>b().toggleOrderedList().run(),active:e.isActive(`orderedList`),enabled:e.can().toggleOrderedList()},{key:`quote`,label:s(`quote`),glyph:`❝`,run:()=>b().toggleBlockquote().run(),active:e.isActive(`blockquote`),enabled:e.can().toggleBlockquote()},{key:`undo`,label:s(`undo`),glyph:`↶`,run:()=>b().undo().run(),enabled:e.can().undo()},{key:`redo`,label:s(`redo`),glyph:`↷`,run:()=>b().redo().run(),enabled:e.can().redo()}],S=x.length+1,C=e=>{let t=(e+S)%S;f(t),v.current[t]?.focus()},w=e=>{let t={ArrowRight:d+1,ArrowLeft:d-1,Home:0,End:S-1};e.key in t&&(e.preventDefault(),C(t[e.key]))},T=()=>{v.current[S-1]?.focus()},E=()=>{g(null),T()},D=e=>{m(!1),g(e)},O=a(),ee=[{key:`settings`,label:s(`menuSettings`),run:()=>D(`settings`)},{key:`switch`,label:s(`menuSwitchGender`),run:()=>D(`switch`),disabled:!O,note:O?void 0:s(`switchUnsupported`)},{key:`help`,label:s(`menuHelp`),href:JN},{key:`about`,label:s(`menuAbout`),href:YN}];return W.createElement(W.Fragment,null,W.createElement(`div`,{className:`witty-editor-toolbar`,role:`toolbar`,"aria-label":s(`toolbar`),onKeyDown:w},x.map((e,t)=>W.createElement(`button`,{key:e.key,ref:e=>{v.current[t]=e},type:`button`,className:`witty-editor-tool witty-editor-tool--${e.key}`,"aria-label":e.label,title:e.label,"aria-pressed":e.active,"aria-disabled":!e.enabled,tabIndex:t===d?0:-1,onFocus:()=>f(t),onMouseDown:e=>e.preventDefault(),onClick:()=>e.enabled&&e.run()},e.glyph)),W.createElement(`button`,{ref:e=>{v.current[S-1]=e},type:`button`,className:`witty-editor-tool witty-editor-tool--settings is-${c.state}`,"aria-label":s(`menu`),title:`${s(`menu`)} · ${u.text}`,"aria-haspopup":`menu`,"aria-expanded":p,"aria-controls":p?_:void 0,tabIndex:d===S-1?0:-1,onFocus:()=>f(S-1),onClick:()=>m(e=>!e),onKeyDown:e=>{e.key===`ArrowDown`&&(e.preventDefault(),e.stopPropagation(),m(!0))}},W.createElement(cP,{status:c})),p&&W.createElement(rP,{id:_,label:s(`menu`),items:ee,anchor:()=>v.current[S-1],onClose:e=>{m(!1),e&&T()}})),W.createElement(`span`,{className:`witty-editor-sr-only`,role:`status`,"aria-live":`polite`},l??u.announce),h===`settings`&&W.createElement(nP,{id:y,store:t,loadOptions:r,onClose:E}),h===`switch`&&W.createElement(aP,{id:y,store:t,loadOptions:r,onSwitch:i,supported:a,languages:o(),onClose:E}))},uP=`
151
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function mN(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
152
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function hN(e){return e==`.`||e==`!`||e==`?`}new class extends JM{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(hN(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends JM{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends JM{constructor(){super(...arguments),this.tokenize=mN}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(gN(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function gN(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=gN(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=gN(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends JM{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var _N=e=>(new DOMParser().parseFromString(e,`text/html`).body.textContent??``).trim(),vN={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},yN=e=>e.replace(/[&<>"']/g,e=>vN[e]),bN=(e,t,n)=>{let r=uN(t,n,{intlSegmenter:new Intl.Segmenter(e,{granularity:`word`})}),i,a=``,o=``,s=0,c=r.length-1;for(let e=0;e<r.length;e++)i=r[e],i.added||i.removed?(a===``?s=e:(a.endsWith(`</ins>`)||a.endsWith(`</del>`))&&(a+=` `),c=e,o=i.added?`ins`:`del`,i.value!==`undefined`&&(a+=`<${o}>${yN(i.value)}</${o}>`)):a!==``&&e<r.length-1&&(a+=yN(i.value));let l=120-_N(a).length;if(l>0){let e=``;if(s>0&&(e=r[0].value.substring(Math.max(0,r[0].value.length-Math.min(50,l)),r[0].value.length),e!=r[0].value&&(e=e.slice(e.indexOf(` `)),e=`...`+e),a=yN(e)+a),l-=e.length,c<r.length-1&&l){let e=r[r.length-1].value.substring(0,Math.min(50,l));e!=r[r.length-1].value&&(e=e.substring(0,e.lastIndexOf(` `)),e+=`...`),a+=yN(e)}}return a},xN=({analytics:e,element:t,data:n,prevData:r,hide:i,updateTextWithAlternative:a,addIgnoredTerm:o,movePopoverNextOrPrev:s,setLLMSuggestionsRequest:c,getLLMSuggestions:l,focusOnOpen:u,llmAlternativesEnabled:d,dashboardAvailable:f,ignoreTermPermanently:p,onAlternativeAccepted:m})=>{let h=document.documentElement||document.body,{t:g,i18n:_}=Ay(W.popover),{analytics:v,alternativeHovered:y,setAlternativeHovered:b,showLearningBite:x,setShowLearningBite:S,showLearningBiteRef:C,isLoading:w,isSuccess:T,isFailure:E,llmAlternativesResponse:D,hidePopover:O,clickAlternative:ee,alternativeKeyDown:te,handleIgnoreClick:ne,goToAdjacentAlert:re}=VC({analytics:e,element:t,data:n,prevData:r,hide:i,updateTextWithAlternative:a,addIgnoredTerm:o,movePopoverNextOrPrev:s,setLLMSuggestionsRequest:c,getLLMSuggestions:l,llmAlternativesEnabled:d,ignoreTermPermanently:p,onAlternativeAccepted:m});(0,U.useEffect)(()=>{_.changeLanguage(n.alert.data?.language)},[n.alert.data?.language]);let{x:k,y:A,strategy:ie,refs:ae}=IC({placement:`bottom-start`,middleware:[(e=>({name:`elementCords`,options:e,fn:({placement:n,rects:r})=>{let i={top:0,left:0,bottom:0,right:0};if(Nj(t)){let t=document.getElementsByTagName(`iframe`),n=Array.from(t).find(t=>{try{return(t.contentDocument||t.contentWindow?.document)?.contains(e.node)}catch(e){return console.error(`Failed to access iframe content: `,e),!1}});try{n?.getBoundingClientRect()&&(i=n?.getBoundingClientRect())}catch(e){console.error(`Failed to get iframe bounding rect: `,e)}}let a=e.position.x+i.left+h.scrollLeft,o=n.includes(`bottom`)?e.position.y+e.position.height+i.top+h.scrollTop:e.position.y-r.floating.height+i.top+h.scrollTop;return{x:C.current?a/2:a,y:o}}}))(n),zC(),LC(4),RC()]});(0,U.useEffect)(()=>{ae.setReference(t),C.current=x},[ae.setReference,x]),(0,U.useEffect)(()=>(Fj(t)?.addEventListener(`scroll`,oe),t?.addEventListener(`scroll`,oe),document?.addEventListener(`click`,se),document?.addEventListener(`input`,se),mO()?.addEventListener(`click`,se),mO()?.addEventListener(`input`,se),()=>{document.removeEventListener(`click`,se),document.removeEventListener(`input`,se),Fj(t)?.removeEventListener(`scroll`,oe),t.removeEventListener(`scroll`,oe),mO().removeEventListener(`click`,se),mO().removeEventListener(`input`,se)}),[ae.floating.current]),(0,U.useEffect)(()=>{u&&ae.floating.current?.focus()},[n.alert.id,u,ae.floating.current]),(0,U.useEffect)(()=>{let e=mO(),n=e=>{if(e.key!==`Escape`)return;e.preventDefault(),e.stopPropagation();let n=ae.floating.current?.contains(document.activeElement);O(!0),n&&t.focus?.()};return document.addEventListener(`keydown`,n,!0),e!==document&&e?.addEventListener(`keydown`,n,!0),()=>{document.removeEventListener(`keydown`,n,!0),e!==document&&e?.removeEventListener(`keydown`,n,!0)}},[ae.floating.current]);let oe=()=>{O()},se=e=>{let t=!ae.floating.current?.contains(e.target),r=mO().documentElement||mO().body,i=e.pageX+r.scrollLeft,a=e.pageY-r.scrollTop,o=i>=n.position.x&&i<=n.position.x+n.position.width&&a>=n.position.y&&a<=n.position.y+n.position.height;t&&!o&&O()},ce=e=>{let t=(e=!0)=>U.createElement(`div`,{key:`default-expl-${e?`visible`:`hidden`}`,style:{visibility:e?`visible`:`hidden`,gridArea:`1 / 1`}},n.alert.data?.explanation?.text,n.alert.data?.explanation?.context&&` (`+n.alert.data?.explanation?.context+`)`);if(!D||D.loading)return t(!0);let r=n.alert.data.alternatives.map((n,r)=>{let i=le(n);return U.createElement(`div`,{key:`explanation-${r}-${n.text||`alt`}`,style:{position:`relative`,top:0,gridArea:`1 / 1`,visibility:e&&e.text===n.text?`visible`:`hidden`}},i||t(!0))});return r.push(t(e===null)),r},le=e=>{let t=D?.data?.results?.get(e.text);if(!t){let r=n.alert.startOffset-n.alert.data.fullSentence.range[0],i=n.alert.endOffset-n.alert.data.fullSentence.range[0];t=n.alert.data.fullSentence.raw.substring(0,r)+e.text+n.alert.data.fullSentence.raw.substring(i)}return U.createElement(`div`,{dangerouslySetInnerHTML:{__html:bN(n.alert.data.language,n.alert.data.fullSentence.raw,t)}})},ue=e=>{if(e&&e.text===``)return U.createElement(`i`,null,g(`removeSpaces`));{let t=/\(\((.*?)\)\)/;if(RegExp(t).exec(e.text)){let n=e.text.split(t);return U.createElement(`span`,null,n[0],`\xA0`,`[`,U.createElement(`i`,null,n[1]),`]`,`\xA0`,n[2])}return e.text.length>25&&e.context?e.text.substring(0,25)+`...`:e.text.length>35?e.text.substring(0,35)+`...`:e.text}};return U.createElement(`div`,{id:`witty-works-ext-popover`,ref:ae.setFloating,role:`dialog`,"aria-label":g(`suggestionsDialog`),tabIndex:-1,style:{position:ie,top:`${A}px`,left:`${k}px`,maxWidth:`min(${x?850:350}px, calc(100vw - 16px))`},onMouseDown:e=>e.preventDefault()},U.createElement(`div`,{id:`witty-works-ext-popover-content`,className:`witty-works-ext-lato-popover-text`},U.createElement(`div`,{className:`witty-works-ext-section witty-works-ext-wittyworks-container witty-works-ext-container-row witty-works-ext-justify-space-between`},U.createElement(`a`,{className:`witty-works-ext-margin-right witty-works-ext-cursor-pointer`,href:`https://www.witty.works/`,target:`_blank`,rel:`noreferrer`,"aria-label":g(`wittyLogo`)},U.createElement(WC,{"aria-hidden":`true`})),U.createElement(`div`,{className:`witty-works-ext-container-row`},U.createElement(`button`,{className:`witty-works-ext-margin-right witty-works-ext-lato-popover-text-gray witty-works-ext-cursor-pointer witty-works-ext-margin-auto witty-works-button`,style:n.index===1?{display:`none`}:{},onClick:()=>{n.index!==1&&re(`previous`)},"aria-label":g(`previous`),title:g(`previous`)},U.createElement(KC,{alt:g(`previous`)})),U.createElement(`div`,{className:`witty-works-ext-margin-right witty-works-ext-lato-popover-text-gray witty-works-ext-margin-right`,role:`status`,"aria-live":`polite`,"aria-label":`${n.index} ${g(`alertOftotal`)} ${n.totalAlerts}`},`${n.index} ${g(`alertOftotal`)} ${n.totalAlerts}`),U.createElement(`button`,{className:`witty-works-ext-margin-right witty-works-ext-lato-popover-text-gray witty-works-ext-cursor-pointer witty-works-ext-margin-auto witty-works-button`,style:n.index===n.totalAlerts?{display:`none`}:{},onClick:()=>{n.index!==n.totalAlerts&&re(`next`)},"aria-label":g(`next`),title:g(`next`)},U.createElement(GC,{alt:g(`next`)}))),U.createElement(`button`,{className:`witty-works-ext-lato-popover-text-gray witty-works-ext-cursor-pointer witty-works-button`,onClick:()=>{O(!0)},"aria-label":g(`close`),title:g(`close`)},U.createElement(UC,{alt:g(`close`)}))),n.alert.data?.explanation?.text&&U.createElement(U.Fragment,null,U.createElement(`div`,{className:`witty-works-ext-separator`}),U.createElement(`div`,{className:`witty-works-ext-wittyworks-container witty-works-ext-container-rounded witty-works-ext-container-column witty-works-ext-full-padding witty-works-ext-justify-start witty-works-ext-margin-top`,style:{backgroundColor:sv(n.alert.data?.gravity,n.alert.data?.subcategory).default}},U.createElement(`div`,{className:`witty-works-ext-lato-popover-text witty-works-ext-justify-space-between`,style:{display:`flex`,flexDirection:x?`row`:`column`,alignItems:x?`center`:`flex-start`}},U.createElement(`div`,{className:`witty-works-ext-container-row witty-works-ext-justify-start`,style:{flex:1}},U.createElement(`div`,{style:{fontSize:`2em`,marginRight:`0.5em`,flexShrink:0,height:`100%`}},n.alert.data?.explanation?.icon_image?U.createElement(`img`,{src:n.alert.data?.explanation?.icon_image,alt:``,style:{width:`50px`}}):U.createElement(`span`,null,n.alert.data?.explanation?.icon)),U.createElement(`div`,{className:`witty-works-ext-rephrasing`,style:{flex:`0 1 252px`,minWidth:0,height:`100%`}},U.createElement(`b`,null,n.alert.data?.label.split(`:`).pop()),U.createElement(`br`,null),U.createElement(`div`,{style:{position:`relative`,display:`grid`}},ce(y)))),n.alert.data?.explanation?.url&&U.createElement(`div`,{className:`witty-works-ext-container-row witty-works-ext-justify-end witty-works-ext-lato-popover-text-gray witty-works-ext-cursor-pointer`,style:{marginTop:x?`0em`:`1em`}},U.createElement(`button`,{type:`button`,className:`witty-works-ext-dropdown-select witty-works-ext-container-row`,onClick:()=>{v.popoverLogs(n.alert,`learning_bites`),S(!x)},style:{cursor:n.alert.data?.explanation?.url?`pointer`:`default`},"aria-expanded":x,"aria-label":g(`leanrMoreExtendedText`),title:g(`leanrMoreExtendedText`)},g(`learnMore`),n.alert.data?.explanation?.content===`video`&&U.createElement(qC,{className:`witty-works-ext-margin-left`,style:{marginTop:`0.2em`},alt:g(`video`)}),U.createElement(`div`,{className:`witty-works-ext-margin-left`,style:{pointerEvents:`none`}},x?U.createElement(XC,null):U.createElement(ZC,null))),n.alert.data?.source?.url&&U.createElement(`a`,{className:`witty-works-ext-dropdown-select witty-works-ext-container-row`,href:n.alert.data.source.url,target:`_new`,"aria-label":g(`visitSource`),title:g(`visitSource`)},g(`visitSource`),U.createElement(YC,{className:`witty-works-ext-margin-left`,alt:g(`openNewWindow`)})))))),U.createElement(`div`,{style:{display:x?`flex`:`none`}},U.createElement(`div`,{className:`witty-works-ext-learning-bite-dig-deeper`},U.createElement(`div`,null,U.createElement(`div`,null,qM(n.alert.data?.explanation?.long_text??``)),U.createElement(`div`,null,n.alert.data?.explanation?.url&&U.createElement(`a`,{className:`witty-works-dig-deeper witty-works-ext-container-row`,href:n.alert.data.explanation.url,target:`_new`,"aria-label":g(`leanrMoreExtendedText`),title:g(`leanrMoreExtendedText`)},g(`leanrMoreExtendedText`),U.createElement(JC,{className:`witty-works-ext-margin-left`,alt:g(`openNewWindow`)})))),n.alert.data?.explanation?.video_url&&U.createElement(`video`,{width:`500`,style:{maxWidth:`100%`},controls:!0},U.createElement(`source`,{src:n.alert.data?.explanation?.video_url,type:`video/mp4`}),`Your browser does not support the video tag.`),!n.alert.data?.explanation?.video_url&&n.alert.data?.explanation?.image_url&&U.createElement(`img`,{style:{width:`500px`,maxWidth:`100%`},src:n.alert.data?.explanation?.image_url?.src,alt:n.alert.data?.explanation?.image_url?.alt}))),U.createElement(`div`,{className:`witty-works-ext-separator`,style:{marginBottom:`1em`,marginTop:`1em`}}),n.alert.data?.alternatives?.length>0&&!x&&U.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-row`},U.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-btn-container`},g(`insteadTry`)),U.createElement(`div`,null,n.alert.data?.alternatives.map((e,t)=>e.remove?U.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-btn-container`,onMouseEnter:()=>{b(e)},onMouseLeave:()=>{b(null)},key:`${t}-${e.text||`alt`}-container`},U.createElement(`button`,{type:`button`,className:`witty-works-ext-wittyworks-popover-alternative-btn witty-works-ext-lato-popover-text-green witty-works-ext-remove-text witty-works-ext-margin-right`,key:`${t}-${e.text||`alt`}-remove-it`,onPointerDown:e=>ee(e.nativeEvent,` `),onKeyDown:te(` `),"aria-label":`${g(`removeText`)} ${n.alert.data?.text}`,title:g(`removeText`)},n.alert.data?.text),e.context&&U.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-context`},e.context)):U.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-btn-container`,key:`${t}-${e.text||`alt`}-container`,onMouseEnter:()=>{b(e)},onMouseLeave:()=>{b(null)}},U.createElement(`button`,{type:`button`,className:`witty-works-ext-wittyworks-popover-alternative-btn witty-works-ext-lato-popover-text-green witty-works-ext-margin-right`,onPointerDown:e=>ee(e.nativeEvent,n.alert.data?.alternatives[t]?.text),onKeyDown:te(n.alert.data?.alternatives[t]?.text),"aria-label":n.alert.data?.alternatives[t]?.text,title:n.alert.data?.alternatives[t]?.text},ue(e)),e&&e.context&&U.createElement(`div`,{className:`witty-works-ext-wittyworks-popover-alternative-context`,style:{color:`black`}},e.url?U.createElement(U.Fragment,null,e.context.startsWith(`💡`)?U.createElement(U.Fragment,null,U.createElement(`span`,{style:{whiteSpace:`nowrap`}},U.createElement(`span`,null,e.context.substring(0,3)),U.createElement(`a`,{href:e.url,target:`_blank`,style:{textDecoration:`underline`,color:`black`},rel:`noopener noreferrer`,"aria-label":e.context,title:e.context},e.context.substring(3)))):U.createElement(`a`,{href:e.url,target:`_blank`,style:{textDecoration:`underline`,color:`black`,whiteSpace:`nowrap`},rel:`noopener noreferrer`,"aria-label":e.context,title:e.context},e.context)):U.createElement(`span`,{style:{color:`black`,whiteSpace:`nowrap`}},e.context))))))),!x&&U.createElement(`div`,{className:`witty-works-ext-container-row`},U.createElement(`button`,{onClick:ne(`ignore_once`),className:`witty-works-ext-ignore-section witty-works-ext-ignore-color-transformer witty-works-ext-margin-top witty-works-button`,"aria-label":g(`ignoreOnce`),title:g(`ignoreOnce`)},U.createElement(`span`,{className:`witty-works-ext-margin-right witty-works-ext-cursor-pointer`},U.createElement(fO,{alt:g(`ignoreOnce`)})),U.createElement(`span`,{className:`witty-works-ext-lato-popover-text-gray`},g(`ignoreOnce`))),f&&n?.alert?.data?.text.length<=50&&U.createElement(`button`,{onClick:ne(`ignore_permanently`),className:`witty-works-ext-ignore-section witty-works-ext-ignore-color-transformer witty-works-ext-margin-top witty-works-button`,"aria-label":g(`ignorePermanently`),title:g(`ignorePermanently`)},U.createElement(`span`,{className:`witty-works-ext-margin-right witty-works-ext-cursor-pointer`},U.createElement(fO,{alt:g(`ignorePermanently`)})),U.createElement(`span`,{className:`witty-works-ext-lato-popover-text-gray witty-works-ext-margin-right`},g(`ignorePermanently`)),w===`ignore_permanently`&&U.createElement(lO,null),T===`ignore_permanently`&&U.createElement(uO,null),E===`ignore_permanently`&&U.createElement(U.Fragment,null,U.createElement(dO,null),` `,U.createElement(`span`,{className:`witty-works-ext-margin-left`},g(`failedRequestText`))))))},SN=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString()},CN=()=>({data:null,error:null,loading:!0}),wN=e=>`${SN(e.alert.data.fullSentence.raw)}::${e.alert.data.text}`,TN=(e,t)=>({data:e?{...e,results:new Map(Object.entries(e.results))}:null,error:t||null,loading:!1}),EN=(e,t,n,r)=>{let i=kb(n,r),{from:a,to:o}=t;if(i.scope===`sentence`){let{detail:r}=t,s=r.data.fullSentence,c=t.from-(r.absOffset-s.range[0]),l=c+s.raw.length;c>=0&&l<=e.content.size&&e.textBetween(c,l)===s.raw?(a=c,o=l):i=kb(n,null)}return n===` `&&a>0&&e.textBetween(a-1,a)===` `&&--a,{from:a,to:o,text:i.text}},DN={popoverLogs:()=>void 0,alternativeLog:()=>void 0,ignoreLog:()=>void 0},ON=class{view;options;container;root;openId=null;focusOnOpen=!1;prevData=null;llmCache=new Map;rewriteGeneration=0;destroyed=!1;constructor(e,t){this.view=e,this.options=t,this.container=document.createElement(`div`),this.container.className=`witty-editor-popover`,document.body.append(this.container),this.root=(0,qx.createRoot)(this.container)}get isOpen(){return this.openId!==null}open(e,{viaKeyboard:t=!1}={}){this.destroyed||(this.focusOnOpen=t,this.openId=e,Lx(this.view,e),this.render())}openAtSelection(){let{from:e}=this.view.state.selection,t=Ox(this.view.state).find(t=>t.from<=e&&e<=t.to);return t?(this.open(t.id,{viaKeyboard:!0}),!0):!1}anchorRect(e){let t=this.view.domAtPos(e.from),n=this.view.domAtPos(e.to),r=document.createRange();r.setStart(t.node,t.offset),r.setEnd(n.node,n.offset);let i=[...r.getClientRects()].find(e=>e.width>0);if(i)return i;let a=this.view.coordsAtPos(e.from),o=this.view.coordsAtPos(e.to);return new DOMRect(a.left,a.top,Math.max(o.right-a.left,1),a.bottom-a.top)}close(){this.openId!==null&&(this.openId=null,this.prevData=null,Lx(this.view,null),this.root.render(null))}update(){if(this.openId!==null){if(!this.current()){this.close();return}this.render()}}resetRewrites(){this.llmCache.clear(),this.rewriteGeneration+=1}destroy(){this.destroyed=!0,this.openId=null,this.root.unmount(),this.container.remove()}current(){return Ox(this.view.state).find(e=>e.id===this.openId)}render(){if(this.destroyed)return;let e=Ox(this.view.state),t=e.findIndex(e=>e.id===this.openId),n=e[t];if(!n){this.close();return}let r={index:t+1,totalAlerts:e.length,alert:n.detail,position:this.anchorRect(n),node:this.view.domAtPos(n.from).node};this.root.render(U.createElement(xN,{analytics:DN,element:this.view.dom,data:r,prevData:this.prevData,hide:()=>this.close(),updateTextWithAlternative:e=>this.apply(n,e),addIgnoredTerm:e=>{this.options.ignored.add(e),Rx(this.view,e)},movePopoverNextOrPrev:e=>this.move(t,e),setLLMSuggestionsRequest:e=>this.requestRewrites(e),getLLMSuggestions:e=>this.llmCache.get(wN(e)),focusOnOpen:this.focusOnOpen,llmAlternativesEnabled:this.options.llmAlternatives(),dashboardAvailable:!1,ignoreTermPermanently:()=>Promise.reject(Error(`no dashboard to persist ignores to`)),onAlternativeAccepted:()=>void 0})),this.prevData=r}move(e,t){let n=Ox(this.view.state)[e+(t===`previous`?-1:1)];n&&this.open(n.id,{viaKeyboard:this.focusOnOpen})}apply(e,t){this.close();let{state:n}=this.view,{from:r,to:i,text:a}=EN(n.doc,e,t,this.llmCache.get(wN({alert:e.detail}))?.data?.results),o=a?n.tr.insertText(a,r,i):n.tr.delete(r,i);this.view.dispatch(o.scrollIntoView()),this.view.focus()}rewriteBody(e){let t={...gb(e.alert.data.fullSentence,e.alert),client:Cb},n=xb(e.alert.data.language,this.options.config());return n?{...t,gender_separator:n}:t}requestRewrites(e){let t=wN(e),n=this.llmCache.get(t);if(n&&!n.error)return;let r=this.rewriteGeneration;this.llmCache.set(t,CN()),this.render(),fetch(`${this.options.endpoint}${ub}`,{method:`POST`,headers:{...pb,...this.options.headers()},body:JSON.stringify(this.rewriteBody(e)),signal:AbortSignal.timeout(this.options.llmTimeoutMs)}).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return TN(await e.json(),null)}).catch(e=>TN(null,{message:String(e)})).then(e=>{this.destroyed||r!==this.rewriteGeneration||(this.llmCache.set(t,e),this.openId!==null&&this.render())})}},kN=e=>{let t=e,n=new Set;return{get:()=>t,set(e){t={...t,...e},n.forEach(e=>e())},subscribe(e){return n.add(e),()=>{n.delete(e)}}}},AN=e=>kN(e),jN=e=>{let t={};for(let n of[`gendered_roles_format`,`german_gender_ending`,`french_gender_separator`]){let r=e[n];r&&(t[n]=r)}return t},MN=(e,t,n)=>{let r={...e};return n?r[t]=n:delete r[t],r},NN=(e,t,n)=>({...e,disabled_categories:iv(t.key,t.advanced_key,n,e.disabled_categories??[])}),PN=`gender_format`,FN=`de-e`,IN={de:[`/in`,`/-in`,`_in`,`*in`,`:in`,`(-)`,`()`,`In`,FN],fr:[`·`,`·s`,`.`,`.s`,`/`,`/s`]},LN={de:`german_gender_ending`,fr:`french_gender_separator`},RN=e=>IN.de.includes(e)?`de`:IN.fr.includes(e)?`fr`:null,zN=(e,t)=>e?.slice(0,2)===t,BN=`gendered_denominations_ending_advanced`,VN=(e,t,n=`de`)=>{let r=e.disabled_categories??[],i=r.filter(e=>e!==BN&&e!==BN.replace(/_advanced$/,``)),a=i.length!==r.length||e.gendered_roles_format===`none`||e.gendered_roles_format===`binary_gender`;return{config:{...e,[LN[n]]:t,...e.disabled_categories?{disabled_categories:i}:{},gendered_roles_format:`inclusive_gender`},needed:a}},HN=({alternatives:e,bulk_alternative:t})=>{let n;return t==null?n=e?.length===1?e[0]:void 0:Number.isInteger(t)&&(n=e?.[t]),typeof n?.text==`string`?n.text:null},UN=(e,t=`de`,n=PN)=>e.flatMap(({from:e,to:r,detail:i})=>{if(i.data.bulk!==n||!zN(i.data.language,t))return[];let a=HN(i.data);return a===null?[]:[{from:e,to:r,text:a}]}),WN=(e,t)=>{let n=e.tr,r=1/0;for(let{from:e,to:i,text:a}of[...t].sort((e,t)=>t.from-e.from))i>r||(n.insertText(a,e,i),r=e);return n},GN=/\p{Ll}(?:([*_:]|\/-?)in(?:nen)?|(In)(?:nen)?|\((-?)in(?:nen)?\))(?!\p{L})/gu,KN=e=>{let[,t,n,r]=e;return n?`In`:r===void 0?`${t}in`:r?`(-)`:`()`},qN=(e,t)=>[...e.matchAll(GN)].some(e=>KN(e)!==t),JN=(e,t,n)=>{let r=n.filter(({detail:e})=>e.data.subcategory===BN);return r.some(({detail:e})=>!e.data.bulk)?`unsupported`:!r.length&&qN(e,t)?`disabled`:`nothing`},YN=(e,t,n,r,{language:i=`de`,previous:a}={})=>{let o=e.responses.filter(e=>zN(e.language,i)),s=o.find(({separator:e})=>e&&e!==t)?.separator;if(s)return{outcome:`forced`,applied:s};let c=UN(r,i);if(c.length)return{outcome:`switched`,apply:c};if(!o.length)return{outcome:`nothing`};let l=o.flatMap(({bulkActions:e})=>e?[e]:[]);return l.length?l.some(e=>e.includes(`gender_format`))?{outcome:a===`de-e`&&t!==`de-e`?`fromInklusivum`:`nothing`}:{outcome:i===`fr`||t===`de-e`?`unsupported`:`disabled`}:i===`fr`?{outcome:`unsupported`}:{outcome:JN(n,t,r)}},XN=async e=>{let t=async t=>{let n=await fetch(`${e.endpoint}${t}`,{headers:{...pb,...e.headers()}});if(!n.ok)throw Error(String(n.status));return n.json()},[n,r]=await Promise.allSettled([t(fb(cb(navigator.language))),t(`${db}?locale=${sb(navigator.language)}`).catch(()=>t(db))]),i=n.status===`fulfilled`?n.value:void 0;return{categories:i?.categories||[],categoryGroups:i?.groups||[],categoriesError:!i,configOptions:r.status===`fulfilled`&&r.value.options||{},configOptionsError:r.status!==`fulfilled`}},ZN=e=>{let t;return()=>(t??=XN(e).then(e=>((e.categoriesError||e.configOptionsError)&&(t=void 0),e)),t)},QN=(e,t)=>{let n=RN(t),r=n?LN[n]:`german_gender_ending`;return e?.configOptions[r]?.labels?.[t]||t},$N=`wittyGenderFormatSwitch`,eP=(e,t,n)=>{let r=QN(n,t.target),i={switched:e(`switched`,{count:t.count,format:r}),nothing:e(`switchNothing`,{format:r}),fromInklusivum:e(`switchFromInklusivum`),disabled:e(`switchDisabled`),unsupported:e(`switchUnsupportedTarget`,{format:r}),unavailable:e(`switchUnavailable`,{format:r}),forced:e(`switchForced`,{format:QN(n,t.applied??``)})}[t.outcome];return t.limitReached&&(t.outcome===`switched`||t.outcome===`nothing`)?`${i} ${e(`limitReached`)}`:i},tP=({editor:e,settings:t,status:n,waiters:r,loadOptions:i,t:a,lang:o,onStatus:s,destroyed:c})=>{let l=null,u=null,d=`unknown`,f=new Set,p=null,m=async t=>{let r=await i().catch(()=>null);c()||(n.set({notice:eP(a,t,r)}),s?.({state:`idle`,alerts:Ox(e.state).length,limitReached:Ex(e.state),genderFormatSwitch:t}))},h=(e,t)=>{let n=t.responses.some(({bulkActions:e})=>e);!n&&e===`de`&&(d=`no`),(n||e===`fr`)&&(e===`fr`?IN.fr:[FN]).forEach(e=>f.add(e))},g=async n=>{if(c())throw new Bx;let i=RN(n);if(!i)return{outcome:`unavailable`,target:n,count:0,limitReached:!1};let a=LN[i],o=t.get().config,s={...o,[a]:n};l=VN(s,n,i).config;let d={responses:[]};u=d;let f=r.next();t.set({config:s}),Fx(e.view);let p;try{p=await f}catch(n){throw c()||(t.set({config:o}),Fx(e.view)),n}finally{l=null,u=null}let g=YN(d,n,e.state.doc.textContent,Ox(e.state),{language:i,previous:o[a]}),_;return g.outcome===`switched`?(e.view.dispatch(WN(e.state,g.apply).setMeta($N,!0)),_={outcome:`switched`,target:n,count:g.apply.length,limitReached:p}):g.outcome===`forced`?(t.set({config:o}),_={outcome:`forced`,target:n,count:0,limitReached:p,applied:g.applied}):(g.outcome===`unsupported`&&h(i,d),_={outcome:g.outcome,target:n,count:0,limitReached:p}),Fx(e.view),await m(_),_};return{requestConfig:()=>l,request:()=>{let e=u;return t=>{(t.bulk_actions||t.results?.some(e=>e.bulk===`gender_format`))&&(d=`yes`),e?.responses.push({language:t.language,separator:t.gender_separator,bulkActions:t.bulk_actions})}},switchGenderFormat:e=>(p=(p??Promise.resolve()).catch(()=>void 0).then(()=>g(e)),p),supported:e=>d!==`no`&&!(e&&f.has(e)),languages:()=>{let t=o.slice(0,2);if(t===`de`||t===`fr`)return[t];let n=Dx(e.state),r=[`de`,`fr`].filter(e=>n[e]).sort((e,t)=>n[t]-n[e]);return r.length?r:[`de`,`fr`]}}},nP=e=>(0,G.jsxs)(`svg`,{width:25,height:21,viewBox:`0 0 25 21`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M14.4244 15.865C15.2179 17.3926 17.2257 17.3746 17.9964 15.833L16.5828 14.9778C16.4193 15.3047 15.9934 15.3086 15.8251 14.9846L14.4244 15.865Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.0406 13.2011L14.4244 15.865L15.8251 14.9846L14.4413 12.3206L13.0406 13.2011Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.3408 11.9904C12.954 12.2335 12.8196 12.7756 13.0406 13.2011L14.4413 12.3206C14.2203 11.8951 13.7276 11.7473 13.3408 11.9904Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 4.41595C10.7681 3.56076 10.0151 3 9.17787 3V4.7747C9.17787 4.7747 9.51518 4.89365 9.58114 5.07505L10.5101 7.62978C10.6755 8.0848 11.145 8.30612 11.5586 8.12411C11.9722 7.94211 12.1734 7.4257 12.008 6.97068L11.079 4.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 3H4.05053V4.7747H9.17787V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 3C2.49311 3 1.50583 4.83684 2.25638 6.33803L3.66995 5.48277C3.51074 5.16433 3.72017 4.7747 4.05053 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 14.8317L3.66995 5.48277L2.25638 6.33803L6.93059 15.687L8.34416 14.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.11322 14.8151C8.95664 15.1596 8.51289 15.1692 8.34416 14.8317L6.93059 15.687C7.71306 17.252 9.75015 17.2339 10.519 15.687L9.11322 14.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 4.24516L9.11322 14.8151L10.519 15.687C10.5317 15.6613 10.5441 15.6353 10.5562 15.6088L15.3604 5.03882L13.9175 4.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M15.7489 3C14.9733 3 14.2643 3.48204 13.9175 4.24516L15.3604 5.03882C15.434 4.87695 15.5844 4.7747 15.7489 4.7747V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M20.9495 3H15.7489V4.7747H20.9495V3Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M22.7436 6.33803C23.4942 4.83684 22.5069 3 20.9495 3V4.7747C21.2798 4.7747 21.4893 5.16433 21.3301 5.48277L22.7436 6.33803Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M17.9964 15.833L22.7436 6.33803L21.3301 5.48277L16.5828 14.9778L17.9964 15.833Z`,fill:`#9489DB`})]}),rP=e=>(0,G.jsxs)(`svg`,{width:25,height:24,viewBox:`0 0 25 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,G.jsx)(`path`,{d:`M14.4244 18.865C15.2179 20.3926 17.2257 20.3746 17.9964 18.833L16.5828 17.9778C16.4193 18.3047 15.9934 18.3086 15.8251 17.9846L14.4244 18.865Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.0406 16.2011L14.4244 18.865L15.8251 17.9846L14.4413 15.3206L13.0406 16.2011Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.3408 14.9904C12.954 15.2335 12.8196 15.7756 13.0406 16.2011L14.4413 15.3206C14.2203 14.8951 13.7276 14.7473 13.3408 14.9904Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M11.079 7.41595C10.7681 6.56076 10.0151 6 9.17787 6V7.7747C9.17787 7.7747 9.51518 7.89365 9.58114 8.07505L10.5101 10.6298C10.6755 11.0848 11.145 11.3061 11.5586 11.1241C11.9722 10.9421 12.1734 10.4257 12.008 9.97068L11.079 7.41595Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.17787 6H4.05053V7.7747H9.17787V6Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M4.05053 6C2.49311 6 1.50583 7.83684 2.25638 9.33803L3.66995 8.48277C3.51074 8.16433 3.72017 7.7747 4.05053 7.7747V6Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M8.34416 17.8317L3.66995 8.48277L2.25638 9.33803L6.93059 18.687L8.34416 17.8317Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M9.11322 17.8151C8.95664 18.1596 8.51289 18.1692 8.34416 17.8317L6.93059 18.687C7.71306 20.252 9.75014 20.2339 10.519 18.687L9.11322 17.8151Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M13.9175 7.24516L9.11322 17.8151L10.519 18.687C10.5317 18.6613 10.5441 18.6353 10.5562 18.6088L15.3604 8.03882L13.9175 7.24516Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M15.7489 6C14.9733 6 14.2643 6.48204 13.9175 7.24516L15.3604 8.03882C15.434 7.87695 15.5844 7.7747 15.7489 7.7747V6Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M20.9495 6H15.7489V7.7747H20.9495V6Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M22.7436 9.33803C23.4942 7.83684 22.5069 6 20.9495 6V7.7747C21.2798 7.7747 21.4893 8.16433 21.33 8.48277L22.7436 9.33803Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M17.9964 18.833L22.7436 9.33803L21.33 8.48277L16.5828 17.9778L17.9964 18.833Z`,fill:`#9489DB`}),(0,G.jsx)(`path`,{d:`M6.38 5.43V11.15C6.38 11.7633 6.34333 12.3733 6.27 12.98C6.19667 13.58 6.1 14.1933 5.98 14.82H3.88C3.76 14.1933 3.66333 13.58 3.59 12.98C3.51667 12.3733 3.48 11.7633 3.48 11.15V5.43H6.38ZM3.14 18.43C3.14 18.19 3.18333 17.9667 3.27 17.76C3.36333 17.5533 3.48667 17.3733 3.64 17.22C3.8 17.0667 3.98667 16.9467 4.2 16.86C4.41333 16.7667 4.64667 16.72 4.9 16.72C5.14667 16.72 5.37667 16.7667 5.59 16.86C5.80333 16.9467 5.99 17.0667 6.15 17.22C6.31 17.3733 6.43333 17.5533 6.52 17.76C6.61333 17.9667 6.66 18.19 6.66 18.43C6.66 18.67 6.61333 18.8967 6.52 19.11C6.43333 19.3167 6.31 19.4967 6.15 19.65C5.99 19.8033 5.80333 19.9233 5.59 20.01C5.37667 20.0967 5.14667 20.14 4.9 20.14C4.64667 20.14 4.41333 20.0967 4.2 20.01C3.98667 19.9233 3.8 19.8033 3.64 19.65C3.48667 19.4967 3.36333 19.3167 3.27 19.11C3.18333 18.8967 3.14 18.67 3.14 18.43Z`,fill:`#F06464`})]}),iP=({id:e,label:t,items:n,anchor:r,onClose:i})=>{let a=(0,U.useRef)([]),[o,s]=(0,U.useState)(0);(0,U.useEffect)(()=>{a.current[0]?.focus()},[]);let c=e=>{let t=(e+n.length)%n.length;s(t),a.current[t]?.focus()};return U.createElement(`div`,{id:e,className:`witty-editor-menu`,role:`menu`,tabIndex:-1,"aria-label":t,onKeyDown:e=>{e.stopPropagation();let t=a.current.indexOf(document.activeElement),r=t<0?o:t,s={ArrowDown:r+1,ArrowUp:r-1,Home:0,End:n.length-1};e.key in s?(e.preventDefault(),c(s[e.key])):e.key===`Escape`?(e.preventDefault(),i(!0)):e.key===`Tab`&&i(!1)},onBlur:e=>{let t=e.relatedTarget;(!t||!e.currentTarget.contains(t)&&t!==r())&&i(!1)}},n.map((e,t)=>{let n={ref:e=>{a.current[t]=e},role:`menuitem`,tabIndex:t===o?0:-1,className:`witty-editor-menu-item`,onFocus:()=>s(t),onMouseDown:e=>e.preventDefault()};return U.createElement(`div`,{key:e.key,role:`none`},e.href?U.createElement(`a`,{...n,href:e.href,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>i(!0)},e.label):U.createElement(`button`,{...n,type:`button`,"aria-disabled":e.disabled||void 0,onClick:()=>!e.disabled&&e.run?.()},e.label,e.note&&U.createElement(`span`,{className:`witty-editor-menu-note`},e.note)))}))},aP=({categoryKey:e,label:t,value:n,hasAdvanced:r,locked:i=!1,onChange:a})=>{let{t:o}=Ay(W.options),s=[o(`levelOff`),o(`levelBasic`),o(`levelAdvanced`)][n];return U.createElement(`div`,{className:`witty-category`},U.createElement(`button`,{type:`button`,className:[`witty-category-toggle`,n>nv.Off?`is-on`:``,n===nv.Basic?`is-middle`:``,i?`is-locked`:``].filter(Boolean).join(` `),"data-category":e,"data-level":n,"aria-label":`${t}: ${s}`,"aria-disabled":i,title:i?o(`levelLocked`):s,onClick:()=>{i||a(n>=(r?nv.Advanced:nv.Basic)?nv.Off:n+1)}},U.createElement(`span`,{className:`witty-category-knob`})),U.createElement(`span`,{className:`witty-category-label`},t),U.createElement(`span`,{className:`witty-category-level`},s))},oP={gendered_roles_format:`genderedRolesFormat`,german_gender_ending:`germanGenderEnding`,french_gender_separator:`frenchGenderSeparator`},sP=({orthography:e,onOrthographyChange:t,llmAlternatives:n,onLlmAlternativesChange:r,configOptions:i,languageFormat:a,onFormatFieldChange:o,categories:s,categoryGroups:c,disabledCategories:l,onCategoryLevelChange:u,categoriesError:d=!1,idPrefix:f=``})=>{let{t:p}=Ay(W.options),m=(e,t)=>i[e]?.labels?.[t]||t;return U.createElement(U.Fragment,null,U.createElement(`section`,null,U.createElement(`h2`,null,p(`customisationHeadline`)),U.createElement(`p`,{className:`witty-options-muted`},p(`orgOverrideNote`)),U.createElement(`label`,null,U.createElement(`input`,{type:`checkbox`,id:`${f}opt-orthography`,checked:e,onChange:e=>t(e.target.checked)}),`\xA0`,p(`orthography`)),U.createElement(`label`,null,U.createElement(`input`,{type:`checkbox`,id:`${f}opt-llm-alternatives`,checked:n,onChange:e=>r(e.target.checked)}),`\xA0`,p(`llmAlternatives`))),Object.keys(i).length>0&&U.createElement(`section`,{id:`${f}language-format-section`},U.createElement(`h2`,null,p(`languageHeadline`)),U.createElement(`p`,{className:`witty-options-muted`},p(`orgOverrideNote`)),tv.filter(e=>i[e]).map(e=>{let t=i[e],n=oP[e];return U.createElement(`div`,{className:`witty-format-field`,key:e},U.createElement(`label`,{htmlFor:`${f}opt-${e}`},p(n)),U.createElement(`p`,{className:`witty-options-muted`},p(`${n}Hint`)),U.createElement(`select`,{id:`${f}opt-${e}`,"data-field":e,value:a[e]||``,onChange:t=>o(e,t.target.value)},U.createElement(`option`,{value:``},p(`useApiDefault`),t.default?` (${t.default})`:``),t.values.map(t=>U.createElement(`option`,{value:t,key:t},m(e,t)))))})),s.length>0&&U.createElement(`section`,{id:`${f}categories-section`},U.createElement(`h2`,null,p(`categoriesHeadline`)),U.createElement(`p`,{className:`witty-options-muted`},p(`categoriesIntro`)),c.map(e=>{let t=s.filter(t=>t.parent===e.key);return t.length?U.createElement(`div`,{className:`witty-category-group`,key:e.key},U.createElement(`h3`,null,e.label||e.key),t.map(e=>U.createElement(aP,{key:e.key,categoryKey:e.key,label:e.label||e.key,hasAdvanced:!!e.advanced_key,locked:e.proficiency_level===`openly_discriminating`,value:rv(e.key,e.advanced_key,l),onChange:t=>u(e,t)}))):null})),d&&U.createElement(`p`,{className:`witty-options-muted`},p(`categoriesFailed`)))},cP=e=>(0,U.useSyncExternalStore)(e.subscribe,e.get),lP=e=>{let[t,n]=(0,U.useState)(null);return(0,U.useEffect)(()=>{let t=!0;return e().then(e=>{t&&n(e)}),()=>{t=!1}},[e]),t},uP=({id:e,label:t,className:n,onClose:r,children:i})=>{let{t:a}=Ay(W.editor),o=(0,U.useRef)(null);return(0,U.useEffect)(()=>{o.current?.focus()},[]),U.createElement(`section`,{ref:o,id:e,className:[`witty-editor-settings`,`witty-preferences`,n].filter(Boolean).join(` `),"aria-label":t,tabIndex:-1,onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),r())}},U.createElement(`button`,{type:`button`,className:`witty-editor-settings-close`,"aria-label":a(`closeSettings`),title:a(`closeSettings`),onClick:r},`×`),i)},dP=({id:e,store:t,loadOptions:n,onClose:r})=>{let{t:i}=Ay(W.editor),a=cP(t),o=lP(n),{config:s}=a;return U.createElement(uP,{id:e,label:i(`settings`),onClose:r},!o&&U.createElement(`p`,{"aria-live":`polite`},i(`settingsLoading`)),U.createElement(sP,{idPrefix:`${e}-`,orthography:a.orthography,onOrthographyChange:e=>t.set({orthography:e}),llmAlternatives:a.llmAlternatives,onLlmAlternativesChange:e=>t.set({llmAlternatives:e}),configOptions:o?.configOptions??{},languageFormat:jN(s),onFormatFieldChange:(e,n)=>t.set({config:MN(s,e,n)}),categories:o?.categories??[],categoryGroups:o?.categoryGroups??[],disabledCategories:s.disabled_categories??[],onCategoryLevelChange:(e,n)=>t.set({config:NN(s,e,n)}),categoriesError:o?.categoriesError}))},fP=({id:e,store:t,loadOptions:n,onSwitch:r,supported:i,languages:a,onClose:o})=>{let{t:s}=Ay(W.editor),c=cP(t),l=lP(n),[u,d]=(0,U.useState)(``),[f,p]=(0,U.useState)(!1),m=(0,U.useRef)(!0);(0,U.useEffect)(()=>()=>{m.current=!1},[]);let h=a.length>1,g=e=>{p(!0),d(s(`switching`)),r(e).then(e=>{m.current&&d(eP(s,e,l))}).catch(()=>{m.current&&d(s(`statusFailed`))}).finally(()=>{m.current&&p(!1)})},_=(t,n)=>{let r=c.config[LN[t]]===n,a=i(n),o=null;a?n===`de-e`&&(o=s(`switchInklusivumNote`)):o=s(`switchUnsupportedNote`);let u=`${e}-${t}-${IN[t].indexOf(n)}`;return U.createElement(`li`,{key:n},U.createElement(`button`,{type:`button`,className:`witty-editor-switch-format`,"aria-disabled":f||!a||void 0,"aria-current":r||void 0,"aria-describedby":o?u:void 0,onClick:()=>!f&&a&&g(n)},QN(l,n),r&&` (${s(`switchCurrent`)})`),o&&U.createElement(`span`,{id:u,className:`witty-options-muted`},` `,o))};return U.createElement(uP,{id:e,label:s(`switchTitle`),className:`witty-editor-switch`,onClose:o},U.createElement(`h2`,null,s(`switchTitle`)),U.createElement(`p`,{className:`witty-options-muted`},s(`switchIntro`)),a.map(t=>U.createElement(`section`,{key:t,"aria-labelledby":h?`${e}-${t}`:void 0},h&&U.createElement(`h3`,{id:`${e}-${t}`},s(t===`de`?`switchGerman`:`switchFrench`)),U.createElement(`ul`,{className:`witty-editor-switch-formats`},IN[t].map(e=>_(t,e))))),U.createElement(`p`,{className:`witty-editor-switch-result`},u))},pP=`https://www.witty.works/en/help/how-do-i-use-the-witty-editor`,mP=`https://www.witty.works/`,hP=e=>{let t=(0,U.useRef)(0),n=(0,U.useCallback)(n=>{let r=()=>{t.current+=1,n()};return e.on(`transaction`,r),()=>{e.off(`transaction`,r)}},[e]);return(0,U.useSyncExternalStore)(n,()=>t.current)},gP=e=>{let{t}=Ay(W.editor);switch(e.state){case`checking`:return{text:t(`statusChecking`),announce:``};case`idle`:{let n=e.alerts?t(`statusAlerts`,{count:e.alerts}):t(`statusNoAlerts`),r=e.limitReached?`${n}. ${t(`limitReached`)}`:n;return{text:r,announce:r}}case`unauthorized`:return{text:t(`statusUnauthorized`),announce:t(`statusUnauthorized`)};case`outdated`:return{text:t(`statusOutdated`),announce:t(`statusOutdated`)};case`unsupportedLanguage`:return{text:t(`statusLanguage`),announce:t(`statusLanguage`)};default:return{text:t(`statusFailed`),announce:t(`statusFailed`)}}},_P=()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,vP=({status:e})=>e.state===`checking`?_P()?U.createElement(nP,{"aria-hidden":`true`,style:{opacity:.5}}):U.createElement(lO,null):e.state===`idle`?U.createElement(nP,{"aria-hidden":`true`}):U.createElement(rP,{"aria-hidden":`true`}),yP=({editor:e,store:t,status:n,loadOptions:r,onSwitch:i,switchSupported:a,switchLanguages:o})=>{let{t:s}=Ay(W.editor);hP(e);let{status:c,notice:l}=(0,U.useSyncExternalStore)(n.subscribe,n.get),u=gP(c),[d,f]=(0,U.useState)(0),[p,m]=(0,U.useState)(!1),[h,g]=(0,U.useState)(null),_=(0,U.useId)(),v=(0,U.useRef)([]),y=(0,U.useId)(),b=()=>e.chain().focus(),x=[{key:`bold`,label:s(`bold`),glyph:`B`,run:()=>b().toggleBold().run(),active:e.isActive(`bold`),enabled:e.can().toggleBold()},{key:`italic`,label:s(`italic`),glyph:`I`,run:()=>b().toggleItalic().run(),active:e.isActive(`italic`),enabled:e.can().toggleItalic()},{key:`underline`,label:s(`underline`),glyph:`U`,run:()=>b().toggleUnderline().run(),active:e.isActive(`underline`),enabled:e.can().toggleUnderline()},{key:`heading`,label:s(`heading`),glyph:`H`,run:()=>b().toggleHeading({level:2}).run(),active:e.isActive(`heading`,{level:2}),enabled:e.can().toggleHeading({level:2})},{key:`bulletList`,label:s(`bulletList`),glyph:`•`,run:()=>b().toggleBulletList().run(),active:e.isActive(`bulletList`),enabled:e.can().toggleBulletList()},{key:`orderedList`,label:s(`orderedList`),glyph:`1.`,run:()=>b().toggleOrderedList().run(),active:e.isActive(`orderedList`),enabled:e.can().toggleOrderedList()},{key:`quote`,label:s(`quote`),glyph:`❝`,run:()=>b().toggleBlockquote().run(),active:e.isActive(`blockquote`),enabled:e.can().toggleBlockquote()},{key:`undo`,label:s(`undo`),glyph:`↶`,run:()=>b().undo().run(),enabled:e.can().undo()},{key:`redo`,label:s(`redo`),glyph:`↷`,run:()=>b().redo().run(),enabled:e.can().redo()}],S=x.length+1,C=e=>{let t=(e+S)%S;f(t),v.current[t]?.focus()},w=e=>{let t={ArrowRight:d+1,ArrowLeft:d-1,Home:0,End:S-1};e.key in t&&(e.preventDefault(),C(t[e.key]))},T=()=>{v.current[S-1]?.focus()},E=()=>{g(null),T()},D=e=>{m(!1),g(e)},O=a(),ee=[{key:`settings`,label:s(`menuSettings`),run:()=>D(`settings`)},{key:`switch`,label:s(`menuSwitchGender`),run:()=>D(`switch`),disabled:!O,note:O?void 0:s(`switchUnsupported`)},{key:`help`,label:s(`menuHelp`),href:pP},{key:`about`,label:s(`menuAbout`),href:mP}];return U.createElement(U.Fragment,null,U.createElement(`div`,{className:`witty-editor-toolbar`,role:`toolbar`,"aria-label":s(`toolbar`),onKeyDown:w},x.map((e,t)=>U.createElement(`button`,{key:e.key,ref:e=>{v.current[t]=e},type:`button`,className:`witty-editor-tool witty-editor-tool--${e.key}`,"aria-label":e.label,title:e.label,"aria-pressed":e.active,"aria-disabled":!e.enabled,tabIndex:t===d?0:-1,onFocus:()=>f(t),onMouseDown:e=>e.preventDefault(),onClick:()=>e.enabled&&e.run()},e.glyph)),U.createElement(`button`,{ref:e=>{v.current[S-1]=e},type:`button`,className:`witty-editor-tool witty-editor-tool--settings is-${c.state}`,"aria-label":s(`menu`),title:`${s(`menu`)} · ${u.text}`,"aria-haspopup":`menu`,"aria-expanded":p,"aria-controls":p?_:void 0,tabIndex:d===S-1?0:-1,onFocus:()=>f(S-1),onClick:()=>m(e=>!e),onKeyDown:e=>{e.key===`ArrowDown`&&(e.preventDefault(),e.stopPropagation(),m(!0))}},U.createElement(vP,{status:c})),p&&U.createElement(iP,{id:_,label:s(`menu`),items:ee,anchor:()=>v.current[S-1],onClose:e=>{m(!1),e&&T()}})),U.createElement(`span`,{className:`witty-editor-sr-only`,role:`status`,"aria-live":`polite`},l??u.announce),h===`settings`&&U.createElement(dP,{id:y,store:t,loadOptions:r,onClose:E}),h===`switch`&&U.createElement(fP,{id:y,store:t,loadOptions:r,onSwitch:i,supported:a,languages:o(),onClose:E}))},bP=(e,t)=>{let n=(0,qx.createRoot)(e);return n.render(U.createElement(yP,t)),{destroy:()=>n.unmount()}},xP=`
153
153
  .witty-editor-toolbar {
154
154
  display: flex;
155
155
  flex-wrap: wrap;
@@ -245,5 +245,5 @@ Error generating stack: `+e.message+`
245
245
  font-size: 1.25rem;
246
246
  cursor: pointer;
247
247
  }
248
- `,dP=(e,t)=>{let n=(0,nS.createRoot)(e);return n.render(W.createElement(lP,t)),{destroy:()=>n.unmount()}},fP=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,`0`)).join(``),pP=e=>{let t=e instanceof Error?e.message:String(e);return e instanceof yb?e.status===401||e.status===403?{state:`unauthorized`}:e.status===400?{state:`outdated`,message:e.detail??t}:e.status===422&&e.types.includes(`value_error.not_supported`)?{state:`unsupportedLanguage`}:{state:`error`,message:t}:{state:`error`,message:t}},mP=`wittyGenderFormatSwitch`,hP=()=>[`.witty-editor .ProseMirror { outline: none; min-height: 8rem; }`,`.witty-editor-limit { margin: 0.25rem 0 0; font-size: 0.875em; color: #595959; }`,`.witty-editor .ProseMirror:focus-visible { outline: 2px solid #55b8e9; outline-offset: 2px; border-radius: 2px; }`,`.witty-editor-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }`,uP,`.witty-alert { border-bottom: 2px solid transparent; cursor: pointer; }`,`.witty-alert--dotted { border-bottom-style: dotted; border-bottom-width: 3px; }`,`.witty-alert--selected { background-color: var(--witty-alert-fill); border-radius: 4px; }`,...Object.entries(iv).map(([e,t])=>`.witty-alert--${e} { border-bottom-color: ${t.hover}; --witty-alert-fill: ${t.highlight}33; }`)].join(`
249
- `),gP=`witty-editor-styles`,_P=()=>{if(document.getElementById(gP))return;let e=document.createElement(`style`);e.id=gP,e.textContent=hP(),document.head.append(e)},vP=e=>nf.create({name:`wittyPopoverTriggers`,addKeyboardShortcuts(){return{"Alt-Shift-w":()=>e()?.openAtSelection()??!1}},addProseMirrorPlugins(){return[new Gn({props:{handleClick:(t,n)=>{let r=Cx(t.state).find(e=>e.from<=n&&n<e.to);return r&&setTimeout(()=>e()?.open(r.id)),!1}}})]}}),yP=0;return e.mount=(e,{endpoint:t=`${location.origin}/`,apiKey:n=``,lang:r=`auto`,config:i,content:a=``,toolbar:o=!0,onSettingsChange:s,label:c=`Text to check`,describedBy:l,maxRequestLength:u,maxTextLength:d,delay:f=500,installationId:p=fP(),llmAlternatives:m=!1,llmTimeoutMs:h=hb,onStatus:g}={})=>{ob(),_P(),e.classList.add(`witty-editor`);let _=n,v=zN({config:i??{},llmAlternatives:m,orthography:!0}),y=()=>fb({apiKey:_}),b=null,x=()=>b??v.get().config,S=null,C=`unknown`,w=new Set,T=xb({endpoint:t,headers:y,lang:r,id:p,config:x}),E=async(e,t)=>{let n=S,r=await T(e,t);return(r.bulk_actions||r.results?.some(e=>e.bulk===`gender_format`))&&(C=`yes`),n?.responses.push({language:r.language,separator:r.gender_separator,bulkActions:r.bulk_actions}),r},D=new Set,O=()=>new Promise((e,t)=>{D.add({armed:!1,resolve:e,reject:t})}),ee=document.createElement(`span`);ee.id=`witty-editor-hint-${yP+=1}`,ee.className=`witty-editor-sr-only`,ee.textContent=ty.t(`shortcutHint`,{ns:eb.editor});let te=()=>({role:`textbox`,"aria-multiline":`true`,"aria-label":c,"aria-describedby":[ee.id,l].filter(Boolean).join(` `),spellcheck:v.get().orthography?`false`:`true`}),ne=document.createElement(`div`),re=document.createElement(`div`),k=document.createElement(`p`);k.className=`witty-editor-limit`,k.hidden=!0,k.textContent=ty.t(`limitReached`,{ns:eb.editor}),e.append(...o?[ne]:[],re,k,ee);let A=RN({status:{state:`idle`,alerts:0,limitReached:!1},notice:null}),ie=new Set,ae={},oe=new yf({element:re,extensions:[J_,Px.configure({check:E,delay:f,maxRequestLength:u,maxTextLength:d,cacheScope:()=>JSON.stringify([x(),r,_]),isIgnored:e=>ie.has(e.data.text),onError:e=>{let t=pP(e);t.state!==`error`&&jx(oe.view),A.set({status:t}),g?.(t),D.forEach(t=>t.reject(e)),D.clear()}}),vP(()=>ae.current)],content:a,editorProps:{attributes:te()},onTransaction:({editor:e,transaction:t})=>{ae.current?.update();let n=t.getMeta(hx);if(n?.type===`start`&&(A.set({status:{state:`checking`}}),D.forEach(e=>{e.armed=!0})),n?.type===`results`&&n.complete!==!1)for(let t of D)t.armed&&(t.resolve(xx(e.state)),D.delete(t));if(t.docChanged&&!t.getMeta(mP)&&A.get().notice&&A.set({notice:null}),t.docChanged||n?.type===`results`||n?.type===`dismiss`){let t={state:`idle`,alerts:Cx(e.state).length,limitReached:xx(e.state)};(n?.type===`dismiss`||n?.type===`results`&&n.complete!==!1||n===void 0&&A.get().status.state!==`checking`)&&(A.set({status:t}),k.hidden=!t.limitReached),g?.(t)}}}),se=new LN(oe.view,{endpoint:t,headers:y,llmAlternatives:()=>v.get().llmAlternatives,llmTimeoutMs:h,ignored:ie,config:()=>v.get().config});ae.current=se;let ce=v.get(),le=v.subscribe(()=>{let e=v.get();(e.config!==ce.config||e.llmAlternatives!==ce.llmAlternatives)&&se.resetRewrites(),e.config!==ce.config&&Ax(oe.view),e.orthography!==ce.orthography&&oe.setOptions({editorProps:{attributes:te()}}),ce=e}),ue=$N({endpoint:t,headers:y}),de=(e,t)=>ty.t(e,{ns:eb.editor,...t}),fe=null,pe=()=>{let e=r.slice(0,2);if(e===`de`||e===`fr`)return[e];let t=Sx(oe.state),n=[`de`,`fr`].filter(e=>t[e]).sort((e,n)=>t[n]-t[e]);return n.length?n:[`de`,`fr`]},me=async e=>{let t=zx(e);if(!t)return{outcome:`unavailable`,target:e,count:0,limitReached:!1};let n=Rx[t],r=v.get().config,i={...r,[n]:e};b=Hx(i,e,t).config;let a={responses:[]};S=a;let o=O();v.set({config:i}),Ax(oe.view);let s;try{s=await o}finally{b=null,S=null}let c=Xx(a,e,oe.state.doc.textContent,Cx(oe.state),{language:t,previous:r[n]}),l;if(c.outcome===`switched`)oe.view.dispatch(Gx(oe.state,c.apply).setMeta(mP,!0)),l={outcome:`switched`,target:e,count:c.apply.length,limitReached:s};else if(c.outcome===`forced`)v.set({config:r}),l={outcome:`forced`,target:e,count:0,limitReached:s,applied:c.applied};else{if(c.outcome===`unsupported`){let e=a.responses.some(({bulkActions:e})=>e);!e&&t===`de`&&(C=`no`);let n=t===`fr`?Lx.fr:[Ix];(e||t===`fr`)&&n.forEach(e=>w.add(e))}l={outcome:c.outcome,target:e,count:0,limitReached:s}}Ax(oe.view);let u=await ue().catch(()=>null);return A.set({notice:iP(de,l,u)}),g?.({state:`idle`,alerts:Cx(oe.state).length,limitReached:xx(oe.state),genderFormatSwitch:l}),l},he=e=>(fe=(fe??Promise.resolve()).catch(()=>void 0).then(()=>me(e)),fe),ge=o?dP(ne,{editor:oe,store:{...v,set:e=>{v.set(e),s?.(v.get())}},status:A,loadOptions:ue,onSwitch:async e=>{let t=await he(e);return s?.(v.get()),t},switchSupported:e=>C!==`no`&&!(e&&w.has(e)),switchLanguages:pe}):void 0;return{editor:oe,setApiKey(e){_=e,se.resetRewrites(),Ax(oe.view)},setConfig(e){v.set({config:e})},getText:()=>oe.getText(),switchGenderFormat:he,getSettings:()=>{let e=v.get();return{...e,config:structuredClone(e.config)}},destroy:()=>{le(),ge?.destroy(),se.destroy(),oe.destroy(),ne.remove(),re.remove(),ee.remove(),k.remove()}}},e})({});
248
+ `,SP=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,`0`)).join(``),CP=e=>{let t=e instanceof Error?e.message:String(e);return e instanceof wb?e.status===401||e.status===403?{state:`unauthorized`}:e.status===400?{state:`outdated`,message:e.detail??t}:e.status===422&&e.types.includes(`value_error.not_supported`)?{state:`unsupportedLanguage`}:{state:`error`,message:t}:{state:`error`,message:t}},wP=()=>[`.witty-editor .ProseMirror { outline: none; min-height: 8rem; }`,`.witty-editor-limit { margin: 0.25rem 0 0; font-size: 0.875em; color: #595959; }`,`.witty-editor .ProseMirror:focus-visible { outline: 2px solid #55b8e9; outline-offset: 2px; border-radius: 2px; }`,`.witty-editor-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }`,xP,`.witty-alert { border-bottom: 2px solid transparent; cursor: pointer; }`,`.witty-alert--dotted { border-bottom-style: dotted; border-bottom-width: 3px; }`,`.witty-alert--selected { background-color: var(--witty-alert-fill); border-radius: 4px; }`,...Object.entries(av).map(([e,t])=>`.witty-alert--${e} { border-bottom-color: ${t.hover}; --witty-alert-fill: ${t.highlight}33; }`)].join(`
249
+ `),TP=`witty-editor-styles`,EP=()=>{if(document.getElementById(TP))return;let e=document.createElement(`style`);e.id=TP,e.textContent=wP(),document.head.append(e)},DP=e=>rf.create({name:`wittyPopoverTriggers`,addKeyboardShortcuts(){return{"Alt-Shift-w":()=>e()?.openAtSelection()??!1}},addProseMirrorPlugins(){return[new Gn({props:{handleClick:(t,n)=>{let r=Ox(t.state).find(e=>e.from<=n&&n<e.to);return r&&setTimeout(()=>e()?.open(r.id)),!1}}})]}}),OP=0;return e.mount=(e,{endpoint:t,apiKey:n=``,lang:r=`auto`,config:i,content:a=``,toolbar:o=!0,onSettingsChange:s,label:c=`Text to check`,describedBy:l,maxRequestLength:u,maxTextLength:d,delay:f=500,installationId:p=SP(),llmAlternatives:m=!1,llmTimeoutMs:h=_b,onStatus:g}={})=>{let _=Sb(t,location.href);ob(),EP(),e.classList.add(`witty-editor`);let v=n,y=AN({config:i??{},llmAlternatives:m,orthography:!0}),b=()=>mb({apiKey:v}),x={},S=()=>x.current?.requestConfig()??y.get().config,C=!1,w=Vx(),T=Eb({endpoint:_,headers:b,lang:r,id:p,config:S}),E=async(e,t)=>{let n=x.current?.request(),r=await T(e,t);return n?.(r),r},D=document.createElement(`span`);D.id=`witty-editor-hint-${OP+=1}`,D.className=`witty-editor-sr-only`,D.textContent=ny.t(`shortcutHint`,{ns:W.editor});let O=()=>({role:`textbox`,"aria-multiline":`true`,"aria-label":c,"aria-describedby":[D.id,l].filter(Boolean).join(` `),spellcheck:y.get().orthography?`false`:`true`}),ee=document.createElement(`div`),te=document.createElement(`div`),ne=document.createElement(`p`);ne.className=`witty-editor-limit`,ne.hidden=!0,ne.textContent=ny.t(`limitReached`,{ns:W.editor}),e.append(...o?[ee]:[],te,ne,D);let re=kN({status:{state:`idle`,alerts:0,limitReached:!1},notice:null}),k=new Set,A={},ie=new bf({element:te,extensions:[Y_,zx.configure({check:E,delay:f,maxRequestLength:u,maxTextLength:d,cacheScope:()=>JSON.stringify([S(),r,v]),isIgnored:e=>k.has(e.data.text),onError:e=>{let t=CP(e);t.state!==`error`&&Ix(ie.view),re.set({status:t}),g?.(t),w.failed(e)}}),DP(()=>A.current)],content:a,editorProps:{attributes:O()},onTransaction:({editor:e,transaction:t})=>{A.current?.update();let n=t.getMeta(bx);if(n?.type===`start`&&(re.set({status:{state:`checking`}}),w.started()),n?.type===`results`&&n.complete!==!1&&w.completed(Ex(e.state)),t.docChanged&&!t.getMeta(`wittyGenderFormatSwitch`)&&re.get().notice&&re.set({notice:null}),t.docChanged||n?.type===`results`||n?.type===`dismiss`){let t={state:`idle`,alerts:Ox(e.state).length,limitReached:Ex(e.state)};(n?.type===`dismiss`||n?.type===`results`&&n.complete!==!1||n===void 0&&re.get().status.state!==`checking`)&&(re.set({status:t}),ne.hidden=!t.limitReached),g?.(t)}}}),ae=new ON(ie.view,{endpoint:_,headers:b,llmAlternatives:()=>y.get().llmAlternatives,llmTimeoutMs:h,ignored:k,config:()=>y.get().config});A.current=ae;let oe=y.get(),se=y.subscribe(()=>{let e=y.get();(e.config!==oe.config||e.llmAlternatives!==oe.llmAlternatives)&&ae.resetRewrites(),e.config!==oe.config&&Fx(ie.view),e.orthography!==oe.orthography&&ie.setOptions({editorProps:{attributes:O()}}),oe=e}),ce=ZN({endpoint:_,headers:b}),le=tP({editor:ie,settings:y,status:re,waiters:w,loadOptions:ce,t:(e,t)=>ny.t(e,{ns:W.editor,...t}),lang:r,onStatus:g,destroyed:()=>C});x.current=le;let{switchGenderFormat:ue}=le,de=e=>{y.set(e),s?.(y.get())},fe=o?bP(ee,{editor:ie,store:{...y,set:de},status:re,loadOptions:ce,onSwitch:async e=>{let t=await ue(e);return s?.(y.get()),t},switchSupported:le.supported,switchLanguages:le.languages}):void 0;return{editor:ie,setApiKey(e){v=e,ae.resetRewrites(),Fx(ie.view)},setConfig(e){JSON.stringify(e)!==JSON.stringify(y.get().config)&&y.set({config:structuredClone(e)})},updateSettings(e){for(let t of[`llmAlternatives`,`orthography`])if(e[t]!==void 0&&typeof e[t]!=`boolean`)throw TypeError(`updateSettings: ${t} must be a boolean`);if(e.config!==void 0&&(typeof e.config!=`object`||e.config===null||Array.isArray(e.config)))throw TypeError(`updateSettings: config must be an object`);let t=y.get(),n={};e.llmAlternatives!==void 0&&e.llmAlternatives!==t.llmAlternatives&&(n.llmAlternatives=e.llmAlternatives),e.orthography!==void 0&&e.orthography!==t.orthography&&(n.orthography=e.orthography),e.config!==void 0&&JSON.stringify(e.config)!==JSON.stringify(t.config)&&(n.config=structuredClone(e.config)),Object.keys(n).length&&de(n)},getText:()=>ie.getText(),switchGenderFormat:ue,getSettings:()=>{let e=y.get();return{...e,config:structuredClone(e.config)}},destroy:()=>{C=!0,w.destroy(),se(),fe?.destroy(),ae.destroy(),ie.destroy(),ee.remove(),te.remove(),D.remove(),ne.remove()}}},e})({});