react-rich-textarea-chips 1.0.0
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.
- package/README.md +91 -0
- package/dist/index.cjs +54 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +16456 -0
- package/dist/style.css +3 -0
- package/package.json +58 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react"),l=s(c,1);c=s(c);let u=require("react/jsx-runtime"),d=require("react-dom");d=s(d,1);var f=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),p=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),m=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),h=e=>{let t=m(e);return t.charAt(0).toUpperCase()+t.slice(1)},g={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},_=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},v=(0,l.createContext)({}),y=()=>(0,l.useContext)(v),b=(0,l.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:p=!1,color:m=`currentColor`,className:h=``}=y()??{},v=r??p?Number(n??d)*24/Number(t??u):n??d;return(0,l.createElement)(`svg`,{ref:c,...g,width:t??u??g.width,height:t??u??g.height,stroke:e??m,strokeWidth:v,className:f(`lucide`,h,i),...!a&&!_(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,l.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),x=(e,t)=>{let n=(0,l.forwardRef)(({className:n,...r},i)=>(0,l.createElement)(b,{ref:i,iconNode:t,className:f(`lucide-${p(h(e))}`,`lucide-${e}`,n),...r}));return n.displayName=h(e),n},S=x(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),C=x(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),w=x(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),T=x(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),ee=x(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),te=x(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),ne=x(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),re=x(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),E=x(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),D=(0,l.createContext)(null);function ie(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function O(){let e=(0,l.useContext)(D);return e??function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}function k(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ae(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var A=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,oe=A&&`documentMode`in document?document.documentMode:null,se=A&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ce=A&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),le=!(!A||!(`InputEvent`in window)||oe)&&`getTargetRanges`in new window.InputEvent(`input`),ue=A&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,de=A&&/Android/.test(navigator.userAgent),fe=A&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!de,pe=A&&/^(?=.*Chrome).*/i.test(navigator.userAgent),me=A&&de&&pe,he=A&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&se&&!pe,ge=0,_e=1,ve=2,ye=1,be=2,xe=3,Se=4,Ce=5,we=6,Te=fe||ue||he?`\xA0`:``,Ee=`
|
|
2
|
+
|
|
3
|
+
`,De=ce?`\xA0`:Te,Oe={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},ke={directionless:1,unmergeable:2},Ae={center:2,end:6,justify:4,left:1,right:3,start:5},je={[be]:`center`,[we]:`end`,[Se]:`justify`,[ye]:`left`,[xe]:`right`,[Ce]:`start`},Me={normal:0,segmented:2,token:1},Ne={[ge]:`normal`,[ve]:`segmented`,[_e]:`token`},Pe=`$config`;function Fe(){return Es()._blockCursorElement}var Ie=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&k(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&k(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&k(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=Le(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=Le(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function Le(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var Re=class e extends Ie{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t!==null&&t===Fe()?t:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{let t=e===`decorator`&&(he||ue||fe);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n=e.nodeName===`IMG`?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName===`IMG`))return;this.removeManagedLineBreak()}let n=this.element,r=this.before,i=document.createElement(`br`);if(n.insertBefore(i,r),e){let e=document.createElement(`img`);e.setAttribute(`data-lexical-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=Fe(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=ze(t,n);i.push(r);let a=ze(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function ze(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&k(225),n.reverse()}var Be;try{Be=`0.45.0+prod.esm`}catch{}var Ve=Be??`0.45.0+source`,He=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},Ue=null;function We(e,t=1e3){return e instanceof Ge?e.clone():e.size<t?new Map(e):new Ge().init(new Map(e),void 0,e.size)}var Ge=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===Ue?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===Ue?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==Ue&&n!==void 0||(this._size++,n===Ue&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,Ue),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(t)for(let n of t){let t=n[0],r=e?e.get(t):void 0;r!==Ue&&(r!==void 0&&(n[1]=r),yield n)}if(e)for(let n of e)n[1]===Ue||t&&t.has(n[0])||(yield n)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}};function Ke(e,t,n,r,i,a){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&(R(o)&&Ke(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}var qe=!1,Je=0;function Ye(e){Je=e.timeStamp}function Xe(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&ko(e,n)!==void 0}function Ze(e,t,n){let r=_s(cs(n)),i=null,a=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,a=r.focusOffset);let o=e.nodeValue;o!==null&&Ho(t,o,i,a,!1)}function Qe(e,t,n){if(F(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return _o(t)&&n.isAttached()}function $e(e,t,n,r){for(let i=e;i&&!zs(i);i=ns(i)){let e=ko(i,t);if(e!==void 0){let t=Do(e,n);if(t)return z(t)||!U(i)?void 0:[i,t]}else if(i===r)return[r,Po(n)]}}function et(e,t,n){qe=!0;let r=performance.now()-Je>100;try{Pa(e,()=>{let i=I()||function(e){return e.getEditorState().read(()=>{let e=I();return e===null?null:e.clone()})}(e),a=new Map,o=e.getRootElement(),s=e._editorState,c=e._blockCursorElement,l=!1,u=``;for(let n=0;n<t.length;n++){let d=t[n],f=d.type,p=d.target,m=$e(p,e,s,o);if(!m)continue;let[h,g]=m;if(f===`characterData`)r&&P(g)&&_o(p)&&Qe(i,p,g)&&Ze(p,g,e);else if(f===`childList`){l=!0;let t=d.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=Oo(r),a=r.parentNode;if(a!=null&&r!==c&&i===null&&!Xe(r,a,e)&&!zs(r)){if(ce){let e=(U(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}a.removeChild(r)}}let n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(Xe(r,p,e)||c===r)&&(p.appendChild(r),t++)}r!==t&&a.set(h,g)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){let n=d[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||Xe(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(l&&Fo(i),ce&&es(e)&&i.insertRawText(u))})}finally{qe=!1}}function tt(e){let t=e._observer;t!==null&&et(e,t.takeRecords(),t)}function nt(e){(function(e){Je===0&&cs(e).addEventListener(`textInput`,Ye,!0)})(e),e._observer=new MutationObserver((t,n)=>{et(e,t,n)})}var rt=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||ut).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function it(e,t){return new rt(e,t)}function at(e){let t=new Map,n=new Set;for(let r=typeof e==`function`?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){let{ownNodeConfig:e}=Vs(r);if(e&&e.stateConfigs)for(let r of e.stateConfigs){let e;`stateConfig`in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}var ot=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return lt(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=lt(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function st(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new ot(t,ct(t));return t.__state=n,n}function ct(e){return e.__state?e.__state.sharedNodeState:ao(Es(),e.getType()).sharedNodeState}function lt(e){if(e)for(let t in e)return e}function ut(e){return e}function dt(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function ft(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function pt(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function mt(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&dt(n,e,t)||t&&dt(n,t,e)||e&&ft(n,e,t)||t&&ft(n,t,e))}(c,l))}function ht(e,t){let n=e.mergeWithSibling(t),r=L()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function gt(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&P(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(mt(t,r)){r=ht(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&P(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(mt(r,n)){r=ht(r,n);break}break}n.remove()}}else r.remove()}function _t(e){return vt(e.anchor),vt(e.focus),e}function vt(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),P(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!R(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var yt=Symbol.for(`@lexical/CachedTextSize`);function bt(e,t){return Ft.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=Pt.get(r);if(i===void 0&&k(345,r),R(i)){let a=It.get(r);if(a!==void 0&&R(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=Lt.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&k(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else{let e=i[yt];e===void 0&&k(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:j})}function xt(e){R(e)||e[yt]===void 0&&(e[yt]=P(e)?e.__text.length:e.getTextContentSize())}var St=4,Ct,j,wt,M=``,Tt=null,Et=null,Dt=null;function Ot(){return{firstTextKey:Dt,format:Tt,style:Et}}function kt(e){e.firstTextKey!==null&&(Tt=e.format,Et=e.style,Dt=e.firstTextKey)}function At(e){if(Dt!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&k(348),t===null)return;let n=It.get(t);P(n)&&(Tt=n.getFormat(),Et=n.getStyle(),Dt=t)}var jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt=!1,Ht=!1;function Ut(e,t){let n=Pt.get(e),r=It.has(e);if(t!==null){let n=sn(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(j._keyToDOMMap.delete(e),R(n)){let e=Ws(n,Pt);Wt(e,0,e.length-1,null)}n!==void 0&&Zo(zt,wt,jt,n,`destroyed`)}}function Wt(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&Ut(t,r)}}function Gt(e,t){e.setProperty(`text-align`,t)}var Kt=`40px`;function qt(e,t){let n=Ct.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${Kt}))`)}function Jt(e,t){let n=e.style;t===0?Gt(n,``):t===1?Gt(n,`left`):t===2?Gt(n,`center`):t===3?Gt(n,`right`):t===4?Gt(n,`justify`):t===5?Gt(n,`start`):t===6&&Gt(n,`end`)}function Yt(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(za(e))return null;let n=e.getParentOrThrow();return us(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function Xt(e,t){let n=It.get(e);if(n===void 0&&k(60),t!==null){let r=Pt.get(e);if(r!==void 0&&r.__parent!==n.__parent){let n=Lt.get(e);if(n!==void 0)return t.insertChild(n),tn(e,t.element)}}let r=Bt.$createDOM(n,j);if(function(e,t,n){let r=n._keyToDOMMap;(function(e,t,n){let r=`__lexicalKey_${t._key}`;e[r]=n})(t,n,e),r.set(e,t)}(e,r,j),P(n)?r.setAttribute(`data-lexical-text`,`true`):z(n)&&r.setAttribute(`data-lexical-decorator`,`true`),R(n)){let e=n.__indent,t=n.__size;if(Yt(r,n),e!==0&&qt(r,e),t===0)r.__lexicalTextContent=``,r.__lexicalFirstTextKey=null;else{let e=t-1;Zt(Ws(n,It),n,0,e,Os(n,r,j))}let i=n.__format;i!==0&&Jt(r,i),n.isInline()||Qt(null,n,r)}else{let t=n.getTextContent();if(z(n)){let t=n.decorate(j,Ct);t!==null&&nn(e,t),r.contentEditable=`false`}M+=t}return t!==null&&t.insertChild(r),Bt.$decorateDOM(n,null,r,j),xt(n),Zo(zt,wt,jt,n,`created`),r}function Zt(e,t,n,r,i){let a=M,o=Ot();M=``,Tt=null,Et=null,Dt=null;let s=n;for(;s<=r;++s){let t=Ot();Xt(e[s],i);let n=It.get(e[s]);n!==null&&P(n)?Tt===null&&(Tt=n.getFormat(),Et=n.getStyle(),Dt=n.__key):R(n)&&s<r&&!n.isInline()&&(M+=Ee),kt(t)}let c=j._keyToDOMMap.get(t.__key);c===void 0&&k(349,t.__key),c.__lexicalTextContent=M,c.__lexicalFirstTextKey=Dt,M=a+M,kt(o)}function Qt(e,t,n){let r=Os(t,n,j),i=r.element.__lexicalLastChildKind??null,a=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return si(e)?`line-break`:z(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,It);i!==a&&r.setManagedLineBreak(a)}function $t(e,t,n){var r;Tt=null,Et=null,Dt=null,function(e,t,n){let r=M,i=e.__size,a=t.__size;M=``;let o=n.element,s=j._keyToDOMMap.get(t.__key);s===void 0&&k(351,t.__key);let c=a-i;if(!Vt&&Math.abs(c)<=1&&i>=St&&e.__first===t.__first&&(c!==0||!j._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=Rt.get(e.__key);if(!Vt&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=It.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=bt(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=It.get(n);if(e===void 0)break;let t=Ot();tn(n,o),P(e)&&Tt===null&&(Tt=e.getFormat(),Et=e.getStyle(),Dt=e.__key),kt(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=It.get(n);if(e===void 0)break;let t;if(R(e)){let r=j._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&k(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&R(e)&&!e.isInline()&&(d+=Ee),n=e.__next,c++}let f=i.slice(0,i.length-e)+d;s.__lexicalTextContent=f,M=r+f,en(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=Pt.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=It.get(a),d=Pt.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=It.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=Pt.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=bt(l,c);for(let e of _){let t=Ot();if(e.kind===`reconcile`)tn(e.key,n.element);else if(e.kind===`destroy`)Ut(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=j._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}Xt(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=It.get(e.key);t&&P(t)&&Tt===null&&(Tt=t.getFormat(),Et=t.getStyle(),Dt=t.__key)}kt(t)}let x=``;for(let e=0;e<o;e++){let t=It.get(f[e]);if(t===void 0)return!1;let n;if(R(t)){let r=j._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&k(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&R(t)&&!t.isInline()&&(x+=Ee)}return r.__lexicalTextContent=i.slice(0,i.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&k(353),M=r+e,en(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=It.get(t);if(e===void 0)break;let r=Vt||Nt.has(t)||Mt.has(t),i=Ot();if(r)tn(t,o);else{let n,r;if(R(e)){r=Lt.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&k(354,e.getType()),n=i}else n=e.getTextContent();M+=n,r!==void 0&&At(r)}P(e)?Tt===null&&(Tt=e.getFormat(),Et=e.getStyle(),Dt=e.__key):R(e)&&n<a-1&&!e.isInline()&&(M+=Ee),kt(i),t=e.__next,n++}s.__lexicalTextContent=M,s.__lexicalFirstTextKey=Dt,M=r+M;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)tn(r,o);else{let e=sn(r),t=Xt(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}Ut(r,null)}let a=It.get(i);P(a)&&Tt===null&&(Tt=a.getFormat(),Et=a.getStyle(),Dt=a.__key)}else{let r=Ws(e,Pt),s=Ws(t,It);if(r.length!==i&&k(227),s.length!==a&&k(228),i===0)a!==0&&Zt(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&n.element.__lexicalLineBreak==null;Wt(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else (function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=Ot();if(e===r)u=rn(tn(r,a.element)),d++,f++;else{if(l===void 0&&(l=an(n,f)),c===void 0)c=an(t,d);else if(!c.has(e)){d++,kt(i);continue}if(!l.has(e)){u=rn(sn(e)),Ut(e,a.element),d++,c.delete(e),kt(i);continue}if(c.has(r)){let e=ts(j,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=rn(tn(r,a.element)),d++,f++}else Xt(r,a.withBefore(u??a.before)),f++}let o=It.get(r);o!==null&&P(o)?Tt===null&&(Tt=o.getFormat(),Et=o.getStyle(),Dt=o.__key):R(o)&&f<=s&&!o.isInline()&&(M+=Ee),kt(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:j.getElementByKey(t);Zt(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&Wt(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=M,s.__lexicalFirstTextKey=Dt,M=r+M}(e,t,Os(t,n,j)),us(t)||(r=t,Tt==null||Tt===r.__textFormat||Ht||r.setTextFormat(Tt),function(e){Et==null||Et===e.__textStyle||Ht||e.setTextStyle(Et)}(t))}function en(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=It.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=It.get(r);if(P(e))return Tt=e.getFormat(),void(Et=e.getStyle())}}t.__lexicalFirstTextKey=Dt}function tn(e,t){let n=Pt.get(e),r=It.get(e);n!==void 0&&r!==void 0||k(61);let i=Vt||Nt.has(e)||Mt.has(e),a=ts(j,e);if(n===r&&!i){let e;if(R(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&k(355,n.getType()),e=t,At(a)}else e=n.getTextContent();return M+=e,a}if(n!==r&&i&&Zo(zt,wt,jt,r,`updated`),Bt.$updateDOM(r,n,a,j)){let n=Xt(e,null);return t===null&&k(62),t.replaceChild(n,a),Ut(e,null),n}if(R(n)){R(r)||k(334,e);let t=r.__indent;(Vt||t!==n.__indent)&&qt(a,t);let o=r.__format;if((Vt||o!==n.__format)&&Jt(a,o),i)$t(n,r,a),za(r)||r.isInline()||Qt(0,r,a);else{let e=a.__lexicalTextContent;typeof e!=`string`&&k(356,n.getType()),M+=e,At(a)}if((Vt||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(Yt(a,r),za(r)&&!Vt))for(let e of r.getChildren())R(e)&&Yt(ts(j,e.getKey()),e)}else{let t=r.getTextContent();if(z(r)){let t=r.decorate(j,Ct);t!==null&&nn(e,t)}M+=t}if(!Ht&&za(r)){let e=r.getLatest();if(e.__cachedText!==M){let t=e.getWritable();t.__cachedText=M,r=t}}return Bt.$decorateDOM(r,n,a,j),xt(r),a}function nn(e,t){let n=j._pendingDecorators,r=j._decorators;if(n===null){if(r[e]===t)return;n=jo(j)}n[e]=t}function rn(e){let t=e.nextSibling;return t!==null&&t===j._blockCursorElement&&(t=t.nextSibling),t}function an(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function on(e,t,n,r,i,a){M=``,Tt=null,Et=null,Dt=null,Vt=r===2,j=n,Ct=n._config,Bt=n._config.dom||Za,wt=n._nodes,jt=j._listeners.mutation,Mt=i,Nt=a,Pt=e._nodeMap,Ft=e,It=t._nodeMap,Ht=t._readOnly,Lt=We(n._keyToDOMMap),Rt=function(){let e=new Map,t=t=>{for(let n of t){let t=It.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(Mt.keys()),t(Nt),e}();let o=new Map;return zt=o,tn(`root`,null),j=void 0,wt=void 0,Mt=void 0,Nt=void 0,Pt=void 0,Ft=void 0,It=void 0,Ct=void 0,Lt=void 0,Rt=void 0,zt=void 0,Bt=Za,o}function sn(e){let t=Lt.get(e);return t===void 0&&k(75,e),t}function N(e){return{type:e}}var cn=N(`SELECTION_CHANGE_COMMAND`),ln=N(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),un=N(`CLICK_COMMAND`),dn=N(`BEFORE_INPUT_COMMAND`),fn=N(`INPUT_COMMAND`),pn=N(`COMPOSITION_START_COMMAND`),mn=N(`COMPOSITION_END_COMMAND`),hn=N(`DELETE_CHARACTER_COMMAND`),gn=N(`INSERT_LINE_BREAK_COMMAND`),_n=N(`INSERT_PARAGRAPH_COMMAND`),vn=N(`CONTROLLED_TEXT_INSERTION_COMMAND`),yn=N(`PASTE_COMMAND`),bn=N(`REMOVE_TEXT_COMMAND`),xn=N(`DELETE_WORD_COMMAND`),Sn=N(`DELETE_LINE_COMMAND`),Cn=N(`FORMAT_TEXT_COMMAND`),wn=N(`UNDO_COMMAND`),Tn=N(`REDO_COMMAND`),En=N(`KEYDOWN_COMMAND`),Dn=N(`KEY_ARROW_RIGHT_COMMAND`),On=N(`MOVE_TO_END`),kn=N(`KEY_ARROW_LEFT_COMMAND`),An=N(`MOVE_TO_START`),jn=N(`KEY_ARROW_UP_COMMAND`),Mn=N(`KEY_ARROW_DOWN_COMMAND`),Nn=N(`KEY_ENTER_COMMAND`),Pn=N(`KEY_SPACE_COMMAND`),Fn=N(`KEY_BACKSPACE_COMMAND`),In=N(`KEY_ESCAPE_COMMAND`),Ln=N(`KEY_DELETE_COMMAND`),Rn=N(`KEY_TAB_COMMAND`),zn=N(`INSERT_TAB_COMMAND`),Bn=N(`INDENT_CONTENT_COMMAND`),Vn=N(`OUTDENT_CONTENT_COMMAND`),Hn=N(`DROP_COMMAND`),Un=N(`FORMAT_ELEMENT_COMMAND`),Wn=N(`DRAGSTART_COMMAND`),Gn=N(`DRAGOVER_COMMAND`),Kn=N(`DRAGEND_COMMAND`),qn=N(`COPY_COMMAND`),Jn=N(`CUT_COMMAND`),Yn=N(`SELECT_ALL_COMMAND`),Xn=N(`CLEAR_EDITOR_COMMAND`),Zn=N(`CLEAR_HISTORY_COMMAND`),Qn=N(`CAN_REDO_COMMAND`),$n=N(`CAN_UNDO_COMMAND`),er=N(`FOCUS_COMMAND`),tr=N(`BLUR_COMMAND`),nr=N(`KEY_MODIFIER_COMMAND`),rr=Object.freeze({}),ir=[[`keydown`,function(e,t){ar=e.timeStamp,or=e.key,e.key!==`Backspace`&&Or(),!t.isComposing()&&H(t,En,e)}],[`pointerdown`,function(e,t){let n=e.target,r=e.pointerType;ys(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&Pa(t,()=>{co(n)||(mr=!0)})}],[`compositionstart`,function(e,t){H(t,pn,e)}],[`compositionend`,function(e,t){ce?gr=!0:ue||!fe&&!he?H(t,mn,e):(_r=!0,vr=e.data)}],[`input`,function(e,t){e.stopPropagation(),Or(),Pa(t,()=>{t.dispatchCommand(fn,e)},{event:e}),cr=null}],[`click`,function(e,t){Pa(t,()=>{let n=I(),r=_s(cs(t)),i=Xi();if(r){if(F(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!za(t)&&No().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=r.anchorNode;(U(n)||_o(n))&&Fo(Yi(i,r,t,e))}}H(t,un,e)})}],[`cut`,rr],[`copy`,rr],[`dragstart`,rr],[`dragover`,rr],[`dragend`,rr],[`paste`,rr],[`focus`,rr],[`blur`,rr],[`drop`,rr]];le&&ir.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||ce&&es(t)||n!==`insertCompositionText`&&H(t,dn,e)}(e,t)]);var ar=0,or=null,sr=0,cr=null,lr=!1,ur=null,dr=new WeakMap,fr=new WeakMap,pr=!1,mr=!1,hr=!1,gr=!1,_r=!1,vr=``,yr=null,br=[0,``,0,`root`,0];function xr(e,t,n,r,i){let a=e.anchor,o=e.focus,s=a.getNode(),c=L(),l=_s(cs(c)),u=l===null?null:l.anchorNode,d=a.key,f=c.getElementByKey(d),p=n.length;return d!==o.key||!P(s)||(!i&&(!le||sr<r+50)||s.isDirty()&&p<2||Lo(n))&&a.offset!==o.offset&&!s.isComposing()||go(s)||s.isDirty()&&p>1||(i||!le)&&f!==null&&!s.isComposing()&&u!==As(s,f,c)||l!==null&&t!==null&&(!t.collapsed||t.startContainer!==l.anchorNode||t.startOffset!==l.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=ho(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(P(t)||R(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,s)}function Sr(e,t){return _o(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function Cr(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=e;pr&&(pr=!1,Sr(r,i)&&Sr(a,o)&&!yr)||Pa(t,()=>{if(!n)return void Fo(null);if(!uo(t,r,a))return;let s=I();if(yr&&F(s)&&s.isCollapsed()){let e=s.anchor,t=yr.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(s=yr.clone(),Fo(s))}if(yr=null,F(s)){let n=s.anchor,r=n.getNode();if(s.isCollapsed()){e.type===`Range`&&e.anchorNode===e.focusNode&&(s.dirty=!0);let i=cs(t).event,a=i?i.timeStamp:performance.now(),[o,c,l,u,d]=br,f=No(),p=!1===t.isComposing()&&f.getTextContent()===``;if(a<d+200&&n.offset===l&&n.key===u)wr(s,o,c);else if(n.type===`text`)P(r)||k(141),Tr(s,r);else if(n.type===`element`&&!p){R(r)||k(259);let e=n.getNode();e.isEmpty()?function(e,t){wr(e,t.getTextFormat(),t.getTextStyle())}(s,e):wr(s,s.format,``)}}else{let e=n.key,t=s.focus.key,r=s.getNodes(),a=r.length,c=s.isBackward(),l=c?o:i,u=c?i:o,d=c?t:e,f=c?e:t,p=2047,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(P(t)&&n!==0&&!(e===0&&t.__key===d&&l===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}s.format=m?p:0}}H(t,cn,void 0)})}function wr(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function Tr(e,t){wr(e,t.getFormat(),t.getStyle())}function Er(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function Dr(e){if(e==null||e.length<=1||or==null)return;let t=or.length===1?or:or===`Enter`?`
|
|
4
|
+
`:or===`Tab`?` `:null;if(!t)return;let n=I();if(!F(n)||!n.isCollapsed())return;let r=n.anchor.getNode();if(!P(r))return;let{offset:i}=n.anchor;if(r.getTextContentSize()===i){let e=r.getNextSibling();if(t===`
|
|
5
|
+
`){if(si(e))e.selectEnd();else if(!e){let e=Us(r,Gi),t=e&&e.getNextSibling();R(t)&&t.selectStart()}}else t===` `?Oi(e)&&e.selectEnd():P(e)&&e.getTextContent()[0]===t&&e.select(1,1)}else r.getTextContent()[i]===t&&r.select(i+1,i+1)}function Or(){lr=!1,ur!==null&&(clearTimeout(ur),ur=null)}function kr(){Or(),lr=!0,ur=setTimeout(Or,0)}function Ar(e){let t=e.inputType,n=Er(e),r=L(),i=I();if(t===`insertText`&&e.data&&lr){if(Or(),e.preventDefault(),F(i)&&!i.isCollapsed()){let e=i.isBackward()?i.anchor:i.focus;i.anchor.set(e.key,e.offset,e.type),i.focus.set(e.key,e.offset,e.type)}return!0}if(t===`deleteContentBackward`){if(i===null){let e=Xi();if(!F(e))return!0;Fo(e.clone())}if(F(i)){let t=i.anchor.key===i.focus.key;if(a=e.timeStamp,or===`MediaLast`&&a<ar+30&&r.isComposing()&&t){if(To(null),ar=0,setTimeout(()=>{Pa(r,()=>{To(null)})},30),F(i)){let e=i.anchor.getNode();e.markDirty(),P(e)||k(142),Tr(i,e)}}else{if(To(null),ue&&n!==null&&!n.collapsed&&(i.applyDOMRange(n),!i.isCollapsed()))return e.preventDefault(),i.removeText(),!0;e.preventDefault();let a=i.anchor.getNode(),o=a.getTextContent(),s=a.canInsertTextAfter(),c=i.anchor.offset===0&&i.focus.offset===o.length,l=me&&t&&!c&&s;if(l&&i.isCollapsed()&&(l=!z($o(i.anchor,!0))),!l){H(r,hn,!0);let e=I();me&&F(e)&&e.isCollapsed()&&(yr=e,setTimeout(()=>yr=null))}}return!0}}var a;if(!F(i))return!0;let o=e.data;cr!==null&&Vo(!1,r,cr),i.dirty&&cr===null||!i.isCollapsed()||za(i.anchor.getNode())||n===null||i.applyDOMRange(n),cr=null;let s=i.anchor,c=i.focus,l=s.getNode(),u=c.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`
|
|
6
|
+
`)e.preventDefault(),H(r,gn,!1);else if(o===Ee)e.preventDefault(),H(r,_n,void 0);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),i.insertRawText(t)}else o!=null&&xr(i,n,o,e.timeStamp,!0)?(e.preventDefault(),H(r,vn,o),Dr(o)):cr=o;return sr=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:H(r,vn,e),Dr((e.dataTransfer?e.dataTransfer.getData(`text/plain`):null)??e.data);break;case`insertFromComposition`:To(null),H(r,vn,e);break;case`insertLineBreak`:To(null),H(r,gn,!1);break;case`insertParagraph`:To(null),hr&&!ue?(hr=!1,H(r,gn,!1)):H(r,_n,void 0);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:H(r,yn,e);break;case`deleteByComposition`:(function(e,t){return e!==t||R(e)||R(t)||!ho(e)||!ho(t)})(l,u)&&H(r,bn,e);break;case`deleteByDrag`:is(Zr),H(r,bn,e);break;case`deleteByCut`:H(r,bn,e);break;case`deleteContent`:H(r,hn,!1);break;case`deleteWordBackward`:H(r,xn,!0);break;case`deleteWordForward`:H(r,xn,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:H(r,Sn,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:H(r,Sn,!1);break;case`formatStrikeThrough`:H(r,Cn,`strikethrough`);break;case`formatBold`:H(r,Cn,`bold`);break;case`formatItalic`:H(r,Cn,`italic`);break;case`formatUnderline`:H(r,Cn,`underline`);break;case`historyUndo`:H(r,wn,void 0);break;case`historyRedo`:H(r,Tn,void 0)}return!0}function jr(e){if(U(e.target)&&co(e.target))return!0;let t=L(),n=I(),r=e.data,i=Er(e);if(r!=null&&F(n)&&xr(n,i,r,e.timeStamp,!1)){gr&&=(Pr(t,r),!1);let i=n.anchor.getNode(),a=_s(cs(t));if(a===null)return!0;let o=n.isBackward(),s=o?n.anchor.offset:n.focus.offset,c=o?n.focus.offset:n.anchor.offset;le&&!n.isCollapsed()&&P(i)&&a.anchorNode!==null&&i.getTextContent().slice(0,s)+r+i.getTextContent().slice(s+c)===Bo(a.anchorNode)||H(t,vn,r);let l=r.length;ce&&l>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(n.anchor.offset-=l,n._cachedNodes=null,n._cachedIsBackward=null),me&&t.isComposing()&&(ar=0,To(null))}else Vo(!1,t,r===null?void 0:r),gr&&=(Pr(t,r||void 0),!1);return function(){_a(),tt(L())}(),!0}function Mr(e){let t=L(),n=I();if(F(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();To(r.key),is(Qr),(e.timeStamp<ar+30||r.type===`element`||!n.isCollapsed()||i.getFormat()!==n.format||P(i)&&i.getStyle()!==n.style)&&H(t,vn,De)}return!0}function Nr(e){return Pr(L(),e.data),is($r),!0}function Pr(e,t){let n=e._compositionKey;if(To(null),n!==null&&t!=null){if(t===``){let t=Do(n),r=e.getElementByKey(n),i=r!==null&&P(t)?As(t,r,e):null;if(i!==null&&i.nodeValue!==null&&P(t)){let n=_s(cs(e)),r=null,a=null;n!==null&&n.anchorNode===i&&(r=n.anchorOffset,a=n.focusOffset),Ho(t,i.nodeValue,r,a,!0)}return}if(t[t.length-1]===`
|
|
7
|
+
`){let t=I();if(F(t)||Fi(t)){if(F(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}H(e,Nn,null);return}}}Vo(!0,e,t)}function Fr(e){let t=L();if(e.key==null)return!0;if(_r){if(Jo(e))return Pa(t,()=>{Pr(t,vr)}),_r=!1,vr=``,!0;_r=!1,vr=``}if(function(e){return V(e,`ArrowRight`,{shiftKey:`any`})}(e))H(t,Dn,e);else if(function(e){return V(e,`ArrowRight`,{...Ko,shiftKey:`any`})}(e))H(t,On,e);else if(function(e){return V(e,`ArrowLeft`,{shiftKey:`any`})}(e))H(t,kn,e);else if(function(e){return V(e,`ArrowLeft`,{...Ko,shiftKey:`any`})}(e))H(t,An,e);else if(function(e){return V(e,`ArrowUp`,{altKey:`any`,shiftKey:`any`})}(e))H(t,jn,e);else if(function(e){return V(e,`ArrowDown`,{altKey:`any`,shiftKey:`any`})}(e))H(t,Mn,e);else if(function(e){return V(e,`Enter`,{altKey:`any`,ctrlKey:`any`,metaKey:`any`,shiftKey:!0})}(e))hr=!0,H(t,Nn,e);else if(function(e){return e.key===` `}(e))H(t,Pn,e);else if(function(e){return se&&V(e,`o`,{ctrlKey:!0})}(e))e.preventDefault(),hr=!0,H(t,gn,!0);else if(function(e){return V(e,`Enter`,{altKey:`any`,ctrlKey:`any`,metaKey:`any`})}(e))hr=!1,H(t,Nn,e);else if(function(e){return V(e,`Backspace`,{shiftKey:`any`})||se&&V(e,`h`,{ctrlKey:!0})}(e))Jo(e)?H(t,Fn,e)&&kr():(e.preventDefault(),H(t,hn,!0));else if(function(e){return e.key===`Escape`}(e))H(t,In,e);else if(function(e){return V(e,`Delete`,{})||se&&V(e,`d`,{ctrlKey:!0})}(e))(function(e){return e.key===`Delete`})(e)?H(t,Ln,e):(e.preventDefault(),H(t,hn,!1));else if(function(e){return V(e,`Backspace`,qo)}(e))e.preventDefault(),H(t,xn,!0);else if(function(e){return V(e,`Delete`,qo)}(e))e.preventDefault(),H(t,xn,!1);else if(function(e){return se&&V(e,`Backspace`,{metaKey:!0})}(e))e.preventDefault(),H(t,Sn,!0);else if(function(e){return se&&(V(e,`Delete`,{metaKey:!0})||V(e,`k`,{ctrlKey:!0}))}(e))e.preventDefault(),H(t,Sn,!1);else if(function(e){return V(e,`b`,Ko)}(e))e.preventDefault(),H(t,Cn,`bold`);else if(function(e){return V(e,`u`,Ko)}(e))e.preventDefault(),H(t,Cn,`underline`);else if(function(e){return V(e,`i`,Ko)}(e))e.preventDefault(),H(t,Cn,`italic`);else if(function(e){return V(e,`Tab`,{shiftKey:`any`})}(e))H(t,Rn,e);else if(function(e){return V(e,`z`,Ko)}(e))e.preventDefault(),H(t,wn,void 0);else if(function(e){return se?V(e,`z`,{metaKey:!0,shiftKey:!0}):V(e,`y`,{ctrlKey:!0})||V(e,`z`,{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),H(t,Tn,void 0);else{let n=t._editorState._selection;(function(e){return V(e,`a`,Ko)})(e)?(e.preventDefault(),H(t,Yn,e)&&kr()):n===null||F(n)||(function(e){return V(e,`c`,Ko)}(e)?(e.preventDefault(),H(t,qn,e)):function(e){return V(e,`x`,Ko)}(e)&&(e.preventDefault(),H(t,Jn,e)))}return function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(nr,e),!0}function Ir(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}var Lr=new Map;function Rr(e){let t=vs(e.target);if(t===null)return;let n=po(t.anchorNode);if(n===null)return;mr&&(mr=!1,Pa(n,()=>{let r=Xi(),i=t.anchorNode;(U(i)||_o(i))&&Fo(Yi(r,t,n,e))}));let r=Ro(n),i=r[r.length-1],a=i._key,o=Lr.get(a),s=o||i;s!==n&&Cr(t,s,!1),Cr(t,n,!0),n===i?o&&Lr.delete(a):Lr.set(a,n)}function zr(e){e._lexicalHandled=!0}function Br(e){return!0===e._lexicalHandled}function Vr(e){let t=dr.get(e);if(t===void 0)return;let n=fr.get(t);if(n===void 0)return;let r=n-1;r>=0||k(164),dr.delete(e),fr.set(t,r),r===0&&t.removeEventListener(`selectionchange`,Rr);let i=mo(e);fo(i)?(function(e){if(e._parentEditor!==null){let t=Ro(e),n=t[t.length-1]._key;Lr.get(n)===e&&Lr.delete(n)}else Lr.delete(e._key)}(i),e.__lexicalEditor=null):i&&k(198);let a=Ir(e);for(let e=0;e<a.length;e++)a[e]();e.__lexicalEventHandles=[]}function Hr(e,t,n){_a();let r=e.__key,i=e.getParent();if(i===null)return;let a=function(e){let t=I();if(!F(t)||!R(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return os(i,e)&&n.set(e.__key,0,`element`),os(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(F(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&($i(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&($i(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else Fi(a)&&t&&e.isSelected()&&e.selectPrevious();if(F(a)&&t&&!o){let t=e.getIndexWithinParent();Co(e),Zi(a,i,t,-1)}else Co(e);n||us(i)||i.canBeEmpty()||!i.isEmpty()||Hr(i,t),t&&a&&za(i)&&i.isEmpty()&&i.selectEnd()}function Ur(e){return e}var Wr=Symbol.for(`ephemeral`);function Gr(e){return e[Wr]||!1}var Kr={configurable:!0,enumerable:!1,value:void 0,writable:!0},qr=class{__type;__key;__parent;__prev;__next;__state;[yt];static getType(){let{ownNodeType:e}=Vs(this);return e===void 0&&k(64,this.name),e}static clone(e){k(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:n,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&=this.__state.getWritable(this).resetOnCopyNode()}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",Kr),Object.defineProperty(this,yt,Kr),So(this,e)}getType(){return this.__type}isInline(){k(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=Do(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){let t=e||I();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(P(this))return n;if(F(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(z(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:Do(e)}getParentOrThrow(){let e=this.getParent();return e===null&&k(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(us(t))return R(e)||e===this&&z(e)||k(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&k(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:Do(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:Do(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=R(this)?this:this.getParent(),n=R(e)?e:e.getParent(),r=t&&n?Sc(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=Sc(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?yc(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&k(279),!1)))}isParentOf(e){let t=Sc(this,e);return t!==null&&t.type===`ancestor`}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set,i=this;for(;i!==null;){let a=i.__key;if(r.has(a)||(r.add(a),n.push(i)),i===e)break;let o=R(i)?t?i.getFirstChild():i.getLastChild():null;if(o!==null){i=o;continue}let s=t?i.getNextSibling():i.getPreviousSibling();if(s!==null){i=s;continue}let c=i.getParentOrThrow();if(r.has(c.__key)||n.push(c),c===e)break;let l=null,u=c;do{if(u===null&&k(68),l=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),u===null)break;l!==null||r.has(u.__key)||n.push(u)}while(l===null);i=l}return t||n.reverse(),n}isDirty(){let e=L()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(Gr(this))return this;let e=Do(this.__key);return e===null&&k(113),e}getWritable(){if(Gr(this))return this;_a();let e=ya(),t=L(),n=e._nodeMap,r=this.__key,i=this.getLatest(),a=t._cloneNotNeeded,o=I();if(o!==null&&o.setCachedNodes(null),a.has(r))return wo(i),i;let s=Ps(i);return a.add(r),wo(s),n.set(r,s),s}getTextContent(){return``}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){k(70)}updateDOM(e,t,n){k(71)}getDOMSlot(e){return new Ie(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){k(18,this.name)}updateFromJSON(e){return function(e,t){let n=e.getWritable(),r=t.$,i=r;for(let e of ct(n).flatKeys)e in t&&(i!==void 0&&i!==r||(i={...r}),i[e]=t[e]);return(n.__state||i)&&st(e).updateFromJSON(i),n}(this,e)}static transform(){return null}remove(e){Hr(this,!0,e)}replace(e,t){_a();let n=I();n!==null&&(n=n.clone()),ps(this,e);let r=this.getLatest(),i=this.__key,a=e.__key,o=e.getWritable(),s=this.getParentOrThrow().getWritable(),c=s.__size,l=o.getParent(),u=l===null?-1:o.getIndexWithinParent();Co(o),l!==null&&F(n)&&Zi(n,l,u,-1);let d=r.getPreviousSibling(),f=r.getNextSibling(),p=r.__prev,m=r.__next,h=r.__parent;Hr(r,!1,!0),d===null?s.__first=a:d.getWritable().__next=a,o.__prev=p,f===null?s.__last=a:f.getWritable().__prev=a,o.__next=m,o.__parent=h,s.__size=c;let g=0;if(t&&(R(this)&&R(o)||k(139),g=o.getChildrenSize(),o.splice(g,0,this.getChildren())),F(n)){Fo(n);let e=n.anchor,r=n.focus;e.key===i&&(t&&e.type===`element`?e.set(o.__key,g+e.offset,`element`):Mi(e,o)),r.key===i&&(t&&r.type===`element`?r.set(o.__key,g+r.offset,`element`):Mi(r,o))}return Eo()===i&&To(a),o}insertAfter(e,t=!0){_a(),ps(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.getParent(),a=I(),o=!1,s=!1;if(i!==null){let n=e.getIndexWithinParent();if(F(a)){let e=i.__key,t=a.anchor,r=a.focus;o=t.type===`element`&&t.key===e&&t.offset===n+1,s=r.type===`element`&&r.key===e&&r.offset===n+1}Co(r),t&&F(a)&&Zi(a,i,n,-1)}let c=this.getNextSibling(),l=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(c===null?l.__last=u:c.getWritable().__prev=u,l.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&F(a)){let e=this.getIndexWithinParent();Zi(a,l,e+1);let t=l.__key;o&&a.anchor.set(t,e+2,`element`),s&&a.focus.set(t,e+2,`element`)}return e}insertBefore(e,t=!0){_a(),ps(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.__key,a=I(),o=r.getParent(),s=o===null?-1:r.getIndexWithinParent();Co(r),o!==null&&t&&F(a)&&Zi(a,o,s,-1);let c=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),u=n.__prev,d=this.getIndexWithinParent();return c===null?l.__first=i:c.getWritable().__next=i,l.__size++,n.__prev=i,r.__prev=u,r.__next=n.__key,r.__parent=n.__parent,t&&F(a)&&Zi(a,this.getParentOrThrow(),d),e}isParentRequired(){return!1}createParentElementNode(){return B()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){_a();let n=this.getPreviousSibling(),r=this.getParentOrThrow();if(n===null)return r.select(0,0);if(R(n))return n.select();if(!P(n)){let e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){_a();let n=this.getNextSibling(),r=this.getParentOrThrow();if(n===null)return r.select();if(R(n))return n.select(0,0);if(!P(n)){let e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}},Jr=`history-push`,Yr=`history-merge`,Xr=`skip-scroll-into-view`,Zr=`skip-selection-focus`,Qr=`composition-start`,$r=`composition-end`,ei=/\s*!important\s*$/i;function ti(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0;for(let l=0;l<e.length;l++){let u=e[l];if(a)u===`*`&&e[l+1]===`/`&&(a=!1,l++);else if(o)s?r+=u:n+=u,o=!1;else if(i===null)if(u!==`/`||e[l+1]!==`*`)if(u!==`"`&&u!==`'`)if(u!==`(`)if(u!==`)`)if(s||u!==`:`||c!==0){if(u===`;`&&c===0){let e=n.trim(),i=r.trim();e!==``&&i!==``&&(t[e]=i),n=``,r=``,s=!1;continue}s?r+=u:n+=u}else s=!0;else c=Math.max(0,c-1),s?r+=u:n+=u;else c++,s?r+=u:n+=u;else i=u,s?r+=u:n+=u;else a=!0,l++;else s?r+=u:n+=u,u===`\\`?o=!0:u===i&&(i=null)}let l=n.trim(),u=r.trim();return l!==``&&u!==``&&(t[l]=u),t}function ni(e,t,n){let r=ei.test(n)?`important`:``,i=r===``?n:n.replace(ei,``).trim();e.setProperty(t,i,r)}function ri(e,t,n=``){if(t===n)return;let r=ti(n),i=ti(t);for(let t in i)delete r[t],ni(e,t,i[t]);for(let t in r)e.removeProperty(t)}var ii=class e extends qr{static getType(){return`linebreak`}static clone(t){return new e(t.__key)}constructor(e){super(e)}getTextContent(){return`
|
|
8
|
+
`}createDOM(){return document.createElement(`br`)}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>function(e){let t=e.parentElement;if(t!==null&&ws(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&ci(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&ci(n))return!0}}return!1}(e)||function(e){let t=e.parentElement;if(t!==null&&ws(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&ci(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&ci(r))return!0}return!1}(e)?null:{conversion:ai,priority:0}}}static importJSON(e){return oi().updateFromJSON(e)}};function ai(e){return{node:oi()}}function oi(){return fs(new ii)}function si(e){return e instanceof ii}function ci(e){return _o(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}function li(e,t){return 16&t?`code`:t&128?`mark`:32&t?`sub`:64&t?`sup`:null}function ui(e,t){return 1&t?`strong`:2&t?`em`:`span`}function di(e,t,n,r,i){let a=r.classList,o=Xo(i,`base`);o!==void 0&&a.add(...o),o=Xo(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in Oe){let r=Oe[e];if(o=Xo(i,e),o!==void 0)if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}function fi(e,t,n){let r=n.isComposing(),i=e+(r?Te:``),a=Es(),o=Ds(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(document.createTextNode(i));let c=s,l=c.nodeValue;if(l!==i)if(r||ce){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(l,i);t!==0&&c.deleteData(e,t),c.insertData(e,n)}else c.nodeValue=i}function pi(e,t,n,r,i,a){fi(i,e,t);let o=a.theme.text;o!==void 0&&di(0,0,r,e,o)}function mi(e,t){let n=document.createElement(t);return n.appendChild(e),n}var hi=class e extends qr{__text;__format;__style;__mode;__detail;static getType(){return`text`}static clone(t){return new e(t.__text,t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return Ne[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Eo()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=Oe[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type===`text`&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return bo(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=li(0,n),i=ui(0,n),a=r===null?i:r,o=document.createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=document.createElement(i),o.appendChild(s)),pi(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&ri(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=li(0,i),s=li(0,a),c=ui(0,i),l=ui(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??k(48);let i=document.createElement(l);return pi(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??k(49)),fi(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&di(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&ri(t.style,p,f),!1}static importDOM(){return{"#text":()=>({conversion:bi,priority:0}),b:()=>({conversion:_i,priority:0}),code:()=>({conversion:Ci,priority:0}),em:()=>({conversion:Ci,priority:0}),i:()=>({conversion:Ci,priority:0}),mark:()=>({conversion:Ci,priority:0}),s:()=>({conversion:Ci,priority:0}),span:()=>({conversion:gi,priority:0}),strong:()=>({conversion:Ci,priority:0}),sub:()=>({conversion:Ci,priority:0}),sup:()=>({conversion:Ci,priority:0}),u:()=>({conversion:Ci,priority:0})}}static importJSON(e){return wi().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return U(t)||k(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=mi(t,`b`)),this.hasFormat(`italic`)&&(t=mi(t,`i`)),this.hasFormat(`strikethrough`)&&(t=mi(t,`s`)),this.hasFormat(`underline`)&&(t=mi(t,`u`)),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?Oe[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?ke[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=bo(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=Me[e];if(this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){_a();let n=e,r=t,i=I(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!F(i))return Ki(o,n,o,r,`text`,`text`);{let e=Eo();e!==i.anchor.key&&e!==i.focus.key||To(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=I();if(r&&F(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){_a();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=Eo(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=I();if(F(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=wi(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=pt(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=wi(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=pt(t,n);let a=n.__key;i===r&&To(a),y.push(n)}let b=g?g.offset:null,x=_?_.offset:null,S=0;for(let e of y){if(!g&&!_)break;let t=S+e.getTextContentSize();if(g!==null&&b!==null&&b<=t&&b>=S&&(g.set(e.getKey(),b-S,`text`),b<t&&(g=null)),_!==null&&x!==null&&x<=t&&x>=S){_.set(e.getKey(),x-S,`text`);break}S=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&wo(t),n!==null&&wo(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),F(v)&&Zi(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||k(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;Eo()===r&&To(n);let o=I();if(F(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&ea(i,t,n,e,a),s!==null&&s.key===r&&ea(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function gi(e){return{forChild:Ti(e.style),node:null}}function _i(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:Ti(t.style,n?void 0:`bold`),node:null}}var vi=new WeakMap;function yi(e){if(!U(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function bi(e){let t=e;e.parentElement===null&&k(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=vi.get(n))===void 0&&!yi(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)vi.set(r[e],i);return i}(t)!==null){let e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){let r=e[n];r===`
|
|
9
|
+
`||r===`\r
|
|
10
|
+
`?t.push(oi()):r===` `?t.push(Di()):r!==``&&t.push(wi(r))}return{node:t}}if(n=n.replace(/\r/g,``).replace(/[ \t\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=xi(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=xi(e,!0))!==null;)if((e.textContent||``).replace(/^( |\t|\r?\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:wi(n)}}function xi(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,U(n)){let e=n.style.display;if(e===``&&!Ss(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(_o(n))return n;if(n.nodeName===`BR`)return null}}var Si={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function Ci(e){let t=Si[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Ti(e.style,t),node:null}}function wi(e=``){return fs(new hi(e))}function P(e){return e instanceof hi}function Ti(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign;return e=>P(e)?(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}var Ei=class e extends hi{static getType(){return`tab`}static clone(t){return new e(t.__key)}constructor(e){super(` `,e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),n=Xo(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}static importJSON(e){return Di().updateFromJSON(e)}setTextContent(e){return e!==` `&&e!==``&&ae(126),super.setTextContent(` `)}spliceText(e,t,n,r){return n===``&&t===0||n===` `&&t===1||k(286),this}setDetail(e){return e!==2&&k(127),this}setMode(e){return e!==`normal`&&k(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function Di(){return fs(new Ei)}function Oi(e){return e instanceof Ei}var ki=class{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:vc(Mc(Cc(this,`next`)),Mc(Cc(e,`next`)))<0}getNode(){let e=Do(this.key);return e===null&&k(20),e}set(e,t,n,r){let i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,ga()||(Eo()===a&&To(e),i!==null&&(i.setCachedNodes(null),F(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}};function Ai(e,t,n){return new ki(e,t,n)}function ji(e,t){let n=t.__key,r=e.offset,i=`element`;if(P(t)){i=`text`;let e=t.getTextContentSize();r>e&&(r=e)}else if(!R(t)){let e=t.getNextSibling();if(P(e))n=e.__key,r=0,i=`text`;else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function Mi(e,t){if(R(t)){let n=t.getLastDescendant();R(n)||P(n)?ji(e,n):ji(e,t)}else ji(e,t)}var Ni=class e{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Fi(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes(),n=t.length,r=t[n-1],i;if(P(r))i=r.select();else{let e=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(e,e)}i.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=this._nodes,n=[];for(let e of t){let t=Do(e);t!==null&&n.push(t)}return ga()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t=``;for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes();if((I()||Xi())===this&&e[0]){let t=ac(e[0],`next`);Tc(gc(t,t))}for(let t of e)t.remove()}};function F(e){return e instanceof Pi}var Pi=class e{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!F(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,a=new Set;for(let n of e)if(tc(n)){let{origin:e}=n;t.length===0?i.add(e):(a.add(e),t.push(e))}else{let{origin:e}=n;R(e)&&a.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),ec(e.focus)&&R(e.focus.origin)&&e.focus.getNodeAtCaret()===null)for(let n=lc(e.focus.origin,`previous`);tc(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=dc(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!R(e)||a.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(t.length===0&&e.isCollapsed()){let n=Mc(e.anchor),r=Mc(e.anchor.getFlipped()),i=e=>$s(e)?e.origin:e.getNodeAtCaret(),a=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(a)}return t}(Fc(Dc(this),`next`));return ga()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){return this.anchor.set(e.__key,t,`text`),this.focus.set(n.__key,r,`text`),this}getTextContent(){let e=this.getNodes();if(e.length===0)return``;let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,a=r.isBefore(i),[o,s]=Li(this),c=``,l=!0;for(let u=0;u<e.length;u++){let d=e[u];if(R(d)&&!d.isInline())l||(c+=`
|
|
11
|
+
`),l=!d.isEmpty();else if(l=!1,P(d)){let e=d.getTextContent();d===t?d===n?r.type===`element`&&i.type===`element`&&i.offset!==r.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=a?e.slice(o):e.slice(s):d===n&&(e=a?e.slice(0,s):e.slice(0,o)),c+=e}else !z(d)&&!si(d)||d===n&&this.isCollapsed()||(c+=d.getTextContent())}return c}applyDOMRange(e){let t=L(),n=t.getEditorState()._selection,r=Wi(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;let[i,a,o]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),o&&(this.dirty=!0),_t(this)}clone(){let t=this.anchor,n=this.focus;return new e(Ai(t.key,t.offset,t.type),Ai(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=bo(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=Oe[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(oa(e))}insertText(e){let t=this.anchor,n=this.focus,r=this.format,i=this.style,a=t,o=n;!this.isCollapsed()&&n.isBefore(t)&&(a=n,o=t),a.type===`element`&&function(e,t,n,r){let i=e.getNode(),a=i.getChildAtIndex(e.offset),o=wi();if(o.setFormat(n),o.setStyle(r),Ja(a))a.splice(0,0,[o]);else{let e=za(i)?B().append(o):o;a===null?i.append(e):a.insertBefore(e)}e.is(t)&&t.set(o.__key,0,`text`),e.set(o.__key,0,`text`)}(a,o,r,i),o.type===`element`&&wc(o,Mc(Cc(o,`next`)));let s=a.offset,c=o.offset,l=this.getNodes(),u=l.length,d=l[0];P(d)||k(26);let f=d.getTextContent().length,p=d.getParentOrThrow(),m=l[u-1];if(u===1&&o.type===`element`&&(c=f,o.set(a.key,c,`text`)),this.isCollapsed()&&s===f&&(go(d)||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&d.getNextSibling()===null)){let t=d.getNextSibling();if(P(t)&&t.canInsertTextBefore()&&!go(t)||(t=wi(),t.setFormat(r),t.setStyle(i),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,e!==``)return void this.insertText(e)}else if(this.isCollapsed()&&s===0&&(go(d)||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&d.getPreviousSibling()===null)){let t=d.getPreviousSibling();if(P(t)&&!go(t)||(t=wi(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,e!==``)return void this.insertText(e)}else if(d.isSegmented()&&s!==f){let e=wi(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&e!==``){let t=m.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||R(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(``),Ui(this.anchor,this.focus),void this.insertText(e)}if(u===1){if(ho(d)){let t=wi(e);t.select(),d.replace(t);return}let t=d.getFormat(),n=d.getStyle();if(s!==c||t===r&&n===i){if(Oi(d)){let t=wi(e);t.setFormat(r),t.setStyle(i),t.select(),d.replace(t);return}}else{if(d.getTextContent()!==``){let t=wi(e);if(t.setFormat(r),t.setStyle(i),t.select(),s===0)d.insertBefore(t,!1);else{let[e]=d.splitText(s);e.insertAfter(t,!1)}t.isComposing()&&this.anchor.type===`text`&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null);return}d.setFormat(r),d.setStyle(i)}let a=c-s;d=d.spliceText(s,a,e,!0),d.getTextContent()===``?d.remove():this.anchor.type===`text`&&(this.format=t,this.style=n,d.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{let t=new Set([...d.getParentKeys(),...m.getParentKeys()]),n=R(d)?d:d.getParentOrThrow(),r=R(m)?m:m.getParentOrThrow(),i=m;if(!n.is(r)&&r.isInline())do i=r,r=r.getParentOrThrow();while(r.isInline());if(o.type===`text`&&(c!==0||m.getTextContent()===``)||o.type===`element`&&m.getIndexWithinParent()<c)if(P(m)&&!ho(m)&&c!==m.getTextContentSize()){if(m.isSegmented()){let e=wi(m.getTextContent());m.replace(e),m=e}za(o.getNode())||o.type!==`text`||(m=m.spliceText(0,c,``)),t.add(m.__key)}else{let e=m.getParentOrThrow();e.canBeEmpty()||e.getChildrenSize()!==1?m.remove():e.remove()}else t.add(m.__key);let a=r.getChildren(),p=new Set(l),h=n.is(r),g=n.isInline()&&d.getNextSibling()===null?n:d;for(let e=a.length-1;e>=0;e--){let t=a[e];if(t.is(d)||R(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(i)?h||g.insertAfter(t,!1):t.remove())}if(!h){let e=r,n=null;for(;e!==null;){let r=e.getChildren(),i=r.length;(i===0||r[i-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(ho(d))if(s===f)d.select();else{let t=wi(e);t.select(),d.replace(t)}else d=d.spliceText(s,f-s,e,!0),d.getTextContent()===``?d.remove():this.anchor.type===`text`&&(this.format=d.getFormat(),this.style=d.getStyle(),d.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let e=1;e<u;e++){let n=l[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){let e=I()===this;Ec(this,jc(Dc(this))),e&&I()!==this&&Fo(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void To(null);let n=this.getNodes(),r=[];for(let e of n)P(e)&&r.push(e);let i=t=>{n.forEach(n=>{if(R(n)){let r=n.getFormatFlags(e,t);n.setTextFormat(r)}})},a=r.length;if(a===0)return this.toggleFormat(e),To(null),void i(t);let o=this.anchor,s=this.focus,c=this.isBackward(),l=c?s:o,u=c?o:s,d=0,f=r[0],p=l.type===`element`?0:l.offset;if(l.type===`text`&&p===f.getTextContentSize()&&(d=1,f=r[1],p=0),f==null)return;let m=f.getFormatFlags(e,t);i(m);let h=a-1,g=r[h],_=u.type===`text`?u.offset:g.getTextContentSize();if(f.is(g)){if(p===_)return;if(go(f)||p===0&&_===f.getTextContentSize())f.setFormat(m);else{let e=f.splitText(p,_),t=p===0?e[0]:e[1];t.setFormat(m),l.type===`text`&&l.set(t.__key,0,`text`),u.type===`text`&&u.set(t.__key,_-p,`text`)}this.format=m;return}p===0||go(f)||([,f]=f.splitText(p),p=0),f.setFormat(m);let v=g.getFormatFlags(e,m);_>0&&(_===g.getTextContentSize()||go(g)||([g]=g.splitText(_)),g.setFormat(v));for(let t=d+1;t<h;t++){let n=r[t],i=n.getFormatFlags(e,v);n.setFormat(i)}l.type===`text`&&l.set(f.__key,p,`text`),u.type===`text`&&u.set(g.__key,_,`text`),this.format=m|v}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key===`root`){this.insertParagraph();let t=I();return F(t)||k(134),t.insertNodes(e)}let t=(this.isBackward()?this.focus:this.anchor).getNode(),n=Us(t,Ts),r=e[e.length-1];if(R(n)&&`__language`in n){if(`__language`in e[0])this.insertText(e[0].getTextContent());else{let t=sa(this);n.splice(t,0,e),r.selectEnd()}return}if(!e.some(e=>(R(e)||z(e))&&!e.isInline())){R(n)||k(211,t.constructor.name,t.getType());let i=sa(this);n.splice(i,0,e),r.selectEnd();return}let i=function(e){let t=B(),n=null;for(let r=0;r<e.length;r++){let i=e[r],a=si(i);if(a||z(i)&&i.isInline()||R(i)&&i.isInline()||P(i)||i.isParentRequired()){if(n===null&&(n=i.createParentElementNode(),t.append(n),a))continue;n!==null&&n.append(i)}else t.append(i),n=null}return t}(e),a=i.getLastDescendant(),o=i.getChildren(),s=!R(n)||!n.isEmpty()?this.insertParagraph():null,c=o[o.length-1],l=o[0];var u;R(u=l)&&Ts(u)&&!u.isEmpty()&&R(n)&&(!n.isEmpty()||n.canMergeWhenEmpty())&&(R(n)||k(211,t.constructor.name,t.getType()),n.append(...l.getChildren()),l=o[1]),l&&(n===null&&k(212,t.constructor.name,t.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||k(140),r=r.getNextSibling(),i.push(r);let a=e;for(let e of i)a=a.insertAfter(e)}(n,l));let d=Us(a,Ts);s&&R(d)&&(s.canMergeWhenEmpty()||Ts(c))&&(d.append(...s.getChildren()),s.remove()),R(n)&&n.isEmpty()&&n.remove(),a.selectEnd();let f=R(n)?n.getLastChild():null;si(f)&&d!==n&&f.remove()}insertParagraph(){if(this.anchor.key===`root`){let e=B();return No().splice(this.anchor.offset,0,[e]),e.select(),e}let e=sa(this),t=Us(this.anchor.getNode(),Ts);R(t)||k(213);let n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],i=t.insertNewAfter(this,!1);return i?(i.append(...r),i.selectStart(),i):null}insertLineBreak(e){let t=oi();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,a]=Li(this),o=this.isBackward(),[s,c]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[l,u]=o?[a,i]:[i,a];if(t===0)return[];if(t===1){if(P(n)&&!this.isCollapsed()){let e=n.splitText(l,u),t=l===0?e[0]:e[1];return t?(s.set(t.getKey(),0,`text`),c.set(t.getKey(),t.getTextContentSize(),`text`),[t]):[]}return[n]}if(P(n)&&(l===n.getTextContentSize()?e.shift():l!==0&&([,n]=n.splitText(l),e[0]=n,s.set(n.getKey(),0,`text`))),P(r)){let t=r.getTextContent().length;u===0?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,c.set(r.getKey(),r.getTextContentSize(),`text`))}return e}modify(e,t,n){if(la(this,e,t,n))return;let r=e===`move`,i=L(),a=_s(cs(i));if(!a)return;let o=i._blockCursorElement,s=i._rootElement,c=this.focus.getNode();if(s===null||o===null||!R(c)||c.isInline()||c.canBeEmpty()||gs(o,i,s),this.dirty){let e=ts(i,this.anchor.key),t=ts(i,this.focus.key),n=e,r=t;if(this.anchor.type===`text`){let t=this.anchor.getNode();n=P(t)?As(t,e,i):null}if(this.focus.type===`text`){let e=this.focus.getNode();r=P(e)?As(e,t,i):null}n&&r&&ta(a,n,this.anchor.offset,r,this.focus.offset)}if(function(e,t,n,r){e.modify(t,n,r)}(a,e,t?`backward`:`forward`,n),a.rangeCount>0){let e=a.getRangeAt(0),n=this.anchor.getNode(),i=za(n)?n:ls(n);if(this.applyDOMRange(e),this.dirty=!0,!r){let n=this.getNodes(),r=[],o=!1;for(let e=0;e<n.length;e++){let t=n[e];os(t,i)?r.push(t):o=!0}if(o&&r.length>0)if(t){let e=r[0];R(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{let e=r[r.length-1];R(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}a.anchorNode===e.startContainer&&a.anchorOffset===e.startOffset||function(e){let t=e.focus,n=e.anchor,r=n.key,i=n.offset,a=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,a,!0)}(this)}}n===`lineboundary`&&la(this,e,t,n,`decorators`)}forwardDeletion(e,t,n){if(!n&&(e.type===`element`&&R(t)&&e.offset===t.getChildrenSize()||e.type===`text`&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(e===null?null:e.getNextSibling());if(R(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;let r=mc(Cc(t,e?`previous`:`next`));if(r.getTextSlices().every(e=>e===null||e.distance===0)){let e={type:`initial`};for(let t of r.iterNodeCarets(`shadowRoot`))if(tc(t)){if(!t.origin.isInline()){if(t.origin.isShadowRoot()){if(e.type===`merge-block`)break;if(R(r.anchor.origin)&&r.anchor.origin.isEmpty()){let e=Mc(t);Ec(this,gc(e,e)),r.anchor.origin.remove()}return}e.type!==`merge-next-block`&&e.type!==`merge-block`||(e={block:e.block,caret:t,type:`merge-block`})}}else{if(e.type===`merge-block`)break;if(ec(t)){if(R(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:`merge-next-block`};continue}if(z(t.origin)){if(!t.origin.isIsolated())if(e.type===`merge-next-block`&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&R(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=Ji();e.add(t.origin.getKey()),Fo(e)}else t.origin.remove();return}break}}if(e.type===`merge-block`){let{caret:t,block:n}=e;return t.origin.isEmpty()&&!n.isEmpty()&&t.origin.getParent()===n.getParent()?void t.origin.remove(!0):(Ec(this,gc(!t.origin.isEmpty()&&n.isEmpty()?Oc(ac(n,t.direction)):r.anchor,t)),this.removeText())}}let i=this.focus;if(this.modify(`extend`,e,`character`),this.isCollapsed()){if(e&&t.offset===0&&Ri(this,t.getNode()))return}else{let r=i.type===`text`?i.getNode():null;if(n=t.type===`text`?t.getNode():null,r!==null&&r.isSegmented()){let t=i.offset,a=r.getTextContentSize();if(r.is(n)||e&&t!==a||!e&&t!==0)return void Bi(r,e,t)}else if(n!==null&&n.isSegmented()){let i=t.offset,a=n.getTextContentSize();if(n.is(r)||e&&i!==0||!e&&i!==a)return void Bi(n,e,i)}(function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&n.type===`text`&&r.type===`text`){let e=n.offset,a=r.offset,o=e<a,s=o?e:a,c=o?a:e,l=c-1;s!==l&&(function(e){return!(Lo(e)||zi(e))})(i.getTextContent().slice(s,c))&&(t?r.set(r.key,l,r.type):n.set(n.key,l,n.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type===`element`&&this.anchor.offset===0){let e=this.anchor.getNode();e.isEmpty()&&za(e.getParent())&&e.getPreviousSibling()===null&&Ri(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify(`extend`,e,`lineboundary`),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify(`extend`,e,`word`)}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){let e=this._cachedIsBackward;if(e!==null)return e;let t=this.focus.isBefore(this.anchor);return ga()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}};function Fi(e){return e instanceof Ni}function Ii(e){let t=e.offset;if(e.type===`text`)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Li(e){let t=e.getStartEndPoints();if(t===null)return[0,0];let[n,r]=t;return n.type===`element`&&r.type===`element`&&n.key===r.key&&n.offset===r.offset?[0,0]:[Ii(n),Ii(r)]}function Ri(e,t){for(let n=t;n;n=n.getParent()){if(R(n)){if(n.collapseAtStart(e))return!0;if(us(n))break}if(n.getPreviousSibling())break}return!1}var zi=(()=>{try{let e=RegExp(`\\p{Emoji}`,`u`),t=e.test.bind(e);if(t(`❤️`)&&t(`#️⃣`)&&t(`👍`))return t}catch{}return()=>!1})();function Bi(e,t,n){let r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length,o=0,s=0;for(let e=0;e<a;e++){let r=e===a-1;if(s=o,o+=i[e].length,t&&o===n||o>n||r){i.splice(e,1),r&&(s=void 0);break}}let c=i.join(``).trim();c===``?r.remove():(r.setTextContent(c),r.select(s,s))}function Vi(e,t,n,r){let i,a=t,o=!1;if(U(e)){let s=!1,c=e.childNodes,l=c.length,u=r._blockCursorElement;a===l&&l>0&&(s=!0,a=l-1),ko(e,r)!==void 0||e===r.getRootElement()||co(e)||(o=!0);let d=c[a],f=!1;if(d===u)d=c[a+1],f=!0;else if(u!==null){let n=u.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,u)&&a--}if(i=Io(d),P(i))a=sc(i,s?`next`:`previous`);else{let c=Io(e);if(c===null)return null;if(R(c)){let o=r.getElementByKey(c.getKey());o===null&&k(214);let l=Os(c,o,r);[c,a]=l.resolveChildIndex(c,o,e,t),R(c)||k(215),s&&a>=c.getChildrenSize()&&(a=Math.max(0,c.getChildrenSize()-1));let u=c.getChildAtIndex(a);if(R(u)&&function(e,t,n){let r=e.getParent();return n===null||r===null||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){let e=s?u.getLastDescendant():u.getFirstDescendant();e===null?c=u:(u=e,c=R(u)?u:u.getParentOrThrow()),a=0}P(u)?(i=u,c=null,a=sc(u,s?`next`:`previous`)):u!==c&&s&&!f&&(R(c)||k(216),a=Math.min(c.getChildrenSize(),a+1))}else{let n=c.getIndexWithinParent(),i=r.getElementByKey(c.getKey()),o=`after`;if(i!==null&&Io(e)===c){let n=Os(c,i,r);n.element===i?t===0&&z(c)&&(o=`before`):o=n.resolveLeafPosition(i,e,t)}a=o===`before`?n:n+1,c=c.getParentOrThrow()}if(R(c))return[Ai(c.__key,a,`element`),o]}}else i=Io(e);return P(i)?[Ai(i.__key,sc(i,a,`clamp`),`text`),o]:null}function Hi(e,t,n){let r=e.offset,i=e.getNode();if(r===0){let r=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&r===null&&R(a)&&a.isInline()){let t=a.getPreviousSibling();P(t)&&e.set(t.__key,t.getTextContent().length,`text`)}}else R(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),`element`):P(r)&&e.set(r.__key,r.getTextContent().length,`text`)}else if(r===i.getTextContent().length){let r=i.getNextSibling(),a=i.getParent();if(t&&R(r)&&r.isInline())e.set(r.__key,0,`element`);else if((n||t)&&r===null&&R(a)&&a.isInline()&&!a.canInsertTextAfter()){let t=a.getNextSibling();P(t)&&e.set(t.__key,0,`text`)}}}function Ui(e,t,n){if(e.type===`text`&&t.type===`text`){let n=e.isBefore(t),r=e.is(t);Hi(e,n,r),Hi(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}function Wi(e,t,n,r,i,a){if(e===null||n===null||!uo(i,e,n))return null;let o=Vi(e,t,F(a)?a.anchor:null,i);if(o===null)return null;let s=Vi(n,r,F(a)?a.focus:null,i);if(s===null)return null;let[c,l]=o,[u,d]=s;if(c.type===`element`&&u.type===`element`){let t=Io(e),r=Io(n);if(z(t)&&z(r))return null}return Ui(c,u),[c,u,l||d]}function Gi(e){return R(e)&&!e.isInline()}function Ki(e,t,n,r,i,a){let o=ya(),s=new Pi(Ai(e,t,i),Ai(n,r,a),0,``);return s.dirty=!0,o._selection=s,s}function qi(){return new Pi(Ai(`root`,0,`element`),Ai(`root`,0,`element`),0,``)}function Ji(){return new Ni(new Set)}function Yi(e,t,n,r){let i=n._window;if(i===null)return null;let a=r||i.event,o=a?a.type:void 0,s=o===`selectionchange`,c=!qe&&(s||o===`beforeinput`||o===`compositionstart`||o===`compositionend`||o===`click`&&a&&a.detail===3||o===`drop`||o===void 0),l,u,d,f;if(F(e)&&!c)return e.clone();if(t===null)return null;if(l=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(s||o===void 0)&&F(e)&&!uo(n,l,u))return e.clone();let p=Wi(l,d,u,f,n,e);if(p===null)return null;let[m,h,g]=p,_=0,v=``;if(F(e)){let t=e.anchor;if(m.key===t.key)_=e.format,v=e.style;else{let e=m.getNode();P(e)?(_=e.getFormat(),v=e.getStyle()):R(e)&&(_=e.getTextFormat(),v=e.getTextStyle())}}let y=new Pi(m,h,_,v);return g&&(y.dirty=!0),y}function I(){return ya()._selection}function Xi(){return L()._editorState._selection}function Zi(e,t,n,r=1){let i=e.anchor,a=e.focus,o=i.getNode(),s=a.getNode();if(!t.is(o)&&!t.is(s))return;let c=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(c,n,`element`),a.set(c,n,`element`),Qi(e)}}else{let o=e.isBackward(),s=o?a:i,l=s.getNode(),u=o?i:a,d=u.getNode();if(t.is(l)){let e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(c,Math.max(0,e+r),`element`)}if(t.is(d)){let e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(c,Math.max(0,e+r),`element`)}}Qi(e)}function Qi(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!R(a))return;let e=a.getChildrenSize(),i=n>=e,o=i?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(P(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,`text`),r.set(o.__key,e,`text`)}return}if(R(a)){let e=a.getChildrenSize(),r=n>=e,i=r?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(P(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,`text`)}}if(R(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(P(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,`text`)}}}function $i(e,t,n,r,i){let a=null,o=0,s=null;r===null?i!==null&&(a=i.__key,P(i)?s=`text`:R(i)&&(s=`element`)):(a=r.__key,P(r)?(o=r.getTextContentSize(),s=`text`):R(r)&&(o=r.getChildrenSize(),s=`element`)),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,`element`))}function ea(e,t,n,r,i){e.type===`text`?e.set(n,e.offset+(t?0:i),`text`):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,`element`)}function ta(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function na(e,t,n){let r=ts(e,t.getKey());if(R(t)){let i=Os(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function ra(e,t,n,r,i,a){let o=document.activeElement;if(i.has(`collaboration`)&&o!==a||o!==null&&lo(o))return;if(!F(t))return void(e!==null&&uo(n,r.anchorNode,r.focusNode)&&r.removeAllRanges());let s=t.anchor,c=t.focus,l=s.getNode(),u=c.getNode(),[d,f]=na(n,l,s.offset),[p,m]=na(n,u,c.offset),h=t.format,g=t.style,_=t.isCollapsed(),v=d,y=p,b=!1;var x,S,C,w,T;if((s.type===`text`?(v=P(l)?As(l,d,n):null,b=l.getFormat()!==h||l.getStyle()!==g):F(e)&&e.anchor.type===`text`&&(b=!0),c.type===`text`&&(y=P(u)?As(u,p,n):null),v!==null&&y!==null)&&(_&&(e===null||b||F(e)&&(e.format!==h||e.style!==g))&&(x=h,S=g,C=f,w=s.key,T=performance.now(),br=[x,S,C,w,T]),r.type===`Range`&&_||r.anchorOffset!==f||r.focusOffset!==m||r.anchorNode!==v||r.focusNode!==y||(o!==null&&a.contains(o)||i.has(`skip-selection-focus`)||a.focus({preventScroll:!0}),s.type===`element`))){if(ta(r,v,f,y,m),!ce||!t.isCollapsed()||a===null||i.has(`skip-selection-focus`)||document.activeElement!==null&&a.contains(document.activeElement)||a.focus({preventScroll:!0}),!i.has(`skip-scroll-into-view`)&&t.isCollapsed()&&a!==null&&a===document.activeElement){let e=F(t)&&t.anchor.type===`element`?v.childNodes[f]||null:r.rangeCount>0?r.getRangeAt(0):null;if(e!==null){let t;if(e instanceof Text){let n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();(function(e,t,n){let r=rs(n),i=ss(r);if(r===null||i===null)return;let{top:a,bottom:o}=t,s=0,c=0,l=n;for(;l!==null;){let t=l===r.body;if(t){let t=i.visualViewport;if(t){let e=t.offsetTop;s=e,c=e+t.height}else s=0,c=cs(e).innerHeight;let n=i.getComputedStyle(r.documentElement),a=parseFloat(n.scrollPaddingTop),o=parseFloat(n.scrollPaddingBottom);isFinite(a)&&(s+=a),isFinite(o)&&(c-=o)}else{let e=l.getBoundingClientRect();s=e.top,c=e.bottom}let n=0;if(a<s?n=-(s-a):o>c&&(n=o-c),n!==0)if(t)i.scrollBy(0,n);else{let e=l.scrollTop;l.scrollTop+=n;let t=l.scrollTop-e;a-=t,o-=t}if(t)break;l=ns(l)}})(n,t,a)}}pr=!0}}function ia(e){let t=I()||Xi();t===null&&(t=No().selectEnd()),t.insertNodes(e)}function aa(e,t){for(let n of e.split(/(\r?\n|\t)/))n===`
|
|
12
|
+
`||n===`\r
|
|
13
|
+
`?t.linebreak():n===` `?t.tab():n!==``&&t.text(n)}function oa(e){let t=[];return aa(e,{linebreak:()=>t.push(oi()),tab:()=>t.push(Di()),text:e=>t.push(wi(e))}),t}function sa(e){let t=e;e.isCollapsed()||t.removeText();let n=I();F(n)&&(t=n),F(t)||k(161);let r=t.anchor,i=r.getNode(),a=r.offset;for(;!Ts(i);){let e=i;if([i,a]=ca(i,a),e.is(i))break}return a}function ca(e,t){let n=e.getParent();if(!n){let e=B();return No().append(e),e.select(),[No(),0]}if(P(e)){let r=e.splitText(t);if(r.length===0)return[n,e.getIndexWithinParent()];let i=t===0?0:1;return[n,r[0].getIndexWithinParent()+i]}if(!R(e)||t===0)return[n,e.getIndexWithinParent()];let r=e.getChildAtIndex(t);if(r){let n=new Pi(Ai(e.__key,t,`element`),Ai(e.__key,t,`element`),0,``),i=e.insertNewAfter(n);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function la(e,t,n,r,i=`decorators-and-blocks`){if(t===`move`&&r===`character`&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let a=Cc(e.focus,n?`previous`:`next`),o=r===`lineboundary`,s=t===`move`,c=a,l=i===`decorators-and-blocks`;if(!Nc(c)){for(let e of c){l=!1;let{origin:t}=e;if(!z(t)||t.isIsolated()||(c=e,!o||!t.isInline()))break}if(l)for(let e of mc(a).iterNodeCarets(t===`extend`?`shadowRoot`:`root`)){if(tc(e))e.origin.isInline()||(c=e);else{if(R(e.origin))continue;z(e.origin)&&!e.origin.isInline()&&(c=e)}break}}if(c===a)return!1;if(s&&!o&&z(c.origin)&&c.origin.isKeyboardSelectable()){let e=Ji();return e.add(c.origin.getKey()),Fo(e),!0}return c=Mc(c),s&&wc(e.anchor,c),wc(e.focus,c),l||!o}var ua=null,da=null,fa=!1,pa=!1,ma=0,ha={characterData:!0,childList:!0,subtree:!0};function ga(){return fa||ua!==null&&ua._readOnly}function _a(){fa&&k(13)}function va(){ma>99&&k(14)}function ya(){return ua===null&&k(195,ba()),ua}function L(){return da===null&&k(337,ba()),da}function ba(){let e=0,t=new Set,n=to.version;if(typeof window<`u`)for(let r of document.querySelectorAll(`[contenteditable]`)){let i=mo(r);if(fo(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function xa(){return da}function Sa(e,t,n){let r=t.__type,i=ao(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Ca(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function wa(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function Ta(e){return Ea(e,L()._nodes)}function Ea(e,t){let n=e.type,r=t.get(n);r===void 0&&k(17,n);let i=r.klass;e.type!==i.getType()&&k(18,i.name);let a=i.importJSON(e),o=e.children;if(R(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=Ea(o[e],t);a.append(n)}return a}function Da(e,t,n){let r=ua,i=fa,a=da;ua=t,fa=!0,da=e;try{return n()}finally{ua=r,fa=i,da=a}}function Oa(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(e._deferred.length>0&&ja(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=ua,u=fa,d=da,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){da=e,ua=n,fa=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=on(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),pa)throw t;Ya(e,null,r,n),nt(e),e._dirtyType=2,pa=!0,Oa(e,a),pa=!1;return}finally{p.observe(r,ha),e._updating=f,ua=l,fa=u,da=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags,y=e._deferred;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=jo(e)),delete r[a])}(e,n);let b=i?null:_s(cs(e));if(e._editable&&b!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){da=e,ua=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&gs(t,e,r),ra(o,s,e,b,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(F(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(document.activeElement)){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())hs(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);if(t!==null&&hs(t)){let n=t.getPreviousSibling();(n===null||hs(n))&&(s=!0,c=e.getElementByKey(t.__key))}}if(s){let n=Os(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=document.createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=Uc(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&gs(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,ha),da=d,ua=l}}m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a),F(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(cn,void 0);let x=e._pendingDecorators;x!==null&&(e._decorators=x,e._pendingDecorators=null,ka(`decorator`,e,!0,x)),function(e,t,n){let r=Mo(t),i=Mo(n);r!==i&&ka(`textcontent`,e,!0,i)}(e,t||a,n),ka(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v}),ja(e,y),function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(e._cascadeCount++>99){e._updates=[],e._cascadeCount=0;try{k(343)}catch(t){t instanceof Error&&e._onError(t)}return}let n=t.shift();if(n){let[t,r]=n;Na(e,t,r)}}(e)}function ka(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r);n.has(e)?n.set(e,i):i&&i()}}finally{t._updating=i}}function Aa(e,t,n,r){let i=Ro(e),a;for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(Pa(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{Aa(a,t,n,r)}),!1}function ja(e,t){if(e._deferred=[],t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function Ma(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&k(191),a._flushSync=!0),o&&e._deferred.push(o),wa(e,i.tag)),a==null?Na(e,n,i):n()}}return r}function Na(e,t,n){let r=e._updateTags,i,a=!1,o=!1;n!==void 0&&(i=n.onUpdate,wa(e,n.tag),a=n.skipTransforms||!1,o=n.discrete||!1),i&&e._deferred.push(i);let s=e._editorState,c=e._pendingEditorState,l=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=Ba(c||s),l=!0),c._flushSync=o;let u=ua,d=fa,f=da,p=e._updating;ua=c,fa=!1,e._updating=!0,da=e;let m=e._headless||e.getRootElement()===null;ro(null);try{l&&(m?s._selection!==null&&(c._selection=s._selection.clone()):c._selection=function(e,t){let n=e.getEditorState()._selection,r=_s(cs(e));return F(n)||n==null?Yi(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),a=Ma(e,a),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(F(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(c,e),e._dirtyType!==0&&(a?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);P(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&>(t)}}(c,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=Eo(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);P(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&>(r),r!==void 0&&Ca(r,a)&&Sa(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){ma++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Ca(c,a)&&Sa(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,ma++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Ma(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(R(t)&&Ke(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of o)a.delete(e);for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(i.has(e)||n.delete(e),a.delete(e))}}(s,c,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(c._flushSync=!0);let i=c._selection;if(F(i)){let e=c._nodeMap,t=i.anchor.key,n=i.focus.key;e.get(t)!==void 0&&e.get(n)!==void 0||k(19)}else Fi(i)&&i._nodes.size===0&&(c._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Oa(e);return}finally{ua=u,fa=d,da=f,e._updating=p,ma=0}e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,Oa(e)):l&&so(()=>{Oa(e)}):(c._flushSync=!1,l&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Pa(e,t,n){da===e&&n===void 0?t():Na(e,t,n)}var Fa=class extends qr{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){return je[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let e=L()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;t!==null;){if(P(t)&&e.push(t),R(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;R(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;R(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return R(e)&&e.getLastDescendant()||e||null}let r=t[e];return R(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return e===null?null:Do(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&k(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:Do(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&k(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=``,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),R(i)&&r!==n-1&&!i.isInline()&&(e+=Ee)}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),R(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=Ae[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=Oe[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return bo(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){_a();let n=I(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(P(e)||R(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(P(e)||R(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return F(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):Ki(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==``&&Ae[e]||0,this}setStyle(e){return this.getWritable().__style=e||``,this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){Gr(this)&&k(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||k(226,String(e),String(t),String(r));let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0)if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}if(t>0){let e=l===null?this.getFirstChild():l.getNextSibling();for(let n=0;n<t;n++){e===null&&k(100);let t=e.getNextSibling(),n=e.__key;Co(e.getWritable()),s.push(n),e=t}}let d=l;for(let e of n){d!==null&&e.is(d)&&(l=d=d.getPreviousSibling());let t=e.getWritable();t.__parent===a&&u--,Co(t);let n=e.__key;if(d===null)i.__first=n,t.__prev=null;else{let e=d.getWritable();e.__next=n,t.__prev=e.__key}e.__key===a&&k(76),t.__parent=a,o.push(n),d=e}if(e+t===r)d!==null&&(d.getWritable().__next=null,i.__last=d.__key);else if(c!==null){let e=c.getWritable();if(d!==null){let t=d.getWritable();e.__prev=d.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=u,s.length){let e=I();if(F(e)){let t=new Set(s),n=new Set(o),{anchor:r,focus:i}=e;Ia(r,t,n)&&$i(r,r.getNode(),this,l,c),Ia(i,t,n)&&$i(i,i.getNode(),this,l,c),u!==0||this.canBeEmpty()||us(this)||this.remove()}}return i}getDOMSlot(e){return new Re(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(U(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`,t.setAttribute(`data-lexical-indent`,String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return t===0&&n===``||us(this)||this.getChildren().some(P)||(t!==0&&(e.textFormat=t),n!==``&&(e.textStyle=n)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||``)}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=Os(this,e,t),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());i!==null&&(r==null?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}};function R(e){return e instanceof Fa}function Ia(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var La=class extends qr{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function z(e){return e instanceof La}var Ra=class e extends Fa{__cachedText;static getType(){return`root`}static clone(){return new e}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){k(51)}getTextContent(){let e=this.__cachedText;return e===null||!ga()&&L()._dirtyType!==0?super.getTextContent():e}remove(){k(52)}replace(e){k(53)}insertBefore(e){k(54)}insertAfter(e){k(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)R(e)||z(e)||k(282);return super.splice(e,t,n)}static importJSON(e){return No().updateFromJSON(e)}collapseAtStart(){return!0}};function za(e){return e instanceof Ra}function Ba(e){return new Wa(We(e._nodeMap))}function Va(){return new Wa(new Map([[`root`,new Ra]]))}function Ha(e){let t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&k(130,n.name),R(e)){let r=t.children;Array.isArray(r)||k(59,n.name);let i=e.getChildren();for(let e=0;e<i.length;e++){let t=Ha(i[e]);r.push(t)}}return t}function Ua(e){return e instanceof Wa}var Wa=class e{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return Da(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Da(null,this,()=>({root:Ha(No())}))}},Ga=class extends Fa{static getType(){return`artificial`}createDOM(e){return document.createElement(`div`)}},Ka=class e extends Fa{static getType(){return`paragraph`}static clone(t){return new e(t.__key)}createDOM(e){let t=document.createElement(`p`),n=Xo(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:qa,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(U(t)){this.isEmpty()&&t.append(document.createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return B().updateFromJSON(e)}exportJSON(){let e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){let t=this.getChildren().find(P);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let n=B();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){let e=this.getChildren();if(e.length===0||P(e[0])&&e[0].getTextContent().trim()===``){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function qa(e){let t=B();if(Rs(t,e),Is(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in Ae&&t.setFormat(n)}return Ls(t,e),{node:t}}function B(){return fs(new Ka)}function Ja(e){return e instanceof Ka}function Ya(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=Va(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null;let o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=``),n!==null&&(n.textContent=``,a.set(`root`,n))}function Xa(e){let t=new Set,n=new Set,r=e;for(;r;){let{ownNodeConfig:e}=Vs(r),i=r.transform;if(!n.has(i)){n.add(i);let e=r.transform();e&&t.add(e)}if(e){let n=e.$transform;n&&t.add(n),r=e.extends}else{let e=Object.getPrototypeOf(r);r=e.prototype instanceof qr&&e!==qr?e:void 0}}return t}var Za={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=oo(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>R(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$shouldExclude:(e,t,n)=>R(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function Qa(e){let t=e||{},n=xa(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=Va(),s=t.namespace||(i===null?zo():i._config.namespace),c=t.editorState,l=[Ra,hi,ii,Ei,Ka,Ga,...t.nodes||[]],{onError:u,html:d}=t,f=t.editable===void 0||t.editable,p;if(e===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let e=0;e<l.length;e++){let t=l[e],n=null,r=null;if(typeof t!=`function`){let e=t;t=e.replace,n=e.with,r=e.withKlass||null}Vs(t);let i=t.getType(),a=Xa(t);p.set(i,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,sharedNodeState:at(l[e]),transforms:a})}}let m=new to(o,i,p,{disableEvents:a,dom:{...Za,...e&&e.dom},namespace:s,theme:r},u||console.error,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(p,d?d.import:void 0),f,e);return c!==void 0&&(m._pendingEditorState=c,m._dirtyType=2),function(e){e.registerCommand(dn,Ar,0),e.registerCommand(fn,jr,0),e.registerCommand(pn,Mr,0),e.registerCommand(mn,Nr,0),e.registerCommand(En,Fr,0)}(m),m}function $a(e,t){let n=e.get(t);e.delete(t),n&&n()}function eo(e,t,n){return e.set(t,n),$a.bind(null,e,t)}var to=class{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,n,r,i,a,o,s){this._createEditorArgs=s,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Ge,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=zo(),this._onError=i,this._htmlConversions=a,this._editable=o,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return eo(this._listeners.update,e)}registerEditableListener(e){return eo(this._listeners.editable,e)}registerDecoratorListener(e){return eo(this._listeners.decorator,e)}registerTextContentListener(e){return eo(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return Kc(eo(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&k(35);let r=this._commands;r.has(e)||r.set(e,[new He,new He,new He,new He,new He]);let i=r.get(e);i===void 0&&k(36,String(e));let a=function(e){return 7&e}(n),o=i[a];return a===n?o.addBack(t):o.addFront(t),()=>{o.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&k(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=Ns(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=Ns(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=Do(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:Yr}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return H(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=Xo(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,Ya(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||Vr(t),n!=null&&t.classList.remove(...n)),e!==null){let t=ss(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,nt(this),this._updateTags.add(Yr),Oa(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;dr.set(e,n);let r=fr.get(n)??0;r<1&&n.addEventListener(`selectionchange`,Rr),fr.set(n,r+1),e.__lexicalEditor=t;let i=Ir(e);for(let n=0;n<ir.length;n++){let[r,a]=ir[n],o=typeof a==`function`?e=>{Br(e)||(zr(e),(t.isEditable()||r===`click`)&&a(e,t))}:e=>{if(Br(e))return;zr(e);let n=t.isEditable();switch(r){case`cut`:return n&&H(t,Jn,e);case`copy`:return H(t,qn,e);case`paste`:return n&&H(t,yn,e);case`dragstart`:return n&&H(t,Wn,e);case`dragover`:return n&&H(t,Gn,e);case`dragend`:return n&&H(t,Kn,e);case`focus`:return n&&H(t,er,e);case`blur`:return n&&H(t,tr,e);case`drop`:return n&&H(t,Hn,e)}};e.addEventListener(r,o),i.push(()=>{e.removeEventListener(r,o)})}}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(Yr),Oa(this);ka(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&k(38);let n=e;n._readOnly&&(n=Ba(e),n._selection=e._selection?e._selection.clone():null),tt(this);let r=this._pendingEditorState,i=this._updateTags,a=t===void 0?null:t.tag;r===null||r.isEmpty()||(a!=null&&i.add(a),Oa(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,a!=null&&i.add(a),this._updating||Oa(this)}parseEditorState(e,t){return function(e,t,n){let r=Va(),i=ua,a=fa,o=da,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,ua=r,fa=!1,da=t,ro(null);try{let i=t._nodes;Ea(e.root,i),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,ua=i,fa=a,da=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(e){return Oa(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):Na(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),Pa(this,()=>{let r=I(),i=No();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||Fo(r.clone()),is(`focus`),as(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=_s(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,ka(`editable`,this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}};to.version=Ve;var no=null;function ro(e){no=e}var io=1;function ao(e,t){let n=oo(e,t);return n===void 0&&k(30,t),n}function oo(e,t){return e._nodes.get(t)}var so=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function co(e){return z(Ao(e))}function lo(e){let t=document.activeElement;if(!U(t))return!1;let n=t.nodeName;return z(Ao(e))&&(n===`INPUT`||n===`TEXTAREA`||t.contentEditable===`true`&&mo(t)==null)}function uo(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!lo(t)&&po(t)===e}catch{return!1}}function fo(e){return e instanceof to}function po(e){let t=e;for(;t!=null;){let e=mo(t);if(fo(e))return e;t=ns(t)}return null}function mo(e){return e?e.__lexicalEditor:null}function ho(e){return Oi(e)||e.isToken()}function go(e){return ho(e)||e.isSegmented()}function _o(e){return ys(e)&&e.nodeType===3}function vo(e){return ys(e)&&e.nodeType===9}function yo(e){let t=e;for(;t!=null;){if(_o(t))return t;t=t.firstChild}return null}function bo(e,t,n){let r=Oe[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~Oe.superscript:t===`superscript`?i&=~Oe.subscript:t===`lowercase`?(i&=~Oe.uppercase,i&=~Oe.capitalize):t===`uppercase`?(i&=~Oe.lowercase,i&=~Oe.capitalize):t===`capitalize`&&(i&=~Oe.lowercase,i&=~Oe.uppercase),i}function xo(e){return P(e)||si(e)||z(e)}function So(e,t){let n=function(){let e=no;return no=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);_a(),va();let r=L(),i=ya(),a=``+ io++;i._nodeMap.set(a,e),R(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType===0&&(r._dirtyType=1),e.__key=a}function Co(e){let t=e.getParent();if(t!==null){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a===null?null:a.__key,s=i===null?null:i.__key,c=i===null?null:i.getWritable(),l=a===null?null:a.getWritable();i===null&&(r.__first=o),a===null&&(r.__last=s),c!==null&&(c.__next=o),l!==null&&(l.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function wo(e){va(),Gr(e)&&k(323,e.__key,e.__type);let t=e.getLatest(),n=t.__parent,r=ya(),i=L(),a=r._nodeMap,o=i._dirtyElements;n!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent}}(n,a,o);let s=t.__key;i._dirtyType===0&&(i._dirtyType=1),R(e)?o.set(s,!0):i._dirtyLeaves.add(s)}function To(e){_a();let t=L(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=Do(n);e!==null&&e.getWritable()}if(e!==null){let t=Do(e);t!==null&&t.getWritable()}}}function Eo(){return ga()?null:L()._compositionKey}function Do(e,t){let n=(t||ya())._nodeMap.get(e);return n===void 0?null:n}function Oo(e,t){let n=ko(e,L());return n===void 0?null:Do(n,t)}function ko(e,t){return e[`__lexicalKey_${t._key}`]}function Ao(e,t){let n=e;for(;n!=null;){let e=Oo(n,t);if(e!==null)return e;n=ns(n)}return null}function jo(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Mo(e){return e.read(()=>No().getTextContent())}function No(){return Po(ya())}function Po(e){return e._nodeMap.get(`root`)}function Fo(e){_a();let t=ya();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Io(e){let t=L(),n=function(e,t){let n=e;for(;n!=null;){let e=ko(n,t);if(e!==void 0)return e;n=ns(n)}return null}(e,t);return n===null?e===t.getRootElement()?Do(`root`):null:Do(n)}function Lo(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Ro(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}function zo(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5)}function Bo(e){return _o(e)?e.nodeValue:null}function Vo(e,t,n){let r=_s(cs(t));if(r===null)return;let i=r.anchorNode,{anchorOffset:a,focusOffset:o}=r;if(i!==null){let t=Bo(i),r=Ao(i);if(t!==null&&P(r)){if((t===Te||t===De)&&n){let e=n.length;t=n,a=e,o=e}t!==null&&Ho(r,t,a,o,e)}}}function Ho(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing(),s=t;if((o||i)&&(t.endsWith(Te)&&(s=t.slice(0,-Te.length)),i)){let e=De,t;for(;(t=s.indexOf(e))!==-1;)s=s.slice(0,t)+s.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let c=a.getTextContent();if(i||s!==c){if(s===``){if(To(null),fe||ue||he)a.remove();else{let e=L();setTimeout(()=>{e.update(()=>{a.isAttached()&&a.remove()})},20)}return}let t=a.getParent(),i=Xi(),c=a.getTextContentSize(),l=Eo(),u=a.getKey();if(a.isToken()||l!==null&&u===l&&!o||F(i)&&(t!==null&&!t.canInsertTextBefore()&&i.anchor.offset===0||i.anchor.key===e.__key&&i.anchor.offset===0&&!a.canInsertTextBefore()&&!o||i.focus.key===e.__key&&i.focus.offset===c&&!a.canInsertTextAfter()&&!o))return void a.markDirty();let d=I();if(!F(d)||n===null||r===null)return void Uo(a,s,d);if(d.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=wi(a.getTextContent());a.replace(e),a=e}Uo(a,s,d)}}}function Uo(e,t,n){if(e.setTextContent(t),F(n)){let t=e.getKey(),r=!1;for(let i of[`anchor`,`focus`]){let a=n[i];a.type===`text`&&a.key===t&&(a.offset=sc(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function Wo(e,t,n){let r=t[n]||!1;return r===`any`||r===e[n]}function Go(e,t){return Wo(e,t,`altKey`)&&Wo(e,t,`ctrlKey`)&&Wo(e,t,`shiftKey`)&&Wo(e,t,`metaKey`)}function V(e,t,n){if(!Go(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith(`Digit`)&&/^\d$/.test(t))return e.code===`Digit${t}`;let r=`Key`+t.toUpperCase();return e.code===r}var Ko={ctrlKey:!se,metaKey:se},qo={altKey:se,ctrlKey:!se};function Jo(e){return e.key===`Backspace`}function Yo(e){let t=No();if(F(e)){let t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),_t(e),e}{let e=t.select(0,t.getChildrenSize());return Fo(_t(e)),e}}function Xo(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=Uc(i);return n[t]=e,e}return i}function Zo(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&k(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function Qo(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function $o(e,t){let n=e.offset;if(e.type===`element`)return Qo(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?Qo(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function es(e){let t=cs(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function H(e,t,n){return Aa(e,t,n,e)}function ts(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&k(75,t),n}function ns(e){let t=e.assignedSlot||e.parentElement;return bs(t)?t.host:t}function rs(e){return vo(e)?e:U(e)?e.ownerDocument:null}function is(e){_a(),L()._updateTags.add(e)}function as(e){_a(),L()._deferred.push(e)}function os(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function ss(e){let t=rs(e);return t?t.defaultView:null}function cs(e){let t=e._window;return t===null&&k(78),t}function ls(e){let t=e.getParentOrThrow();for(;t!==null;){if(us(t))return t;t=t.getParentOrThrow()}return t}function us(e){return za(e)||R(e)&&e.isShadowRoot()}function ds(e,t=!1){let n=e.constructor.clone(e);return So(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function fs(e){let t=L(),n=e.getType(),r=oo(t,n);r===void 0&&k(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||k(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||k(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&k(203,e.constructor.name,n,r.name,r.getType()),t}return e}function ps(e,t){!za(e.getParent())||R(t)||z(t)||k(99)}function ms(e){let t=Do(e);return t===null&&k(63,e),t}function hs(e){return(z(e)||R(e)&&!e.canBeEmpty())&&!e.isInline()}function gs(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function _s(e){return A?(e||window).getSelection():null}function vs(e){let t=ss(e);return t?t.getSelection():null}function U(e){return ys(e)&&e.nodeType===1}function ys(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function bs(e){return ys(e)&&e.nodeType===11}var xs=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function Ss(e){return!(!U(e)||!e.style.display.startsWith(`inline`))||xs.test(e.nodeName)}var Cs=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function ws(e){return(!U(e)||!e.style.display.startsWith(`inline`))&&Cs.test(e.nodeName)}function Ts(e){if(z(e)&&!e.isInline())return!0;if(!R(e)||us(e))return!1;let t=e.getFirstChild(),n=t===null||si(t)||P(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Es(){return L()}function Ds(e=Es()){return e._config.dom||Za}function Os(e,t,n=Es()){let r=Ds(n).$getDOMSlot(e,t,n);return R(e)&&(ks(r)||k(344,e.getKey(),e.getType())),r}function ks(e){return e instanceof Re}function As(e,t,n=Es()){return yo(Os(e,t,n).element)}var js=new WeakMap,Ms=new Map;function Ns(e){if(!e._readOnly&&e.isEmpty())return Ms;e._readOnly||k(192);let t=js.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),js.set(e,t)),t}function Ps(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Fs(e){return(t=Ps(e))[Wr]=!0,t;var t}function Is(e,t){let n=e.getAttribute(`data-lexical-indent`);if(n!==null){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}function Ls(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function Rs(e,t){let n=t.style.textAlign;return n&&n in Ae?e.setFormat(n):e}function zs(e){return!0===e.__lexicalUnmanaged}function Bs(e,t){return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)&&e[t]!==qr[t]}function Vs(e){let t=Pe in e.prototype?e.prototype[Pe]():void 0,n=function(e){if(!(e===qr||e.prototype instanceof qr)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{to.version&&(n=JSON.parse(to.version))}catch{}k(290,e.name,t,n)}return e===La||e===Fa||e===qr}(e),r=!n&&Bs(e,`getType`)?e.getType():void 0,i,a=r;if(t)if(r)i=t[r];else for(let[e,n]of Object.entries(t))a=e,i=n;if(!n&&a&&(Bs(e,`getType`)||(e.getType=()=>a),Bs(e,`clone`)||(e.clone=t=>(ro(t),new e)),Bs(e,`importJSON`)||(e.importJSON=i&&i.$importJSON||(t=>new e().updateFromJSON(t))),!Bs(e,`importDOM`)&&i)){let{importDOM:t}=i;t&&(e.importDOM=()=>t)}return{ownNodeConfig:i,ownNodeType:a}}function Hs(e){let t=Es();return _a(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}var Us=(e,t)=>{let n=e;for(;n!=null&&!za(n);){if(t(n))return n;n=n.getParent()}return null};function Ws(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?Do(r):t.get(r);e??k(174),n.push(r),r=e.__next}return n}var Gs={next:`previous`,previous:`next`},Ks=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return _c({hasNext:ec,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return ac(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return ac(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n=`next`){let r=n===this.direction?t:Array.from(t).reverse(),i=this,a=this.getParentAtCaret(),o=new Map;for(let t=i.getAdjacentCaret();t!==null&&o.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();o.set(e.getKey(),e)}for(let e of r){if(o.size>0){let t=i.getNodeAtCaret();if(t){if(o.delete(t.getKey()),o.delete(e.getKey()),!(t.is(e)||i.origin.is(e))){let n=e.getParent();n&&n.is(a)&&e.remove(),t.replace(e)}}else t===null&&k(263,Array.from(o).join(` `))}else i.insert(e);i=ac(e,this.direction)}for(let e of o.values())e.remove();return this}},qs=class e extends Ks{type=`child`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:lc(e,this.direction)}getParentCaret(e=`root`){return ac(Xs(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=Ys(this.direction);return ac(this.getNodeAtCaret(),e)||lc(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}},Js={root:za,shadowRoot:us};function Ys(e){return Gs[e]}function Xs(e,t=`root`){return Js[t](e)?null:e}var Zs=class e extends Ks{type=`sibling`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:ac(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return R(this.origin)?lc(this.origin,this.direction):null}getParentCaret(e=`root`){return ac(Xs(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=Ys(this.direction);return ac(this.getNodeAtCaret(),e)||lc(this.origin.getParentOrThrow(),e)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof e||t instanceof Qs)&&this.direction===t.direction&&this.origin.is(t.origin)}},Qs=class e extends Ks{type=`text`;offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:oc(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e=`root`){return ac(Xs(this.getParentAtCaret(),e),this.direction)}getFlipped(){return oc(this.origin,Ys(this.direction),this.offset)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Zs||t instanceof e)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return ac(this.origin,this.direction)}};function $s(e){return e instanceof Qs}function ec(e){return e instanceof Zs}function tc(e){return e instanceof qs}var nc={next:class extends Qs{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Qs{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},rc={next:class extends Zs{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Zs{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},ic={next:class extends qs{direction=`next`;getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends qs{direction=`previous`;getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function ac(e,t){return e?new rc[t](e):null}function oc(e,t,n){return e?new nc[t](e,sc(e,n)):null}function sc(e,t,n=`error`){let r=e.getTextContentSize(),i=t===`next`?r:t===`previous`?0:t;return(i<0||i>r)&&(n!==`clamp`&&ae(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function cc(e,t){return new pc(e,t)}function lc(e,t){return R(e)?new ic[t](e):null}function uc(e){return e&&e.getChildCaret()||e}function dc(e){return e&&uc(e.getAdjacentCaret())}var fc=class e{type=`node-caret-range`;direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new e(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return $s(t)?function(e,t){let{direction:n,origin:r}=e;return cc(e,sc(r,t===`focus`?Ys(n):n)-e.offset)}(t,e):null},t=e(`anchor`),n=e(`focus`);if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[cc(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e=`root`){let t=$s(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=$s(n),i=t=>t.isSameNodeCaret(n)?null:dc(t)||t.getParentCaret(e);return _c({hasNext:e=>e!==null&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets(`root`)}},pc=class{type=`slice`;caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return oc(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function mc(e){return gc(e,ac(No(),e.direction))}function hc(e){return gc(e,e)}function gc(e,t){return e.direction!==t.direction&&k(265),new fc(e,t,e.direction)}function _c(e){let{initial:t,hasNext:n,step:r,map:i}=e,a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};let e={done:!1,value:i(a)};return a=r(a),e}}}function vc(e,t){let n=Sc(e.origin,t.origin);switch(n===null&&k(275,e.origin.getKey(),t.origin.getKey()),n.type){case`same`:{let n=e.type===`text`,r=t.type===`text`;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:e.type===`child`?-1:1}case`ancestor`:return e.type===`child`?-1:1;case`descendant`:return t.type===`child`?1:-1;case`branch`:return yc(n)}}function yc(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function bc(e,t){return t.is(e)}function xc(e){return R(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Sc(e,t){if(e.is(t))return{commonAncestor:e,type:`same`};let n=new Map;for(let[t,r]=xc(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,i]=xc(t);r;i=r,r=r.getParent()){let a=n.get(r);if(a!==void 0)return a===null?(bc(e,r)||k(276),{commonAncestor:r,type:`ancestor`}):i===null?(bc(t,r)||k(277),{commonAncestor:r,type:`descendant`}):((R(a)||bc(e,a))&&(R(i)||bc(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||k(278),{a,b:i,commonAncestor:r,type:`branch`})}return null}function Cc(e,t){let{type:n,key:r,offset:i}=e,a=ms(e.key);return n===`text`?(P(a)||k(266,a.getType(),r),oc(a,t,i)):(R(a)||k(267,a.getType(),r),Ic(a,e.offset,t))}function wc(e,t){let{origin:n,direction:r}=t,i=r===`next`;$s(t)?e.set(n.getKey(),t.offset,`text`):ec(t)?P(n)?e.set(n.getKey(),sc(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(tc(t)&&R(n)||k(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function Tc(e){let t=I(),n=F(t)?t:qi();return Ec(n,e),Fo(n),n}function Ec(e,t){wc(e.anchor,t.anchor),wc(e.focus,t.focus)}function Dc(e){let{anchor:t,focus:n}=e,r=Cc(t,`next`),i=Cc(n,`next`),a=vc(r,i)<=0?`next`:`previous`;return gc(Pc(r,a),Pc(i,a))}function Oc(e){let{direction:t,origin:n}=e,r=ac(n,Ys(t)).getNodeAtCaret();return r?ac(r,t):lc(n.getParentOrThrow(),t)}function kc(e,t=`root`){let n=[e];for(let r=tc(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Oc(r));return n}function Ac(e){return!!e&&e.origin.isAttached()}function jc(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=Fc(e,r),o=kc(a.anchor,n),s=kc(a.focus.getFlipped(),n),c=new Set,l=[];for(let e of a.iterNodeCarets(n))if(tc(e))c.add(e.origin.getKey());else if(ec(e)){let{origin:t}=e;R(t)&&!c.has(t.getKey())||l.push(t)}for(let e of l)e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=Oc(ac(t,r)),c=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||c===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(c===`segmented`){let e=t.origin,n=wi(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=oc(n,r,t.offset)}n.is(o[0].origin)&&(o[0]=t),n.is(s[0].origin)&&(s[0]=t.getFlipped())}}let u,d;for(let e of o)if(Ac(e)){u=Mc(e);break}for(let e of s)if(Ac(e)){d=Mc(e);break}let f=function(e,t,n){if(!e||!t)return null;let r=e.getParentAtCaret(),i=t.getParentAtCaret();if(!r||!i)return null;let a=r.getParents().reverse();a.push(r);let o=i.getParents().reverse();o.push(i);let s=Math.min(a.length,o.length),c;for(c=0;c<s&&a[c]===o[c];c++);let l=(e,t)=>{let n;for(let r=c;r<e.length;r++){let i=e[r];if(us(i))return;!n&&t(i)&&(n=i)}return n},u=l(a,Ts),d=u&&l(o,e=>n.has(e.getKey())&&Ts(e));return u&&d?[u,d]:null}(u,d,c);if(f){let[e,t]=f;lc(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}let p=[u,d,...o,...s].find(Ac);if(p)return hc(Pc(Mc(p),e.direction));k(269,JSON.stringify(o.map(e=>e.origin.__key)))}function Mc(e){let t=function(e){let t=e;for(;tc(t);){let e=dc(t);if(!tc(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(P(t.origin))return $s(t)?t:oc(t.origin,n,n);let r=t.getAdjacentCaret();return ec(r)&&P(r.origin)?oc(r.origin,n,Ys(n)):t}function Nc(e){return $s(e)&&e.offset!==sc(e.origin,e.direction)}function Pc(e,t){return e.direction===t?e:e.getFlipped()}function Fc(e,t){return e.direction===t?e:gc(Pc(e.focus,t),Pc(e.anchor,t))}function Ic(e,t,n){let r=lc(e,`next`);for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(e===null)break;r=e}return Pc(r,n)}function Lc(e){let{origin:t,offset:n,direction:r}=e;if(n===sc(t,r))return e.getSiblingCaret();if(n===sc(t,Ys(r)))return Oc(e.getSiblingCaret());let[i]=t.splitText(n);return P(i)||k(281),Pc(ac(i,`next`),r)}function Rc(e,t){return!0}function zc(e,{$copyElementNode:t=ds,$splitTextPointCaretNext:n=Lc,rootMode:r=`shadowRoot`,$shouldSplit:i=Rc,removeEmptyDestination:a=!1}={}){if($s(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(tc(e)){let e=Oc(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}return o}function Bc(e){return e}function Vc(e){return e}function Hc(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function Uc(...e){let t=[];for(let n of e)if(n&&typeof n==`string`)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function Wc(e,...t){let n=Uc(...t);n.length>0&&e.classList.add(...n)}function Gc(e,...t){let n=Uc(...t);n.length>0&&e.classList.remove(...n)}function Kc(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}var qc=A?l.useLayoutEffect:l.useEffect,Jc={tag:Yr};function Yc({initialConfig:e,children:t}){let n=(0,l.useMemo)(()=>{let{theme:t,namespace:n,nodes:r,onError:i,editorState:a,html:o}=e,s=ie(null,t),c=Qa({editable:e.editable,html:o,namespace:n,nodes:r,onError:e=>i(e,c),theme:t});return function(e,t){if(t!==null){if(t===void 0)e.update(()=>{let t=No();if(t.isEmpty()){let n=B();t.append(n);let r=A?document.activeElement:null;(I()!==null||r!==null&&r===e.getRootElement())&&n.select()}},Jc);else if(t!==null)switch(typeof t){case`string`:{let n=e.parseEditorState(t);e.setEditorState(n,Jc);break}case`object`:e.setEditorState(t,Jc);break;case`function`:e.update(()=>{No().isEmpty()&&t(e)},Jc)}}}(c,a),[c,s]},[]);return qc(()=>{let t=e.editable,[r]=n;r.setEditable(t===void 0||t)},[]),(0,u.jsx)(D.Provider,{value:n,children:t})}var Xc=A?l.useLayoutEffect:l.useEffect;function Zc(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function Qc(){return function(e){let[t]=O(),n=(0,l.useMemo)(()=>e(t),[t,e]),[r,i]=(0,l.useState)(()=>n.initialValueFn()),a=(0,l.useRef)(r);return Xc(()=>{let{initialValueFn:e,subscribe:t}=n,r=e();return a.current!==r&&(a.current=r,i(r)),t(e=>{a.current=e,i(e)})},[n,e]),r}(Zc)}function $c(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function el(e){let t=``;for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function tl(e){let t=Es().getElementByKey(e.getKey());if(t===null)return null;let n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function nl(e){return tl(za(e)?e:e.getParentOrThrow())}function rl(e){let t=nl(e);return t!==null&&t.direction===`rtl`}function il(e,t,n=`self`){let r=e.getStartEndPoints();if(t.isSelected(e)&&!go(t)&&r!==null){let[i,a]=r,o=e.isBackward(),s=i.getNode(),c=a.getNode(),l=t.is(s),u=t.is(c);if(l||u){let[r,i]=Li(e),a=s.is(c),l=t.is(o?c:s),u=t.is(o?s:c),d,f=0;a?(f=r>i?i:r,d=r>i?r:i):l?(f=o?i:r,d=void 0):u&&(f=0,d=o?r:i);let p=t.__text.slice(f,d);p!==t.__text&&(n===`clone`&&(t=Fs(t)),t.__text=p)}}return t}function al(e,t){(F(e)?e.isCollapsed():P(e)||R(e))||$c(280);let n=ti(F(e)?e.style:P(e)?e.getStyle():e.getTextStyle()),r=el(Object.entries(t).reduce((t,[r,i])=>(typeof i==`function`?t[r]=i(n[r],e):i===null?delete t[r]:t[r]=i,t),{...n}));F(e)||P(e)?e.setStyle(r):e.setTextStyle(r)}function ol(e,t){if(F(e)&&e.isCollapsed()){al(e,t);let n=e.anchor.getNode();R(n)&&n.isEmpty()&&al(n,t)}sl(e=>{al(e,t)});let n=e.getNodes();if(n.length>0){let e=new Set;for(let r of n){if(!R(r)||!r.canBeEmpty()||r.getChildrenSize()!==0)continue;let n=r.getKey();e.has(n)||(e.add(n),al(r,t))}}}function sl(e){let t=I();if(!t)return;let n=new Map,r=e=>n.get(e.getKey())||[0,e.getTextContentSize()];if(F(t))for(let e of Dc(t).getTextSlices())e&&n.set(e.caret.origin.getKey(),e.getSliceIndices());let i=t.getNodes();for(let t of i){if(!P(t)||!t.canHaveFormat())continue;let[n,i]=r(t);i!==n&&(go(t)||n===0&&i===t.getTextContentSize()?e(t):e(t.splitText(n,i)[n===0?0:1]))}F(t)&&t.anchor.type===`text`&&t.focus.type===`text`&&t.anchor.key===t.focus.key&&cl(t)}function cl(e){if(e.isBackward()){let{anchor:t,focus:n}=e,{key:r,offset:i,type:a}=t;t.set(n.key,n.offset,n.type),n.set(r,i,a)}}function ll(e){let t=ul(e);return t!==null&&t.writingMode===`vertical-rl`}function ul(e){let t=e.anchor.getNode();return R(t)?tl(t):nl(t)}function dl(e,t){let n=ll(e)?!t:t;pl(e)&&(n=!n);let r=Cc(e.focus,n?`previous`:`next`);if(Nc(r))return!1;for(let e of mc(r)){if(tc(e))return!e.origin.isInline();if(!R(e.origin)){if(z(e.origin))return!0;break}}return!1}function fl(e,t,n,r){e.modify(t?`extend`:`move`,n,r)}function pl(e){let t=ul(e);return t!==null&&t.direction===`rtl`}function ml(e,t,n){let r=pl(e),i;i=ll(e)||r?!n:n,fl(e,t,i,`character`)}function hl(e,t,n){let r=ti(e.getStyle());return r!==null&&r[t]||n}function gl(e,t,n=``){let r=null,i=e.getNodes(),a,o;if(F(e)){if(e.isCollapsed()&&e.style!==``){let n=ti(e.style);if(n!==null&&t in n)return n[t]}let{anchor:n,focus:r}=e,i=e.isBackward(),s=i?r.getNode():n.getNode(),c=i?n.getNode():r.getNode(),l=i?r.offset:n.offset,u=i?n.offset:r.offset;P(s)&&l===s.getTextContentSize()&&(a=s),u===0&&(o=c)}for(let e=0;e<i.length;e++){let s=i[e];if(P(s)&&!s.is(e===0?a:o)){let e=hl(s,t,n);if(r===null)r=e;else if(r!==e){r=``;break}}}return r===null?n:r}function _l(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function vl(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function yl(e){let t=Us(e,e=>R(e)&&!e.isInline());return R(t)||_l(4,e.__key),t}function bl(e,t,n){let r=Pc(t,`next`);$s(r)&&(r.offset===0?r=ac(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=ac(r.origin,`next`))),r.origin.is(e)&&(ec(r)||_l(342,e.getKey(),e.getType()),r=Oc(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=zc(e,n))r=e;return $s(r)&&_l(283),r.insert(e.isInline()?B().append(e):e),Pc(ac(e.getLatest(),`next`),t.direction)}function xl(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Sl(e){let t=I();if(!F(t))return!1;let n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){let i=r[t],a=i.getKey();if(n.has(a))continue;let o=Us(i,e=>R(e)&&!e.isInline());if(o===null)continue;let s=o.getKey();o.canIndent()&&!n.has(s)&&(n.add(s),e(o))}return n.size>0}var Cl=Symbol.for(`preact-signals`);function wl(){if(Ol>1)return void Ol--;let e,t=!1;for(function(){let e=Dl;for(Dl=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();Tl!==void 0;){let n=Tl;for(Tl=void 0,kl++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Fl(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(kl=0,Ol--,t)throw e}var W,Tl;function El(e){let t=W;W=void 0;try{return e()}finally{W=t}}var Dl,Ol=0,kl=0,Al=0,jl=0;function Ml(e){if(W===void 0)return;let t=e.n;return t===void 0||t.t!==W?(t={i:0,S:e,p:W.s,n:void 0,t:W,e:void 0,x:void 0,r:t},W.s!==void 0&&(W.s.n=t),W.s=t,e.n=t,32&W.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=W.s,t.n=void 0,W.s.n=t,W.s=t),t):void 0}function Nl(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function Pl(e,t){return new Nl(e,t)}function Fl(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Il(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ll(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function Rl(e,t){Nl.call(this,void 0),this.x=e,this.s=void 0,this.g=jl-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function zl(e){let t=e.m;if(e.m=void 0,typeof t==`function`){Ol++;let n=W;W=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Bl(e),t}finally{W=n,wl()}}}function Bl(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,zl(e)}function Vl(e){if(W!==this)throw Error(`Out-of-order effect`);Ll(this),W=e,this.f&=-2,8&this.f&&Bl(this),wl()}function Hl(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function Ul(e,t){let n=new Hl(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}Nl.prototype.brand=Cl,Nl.prototype.h=function(){return!0},Nl.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?El(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},Nl.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&El(()=>{var e;(e=this.Z)==null||e.call(this)}))}},Nl.prototype.subscribe=function(e){return Ul(()=>{let t=this.value,n=W;W=void 0;try{e(t)}finally{W=n}},{name:`sub`})},Nl.prototype.valueOf=function(){return this.value},Nl.prototype.toString=function(){return this.value+``},Nl.prototype.toJSON=function(){return this.value},Nl.prototype.peek=function(){let e=W;W=void 0;try{return this.value}finally{W=e}},Object.defineProperty(Nl.prototype,"value",{get(){let e=Ml(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(kl>100)throw Error(`Cycle detected`);(function(e){Ol!==0&&kl===0&&e.l!==Al&&(e.l=Al,Dl={S:e,v:e.v,i:e.i,o:Dl})})(this),this.v=e,this.i++,jl++,Ol++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{wl()}}}}),Rl.prototype=new Nl,Rl.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===jl))return!0;if(this.g=jl,this.f|=1,this.i>0&&!Fl(this))return this.f&=-2,!0;let e=W;try{Il(this),W=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return W=e,Ll(this),this.f&=-2,!0},Rl.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Nl.prototype.S.call(this,e)},Rl.prototype.U=function(e){if(this.t!==void 0&&(Nl.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Rl.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Rl.prototype,"value",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=Ml(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Hl.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},Hl.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,zl(this),Il(this),Ol++;let e=W;return W=this,Vl.bind(this,e)},Hl.prototype.N=function(){2&this.f||(this.f|=2,this.u=Tl,Tl=this)},Hl.prototype.d=function(){this.f|=8,1&this.f||Bl(this)},Hl.prototype.dispose=function(){this.d()};function Wl(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}it(`format`,{parse:e=>typeof e==`number`?e:0});function G(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Gl;try{Gl=`0.45.0+prod.esm`}catch{}var Kl=Gl??`0.45.0+source`;function ql(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)n[e]=ql(n[e],r[e]);return e}return t}var Jl=0,Yl=1,Xl=2,Zl=3,Ql=4,$l=5,eu=6,tu=7;function nu(e){return e.id===Jl}function ru(e){return e.id===Xl}function iu(e){return function(e){return e.id===Yl}(e)||G(305,String(e.id),String(Yl)),Object.assign(e,{id:Xl})}var au=new Set,ou=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:Jl}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Hc;for(let n of this.configs)e=t(e,n);return e}init(e){let t=this.state;ru(t)||G(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:Zl,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:Ql,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==Ql&&G(307,String(t.id),String($l)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:$l,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==$l&&G(308,String(n.id),String($l));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:eu})}(n),()=>{let e=this.state;e.id!==tu&&G(309,String(n.id),String(tu)),this.state=function(e){return Object.assign(e,{id:$l})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==eu&&G(310,String(t.id),String(eu)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:tu})}(t),n}getSignal(){return this._signal===void 0&&G(311),this._signal}getInitResult(){this.extension.init===void 0&&G(312,this.extension.name);let e=this.state;return function(e){return e.id>=Ql}(e)||G(313,String(e.id),String(Ql)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=Zl}(e)||G(314,String(e.id),String(Zl)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&G(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&G(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=tu}(e)||G(316,String(e.id),String(tu)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||au}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=$l})(e)||G(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},su={tag:Yr};function cu(){let e=No();e.isEmpty()&&e.append(B())}var lu=Bc({config:Vc({setOptions:su,updateOptions:su}),init:({$initialEditorState:e=cu})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){let i=r.getInitResult();if(!i.initialized){i.initialized=!0;let{$initialEditorState:r}=i;if(Ua(r))e.setEditorState(r,n);else if(typeof r==`function`)e.update(()=>{r(e)},t);else if(r&&(typeof r==`string`||typeof r==`object`)){let t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[Ra,hi,ii,Ei,Ka]}),uu=Symbol.for(`@lexical/extension/LexicalBuilder`);function du(){}function fu(e){throw e}function pu(e){return Array.isArray(e)?e:[e]}var mu=Kl,hu=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=mu,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[pu(lu)];for(let e of t)n.push(pu(e));return new e(n)}static maybeFromEditor(t){let n=t[uu];return n&&(n.PACKAGE_VERSION!==mu&&G(292,n.PACKAGE_VERSION,mu),n instanceof e||G(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&G(294),n}constructEditor(){let{$initialEditorState:e,onError:t,...n}=this.buildCreateEditorArgs(),r=Object.assign(Qa({...n,...t?{onError:e=>{t(e,r)}}:{}}),{[uu]:this});for(let e of this.sortedExtensionReps())e.build(r);return r}buildEditor(){let e=du;function t(){try{e()}finally{e=du}}let n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=Kc(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&G(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&G(296);let[t]=pu(e);typeof t.name!=`string`&&G(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&G(298,t.name),!n){n=new ou(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&G(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&G(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=pu(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(ru(i))return;let a=n.extension.name;var o;nu(i)||G(300,a,r||`[unknown]`),nu(o=i)||G(304,String(o.id),String(Jl)),i=Object.assign(o,{id:Yl}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=iu(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())nu(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&G(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(let n of t){let t=n.register(e,i);t&&r.push(t)}for(let n of t){let t=n.afterRegistration(e);t&&r.push(t)}return Kc(...r)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of Wl(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&G(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&ql(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=[...t]);let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=fu,e}};function gu(e,t){let n=hu.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function _u(e){return gu(Es(),e)}var vu=class e extends La{static getType(){return`horizontalrule`}static clone(t){return new e(t.__key)}static importJSON(e){return bu().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:yu,priority:0})}}exportDOM(){return{element:document.createElement(`hr`)}}createDOM(e){let t=document.createElement(`hr`);return Wc(t,e.theme.hr),t}getTextContent(){return`
|
|
14
|
+
`}isInline(){return!1}updateDOM(){return!1}};function yu(){return{node:bu()}}function bu(){return Hs(vu)}new Set([Zr,Xr]),Date.now;var xu=Bc({name:`@lexical/react/ReactProvider`});function Su(){return No().getTextContent()}function Cu(e,t=!0){if(e)return!1;let n=Su();return t&&(n=n.trim()),n===``}function wu(e){if(!Cu(e,!1))return!1;let t=No().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){let n=t[e];if(z(n))return!1;if(R(n)){if(!Ja(n)||n.__indent!==0)return!1;let t=n.getChildren(),r=t.length;for(let n=0;n<r;n++){let n=t[e];if(!P(n))return!1}}}return!0}function Tu(e){return()=>wu(e)}function Eu(e){let t=window.location.origin,n=n=>{if(n.origin!==t)return;let r=e.getRootElement();if(document.activeElement!==r)return;let i=n.data;if(typeof i==`string`){let t;try{t=JSON.parse(i)}catch{return}if(t&&t.protocol===`nuanria_messaging`&&t.type===`request`){let r=t.payload;if(r&&r.functionId===`makeChanges`){let t=r.args;if(t){let[r,i,a,o,s]=t;e.update(()=>{let e=I();if(F(e)){let t=e.anchor,c=t.getNode(),l=0,u=0;if(P(c)&&r>=0&&i>=0&&(l=r,u=r+i,e.setTextNodeRange(c,l,c,u)),l===u&&a===``||(e.insertRawText(a),c=t.getNode()),P(c)){l=o,u=o+s;let t=c.getTextContentSize();l=l>t?t:l,u=u>t?t:u,e.setTextNodeRange(c,l,c,u)}n.stopImmediatePropagation()}})}}}}};return window.addEventListener(`message`,n,!0),()=>{window.removeEventListener(`message`,n,!0)}}function Du(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Ou;function ku(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function Au(e){return Ou&&Ou.editor===e?Ou:void 0}function ju(e,t){let n=Au(t);return n&&n[e]}function Mu(e,t){if(`cfg`in t){let{cfg:n,updater:r}=t;return[n,r(ku(e,n))]}return t}function Nu(e,t){let n=t;for(let r of e){let[e,i]=Mu(n,r),a=e.key;if(n===t&&ku(n,e)===i)continue;let o=n===t||n===void 0?Pu(t):n;o[a]=i,n=o}return n}function Pu(e){return Object.create(e||null)}function Fu(e,t){return[e,t]}function Iu(e,t,n,r=Es()){let i=Ou,a=Au(r);try{return Ou={...a,editor:r,[e]:t},n()}finally{Ou=i}}function Lu(e,t=()=>{}){return(n,r=Es())=>i=>{let a=Au(r),o=a&&a[e],s=Nu(n,o||t(r));return s&&s!==o?Iu(e,s,i,r):i()}}function Ru(e,t,n,r){return Object.assign(it(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}function zu(e){if(!vo(e))return;let t=e;if(t.querySelector(`style`)===null)return;let n=new Map;function r(e){let t=n.get(e);if(t===void 0){t=new Set;for(let n=0;n<e.style.length;n++)t.add(e.style[n]);n.set(e,t)}return t}try{for(let e of Array.from(t.styleSheets)){let n;try{n=e.cssRules}catch{continue}for(let e of Array.from(n)){if(!xl(e,CSSStyleRule))continue;let n;try{n=t.querySelectorAll(e.selectorText)}catch{continue}for(let t of Array.from(n)){if(!U(t))continue;let n=r(t);for(let r=0;r<e.style.length;r++){let i=e.style[r];n.has(i)||t.style.setProperty(i,e.style.getPropertyValue(i),e.style.getPropertyPriority(i))}}}}}catch{}}var Bu=`@lexical/html/DOM`,Vu=Symbol.for(`@lexical/html/DOMExportContext`),Hu=`@lexical/html/DOMImport`,Uu=Symbol.for(`@lexical/html/DOMImportContext`);function Wu(e,t,n){return Ru(Vu,e,t,n)}Wu(`root`,Boolean);var Gu=Wu(`isExport`,Boolean);function Ku(e){let t=gu(e,Bu);return t?t.output.defaults:void 0}function qu(e){let t=gu(e,Bu);return t?t.output.runtime:void 0}function Ju(e=Es()){let t=qu(e);return t?t.getSessionConfig():Ds(e)}var Yu=Lu(Vu,Ku);new Map([[Ra,()=>{let e=document.createElement(`div`);return e.role=`textbox`,{element:e}}]]);var Xu=Symbol.for(`@lexical/html/SelectorImpl`);function Zu(e,t){let n={kind:`element`,predicate:(r=t,r.length===0?U:r.length===1?r[0]:(e,t)=>{for(let n of r)if(!n(e,t))return!1;return!0}),tags:e};var r;let i=n=>Zu(e,[...t,n]);return{[Xu]:n,attr:(e,t,n)=>i(ed(e,t,n)),classAll:(...e)=>i($u(e)),classAny:(...e)=>i(function(e){let t=Qu(e);return t.length===0?()=>!1:e=>{if(!U(e))return!1;let n=e.classList;for(let e of t)if(n.contains(e))return!0;return!1}}(e)),styleAny:(e,t,n)=>i(function(e,t,n){if(typeof t==`string`)return n=>U(n)&&n.style.getPropertyValue(e)===t;if(t instanceof RegExp){let r=n&&n.capture,i=t;return(t,n)=>{if(!U(t))return!1;let a=t.style.getPropertyValue(e);if(!a)return!1;let o=a.match(i);return o!==null&&(r!==void 0&&(n[r]=o),!0)}}Du(362,JSON.stringify(e))}(e,t,n))}}function Qu(e){let t=[];for(let n of e)n&&t.push(n);return t}function $u(e){let t=Qu(e);return t.length===0?()=>!0:e=>{if(!U(e))return!1;let n=e.classList;for(let e of t)if(!n.contains(e))return!1;return!0}}function ed(e,t,n){if(!0===t)return t=>U(t)&&t.hasAttribute(e);if(typeof t==`string`)return n=>U(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){let r=n&&n.capture,i=t;return(t,n)=>{if(!U(t))return!1;let a=t.getAttribute(e);if(a==null)return!1;let o=a.match(i);return o!==null&&(r!==void 0&&(n[r]=o),!0)}}Du(361,JSON.stringify(e))}var td={kind:`text`,predicate:_o,tags:new Set},nd={[Xu]:td},rd={kind:`comment`,predicate:e=>e.nodeType===8,tags:new Set},id={[Xu]:rd},ad={any:()=>Zu(new Set,[]),comment:()=>id,tag(...e){e.length>0||Du(363);let t=new Set;for(let n of e)t.add(n.toUpperCase());return Zu(t,[])},text:()=>nd},od=/[A-Za-z0-9_-]/,sd=class{constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||``}consume(){return this.source[this.pos++]||``}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){let e=this.pos;for(;!this.eof()&&od.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){let e=this.consume();this.assert(e===`"`||e===`'`,`expected quote`);let t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()===`\\`?this.pos+=2:this.pos++;this.assert(!this.eof(),`unterminated string`);let n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\(.)/g,`$1`)}assert(e,t){e||Du(364,String(this.pos+1),t,this.source)}};function cd(e){let t=new Set,n=[],r=[];if(e.skipWhitespace(),e.peek()===`*`)e.consume();else if(od.test(e.peek())){let n=e.readIdent();n&&t.add(n.toUpperCase())}for(;!e.eof();){let t=e.peek();if(t===`.`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected class name after "."`),r.push(t)}else if(t===`#`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected id after "#"`),n.push(ed(`id`,t))}else{if(t!==`[`)break;{e.consume(),e.skipWhitespace();let t=e.readIdent();e.assert(t!==``,`expected attribute name after "["`),e.skipWhitespace();let r=!0;if(e.peek()===`=`){e.consume(),e.skipWhitespace();let t=e.peek();t===`"`||t===`'`?r=e.readQuoted():(r=e.readIdent(),e.assert(r!==``,`expected attribute value`)),e.skipWhitespace()}e.assert(e.peek()===`]`,`expected "]"`),e.consume(),n.push(ed(t,r))}}}return r.length>0&&n.push($u(r)),{predicates:n,tags:t}}function ld(e){let t=new sd(e,0),n=[];for(;;){let e=cd(t);if(n.push(e),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===`,`,`expected "," (selector lists are the only supported combinator)`),t.consume(),t.skipWhitespace()}if(n.length===1)return Zu(n[0].tags,n[0].predicates);let r=new Set;for(let e of n)for(let t of e.tags)r.add(t);return Zu(r,[(e,t)=>{for(let r of n){let n=e.nodeName;if(r.tags.size>0&&!r.tags.has(n))continue;let i=!0;for(let n of r.predicates)if(!n(e,t)){i=!1;break}if(i)return!0}return!1}])}function ud(e,t,n){return Ru(Uu,e,t,n)}ud(`importSource`,()=>`unknown`),ud(`importSourceDataTransfer`,()=>null),ud(`textFormat`,()=>0),ud(`textStyle`,()=>({}));function dd(e){if(!U(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function fd(e){if(_o(e))return!0;if(!U(e))return!1;let t=e.style.display;return t?t.startsWith(`inline`):!ws(e)&&Ss(e)}ud(`whitespaceConfig`,()=>({isInline:fd,preservesWhitespace:dd})),ud(`importOverlays`,()=>[]);function pd(e){let t=gu(e,Hu);return t?t.output.defaults:void 0}function md(e,t=Es()){return ku(function(e){return ju(Uu,e)||pd(e)}(t),e)}var hd=Lu(Uu,pd),gd=ad;new Set([`center`,`end`,`justify`,`left`,`right`,`start`]),new Set([`font-weight`,`font-style`,`text-decoration`,`vertical-align`]),gd.tag(`b`,`strong`,`em`,`i`,`code`,`mark`,`s`,`sub`,`sup`,`u`,`span`),gd.text(),gd.tag(`script`,`style`),gd.tag(`br`),gd.tag(`p`);function _d(e,t){return _o(t)?e.textIndices:t.nodeType===8?e.commentIndices:U(t)?e.byTag.get(t.nodeName)||e.wildcardIndices:vd}var vd=Object.freeze([]),yd=Object.freeze({});function bd(e,t){return{$importChildren:(t,n)=>function(e,t,n){let r=n&&n.rules?n.rules.dispatch:void 0;r&&e.overlays.push(r);try{let r=()=>xd(e,t,n);return n&&n.context?hd(n.context,e.editor)(r):r()}finally{r&&e.overlays.pop()}}(e,t,n),$importOne:(t,n)=>Sd(e,t,n),captures:t,get:t=>md(t,e.editor),session:e.session}}function xd(e,t,n){let r=n&&n.$onChild,i=[];for(let n of Array.from(t.childNodes)){let t=Sd(e,n,void 0);for(let e of t){let t=r?r(e):e;t!=null&&i.push(t)}}let a=n&&n.$after?n.$after(i):i,o=n&&n.schema;return o?function(e,t,n,r){let i=[],a=null,o=()=>{if(a===null)return;let t=a;if(a=null,e.$packageRun){let a=e.$packageRun(t,n,r);if(a.length>0){for(let e of a)i.push(e);return}}if(e.onReject===`hoist`)for(let e of t)i.push(e)};for(let r of t)e.$accepts(r,n)?(o(),i.push(r)):(a===null&&(a=[]),a.push(r));return o(),e.$finalize?e.$finalize(i,n):i}(o,a,null,t):a}function Sd(e,t,n){let r=()=>function(e,t){let n=function(e,t){let n=[];for(let r=e.overlays.length-1;r>=0;r--){let i=e.overlays[r],a=_d(i,t);a.length>0&&n.push({dispatch:i,indices:a})}let r=_d(e.dispatch,t);return r.length>0&&n.push({dispatch:e.dispatch,indices:r}),n}(e,t);if(n.length===0)return Cd(e,t);let r=0,i=0,a=()=>{for(;r<n.length;){let{dispatch:o,indices:s}=n[r];for(;i<s.length;){let n=s[i++],r=o.rules[n],c={};if(r.predicate(t,c)){let n=bd(e,Object.keys(c).length===0?yd:c);try{return r.$import(n,t,a)}catch(e){throw e}}}r++,i=0}return Cd(e,t)};return a()}(e,t);return n&&n.context?hd(n.context,e.editor)(r):r()}function Cd(e,t){if(t.childNodes.length===0)return[];let n=[];for(let r of Array.from(t.childNodes)){let t=Sd(e,r,void 0);for(let e of t)n.push(e)}return n}ad.any(),ad.tag(`hr`);var wd={any:ad.any,comment:ad.comment,css:ld,tag:ad.tag,text:ad.text},Td=new Set([`STYLE`,`SCRIPT`]);function Ed(e,t){zu(t);let n=vo(t)?t.body.childNodes:t.childNodes,r=[],i=[];for(let t of n)if(!Td.has(t.nodeName)){let n=Ad(t,e,i,!1);if(n!==null)for(let e of n)r.push(e)}return function(e){for(let t of e)t.getParent()&&t.getNextSibling()instanceof Ga&&t.insertAfter(oi());for(let t of e){let e=t.getParent();e&&e.splice(t.getIndexWithinParent(),1,t.getChildren())}}(i),r}function Dd(e,t=null,n=Es()){return Yu([Fu(Gu,!0)],n)(()=>{let r=No(),i=Ju(n),a=e.append.bind(e);for(let e of r.getChildren())kd(n,e,a,t,i);return e})}function Od(e,t=null){return(typeof document>`u`||typeof window>`u`&&global.window===void 0)&&Du(338),Dd(document.createElement(`div`),t,e).innerHTML}function kd(e,t,n,r=null,i=Ds(e)){let a=i.$shouldInclude(t,r,e),o=i.$shouldExclude(t,r,e),s=t;r!==null&&P(t)&&(s=il(r,t,`clone`));let{element:c,after:l,append:u,$getChildNodes:d}=i.$exportDOM(s,e);if(!c)return!1;let f=document.createDocumentFragment(),p=d?d():R(s)?s.getChildren():[],m=f.append.bind(f);for(let n of p){let o=kd(e,n,m,r,i);!a&&o&&i.$extractWithChild(t,n,r,`html`,e)&&(a=!0)}if(a&&!o){if((U(c)||bs(c))&&(u?u(f):c.append(f)),n(c),l){let e=l.call(s,c);e&&(bs(c)?c.replaceChildren(e):c.replaceWith(e))}}else n(f);return a}function Ad(e,t,n,r,i=new Map,a){let o=[];if(Td.has(e.nodeName))return o;let s=null,c=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(r!==void 0)for(let t of r){let n=t(e);n!==null&&(i===null||(i.priority||0)<=(n.priority||0))&&(i=n)}return i===null?null:i.conversion}(e,t),l=c?c(e):null,u=null;if(l!==null){u=l.after;let t=l.node;if(s=Array.isArray(t)?t[t.length-1]:t,s!==null){for(let[,e]of i)if(s=e(s,a),!s)break;s&&o.push(...Array.isArray(t)?t:[s])}l.forChild!=null&&i.set(e.nodeName,l.forChild)}let d=e.childNodes,f=[],p=(s==null||!us(s))&&(s!=null&&Gi(s)||r);for(let e=0;e<d.length;e++)f.push(...Ad(d[e],t,n,p,new Map(i),s));if(u!=null&&(f=u(f)),ws(e)&&(f=jd(e,f,p?()=>{let e=new Ga;return n.push(e),e}:B)),s==null)if(f.length>0)for(let e of f)o.push(e);else ws(e)&&function(e){return e.nextSibling==null||e.previousSibling==null?!1:Ss(e.nextSibling)&&Ss(e.previousSibling)}(e)&&o.push(oi());else R(s)&&s.append(...f);return o}function jd(e,t,n){let r=e.style.textAlign,i=[],a=[];for(let e=0;e<t.length;e++){let o=t[e];if(Gi(o))r&&!o.getFormat()&&o.setFormat(r),i.push(o);else if(a.push(o),e===t.length-1||e<t.length-1&&Gi(t[e+1])){let e=n();e.setFormat(r),e.append(...a),i.push(e),a=[]}}return i}function Md(e,t){if(document.caretRangeFromPoint!==void 0){let n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!==`undefined`){let n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}function Nd(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Pd={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Fd(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy(`lexical`,{createHTML:e=>e}).createHTML(e):e}var Id=(e,t)=>{if(!F(t))return t.insertRawText(e),!0;let n=e=>{let t=I();F(t)&&e(t)};return aa(e,{linebreak:()=>n(e=>e.insertParagraph()),tab:()=>n(e=>e.insertNodes([Di()])),text:e=>n(t=>t.insertText(e))}),!0},Ld={"application/x-lexical-editor":[(e,t,n)=>{try{let n=Es(),r=JSON.parse(e);if(r&&r.namespace===n._config.namespace&&Array.isArray(r.nodes))return Yd(n,Qd(r.nodes),t),!0}catch(e){console.error(e)}return n()}],"text/html":[(e,t,n)=>{try{let n=Es();return Yd(n,Ed(n,new DOMParser().parseFromString(Fd(e),`text/html`)),t),!0}catch(e){return console.error(e),n()}}],"text/plain":[Id],"text/uri-list":[Id]};function Rd(e,t,n,r){if(!e)return!1;let i=a=>!!e[a]&&e[a](t,n,i.bind(null,a-1),r);return i(e.length-1)}function zd(e,t,n){let r=t.getData(`text/plain`);for(let i of function(e){return Object.keys(e.$importMimeType).filter(t=>e.$importMimeType[t]!==void 0).sort((t,n)=>{let r=e.priority[t],i=e.priority[n];return r===void 0&&i===void 0?t<n?-1:+(t>n):r===void 0?1:i===void 0?-1:r-i})}(e)){let a=t.getData(i);if(a&&(i!==`text/html`||a!==r)&&Rd(e.$importMimeType[i],a,n,t))return!0}return!1}var Bd={$importMimeType:Ld,$insertDataTransfer:(e,t)=>zd({$importMimeType:Ld,priority:Pd},e,t),priority:Pd},Vd=Bc({build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(e,n)=>zd(t,e,n),priority:t.priority}),config:Vc({$importMimeType:Ld,priority:Pd}),mergeConfig(e,t){let n=Hc(e,t);if(t.$importMimeType){let r={...e.$importMimeType};for(let[e,n]of Object.entries(t.$importMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$importMimeType=r}return t.priority&&(n.priority={...e.priority,...t.priority}),n},name:`@lexical/clipboard/Import`});function Hd(e,t=I()){return t??Nd(166),F(t)&&t.isCollapsed()||t.getNodes().length===0?``:Od(e,t)}function Ud(e,t=I()){return t??Nd(166),F(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(Zd(e,t))}function Wd(e,t,n){(function(){let e=_u(Vd.name);return e?e.output:Bd})().$insertDataTransfer(e,t)}var Gd=`application/x-lexical-drag`;function Kd(e,t){let n={editorKey:t.getKey()};e.setData(Gd,JSON.stringify(n))}function qd(e,t,n){let r=e.dataTransfer;if(r===null)return!1;let i=function(e){let t=e.getData(Gd);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}return(r=n)!==null&&typeof r==`object`&&`editorKey`in r&&typeof r.editorKey==`string`?n:null;var r}(r);if(i===null)return!1;let a=function(e){let t=Md(e.clientX,e.clientY);if(t===null)return null;let n=Ao(t.node);if(n===null)return null;if(P(n))return oc(n,`next`,t.offset);if(R(n))return Ic(n,t.offset,`next`);let r=n.getParent();return r===null?null:Ic(r,n.getIndexWithinParent()+1,`next`)}(e);if(a===null)return!1;let o=zc(a);if(o===null)return!1;let s=i.editorKey===t.getKey(),c=I();if(s){if(!F(c)||c.isCollapsed())return!1;if(function(e,t){let{anchor:n,focus:r}=Fc(Dc(t),`next`);return vc(n,e)<0&&vc(e,r)<0}(a,c))return e.preventDefault(),!0;c.removeText()}if(!o.origin.isAttached())return e.preventDefault(),!0;if(n(r,Tc(hc(o)),t),!s){let e=t.getRootElement(),n=e?e.ownerDocument:null,r=n?function(e,t){let n=t.querySelectorAll(`[data-lexical-editor="true"]`);for(let t of Array.from(n)){let n=t.__lexicalEditor;if(n&&n.getKey()===e)return t}return null}(i.editorKey,n):null;r!==null&&r.dispatchEvent(new InputEvent(`beforeinput`,{bubbles:!0,cancelable:!0,inputType:`deleteByDrag`}))}return e.preventDefault(),!0}function Jd(e,t){return qd(e,t,Wd)}function Yd(e,t,n){e.dispatchCommand(ln,{nodes:t,selection:n})||(n.insertNodes(t),function(e){if(F(e)&&e.isCollapsed()){let t=e.anchor,n=null,r=Cc(t,`previous`);if(r)if($s(r))n=r.origin;else{let e=gc(r,lc(No(),`next`).getFlipped());for(let t of e){if(P(t.origin)){n=t.origin;break}if(R(t.origin)&&!t.origin.isInline())break}}if(n&&P(n)){let t=n.getFormat(),r=n.getStyle();e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}}}(n))}function Xd(e,t,n,r=[]){let i=t===null||n.isSelected(t),a=R(n)&&n.excludeFromCopy(`html`),o=n;t!==null&&P(o)&&(o=il(t,o,`clone`));let s=R(o)?o.getChildren():[],c=function(e){let t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&Nd(58,n.name),R(e)){let e=t.children;Array.isArray(e)||Nd(59,n.name)}return t}(o);P(o)&&o.getTextContentSize()===0&&(i=!1);for(let r=0;r<s.length;r++){let a=s[r],o=Xd(e,t,a,c.children);!i&&R(n)&&o&&n.extractWithChild(a,t,`clone`)&&(i=!0)}if(i&&!a)r.push(c);else if(Array.isArray(c.children))for(let e=0;e<c.children.length;e++){let t=c.children[e];r.push(t)}return i}function Zd(e,t){let n=[],r=No().getChildren();for(let i=0;i<r.length;i++)Xd(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function Qd(e){let t=[];for(let n of e)t.push(Ta(n));return t}var $d=null;async function ef(e,t,n){if($d!==null)return!1;if(t!==null)return new Promise((r,i)=>{e.update(()=>{r(tf(e,t,n))})});let r=e.getRootElement(),i=e._window||window,a=i.document,o=_s(i);if(r===null||o===null)return!1;let s=a.createElement(`span`);s.style.position=`fixed`,s.style.top=`-1000px`,s.append(a.createTextNode(`#`)),r.append(s);let c=new Range;return c.setStart(s,0),c.setEnd(s,1),o.removeAllRanges(),o.addRange(c),new Promise((t,r)=>{let o=e.registerCommand(qn,r=>(xl(r,ClipboardEvent)&&(o(),$d!==null&&(i.clearTimeout($d),$d=null),t(tf(e,r,n))),!0),4);$d=i.setTimeout(()=>{o(),$d=null,t(!1)},50),a.execCommand(`copy`),s.remove()})}function tf(e,t,n){if(n===void 0){let t=_s(e._window),r=I();if(!r||r.isCollapsed()||!t)return!1;let i=t.anchorNode,a=t.focusNode;if(i!==null&&a!==null&&!uo(e,i,a))return!1;n=rf(r)}t.preventDefault();let r=t.clipboardData;return r!==null&&(af(r,n),!0)}var nf=[[`text/html`,Hd],[`application/x-lexical-editor`,Ud]];function rf(e=I()){return function(e,t){let n={"text/plain":``};for(let[r,i]of Object.entries(e))if(i){let e=cf(i,t);e!==null&&(n[r]=e)}return n}(of(),e)}function af(e,t){for(let[n]of nf)t[n]===void 0&&e.setData(n,``);for(let n in t){let r=t[n];r!==void 0&&e.setData(n,r)}}function of(e=Es()){let t=gu(e,lf.name);return t?t.output:sf}var sf={"application/x-lexical-editor":[(e,t)=>e?Ud(Es(),e):t()],"text/html":[(e,t)=>e?Hd(Es(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function cf(e,t){let n=r=>e[r]?e[r](t,n.bind(null,r-1)):null;return n(e.length-1)}var lf=Bc({build:(e,t,n)=>t.$exportMimeType,config:Vc({$exportMimeType:sf}),mergeConfig(e,t){let n=Hc(e,t);if(t.$exportMimeType){let r={...e.$exportMimeType};for(let[e,n]of Object.entries(t.$exportMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$exportMimeType=r}return n},name:`@lexical/clipboard/GetClipboardData`});wd.tag(`h1`,`h2`,`h3`,`h4`,`h5`,`h6`),wd.tag(`blockquote`),wd.tag(`p`),wd.tag(`span`);var uf=N(`DRAG_DROP_PASTE_FILE`),df=class e extends Fa{static getType(){return`quote`}static clone(t){return new e(t.__key)}createDOM(e){let t=document.createElement(`blockquote`);return Wc(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:gf,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(U(t)){this.isEmpty()&&t.append(document.createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return ff().updateFromJSON(e)}insertNewAfter(e,t){let n=B(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){let e=B();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function ff(){return fs(new df)}var pf=class e extends Fa{__tag;static getType(){return`heading`}static clone(t){return new e(t.__tag,t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__tag=e.__tag}constructor(e=`h1`,t){super(t),this.__tag=e}getTag(){return this.getLatest().__tag}setTag(e){let t=this.getWritable();return t.__tag=e,t}createDOM(e){let t=this.__tag,n=document.createElement(t),r=e.theme.heading;if(r!==void 0){let e=r[t];Wc(n,e)}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:hf,priority:0}),h2:e=>({conversion:hf,priority:0}),h3:e=>({conversion:hf,priority:0}),h4:e=>({conversion:hf,priority:0}),h5:e=>({conversion:hf,priority:0}),h6:e=>({conversion:hf,priority:0}),p:e=>{let t=e.firstChild;return t!==null&&mf(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>mf(e)?{conversion:e=>({node:_f(`h1`)}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if(U(t)){this.isEmpty()&&t.append(document.createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return _f(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let n=e?e.anchor.offset:0,r=this.getLastDescendant(),i=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?B():_f(this.getTag()),a=this.getDirection();if(i.setDirection(a),this.insertAfter(i,t),n===0&&!this.isEmpty()&&e){let e=B();e.select(),this.replace(e,!0)}return i}collapseAtStart(){if(this.isEmpty()){let e=B();this.getChildren().forEach(t=>e.append(t)),this.replace(e)}return!0}extractWithChild(){return!0}};function mf(e){return e.nodeName.toLowerCase()===`span`&&e.style.fontSize===`26pt`}function hf(e){let t=e.nodeName.toLowerCase(),n=null;return t!==`h1`&&t!==`h2`&&t!==`h3`&&t!==`h4`&&t!==`h5`&&t!==`h6`||(n=_f(t),Is(e,n),Rs(n,e),Ls(n,e)),{node:n}}function gf(e){let t=ff();return Rs(t,e),Is(e,t),Ls(t,e),{node:t}}function _f(e=`h1`){return fs(new pf(e))}function vf(e){let t=null;if(xl(e,DragEvent)?t=e.dataTransfer:xl(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];let n=t.types,r=n.includes(`Files`),i=n.includes(`text/html`)||n.includes(`text/plain`);return[r,Array.from(t.files),i]}function yf(e){return z(Ao(e))}function bf(e,t,n,r){let i=!1,a=null;if(e.isCollapsed()&&e.anchor.type===`text`){let t=e.anchor.getNode();if(P(t)){a=t;let r=e.anchor.offset,o=r===t.getTextContentSize()&&t.getNextSibling()===null,s=r===0&&t.getPreviousSibling()===null;i=n===`end`&&o||n===`start`&&s||n===`both`&&(o||s)}}let o=!1;for(let[n,s]of Object.entries(r)){if(s==null||!s[t])continue;let r=n;if(s.onlyAtBoundary){if(!(i&&a&&P(a)&&a.hasFormat(r)))continue;o=!0}e.hasFormat(r)&&e.toggleFormat(r)}o&&e.setStyle(``)}var xf={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function Sf(e,t=Pl(xf)){return Kc(e.registerCommand(un,()=>{let e=I();return Fi(e)?(e.clear(),!0):(F(e)&&bf(e,`click`,`both`,t.peek()),!1)},0),e.registerCommand(hn,e=>{let t=I();return F(t)?(t.deleteCharacter(e),!0):!!Fi(t)&&(t.deleteNodes(),!0)},0),e.registerCommand(xn,e=>{let t=I();return!!F(t)&&(t.deleteWord(e),!0)},0),e.registerCommand(Sn,e=>{let t=I();return!!F(t)&&(t.deleteLine(e),!0)},0),e.registerCommand(vn,t=>{let n=I();if(typeof t==`string`)n!==null&&n.insertText(t);else{if(n===null)return!1;let r=t.dataTransfer;if(r!=null)Wd(r,n,e);else if(F(n)){let e=t.data;return e&&n.insertText(e),!0}}return!0},0),e.registerCommand(bn,()=>{let e=I();return!!F(e)&&(e.removeText(),!0)},0),e.registerCommand(Cn,e=>{let t=I();return!!F(t)&&(t.formatText(e),!0)},0),e.registerCommand(Un,e=>{let t=I();if(!F(t)&&!Fi(t))return!1;let n=t.getNodes();for(let t of n){let n=Us(t,e=>R(e)&&!e.isInline());n!==null&&n.setFormat(e)}return!0},0),e.registerCommand(gn,e=>{let t=I();return!!F(t)&&(t.insertLineBreak(e),!0)},0),e.registerCommand(_n,()=>{let e=I();return!!F(e)&&(e.insertParagraph(),!0)},0),e.registerCommand(zn,()=>{let e=Di(),t=I();return F(t)&&(e.setFormat(t.format),e.setStyle(t.style)),ia([e]),!0},0),e.registerCommand(Bn,()=>Sl(e=>{let t=e.getIndent();e.setIndent(t+1)}),0),e.registerCommand(Vn,()=>Sl(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),0),e.registerCommand(jn,e=>{let t=I();if(Fi(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectPrevious(),!0}else if(F(t)){let n=$o(t.focus,!0);if(!e.shiftKey&&z(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1},0),e.registerCommand(Mn,e=>{let t=I();if(Fi(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectNext(0,0),!0}else if(F(t)){if(function(e){let t=e.focus;return t.key===`root`&&t.offset===No().getChildrenSize()}(t))return e.preventDefault(),!0;let n=$o(t.focus,!1);if(!e.shiftKey&&z(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),e.preventDefault(),!0}return!1},0),e.registerCommand(kn,e=>{let n=I();if(Fi(n)){let t=n.getNodes();if(t.length>0)return e.preventDefault(),rl(t[0])?t[0].selectNext(0,0):t[0].selectPrevious(),!0}if(!F(n))return!1;if(e.shiftKey||bf(n,`arrow`,`start`,t.peek()),dl(n,!0)){let t=e.shiftKey;return e.preventDefault(),ml(n,t,!0),!0}return!1},0),e.registerCommand(Dn,e=>{let n=I();if(Fi(n)){let t=n.getNodes();if(t.length>0)return e.preventDefault(),rl(t[0])?t[0].selectPrevious():t[0].selectNext(0,0),!0}if(!F(n))return!1;if(e.shiftKey||bf(n,`arrow`,`end`,t.peek()),dl(n,!1)){let t=e.shiftKey;return e.preventDefault(),ml(n,t,!1),!0}return!1},0),e.registerCommand(Fn,t=>{if(yf(t.target))return!1;let n=I();if(F(n)){if(function(e){if(!e.isCollapsed())return!1;let{anchor:t}=e;if(t.offset!==0)return!1;let n=t.getNode();if(za(n))return!1;let r=yl(n);return r.getIndent()>0&&(r.is(n)||n.is(r.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(Vn,void 0);if(ue&&navigator.language===`ko-KR`)return!1}else if(!Fi(n))return!1;return t.preventDefault(),e.dispatchCommand(hn,!0)},0),e.registerCommand(Ln,t=>{if(yf(t.target))return!1;let n=I();return!(!F(n)&&!Fi(n))&&(t.preventDefault(),e.dispatchCommand(hn,!1))},0),e.registerCommand(Nn,n=>{let r=I();if(Fi(r)){let e=r.getNodes();e.length===1&&z(e[0])&&!e[0].isInline()&&(r=e[0].selectNext())}if(!F(r))return!1;if(bf(r,`enter`,`both`,t.peek()),n!==null){if((ue||fe||he)&&le)return!1;if(n.preventDefault(),n.shiftKey)return e.dispatchCommand(gn,!1)}return e.dispatchCommand(_n,void 0)},0),e.registerCommand(In,()=>!!F(I())&&(e.blur(),!0),0),e.registerCommand(Hn,t=>{let[,n]=vf(t);if(n.length>0){let r=t.clientX,i=t.clientY,a=Md(r,i);if(a!==null){let{offset:t,node:r}=a,i=Ao(r);if(i!==null){let e=qi();if(P(i))e.anchor.set(i.getKey(),t,`text`),e.focus.set(i.getKey(),t,`text`);else{let t=i.getParentOrThrow().getKey(),n=i.getIndexWithinParent()+1;e.anchor.set(t,n,`element`),e.focus.set(t,n,`element`)}Fo(_t(e))}e.dispatchCommand(uf,n)}return t.preventDefault(),!0}return Jd(t,e)},0),e.registerCommand(Wn,t=>{let[n]=vf(t),r=I();return!(n&&!F(r))&&(F(r)&&!r.isCollapsed()&&t.dataTransfer!==null&&(af(t.dataTransfer,rf(r)),Kd(t.dataTransfer,e)),!0)},0),e.registerCommand(Gn,e=>{let[t]=vf(e),n=I();if(t&&!F(n))return!1;let r=e.clientX,i=e.clientY,a=Md(r,i);return a!==null&&z(Ao(a.node))&&e.preventDefault(),!0},0),e.registerCommand(Yn,()=>(Yo(),!0),0),e.registerCommand(qn,t=>(ef(e,xl(t,ClipboardEvent)?t:null),!0),0),e.registerCommand(Jn,t=>(async function(e,t){await ef(t,xl(e,ClipboardEvent)?e:null),t.update(()=>{let e=I();F(e)?e.removeText():Fi(e)&&e.getNodes().forEach(e=>e.remove())})}(t,e),!0),0),e.registerCommand(yn,t=>{let[,n,r]=vf(t);return n.length>0&&!r?(e.dispatchCommand(uf,n),!0):ys(t.target)&&lo(t.target)?!1:I()!==null&&(function(e,t){e.preventDefault(),t.update(()=>{let n=I(),r=xl(e,InputEvent)||xl(e,KeyboardEvent)?null:e.clipboardData;r!=null&&n!==null&&Wd(r,n,t)},{tag:`paste`})}(t,e),!0)},0),e.registerCommand(Pn,()=>{let e=I();return F(e)&&bf(e,`space`,`both`,t.peek()),!1},0),e.registerCommand(Rn,()=>{let e=I();return F(e)&&bf(e,`tab`,`both`,t.peek()),!1},0),e.registerCommand(On,e=>{let t=I();if(!F(t))return!1;let{anchor:n}=t;if(n.type!==`element`||n.offset!==0)return!1;let r=n.getNode();if(!R(r))return!1;let i=r.getFirstChild();if(!z(i)||!i.isInline())return!1;let a=r.getLastDescendant();if(a==null||z(a))return!1;let o=r.getKey(),s=r.selectEnd();return e.shiftKey&&s.anchor.set(o,0,`element`),e.preventDefault(),e.stopPropagation(),!0},0),e.registerCommand(An,e=>{let t=I();if(!F(t))return!1;let{anchor:n,focus:r}=t,i=Us(r.getNode(),e=>R(e)&&!e.isInline());if(i===null)return!1;let a=i.getFirstChild();if(!z(a)||!a.isInline())return!1;let o=i.getLastDescendant();if(o==null||z(o)||Us(n.getNode(),e=>R(e)&&!e.isInline())!==i)return!1;let s=i.getKey();return(r.type!==`element`||r.key!==s||r.offset!==0)&&(t.focus.set(s,0,`element`),e.shiftKey||t.anchor.set(s,0,`element`),e.preventDefault(),e.stopPropagation(),!0)},0))}function Cf(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var wf=A?l.useLayoutEffect:l.useEffect;function Tf({editor:e,ErrorBoundary:t}){return function(e,t){let[n,r]=(0,l.useState)(()=>e.getDecorators());return wf(()=>e.registerDecoratorListener(e=>{(0,d.flushSync)(()=>{r(e)})}),[e]),(0,l.useEffect)(()=>{r(e.getDecorators())},[e]),(0,l.useMemo)(()=>{let r=[],i=Object.keys(n);for(let a=0;a<i.length;a++){let o=i[a],s=(0,u.jsx)(t,{onError:t=>e._onError(t),children:(0,u.jsx)(l.Suspense,{fallback:null,children:n[o]})}),c=e.getElementByKey(o);c!==null&&r.push((0,d.createPortal)(s,c,o))}return r},[t,n,e])}(e,t)}function Ef({editor:e,ErrorBoundary:t}){return function(e){let t=hu.maybeFromEditor(e);if(t&&t.hasExtensionByName(xu.name)){for(let e of[`@lexical/plain-text`,`@lexical/rich-text`])t.hasExtensionByName(e)&&Cf(320,e);return!0}return!1}(e)?null:(0,u.jsx)(Tf,{editor:e,ErrorBoundary:t})}function Df(e){return e.getEditorState().read(Tu(e.isComposing()))}function Of({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){let[r]=O();return function(e){wf(()=>Kc(Sf(e),Eu(e)),[e])}(r),(0,u.jsxs)(u.Fragment,{children:[e,(0,u.jsx)(kf,{content:t}),(0,u.jsx)(Ef,{editor:r,ErrorBoundary:n})]})}function kf({content:e}){let[t]=O(),n=function(e){let[t,n]=(0,l.useState)(()=>Df(e));return wf(()=>{function t(){n(Df(e))}return t(),Kc(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),r=Qc();return n?typeof e==`function`?e(r):e:null}var Af=A?l.useLayoutEffect:l.useEffect;function jf({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:a,ariaExpanded:o,ariaInvalid:s,ariaLabel:c,ariaLabelledBy:d,ariaMultiline:f,ariaOwns:p,ariaRequired:m,autoCapitalize:h,className:g,id:_,role:v=`textbox`,spellCheck:y=!0,style:b,tabIndex:x,"data-testid":S,...C},w){let[T,ee]=(0,l.useState)(e.isEditable()),te=(0,l.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),ne=(0,l.useMemo)(()=>function(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}(w,te),[te,w]);return Af(()=>(ee(e.isEditable()),e.registerEditableListener(e=>{ee(e)})),[e]),(0,u.jsx)(`div`,{"aria-activedescendant":T?t:void 0,"aria-autocomplete":T?n:`none`,"aria-controls":T?r:void 0,"aria-describedby":i,...a==null?{}:{"aria-errormessage":a},"aria-expanded":T&&v===`combobox`?!!o:void 0,...s==null?{}:{"aria-invalid":s},"aria-label":c,"aria-labelledby":d,"aria-multiline":f,"aria-owns":T?p:void 0,"aria-readonly":!T||void 0,"aria-required":m,autoCapitalize:h,className:g,contentEditable:T,"data-testid":S,id:_,ref:ne,role:v,spellCheck:y,style:b,tabIndex:x,...C})}var Mf=(0,l.forwardRef)(jf);function Nf(e){return e.getEditorState().read(Tu(e.isComposing()))}var Pf=(0,l.forwardRef)(Ff);function Ff(e,t){let{placeholder:n,...r}=e,[i]=O();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Mf,{editor:i,...r,ref:t}),n!=null&&(0,u.jsx)(If,{editor:i,content:n})]})}function If({content:e,editor:t}){let n=function(e){let[t,n]=(0,l.useState)(()=>Nf(e));return Af(()=>{function t(){n(Nf(e))}return t(),Kc(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[r,i]=(0,l.useState)(t.isEditable());if((0,l.useLayoutEffect)(()=>(i(t.isEditable()),t.registerEditableListener(e=>{i(e)})),[t]),!n)return null;let a=null;return typeof e==`function`?a=e(r):e!==null&&(a=e),a===null?null:(0,u.jsx)(`div`,{"aria-hidden":!0,children:a})}function Lf(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;let a=t._selection,o=e._selection;if(i)return 1;if(!(F(a)&&F(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;let s=function(e,t,n){let r=e._nodeMap,i=[];for(let e of t){let t=r.get(e);t!==void 0&&i.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);n===void 0||za(n)||i.push(n)}return i}(t,n,r);if(s.length===0)return 0;if(s.length>1){let n=t._nodeMap,r=n.get(a.anchor.key),i=n.get(o.anchor.key);return r&&i&&!e._nodeMap.has(r.__key)&&P(r)&&r.__text.length===1&&a.anchor.offset===1?2:0}let c=s[0],l=e._nodeMap.get(c.__key);if(!P(l)||!P(c)||l.__mode!==c.__mode)return 0;let u=l.__text,d=c.__text;if(u===d)return 0;let f=a.anchor,p=o.anchor;if(f.key!==p.key||f.type!==`text`)return 0;let m=f.offset,h=p.offset,g=d.length-u.length;return g===1&&h===m-1?2:g===-1&&h===m+1?3:g===-1&&h===m?4:0}function Rf(e,t,n){let r=n(),i=0,a=r,o=0,s=null;return(c,l,u,d,f,p)=>{let m=n();if(p.has(`composition-start`)&&(a=r,o=i,s=c),p.has(`historic`))return i=0,r=m,2;p.has(`composition-end`)&&s&&(r=a,i=o,c=s);let h=Lf(c,l,d,f,e.isComposing()),g=(()=>{let n=u===null||u.editor===e,a=p.has(Jr);if(!a&&n&&p.has(`history-merge`))return 0;if(h===1)return 2;if(c===null)return 1;let o=l._selection;if(!(d.size>0||f.size>0))return o===null?2:0;let s=typeof t==`number`?t:t.peek();return!1===a&&h!==0&&h===i&&m<r+s&&n||d.size===1&&function(e,t,n){let r=t._nodeMap.get(e),i=n._nodeMap.get(e),a=t._selection,o=n._selection;return!(F(a)&&F(o)&&a.anchor.type===`element`&&a.focus.type===`element`&&o.anchor.type===`text`&&o.focus.type===`text`||!P(r)||!P(i)||r.__parent!==i.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>i.exportJSON()))}(Array.from(d)[0],c,l)?0:1})();return r=m,i=h,g}}function zf(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}function Bf(e,t,n,r=Date.now,i,a=null){let o=Rf(e,n,r),s=()=>{i&&i(t)};return s(),Kc(e.registerCommand(wn,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(i.length!==0){let a=t.current,o=i.pop();a!==null&&(r.push(a),e.dispatchCommand(Qn,!0)),i.length===0&&e.dispatchCommand($n,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:`historic`})}}(e,t,i),!0),0),e.registerCommand(Tn,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(r.length!==0){let a=t.current;a!==null&&(i.push(a),e.dispatchCommand($n,!0));let o=r.pop();r.length===0&&e.dispatchCommand(Qn,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:`historic`})}}(e,t,i),!0),0),e.registerCommand(Xn,()=>(zf(t,i),!1),0),e.registerCommand(Zn,()=>(zf(t,i),e.dispatchCommand(Qn,!1),e.dispatchCommand($n,!1),!0),0),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:i,dirtyElements:c,tags:l})=>{let u=t.current,d=t.redoStack,f=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&n===p)return;let m=o(r,n,u,i,c,l);if(m===1){if(d.length!==0&&(t.redoStack=[],e.dispatchCommand(Qn,!1)),u!==null){f.push({...u});let t=typeof a==`number`||a===null?a:a.peek();t!==null&&f.length>t&&f.splice(0,f.length-t),e.dispatchCommand($n,!0)}}else if(m===2)return;t.current={editor:e,editorState:n},s()}))}function Vf(){return{current:null,redoStack:[],undoStack:[]}}Date.now;function Hf({delay:e,externalHistoryState:t}){let[n]=O();return function(e,t,n=1e3){let r=(0,l.useMemo)(()=>t||Vf(),[t]);(0,l.useEffect)(()=>Bf(e,r,n),[n,e,r])}(n,t,e),null}var Uf=A?l.useLayoutEffect:l.useEffect;function Wf({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){let[r]=O();return Uf(()=>{if(n)return r.registerUpdateListener(({editorState:i,dirtyElements:a,dirtyLeaves:o,prevEditorState:s,tags:c})=>{t&&a.size===0&&o.size===0||e&&c.has(`history-merge`)||s.isEmpty()||n(i,r,c)})},[r,e,t,n]),null}function Gf(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Kf(e){let t=1,n=e.getParent();for(;n!=null;){if(K(n)){let e=n.getParent();if(q(e)){t++,n=e.getParent();continue}Gf(40)}return t}return t}function qf(e){let t=e.getParent();q(t)||Gf(40);let n=t;for(;n!==null;)n=n.getParent(),q(n)&&(t=n);return t}function Jf(e){let t=[],n=e.getChildren().filter(K);for(let e=0;e<n.length;e++){let r=n[e],i=r.getFirstChild();q(i)?t=t.concat(Jf(i)):t.push(r)}return t}function Yf(e){return K(e)&&q(e.getFirstChild())}function Xf(e,t){return K(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Zf(e){let t=I();if(t!==null){let n=t.getNodes();if(F(t)){let[r]=t.getStartEndPoints(),i=r.getNode(),a=i.getParent();if(us(i)){let e=i.getFirstChild();if(e)n=e.selectStart().getNodes();else{let e=B();i.append(e),n=e.select().getNodes()}}else if(Xf(i,n)){let t=hp(e);if(us(a)){i.replace(t);let e=up();R(i)&&(e.setFormat(i.getFormatType()),e.setIndent(i.getIndent())),t.append(e)}else if(K(i)){let e=i.getParentOrThrow();Qf(t,e.getChildren()),e.replace(t)}return}}let r=new Set;for(let t=0;t<n.length;t++){let i=n[t];if(R(i)&&i.isEmpty()&&!K(i)&&!r.has(i.getKey())){$f(i,e);continue}let a=xo(i)?i.getParent():K(i)&&i.isEmpty()?i:null;for(;a!=null;){let t=a.getKey();if(q(a)){if(!r.has(t)){let n=hp(e);Qf(n,a.getChildren()),a.replace(n),r.add(t)}break}{let n=a.getParent();if(us(n)&&!r.has(t)){r.add(t),$f(a,e);break}a=n}}}}}function Qf(e,t){e.splice(e.getChildrenSize(),0,t)}function $f(e,t){if(q(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=up(),a;if(Qf(i,e.getChildren()),q(n)&&t===n.getListType())n.append(i),q(r)&&t===r.getListType()&&(Qf(n,r.getChildren()),r.remove()),a=n;else if(q(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),a=r;else{let n=hp(t);n.append(i),e.replace(n),a=n}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());let o=I();return F(o)&&(a.getKey()===o.anchor.key&&o.anchor.set(i.getKey(),o.anchor.offset,`element`),a.getKey()===o.focus.key&&o.focus.set(i.getKey(),o.focus.offset,`element`)),e.remove(),a}function ep(e,t){let n=e.getLastChild(),r=t.getFirstChild();n&&r&&Yf(n)&&Yf(r)&&(ep(n.getFirstChild(),r.getFirstChild()),r.remove());let i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function tp(){let e=I();if(F(e)){let t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(Xf(r,n))t.add(qf(r));else for(let e=0;e<n.length;e++){let r=n[e];if(xo(r)){let e=vl(r,op);e!=null&&t.add(qf(e))}}for(let n of t){let t=n,r=Jf(n);for(let n of r){let r=B().setTextStyle(e.style).setTextFormat(e.format);Qf(r,n.getChildren()),t.insertAfter(r),t=r,n.__key===e.anchor.key&&wc(e.anchor,Mc(lc(r,`next`))),n.__key===e.focus.key&&wc(e.focus,Mc(lc(r,`next`))),n.remove()}n.remove()}}}function np(e){let t=e.getListType()!==`check`,n=e.getStart();for(let r of e.getChildren())K(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),q(r.getFirstChild())||n++)}function rp(e){let t=new Set;if(Yf(e)||t.has(e.getKey()))return;let n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(Yf(r)&&Yf(i)){let n=i.getFirstChild();if(q(n)){n.append(e);let i=r.getFirstChild();q(i)&&(Qf(n,i.getChildren()),r.remove(),t.add(r.getKey()))}}else if(Yf(r)){let t=r.getFirstChild();if(q(t)){let n=t.getFirstChild();n!==null&&n.insertBefore(e)}}else if(Yf(i)){let t=i.getFirstChild();q(t)&&t.append(e)}else if(q(n)){let t=ds(e),a=ds(n);t.append(a),a.append(e),i?i.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function ip(e){if(Yf(e))return;let t=e.getParent(),n=t?t.getParent():void 0;if(q(n?n.getParent():void 0)&&K(n)&&q(t)){let r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{let r=ds(e),i=ds(t);r.append(i),e.getPreviousSiblings().forEach(e=>i.append(e));let a=ds(e),o=ds(t);a.append(o),Qf(o,e.getNextSiblings()),n.insertBefore(r),n.insertAfter(a),n.replace(e)}}}function ap(e=!1){let t=I();if(!F(t)||!t.isCollapsed())return!1;let n=t.anchor.getNode(),r=null;if(K(n)&&n.getChildrenSize()===0)r=n;else if(P(n)){let e=n.getParent();K(e)&&e.getChildren().every(e=>P(e)&&e.getTextContent().trim()===``)&&(r=e)}if(r===null)return!1;let i=qf(r),a=r.getParent();q(a)||Gf(40);let o=a.getParent(),s;if(us(o))s=B(),i.insertAfter(s);else{if(!K(o))return!1;s=ds(o),o.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();let c=r.getNextSiblings();if(c.length>0){let t=e?function(e,t){return e.getStart()+t.getIndexWithinParent()}(a,r):1,n=ds(a).setStart(t);if(K(s)){let e=ds(s);e.append(n),s.insertAfter(e)}else s.insertAfter(n);n.append(...c)}return function(e){let t=e;for(;t.getNextSibling()==null&&t.getPreviousSibling()==null;){let e=t.getParent();if(e==null||!K(e)&&!q(e))break;t=e}t.remove()}(r),!0}var op=class extends Fa{__value;__checked;$config(){return this.config(`listitem`,{$transform:e=>{let t=e.getParent();if(q(t))t.getListType()!==`check`&&e.getChecked()!=null&&e.setChecked(void 0);else if(t){let n=e.createParentElementNode();q(n)||Gf(340);let r=[e];for(let t of[`previous`,`next`]){r.reverse();for(let{origin:n}of ac(e,t)){if(!K(n))break;r.push(n)}}e.insertBefore(n),n.splice(0,0,r),us(t)||(bl(n,Oc(ac(n,`next`)),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},extends:Fa,importDOM:Ur({li:()=>({conversion:sp,priority:0})})})}constructor(e=1,t=void 0,n){super(n),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=document.createElement(`li`);return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){(function(e,t){let n=t.getParent();!q(n)||n.getListType()!==`check`||q(t.getFirstChild())?(e.removeAttribute(`role`),e.removeAttribute(`tabIndex`),e.removeAttribute(`aria-checked`)):(e.setAttribute(`role`,`checkbox`),e.setAttribute(`tabIndex`,`-1`),e.setAttribute(`aria-checked`,t.getChecked()?`true`:`false`))})(t,this),t.value=this.__value,function(e,t,n){let r=t.list;if(!r)return;let i=r.listitem,a=r.nested&&r.nested.listitem,o=n.getParent(),s=q(o)&&o.getListType()===`check`,c=n.getChecked(),l=n.getChildren().some(e=>q(e)),u=[];r.listitemChecked!==void 0&&u.push(r.listitemChecked),r.listitemUnchecked!==void 0&&u.push(r.listitemUnchecked),a!==void 0&&u.push(...Uc(a)),u.length>0&&Gc(e,...u);let d=[];if(i!==void 0&&d.push(...Uc(i)),s){let e=c?r.listitemChecked:r.listitemUnchecked;e!==void 0&&d.push(e)}a!==void 0&&l&&d.push(...Uc(a)),d.length>0&&Wc(e,...d)}(t,n.theme,this);let r=e?e.__style:``,i=this.__style;r!==i&&ri(t.style,i,r),function(e,t,n){let r=t.__textStyle,i=n?n.__textStyle:``;if(n!==null&&i===r)return;let a=ti(r);for(let t in a)e.style.setProperty(`--listitem-marker-${t}`,a[t]);if(i!==``)for(let t in ti(i))t in a||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,n){let r=t;return this.updateListItemDOM(e,r,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);let r=this.getDirection();return r&&(t.dir=r),Yf(this)?{after(e){if(U(e)){let t=e.previousElementSibling;if(U(t)&&t.nodeName===`LI`){for(;e.firstChild;)t.append(e.firstChild);e.remove()}}return e},element:t}:{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let n=e[t];if(R(n)&&this.canMergeWith(n)){let e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(K(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!q(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=ds(n),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}let r=this.__key,i=0;if(t&&(R(e)||Gf(139),i=e.getChildrenSize(),e.splice(i,0,this.getChildren())),t&&R(e)){let t=I();if(F(t))for(let n of t.getStartEndPoints())n.key===r&&n.type===`element`&&n.set(e.getKey(),i+n.offset,`element`)}return this.remove(),n.getChildrenSize()===0&&n.remove(),e}insertAfter(e,t=!0){let n=this.getParentOrThrow();if(q(n)||Gf(39),K(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(n.insertAfter(e,t),r.length!==0){let i=ds(n);r.forEach(e=>i.append(e)),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&Yf(t)&&Yf(n)&&(ep(t.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){let n=ds(this);return this.insertAfter(n,t),n}collapseAtStart(e){let t=B();this.getChildren().forEach(e=>t.append(e));let n=this.getParentOrThrow(),r=n.getParentOrThrow(),i=K(r);if(n.getChildrenSize()===1)if(i)n.remove(),r.select();else{n.insertBefore(t),n.remove();let r=e.anchor,i=e.focus,a=t.getKey();r.type===`element`&&r.getNode().is(this)&&r.set(a,r.offset,`element`),i.type===`element`&&i.getNode().is(this)&&i.set(a,i.offset,`element`)}else n.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e=this.getLatest(),t,n=this.getParent();return q(n)&&(t=n.getListType()),t===`check`?!!e.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;K(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e!=`number`&&Gf(117),(e=Math.floor(e))>=0||Gf(199);let t=this.getIndent();for(;t!==e;)t<e?(rp(this),t++):(ip(this),t--);return this}canInsertAfter(e){return K(e)}canReplaceWith(e){return K(e)}canMergeWith(e){return K(e)||Ja(e)}extractWithChild(e,t){if(!F(t))return!1;let n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return hp(`bullet`)}canMergeWhenEmpty(){return!0}};function sp(e){if(e.classList.contains(`task-list-item`)){for(let t of e.children)if(t.tagName===`INPUT`)return cp(t)}if(e.classList.contains(`joplin-checkbox`)){for(let t of e.children)if(t.classList.contains(`checkbox-wrapper`)&&t.children.length>0&&t.children[0].tagName===`INPUT`)return cp(t.children[0])}let t=e.getAttribute(`aria-checked`),n=up(t===`true`||t!==`false`&&void 0);return Rs(n,e),{after:lp.bind(null,n),node:Ls(n,e)}}function cp(e){if(e.getAttribute(`type`)!==`checkbox`)return{node:null};let t=up(e.hasAttribute(`checked`));return{after:lp.bind(null,t),node:t}}function lp(e,t){let n=t[0];return t.length===1&&Ja(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}function up(e){return fs(new op(void 0,e))}function K(e){return e instanceof op}var dp=class extends Fa{__tag;__start;__listType;$config(){return this.config(`list`,{$transform:e=>{(function(e){let t=e.getNextSibling();q(t)&&e.getListType()===t.getListType()&&ep(e,t)})(e),np(e)},extends:Fa,importDOM:Ur({ol:()=>({conversion:pp,priority:0}),ul:()=>({conversion:pp,priority:0})})})}constructor(e=`number`,t=1,n){super(n);let r=mp[e]||e;this.__listType=r,this.__tag=r===`number`?`ol`:`ul`,this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag=e===`number`?`ol`:`ul`,t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let n=this.__tag,r=document.createElement(n);return this.__start!==1&&r.setAttribute(`start`,String(this.__start)),r.__lexicalListType=this.__listType,fp(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(fp(t,n.theme,this),e.__start!==this.__start&&t.setAttribute(`start`,String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return U(t)&&(this.__start!==1&&t.setAttribute(`start`,String(this.__start)),this.__listType===`check`&&t.setAttribute(`__lexicalListType`,`check`)),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let e=0;e<n.length;e++){let t=n[e];K(t)||(r===n&&(r=[...n]),r[e]=this.createListItemNode().append(!R(t)||q(t)||t.isInline()?t:wi(t.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return K(e)}createListItemNode(){return up()}};function fp(e,t,n){let r=[],i=[],a=t.list;if(a!==void 0){let e=a[`${n.__tag}Depth`]||[],t=Kf(n)-1,o=t%e.length,s=e[o],c=a[n.__tag],l,u=a.nested,d=a.checklist;if(u!==void 0&&u.list&&(l=u.list),c!==void 0&&r.push(c),d!==void 0&&n.__listType===`check`&&r.push(d),s!==void 0){r.push(...Uc(s));for(let t=0;t<e.length;t++)t!==o&&i.push(n.__tag+t)}if(l!==void 0){let e=Uc(l);t>1?r.push(...e):i.push(...e)}}i.length>0&&Gc(e,...i),r.length>0&&Wc(e,...r)}function pp(e){let t;if(function(e){return U(e)&&e.nodeName.toLowerCase()===`ol`}(e)){let n=e.start;t=hp(`number`,n)}else t=function(e){if(e.getAttribute(`__lexicallisttype`)===`check`||e.classList.contains(`contains-task-list`)||e.getAttribute(`data-is-checklist`)===`1`)return!0;for(let t of e.childNodes)if(U(t)&&t.hasAttribute(`aria-checked`))return!0;return!1}(e)?hp(`check`):hp(`bullet`);return Ls(t,e),{after:e=>function(e,t){let n=t.createListItemNode.bind(t),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(K(i)){r.push(i);let e=i.getChildren();e.length>1&&e.forEach(e=>{q(e)&&r.push(n().append(e))})}else r.push(n().append(i))}return r}(e,t),node:t}}var mp={ol:`number`,ul:`bullet`};function hp(e=`number`,t=1){return fs(new dp(e,t))}function q(e){return e instanceof dp}var gp=N(`UPDATE_LIST_START_COMMAND`),_p=N(`INSERT_UNORDERED_LIST_COMMAND`),vp=N(`INSERT_ORDERED_LIST_COMMAND`),yp=N(`REMOVE_LIST_COMMAND`);function bp(e,t){return Kc(e.registerCommand(vp,()=>(Zf(`number`),!0),1),e.registerCommand(gp,e=>{let{listNodeKey:t,newStart:n}=e,r=Do(t);return!!q(r)&&(r.getListType()===`number`&&(r.setStart(n),np(r)),!0)},1),e.registerCommand(_p,()=>(Zf(`bullet`),!0),1),e.registerCommand(yp,()=>(tp(),!0),1),e.registerCommand(_n,()=>ap(!!(t&&t.restoreNumbering)),1),e.registerNodeTransform(op,e=>{let t=e.getFirstChild();if(t){if(P(t)){let n=t.getStyle(),r=t.getFormat();e.getTextStyle()!==n&&e.setTextStyle(n),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{let t=I();F(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(hi,e=>{let t=e.getParent();if(K(t)&&e.is(t.getFirstChild())){let n=e.getStyle(),r=e.getFormat();n===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(n).setTextFormat(r)}}))}function xp(e){let t=e=>{let t=e.getParent();if(q(e.getFirstChild())||!q(t))return;let n=Us(e,e=>K(e)&&q(e.getParent())&&K(e.getPreviousSibling()));if(n===null&&e.getIndent()>0)e.setIndent(0);else if(K(n)){let r=n.getPreviousSibling();if(K(r)){let n=function(e){let t=e,n=t.getFirstChild();for(;q(n);){let e=n.getLastChild();if(!K(e))break;t=e,n=t.getFirstChild()}return t}(r).getParent();if(q(n)){let r=Kf(n);r+1<Kf(t)&&e.setIndent(r)}}}};return e.registerNodeTransform(dp,e=>{let n=[e];for(;n.length>0;){let e=n.shift();if(q(e)){for(let r of e.getChildren())if(K(r)){t(r);let e=r.getFirstChild();q(e)&&n.push(e)}}}})}wd.tag(`ol`,`ul`),wd.tag(`li`),wd.tag(`li`).classAll(`task-list-item`),wd.tag(`li`).classAll(`joplin-checkbox`);function Sp({hasStrictIndent:e=!1,shouldPreserveNumbering:t=!1}){let[n]=O();return(0,l.useEffect)(()=>{if(!n.hasNodes([dp,op]))throw Error(`ListPlugin: ListNode and/or ListItemNode not registered on editor`)},[n]),(0,l.useEffect)(()=>Kc(bp(n,{restoreNumbering:t}),e?xp(n):()=>{}),[n,e,t]),function(e){(0,l.useEffect)(()=>bp(e),[e])}(n),null}var Cp=(0,l.createContext)(null),wp={didCatch:!1,error:null},Tp=class extends l.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=wp}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(wp))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&Ep(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(wp))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,l.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,l.createElement)(Cp.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function Ep(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}function Dp({children:e,onError:t}){let n=(0,l.useCallback)((e,n)=>{t(e instanceof Error?e:Error(String(e),{cause:e}),n)},[t]);return(0,u.jsx)(Tp,{fallback:(0,u.jsx)(`div`,{style:{border:`1px solid #f00`,color:`#f00`,padding:`8px`},children:`An error was thrown.`}),onError:n,children:e})}function Op(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Op(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function kp(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Op(e))&&(r&&(r+=` `),r+=t);return r}var Ap=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,jp=kp,Mp=(e,t)=>n=>{if(t?.variants==null)return jp(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ap(t)||Ap(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return jp(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function Np(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Pp(...e){return t=>{let n=!1,r=e.map(e=>{let r=Np(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Np(e[t],null)}}}}function J(...e){return l.useCallback(Pp(...e),e)}var Fp=Symbol.for(`react.lazy`),Ip=l.use;function Lp(e){return typeof e==`object`&&!!e&&`then`in e}function Rp(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Fp&&`_payload`in e&&Lp(e._payload)}function zp(e){let t=Vp(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e;Rp(r)&&typeof Ip==`function`&&(r=Ip(r._payload));let a=l.Children.toArray(r),o=a.find(Up);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Bp=zp(`Slot`);function Vp(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(Rp(n)&&typeof Ip==`function`&&(n=Ip(n._payload)),l.isValidElement(n)){let e=Gp(n),i=Wp(r,n.props);return n.type!==l.Fragment&&(i.ref=t?Pp(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hp=Symbol(`radix.slottable`);function Up(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Hp}function Wp(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Gp(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kp=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},qp=(e,t)=>({classGroupId:e,validator:t}),Jp=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Yp=`-`,Xp=[],Zp=`arbitrary..`,Qp=e=>{let t=tm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return em(e);let n=e.split(Yp);return $p(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Kp(i,t):t:i||Xp}return n[e]||Xp}}},$p=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=$p(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Yp):e.slice(t).join(Yp),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},em=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Zp+r:void 0})(),tm=e=>{let{theme:t,classGroups:n}=e;return nm(n,t)},nm=(e,t)=>{let n=Jp();for(let r in e){let i=e[r];rm(i,n,r,t)}return n},rm=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];im(i,t,n,r)}},im=(e,t,n,r)=>{if(typeof e==`string`){am(e,t,n);return}if(typeof e==`function`){om(e,t,n,r);return}sm(e,t,n,r)},am=(e,t,n)=>{let r=e===``?t:cm(t,e);r.classGroupId=n},om=(e,t,n,r)=>{if(lm(e)){rm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qp(n,e))},sm=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];rm(o,cm(t,a),n,r)}},cm=(e,t)=>{let n=e,r=t.split(Yp),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Jp(),n.nextPart.set(t,i)),n=i}return n},lm=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,um=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},dm=`!`,fm=`:`,pm=[],mm=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),hm=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===fm){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(dm)?(c=s.slice(0,-1),l=!0):s.startsWith(dm)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return mm(t,l,c,u)};if(t){let e=t+fm,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):mm(pm,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},gm=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},_m=e=>({cache:um(e.cacheSize),parseClassName:hm(e),sortModifiers:gm(e),postfixLookupClassGroupIds:vm(e),...Qp(e)}),vm=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ym=/\s+/,bm=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ym),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+dm:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},xm=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Sm(n))&&(i&&(i+=` `),i+=r);return i},Sm=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Sm(e[r]))&&(n&&(n+=` `),n+=t);return n},Cm=(e,...t)=>{let n,r,i,a,o=o=>(n=_m(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=bm(e,n);return i(e,a),a};return a=o,(...e)=>a(xm(...e))},wm=[],Tm=e=>{let t=t=>t[e]||wm;return t.isThemeGetter=!0,t},Em=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Dm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Om=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,km=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Am=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Mm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pm=e=>Om.test(e),Y=e=>!!e&&!Number.isNaN(Number(e)),Fm=e=>!!e&&Number.isInteger(Number(e)),Im=e=>e.endsWith(`%`)&&Y(e.slice(0,-1)),Lm=e=>km.test(e),Rm=()=>!0,zm=e=>Am.test(e)&&!jm.test(e),Bm=()=>!1,Vm=e=>Mm.test(e),Hm=e=>Nm.test(e),Um=e=>!X(e)&&!Z(e),Wm=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Gm=e=>oh(e,uh,Bm),X=e=>Em.test(e),Km=e=>oh(e,dh,zm),qm=e=>oh(e,fh,Y),Jm=e=>oh(e,mh,Rm),Ym=e=>oh(e,ph,Bm),Xm=e=>oh(e,ch,Bm),Zm=e=>oh(e,lh,Hm),Qm=e=>oh(e,hh,Vm),Z=e=>Dm.test(e),$m=e=>sh(e,dh),eh=e=>sh(e,ph),th=e=>sh(e,ch),nh=e=>sh(e,uh),rh=e=>sh(e,lh),ih=e=>sh(e,hh,!0),ah=e=>sh(e,mh,!0),oh=(e,t,n)=>{let r=Em.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},sh=(e,t,n=!1)=>{let r=Dm.exec(e);return r?r[1]?t(r[1]):n:!1},ch=e=>e===`position`||e===`percentage`,lh=e=>e===`image`||e===`url`,uh=e=>e===`length`||e===`size`||e===`bg-size`,dh=e=>e===`length`,fh=e=>e===`number`,ph=e=>e===`family-name`,mh=e=>e===`number`||e===`weight`,hh=e=>e===`shadow`,gh=Cm(()=>{let e=Tm(`color`),t=Tm(`font`),n=Tm(`text`),r=Tm(`font-weight`),i=Tm(`tracking`),a=Tm(`leading`),o=Tm(`breakpoint`),s=Tm(`container`),c=Tm(`spacing`),l=Tm(`radius`),u=Tm(`shadow`),d=Tm(`inset-shadow`),f=Tm(`text-shadow`),p=Tm(`drop-shadow`),m=Tm(`blur`),h=Tm(`perspective`),g=Tm(`aspect`),_=Tm(`ease`),v=Tm(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Z,X],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Z,X,c],T=()=>[Pm,`full`,`auto`,...w()],ee=()=>[Fm,`none`,`subgrid`,Z,X],te=()=>[`auto`,{span:[`full`,Fm,Z,X]},Fm,Z,X],ne=()=>[Fm,`auto`,Z,X],re=()=>[`auto`,`min`,`max`,`fr`,Z,X],E=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],D=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...w()],O=()=>[Pm,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[Pm,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[Pm,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,Z,X],oe=()=>[...b(),th,Xm,{position:[Z,X]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,nh,Gm,{size:[Z,X]}],le=()=>[Im,$m,Km],ue=()=>[``,`none`,`full`,l,Z,X],de=()=>[``,Y,$m,Km],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[Y,Im,th,Xm],he=()=>[``,`none`,m,Z,X],ge=()=>[`none`,Y,Z,X],_e=()=>[`none`,Y,Z,X],ve=()=>[Y,Z,X],ye=()=>[Pm,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Lm],breakpoint:[Lm],color:[Rm],container:[Lm],"drop-shadow":[Lm],ease:[`in`,`out`,`in-out`],font:[Um],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Lm],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Lm],shadow:[Lm],spacing:[`px`,Y],text:[Lm],"text-shadow":[Lm],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Pm,X,Z,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Z,X]}],"container-named":[Wm],columns:[{columns:[Y,X,Z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Fm,`auto`,Z,X]}],basis:[{basis:[Pm,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Y,Pm,`auto`,`initial`,`none`,X]}],grow:[{grow:[``,Y,Z,X]}],shrink:[{shrink:[``,Y,Z,X]}],order:[{order:[Fm,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...E(),`normal`]}],"justify-items":[{"justify-items":[...D(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...D()]}],"align-content":[{content:[`normal`,...E()]}],"align-items":[{items:[...D(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...D(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":E()}],"place-items":[{"place-items":[...D(),`baseline`]}],"place-self":[{"place-self":[`auto`,...D()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],"inline-size":[{inline:[`auto`,...k()]}],"min-inline-size":[{"min-inline":[`auto`,...k()]}],"max-inline-size":[{"max-inline":[`none`,...k()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,...O()]}],"font-size":[{text:[`base`,n,$m,Km]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ah,Jm]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Im,X]}],"font-family":[{font:[eh,Ym,t]}],"font-features":[{"font-features":[X]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Z,X]}],"line-clamp":[{"line-clamp":[Y,`none`,Z,qm]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Y,`from-font`,`auto`,Z,Km]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Y,`auto`,Z,X]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Fm,Z,X]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Fm,Z,X],radial:[``,Z,X],conic:[Fm,Z,X]},rh,Zm]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Y,Z,X]}],"outline-w":[{outline:[``,Y,$m,Km]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,u,ih,Qm]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,ih,Qm]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Y,Km]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,ih,Qm]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Y,Z,X]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Y]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Y]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:he()}],brightness:[{brightness:[Y,Z,X]}],contrast:[{contrast:[Y,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ih,Qm]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,Y,Z,X]}],"hue-rotate":[{"hue-rotate":[Y,Z,X]}],invert:[{invert:[``,Y,Z,X]}],saturate:[{saturate:[Y,Z,X]}],sepia:[{sepia:[``,Y,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[Y,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[Y,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Y,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,Y,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[Y,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[Y,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,Y,Z,X]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Y,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[Y,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[Fm,Z,X]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Z,X]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Z,X]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[Y,$m,Km,qm]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function _h(...e){return gh(kp(e))}var vh=Mp(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm text-[14px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,primary:`bg-primaryBg text-primaryBg-foreground hover:bg-primaryBg/70`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,outlineButton:`border border-1 bg-background hover:text-accent-foreground border-[#0EF3ED] `,dim:` bg-buttonDim text-buttonDim-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-[var(--height-form-control)] px-4 py-2 has-[>svg]:px-3`,xs:`h-[var(--height-form-control)] gap-1 rounded-sm px-2 text-[14px] has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-[var(--height-form-control)] rounded-sm gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-[var(--height-form-control)] rounded-sm px-6 has-[>svg]:px-4`,icon:`size-[var(--height-form-control)]`,"icon-xs":`size-[var(--height-form-control)] rounded-sm [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-[var(--height-form-control)]`,"icon-lg":`size-[var(--height-form-control)]`}},defaultVariants:{variant:`default`,size:`default`}});function yh({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,u.jsx)(r?Bp.Root:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:_h(vh({variant:t,size:n,className:e})),...i})}typeof window<`u`&&window.document&&window.document.createElement;function Q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function bh(e,t=[]){let n=[];function r(t,r){let i=l.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=l.useMemo(()=>o,Object.values(o));return(0,u.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=l.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>l.createContext(e));return function(n){let r=n?.[e]||t;return l.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,xh(i,...t)]}function xh(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Sh=globalThis?.document?l.useLayoutEffect:()=>{},Ch=l.useInsertionEffect||Sh;function wh({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Th({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=l.useRef(e!==void 0);l.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,l.useCallback(t=>{if(s){let n=Eh(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Th({defaultProp:e,onChange:t}){let[n,r]=l.useState(e),i=l.useRef(n),a=l.useRef(t);return Ch(()=>{a.current=t},[t]),l.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Eh(e){return typeof e==`function`}function Dh(e){let t=Oh(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(Ah);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Oh(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=Mh(n),i=jh(r,n.props);return n.type!==l.Fragment&&(i.ref=t?Pp(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kh=Symbol(`radix.slottable`);function Ah(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===kh}function jh(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Mh(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Dh(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nh(e,t){e&&d.flushSync(()=>e.dispatchEvent(t))}function Ph(e){let t=Fh(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(Lh);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Fh(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=zh(n),i=Rh(r,n.props);return n.type!==l.Fragment&&(i.ref=t?Pp(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ih=Symbol(`radix.slottable`);function Lh(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ih}function Rh(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function zh(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Bh(e){let t=e+`CollectionProvider`,[n,r]=bh(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=l.default.useRef(null),a=l.default.useRef(new Map).current;return(0,u.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Ph(s),d=l.default.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(c,{ref:J(t,a(s,n).collectionRef),children:r})});d.displayName=s;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=Ph(f),h=l.default.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.default.useRef(null),s=J(t,o),c=a(f,n);return l.default.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,u.jsx)(m,{[p]:``,ref:s,children:r})});h.displayName=f;function g(t){let n=a(e+`CollectionConsumer`,t);return l.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:d,ItemSlot:h},g,r]}var Vh=l.createContext(void 0);function Hh(e){let t=l.useContext(Vh);return e||t||`ltr`}function Uh(e){let t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...e)=>t.current?.(...e),[])}function Wh(e,t=globalThis?.document){let n=Uh(e);l.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Gh=`DismissableLayer`,Kh=`dismissableLayer.update`,qh=`dismissableLayer.pointerDownOutside`,Jh=`dismissableLayer.focusOutside`,Yh,Xh=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zh=l.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,d=l.useContext(Xh),[f,p]=l.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=l.useState({}),g=J(t,e=>p(e)),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=eg(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!S||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},m),w=tg(e=>{let t=e.target;[...d.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},m);return Wh(e=>{b===d.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},m),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Yh=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ng(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Yh)}},[f,m,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ng())},[f,d]),l.useEffect(()=>{let e=()=>h({});return document.addEventListener(Kh,e),()=>document.removeEventListener(Kh,e)},[]),(0,u.jsx)($.div,{...c,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,C.onPointerDownCapture)})});Zh.displayName=Gh;var Qh=`DismissableLayerBranch`,$h=l.forwardRef((e,t)=>{let n=l.useContext(Xh),r=l.useRef(null),i=J(t,r);return l.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)($.div,{...e,ref:i})});$h.displayName=Qh;function eg(e,t=globalThis?.document){let n=Uh(e),r=l.useRef(!1),i=l.useRef(()=>{});return l.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){rg(qh,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function tg(e,t=globalThis?.document){let n=Uh(e),r=l.useRef(!1);return l.useEffect(()=>{let e=e=>{e.target&&!r.current&&rg(Jh,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ng(){let e=new CustomEvent(Kh);document.dispatchEvent(e)}function rg(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Nh(i,a):i.dispatchEvent(a)}var ig=0;function ag(){l.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??og()),document.body.insertAdjacentElement(`beforeend`,e[1]??og()),ig++,()=>{ig===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),ig--}},[])}function og(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var sg=`focusScope.autoFocusOnMount`,cg=`focusScope.autoFocusOnUnmount`,lg={bubbles:!1,cancelable:!0},ug=`FocusScope`,dg=l.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=l.useState(null),d=Uh(i),f=Uh(a),p=l.useRef(null),m=J(t,e=>c(e)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?p.current=t:vg(p.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||vg(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&vg(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){yg.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(sg,lg);s.addEventListener(sg,d),s.dispatchEvent(t),t.defaultPrevented||(fg(Sg(mg(s)),{select:!0}),document.activeElement===e&&vg(s))}return()=>{s.removeEventListener(sg,d),setTimeout(()=>{let t=new CustomEvent(cg,lg);s.addEventListener(cg,f),s.dispatchEvent(t),t.defaultPrevented||vg(e??document.body,{select:!0}),s.removeEventListener(cg,f),yg.remove(h)},0)}}},[s,d,f,h]);let g=l.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=pg(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&vg(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&vg(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,u.jsx)($.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})});dg.displayName=ug;function fg(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(vg(r,{select:t}),document.activeElement!==n)return}function pg(e){let t=mg(e);return[hg(t,e),hg(t.reverse(),e)]}function mg(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hg(e,t){for(let n of e)if(!gg(n,{upTo:t}))return n}function gg(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function _g(e){return e instanceof HTMLInputElement&&`select`in e}function vg(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_g(e)&&t&&e.select()}}var yg=bg();function bg(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=xg(e,t),e.unshift(t)},remove(t){e=xg(e,t),e[0]?.resume()}}}function xg(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Sg(e){return e.filter(e=>e.tagName!==`A`)}var Cg=l.useId||(()=>void 0),wg=0;function Tg(e){let[t,n]=l.useState(Cg());return Sh(()=>{e||n(e=>e??String(wg++))},[e]),e||(t?`radix-${t}`:``)}var Eg=[`top`,`right`,`bottom`,`left`],Dg=Math.min,Og=Math.max,kg=Math.round,Ag=Math.floor,jg=e=>({x:e,y:e}),Mg={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ng(e,t,n){return Og(e,Dg(t,n))}function Pg(e,t){return typeof e==`function`?e(t):e}function Fg(e){return e.split(`-`)[0]}function Ig(e){return e.split(`-`)[1]}function Lg(e){return e===`x`?`y`:`x`}function Rg(e){return e===`y`?`height`:`width`}function zg(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Bg(e){return Lg(zg(e))}function Vg(e,t,n){n===void 0&&(n=!1);let r=Ig(e),i=Bg(e),a=Rg(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Xg(o)),[o,Xg(o)]}function Hg(e){let t=Xg(e);return[Ug(e),t,Ug(t)]}function Ug(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Wg=[`left`,`right`],Gg=[`right`,`left`],Kg=[`top`,`bottom`],qg=[`bottom`,`top`];function Jg(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Gg:Wg:t?Wg:Gg;case`left`:case`right`:return t?Kg:qg;default:return[]}}function Yg(e,t,n,r){let i=Ig(e),a=Jg(Fg(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ug)))),a}function Xg(e){let t=Fg(e);return Mg[t]+e.slice(t.length)}function Zg(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qg(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Zg(e)}function $g(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 e_(e,t,n){let{reference:r,floating:i}=e,a=zg(t),o=Bg(t),s=Rg(o),c=Fg(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}}switch(Ig(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function t_(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}=Pg(t,e),p=Qg(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=$g(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=$g(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 n_=50,r_=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:t_},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=e_(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<n_&&(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}=e_(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},i_=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Pg(e,t)||{};if(l==null)return{};let d=Qg(u),f={x:n,y:r},p=Bg(i),m=Rg(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=Dg(d[_],T),te=Dg(d[v],T),ne=ee,re=C-h[m]-te,E=C/2-h[m]/2+w,D=Ng(ne,E,re),ie=!c.arrow&&Ig(i)!=null&&E!==D&&a.reference[m]/2-(E<ne?ee:te)-h[m]/2<0,O=ie?E<ne?E-ne:E-re:0;return{[p]:f[p]+O,data:{[p]:D,centerOffset:E-D-O,...ie&&{alignmentOffset:O}},reset:ie}}}),a_=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}=Pg(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Fg(r),_=zg(o),v=Fg(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Xg(o)]:Hg(o)),x=p!==`none`;!d&&x&&b.push(...Yg(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=Vg(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`&&_!==zg(t))||T.every(e=>zg(e.placement)===_?e.overflows[0]>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=zg(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;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function o_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function s_(e){return Eg.some(t=>e[t]>=0)}var c_=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Pg(e,t);switch(i){case`referenceHidden`:{let e=o_(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:s_(e)}}}case`escaped`:{let e=o_(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:s_(e)}}}default:return{}}}}},l_=new Set([`left`,`top`]);async function u_(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Fg(n),s=Ig(n),c=zg(n)===`y`,l=l_.has(o)?-1:1,u=a&&c?-1:1,d=Pg(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 d_=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 u_(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}}}}},f_=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}=Pg(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=zg(Fg(i)),p=Lg(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Ng(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Ng(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},p_=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Pg(e,t),u={x:n,y:r},d=zg(i),f=Lg(d),p=u[f],m=u[d],h=Pg(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=l_.has(Fg(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},m_=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Pg(e,t),u=await o.detectOverflow(t,l),d=Fg(i),f=Ig(i),p=zg(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Dg(h-u[g],v),x=Dg(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Og(u.left,0),t=Og(u.right,0),n=Og(u.top,0),r=Og(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Og(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Og(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function h_(){return typeof window<`u`}function g_(e){return y_(e)?(e.nodeName||``).toLowerCase():`#document`}function __(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function v_(e){return((y_(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function y_(e){return h_()?e instanceof Node||e instanceof __(e).Node:!1}function b_(e){return h_()?e instanceof Element||e instanceof __(e).Element:!1}function x_(e){return h_()?e instanceof HTMLElement||e instanceof __(e).HTMLElement:!1}function S_(e){return!h_()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof __(e).ShadowRoot}function C_(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=P_(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function w_(e){return/^(table|td|th)$/.test(g_(e))}function T_(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var E_=/transform|translate|scale|rotate|perspective|filter/,D_=/paint|layout|strict|content/,O_=e=>!!e&&e!==`none`,k_;function A_(e){let t=b_(e)?P_(e):e;return O_(t.transform)||O_(t.translate)||O_(t.scale)||O_(t.rotate)||O_(t.perspective)||!M_()&&(O_(t.backdropFilter)||O_(t.filter))||E_.test(t.willChange||``)||D_.test(t.contain||``)}function j_(e){let t=I_(e);for(;x_(t)&&!N_(t);){if(A_(t))return t;if(T_(t))return null;t=I_(t)}return null}function M_(){return k_??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),k_}function N_(e){return/^(html|body|#document)$/.test(g_(e))}function P_(e){return __(e).getComputedStyle(e)}function F_(e){return b_(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function I_(e){if(g_(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||S_(e)&&e.host||v_(e);return S_(t)?t.host:t}function L_(e){let t=I_(e);return N_(t)?e.ownerDocument?e.ownerDocument.body:e.body:x_(t)&&C_(t)?t:L_(t)}function R_(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=L_(e),i=r===e.ownerDocument?.body,a=__(r);if(i){let e=z_(a);return t.concat(a,a.visualViewport||[],C_(r)?r:[],e&&n?R_(e):[])}else return t.concat(r,R_(r,[],n))}function z_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function B_(e){let t=P_(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=x_(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=kg(n)!==a||kg(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function V_(e){return b_(e)?e:e.contextElement}function H_(e){let t=V_(e);if(!x_(t))return jg(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=B_(t),o=(a?kg(n.width):n.width)/r,s=(a?kg(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var U_=jg(0);function W_(e){let t=__(e);return!M_()||!t.visualViewport?U_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function G_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==__(e)?!1:t}function K_(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=V_(e),o=jg(1);t&&(r?b_(r)&&(o=H_(r)):o=H_(e));let s=G_(a,n,r)?W_(a):jg(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){let e=__(a),t=r&&b_(r)?__(r):r,n=e,i=z_(n);for(;i&&r&&t!==n;){let e=H_(i),t=i.getBoundingClientRect(),r=P_(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=__(i),i=z_(n)}}return $g({width:u,height:d,x:c,y:l})}function q_(e,t){let n=F_(e).scrollLeft;return t?t.left+n:K_(v_(e)).left+n}function J_(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-q_(e,n),y:n.top+t.scrollTop}}function Y_(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=v_(r),s=t?T_(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=jg(1),u=jg(0),d=x_(r);if((d||!d&&!a)&&((g_(r)!==`body`||C_(o))&&(c=F_(r)),d)){let e=K_(r);l=H_(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?J_(o,c):jg(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 X_(e){return Array.from(e.getClientRects())}function Z_(e){let t=v_(e),n=F_(e),r=e.ownerDocument.body,i=Og(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Og(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+q_(e),s=-n.scrollTop;return P_(r).direction===`rtl`&&(o+=Og(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Q_=25;function $_(e,t){let n=__(e),r=v_(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=M_();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=q_(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Q_&&(a-=o)}else l<=Q_&&(a+=l);return{width:a,height:o,x:s,y:c}}function ev(e,t){let n=K_(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=x_(e)?H_(e):jg(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function tv(e,t,n){let r;if(t===`viewport`)r=$_(e,n);else if(t===`document`)r=Z_(v_(e));else if(b_(t))r=ev(t,n);else{let n=W_(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return $g(r)}function nv(e,t){let n=I_(e);return n===t||!b_(n)||N_(n)?!1:P_(n).position===`fixed`||nv(n,t)}function rv(e,t){let n=t.get(e);if(n)return n;let r=R_(e,[],!1).filter(e=>b_(e)&&g_(e)!==`body`),i=null,a=P_(e).position===`fixed`,o=a?I_(e):e;for(;b_(o)&&!N_(o);){let t=P_(o),n=A_(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||C_(o)&&!n&&nv(e,o))?r=r.filter(e=>e!==o):i=t,o=I_(o)}return t.set(e,r),r}function iv(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?T_(t)?[]:rv(t,this._c):[].concat(n),r],o=tv(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=tv(t,a[e],i);s=Og(n.top,s),c=Dg(n.right,c),l=Dg(n.bottom,l),u=Og(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function av(e){let{width:t,height:n}=B_(e);return{width:t,height:n}}function ov(e,t,n){let r=x_(t),i=v_(t),a=n===`fixed`,o=K_(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=jg(0);function l(){c.x=q_(i)}if(r||!r&&!a)if((g_(t)!==`body`||C_(i))&&(s=F_(t)),r){let e=K_(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?J_(i,s):jg(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function sv(e){return P_(e).position===`static`}function cv(e,t){if(!x_(e)||P_(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return v_(e)===n&&(n=n.ownerDocument.body),n}function lv(e,t){let n=__(e);if(T_(e))return n;if(!x_(e)){let t=I_(e);for(;t&&!N_(t);){if(b_(t)&&!sv(t))return t;t=I_(t)}return n}let r=cv(e,t);for(;r&&w_(r)&&sv(r);)r=cv(r,t);return r&&N_(r)&&sv(r)&&!A_(r)?n:r||j_(e)||n}var uv=async function(e){let t=this.getOffsetParent||lv,n=this.getDimensions,r=await n(e.floating);return{reference:ov(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dv(e){return P_(e).direction===`rtl`}var fv={convertOffsetParentRelativeRectToViewportRelativeRect:Y_,getDocumentElement:v_,getClippingRect:iv,getOffsetParent:lv,getElementRects:uv,getClientRects:X_,getDimensions:av,getScale:H_,isElement:b_,isRTL:dv};function pv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mv(e,t){let n=null,r,i=v_(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Ag(d),h=Ag(i.clientWidth-(u+f)),g=Ag(i.clientHeight-(d+p)),_=Ag(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Og(0,Dg(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!pv(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function hv(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=V_(e),u=i||a?[...l?R_(l):[],...t?R_(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?mv(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?K_(e):null;c&&g();function g(){let t=K_(e);h&&!pv(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var gv=d_,_v=f_,vv=a_,yv=m_,bv=c_,xv=i_,Sv=p_,Cv=(e,t,n)=>{let r=new Map,i={platform:fv,...n},a={...i.platform,_c:r};return r_(e,t,{...i,platform:a})},wv=typeof document<`u`?l.useLayoutEffect:function(){};function Tv(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(!Tv(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)&&!Tv(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ev(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dv(e,t){let n=Ev(e);return Math.round(t*n)/n}function Ov(e){let t=l.useRef(e);return wv(()=>{t.current=e}),t}function kv(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:u}=e,[f,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=l.useState(r);Tv(m,r)||h(r);let[g,_]=l.useState(null),[v,y]=l.useState(null),b=l.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=l.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=l.useRef(null),T=l.useRef(null),ee=l.useRef(f),te=c!=null,ne=Ov(c),re=Ov(i),E=Ov(u),D=l.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};re.current&&(e.platform=re.current),Cv(w.current,T.current,e).then(e=>{let t={...e,isPositioned:E.current!==!1};ie.current&&!Tv(ee.current,t)&&(ee.current=t,d.flushSync(()=>{p(t)}))})},[m,t,n,re,E]);wv(()=>{u===!1&&ee.current.isPositioned&&(ee.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[u]);let ie=l.useRef(!1);wv(()=>(ie.current=!0,()=>{ie.current=!1}),[]),wv(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(ne.current)return ne.current(S,C,D);D()}},[S,C,D,ne,te]);let O=l.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),k=l.useMemo(()=>({reference:S,floating:C}),[S,C]),ae=l.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=Dv(k.floating,f.x),r=Dv(k.floating,f.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ev(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:D,refs:O,elements:k,floatingStyles:ae}),[f,D,O,k,ae])}var Av=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:xv({element:r.current,padding:i}).fn(n):r?xv({element:r,padding:i}).fn(n):{}}}},jv=(e,t)=>{let n=gv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mv=(e,t)=>{let n=_v(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nv=(e,t)=>({fn:Sv(e).fn,options:[e,t]}),Pv=(e,t)=>{let n=vv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fv=(e,t)=>{let n=yv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Iv=(e,t)=>{let n=bv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lv=(e,t)=>{let n=Av(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rv=`Arrow`,zv=l.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,u.jsx)($.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,u.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});zv.displayName=Rv;var Bv=zv;function Vv(e){let[t,n]=l.useState(void 0);return Sh(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Hv=`Popper`,[Uv,Wv]=bh(Hv),[Gv,Kv]=Uv(Hv),qv=e=>{let{__scopePopper:t,children:n}=e,[r,i]=l.useState(null);return(0,u.jsx)(Gv,{scope:t,anchor:r,onAnchorChange:i,children:n})};qv.displayName=Hv;var Jv=`PopperAnchor`,Yv=l.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Kv(Jv,n),o=l.useRef(null),s=J(t,o),c=l.useRef(null);return l.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,u.jsx)($.div,{...i,ref:s})});Yv.displayName=Jv;var Xv=`PopperContent`,[Zv,Qv]=Uv(Xv),$v=l.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=Kv(Xv,n),[y,b]=l.useState(null),x=J(t,e=>b(e)),[S,C]=l.useState(null),w=Vv(S),T=w?.width??0,ee=w?.height??0,te=r+(a===`center`?``:`-`+a),ne=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(d)?d:[d],E=re.length>0,D={padding:ne,boundary:re.filter(ry),altBoundary:E},{refs:ie,floatingStyles:O,placement:k,isPositioned:ae,middlewareData:A}=kv({strategy:`fixed`,placement:te,whileElementsMounted:(...e)=>hv(...e,{animationFrame:h===`always`}),elements:{reference:v.anchor},middleware:[jv({mainAxis:i+ee,alignmentAxis:o}),c&&Mv({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?Nv():void 0,...D}),c&&Pv({...D}),Fv({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),S&&Lv({element:S,padding:s}),iy({arrowWidth:T,arrowHeight:ee}),m&&Iv({strategy:`referenceHidden`,...D})]}),[oe,se]=ay(k),ce=Uh(g);Sh(()=>{ae&&ce?.()},[ae,ce]);let le=A.arrow?.x,ue=A.arrow?.y,de=A.arrow?.centerOffset!==0,[fe,pe]=l.useState();return Sh(()=>{y&&pe(window.getComputedStyle(y).zIndex)},[y]),(0,u.jsx)(`div`,{ref:ie.setFloating,"data-radix-popper-content-wrapper":``,style:{...O,transform:ae?O.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:fe,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(` `),...A.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,u.jsx)(Zv,{scope:n,placedSide:oe,onArrowChange:C,arrowX:le,arrowY:ue,shouldHideArrow:de,children:(0,u.jsx)($.div,{"data-side":oe,"data-align":se,..._,ref:x,style:{..._.style,animation:ae?void 0:`none`}})})})});$v.displayName=Xv;var ey=`PopperArrow`,ty={top:`bottom`,right:`left`,bottom:`top`,left:`right`},ny=l.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Qv(ey,n),a=ty[i.placedSide];return(0,u.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,u.jsx)(Bv,{...r,ref:t,style:{...r.style,display:`block`}})})});ny.displayName=ey;function ry(e){return e!==null}var iy=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ay(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function ay(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var oy=qv,sy=Yv,cy=$v,ly=ny,uy=`Portal`,dy=l.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=l.useState(!1);Sh(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?d.default.createPortal((0,u.jsx)($.div,{...r,ref:t}),o):null});dy.displayName=uy;function fy(e,t){return l.useReducer((e,n)=>t[e][n]??e,e)}var py=e=>{let{present:t,children:n}=e,r=my(t),i=typeof n==`function`?n({present:r.isPresent}):l.Children.only(n),a=J(r.ref,gy(i));return typeof n==`function`||r.isPresent?l.cloneElement(i,{ref:a}):null};py.displayName=`Presence`;function my(e){let[t,n]=l.useState(),r=l.useRef(null),i=l.useRef(e),a=l.useRef(`none`),[o,s]=fy(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return l.useEffect(()=>{let e=hy(r.current);a.current=o===`mounted`?e:`none`},[o]),Sh(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=hy(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Sh(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=hy(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=hy(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:l.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function hy(e){return e?.animationName||`none`}function gy(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _y=`rovingFocusGroup.onEntryFocus`,vy={bubbles:!1,cancelable:!0},yy=`RovingFocusGroup`,[by,xy,Sy]=Bh(yy),[Cy,wy]=bh(yy,[Sy]),[Ty,Ey]=Cy(yy),Dy=l.forwardRef((e,t)=>(0,u.jsx)(by.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(by.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(Oy,{...e,ref:t})})}));Dy.displayName=yy;var Oy=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=l.useRef(null),h=J(t,m),g=Hh(a),[_,v]=wh({prop:o,defaultProp:s??null,onChange:c,caller:yy}),[y,b]=l.useState(!1),x=Uh(d),S=xy(n),C=l.useRef(!1),[w,T]=l.useState(0);return l.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(_y,x),()=>e.removeEventListener(_y,x)},[x]),(0,u.jsx)(Ty,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:l.useCallback(e=>v(e),[v]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:l.useCallback(()=>T(e=>e-1),[]),children:(0,u.jsx)($.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:Q(e.onMouseDown,()=>{C.current=!0}),onFocus:Q(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(_y,vy);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Py([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:Q(e.onBlur,()=>b(!1))})})}),ky=`RovingFocusGroupItem`,Ay=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Tg(),d=a||c,f=Ey(ky,n),p=f.currentTabStopId===d,m=xy(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f;return l.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),(0,u.jsx)(by.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:(0,u.jsx)($.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:Q(e.onMouseDown,e=>{r?f.onItemFocus(d):e.preventDefault()}),onFocus:Q(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:Q(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ny(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?Fy(n,r+1):n.slice(r+1)}setTimeout(()=>Py(n))}}),children:typeof o==`function`?o({isCurrentTabStop:p,hasTabStop:_!=null}):o})})});Ay.displayName=ky;var jy={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function My(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ny(e,t,n){let r=My(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return jy[r]}function Py(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Fy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Iy=Dy,Ly=Ay;function Ry(e){let t=zy(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(Vy);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function zy(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=Uy(n),i=Hy(r,n.props);return n.type!==l.Fragment&&(i.ref=t?Pp(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var By=Symbol(`radix.slottable`);function Vy(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===By}function Hy(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Uy(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wy=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Gy=new WeakMap,Ky=new WeakMap,qy={},Jy=0,Yy=function(e){return e&&(e.host||Yy(e.parentNode))},Xy=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Yy(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Zy=function(e,t,n,r){var i=Xy(t,Array.isArray(e)?e:[e]);qy[n]||(qy[n]=new WeakMap);var a=qy[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Gy.get(e)||0)+1,l=(a.get(e)||0)+1;Gy.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ky.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Jy++,function(){o.forEach(function(e){var t=Gy.get(e)-1,i=a.get(e)-1;Gy.set(e,t),a.set(e,i),t||(Ky.has(e)||e.removeAttribute(r),Ky.delete(e)),i||e.removeAttribute(n)}),Jy--,Jy||(Gy=new WeakMap,Gy=new WeakMap,Ky=new WeakMap,qy={})}},Qy=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Wy(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Zy(r,i,n,`aria-hidden`)):function(){return null}},$y=function(){return $y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$y.apply(this,arguments)};function eb(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function tb(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var nb=`right-scroll-bar-position`,rb=`width-before-scroll-bar`,ib=`with-scroll-bars-hidden`,ab=`--removed-body-scroll-bar-size`;function ob(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function sb(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var cb=typeof window<`u`?c.useLayoutEffect:c.useEffect,lb=new WeakMap;function ub(e,t){var n=sb(t||null,function(t){return e.forEach(function(e){return ob(e,t)})});return cb(function(){var t=lb.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||ob(e,null)}),i.forEach(function(e){r.has(e)||ob(e,a)})}lb.set(n,e)},[e]),n}function db(e){return e}function fb(e,t){t===void 0&&(t=db);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function pb(e){e===void 0&&(e={});var t=fb(null);return t.options=$y({async:!0,ssr:!1},e),t}var mb=function(e){var t=e.sideCar,n=eb(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return c.createElement(r,$y({},n))};mb.isSideCarExport=!0;function hb(e,t){return e.useMedium(t),mb}var gb=pb(),_b=function(){},vb=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:_b,onWheelCapture:_b,onTouchMoveCapture:_b}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=eb(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=ub([n,t]),w=$y($y({},x),i);return c.createElement(c.Fragment,null,d&&c.createElement(S,{sideCar:gb,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?c.cloneElement(c.Children.only(s),$y($y({},w),{ref:C})):c.createElement(y,$y({},w,{className:l,ref:C}),s))});vb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vb.classNames={fullWidth:rb,zeroRight:nb};var yb,bb=function(){if(yb)return yb;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function xb(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=bb();return t&&e.setAttribute(`nonce`,t),e}function Sb(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cb(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var wb=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xb())&&(Sb(t,n),Cb(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tb=function(){var e=wb();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Eb=function(){var e=Tb();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Db={left:0,top:0,right:0,gap:0},Ob=function(e){return parseInt(e||``,10)||0},kb=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Ob(n),Ob(r),Ob(i)]},Ab=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Db;var t=kb(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jb=Eb(),Mb=`data-scroll-locked`,Nb=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
15
|
+
.${ib} {
|
|
16
|
+
overflow: hidden ${r};
|
|
17
|
+
padding-right: ${s}px ${r};
|
|
18
|
+
}
|
|
19
|
+
body[${Mb}] {
|
|
20
|
+
overflow: hidden ${r};
|
|
21
|
+
overscroll-behavior: contain;
|
|
22
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
23
|
+
padding-left: ${i}px;
|
|
24
|
+
padding-top: ${a}px;
|
|
25
|
+
padding-right: ${o}px;
|
|
26
|
+
margin-left:0;
|
|
27
|
+
margin-top:0;
|
|
28
|
+
margin-right: ${s}px ${r};
|
|
29
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.${nb} {
|
|
33
|
+
right: ${s}px ${r};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.${rb} {
|
|
37
|
+
margin-right: ${s}px ${r};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.${nb} .${nb} {
|
|
41
|
+
right: 0 ${r};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.${rb} .${rb} {
|
|
45
|
+
margin-right: 0 ${r};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
body[${Mb}] {
|
|
49
|
+
${ab}: ${s}px;
|
|
50
|
+
}
|
|
51
|
+
`},Pb=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Fb=function(){c.useEffect(function(){return document.body.setAttribute(Mb,(Pb()+1).toString()),function(){var e=Pb()-1;e<=0?document.body.removeAttribute(Mb):document.body.setAttribute(Mb,e.toString())}},[])},Ib=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Fb();var a=c.useMemo(function(){return Ab(i)},[i]);return c.createElement(jb,{styles:Nb(a,!t,i,n?``:`!important`)})},Lb=!1;if(typeof window<`u`)try{var Rb=Object.defineProperty({},"passive",{get:function(){return Lb=!0,!0}});window.addEventListener(`test`,Rb,Rb),window.removeEventListener(`test`,Rb,Rb)}catch{Lb=!1}var zb=Lb?{passive:!1}:!1,Bb=function(e){return e.tagName===`TEXTAREA`},Vb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Bb(e)&&n[t]===`visible`)},Hb=function(e){return Vb(e,`overflowY`)},Ub=function(e){return Vb(e,`overflowX`)},Wb=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),qb(e,r)){var i=Jb(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gb=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Kb=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},qb=function(e,t){return e===`v`?Hb(t):Ub(t)},Jb=function(e,t){return e===`v`?Gb(t):Kb(t)},Yb=function(e,t){return e===`h`&&t===`rtl`?-1:1},Xb=function(e,t,n,r,i){var a=Yb(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Jb(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&qb(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Zb=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Qb=function(e){return[e.deltaX,e.deltaY]},$b=function(e){return e&&`current`in e?e.current:e},ex=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tx=function(e){return`
|
|
52
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
53
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
54
|
+
`},nx=0,rx=[];function ix(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(nx++)[0],a=c.useState(Eb)[0],o=c.useRef(e);c.useEffect(function(){o.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=tb([e.lockRef.current],(e.shards||[]).map($b),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Zb(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Wb(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Wb(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Xb(h,t,e,h===`h`?s:c,!0)},[]),l=c.useCallback(function(e){var n=e;if(!(!rx.length||rx[rx.length-1]!==a)){var r=`deltaY`in n?Qb(n):Zb(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ex(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map($b).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ax(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=Zb(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,Qb(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,Zb(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return rx.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,zb),document.addEventListener(`touchmove`,l,zb),document.addEventListener(`touchstart`,d,zb),function(){rx=rx.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,zb),document.removeEventListener(`touchmove`,l,zb),document.removeEventListener(`touchstart`,d,zb)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:tx(i)}):null,m?c.createElement(Ib,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ax(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ox=hb(gb,ix),sx=c.forwardRef(function(e,t){return c.createElement(vb,$y({},e,{ref:t,sideCar:ox}))});sx.classNames=vb.classNames;var cx=[`Enter`,` `],lx=[`ArrowDown`,`PageUp`,`Home`],ux=[`ArrowUp`,`PageDown`,`End`],dx=[...lx,...ux],fx={ltr:[...cx,`ArrowRight`],rtl:[...cx,`ArrowLeft`]},px={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},mx=`Menu`,[hx,gx,_x]=Bh(mx),[vx,yx]=bh(mx,[_x,Wv,wy]),bx=Wv(),xx=wy(),[Sx,Cx]=vx(mx),[wx,Tx]=vx(mx),Ex=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=bx(t),[c,d]=l.useState(null),f=l.useRef(!1),p=Uh(a),m=Hh(i);return l.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,u.jsx)(oy,{...s,children:(0,u.jsx)(Sx,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:d,children:(0,u.jsx)(wx,{scope:t,onClose:l.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:o,children:r})})})};Ex.displayName=mx;var Dx=`MenuAnchor`,Ox=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=bx(n);return(0,u.jsx)(sy,{...i,...r,ref:t})});Ox.displayName=Dx;var kx=`MenuPortal`,[Ax,jx]=vx(kx,{forceMount:void 0}),Mx=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Cx(kx,t);return(0,u.jsx)(Ax,{scope:t,forceMount:n,children:(0,u.jsx)(py,{present:n||a.open,children:(0,u.jsx)(dy,{asChild:!0,container:i,children:r})})})};Mx.displayName=kx;var Nx=`MenuContent`,[Px,Fx]=vx(Nx),Ix=l.forwardRef((e,t)=>{let n=jx(Nx,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Cx(Nx,e.__scopeMenu),o=Tx(Nx,e.__scopeMenu);return(0,u.jsx)(hx.Provider,{scope:e.__scopeMenu,children:(0,u.jsx)(py,{present:r||a.open,children:(0,u.jsx)(hx.Slot,{scope:e.__scopeMenu,children:o.modal?(0,u.jsx)(Lx,{...i,ref:t}):(0,u.jsx)(Rx,{...i,ref:t})})})})}),Lx=l.forwardRef((e,t)=>{let n=Cx(Nx,e.__scopeMenu),r=l.useRef(null),i=J(t,r);return l.useEffect(()=>{let e=r.current;if(e)return Qy(e)},[]),(0,u.jsx)(Bx,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Rx=l.forwardRef((e,t)=>{let n=Cx(Nx,e.__scopeMenu);return(0,u.jsx)(Bx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),zx=Ry(`MenuContent.ScrollLock`),Bx=l.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=Cx(Nx,n),y=Tx(Nx,n),b=bx(n),x=xx(n),S=gx(n),[C,w]=l.useState(null),T=l.useRef(null),ee=J(t,T,v.onContentChange),te=l.useRef(0),ne=l.useRef(``),re=l.useRef(0),E=l.useRef(null),D=l.useRef(`right`),ie=l.useRef(0),O=g?sx:l.Fragment,k=g?{as:zx,allowPinchZoom:!0}:void 0,ae=e=>{let t=ne.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=wS(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){ne.current=t,window.clearTimeout(te.current),t!==``&&(te.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};l.useEffect(()=>()=>window.clearTimeout(te.current),[]),ag();let A=l.useCallback(e=>D.current===E.current?.side&&ES(e,E.current?.area),[]);return(0,u.jsx)(Px,{scope:n,searchRef:ne,onItemEnter:l.useCallback(e=>{A(e)&&e.preventDefault()},[A]),onItemLeave:l.useCallback(e=>{A(e)||(T.current?.focus(),w(null))},[A]),onTriggerLeave:l.useCallback(e=>{A(e)&&e.preventDefault()},[A]),pointerGraceTimerRef:re,onPointerGraceIntentChange:l.useCallback(e=>{E.current=e},[]),children:(0,u.jsx)(O,{...k,children:(0,u.jsx)(dg,{asChild:!0,trapped:i,onMountAutoFocus:Q(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,u.jsx)(Zh,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,u.jsx)(Iy,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:Q(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,u.jsx)(cy,{role:`menu`,"aria-orientation":`vertical`,"data-state":yS(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:ee,style:{outline:`none`,..._.style},onKeyDown:Q(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ae(e.key));let i=T.current;if(e.target!==i||!dx.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);ux.includes(e.key)&&a.reverse(),SS(a)}),onBlur:Q(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(te.current),ne.current=``)}),onPointerMove:Q(e.onPointerMove,DS(e=>{let t=e.target,n=ie.current!==e.clientX;e.currentTarget.contains(t)&&n&&(D.current=e.clientX>ie.current?`right`:`left`,ie.current=e.clientX)}))})})})})})})});Ix.displayName=Nx;var Vx=`MenuGroup`,Hx=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{role:`group`,...r,ref:t})});Hx.displayName=Vx;var Ux=`MenuLabel`,Wx=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{...r,ref:t})});Wx.displayName=Ux;var Gx=`MenuItem`,Kx=`menu.itemSelect`,qx=l.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=l.useRef(null),o=Tx(Gx,e.__scopeMenu),s=Fx(Gx,e.__scopeMenu),c=J(t,a),d=l.useRef(!1),f=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Kx,{bubbles:!0,cancelable:!0});e.addEventListener(Kx,e=>r?.(e),{once:!0}),Nh(e,t),t.defaultPrevented?d.current=!1:o.onClose()}};return(0,u.jsx)(Jx,{...i,ref:c,disabled:n,onClick:Q(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:Q(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:Q(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||cx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});qx.displayName=Gx;var Jx=l.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Fx(Gx,n),s=xx(n),c=l.useRef(null),d=J(t,c),[f,p]=l.useState(!1),[m,h]=l.useState(``);return l.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,u.jsx)(hx.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,u.jsx)(Ly,{asChild:!0,...s,focusable:!r,children:(0,u.jsx)($.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:d,onPointerMove:Q(e.onPointerMove,DS(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Q(e.onPointerLeave,DS(e=>o.onItemLeave(e))),onFocus:Q(e.onFocus,()=>p(!0)),onBlur:Q(e.onBlur,()=>p(!1))})})})}),Yx=`MenuCheckboxItem`,Xx=l.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,u.jsx)(iS,{scope:e.__scopeMenu,checked:n,children:(0,u.jsx)(qx,{role:`menuitemcheckbox`,"aria-checked":bS(n)?`mixed`:n,...i,ref:t,"data-state":xS(n),onSelect:Q(i.onSelect,()=>r?.(bS(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Xx.displayName=Yx;var Zx=`MenuRadioGroup`,[Qx,$x]=vx(Zx,{value:void 0,onValueChange:()=>{}}),eS=l.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Uh(r);return(0,u.jsx)(Qx,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,u.jsx)(Hx,{...i,ref:t})})});eS.displayName=Zx;var tS=`MenuRadioItem`,nS=l.forwardRef((e,t)=>{let{value:n,...r}=e,i=$x(tS,e.__scopeMenu),a=n===i.value;return(0,u.jsx)(iS,{scope:e.__scopeMenu,checked:a,children:(0,u.jsx)(qx,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":xS(a),onSelect:Q(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});nS.displayName=tS;var rS=`MenuItemIndicator`,[iS,aS]=vx(rS,{checked:!1}),oS=l.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=aS(rS,n);return(0,u.jsx)(py,{present:r||bS(a.checked)||a.checked===!0,children:(0,u.jsx)($.span,{...i,ref:t,"data-state":xS(a.checked)})})});oS.displayName=rS;var sS=`MenuSeparator`,cS=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});cS.displayName=sS;var lS=`MenuArrow`,uS=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=bx(n);return(0,u.jsx)(ly,{...i,...r,ref:t})});uS.displayName=lS;var dS=`MenuSub`,[fS,pS]=vx(dS),mS=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Cx(dS,t),o=bx(t),[s,c]=l.useState(null),[d,f]=l.useState(null),p=Uh(i);return l.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,u.jsx)(oy,{...o,children:(0,u.jsx)(Sx,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:(0,u.jsx)(fS,{scope:t,contentId:Tg(),triggerId:Tg(),trigger:s,onTriggerChange:c,children:n})})})};mS.displayName=dS;var hS=`MenuSubTrigger`,gS=l.forwardRef((e,t)=>{let n=Cx(hS,e.__scopeMenu),r=Tx(hS,e.__scopeMenu),i=pS(hS,e.__scopeMenu),a=Fx(hS,e.__scopeMenu),o=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,d={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,u.jsx)(Ox,{asChild:!0,...d,children:(0,u.jsx)(Jx,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":yS(n.open),...e,ref:Pp(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Q(e.onPointerMove,DS(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:Q(e.onPointerLeave,DS(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Q(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||fx[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});gS.displayName=hS;var _S=`MenuSubContent`,vS=l.forwardRef((e,t)=>{let n=jx(Nx,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Cx(Nx,e.__scopeMenu),o=Tx(Nx,e.__scopeMenu),s=pS(_S,e.__scopeMenu),c=l.useRef(null),d=J(t,c);return(0,u.jsx)(hx.Provider,{scope:e.__scopeMenu,children:(0,u.jsx)(py,{present:r||a.open,children:(0,u.jsx)(hx.Slot,{scope:e.__scopeMenu,children:(0,u.jsx)(Bx,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:d,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Q(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Q(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:Q(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=px[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});vS.displayName=_S;function yS(e){return e?`open`:`closed`}function bS(e){return e===`indeterminate`}function xS(e){return bS(e)?`indeterminate`:e?`checked`:`unchecked`}function SS(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function CS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function wS(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=CS(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function TS(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ES(e,t){return t?TS({x:e.clientX,y:e.clientY},t):!1}function DS(e){return t=>t.pointerType===`mouse`?e(t):void 0}var OS=Ex,kS=Ox,AS=Mx,jS=Ix,MS=Hx,NS=Wx,PS=qx,FS=Xx,IS=eS,LS=nS,RS=oS,zS=cS,BS=uS,VS=gS,HS=vS,US=`DropdownMenu`,[WS,GS]=bh(US,[yx]),KS=yx(),[qS,JS]=WS(US),YS=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=KS(t),d=l.useRef(null),[f,p]=wh({prop:i,defaultProp:a??!1,onChange:o,caller:US});return(0,u.jsx)(qS,{scope:t,triggerId:Tg(),triggerRef:d,contentId:Tg(),open:f,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(e=>!e),[p]),modal:s,children:(0,u.jsx)(OS,{...c,open:f,onOpenChange:p,dir:r,modal:s,children:n})})};YS.displayName=US;var XS=`DropdownMenuTrigger`,ZS=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=JS(XS,n),o=KS(n);return(0,u.jsx)(kS,{asChild:!0,...o,children:(0,u.jsx)($.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:Pp(t,a.triggerRef),onPointerDown:Q(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Q(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});ZS.displayName=XS;var QS=`DropdownMenuPortal`,$S=e=>{let{__scopeDropdownMenu:t,...n}=e,r=KS(t);return(0,u.jsx)(AS,{...r,...n})};$S.displayName=QS;var eC=`DropdownMenuContent`,tC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JS(eC,n),a=KS(n),o=l.useRef(!1);return(0,u.jsx)(jS,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Q(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Q(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});tC.displayName=eC;var nC=`DropdownMenuGroup`,rC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(MS,{...i,...r,ref:t})});rC.displayName=nC;var iC=`DropdownMenuLabel`,aC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(NS,{...i,...r,ref:t})});aC.displayName=iC;var oC=`DropdownMenuItem`,sC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(PS,{...i,...r,ref:t})});sC.displayName=oC;var cC=`DropdownMenuCheckboxItem`,lC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(FS,{...i,...r,ref:t})});lC.displayName=cC;var uC=`DropdownMenuRadioGroup`,dC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(IS,{...i,...r,ref:t})});dC.displayName=uC;var fC=`DropdownMenuRadioItem`,pC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(LS,{...i,...r,ref:t})});pC.displayName=fC;var mC=`DropdownMenuItemIndicator`,hC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(RS,{...i,...r,ref:t})});hC.displayName=mC;var gC=`DropdownMenuSeparator`,_C=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(zS,{...i,...r,ref:t})});_C.displayName=gC;var vC=`DropdownMenuArrow`,yC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(BS,{...i,...r,ref:t})});yC.displayName=vC;var bC=`DropdownMenuSubTrigger`,xC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(VS,{...i,...r,ref:t})});xC.displayName=bC;var SC=`DropdownMenuSubContent`,CC=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=KS(n);return(0,u.jsx)(HS,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});CC.displayName=SC;var wC=YS,TC=ZS,EC=$S,DC=tC,OC=sC;function kC({...e}){return(0,u.jsx)(wC,{"data-slot":`dropdown-menu`,...e})}function AC({...e}){return(0,u.jsx)(TC,{"data-slot":`dropdown-menu-trigger`,...e})}function jC({className:e,sideOffset:t=4,...n}){return(0,u.jsx)(EC,{children:(0,u.jsx)(DC,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:_h(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,e),...n})})}function MC({className:e,inset:t,variant:n=`default`,...r}){return(0,u.jsx)(OC,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:_h(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function NC(e,[t,n]){return Math.min(n,Math.max(t,e))}function PC(e){let t=FC(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(LC);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function FC(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=zC(n),i=RC(r,n.props);return n.type!==l.Fragment&&(i.ref=t?Pp(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var IC=Symbol(`radix.slottable`);function LC(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===IC}function RC(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function zC(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function BC(e){let t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var VC=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),HC=`VisuallyHidden`,UC=l.forwardRef((e,t)=>(0,u.jsx)($.span,{...e,ref:t,style:{...VC,...e.style}}));UC.displayName=HC;var WC=UC,GC=[` `,`Enter`,`ArrowUp`,`ArrowDown`],KC=[` `,`Enter`],qC=`Select`,[JC,YC,XC]=Bh(qC),[ZC,QC]=bh(qC,[XC,Wv]),$C=Wv(),[ew,tw]=ZC(qC),[nw,rw]=ZC(qC),iw=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,_=$C(t),[v,y]=l.useState(null),[b,x]=l.useState(null),[S,C]=l.useState(!1),w=Hh(d),[T,ee]=wh({prop:r,defaultProp:i??!1,onChange:a,caller:qC}),[te,ne]=wh({prop:o,defaultProp:s,onChange:c,caller:qC}),re=l.useRef(null),E=v?g||!!v.closest(`form`):!0,[D,ie]=l.useState(new Set),O=Array.from(D).map(e=>e.props.value).join(`;`);return(0,u.jsx)(oy,{..._,children:(0,u.jsxs)(ew,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Tg(),value:te,onValueChange:ne,open:T,onOpenChange:ee,dir:w,triggerPointerDownPosRef:re,disabled:m,children:[(0,u.jsx)(JC.Provider,{scope:t,children:(0,u.jsx)(nw,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(e=>{ie(t=>new Set(t).add(e))},[]),onNativeOptionRemove:l.useCallback(e=>{ie(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),E?(0,u.jsxs)($w,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:te,onChange:e=>ne(e.target.value),disabled:m,form:g,children:[te===void 0?(0,u.jsx)(`option`,{value:``}):null,Array.from(D)]},O):null]})})};iw.displayName=qC;var aw=`SelectTrigger`,ow=l.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=$C(n),o=tw(aw,n),s=o.disabled||r,c=J(t,o.onTriggerChange),d=YC(n),f=l.useRef(`touch`),[p,m,h]=tT(e=>{let t=d().filter(e=>!e.disabled),n=nT(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),g=e=>{s||(o.onOpenChange(!0),h()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,u.jsx)(sy,{asChild:!0,...a,children:(0,u.jsx)($.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":eT(o.value)?``:void 0,...i,ref:c,onClick:Q(i.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:Q(i.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:Q(i.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&GC.includes(e.key)&&(g(),e.preventDefault())})})})});ow.displayName=aw;var sw=`SelectValue`,cw=l.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=tw(sw,n),{onValueNodeHasChildrenChange:l}=c,d=a!==void 0,f=J(t,c.onValueNodeChange);return Sh(()=>{l(d)},[l,d]),(0,u.jsx)($.span,{...s,ref:f,style:{pointerEvents:`none`},children:eT(c.value)?(0,u.jsx)(u.Fragment,{children:o}):a})});cw.displayName=sw;var lw=`SelectIcon`,uw=l.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,u.jsx)($.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});uw.displayName=lw;var dw=`SelectPortal`,fw=e=>(0,u.jsx)(dy,{asChild:!0,...e});fw.displayName=dw;var pw=`SelectContent`,mw=l.forwardRef((e,t)=>{let n=tw(pw,e.__scopeSelect),[r,i]=l.useState();if(Sh(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?d.createPortal((0,u.jsx)(gw,{scope:e.__scopeSelect,children:(0,u.jsx)(JC.Slot,{scope:e.__scopeSelect,children:(0,u.jsx)(`div`,{children:e.children})})}),t):null}return(0,u.jsx)(bw,{...e,ref:t})});mw.displayName=pw;var hw=10,[gw,_w]=ZC(pw),vw=`SelectContentImpl`,yw=PC(`SelectContent.RemoveScroll`),bw=l.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=tw(pw,n),[x,S]=l.useState(null),[C,w]=l.useState(null),T=J(t,e=>S(e)),[ee,te]=l.useState(null),[ne,re]=l.useState(null),E=YC(n),[D,ie]=l.useState(!1),O=l.useRef(!1);l.useEffect(()=>{if(x)return Qy(x)},[x]),ag();let k=l.useCallback(e=>{let[t,...n]=E().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[E,C]),ae=l.useCallback(()=>k([ee,x]),[k,ee,x]);l.useEffect(()=>{D&&ae()},[D,ae]);let{onOpenChange:A,triggerPointerDownPosRef:oe}=b;l.useEffect(()=>{if(x){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(oe.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(oe.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||A(!1),document.removeEventListener(`pointermove`,t),oe.current=null};return oe.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,A,oe]),l.useEffect(()=>{let e=()=>A(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[A]);let[se,ce]=tT(e=>{let t=E().filter(e=>!e.disabled),n=nT(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),le=l.useCallback((e,t,n)=>{let r=!O.current&&!n;(b.value!==void 0&&b.value===t||r)&&(te(e),r&&(O.current=!0))},[b.value]),ue=l.useCallback(()=>x?.focus(),[x]),de=l.useCallback((e,t,n)=>{let r=!O.current&&!n;(b.value!==void 0&&b.value===t||r)&&re(e)},[b.value]),fe=r===`popper`?ww:Sw,pe=fe===ww?{side:s,sideOffset:c,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,u.jsx)(gw,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:le,selectedItem:ee,onItemLeave:ue,itemTextRefCallback:de,focusSelectedItem:ae,selectedItemText:ne,position:r,isPositioned:D,searchRef:se,children:(0,u.jsx)(sx,{as:yw,allowPinchZoom:!0,children:(0,u.jsx)(dg,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Q(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,u.jsx)(Zh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,u.jsx)(fe,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...pe,onPlaced:()=>ie(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:Q(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ce(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=E().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>k(t)),e.preventDefault()}})})})})})})});bw.displayName=vw;var xw=`SelectItemAlignedPosition`,Sw=l.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=tw(pw,n),o=_w(pw,n),[s,c]=l.useState(null),[d,f]=l.useState(null),p=J(t,e=>f(e)),m=YC(n),h=l.useRef(!1),g=l.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=o,x=l.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&d&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-hw,d=NC(a,[hw,Math.max(hw,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-hw,d=NC(a,[hw,Math.max(hw,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=m(),c=window.innerHeight-hw*2,l=_.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),b=parseInt(u.paddingBottom,10),x=f+p+l+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),ee=e.top+e.height/2-hw,te=c-ee,ne=v.offsetHeight/2,re=v.offsetTop+ne,E=f+p+re,D=x-E;if(E<=ee){let e=o.length>0&&v===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=d.clientHeight-_.offsetTop-_.offsetHeight,n=E+Math.max(te,ne+(e?T:0)+t+g);s.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;s.style.top=`0px`;let t=Math.max(ee,f+_.offsetTop+(e?w:0)+ne)+D;s.style.height=t+`px`,_.scrollTop=E-ee+_.offsetTop}s.style.margin=`${hw}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,s,d,_,v,y,a.dir,r]);Sh(()=>x(),[x]);let[S,C]=l.useState();return Sh(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]),(0,u.jsx)(Tw,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:l.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]),children:(0,u.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,u.jsx)($.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Sw.displayName=xw;var Cw=`SelectPopperPosition`,ww=l.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=hw,...a}=e,o=$C(n);return(0,u.jsx)(cy,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});ww.displayName=Cw;var[Tw,Ew]=ZC(pw,{}),Dw=`SelectViewport`,Ow=l.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=_w(Dw,n),o=Ew(Dw,n),s=J(t,a.onViewportChange),c=l.useRef(0);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,u.jsx)(JC.Slot,{scope:n,children:(0,u.jsx)($.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Q(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-hw*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});Ow.displayName=Dw;var kw=`SelectGroup`,[Aw,jw]=ZC(kw),Mw=l.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Tg();return(0,u.jsx)(Aw,{scope:n,id:i,children:(0,u.jsx)($.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Mw.displayName=kw;var Nw=`SelectLabel`,Pw=l.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=jw(Nw,n);return(0,u.jsx)($.div,{id:i.id,...r,ref:t})});Pw.displayName=Nw;var Fw=`SelectItem`,[Iw,Lw]=ZC(Fw),Rw=l.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=tw(Fw,n),c=_w(Fw,n),d=s.value===r,[f,p]=l.useState(a??``),[m,h]=l.useState(!1),g=J(t,e=>c.itemRefCallback?.(e,r,i)),_=Tg(),v=l.useRef(`touch`),y=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,u.jsx)(Iw,{scope:n,value:r,disabled:i,textId:_,isSelected:d,onItemTextChange:l.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,u.jsx)(JC.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:(0,u.jsx)($.div,{role:`option`,"aria-labelledby":_,"data-highlighted":m?``:void 0,"aria-selected":d&&m,"data-state":d?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:Q(o.onFocus,()=>h(!0)),onBlur:Q(o.onBlur,()=>h(!1)),onClick:Q(o.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:Q(o.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:Q(o.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:Q(o.onPointerMove,e=>{v.current=e.pointerType,i?c.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Q(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Q(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(KC.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})});Rw.displayName=Fw;var zw=`SelectItemText`,Bw=l.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=tw(zw,n),s=_w(zw,n),c=Lw(zw,n),f=rw(zw,n),[p,m]=l.useState(null),h=J(t,e=>m(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),g=p?.textContent,_=l.useMemo(()=>(0,u.jsx)(`option`,{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=f;return Sh(()=>(v(_),()=>y(_)),[v,y,_]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)($.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?d.createPortal(a.children,o.valueNode):null]})});Bw.displayName=zw;var Vw=`SelectItemIndicator`,Hw=l.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Lw(Vw,n).isSelected?(0,u.jsx)($.span,{"aria-hidden":!0,...r,ref:t}):null});Hw.displayName=Vw;var Uw=`SelectScrollUpButton`,Ww=l.forwardRef((e,t)=>{let n=_w(Uw,e.__scopeSelect),r=Ew(Uw,e.__scopeSelect),[i,a]=l.useState(!1),o=J(t,r.onScrollButtonChange);return Sh(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,u.jsx)(qw,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ww.displayName=Uw;var Gw=`SelectScrollDownButton`,Kw=l.forwardRef((e,t)=>{let n=_w(Gw,e.__scopeSelect),r=Ew(Gw,e.__scopeSelect),[i,a]=l.useState(!1),o=J(t,r.onScrollButtonChange);return Sh(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,u.jsx)(qw,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Kw.displayName=Gw;var qw=l.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=_w(`SelectScrollButton`,n),o=l.useRef(null),s=YC(n),c=l.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Sh(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,u.jsx)($.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Q(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Q(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Q(i.onPointerLeave,()=>{c()})})}),Jw=`SelectSeparator`,Yw=l.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,u.jsx)($.div,{"aria-hidden":!0,...r,ref:t})});Yw.displayName=Jw;var Xw=`SelectArrow`,Zw=l.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=$C(n),a=tw(Xw,n),o=_w(Xw,n);return a.open&&o.position===`popper`?(0,u.jsx)(ly,{...i,...r,ref:t}):null});Zw.displayName=Xw;var Qw=`SelectBubbleInput`,$w=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=l.useRef(null),a=J(r,i),o=BC(t);return l.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,u.jsx)($.select,{...n,style:{...VC,...n.style},ref:a,defaultValue:t})});$w.displayName=Qw;function eT(e){return e===``||e===void 0}function tT(e){let t=Uh(e),n=l.useRef(``),r=l.useRef(0),i=l.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=l.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function nT(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=rT(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function rT(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var iT=iw,aT=ow,oT=cw,sT=uw,cT=fw,lT=mw,uT=Ow,dT=Rw,fT=Bw,pT=Hw,mT=Ww,hT=Kw;function gT({...e}){return(0,u.jsx)(iT,{"data-slot":`select`,...e})}function _T({...e}){return(0,u.jsx)(oT,{"data-slot":`select-value`,...e})}function vT({className:e,size:t=`default`,children:n,...r}){return(0,u.jsxs)(aT,{"data-slot":`select-trigger`,"data-size":t,className:_h(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-1 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-[var(--height-form-control)] data-[size=default]:min-h-[var(--height-form-control)] data-[size=default]:max-h-[var(--height-form-control)] data-[size=sm]:h-8 data-[size=sm]:min-h-8 data-[size=sm]:max-h-8 data-[size=sm]:py-2 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,u.jsx)(sT,{asChild:!0,children:(0,u.jsx)(w,{className:`size-4 opacity-50`})})]})}function yT({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,u.jsx)(cT,{children:(0,u.jsxs)(lT,{"data-slot":`select-content`,className:_h(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,u.jsx)(xT,{}),(0,u.jsx)(uT,{className:_h(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,u.jsx)(ST,{})]})})}function bT({className:e,children:t,...n}){return(0,u.jsxs)(dT,{"data-slot":`select-item`,className:_h(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,u.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,u.jsx)(pT,{children:(0,u.jsx)(C,{className:`size-4`})})}),(0,u.jsx)(fT,{children:t})]})}function xT({className:e,...t}){return(0,u.jsx)(mT,{"data-slot":`select-scroll-up-button`,className:_h(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,u.jsx)(T,{className:`size-4`})})}function ST({className:e,...t}){return(0,u.jsx)(hT,{"data-slot":`select-scroll-down-button`,className:_h(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,u.jsx)(w,{className:`size-4`})})}var CT=Symbol(`radix.slottable`);function wT(e){let t=({children:e})=>(0,u.jsx)(u.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=CT,t}var[TT,ET]=bh(`Tooltip`,[Wv]),DT=Wv(),OT=`TooltipProvider`,kT=700,AT=`tooltip.open`,[jT,MT]=TT(OT),NT=e=>{let{__scopeTooltip:t,delayDuration:n=kT,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=l.useRef(!0),s=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,u.jsx)(jT,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:l.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};NT.displayName=OT;var PT=`Tooltip`,[FT,IT]=TT(PT),LT=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=MT(PT,e.__scopeTooltip),d=DT(t),[f,p]=l.useState(null),m=Tg(),h=l.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=l.useRef(!1),[y,b]=wh({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(AT))):c.onClose(),a?.(e)},caller:PT}),x=l.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);return l.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,u.jsx)(oy,{...d,children:(0,u.jsx)(FT,{scope:t,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?w():S()},[c.isOpenDelayedRef,w,S]),onTriggerLeave:l.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:n})})};LT.displayName=PT;var RT=`TooltipTrigger`,zT=l.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=IT(RT,n),a=MT(RT,n),o=DT(n),s=J(t,l.useRef(null),i.onTriggerChange),c=l.useRef(!1),d=l.useRef(!1),f=l.useCallback(()=>c.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,u.jsx)(sy,{asChild:!0,...o,children:(0,u.jsx)($.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Q(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Q(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Q(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:Q(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Q(e.onBlur,i.onClose),onClick:Q(e.onClick,i.onClose)})})});zT.displayName=RT;var BT=`TooltipPortal`,[VT,HT]=TT(BT,{forceMount:void 0}),UT=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=IT(BT,t);return(0,u.jsx)(VT,{scope:t,forceMount:n,children:(0,u.jsx)(py,{present:n||a.open,children:(0,u.jsx)(dy,{asChild:!0,container:i,children:r})})})};UT.displayName=BT;var WT=`TooltipContent`,GT=l.forwardRef((e,t)=>{let n=HT(WT,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=IT(WT,e.__scopeTooltip);return(0,u.jsx)(py,{present:r||o.open,children:o.disableHoverableContent?(0,u.jsx)(XT,{side:i,...a,ref:t}):(0,u.jsx)(KT,{side:i,...a,ref:t})})}),KT=l.forwardRef((e,t)=>{let n=IT(WT,e.__scopeTooltip),r=MT(WT,e.__scopeTooltip),i=l.useRef(null),a=J(t,i),[o,s]=l.useState(null),{trigger:c,onClose:d}=n,f=i.current,{onPointerInTransitChange:p}=r,m=l.useCallback(()=>{s(null),p(!1)},[p]),h=l.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=eE(r,$T(r,n.getBoundingClientRect())),a=tE(t.getBoundingClientRect());s(rE([...i,...a])),p(!0)},[p]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&f){let e=e=>h(e,f),t=e=>h(e,c);return c.addEventListener(`pointerleave`,e),f.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),f.removeEventListener(`pointerleave`,t)}}},[c,f,h,m]),l.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||f?.contains(t),i=!nE(n,o);r?m():i&&(m(),d())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,f,o,d,m]),(0,u.jsx)(XT,{...e,ref:a})}),[qT,JT]=TT(PT,{isInside:!1}),YT=wT(`TooltipContent`),XT=l.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=IT(WT,n),d=DT(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(AT,f),()=>document.removeEventListener(AT,f)),[f]),l.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,f]),(0,u.jsx)(Zh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,u.jsxs)(cy,{"data-state":c.stateAttribute,...d,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,u.jsx)(YT,{children:r}),(0,u.jsx)(qT,{scope:n,isInside:!0,children:(0,u.jsx)(WC,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});GT.displayName=WT;var ZT=`TooltipArrow`,QT=l.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=DT(n);return JT(ZT,n).isInside?null:(0,u.jsx)(ly,{...i,...r,ref:t})});QT.displayName=ZT;function $T(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function eE(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function tE(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function nE(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function rE(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),iE(t)}function iE(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var aE=LT,oE=zT,sE=UT,cE=GT,lE=QT;function uE({...e}){return(0,u.jsx)(aE,{"data-slot":`tooltip`,...e})}function dE({...e}){return(0,u.jsx)(oE,{"data-slot":`tooltip-trigger`,...e})}function fE({className:e,sideOffset:t=0,children:n,...r}){return(0,u.jsx)(sE,{children:(0,u.jsxs)(cE,{"data-slot":`tooltip-content`,sideOffset:t,className:_h(`bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,e),...r,children:[n,(0,u.jsx)(lE,{className:`bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}var pE=l.createContext([]),mE=class e extends La{__value;static getType(){return`token`}static clone(t){return new e(t.__value,t.__key)}constructor(e,t){super(t),this.__value=e}getValue(){return this.__value}createDOM(){let e=document.createElement(`span`);return e.style.display=`inline`,e}updateDOM(){return!1}isInline(){return!0}exportJSON(){return{type:`token`,value:this.__value,version:1}}static importJSON(e){return hE(e.value)}decorate(e){return(0,u.jsx)(_E,{value:this.__value,nodeKey:this.__key,editor:e})}};function hE(e){return new mE(e)}function gE(e){return e instanceof mE}function _E({value:e,nodeKey:t,editor:n}){let r=l.useContext(pE).find(t=>t.value===e)?.label??e,i=l.useCallback(()=>{n.update(()=>{let e=Do(t);e&&e.remove()})},[n,t]);return(0,u.jsxs)(`span`,{contentEditable:!1,"data-lexical-decorator":`true`,className:`bg-muted text-foreground inline-flex h-[22px] w-fit items-center justify-center gap-0.5 rounded-sm pl-1.5 pr-0 text-xs font-medium whitespace-nowrap select-none mx-0.5 align-middle cursor-default`,children:[r,(0,u.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":`Remove ${r}`,onMouseDown:e=>e.preventDefault(),onClick:i,className:`inline-flex h-5 w-5 shrink-0 items-center justify-center rounded opacity-50 hover:opacity-100 outline-none`,children:(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,u.jsx)(`path`,{d:`M18 6 6 18`}),(0,u.jsx)(`path`,{d:`m6 6 12 12`})]})})]})}var vE=[{label:`12`,value:`12px`},{label:`14`,value:`14px`},{label:`16`,value:`16px`},{label:`18`,value:`18px`},{label:`20`,value:`20px`},{label:`24`,value:`24px`},{label:`30`,value:`30px`}],yE={paragraph:`mb-2 last:mb-0`,text:{bold:`font-semibold`,italic:`italic`,underline:`underline underline-offset-2`},list:{ul:`my-2 list-disc pl-6`,ol:`my-2 list-decimal pl-6`,listitem:`my-1`}};function bE(e){let t=e;for(;t;){if(q(t))return t;t=t.getParent()}return null}function xE(e){let t=e;for(;t;){if(K(t))return t;t=t.getParent()}return null}function SE(e){return String(e).replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`)}function CE(e){return SE(e).replaceAll("`",```)}function wE(e=``){return e.match(/font-size:\s*([^;]+)/i)?.[1]?.trim()||``}function TE(e){let t=SE(e.getTextContent());e.hasFormat(`bold`)&&(t=`<strong>${t}</strong>`),e.hasFormat(`italic`)&&(t=`<em>${t}</em>`),e.hasFormat(`underline`)&&(t=`<u>${t}</u>`);let n=wE(e.getStyle());return n&&(t=`<span style="font-size: ${CE(n)};">${t}</span>`),t}function EE(e){if(gE(e))return`{{${e.getValue()}}}`;if(P(e))return TE(e);if(si(e))return`<br />`;let t=e.getChildren().map(EE).join(``);if(Ja(e))return t?`<p>${t}</p>`:`<p><br /></p>`;if(q(e)){let n=e.getListType()===`number`?`ol`:`ul`;return`<${n}>${t}</${n}>`}return K(e)?`<li>${t||`<br />`}</li>`:t}function DE(e){return e.read(()=>No().getChildren().map(EE).join(``))}var OE=/(\{\{[^}]+\}\})/;function kE(e,t){let n=wi(e);return t.bold&&n.toggleFormat(`bold`),t.italic&&n.toggleFormat(`italic`),t.underline&&n.toggleFormat(`underline`),t.fontSize&&n.setStyle(`font-size: ${t.fontSize}`),n}function AE(e,t,n){jE(t,n).forEach(t=>e.append(t))}function jE(e,t={}){if(!e)return[];if(e.nodeType===Node.TEXT_NODE){let n=e.textContent??``;if(!n)return[];let r=n.split(OE);return r.length===1?[kE(n,t)]:r.filter(e=>e!==``).map(e=>{let n=e.match(/^\{\{([^}]+)\}\}$/);return n?hE(String(n[1]).trim()):kE(e,t)})}if(e.nodeType!==Node.ELEMENT_NODE)return[];let n=e,r=n.tagName.toLowerCase(),i={...t};if((r===`strong`||r===`b`)&&(i.bold=!0),(r===`em`||r===`i`)&&(i.italic=!0),r===`u`&&(i.underline=!0),n.style?.fontSize&&(i.fontSize=n.style.fontSize),r===`br`)return[oi()];if(r===`p`||r===`div`){let e=B();return Array.from(n.childNodes).forEach(t=>{AE(e,t,i)}),e.getChildrenSize()===0&&e.append(wi(``)),[e]}if(r===`ul`){let e=hp(`bullet`);return Array.from(n.children).filter(e=>e.tagName?.toLowerCase()===`li`).forEach(t=>{jE(t,i).forEach(t=>e.append(t))}),[e]}if(r===`ol`){let e=hp(`number`);return Array.from(n.children).filter(e=>e.tagName?.toLowerCase()===`li`).forEach(t=>{jE(t,i).forEach(t=>e.append(t))}),[e]}if(r===`li`){let e=up();return Array.from(n.childNodes).forEach(t=>{let n=t.tagName?.toLowerCase?.();if(n===`ul`||n===`ol`){jE(t,i).forEach(t=>e.append(t));return}AE(e,t,i)}),e.getChildrenSize()===0&&e.append(wi(``)),[e]}return Array.from(n.childNodes).flatMap(e=>jE(e,i))}function ME(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).split(/\r?\n\r?\n/).map(e=>`<p>${e.replace(/\r?\n/g,`<br />`)}</p>`).join(``)}function NE(e,t,n){e.update(()=>{let e=No();if(e.clear(),!t?.trim()){e.append(B());return}let n=t.trimStart().startsWith(`<`)?t:ME(t),r=new DOMParser().parseFromString(n,`text/html`),i=Array.from(r.body.childNodes).flatMap(e=>jE(e)),a=[],o=null;if(i.forEach(e=>{if(Ja(e)||q(e)){o=null,a.push(e);return}o||(o=B(),a.push(o)),o.append(e)}),a.length===0){e.append(B());return}a.forEach(t=>e.append(t))},{onUpdate:n})}function PE({active:e,disabled:t,onClick:n,title:r,children:i}){return(0,u.jsx)(yh,{type:`button`,title:r,variant:e?`secondary`:`ghost`,size:`icon-xs`,disabled:t,onMouseDown:e=>e.preventDefault(),onClick:n,style:e?{color:`var(--brand-teal-70)`,borderColor:`var(--brand-teal-70)`,backgroundColor:`color-mix(in srgb, var(--brand-teal-70) 12%, transparent)`}:void 0,className:_h(`h-8 w-8`,e&&`hover:opacity-90`,t&&`cursor-not-allowed opacity-50`),children:i})}function FE(e,t){return l.useCallback(n=>{let r=n===`bullet`?t.bullet:t.numbered,i=n===`bullet`?_p:vp;if(!r){e.dispatchCommand(i,void 0);return}e.update(()=>{let t=I();if(!F(t)||!t.isCollapsed()){e.dispatchCommand(yp,void 0);return}let r=xE(t.anchor.getNode()),i=r?bE(r):null;if(!q(i)||i.getListType()!==n){e.dispatchCommand(yp,void 0);return}let a=B();if(r.getTextContent().trim().length!==0){e.dispatchCommand(yp,void 0);return}r.getPreviousSibling()==null&&r.getNextSibling()==null?i.replace(a):(r.remove(),i.insertAfter(a)),a.selectEnd()})},[e,t.bullet,t.numbered])}function IE({disabled:e,tokenOptions:t,onInsertToken:n}){let[r]=O(),[i,a]=l.useState(`16px`),[o,s]=l.useState({bold:!1,italic:!1,underline:!1,bullet:!1,numbered:!1}),c=l.useCallback(()=>{r.getEditorState().read(()=>{let e=I();if(!F(e))return;let t=e.getNodes(),n=t.some(e=>{let t=bE(e);return q(t)&&t.getListType()===`bullet`}),r=t.some(e=>{let t=bE(e);return q(t)&&t.getListType()===`number`}),i=gl(e,`font-size`,`16px`);s({bold:e.hasFormat(`bold`),italic:e.hasFormat(`italic`),underline:e.hasFormat(`underline`),bullet:n,numbered:r}),a(e=>i||e||`16px`)})},[r]);l.useEffect(()=>r.registerCommand(cn,()=>(c(),!1),1),[r,c]),l.useEffect(()=>r.registerUpdateListener(()=>c()),[r,c]);let d=l.useCallback(e=>{a(e),r.update(()=>{let t=I();F(t)&&ol(t,{"font-size":e})})},[r]),f=FE(r,o);return(0,u.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-border px-3 py-2`,children:[(0,u.jsx)(`div`,{onMouseDown:e=>e.preventDefault(),children:(0,u.jsxs)(gT,{value:i,disabled:e,onValueChange:d,children:[(0,u.jsx)(vT,{className:`h-8 min-h-8 w-[92px] text-sm`,children:(0,u.jsx)(_T,{placeholder:`16px`})}),(0,u.jsx)(yT,{children:vE.map(e=>(0,u.jsxs)(bT,{value:e.value,children:[e.label,`px`]},e.value))})]})}),(0,u.jsx)(PE,{active:o.bold,disabled:e,title:`Bold`,onClick:()=>r.dispatchCommand(Cn,`bold`),children:(0,u.jsx)(S,{className:`h-4 w-4`})}),(0,u.jsx)(PE,{active:o.italic,disabled:e,title:`Italic`,onClick:()=>r.dispatchCommand(Cn,`italic`),children:(0,u.jsx)(ee,{className:`h-4 w-4`})}),(0,u.jsx)(PE,{active:o.underline,disabled:e,title:`Underline`,onClick:()=>r.dispatchCommand(Cn,`underline`),children:(0,u.jsx)(E,{className:`h-4 w-4`})}),(0,u.jsx)(PE,{active:o.bullet,disabled:e,title:`Bullet list`,onClick:()=>f(`bullet`),children:(0,u.jsx)(ne,{className:`h-4 w-4`})}),(0,u.jsx)(PE,{active:o.numbered,disabled:e,title:`Numbered list`,onClick:()=>f(`number`),children:(0,u.jsx)(te,{className:`h-4 w-4`})}),t.length>0&&(0,u.jsx)(`div`,{className:`ml-auto`,onMouseDown:e=>e.preventDefault(),children:(0,u.jsxs)(kC,{modal:!1,children:[(0,u.jsxs)(uE,{children:[(0,u.jsx)(dE,{asChild:!0,children:(0,u.jsx)(AC,{asChild:!0,children:(0,u.jsx)(yh,{type:`button`,variant:`ghost`,size:`icon`,className:`h-8 w-8 text-muted-foreground`,"aria-label":`Insert placeholder`,disabled:e,children:(0,u.jsx)(re,{className:`h-3.5 w-3.5`})})})}),(0,u.jsx)(fE,{side:`left`,children:`Insert placeholder`})]}),(0,u.jsx)(jC,{align:`end`,className:`max-h-72 w-72 overflow-auto`,children:t.map(e=>(0,u.jsx)(MC,{onClick:()=>n(e.value),children:e.label},e.value))})]})})]})}function LE({disabled:e}){let[t]=O();return l.useEffect(()=>{t.setEditable(!e)},[t,e]),null}function RE({syncState:e,value:t}){let[n]=O();return l.useEffect(()=>{let r=t??``;if(r===e.current.lastKnownHtml||e.current.lastChangeSource===`local`&&r===e.current.lastExternalHtml)return;let i=e.current.lastApplyVersion+1;e.current.lastApplyVersion=i,e.current.lastKnownHtml=r,e.current.lastExternalHtml=r,e.current.lastChangeSource=`external`,e.current.isApplyingExternalValue=!0;let a=!1;return NE(n,r,()=>{!a&&e.current.lastApplyVersion===i&&(e.current.isApplyingExternalValue=!1)}),()=>{a=!0,e.current.lastApplyVersion===i&&(e.current.isApplyingExternalValue=!1)}},[n,t]),null}function zE({inserterRef:e}){let[t]=O();return l.useEffect(()=>{e.current=e=>{t.focus(()=>{t.update(()=>{let t=I(),n=hE(e);if(F(t))t.insertNodes([n]);else{let e=No(),t=e.getLastChild();(Ja(t)?t:(()=>{let t=B();return e.append(t),t})()).append(n)}})})}},[t,e]),null}function BE({className:e,contentClassName:t,disabled:n,id:r,maxHeight:i,minHeight:a,name:o,onChange:s,placeholder:c,tokenOptions:d,value:f}){let p=l.useRef({isApplyingExternalValue:!1,lastKnownHtml:null,lastExternalHtml:null,lastChangeSource:`external`,lastApplyVersion:0}),m=l.useRef(null),h=l.useCallback(e=>{m.current?.(e)},[]);return(0,u.jsxs)(`div`,{className:_h(`border-input bg-transparent focus-within:border-ring focus-within:ring-ring/50 overflow-hidden rounded-md border transition-[color,box-shadow] focus-within:ring-[3px]`,n&&`cursor-not-allowed opacity-50`,e),children:[!n&&(0,u.jsx)(IE,{disabled:n,tokenOptions:d,onInsertToken:h}),(0,u.jsx)(`div`,{className:`relative overflow-y-auto`,style:{maxHeight:i},children:(0,u.jsx)(Of,{contentEditable:(0,u.jsx)(Pf,{className:_h(`px-3 py-2 text-base leading-6 text-foreground outline-none`,n&&`pointer-events-none`,t),style:{minHeight:a}}),placeholder:(0,u.jsx)(`div`,{className:`pointer-events-none absolute left-3 top-2 text-sm text-muted-foreground`,children:c}),ErrorBoundary:Dp})}),(0,u.jsx)(Hf,{}),(0,u.jsx)(Sp,{}),(0,u.jsx)(LE,{disabled:n}),(0,u.jsx)(RE,{syncState:p,value:f}),(0,u.jsx)(zE,{inserterRef:m}),(0,u.jsx)(Wf,{ignoreSelectionChange:!0,onChange:e=>{let t=DE(e);t!==p.current.lastKnownHtml&&(p.current.lastKnownHtml=t,p.current.lastChangeSource=`local`,!p.current.isApplyingExternalValue&&s?.({target:{value:t,name:o,id:r}}))}})]})}var VE=24,HE=16;function UE(e){return Array.isArray(e)?e.filter(e=>e!=null&&e!==``).map(e=>typeof e==`string`?{value:e,label:e}:{value:String(e.value),label:String(e.label||e.value)}).filter(e=>e.value):[]}function WE({className:e,contentClassName:t,disabled:n=!1,id:r,maxHeight:i=`280px`,minHeight:a,name:o,rows:s,onChange:c,placeholder:d=`Start writing...`,placeholderChips:f,placeholderMeta:p,value:m=``}){let h=a??(s==null?160:s*VE+HE),g=l.useMemo(()=>UE(f??p),[f,p]),_=l.useMemo(()=>({namespace:`RichTextareaWithChips`,editable:!0,onError(e){throw e},theme:yE,nodes:[dp,op,mE]}),[]);return(0,u.jsx)(pE.Provider,{value:g,children:(0,u.jsx)(Yc,{initialConfig:_,children:(0,u.jsx)(BE,{className:e,contentClassName:t,disabled:n,id:r,maxHeight:i,minHeight:h,name:o,onChange:c,placeholder:d,tokenOptions:g,value:m})})})}var GE=WE,KE=WE,qE=GE;exports.RichInputWithPlaceholderChips=GE,exports.RichTextareaWithPlaceholderChips=KE,exports.default=qE;
|