@matthiaskrijgsman/mat-ui 0.0.30 → 0.0.32
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 +30 -1
- package/dist/components/inputs/input-lexical/InputLexical.d.ts +5 -1
- package/dist/index.js +2515 -22698
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -3
- package/dist/index.umd.cjs +0 -236
- package/dist/index.umd.cjs.map +0 -1
package/dist/index.umd.cjs
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
(function(ie,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],N):(ie=typeof globalThis<"u"?globalThis:ie||self,N(ie.MatUI={},ie.React,ie.ReactDOM))})(this,(function(ie,N,Ul){"use strict";"use client";function cp(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const O=cp(N),up=cp(Ul);function dp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fs={exports:{}},lo={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var fp;function dw(){if(fp)return lo;fp=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,o){var s=null;if(o!==void 0&&(s=""+o),r.key!==void 0&&(s=""+r.key),"key"in r){o={};for(var a in r)a!=="key"&&(o[a]=r[a])}else o=r;return r=o.ref,{$$typeof:t,type:i,key:s,ref:r!==void 0?r:null,props:o}}return lo.Fragment=e,lo.jsx=n,lo.jsxs=n,lo}var co={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var pp;function fw(){return pp||(pp=1,process.env.NODE_ENV!=="production"&&(function(){function t(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===A?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case m:return"Fragment";case y:return"Profiler";case g:return"StrictMode";case _:return"Suspense";case C:return"SuspenseList";case k:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case h:return"Portal";case b:return(T.displayName||"Context")+".Provider";case x:return(T._context.displayName||"Context")+".Consumer";case w:var M=T.render;return T=T.displayName,T||(T=M.displayName||M.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case E:return M=T.displayName||null,M!==null?M:t(T.type)||"Memo";case S:M=T._payload,T=T._init;try{return t(T(M))}catch{}}return null}function e(T){return""+T}function n(T){try{e(T);var M=!1}catch{M=!0}if(M){M=console;var F=M.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return F.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),e(T)}}function i(T){if(T===m)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===S)return"<...>";try{var M=t(T);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function r(){var T=P.A;return T===null?null:T.getOwner()}function o(){return Error("react-stack-top-frame")}function s(T){if(X.call(T,"key")){var M=Object.getOwnPropertyDescriptor(T,"key").get;if(M&&M.isReactWarning)return!1}return T.key!==void 0}function a(T,M){function F(){Y||(Y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}F.isReactWarning=!0,Object.defineProperty(T,"key",{get:F,configurable:!0})}function l(){var T=t(this.type);return V[T]||(V[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function c(T,M,F,B,J,K,ee,j){return F=K.ref,T={$$typeof:p,type:T,key:M,props:K,_owner:J},(F!==void 0?F:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:l}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:j}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function u(T,M,F,B,J,K,ee,j){var U=M.children;if(U!==void 0)if(B)if(W(U)){for(B=0;B<U.length;B++)d(U[B]);Object.freeze&&Object.freeze(U)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(U);if(X.call(M,"key")){U=t(T);var oe=Object.keys(M).filter(function(Le){return Le!=="key"});B=0<oe.length?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}",G[U+B]||(oe=0<oe.length?"{"+oe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
-
let props = %s;
|
|
19
|
-
<%s {...props} />
|
|
20
|
-
React keys must be passed directly to JSX without using spread:
|
|
21
|
-
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,B,U,oe,U),G[U+B]=!0)}if(U=null,F!==void 0&&(n(F),U=""+F),s(M)&&(n(M.key),U=""+M.key),"key"in M){F={};for(var ae in M)ae!=="key"&&(F[ae]=M[ae])}else F=M;return U&&a(F,typeof T=="function"?T.displayName||T.name||"Unknown":T),c(T,U,K,J,r(),F,ee,j)}function d(T){typeof T=="object"&&T!==null&&T.$$typeof===p&&T._store&&(T._store.validated=1)}var f=N,p=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),b=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),P=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,W=Array.isArray,I=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(T){return T()}};var Y,V={},z=f.react_stack_bottom_frame.bind(f,o)(),$=I(i(o)),G={};co.Fragment=m,co.jsx=function(T,M,F,B,J){var K=1e4>P.recentlyCreatedOwnerStacks++;return u(T,M,F,!1,B,J,K?Error("react-stack-top-frame"):z,K?I(i(T)):$)},co.jsxs=function(T,M,F,B,J){var K=1e4>P.recentlyCreatedOwnerStacks++;return u(T,M,F,!0,B,J,K?Error("react-stack-top-frame"):z,K?I(i(T)):$)}})()),co}var hp;function pw(){return hp||(hp=1,process.env.NODE_ENV==="production"?Fs.exports=dw():Fs.exports=fw()),Fs.exports}var v=pw();const Q=(...t)=>t.filter(Boolean).join(" "),ql=N.createContext({});function Hl(t){const e=N.useRef(null);return e.current===null&&(e.current=t()),e.current}const Yl=typeof window<"u",mp=Yl?N.useLayoutEffect:N.useEffect,Ls=N.createContext(null);function Gl(t,e){t.indexOf(e)===-1&&t.push(e)}function $s(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const _n=(t,e,n)=>n>e?e:n<t?t:n;function Xl(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let cr=()=>{},Ot=()=>{};process.env.NODE_ENV!=="production"&&(cr=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Xl(e,n))},Ot=(t,e,n)=>{if(!t)throw new Error(Xl(e,n))});const wn={},gp=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function yp(t){return typeof t=="object"&&t!==null}const vp=t=>/^0[^.\s]+$/u.test(t);function Jl(t){let e;return()=>(e===void 0&&(e=t()),e)}const Mt=t=>t,hw=(t,e)=>n=>e(t(n)),uo=(...t)=>t.reduce(hw),ur=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};class Zl{constructor(){this.subscriptions=[]}add(e){return Gl(this.subscriptions,e),()=>$s(this.subscriptions,e)}notify(e,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,n,i);else for(let o=0;o<r;o++){const s=this.subscriptions[o];s&&s(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const It=t=>t*1e3,ln=t=>t/1e3;function xp(t,e){return e?t*(1e3/e):0}const bp=new Set;function Ql(t,e,n){t||bp.has(e)||(console.warn(Xl(e,n)),bp.add(e))}const mw=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},_p=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,gw=1e-7,yw=12;function vw(t,e,n,i,r){let o,s,a=0;do s=e+(n-e)/2,o=_p(s,i,r)-t,o>0?n=s:e=s;while(Math.abs(o)>gw&&++a<yw);return s}function fo(t,e,n,i){if(t===e&&n===i)return Mt;const r=o=>vw(o,0,1,t,n);return o=>o===0||o===1?o:_p(r(o),e,i)}const wp=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Sp=t=>e=>1-t(1-e),Cp=fo(.33,1.53,.69,.99),ec=Sp(Cp),kp=wp(ec),Tp=t=>(t*=2)<1?.5*ec(t):.5*(2-Math.pow(2,-10*(t-1))),tc=t=>1-Math.sin(Math.acos(t)),Ep=Sp(tc),Np=wp(tc),xw=fo(.42,0,1,1),bw=fo(0,0,.58,1),Ap=fo(.42,0,.58,1),Pp=t=>Array.isArray(t)&&typeof t[0]!="number";function Dp(t,e){return Pp(t)?t[mw(0,t.length,e)]:t}const Op=t=>Array.isArray(t)&&typeof t[0]=="number",Mp={linear:Mt,easeIn:xw,easeInOut:Ap,easeOut:bw,circIn:tc,circInOut:Np,circOut:Ep,backIn:ec,backInOut:kp,backOut:Cp,anticipate:Tp},_w=t=>typeof t=="string",Ip=t=>{if(Op(t)){Ot(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,r]=t;return fo(e,n,i,r)}else if(_w(t))return Ot(Mp[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Mp[t];return t},zs=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ww(t,e){let n=new Set,i=new Set,r=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const h=f&&r?n:i;return d&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{i.delete(u),s.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0,[n,i]=[i,n],n.forEach(l),n.clear(),r=!1,o&&(o=!1,c.process(u))}};return c}const Sw=40;function jp(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=zs.reduce((b,w)=>(b[w]=ww(o),b),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=s,m=()=>{const b=wn.useManualTiming?r.timestamp:performance.now();n=!1,wn.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(b-r.timestamp,Sw),1)),r.timestamp=b,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),p.process(r),h.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(m))},g=()=>{n=!0,i=!0,r.isProcessing||t(m)};return{schedule:zs.reduce((b,w)=>{const _=s[w];return b[w]=(C,E=!1,S=!1)=>(n||g(),_.schedule(C,E,S)),b},{}),cancel:b=>{for(let w=0;w<zs.length;w++)s[zs[w]].cancel(b)},state:r,steps:s}}const{schedule:Oe,cancel:Un,state:et,steps:nc}=jp(typeof requestAnimationFrame<"u"?requestAnimationFrame:Mt,!0);let Bs;function Cw(){Bs=void 0}const wt={now:()=>(Bs===void 0&&wt.set(et.isProcessing||wn.useManualTiming?et.timestamp:performance.now()),Bs),set:t=>{Bs=t,queueMicrotask(Cw)}},Rp=t=>e=>typeof e=="string"&&e.startsWith(t),ic=Rp("--"),kw=Rp("var(--"),rc=t=>kw(t)?Tw.test(t.split("/*")[0].trim()):!1,Tw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dr={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},po={...dr,transform:t=>_n(0,1,t)},Vs={...dr,default:1},ho=t=>Math.round(t*1e5)/1e5,oc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ew(t){return t==null}const Nw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sc=(t,e)=>n=>!!(typeof n=="string"&&Nw.test(n)&&n.startsWith(t)||e&&!Ew(n)&&Object.prototype.hasOwnProperty.call(n,e)),Fp=(t,e,n)=>i=>{if(typeof i!="string")return i;const[r,o,s,a]=i.match(oc);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Aw=t=>_n(0,255,t),ac={...dr,transform:t=>Math.round(Aw(t))},_i={test:sc("rgb","red"),parse:Fp("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ac.transform(t)+", "+ac.transform(e)+", "+ac.transform(n)+", "+ho(po.transform(i))+")"};function Pw(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const lc={test:sc("#"),parse:Pw,transform:_i.transform},mo=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),qn=mo("deg"),cn=mo("%"),ue=mo("px"),Dw=mo("vh"),Ow=mo("vw"),Lp={...cn,parse:t=>cn.parse(t)/100,transform:t=>cn.transform(t*100)},fr={test:sc("hsl","hue"),parse:Fp("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+cn.transform(ho(e))+", "+cn.transform(ho(n))+", "+ho(po.transform(i))+")"},Ue={test:t=>_i.test(t)||lc.test(t)||fr.test(t),parse:t=>_i.test(t)?_i.parse(t):fr.test(t)?fr.parse(t):lc.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?_i.transform(t):fr.transform(t),getAnimatableNone:t=>{const e=Ue.parse(t);return e.alpha=0,Ue.transform(e)}},Mw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Iw(t){return isNaN(t)&&typeof t=="string"&&(t.match(oc)?.length||0)+(t.match(Mw)?.length||0)>0}const $p="number",zp="color",jw="var",Rw="var(",Bp="${}",Fw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function go(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=e.replace(Fw,l=>(Ue.test(l)?(i.color.push(o),r.push(zp),n.push(Ue.parse(l))):l.startsWith(Rw)?(i.var.push(o),r.push(jw),n.push(l)):(i.number.push(o),r.push($p),n.push(parseFloat(l))),++o,Bp)).split(Bp);return{values:n,split:a,indexes:i,types:r}}function Vp(t){return go(t).values}function Wp(t){const{split:e,types:n}=go(t),i=e.length;return r=>{let o="";for(let s=0;s<i;s++)if(o+=e[s],r[s]!==void 0){const a=n[s];a===$p?o+=ho(r[s]):a===zp?o+=Ue.transform(r[s]):o+=r[s]}return o}}const Lw=t=>typeof t=="number"?0:Ue.test(t)?Ue.getAnimatableNone(t):t;function $w(t){const e=Vp(t);return Wp(t)(e.map(Lw))}const Hn={test:Iw,parse:Vp,createTransformer:Wp,getAnimatableNone:$w};function cc(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function zw({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let r=0,o=0,s=0;if(!e)r=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=cc(l,a,t+1/3),o=cc(l,a,t),s=cc(l,a,t-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:i}}function Ws(t,e){return n=>n>0?e:t}const Me=(t,e,n)=>t+(e-t)*n,uc=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},Bw=[lc,_i,fr],Vw=t=>Bw.find(e=>e.test(t));function Kp(t){const e=Vw(t);if(cr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===fr&&(n=zw(n)),n}const Up=(t,e)=>{const n=Kp(t),i=Kp(e);if(!n||!i)return Ws(t,e);const r={...n};return o=>(r.red=uc(n.red,i.red,o),r.green=uc(n.green,i.green,o),r.blue=uc(n.blue,i.blue,o),r.alpha=Me(n.alpha,i.alpha,o),_i.transform(r))},dc=new Set(["none","hidden"]);function Ww(t,e){return dc.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Kw(t,e){return n=>Me(t,e,n)}function fc(t){return typeof t=="number"?Kw:typeof t=="string"?rc(t)?Ws:Ue.test(t)?Up:Hw:Array.isArray(t)?qp:typeof t=="object"?Ue.test(t)?Up:Uw:Ws}function qp(t,e){const n=[...t],i=n.length,r=t.map((o,s)=>fc(o)(o,e[s]));return o=>{for(let s=0;s<i;s++)n[s]=r[s](o);return n}}function Uw(t,e){const n={...t,...e},i={};for(const r in n)t[r]!==void 0&&e[r]!==void 0&&(i[r]=fc(t[r])(t[r],e[r]));return r=>{for(const o in i)n[o]=i[o](r);return n}}function qw(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],s=t.indexes[o][i[o]],a=t.values[s]??0;n[r]=a,i[o]++}return n}const Hw=(t,e)=>{const n=Hn.createTransformer(e),i=go(t),r=go(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?dc.has(t)&&!r.values.length||dc.has(e)&&!i.values.length?Ww(t,e):uo(qp(qw(i,r),r.values),n):(cr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ws(t,e))};function Hp(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Me(t,e,n):fc(t)(t,e)}const Yw=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Oe.update(e,n),stop:()=>Un(e),now:()=>et.isProcessing?et.timestamp:wt.now()}},Yp=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let o=0;o<r;o++)i+=Math.round(t(o/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Ks=2e4;function pc(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<Ks;)e+=n,i=t.next(e);return e>=Ks?1/0:e}function Gp(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(pc(i),Ks);return{type:"keyframes",ease:o=>i.next(r*o).value/e,duration:ln(r)}}const Gw=5;function Xp(t,e,n){const i=Math.max(e-Gw,0);return xp(n-t(i),e-i)}const Re={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},hc=.001;function Xw({duration:t=Re.duration,bounce:e=Re.bounce,velocity:n=Re.velocity,mass:i=Re.mass}){let r,o;cr(t<=It(Re.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-e;s=_n(Re.minDamping,Re.maxDamping,s),t=_n(Re.minDuration,Re.maxDuration,ln(t)),s<1?(r=c=>{const u=c*s,d=u*t,f=u-n,p=mc(c,s),h=Math.exp(-d);return hc-f/p*h},o=c=>{const d=c*s*t,f=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*t,h=Math.exp(-d),m=mc(Math.pow(c,2),s);return(-r(c)+hc>0?-1:1)*((f-p)*h)/m}):(r=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-hc+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=Zw(r,o,a);if(t=It(t),isNaN(l))return{stiffness:Re.stiffness,damping:Re.damping,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:s*2*Math.sqrt(i*c),duration:t}}}const Jw=12;function Zw(t,e,n){let i=n;for(let r=1;r<Jw;r++)i=i-t(i)/e(i);return i}function mc(t,e){return t*Math.sqrt(1-e*e)}const Qw=["duration","bounce"],eS=["stiffness","damping","mass"];function Jp(t,e){return e.some(n=>t[n]!==void 0)}function tS(t){let e={velocity:Re.velocity,stiffness:Re.stiffness,damping:Re.damping,mass:Re.mass,isResolvedFromDuration:!1,...t};if(!Jp(t,eS)&&Jp(t,Qw))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,o=2*_n(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:Re.mass,stiffness:r,damping:o}}else{const n=Xw(t);e={...e,...n,mass:Re.mass},e.isResolvedFromDuration=!0}return e}function yo(t=Re.visualDuration,e=Re.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=tS({...n,velocity:-ln(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),g=s-o,y=ln(Math.sqrt(l/u)),x=Math.abs(g)<5;i||(i=x?Re.restSpeed.granular:Re.restSpeed.default),r||(r=x?Re.restDelta.granular:Re.restDelta.default);let b;if(m<1){const _=mc(y,m);b=C=>{const E=Math.exp(-m*y*C);return s-E*((h+m*y*g)/_*Math.sin(_*C)+g*Math.cos(_*C))}}else if(m===1)b=_=>s-Math.exp(-y*_)*(g+(h+y*g)*_);else{const _=y*Math.sqrt(m*m-1);b=C=>{const E=Math.exp(-m*y*C),S=Math.min(_*C,300);return s-E*((h+m*y*g)*Math.sinh(S)+_*g*Math.cosh(S))/_}}const w={calculatedDuration:p&&d||null,next:_=>{const C=b(_);if(p)a.done=_>=d;else{let E=_===0?h:0;m<1&&(E=_===0?It(h):Xp(b,_,C));const S=Math.abs(E)<=i,k=Math.abs(s-C)<=r;a.done=S&&k}return a.value=a.done?s:C,a},toString:()=>{const _=Math.min(pc(w),Ks),C=Yp(E=>w.next(_*E).value,_,30);return _+"ms "+C},toTransition:()=>{}};return w}yo.applyToOptions=t=>{const e=Gp(t,100,yo);return t.ease=e.ease,t.duration=It(e.duration),t.type="keyframes",t};function gc({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],f={done:!1,value:d},p=S=>a!==void 0&&S<a||l!==void 0&&S>l,h=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let m=n*e;const g=d+m,y=s===void 0?g:s(g);y!==g&&(m=y-d);const x=S=>-m*Math.exp(-S/i),b=S=>y+x(S),w=S=>{const k=x(S),A=b(S);f.done=Math.abs(k)<=c,f.value=f.done?y:A};let _,C;const E=S=>{p(f.value)&&(_=S,C=yo({keyframes:[f.value,h(f.value)],velocity:Xp(b,S,f.value),damping:r,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:S=>{let k=!1;return!C&&_===void 0&&(k=!0,w(S),E(S)),_!==void 0&&S>=_?C.next(S-_):(!k&&w(S),f)}}}function nS(t,e,n){const i=[],r=n||wn.mix||Hp,o=t.length-1;for(let s=0;s<o;s++){let a=r(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||Mt:e;a=uo(l,a)}i.push(a)}return i}function iS(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(Ot(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const s=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=nS(e,i,r),l=a.length,c=u=>{if(s&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=ur(t[d],t[d+1],u);return a[d](f)};return n?u=>c(_n(t[0],t[o-1],u)):c}function Zp(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=ur(0,e,i);t.push(Me(n,1,r))}}function Qp(t){const e=[0];return Zp(e,t.length-1),e}function rS(t,e){return t.map(n=>n*e)}function oS(t,e){return t.map(()=>e||Ap).splice(0,t.length-1)}function pr({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=Pp(i)?i.map(Ip):Ip(i),o={done:!1,value:e[0]},s=rS(n&&n.length===e.length?n:Qp(e),t),a=iS(s,e,{ease:Array.isArray(r)?r:oS(e,r)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const sS=t=>t!==null;function yc(t,{repeat:e,repeatType:n="loop"},i,r=1){const o=t.filter(sS),a=r<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const aS={decay:gc,inertia:gc,tween:pr,keyframes:pr,spring:yo};function eh(t){typeof t.type=="string"&&(t.type=aS[t.type])}class vc{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const lS=t=>t/100;class xc extends vc{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==wt.now()&&this.tick(wt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;eh(e);const{type:n=pr,repeat:i=0,repeatDelay:r=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const l=n||pr;process.env.NODE_ENV!=="production"&&l!==pr&&Ot(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==pr&&typeof a[0]!="number"&&(this.mixKeyframes=uo(lS,Hp(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=pc(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:r,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let b=this.currentTime,w=i;if(d){const S=Math.min(this.currentTime,r)/a;let k=Math.floor(S),A=S%1;!A&&S>=1&&(A=1),A===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(f==="reverse"?(A=1-A,p&&(A-=p/a)):f==="mirror"&&(w=s)),b=_n(0,1,A)*a}const _=x?{done:!1,value:u[0]}:w.next(b);o&&(_.value=o(_.value));let{done:C}=_;!x&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&h!==gc&&(_.value=yc(u,this.options,g,this.speed)),m&&m(_.value),E&&this.finish(),_}then(e,n){return this.finished.then(e,n)}get duration(){return ln(this.calculatedDuration)}get time(){return ln(this.currentTime)}set time(e){e=It(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(wt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ln(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Yw,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(wt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function cS(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const wi=t=>t*180/Math.PI,bc=t=>{const e=wi(Math.atan2(t[1],t[0]));return _c(e)},uS={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:bc,rotateZ:bc,skewX:t=>wi(Math.atan(t[1])),skewY:t=>wi(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},_c=t=>(t=t%360,t<0&&(t+=360),t),th=bc,nh=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ih=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),dS={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nh,scaleY:ih,scale:t=>(nh(t)+ih(t))/2,rotateX:t=>_c(wi(Math.atan2(t[6],t[5]))),rotateY:t=>_c(wi(Math.atan2(-t[2],t[0]))),rotateZ:th,rotate:th,skewX:t=>wi(Math.atan(t[4])),skewY:t=>wi(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function wc(t){return t.includes("scale")?1:0}function Sc(t,e){if(!t||t==="none")return wc(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=dS,r=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=uS,r=a}if(!r)return wc(e);const o=i[e],s=r[1].split(",").map(pS);return typeof o=="function"?o(s):s[o]}const fS=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Sc(n,e)};function pS(t){return parseFloat(t.trim())}const hr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mr=new Set(hr),rh=t=>t===dr||t===ue,hS=new Set(["x","y","z"]),mS=hr.filter(t=>!hS.has(t));function gS(t){const e=[];return mS.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const Si={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Sc(e,"x"),y:(t,{transform:e})=>Sc(e,"y")};Si.translateX=Si.x,Si.translateY=Si.y;const Ci=new Set;let Cc=!1,kc=!1,Tc=!1;function oh(){if(kc){const t=Array.from(Ci).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const r=gS(i);r.length&&(n.set(i,r),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([o,s])=>{i.getValue(o)?.set(s)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}kc=!1,Cc=!1,Ci.forEach(t=>t.complete(Tc)),Ci.clear()}function sh(){Ci.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kc=!0)})}function yS(){Tc=!0,sh(),oh(),Tc=!1}class Ec{constructor(e,n,i,r,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=r,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Ci.add(this),Cc||(Cc=!0,Oe.read(sh),Oe.resolveKeyframes(oh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:r}=this;if(e[0]===null){const o=r?.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(i&&n){const a=i.readValue(n,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),r&&o===void 0&&r.set(e[0])}cS(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ci.delete(this)}cancel(){this.state==="scheduled"&&(Ci.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vS=t=>t.startsWith("--");function xS(t,e,n){vS(e)?t.style.setProperty(e,n):t.style[e]=n}const bS=Jl(()=>window.ScrollTimeline!==void 0),_S={};function wS(t,e){const n=Jl(t);return()=>_S[e]??n()}const ah=wS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vo=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,lh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vo([0,.65,.55,1]),circOut:vo([.55,0,1,.45]),backIn:vo([.31,.01,.66,-.59]),backOut:vo([.33,1.53,.69,.99])};function ch(t,e){if(t)return typeof t=="function"?ah()?Yp(t,e):"ease-out":Op(t)?vo(t):Array.isArray(t)?t.map(n=>ch(n,e)||lh.easeOut):lh[t]}function SS(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const d=ch(a,r);Array.isArray(d)&&(u.easing=d);const f={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function Nc(t){return typeof t=="function"&&"applyToOptions"in t}function CS({type:t,...e}){return Nc(t)&&ah()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class kS extends vc{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:i,keyframes:r,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,Ot(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=CS(e);this.animation=SS(n,i,r,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=yc(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):xS(n,i,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ln(Number(e))}get time(){return ln(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=It(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&bS()?(this.animation.timeline=e,Mt):n(this)}}const uh={anticipate:Tp,backInOut:kp,circInOut:Np};function TS(t){return t in uh}function ES(t){typeof t.ease=="string"&&TS(t.ease)&&(t.ease=uh[t.ease])}const dh=10;class NS extends kS{constructor(e){ES(e),eh(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:r,element:o,...s}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new xc({...s,autoplay:!1}),l=It(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-dh).value,a.sample(l).value,dh),a.stop()}}const fh=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Hn.test(t)||t==="0")&&!t.startsWith("url("));function AS(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function PS(t,e,n,i){const r=t[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],s=fh(r,e),a=fh(o,e);return cr(s===a,`You are trying to animate ${e} from "${r}" to "${o}". "${s?o:r}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:AS(t)||(n==="spring"||Nc(n))&&i}function Ac(t){t.duration=0,t.type}const DS=new Set(["opacity","clipPath","filter","transform"]),OS=Jl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function MS(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return OS()&&n&&DS.has(n)&&(n!=="transform"||!c)&&!l&&!i&&r!=="mirror"&&o!==0&&s!=="inertia"}const IS=40;class jS extends vc{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=wt.now();const f={autoplay:e,delay:n,type:i,repeat:r,repeatDelay:o,repeatType:s,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||Ec;this.keyframeResolver=new p(a,(h,m,g)=>this.onKeyframesResolved(h,m,f,!g),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,r){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=wt.now(),PS(e,o,s,a)||((wn.instantAnimations||!l)&&u?.(yc(e,i,n)),e[0]=e[e.length-1],Ac(i),i.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>IS?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},p=!c&&MS(f)?new NS({...f,element:f.motionValue.owner.current}):new xc(f);p.finished.then(()=>this.notifyFinished()).catch(Mt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),yS()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class RS{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=n}attachTimeline(e){const n=this.animations.map(i=>i.attachTimeline(e));return()=>{n.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class FS extends RS{then(e,n){return this.finished.finally(e).then(()=>{})}}const LS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $S(t){const e=LS.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}const zS=4;function ph(t,e,n=1){Ot(n<=zS,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=$S(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const s=o.trim();return gp(s)?parseFloat(s):s}return rc(r)?ph(r,e,n+1):r}function Pc(t,e){return t?.[e]??t?.default??t}const hh=new Set(["width","height","top","left","right","bottom",...hr]),BS={test:t=>t==="auto",parse:t=>t},mh=t=>e=>e.test(t),gh=[dr,ue,cn,qn,Ow,Dw,BS],yh=t=>gh.find(mh(t));function VS(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||vp(t):!0}const WS=new Set(["brightness","contrast","saturate","opacity"]);function KS(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(oc)||[];if(!i)return t;const r=n.replace(i,"");let o=WS.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const US=/\b([a-z-]*)\(.*?\)/gu,Dc={...Hn,getAnimatableNone:t=>{const e=t.match(US);return e?e.map(KS).join(" "):t}},vh={...dr,transform:Math.round},Oc={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,backgroundPositionX:ue,backgroundPositionY:ue,...{rotate:qn,rotateX:qn,rotateY:qn,rotateZ:qn,scale:Vs,scaleX:Vs,scaleY:Vs,scaleZ:Vs,skew:qn,skewX:qn,skewY:qn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:po,originX:Lp,originY:Lp,originZ:ue},zIndex:vh,fillOpacity:po,strokeOpacity:po,numOctaves:vh},qS={...Oc,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:Dc,WebkitFilter:Dc},xh=t=>qS[t];function bh(t,e){let n=xh(t);return n!==Dc&&(n=Hn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const HS=new Set(["auto","none","0"]);function YS(t,e,n){let i=0,r;for(;i<t.length&&!r;){const o=t[i];typeof o=="string"&&!HS.has(o)&&go(o).values.length&&(r=t[i]),i++}if(r&&n)for(const o of e)t[o]=bh(n,r)}class GS extends Ec{constructor(e,n,i,r,o){super(e,n,i,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),rc(c))){const u=ph(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!hh.has(i)||e.length!==2)return;const[r,o]=e,s=yh(r),a=yh(o);if(s!==a)if(rh(s)&&rh(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else Si[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let r=0;r<e.length;r++)(e[r]===null||VS(e[r]))&&i.push(r);i.length&&YS(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Si[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&e.getValue(i,r).jump(r,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Si[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function _h(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const r=n?.[t]??i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}const wh=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Sh(t){return yp(t)&&"offsetHeight"in t}const Ch=30,XS=t=>!isNaN(parseFloat(t));class JS{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const r=wt.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=wt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=XS(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Ql(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Zl);const i=this.events[e].add(n);return e==="change"?()=>{i(),Oe.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=wt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ch)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ch);return xp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gr(t,e){return new JS(t,e)}const{schedule:Mc}=jp(queueMicrotask,!1),Ut={x:!1,y:!1};function kh(){return Ut.x||Ut.y}function ZS(t){return t==="x"||t==="y"?Ut[t]?null:(Ut[t]=!0,()=>{Ut[t]=!1}):Ut.x||Ut.y?null:(Ut.x=Ut.y=!0,()=>{Ut.x=Ut.y=!1})}function Th(t,e){const n=_h(t),i=new AbortController,r={passive:!0,...e,signal:i.signal};return[n,r,()=>i.abort()]}function Eh(t){return!(t.pointerType==="touch"||kh())}function QS(t,e,n={}){const[i,r,o]=Th(t,n),s=a=>{if(!Eh(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{Eh(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,r)};return i.forEach(a=>{a.addEventListener("pointerenter",s,r)}),o}const Nh=(t,e)=>e?t===e?!0:Nh(t,e.parentElement):!1,Ic=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,eC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tC(t){return eC.has(t.tagName)||t.tabIndex!==-1}const Us=new WeakSet;function Ah(t){return e=>{e.key==="Enter"&&t(e)}}function jc(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const nC=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ah(()=>{if(Us.has(n))return;jc(n,"down");const r=Ah(()=>{jc(n,"up")}),o=()=>jc(n,"cancel");n.addEventListener("keyup",r,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function Ph(t){return Ic(t)&&!kh()}function iC(t,e,n={}){const[i,r,o]=Th(t,n),s=a=>{const l=a.currentTarget;if(!Ph(a))return;Us.add(l);const c=e(l,a),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Us.has(l)&&Us.delete(l),Ph(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||Nh(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",f,r)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,r),Sh(a)&&(a.addEventListener("focus",c=>nC(c,r)),!tC(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Rc(t){return yp(t)&&"ownerSVGElement"in t}function Dh(t){return Rc(t)&&t.tagName==="svg"}const Ge=t=>!!(t&&t.getVelocity),rC=[...gh,Ue,Hn],oC=t=>rC.find(mh(t)),Fc=N.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class sC extends O.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const i=n.offsetParent,r=Sh(i)&&i.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=r-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function aC({children:t,isPresent:e,anchorX:n,root:i}){const r=N.useId(),o=N.useRef(null),s=N.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=N.useContext(Fc);return N.useInsertionEffect(()=>{const{width:l,height:c,top:u,left:d,right:f}=s.current;if(e||!o.current||!l||!c)return;const p=n==="left"?`left: ${d}`:`right: ${f}`;o.current.dataset.motionPopId=r;const h=document.createElement("style");a&&(h.nonce=a);const m=i??document.head;return m.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
23
|
-
[data-motion-pop-id="${r}"] {
|
|
24
|
-
position: absolute !important;
|
|
25
|
-
width: ${l}px !important;
|
|
26
|
-
height: ${c}px !important;
|
|
27
|
-
${p}px !important;
|
|
28
|
-
top: ${u}px !important;
|
|
29
|
-
}
|
|
30
|
-
`),()=>{m.contains(h)&&m.removeChild(h)}},[e]),v.jsx(sC,{isPresent:e,childRef:o,sizeRef:s,children:O.cloneElement(t,{ref:o})})}const lC=({children:t,initial:e,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const c=Hl(cC),u=N.useId();let d=!0,f=N.useMemo(()=>(d=!1,{id:u,initial:e,isPresent:n,custom:r,onExitComplete:p=>{c.set(p,!0);for(const h of c.values())if(!h)return;i&&i()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,i]);return o&&d&&(f={...f}),N.useMemo(()=>{c.forEach((p,h)=>c.set(h,!1))},[n]),O.useEffect(()=>{!n&&!c.size&&i&&i()},[n]),s==="popLayout"&&(t=v.jsx(aC,{isPresent:n,anchorX:a,root:l,children:t})),v.jsx(Ls.Provider,{value:f,children:t})};function cC(){return new Map}function Oh(t=!0){const e=N.useContext(Ls);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,o=N.useId();N.useEffect(()=>{if(t)return r(o)},[t]);const s=N.useCallback(()=>t&&i&&i(o),[o,i,t]);return!n&&i?[!1,s]:[!0]}const qs=t=>t.key||"";function Mh(t){const e=[];return N.Children.forEach(t,n=>{N.isValidElement(n)&&e.push(n)}),e}const xo=({children:t,custom:e,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[c,u]=Oh(s),d=N.useMemo(()=>Mh(t),[t]),f=s&&!c?[]:d.map(qs),p=N.useRef(!0),h=N.useRef(d),m=Hl(()=>new Map),[g,y]=N.useState(d),[x,b]=N.useState(d);mp(()=>{p.current=!1,h.current=d;for(let C=0;C<x.length;C++){const E=qs(x[C]);f.includes(E)?m.delete(E):m.get(E)!==!0&&m.set(E,!1)}},[x,f.length,f.join("-")]);const w=[];if(d!==g){let C=[...d];for(let E=0;E<x.length;E++){const S=x[E],k=qs(S);f.includes(k)||(C.splice(E,0,S),w.push(S))}return o==="wait"&&w.length&&(C=w),b(Mh(C)),y(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:_}=N.useContext(ql);return v.jsx(v.Fragment,{children:x.map(C=>{const E=qs(C),S=s&&!c?!1:d===x||f.includes(E),k=()=>{if(m.has(E))m.set(E,!0);else return;let A=!0;m.forEach(P=>{P||(A=!1)}),A&&(_?.(),b(h.current),s&&u?.(),i&&i())};return v.jsx(lC,{isPresent:S,initial:!p.current||n?void 0:!1,custom:e,presenceAffectsLayout:r,mode:o,root:l,onExitComplete:S?void 0:k,anchorX:a,children:C},E)})})},Ih=N.createContext({strict:!1}),jh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},yr={};for(const t in jh)yr[t]={isEnabled:e=>jh[t].some(n=>!!e[n])};function uC(t){for(const e in t)yr[e]={...yr[e],...t[e]}}const dC=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Hs(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||dC.has(t)}let Rh=t=>!Hs(t);function fC(t){typeof t=="function"&&(Rh=e=>e.startsWith("on")?!Hs(e):t(e))}try{fC(require("@emotion/is-prop-valid").default)}catch{}function pC(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||(Rh(r)||n===!0&&Hs(r)||!e&&!Hs(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}const Ys=N.createContext({});function Gs(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function bo(t){return typeof t=="string"||Array.isArray(t)}const Lc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$c=["initial",...Lc];function Xs(t){return Gs(t.animate)||$c.some(e=>bo(t[e]))}function Fh(t){return!!(Xs(t)||t.variants)}function hC(t,e){if(Xs(t)){const{initial:n,animate:i}=t;return{initial:n===!1||bo(n)?n:void 0,animate:bo(i)?i:void 0}}return t.inherit!==!1?e:{}}function mC(t){const{initial:e,animate:n}=hC(t,N.useContext(Ys));return N.useMemo(()=>({initial:e,animate:n}),[Lh(e),Lh(n)])}function Lh(t){return Array.isArray(t)?t.join(" "):t}const _o={};function gC(t){for(const e in t)_o[e]=t[e],ic(e)&&(_o[e].isCSSVariable=!0)}function $h(t,{layout:e,layoutId:n}){return mr.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_o[t]||t==="opacity")}const yC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vC=hr.length;function xC(t,e,n){let i="",r=!0;for(let o=0;o<vC;o++){const s=hr[o],a=t[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=wh(a,Oc[s]);if(!l){r=!1;const u=yC[s]||s;i+=`${u}(${c}) `}n&&(e[s]=c)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}function zc(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const c=e[l];if(mr.has(l)){s=!0;continue}else if(ic(l)){r[l]=c;continue}else{const u=wh(c,Oc[l]);l.startsWith("origin")?(a=!0,o[l]=u):i[l]=u}}if(e.transform||(s||n?i.transform=xC(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;i.transformOrigin=`${l} ${c} ${u}`}}const Bc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zh(t,e,n){for(const i in e)!Ge(e[i])&&!$h(i,n)&&(t[i]=e[i])}function bC({transformTemplate:t},e){return N.useMemo(()=>{const n=Bc();return zc(n,e,t),Object.assign({},n.vars,n.style)},[e])}function _C(t,e){const n=t.style||{},i={};return zh(i,n,t),Object.assign(i,bC(t,e)),i}function wC(t,e){const n={},i=_C(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const SC={offset:"stroke-dashoffset",array:"stroke-dasharray"},CC={offset:"strokeDashoffset",array:"strokeDasharray"};function kC(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?SC:CC;t[o.offset]=ue.transform(-i);const s=ue.transform(e),a=ue.transform(n);t[o.array]=`${s} ${a}`}function Bh(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:s=0,...a},l,c,u){if(zc(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),r!==void 0&&kC(d,r,o,s,!1)}const Vh=()=>({...Bc(),attrs:{}}),Wh=t=>typeof t=="string"&&t.toLowerCase()==="svg";function TC(t,e,n,i){const r=N.useMemo(()=>{const o=Vh();return Bh(o,e,Wh(i),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};zh(o,t.style,t),r.style={...o,...r.style}}return r}const EC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Vc(t){return typeof t!="string"||t.includes("-")?!1:!!(EC.indexOf(t)>-1||/[A-Z]/u.test(t))}function NC(t,e,n,{latestValues:i},r,o=!1){const a=(Vc(t)?TC:wC)(e,i,r,t),l=pC(e,typeof t=="string",o),c=t!==N.Fragment?{...l,...a,ref:n}:{},{children:u}=e,d=N.useMemo(()=>Ge(u)?u.get():u,[u]);return N.createElement(t,{...c,children:d})}function Kh(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function Wc(t,e,n,i){if(typeof e=="function"){const[r,o]=Kh(i);e=e(n!==void 0?n:t.custom,r,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,o]=Kh(i);e=e(n!==void 0?n:t.custom,r,o)}return e}function Js(t){return Ge(t)?t.get():t}function AC({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:PC(n,i,r,t),renderState:e()}}function PC(t,e,n,i){const r={},o=i(t,{});for(const f in o)r[f]=Js(o[f]);let{initial:s,animate:a}=t;const l=Xs(t),c=Fh(t);e&&c&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!Gs(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const h=Wc(t,f[p]);if(h){const{transitionEnd:m,transition:g,...y}=h;for(const x in y){let b=y[x];if(Array.isArray(b)){const w=u?b.length-1:0;b=b[w]}b!==null&&(r[x]=b)}for(const x in m)r[x]=m[x]}}}return r}const Uh=t=>(e,n)=>{const i=N.useContext(Ys),r=N.useContext(Ls),o=()=>AC(t,e,i,r);return n?o():Hl(o)};function Kc(t,e,n){const{style:i}=t,r={};for(const o in i)(Ge(i[o])||e.style&&Ge(e.style[o])||$h(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}const DC=Uh({scrapeMotionValuesFromProps:Kc,createRenderState:Bc});function qh(t,e,n){const i=Kc(t,e,n);for(const r in t)if(Ge(t[r])||Ge(e[r])){const o=hr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[o]=t[r]}return i}const OC=Uh({scrapeMotionValuesFromProps:qh,createRenderState:Vh}),MC=Symbol.for("motionComponentSymbol");function vr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function IC(t,e,n){return N.useCallback(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):vr(n)&&(n.current=i))},[e])}const Uc=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Hh="data-"+Uc("framerAppearId"),Yh=N.createContext({});function jC(t,e,n,i,r){const{visualElement:o}=N.useContext(Ys),s=N.useContext(Ih),a=N.useContext(Ls),l=N.useContext(Fc).reducedMotion,c=N.useRef(null);i=i||s.renderer,!c.current&&i&&(c.current=i(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=N.useContext(Yh);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&RC(c.current,n,r,d);const f=N.useRef(!1);N.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const p=n[Hh],h=N.useRef(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return mp(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),h.current&&u.animationState&&u.animationState.animateChanges())}),N.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),h.current=!1),u.enteringChildren=void 0)}),u}function RC(t,e,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Gh(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!s||a&&vr(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function Gh(t){if(t)return t.options.allowProjection!==!1?t.projection:Gh(t.parent)}function qc(t,{forwardMotionProps:e=!1}={},n,i){n&&uC(n);const r=Vc(t)?OC:DC;function o(a,l){let c;const u={...N.useContext(Fc),...a,layoutId:FC(a)},{isStatic:d}=u,f=mC(a),p=r(a,d);if(!d&&Yl){LC(u,n);const h=$C(u);c=h.MeasureLayout,f.visualElement=jC(t,p,u,i,h.ProjectionNode)}return v.jsxs(Ys.Provider,{value:f,children:[c&&f.visualElement?v.jsx(c,{visualElement:f.visualElement,...u}):null,NC(t,a,IC(p,f.visualElement,l),p,d,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=N.forwardRef(o);return s[MC]=t,s}function FC({layoutId:t}){const e=N.useContext(ql).id;return e&&t!==void 0?e+"-"+t:t}function LC(t,e){const n=N.useContext(Ih).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?cr(!1,i,"lazy-strict-mode"):Ot(!1,i,"lazy-strict-mode")}}function $C(t){const{drag:e,layout:n}=yr;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function zC(t,e){if(typeof Proxy>"u")return qc;const n=new Map,i=(o,s)=>qc(o,s,t,e),r=(o,s)=>(process.env.NODE_ENV!=="production"&&Ql(!1,"motion() is deprecated. Use motion.create() instead."),i(o,s));return new Proxy(r,{get:(o,s)=>s==="create"?i:(n.has(s)||n.set(s,qc(s,void 0,t,e)),n.get(s))})}function Xh({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function BC({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function VC(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Hc(t){return t===void 0||t===1}function Yc({scale:t,scaleX:e,scaleY:n}){return!Hc(t)||!Hc(e)||!Hc(n)}function ki(t){return Yc(t)||Jh(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Jh(t){return Zh(t.x)||Zh(t.y)}function Zh(t){return t&&t!=="0%"}function Zs(t,e,n){const i=t-n,r=e*i;return n+r}function Qh(t,e,n,i,r){return r!==void 0&&(t=Zs(t,r,i)),Zs(t,n,i)+e}function Gc(t,e=0,n=1,i,r){t.min=Qh(t.min,e,n,i,r),t.max=Qh(t.max,e,n,i,r)}function em(t,{x:e,y:n}){Gc(t.x,e.translate,e.scale,e.originPoint),Gc(t.y,n.translate,n.scale,n.originPoint)}const tm=.999999999999,nm=1.0000000000001;function WC(t,e,n,i=!1){const r=n.length;if(!r)return;e.x=e.y=1;let o,s;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&br(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,em(t,s)),i&&ki(o.latestValues)&&br(t,o.latestValues))}e.x<nm&&e.x>tm&&(e.x=1),e.y<nm&&e.y>tm&&(e.y=1)}function xr(t,e){t.min=t.min+e,t.max=t.max+e}function im(t,e,n,i,r=.5){const o=Me(t.min,t.max,r);Gc(t,e,n,o,i)}function br(t,e){im(t.x,e.x,e.scaleX,e.scale,e.originX),im(t.y,e.y,e.scaleY,e.scale,e.originY)}function rm(t,e){return Xh(VC(t.getBoundingClientRect(),e))}function KC(t,e,n){const i=rm(t,n),{scroll:r}=e;return r&&(xr(i.x,r.offset.x),xr(i.y,r.offset.y)),i}const om=()=>({translate:0,scale:1,origin:0,originPoint:0}),_r=()=>({x:om(),y:om()}),sm=()=>({min:0,max:0}),$e=()=>({x:sm(),y:sm()}),Xc={current:null},am={current:!1};function UC(){if(am.current=!0,!!Yl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Xc.current=t.matches;t.addEventListener("change",e),e()}else Xc.current=!1}const wo=new WeakMap;function qC(t,e,n){for(const i in e){const r=e[i],o=n[i];if(Ge(r))t.addValue(i,r);else if(Ge(o))t.addValue(i,gr(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const s=t.getValue(i);s.liveStyle===!0?s.jump(r):s.hasAnimated||s.set(r)}else{const s=t.getStaticValue(i);t.addValue(i,gr(s!==void 0?s:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const lm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cm{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ec,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=wt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Oe.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Xs(n),this.isVariantNode=Fh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&Ge(p)&&p.set(l[f])}}mount(e){this.current=e,wo.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),am.current||UC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xc.current,process.env.NODE_ENV!=="production"&&Ql(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Un(this.notifyUpdate),Un(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=mr.has(e);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Oe.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in yr){const n=yr[e];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$e()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<lm.length;i++){const r=lm[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,s=e[o];s&&(this.propEventSubscriptions[r]=this.on(r,s))}this.prevMotionValues=qC(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=gr(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(gp(i)||vp(i))?i=parseFloat(i):!oC(i)&&Hn.test(n)&&(i=bh(e,n)),this.setBaseTarget(e,Ge(i)?i.get():i)),Ge(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=Wc(this.props,n,this.presenceContext?.custom);o&&(i=o[e])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Ge(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Zl),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Mc.render(this.render)}}class um extends cm{constructor(){super(...arguments),this.KeyframeResolver=GS}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ge(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function dm(t,{style:e,vars:n},i,r){const o=t.style;let s;for(s in e)o[s]=e[s];r?.applyProjectionStyles(o,i);for(s in n)o.setProperty(s,n[s])}function HC(t){return window.getComputedStyle(t)}class fm extends um{constructor(){super(...arguments),this.type="html",this.renderInstance=dm}readValueFromInstance(e,n){if(mr.has(n))return this.projection?.isProjecting?wc(n):fS(e,n);{const i=HC(e),r=(ic(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return rm(e,n)}build(e,n,i){zc(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return Kc(e,n,i)}}const pm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function YC(t,e,n,i){dm(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(pm.has(r)?r:Uc(r),e.attrs[r])}class hm extends um{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$e}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(mr.has(n)){const i=xh(n);return i&&i.default||0}return n=pm.has(n)?n:Uc(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return qh(e,n,i)}build(e,n,i){Bh(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,r){YC(e,n,i,r)}mount(e){this.isSVGTag=Wh(e.tagName),super.mount(e)}}const GC=(t,e)=>Vc(t)?new hm(e):new fm(e,{allowProjection:t!==N.Fragment});function wr(t,e,n){const i=t.getProps();return Wc(i,e,n!==void 0?n:i.custom,t)}const Jc=t=>Array.isArray(t);function XC(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gr(n))}function JC(t){return Jc(t)?t[t.length-1]||0:t}function ZC(t,e){const n=wr(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o){const a=JC(o[s]);XC(t,s,a)}}function QC(t){return!!(Ge(t)&&t.add)}function Zc(t,e){const n=t.getValue("willChange");if(QC(n))return n.add(e);if(!n&&wn.WillChange){const i=new wn.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function mm(t){return t.props[Hh]}const e1=t=>t!==null;function t1(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(e1),o=e&&n!=="loop"&&e%2===1?0:r.length-1;return r[o]}const n1={type:"spring",stiffness:500,damping:25,restSpeed:10},i1=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),r1={type:"keyframes",duration:.8},o1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},s1=(t,{keyframes:e})=>e.length>2?r1:mr.has(t)?t.startsWith("scale")?i1(e[1]):n1:o1;function a1({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Qc=(t,e,n,i={},r,o)=>s=>{const a=Pc(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-It(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:r};a1(a)||Object.assign(u,s1(t,u)),u.duration&&(u.duration=It(u.duration)),u.repeatDelay&&(u.repeatDelay=It(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ac(u),u.delay===0&&(d=!0)),(wn.instantAnimations||wn.skipAnimations)&&(d=!0,Ac(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const f=t1(u.keyframes,a);if(f!==void 0){Oe.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new xc(u):new jS(u)};function l1({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function eu(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;i&&(o=i);const l=[],c=r&&t.animationState&&t.animationState.getState()[r];for(const u in a){const d=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&l1(c,u))continue;const p={delay:n,...Pc(o||{},u)},h=d.get();if(h!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===h&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=mm(t);if(y){const x=window.MotionHandoffAnimation(y,u,Oe);x!==null&&(p.startTime=x,m=!0)}}Zc(t,u),d.start(Qc(u,d,f,t.shouldReduceMotion&&hh.has(u)?{type:!1}:p,t,m));const g=d.animation;g&&l.push(g)}return s&&Promise.all(l).then(()=>{Oe.update(()=>{s&&ZC(t,s)})}),l}function gm(t,e,n,i=0,r=1){const o=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),s=t.size,a=(s-1)*i;return typeof n=="function"?n(o,s):r===1?o*i:a-o*i}function tu(t,e,n={}){const i=wr(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(eu(t,i,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=r;return c1(t,e,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,c]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function c1(t,e,n=0,i=0,r=0,o=1,s){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(tu(l,e,{...s,delay:n+(typeof i=="function"?0:i)+gm(t.variantChildren,l,i,r,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function u1(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(o=>tu(t,o,n));i=Promise.all(r)}else if(typeof e=="string")i=tu(t,e,n);else{const r=typeof e=="function"?wr(t,e,n.custom):e;i=Promise.all(eu(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function ym(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const d1=$c.length;function vm(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?vm(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<d1;n++){const i=$c[n],r=t.props[i];(bo(r)||r===!1)&&(e[i]=r)}return e}const f1=[...Lc].reverse(),p1=Lc.length;function h1(t){return e=>Promise.all(e.map(({animation:n,options:i})=>u1(t,n,i)))}function m1(t){let e=h1(t),n=xm(),i=!0;const r=l=>(c,u)=>{const d=wr(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...h}=d;c={...c,...h,...p}}return c};function o(l){e=l(t)}function s(l){const{props:c}=t,u=vm(t.parent)||{},d=[],f=new Set;let p={},h=1/0;for(let g=0;g<p1;g++){const y=f1[g],x=n[y],b=c[y]!==void 0?c[y]:u[y],w=bo(b),_=y===l?x.isActive:null;_===!1&&(h=g);let C=b===u[y]&&b!==c[y]&&w;if(C&&i&&t.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...p},!x.isActive&&_===null||!b&&!x.prevProp||Gs(b)||typeof b=="boolean")continue;const E=g1(x.prevProp,b);let S=E||y===l&&x.isActive&&!C&&w||g>h&&w,k=!1;const A=Array.isArray(b)?b:[b];let P=A.reduce(r(y),{});_===!1&&(P={});const{prevResolvedValues:X={}}=x,W={...X,...P},I=z=>{S=!0,f.has(z)&&(k=!0,f.delete(z)),x.needsAnimating[z]=!0;const $=t.getValue(z);$&&($.liveStyle=!1)};for(const z in W){const $=P[z],G=X[z];if(p.hasOwnProperty(z))continue;let T=!1;Jc($)&&Jc(G)?T=!ym($,G):T=$!==G,T?$!=null?I(z):f.add(z):$!==void 0&&f.has(z)?I(z):x.protectedKeys[z]=!0}x.prevProp=b,x.prevResolvedValues=P,x.isActive&&(p={...p,...P}),i&&t.blockInitialAnimation&&(S=!1);const Y=C&&E;S&&(!Y||k)&&d.push(...A.map(z=>{const $={type:y};if(typeof z=="string"&&i&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:G}=t,T=wr(G,z);if(G.enteringChildren&&T){const{delayChildren:M}=T.transition||{};$.delay=gm(G.enteringChildren,t,M)}}return{animation:z,options:$}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const y=wr(t,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(g.transition=y.transition)}f.forEach(y=>{const x=t.getBaseTarget(y),b=t.getValue(y);b&&(b.liveStyle=!0),g[y]=x??null}),d.push({animation:g})}let m=!!d.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),i=!1,m?e(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=xm(),i=!0}}}function g1(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ym(e,t):!1}function Ti(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xm(){return{animate:Ti(!0),whileInView:Ti(),whileHover:Ti(),whileTap:Ti(),whileDrag:Ti(),whileFocus:Ti(),exit:Ti()}}class Yn{constructor(e){this.isMounted=!1,this.node=e}update(){}}class y1 extends Yn{constructor(e){super(e),e.animationState||(e.animationState=m1(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Gs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let v1=0;class x1 extends Yn{constructor(){super(...arguments),this.id=v1++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const b1={animation:{Feature:y1},exit:{Feature:x1}};function So(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Co(t){return{point:{x:t.pageX,y:t.pageY}}}const _1=t=>e=>Ic(e)&&t(e,Co(e));function ko(t,e,n,i){return So(t,e,_1(n),i)}const bm=1e-4,w1=1-bm,S1=1+bm,_m=.01,C1=0-_m,k1=0+_m;function gt(t){return t.max-t.min}function T1(t,e,n){return Math.abs(t-e)<=n}function wm(t,e,n,i=.5){t.origin=i,t.originPoint=Me(e.min,e.max,t.origin),t.scale=gt(n)/gt(e),t.translate=Me(n.min,n.max,t.origin)-t.originPoint,(t.scale>=w1&&t.scale<=S1||isNaN(t.scale))&&(t.scale=1),(t.translate>=C1&&t.translate<=k1||isNaN(t.translate))&&(t.translate=0)}function To(t,e,n,i){wm(t.x,e.x,n.x,i?i.originX:void 0),wm(t.y,e.y,n.y,i?i.originY:void 0)}function Sm(t,e,n){t.min=n.min+e.min,t.max=t.min+gt(e)}function E1(t,e,n){Sm(t.x,e.x,n.x),Sm(t.y,e.y,n.y)}function Cm(t,e,n){t.min=e.min-n.min,t.max=t.min+gt(e)}function Eo(t,e,n){Cm(t.x,e.x,n.x),Cm(t.y,e.y,n.y)}function jt(t){return[t("x"),t("y")]}const km=({current:t})=>t?t.ownerDocument.defaultView:null,Tm=(t,e)=>Math.abs(t-e);function N1(t,e){const n=Tm(t.x,e.x),i=Tm(t.y,e.y);return Math.sqrt(n**2+i**2)}class Em{constructor(e,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=iu(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=N1(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!h)return;const{point:m}=f,{timestamp:g}=et;this.history.push({...m,timestamp:g});const{onStart:y,onMove:x}=this.handlers;p||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=nu(p,this.transformPagePoint),Oe.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=iu(f.type==="pointercancel"?this.lastMoveEventInfo:nu(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,y),m&&m(f,y)},!Ic(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=r||window;const a=Co(e),l=nu(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=et;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(e,iu(l,this.history)),this.removeListeners=uo(ko(this.contextWindow,"pointermove",this.handlePointerMove),ko(this.contextWindow,"pointerup",this.handlePointerUp),ko(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Un(this.updatePoint)}}function nu(t,e){return e?{point:e(t.point)}:t}function Nm(t,e){return{x:t.x-e.x,y:t.y-e.y}}function iu({point:t},e){return{point:t,delta:Nm(t,Am(e)),offset:Nm(t,A1(e)),velocity:P1(e,.1)}}function A1(t){return t[0]}function Am(t){return t[t.length-1]}function P1(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Am(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>It(e)));)n--;if(!i)return{x:0,y:0};const o=ln(r.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function D1(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?Me(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?Me(n,t,i.max):Math.min(t,n)),t}function Pm(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function O1(t,{top:e,left:n,bottom:i,right:r}){return{x:Pm(t.x,n,r),y:Pm(t.y,e,i)}}function Dm(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function M1(t,e){return{x:Dm(t.x,e.x),y:Dm(t.y,e.y)}}function I1(t,e){let n=.5;const i=gt(t),r=gt(e);return r>i?n=ur(e.min,e.max-i,t.min):i>r&&(n=ur(t.min,t.max-r,e.min)),_n(0,1,n)}function j1(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const ru=.35;function R1(t=ru){return t===!1?t=0:t===!0&&(t=ru),{x:Om(t,"left","right"),y:Om(t,"top","bottom")}}function Om(t,e,n){return{min:Mm(t,e),max:Mm(t,n)}}function Mm(t,e){return typeof t=="number"?t:t[e]||0}const F1=new WeakMap;class L1{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$e(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Co(d).point)},s=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:m}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ZS(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),jt(y=>{let x=this.getAxisMotionValue(y).get()||0;if(cn.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[y];w&&(x=gt(w)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&Oe.postRender(()=>m(d,f)),Zc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(h&&this.currentDirection===null){this.currentDirection=$1(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&g(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>jt(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Em(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:km(this.visualElement)})}stop(e,n){const i=e||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!i)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Oe.postRender(()=>a(i,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:r}=this.getProps();if(!i||!Qs(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(s=D1(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&vr(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=O1(i.layoutBox,e):this.constraints=!1,this.elastic=R1(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&jt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=j1(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!vr(e))return!1;const i=e.current;Ot(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=KC(i,r.root,this.visualElement.getTransformPagePoint());let s=M1(r.layout.layoutBox,o);if(n){const a=n(BC(s));this.hasMutatedConstraints=!!a,a&&(s=Xh(a))}return s}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=jt(u=>{if(!Qs(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=r?200:1e6,p=r?40:1e7,h={type:"inertia",velocity:i?e[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return Zc(this.visualElement,e),i.start(Qc(e,i,0,n,this.visualElement,!1))}stopAnimation(){jt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){jt(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){jt(n=>{const{drag:i}=this.getProps();if(!Qs(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:s,max:a}=r.layout.layoutBox[n];o.set(e[n]-Me(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!vr(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};jt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();r[s]=I1({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),jt(s=>{if(!Qs(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Me(l,c,r[s]))})}addListeners(){if(!this.visualElement.current)return;F1.set(this.visualElement,this);const e=this.visualElement.current,n=ko(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();vr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Oe.read(i);const s=So(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(jt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:s=ru,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Qs(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function $1(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class z1 extends Yn{constructor(e){super(e),this.removeGroupControls=Mt,this.removeListeners=Mt,this.controls=new L1(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Mt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Im=t=>(e,n)=>{t&&Oe.postRender(()=>t(e,n))};class B1 extends Yn{constructor(){super(...arguments),this.removePointerDownListener=Mt}onPointerDown(e){this.session=new Em(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:km(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Im(e),onStart:Im(n),onMove:i,onEnd:(o,s)=>{delete this.session,r&&Oe.postRender(()=>r(o,s))}}}mount(){this.removePointerDownListener=ko(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ea={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function jm(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const No={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ue.test(t))t=parseFloat(t);else return t;const n=jm(t,e.target.x),i=jm(t,e.target.y);return`${n}% ${i}%`}},V1={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=Hn.parse(t);if(r.length>5)return i;const o=Hn.createTransformer(t),s=typeof r[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+s]/=a,r[1+s]/=l;const c=Me(a,l,.5);return typeof r[2+s]=="number"&&(r[2+s]/=c),typeof r[3+s]=="number"&&(r[3+s]/=c),o(r)}};let ou=!1;class W1 extends N.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:o}=e;gC(K1),o&&(n.group&&n.group.add(o),i&&i.register&&r&&i.register(o),ou&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ea.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:r,isPresent:o}=this.props,{projection:s}=i;return s&&(s.isPresent=o,ou=!0,r||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Oe.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Mc.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=e;ou=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Rm(t){const[e,n]=Oh(),i=N.useContext(ql);return v.jsx(W1,{...t,layoutGroup:i,switchLayoutGroup:N.useContext(Yh),isPresent:e,safeToRemove:n})}const K1={borderRadius:{...No,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:No,borderTopRightRadius:No,borderBottomLeftRadius:No,borderBottomRightRadius:No,boxShadow:V1};function Fm(t,e,n){const i=Ge(t)?t:gr(t);return i.start(Qc("",i,e,n)),i.animation}const U1=(t,e)=>t.depth-e.depth;class q1{constructor(){this.children=[],this.isDirty=!1}add(e){Gl(this.children,e),this.isDirty=!0}remove(e){$s(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(U1),this.isDirty=!1,this.children.forEach(e)}}function H1(t,e){const n=wt.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&(Un(i),t(o-e))};return Oe.setup(i,!0),()=>Un(i)}const Lm=["TopLeft","TopRight","BottomLeft","BottomRight"],Y1=Lm.length,$m=t=>typeof t=="string"?parseFloat(t):t,zm=t=>typeof t=="number"||ue.test(t);function G1(t,e,n,i,r,o){r?(t.opacity=Me(0,n.opacity??1,X1(i)),t.opacityExit=Me(e.opacity??1,0,J1(i))):o&&(t.opacity=Me(e.opacity??1,n.opacity??1,i));for(let s=0;s<Y1;s++){const a=`border${Lm[s]}Radius`;let l=Bm(e,a),c=Bm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||zm(l)===zm(c)?(t[a]=Math.max(Me($m(l),$m(c),i),0),(cn.test(c)||cn.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Me(e.rotate||0,n.rotate||0,i))}function Bm(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const X1=Vm(0,.5,Ep),J1=Vm(.5,.95,Mt);function Vm(t,e,n){return i=>i<t?0:i>e?1:n(ur(t,e,i))}function Wm(t,e){t.min=e.min,t.max=e.max}function Rt(t,e){Wm(t.x,e.x),Wm(t.y,e.y)}function Km(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Um(t,e,n,i,r){return t-=e,t=Zs(t,1/n,i),r!==void 0&&(t=Zs(t,1/r,i)),t}function Z1(t,e=0,n=1,i=.5,r,o=t,s=t){if(cn.test(e)&&(e=parseFloat(e),e=Me(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Me(o.min,o.max,i);t===o&&(a-=e),t.min=Um(t.min,e,n,a,r),t.max=Um(t.max,e,n,a,r)}function qm(t,e,[n,i,r],o,s){Z1(t,e[n],e[i],e[r],e.scale,o,s)}const Q1=["x","scaleX","originX"],ek=["y","scaleY","originY"];function Hm(t,e,n,i){qm(t.x,e,Q1,n?n.x:void 0,i?i.x:void 0),qm(t.y,e,ek,n?n.y:void 0,i?i.y:void 0)}function Ym(t){return t.translate===0&&t.scale===1}function Gm(t){return Ym(t.x)&&Ym(t.y)}function Xm(t,e){return t.min===e.min&&t.max===e.max}function tk(t,e){return Xm(t.x,e.x)&&Xm(t.y,e.y)}function Jm(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Zm(t,e){return Jm(t.x,e.x)&&Jm(t.y,e.y)}function Qm(t){return gt(t.x)/gt(t.y)}function eg(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class nk{constructor(){this.members=[]}add(e){Gl(this.members,e),e.scheduleRender()}remove(e){if($s(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(r=>e===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ik(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,s=n?.z||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:h}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),p&&(i+=`skewX(${p}deg) `),h&&(i+=`skewY(${h}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const su=["","X","Y","Z"],rk=1e3;let ok=0;function au(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function tg(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=mm(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Oe,!(r||o))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&tg(i)}function ng({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(s={},a=e?.()){this.id=ok++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(lk),this.nodes.forEach(fk),this.nodes.forEach(pk),this.nodes.forEach(ck)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new q1)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Zl),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Rc(s)&&!Dh(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;Oe.read(()=>{d=window.innerWidth}),t(s,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=H1(f,250),ea.hasAnimatedSinceResize&&(ea.hasAnimatedSinceResize=!1,this.nodes.forEach(og)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||c.getDefaultTransition()||vk,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!Zm(this.targetLayout,p),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Pc(h,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,x)}else d||og(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Un(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hk),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&tg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ig);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(rg);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(dk),this.nodes.forEach(sk),this.nodes.forEach(ak)):this.nodes.forEach(rg),this.clearAllSnapshots();const a=wt.now();et.delta=_n(0,1e3/60,a-et.timestamp),et.timestamp=a,et.isProcessing=!0,nc.update.process(et),nc.preRender.process(et),nc.render.process(et),et.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(uk),this.sharedNodes.forEach(mk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Oe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Oe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!gt(this.snapshot.measuredBox.x)&&!gt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$e(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||ki(this.latestValues)||u)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),xk(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return $e();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(bk))){const{scroll:c}=this.root;c&&(xr(a.x,c.offset.x),xr(a.y,c.offset.y))}return a}removeElementScroll(s){const a=$e();if(Rt(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Rt(a,s),xr(a.x,u.offset.x),xr(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=$e();Rt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&br(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ki(u.latestValues)&&br(l,u.latestValues)}return ki(this.latestValues)&&br(l,this.latestValues),l}removeTransform(s){const a=$e();Rt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ki(c.latestValues))continue;Yc(c.latestValues)&&c.updateSnapshot();const u=$e(),d=c.measurePageBox();Rt(u,d),Hm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ki(this.latestValues)&&Hm(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==et.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=et.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),Eo(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Rt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$e(),this.targetWithTransforms=$e()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),E1(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Rt(this.target,this.layout.layoutBox),em(this.target,this.targetDelta)):Rt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),Eo(this.relativeTargetOrigin,this.target,f.target),Rt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Yc(this.parent.latestValues)||Jh(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===et.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Rt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;WC(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=$e());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Km(this.prevProjectionDelta.x,this.projectionDelta.x),Km(this.prevProjectionDelta.y,this.projectionDelta.y)),To(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!eg(this.projectionDelta.x,this.prevProjectionDelta.x)||!eg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_r(),this.projectionDelta=_r(),this.projectionDeltaWithTransform=_r()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=_r();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=$e(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,g=this.getStack(),y=!g||g.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(yk));this.animationProgress=0;let b;this.mixTargetDelta=w=>{const _=w/1e3;sg(d.x,s.x,_),sg(d.y,s.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Eo(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gk(this.relativeTarget,this.relativeTargetOrigin,f,_),b&&tk(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=$e()),Rt(b,this.relativeTarget)),m&&(this.animationValues=u,G1(u,c,this.latestValues,_,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Oe.update(()=>{ea.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gr(0)),this.currentAnimation=Fm(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(rk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&dg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||$e();const d=gt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=gt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Rt(a,l),br(a,u),To(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new nk),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&au("z",s,c,this.animationValues);for(let u=0;u<su.length;u++)au(`rotate${su[u]}`,s,c,this.animationValues),au(`skew${su[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Js(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Js(a?.pointerEvents)||""),this.hasProjected&&!ki(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=ik(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const h in _o){if(u[h]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=_o[h],x=d==="none"?u[h]:m(u[h],c);if(g){const b=g.length;for(let w=0;w<b;w++)s[g[w]]=x}else y?this.options.visualElement.renderState.vars[h]=x:s[h]=x}this.options.layoutId&&(s.pointerEvents=c===this?Js(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(ig),this.root.sharedNodes.clear()}}}function sk(t){t.updateLayout()}function ak(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;r==="size"?jt(u=>{const d=o?e.measuredBox[u]:e.layoutBox[u],f=gt(d);d.min=n[u].min,d.max=d.min+f}):dg(r,e.layoutBox,n)&&jt(u=>{const d=o?e.measuredBox[u]:e.layoutBox[u],f=gt(n[u]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const s=_r();To(s,n,e.layoutBox);const a=_r();o?To(a,t.applyTransform(i,!0),e.measuredBox):To(a,n,e.layoutBox);const l=!Gm(s);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=$e();Eo(p,e.layoutBox,d.layoutBox);const h=$e();Eo(h,n,f.layoutBox),Zm(p,h)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=h,t.relativeTargetOrigin=p,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function lk(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ck(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function uk(t){t.clearSnapshot()}function ig(t){t.clearMeasurements()}function rg(t){t.isLayoutDirty=!1}function dk(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function og(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fk(t){t.resolveTargetDelta()}function pk(t){t.calcProjection()}function hk(t){t.resetSkewAndRotation()}function mk(t){t.removeLeadSnapshot()}function sg(t,e,n){t.translate=Me(e.translate,0,n),t.scale=Me(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ag(t,e,n,i){t.min=Me(e.min,n.min,i),t.max=Me(e.max,n.max,i)}function gk(t,e,n,i){ag(t.x,e.x,n.x,i),ag(t.y,e.y,n.y,i)}function yk(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const vk={duration:.45,ease:[.4,0,.1,1]},lg=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),cg=lg("applewebkit/")&&!lg("chrome/")?Math.round:Mt;function ug(t){t.min=cg(t.min),t.max=cg(t.max)}function xk(t){ug(t.x),ug(t.y)}function dg(t,e,n){return t==="position"||t==="preserve-aspect"&&!T1(Qm(e),Qm(n),.2)}function bk(t){return t!==t.root&&t.scroll?.wasRoot}const _k=ng({attachResizeListener:(t,e)=>So(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lu={current:void 0},fg=ng({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!lu.current){const t=new _k({});t.mount(window),t.setOptions({layoutScroll:!0}),lu.current=t}return lu.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),wk={pan:{Feature:B1},drag:{Feature:z1,ProjectionNode:fg,MeasureLayout:Rm}};function pg(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=i[r];o&&Oe.postRender(()=>o(e,Co(e)))}class Sk extends Yn{mount(){const{current:e}=this.node;e&&(this.unmount=QS(e,(n,i)=>(pg(this.node,i,"Start"),r=>pg(this.node,r,"End"))))}unmount(){}}class Ck extends Yn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=uo(So(this.node.current,"focus",()=>this.onFocus()),So(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function hg(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=i[r];o&&Oe.postRender(()=>o(e,Co(e)))}class kk extends Yn{mount(){const{current:e}=this.node;e&&(this.unmount=iC(e,(n,i)=>(hg(this.node,i,"Start"),(r,{success:o})=>hg(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const cu=new WeakMap,uu=new WeakMap,Tk=t=>{const e=cu.get(t.target);e&&e(t)},Ek=t=>{t.forEach(Tk)};function Nk({root:t,...e}){const n=t||document;uu.has(n)||uu.set(n,{});const i=uu.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(Ek,{root:t,...e})),i[r]}function Ak(t,e,n){const i=Nk(e);return cu.set(t,n),i.observe(t),()=>{cu.delete(t),i.unobserve(t)}}const Pk={some:0,all:1};class Dk extends Yn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:Pk[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Ak(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Ok(e,n))&&this.startObserver()}unmount(){}}function Ok({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Mk={...b1,...{inView:{Feature:Dk},tap:{Feature:kk},focus:{Feature:Ck},hover:{Feature:Sk}},...wk,...{layout:{ProjectionNode:fg,MeasureLayout:Rm}}},qt=zC(Mk,GC);function du(t){return typeof t=="object"&&!Array.isArray(t)}function mg(t,e,n,i){return typeof t=="string"&&du(e)?_h(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Ik(t,e,n){return t*(e+1)}function gg(t,e,n,i){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function jk(t,e,n){for(let i=0;i<t.length;i++){const r=t[i];r.at>e&&r.at<n&&($s(t,r),i--)}}function Rk(t,e,n,i,r,o){jk(t,r,o);for(let s=0;s<e.length;s++)t.push({value:e[s],at:Me(r,o,i[s]),easing:Dp(n,s)})}function Fk(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Lk(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const $k="easeInOut",zk=20;function Bk(t,{defaultTransition:e={},...n}={},i,r){const o=e.duration||.3,s=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<t.length;p++){const h=t[p];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,gg(d,h.at,u,c));continue}let[m,g,y={}]=h;y.at!==void 0&&(d=gg(d,y.at,u,c));let x=0;const b=(w,_,C,E=0,S=0)=>{const k=Vk(w),{delay:A=0,times:P=Qp(k),type:X="keyframes",repeat:W,repeatType:I,repeatDelay:Y=0,...V}=_;let{ease:z=e.ease||"easeOut",duration:$}=_;const G=typeof A=="function"?A(E,S):A,T=k.length,M=Nc(X)?X:r?.[X||"keyframes"];if(T<=2&&M){let K=100;if(T===2&&Uk(k)){const U=k[1]-k[0];K=Math.abs(U)}const ee={...V};$!==void 0&&(ee.duration=It($));const j=Gp(ee,K,M);z=j.ease,$=j.duration}$??($=o);const F=d+G;P.length===1&&P[0]===0&&(P[1]=1);const B=P.length-k.length;if(B>0&&Zp(P,B),k.length===1&&k.unshift(null),W){Ot(W<zk,"Repeat count too high, must be less than 20","repeat-count-high"),$=Ik($,W);const K=[...k],ee=[...P];z=Array.isArray(z)?[...z]:[z];const j=[...z];for(let U=0;U<W;U++){k.push(...K);for(let oe=0;oe<K.length;oe++)P.push(ee[oe]+(U+1)),z.push(oe===0?"linear":Dp(j,oe-1))}Fk(P,W)}const J=F+$;Rk(C,k,z,P,F,J),x=Math.max(G+$,x),f=Math.max(J,f)};if(Ge(m)){const w=yg(m,a);b(g,y,vg("default",w))}else{const w=mg(m,g,i,l),_=w.length;for(let C=0;C<_;C++){g=g,y=y;const E=w[C],S=yg(E,a);for(const k in g)b(g[k],Wk(y,k),vg(k,S),C,_)}}u=d,d+=x}return a.forEach((p,h)=>{for(const m in p){const g=p[m];g.sort(Lk);const y=[],x=[],b=[];for(let _=0;_<g.length;_++){const{at:C,value:E,easing:S}=g[_];y.push(E),x.push(ur(0,f,C)),b.push(S||"easeOut")}x[0]!==0&&(x.unshift(0),y.unshift(y[0]),b.unshift($k)),x[x.length-1]!==1&&(x.push(1),y.push(null)),s.has(h)||s.set(h,{keyframes:{},transition:{}});const w=s.get(h);w.keyframes[m]=y,w.transition[m]={...e,duration:f,ease:b,times:x,...n}}}),s}function yg(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function vg(t,e){return e[t]||(e[t]=[]),e[t]}function Vk(t){return Array.isArray(t)?t:[t]}function Wk(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Kk=t=>typeof t=="number",Uk=t=>t.every(Kk);function qk(t,e){return t in e}class Hk extends cm{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(qk(n,e)){const i=e[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return $e()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function Yk(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Rc(t)&&!Dh(t)?new hm(e):new fm(e);n.mount(t),wo.set(t,n)}function Gk(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Hk(e);n.mount(t),wo.set(t,n)}function Xk(t,e){return Ge(t)||typeof t=="number"||typeof t=="string"&&!du(e)}function xg(t,e,n,i){const r=[];if(Xk(t,e))r.push(Fm(t,du(e)&&e.default||e,n&&(n.default||n)));else{const o=mg(t,e,i),s=o.length;Ot(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=o[a];Ot(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const c=l instanceof Element?Yk:Gk;wo.has(l)||c(l);const u=wo.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),r.push(...eu(u,{...e,transition:d},{}))}}return r}function Jk(t,e,n){const i=[];return Bk(t,e,n,{spring:yo}).forEach(({keyframes:o,transition:s},a)=>{i.push(...xg(a,o,s))}),i}function Zk(t){return Array.isArray(t)&&t.some(Array.isArray)}function Qk(t){function e(n,i,r){let o=[];return Zk(n)?o=Jk(n,i,t):o=xg(n,i,r,t),new FS(o)}return e}const eT=Qk(),tT=["polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)","polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)","polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"],Sr=t=>{const{speed:e=1,className:n}=t,i=1/e,r=2/e;return v.jsx(xo,{children:v.jsx(qt.div,{role:"status",className:Q("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:i},children:v.jsx(qt.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:tT},transition:{repeat:1/0,ease:"linear",duration:r,times:[0,.25,.5,.75,1]}})})})},Sn={sm:"h-[var(--control-size-sm-height)]",md:"h-[var(--control-size-md-height)]",lg:"h-[var(--control-size-lg-height)]"},bg={sm:"min-h-[var(--control-size-sm-height)]",md:"min-h-[var(--control-size-md-height)]",lg:"min-h-[var(--control-size-lg-height)]"},Ht={sm:"text-[length:var(--control-size-sm-font-size)]",md:"text-[length:var(--control-size-md-font-size)]",lg:"text-[length:var(--control-size-lg-font-size)]"},nT={sm:"gap-[var(--control-size-sm-gap)]",md:"gap-[var(--control-size-md-gap)]",lg:"gap-[var(--control-size-lg-gap)]"},iT={sm:"px-[var(--control-size-sm-px)]",md:"px-[var(--control-size-md-px)]",lg:"px-[var(--control-size-lg-px)]"},Gn={sm:"pl-[var(--control-size-sm-px)]",md:"pl-[var(--control-size-md-px)]",lg:"pl-[var(--control-size-lg-px)]"},fu={sm:"pr-[var(--control-size-sm-px)]",md:"pr-[var(--control-size-md-px)]",lg:"pr-[var(--control-size-lg-px)]"},Xn={sm:"pr-[calc(var(--control-size-sm-px)+2rem)]",md:"pr-[calc(var(--control-size-md-px)+2rem)]",lg:"pr-[calc(var(--control-size-lg-px)+2rem)]"},ta={sm:"pr-[calc(var(--control-size-sm-px)+3.75rem)]",md:"pr-[calc(var(--control-size-md-px)+3.75rem)]",lg:"pr-[calc(var(--control-size-lg-px)+3.75rem)]"},_g={sm:"pl-[calc(var(--control-size-sm-icon-offset)+var(--control-size-sm-icon)+0.75rem)]",md:"pl-[calc(var(--control-size-md-icon-offset)+var(--control-size-md-icon)+0.75rem)]",lg:"pl-[calc(var(--control-size-lg-icon-offset)+var(--control-size-lg-icon)+0.75rem)]"},wg={sm:"left-[var(--control-size-sm-icon-offset)]",md:"left-[var(--control-size-md-icon-offset)]",lg:"left-[var(--control-size-lg-icon-offset)]"},rT={sm:"right-[var(--control-size-sm-px)]",md:"right-[var(--control-size-md-px)]",lg:"right-[var(--control-size-lg-px)]"},Ei={sm:"h-[var(--control-size-sm-icon)] w-[var(--control-size-sm-icon)]",md:"h-[var(--control-size-md-icon)] w-[var(--control-size-md-icon)]",lg:"h-[var(--control-size-lg-icon)] w-[var(--control-size-lg-icon)]"},Sg={sm:"h-[var(--control-size-sm-height)] w-[var(--control-size-sm-height)]",md:"h-[var(--control-size-md-height)] w-[var(--control-size-md-height)]",lg:"h-[var(--control-size-lg-height)] w-[var(--control-size-lg-height)]"},oT=`
|
|
31
|
-
inline-flex flex-row items-center justify-center
|
|
32
|
-
button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
|
|
33
|
-
rounded-[var(--border-radius-input)]
|
|
34
|
-
cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
|
|
35
|
-
disabled:cursor-default
|
|
36
|
-
`,sT={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},Cg=O.forwardRef((t,e)=>{const{variant:n="white",size:i="md",className:r,children:o,loading:s=!1,Icon:a,...l}=t;return v.jsxs("button",{ref:e,className:Q(oT,sT[n],Sn[i],iT[i],Ht[i],nT[i],r),...l,children:[s&&v.jsx(Sr,{className:Q(Ei[i])}),!s&&v.jsxs(v.Fragment,{children:[a&&v.jsx(a,{className:Q(Ei[i],"-ml-1")}),o]})]})}),aT=`
|
|
37
|
-
inline-flex flex-row items-center justify-center
|
|
38
|
-
button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
|
|
39
|
-
rounded-[var(--border-radius-input)]
|
|
40
|
-
cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
|
|
41
|
-
disabled:cursor-default
|
|
42
|
-
`,lT={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},na=O.forwardRef((t,e)=>{const{variant:n="white",size:i="md",className:r,Icon:o,...s}=t;return v.jsx("button",{ref:e,className:Q(aT,lT[n],Sg[i],r),...s,children:v.jsx(o,{className:Ei[i]})})}),cT=`
|
|
43
|
-
inline-flex flex-row items-center justify-center
|
|
44
|
-
button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
|
|
45
|
-
disabled:cursor-default
|
|
46
|
-
`,uT={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},pu=O.forwardRef((t,e)=>{const{variant:n="white",size:i="md",className:r,Icon:o,...s}=t;return v.jsx("button",{ref:e,className:Q(cT,uT[n],Sg[i],r),...s,children:v.jsx(o,{className:Ei[i]})})});/**
|
|
47
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the MIT license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var dT={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
|
|
52
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Ce=(t,e,n,i)=>{const r=N.forwardRef(({color:o="currentColor",size:s=24,stroke:a=2,title:l,className:c,children:u,...d},f)=>N.createElement("svg",{ref:f,...dT[t],width:s,height:s,className:["tabler-icon",`tabler-icon-${e}`,c].join(" "),...t==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...d},[l&&N.createElement("title",{key:"svg-title"},l),...i.map(([p,h])=>N.createElement(p,h)),...Array.isArray(u)?u:[u]]));return r.displayName=`${n}`,r};/**
|
|
57
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the MIT license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const fT=Ce("outline","arrow-back-up","ArrowBackUp",[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]]);/**
|
|
62
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the MIT license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const pT=Ce("outline","arrow-forward-up","ArrowForwardUp",[["path",{d:"M15 14l4 -4l-4 -4",key:"svg-0"}],["path",{d:"M19 10h-11a4 4 0 1 0 0 8h1",key:"svg-1"}]]);/**
|
|
67
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the MIT license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const hT=Ce("outline","bold","Bold",[["path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z",key:"svg-0"}],["path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7",key:"svg-1"}]]);/**
|
|
72
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the MIT license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const kg=Ce("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
|
|
77
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the MIT license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Ni=Ce("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
|
|
82
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the MIT license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const mT=Ce("outline","chevron-right","ChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]);/**
|
|
87
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the MIT license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const gT=Ce("outline","chevron-up","ChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
|
|
92
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the MIT license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const yT=Ce("outline","cloud-upload","CloudUpload",[["path",{d:"M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1",key:"svg-0"}],["path",{d:"M9 15l3 -3l3 3",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}]]);/**
|
|
97
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the MIT license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const vT=Ce("outline","dots-vertical","DotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/**
|
|
102
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the MIT license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const xT=Ce("outline","eye-off","EyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]);/**
|
|
107
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the MIT license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const bT=Ce("outline","eye","Eye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
|
|
112
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the MIT license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const _T=Ce("outline","italic","Italic",[["path",{d:"M11 5l6 0",key:"svg-0"}],["path",{d:"M7 19l6 0",key:"svg-1"}],["path",{d:"M14 5l-4 14",key:"svg-2"}]]);/**
|
|
117
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the MIT license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const wT=Ce("outline","link","Link",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]]);/**
|
|
122
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the MIT license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const ST=Ce("outline","list-numbers","ListNumbers",[["path",{d:"M11 6h9",key:"svg-0"}],["path",{d:"M11 12h9",key:"svg-1"}],["path",{d:"M12 18h8",key:"svg-2"}],["path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4",key:"svg-3"}],["path",{d:"M6 10v-6l-2 2",key:"svg-4"}]]);/**
|
|
127
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the MIT license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const hu=Ce("outline","list","List",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]);/**
|
|
132
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the MIT license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const CT=Ce("outline","paperclip","Paperclip",[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]]);/**
|
|
137
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the MIT license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const Tg=Ce("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
|
|
142
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the MIT license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const mu=Ce("outline","search-off","SearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
|
|
147
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the MIT license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const ia=Ce("outline","search","Search",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
|
|
152
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the MIT license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const Eg=Ce("outline","settings","Settings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
|
|
157
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the MIT license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const kT=Ce("outline","trash","Trash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
|
|
162
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the MIT license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const TT=Ce("outline","underline","Underline",[["path",{d:"M7 5v5a5 5 0 0 0 10 0v-5",key:"svg-0"}],["path",{d:"M5 19h14",key:"svg-1"}]]);/**
|
|
167
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the MIT license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const Jn=Ce("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
|
|
172
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the MIT license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const ET=Ce("filled","alert-triangle-filled","AlertTriangleFilled",[["path",{d:"M12 1.67c.955 0 1.845 .467 2.39 1.247l.105 .16l8.114 13.548a2.914 2.914 0 0 1 -2.307 4.363l-.195 .008h-16.225a2.914 2.914 0 0 1 -2.582 -4.2l.099 -.185l8.11 -13.538a2.914 2.914 0 0 1 2.491 -1.403zm.01 13.33l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -7a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",key:"svg-0"}]]);/**
|
|
177
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the MIT license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const gu=Ce("filled","circle-check-filled","CircleCheckFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z",key:"svg-0"}]]);/**
|
|
182
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the MIT license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const yu=Ce("filled","exclamation-circle-filled","ExclamationCircleFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1",key:"svg-0"}]]);/**
|
|
187
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the MIT license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const NT=Ce("filled","info-circle-filled","InfoCircleFilled",[["path",{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",key:"svg-0"}]]);/**
|
|
192
|
-
* @license @tabler/icons-react v3.34.1 - MIT
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the MIT license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const AT=Ce("filled","mail-filled","MailFilled",[["path",{d:"M22 7.535v9.465a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-9.465l9.445 6.297l.116 .066a1 1 0 0 0 .878 0l.116 -.066l9.445 -6.297z",key:"svg-0"}],["path",{d:"M19 4c1.08 0 2.027 .57 2.555 1.427l-9.555 6.37l-9.555 -6.37a2.999 2.999 0 0 1 2.354 -1.42l.201 -.007h14z",key:"svg-1"}]]),Ft=t=>{const{children:e}=t;return e?v.jsx("label",{className:"input-label font-medium mb-1",children:e}):null},un=()=>v.jsx("div",{className:"h-5 w-5",children:v.jsx(yu,{className:"h-5 w-5 input-error-icon"})}),Yt=N.createContext("md"),PT=()=>N.useContext(Yt),Cn=O.forwardRef((t,e)=>{const{children:n,className:i}=t,r=PT();return v.jsx("div",{ref:e,className:Q("absolute top-1/2 -translate-y-1/2 flex flex-row items-center gap-1",rT[r],i),children:n})}),yt=t=>{const{children:e}=t;return e?v.jsx("div",{className:"input-description text-sm font-medium mt-2",children:e}):null},vt=t=>{const{children:e}=t;return e?v.jsx("div",{className:"input-error-text text-sm font-medium mt-2",children:e}):null},vu=t=>{const{className:e,label:n,description:i,Icon:r,error:o,buttonTray:s,size:a="md",...l}=t,c=!!o||!!s;return v.jsx(Yt.Provider,{value:a,children:v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsx(Ft,{children:n}),v.jsxs("div",{className:"flex flex-col relative",children:[r&&v.jsx(r,{className:Q("input-icon absolute top-1/2 -translate-y-1/2",Ei[a],wg[a])}),v.jsx("input",{className:Q("border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",Sn[a],Ht[a],r?_g[a]:Gn[a],c?Xn[a]:fu[a],o&&"input-error"),...l}),v.jsxs(Cn,{children:[o&&v.jsx(un,{}),s]})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:o})]})})},DT=t=>{const e=t.match(/^#?([0-9a-fA-F]{6})$/);if(!e)return null;const n=parseInt(e[1],16);return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]},OT=(t,e,n)=>{const i=r=>Math.round(r*255).toString(16).padStart(2,"0").toUpperCase();return"#"+i(t)+i(e)+i(n)},MT=(t,e,n)=>{const i=Math.max(t,e,n),r=Math.min(t,e,n),o=i-r;let s=0;return o!==0&&(i===t?s=((e-n)/o+6)%6:i===e?s=(n-t)/o+2:s=(t-e)/o+4,s*=60),[s,i===0?0:o/i,i]},IT=(t,e,n)=>{const i=n*e,r=t/60,o=i*(1-Math.abs(r%2-1));let s=0,a=0,l=0;r<1?(s=i,a=o):r<2?(s=o,a=i):r<3?(a=i,l=o):r<4?(a=o,l=i):r<5?(s=o,l=i):(s=i,l=o);const c=n-i;return[s+c,a+c,l+c]},Ao=(t,e,n)=>{const[i,r,o]=IT(t,e,n);return OT(i,r,o)},Ng=t=>{const e=DT(t);return e?MT(e[0],e[1],e[2]):null},jT=t=>{const e=t.trim();if(!e)return null;const n=e.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(n){let s=n[1];return s.length===3&&(s=s.split("").map(a=>a+a).join("")),"#"+s.toUpperCase()}if(typeof document>"u")return null;const i=document.createElement("div");if(i.style.color=e,!i.style.color)return null;document.body.appendChild(i);const r=getComputedStyle(i).color;document.body.removeChild(i);const o=r.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return o?"#"+[o[1],o[2],o[3]].map(s=>parseInt(s,10).toString(16).padStart(2,"0")).join("").toUpperCase():null},xu=t=>{const e=O.useRef(null),[n,i]=O.useState(!1),r=o=>{e.current=null,i(!1),o.currentTarget.releasePointerCapture?.(o.pointerId)};return{isDragging:n,bind:{onPointerDown:o=>{const s=o.currentTarget;e.current=s.getBoundingClientRect(),s.setPointerCapture?.(o.pointerId),i(!0),t(o.clientX,o.clientY,e.current)},onPointerMove:o=>{e.current&&t(o.clientX,o.clientY,e.current)},onPointerUp:r,onPointerCancel:r}}},RT="flex flex-col dropdown-panel border mt-1 rounded-xl shadow-lg overflow-y-auto relative space-y-1",FT={sm:"p-2",md:"p-3",lg:"p-4"},Zn=t=>{const{className:e,children:n,padding:i="md",...r}=t;return v.jsx("div",{className:Q(RT,FT[i],e),...r,children:n})};function ra(){return typeof window<"u"}function Cr(t){return bu(t)?(t.nodeName||"").toLowerCase():"#document"}function kt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function dn(t){var e;return(e=(bu(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function bu(t){return ra()?t instanceof Node||t instanceof kt(t).Node:!1}function ct(t){return ra()?t instanceof Element||t instanceof kt(t).Element:!1}function Lt(t){return ra()?t instanceof HTMLElement||t instanceof kt(t).HTMLElement:!1}function _u(t){return!ra()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof kt(t).ShadowRoot}const LT=new Set(["inline","contents"]);function Po(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Gt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!LT.has(r)}const $T=new Set(["table","td","th"]);function zT(t){return $T.has(Cr(t))}const BT=[":popover-open",":modal"];function oa(t){return BT.some(e=>{try{return t.matches(e)}catch{return!1}})}const VT=["transform","translate","scale","rotate","perspective"],WT=["transform","translate","scale","rotate","perspective","filter"],KT=["paint","layout","strict","content"];function wu(t){const e=Su(),n=ct(t)?Gt(t):t;return VT.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||WT.some(i=>(n.willChange||"").includes(i))||KT.some(i=>(n.contain||"").includes(i))}function UT(t){let e=Qn(t);for(;Lt(e)&&!kr(e);){if(wu(e))return e;if(oa(e))return null;e=Qn(e)}return null}function Su(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qT=new Set(["html","body","#document"]);function kr(t){return qT.has(Cr(t))}function Gt(t){return kt(t).getComputedStyle(t)}function sa(t){return ct(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Qn(t){if(Cr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_u(t)&&t.host||dn(t);return _u(e)?e.host:e}function Ag(t){const e=Qn(t);return kr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Lt(e)&&Po(e)?e:Ag(e)}function Do(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Ag(t),o=r===((i=t.ownerDocument)==null?void 0:i.body),s=kt(r);if(o){const a=Cu(s);return e.concat(s,s.visualViewport||[],Po(r)?r:[],a&&n?Do(a):[])}return e.concat(r,Do(r,[],n))}function Cu(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Tr=Math.min,Tt=Math.max,aa=Math.round,Er=Math.floor,fn=t=>({x:t,y:t}),HT={left:"right",right:"left",bottom:"top",top:"bottom"},YT={start:"end",end:"start"};function Pg(t,e,n){return Tt(t,Tr(e,n))}function Oo(t,e){return typeof t=="function"?t(e):t}function ei(t){return t.split("-")[0]}function Mo(t){return t.split("-")[1]}function Dg(t){return t==="x"?"y":"x"}function Og(t){return t==="y"?"height":"width"}const GT=new Set(["top","bottom"]);function kn(t){return GT.has(ei(t))?"y":"x"}function Mg(t){return Dg(kn(t))}function XT(t,e,n){n===void 0&&(n=!1);const i=Mo(t),r=Mg(t),o=Og(r);let s=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=la(s)),[s,la(s)]}function JT(t){const e=la(t);return[ku(t),e,ku(e)]}function ku(t){return t.replace(/start|end/g,e=>YT[e])}const Ig=["left","right"],jg=["right","left"],ZT=["top","bottom"],QT=["bottom","top"];function eE(t,e,n){switch(t){case"top":case"bottom":return n?e?jg:Ig:e?Ig:jg;case"left":case"right":return e?ZT:QT;default:return[]}}function tE(t,e,n,i){const r=Mo(t);let o=eE(ei(t),n==="start",i);return r&&(o=o.map(s=>s+"-"+r),e&&(o=o.concat(o.map(ku)))),o}function la(t){return t.replace(/left|right|bottom|top/g,e=>HT[e])}function nE(t){return{top:0,right:0,bottom:0,left:0,...t}}function iE(t){return typeof t!="number"?nE(t):{top:t,right:t,bottom:t,left:t}}function ca(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}/*!
|
|
197
|
-
* tabbable 6.2.0
|
|
198
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
199
|
-
*/var rE=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Tu=rE.join(","),Rg=typeof Element>"u",Io=Rg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ua=!Rg&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},da=function t(e,n){var i;n===void 0&&(n=!0);var r=e==null||(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"inert"),o=r===""||r==="true",s=o||n&&e&&t(e.parentNode);return s},oE=function(e){var n,i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return i===""||i==="true"},sE=function(e,n,i){if(da(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Tu));return n&&Io.call(e,Tu)&&r.unshift(e),r=r.filter(i),r},aE=function t(e,n,i){for(var r=[],o=Array.from(e);o.length;){var s=o.shift();if(!da(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,i);i.flatten?r.push.apply(r,c):r.push({scopeParent:s,candidates:c})}else{var u=Io.call(s,Tu);u&&i.filter(s)&&(n||!e.includes(s))&&r.push(s);var d=s.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(s),f=!da(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&f){var p=t(d===!0?s.children:d.children,!0,i);i.flatten?r.push.apply(r,p):r.push({scopeParent:s,candidates:p})}else o.unshift.apply(o,s.children)}}return r},Fg=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Lg=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||oE(e))&&!Fg(e)?0:e.tabIndex},lE=function(e,n){var i=Lg(e);return i<0&&n&&!Fg(e)?0:i},cE=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},$g=function(e){return e.tagName==="INPUT"},uE=function(e){return $g(e)&&e.type==="hidden"},dE=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(i){return i.tagName==="SUMMARY"});return n},fE=function(e,n){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===n)return e[i]},pE=function(e){if(!e.name)return!0;var n=e.form||ua(e),i=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=i(window.CSS.escape(e.name));else try{r=i(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=fE(r,e.form);return!o||o===e},hE=function(e){return $g(e)&&e.type==="radio"},mE=function(e){return hE(e)&&!pE(e)},gE=function(e){var n,i=e&&ua(e),r=(n=i)===null||n===void 0?void 0:n.host,o=!1;if(i&&i!==e){var s,a,l;for(o=!!((s=r)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&r;){var c,u,d;i=ua(r),r=(c=i)===null||c===void 0?void 0:c.host,o=!!((u=r)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return o},zg=function(e){var n=e.getBoundingClientRect(),i=n.width,r=n.height;return i===0&&r===0},yE=function(e,n){var i=n.displayCheck,r=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Io.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(Io.call(s,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof r=="function"){for(var a=e;e;){var l=e.parentElement,c=ua(e);if(l&&!l.shadowRoot&&r(l)===!0)return zg(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(gE(e))return!e.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return zg(e);return!1},vE=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i<n.children.length;i++){var r=n.children.item(i);if(r.tagName==="LEGEND")return Io.call(n,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}n=n.parentElement}return!1},xE=function(e,n){return!(n.disabled||da(n)||uE(n)||yE(n,e)||dE(n)||vE(n))},Bg=function(e,n){return!(mE(n)||Lg(n)<0||!xE(e,n))},bE=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},_E=function t(e){var n=[],i=[];return e.forEach(function(r,o){var s=!!r.scopeParent,a=s?r.scopeParent:r,l=lE(a,s),c=s?t(r.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):i.push({documentOrder:o,tabIndex:l,item:r,isScope:s,content:c})}),i.sort(cE).reduce(function(r,o){return o.isScope?r.push.apply(r,o.content):r.push(o.content),r},[]).concat(n)},Vg=function(e,n){n=n||{};var i;return n.getShadowRoot?i=aE([e],n.includeContainer,{filter:Bg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:bE}):i=sE(e,n.includeContainer,Bg.bind(null,n)),_E(i)};function Wg(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Kg(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:i}=e;return n+"/"+i}).join(" "):navigator.userAgent}function wE(){return/apple/i.test(navigator.vendor)}function Eu(){const t=/android/i;return t.test(Wg())||t.test(Kg())}function SE(){return Kg().includes("jsdom/")}const Ug="data-floating-ui-focusable",CE="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Nu="ArrowLeft",Au="ArrowRight",kE="ArrowUp",TE="ArrowDown";function Pu(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function qg(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&_u(n)){let i=e;for(;i;){if(t===i)return!0;i=i.parentNode||i.host}}return!1}function fa(t){return t?.ownerDocument||document}function EE(t){return Lt(t)&&t.matches(CE)}function NE(t){return t?t.getAttribute("role")==="combobox"&&EE(t):!1}function AE(t){return t?t.hasAttribute(Ug)?t:t.querySelector("["+Ug+"]")||t:null}function Hg(t,e,n){return n===void 0&&(n=!0),t.filter(r=>{var o;return r.parentId===e&&(!n||((o=r.context)==null?void 0:o.open))}).flatMap(r=>[r,...Hg(t,r.id,n)])}function PE(t,e){let n,i=-1;function r(o,s){s>i&&(n=o,i=s),Hg(t,o).forEach(l=>{r(l.id,s+1)})}return r(e,0),t.find(o=>o.id===n)}function $t(t){t.preventDefault(),t.stopPropagation()}function DE(t){return t.mozInputSource===0&&t.isTrusted?!0:Eu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function OE(t){return SE()?!1:!Eu()&&t.width===0&&t.height===0||Eu()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}var ME=typeof document<"u",IE=function(){},ut=ME?N.useLayoutEffect:IE;const jE={...O};function jo(t){const e=O.useRef(t);return ut(()=>{e.current=t}),e}const RE=jE.useInsertionEffect||(t=>t());function pa(t){const e=O.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return RE(()=>{e.current=t}),O.useCallback(function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.current==null?void 0:e.current(...i)},[])}function ha(t,e,n){return Math.floor(t/e)!==n}function Ro(t,e){return e<0||e>=t.current.length}function Du(t,e){return dt(t,{disabledIndices:e})}function Yg(t,e){return dt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function dt(t,e){let{startingIndex:n=-1,decrement:i=!1,disabledIndices:r,amount:o=1}=e===void 0?{}:e,s=n;do s+=i?-o:o;while(s>=0&&s<=t.current.length-1&&ma(t,s,r));return s}function FE(t,e){let{event:n,orientation:i,loop:r,rtl:o,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=e,f=u;if(n.key===kE){if(d&&$t(n),u===-1)f=c;else if(f=dt(t,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),r&&(u-s<l||f<0)){const p=u%s,h=c%s,m=c-(h-p);h===p?f=c:f=h>p?m:m-s}Ro(t,f)&&(f=u)}if(n.key===TE&&(d&&$t(n),u===-1?f=l:(f=dt(t,{startingIndex:u,amount:s,disabledIndices:a}),r&&u+s>c&&(f=dt(t,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),Ro(t,f)&&(f=u)),i==="both"){const p=Er(u/s);n.key===(o?Nu:Au)&&(d&&$t(n),u%s!==s-1?(f=dt(t,{startingIndex:u,disabledIndices:a}),r&&ha(f,s,p)&&(f=dt(t,{startingIndex:u-u%s-1,disabledIndices:a}))):r&&(f=dt(t,{startingIndex:u-u%s-1,disabledIndices:a})),ha(f,s,p)&&(f=u)),n.key===(o?Au:Nu)&&(d&&$t(n),u%s!==0?(f=dt(t,{startingIndex:u,decrement:!0,disabledIndices:a}),r&&ha(f,s,p)&&(f=dt(t,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):r&&(f=dt(t,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),ha(f,s,p)&&(f=u));const h=Er(c/s)===p;Ro(t,f)&&(r&&h?f=n.key===(o?Au:Nu)?c:dt(t,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function LE(t,e,n){const i=[];let r=0;return t.forEach((o,s)=>{let{width:a,height:l}=o;if(a>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(r=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(r+d+f*e);r%e+a<=e&&u.every(d=>i[d]==null)?(u.forEach(d=>{i[d]=s}),c=!0):r++}}),[...i]}function $E(t,e,n,i,r){if(t===-1)return-1;const o=n.indexOf(t),s=e[t];switch(r){case"tl":return o;case"tr":return s?o+s.width-1:o;case"bl":return s?o+(s.height-1)*i:o;case"br":return n.lastIndexOf(t)}}function zE(t,e){return e.flatMap((n,i)=>t.includes(n)?[i]:[])}function ma(t,e,n){if(typeof n=="function")return n(e);if(n)return n.includes(e);const i=t.current[e];return i==null||i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"}const Gg=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Xg(t,e){const n=Vg(t,Gg()),i=n.length;if(i===0)return;const r=Pu(fa(t)),o=n.indexOf(r),s=o===-1?e===1?0:i-1:o+e;return n[s]}function BE(t){return Xg(fa(t).body,1)||t}function VE(t){return Xg(fa(t).body,-1)||t}function Ou(t,e){const n=e||t.currentTarget,i=t.relatedTarget;return!i||!qg(n,i)}function WE(t){Vg(t,Gg()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Jg(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const i=n.dataset.tabindex;delete n.dataset.tabindex,i?n.setAttribute("tabindex",i):n.removeAttribute("tabindex")})}function Zg(t,e,n){let{reference:i,floating:r}=t;const o=kn(e),s=Mg(e),a=Og(s),l=ei(e),c=o==="y",u=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let p;switch(l){case"top":p={x:u,y:i.y-r.height};break;case"bottom":p={x:u,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:d};break;case"left":p={x:i.x-r.width,y:d};break;default:p={x:i.x,y:i.y}}switch(Mo(e)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}const KE=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:d}=Zg(c,i,l),f=i,p={},h=0;for(let m=0;m<a.length;m++){const{name:g,fn:y}=a[m],{x,y:b,data:w,reset:_}=await y({x:u,y:d,initialPlacement:i,placement:f,strategy:r,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});u=x??u,d=b??d,p={...p,[g]:{...p[g],...w}},_&&h<=50&&(h++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):_.rects),{x:u,y:d}=Zg(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:r,middlewareData:p}};async function Mu(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Oo(e,t),h=iE(p),g=a[f?d==="floating"?"reference":"floating":d],y=ca(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),w=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},_=ca(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-_.top+h.top)/w.y,bottom:(_.bottom-y.bottom+h.bottom)/w.y,left:(y.left-_.left+h.left)/w.x,right:(_.right-y.right+h.right)/w.x}}const UE=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Oo(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=ei(r),x=kn(a),b=ei(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=f||(b||!m?[la(a)]:JT(a)),C=h!=="none";!f&&C&&_.push(...tE(a,m,h,w));const E=[a,..._],S=await Mu(e,g),k=[];let A=((i=o.flip)==null?void 0:i.overflows)||[];if(u&&k.push(S[y]),d){const I=XT(r,s,w);k.push(S[I[0]],S[I[1]])}if(A=[...A,{placement:r,overflows:k}],!k.every(I=>I<=0)){var P,X;const I=(((P=o.flip)==null?void 0:P.index)||0)+1,Y=E[I];if(Y&&(!(d==="alignment"?x!==kn(Y):!1)||A.every($=>kn($.placement)===x?$.overflows[0]>0:!0)))return{data:{index:I,overflows:A},reset:{placement:Y}};let V=(X=A.filter(z=>z.overflows[0]<=0).sort((z,$)=>z.overflows[1]-$.overflows[1])[0])==null?void 0:X.placement;if(!V)switch(p){case"bestFit":{var W;const z=(W=A.filter($=>{if(C){const G=kn($.placement);return G===x||G==="y"}return!0}).map($=>[$.placement,$.overflows.filter(G=>G>0).reduce((G,T)=>G+T,0)]).sort(($,G)=>$[1]-G[1])[0])==null?void 0:W[0];z&&(V=z);break}case"initialPlacement":V=a;break}if(r!==V)return{reset:{placement:V}}}return{}}}},qE=new Set(["left","top"]);async function HE(t,e){const{placement:n,platform:i,elements:r}=t,o=await(i.isRTL==null?void 0:i.isRTL(r.floating)),s=ei(n),a=Mo(n),l=kn(n)==="y",c=qE.has(s)?-1:1,u=o&&l?-1:1,d=Oo(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const YE=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:o,placement:s,middlewareData:a}=e,l=await HE(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:s}}}}},GE=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:y,y:x}=g;return{x:y,y:x}}},...l}=Oo(t,e),c={x:n,y:i},u=await Mu(e,l),d=kn(ei(r)),f=Dg(d);let p=c[f],h=c[d];if(o){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=p+u[g],b=p-u[y];p=Pg(x,p,b)}if(s){const g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=h+u[g],b=h-u[y];h=Pg(x,h,b)}const m=a.fn({...e,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-i,enabled:{[f]:o,[d]:s}}}}}},XE=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...c}=Oo(t,e),u=await Mu(e,c),d=ei(r),f=Mo(r),p=kn(r)==="y",{width:h,height:m}=o.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,g=f==="end"?"top":"bottom");const x=m-u.top-u.bottom,b=h-u.left-u.right,w=Tr(m-u[g],x),_=Tr(h-u[y],b),C=!e.middlewareData.shift;let E=w,S=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(S=b),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(E=x),C&&!f){const A=Tt(u.left,0),P=Tt(u.right,0),X=Tt(u.top,0),W=Tt(u.bottom,0);p?S=h-2*(A!==0||P!==0?A+P:Tt(u.left,u.right)):E=m-2*(X!==0||W!==0?X+W:Tt(u.top,u.bottom))}await l({...e,availableWidth:S,availableHeight:E});const k=await s.getDimensions(a.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function Qg(t){const e=Gt(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Lt(t),o=r?t.offsetWidth:n,s=r?t.offsetHeight:i,a=aa(n)!==o||aa(i)!==s;return a&&(n=o,i=s),{width:n,height:i,$:a}}function Iu(t){return ct(t)?t:t.contextElement}function Nr(t){const e=Iu(t);if(!Lt(e))return fn(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:o}=Qg(e);let s=(o?aa(n.width):n.width)/i,a=(o?aa(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const JE=fn(0);function ey(t){const e=kt(t);return!Su()||!e.visualViewport?JE:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ZE(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==kt(t)?!1:e}function Ai(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),o=Iu(t);let s=fn(1);e&&(i?ct(i)&&(s=Nr(i)):s=Nr(t));const a=ZE(o,n,i)?ey(o):fn(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(o){const f=kt(o),p=i&&ct(i)?kt(i):i;let h=f,m=Cu(h);for(;m&&i&&p!==h;){const g=Nr(m),y=m.getBoundingClientRect(),x=Gt(m),b=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,w=y.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=b,c+=w,h=kt(m),m=Cu(h)}}return ca({width:u,height:d,x:l,y:c})}function ga(t,e){const n=sa(t).scrollLeft;return e?e.left+n:Ai(dn(t)).left+n}function ty(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-ga(t,n),r=n.top+e.scrollTop;return{x:i,y:r}}function QE(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const o=r==="fixed",s=dn(i),a=e?oa(e.floating):!1;if(i===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=fn(1);const u=fn(0),d=Lt(i);if((d||!d&&!o)&&((Cr(i)!=="body"||Po(s))&&(l=sa(i)),Lt(i))){const p=Ai(i);c=Nr(i),u.x=p.x+i.clientLeft,u.y=p.y+i.clientTop}const f=s&&!d&&!o?ty(s,l):fn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function eN(t){return Array.from(t.getClientRects())}function tN(t){const e=dn(t),n=sa(t),i=t.ownerDocument.body,r=Tt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Tt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+ga(t);const a=-n.scrollTop;return Gt(i).direction==="rtl"&&(s+=Tt(e.clientWidth,i.clientWidth)-r),{width:r,height:o,x:s,y:a}}const ny=25;function nN(t,e){const n=kt(t),i=dn(t),r=n.visualViewport;let o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;const u=Su();(!u||u&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const c=ga(i);if(c<=0){const u=i.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(i.clientWidth-d.clientWidth-p);h<=ny&&(o-=h)}else c<=ny&&(o+=c);return{width:o,height:s,x:a,y:l}}const iN=new Set(["absolute","fixed"]);function rN(t,e){const n=Ai(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,o=Lt(t)?Nr(t):fn(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=r*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function iy(t,e,n){let i;if(e==="viewport")i=nN(t,n);else if(e==="document")i=tN(dn(t));else if(ct(e))i=rN(e,n);else{const r=ey(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ca(i)}function ry(t,e){const n=Qn(t);return n===e||!ct(n)||kr(n)?!1:Gt(n).position==="fixed"||ry(n,e)}function oN(t,e){const n=e.get(t);if(n)return n;let i=Do(t,[],!1).filter(a=>ct(a)&&Cr(a)!=="body"),r=null;const o=Gt(t).position==="fixed";let s=o?Qn(t):t;for(;ct(s)&&!kr(s);){const a=Gt(s),l=wu(s);!l&&a.position==="fixed"&&(r=null),(o?!l&&!r:!l&&a.position==="static"&&!!r&&iN.has(r.position)||Po(s)&&!l&&ry(t,s))?i=i.filter(u=>u!==s):r=a,s=Qn(s)}return e.set(t,i),i}function sN(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const s=[...n==="clippingAncestors"?oa(e)?[]:oN(e,this._c):[].concat(n),i],a=s[0],l=s.reduce((c,u)=>{const d=iy(e,u,r);return c.top=Tt(d.top,c.top),c.right=Tr(d.right,c.right),c.bottom=Tr(d.bottom,c.bottom),c.left=Tt(d.left,c.left),c},iy(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function aN(t){const{width:e,height:n}=Qg(t);return{width:e,height:n}}function lN(t,e,n){const i=Lt(e),r=dn(e),o=n==="fixed",s=Ai(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=fn(0);function c(){l.x=ga(r)}if(i||!i&&!o)if((Cr(e)!=="body"||Po(r))&&(a=sa(e)),i){const p=Ai(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else r&&c();o&&!i&&r&&c();const u=r&&!i&&!o?ty(r,a):fn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function ju(t){return Gt(t).position==="static"}function oy(t,e){if(!Lt(t)||Gt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return dn(t)===n&&(n=n.ownerDocument.body),n}function sy(t,e){const n=kt(t);if(oa(t))return n;if(!Lt(t)){let r=Qn(t);for(;r&&!kr(r);){if(ct(r)&&!ju(r))return r;r=Qn(r)}return n}let i=oy(t,e);for(;i&&zT(i)&&ju(i);)i=oy(i,e);return i&&kr(i)&&ju(i)&&!wu(i)?n:i||UT(t)||n}const cN=async function(t){const e=this.getOffsetParent||sy,n=this.getDimensions,i=await n(t.floating);return{reference:lN(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function uN(t){return Gt(t).direction==="rtl"}const dN={convertOffsetParentRelativeRectToViewportRelativeRect:QE,getDocumentElement:dn,getClippingRect:sN,getOffsetParent:sy,getElementRects:cN,getClientRects:eN,getDimensions:aN,getScale:Nr,isElement:ct,isRTL:uN};function ay(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function fN(t,e){let n=null,i;const r=dn(t);function o(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=t.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||e(),!f||!p)return;const h=Er(d),m=Er(r.clientWidth-(u+f)),g=Er(r.clientHeight-(d+p)),y=Er(u),b={rootMargin:-h+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Tt(0,Tr(1,l))||1};let w=!0;function _(C){const E=C[0].intersectionRatio;if(E!==l){if(!w)return s();E?s(!1,E):i=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!ay(c,t.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(_,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(_,b)}n.observe(t)}return s(!0),o}function Ru(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Iu(t),u=r||o?[...c?Do(c):[],...Do(e)]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=c&&a?fN(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),n()}),c&&!l&&p.observe(c),p.observe(e));let h,m=l?Ai(t):null;l&&g();function g(){const y=Ai(t);m&&!ay(m,y)&&n(),m=y,h=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(x=>{r&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const pN=YE,hN=GE,mN=UE,gN=XE,yN=(t,e,n)=>{const i=new Map,r={platform:dN,...n},o={...r.platform,_c:i};return KE(t,e,{...r,platform:o})};var vN=typeof document<"u",xN=function(){},ya=vN?N.useLayoutEffect:xN;function va(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!va(t[i],e[i]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,r[i]))return!1;for(i=n;i--!==0;){const o=r[i];if(!(o==="_owner"&&t.$$typeof)&&!va(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function ly(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function cy(t,e){const n=ly(t);return Math.round(e*n)/n}function Fu(t){const e=O.useRef(t);return ya(()=>{e.current=t}),e}function bN(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=O.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,p]=O.useState(i);va(f,i)||p(i);const[h,m]=O.useState(null),[g,y]=O.useState(null),x=O.useCallback($=>{$!==C.current&&(C.current=$,m($))},[]),b=O.useCallback($=>{$!==E.current&&(E.current=$,y($))},[]),w=o||h,_=s||g,C=O.useRef(null),E=O.useRef(null),S=O.useRef(u),k=l!=null,A=Fu(l),P=Fu(r),X=Fu(c),W=O.useCallback(()=>{if(!C.current||!E.current)return;const $={placement:e,strategy:n,middleware:f};P.current&&($.platform=P.current),yN(C.current,E.current,$).then(G=>{const T={...G,isPositioned:X.current!==!1};I.current&&!va(S.current,T)&&(S.current=T,up.flushSync(()=>{d(T)}))})},[f,e,n,P,X]);ya(()=>{c===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const I=O.useRef(!1);ya(()=>(I.current=!0,()=>{I.current=!1}),[]),ya(()=>{if(w&&(C.current=w),_&&(E.current=_),w&&_){if(A.current)return A.current(w,_,W);W()}},[w,_,W,A,k]);const Y=O.useMemo(()=>({reference:C,floating:E,setReference:x,setFloating:b}),[x,b]),V=O.useMemo(()=>({reference:w,floating:_}),[w,_]),z=O.useMemo(()=>{const $={position:n,left:0,top:0};if(!V.floating)return $;const G=cy(V.floating,u.x),T=cy(V.floating,u.y);return a?{...$,transform:"translate("+G+"px, "+T+"px)",...ly(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:T}},[n,a,V.floating,u.x,u.y]);return O.useMemo(()=>({...u,update:W,refs:Y,elements:V,floatingStyles:z}),[u,W,Y,V,z])}const _N=(t,e)=>({...pN(t),options:[t,e]}),wN=(t,e)=>({...hN(t),options:[t,e]}),SN=(t,e)=>({...mN(t),options:[t,e]}),Lu=(t,e)=>({...gN(t),options:[t,e]}),CN="data-floating-ui-focusable",uy="active",dy="selected",Fo="ArrowLeft",Lo="ArrowRight",fy="ArrowUp",xa="ArrowDown",kN={...O};let py=!1,TN=0;const hy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+TN++;function EN(){const[t,e]=O.useState(()=>py?hy():void 0);return ut(()=>{t==null&&e(hy())},[]),O.useEffect(()=>{py=!0},[]),t}const my=kN.useId||EN;let $o;process.env.NODE_ENV!=="production"&&($o=new Set);function $u(){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];const r="Floating UI: "+n.join(" ");if(!((t=$o)!=null&&t.has(r))){var o;(o=$o)==null||o.add(r),console.warn(r)}}function NN(){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];const r="Floating UI: "+n.join(" ");if(!((t=$o)!=null&&t.has(r))){var o;(o=$o)==null||o.add(r),console.error(r)}}function AN(){const t=new Map;return{emit(e,n){var i;(i=t.get(e))==null||i.forEach(r=>r(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var i;(i=t.get(e))==null||i.delete(n)}}}const PN=O.createContext(null),DN=O.createContext(null),gy=()=>{var t;return((t=O.useContext(PN))==null?void 0:t.id)||null},yy=()=>O.useContext(DN);function vy(t){return"data-floating-ui-"+t}let xy=0;function ON(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:i=!0,sync:r=!1}=e;i&&cancelAnimationFrame(xy);const o=()=>t?.focus({preventScroll:n});r?o():xy=requestAnimationFrame(o)}const by={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},_y=O.forwardRef(function(e,n){const[i,r]=O.useState();ut(()=>{wE()&&r("button")},[]);const o={ref:n,tabIndex:0,role:i,"aria-hidden":i?void 0:!0,[vy("focus-guard")]:"",style:by};return v.jsx("span",{...e,...o})}),wy=O.createContext(null),Sy=vy("portal");function MN(t){t===void 0&&(t={});const{id:e,root:n}=t,i=my(),r=IN(),[o,s]=O.useState(null),a=O.useRef(null);return ut(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),ut(()=>{if(!i||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=i,c.setAttribute(Sy,""),l.appendChild(c),a.current=c,s(c)},[e,i]),ut(()=>{if(n===null||!i||a.current)return;let l=n||r?.portalNode;l&&!bu(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const u=document.createElement("div");u.id=i,u.setAttribute(Sy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[e,n,i,r]),o}function ba(t){const{children:e,id:n,root:i,preserveTabOrder:r=!0}=t,o=MN({id:n,root:i}),[s,a]=O.useState(null),l=O.useRef(null),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=s?.modal,p=s?.open,h=!!s&&!s.modal&&s.open&&r&&!!(i||o);return O.useEffect(()=>{if(!o||!r||f)return;function m(g){o&&Ou(g)&&(g.type==="focusin"?Jg:WE)(o)}return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)}},[o,r,f]),O.useEffect(()=>{o&&(p||Jg(o))},[p,o]),v.jsxs(wy.Provider,{value:O.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:o,setFocusManagerState:a}),[r,o]),children:[h&&o&&v.jsx(_y,{"data-type":"outside",ref:l,onFocus:m=>{if(Ou(m,o)){var g;(g=u.current)==null||g.focus()}else{const y=s?s.domReference:null,x=VE(y);x?.focus()}}}),h&&o&&v.jsx("span",{"aria-owns":o.id,style:by}),o&&up.createPortal(e,o),h&&o&&v.jsx(_y,{"data-type":"outside",ref:c,onFocus:m=>{if(Ou(m,o)){var g;(g=d.current)==null||g.focus()}else{const y=s?s.domReference:null,x=BE(y);x?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const IN=()=>O.useContext(wy);let _a=0;const Cy="--floating-ui-scrollbar-width";function jN(){const t=Wg(),e=/iP(hone|ad|od)|iOS/.test(t)||t==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Cy,o+"px"),o&&(n[r]=o+"px"),e){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[r]:""}),n.removeProperty(Cy),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let ky=()=>{};const zu=O.forwardRef(function(e,n){const{lockScroll:i=!1,...r}=e;return ut(()=>{if(i)return _a++,_a===1&&(ky=jN()),()=>{_a--,_a===0&&ky()}},[i]),v.jsx("div",{ref:n,...r,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}})});function RN(t){const{open:e=!1,onOpenChange:n,elements:i}=t,r=my(),o=O.useRef({}),[s]=O.useState(()=>AN()),a=gy()!=null;if(process.env.NODE_ENV!=="production"){const p=i.reference;p&&!ct(p)&&NN("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=O.useState(i.reference),u=pa((p,h,m)=>{o.current.openEvent=p?h:void 0,s.emit("openchange",{open:p,event:h,reason:m,nested:a}),n?.(p,h,m)}),d=O.useMemo(()=>({setPositionReference:c}),[]),f=O.useMemo(()=>({reference:l||i.reference||null,floating:i.floating||null,domReference:i.reference}),[l,i.reference,i.floating]);return O.useMemo(()=>({dataRef:o,open:e,onOpenChange:u,elements:f,events:s,floatingId:r,refs:d}),[e,u,f,s,r,d])}function Bu(t){t===void 0&&(t={});const{nodeId:e}=t,n=RN({...t,elements:{reference:null,floating:null,...t.elements}}),i=t.rootContext||n,r=i.elements,[o,s]=O.useState(null),[a,l]=O.useState(null),u=r?.domReference||o,d=O.useRef(null),f=yy();ut(()=>{u&&(d.current=u)},[u]);const p=bN({...t,elements:{...r,...a&&{reference:a}}}),h=O.useCallback(b=>{const w=ct(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;l(w),p.refs.setReference(w)},[p.refs]),m=O.useCallback(b=>{(ct(b)||b===null)&&(d.current=b,s(b)),(ct(p.refs.reference.current)||p.refs.reference.current===null||b!==null&&!ct(b))&&p.refs.setReference(b)},[p.refs]),g=O.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),y=O.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),x=O.useMemo(()=>({...p,...i,refs:g,elements:y,nodeId:e}),[p,g,y,e,i]);return ut(()=>{i.dataRef.current.floatingContext=x;const b=f?.nodesRef.current.find(w=>w.id===e);b&&(b.context=x)}),O.useMemo(()=>({...p,context:x,refs:g,elements:y}),[p,g,y,x])}function Vu(t,e,n){const i=new Map,r=n==="item";let o=t;if(r&&t){const{[uy]:s,[dy]:a,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1,[CN]:""},...o,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(r&&[uy,dy].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof u=="function"){var d;(d=i.get(c))==null||d.push(u),s[c]=function(){for(var f,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(f=i.get(c))==null?void 0:f.map(g=>g(...h)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function FN(t){t===void 0&&(t=[]);const e=t.map(a=>a?.reference),n=t.map(a=>a?.floating),i=t.map(a=>a?.item),r=O.useCallback(a=>Vu(a,t,"reference"),e),o=O.useCallback(a=>Vu(a,t,"floating"),n),s=O.useCallback(a=>Vu(a,t,"item"),i);return O.useMemo(()=>({getReferenceProps:r,getFloatingProps:o,getItemProps:s}),[r,o,s])}const LN="Escape";function wa(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function Sa(t,e){return wa(e,t===fy||t===xa,t===Fo||t===Lo)}function Wu(t,e,n){return wa(e,t===xa,n?t===Fo:t===Lo)||t==="Enter"||t===" "||t===""}function Ty(t,e,n){return wa(e,n?t===Fo:t===Lo,t===xa)}function Ey(t,e,n,i){const r=n?t===Lo:t===Fo,o=t===fy;return e==="both"||e==="horizontal"&&i&&i>1?t===LN:wa(e,r,o)}function $N(t,e){const{open:n,onOpenChange:i,elements:r,floatingId:o}=t,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:b=void 0,orientation:w="vertical",parentOrientation:_,cols:C=1,scrollItemIntoView:E=!0,virtualItemRef:S,itemSizes:k,dense:A=!1}=e;process.env.NODE_ENV!=="production"&&(d&&(f||$u("`useListNavigation` looping must be enabled to allow escaping."),m||$u("`useListNavigation` must be virtual to allow escaping.")),w==="vertical"&&C>1&&$u("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const P=AE(r.floating),X=jo(P),W=gy(),I=yy();ut(()=>{t.dataRef.current.orientation=w},[t,w]);const Y=pa(()=>{l($.current===-1?null:$.current)}),V=NE(r.domReference),z=O.useRef(g),$=O.useRef(u??-1),G=O.useRef(null),T=O.useRef(!0),M=O.useRef(Y),F=O.useRef(!!r.floating),B=O.useRef(n),J=O.useRef(!1),K=O.useRef(!1),ee=jo(b),j=jo(n),U=jo(E),oe=jo(u),[ae,Le]=O.useState(),[te,qe]=O.useState(),sn=pa(()=>{function ce(ne){if(m){var de;(de=ne.id)!=null&&de.endsWith("-fui-option")&&(ne.id=o+"-"+Math.random().toString(16).slice(2,10)),Le(ne.id),I?.events.emit("virtualfocus",ne),S&&(S.current=ne)}else ON(ne,{sync:J.current,preventScroll:!0})}const be=s.current[$.current],le=K.current;be&&ce(be),(J.current?ne=>ne():requestAnimationFrame)(()=>{const ne=s.current[$.current]||be;if(!ne)return;be||ce(ne);const de=U.current;de&&so&&(le||!T.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof de=="boolean"?{block:"nearest",inline:"nearest"}:de))})});ut(()=>{c&&(n&&r.floating?z.current&&u!=null&&(K.current=!0,$.current=u,Y()):F.current&&($.current=-1,M.current()))},[c,n,r.floating,u,Y]),ut(()=>{if(c&&n&&r.floating)if(a==null){if(J.current=!1,oe.current!=null)return;if(F.current&&($.current=-1,sn()),(!B.current||!F.current)&&z.current&&(G.current!=null||z.current===!0&&G.current==null)){let ce=0;const be=()=>{s.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(be),ce++):($.current=G.current==null||Wu(G.current,w,h)||p?Du(s,ee.current):Yg(s,ee.current),G.current=null,Y())};be()}}else Ro(s,a)||($.current=a,sn(),K.current=!1)},[c,n,r.floating,a,oe,p,s,w,h,Y,sn,ee]),ut(()=>{var ce;if(!c||r.floating||!I||m||!F.current)return;const be=I.nodesRef.current,le=(ce=be.find(de=>de.id===W))==null||(ce=ce.context)==null?void 0:ce.elements.floating,H=Pu(fa(r.floating)),ne=be.some(de=>de.context&&qg(de.context.elements.floating,H));le&&!ne&&T.current&&le.focus({preventScroll:!0})},[c,r.floating,I,W,m]),ut(()=>{if(!c||!I||!m||W)return;function ce(be){qe(be.id),S&&(S.current=be)}return I.events.on("virtualfocus",ce),()=>{I.events.off("virtualfocus",ce)}},[c,I,m,W,S]),ut(()=>{M.current=Y,B.current=n,F.current=!!r.floating}),ut(()=>{n||(G.current=null,z.current=g)},[n,g]);const gi=a!=null,so=O.useMemo(()=>{function ce(le){if(!j.current)return;const H=s.current.indexOf(le);H!==-1&&$.current!==H&&($.current=H,Y())}return{onFocus(le){let{currentTarget:H}=le;J.current=!0,ce(H)},onClick:le=>{let{currentTarget:H}=le;return H.focus({preventScroll:!0})},onMouseMove(le){let{currentTarget:H}=le;J.current=!0,K.current=!1,y&&ce(H)},onPointerLeave(le){let{pointerType:H}=le;if(!(!T.current||H==="touch")&&(J.current=!0,!!y&&($.current=-1,Y(),!m))){var ne;(ne=X.current)==null||ne.focus({preventScroll:!0})}}}},[j,X,y,s,Y,m]),or=O.useCallback(()=>{var ce;return _??(I==null||(ce=I.nodesRef.current.find(be=>be.id===W))==null||(ce=ce.context)==null||(ce=ce.dataRef)==null?void 0:ce.current.orientation)},[W,I,_]),Wt=pa(ce=>{if(T.current=!1,J.current=!0,ce.which===229||!j.current&&ce.currentTarget===X.current)return;if(p&&Ey(ce.key,w,h,C)){Sa(ce.key,or())||$t(ce),i(!1,ce.nativeEvent,"list-navigation"),Lt(r.domReference)&&(m?I?.events.emit("virtualfocus",r.domReference):r.domReference.focus());return}const be=$.current,le=Du(s,b),H=Yg(s,b);if(V||(ce.key==="Home"&&($t(ce),$.current=le,Y()),ce.key==="End"&&($t(ce),$.current=H,Y())),C>1){const ne=k||Array.from({length:s.current.length},()=>({width:1,height:1})),de=LE(ne,C,A),Ae=de.findIndex(We=>We!=null&&!ma(s,We,b)),Ve=de.reduce((We,an,vi)=>an!=null&&!ma(s,an,b)?vi:We,-1),mt=de[FE({current:de.map(We=>We!=null?s.current[We]:null)},{event:ce,orientation:w,loop:f,rtl:h,cols:C,disabledIndices:zE([...(typeof b!="function"?b:null)||s.current.map((We,an)=>ma(s,an,b)?an:void 0),void 0],de),minIndex:Ae,maxIndex:Ve,prevIndex:$E($.current>H?le:$.current,ne,de,C,ce.key===xa?"bl":ce.key===(h?Fo:Lo)?"tr":"tl"),stopEvent:!0})];if(mt!=null&&($.current=mt,Y()),w==="both")return}if(Sa(ce.key,w)){if($t(ce),n&&!m&&Pu(ce.currentTarget.ownerDocument)===ce.currentTarget){$.current=Wu(ce.key,w,h)?le:H,Y();return}Wu(ce.key,w,h)?f?$.current=be>=H?d&&be!==s.current.length?-1:le:dt(s,{startingIndex:be,disabledIndices:b}):$.current=Math.min(H,dt(s,{startingIndex:be,disabledIndices:b})):f?$.current=be<=le?d&&be!==-1?s.current.length:H:dt(s,{startingIndex:be,decrement:!0,disabledIndices:b}):$.current=Math.max(le,dt(s,{startingIndex:be,decrement:!0,disabledIndices:b})),Ro(s,$.current)&&($.current=-1),Y()}}),yi=O.useMemo(()=>m&&n&&gi&&{"aria-activedescendant":te||ae},[m,n,gi,te,ae]),sr=O.useMemo(()=>({"aria-orientation":w==="both"?void 0:w,...V?{}:yi,onKeyDown:Wt,onPointerMove(){T.current=!0}}),[yi,Wt,w,V]),ar=O.useMemo(()=>{function ce(le){g==="auto"&&DE(le.nativeEvent)&&(z.current=!0)}function be(le){z.current=g,g==="auto"&&OE(le.nativeEvent)&&(z.current=!0)}return{...yi,onKeyDown(le){T.current=!1;const H=le.key.startsWith("Arrow"),ne=["Home","End"].includes(le.key),de=H||ne,Ae=Ty(le.key,w,h),Ve=Ey(le.key,w,h,C),mt=Ty(le.key,or(),h),We=Sa(le.key,w),an=(p?mt:We)||le.key==="Enter"||le.key.trim()==="";if(m&&n){const xi=I?.nodesRef.current.find(bi=>bi.parentId==null),Kt=I&&xi?PE(I.nodesRef.current,xi.id):null;if(de&&Kt&&S){const bi=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(Ae||Ve){var vi,ao;const Rs=((vi=Kt.context)==null?void 0:vi.elements.domReference)===le.currentTarget,Bl=Ve&&!Rs?(ao=Kt.context)==null?void 0:ao.elements.domReference:Ae?s.current.find(sw=>sw?.id===ae):null;Bl&&($t(le),Bl.dispatchEvent(bi),qe(void 0))}if((We||ne)&&Kt.context&&Kt.context.open&&Kt.parentId&&le.currentTarget!==Kt.context.elements.domReference){var lr;$t(le),(lr=Kt.context.elements.domReference)==null||lr.dispatchEvent(bi);return}}return Wt(le)}if(!(!n&&!x&&H)){if(an){const xi=Sa(le.key,or());G.current=p&&xi?null:le.key}if(p){mt&&($t(le),n?($.current=Du(s,ee.current),Y()):i(!0,le.nativeEvent,"list-navigation"));return}We&&(u!=null&&($.current=u),$t(le),!n&&x?i(!0,le.nativeEvent,"list-navigation"):Wt(le),n&&Y())}},onFocus(){n&&!m&&($.current=-1,Y())},onPointerDown:be,onPointerEnter:be,onMouseDown:ce,onClick:ce}},[ae,yi,C,Wt,ee,g,s,p,Y,i,n,x,w,or,h,u,I,m,S]);return O.useMemo(()=>c?{reference:ar,floating:sr,item:so}:{},[c,ar,sr,so])}const zN={top:"bottom center","top-start":"bottom left","top-end":"bottom right",right:"left center","right-start":"top left","right-end":"bottom left",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"top right","left-end":"bottom right"},Ku=O.memo(({open:t,children:e,className:n,onOutsideClick:i,floatingStyles:r,setFloating:o,placement:s,floatingProps:a})=>v.jsx(ba,{children:v.jsx(xo,{children:t&&v.jsxs(v.Fragment,{children:[i&&v.jsx(zu,{onClick:i}),v.jsx("div",{ref:o,style:r,className:"z-50",...a,children:v.jsx(qt.div,{className:n,style:{transformOrigin:zN[s]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:e})})]})})})),Ca=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:i,minWidth:r,maxWidth:o}=t,s=O.useMemo(()=>[Lu({apply({rects:d,elements:f}){i&&(f.floating.style.width=`${d.reference.width}px`),r&&(f.floating.style.minWidth=`${r}px`),o&&(f.floating.style.maxWidth=`${o}px`)}})],[i,o,r]),{refs:a,floatingStyles:l}=Bu({placement:e,middleware:s,whileElementsMounted:Ru}),c=O.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e});c.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e};const u=O.useMemo(()=>{const d=f=>{const{floatingStyles:p,setFloating:h,onOutsideClick:m,placement:g}=c.current,{className:y,open:x,children:b}=f;return v.jsx(Ku,{open:x,className:y,onOutsideClick:m,floatingStyles:p,setFloating:h,placement:g,children:b})};return O.memo(d)},[]);return{anchorRef:a.setReference,Popover:u}},Pi=(t,e)=>{N.useEffect(()=>{if(!t)return;const n=i=>{i.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[t,e])},BN="linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)",VN="linear-gradient(to right, #fff, rgba(255,255,255,0))",WN="linear-gradient(to top, #000, rgba(0,0,0,0))",Uu="0 0 0 1px rgba(0,0,0,0.15)",KN=14,UN=28,qN=6,HN=8,qu={type:"spring",stiffness:500,damping:18,mass:.6},Ar=t=>{const e=t?UN:KN,n=e/2;return{width:e,height:e,marginLeft:-n,marginTop:-n,borderRadius:t?HN:qN}},ka=t=>Math.max(0,Math.min(1,t)),Ny=(t,e)=>{Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(t,e),t.dispatchEvent(new Event("input",{bubbles:!0}))},YN=({value:t,onChange:e})=>{const[n,i]=N.useState(()=>Ng(t)??[0,0,1]),r=N.useRef(Ao(n[0],n[1],n[2]));N.useEffect(()=>{if((t||"").toUpperCase()===r.current)return;const m=Ng(t);m&&i(m)},[t]);const o=m=>{i(m);const g=Ao(m[0],m[1],m[2]);r.current=g,e(g)},[s,a,l]=n,c=Ao(s,1,1),u=Ao(s,a,1),d=Ao(s,a,l),f=xu((m,g,y)=>{o([s,ka((m-y.left)/y.width),1-ka((g-y.top)/y.height)])}),p=xu((m,g,y)=>{o([ka((m-y.left)/y.width)*360,a,l])}),h=xu((m,g,y)=>{o([s,a,ka((m-y.left)/y.width)])});return v.jsxs("div",{className:"flex flex-col gap-3",style:{width:220,userSelect:"none"},onMouseDown:m=>m.preventDefault(),children:[v.jsxs("div",{className:"relative w-full",style:{height:160,touchAction:"none",cursor:"crosshair"},...f.bind,children:[v.jsxs("div",{className:"absolute inset-0 rounded-md overflow-hidden border color-picker-surface",style:{backgroundColor:c},children:[v.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:VN}}),v.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:WN}})]}),v.jsx(qt.div,{className:"absolute pointer-events-none border-1 border-white",style:{left:`${a*100}%`,top:`${(1-l)*100}%`,boxShadow:Uu,backgroundColor:d},initial:Ar(!1),animate:Ar(f.isDragging),transition:qu})]}),v.jsx("div",{className:"relative w-full rounded-md",style:{height:12,background:BN,touchAction:"none",cursor:"ew-resize"},...p.bind,children:v.jsx(qt.div,{className:"absolute pointer-events-none border-1 border-white",style:{top:"50%",left:`${s/360*100}%`,backgroundColor:c,boxShadow:Uu},initial:Ar(!1),animate:Ar(p.isDragging),transition:qu})}),v.jsx("div",{className:"relative w-full rounded-md",style:{height:12,background:`linear-gradient(to right, #000, ${u})`,touchAction:"none",cursor:"ew-resize"},...h.bind,children:v.jsx(qt.div,{className:"absolute pointer-events-none border-1 border-white",style:{top:"50%",left:`${l*100}%`,backgroundColor:d,boxShadow:Uu},initial:Ar(!1),animate:Ar(h.isDragging),transition:qu})})]})},GN=t=>{const{className:e,label:n,description:i,error:r,buttonTray:o,size:s="md",value:a,defaultValue:l,onChange:c,onBlur:u,onFocus:d,...f}=t,[p,h]=N.useState(a!=null?String(a):l!=null?String(l):""),[m,g]=N.useState(!1),y=N.useRef(null),x=a!=null?String(a):p,b=x||"white";Pi(m,()=>g(!1));const{anchorRef:w,Popover:_}=Ca({placement:"bottom-start",onOutsideClick:()=>g(!1)}),C=P=>{h(P.target.value),c?.(P)},E=P=>{g(!0),d?.(P)},S=P=>{const X=P.target.value,W=jT(X);W&&W!==X&&y.current&&Ny(y.current,W),g(!1),u?.(P)},k=P=>{y.current&&Ny(y.current,P)},A=!!r||!!o;return v.jsx(Yt.Provider,{value:s,children:v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsx(Ft,{children:n}),v.jsxs("div",{className:"flex flex-col relative",ref:w,children:[v.jsx("div",{className:Q("absolute top-1/2 -translate-y-1/2 rounded-md border color-swatch",Ei[s],wg[s]),style:{backgroundColor:b}}),v.jsx("input",{ref:y,className:Q("border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",Sn[s],Ht[s],_g[s],A?Xn[s]:fu[s],r&&"input-error"),value:a??p,onChange:C,onFocus:E,onBlur:S,onClick:()=>g(!0),...f}),v.jsxs(Cn,{children:[r&&v.jsx(un,{}),o]}),v.jsx(_,{open:m,children:v.jsx(Zn,{padding:"md",children:v.jsx(YN,{value:x,onChange:k})})})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:r})]})})},Xt=t=>{const{onClick:e,Icon:n}=t;return v.jsx("div",{onClick:e,className:Q("h-6 w-6 select-none rounded-full p-0.5",e&&"ring-0 transition-all duration-150 input-icon-button-interactive active:ring-2 cursor-pointer hover:ring-4 group"),children:v.jsx(n,{className:Q("h-5 w-5 input-icon-button-icon",e&&"group-active:scale-[0.8] transition-transform origin-center")})})},XN=t=>{const{type:e="password",enableShowPasswordToggle:n=!0,...i}=t,[r,o]=N.useState(!1),s=()=>{o(!r)};return v.jsx(vu,{type:r?"text":e,buttonTray:n?v.jsx(Xt,{Icon:r?xT:bT,onClick:s}):void 0,...i})};function JN(t){return e=>{for(const n of t)Hu(n,e)}}function ZN(t){return e=>{const n=[];for(const i of t){const r=Hu(i,e),o=typeof r=="function";n.push(o?r:()=>Hu(i,null))}return()=>{for(const i of n)i()}}}function Hu(t,e){if(typeof t=="function")return t(e);t&&(t.current=e)}var QN=parseInt(N.version.split(".")[0],10)>=19?ZN:JN;const eA=t=>{const{className:e,label:n,description:i,error:r,size:o="md",autogrow:s=!1,maxRows:a,ref:l,onChange:c,...u}=t,d=O.useRef(null),f=O.useCallback(()=>{const h=d.current;if(!h)return;h.style.height="auto";let m=h.scrollHeight;if(a){const g=window.getComputedStyle(h),y=parseFloat(g.lineHeight),x=parseFloat(g.paddingTop),b=parseFloat(g.paddingBottom),w=parseFloat(g.borderTopWidth),_=parseFloat(g.borderBottomWidth),C=y*a+x+b+w+_;m=Math.min(h.scrollHeight,C)}h.style.height=`${m}px`},[a]);O.useLayoutEffect(()=>{if(!s){d.current&&(d.current.style.height="");return}f()},[s,f,t.value,t.defaultValue,o]);const p=h=>{c?.(h),s&&f()};return v.jsx(Yt.Provider,{value:o,children:v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsx(Ft,{children:n}),v.jsxs("div",{className:"flex flex-col relative",children:[v.jsx("textarea",{ref:l?QN([l,d]):d,onChange:p,className:Q("py-2.5 border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",bg[o],Ht[o],Gn[o],r?Xn[o]:fu[o],r&&"input-error",s&&(a?"resize-none overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden":"resize-none overflow-hidden")),...u}),v.jsx(Cn,{className:"top-3.5 translate-y-0",children:r&&v.jsx(un,{})})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:r})]})})},tA=t=>{const{className:e,label:n,description:i,error:r,...o}=t;return v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsxs("div",{className:"flex flex-row gap-3",children:[v.jsx("input",{type:"radio",className:"h-6 w-6 shrink-0 rounded-full border check-base shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&v.jsx("label",{htmlFor:t.id,className:Q("input-label font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:r})]})},nA=t=>{const{className:e,label:n,description:i,error:r,...o}=t;return v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsxs("div",{className:"flex flex-row gap-3",children:[v.jsxs("div",{className:"relative shrink-0 h-6 w-10",children:[v.jsx("input",{type:"checkbox",className:"appearance-none h-6 w-10 rounded-full checked:bg-transparent border toggle-input ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),v.jsx("div",{className:Q("rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",t.checked?"toggle-track-on":"toggle-track-off"),children:v.jsx("div",{className:Q("absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full toggle-thumb shadow-md transition-all duration-150",t.checked&&"translate-x-3.5 ")})})]}),n&&v.jsx("label",{htmlFor:t.id,className:Q("input-label font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:r})]})},iA=t=>{const{className:e,label:n,description:i,error:r,...o}=t;return v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsxs("div",{className:"flex flex-row gap-3",children:[v.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border check-base shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&v.jsx("label",{htmlFor:t.id,className:Q("input-label font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:r})]})};var Ta={exports:{}},Ea={exports:{}},ye={};/** @license React v16.13.1
|
|
200
|
-
* react-is.production.min.js
|
|
201
|
-
*
|
|
202
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the MIT license found in the
|
|
205
|
-
* LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/var Ay;function rA(){if(Ay)return ye;Ay=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,h=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function b(_){if(typeof _=="object"&&_!==null){var C=_.$$typeof;switch(C){case e:switch(_=_.type,_){case l:case c:case i:case o:case r:case d:return _;default:switch(_=_&&_.$$typeof,_){case a:case u:case h:case p:case s:return _;default:return C}}case n:return C}}}function w(_){return b(_)===c}return ye.AsyncMode=l,ye.ConcurrentMode=c,ye.ContextConsumer=a,ye.ContextProvider=s,ye.Element=e,ye.ForwardRef=u,ye.Fragment=i,ye.Lazy=h,ye.Memo=p,ye.Portal=n,ye.Profiler=o,ye.StrictMode=r,ye.Suspense=d,ye.isAsyncMode=function(_){return w(_)||b(_)===l},ye.isConcurrentMode=w,ye.isContextConsumer=function(_){return b(_)===a},ye.isContextProvider=function(_){return b(_)===s},ye.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},ye.isForwardRef=function(_){return b(_)===u},ye.isFragment=function(_){return b(_)===i},ye.isLazy=function(_){return b(_)===h},ye.isMemo=function(_){return b(_)===p},ye.isPortal=function(_){return b(_)===n},ye.isProfiler=function(_){return b(_)===o},ye.isStrictMode=function(_){return b(_)===r},ye.isSuspense=function(_){return b(_)===d},ye.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===i||_===c||_===o||_===r||_===d||_===f||typeof _=="object"&&_!==null&&(_.$$typeof===h||_.$$typeof===p||_.$$typeof===s||_.$$typeof===a||_.$$typeof===u||_.$$typeof===g||_.$$typeof===y||_.$$typeof===x||_.$$typeof===m)},ye.typeOf=b,ye}var ve={};/** @license React v16.13.1
|
|
207
|
-
* react-is.development.js
|
|
208
|
-
*
|
|
209
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
210
|
-
*
|
|
211
|
-
* This source code is licensed under the MIT license found in the
|
|
212
|
-
* LICENSE file in the root directory of this source tree.
|
|
213
|
-
*/var Py;function oA(){return Py||(Py=1,process.env.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,h=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function b(te){return typeof te=="string"||typeof te=="function"||te===i||te===c||te===o||te===r||te===d||te===f||typeof te=="object"&&te!==null&&(te.$$typeof===h||te.$$typeof===p||te.$$typeof===s||te.$$typeof===a||te.$$typeof===u||te.$$typeof===g||te.$$typeof===y||te.$$typeof===x||te.$$typeof===m)}function w(te){if(typeof te=="object"&&te!==null){var qe=te.$$typeof;switch(qe){case e:var sn=te.type;switch(sn){case l:case c:case i:case o:case r:case d:return sn;default:var gi=sn&&sn.$$typeof;switch(gi){case a:case u:case h:case p:case s:return gi;default:return qe}}case n:return qe}}}var _=l,C=c,E=a,S=s,k=e,A=u,P=i,X=h,W=p,I=n,Y=o,V=r,z=d,$=!1;function G(te){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),T(te)||w(te)===l}function T(te){return w(te)===c}function M(te){return w(te)===a}function F(te){return w(te)===s}function B(te){return typeof te=="object"&&te!==null&&te.$$typeof===e}function J(te){return w(te)===u}function K(te){return w(te)===i}function ee(te){return w(te)===h}function j(te){return w(te)===p}function U(te){return w(te)===n}function oe(te){return w(te)===o}function ae(te){return w(te)===r}function Le(te){return w(te)===d}ve.AsyncMode=_,ve.ConcurrentMode=C,ve.ContextConsumer=E,ve.ContextProvider=S,ve.Element=k,ve.ForwardRef=A,ve.Fragment=P,ve.Lazy=X,ve.Memo=W,ve.Portal=I,ve.Profiler=Y,ve.StrictMode=V,ve.Suspense=z,ve.isAsyncMode=G,ve.isConcurrentMode=T,ve.isContextConsumer=M,ve.isContextProvider=F,ve.isElement=B,ve.isForwardRef=J,ve.isFragment=K,ve.isLazy=ee,ve.isMemo=j,ve.isPortal=U,ve.isProfiler=oe,ve.isStrictMode=ae,ve.isSuspense=Le,ve.isValidElementType=b,ve.typeOf=w})()),ve}var Dy;function Oy(){return Dy||(Dy=1,process.env.NODE_ENV==="production"?Ea.exports=rA():Ea.exports=oA()),Ea.exports}/*
|
|
214
|
-
object-assign
|
|
215
|
-
(c) Sindre Sorhus
|
|
216
|
-
@license MIT
|
|
217
|
-
*/var Yu,My;function sA(){if(My)return Yu;My=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function r(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Yu=r()?Object.assign:function(o,s){for(var a,l=i(o),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)e.call(a,d)&&(l[d]=a[d]);if(t){c=t(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Yu}var Gu,Iy;function Xu(){if(Iy)return Gu;Iy=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gu=t,Gu}var Ju,jy;function Ry(){return jy||(jy=1,Ju=Function.call.bind(Object.prototype.hasOwnProperty)),Ju}var Zu,Fy;function aA(){if(Fy)return Zu;Fy=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Xu(),n={},i=Ry();t=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function r(o,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in o)if(i(o,u)){var d;try{if(typeof o[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=o[u](s,u,l,a,null,e)}catch(h){d=h}if(d&&!(d instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";t("Failed "+a+" type: "+d.message+(p??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Zu=r,Zu}var Qu,Ly;function lA(){if(Ly)return Qu;Ly=1;var t=Oy(),e=sA(),n=Xu(),i=Ry(),r=aA(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Qu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(T){var M=T&&(c&&T[c]||T[u]);if(typeof M=="function")return M}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:b,element:w(),elementType:_(),instanceOf:C,node:A(),objectOf:S,oneOf:E,oneOfType:k,shape:X,exact:W};function h(T,M){return T===M?T!==0||1/T===1/M:T!==T&&M!==M}function m(T,M){this.message=T,this.data=M&&typeof M=="object"?M:{},this.stack=""}m.prototype=Error.prototype;function g(T){if(process.env.NODE_ENV!=="production")var M={},F=0;function B(K,ee,j,U,oe,ae,Le){if(U=U||f,ae=ae||j,Le!==n){if(l){var te=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw te.name="Invariant Violation",te}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var qe=U+":"+j;!M[qe]&&F<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[qe]=!0,F++)}}return ee[j]==null?K?ee[j]===null?new m("The "+oe+" `"+ae+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new m("The "+oe+" `"+ae+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:T(ee,j,U,oe,ae)}var J=B.bind(null,!1);return J.isRequired=B.bind(null,!0),J}function y(T){function M(F,B,J,K,ee,j){var U=F[B],oe=V(U);if(oe!==T){var ae=z(U);return new m("Invalid "+K+" `"+ee+"` of type "+("`"+ae+"` supplied to `"+J+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return g(M)}function x(){return g(s)}function b(T){function M(F,B,J,K,ee){if(typeof T!="function")return new m("Property `"+ee+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var j=F[B];if(!Array.isArray(j)){var U=V(j);return new m("Invalid "+K+" `"+ee+"` of type "+("`"+U+"` supplied to `"+J+"`, expected an array."))}for(var oe=0;oe<j.length;oe++){var ae=T(j,oe,J,K,ee+"["+oe+"]",n);if(ae instanceof Error)return ae}return null}return g(M)}function w(){function T(M,F,B,J,K){var ee=M[F];if(!a(ee)){var j=V(ee);return new m("Invalid "+J+" `"+K+"` of type "+("`"+j+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return g(T)}function _(){function T(M,F,B,J,K){var ee=M[F];if(!t.isValidElementType(ee)){var j=V(ee);return new m("Invalid "+J+" `"+K+"` of type "+("`"+j+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return g(T)}function C(T){function M(F,B,J,K,ee){if(!(F[B]instanceof T)){var j=T.name||f,U=G(F[B]);return new m("Invalid "+K+" `"+ee+"` of type "+("`"+U+"` supplied to `"+J+"`, expected ")+("instance of `"+j+"`."))}return null}return g(M)}function E(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function M(F,B,J,K,ee){for(var j=F[B],U=0;U<T.length;U++)if(h(j,T[U]))return null;var oe=JSON.stringify(T,function(Le,te){var qe=z(te);return qe==="symbol"?String(te):te});return new m("Invalid "+K+" `"+ee+"` of value `"+String(j)+"` "+("supplied to `"+J+"`, expected one of "+oe+"."))}return g(M)}function S(T){function M(F,B,J,K,ee){if(typeof T!="function")return new m("Property `"+ee+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var j=F[B],U=V(j);if(U!=="object")return new m("Invalid "+K+" `"+ee+"` of type "+("`"+U+"` supplied to `"+J+"`, expected an object."));for(var oe in j)if(i(j,oe)){var ae=T(j,oe,J,K,ee+"."+oe,n);if(ae instanceof Error)return ae}return null}return g(M)}function k(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var M=0;M<T.length;M++){var F=T[M];if(typeof F!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(F)+" at index "+M+"."),s}function B(J,K,ee,j,U){for(var oe=[],ae=0;ae<T.length;ae++){var Le=T[ae],te=Le(J,K,ee,j,U,n);if(te==null)return null;te.data&&i(te.data,"expectedType")&&oe.push(te.data.expectedType)}var qe=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new m("Invalid "+j+" `"+U+"` supplied to "+("`"+ee+"`"+qe+"."))}return g(B)}function A(){function T(M,F,B,J,K){return I(M[F])?null:new m("Invalid "+J+" `"+K+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return g(T)}function P(T,M,F,B,J){return new m((T||"React class")+": "+M+" type `"+F+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function X(T){function M(F,B,J,K,ee){var j=F[B],U=V(j);if(U!=="object")return new m("Invalid "+K+" `"+ee+"` of type `"+U+"` "+("supplied to `"+J+"`, expected `object`."));for(var oe in T){var ae=T[oe];if(typeof ae!="function")return P(J,K,ee,oe,z(ae));var Le=ae(j,oe,J,K,ee+"."+oe,n);if(Le)return Le}return null}return g(M)}function W(T){function M(F,B,J,K,ee){var j=F[B],U=V(j);if(U!=="object")return new m("Invalid "+K+" `"+ee+"` of type `"+U+"` "+("supplied to `"+J+"`, expected `object`."));var oe=e({},F[B],T);for(var ae in oe){var Le=T[ae];if(i(T,ae)&&typeof Le!="function")return P(J,K,ee,ae,z(Le));if(!Le)return new m("Invalid "+K+" `"+ee+"` key `"+ae+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(F[B],null," ")+`
|
|
218
|
-
Valid keys: `+JSON.stringify(Object.keys(T),null," "));var te=Le(j,ae,J,K,ee+"."+ae,n);if(te)return te}return null}return g(M)}function I(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(I);if(T===null||a(T))return!0;var M=d(T);if(M){var F=M.call(T),B;if(M!==T.entries){for(;!(B=F.next()).done;)if(!I(B.value))return!1}else for(;!(B=F.next()).done;){var J=B.value;if(J&&!I(J[1]))return!1}}else return!1;return!0;default:return!1}}function Y(T,M){return T==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function V(T){var M=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":Y(M,T)?"symbol":M}function z(T){if(typeof T>"u"||T===null)return""+T;var M=V(T);if(M==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return M}function $(T){var M=z(T);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function G(T){return!T.constructor||!T.constructor.name?f:T.constructor.name}return p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},Qu}var ed,$y;function cA(){if($y)return ed;$y=1;var t=Xu();function e(){}function n(){}return n.resetWarningCache=e,ed=function(){function i(s,a,l,c,u,d){if(d!==t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}i.isRequired=i;function r(){return i}var o={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},ed}var zy;function uA(){if(zy)return Ta.exports;if(zy=1,process.env.NODE_ENV!=="production"){var t=Oy(),e=!0;Ta.exports=lA()(t.isElement,e)}else Ta.exports=cA()();return Ta.exports}var dA=uA();const Te=dp(dA);function Di(t,e,n,i){function r(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):r(u.value).then(a,l)}c((i=i.apply(t,e||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const fA=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Pr(t,e,n){const i=pA(t),{webkitRelativePath:r}=t,o=typeof e=="string"?e:typeof r=="string"&&r.length>0?r:`./${t.name}`;return typeof i.path!="string"&&By(i,"path",o),By(i,"relativePath",o),i}function pA(t){const{name:e}=t;if(e&&e.lastIndexOf(".")!==-1&&!t.type){const i=e.split(".").pop().toLowerCase(),r=fA.get(i);r&&Object.defineProperty(t,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return t}function By(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}const hA=[".DS_Store","Thumbs.db"];function mA(t){return Di(this,void 0,void 0,function*(){return Na(t)&&gA(t.dataTransfer)?bA(t.dataTransfer,t.type):yA(t)?vA(t):Array.isArray(t)&&t.every(e=>"getFile"in e&&typeof e.getFile=="function")?xA(t):[]})}function gA(t){return Na(t)}function yA(t){return Na(t)&&Na(t.target)}function Na(t){return typeof t=="object"&&t!==null}function vA(t){return td(t.target.files).map(e=>Pr(e))}function xA(t){return Di(this,void 0,void 0,function*(){return(yield Promise.all(t.map(n=>n.getFile()))).map(n=>Pr(n))})}function bA(t,e){return Di(this,void 0,void 0,function*(){if(t.items){const n=td(t.items).filter(r=>r.kind==="file");if(e!=="drop")return n;const i=yield Promise.all(n.map(_A));return Vy(Wy(i))}return Vy(td(t.files).map(n=>Pr(n)))})}function Vy(t){return t.filter(e=>hA.indexOf(e.name)===-1)}function td(t){if(t===null)return[];const e=[];for(let n=0;n<t.length;n++){const i=t[n];e.push(i)}return e}function _A(t){if(typeof t.webkitGetAsEntry!="function")return Ky(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?Uy(e):Ky(t,e)}function Wy(t){return t.reduce((e,n)=>[...e,...Array.isArray(n)?Wy(n):[n]],[])}function Ky(t,e){return Di(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof t.getAsFileSystemHandle=="function"){const o=yield t.getAsFileSystemHandle();if(o===null)throw new Error(`${t} is not a File`);if(o!==void 0){const s=yield o.getFile();return s.handle=o,Pr(s)}}const i=t.getAsFile();if(!i)throw new Error(`${t} is not a File`);return Pr(i,(n=e?.fullPath)!==null&&n!==void 0?n:void 0)})}function wA(t){return Di(this,void 0,void 0,function*(){return t.isDirectory?Uy(t):SA(t)})}function Uy(t){const e=t.createReader();return new Promise((n,i)=>{const r=[];function o(){e.readEntries(s=>Di(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(wA));r.push(a),o()}else try{const a=yield Promise.all(r);n(a)}catch(a){i(a)}}),s=>{i(s)})}o()})}function SA(t){return Di(this,void 0,void 0,function*(){return new Promise((e,n)=>{t.file(i=>{const r=Pr(i,t.fullPath);e(r)},i=>{n(i)})})})}var Aa={},qy;function CA(){return qy||(qy=1,Aa.__esModule=!0,Aa.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(n.length===0)return!0;var i=t.name||"",r=(t.type||"").toLowerCase(),o=r.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?i.toLowerCase().endsWith(a):a.endsWith("/*")?o===a.replace(/\/.*$/,""):r===a})}return!0}),Aa}var kA=CA();const nd=dp(kA);function Hy(t){return NA(t)||EA(t)||Jy(t)||TA()}function TA(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
219
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EA(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function NA(t){if(Array.isArray(t))return id(t)}function Yy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Gy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yy(Object(n),!0).forEach(function(i){Xy(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yy(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Xy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zo(t,e){return DA(t)||PA(t,e)||Jy(t,e)||AA()}function AA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
220
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jy(t,e){if(t){if(typeof t=="string")return id(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return id(t,e)}}function id(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function PA(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],r=!0,o=!1,s,a;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(i.push(s.value),!(e&&i.length===e));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(o)throw a}}return i}}function DA(t){if(Array.isArray(t))return t}var OA=typeof nd=="function"?nd:nd.default,MA="file-invalid-type",IA="file-too-large",jA="file-too-small",RA="too-many-files",FA=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=e.split(","),i=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:MA,message:"File type must be ".concat(i)}},Zy=function(e){return{code:IA,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Qy=function(e){return{code:jA,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},LA={code:RA,message:"Too many files"};function $A(t){return t.type===""&&typeof t.getAsFile=="function"}function ev(t,e){var n=t.type==="application/x-moz-file"||OA(t,e)||$A(t);return[n,n?null:FA(e)]}function tv(t,e,n){if(Oi(t.size))if(Oi(e)&&Oi(n)){if(t.size>n)return[!1,Zy(n)];if(t.size<e)return[!1,Qy(e)]}else{if(Oi(e)&&t.size<e)return[!1,Qy(e)];if(Oi(n)&&t.size>n)return[!1,Zy(n)]}return[!0,null]}function Oi(t){return t!=null}function zA(t){var e=t.files,n=t.accept,i=t.minSize,r=t.maxSize,o=t.multiple,s=t.maxFiles,a=t.validator;return!o&&e.length>1||o&&s>=1&&e.length>s?!1:e.every(function(l){var c=ev(l,n),u=zo(c,1),d=u[0],f=tv(l,i,r),p=zo(f,1),h=p[0],m=a?a(l):null;return d&&h&&!m})}function Pa(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function Bo(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function nv(t){t.preventDefault()}function BA(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function VA(t){return t.indexOf("Edge/")!==-1}function WA(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return BA(t)||VA(t)}function pn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return e.some(function(a){return!Pa(i)&&a&&a.apply(void 0,[i].concat(o)),Pa(i)})}}function KA(){return"showOpenFilePicker"in window}function UA(t){if(Oi(t)){var e=Object.entries(t).filter(function(n){var i=zo(n,2),r=i[0],o=i[1],s=!0;return iv(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(o)||!o.every(rv))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,i){var r=zo(i,2),o=r[0],s=r[1];return Gy(Gy({},n),{},Xy({},o,s))},{});return[{description:"Files",accept:e}]}return t}function qA(t){if(Oi(t))return Object.entries(t).reduce(function(e,n){var i=zo(n,2),r=i[0],o=i[1];return[].concat(Hy(e),[r],Hy(o))},[]).filter(function(e){return iv(e)||rv(e)}).join(",")}function HA(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function YA(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function iv(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||t==="application/*"||/\w+\/[-+.\w]+/g.test(t)}function rv(t){return/^.*\.[\w]+$/.test(t)}var GA=["children"],XA=["open"],JA=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ZA=["refKey","onChange","onClick"];function ov(t){return tP(t)||eP(t)||sv(t)||QA()}function QA(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
221
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eP(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function tP(t){if(Array.isArray(t))return od(t)}function rd(t,e){return rP(t)||iP(t,e)||sv(t,e)||nP()}function nP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
222
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sv(t,e){if(t){if(typeof t=="string")return od(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return od(t,e)}}function od(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function iP(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],r=!0,o=!1,s,a;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(i.push(s.value),!(e&&i.length===e));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(o)throw a}}return i}}function rP(t){if(Array.isArray(t))return t}function av(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Pe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?av(Object(n),!0).forEach(function(i){sd(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):av(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function sd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Da(t,e){if(t==null)return{};var n=oP(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function oP(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}var ad=N.forwardRef(function(t,e){var n=t.children,i=Da(t,GA),r=cd(i),o=r.open,s=Da(r,XA);return N.useImperativeHandle(e,function(){return{open:o}},[o]),N.createElement(N.Fragment,null,n(Pe(Pe({},s),{},{open:o})))});ad.displayName="Dropzone";var lv={disabled:!1,getFilesFromEvent:mA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ad.defaultProps=lv,ad.propTypes={children:Te.func,accept:Te.objectOf(Te.arrayOf(Te.string)),multiple:Te.bool,preventDropOnDocument:Te.bool,noClick:Te.bool,noKeyboard:Te.bool,noDrag:Te.bool,noDragEventsBubbling:Te.bool,minSize:Te.number,maxSize:Te.number,maxFiles:Te.number,disabled:Te.bool,getFilesFromEvent:Te.func,onFileDialogCancel:Te.func,onFileDialogOpen:Te.func,useFsAccessApi:Te.bool,autoFocus:Te.bool,onDragEnter:Te.func,onDragLeave:Te.func,onDragOver:Te.func,onDrop:Te.func,onDropAccepted:Te.func,onDropRejected:Te.func,onError:Te.func,validator:Te.func};var ld={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function cd(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Pe(Pe({},lv),t),n=e.accept,i=e.disabled,r=e.getFilesFromEvent,o=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,d=e.onDragOver,f=e.onDrop,p=e.onDropAccepted,h=e.onDropRejected,m=e.onFileDialogCancel,g=e.onFileDialogOpen,y=e.useFsAccessApi,x=e.autoFocus,b=e.preventDropOnDocument,w=e.noClick,_=e.noKeyboard,C=e.noDrag,E=e.noDragEventsBubbling,S=e.onError,k=e.validator,A=N.useMemo(function(){return qA(n)},[n]),P=N.useMemo(function(){return UA(n)},[n]),X=N.useMemo(function(){return typeof g=="function"?g:cv},[g]),W=N.useMemo(function(){return typeof m=="function"?m:cv},[m]),I=N.useRef(null),Y=N.useRef(null),V=N.useReducer(sP,ld),z=rd(V,2),$=z[0],G=z[1],T=$.isFocused,M=$.isFileDialogActive,F=N.useRef(typeof window<"u"&&window.isSecureContext&&y&&KA()),B=function(){!F.current&&M&&setTimeout(function(){if(Y.current){var ne=Y.current.files;ne.length||(G({type:"closeDialog"}),W())}},300)};N.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[Y,M,W,F]);var J=N.useRef([]),K=N.useRef([]),ee=function(ne){I.current&&I.current.contains(ne.target)||(ne.preventDefault(),J.current=[])};N.useEffect(function(){return b&&(document.addEventListener("dragover",nv,!1),document.addEventListener("drop",ee,!1)),function(){b&&(document.removeEventListener("dragover",nv),document.removeEventListener("drop",ee))}},[I,b]),N.useEffect(function(){var H=function(mt){K.current=[].concat(ov(K.current),[mt.target]),Bo(mt)&&G({isDragGlobal:!0,type:"setDragGlobal"})},ne=function(mt){K.current=K.current.filter(function(We){return We!==mt.target&&We!==null}),!(K.current.length>0)&&G({isDragGlobal:!1,type:"setDragGlobal"})},de=function(){K.current=[],G({isDragGlobal:!1,type:"setDragGlobal"})},Ae=function(){K.current=[],G({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",H,!1),document.addEventListener("dragleave",ne,!1),document.addEventListener("dragend",de,!1),document.addEventListener("drop",Ae,!1),function(){document.removeEventListener("dragenter",H),document.removeEventListener("dragleave",ne),document.removeEventListener("dragend",de),document.removeEventListener("drop",Ae)}},[I]),N.useEffect(function(){return!i&&x&&I.current&&I.current.focus(),function(){}},[I,x,i]);var j=N.useCallback(function(H){S?S(H):console.error(H)},[S]),U=N.useCallback(function(H){H.preventDefault(),H.persist(),ar(H),J.current=[].concat(ov(J.current),[H.target]),Bo(H)&&Promise.resolve(r(H)).then(function(ne){if(!(Pa(H)&&!E)){var de=ne.length,Ae=de>0&&zA({files:ne,accept:A,minSize:s,maxSize:o,multiple:a,maxFiles:l,validator:k}),Ve=de>0&&!Ae;G({isDragAccept:Ae,isDragReject:Ve,isDragActive:!0,type:"setDraggedFiles"}),c&&c(H)}}).catch(function(ne){return j(ne)})},[r,c,j,E,A,s,o,a,l,k]),oe=N.useCallback(function(H){H.preventDefault(),H.persist(),ar(H);var ne=Bo(H);if(ne&&H.dataTransfer)try{H.dataTransfer.dropEffect="copy"}catch{}return ne&&d&&d(H),!1},[d,E]),ae=N.useCallback(function(H){H.preventDefault(),H.persist(),ar(H);var ne=J.current.filter(function(Ae){return I.current&&I.current.contains(Ae)}),de=ne.indexOf(H.target);de!==-1&&ne.splice(de,1),J.current=ne,!(ne.length>0)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Bo(H)&&u&&u(H))},[I,u,E]),Le=N.useCallback(function(H,ne){var de=[],Ae=[];H.forEach(function(Ve){var mt=ev(Ve,A),We=rd(mt,2),an=We[0],vi=We[1],ao=tv(Ve,s,o),lr=rd(ao,2),xi=lr[0],Kt=lr[1],bi=k?k(Ve):null;if(an&&xi&&!bi)de.push(Ve);else{var Rs=[vi,Kt];bi&&(Rs=Rs.concat(bi)),Ae.push({file:Ve,errors:Rs.filter(function(Bl){return Bl})})}}),(!a&&de.length>1||a&&l>=1&&de.length>l)&&(de.forEach(function(Ve){Ae.push({file:Ve,errors:[LA]})}),de.splice(0)),G({acceptedFiles:de,fileRejections:Ae,type:"setFiles"}),f&&f(de,Ae,ne),Ae.length>0&&h&&h(Ae,ne),de.length>0&&p&&p(de,ne)},[G,a,A,s,o,l,f,p,h,k]),te=N.useCallback(function(H){H.preventDefault(),H.persist(),ar(H),J.current=[],Bo(H)&&Promise.resolve(r(H)).then(function(ne){Pa(H)&&!E||Le(ne,H)}).catch(function(ne){return j(ne)}),G({type:"reset"})},[r,Le,j,E]),qe=N.useCallback(function(){if(F.current){G({type:"openDialog"}),X();var H={multiple:a,types:P};window.showOpenFilePicker(H).then(function(ne){return r(ne)}).then(function(ne){Le(ne,null),G({type:"closeDialog"})}).catch(function(ne){HA(ne)?(W(ne),G({type:"closeDialog"})):YA(ne)?(F.current=!1,Y.current?(Y.current.value=null,Y.current.click()):j(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):j(ne)});return}Y.current&&(G({type:"openDialog"}),X(),Y.current.value=null,Y.current.click())},[G,X,W,y,Le,j,P,a]),sn=N.useCallback(function(H){!I.current||!I.current.isEqualNode(H.target)||(H.key===" "||H.key==="Enter"||H.keyCode===32||H.keyCode===13)&&(H.preventDefault(),qe())},[I,qe]),gi=N.useCallback(function(){G({type:"focus"})},[]),so=N.useCallback(function(){G({type:"blur"})},[]),or=N.useCallback(function(){w||(WA()?setTimeout(qe,0):qe())},[w,qe]),Wt=function(ne){return i?null:ne},yi=function(ne){return _?null:Wt(ne)},sr=function(ne){return C?null:Wt(ne)},ar=function(ne){E&&ne.stopPropagation()},ce=N.useMemo(function(){return function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=H.refKey,de=ne===void 0?"ref":ne,Ae=H.role,Ve=H.onKeyDown,mt=H.onFocus,We=H.onBlur,an=H.onClick,vi=H.onDragEnter,ao=H.onDragOver,lr=H.onDragLeave,xi=H.onDrop,Kt=Da(H,JA);return Pe(Pe(sd({onKeyDown:yi(pn(Ve,sn)),onFocus:yi(pn(mt,gi)),onBlur:yi(pn(We,so)),onClick:Wt(pn(an,or)),onDragEnter:sr(pn(vi,U)),onDragOver:sr(pn(ao,oe)),onDragLeave:sr(pn(lr,ae)),onDrop:sr(pn(xi,te)),role:typeof Ae=="string"&&Ae!==""?Ae:"presentation"},de,I),!i&&!_?{tabIndex:0}:{}),Kt)}},[I,sn,gi,so,or,U,oe,ae,te,_,C,i]),be=N.useCallback(function(H){H.stopPropagation()},[]),le=N.useMemo(function(){return function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=H.refKey,de=ne===void 0?"ref":ne,Ae=H.onChange,Ve=H.onClick,mt=Da(H,ZA),We=sd({accept:A,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Wt(pn(Ae,te)),onClick:Wt(pn(Ve,be)),tabIndex:-1},de,Y);return Pe(Pe({},We),mt)}},[Y,n,a,te,i]);return Pe(Pe({},$),{},{isFocused:T&&!i,getRootProps:ce,getInputProps:le,rootRef:I,inputRef:Y,open:Wt(qe)})}function sP(t,e){switch(e.type){case"focus":return Pe(Pe({},t),{},{isFocused:!0});case"blur":return Pe(Pe({},t),{},{isFocused:!1});case"openDialog":return Pe(Pe({},ld),{},{isFileDialogActive:!0});case"closeDialog":return Pe(Pe({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Pe(Pe({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Pe(Pe({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:!1});case"setDragGlobal":return Pe(Pe({},t),{},{isDragGlobal:e.isDragGlobal});case"reset":return Pe({},ld);default:return t}}function cv(){}const aP={sm:"h-7",md:"h-8",lg:"h-10"},lP={sm:"px-2.5",md:"px-3",lg:"px-4"},cP={sm:"text-xs",md:"text-sm",lg:"text-sm"},uP=t=>{const{label:e,description:n,error:i,placeholder:r="No file chosen",buttonText:o="Choose",Icon:s=CT,size:a="md",value:l,isUploaded:c=!1,isUploading:u=!1,onChange:d,onDropRejected:f,accept:p,maxSize:h,minSize:m,disabled:g=!1,className:y}=t,x=async k=>{const[A]=k;A&&await d?.(A)},{getRootProps:b,getInputProps:w,open:_,isDragActive:C,isFocused:E}=cd({multiple:!1,accept:p,maxSize:h,minSize:m,disabled:g,onDrop:x,onDropRejected:f}),S=l?.name;return v.jsx(Yt.Provider,{value:a,children:v.jsxs("div",{className:Q("flex flex-col",y),children:[v.jsx(Ft,{children:e}),v.jsxs("div",{...b({className:Q("flex flex-row items-center","border input-base rounded-xl shadow-sm transition-all duration-150","ring-0 focus:outline-none",(E||C)&&"ring-4",i&&"input-error",g&&"opacity-60 cursor-not-allowed",Sn[a],Gn[a],"gap-3")}),children:[v.jsx("input",{...w()}),v.jsx(s,{className:Q("input-icon shrink-0",Ei[a])}),v.jsx("span",{className:Q("flex-1 truncate",Ht[a],!S&&"text-[var(--color-input-placeholder)]"),children:S??r}),i&&v.jsx(un,{}),u&&!i&&v.jsx("div",{className:"h-5 w-5 flex items-center justify-center",children:v.jsx(Sr,{className:"h-4 w-4 text-[var(--color-input-icon)]"})}),c&&!u&&!i&&v.jsx("div",{className:"h-5 w-5",children:v.jsx(gu,{className:"h-5 w-5 text-[var(--color-status-success)]"})}),v.jsx("button",{type:"button",disabled:g,onClick:k=>{k.stopPropagation(),_()},className:Q("inline-flex flex-row items-center justify-center shrink-0","border button-white shadow-sm rounded-[calc(var(--border-radius-input)-0.25rem)]","font-semibold cursor-pointer select-none transition-all duration-150","button-ring ring-0 hover:ring-4 active:ring-1 focus:outline-none focus:ring-4","disabled:cursor-default","mr-1.5",aP[a],lP[a],cP[a]),children:o})]}),v.jsx(yt,{children:n}),v.jsx(vt,{children:i})]})})},dP=t=>t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(1)} GB`,uv=t=>{const{file:e,isUploaded:n=!1,isUploading:i=!1,error:r,onRemove:o,className:s}=t,a=i||n||!!r;return v.jsxs("div",{className:Q("flex flex-row items-center gap-3","border input-base rounded-xl shadow-sm","pl-4 pr-1 py-1",r&&"input-error",s),children:[a&&v.jsx("div",{className:"shrink-0 h-5 w-5 flex items-center justify-center",children:r?v.jsx(yu,{className:"h-5 w-5 input-error-icon"}):i?v.jsx(Sr,{className:"h-4 w-4 text-[var(--color-input-icon)]"}):v.jsx(gu,{className:"h-5 w-5 text-[var(--color-status-success)]"})}),v.jsx("div",{className:"flex-1 min-w-0 font-medium truncate",children:e.name}),v.jsx("div",{className:"shrink-0 text-sm text-[var(--color-input-description-text)]",children:dP(e.size)}),o&&v.jsx(na,{variant:"transparent",size:"sm",Icon:Jn,onClick:o,"aria-label":"Remove file",className:"shrink-0"})]})},fP=t=>{const{label:e,description:n,error:i,title:r="Drop files here",hint:o,Icon:s=yT,onUpload:a,onFileRemoved:l,onDropRejected:c,renderFileTile:u,accept:d,maxSize:f,minSize:p,maxFiles:h,disabled:m=!1,className:g}=t,[y,x]=N.useState([]),b=N.useRef(0),w=(P,X)=>{x(W=>W.map(I=>I.id===P?{...I,...X}:I))},_=P=>{if(P.length===0)return;const X=P.map(W=>({id:String(++b.current),file:W,status:a?"uploading":"idle"}));if(x(W=>[...W,...X]),!!a)for(const W of X)Promise.resolve().then(()=>a(W.file)).then(()=>w(W.id,{status:"uploaded"})).catch(I=>{w(W.id,{status:"error",error:I instanceof Error?I:new Error(String(I))})})},C=P=>{const X=y.find(W=>W.id===P);x(W=>W.filter(I=>I.id!==P)),X&&l?.(X.file)},{getRootProps:E,getInputProps:S,isDragActive:k,isFocused:A}=cd({multiple:!0,accept:d,maxSize:f,minSize:p,maxFiles:h,disabled:m,onDrop:_,onDropRejected:c});return v.jsxs("div",{className:Q("flex flex-col",g),children:[v.jsx(Ft,{children:e}),v.jsxs("div",{...E({className:Q("flex flex-col items-center justify-center gap-1","border-2 border-dashed input-base rounded-xl bg-transparent!","py-10 px-6 cursor-pointer transition-all duration-150","ring-0 focus:outline-none",(A||k)&&"ring-4",i&&"input-error",m&&"opacity-60 cursor-not-allowed")}),children:[v.jsx("input",{...S()}),v.jsx("div",{className:"h-14 w-14 rounded-xl flex items-center justify-center bg-[var(--color-input-file-icon-bg)] mb-2",children:v.jsx(s,{className:"h-7 w-7 input-icon"})}),v.jsx("div",{className:"text-base font-semibold",children:r}),o&&v.jsx("div",{className:"text-sm text-[var(--color-input-description-text)] ",children:o})]}),y.length>0&&v.jsx("div",{className:"flex flex-col gap-2 mt-3",children:y.map(P=>{const X={file:P.file,isUploading:P.status==="uploading",isUploaded:P.status==="uploaded",error:P.status==="error"?P.error?.message:void 0,onRemove:()=>C(P.id)};return v.jsx(O.Fragment,{children:u?u(P.file,X):v.jsx(uv,{...X})},P.id)})}),v.jsx(yt,{children:n}),v.jsx(vt,{children:i})]})},dv=N.createContext(null);function pP(t,e){return{getTheme:function(){return e??null}}}function tt(){const t=N.useContext(dv);return t==null&&(function(e,...n){const i=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of n)r.append("v",o);throw i.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),t}function L(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function fv(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);n.search=i.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const nt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,hP=nt&&"documentMode"in document?document.documentMode:null,Jt=nt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ti=nt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Vo=!(!nt||!("InputEvent"in window)||hP)&&"getTargetRanges"in new window.InputEvent("input"),ni=nt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,pv=nt&&/Android/.test(navigator.userAgent),Wo=nt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!pv,hv=nt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ud=nt&&pv&&hv,Ko=nt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Jt&&!hv,mP=0,gP=1,yP=2,mv=1,gv=2,yv=4,vv=8,vP=16,dd=32,fd=64,pd=128,xP=1,bP=2,_P=3,wP=4,SP=5,CP=6,Uo=Wo||ni||Ko?" ":"",Mi=`
|
|
223
|
-
|
|
224
|
-
`,hd=ti?" ":Uo,Ii={bold:1,capitalize:1024,code:16,highlight:pd,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},kP={directionless:1,unmergeable:2},Oa={center:2,end:6,justify:4,left:1,right:3,start:5},TP={[bP]:"center",[CP]:"end",[wP]:"justify",[xP]:"left",[_P]:"right",[SP]:"start"},EP={normal:0,segmented:2,token:1},NP={[mP]:"normal",[yP]:"segmented",[gP]:"token"},xv="$config";function bv(){return Fe()._blockCursorElement}let _v=class Vl{element;before;after;constructor(e,n,i){this.element=e,this.before=n||null,this.after=i||null}withBefore(e){return new Vl(this.element,e,this.after)}withAfter(e){return new Vl(this.element,this.before,e)}withElement(e){return this.element===e?this:new Vl(e,this.before,this.after)}insertChild(e){const n=this.getInsertionAnchor();return n!==null&&n.parentElement!==this.element&&L(357),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&L(358),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&L(359),this.element.replaceChild(e,n),this}getFirstChild(){const e=this.getFirstChildAnchor(),n=e?e.nextSibling:this.element.firstChild;return n===this.getInsertionAnchor()?null:n}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,n,i){if(this.element===e)return n===e&&i===0?"before":"after";const r=wv(e,this.element);if(r===null)return"after";const o=Array.prototype.indexOf.call(e.childNodes,r);if(o<0)return"after";if(n===e)return i<=o?"before":"after";const s=wv(e,n);if(s===null)return"after";const a=Array.prototype.indexOf.call(e.childNodes,s);return a>=0&&a<=o?"before":"after"}getInsertionAnchor(){return this.before}};function wv(t,e){let n=e;for(;n!==null&&n.parentNode!==t;)n=n.parentNode;return n}let Sv=class Wl extends _v{withBefore(e){return new Wl(this.element,e,this.after)}withAfter(e){return new Wl(this.element,this.before,e)}withElement(e){return this.element===e?this:new Wl(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){const e=super.getFirstChildAnchor(),n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===bv()?n:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{const n=e==="decorator"&&(Ko||ni||Wo);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const n=this.element,i=e.nodeName==="IMG"?e.nextSibling:null;i&&n.removeChild(i),n.removeChild(e),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const n=this.getManagedLineBreak();if(n){if(e===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const i=this.element,r=this.before,o=document.createElement("br");if(i.insertBefore(o,r),e){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.setProperty("display","inline","important"),s.style.setProperty("border","0px","important"),s.style.setProperty("margin","0px","important"),s.alt="",i.insertBefore(s,o),i.__lexicalLineBreak=s}else i.__lexicalLineBreak=o}getFirstChildOffset(){const e=this.getFirstChild(),n=this.getInsertionAnchor();let i=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==n;r=r.nextSibling)i++;return i}resolveChildIndex(e,n,i,r){if(i===this.element){const l=this.getFirstChildOffset(),c=bv(),u=this.element.childNodes,d=Math.min(r,u.length);let f=0;for(let p=l;p<d;p++)u[p]!==c&&f++;return[e,Math.min(f,e.getChildrenSize())]}const o=Cv(n,i);o.push(r);const s=Cv(n,this.element);let a=e.getIndexWithinParent();for(let l=0;l<s.length;l++){const c=o[l],u=s[l];if(c===void 0||c<u)break;if(c>u){a+=1;break}}return[e.getParentOrThrow(),a]}};function Cv(t,e){const n=[];let i=e;for(;i!==t&&i!==null;i=i.parentNode){let r=0;for(let o=i.previousSibling;o!==null;o=o.previousSibling)r++;n.push(r)}return i!==t&&L(225),n.reverse()}let kv;try{kv="0.45.0+prod.esm"}catch{}const AP=kv??"0.45.0+source";let qo=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(){const e=Array.from(this._front).reverse();for(const n of this._back)e.push(n);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const ji=null;function Tv(t,e=1e3){return t instanceof md?t.clone():t.size<e?new Map(t):new md().init(new Map(t),void 0,t.size)}let md=class aw{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new aw().init(this._old,this._nursery,this._size)}init(e,n,i){return this._old=e,this._nursery=n,this._size=i,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){const n=this._nursery&&this._nursery.get(e);return n!==void 0?n:this._old&&this._old.get(e)}get(e){const n=this.getWithTombstone(e);return n===ji?void 0:n}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())){const n=new Map(this._old);for(const[i,r]of this._nursery)r!==ji?n.set(i,r):n.delete(i);this._old=n,this._nursery=void 0}return this._mutable=!1,this}set(e,n){const i=this.getWithTombstone(e);if(i===n)return this;const r=this.getNursery();return i!==ji&&i!==void 0||(this._size++,i===ji&&r.delete(e)),r.set(e,n),this}delete(e){const n=this.has(e);return n&&(this.getNursery().set(e,ji),this._size--),n}getOrInsert(e,n){const i=this.get(e);return i!==void 0?i:(this.set(e,n),n)}getOrInsertComputed(e,n){const i=this.get(e);if(i!==void 0)return i;const r=n(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const e of this.entries())yield e[0]}*values(){for(const e of this.entries())yield e[1]}*entries(){const e=this._nursery,n=this._old;if(n)for(const i of n){const r=i[0],o=e?e.get(r):void 0;o!==ji&&(o!==void 0&&(i[1]=o),yield i)}if(e)for(const i of e)i[1]===ji||n&&n.has(i[0])||(yield i)}forEach(e,n){n!==void 0&&(e=e.bind(n));for(const[i,r]of this.entries())e(r,i,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function Ev(t,e,n,i,r,o){let s=t.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&(D(s)&&Ev(s,a,n,i,r,o),n.has(a)||o.delete(a),r.push(a)),s=s.getNextSibling()}}let gd=!1,yd=0;function PP(t){yd=t.timeStamp}function vd(t,e,n){const i=t.nodeName==="BR",r=e.__lexicalLineBreak;return r&&(t===r||i&&t.previousSibling===r)||i&&ys(t,n)!==void 0}function DP(t,e,n){const i=At(Nt(n));let r=null,o=null;i!==null&&i.anchorNode===t&&(r=i.anchorOffset,o=i.focusOffset);const s=t.nodeValue;s!==null&&lf(e,s,r,o,!1)}function OP(t,e,n){if(R(t)){const i=t.anchor.getNode();if(i.is(n)&&t.format!==i.getFormat())return!1}return Et(e)&&n.isAttached()}function MP(t,e,n,i){for(let r=t;r&&!B0(r);r=vs(r)){const o=ys(r,e);if(o!==void 0){const s=Ke(o,n);if(s)return me(s)||!he(r)?void 0:[r,s]}else if(r===i)return[i,E0(n)]}}function Nv(t,e,n){gd=!0;const i=performance.now()-yd>100;try{gn(t,()=>{const r=Z()||(function(f){return f.getEditorState().read(()=>{const p=Z();return p!==null?p.clone():null})})(t),o=new Map,s=t.getRootElement(),a=t._editorState,l=t._blockCursorElement;let c=!1,u="";for(let f=0;f<e.length;f++){const p=e[f],h=p.type,m=p.target,g=MP(m,t,a,s);if(!g)continue;const[y,x]=g;if(h==="characterData")i&&q(x)&&Et(m)&&OP(r,m,x)&&DP(m,x,t);else if(h==="childList"){c=!0;const b=p.addedNodes;for(let C=0;C<b.length;C++){const E=b[C],S=of(E),k=E.parentNode;if(k!=null&&E!==l&&S===null&&!vd(E,k,t)&&!B0(E)){if(ti){const A=(he(E)?E.innerText:null)||E.nodeValue;A&&(u+=A)}k.removeChild(E)}}const w=p.removedNodes,_=w.length;if(_>0){let C=0;for(let E=0;E<_;E++){const S=w[E];(vd(S,m,t)||l===S)&&(m.appendChild(S),C++)}_!==C&&o.set(y,x)}}}if(o.size>0)for(const[f,p]of o)p.reconcileObservedMutation(f,t);const d=n.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const p=d[f],h=p.addedNodes,m=p.target;for(let g=0;g<h.length;g++){const y=h[g],x=y.parentNode;x==null||y.nodeName!=="BR"||vd(y,m,t)||x.removeChild(y)}}n.takeRecords()}r!==null&&(c&&pt(r),ti&&j0(t)&&r.insertRawText(u))})}finally{gd=!1}}function Av(t){const e=t._observer;e!==null&&Nv(t,e.takeRecords(),e)}function Pv(t){(function(e){yd===0&&Nt(e).addEventListener("textInput",PP,!0)})(t),t._observer=new MutationObserver((e,n)=>{Nv(t,e,n)})}let IP=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,n){this.key=e,this.parse=n.parse.bind(n),this.unparse=(n.unparse||LP).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=n.resetOnCopyNode||!1}};function Dv(t,e){return new IP(t,e)}function jP(t){const e=new Map,n=new Set;for(let i=typeof t=="function"?t:t.replace;i.prototype&&i.prototype.getType!==void 0;i=Object.getPrototypeOf(i)){const{ownNodeConfig:r}=dl(i);if(r&&r.stateConfigs)for(const o of r.stateConfigs){let s;"stateConfig"in o?(s=o.stateConfig,o.flat&&n.add(s.key)):s=o,e.set(s.key,s)}}return{flatKeys:n,sharedConfigMap:e}}let RP=class lw{node;knownState;unknownState;sharedNodeState;size;constructor(e,n,i=void 0,r=new Map,o=void 0){this.node=e,this.sharedNodeState=n,this.unknownState=i,this.knownState=r;const{sharedConfigMap:s}=this.sharedNodeState,a=o!==void 0?o:(function(l,c,u){let d=u.size;if(c)for(const f in c){const p=l.get(f);p&&u.has(p)||d++}return d})(s,i,r);this.size=a}getValue(e){const n=this.knownState.get(e);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(e.key,e);let i=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const r=this.unknownState[e.key];r!==void 0&&(i=e.parse(r)),this.updateFromKnown(e,i)}return i}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},n={};for(const[i,r]of this.knownState)i.isEqual(r,i.defaultValue)?delete e[i.key]:e[i.key]=i.unparse(r);for(const i of this.sharedNodeState.flatKeys)i in e&&(n[i]=e[i],delete e[i]);return Mv(e)&&(n.$=e),n}getWritable(e){if(this.node===e)return this;const{sharedNodeState:n,unknownState:i}=this,r=new Map(this.knownState);return new lw(e,n,(function(o,s,a){let l;if(a)for(const[c,u]of Object.entries(a)){const d=o.get(c);d?s.has(d)||s.set(d,d.parse(u)):(l=l||{},l[c]=u)}return l})(n.sharedConfigMap,r,i),r,this.size)}resetOnCopyNode(){for(const e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,n){const i=e.key;this.sharedNodeState.sharedConfigMap.set(i,e);const{knownState:r,unknownState:o}=this;r.has(e)||o&&i in o||(o&&(delete o[i],this.unknownState=Mv(o)),this.size++),r.set(e,n)}updateFromUnknown(e,n){const i=this.sharedNodeState.sharedConfigMap.get(e);i?this.updateFromKnown(i,i.parse(n)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=n)}updateFromJSON(e){const{knownState:n}=this;for(const i of n.keys())n.set(i,i.defaultValue);if(this.size=n.size,this.unknownState=void 0,e)for(const[i,r]of Object.entries(e))this.updateFromUnknown(i,r)}};function FP(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new RP(e,Ov(e));return e.__state=n,n}function Ov(t){return t.__state?t.__state.sharedNodeState:_0(Fe(),t.getType()).sharedNodeState}function Mv(t){if(t)for(const e in t)return t}function LP(t){return t}function Iv(t,e,n){for(const[i,r]of e.knownState){if(t.has(i.key))continue;t.add(i.key);const o=n?n.getValue(i):i.defaultValue;if(o!==r&&!i.isEqual(o,r))return!0}return!1}function jv(t,e,n){const{unknownState:i}=e,r=n?n.unknownState:void 0;if(i){for(const[o,s]of Object.entries(i))if(!t.has(o)&&(t.add(o),s!==(r?r[o]:void 0)))return!0}return!1}function Rv(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function Fv(t,e){const n=t.__mode,i=t.__format,r=t.__style,o=e.__mode,s=e.__format,a=e.__style,l=t.__state,c=e.__state;return(n===null||n===o)&&(i===null||i===s)&&(r===null||r===a)&&(t.__state===null||l===c||(function(u,d){if(u===d)return!0;const f=new Set;return!(u&&Iv(f,u,d)||d&&Iv(f,d,u)||u&&jv(f,u,d)||d&&jv(f,d,u))})(l,c))}function Lv(t,e){const n=t.mergeWithSibling(e),i=Ee()._normalizedNodes;return i.add(t.__key),i.add(e.__key),n}function $v(t){let e,n,i=t;if(i.__text!==""||!i.isSimpleText()||i.isUnmergeable()){for(;(e=i.getPreviousSibling())!==null&&q(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Fv(e,i)){i=Lv(e,i);break}break}e.remove()}for(;(n=i.getNextSibling())!==null&&q(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(Fv(i,n)){i=Lv(i,n);break}break}n.remove()}}else i.remove()}function Ri(t){return zv(t.anchor),zv(t.focus),t}function zv(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let i,r;if(n===e.getChildrenSize()?(i=e.getChildAtIndex(n-1),r=!0):(i=e.getChildAtIndex(n),r=!1),q(i)){t.set(i.__key,r?i.getTextContentSize():0,"text",!0);break}if(!D(i))break;t.set(i.__key,r?i.getChildrenSize():0,"element",!0)}}const Ho=Symbol.for("@lexical/CachedTextSize");function Bv(t,e){return bd.read(()=>{let n=0,i=t;for(let r=0;r<e&&i!==null;r++){const o=Zt.get(i);if(o===void 0&&L(345,i),D(o)){const s=Ie.get(i);if(s!==void 0&&D(s)&&s.__parent!==o.__parent)n+=o.getTextContentSize();else{const a=Or.get(i),l=a&&a.__lexicalTextContent;typeof l!="string"&&L(346,o.getType()),n+=l.length}r<e-1&&!o.isInline()&&(n+=2)}else{const s=o[Ho];s===void 0&&L(347,o.getType(),i),n+=s}i=o.__next}return n},{editor:_e})}function Vv(t){D(t)||t[Ho]===void 0&&(t[Ho]=q(t)?t.__text.length:t.getTextContentSize())}const $P=4;let Yo,_e,Go,Ne="",ze=null,ft=null,it=null;function Dr(){return{firstTextKey:it,format:ze,style:ft}}function ii(t){t.firstTextKey!==null&&(ze=t.format,ft=t.style,it=t.firstTextKey)}function xd(t){if(it!==null)return;const e=t.__lexicalFirstTextKey;if(e===void 0&&L(348),e===null)return;const n=Ie.get(e);q(n)&&(ze=n.getFormat(),ft=n.getStyle(),it=e)}let Ma,Xo,Jo,Zt,bd,Ie,Or,_d,Zo,Mr,Tn=!1,Ia=!1;function Qo(t,e){const n=Zt.get(t),i=Ie.has(t);if(e!==null){const r=Td(t);r.parentNode===e&&e.removeChild(r)}if(!i){if(_e._keyToDOMMap.delete(t),D(n)){const r=fl(n,Zt);wd(r,0,r.length-1,null)}n!==void 0&&cf(Zo,Go,Ma,n,"destroyed")}}function wd(t,e,n,i){for(let r=e;r<=n;++r){const o=t[r];o!==void 0&&Qo(o,i)}}function Fi(t,e){t.setProperty("text-align",e)}const zP="40px";function Wv(t,e){const n=Yo.theme.indent;if(typeof n=="string"){const i=t.classList.contains(n);e>0&&!i?t.classList.add(n):e<1&&i&&t.classList.remove(n)}t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * var(--lexical-indent-base-value, ${zP}))`)}function Kv(t,e){const n=t.style;e===0?Fi(n,""):e===1?Fi(n,"left"):e===2?Fi(n,"center"):e===3?Fi(n,"right"):e===4?Fi(n,"justify"):e===5?Fi(n,"start"):e===6&&Fi(n,"end")}function Sd(t,e){const n=(function(i){const r=i.__dir;if(r!==null)return r;if(Qe(i))return null;const o=i.getParentOrThrow();return st(o)&&o.__dir===null?"auto":null})(e);n!==null?t.dir=n:t.removeAttribute("dir")}function es(t,e){const n=Ie.get(t);if(n===void 0&&L(60),e!==null){const r=Zt.get(t);if(r!==void 0&&r.__parent!==n.__parent){const o=Or.get(t);if(o!==void 0)return e.insertChild(o),ri(t,e.element)}}const i=Mr.$createDOM(n,_e);if((function(r,o,s){const a=s._keyToDOMMap;(function(l,c,u){const d=`__lexicalKey_${c._key}`;l[d]=u})(o,s,r),a.set(r,o)})(t,i,_e),q(n)?i.setAttribute("data-lexical-text","true"):me(n)&&i.setAttribute("data-lexical-decorator","true"),D(n)){const r=n.__indent,o=n.__size;if(Sd(i,n),r!==0&&Wv(i,r),o===0)i.__lexicalTextContent="",i.__lexicalFirstTextKey=null;else{const a=o-1;Cd(fl(n,Ie),n,0,a,On(n,i,_e))}const s=n.__format;s!==0&&Kv(i,s),n.isInline()||Uv(null,n,i)}else{const r=n.getTextContent();if(me(n)){const o=n.decorate(_e,Yo);o!==null&&Hv(t,o),i.contentEditable="false"}Ne+=r}return e!==null&&e.insertChild(i),Mr.$decorateDOM(n,null,i,_e),Vv(n),cf(Zo,Go,Ma,n,"created"),i}function Cd(t,e,n,i,r){const o=Ne,s=Dr();Ne="",ze=null,ft=null,it=null;let a=n;for(;a<=i;++a){const c=Dr();es(t[a],r);const u=Ie.get(t[a]);u!==null&&q(u)?ze===null&&(ze=u.getFormat(),ft=u.getStyle(),it=u.__key):D(u)&&a<i&&!u.isInline()&&(Ne+=Mi),ii(c)}const l=_e._keyToDOMMap.get(e.__key);l===void 0&&L(349,e.__key),l.__lexicalTextContent=Ne,l.__lexicalFirstTextKey=it,Ne=o+Ne,ii(s)}function Uv(t,e,n){const i=On(e,n,_e),r=i.element.__lexicalLastChildKind??null,o=(function(s,a){if(s){const l=s.__last;if(l){const c=a.get(l);if(c)return si(c)?"line-break":me(c)&&c.isInline()?"decorator":null}return"empty"}return null})(e,Ie);r!==o&&i.setManagedLineBreak(o)}function BP(t,e,n){var i;ze=null,ft=null,it=null,(function(r,o,s){const a=Ne,l=r.__size,c=o.__size;Ne="";const u=s.element,d=_e._keyToDOMMap.get(o.__key);d===void 0&&L(351,o.__key);const f=c-l;if(!Tn&&Math.abs(f)<=1&&l>=$P&&r.__first===o.__first&&(f!==0||!_e._cloneNotNeeded.has(r.__key))){const p=d.__lexicalTextContent,h=_d.get(r.__key);if(!Tn&&typeof p=="string"&&h!==void 0){const m=(function(g,y){const x=y.size;if(x===0||x>=g.__size)return null;let b=g.__last,w=null,_=0;for(;b!==null&&_<x;){if(!y.has(b))return null;w=b;const C=Ie.get(b);if(C===void 0)return null;b=C.__prev,_++}return _!==x||b!==null&&y.has(b)?null:w})(o,h);if(m!==null){const g=h.size;if(f===0){const y=Bv(m,g);let x=m,b=0;for(;x!==null&&b<g;){const C=Ie.get(x);if(C===void 0)break;const E=Dr();ri(x,u),q(C)&&ze===null&&(ze=C.getFormat(),ft=C.getStyle(),it=C.__key),ii(E),x=C.__next,b++}let w="";for(x=m,b=0;x!==null&&b<g;){const C=Ie.get(x);if(C===void 0)break;let E;if(D(C)){const S=_e._keyToDOMMap.get(x),k=S&&S.__lexicalTextContent;typeof k!="string"&&L(352,C.getType()),E=k}else E=C.getTextContent();w+=E,b<g-1&&D(C)&&!C.isInline()&&(w+=Mi),x=C.__next,b++}const _=p.slice(0,p.length-y)+w;return d.__lexicalTextContent=_,Ne=a+_,void qv(o,d,h)}if((function(y,x,b,w,_,C,E,S){if(S!==1&&S!==-1||E!==(S===1?2:1))return!1;const A=E-S;let P=y.__last;for(let K=0;K<A-1;K++){if(P===null)return!1;const ee=Zt.get(P);if(ee===void 0)return!1;P=ee.__prev}if(P===null)return!1;const X=Ie.get(C),W=Zt.get(P);if(X===void 0||W===void 0||X.__prev!==W.__prev)return!1;const I=[];let Y=C;for(let K=0;K<E;K++){if(Y===null)return!1;I.push(Y);const ee=Ie.get(Y);Y=ee?ee.__next:null}const V=[];Y=P;for(let K=0;K<A;K++){if(Y===null)return!1;V.push(Y);const ee=Zt.get(Y);Y=ee?ee.__next:null}const z=new Set(V),$=new Set(I),G=[];let T=0,M=0;for(;T<A&&M<E;)if(I[M]===V[T])G.push({key:I[M],kind:"reconcile"}),T++,M++;else if($.has(V[T])){if(z.has(I[M]))return!1;G.push({key:I[M],kind:"create",nextIndex:M}),M++}else G.push({key:V[T],kind:"destroy"}),T++;for(;T<A;)G.push({key:V[T++],kind:"destroy"});for(;M<E;)G.push({key:I[M],kind:"create",nextIndex:M}),M++;const F=Bv(P,A);for(const K of G){const ee=Dr();if(K.kind==="reconcile")ri(K.key,b.element);else if(K.kind==="destroy")Qo(K.key,b.element);else{let j=null;for(let U=K.nextIndex+1;U<E;U++){const oe=_e._keyToDOMMap.get(I[U]);if(oe!==void 0){j=oe;break}}es(K.key,b.withBefore(j??b.before))}if(K.kind!=="destroy"){const j=Ie.get(K.key);j&&q(j)&&ze===null&&(ze=j.getFormat(),ft=j.getStyle(),it=j.__key)}ii(ee)}let B="";for(let K=0;K<E;K++){const ee=Ie.get(I[K]);if(ee===void 0)return!1;let j;if(D(ee)){const U=_e._keyToDOMMap.get(I[K]),oe=U&&U.__lexicalTextContent;typeof oe!="string"&&L(350,ee.getType()),j=oe}else j=ee.getTextContent();B+=j,K<E-1&&D(ee)&&!ee.isInline()&&(B+=Mi)}const J=_.slice(0,_.length-F)+B;return w.__lexicalTextContent=J,!0})(r,0,s,d,p,m,g,f)){const y=d.__lexicalTextContent;return typeof y!="string"&&L(353),Ne=a+y,void qv(o,d,h)}}}if(f===0){let m=r.__first,g=0;for(;m!==null;){const y=Ie.get(m);if(y===void 0)break;const x=Tn||Jo.has(m)||Xo.has(m),b=Dr();if(x)ri(m,u);else{let w,_;if(D(y)){_=Or.get(m);const C=_&&_.__lexicalTextContent;typeof C!="string"&&L(354,y.getType()),w=C}else w=y.getTextContent();Ne+=w,_!==void 0&&xd(_)}q(y)?ze===null&&(ze=y.getFormat(),ft=y.getStyle(),it=y.__key):D(y)&&g<c-1&&!y.isInline()&&(Ne+=Mi),ii(b),m=y.__next,g++}return d.__lexicalTextContent=Ne,d.__lexicalFirstTextKey=it,void(Ne=a+Ne)}}if(l===1&&c===1){const p=r.__first,h=o.__first;if(p===h)ri(p,u);else{const g=Td(p),y=es(h,null);try{g.parentNode===u?u.replaceChild(y,g):s.insertChild(y)}catch(x){if(typeof x=="object"&&x!=null){const b=`${x.toString()} Parent: ${u.tagName}, new child: {tag: ${y.tagName} key: ${h}}, old child: {tag: ${g.tagName}, key: ${p}}.`;throw new Error(b)}throw x}Qo(p,null)}const m=Ie.get(h);q(m)&&ze===null&&(ze=m.getFormat(),ft=m.getStyle(),it=m.__key)}else{const p=fl(r,Zt),h=fl(o,Ie);if(p.length!==l&&L(227),h.length!==c&&L(228),l===0)c!==0&&Cd(h,o,0,c-1,s);else if(c===0){if(l!==0){const m=s.after==null&&s.before==null&&s.element.__lexicalLineBreak==null;wd(p,0,l-1,m?null:u),m&&(u.textContent="")}}else(function(m,g,y,x,b,w){const _=x-1,C=b-1;let E,S,k=w.getFirstChild(),A=0,P=0;for(;A<=_&&P<=C;){const I=g[A],Y=y[P],V=Dr();if(I===Y)k=kd(ri(Y,w.element)),A++,P++;else{if(S===void 0&&(S=Yv(y,P)),E===void 0)E=Yv(g,A);else if(!E.has(I)){A++,ii(V);continue}if(!S.has(I)){k=kd(Td(I)),Qo(I,w.element),A++,E.delete(I),ii(V);continue}if(E.has(Y)){const $=qr(_e,Y);$!==k&&w.withBefore(k??w.before).insertChild($),k=kd(ri(Y,w.element)),A++,P++}else es(Y,w.withBefore(k??w.before)),P++}const z=Ie.get(Y);z!==null&&q(z)?ze===null&&(ze=z.getFormat(),ft=z.getStyle(),it=z.__key):D(z)&&P<=C&&!z.isInline()&&(Ne+=Mi),ii(V)}const X=A>_,W=P>C;if(X&&!W){const I=y[C+1],Y=I===void 0?null:_e.getElementByKey(I);Cd(y,m,P,C,w.withBefore(Y??w.before))}else W&&!X&&wd(g,A,_,w.element)})(o,p,h,l,c,s)}d.__lexicalTextContent=Ne,d.__lexicalFirstTextKey=it,Ne=a+Ne})(t,e,On(e,n,_e)),st(e)||(i=e,ze==null||ze===i.__textFormat||Ia||i.setTextFormat(ze),(function(r){ft==null||ft===r.__textStyle||Ia||r.setTextStyle(ft)})(e))}function qv(t,e,n){const i=e.__lexicalFirstTextKey;if(i!=null){const r=t.__key;let o=i;for(;o!==null;){const s=Ie.get(o);if(s===void 0){o=null;break}if(s.__parent===r)break;o=s.__parent}if(o!==null&&!n.has(o)){const s=Ie.get(i);if(q(s))return ze=s.getFormat(),void(ft=s.getStyle())}}e.__lexicalFirstTextKey=it}function ri(t,e){const n=Zt.get(t);let i=Ie.get(t);n!==void 0&&i!==void 0||L(61);const r=Tn||Jo.has(t)||Xo.has(t),o=qr(_e,t);if(n===i&&!r){let s;if(D(n)){const a=o.__lexicalTextContent;typeof a!="string"&&L(355,n.getType()),s=a,xd(o)}else s=n.getTextContent();return Ne+=s,o}if(n!==i&&r&&cf(Zo,Go,Ma,i,"updated"),Mr.$updateDOM(i,n,o,_e)){const s=es(t,null);return e===null&&L(62),e.replaceChild(s,o),Qo(t,null),s}if(D(n)){D(i)||L(334,t);const s=i.__indent;(Tn||s!==n.__indent)&&Wv(o,s);const a=i.__format;if((Tn||a!==n.__format)&&Kv(o,a),r)BP(n,i,o),Qe(i)||i.isInline()||Uv(0,i,o);else{const l=o.__lexicalTextContent;typeof l!="string"&&L(356,n.getType()),Ne+=l,xd(o)}if((Tn||i.__dir!==n.__dir||i.__parent!==n.__parent)&&(Sd(o,i),Qe(i)&&!Tn))for(const l of i.getChildren())D(l)&&Sd(qr(_e,l.getKey()),l)}else{const s=i.getTextContent();if(me(i)){const a=i.decorate(_e,Yo);a!==null&&Hv(t,a)}Ne+=s}if(!Ia&&Qe(i)){const s=i.getLatest();if(s.__cachedText!==Ne){const a=s.getWritable();a.__cachedText=Ne,i=a}}return Mr.$decorateDOM(i,n,o,_e),Vv(i),o}function Hv(t,e){let n=_e._pendingDecorators;const i=_e._decorators;if(n===null){if(i[t]===e)return;n=k0(_e)}n[t]=e}function kd(t){let e=t.nextSibling;return e!==null&&e===_e._blockCursorElement&&(e=e.nextSibling),e}function Yv(t,e){const n=new Set;for(let i=e;i<t.length;i++)n.add(t[i]);return n}function VP(t,e,n,i,r,o){Ne="",ze=null,ft=null,it=null,Tn=i===2,_e=n,Yo=n._config,Mr=n._config.dom||nl,Go=n._nodes,Ma=_e._listeners.mutation,Xo=r,Jo=o,Zt=t._nodeMap,bd=t,Ie=e._nodeMap,Ia=e._readOnly,Or=Tv(n._keyToDOMMap),_d=(function(){const a=new Map,l=c=>{for(const u of c){const d=Ie.get(u);if(d===void 0)continue;const f=d.__parent;if(f===null)continue;let p=a.get(f);p===void 0&&(p=new Set,a.set(f,p)),p.add(u)}};return l(Xo.keys()),l(Jo),a})();const s=new Map;return Zo=s,ri("root",null),_e=void 0,Go=void 0,Xo=void 0,Jo=void 0,Zt=void 0,bd=void 0,Ie=void 0,Yo=void 0,Or=void 0,_d=void 0,Zo=void 0,Mr=nl,s}function Td(t){const e=Or.get(t);return e===void 0&&L(75,t),e}function se(t){return{type:t}}const Ed=se("SELECTION_CHANGE_COMMAND"),WP=se("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Nd=se("CLICK_COMMAND"),Gv=se("BEFORE_INPUT_COMMAND"),Xv=se("INPUT_COMMAND"),Jv=se("COMPOSITION_START_COMMAND"),Zv=se("COMPOSITION_END_COMMAND"),Li=se("DELETE_CHARACTER_COMMAND"),Ir=se("INSERT_LINE_BREAK_COMMAND"),ts=se("INSERT_PARAGRAPH_COMMAND"),jr=se("CONTROLLED_TEXT_INSERTION_COMMAND"),ja=se("PASTE_COMMAND"),Ra=se("REMOVE_TEXT_COMMAND"),ns=se("DELETE_WORD_COMMAND"),is=se("DELETE_LINE_COMMAND"),Qt=se("FORMAT_TEXT_COMMAND"),Fa=se("UNDO_COMMAND"),La=se("REDO_COMMAND"),Qv=se("KEYDOWN_COMMAND"),ex=se("KEY_ARROW_RIGHT_COMMAND"),tx=se("MOVE_TO_END"),nx=se("KEY_ARROW_LEFT_COMMAND"),ix=se("MOVE_TO_START"),rx=se("KEY_ARROW_UP_COMMAND"),ox=se("KEY_ARROW_DOWN_COMMAND"),$a=se("KEY_ENTER_COMMAND"),sx=se("KEY_SPACE_COMMAND"),ax=se("KEY_BACKSPACE_COMMAND"),lx=se("KEY_ESCAPE_COMMAND"),cx=se("KEY_DELETE_COMMAND"),ux=se("KEY_TAB_COMMAND"),KP=se("INSERT_TAB_COMMAND"),UP=se("INDENT_CONTENT_COMMAND"),dx=se("OUTDENT_CONTENT_COMMAND"),fx=se("DROP_COMMAND"),qP=se("FORMAT_ELEMENT_COMMAND"),px=se("DRAGSTART_COMMAND"),hx=se("DRAGOVER_COMMAND"),HP=se("DRAGEND_COMMAND"),za=se("COPY_COMMAND"),Ad=se("CUT_COMMAND"),mx=se("SELECT_ALL_COMMAND"),YP=se("CLEAR_EDITOR_COMMAND"),GP=se("CLEAR_HISTORY_COMMAND"),rs=se("CAN_REDO_COMMAND"),os=se("CAN_UNDO_COMMAND"),gx=se("FOCUS_COMMAND"),yx=se("BLUR_COMMAND"),XP=se("KEY_MODIFIER_COMMAND"),En=Object.freeze({}),Pd=[["keydown",function(t,e){ss=t.timeStamp,$i=t.key,t.key!=="Backspace"&&cs(),!e.isComposing()&&re(e,Qv,t)}],["pointerdown",function(t,e){const n=t.target,i=t.pointerType;Hi(n)&&i!=="touch"&&i!=="pen"&&t.button===0&&gn(e,()=>{tf(n)||(Id=!0)})}],["compositionstart",function(t,e){re(e,Jv,t)}],["compositionend",function(t,e){ti?ls=!0:ni||!Wo&&!Ko?re(e,Zv,t):(Wa=!0,Ka=t.data)}],["input",function(t,e){t.stopPropagation(),cs(),gn(e,()=>{e.dispatchCommand(Xv,t)},{event:t}),Rr=null}],["click",function(t,e){gn(e,()=>{const n=Z(),i=At(Nt(e)),r=li();if(i){if(R(n)){const o=n.anchor,s=o.getNode();o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Qe(s)&&Be().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&r!==null&&n.is(r)&&(i.removeAllRanges(),n.dirty=!0)}else if(t.pointerType==="touch"||t.pointerType==="pen"){const o=i.anchorNode;(he(o)||Et(o))&&pt(Ud(r,i,e,t))}}re(e,Nd,t)})}],["cut",En],["copy",En],["dragstart",En],["dragover",En],["dragend",En],["paste",En],["focus",En],["blur",En],["drop",En]];Vo&&Pd.push(["beforeinput",(t,e)=>(function(n,i){const r=n.inputType;r==="deleteCompositionText"||ti&&j0(i)||r!=="insertCompositionText"&&re(i,Gv,n)})(t,e)]);let ss=0,$i=null,vx=0,Rr=null,Dd=!1,Ba=null;const Od=new WeakMap,Va=new WeakMap;let Md=!1,Id=!1,as=!1,ls=!1,Wa=!1,Ka="",zi=null,xx=[0,"",0,"root",0];function bx(t,e,n,i,r){const o=t.anchor,s=t.focus,a=o.getNode(),l=Ee(),c=At(Nt(l)),u=c!==null?c.anchorNode:null,d=o.key,f=l.getElementByKey(d),p=n.length;return d!==s.key||!q(a)||(!r&&(!Vo||vx<i+50)||a.isDirty()&&p<2||N0(n))&&o.offset!==s.offset&&!a.isComposing()||Pn(a)||a.isDirty()&&p>1||(r||!Vo)&&f!==null&&!a.isComposing()&&u!==Hr(a,f,l)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||(function(h,m){if(m.isSegmented())return!0;if(!h.isCollapsed())return!1;const g=h.anchor.offset,y=m.getParentOrThrow(),x=Ki(m);return g===0?!m.canInsertTextBefore()||!y.canInsertTextBefore()&&!m.isComposing()||x||(function(b){const w=b.getPreviousSibling();return(q(w)||D(w)&&w.isInline())&&!w.canInsertTextAfter()})(m):g===m.getTextContentSize()&&(!m.canInsertTextAfter()||!y.canInsertTextAfter()&&!m.isComposing()||x)})(t,a)}function _x(t,e){return Et(t)&&t.nodeValue!==null&&e!==0&&e!==t.nodeValue.length}function wx(t,e,n){const{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:s}=t;Md&&(Md=!1,_x(i,r)&&_x(o,s)&&!zi)||gn(e,()=>{if(!n)return void pt(null);if(!gs(e,i,o))return;let a=Z();if(zi&&R(a)&&a.isCollapsed()){const l=a.anchor,c=zi.anchor;(l.key===c.key&&l.offset===c.offset+1||l.offset===1&&c.getNode().is(l.getNode().getPreviousSibling()))&&(a=zi.clone(),pt(a))}if(zi=null,R(a)){const l=a.anchor,c=l.getNode();if(a.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(a.dirty=!0);const u=Nt(e).event,d=u?u.timeStamp:performance.now(),[f,p,h,m,g]=xx,y=Be(),x=e.isComposing()===!1&&y.getTextContent()==="";if(d<g+200&&l.offset===h&&l.key===m)Ua(a,f,p);else if(l.type==="text")q(c)||L(141),Sx(a,c);else if(l.type==="element"&&!x){D(c)||L(259);const b=l.getNode();b.isEmpty()?(function(w,_){const C=_.getTextFormat(),E=_.getTextStyle();Ua(w,C,E)})(a,b):Ua(a,a.format,"")}}else{const u=l.key,d=a.focus.key,f=a.getNodes(),p=f.length,h=a.isBackward(),m=h?s:r,g=h?r:s,y=h?d:u,x=h?u:d;let b=2047,w=!1;for(let _=0;_<p;_++){const C=f[_],E=C.getTextContentSize();if(q(C)&&E!==0&&!(_===0&&C.__key===y&&m===E||_===p-1&&C.__key===x&&g===0)&&(w=!0,b&=C.getFormat(),b===0))break}a.format=w?b:0}}re(e,Ed,void 0)})}function Ua(t,e,n){t.format===e&&t.style===n||(t.format=e,t.style=n,t.dirty=!0)}function Sx(t,e){Ua(t,e.getFormat(),e.getStyle())}function Cx(t){if(!t.getTargetRanges)return null;const e=t.getTargetRanges();return e.length===0?null:e[0]}function kx(t){if(t==null||t.length<=1||$i==null)return;const e=$i.length===1?$i:$i==="Enter"?`
|
|
225
|
-
`:$i==="Tab"?" ":null;if(!e)return;const n=Z();if(!R(n)||!n.isCollapsed())return;const i=n.anchor.getNode();if(!q(i))return;const{offset:r}=n.anchor;if(i.getTextContentSize()===r){const o=i.getNextSibling();if(e===`
|
|
226
|
-
`){if(si(o))o.selectEnd();else if(!o){const s=Ye(i,ds),a=s&&s.getNextSibling();D(a)&&a.selectStart()}}else e===" "?Bd(o)&&o.selectEnd():q(o)&&o.getTextContent()[0]===e&&o.select(1,1)}else i.getTextContent()[r]===e&&i.select(r+1,r+1)}function cs(){Dd=!1,Ba!==null&&(clearTimeout(Ba),Ba=null)}function Tx(){cs(),Dd=!0,Ba=setTimeout(cs,0)}function JP(t){const e=t.inputType,n=Cx(t),i=Ee(),r=Z();if(e==="insertText"&&t.data&&Dd){if(cs(),t.preventDefault(),R(r)&&!r.isCollapsed()){const d=r.isBackward()?r.anchor:r.focus;r.anchor.set(d.key,d.offset,d.type),r.focus.set(d.key,d.offset,d.type)}return!0}if(e==="deleteContentBackward"){if(r===null){const d=li();if(!R(d))return!0;pt(d.clone())}if(R(r)){const d=r.anchor.key===r.focus.key;if(o=t.timeStamp,$i==="MediaLast"&&o<ss+30&&i.isComposing()&&d){if(ot(null),ss=0,setTimeout(()=>{gn(i,()=>{ot(null)})},30),R(r)){const f=r.anchor.getNode();f.markDirty(),q(f)||L(142),Sx(r,f)}}else{if(ot(null),ni&&n!==null&&!n.collapsed&&(r.applyDOMRange(n),!r.isCollapsed()))return t.preventDefault(),r.removeText(),!0;t.preventDefault();const f=r.anchor.getNode(),p=f.getTextContent(),h=f.canInsertTextAfter(),m=r.anchor.offset===0&&r.focus.offset===p.length;let g=ud&&d&&!m&&h;if(g&&r.isCollapsed()&&(g=!me(uf(r.anchor,!0))),!g){re(i,Li,!0);const y=Z();ud&&R(y)&&y.isCollapsed()&&(zi=y,setTimeout(()=>zi=null))}}return!0}}var o;if(!R(r))return!0;const s=t.data;Rr!==null&&af(!1,i,Rr),r.dirty&&Rr===null||!r.isCollapsed()||Qe(r.anchor.getNode())||n===null||r.applyDOMRange(n),Rr=null;const a=r.anchor,l=r.focus,c=a.getNode(),u=l.getNode();if(e==="insertText"||e==="insertTranspose"){if(s===`
|
|
227
|
-
`)t.preventDefault(),re(i,Ir,!1);else if(s===Mi)t.preventDefault(),re(i,ts,void 0);else if(s==null&&t.dataTransfer){const d=t.dataTransfer.getData("text/plain");t.preventDefault(),r.insertRawText(d)}else s!=null&&bx(r,n,s,t.timeStamp,!0)?(t.preventDefault(),re(i,jr,s),kx(s)):Rr=s;return vx=t.timeStamp,!0}switch(t.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":re(i,jr,t),kx((t.dataTransfer?t.dataTransfer.getData("text/plain"):null)??t.data);break;case"insertFromComposition":ot(null),re(i,jr,t);break;case"insertLineBreak":ot(null),re(i,Ir,!1);break;case"insertParagraph":ot(null),as&&!ni?(as=!1,re(i,Ir,!1)):re(i,ts,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":re(i,ja,t);break;case"deleteByComposition":(function(d,f){return d!==f||D(d)||D(f)||!Ki(d)||!Ki(f)})(c,u)&&re(i,Ra,t);break;case"deleteByDrag":ll(Ya),re(i,Ra,t);break;case"deleteByCut":re(i,Ra,t);break;case"deleteContent":re(i,Li,!1);break;case"deleteWordBackward":re(i,ns,!0);break;case"deleteWordForward":re(i,ns,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":re(i,is,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":re(i,is,!1);break;case"formatStrikeThrough":re(i,Qt,"strikethrough");break;case"formatBold":re(i,Qt,"bold");break;case"formatItalic":re(i,Qt,"italic");break;case"formatUnderline":re(i,Qt,"underline");break;case"historyUndo":re(i,Fa,void 0);break;case"historyRedo":re(i,La,void 0)}return!0}function ZP(t){if(he(t.target)&&tf(t.target))return!0;const e=Ee(),n=Z(),i=t.data,r=Cx(t);if(i!=null&&R(n)&&bx(n,r,i,t.timeStamp,!1)){ls&&(qa(e,i),ls=!1);const o=n.anchor.getNode(),s=At(Nt(e));if(s===null)return!0;const a=n.isBackward(),l=a?n.anchor.offset:n.focus.offset,c=a?n.focus.offset:n.anchor.offset;Vo&&!n.isCollapsed()&&q(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,l)+i+o.getTextContent().slice(l+c)===P0(s.anchorNode)||re(e,jr,i);const u=i.length;ti&&u>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=u,n._cachedNodes=null,n._cachedIsBackward=null),ud&&e.isComposing()&&(ss=0,ot(null))}else af(!1,e,i!==null?i:void 0),ls&&(qa(e,i||void 0),ls=!1);return(function(){rt();const o=Ee();Av(o)})(),!0}function QP(t){const e=Ee(),n=Z();if(R(n)&&!e.isComposing()){const i=n.anchor,r=n.anchor.getNode();ot(i.key),ll(Ix),(t.timeStamp<ss+30||i.type==="element"||!n.isCollapsed()||r.getFormat()!==n.format||q(r)&&r.getStyle()!==n.style)&&re(e,jr,hd)}return!0}function eD(t){return qa(Ee(),t.data),ll(jx),!0}function qa(t,e){const n=t._compositionKey;if(ot(null),n!==null&&e!=null){if(e===""){const i=Ke(n),r=t.getElementByKey(n),o=r!==null&&q(i)?Hr(i,r,t):null;if(o!==null&&o.nodeValue!==null&&q(i)){const s=At(Nt(t));let a=null,l=null;s!==null&&s.anchorNode===o&&(a=s.anchorOffset,l=s.focusOffset),lf(i,o.nodeValue,a,l,!0)}return}if(e[e.length-1]===`
|
|
228
|
-
`){const i=Z();if(R(i)||Xe(i)){if(R(i)){const r=i.focus;i.anchor.set(r.key,r.offset,r.type)}return void re(t,$a,null)}}}af(!0,t,e)}function tD(t){const e=Ee();if(t.key==null)return!0;if(Wa){if(M0(t))return gn(e,()=>{qa(e,Ka)}),Wa=!1,Ka="",!0;Wa=!1,Ka=""}if((function(n){return we(n,"ArrowRight",{shiftKey:"any"})})(t))re(e,ex,t);else if((function(n){return we(n,"ArrowRight",{...Dn,shiftKey:"any"})})(t))re(e,tx,t);else if((function(n){return we(n,"ArrowLeft",{shiftKey:"any"})})(t))re(e,nx,t);else if((function(n){return we(n,"ArrowLeft",{...Dn,shiftKey:"any"})})(t))re(e,ix,t);else if((function(n){return we(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(t))re(e,rx,t);else if((function(n){return we(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(t))re(e,ox,t);else if((function(n){return we(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(t))as=!0,re(e,$a,t);else if((function(n){return n.key===" "})(t))re(e,sx,t);else if((function(n){return Jt&&we(n,"o",{ctrlKey:!0})})(t))t.preventDefault(),as=!0,re(e,Ir,!0);else if((function(n){return we(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(t))as=!1,re(e,$a,t);else if((function(n){return we(n,"Backspace",{shiftKey:"any"})||Jt&&we(n,"h",{ctrlKey:!0})})(t))M0(t)?re(e,ax,t)&&Tx():(t.preventDefault(),re(e,Li,!0));else if((function(n){return n.key==="Escape"})(t))re(e,lx,t);else if((function(n){return we(n,"Delete",{})||Jt&&we(n,"d",{ctrlKey:!0})})(t))(function(n){return n.key==="Delete"})(t)?re(e,cx,t):(t.preventDefault(),re(e,Li,!1));else if((function(n){return we(n,"Backspace",O0)})(t))t.preventDefault(),re(e,ns,!0);else if((function(n){return we(n,"Delete",O0)})(t))t.preventDefault(),re(e,ns,!1);else if((function(n){return Jt&&we(n,"Backspace",{metaKey:!0})})(t))t.preventDefault(),re(e,is,!0);else if((function(n){return Jt&&(we(n,"Delete",{metaKey:!0})||we(n,"k",{ctrlKey:!0}))})(t))t.preventDefault(),re(e,is,!1);else if((function(n){return we(n,"b",Dn)})(t))t.preventDefault(),re(e,Qt,"bold");else if((function(n){return we(n,"u",Dn)})(t))t.preventDefault(),re(e,Qt,"underline");else if((function(n){return we(n,"i",Dn)})(t))t.preventDefault(),re(e,Qt,"italic");else if((function(n){return we(n,"Tab",{shiftKey:"any"})})(t))re(e,ux,t);else if((function(n){return we(n,"z",Dn)})(t))t.preventDefault(),re(e,Fa,void 0);else if((function(n){return Jt?we(n,"z",{metaKey:!0,shiftKey:!0}):we(n,"y",{ctrlKey:!0})||we(n,"z",{ctrlKey:!0,shiftKey:!0})})(t))t.preventDefault(),re(e,La,void 0);else{const n=e._editorState._selection;(function(i){return we(i,"a",Dn)})(t)?(t.preventDefault(),re(e,mx,t)&&Tx()):n===null||R(n)||((function(i){return we(i,"c",Dn)})(t)?(t.preventDefault(),re(e,za,t)):(function(i){return we(i,"x",Dn)})(t)&&(t.preventDefault(),re(e,Ad,t)))}return(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(t)&&e.dispatchCommand(XP,t),!0}function Ex(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const Fr=new Map;function Nx(t){const e=ID(t.target);if(e===null)return;const n=w0(e.anchorNode);if(n===null)return;Id&&(Id=!1,gn(n,()=>{const l=li(),c=e.anchorNode;(he(c)||Et(c))&&pt(Ud(l,e,n,t))}));const i=sf(n),r=i[i.length-1],o=r._key,s=Fr.get(o),a=s||r;a!==n&&wx(e,a,!1),wx(e,n,!0),n!==r?Fr.set(o,n):s&&Fr.delete(o)}function Ax(t){t._lexicalHandled=!0}function Px(t){return t._lexicalHandled===!0}function nD(t){const e=Od.get(t);if(e===void 0)return;const n=Va.get(e);if(n===void 0)return;const i=n-1;i>=0||L(164),Od.delete(t),Va.set(e,i),i===0&&e.removeEventListener("selectionchange",Nx);const r=il(t);rf(r)?((function(s){if(s._parentEditor!==null){const a=sf(s),l=a[a.length-1]._key;Fr.get(l)===s&&Fr.delete(l)}else Fr.delete(s._key)})(r),t.__lexicalEditor=null):r&&L(198);const o=Ex(t);for(let s=0;s<o.length;s++)o[s]();t.__lexicalEventHandles=[]}function jd(t,e,n){rt();const i=t.__key,r=t.getParent();if(r===null)return;const o=(function(a){const l=Z();if(!R(l)||!D(a))return l;const{anchor:c,focus:u}=l,d=c.getNode(),f=u.getNode();return df(d,a)&&c.set(a.__key,0,"element"),df(f,a)&&u.set(a.__key,0,"element"),l})(t);let s=!1;if(R(o)&&e){const a=o.anchor,l=o.focus;a.key===i&&(Qa(a,t,r,t.getPreviousSibling(),t.getNextSibling()),s=!0),l.key===i&&(Qa(l,t,r,t.getPreviousSibling(),t.getNextSibling()),s=!0)}else Xe(o)&&e&&t.isSelected()&&t.selectPrevious();if(R(o)&&e&&!s){const a=t.getIndexWithinParent();Ui(t),Wi(o,r,a,-1)}else Ui(t);n||st(r)||r.canBeEmpty()||!r.isEmpty()||jd(r,e),e&&o&&Qe(r)&&r.isEmpty()&&r.selectEnd()}function qj(t){return t}const Dx=Symbol.for("ephemeral");function Ha(t){return t[Dx]||!1}const Ox={configurable:!0,enumerable:!1,value:void 0,writable:!0};class hn{__type;__key;__parent;__prev;__next;__state;[Ho];static getType(){const{ownNodeType:e}=dl(this);return e===void 0&&L(64,this.name),e}static clone(e){L(65,this.name)}$config(){return{}}config(e,n){const i=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:i,type:e}),{[e]:n}}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=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",Ox),Object.defineProperty(this,Ho,Ox),C0(this,e)}getType(){return this.__type}isInline(){L(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const n=Ke(e);if(n===null)break;e=n.__parent}return!1}isSelected(e){const n=e||Z();if(n==null)return!1;const i=n.getNodes().some(r=>r.__key===this.__key);if(q(this))return i;if(R(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const r=this.getParent();if(me(this)&&this.isInline()&&r){const o=n.isBackward()?n.focus:n.anchor;if(r.is(o.getNode())&&o.offset===r.getChildrenSize()&&this.is(r.getLastChild()))return!1}}return i}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),i=0;for(;n!==null;){if(this.is(n))return i;i++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:Ke(e)}getParentOrThrow(){const e=this.getParent();return e===null&&L(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if(st(n))return D(e)||e===this&&me(e)||L(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&L(67,this.__key),e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:Ke(e)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let i=n.getFirstChild();for(;i!==null&&!i.is(this);)e.push(i),i=i.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:Ke(e)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=D(this)?this:this.getParent(),i=D(e)?e:e.getParent(),r=n&&i?gl(n,i):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const n=gl(this,e);return n!==null&&(n.type==="descendant"||(n.type==="branch"?K0(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&L(279),!1)))}isParentOf(e){const n=gl(this,e);return n!==null&&n.type==="ancestor"}getNodesBetween(e){const n=this.isBefore(e),i=[],r=new Set;let o=this;for(;o!==null;){const s=o.__key;if(r.has(s)||(r.add(s),i.push(o)),o===e)break;const a=D(o)?n?o.getFirstChild():o.getLastChild():null;if(a!==null){o=a;continue}const l=n?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const c=o.getParentOrThrow();if(r.has(c.__key)||i.push(c),c===e)break;let u=null,d=c;do{if(d===null&&L(68),u=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||r.has(d.__key)||i.push(d)}while(u===null);o=u}return n||i.reverse(),i}isDirty(){const e=Ee()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(Ha(this))return this;const e=Ke(this.__key);return e===null&&L(113),e}getWritable(){if(Ha(this))return this;rt();const e=ci(),n=Ee(),i=e._nodeMap,r=this.__key,o=this.getLatest(),s=n._cloneNotNeeded,a=Z();if(a!==null&&a.setCachedNodes(null),s.has(r))return sl(o),o;const l=z0(o);return s.add(r),sl(l),i.set(r,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){L(70)}updateDOM(e,n,i){L(71)}getDOMSlot(e){return new _v(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){L(18,this.name)}updateFromJSON(e){return(function(n,i){const r=n.getWritable(),o=i.$;let s=o;for(const a of Ov(r).flatKeys)a in i&&(s!==void 0&&s!==o||(s={...o}),s[a]=i[a]);return(r.__state||s)&&FP(n).updateFromJSON(s),r})(this,e)}static transform(){return null}remove(e){jd(this,!0,e)}replace(e,n){rt();let i=Z();i!==null&&(i=i.clone()),pf(this,e);const r=this.getLatest(),o=this.__key,s=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),c=l.__size,u=a.getParent(),d=u!==null?a.getIndexWithinParent():-1;Ui(a),u!==null&&R(i)&&Wi(i,u,d,-1);const f=r.getPreviousSibling(),p=r.getNextSibling(),h=r.__prev,m=r.__next,g=r.__parent;jd(r,!1,!0),f===null?l.__first=s:f.getWritable().__next=s,a.__prev=h,p===null?l.__last=s:p.getWritable().__prev=s,a.__next=m,a.__parent=g,l.__size=c;let y=0;if(n&&(D(this)&&D(a)||L(139),y=a.getChildrenSize(),a.splice(y,0,this.getChildren())),R(i)){pt(i);const x=i.anchor,b=i.focus;x.key===o&&(n&&x.type==="element"?x.set(a.__key,y+x.offset,"element"):Vx(x,a)),b.key===o&&(n&&b.type==="element"?b.set(a.__key,y+b.offset,"element"):Vx(b,a))}return ui()===o&&ot(s),a}insertAfter(e,n=!0){rt(),pf(this,e);const i=this.getWritable(),r=e.getWritable(),o=r.getParent(),s=Z();let a=!1,l=!1;if(o!==null){const p=e.getIndexWithinParent();if(R(s)){const h=o.__key,m=s.anchor,g=s.focus;a=m.type==="element"&&m.key===h&&m.offset===p+1,l=g.type==="element"&&g.key===h&&g.offset===p+1}Ui(r),n&&R(s)&&Wi(s,o,p,-1)}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=r.__key,f=i.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,i.__next=d,r.__next=f,r.__prev=i.__key,r.__parent=i.__parent,n&&R(s)){const p=this.getIndexWithinParent();Wi(s,u,p+1);const h=u.__key;a&&s.anchor.set(h,p+2,"element"),l&&s.focus.set(h,p+2,"element")}return e}insertBefore(e,n=!0){rt(),pf(this,e);const i=this.getWritable(),r=e.getWritable(),o=r.__key,s=Z(),a=r.getParent(),l=a!==null?r.getIndexWithinParent():-1;Ui(r),a!==null&&n&&R(s)&&Wi(s,a,l,-1);const c=this.getPreviousSibling(),u=this.getParentOrThrow().getWritable(),d=i.__prev,f=this.getIndexWithinParent();return c===null?u.__first=o:c.getWritable().__next=o,u.__size++,i.__prev=o,r.__prev=d,r.__next=i.__key,r.__parent=i.__parent,n&&R(s)&&Wi(s,this.getParentOrThrow(),f),e}isParentRequired(){return!1}createParentElementNode(){return De()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){rt();const i=this.getPreviousSibling(),r=this.getParentOrThrow();if(i===null)return r.select(0,0);if(D(i))return i.select();if(!q(i)){const o=i.getIndexWithinParent()+1;return r.select(o,o)}return i.select(e,n)}selectNext(e,n){rt();const i=this.getNextSibling(),r=this.getParentOrThrow();if(i===null)return r.select();if(D(i))return i.select(0,0);if(!q(i)){const o=i.getIndexWithinParent();return r.select(o,o)}return i.select(e,n)}markDirty(){this.getWritable()}reconcileObservedMutation(e,n){this.markDirty()}}const Rd="historic",iD="history-push",Bi="history-merge",rD="paste",oD="collaboration",Mx="skip-scroll-into-view",sD="skip-dom-selection",Ya="skip-selection-focus",Ix="composition-start",jx="composition-end",Rx=/\s*!important\s*$/i;function Ga(t){const e={};if(!t)return e;let n="",i="",r=null,o=!1,s=!1,a=!1,l=0;for(let d=0;d<t.length;d++){const f=t[d];if(o)f==="*"&&t[d+1]==="/"&&(o=!1,d++);else if(s)a?i+=f:n+=f,s=!1;else if(r===null)if(f!=="/"||t[d+1]!=="*")if(f!=='"'&&f!=="'")if(f!=="(")if(f!==")")if(a||f!==":"||l!==0){if(f===";"&&l===0){const p=n.trim(),h=i.trim();p!==""&&h!==""&&(e[p]=h),n="",i="",a=!1;continue}a?i+=f:n+=f}else a=!0;else l=Math.max(0,l-1),a?i+=f:n+=f;else l++,a?i+=f:n+=f;else r=f,a?i+=f:n+=f;else o=!0,d++;else a?i+=f:n+=f,f==="\\"?s=!0:f===r&&(r=null)}const c=n.trim(),u=i.trim();return c!==""&&u!==""&&(e[c]=u),e}function aD(t,e,n){const i=Rx.test(n)?"important":"",r=i===""?n:n.replace(Rx,"").trim();t.setProperty(e,r,i)}function Fd(t,e,n=""){if(e===n)return;const i=Ga(n),r=Ga(e);for(const o in r)delete i[o],aD(t,o,r[o]);for(const o in i)t.removeProperty(o)}class Lr extends hn{static getType(){return"linebreak"}static clone(e){return new Lr(e.__key)}constructor(e){super(e)}getTextContent(){return`
|
|
229
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(n){const i=n.parentElement;if(i!==null&&xs(i)){const r=i.firstChild;if(r===n||r.nextSibling===n&&Xa(r)){const o=i.lastChild;if(o===n||o.previousSibling===n&&Xa(o))return!0}}return!1})(e)||(function(n){const i=n.parentElement;if(i!==null&&xs(i)){const r=i.firstChild;if(r===n||r.nextSibling===n&&Xa(r))return!1;const o=i.lastChild;if(o===n||o.previousSibling===n&&Xa(o))return!0}return!1})(e)?null:{conversion:lD,priority:0}}}static importJSON(e){return oi().updateFromJSON(e)}}function lD(t){return{node:oi()}}function oi(){return yn(new Lr)}function si(t){return t instanceof Lr}function Xa(t){return Et(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}function Ld(t,e){return 16&e?"code":e&pd?"mark":32&e?"sub":64&e?"sup":null}function $d(t,e){return 1&e?"strong":2&e?"em":"span"}function Fx(t,e,n,i,r){const o=i.classList;let s=Ur(r,"base");s!==void 0&&o.add(...s),s=Ur(r,"underlineStrikethrough");let a=!1;const l=8&e&&4&e;s!==void 0&&(8&n&&4&n?(a=!0,l||o.add(...s)):l&&o.remove(...s));for(const c in Ii){const u=Ii[c];if(s=Ur(r,c),s!==void 0)if(n&u){if(a&&(c==="underline"||c==="strikethrough")){e&u&&o.remove(...s);continue}((e&u)===0||l&&c==="underline"||c==="strikethrough")&&o.add(...s)}else e&u&&o.remove(...s)}}function Lx(t,e,n){const i=n.isComposing(),r=t+(i?Uo:""),o=Fe(),s=ul(o).$getDOMSlot(n,e,o),a=s.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void s.insertChild(document.createTextNode(r));const l=a,c=l.nodeValue;if(c!==r)if(i||ti){const[u,d,f]=(function(p,h){const m=p.length,g=h.length;let y=0,x=0;for(;y<m&&y<g&&p[y]===h[y];)y++;for(;x+y<m&&x+y<g&&p[m-x-1]===h[g-x-1];)x++;return[y,m-y-x,h.slice(y,g-x)]})(c,r);d!==0&&l.deleteData(u,d),l.insertData(u,f)}else l.nodeValue=r}function $x(t,e,n,i,r,o){Lx(r,t,e);const s=o.theme.text;s!==void 0&&Fx(0,0,i,t,s)}function Ja(t,e){const n=document.createElement(e);return n.appendChild(t),n}class ai extends hn{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new ai(e.__text,e.__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="",n){super(n),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(){const e=this.getLatest();return NP[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ui()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const n=Ii[e];return(this.getFormat()&n)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,n){return ol(this.getLatest().__format,e,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,n){const i=this.__format,r=Ld(0,i),o=$d(0,i),s=r===null?o:r,a=document.createElement(s);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(o),a.appendChild(l)),$x(l,this,0,i,this.__text,e);const c=this.__style;return c!==""&&Fd(a.style,c),a}updateDOM(e,n,i){const r=this.__text,o=e.__format,s=this.__format,a=Ld(0,o),l=Ld(0,s),c=$d(0,o),u=$d(0,s);if((a===null?c:a)!==(l===null?u:l))return!0;if(a===l&&c!==u){const m=n.firstChild;m==null&&L(48);const g=document.createElement(u);return $x(g,this,0,s,r,i),n.replaceChild(g,m),!1}let d=n;l!==null&&a!==null&&(d=n.firstChild,d==null&&L(49)),Lx(r,d,this);const f=i.theme.text;f!==void 0&&o!==s&&Fx(0,o,s,d,f);const p=e.__style,h=this.__style;return p!==h&&Fd(n.style,h,p),!1}static importDOM(){return{"#text":()=>({conversion:fD,priority:0}),b:()=>({conversion:uD,priority:0}),code:()=>({conversion:Nn,priority:0}),em:()=>({conversion:Nn,priority:0}),i:()=>({conversion:Nn,priority:0}),mark:()=>({conversion:Nn,priority:0}),s:()=>({conversion:Nn,priority:0}),span:()=>({conversion:cD,priority:0}),strong:()=>({conversion:Nn,priority:0}),sub:()=>({conversion:Nn,priority:0}),sup:()=>({conversion:Nn,priority:0}),u:()=>({conversion:Nn,priority:0})}}static importJSON(e){return He().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:n}=super.exportDOM(e);return he(n)||L(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Ja(n,"b")),this.hasFormat("italic")&&(n=Ja(n,"i")),this.hasFormat("strikethrough")&&(n=Ja(n,"s")),this.hasFormat("underline")&&(n=Ja(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,n){}setFormat(e){const n=this.getWritable();return n.__format=typeof e=="string"?Ii[e]:e,n}setDetail(e){const n=this.getWritable();return n.__detail=typeof e=="string"?kP[e]:e,n}setStyle(e){const n=this.getWritable();return n.__style=e,n}toggleFormat(e){const n=ol(this.getFormat(),e,null);return this.setFormat(n)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const n=EP[e];if(this.__mode===n)return this;const i=this.getWritable();return i.__mode=n,i}setTextContent(e){if(this.__text===e)return this;const n=this.getWritable();return n.__text=e,n}select(e,n){rt();let i=e,r=n;const o=Z(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const l=s.length;i===void 0&&(i=l),r===void 0&&(r=l)}else i=0,r=0;if(!R(o))return Xx(a,i,a,r,"text","text");{const l=ui();l!==o.anchor.key&&l!==o.focus.key||ot(a),o.setTextNodeRange(this,i,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,i,r){const o=this.getWritable(),s=o.__text,a=i.length;let l=e;l<0&&(l=a+l,l<0&&(l=0));const c=Z();if(r&&R(c)){const d=e+a;c.setTextNodeRange(o,d,o,d)}const u=s.slice(0,l)+i+s.slice(l+n);return o.__text=u,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){rt();const n=this.getLatest(),i=n.getTextContent();if(i==="")return[];const r=n.__key,o=ui(),s=i.length;e.sort((S,k)=>S-k),e.push(s);const a=[],l=e.length;for(let S=0,k=0;S<s&&k<=l;k++){const A=e[k];A>S&&(a.push(i.slice(S,A)),S=A)}const c=a.length;if(c===1)return[n];const u=a[0],d=n.getParent();let f;const p=n.getFormat(),h=n.getStyle(),m=n.__detail;let g=!1,y=null,x=null;const b=Z();if(R(b)){const[S,k]=b.isBackward()?[b.focus,b.anchor]:[b.anchor,b.focus];S.type==="text"&&S.key===r&&(y=S),k.type==="text"&&k.key===r&&(x=k)}n.isSegmented()?(f=He(u),f.__format=p,f.__style=h,f.__detail=m,f.__state=Rv(n,f),g=!0):f=n.setTextContent(u);const w=[f];for(let S=1;S<c;S++){const k=He(a[S]);k.__format=p,k.__style=h,k.__detail=m,k.__state=Rv(n,k);const A=k.__key;o===r&&ot(A),w.push(k)}const _=y?y.offset:null,C=x?x.offset:null;let E=0;for(const S of w){if(!y&&!x)break;const k=E+S.getTextContentSize();if(y!==null&&_!==null&&_<=k&&_>=E&&(y.set(S.getKey(),_-E,"text"),_<k&&(y=null)),x!==null&&C!==null&&C<=k&&C>=E){x.set(S.getKey(),C-E,"text");break}E=k}if(d!==null){(function(A){const P=A.getPreviousSibling(),X=A.getNextSibling();P!==null&&sl(P),X!==null&&sl(X)})(this);const S=d.getWritable(),k=this.getIndexWithinParent();g?(S.splice(k,0,w),this.remove()):S.splice(k,1,w),R(b)&&Wi(b,d,k,c-1)}return w}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||L(50);const i=this.__key,r=e.__key,o=this.__text,s=o.length;ui()===r&&ot(i);const a=Z();if(R(a)){const d=a.anchor,f=a.focus;d!==null&&d.key===r&&Qx(d,n,i,e,s),f!==null&&f.key===r&&Qx(f,n,i,e,s)}const l=e.__text,c=n?l+o:o+l;this.setTextContent(c);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function cD(t){return{forChild:zd(t.style),node:null}}function uD(t){const e=t,n=e.style.fontWeight==="normal";return{forChild:zd(e.style,n?void 0:"bold"),node:null}}const zx=new WeakMap;function dD(t){if(!he(t))return!1;if(t.nodeName==="PRE")return!0;const e=t.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function fD(t){const e=t;t.parentElement===null&&L(129);let n=e.textContent||"";if((function(i){let r,o=i.parentNode;const s=[i];for(;o!==null&&(r=zx.get(o))===void 0&&!dD(o);)s.push(o),o=o.parentNode;const a=r===void 0?o:r;for(let l=0;l<s.length;l++)zx.set(s[l],a);return a})(e)!==null){const i=n.split(/(\r?\n|\t)/),r=[],o=i.length;for(let s=0;s<o;s++){const a=i[s];a===`
|
|
230
|
-
`||a===`\r
|
|
231
|
-
`?r.push(oi()):a===" "?r.push(us()):a!==""&&r.push(He(a))}return{node:r}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let i=e,r=!0;for(;i!==null&&(i=Bx(i,!1))!==null;){const o=i.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===" "){let i=e,r=!0;for(;i!==null&&(i=Bx(i,!0))!==null;)if((i.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:He(n)}}function Bx(t,e){let n=t;for(;;){let i;for(;(i=e?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=i,he(n)){const o=n.style.display;if(o===""&&!cl(n)||o!==""&&!o.startsWith("inline"))return null}let r=n;for(;(r=e?n.firstChild:n.lastChild)!==null;)n=r;if(Et(n))return n;if(n.nodeName==="BR")return null}}const pD={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Nn(t){const e=pD[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:zd(t.style,e),node:null}}function He(t=""){return yn(new ai(t))}function q(t){return t instanceof ai}function zd(t,e){const n=t.fontWeight,i=t.textDecoration.split(" "),r=n==="700"||n==="bold",o=i.includes("line-through"),s=t.fontStyle==="italic",a=i.includes("underline"),l=t.verticalAlign;return c=>(q(c)&&(r&&!c.hasFormat("bold")&&c.toggleFormat("bold"),o&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),s&&!c.hasFormat("italic")&&c.toggleFormat("italic"),a&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),l!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}class $r extends ai{static getType(){return"tab"}static clone(e){return new $r(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const n=super.createDOM(e),i=Ur(e.theme,"tab");return i!==void 0&&n.classList.add(...i),n}static importJSON(e){return us().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&fv(126),super.setTextContent(" ")}spliceText(e,n,i,r){return i===""&&n===0||i===" "&&n===1||L(286),this}setDetail(e){return e!==2&&L(127),this}setMode(e){return e!=="normal"&&L(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function us(){return yn(new $r)}function Bd(t){return t instanceof $r}class hD{key;offset;type;_selection;constructor(e,n,i){this._selection=null,this.key=e,this.offset=n,this.type=i}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:hl(at(nn(this,"next")),at(nn(e,"next")))<0}getNode(){const e=Ke(this.key);return e===null&&L(20),e}set(e,n,i,r){const o=this._selection,s=this.key;r&&this.key===e&&this.offset===n&&this.type===i||(this.key=e,this.offset=n,this.type=i,zr()||(ui()===s&&ot(e),o!==null&&(o.setCachedNodes(null),R(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function mn(t,e,n){return new hD(t,e,n)}function Vd(t,e){let n=e.__key,i=t.offset,r="element";if(q(e)){r="text";const o=e.getTextContentSize();i>o&&(i=o)}else if(!D(e)){const o=e.getNextSibling();if(q(o))n=o.__key,i=0,r="text";else{const s=e.getParent();s&&(n=s.__key,i=e.getIndexWithinParent()+1)}}t.set(n,i,r)}function Vx(t,e){if(D(e)){const n=e.getLastDescendant();D(n)||q(n)?Vd(t,n):Vd(t,e)}else Vd(t,e)}class Za{_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(!Xe(e))return!1;const n=this._nodes,i=e._nodes;return n.size===i.size&&Array.from(n).every(r=>i.has(r))}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 Za(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const n=this.getNodes(),i=n.length,r=n[i-1];let o;if(q(r))o=r.select();else{const s=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(s,s)}o.insertNodes(e);for(let s=0;s<i;s++)n[s].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this._nodes,i=[];for(const r of n){const o=Ke(r);o!==null&&i.push(o)}return zr()||(this._cachedNodes=i),i}getTextContent(){const e=this.getNodes();let n="";for(let i=0;i<e.length;i++)n+=e[i].getTextContent();return n}deleteNodes(){const e=this.getNodes();if((Z()||li())===this&&e[0]){const n=je(e[0],"next");yl(In(n,n))}for(const n of e)n.remove()}}function R(t){return t instanceof Vi}class Vi{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,n,i,r){this.anchor=e,this.focus=n,e._selection=this,n._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=i,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!R(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(){const e=this._cachedNodes;if(e!==null)return e;const n=(function(i){const r=[],[o,s]=i.getTextSlices();o&&r.push(o.caret.origin);const a=new Set,l=new Set;for(const c of i)if(Pt(c)){const{origin:u}=c;r.length===0?a.add(u):(l.add(u),r.push(u))}else{const{origin:u}=c;D(u)&&l.has(u)||r.push(u)}if(s&&r.push(s.caret.origin),vn(i.focus)&&D(i.focus.origin)&&i.focus.getNodeAtCaret()===null)for(let c=xt(i.focus.origin,"previous");Pt(c)&&a.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(r[r.length-1]);c=pl(c))a.delete(c.origin),r.pop();for(;r.length>1;){const c=r[r.length-1];if(!D(c)||l.has(c)||c.isEmpty()||a.has(c))break;r.pop()}if(r.length===0&&i.isCollapsed()){const c=at(i.anchor),u=at(i.anchor.getFlipped()),d=p=>Bt(p)?p.origin:p.getNodeAtCaret(),f=d(c)||d(u)||(i.anchor.getNodeAtCaret()?c.origin:u.origin);r.push(f)}return r})(bl(xl(this),"next"));return zr()||(this._cachedNodes=n),n}setTextNodeRange(e,n,i,r){return this.anchor.set(e.__key,n,"text"),this.focus.set(i.__key,r,"text"),this}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const n=e[0],i=e[e.length-1],r=this.anchor,o=this.focus,s=r.isBefore(o),[a,l]=Wd(this);let c="",u=!0;for(let d=0;d<e.length;d++){const f=e[d];if(D(f)&&!f.isInline())u||(c+=`
|
|
232
|
-
`),u=!f.isEmpty();else if(u=!1,q(f)){let p=f.getTextContent();f===n?f===i?r.type==="element"&&o.type==="element"&&o.offset!==r.offset||(p=a<l?p.slice(a,l):p.slice(l,a)):p=s?p.slice(a):p.slice(l):f===i&&(p=s?p.slice(0,l):p.slice(0,a)),c+=p}else!me(f)&&!si(f)||f===i&&this.isCollapsed()||(c+=f.getTextContent())}return c}applyDOMRange(e){const n=Ee(),i=n.getEditorState()._selection,r=Gx(e.startContainer,e.startOffset,e.endContainer,e.endOffset,n,i);if(r===null)return;const[o,s,a]=r;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),a&&(this.dirty=!0),Ri(this)}clone(){const e=this.anchor,n=this.focus;return new Vi(mn(e.key,e.offset,e.type),mn(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=ol(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){const n=Ii[e];return(this.format&n)!==0}insertRawText(e){this.insertNodes(r0(e))}insertText(e){const n=this.anchor,i=this.focus,r=this.format,o=this.style;let s=n,a=i;!this.isCollapsed()&&i.isBefore(n)&&(s=i,a=n),s.type==="element"&&(function(g,y,x,b){const w=g.getNode(),_=w.getChildAtIndex(g.offset),C=He();if(C.setFormat(x),C.setStyle(b),hs(_))_.splice(0,0,[C]);else{const E=Qe(w)?De().append(C):C;_===null?w.append(E):_.insertBefore(E)}g.is(y)&&y.set(C.__key,0,"text"),g.set(C.__key,0,"text")})(s,a,r,o),a.type==="element"&&fi(a,at(nn(a,"next")));const l=s.offset;let c=a.offset;const u=this.getNodes(),d=u.length;let f=u[0];q(f)||L(26);const p=f.getTextContent().length,h=f.getParentOrThrow();let m=u[d-1];if(d===1&&a.type==="element"&&(c=p,a.set(s.key,c,"text")),this.isCollapsed()&&l===p&&(Pn(f)||!f.canInsertTextAfter()||!h.canInsertTextAfter()&&f.getNextSibling()===null)){let g=f.getNextSibling();if(q(g)&&g.canInsertTextBefore()&&!Pn(g)||(g=He(),g.setFormat(r),g.setStyle(o),h.canInsertTextAfter()?f.insertAfter(g):h.insertAfter(g)),g.select(0,0),f=g,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&l===0&&(Pn(f)||!f.canInsertTextBefore()||!h.canInsertTextBefore()&&f.getPreviousSibling()===null)){let g=f.getPreviousSibling();if(q(g)&&!Pn(g)||(g=He(),g.setFormat(r),h.canInsertTextBefore()?f.insertBefore(g):h.insertBefore(g)),g.select(),f=g,e!=="")return void this.insertText(e)}else if(f.isSegmented()&&l!==p){const g=He(f.getTextContent());g.setFormat(r),f.replace(g),f=g}else if(!this.isCollapsed()&&e!==""){const g=m.getParent();if(!h.canInsertTextBefore()||!h.canInsertTextAfter()||D(g)&&(!g.canInsertTextBefore()||!g.canInsertTextAfter()))return this.insertText(""),Yx(this.anchor,this.focus),void this.insertText(e)}if(d===1){if(Ki(f)){const b=He(e);return b.select(),void f.replace(b)}const g=f.getFormat(),y=f.getStyle();if(l!==c||g===r&&y===o){if(Bd(f)){const b=He(e);return b.setFormat(r),b.setStyle(o),b.select(),void f.replace(b)}}else{if(f.getTextContent()!==""){const b=He(e);if(b.setFormat(r),b.setStyle(o),b.select(),l===0)f.insertBefore(b,!1);else{const[w]=f.splitText(l);w.insertAfter(b,!1)}return void(b.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null))}f.setFormat(r),f.setStyle(o)}const x=c-l;f=f.spliceText(l,x,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=g,this.style=y,f.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const g=new Set([...f.getParentKeys(),...m.getParentKeys()]),y=D(f)?f:f.getParentOrThrow();let x=D(m)?m:m.getParentOrThrow(),b=m;if(!y.is(x)&&x.isInline())do b=x,x=x.getParentOrThrow();while(x.isInline());if(a.type==="text"&&(c!==0||m.getTextContent()==="")||a.type==="element"&&m.getIndexWithinParent()<c)if(q(m)&&!Ki(m)&&c!==m.getTextContentSize()){if(m.isSegmented()){const S=He(m.getTextContent());m.replace(S),m=S}Qe(a.getNode())||a.type!=="text"||(m=m.spliceText(0,c,"")),g.add(m.__key)}else{const S=m.getParentOrThrow();S.canBeEmpty()||S.getChildrenSize()!==1?m.remove():S.remove()}else g.add(m.__key);const w=x.getChildren(),_=new Set(u),C=y.is(x),E=y.isInline()&&f.getNextSibling()===null?y:f;for(let S=w.length-1;S>=0;S--){const k=w[S];if(k.is(f)||D(k)&&k.isParentOf(f))break;k.isAttached()&&(!_.has(k)||k.is(b)?C||E.insertAfter(k,!1):k.remove())}if(!C){let S=x,k=null;for(;S!==null;){const A=S.getChildren(),P=A.length;(P===0||A[P-1].is(k))&&(g.delete(S.__key),k=S),S=S.getParent()}}if(Ki(f))if(l===p)f.select();else{const S=He(e);S.select(),f.replace(S)}else f=f.spliceText(l,p-l,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=f.getFormat(),this.style=f.getStyle(),f.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let S=1;S<d;S++){const k=u[S],A=k.__key;g.has(A)||k.remove()}}}removeText(){const e=Z()===this;vl(this,YD(xl(this))),e&&Z()!==this&&pt(this)}formatText(e,n=null){if(this.isCollapsed())return this.toggleFormat(e),void ot(null);const i=this.getNodes(),r=[];for(const w of i)q(w)&&r.push(w);const o=w=>{i.forEach(_=>{if(D(_)){const C=_.getFormatFlags(e,w);_.setTextFormat(C)}})},s=r.length;if(s===0)return this.toggleFormat(e),ot(null),void o(n);const a=this.anchor,l=this.focus,c=this.isBackward(),u=c?l:a,d=c?a:l;let f=0,p=r[0],h=u.type==="element"?0:u.offset;if(u.type==="text"&&h===p.getTextContentSize()&&(f=1,p=r[1],h=0),p==null)return;const m=p.getFormatFlags(e,n);o(m);const g=s-1;let y=r[g];const x=d.type==="text"?d.offset:y.getTextContentSize();if(p.is(y)){if(h===x)return;if(Pn(p)||h===0&&x===p.getTextContentSize())p.setFormat(m);else{const w=p.splitText(h,x),_=h===0?w[0]:w[1];_.setFormat(m),u.type==="text"&&u.set(_.__key,0,"text"),d.type==="text"&&d.set(_.__key,x-h,"text")}return void(this.format=m)}h===0||Pn(p)||([,p]=p.splitText(h),h=0),p.setFormat(m);const b=y.getFormatFlags(e,m);x>0&&(x===y.getTextContentSize()||Pn(y)||([y]=y.splitText(x)),y.setFormat(b));for(let w=f+1;w<g;w++){const _=r[w],C=_.getFormatFlags(e,b);_.setFormat(C)}u.type==="text"&&u.set(p.__key,h,"text"),d.type==="text"&&d.set(y.__key,x,"text"),this.format=m|b}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const h=Z();return R(h)||L(134),h.insertNodes(e)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),i=Ye(n,zt),r=e[e.length-1];if(D(i)&&"__language"in i){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const h=qd(this);i.splice(h,0,e),r.selectEnd()}return}if(!e.some(h=>(D(h)||me(h))&&!h.isInline())){D(i)||L(211,n.constructor.name,n.getType());const h=qd(this);return i.splice(h,0,e),void r.selectEnd()}const o=(function(h){const m=De();let g=null;for(let y=0;y<h.length;y++){const x=h[y],b=si(x);if(b||me(x)&&x.isInline()||D(x)&&x.isInline()||q(x)||x.isParentRequired()){if(g===null&&(g=x.createParentElementNode(),m.append(g),b))continue;g!==null&&g.append(x)}else m.append(x),g=null}return m})(e),s=o.getLastDescendant(),a=o.getChildren(),l=!D(i)||!i.isEmpty()?this.insertParagraph():null,c=a[a.length-1];let u=a[0];var d;D(d=u)&&zt(d)&&!d.isEmpty()&&D(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(D(i)||L(211,n.constructor.name,n.getType()),i.append(...u.getChildren()),u=a[1]),u&&(i===null&&L(212,n.constructor.name,n.getType()),(function(h,m){const g=m.getParentOrThrow().getLastChild();let y=m;const x=[m];for(;y!==g;)y.getNextSibling()||L(140),y=y.getNextSibling(),x.push(y);let b=h;for(const w of x)b=b.insertAfter(w)})(i,u));const f=Ye(s,zt);l&&D(f)&&(l.canMergeWhenEmpty()||zt(c))&&(f.append(...l.getChildren()),l.remove()),D(i)&&i.isEmpty()&&i.remove(),s.selectEnd();const p=D(i)?i.getLastChild():null;si(p)&&f!==i&&p.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=De();return Be().splice(this.anchor.offset,0,[s]),s.select(),s}const e=qd(this),n=Ye(this.anchor.getNode(),zt);D(n)||L(213);const i=n.getChildAtIndex(e),r=i?[i,...i.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const n=oi();if(this.insertNodes([n]),e){const i=n.getParentOrThrow(),r=n.getIndexWithinParent();i.select(r,r)}}extract(){const e=[...this.getNodes()],n=e.length;let i=e[0],r=e[n-1];const[o,s]=Wd(this),a=this.isBackward(),[l,c]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[u,d]=a?[s,o]:[o,s];if(n===0)return[];if(n===1){if(q(i)&&!this.isCollapsed()){const f=i.splitText(u,d),p=u===0?f[0]:f[1];return p?(l.set(p.getKey(),0,"text"),c.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[i]}if(q(i)&&(u===i.getTextContentSize()?e.shift():u!==0&&([,i]=i.splitText(u),e[0]=i,l.set(i.getKey(),0,"text"))),q(r)){const f=r.getTextContent().length;d===0?e.pop():d!==f&&([r]=r.splitText(d),e[e.length-1]=r,c.set(r.getKey(),r.getTextContentSize(),"text"))}return e}modify(e,n,i){if(o0(this,e,n,i))return;const r=e==="move",o=Ee(),s=At(Nt(o));if(!s)return;const a=o._blockCursorElement,l=o._rootElement,c=this.focus.getNode();if(l===null||a===null||!D(c)||c.isInline()||c.canBeEmpty()||mf(a,o,l),this.dirty){const u=qr(o,this.anchor.key),d=qr(o,this.focus.key);let f=u,p=d;if(this.anchor.type==="text"){const h=this.anchor.getNode();f=q(h)?Hr(h,u,o):null}if(this.focus.type==="text"){const h=this.focus.getNode();p=q(h)?Hr(h,d,o):null}f&&p&&e0(s,f,this.anchor.offset,p,this.focus.offset)}if((function(u,d,f,p){u.modify(d,f,p)})(s,e,n?"backward":"forward",i),s.rangeCount>0){const u=s.getRangeAt(0),d=this.anchor.getNode(),f=Qe(d)?d:OD(d);if(this.applyDOMRange(u),this.dirty=!0,!r){const p=this.getNodes(),h=[];let m=!1;for(let g=0;g<p.length;g++){const y=p[g];df(y,f)?h.push(y):m=!0}if(m&&h.length>0)if(n){const g=h[0];D(g)?g.selectStart():g.getParentOrThrow().selectStart()}else{const g=h[h.length-1];D(g)?g.selectEnd():g.getParentOrThrow().selectEnd()}s.anchorNode===u.startContainer&&s.anchorOffset===u.startOffset||(function(g){const y=g.focus,x=g.anchor,b=x.key,w=x.offset,_=x.type;x.set(y.key,y.offset,y.type,!0),y.set(b,w,_,!0)})(this)}}i==="lineboundary"&&o0(this,e,n,i,"decorators")}forwardDeletion(e,n,i){if(!i&&(e.type==="element"&&D(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const r=n.getParent(),o=n.getNextSibling()||(r===null?null:r.getNextSibling());if(D(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const i=this.anchor;let r=i.getNode();if(this.forwardDeletion(i,r,e))return;const o=bf(nn(i,e?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(Pt(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(D(o.anchor.origin)&&o.anchor.origin.isEmpty()){const c=at(l);vl(this,In(c,c)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(vn(l)){if(D(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(me(l.origin)){if(!l.origin.isIsolated())if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&D(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const c=Kd();c.add(l.origin.getKey()),pt(c)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:c}=a;return l.origin.isEmpty()&&!c.isEmpty()&&l.origin.getParent()===c.getParent()?void l.origin.remove(!0):(vl(this,In(!l.origin.isEmpty()&&c.isEmpty()?rn(je(c,l.direction)):o.anchor,l)),this.removeText())}}const s=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&i.offset===0&&Kx(this,i.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(r=i.type==="text"?i.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,c=a.getTextContentSize();if(a.is(r)||e&&l!==c||!e&&l!==0)return void Ux(a,e,l)}else if(r!==null&&r.isSegmented()){const l=i.offset,c=r.getTextContentSize();if(r.is(a)||e&&l!==0||!e&&l!==c)return void Ux(r,e,l)}(function(l,c){const u=l.anchor,d=l.focus,f=u.getNode(),p=d.getNode();if(f===p&&u.type==="text"&&d.type==="text"){const h=u.offset,m=d.offset,g=h<m,y=g?h:m,x=g?m:h,b=x-1;y!==b&&(function(w){return!(N0(w)||mD(w))})(f.getTextContent().slice(y,x))&&(c?d.set(d.key,b,d.type):u.set(u.key,b,u.type))}})(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const i=this.anchor.getNode();i.isEmpty()&&Qe(i.getParent())&&i.getPreviousSibling()===null&&Kx(this,i)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,i=n.getNode();if(this.forwardDeletion(n,i,e))return;this.modify("extend",e,"word")}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){const e=this._cachedIsBackward;if(e!==null)return e;const n=this.focus.isBefore(this.anchor);return zr()||(this._cachedIsBackward=n),n}getStartEndPoints(){return[this.anchor,this.focus]}}function Xe(t){return t instanceof Za}function Wx(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function Wd(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,i]=e;return n.type==="element"&&i.type==="element"&&n.key===i.key&&n.offset===i.offset?[0,0]:[Wx(n),Wx(i)]}function Kx(t,e){for(let n=e;n;n=n.getParent()){if(D(n)){if(n.collapseAtStart(t))return!0;if(st(n))break}if(n.getPreviousSibling())break}return!1}const mD=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function Ux(t,e,n){const i=t,r=i.getTextContent().split(/(?=\s)/g),o=r.length;let s=0,a=0;for(let c=0;c<o;c++){const u=c===o-1;if(a=s,s+=r[c].length,e&&s===n||s>n||u){r.splice(c,1),u&&(a=void 0);break}}const l=r.join("").trim();l===""?i.remove():(i.setTextContent(l),i.select(a,a))}function qx(t,e,n,i){let r,o=e,s=!1;if(he(t)){let a=!1;const l=t.childNodes,c=l.length,u=i._blockCursorElement;o===c&&c>0&&(a=!0,o=c-1),ys(t,i)!==void 0||t===i.getRootElement()||tf(t)||(s=!0);let d=l[o],f=!1;if(d===u)d=l[o+1],f=!0;else if(u!==null){const p=u.parentNode;t===p&&e>Array.prototype.indexOf.call(p.children,u)&&o--}if(r=Kr(d),q(r))o=xn(r,a?"next":"previous");else{let p=Kr(t);if(p===null)return null;if(D(p)){const h=i.getElementByKey(p.getKey());h===null&&L(214),[p,o]=On(p,h,i).resolveChildIndex(p,h,t,e),D(p)||L(215),a&&o>=p.getChildrenSize()&&(o=Math.max(0,p.getChildrenSize()-1));let g=p.getChildAtIndex(o);if(D(g)&&(function(y,x,b){const w=y.getParent();return b===null||w===null||!w.canBeEmpty()||w!==b.getNode()})(g,0,n)){const y=a?g.getLastDescendant():g.getFirstDescendant();y===null?p=g:(g=y,p=D(g)?g:g.getParentOrThrow()),o=0}q(g)?(r=g,p=null,o=xn(g,a?"next":"previous")):g!==p&&a&&!f&&(D(p)||L(216),o=Math.min(p.getChildrenSize(),o+1))}else{const h=p.getIndexWithinParent(),m=i.getElementByKey(p.getKey());let g="after";if(m!==null&&Kr(t)===p){const y=On(p,m,i);y.element!==m?g=y.resolveLeafPosition(m,t,e):e===0&&me(p)&&(g="before")}o=g==="before"?h:h+1,p=p.getParentOrThrow()}if(D(p))return[mn(p.__key,o,"element"),s]}}else r=Kr(t);return q(r)?[mn(r.__key,xn(r,o,"clamp"),"text"),s]:null}function Hx(t,e,n){const i=t.offset,r=t.getNode();if(i===0){const o=r.getPreviousSibling(),s=r.getParent();if(e){if((n||!e)&&o===null&&D(s)&&s.isInline()){const a=s.getPreviousSibling();q(a)&&t.set(a.__key,a.getTextContent().length,"text")}}else D(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):q(o)&&t.set(o.__key,o.getTextContent().length,"text")}else if(i===r.getTextContent().length){const o=r.getNextSibling(),s=r.getParent();if(e&&D(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&o===null&&D(s)&&s.isInline()&&!s.canInsertTextAfter()){const a=s.getNextSibling();q(a)&&t.set(a.__key,0,"text")}}}function Yx(t,e,n){if(t.type==="text"&&e.type==="text"){const i=t.isBefore(e),r=t.is(e);Hx(t,i,r),Hx(e,!i,r),r&&e.set(t.key,t.offset,t.type)}}function Gx(t,e,n,i,r,o){if(t===null||n===null||!gs(r,t,n))return null;const s=qx(t,e,R(o)?o.anchor:null,r);if(s===null)return null;const a=qx(n,i,R(o)?o.focus:null,r);if(a===null)return null;const[l,c]=s,[u,d]=a;if(l.type==="element"&&u.type==="element"){const f=Kr(t),p=Kr(n);if(me(f)&&me(p))return null}return Yx(l,u),[l,u,c||d]}function ds(t){return D(t)&&!t.isInline()}function Xx(t,e,n,i,r,o){const s=ci(),a=new Vi(mn(t,e,r),mn(n,i,o),0,"");return a.dirty=!0,s._selection=a,a}function Jx(){const t=mn("root",0,"element"),e=mn("root",0,"element");return new Vi(t,e,0,"")}function Kd(){return new Za(new Set)}function Ud(t,e,n,i){const r=n._window;if(r===null)return null;const o=i||r.event,s=o?o.type:void 0,a=s==="selectionchange",l=!gd&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let c,u,d,f;if(R(t)&&!l)return t.clone();if(e===null)return null;if(c=e.anchorNode,u=e.focusNode,d=e.anchorOffset,f=e.focusOffset,(a||s===void 0)&&R(t)&&!gs(n,c,u))return t.clone();const p=Gx(c,d,u,f,n,t);if(p===null)return null;const[h,m,g]=p;let y=0,x="";if(R(t)){const w=t.anchor;if(h.key===w.key)y=t.format,x=t.style;else{const _=h.getNode();q(_)?(y=_.getFormat(),x=_.getStyle()):D(_)&&(y=_.getTextFormat(),x=_.getTextStyle())}}const b=new Vi(h,m,y,x);return g&&(b.dirty=!0),b}function Z(){return ci()._selection}function li(){return Ee()._editorState._selection}function Wi(t,e,n,i=1){const r=t.anchor,o=t.focus,s=r.getNode(),a=o.getNode();if(!e.is(s)&&!e.is(a))return;const l=e.__key;if(t.isCollapsed()){const c=r.offset;if(n<=c&&i>0||n<c&&i<0){const u=Math.max(0,c+i);r.set(l,u,"element"),o.set(l,u,"element"),Zx(t)}}else{const c=t.isBackward(),u=c?o:r,d=u.getNode(),f=c?r:o,p=f.getNode();if(e.is(d)){const h=u.offset;(n<=h&&i>0||n<h&&i<0)&&u.set(l,Math.max(0,h+i),"element")}if(e.is(p)){const h=f.offset;(n<=h&&i>0||n<h&&i<0)&&f.set(l,Math.max(0,h+i),"element")}}Zx(t)}function Zx(t){const e=t.anchor,n=e.offset,i=t.focus,r=i.offset,o=e.getNode(),s=i.getNode();if(t.isCollapsed()){if(!D(o))return;const a=o.getChildrenSize(),l=n>=a,c=l?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(q(c)){let u=0;l&&(u=c.getTextContentSize()),e.set(c.__key,u,"text"),i.set(c.__key,u,"text")}return}if(D(o)){const a=o.getChildrenSize(),l=n>=a,c=l?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(q(c)){let u=0;l&&(u=c.getTextContentSize()),e.set(c.__key,u,"text")}}if(D(s)){const a=s.getChildrenSize(),l=r>=a,c=l?s.getChildAtIndex(a-1):s.getChildAtIndex(r);if(q(c)){let u=0;l&&(u=c.getTextContentSize()),i.set(c.__key,u,"text")}}}function Qa(t,e,n,i,r){let o=null,s=0,a=null;i!==null?(o=i.__key,q(i)?(s=i.getTextContentSize(),a="text"):D(i)&&(s=i.getChildrenSize(),a="element")):r!==null&&(o=r.__key,q(r)?a="text":D(r)&&(a="element")),o!==null&&a!==null?t.set(o,s,a):(s=e.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),t.set(n.__key,s,"element"))}function Qx(t,e,n,i,r){t.type==="text"?t.set(n,t.offset+(e?0:r),"text"):t.offset>i.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function e0(t,e,n,i,r){try{t.setBaseAndExtent(e,n,i,r)}catch{}}function t0(t,e,n){const i=qr(t,e.getKey());if(D(e)){const r=On(e,i,t);return[r.element,n+r.getFirstChildOffset()]}return[i,n]}function n0(t,e,n,i,r,o){const s=document.activeElement;if(r.has(oD)&&s!==o||s!==null&&nf(s))return;if(!R(e))return void(t!==null&&gs(n,i.anchorNode,i.focusNode)&&i.removeAllRanges());const a=e.anchor,l=e.focus,c=a.getNode(),u=l.getNode(),[d,f]=t0(n,c,a.offset),[p,h]=t0(n,u,l.offset),m=e.format,g=e.style,y=e.isCollapsed();let x=d,b=p,w=!1;var _,C,E,S,k;if(a.type==="text"?(x=q(c)?Hr(c,d,n):null,w=c.getFormat()!==m||c.getStyle()!==g):R(t)&&t.anchor.type==="text"&&(w=!0),l.type==="text"&&(b=q(u)?Hr(u,p,n):null),x!==null&&b!==null&&(y&&(t===null||w||R(t)&&(t.format!==m||t.style!==g))&&(_=m,C=g,E=f,S=a.key,k=performance.now(),xx=[_,C,E,S,k]),i.type==="Range"&&y||i.anchorOffset!==f||i.focusOffset!==h||i.anchorNode!==x||i.focusNode!==b||(s!==null&&o.contains(s)||r.has(Ya)||o.focus({preventScroll:!0}),a.type==="element"))){if(e0(i,x,f,b,h),!ti||!e.isCollapsed()||o===null||r.has(Ya)||document.activeElement!==null&&o.contains(document.activeElement)||o.focus({preventScroll:!0}),!r.has(Mx)&&e.isCollapsed()&&o!==null&&o===document.activeElement){const A=R(e)&&e.anchor.type==="element"?x.childNodes[f]||null:i.rangeCount>0?i.getRangeAt(0):null;if(A!==null){let P;if(A instanceof Text){const X=document.createRange();X.selectNode(A),P=X.getBoundingClientRect()}else P=A.getBoundingClientRect();(function(X,W,I){const Y=R0(I),V=ff(Y);if(Y===null||V===null)return;let{top:z,bottom:$}=W,G=0,T=0,M=I;for(;M!==null;){const F=M===Y.body;if(F){const J=V.visualViewport;if(J){const U=J.offsetTop;G=U,T=U+J.height}else G=0,T=Nt(X).innerHeight;const K=V.getComputedStyle(Y.documentElement),ee=parseFloat(K.scrollPaddingTop),j=parseFloat(K.scrollPaddingBottom);isFinite(ee)&&(G+=ee),isFinite(j)&&(T-=j)}else{const J=M.getBoundingClientRect();G=J.top,T=J.bottom}let B=0;if(z<G?B=-(G-z):$>T&&(B=$-T),B!==0)if(F)V.scrollBy(0,B);else{const J=M.scrollTop;M.scrollTop+=B;const K=M.scrollTop-J;z-=K,$-=K}if(F)break;M=vs(M)}})(n,P,o)}}Md=!0}}function gD(t){let e=Z()||li();e===null&&(e=Be().selectEnd()),e.insertNodes(t)}function i0(t,e){for(const n of t.split(/(\r?\n|\t)/))n===`
|
|
233
|
-
`||n===`\r
|
|
234
|
-
`?e.linebreak():n===" "?e.tab():n!==""&&e.text(n)}function r0(t){const e=[];return i0(t,{linebreak:()=>e.push(oi()),tab:()=>e.push(us()),text:n=>e.push(He(n))}),e}function qd(t){let e=t;t.isCollapsed()||e.removeText();const n=Z();R(n)&&(e=n),R(e)||L(161);const i=e.anchor;let r=i.getNode(),o=i.offset;for(;!zt(r);){const s=r;if([r,o]=yD(r,o),s.is(r))break}return o}function yD(t,e){const n=t.getParent();if(!n){const r=De();return Be().append(r),r.select(),[Be(),0]}if(q(t)){const r=t.splitText(e);if(r.length===0)return[n,t.getIndexWithinParent()];const o=e===0?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!D(t)||e===0)return[n,t.getIndexWithinParent()];const i=t.getChildAtIndex(e);if(i){const r=new Vi(mn(t.__key,e,"element"),mn(t.__key,e,"element"),0,""),o=t.insertNewAfter(r);o&&o.append(i,...i.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function o0(t,e,n,i,r="decorators-and-blocks"){if(e==="move"&&i==="character"&&!t.isCollapsed()){const[u,d]=n===t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];return d.set(u.key,u.offset,u.type),!0}const o=nn(t.focus,n?"previous":"next"),s=i==="lineboundary",a=e==="move";let l=o,c=r==="decorators-and-blocks";if(!H0(l)){for(const u of l){c=!1;const{origin:d}=u;if(!me(d)||d.isIsolated()||(l=u,!s||!d.isInline()))break}if(c)for(const u of bf(o).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(Pt(u))u.origin.isInline()||(l=u);else{if(D(u.origin))continue;me(u.origin)&&!u.origin.isInline()&&(l=u)}break}}if(l===o)return!1;if(a&&!s&&me(l.origin)&&l.origin.isKeyboardSelectable()){const u=Kd();return u.add(l.origin.getKey()),pt(u),!0}return l=at(l),a&&fi(t.anchor,l),fi(t.focus,l),c||!s}let Je=null,Ze=null,St=!1,Hd=!1,el=0;const s0={characterData:!0,childList:!0,subtree:!0};function zr(){return St||Je!==null&&Je._readOnly}function rt(){St&&L(13)}function a0(){el>99&&L(14)}function ci(){return Je===null&&L(195,l0()),Je}function Ee(){return Ze===null&&L(337,l0()),Ze}function l0(){let t=0;const e=new Set,n=Wr.version;if(typeof window<"u")for(const r of document.querySelectorAll("[contenteditable]")){const o=il(r);if(rf(o))t++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),e.add(s)}}let i=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(i+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),i}function vD(){return Ze}function c0(t,e,n){const i=e.__type,r=_0(t,i);let o=n.get(i);o===void 0&&(o=Array.from(r.transforms),n.set(i,o));const s=o.length;for(let a=0;a<s&&(o[a](e),e.isAttached());a++);}function u0(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function d0(t,e){if(!e)return;const n=t._updateTags;let i=e;Array.isArray(e)||(i=[e]);for(const r of i)n.add(r)}function xD(t){return Yd(t,Ee()._nodes)}function Yd(t,e){const n=t.type,i=e.get(n);i===void 0&&L(17,n);const r=i.klass;t.type!==r.getType()&&L(18,r.name);const o=r.importJSON(t),s=t.children;if(D(o)&&Array.isArray(s))for(let a=0;a<s.length;a++){const l=Yd(s[a],e);o.append(l)}return o}function f0(t,e,n){const i=Je,r=St,o=Ze;Je=e,St=!0,Ze=t;try{return n()}finally{Je=i,St=r,Ze=o}}function An(t,e){const n=t._pendingEditorState,i=t._rootElement,r=t._headless||i===null;if(n===null)return void(t._deferred.length>0&&h0(t,t._deferred));const o=t._editorState,s=o._selection,a=n._selection,l=t._dirtyType!==0,c=Je,u=St,d=Ze,f=t._updating,p=t._observer;let h=null;if(t._pendingEditorState=null,t._editorState=n,!r&&l&&p!==null){Ze=t,Je=n,St=!1,t._updating=!0;try{const C=t._dirtyType,E=t._dirtyElements,S=t._dirtyLeaves;p.disconnect(),h=VP(o,n,t,C,E,S)}catch(C){if(C instanceof Error&&t._onError(C),Hd)throw C;return x0(t,null,i,n),Pv(t),t._dirtyType=2,Hd=!0,An(t,o),void(Hd=!1)}finally{p.observe(i,s0),t._updating=f,Je=c,St=u,Ze=d}}n._readOnly||(n._readOnly=!0);const m=t._dirtyLeaves,g=t._dirtyElements,y=t._normalizedNodes,x=t._updateTags,b=t._deferred;l&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set),(function(C,E){const S=C._decorators;let k=C._pendingDecorators||S;const A=E._nodeMap;let P;for(P in k)A.has(P)||(k===S&&(k=k0(C)),delete k[P])})(t,n);const w=r?null:At(Nt(t));if(t._editable&&w!==null&&(l||a===null||a.dirty||!a.is(s))&&i!==null&&!x.has(sD)){Ze=t,Je=n;try{if(p!==null&&p.disconnect(),l||a===null||a.dirty){const C=t._blockCursorElement;C!==null&&mf(C,t,i),n0(s,a,t,w,x,i)}(function(C,E,S){let k=C._blockCursorElement;if(R(S)&&S.isCollapsed()&&S.anchor.type==="element"&&E.contains(document.activeElement)){const A=S.anchor,P=A.getNode(),X=A.offset;let W=!1,I=null;if(X===P.getChildrenSize())hf(P.getChildAtIndex(X-1))&&(W=!0);else{const Y=P.getChildAtIndex(X);if(Y!==null&&hf(Y)){const V=Y.getPreviousSibling();(V===null||hf(V))&&(W=!0,I=C.getElementByKey(Y.__key))}}if(W){const Y=On(P,C.getElementByKey(P.__key),C).element;return k===null&&(C._blockCursorElement=k=(function(V){const z=V.theme,$=document.createElement("div");$.contentEditable="false",$.setAttribute("data-lexical-cursor","true");let G=z.blockCursor;if(G!==void 0){if(typeof G=="string"){const T=Fn(G);G=z.blockCursor=T}G!==void 0&&$.classList.add(...G)}return $})(C._config)),E.style.caretColor="transparent",void(I===null?Y.appendChild(k):Y.insertBefore(k,I))}}k!==null&&mf(k,C,E)})(t,i,a)}finally{p!==null&&p.observe(i,s0),Ze=d,Je=c}}h!==null&&(function(C,E,S,k,A){const P=Array.from(C._listeners.mutation),X=P.length;for(let W=0;W<X;W++){const[I,Y]=P[W];for(const V of Y){const z=E.get(V);z!==void 0&&I(z,{dirtyLeaves:k,prevEditorState:A,updateTags:S})}}})(t,h,x,m,o),R(a)||a===null||s!==null&&s.is(a)||t.dispatchCommand(Ed,void 0);const _=t._pendingDecorators;_!==null&&(t._decorators=_,t._pendingDecorators=null,fs("decorator",t,!0,_)),(function(C,E,S){const k=T0(E),A=T0(S);k!==A&&fs("textcontent",C,!0,A)})(t,e||o,n),fs("update",t,!0,{dirtyElements:g,dirtyLeaves:m,editorState:n,mutatedNodes:h,normalizedNodes:y,prevEditorState:e||o,tags:x}),h0(t,b),(function(C){const E=C._updates;if(E.length===0)return void(C._cascadeCount=0);if(C._cascadeCount++>99){C._updates=[],C._cascadeCount=0;try{L(343)}catch(k){k instanceof Error&&C._onError(k)}return}const S=E.shift();if(S){const[k,A]=S;tl(C,k,A)}})(t)}function fs(t,e,n,...i){const r=e._updating;e._updating=n;try{const o=e._listeners[t],s=Array.from(o);for(const[a,l]of s){l&&l();const c=a(...i);o.has(a)?o.set(a,c):c&&c()}}finally{e._updating=r}}function p0(t,e,n,i){const r=sf(t);let o;for(let s=4;s>=0;s--)for(let a=0;a<r.length;a++){const l=r[a];if(a>0&&l._updating){o=l;break}const c=l._commands.get(e);if(c!==void 0){const u=c[s];if(u.size>0){let d=!1;if(gn(l,()=>{for(const f of u)if(f(n,i))return void(d=!0)}),d)return d}}}return o&&o.update(()=>{p0(o,e,n,i)}),!1}function h0(t,e){if(t._deferred=[],e.length!==0){const n=t._updating;t._updating=!0;try{for(let i=0;i<e.length;i++)e[i]()}finally{t._updating=n}}}function m0(t,e){const n=t._updates;let i=e||!1;for(;n.length!==0;){const r=n.shift();if(r){const[o,s]=r,a=t._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(i=!0),s.discrete&&(a===null&&L(191),a._flushSync=!0),l&&t._deferred.push(l),d0(t,s.tag)),a==null?tl(t,o,s):o()}}return i}function tl(t,e,n){const i=t._updateTags;let r,o=!1,s=!1;n!==void 0&&(r=n.onUpdate,d0(t,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),r&&t._deferred.push(r);const a=t._editorState;let l=t._pendingEditorState,c=!1;(l===null||l._readOnly)&&(l=t._pendingEditorState=y0(l||a),c=!0),l._flushSync=s;const u=Je,d=St,f=Ze,p=t._updating;Je=l,St=!1,t._updating=!0,Ze=t;const h=t._headless||t.getRootElement()===null;Qd(null);try{c&&(h?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(x,b){const w=x.getEditorState()._selection,_=At(Nt(x));return R(w)||w==null?Ud(w,_,x,b):w.clone()})(t,n&&n.event||null));const g=t._compositionKey;e(),o=m0(t,o),(function(x,b){const w=b.getEditorState()._selection,_=x._selection;if(R(_)){const C=_.anchor,E=_.focus;let S;if(C.type==="text"&&(S=C.getNode(),S.selectionTransform(w,_)),E.type==="text"){const k=E.getNode();S!==k&&k.selectionTransform(w,_)}}})(l,t),t._dirtyType!==0&&(o?(function(x,b){const w=b._dirtyLeaves,_=x._nodeMap;for(const C of w){const E=_.get(C);q(E)&&E.isAttached()&&E.isSimpleText()&&!E.isUnmergeable()&&$v(E)}})(l,t):(function(x,b){const w=b._dirtyLeaves,_=b._dirtyElements,C=x._nodeMap,E=ui(),S=new Map;let k=w,A=k.size,P=_,X=P.size;for(;A>0||X>0;){if(A>0){b._dirtyLeaves=new Set;for(const W of k){const I=C.get(W);q(I)&&I.isAttached()&&I.isSimpleText()&&!I.isUnmergeable()&&$v(I),I!==void 0&&u0(I,E)&&c0(b,I,S),w.add(W)}if(k=b._dirtyLeaves,A=k.size,A>0){el++;continue}}b._dirtyLeaves=new Set,b._dirtyElements=new Map,P.delete("root")&&P.set("root",!0);for(const W of P){const I=W[0],Y=W[1];if(_.set(I,Y),!Y)continue;const V=C.get(I);V!==void 0&&u0(V,E)&&c0(b,V,S)}k=b._dirtyLeaves,A=k.size,P=b._dirtyElements,X=P.size,el++}b._dirtyLeaves=w,b._dirtyElements=_})(l,t),m0(t),(function(x,b,w,_){const C=x._nodeMap,E=b._nodeMap,S=[];for(const[k]of _){const A=E.get(k);A!==void 0&&(A.isAttached()||(D(A)&&Ev(A,k,C,E,S,_),C.has(k)||_.delete(k),S.push(k)))}for(const k of S)E.delete(k);for(const k of w){const A=E.get(k);A===void 0||A.isAttached()||(C.has(k)||w.delete(k),E.delete(k))}})(a,l,t._dirtyLeaves,t._dirtyElements)),g!==t._compositionKey&&(l._flushSync=!0);const y=l._selection;if(R(y)){const x=l._nodeMap,b=y.anchor.key,w=y.focus.key;x.get(b)!==void 0&&x.get(w)!==void 0||L(19)}else Xe(y)&&y._nodes.size===0&&(l._selection=null)}catch(g){return g instanceof Error&&t._onError(g),t._pendingEditorState=a,t._dirtyType=2,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void An(t)}finally{Je=u,St=d,Ze=f,t._updating=p,el=0}t._dirtyType!==0||t._deferred.length>0||(function(g,y){const x=y.getEditorState()._selection,b=g._selection;if(b!==null){if(b.dirty||!b.is(x))return!0}else if(x!==null)return!0;return!1})(l,t)?l._flushSync?(l._flushSync=!1,An(t)):c&&ED(()=>{An(t)}):(l._flushSync=!1,c&&(i.clear(),t._deferred=[],t._pendingEditorState=null))}function gn(t,e,n){Ze===t&&n===void 0?e():tl(t,e,n)}class Ct extends hn{__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(){const e=this.getFormat();return TP[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=Ee()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(q(n)&&e.push(n),D(n)){const i=n.getAllTextNodes();e.push(...i)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;D(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;D(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),i=n.length;if(e>=i){const o=n[i-1];return D(o)&&o.getLastDescendant()||o||null}const r=n[e];return D(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:Ke(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&L(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:Ke(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&L(96,this.__key),e}getChildAtIndex(e){const n=this.getChildrenSize();let i,r;if(e<n/2){for(i=this.getFirstChild(),r=0;i!==null&&r<=e;){if(r===e)return i;i=i.getNextSibling(),r++}return null}for(i=this.getLastChild(),r=n-1;i!==null&&r>=e;){if(r===e)return i;i=i.getPreviousSibling(),r--}return null}getTextContent(){let e="";const n=this.getChildren(),i=n.length;for(let r=0;r<i;r++){const o=n[r];e+=o.getTextContent(),D(o)&&r!==i-1&&!o.isInline()&&(e+=Mi)}return e}getTextContentSize(){let e=0;const n=this.getChildren(),i=n.length;for(let r=0;r<i;r++){const o=n[r];e+=o.getTextContentSize(),D(o)&&r!==i-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const n=Oa[e];return(this.getFormat()&n)!==0}return!1}hasTextFormat(e){const n=Ii[e];return(this.getTextFormat()&n)!==0}getFormatFlags(e,n){return ol(this.getLatest().__textFormat,e,n)}getTextStyle(){return this.getLatest().__textStyle}select(e,n){rt();const i=Z();let r=e,o=n;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){const l=this.getFirstChild();if(q(l)||D(l))return l.select(0,0)}else if(!(e!==void 0&&e!==s||n!==void 0&&n!==s)){const l=this.getLastChild();if(q(l)||D(l))return l.select()}}r===void 0&&(r=s),o===void 0&&(o=s);const a=this.__key;return R(i)?(i.anchor.set(a,r,"element"),i.focus.set(a,o,"element"),i.dirty=!0,i):Xx(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(n=>n.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""&&Oa[e]||0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}setTextStyle(e){const n=this.getWritable();return n.__textStyle=e,n}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,i){Ha(this)&&L(324,this.__key,this.__type);const r=this.getChildrenSize(),o=this.getWritable();e+n<=r||L(226,String(e),String(n),String(r));const s=o.__key,a=[],l=[],c=this.getChildAtIndex(e+n);let u=null,d=r-n+i.length;if(e!==0)if(e===r)u=this.getLastChild();else{const p=this.getChildAtIndex(e);p!==null&&(u=p.getPreviousSibling())}if(n>0){let p=u===null?this.getFirstChild():u.getNextSibling();for(let h=0;h<n;h++){p===null&&L(100);const m=p.getNextSibling(),g=p.__key;Ui(p.getWritable()),l.push(g),p=m}}let f=u;for(const p of i){f!==null&&p.is(f)&&(u=f=f.getPreviousSibling());const h=p.getWritable();h.__parent===s&&d--,Ui(h);const m=p.__key;if(f===null)o.__first=m,h.__prev=null;else{const g=f.getWritable();g.__next=m,h.__prev=g.__key}p.__key===s&&L(76),h.__parent=s,a.push(m),f=p}if(e+n===r)f!==null&&(f.getWritable().__next=null,o.__last=f.__key);else if(c!==null){const p=c.getWritable();if(f!==null){const h=f.getWritable();p.__prev=f.__key,h.__next=c.__key}else p.__prev=null}if(o.__size=d,l.length){const p=Z();if(R(p)){const h=new Set(l),m=new Set(a),{anchor:g,focus:y}=p;g0(g,h,m)&&Qa(g,g.getNode(),this,u,c),g0(y,h,m)&&Qa(y,y.getNode(),this,u,c),d!==0||this.canBeEmpty()||st(this)||this.remove()}}return o}getDOMSlot(e){return new Sv(e)}exportDOM(e){const{element:n}=super.exportDOM(e);if(he(n)){const i=this.getIndent();i>0&&(n.style.paddingInlineStart=40*i+"px",n.setAttribute("data-lexical-indent",String(i)));const r=this.getDirection();r&&(n.dir=r)}return{element:n}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),i=this.getTextStyle();return n===0&&i===""||st(this)||this.getChildren().some(q)||(n!==0&&(e.textFormat=n),i!==""&&(e.textStyle=i)),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,n){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,n,i){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,n){const i=On(this,e,n);let r=i.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=n.getElementByKey(o.getKey());s!==null&&(r==null?(i.insertChild(s),r=s):r!==s&&i.replaceChild(s,r),r=r.nextSibling)}}}function D(t){return t instanceof Ct}function g0(t,e,n){let i=t.getNode();for(;i;){const r=i.__key;if(e.has(r)&&!n.has(r))return!0;i=i.getParent()}return!1}class Gd extends hn{decorate(e,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function me(t){return t instanceof Gd}class Br extends Ct{__cachedText;static getType(){return"root"}static clone(){return new Br}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){L(51)}getTextContent(){const e=this.__cachedText;return e===null||!zr()&&Ee()._dirtyType!==0?super.getTextContent():e}remove(){L(52)}replace(e){L(53)}insertBefore(e){L(54)}insertAfter(e){L(55)}updateDOM(e,n){return!1}splice(e,n,i){for(const r of i)D(r)||me(r)||L(282);return super.splice(e,n,i)}static importJSON(e){return Be().updateFromJSON(e)}collapseAtStart(){return!0}}function Qe(t){return t instanceof Br}function y0(t){return new ps(Tv(t._nodeMap))}function Xd(){return new ps(new Map([["root",new Br]]))}function v0(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&L(130,n.name),D(t)){const i=e.children;Array.isArray(i)||L(59,n.name);const r=t.getChildren();for(let o=0;o<r.length;o++){const s=v0(r[o]);i.push(s)}}return e}function bD(t){return t instanceof ps}class ps{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,n){this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,n){return f0(n&&n.editor||null,this,e)}clone(e){const n=new ps(this._nodeMap,e===void 0?this._selection:e);return n._readOnly=!0,n}toJSON(){return f0(null,this,()=>({root:v0(Be())}))}}class Jd extends Ct{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Vr extends Ct{static getType(){return"paragraph"}static clone(e){return new Vr(e.__key)}createDOM(e){const n=document.createElement("p"),i=Ur(e.theme,"paragraph");return i!==void 0&&n.classList.add(...i),n}updateDOM(e,n,i){return!1}static importDOM(){return{p:e=>({conversion:_D,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(he(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();i&&(n.style.textAlign=i)}return{element:n}}static importJSON(e){return De().updateFromJSON(e)}exportJSON(){const e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){const n=this.getChildren().find(q);n?(e.textFormat=n.getFormat(),e.textStyle=n.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,n){const i=De();i.setTextFormat(e.format),i.setTextStyle(e.style);const r=this.getDirection();return i.setDirection(r),i.setFormat(this.getFormatType()),i.setStyle(this.getStyle()),this.insertAfter(i,n),i}collapseAtStart(){const e=this.getChildren();if(e.length===0||q(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 _D(t){const e=De();if(Mn(e,t),Yr(t,e),e.getFormatType()===""){const n=t.getAttribute("align");n&&n&&n in Oa&&e.setFormat(n)}return tn(e,t),{node:e}}function De(){return yn(new Vr)}function hs(t){return t instanceof Vr}const fe=0,en=1,wD=4,SD=-4;function x0(t,e,n,i,r){const o=t._keyToDOMMap;o.clear(),t._editorState=Xd(),t._pendingEditorState=i,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null;const s=t._observer;s!==null&&(s.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",o.set("root",n))}function CD(t){const e=new Set,n=new Set;let i=t;for(;i;){const{ownNodeConfig:r}=dl(i),o=i.transform;if(!n.has(o)){n.add(o);const s=i.transform();s&&e.add(s)}if(r){const s=r.$transform;s&&e.add(s),i=r.extends}else{const s=Object.getPrototypeOf(i);i=s.prototype instanceof hn&&s!==hn?s:void 0}}return e}const nl={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,i)=>{},$exportDOM:(t,e)=>{const n=ef(e,t.getType());return n&&n.exportDOM!==void 0?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,i,r)=>D(t)&&t.extractWithChild(e,n,i),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$shouldExclude:(t,e,n)=>D(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,i)=>t.updateDOM(e,n,i._config)};function b0(t){const e=t||{},n=vD(),i=e.theme||{},r=t===void 0?n:e.parentEditor||null,o=e.disableEvents||!1,s=Xd(),a=e.namespace||(r!==null?r._config.namespace:A0()),l=e.editorState,c=[Br,ai,Lr,$r,Vr,Jd,...e.nodes||[]],{onError:u,html:d}=e,f=e.editable===void 0||e.editable;let p;if(t===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let m=0;m<c.length;m++){let g=c[m],y=null,x=null;if(typeof g!="function"){const _=g;g=_.replace,y=_.with,x=_.withKlass||null}dl(g);const b=g.getType(),w=CD(g);p.set(b,{exportDOM:d&&d.export?d.export.get(g):void 0,klass:g,replace:y,replaceWithKlass:x,sharedNodeState:jP(c[m]),transforms:w})}}const h=new Wr(s,r,p,{disableEvents:o,dom:{...nl,...t&&t.dom},namespace:a,theme:i},u||console.error,(function(m,g){const y=new Map,x=new Set,b=w=>{Object.keys(w).forEach(_=>{let C=y.get(_);C===void 0&&(C=[],y.set(_,C)),C.push(w[_])})};return m.forEach(w=>{const _=w.klass.importDOM;if(_==null||x.has(_))return;x.add(_);const C=_.call(w.klass);C!==null&&b(C)}),g&&b(g),y})(p,d?d.import:void 0),f,t);return l!==void 0&&(h._pendingEditorState=l,h._dirtyType=2),(function(m){m.registerCommand(Gv,JP,fe),m.registerCommand(Xv,ZP,fe),m.registerCommand(Jv,QP,fe),m.registerCommand(Zv,eD,fe),m.registerCommand(Qv,tD,fe)})(h),h}function kD(t,e){const n=t.get(e);t.delete(e),n&&n()}function ms(t,e,n){return t.set(e,n),kD.bind(null,t,e)}class Wr{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,n,i,r,o,s,a,l){this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new md,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=i,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=A0(),this._onError=o,this._htmlConversions=s,this._editable=a,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return ms(this._listeners.update,e)}registerEditableListener(e){return ms(this._listeners.editable,e)}registerDecoratorListener(e){return ms(this._listeners.decorator,e)}registerTextContentListener(e){return ms(this._listeners.textcontent,e)}registerRootListener(e){const n=this._listeners.root;return lt(ms(n,e,e(this._rootElement,null)||void 0),()=>(function(i,r,o){const s=i.get(r);s&&s(),i.set(r,r(...o)||void 0)})(n,e,[null,this._rootElement]))}registerCommand(e,n,i){i===void 0&&L(35);const r=this._commands;r.has(e)||r.set(e,[new qo,new qo,new qo,new qo,new qo]);const o=r.get(e);o===void 0&&L(36,String(e));const s=(function(l){return 7&l})(i),a=o[s];return s!==i?a.addFront(n):a.addBack(n),()=>{a.delete(n),o.every(l=>l.size===0)&&r.delete(e)}}registerMutationListener(e,n,i){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let s=o.get(n);s===void 0&&(s=new Set,o.set(n,s)),s.add(r);const a=i&&i.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(n,r),()=>{s.delete(r),s.size===0&&o.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return n===void 0&&L(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const i=this._editorState,r=$0(i).get(n.getType());if(!r)return;const o=new Map;for(const s of r.keys())o.set(s,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:i,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const i=this.getRegisteredNode(e);return i.transforms.add(n),i}registerNodeTransform(e,n){const i=this.registerNodeTransformToKlass(e,n),r=[i],o=i.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,n);r.push(s)}return(function(s,a){const l=$0(s.getEditorState()),c=[];for(const u of a){const d=l.get(u);d&&c.push(d)}c.length!==0&&s.update(()=>{for(const u of c)for(const d of u.keys()){const f=Ke(d);f&&f.markDirty()}},s._pendingEditorState===null?{tag:Bi}:void 0)})(this,r.map(s=>s.klass.getType())),()=>{r.forEach(s=>s.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return re(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const i=Ur(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,x0(this,n,e,r,{preserveUpdateQueue:!0}),n!==null&&(this._config.disableEvents||nD(n),i!=null&&n.classList.remove(...i)),e!==null){const o=ff(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,Pv(this),this._updateTags.add(Bi),An(this),this._config.disableEvents||(function(a,l){const c=a.ownerDocument;Od.set(a,c);const u=Va.get(c)??0;u<1&&c.addEventListener("selectionchange",Nx),Va.set(c,u+1),a.__lexicalEditor=l;const d=Ex(a);for(let f=0;f<Pd.length;f++){const[p,h]=Pd[f],m=typeof h=="function"?g=>{Px(g)||(Ax(g),(l.isEditable()||p==="click")&&h(g,l))}:g=>{if(Px(g))return;Ax(g);const y=l.isEditable();switch(p){case"cut":return y&&re(l,Ad,g);case"copy":return re(l,za,g);case"paste":return y&&re(l,ja,g);case"dragstart":return y&&re(l,px,g);case"dragover":return y&&re(l,hx,g);case"dragend":return y&&re(l,HP,g);case"focus":return y&&re(l,gx,g);case"blur":return y&&re(l,yx,g);case"drop":return y&&re(l,fx,g)}};a.addEventListener(p,m),d.push(()=>{a.removeEventListener(p,m)})}})(e,this),i!=null&&e.classList.add(...i)}else this._window=null,this._updateTags.add(Bi),An(this);fs("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&L(38);let i=e;i._readOnly&&(i=y0(e),i._selection=e._selection?e._selection.clone():null),Av(this);const r=this._pendingEditorState,o=this._updateTags,s=n!==void 0?n.tag:null;r===null||r.isEmpty()||(s!=null&&o.add(s),An(this)),this._pendingEditorState=i,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||An(this)}parseEditorState(e,n){return(function(i,r,o){const s=Xd(),a=Je,l=St,c=Ze,u=r._dirtyElements,d=r._dirtyLeaves,f=r._cloneNotNeeded,p=r._dirtyType;r._dirtyElements=new Map,r._dirtyLeaves=new Set,r._cloneNotNeeded=new Set,r._dirtyType=0,Je=s,St=!1,Ze=r,Qd(null);try{const h=r._nodes;Yd(i.root,h),o&&o(),s._readOnly=!0}catch(h){h instanceof Error&&r._onError(h)}finally{r._dirtyElements=u,r._dirtyLeaves=d,r._cloneNotNeeded=f,r._dirtyType=p,Je=a,St=l,Ze=c}return s})(typeof e=="string"?JSON.parse(e):e,this,n)}read(e){return An(this),this.getEditorState().read(e,{editor:this})}update(e,n){(function(i,r,o){i._updating?i._updates.push([r,o]):tl(i,r,o)})(this,e,n)}focus(e,n={}){const i=this._rootElement;i!==null&&(i.setAttribute("autocapitalize","off"),gn(this,()=>{const r=Z(),o=Be();r!==null?r.dirty||pt(r.clone()):o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),ll("focus"),DD(()=>{i.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&i.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=At(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,fs("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Wr.version=AP;let Zd=null;function Qd(t){Zd=t}let TD=1;function _0(t,e){const n=ef(t,e);return n===void 0&&L(30,e),n}function ef(t,e){return t._nodes.get(e)}const ED=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function tf(t){return me(qi(t))}function nf(t){const e=document.activeElement;if(!he(e))return!1;const n=e.nodeName;return me(qi(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&il(e)==null)}function gs(t,e,n){const i=t.getRootElement();try{return i!==null&&i.contains(e)&&i.contains(n)&&e!==null&&!nf(e)&&w0(e)===t}catch{return!1}}function rf(t){return t instanceof Wr}function w0(t){let e=t;for(;e!=null;){const n=il(e);if(rf(n))return n;e=vs(e)}return null}function il(t){return t?t.__lexicalEditor:null}function Ki(t){return Bd(t)||t.isToken()}function Pn(t){return Ki(t)||t.isSegmented()}function Et(t){return Hi(t)&&t.nodeType===3}function rl(t){return Hi(t)&&t.nodeType===9}function ND(t){let e=t;for(;e!=null;){if(Et(e))return e;e=e.firstChild}return null}function ol(t,e,n){const i=Ii[e];if(n!==null&&(t&i)===(n&i))return t;let r=t^i;return e==="subscript"?r&=-65:e==="superscript"?r&=-33:e==="lowercase"?(r&=-513,r&=-1025):e==="uppercase"?(r&=-257,r&=-1025):e==="capitalize"&&(r&=-257,r&=-513),r}function S0(t){return q(t)||si(t)||me(t)}function C0(t,e){const n=(function(){const s=Zd;return Zd=null,s})();if((e=e||n&&n.__key)!=null)return void(t.__key=e);rt(),a0();const i=Ee(),r=ci(),o=""+TD++;r._nodeMap.set(o,t),D(t)?i._dirtyElements.set(o,!0):i._dirtyLeaves.add(o),i._cloneNotNeeded.add(o),i._dirtyType===0&&(i._dirtyType=1),t.__key=o}function Ui(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),i=e.getWritable(),r=t.getPreviousSibling(),o=t.getNextSibling(),s=o!==null?o.__key:null,a=r!==null?r.__key:null,l=r!==null?r.getWritable():null,c=o!==null?o.getWritable():null;r===null&&(i.__first=s),o===null&&(i.__last=a),l!==null&&(l.__next=s),c!==null&&(c.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,i.__size--}}function sl(t){a0(),Ha(t)&&L(323,t.__key,t.__type);const e=t.getLatest(),n=e.__parent,i=ci(),r=Ee(),o=i._nodeMap,s=r._dirtyElements;n!==null&&(function(l,c,u){let d=l;for(;d!==null;){if(u.has(d))return;const f=c.get(d);if(f===void 0)break;u.set(d,!1),d=f.__parent}})(n,o,s);const a=e.__key;r._dirtyType===0&&(r._dirtyType=1),D(t)?s.set(a,!0):r._dirtyLeaves.add(a)}function ot(t){rt();const e=Ee(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const i=Ke(n);i!==null&&i.getWritable()}if(t!==null){const i=Ke(t);i!==null&&i.getWritable()}}}function ui(){return zr()?null:Ee()._compositionKey}function Ke(t,e){const n=(e||ci())._nodeMap.get(t);return n===void 0?null:n}function of(t,e){const n=ys(t,Ee());return n!==void 0?Ke(n,e):null}function ys(t,e){return t[`__lexicalKey_${e._key}`]}function qi(t,e){let n=t;for(;n!=null;){const i=of(n,e);if(i!==null)return i;n=vs(n)}return null}function k0(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function T0(t){return t.read(()=>Be().getTextContent())}function Be(){return E0(ci())}function E0(t){return t._nodeMap.get("root")}function pt(t){rt();const e=ci();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function Kr(t){const e=Ee(),n=(function(i,r){let o=i;for(;o!=null;){const s=ys(o,r);if(s!==void 0)return s;o=vs(o)}return null})(t,e);return n===null?t===e.getRootElement()?Ke("root"):null:Ke(n)}function N0(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function sf(t){const e=[];for(let n=t;n!==null;n=n._parentEditor)e.push(n);return e}function A0(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function P0(t){return Et(t)?t.nodeValue:null}function af(t,e,n){const i=At(Nt(e));if(i===null)return;const r=i.anchorNode;let{anchorOffset:o,focusOffset:s}=i;if(r!==null){let a=P0(r);const l=qi(r);if(a!==null&&q(l)){if((a===Uo||a===hd)&&n){const c=n.length;a=n,o=c,s=c}a!==null&&lf(l,a,o,s,t)}}}function lf(t,e,n,i,r){let o=t;if(o.isAttached()&&(r||!o.isDirty())){const s=o.isComposing();let a=e;if((s||r)&&(e.endsWith(Uo)&&(a=e.slice(0,-Uo.length)),r)){const c=hd;let u;for(;(u=a.indexOf(c))!==-1;)a=a.slice(0,u)+a.slice(u+c.length),n!==null&&n>u&&(n=Math.max(u,n-c.length)),i!==null&&i>u&&(i=Math.max(u,i-c.length))}const l=o.getTextContent();if(r||a!==l){if(a===""){if(ot(null),Wo||ni||Ko)o.remove();else{const m=Ee();setTimeout(()=>{m.update(()=>{o.isAttached()&&o.remove()})},20)}return}const c=o.getParent(),u=li(),d=o.getTextContentSize(),f=ui(),p=o.getKey();if(o.isToken()||f!==null&&p===f&&!s||R(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===t.__key&&u.anchor.offset===0&&!o.canInsertTextBefore()&&!s||u.focus.key===t.__key&&u.focus.offset===d&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const h=Z();if(!R(h)||n===null||i===null)return void D0(o,a,h);if(h.setTextNodeRange(o,n,o,i),o.isSegmented()){const m=He(o.getTextContent());o.replace(m),o=m}D0(o,a,h)}}}function D0(t,e,n){if(t.setTextContent(e),R(n)){const i=t.getKey();let r=!1;for(const o of["anchor","focus"]){const s=n[o];s.type==="text"&&s.key===i&&(s.offset=xn(t,s.offset,"clamp"),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function al(t,e,n){const i=e[n]||!1;return i==="any"||i===t[n]}function AD(t,e){return al(t,e,"altKey")&&al(t,e,"ctrlKey")&&al(t,e,"shiftKey")&&al(t,e,"metaKey")}function we(t,e,n){if(!AD(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1||t.key.length===1&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const i="Key"+e.toUpperCase();return t.code===i}const Dn={ctrlKey:!Jt,metaKey:Jt},O0={altKey:Jt,ctrlKey:!Jt};function M0(t){return t.key==="Backspace"}function PD(t){const e=Be();if(R(t)){const n=t.anchor,i=t.focus,r=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(r.getKey(),0,"element"),i.set(r.getKey(),r.getChildrenSize(),"element"),Ri(t),t}{const n=e.select(0,e.getChildrenSize());return pt(Ri(n)),n}}function Ur(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,i=n[e];if(i!==void 0)return i;const r=t[e];if(typeof r=="string"){const o=Fn(r);return n[e]=o,o}return r}function cf(t,e,n,i,r){if(n.size===0)return;const o=i.__type,s=i.__key,a=e.get(o);a===void 0&&L(33,o);const l=a.klass;let c=t.get(l);c===void 0&&(c=new Map,t.set(l,c));const u=c.get(s),d=u==="destroyed"&&r==="created";(u===void 0||d)&&c.set(s,d?"updated":r)}function I0(t,e,n){const i=t.getParent();let r=n,o=t;return i!==null&&(e&&n===0?(r=o.getIndexWithinParent(),o=i):e||n!==o.getChildrenSize()||(r=o.getIndexWithinParent()+1,o=i)),o.getChildAtIndex(e?r-1:r)}function uf(t,e){const n=t.offset;if(t.type==="element")return I0(t.getNode(),e,n);{const i=t.getNode();if(e&&n===0||!e&&n===i.getTextContentSize()){const r=e?i.getPreviousSibling():i.getNextSibling();return r===null?I0(i.getParentOrThrow(),e,i.getIndexWithinParent()+(e?0:1)):r}}return null}function j0(t){const e=Nt(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function re(t,e,n){return p0(t,e,n,t)}function qr(t,e){const n=t._keyToDOMMap.get(e);return n===void 0&&L(75,e),n}function vs(t){const e=t.assignedSlot||t.parentElement;return gf(e)?e.host:e}function R0(t){return rl(t)?t:he(t)?t.ownerDocument:null}function ll(t){rt(),Ee()._updateTags.add(t)}function DD(t){rt(),Ee()._deferred.push(t)}function df(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function ff(t){const e=R0(t);return e?e.defaultView:null}function Nt(t){const e=t._window;return e===null&&L(78),e}function OD(t){let e=t.getParentOrThrow();for(;e!==null;){if(st(e))return e;e=e.getParentOrThrow()}return e}function st(t){return Qe(t)||D(t)&&t.isShadowRoot()}function ht(t,e=!1){const n=t.constructor.clone(t);return C0(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function yn(t){const e=Ee(),n=t.getType(),i=ef(e,n);i===void 0&&L(200,t.constructor.name,n);const{replace:r,replaceWithKlass:o}=i;if(r!==null){const s=r(t),a=s.constructor;return o!==null?s instanceof o||L(201,o.name,o.getType(),a.name,a.getType(),t.constructor.name,n):s instanceof t.constructor&&a!==t.constructor||L(202,a.name,a.getType(),t.constructor.name,n),s.__key===t.__key&&L(203,t.constructor.name,n,a.name,a.getType()),s}return t}function pf(t,e){!Qe(t.getParent())||D(e)||me(e)||L(99)}function MD(t){const e=Ke(t);return e===null&&L(63,t),e}function hf(t){return(me(t)||D(t)&&!t.canBeEmpty())&&!t.isInline()}function mf(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const i=t.parentElement;i!==null&&i.removeChild(t)}function At(t){return nt?(t||window).getSelection():null}function ID(t){const e=ff(t);return e?e.getSelection():null}function F0(t){return he(t)&&t.tagName==="A"}function he(t){return Hi(t)&&t.nodeType===1}function Hi(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"}function gf(t){return Hi(t)&&t.nodeType===11}const jD=/^(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 cl(t){return!(!he(t)||!t.style.display.startsWith("inline"))||jD.test(t.nodeName)}const RD=/^(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 xs(t){return(!he(t)||!t.style.display.startsWith("inline"))&&RD.test(t.nodeName)}function zt(t){if(me(t)&&!t.isInline())return!0;if(!D(t)||st(t))return!1;const e=t.getFirstChild(),n=e===null||si(e)||q(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function Fe(){return Ee()}function ul(t=Fe()){return t._config.dom||nl}function On(t,e,n=Fe()){const i=ul(n).$getDOMSlot(t,e,n);return D(t)&&(FD(i)||L(344,t.getKey(),t.getType())),i}function FD(t){return t instanceof Sv}function Hr(t,e,n=Fe()){return ND(On(t,e,n).element)}const L0=new WeakMap,LD=new Map;function $0(t){if(!t._readOnly&&t.isEmpty())return LD;t._readOnly||L(192);let e=L0.get(t);return e||(e=(function(n){const i=new Map;for(const[r,o]of n._nodeMap){const s=o.__type;let a=i.get(s);a||(a=new Map,i.set(s,a)),a.set(r,o)}return i})(t),L0.set(t,e)),e}function z0(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function $D(t){return(e=z0(t))[Dx]=!0,e;var e}function Yr(t,e){const n=t.getAttribute("data-lexical-indent");if(n!==null){const o=parseInt(n,10);if(Number.isFinite(o)&&o>=0)return void e.setIndent(o)}const i=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(i/40);e.setIndent(r)}function tn(t,e){const n=e.getAttribute("dir");return n==="ltr"||n==="rtl"?t.setDirection(n):t}function Mn(t,e){const n=e.style.textAlign;return n&&n in Oa?t.setFormat(n):t}function B0(t){return t.__lexicalUnmanaged===!0}function bs(t,e){return(function(n,i){return Object.prototype.hasOwnProperty.call(n,i)})(t,e)&&t[e]!==hn[e]}function dl(t){const e=xv in t.prototype?t.prototype[xv]():void 0,n=(function(s){if(!(s===hn||s.prototype instanceof hn)){let a="<unknown>",l="<unknown>";try{a=s.getType()}catch{}try{Wr.version&&(l=JSON.parse(Wr.version))}catch{}L(290,s.name,a,l)}return s===Gd||s===Ct||s===hn})(t),i=!n&&bs(t,"getType")?t.getType():void 0;let r,o=i;if(e)if(i)r=e[i];else for(const[s,a]of Object.entries(e))o=s,r=a;if(!n&&o&&(bs(t,"getType")||(t.getType=()=>o),bs(t,"clone")||(t.clone=s=>(Qd(s),new t)),bs(t,"importJSON")||(t.importJSON=r&&r.$importJSON||(s=>new t().updateFromJSON(s))),!bs(t,"importDOM")&&r)){const{importDOM:s}=r;s&&(t.importDOM=()=>s)}return{ownNodeConfig:r,ownNodeType:o}}function zD(t){const e=Fe();return rt(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t))).klass}const Ye=(t,e)=>{let n=t;for(;n!=null&&!Qe(n);){if(e(n))return n;n=n.getParent()}return null};function fl(t,e){const n=[];let i=t.__first;for(;i!==null;){const r=e===null?Ke(i):e.get(i);r==null&&L(174),n.push(i),i=r.__next}return n}const BD={next:"previous",previous:"next"};class yf{origin;constructor(e){this.origin=e}[Symbol.iterator](){return W0({hasNext:vn,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return je(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return je(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,n){const i=this.getNodeAtCaret();return e.is(this.origin)||e.is(i)||(i===null?this.insert(e):i.replace(e,n)),this}splice(e,n,i="next"){const r=i===this.direction?n:Array.from(n).reverse();let o=this;const s=this.getParentAtCaret(),a=new Map;for(let l=o.getAdjacentCaret();l!==null&&a.size<e;l=l.getAdjacentCaret()){const c=l.origin.getWritable();a.set(c.getKey(),c)}for(const l of r){if(a.size>0){const c=o.getNodeAtCaret();if(c){if(a.delete(c.getKey()),a.delete(l.getKey()),!(c.is(l)||o.origin.is(l))){const u=l.getParent();u&&u.is(s)&&l.remove(),c.replace(l)}}else c===null&&L(263,Array.from(a).join(" "))}else o.insert(l);o=je(l,this.direction)}for(const l of a.values())l.remove();return this}}class _s extends yf{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:xt(e,this.direction)}getParentCaret(e="root"){return je(vf(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Yi(this.direction);return je(this.getNodeAtCaret(),e)||xt(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof _s&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const VD={root:Qe,shadowRoot:st};function Yi(t){return BD[t]}function vf(t,e="root"){return VD[e](t)?null:t}class Gi extends yf{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:je(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return D(this.origin)?xt(this.origin,this.direction):null}getParentCaret(e="root"){return je(vf(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Yi(this.direction);return je(this.getNodeAtCaret(),e)||xt(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Gi&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Gi||e instanceof Xi)&&this.direction===e.direction&&this.origin.is(e.origin)}}class Xi extends yf{type="text";offset;constructor(e,n){super(e),this.offset=n}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:di(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return je(vf(this.getParentAtCaret(),e),this.direction)}getFlipped(){return di(this.origin,Yi(this.direction),this.offset)}isSamePointCaret(e){return e instanceof Xi&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Gi||e instanceof Xi)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return je(this.origin,this.direction)}}function Bt(t){return t instanceof Xi}function vn(t){return t instanceof Gi}function Pt(t){return t instanceof _s}const WD={next:class extends Xi{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Xi{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},KD={next:class extends Gi{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Gi{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},UD={next:class extends _s{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends _s{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function je(t,e){return t?new KD[e](t):null}function di(t,e,n){return t?new WD[e](t,xn(t,n)):null}function xn(t,e,n="error"){const i=t.getTextContentSize();let r=e==="next"?i:e==="previous"?0:e;return(r<0||r>i)&&(n!=="clamp"&&fv(284,String(e),String(i),t.getKey()),r=r<0?0:i),r}function V0(t,e){return new HD(t,e)}function xt(t,e){return D(t)?new UD[e](t):null}function qD(t){return t&&t.getChildCaret()||t}function pl(t){return t&&qD(t.getAdjacentCaret())}class xf{type="node-caret-range";direction;anchor;focus;constructor(e,n,i){this.anchor=e,this.focus=n,this.direction=i}getLatest(){const e=this.anchor.getLatest(),n=this.focus.getLatest();return e===this.anchor&&n===this.focus?this:new xf(e,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=r=>{const o=this[r].getLatest();return Bt(o)?(function(s,a){const{direction:l,origin:c}=s,u=xn(c,a==="focus"?Yi(l):l);return V0(s,u-s.offset)})(o,r):null},n=e("anchor"),i=e("focus");if(n&&i){const{caret:r}=n,{caret:o}=i;if(r.isSameNodeCaret(o))return[V0(r,o.offset-r.offset),null]}return[n,i]}iterNodeCarets(e="root"){const n=Bt(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),i=this.focus.getLatest(),r=Bt(i),o=s=>s.isSameNodeCaret(i)?null:pl(s)||s.getParentCaret(e);return W0({hasNext:s=>s!==null&&!(r&&i.isSameNodeCaret(s)),initial:n.isSameNodeCaret(i)?null:o(n),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class HD{type="slice";caret;distance;constructor(e,n){this.caret=e,this.distance=n}getSliceIndices(){const{distance:e,caret:{offset:n}}=this,i=n+e;return i<n?[i,n]:[n,i]}getTextContent(){const[e,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:n}}=this,[i,r]=this.getSliceIndices(),o=e.getTextContent();return di(e.setTextContent(o.slice(0,i)+o.slice(r)),n,i)}}function bf(t){return In(t,je(Be(),t.direction))}function _f(t){return In(t,t)}function In(t,e){return t.direction!==e.direction&&L(265),new xf(t,e,t.direction)}function W0(t){const{initial:e,hasNext:n,step:i,map:r}=t;let o=e;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const s={done:!1,value:r(o)};return o=i(o),s}}}function hl(t,e){const n=gl(t.origin,e.origin);switch(n===null&&L(275,t.origin.getKey(),e.origin.getKey()),n.type){case"same":{const i=t.type==="text",r=e.type==="text";return i&&r?(function(o,s){return Math.sign(o-s)})(t.offset,e.offset):t.type===e.type?0:i?-1:r?1:t.type==="child"?-1:1}case"ancestor":return t.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return K0(n)}}function K0(t){const{a:e,b:n}=t,i=e.__key,r=n.__key;let o=e,s=n;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===r)return-1;if(s.__key===i)return 1}return o===null?1:-1}function ml(t,e){return e.is(t)}function U0(t){return D(t)?[t.getLatest(),null]:[t.getParent(),t.getLatest()]}function gl(t,e){if(t.is(e))return{commonAncestor:t,type:"same"};const n=new Map;for(let[i,r]=U0(t);i;r=i,i=i.getParent())n.set(i,r);for(let[i,r]=U0(e);i;r=i,i=i.getParent()){const o=n.get(i);if(o!==void 0)return o===null?(ml(t,i)||L(276),{commonAncestor:i,type:"ancestor"}):r===null?(ml(e,i)||L(277),{commonAncestor:i,type:"descendant"}):((D(o)||ml(t,o))&&(D(r)||ml(e,r))&&i.is(o.getParent())&&i.is(r.getParent())||L(278),{a:o,b:r,commonAncestor:i,type:"branch"})}return null}function nn(t,e){const{type:n,key:i,offset:r}=t,o=MD(t.key);return n==="text"?(q(o)||L(266,o.getType(),i),di(o,e,r)):(D(o)||L(267,o.getType(),i),Sf(o,t.offset,e))}function fi(t,e){const{origin:n,direction:i}=e,r=i==="next";Bt(e)?t.set(n.getKey(),e.offset,"text"):vn(e)?q(n)?t.set(n.getKey(),xn(n,i),"text"):t.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(r?1:0),"element"):(Pt(e)&&D(n)||L(268),t.set(n.getKey(),r?0:n.getChildrenSize(),"element"))}function yl(t){const e=Z(),n=R(e)?e:Jx();return vl(n,t),pt(n),n}function vl(t,e){fi(t.anchor,e.anchor),fi(t.focus,e.focus)}function xl(t){const{anchor:e,focus:n}=t,i=nn(e,"next"),r=nn(n,"next"),o=hl(i,r)<=0?"next":"previous";return In(jn(i,o),jn(r,o))}function rn(t){const{direction:e,origin:n}=t,i=je(n,Yi(e)).getNodeAtCaret();return i?je(i,e):xt(n.getParentOrThrow(),e)}function q0(t,e="root"){const n=[t];for(let i=Pt(t)?t.getParentCaret(e):t.getSiblingCaret();i!==null;i=i.getParentCaret(e))n.push(rn(i));return n}function wf(t){return!!t&&t.origin.isAttached()}function YD(t,e="removeEmptySlices"){if(t.isCollapsed())return t;const n="root",i="next";let r=e;const o=bl(t,i),s=q0(o.anchor,n),a=q0(o.focus.getFlipped(),n),l=new Set,c=[];for(const h of o.iterNodeCarets(n))if(Pt(h))l.add(h.origin.getKey());else if(vn(h)){const{origin:m}=h;D(m)&&!l.has(m.getKey())||c.push(m)}for(const h of c)h.remove();for(const h of o.getTextSlices()){if(!h)continue;const{origin:m}=h.caret,g=m.getTextContentSize(),y=rn(je(m,i)),x=m.getMode();if(Math.abs(h.distance)===g&&r==="removeEmptySlices"||x==="token"&&h.distance!==0)y.remove();else if(h.distance!==0){r="removeEmptySlices";let b=h.removeTextSlice();const w=h.caret.origin;if(x==="segmented"){const _=b.origin,C=He(_.getTextContent()).setStyle(_.getStyle()).setFormat(_.getFormat());y.replaceOrInsert(C),b=di(C,i,b.offset)}w.is(s[0].origin)&&(s[0]=b),w.is(a[0].origin)&&(a[0]=b.getFlipped())}}let u,d;for(const h of s)if(wf(h)){u=at(h);break}for(const h of a)if(wf(h)){d=at(h);break}const f=(function(h,m,g){if(!h||!m)return null;const y=h.getParentAtCaret(),x=m.getParentAtCaret();if(!y||!x)return null;const b=y.getParents().reverse();b.push(y);const w=x.getParents().reverse();w.push(x);const _=Math.min(b.length,w.length);let C;for(C=0;C<_&&b[C]===w[C];C++);const E=(A,P)=>{let X;for(let W=C;W<A.length;W++){const I=A[W];if(st(I))return;!X&&P(I)&&(X=I)}return X},S=E(b,zt),k=S&&E(w,A=>g.has(A.getKey())&&zt(A));return S&&k?[S,k]:null})(u,d,l);if(f){const[h,m]=f;xt(h,"previous").splice(0,m.getChildren());let g=m.getParent();for(m.remove(!0);g&&g.isEmpty();){const y=g;g=g.getParent(),y.remove(!0)}}const p=[u,d,...s,...a].find(wf);if(p)return _f(jn(at(p),t.direction));L(269,JSON.stringify(s.map(h=>h.origin.__key)))}function at(t){const e=(function(r){let o=r;for(;Pt(o);){const s=pl(o);if(!Pt(s))break;o=s}return o})(t.getLatest()),{direction:n}=e;if(q(e.origin))return Bt(e)?e:di(e.origin,n,n);const i=e.getAdjacentCaret();return vn(i)&&q(i.origin)?di(i.origin,n,Yi(n)):e}function H0(t){return Bt(t)&&t.offset!==xn(t.origin,t.direction)}function jn(t,e){return t.direction===e?t:t.getFlipped()}function bl(t,e){return t.direction===e?t:In(jn(t.focus,e),jn(t.anchor,e))}function Sf(t,e,n){let i=xt(t,"next");for(let r=0;r<e;r++){const o=i.getAdjacentCaret();if(o===null)break;i=o}return jn(i,n)}function GD(t){const{origin:e,offset:n,direction:i}=t;if(n===xn(e,i))return t.getSiblingCaret();if(n===xn(e,Yi(i)))return rn(t.getSiblingCaret());const[r]=e.splitText(n);return q(r)||L(281),jn(je(r,"next"),i)}function XD(t,e){return!0}function Y0(t,{$copyElementNode:e=ht,$splitTextPointCaretNext:n=GD,rootMode:i="shadowRoot",$shouldSplit:r=XD,removeEmptyDestination:o=!1}={}){if(Bt(t))return n(t);const s=t.getParentCaret(i);if(s){const{origin:a}=s;if(Pt(t)){const c=rn(s);if(o&&a.isEmpty())return a.remove(),c;if(!a.canBeEmpty()||!r(a,"first"))return c}const l=(function(c){const u=[];for(let d=c.getAdjacentCaret();d;d=d.getAdjacentCaret())u.push(d.origin);return u})(t);(l.length>0||!o&&a.canBeEmpty()&&r(a,"last"))&&s.insert(e(a).splice(0,0,l))}return s}function Hj(t){return t}function Ji(...t){return t}function Yj(t){return t}function Rn(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}function Fn(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}function Zi(t,...e){const n=Fn(...e);n.length>0&&t.classList.add(...n)}function Cf(t,...e){const n=Fn(...e);n.length>0&&t.classList.remove(...n)}function lt(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}const JD=nt?N.useLayoutEffect:N.useEffect,_l={tag:Bi};function ZD({initialConfig:t,children:e}){const n=N.useMemo(()=>{const{theme:i,namespace:r,nodes:o,onError:s,editorState:a,html:l}=t,c=pP(null,i),u=b0({editable:t.editable,html:l,namespace:r,nodes:o,onError:d=>s(d,u),theme:i});return(function(d,f){if(f!==null){if(f===void 0)d.update(()=>{const p=Be();if(p.isEmpty()){const h=De();p.append(h);const m=nt?document.activeElement:null;(Z()!==null||m!==null&&m===d.getRootElement())&&h.select()}},_l);else if(f!==null)switch(typeof f){case"string":{const p=d.parseEditorState(f);d.setEditorState(p,_l);break}case"object":d.setEditorState(f,_l);break;case"function":d.update(()=>{Be().isEmpty()&&f(d)},_l)}}})(u,a),[u,c]},[]);return JD(()=>{const i=t.editable,[r]=n;r.setEditable(i===void 0||i)},[]),v.jsx(dv.Provider,{value:n,children:e})}const QD=nt?N.useLayoutEffect:N.useEffect;function eO(t){return{initialValueFn:()=>t.isEditable(),subscribe:e=>t.registerEditableListener(e)}}function tO(){return(function(t){const[e]=tt(),n=N.useMemo(()=>t(e),[e,t]),[i,r]=N.useState(()=>n.initialValueFn()),o=N.useRef(i);return QD(()=>{const{initialValueFn:s,subscribe:a}=n,l=s();return o.current!==l&&(o.current=l,r(l)),a(c=>{o.current=c,r(c)})},[n,t]),i})(eO)}function G0(t){const e=Fe().getElementByKey(t.getKey());if(e===null)return null;const n=e.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(e)}function X0(t){return G0(Qe(t)?t:t.getParentOrThrow())}function J0(t){const e=X0(t);return e!==null&&e.direction==="rtl"}function Z0(t,e,n="self"){const i=t.getStartEndPoints();if(e.isSelected(t)&&!Pn(e)&&i!==null){const[r,o]=i,s=t.isBackward(),a=r.getNode(),l=o.getNode(),c=e.is(a),u=e.is(l);if(c||u){const[d,f]=Wd(t),p=a.is(l),h=e.is(s?l:a),m=e.is(s?a:l);let g,y=0;p?(y=d>f?f:d,g=d>f?d:f):h?(y=s?f:d,g=void 0):m&&(y=0,g=s?d:f);const x=e.__text.slice(y,g);x!==e.__text&&(n==="clone"&&(e=$D(e)),e.__text=x)}}return e}function nO(t,e){const n=t.getFormatType(),i=t.getIndent();n!==e.getFormatType()&&e.setFormat(n),i!==e.getIndent()&&e.setIndent(i)}function Q0(t,e,n=nO){if(!t)return;const i=t.getStartEndPoints();let r=!1,o=null;const s=new Map;if(i){const[a,l]=i,c=Ye(a.getNode(),zt);o=Ye(l.getNode(),zt),r=D(o)&&!o.is(c)&&(function(u,d){if(u.offset!==0)return!1;let f=u.getNode();if(D(f)&&f.isEmpty())return!1;for(;!f.is(d);){if(f.getPreviousSibling()!==null)return!1;const p=f.getParent();if(p===null)return!1;f=p}return!0})(l,o),D(c)&&s.set(c.getKey(),c),D(o)&&!r&&s.set(o.getKey(),o)}for(const a of t.getNodes())if(D(a)&&zt(a)){if(r&&a.is(o))continue;s.set(a.getKey(),a)}else if(!i){const l=Ye(a,zt);D(l)&&s.set(l.getKey(),l)}for(const a of s.values()){const l=e();n(a,l),a.replace(l,!0)}}function eb(t){const e=tb(t);return e!==null&&e.writingMode==="vertical-rl"}function tb(t){const e=t.anchor.getNode();return D(e)?G0(e):X0(e)}function nb(t,e){let n=eb(t)?!e:e;ib(t)&&(n=!n);const i=nn(t.focus,n?"previous":"next");if(H0(i))return!1;for(const r of bf(i)){if(Pt(r))return!r.origin.isInline();if(!D(r.origin)){if(me(r.origin))return!0;break}}return!1}function iO(t,e,n,i){t.modify(e?"extend":"move",n,i)}function ib(t){const e=tb(t);return e!==null&&e.direction==="rtl"}function rb(t,e,n){const i=ib(t);let r;r=eb(t)||i?!n:n,iO(t,e,r,"character")}function kf(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ob(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function rO(t){const e=Ye(t,n=>D(n)&&!n.isInline());return D(e)||kf(4,t.__key),e}function oO(t){const e=Z()||li();let n;if(R(e))n=nn(e.focus,"next");else{if(e!=null){const s=e.getNodes(),a=s[s.length-1];a&&(n=je(a,"next"))}n=n||xt(Be(),"previous").getFlipped().insert(De())}const i=Tf(t,n),r=pl(i),o=Pt(r)?at(r):i;return yl(_f(o)),t.getLatest()}function Tf(t,e,n){let i=jn(e,"next");Bt(i)&&(i.offset===0?i=je(i.origin,"previous").getFlipped():i.offset===i.origin.getTextContentSize()&&(i=je(i.origin,"next"))),i.origin.is(t)&&(vn(i)||kf(342,t.getKey(),t.getType()),i=rn(i)),(t.is(i.getNodeAtCaret())||t.is(i.getFlipped().getNodeAtCaret()))&&t.remove(!0);for(let r=i;r;r=Y0(r,n))i=r;return Bt(i)&&kf(283),i.insert(t.isInline()?De().append(t):t),jn(je(t.getLatest(),"next"),e.direction)}function Ln(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}function sb(t){const e=Z();if(!R(e))return!1;const n=new Set,i=e.getNodes();for(let r=0;r<i.length;r++){const o=i[r],s=o.getKey();if(n.has(s))continue;const a=Ye(o,c=>D(c)&&!c.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),t(a))}return n.size>0}const sO=Symbol.for("preact-signals");function wl(){if($n>1)return void $n--;let t,e=!1;for(!(function(){let n=Sl;for(Sl=void 0;n!==void 0;)n.S.v===n.v&&(n.S.i=n.i),n=n.o})();ws!==void 0;){let n=ws;for(ws=void 0,Cl++;n!==void 0;){const i=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&cb(n))try{n.c()}catch(r){e||(t=r,e=!0)}n=i}}if(Cl=0,$n--,e)throw t}function Ef(t){if($n>0)return t();Nf=++aO,$n++;try{return t()}finally{wl()}}let xe,ws;function ab(t){const e=xe;xe=void 0;try{return t()}finally{xe=e}}let Sl,$n=0,Cl=0,aO=0,Nf=0,kl=0;function lb(t){if(xe===void 0)return;let e=t.n;return e===void 0||e.t!==xe?(e={i:0,S:t,p:xe.s,n:void 0,t:xe,e:void 0,x:void 0,r:e},xe.s!==void 0&&(xe.s.n=e),xe.s=e,t.n=e,32&xe.f&&t.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=xe.s,e.n=void 0,xe.s.n=e,xe.s=e),e):void 0}function bt(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function pi(t,e){return new bt(t,e)}function cb(t){for(let e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ub(t){for(let e=t.s;e!==void 0;e=e.n){const n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function db(t){let e,n=t.s;for(;n!==void 0;){const i=n.p;n.i===-1?(n.S.U(n),i!==void 0&&(i.n=n.n),n.n!==void 0&&(n.n.p=i)):e=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=i}t.s=e}function Qi(t,e){bt.call(this,void 0),this.x=t,this.s=void 0,this.g=kl-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function lO(t,e){return new Qi(t,e)}function fb(t){const e=t.m;if(t.m=void 0,typeof e=="function"){$n++;const n=xe;xe=void 0;try{e()}catch(i){throw t.f&=-2,t.f|=8,Af(t),i}finally{xe=n,wl()}}}function Af(t){for(let e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,fb(t)}function cO(t){if(xe!==this)throw new Error("Out-of-order effect");db(this),xe=t,this.f&=-2,8&this.f&&Af(this),wl()}function Gr(t,e){this.x=t,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=e?.name}function Dt(t,e){const n=new Gr(t,e);try{n.c()}catch(r){throw n.d(),r}const i=n.d.bind(n);return i[Symbol.dispose]=i,i}function zn(t,e={}){const n={};for(const i in t){const r=e[i],o=pi(r===void 0?t[i]:r);n[i]=o}return n}bt.prototype.brand=sO,bt.prototype.h=function(){return!0},bt.prototype.S=function(t){const e=this.t;e!==t&&t.e===void 0&&(t.x=e,this.t=t,e!==void 0?e.e=t:ab(()=>{var n;(n=this.W)==null||n.call(this)}))},bt.prototype.U=function(t){if(this.t!==void 0){const e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&ab(()=>{var i;(i=this.Z)==null||i.call(this)}))}},bt.prototype.subscribe=function(t){return Dt(()=>{const e=this.value,n=xe;xe=void 0;try{t(e)}finally{xe=n}},{name:"sub"})},bt.prototype.valueOf=function(){return this.value},bt.prototype.toString=function(){return this.value+""},bt.prototype.toJSON=function(){return this.value},bt.prototype.peek=function(){const t=xe;xe=void 0;try{return this.value}finally{xe=t}},Object.defineProperty(bt.prototype,"value",{get(){const t=lb(this);return t!==void 0&&(t.i=this.i),this.v},set(t){if(t!==this.v){if(Cl>100)throw new Error("Cycle detected");(function(e){$n!==0&&Cl===0&&e.l!==Nf&&(e.l=Nf,Sl={S:e,v:e.v,i:e.i,o:Sl})})(this),this.v=t,this.i++,kl++,$n++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{wl()}}}}),Qi.prototype=new bt,Qi.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===kl))return!0;if(this.g=kl,this.f|=1,this.i>0&&!cb(this))return this.f&=-2,!0;const t=xe;try{ub(this),xe=this;const 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 xe=t,db(this),this.f&=-2,!0},Qi.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}bt.prototype.S.call(this,t)},Qi.prototype.U=function(t){if(this.t!==void 0&&(bt.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Qi.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(Qi.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const t=lb(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}}),Gr.prototype.c=function(){const t=this.S();try{if(8&this.f||this.x===void 0)return;const e=this.x();typeof e=="function"&&(this.m=e)}finally{t()}},Gr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,fb(this),ub(this),$n++;const t=xe;return xe=this,cO.bind(this,t)},Gr.prototype.N=function(){2&this.f||(this.f|=2,this.u=ws,ws=this)},Gr.prototype.d=function(){this.f|=8,1&this.f||Af(this)},Gr.prototype.dispose=function(){this.d()};function uO(t){return(typeof t.nodes=="function"?t.nodes():t.nodes)||[]}Dv("format",{parse:t=>typeof t=="number"?t:0});function pb(t,e){let n;return pi(t(),{unwatched(){n&&(n(),n=void 0)},watched(){this.value=t(),n=e(this)}})}const Pf={build:t=>pb(()=>t.getEditorState(),e=>t.registerUpdateListener(n=>{e.value=n.editorState})),name:"@lexical/extension/EditorState"};function ke(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let hb;try{hb="0.45.0+prod.esm"}catch{}const dO=hb??"0.45.0+source";function mb(t,e){if(t&&e&&!Array.isArray(e)&&typeof t=="object"&&typeof e=="object"){const n=t,i=e;for(const r in i)n[r]=mb(n[r],i[r]);return t}return e}const Df=0,Of=1,gb=2,Mf=3,Tl=4,Xr=5,If=6,Ss=7;function jf(t){return t.id===Df}function yb(t){return t.id===gb}function fO(t){return(function(e){return e.id===Of})(t)||ke(305,String(t.id),String(Of)),Object.assign(t,{id:gb})}const pO=new Set;let hO=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,n){this.builder=e,this.extension=n,this.configs=new Set,this.state={id:Df}}mergeConfigs(){let e=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Rn;for(const i of this.configs)e=n(e,i);return e}init(e){const n=this.state;yb(n)||ke(306,String(n.id));const i={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...i,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(a,l,c){return Object.assign(a,{config:l,id:Mf,registerState:c})})(n,this.mergeConfigs(),i);let s;this.state=o,this.extension.init&&(s=this.extension.init(e,o.config,i)),this.state=(function(a,l,c){return Object.assign(a,{id:Tl,initResult:l,registerState:c})})(o,s,r)}build(e){const n=this.state;let i;n.id!==Tl&&ke(307,String(n.id),String(Xr)),this.extension.build&&(i=this.extension.build(e,n.config,n.registerState));const r={...n.registerState,getOutput:()=>i,getSignal:this.getSignal.bind(this)};this.state=(function(o,s,a){return Object.assign(o,{id:Xr,output:s,registerState:a})})(n,i,r)}register(e,n){this._signal=n;const i=this.state;i.id!==Xr&&ke(308,String(i.id),String(Xr));const r=this.extension.register&&this.extension.register(e,i.config,i.registerState);return this.state=(function(o){return Object.assign(o,{id:If})})(i),()=>{const o=this.state;o.id!==Ss&&ke(309,String(i.id),String(Ss)),this.state=(function(s){return Object.assign(s,{id:Xr})})(o),r&&r()}}afterRegistration(e){const n=this.state;let i;return n.id!==If&&ke(310,String(n.id),String(If)),this.extension.afterRegistration&&(i=this.extension.afterRegistration(e,n.config,n.registerState)),this.state=(function(r){return Object.assign(r,{id:Ss})})(n),i}getSignal(){return this._signal===void 0&&ke(311),this._signal}getInitResult(){this.extension.init===void 0&&ke(312,this.extension.name);const e=this.state;return(function(n){return n.id>=Tl})(e)||ke(313,String(e.id),String(Tl)),e.initResult}getInitPeer(e){const n=this.builder.extensionNameMap.get(e);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(n){return n.id>=Mf})(e)||ke(314,String(e.id),String(Mf)),{config:e.config}}getPeer(e){const n=this.builder.extensionNameMap.get(e);return n?n.getExtensionDependency():void 0}getInitDependency(e){const n=this.builder.getExtensionRep(e);return n===void 0&&ke(315,this.extension.name,e.name),n.getExtensionInitDependency()}getDependency(e){const n=this.builder.getExtensionRep(e);return n===void 0&&ke(315,this.extension.name,e.name),n.getExtensionDependency()}getState(){const e=this.state;return(function(n){return n.id>=Ss})(e)||ke(316,String(e.id),String(Ss)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||pO}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(n){return n.id>=Xr})(e)||ke(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const vb={tag:Bi};function mO(){const t=Be();t.isEmpty()&&t.append(De())}const gO={config:{setOptions:vb,updateOptions:vb},init:({$initialEditorState:t=mO})=>({$initialEditorState:t,initialized:!1}),afterRegistration(t,{updateOptions:e,setOptions:n},i){const r=i.getInitResult();if(!r.initialized){r.initialized=!0;const{$initialEditorState:o}=r;if(bD(o))t.setEditorState(o,n);else if(typeof o=="function")t.update(()=>{o(t)},e);else if(o&&(typeof o=="string"||typeof o=="object")){const s=t.parseEditorState(o);t.setEditorState(s,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Br,ai,Lr,$r,Vr]},xb=Symbol.for("@lexical/extension/LexicalBuilder");function bb(){}function yO(t){throw t}function El(t){return Array.isArray(t)?t:[t]}const Rf=dO;let Ff=class Kl{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=Rf,this.roots=e;for(const n of e)this.addExtension(n)}static fromExtensions(e){const n=[El(gO)];for(const i of e)n.push(El(i));return new Kl(n)}static maybeFromEditor(e){const n=e[xb];return n&&(n.PACKAGE_VERSION!==Rf&&ke(292,n.PACKAGE_VERSION,Rf),n instanceof Kl||ke(293)),n}static fromEditor(e){const n=Kl.maybeFromEditor(e);return n===void 0&&ke(294),n}constructEditor(){const{$initialEditorState:e,onError:n,...i}=this.buildCreateEditorArgs(),r=Object.assign(b0({...i,...n?{onError:o=>{n(o,r)}}:{}}),{[xb]:this});for(const o of this.sortedExtensionReps())o.build(r);return r}buildEditor(){let e=bb;function n(){try{e()}finally{e=bb}}const i=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return e=lt(this.registerEditor(i),()=>i.setRootElement(null)),i}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const n=this.extensionNameMap.get(e.name);if(n)return n.extension!==e&&ke(295,e.name),n}addEdge(e,n,i){const r=this.outgoingConfigEdges.get(e);r?r.set(n,i):this.outgoingConfigEdges.set(e,new Map([[n,i]]));const o=this.incomingEdges.get(n);o?o.add(e):this.incomingEdges.set(n,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&ke(296);const n=El(e),[i]=n;typeof i.name!="string"&&ke(297,typeof i.name);let r=this.extensionNameMap.get(i.name);if(r!==void 0&&r.extension!==i&&ke(298,i.name),!r){r=new hO(this,i),this.extensionNameMap.set(i.name,r);const o=this.conflicts.get(i.name);typeof o=="string"&&ke(299,i.name,o);for(const s of i.conflictsWith||[])this.extensionNameMap.has(s)&&ke(299,i.name,s),this.conflicts.set(s,i.name);for(const s of i.dependencies||[]){const a=El(s);this.addEdge(i.name,a[0].name,a.slice(1)),this.addExtension(a)}for(const[s,a]of i.peerDependencies||[])this.addEdge(i.name,s,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],n=(i,r)=>{let o=i.state;if(yb(o))return;const s=i.extension.name;var a;jf(o)||ke(300,s,r||"[unknown]"),jf(a=o)||ke(304,String(a.id),String(Df)),o=Object.assign(a,{id:Of}),i.state=o;const l=this.outgoingConfigEdges.get(s);if(l)for(const c of l.keys()){const u=this.extensionNameMap.get(c);u&&n(u,s)}o=fO(o),i.state=o,e.push(i)};for(const i of this.extensionNameMap.values())jf(i.state)&&n(i);for(const i of e)for(const[r,o]of this.outgoingConfigEdges.get(i.extension.name)||[])if(o.length>0){const s=this.extensionNameMap.get(r);if(s)for(const a of o)s.configs.add(a)}for(const[i,...r]of this.roots)if(r.length>0){const o=this.extensionNameMap.get(i.name);o===void 0&&ke(301,i.name);for(const s of r)o.configs.add(s)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const n=this.sortedExtensionReps(),i=new AbortController,r=[()=>i.abort()],o=i.signal;for(const s of n){const a=s.register(e,o);a&&r.push(a)}for(const s of n){const a=s.afterRegistration(e);a&&r.push(a)}return lt(...r)}buildCreateEditorArgs(){const e={},n=new Set,i=new Map,r=new Map,o={},s={},a=this.sortedExtensionReps();for(const u of a){const{extension:d}=u;if(d.onError!==void 0&&(e.onError=d.onError),d.disableEvents!==void 0&&(e.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(e.parentEditor=d.parentEditor),d.editable!==void 0&&(e.editable=d.editable),d.namespace!==void 0&&(e.namespace=d.namespace),d.$initialEditorState!==void 0&&(e.$initialEditorState=d.$initialEditorState),d.nodes)for(const f of uO(d)){if(typeof f!="function"){const p=i.get(f.replace);p&&ke(302,d.name,f.replace.name,p.extension.name),i.set(f.replace,u)}n.add(f)}if(d.html){if(d.html.export)for(const[f,p]of d.html.export.entries())r.set(f,p);d.html.import&&Object.assign(o,d.html.import)}d.theme&&mb(s,d.theme)}Object.keys(s).length>0&&(e.theme=s),n.size&&(e.nodes=[...n]);const l=Object.keys(o).length>0,c=r.size>0;(l||c)&&(e.html={},l&&(e.html.import=o),c&&(e.html.export=r));for(const u of a)u.init(e);return e.onError||(e.onError=yO),e}};function vO(t,e){const n=Ff.fromEditor(t).getExtensionRep(e);return n===void 0&&ke(303,e.name),n.getExtensionDependency()}function Jr(t,e){const n=Ff.maybeFromEditor(t);if(!n)return;const i=n.extensionNameMap.get(e);return i?i.getExtensionDependency():void 0}function xO(t){return vO(Fe(),t)}function bO(t){return xO(t).output}function _O(t){return Jr(Fe(),t)}const wO=new Set,_b={build(t,e,n){const i=n.getDependency(Pf).output,r=pi({watchedNodeKeys:new Map}),o=pb(()=>{},()=>Dt(()=>{const s=o.peek(),{watchedNodeKeys:a}=r.value;let l,c=!1;i.value.read(()=>{if(Z())for(const[u,d]of a.entries()){if(d.size===0){a.delete(u);continue}const f=Ke(u),p=f&&f.isSelected()||!1;c=c||p!==(!!s&&s.has(u)),p&&(l=l||new Set,l.add(u))}}),!c&&l&&s&&l.size===s.size||(o.value=l)}));return{watchNodeKey:function(s){const a=lO(()=>(o.value||wO).has(s)),{watchedNodeKeys:l}=r.peek();let c=l.get(s);const u=c!==void 0;return c=c||new Set,c.add(a),u||(l.set(s,c),r.value={watchedNodeKeys:l}),a}}},dependencies:[Pf],name:"@lexical/extension/NodeSelection"},SO=se("INSERT_HORIZONTAL_RULE_COMMAND");let Nl=class cw extends Gd{static getType(){return"horizontalrule"}static clone(e){return new cw(e.__key)}static importJSON(e){return Al().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:CO,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const n=document.createElement("hr");return Zi(n,e.theme.hr),n}getTextContent(){return`
|
|
235
|
-
`}isInline(){return!1}updateDOM(){return!1}};function CO(){return{node:Al()}}function Al(){return zD(Nl)}function kO(t){return t instanceof Nl}const TO={dependencies:[Pf,_b],name:"@lexical/extension/HorizontalRule",nodes:()=>[Nl],register(t,e,n){const{watchNodeKey:i}=n.getDependency(_b).output,r=pi({nodeSelections:new Map}),o=t._config.theme.hrSelected??"selected";return lt(t.registerCommand(SO,s=>{const a=Z();if(!R(a))return!1;if(a.focus.getNode()!==null){const l=Al();oO(l)}return!0},fe),t.registerCommand(Nd,s=>{if(Hi(s.target)){const a=of(s.target);if(kO(a))return(function(l,c=!1){const u=Z(),d=l.isSelected(),f=l.getKey();let p;c&&Xe(u)?p=u:(p=Kd(),pt(p)),d?p.delete(f):p.add(f)})(a,s.shiftKey),!0}return!1},en),t.registerMutationListener(Nl,(s,a)=>{Ef(()=>{let l=!1;const{nodeSelections:c}=r.peek();for(const[u,d]of s.entries())if(d==="destroyed")c.delete(u),l=!0;else{const f=c.get(u),p=t.getElementByKey(u);f?f.domNode.value=p:(l=!0,c.set(u,{domNode:pi(p),selectedSignal:i(u)}))}l&&(r.value={nodeSelections:c})})}),Dt(()=>{const s=[];for(const{domNode:a,selectedSignal:l}of r.value.nodeSelections.values())s.push(Dt(()=>{const c=a.value;c&&(l.value?Zi(c,o):Cf(c,o))}));return lt(...s)}))}};function wb(t){D(t)&&t.isInline()&&t.isEmpty()&&t.remove()}const EO={build:(t,e,n)=>zn(e),config:{disabled:!1},name:"@lexical/NormalizeInlineElements",register:(t,e,n)=>{const i=n.getOutput();return Dt(()=>{if(!i.disabled.value){const r=[];for(const{klass:o,transforms:s}of t._nodes.values())o.prototype instanceof Ct&&o.prototype.isInline!==Ct.prototype.isInline&&(s.add(wb),r.push(()=>s.delete(wb)));return()=>r.forEach(o=>o())}})}},NO=new Set([Ya,Mx]),AO={build:(t,e,n)=>zn(e),config:{$fixFocusOverselection:function(){const t=Z();if(R(t)&&!t.isCollapsed()){const e=bl(xl(t),"next");let n=e.focus;for(Bt(n)&&e.anchor.origin!==n.origin&&n.offset===0&&(n=rn(n.getSiblingCaret())),vn(n)&&e.anchor.origin!==n.origin&&si(n.origin)&&(n=rn(n));Pt(n)&&e.anchor.origin!==n.origin;)n=rn(je(n.origin,"next"));if(vn(n)&&D(n.origin)&&(n=at(xt(n.origin,"previous")).getFlipped()),n=at(n),!n.isSamePointCaret(e.focus)){const i=yl(In(e.anchor,n)),r=Fe().getRootElement(),o=r&&At(r.ownerDocument.defaultView);o&&n0(li(),i,Fe(),o,NO,r)}}},dateNow:Date.now,disabled:!1,thresholdMsec:100},name:"@lexical/NormalizeTripleClickSelection",register:(t,e,n)=>Dt(()=>{const i=n.getOutput();if(!i.disabled.value)return t.registerRootListener(r=>{if(!r)return;let o=0;const s=a=>{if(a?a.detail===3:o>0){const l=i.dateNow.peek()();o=a&&a.type==="mousedown"||l-o<=i.thresholdMsec.peek()?l:0}return o};return lt(t.registerCommand(Ed,()=>(s(null)&&(o=0,i.$fixFocusOverselection.peek()()),!1),SD),(()=>{const a=["mouseup","mousedown"];return a.forEach(l=>r.addEventListener(l,s,!0)),()=>a.forEach(l=>r.removeEventListener(l,s,!0))})())})})},PO={name:"@lexical/react/ReactProvider"};function DO(){return Be().getTextContent()}function OO(t,e=!0){if(t)return!1;let n=DO();return e&&(n=n.trim()),n===""}function MO(t){if(!OO(t,!1))return!1;const e=Be().getChildren(),n=e.length;if(n>1)return!1;for(let i=0;i<n;i++){const r=e[i];if(me(r))return!1;if(D(r)){if(!hs(r)||r.__indent!==0)return!1;const o=r.getChildren(),s=o.length;for(let a=0;a<s;a++){const l=o[i];if(!q(l))return!1}}}return!0}function Sb(t){return()=>MO(t)}function Cb(t){const e=window.location.origin,n=i=>{if(i.origin!==e)return;const r=t.getRootElement();if(document.activeElement!==r)return;const o=i.data;if(typeof o=="string"){let s;try{s=JSON.parse(o)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const a=s.payload;if(a&&a.functionId==="makeChanges"){const l=a.args;if(l){const[c,u,d,f,p]=l;t.update(()=>{const h=Z();if(R(h)){const m=h.anchor;let g=m.getNode(),y=0,x=0;if(q(g)&&c>=0&&u>=0&&(y=c,x=c+u,h.setTextNodeRange(g,y,g,x)),y===x&&d===""||(h.insertRawText(d),g=m.getNode()),q(g)){y=f,x=f+p;const b=g.getTextContentSize();y=y>b?b:y,x=x>b?b:x,h.setTextNodeRange(g,y,g,x)}i.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const IO={build:(t,e,n)=>zn(e),config:{disabled:typeof window>"u"},name:"@lexical/dragon",register:(t,e,n)=>Dt(()=>n.getOutput().disabled.value?void 0:Cb(t))};function Zr(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let Qr;function Cs(t,e){const{key:n}=e;return t&&n in t?t[n]:e.defaultValue}function Lf(t){return Qr&&Qr.editor===t?Qr:void 0}function jO(t,e){const n=Lf(e);return n&&n[t]}function RO(t,e){if("cfg"in e){const{cfg:n,updater:i}=e;return[n,i(Cs(t,n))]}return e}function $f(t,e){let n=e;for(const i of t){const[r,o]=RO(n,i),s=r.key;if(n===e&&Cs(n,r)===o)continue;const a=n===e||n===void 0?FO(e):n;a[s]=o,n=a}return n}function FO(t){return Object.create(t||null)}function Pl(t,e){return[t,e]}function kb(t,e,n,i=Fe()){const r=Qr,o=Lf(i);try{return Qr={...o,editor:i,[t]:e},n()}finally{Qr=r}}function Tb(t,e=()=>{}){return(n,i=Fe())=>r=>{const o=Lf(i),s=o&&o[t],a=$f(n,s||e(i));return a&&a!==s?kb(t,a,r,i):r()}}function Eb(t,e,n,i){return Object.assign(Dv(Symbol(e),{isEqual:i,parse:n}),{[t]:!0})}const LO=(t,e,n)=>{Nb(t),n()};function Nb(t){if(!rl(t))return;const e=t;if(e.querySelector("style")===null)return;const n=new Map;function i(r){let o=n.get(r);if(o===void 0){o=new Set;for(let s=0;s<r.style.length;s++)o.add(r.style[s]);n.set(r,o)}return o}try{for(const r of Array.from(e.styleSheets)){let o;try{o=r.cssRules}catch{continue}for(const s of Array.from(o)){if(!Ln(s,CSSStyleRule))continue;let a;try{a=e.querySelectorAll(s.selectorText)}catch{continue}for(const l of Array.from(a)){if(!he(l))continue;const c=i(l);for(let u=0;u<s.style.length;u++){const d=s.style[u];c.has(d)||l.style.setProperty(d,s.style.getPropertyValue(d),s.style.getPropertyPriority(d))}}}}}catch{}}const Ab="@lexical/html/DOM",Pb=Symbol.for("@lexical/html/DOMExportContext"),Db="@lexical/html/DOMImport",Dl=Symbol.for("@lexical/html/DOMImportContext");function Ob(t,e,n){return Eb(Pb,t,e,n)}Ob("root",Boolean);const $O=Ob("isExport",Boolean);function zO(t){const e=Jr(t,Ab);return e?e.output.defaults:void 0}function BO(t){const e=Jr(t,Ab);return e?e.output.runtime:void 0}function VO(t=Fe()){const e=BO(t);return e?e.getSessionConfig():ul(t)}const WO=Tb(Pb,zO),Ol=Symbol.for("@lexical/html/SelectorImpl");function ks(t,e){const n={kind:"element",predicate:(i=e,i.length===0?he:i.length===1?i[0]:(o,s)=>{for(const a of i)if(!a(o,s))return!1;return!0}),tags:t};var i;const r=o=>ks(t,[...e,o]);return{[Ol]:n,attr:(o,s,a)=>r(zf(o,s,a)),classAll:(...o)=>r(Ib(o)),classAny:(...o)=>r((function(s){const a=Mb(s);return a.length===0?()=>!1:l=>{if(!he(l))return!1;const c=l.classList;for(const u of a)if(c.contains(u))return!0;return!1}})(o)),styleAny:(o,s,a)=>r((function(l,c,u){if(typeof c=="string")return d=>he(d)&&d.style.getPropertyValue(l)===c;if(c instanceof RegExp){const d=u&&u.capture,f=c;return(p,h)=>{if(!he(p))return!1;const m=p.style.getPropertyValue(l);if(!m)return!1;const g=m.match(f);return g!==null&&(d!==void 0&&(h[d]=g),!0)}}Zr(362,JSON.stringify(l))})(o,s,a))}}function Mb(t){const e=[];for(const n of t)n&&e.push(n);return e}function Ib(t){const e=Mb(t);return e.length===0?()=>!0:n=>{if(!he(n))return!1;const i=n.classList;for(const r of e)if(!i.contains(r))return!1;return!0}}function zf(t,e,n){if(e===!0)return i=>he(i)&&i.hasAttribute(t);if(typeof e=="string")return i=>he(i)&&i.getAttribute(t)===e;if(e instanceof RegExp){const i=n&&n.capture,r=e;return(o,s)=>{if(!he(o))return!1;const a=o.getAttribute(t);if(a==null)return!1;const l=a.match(r);return l!==null&&(i!==void 0&&(s[i]=l),!0)}}Zr(361,JSON.stringify(t))}const KO={kind:"text",predicate:Et,tags:new Set},UO={[Ol]:KO},qO={kind:"comment",predicate:t=>t.nodeType===8,tags:new Set},HO={[Ol]:qO},er={any:()=>ks(new Set,[]),comment:()=>HO,tag(...t){t.length>0||Zr(363);const e=new Set;for(const n of t)e.add(n.toUpperCase());return ks(e,[])},text:()=>UO};function jb(t,e){return he(t)&&t.nodeName===e.toUpperCase()}const Rb=/[A-Za-z0-9_-]/;let YO=class{constructor(e,n){this.source=e,this.pos=n}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(){const e=this.pos;for(;!this.eof()&&Rb.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){const e=this.consume();this.assert(e==='"'||e==="'","expected quote");const n=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const i=this.source.slice(n,this.pos);return this.pos++,i.replace(/\\(.)/g,"$1")}assert(e,n){e||Zr(364,String(this.pos+1),n,this.source)}};function GO(t){const e=new Set,n=[],i=[];if(t.skipWhitespace(),t.peek()==="*")t.consume();else if(Rb.test(t.peek())){const r=t.readIdent();r&&e.add(r.toUpperCase())}for(;!t.eof();){const r=t.peek();if(r==="."){t.consume();const o=t.readIdent();t.assert(o!=="",'expected class name after "."'),i.push(o)}else if(r==="#"){t.consume();const o=t.readIdent();t.assert(o!=="",'expected id after "#"'),n.push(zf("id",o))}else{if(r!=="[")break;{t.consume(),t.skipWhitespace();const o=t.readIdent();t.assert(o!=="",'expected attribute name after "["'),t.skipWhitespace();let s=!0;if(t.peek()==="="){t.consume(),t.skipWhitespace();const a=t.peek();a==='"'||a==="'"?s=t.readQuoted():(s=t.readIdent(),t.assert(s!=="","expected attribute value")),t.skipWhitespace()}t.assert(t.peek()==="]",'expected "]"'),t.consume(),n.push(zf(o,s))}}}return i.length>0&&n.push(Ib(i)),{predicates:n,tags:e}}function XO(t){const e=new YO(t,0),n=[];for(;;){const r=GO(e);if(n.push(r),e.skipWhitespace(),e.eof())break;e.assert(e.peek()===",",'expected "," (selector lists are the only supported combinator)'),e.consume(),e.skipWhitespace()}if(n.length===1)return ks(n[0].tags,n[0].predicates);const i=new Set;for(const r of n)for(const o of r.tags)i.add(o);return ks(i,[(r,o)=>{for(const s of n){const a=r.nodeName;if(s.tags.size>0&&!s.tags.has(a))continue;let l=!0;for(const c of s.predicates)if(!c(r,o)){l=!1;break}if(l)return!0}return!1}])}function Gj(t){return t}function eo(t,e,n){return Eb(Dl,t,e,n)}const JO=eo("importSource",()=>"unknown"),ZO=eo("importSourceDataTransfer",()=>null),Bf=eo("textFormat",()=>0),QO=eo("textStyle",()=>({}));function eM(t){if(!he(t))return!1;if(t.nodeName==="PRE")return!0;const e=t.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function tM(t){if(Et(t))return!0;if(!he(t))return!1;const e=t.style.display;return e?e.startsWith("inline"):!xs(t)&&cl(t)}const nM=eo("whitespaceConfig",()=>({isInline:tM,preservesWhitespace:eM})),iM=eo("importOverlays",()=>[]);let rM=class{constructor(e){this.record=e}get(e){return Cs(this.record,e)}set(e,n){this.record[e.key]=n}update(e,n){this.record[e.key]=n(Cs(this.record,e))}has(e){return Object.prototype.hasOwnProperty.call(this.record,e.key)}};function Fb(t){const e=Jr(t,Db);return e?e.output.defaults:void 0}function oM(t,e=Fe()){return Cs((function(n){return jO(Dl,n)||Fb(n)})(e),t)}const Lb=Tb(Dl,Fb),Ts=er,sM=new Set(["center","end","justify","left","right","start"]);function $b(t){return sM.has(t)}const aM={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},lM={CODE:vP,MARK:pd},cM=new Set(["font-weight","font-style","text-decoration","vertical-align"]),uM={$import:(t,e)=>{const n=t.get(Bf),i=aM[e.nodeName],r=(function(f){return{fontStyle:f.style.fontStyle,fontWeight:f.style.fontWeight,textDecoration:f.style.textDecoration,verticalAlign:f.style.verticalAlign}})(e),o=i?(s=i,{fontStyle:(a=r).fontStyle||s.fontStyle,fontWeight:a.fontWeight||s.fontWeight,textDecoration:a.textDecoration||s.textDecoration,verticalAlign:a.verticalAlign||s.verticalAlign}):r;var s,a;let l=(c=n,u=(function(f){let p=0,h=0;const{fontWeight:m,fontStyle:g,textDecoration:y,verticalAlign:x}=f;if(m==="700"||m==="bold"?p|=mv:m!=="normal"&&m!=="400"||(h|=mv),g==="italic"?p|=gv:g==="normal"&&(h|=gv),y){const b=y.split(" ");b.includes("underline")&&(p|=vv),b.includes("line-through")&&(p|=yv),b.includes("none")&&(h|=vv|yv)}return x==="sub"?(p|=dd,h|=fd):x==="super"?(p|=fd,h|=dd):x==="baseline"&&(h|=dd|fd),{clear:h,set:p}})(o),c&~u.clear|u.set);var c,u;const d=lM[e.nodeName];return d&&(l|=d),l===n?t.$importChildren(e):t.$importChildren(e,{context:[Pl(Bf,l)]})},match:Ts.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function zb(t,e,n){let i=t;for(;;){let r=null;for(;(r=e?i.nextSibling:i.previousSibling)===null;){const s=i.parentNode;if(s===null)return null;i=s}if(i=r,!n.isInline(i))return null;let o=i;for(;(o=e?i.firstChild:i.lastChild)!==null;)i=o;if(Et(i))return i;if(i.nodeName==="BR")return null}}function Bb(t,e){return e!==0&&q(t)?t.setFormat(e):t}function Vb(t,e){if(q(t)){const n=(function(i){let r="";for(const o in i)cM.has(o)||(r+=`${o}: ${i[o]}; `);return r.trimEnd()})(e);n!==""&&t.setStyle(n)}return t}const dM={$import:(t,e)=>{const n=t.get(Bf),i=t.get(QO),r=t.get(nM);if((function(a,l){let c=a.parentNode;for(;c!==null;){if(l.preservesWhitespace(c))return!0;c=c.parentNode}return!1})(e,r)){const a=r0(e.textContent||"");for(const l of a)Bb(l,n),Vb(l,i);return a}const o=(function(a,l){let c=(a.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(c.length===0)return"";if(c[0]===" "){let u=a,d=!0;for(;u!==null&&(u=zb(u,!1,l))!==null;){const f=u.textContent||"";if(f.length>0){/[ \t\n]$/.test(f)&&(c=c.slice(1)),d=!1;break}}d&&(c=c.slice(1))}if(c.length>0&&c[c.length-1]===" "){let u=a,d=!0;for(;u!==null&&(u=zb(u,!0,l))!==null;)if((u.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){d=!1;break}d&&(c=c.slice(0,-1))}return c})(e,r);if(o==="")return[];const s=He(o);return Bb(s,n),Vb(s,i),[s]},match:Ts.text(),name:"@lexical/html/#text"},fM={$import:()=>[],match:Ts.tag("script","style"),name:"@lexical/html/script-style-ignore"},pM={$import:()=>[oi()],match:Ts.tag("br"),name:"@lexical/html/br"},hM=[fM,{$import:(t,e)=>{const n=De();if(Mn(n,e),Yr(e,n),n.getFormatType()===""){const i=e.getAttribute("align");i&&$b(i)&&n.setFormat(i)}return tn(n,e),[n.splice(0,0,t.$importChildren(e))]},match:Ts.tag("p"),name:"@lexical/html/p"},dM,pM,uM];function mM(t,e){const n=[];let i=0,r=0;for(;i<t.length&&r<e.length;)t[i]<=e[r]?n.push(t[i++]):n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);return n}function gM(t){const e=[],n=new Map,i=[],r=[],o=[],s=new Set;t.forEach((l,c)=>{const u=(function(f){const p=f[Ol];return p===void 0&&Zr(360),p})(l.match),d=l.name||(function(f,p){return f.kind==="text"?`#text@${p}`:f.kind==="comment"?`#comment@${p}`:f.tags.size===0?`*@${p}`:`${Array.from(f.tags).join(",").toLowerCase()}@${p}`})(u,c);if(l.name&&s.add(l.name),e.push({$import:l.$import,name:d,predicate:u.predicate}),u.kind==="text")r.push(c);else if(u.kind==="comment")o.push(c);else if(u.tags.size===0)i.push(c);else for(const f of u.tags){let p=n.get(f);p||(p=[],n.set(f,p)),p.push(c)}});const a=new Map;if(i.length===0)for(const[l,c]of n)a.set(l,c);else for(const[l,c]of n)a.set(l,mM(c,i));return{byTag:a,commentIndices:o,rules:e,textIndices:r,wildcardIndices:i}}function Wb(t,e){return Et(e)?t.textIndices:e.nodeType===8?t.commentIndices:he(e)?t.byTag.get(e.nodeName)||t.wildcardIndices:yM}const yM=Object.freeze([]);function vM(t){const e=[];for(const n of t)if(xM(n))for(const i of n.rules)e.push(i);else e.push(n);return e}function xM(t){return typeof t=="object"&&t!==null&&"__type"in t&&t.__type==="CompiledOverlayRules"}function Kb(t){return ds(t)||me(t)&&!t.isInline()}function Ub(t,e){const n=[];let i=[];const r=()=>{i.length!==0&&(n.push(e().splice(0,0,i)),i=[])};for(const o of t)if(Kb(o)){if(r(),D(o)){const s=Ub(o.getChildren(),e);o.splice(0,o.getChildrenSize(),s)}n.push(o)}else i.push(o);return r(),n}function bM(t,e,n){const i=De();if(he(n)){const r=n.style.textAlign;$b(r)&&i.setFormat(r)}return[i.splice(0,0,t)]}const _M={$accepts:Kb,$packageRun:bM,name:"RootSchema"},wM=Object.freeze({});function SM(t,e){return{$importChildren:(i,r)=>(function(o,s,a){const l=a&&a.rules?a.rules.dispatch:void 0;l&&o.overlays.push(l);try{const c=()=>qb(o,s,a);return a&&a.context?Lb(a.context,o.editor)(c):c()}finally{l&&o.overlays.pop()}})(t,i,r),$importOne:(i,r)=>Vf(t,i,r),captures:e,get:i=>oM(i,t.editor),session:t.session}}function qb(t,e,n){const i=n&&n.$onChild,r=[];for(const a of Array.from(e.childNodes)){const l=Vf(t,a,void 0);for(const c of l){const u=i?i(c):c;u!=null&&r.push(u)}}const o=n&&n.$after?n.$after(r):r,s=n&&n.schema;return s?(function(a,l,c,u){const d=[];let f=null;const p=()=>{if(f===null)return;const h=f;if(f=null,a.$packageRun){const m=a.$packageRun(h,c,u);if(m.length>0){for(const g of m)d.push(g);return}}if(a.onReject==="hoist")for(const m of h)d.push(m)};for(const h of l)a.$accepts(h,c)?(p(),d.push(h)):(f===null&&(f=[]),f.push(h));return p(),a.$finalize?a.$finalize(d,c):d})(s,o,null,e):o}function Vf(t,e,n){const i=()=>(function(r,o){const s=(function(u,d){const f=[];for(let h=u.overlays.length-1;h>=0;h--){const m=u.overlays[h],g=Wb(m,d);g.length>0&&f.push({dispatch:m,indices:g})}const p=Wb(u.dispatch,d);return p.length>0&&f.push({dispatch:u.dispatch,indices:p}),f})(r,o);if(s.length===0)return Hb(r,o);let a=0,l=0;const c=()=>{for(;a<s.length;){const{dispatch:u,indices:d}=s[a];for(;l<d.length;){const f=d[l++],p=u.rules[f],h={};if(p.predicate(o,h)){const m=SM(r,Object.keys(h).length===0?wM:h);try{return p.$import(m,o,c)}catch(g){throw g}}}a++,l=0}return Hb(r,o)};return c()})(t,e);return n&&n.context?Lb(n.context,t.editor)(i):i()}function Hb(t,e){if(e.childNodes.length===0)return[];const n=[];for(const i of Array.from(e.childNodes)){const r=Vf(t,i,void 0);for(const o of r)n.push(o)}return n}const CM={$import:(t,e)=>t.$importChildren(e),match:er.any(),name:"@lexical/html/default-hoist"},to={build(t,e){const n=gM(vM(e.rules)),i=$f(e.contextDefaults,void 0),r=e.preprocess;return{$generateNodesFromDOM:(o,s)=>{const a=s&&s.context?$f(s.context,i):i,l=a!==void 0&&a!==i?a:Object.create(i||null),c=new rM(l),u={session:c};return(function(d,f,p){let h=d.length-1;const m=()=>{for(;h>=0;)return void(0,d[h--])(f,p,m)};m()})(s&&s.preprocess?[...r,...s.preprocess]:r,o,u),kb(Dl,l,()=>(function(d,f,p,h){return qb({dispatch:d,editor:f,overlays:h.get(iM).map(m=>m.dispatch),session:h},rl(p)?p.body:p,{schema:_M})})(n,t,o,c),t)},defaults:i}},config:{contextDefaults:[],preprocess:[LO],rules:[CM]},mergeConfig:(t,e)=>Rn(t,{...e,...e.contextDefaults&&{contextDefaults:[...t.contextDefaults,...e.contextDefaults]},...e.preprocess&&{preprocess:[...t.preprocess,...e.preprocess]},...e.rules&&{rules:[...e.rules,...t.rules]}}),name:Db};function kM(t,e){return bO(to).$generateNodesFromDOM(t,e)}const Ml={dependencies:[Ji(to,{rules:hM})],name:"@lexical/html/CoreImport"},TM=[{$import:()=>[Al()],match:er.tag("hr"),name:"@lexical/html/hr"}];Ji(to,{rules:TM});const Bn={any:er.any,comment:er.comment,css:XO,tag:er.tag,text:er.text},Yb=new Set(["STYLE","SCRIPT"]);function EM(t,e){Nb(e);const n=rl(e)?e.body.childNodes:e.childNodes,i=[],r=[];for(const o of n)if(!Yb.has(o.nodeName)){const s=Xb(o,t,r,!1);if(s!==null)for(const a of s)i.push(a)}return(function(o){for(const s of o)s.getParent()&&s.getNextSibling()instanceof Jd&&s.insertAfter(oi());for(const s of o){const a=s.getParent();a&&a.splice(s.getIndexWithinParent(),1,s.getChildren())}})(r),i}function NM(t,e=null,n=Fe()){return WO([Pl($O,!0)],n)(()=>{const i=Be(),r=VO(n),o=t.append.bind(t);for(const s of i.getChildren())Gb(n,s,o,e,r);return t})}function AM(t,e=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Zr(338),NM(document.createElement("div"),e,t).innerHTML}function Gb(t,e,n,i=null,r=ul(t)){let o=r.$shouldInclude(e,i,t);const s=r.$shouldExclude(e,i,t);let a=e;i!==null&&q(e)&&(a=Z0(i,e,"clone"));const l=r.$exportDOM(a,t),{element:c,after:u,append:d,$getChildNodes:f}=l;if(!c)return!1;const p=document.createDocumentFragment(),h=f?f():D(a)?a.getChildren():[],m=p.append.bind(p);for(const g of h){const y=Gb(t,g,m,i,r);!o&&y&&r.$extractWithChild(e,g,i,"html",t)&&(o=!0)}if(o&&!s){if((he(c)||gf(c))&&(d?d(p):c.append(p)),n(c),u){const g=u.call(a,c);g&&(gf(c)?c.replaceChildren(g):c.replaceWith(g))}}else n(p);return o}function Xb(t,e,n,i,r=new Map,o){const s=[];if(Yb.has(t.nodeName))return s;let a=null;const l=(function(h,m){const{nodeName:g}=h,y=m._htmlConversions.get(g.toLowerCase());let x=null;if(y!==void 0)for(const b of y){const w=b(h);w!==null&&(x===null||(x.priority||0)<=(w.priority||0))&&(x=w)}return x!==null?x.conversion:null})(t,e),c=l?l(t):null;let u=null;if(c!==null){u=c.after;const h=c.node;if(a=Array.isArray(h)?h[h.length-1]:h,a!==null){for(const[,m]of r)if(a=m(a,o),!a)break;a&&s.push(...Array.isArray(h)?h:[a])}c.forChild!=null&&r.set(t.nodeName,c.forChild)}const d=t.childNodes;let f=[];const p=(a==null||!st(a))&&(a!=null&&ds(a)||i);for(let h=0;h<d.length;h++)f.push(...Xb(d[h],e,n,p,new Map(r),a));if(u!=null&&(f=u(f)),xs(t)&&(f=PM(t,f,p?()=>{const h=new Jd;return n.push(h),h}:De)),a==null)if(f.length>0)for(const h of f)s.push(h);else xs(t)&&(function(h){return h.nextSibling==null||h.previousSibling==null?!1:cl(h.nextSibling)&&cl(h.previousSibling)})(t)&&s.push(oi());else D(a)&&a.append(...f);return s}function PM(t,e,n){const i=t.style.textAlign,r=[];let o=[];for(let s=0;s<e.length;s++){const a=e[s];if(ds(a))i&&!a.getFormat()&&a.setFormat(i),r.push(a);else if(o.push(a),s===e.length-1||s<e.length-1&&ds(e[s+1])){const l=n();l.setFormat(i),l.append(...o),r.push(l),o=[]}}return r}function Wf(t,e){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(t,e);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(t,e);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}function Il(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Kf={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Jb(t){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(t):t}const Zb=(t,e)=>{if(!R(e))return e.insertRawText(t),!0;const n=i=>{const r=Z();R(r)&&i(r)};return i0(t,{linebreak:()=>n(i=>i.insertParagraph()),tab:()=>n(i=>i.insertNodes([us()])),text:i=>n(r=>r.insertText(i))}),!0},Uf={"application/x-lexical-editor":[(t,e,n)=>{try{const i=Fe(),r=JSON.parse(t);if(r&&r.namespace===i._config.namespace&&Array.isArray(r.nodes))return Hf(i,FM(r.nodes),e),!0}catch(i){console.error(i)}return n()}],"text/html":[(t,e,n)=>{try{const i=Fe(),r=new DOMParser().parseFromString(Jb(t),"text/html");return Hf(i,EM(i,r),e),!0}catch(i){return console.error(i),n()}}],"text/plain":[Zb],"text/uri-list":[Zb]};function DM(t,e,n,i){if(!t)return!1;const r=o=>!!t[o]&&t[o](e,n,r.bind(null,o-1),i);return r(t.length-1)}function Qb(t,e,n){const i=e.getData("text/plain");for(const r of(function(o){return Object.keys(o.$importMimeType).filter(s=>o.$importMimeType[s]!==void 0).sort((s,a)=>{const l=o.priority[s],c=o.priority[a];return l===void 0&&c===void 0?s<a?-1:s>a?1:0:l===void 0?1:c===void 0?-1:l-c})})(t)){const o=e.getData(r);if(o&&(r!=="text/html"||o!==i)&&DM(t.$importMimeType[r],o,n,e))return!0}return!1}const OM={$importMimeType:Uf,$insertDataTransfer:(t,e)=>Qb({$importMimeType:Uf,priority:Kf},t,e),priority:Kf},e_={build:(t,e)=>({$importMimeType:e.$importMimeType,$insertDataTransfer:(n,i)=>Qb(e,n,i),priority:e.priority}),config:{$importMimeType:Uf,priority:Kf},mergeConfig(t,e){const n=Rn(t,e);if(e.$importMimeType){const i={...t.$importMimeType};for(const[r,o]of Object.entries(e.$importMimeType))if(o){const s=i[r];i[r]=s?[...s,...o]:o}n.$importMimeType=i}return e.priority&&(n.priority={...t.priority,...e.priority}),n},name:"@lexical/clipboard/Import"};Ji(e_,{$importMimeType:{"text/html":[(t,e,n,i)=>{const r=new DOMParser().parseFromString(Jb(t),"text/html"),o=kM(r,{context:[Pl(JO,"paste"),Pl(ZO,i)]});return Hf(Fe(),o,e),!0}]}});function t_(t,e=Z()){return e==null&&Il(166),R(e)&&e.isCollapsed()||e.getNodes().length===0?"":AM(t,e)}function n_(t,e=Z()){return e==null&&Il(166),R(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(RM(t,e))}function qf(t,e,n){(function(){const i=_O(e_.name);return i?i.output:OM})().$insertDataTransfer(t,e)}const i_="application/x-lexical-drag";function MM(t,e){const n={editorKey:e.getKey()};t.setData(i_,JSON.stringify(n))}function IM(t,e,n){const i=t.dataTransfer;if(i===null)return!1;const r=(function(c){const u=c.getData(i_);if(!u)return null;let d;try{d=JSON.parse(u)}catch{return null}return(f=d)!==null&&typeof f=="object"&&"editorKey"in f&&typeof f.editorKey=="string"?d:null;var f})(i);if(r===null)return!1;const o=(function(c){const u=Wf(c.clientX,c.clientY);if(u===null)return null;const d=qi(u.node);if(d===null)return null;if(q(d))return di(d,"next",u.offset);if(D(d))return Sf(d,u.offset,"next");const f=d.getParent();return f===null?null:Sf(f,d.getIndexWithinParent()+1,"next")})(t);if(o===null)return!1;const s=Y0(o);if(s===null)return!1;const a=r.editorKey===e.getKey(),l=Z();if(a){if(!R(l)||l.isCollapsed())return!1;if((function(c,u){const{anchor:d,focus:f}=bl(xl(u),"next");return hl(d,c)<0&&hl(c,f)<0})(o,l))return t.preventDefault(),!0;l.removeText()}if(!s.origin.isAttached())return t.preventDefault(),!0;if(n(i,yl(_f(s)),e),!a){const c=e.getRootElement(),u=c?c.ownerDocument:null,d=u?(function(f,p){const h=p.querySelectorAll('[data-lexical-editor="true"]');for(const m of Array.from(h)){const g=m.__lexicalEditor;if(g&&g.getKey()===f)return m}return null})(r.editorKey,u):null;d!==null&&d.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return t.preventDefault(),!0}function jM(t,e){return IM(t,e,qf)}function Hf(t,e,n){t.dispatchCommand(WP,{nodes:e,selection:n})||(n.insertNodes(e),(function(i){if(R(i)&&i.isCollapsed()){const r=i.anchor;let o=null;const s=nn(r,"previous");if(s)if(Bt(s))o=s.origin;else{const a=In(s,xt(Be(),"next").getFlipped());for(const l of a){if(q(l.origin)){o=l.origin;break}if(D(l.origin)&&!l.origin.isInline())break}}if(o&&q(o)){const a=o.getFormat(),l=o.getStyle();i.format===a&&i.style===l||(i.format=a,i.style=l,i.dirty=!0)}}})(n))}function r_(t,e,n,i=[]){let r=e===null||n.isSelected(e);const o=D(n)&&n.excludeFromCopy("html");let s=n;e!==null&&q(s)&&(s=Z0(e,s,"clone"));const a=D(s)?s.getChildren():[],l=(function(c){const u=c.exportJSON(),d=c.constructor;if(u.type!==d.getType()&&Il(58,d.name),D(c)){const f=u.children;Array.isArray(f)||Il(59,d.name)}return u})(s);q(s)&&s.getTextContentSize()===0&&(r=!1);for(let c=0;c<a.length;c++){const u=a[c],d=r_(t,e,u,l.children);!r&&D(n)&&d&&n.extractWithChild(u,e,"clone")&&(r=!0)}if(r&&!o)i.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];i.push(u)}return r}function RM(t,e){const n=[],i=Be().getChildren();for(let r=0;r<i.length;r++)r_(t,e,i[r],n);return{namespace:t._config.namespace,nodes:n}}function FM(t){const e=[];for(const n of t)e.push(xD(n));return e}let no=null;async function o_(t,e,n){if(no!==null)return!1;if(e!==null)return new Promise((c,u)=>{t.update(()=>{c(s_(t,e,n))})});const i=t.getRootElement(),r=t._window||window,o=r.document,s=At(r);if(i===null||s===null)return!1;const a=o.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(o.createTextNode("#")),i.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((c,u)=>{const d=t.registerCommand(za,f=>(Ln(f,ClipboardEvent)&&(d(),no!==null&&(r.clearTimeout(no),no=null),c(s_(t,f,n))),!0),wD);no=r.setTimeout(()=>{d(),no=null,c(!1)},50),o.execCommand("copy"),a.remove()})}function s_(t,e,n){if(n===void 0){const r=At(t._window),o=Z();if(!o||o.isCollapsed()||!r)return!1;const s=r.anchorNode,a=r.focusNode;if(s!==null&&a!==null&&!gs(t,s,a))return!1;n=a_(o)}e.preventDefault();const i=e.clipboardData;return i!==null&&(l_(i,n),!0)}const LM=[["text/html",t_],["application/x-lexical-editor",n_]];function a_(t=Z()){return(function(e,n){const i={"text/plain":""};for(const[r,o]of Object.entries(e))if(o){const s=zM(o,n);s!==null&&(i[r]=s)}return i})($M(),t)}function l_(t,e){for(const[n]of LM)e[n]===void 0&&t.setData(n,"");for(const n in e){const i=e[n];i!==void 0&&t.setData(n,i)}}function $M(t=Fe()){const e=Jr(t,BM.name);return e?e.output:c_}const c_={"application/x-lexical-editor":[(t,e)=>t?n_(Fe(),t):e()],"text/html":[(t,e)=>t?t_(Fe(),t):e()],"text/plain":[(t,e)=>t?t.getTextContent():e()]};function zM(t,e){const n=i=>t[i]?t[i](e,n.bind(null,i-1)):null;return n(t.length-1)}const BM={build:(t,e,n)=>e.$exportMimeType,config:{$exportMimeType:c_},mergeConfig(t,e){const n=Rn(t,e);if(e.$exportMimeType){const i={...t.$exportMimeType};for(const[r,o]of Object.entries(e.$exportMimeType))if(o){const s=i[r];i[r]=s?[...s,...o]:o}n.$exportMimeType=i}return n},name:"@lexical/clipboard/GetClipboardData"};function VM(t,e){return t&&e!==null?Rn(t,e):e}const WM={build:(t,e)=>zn(e),config:{escapeFormatTriggers:{capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}}},conflictsWith:["@lexical/plain-text"],dependencies:[IO,EO,AO],mergeConfig:function(t,e){const n=Rn(t,e);return e.escapeFormatTriggers&&(n.escapeFormatTriggers=(function(i,r){const o=Rn(i,r);for(const s of Object.keys(r))o[s]=VM(i[s],r[s]);return o})(t.escapeFormatTriggers,e.escapeFormatTriggers)),n},name:"@lexical/rich-text",nodes:()=>[jl,Es],register:(t,e,n)=>Dt(()=>p_(t,n.getOutput().escapeFormatTriggers))},KM=[{$import:(t,e)=>{const n=tr(e.nodeName.toLowerCase());return Yr(e,n),Mn(n,e),tn(n,e),[n.splice(0,0,t.$importChildren(e))]},match:Bn.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},{$import:(t,e)=>{const n=Yf();return Mn(n,e),Yr(e,n),tn(n,e),[n.splice(0,0,t.$importChildren(e))]},match:Bn.tag("blockquote"),name:"@lexical/rich-text/blockquote"},{$import:(t,e,n)=>{const i=e.firstChild;return i&&he(r=i)&&r.nodeName==="SPAN"&&r.style.fontSize==="26pt"?t.$importChildren(e):n();var r},match:Bn.tag("p"),name:"@lexical/rich-text/google-docs-title-p"},{$import:(t,e,n)=>e.style.fontSize!=="26pt"?n():[tr("h1").splice(0,0,t.$importChildren(e))],match:Bn.tag("span"),name:"@lexical/rich-text/google-docs-title-span"}];Ji(to,{rules:KM});const u_=se("DRAG_DROP_PASTE_FILE");class Es extends Ct{static getType(){return"quote"}static clone(e){return new Es(e.__key)}createDOM(e){const n=document.createElement("blockquote");return Zi(n,e.theme.quote),n}updateDOM(e,n){return!1}static importDOM(){return{blockquote:e=>({conversion:UM,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(he(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();i&&(n.style.textAlign=i);const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){return Yf().updateFromJSON(e)}insertNewAfter(e,n){const i=De(),r=this.getDirection();return i.setDirection(r),this.insertAfter(i,n),i}collapseAtStart(){const e=De();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function Yf(){return yn(new Es)}let jl=class uw extends Ct{__tag;static getType(){return"heading"}static clone(e){return new uw(e.__tag,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__tag=e.__tag}constructor(e="h1",n){super(n),this.__tag=e}getTag(){return this.getLatest().__tag}setTag(e){const n=this.getWritable();return n.__tag=e,n}createDOM(e){const n=this.__tag,i=document.createElement(n),r=e.theme.heading;if(r!==void 0){const o=r[n];Zi(i,o)}return i}updateDOM(e,n,i){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:io,priority:0}),h2:e=>({conversion:io,priority:0}),h3:e=>({conversion:io,priority:0}),h4:e=>({conversion:io,priority:0}),h5:e=>({conversion:io,priority:0}),h6:e=>({conversion:io,priority:0}),p:e=>{const n=e.firstChild;return n!==null&&d_(n)?{conversion:()=>({node:null}),priority:3}:null},span:e=>d_(e)?{conversion:n=>({node:tr("h1")}),priority:3}:null}}exportDOM(e){const{element:n}=super.exportDOM(e);if(he(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();i&&(n.style.textAlign=i);const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){return tr(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,n=!0){const i=e?e.anchor.offset:0,r=this.getLastDescendant(),o=!r||e&&e.anchor.key===r.getKey()&&i===r.getTextContentSize()||!e?De():tr(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,n),i===0&&!this.isEmpty()&&e){const a=De();a.select(),this.replace(a,!0)}return o}collapseAtStart(){if(this.isEmpty()){const e=De();this.getChildren().forEach(n=>e.append(n)),this.replace(e)}return!0}extractWithChild(){return!0}};function d_(t){return t.nodeName.toLowerCase()==="span"&&t.style.fontSize==="26pt"}function io(t){const e=t.nodeName.toLowerCase();let n=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(n=tr(e),Yr(t,n),Mn(n,t),tn(n,t)),{node:n}}function UM(t){const e=Yf();return Mn(e,t),Yr(t,e),tn(e,t),{node:e}}function tr(t="h1"){return yn(new jl(t))}function qM(t){return t instanceof jl}function Rl(t){let e=null;if(Ln(t,DragEvent)?e=t.dataTransfer:Ln(t,ClipboardEvent)&&(e=t.clipboardData),e===null)return[!1,[],!1];const n=e.types,i=n.includes("Files"),r=n.includes("text/html")||n.includes("text/plain");return[i,Array.from(e.files),r]}function f_(t){const e=qi(t);return me(e)}function ro(t,e,n,i){let r=!1,o=null;if(t.isCollapsed()&&t.anchor.type==="text"){const a=t.anchor.getNode();if(q(a)){o=a;const l=t.anchor.offset,c=l===a.getTextContentSize()&&a.getNextSibling()===null,u=l===0&&a.getPreviousSibling()===null;r=n==="end"&&c||n==="start"&&u||n==="both"&&(c||u)}}let s=!1;for(const[a,l]of Object.entries(i)){if(l==null||!l[e])continue;const c=a;if(l.onlyAtBoundary){if(!(r&&o&&q(o)&&o.hasFormat(c)))continue;s=!0}t.hasFormat(c)&&t.toggleFormat(c)}s&&t.setStyle("")}const HM={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function p_(t,e=pi(HM)){return lt(t.registerCommand(Nd,()=>{const n=Z();return Xe(n)?(n.clear(),!0):(R(n)&&ro(n,"click","both",e.peek()),!1)},fe),t.registerCommand(Li,n=>{const i=Z();return R(i)?(i.deleteCharacter(n),!0):!!Xe(i)&&(i.deleteNodes(),!0)},fe),t.registerCommand(ns,n=>{const i=Z();return!!R(i)&&(i.deleteWord(n),!0)},fe),t.registerCommand(is,n=>{const i=Z();return!!R(i)&&(i.deleteLine(n),!0)},fe),t.registerCommand(jr,n=>{const i=Z();if(typeof n=="string")i!==null&&i.insertText(n);else{if(i===null)return!1;const r=n.dataTransfer;if(r!=null)qf(r,i);else if(R(i)){const o=n.data;return o&&i.insertText(o),!0}}return!0},fe),t.registerCommand(Ra,()=>{const n=Z();return!!R(n)&&(n.removeText(),!0)},fe),t.registerCommand(Qt,n=>{const i=Z();return!!R(i)&&(i.formatText(n),!0)},fe),t.registerCommand(qP,n=>{const i=Z();if(!R(i)&&!Xe(i))return!1;const r=i.getNodes();for(const o of r){const s=Ye(o,a=>D(a)&&!a.isInline());s!==null&&s.setFormat(n)}return!0},fe),t.registerCommand(Ir,n=>{const i=Z();return!!R(i)&&(i.insertLineBreak(n),!0)},fe),t.registerCommand(ts,()=>{const n=Z();return!!R(n)&&(n.insertParagraph(),!0)},fe),t.registerCommand(KP,()=>{const n=us(),i=Z();return R(i)&&(n.setFormat(i.format),n.setStyle(i.style)),gD([n]),!0},fe),t.registerCommand(UP,()=>sb(n=>{const i=n.getIndent();n.setIndent(i+1)}),fe),t.registerCommand(dx,()=>sb(n=>{const i=n.getIndent();i>0&&n.setIndent(Math.max(0,i-1))}),fe),t.registerCommand(rx,n=>{const i=Z();if(Xe(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),r[0].selectPrevious(),!0}else if(R(i)){const r=uf(i.focus,!0);if(!n.shiftKey&&me(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),n.preventDefault(),!0}return!1},fe),t.registerCommand(ox,n=>{const i=Z();if(Xe(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),r[0].selectNext(0,0),!0}else if(R(i)){if((function(o){const s=o.focus;return s.key==="root"&&s.offset===Be().getChildrenSize()})(i))return n.preventDefault(),!0;const r=uf(i.focus,!1);if(!n.shiftKey&&me(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),n.preventDefault(),!0}return!1},fe),t.registerCommand(nx,n=>{const i=Z();if(Xe(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),J0(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!R(i))return!1;if(n.shiftKey||ro(i,"arrow","start",e.peek()),nb(i,!0)){const r=n.shiftKey;return n.preventDefault(),rb(i,r,!0),!0}return!1},fe),t.registerCommand(ex,n=>{const i=Z();if(Xe(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),J0(r[0])?r[0].selectPrevious():r[0].selectNext(0,0),!0}if(!R(i))return!1;if(n.shiftKey||ro(i,"arrow","end",e.peek()),nb(i,!1)){const r=n.shiftKey;return n.preventDefault(),rb(i,r,!1),!0}return!1},fe),t.registerCommand(ax,n=>{if(f_(n.target))return!1;const i=Z();if(R(i)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:o}=r;if(o.offset!==0)return!1;const s=o.getNode();if(Qe(s))return!1;const a=rO(s);return a.getIndent()>0&&(a.is(s)||s.is(a.getFirstDescendant()))})(i))return n.preventDefault(),t.dispatchCommand(dx,void 0);if(ni&&navigator.language==="ko-KR")return!1}else if(!Xe(i))return!1;return n.preventDefault(),t.dispatchCommand(Li,!0)},fe),t.registerCommand(cx,n=>{if(f_(n.target))return!1;const i=Z();return!(!R(i)&&!Xe(i))&&(n.preventDefault(),t.dispatchCommand(Li,!1))},fe),t.registerCommand($a,n=>{let i=Z();if(Xe(i)){const r=i.getNodes();r.length===1&&me(r[0])&&!r[0].isInline()&&(i=r[0].selectNext())}if(!R(i))return!1;if(ro(i,"enter","both",e.peek()),n!==null){if((ni||Wo||Ko)&&Vo)return!1;if(n.preventDefault(),n.shiftKey)return t.dispatchCommand(Ir,!1)}return t.dispatchCommand(ts,void 0)},fe),t.registerCommand(lx,()=>{const n=Z();return!!R(n)&&(t.blur(),!0)},fe),t.registerCommand(fx,n=>{const[,i]=Rl(n);if(i.length>0){const r=n.clientX,o=n.clientY,s=Wf(r,o);if(s!==null){const{offset:a,node:l}=s,c=qi(l);if(c!==null){const u=Jx();if(q(c))u.anchor.set(c.getKey(),a,"text"),u.focus.set(c.getKey(),a,"text");else{const f=c.getParentOrThrow().getKey(),p=c.getIndexWithinParent()+1;u.anchor.set(f,p,"element"),u.focus.set(f,p,"element")}const d=Ri(u);pt(d)}t.dispatchCommand(u_,i)}return n.preventDefault(),!0}return jM(n,t)},fe),t.registerCommand(px,n=>{const[i]=Rl(n),r=Z();return!(i&&!R(r))&&(R(r)&&!r.isCollapsed()&&n.dataTransfer!==null&&(l_(n.dataTransfer,a_(r)),MM(n.dataTransfer,t)),!0)},fe),t.registerCommand(hx,n=>{const[i]=Rl(n),r=Z();if(i&&!R(r))return!1;const o=n.clientX,s=n.clientY,a=Wf(o,s);if(a!==null){const l=qi(a.node);me(l)&&n.preventDefault()}return!0},fe),t.registerCommand(mx,()=>(PD(),!0),fe),t.registerCommand(za,n=>(o_(t,Ln(n,ClipboardEvent)?n:null),!0),fe),t.registerCommand(Ad,n=>((async function(i,r){await o_(r,Ln(i,ClipboardEvent)?i:null),r.update(()=>{const o=Z();R(o)?o.removeText():Xe(o)&&o.getNodes().forEach(s=>s.remove())})})(n,t),!0),fe),t.registerCommand(ja,n=>{const[,i,r]=Rl(n);return i.length>0&&!r?(t.dispatchCommand(u_,i),!0):Hi(n.target)&&nf(n.target)?!1:Z()!==null&&((function(o,s){o.preventDefault(),s.update(()=>{const a=Z(),l=Ln(o,InputEvent)||Ln(o,KeyboardEvent)?null:o.clipboardData;l!=null&&a!==null&&qf(l,a)},{tag:rD})})(n,t),!0)},fe),t.registerCommand(sx,()=>{const n=Z();return R(n)&&ro(n,"space","both",e.peek()),!1},fe),t.registerCommand(ux,()=>{const n=Z();return R(n)&&ro(n,"tab","both",e.peek()),!1},fe),t.registerCommand(tx,n=>{const i=Z();if(!R(i))return!1;const{anchor:r}=i;if(r.type!=="element"||r.offset!==0)return!1;const o=r.getNode();if(!D(o))return!1;const s=o.getFirstChild();if(!me(s)||!s.isInline())return!1;const a=o.getLastDescendant();if(a==null||me(a))return!1;const l=o.getKey(),c=o.selectEnd();return n.shiftKey&&c.anchor.set(l,0,"element"),n.preventDefault(),n.stopPropagation(),!0},fe),t.registerCommand(ix,n=>{const i=Z();if(!R(i))return!1;const{anchor:r,focus:o}=i,s=Ye(o.getNode(),u=>D(u)&&!u.isInline());if(s===null)return!1;const a=s.getFirstChild();if(!me(a)||!a.isInline())return!1;const l=s.getLastDescendant();if(l==null||me(l)||Ye(r.getNode(),u=>D(u)&&!u.isInline())!==s)return!1;const c=s.getKey();return(o.type!=="element"||o.key!==c||o.offset!==0)&&(i.focus.set(c,0,"element"),n.shiftKey||i.anchor.set(c,0,"element"),n.preventDefault(),n.stopPropagation(),!0)},fe))}function YM(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Gf=nt?N.useLayoutEffect:N.useEffect;function GM({editor:t,ErrorBoundary:e}){return(function(n,i){const[r,o]=N.useState(()=>n.getDecorators());return Gf(()=>n.registerDecoratorListener(s=>{Ul.flushSync(()=>{o(s)})}),[n]),N.useEffect(()=>{o(n.getDecorators())},[n]),N.useMemo(()=>{const s=[],a=Object.keys(r);for(let l=0;l<a.length;l++){const c=a[l],u=v.jsx(i,{onError:f=>n._onError(f),children:v.jsx(N.Suspense,{fallback:null,children:r[c]})}),d=n.getElementByKey(c);d!==null&&s.push(Ul.createPortal(u,d,c))}return s},[i,r,n])})(t,e)}function XM({editor:t,ErrorBoundary:e}){return(function(n){const i=Ff.maybeFromEditor(n);if(i&&i.hasExtensionByName(PO.name)){for(const r of["@lexical/plain-text","@lexical/rich-text"])i.hasExtensionByName(r)&&YM(320,r);return!0}return!1})(t)?null:v.jsx(GM,{editor:t,ErrorBoundary:e})}function h_(t){return t.getEditorState().read(Sb(t.isComposing()))}function JM({contentEditable:t,placeholder:e=null,ErrorBoundary:n}){const[i]=tt();return(function(r){Gf(()=>lt(p_(r),Cb(r)),[r])})(i),v.jsxs(v.Fragment,{children:[t,v.jsx(ZM,{content:e}),v.jsx(XM,{editor:i,ErrorBoundary:n})]})}function ZM({content:t}){const[e]=tt(),n=(function(r){const[o,s]=N.useState(()=>h_(r));return Gf(()=>{function a(){const l=h_(r);s(l)}return a(),lt(r.registerUpdateListener(()=>{a()}),r.registerEditableListener(()=>{a()}))},[r]),o})(e),i=tO();return n?typeof t=="function"?t(i):t:null}const m_=nt?N.useLayoutEffect:N.useEffect;function QM({editor:t,ariaActiveDescendant:e,ariaAutoComplete:n,ariaControls:i,ariaDescribedBy:r,ariaErrorMessage:o,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:p,className:h,id:m,role:g="textbox",spellCheck:y=!0,style:x,tabIndex:b,"data-testid":w,..._},C){const[E,S]=N.useState(t.isEditable()),k=N.useCallback(P=>{P&&P.ownerDocument&&P.ownerDocument.defaultView?t.setRootElement(P):t.setRootElement(null)},[t]),A=N.useMemo(()=>(function(...P){return X=>{for(const W of P)typeof W=="function"?W(X):W!=null&&(W.current=X)}})(C,k),[k,C]);return m_(()=>(S(t.isEditable()),t.registerEditableListener(P=>{S(P)})),[t]),v.jsx("div",{"aria-activedescendant":E?e:void 0,"aria-autocomplete":E?n:"none","aria-controls":E?i:void 0,"aria-describedby":r,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":E&&g==="combobox"?!!s:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":E?d:void 0,"aria-readonly":!E||void 0,"aria-required":f,autoCapitalize:p,className:h,contentEditable:E,"data-testid":w,id:m,ref:A,role:g,spellCheck:y,style:x,tabIndex:b,..._})}const eI=N.forwardRef(QM);function g_(t){return t.getEditorState().read(Sb(t.isComposing()))}const tI=N.forwardRef(nI);function nI(t,e){const{placeholder:n,...i}=t,[r]=tt();return v.jsxs(v.Fragment,{children:[v.jsx(eI,{editor:r,...i,ref:e}),n!=null&&v.jsx(iI,{editor:r,content:n})]})}function iI({content:t,editor:e}){const n=(function(s){const[a,l]=N.useState(()=>g_(s));return m_(()=>{function c(){const u=g_(s);l(u)}return c(),lt(s.registerUpdateListener(()=>{c()}),s.registerEditableListener(()=>{c()}))},[s]),a})(e),[i,r]=N.useState(e.isEditable());if(N.useLayoutEffect(()=>(r(e.isEditable()),e.registerEditableListener(s=>{r(s)})),[e]),!n)return null;let o=null;return typeof t=="function"?o=t(i):t!==null&&(o=t),o===null?null:v.jsx("div",{"aria-hidden":!0,children:o})}function rI(t,e,n,i,r){if(t===null||n.size===0&&i.size===0&&!r)return 0;const o=e._selection,s=t._selection;if(r)return 1;if(!(R(o)&&R(s)&&s.isCollapsed()&&o.isCollapsed()))return 0;const a=(function(y,x,b){const w=y._nodeMap,_=[];for(const C of x){const E=w.get(C);E!==void 0&&_.push(E)}for(const[C,E]of b){if(!E)continue;const S=w.get(C);S===void 0||Qe(S)||_.push(S)}return _})(e,n,i);if(a.length===0)return 0;if(a.length>1){const y=e._nodeMap,x=y.get(o.anchor.key),b=y.get(s.anchor.key);return x&&b&&!t._nodeMap.has(x.__key)&&q(x)&&x.__text.length===1&&o.anchor.offset===1?2:0}const l=a[0],c=t._nodeMap.get(l.__key);if(!q(c)||!q(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=o.anchor,p=s.anchor;if(f.key!==p.key||f.type!=="text")return 0;const h=f.offset,m=p.offset,g=d.length-u.length;return g===1&&m===h-1?2:g===-1&&m===h+1?3:g===-1&&m===h?4:0}function oI(t,e,n){let i=n(),r=0,o=i,s=0,a=null;return(l,c,u,d,f,p)=>{const h=n();if(p.has(Ix)&&(o=i,s=r,a=l),p.has(Rd))return r=0,i=h,2;p.has(jx)&&a&&(i=o,r=s,l=a);const m=rI(l,c,d,f,t.isComposing()),g=(()=>{const y=u===null||u.editor===t,x=p.has(iD);if(!x&&y&&p.has(Bi))return 0;if(m===1)return 2;if(l===null)return 1;const b=c._selection;if(!(d.size>0||f.size>0))return b!==null?0:2;const w=typeof e=="number"?e:e.peek();return x===!1&&m!==0&&m===r&&h<i+w&&y||d.size===1&&(function(_,C,E){const S=C._nodeMap.get(_),k=E._nodeMap.get(_),A=C._selection,P=E._selection;return!(R(A)&&R(P)&&A.anchor.type==="element"&&A.focus.type==="element"&&P.anchor.type==="text"&&P.focus.type==="text"||!q(S)||!q(k)||S.__parent!==k.__parent)&&JSON.stringify(C.read(()=>S.exportJSON()))===JSON.stringify(E.read(()=>k.exportJSON()))})(Array.from(d)[0],l,c)?0:1})();return i=h,r=m,g}}function y_(t,e){t.undoStack=[],t.redoStack=[],t.current=null,e&&e(t)}function v_(t,e,n,i=Date.now,r,o=null){const s=oI(t,n,i),a=()=>{r&&r(e)};return a(),lt(t.registerCommand(Fa,()=>((function(l,c,u){const d=c.redoStack,f=c.undoStack;if(f.length!==0){const p=c.current,h=f.pop();p!==null&&(d.push(p),l.dispatchCommand(rs,!0)),f.length===0&&l.dispatchCommand(os,!1),c.current=h||null,u&&u(c),h&&h.editor.setEditorState(h.editorState,{tag:Rd})}})(t,e,r),!0),fe),t.registerCommand(La,()=>((function(l,c,u){const d=c.redoStack,f=c.undoStack;if(d.length!==0){const p=c.current;p!==null&&(f.push(p),l.dispatchCommand(os,!0));const h=d.pop();d.length===0&&l.dispatchCommand(rs,!1),c.current=h||null,u&&u(c),h&&h.editor.setEditorState(h.editorState,{tag:Rd})}})(t,e,r),!0),fe),t.registerCommand(YP,()=>(y_(e,r),!1),fe),t.registerCommand(GP,()=>(y_(e,r),t.dispatchCommand(rs,!1),t.dispatchCommand(os,!1),!0),fe),t.registerUpdateListener(({editorState:l,prevEditorState:c,dirtyLeaves:u,dirtyElements:d,tags:f})=>{const p=e.current,h=e.redoStack,m=e.undoStack,g=p===null?null:p.editorState;if(p!==null&&l===g)return;const y=s(c,l,p,u,d,f);if(y===1){if(h.length!==0&&(e.redoStack=[],t.dispatchCommand(rs,!1)),p!==null){m.push({...p});const x=typeof o=="number"||o===null?o:o.peek();x!==null&&m.length>x&&m.splice(0,m.length-x),t.dispatchCommand(os,!0)}}else if(y===2)return;e.current={editor:t,editorState:l},a()}))}function x_(){return{current:null,redoStack:[],undoStack:[]}}const Xf={build:(t,{delay:e,createInitialHistoryState:n,disabled:i,maxDepth:r,now:o},s)=>({...zn({delay:e,disabled:i,historyState:n(t),maxDepth:r,now:o}),...s.getInitResult()}),config:{createInitialHistoryState:x_,delay:300,disabled:typeof window>"u",maxDepth:null,now:Date.now},init:()=>({canRedo:pi(!1),canUndo:pi(!1)}),name:"@lexical/history/History",register:(t,e,n)=>{const{canUndo:i,canRedo:r}=n.getInitResult(),o=n.getOutput(),s=a=>Ef(()=>{i.value=a!=null&&a.undoStack.length>0,r.value=a!=null&&a.redoStack.length>0});return Dt(()=>{if(!o.disabled.value)return v_(t,o.historyState.value,o.delay,()=>o.now.peek()(),s,o.maxDepth);s(null)})}};Ji(Xf,{disabled:!0});function sI({delay:t,externalHistoryState:e}){const[n]=tt();return(function(i,r,o=1e3){const s=N.useMemo(()=>r||x_(),[r]);N.useEffect(()=>v_(i,s,o),[o,i,s])})(n,e,t),null}function hi(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Jf(t){let e=1,n=t.getParent();for(;n!=null;){if(ge(n)){const i=n.getParent();if(pe(i)){e++,n=i.getParent();continue}hi(40)}return e}return e}function Zf(t){let e=t.getParent();pe(e)||hi(40);let n=e;for(;n!==null;)n=n.getParent(),pe(n)&&(e=n);return e}function b_(t){let e=[];const n=t.getChildren().filter(ge);for(let i=0;i<n.length;i++){const r=n[i],o=r.getFirstChild();pe(o)?e=e.concat(b_(o)):e.push(r)}return e}function on(t){return ge(t)&&pe(t.getFirstChild())}function __(t,e){return ge(t)&&(e.length===0||e.length===1&&t.is(e[0])&&t.getChildrenSize()===0)}function w_(t){const e=Z();if(e!==null){let n=e.getNodes();if(R(e)){const[r]=e.getStartEndPoints(),o=r.getNode(),s=o.getParent();if(st(o)){const a=o.getFirstChild();if(a)n=a.selectStart().getNodes();else{const l=De();o.append(l),n=l.select().getNodes()}}else if(__(o,n)){const a=bn(t);if(st(s)){o.replace(a);const l=Vn();D(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),a.append(l)}else if(ge(o)){const l=o.getParentOrThrow();nr(a,l.getChildren()),l.replace(a)}return}}const i=new Set;for(let r=0;r<n.length;r++){const o=n[r];if(D(o)&&o.isEmpty()&&!ge(o)&&!i.has(o.getKey())){S_(o,t);continue}let s=S0(o)?o.getParent():ge(o)&&o.isEmpty()?o:null;for(;s!=null;){const a=s.getKey();if(pe(s)){if(!i.has(a)){const l=bn(t);nr(l,s.getChildren()),s.replace(l),i.add(a)}break}{const l=s.getParent();if(st(l)&&!i.has(a)){i.add(a),S_(s,t);break}s=l}}}}}function nr(t,e){t.splice(t.getChildrenSize(),0,e)}function S_(t,e){if(pe(t))return t;const n=t.getPreviousSibling(),i=t.getNextSibling(),r=Vn();let o;if(nr(r,t.getChildren()),pe(n)&&e===n.getListType())n.append(r),pe(i)&&e===i.getListType()&&(nr(n,i.getChildren()),i.remove()),o=n;else if(pe(i)&&e===i.getListType())i.getFirstChildOrThrow().insertBefore(r),o=i;else{const a=bn(e);a.append(r),t.replace(a),o=a}r.setFormat(t.getFormatType()),r.setIndent(t.getIndent());const s=Z();return R(s)&&(o.getKey()===s.anchor.key&&s.anchor.set(r.getKey(),s.anchor.offset,"element"),o.getKey()===s.focus.key&&s.focus.set(r.getKey(),s.focus.offset,"element")),t.remove(),o}function Qf(t,e){const n=t.getLastChild(),i=e.getFirstChild();n&&i&&on(n)&&on(i)&&(Qf(n.getFirstChild(),i.getFirstChild()),i.remove());const r=e.getChildren();r.length>0&&t.append(...r),e.remove()}function aI(){const t=Z();if(R(t)){const e=new Set,n=t.getNodes(),i=t.anchor.getNode();if(__(i,n))e.add(Zf(i));else for(let r=0;r<n.length;r++){const o=n[r];if(S0(o)){const s=ob(o,ir);s!=null&&e.add(Zf(s))}}for(const r of e){let o=r;const s=b_(r);for(const a of s){const l=De().setTextStyle(t.style).setTextFormat(t.format);nr(l,a.getChildren()),o.insertAfter(l),o=l,a.__key===t.anchor.key&&fi(t.anchor,at(xt(l,"next"))),a.__key===t.focus.key&&fi(t.focus,at(xt(l,"next"))),a.remove()}r.remove()}}}function C_(t){const e=t.getListType()!=="check";let n=t.getStart();for(const i of t.getChildren())ge(i)&&(i.getValue()!==n&&i.setValue(n),e&&i.getLatest().__checked!=null&&i.setChecked(void 0),pe(i.getFirstChild())||n++)}function lI(t){const e=new Set;if(on(t)||e.has(t.getKey()))return;const n=t.getParent(),i=t.getNextSibling(),r=t.getPreviousSibling();if(on(i)&&on(r)){const o=r.getFirstChild();if(pe(o)){o.append(t);const s=i.getFirstChild();pe(s)&&(nr(o,s.getChildren()),i.remove(),e.add(i.getKey()))}}else if(on(i)){const o=i.getFirstChild();if(pe(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(t)}}else if(on(r)){const o=r.getFirstChild();pe(o)&&o.append(t)}else if(pe(n)){const o=ht(t),s=ht(n);o.append(s),s.append(t),r?r.insertAfter(o):i?i.insertBefore(o):n.append(o)}}function cI(t){if(on(t))return;const e=t.getParent(),n=e?e.getParent():void 0;if(pe(n?n.getParent():void 0)&&ge(n)&&pe(e)){const i=e?e.getFirstChild():void 0,r=e?e.getLastChild():void 0;if(t.is(i))n.insertBefore(t),e.isEmpty()&&n.remove();else if(t.is(r))n.insertAfter(t),e.isEmpty()&&n.remove();else{const o=ht(t),s=ht(e);o.append(s),t.getPreviousSiblings().forEach(c=>s.append(c));const a=ht(t),l=ht(e);a.append(l),nr(l,t.getNextSiblings()),n.insertBefore(o),n.insertAfter(a),n.replace(t)}}}function uI(t=!1){const e=Z();if(!R(e)||!e.isCollapsed())return!1;const n=e.anchor.getNode();let i=null;if(ge(n)&&n.getChildrenSize()===0)i=n;else if(q(n)){const c=n.getParent();ge(c)&&c.getChildren().every(u=>q(u)&&u.getTextContent().trim()==="")&&(i=c)}if(i===null)return!1;const r=Zf(i),o=i.getParent();pe(o)||hi(40);const s=o.getParent();let a;if(st(s))a=De(),r.insertAfter(a);else{if(!ge(s))return!1;a=ht(s),s.insertAfter(a)}a.setTextStyle(e.style).setTextFormat(e.format).select();const l=i.getNextSiblings();if(l.length>0){const c=t?(function(d,f){return d.getStart()+f.getIndexWithinParent()})(o,i):1,u=ht(o).setStart(c);if(ge(a)){const d=ht(a);d.append(u),a.insertAfter(d)}else a.insertAfter(u);u.append(...l)}return(function(c){let u=c;for(;u.getNextSibling()==null&&u.getPreviousSibling()==null;){const d=u.getParent();if(d==null||!ge(d)&&!pe(d))break;u=d}u.remove()})(i),!0}class ir extends Ct{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{const n=e.getParent();if(pe(n))n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0);else if(n){const i=e.createParentElementNode();pe(i)||hi(340);const r=[e];for(const o of["previous","next"]){r.reverse();for(const{origin:s}of je(e,o)){if(!ge(s))break;r.push(s)}}e.insertBefore(i),i.splice(0,0,r),st(n)||(Tf(i,rn(je(i,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),n.isEmpty()&&n.isAttached()&&n.remove())}},extends:Ct,importDOM:{li:()=>({conversion:dI,priority:0})}})}constructor(e=1,n=void 0,i){super(i),this.__value=e===void 0?1:e,this.__checked=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const n=document.createElement("li");return this.updateListItemDOM(null,n,e),n}updateListItemDOM(e,n,i){(function(s,a){const l=a.getParent();!pe(l)||l.getListType()!=="check"||pe(a.getFirstChild())?(s.removeAttribute("role"),s.removeAttribute("tabIndex"),s.removeAttribute("aria-checked")):(s.setAttribute("role","checkbox"),s.setAttribute("tabIndex","-1"),s.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(n,this),n.value=this.__value,(function(s,a,l){const c=a.list;if(!c)return;const u=c.listitem,d=c.nested&&c.nested.listitem,f=l.getParent(),p=pe(f)&&f.getListType()==="check",h=l.getChecked(),m=l.getChildren().some(x=>pe(x)),g=[];c.listitemChecked!==void 0&&g.push(c.listitemChecked),c.listitemUnchecked!==void 0&&g.push(c.listitemUnchecked),d!==void 0&&g.push(...Fn(d)),g.length>0&&Cf(s,...g);const y=[];if(u!==void 0&&y.push(...Fn(u)),p){const x=h?c.listitemChecked:c.listitemUnchecked;x!==void 0&&y.push(x)}d!==void 0&&m&&y.push(...Fn(d)),y.length>0&&Zi(s,...y)})(n,i.theme,this);const r=e?e.__style:"",o=this.__style;r!==o&&Fd(n.style,o,r),(function(s,a,l){const c=a.__textStyle,u=l?l.__textStyle:"";if(l!==null&&u===c)return;const d=Ga(c);for(const f in d)s.style.setProperty(`--listitem-marker-${f}`,d[f]);if(u!=="")for(const f in Ga(u))f in d||s.style.removeProperty(`--listitem-marker-${f}`)})(n,this,e)}updateDOM(e,n,i){const r=n;return this.updateListItemDOM(e,r,i),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const n=this.createDOM(e._config),i=this.getFormatType();i&&(n.style.textAlign=i);const r=this.getDirection();return r&&(n.dir=r),on(this)?{after(o){if(he(o)){const s=o.previousElementSibling;if(he(s)&&s.nodeName==="LI"){for(;o.firstChild;)s.append(o.firstChild);o.remove()}}return o},element:n}:{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let n=0;n<e.length;n++){const i=e[n];if(D(i)&&this.canMergeWith(i)){const r=i.getChildren();this.append(...r),i.remove()}else super.append(i)}return this}replace(e,n){if(ge(e))return super.replace(e);this.setIndent(0);const i=this.getParentOrThrow();if(!pe(i))return e;if(i.__first===this.getKey())i.insertBefore(e);else if(i.__last===this.getKey())i.insertAfter(e);else{const s=ht(i);let a=this.getNextSibling();for(;a;){const l=a;a=a.getNextSibling(),s.append(l)}i.insertAfter(e),e.insertAfter(s)}const r=this.__key;let o=0;if(n&&(D(e)||hi(139),o=e.getChildrenSize(),e.splice(o,0,this.getChildren())),n&&D(e)){const s=Z();if(R(s))for(const a of s.getStartEndPoints())a.key===r&&a.type==="element"&&a.set(e.getKey(),o+a.offset,"element")}return this.remove(),i.getChildrenSize()===0&&i.remove(),e}insertAfter(e,n=!0){const i=this.getParentOrThrow();if(pe(i)||hi(39),ge(e))return super.insertAfter(e,n);const r=this.getNextSiblings();if(i.insertAfter(e,n),r.length!==0){const o=ht(i);r.forEach(s=>o.append(s)),e.insertAfter(o,n)}return e}remove(e){const n=this.getPreviousSibling(),i=this.getNextSibling();super.remove(e),n&&i&&on(n)&&on(i)&&(Qf(n.getFirstChild(),i.getFirstChild()),i.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,n=!0){const i=ht(this);return this.insertAfter(i,n),i}collapseAtStart(e){const n=De();this.getChildren().forEach(s=>n.append(s));const i=this.getParentOrThrow(),r=i.getParentOrThrow(),o=ge(r);if(i.getChildrenSize()===1)if(o)i.remove(),r.select();else{i.insertBefore(n),i.remove();const s=e.anchor,a=e.focus,l=n.getKey();s.type==="element"&&s.getNode().is(this)&&s.set(l,s.offset,"element"),a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element")}else i.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const n=this.getWritable();return n.__value=e,n}getChecked(){const e=this.getLatest();let n;const i=this.getParent();return pe(i)&&(n=i.getListType()),n==="check"?!!e.__checked:void 0}setChecked(e){const n=this.getWritable();return n.__checked=e,n}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let n=e.getParentOrThrow(),i=0;for(;ge(n);)n=n.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(e){typeof e!="number"&&hi(117),(e=Math.floor(e))>=0||hi(199);let n=this.getIndent();for(;n!==e;)n<e?(lI(this),n++):(cI(this),n--);return this}canInsertAfter(e){return ge(e)}canReplaceWith(e){return ge(e)}canMergeWith(e){return ge(e)||hs(e)}extractWithChild(e,n){if(!R(n))return!1;const i=n.anchor.getNode(),r=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return bn("bullet")}canMergeWhenEmpty(){return!0}}function dI(t){if(t.classList.contains("task-list-item")){for(const i of t.children)if(i.tagName==="INPUT")return k_(i)}if(t.classList.contains("joplin-checkbox")){for(const i of t.children)if(i.classList.contains("checkbox-wrapper")&&i.children.length>0&&i.children[0].tagName==="INPUT")return k_(i.children[0])}const e=t.getAttribute("aria-checked"),n=Vn(e==="true"||e!=="false"&&void 0);return Mn(n,t),{after:T_.bind(null,n),node:tn(n,t)}}function k_(t){if(t.getAttribute("type")!=="checkbox")return{node:null};const e=Vn(t.hasAttribute("checked"));return{after:T_.bind(null,e),node:e}}function T_(t,e){const n=e[0];return e.length===1&&hs(n)&&!t.getFormatType()&&n.getFormatType()?(t.setFormat(n.getFormatType()),n.getChildren()):e}function Vn(t){return yn(new ir(void 0,t))}function ge(t){return t instanceof ir}class rr extends Ct{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{(function(n){const i=n.getNextSibling();pe(i)&&n.getListType()===i.getListType()&&Qf(n,i)})(e),C_(e)},extends:Ct,importDOM:{ol:()=>({conversion:N_,priority:0}),ul:()=>({conversion:N_,priority:0})}})}constructor(e="number",n=1,i){super(i);const r=fI[e]||e;this.__listType=r,this.__tag=r==="number"?"ol":"ul",this.__start=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const n=this.getWritable();return n.__listType=e,n.__tag=e==="number"?"ol":"ul",n}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const n=this.getWritable();return n.__start=e,n}createDOM(e,n){const i=this.__tag,r=document.createElement(i);return this.__start!==1&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,E_(r,e.theme,this),r}updateDOM(e,n,i){return e.__tag!==this.__tag||e.__listType!==this.__listType||(E_(n,i.theme,this),e.__start!==this.__start&&n.setAttribute("start",String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const n=this.createDOM(e._config,e);return he(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,n,i){let r=i;for(let o=0;o<i.length;o++){const s=i[o];ge(s)||(r===i&&(r=[...i]),r[o]=this.createListItemNode().append(!D(s)||pe(s)||s.isInline()?s:He(s.getTextContent())))}return super.splice(e,n,r)}extractWithChild(e){return ge(e)}createListItemNode(){return Vn()}}function E_(t,e,n){const i=[],r=[],o=e.list;if(o!==void 0){const s=o[`${n.__tag}Depth`]||[],a=Jf(n)-1,l=a%s.length,c=s[l],u=o[n.__tag];let d;const f=o.nested,p=o.checklist;if(f!==void 0&&f.list&&(d=f.list),u!==void 0&&i.push(u),p!==void 0&&n.__listType==="check"&&i.push(p),c!==void 0){i.push(...Fn(c));for(let h=0;h<s.length;h++)h!==l&&r.push(n.__tag+h)}if(d!==void 0){const h=Fn(d);a>1?i.push(...h):r.push(...h)}}r.length>0&&Cf(t,...r),i.length>0&&Zi(t,...i)}function N_(t){let e;if((function(n){return he(n)&&n.nodeName.toLowerCase()==="ol"})(t)){const n=t.start;e=bn("number",n)}else e=(function(n){if(n.getAttribute("__lexicallisttype")==="check"||n.classList.contains("contains-task-list")||n.getAttribute("data-is-checklist")==="1")return!0;for(const i of n.childNodes)if(he(i)&&i.hasAttribute("aria-checked"))return!0;return!1})(t)?bn("check"):bn("bullet");return tn(e,t),{after:n=>(function(i,r){const o=r.createListItemNode.bind(r),s=[];for(let a=0;a<i.length;a++){const l=i[a];if(ge(l)){s.push(l);const c=l.getChildren();c.length>1&&c.forEach(u=>{pe(u)&&s.push(o().append(u))})}else s.push(o().append(l))}return s})(n,e),node:e}}const fI={ol:"number",ul:"bullet"};function bn(t="number",e=1){return yn(new rr(t,e))}function pe(t){return t instanceof rr}const pI=se("UPDATE_LIST_START_COMMAND"),A_=se("INSERT_UNORDERED_LIST_COMMAND"),P_=se("INSERT_ORDERED_LIST_COMMAND"),ep=se("REMOVE_LIST_COMMAND");function tp(t,e){return lt(t.registerCommand(P_,()=>(w_("number"),!0),en),t.registerCommand(pI,n=>{const{listNodeKey:i,newStart:r}=n,o=Ke(i);return!!pe(o)&&(o.getListType()==="number"&&(o.setStart(r),C_(o)),!0)},en),t.registerCommand(A_,()=>(w_("bullet"),!0),en),t.registerCommand(ep,()=>(aI(),!0),en),t.registerCommand(ts,()=>uI(!!(e&&e.restoreNumbering)),en),t.registerNodeTransform(ir,n=>{const i=n.getFirstChild();if(i){if(q(i)){const r=i.getStyle(),o=i.getFormat();n.getTextStyle()!==r&&n.setTextStyle(r),n.getTextFormat()!==o&&n.setTextFormat(o)}}else{const r=Z();R(r)&&(r.style!==n.getTextStyle()||r.format!==n.getTextFormat())&&r.isCollapsed()&&n.is(r.anchor.getNode())&&n.setTextStyle(r.style).setTextFormat(r.format)}}),t.registerNodeTransform(ai,n=>{const i=n.getParent();if(ge(i)&&n.is(i.getFirstChild())){const r=n.getStyle(),o=n.getFormat();r===i.getTextStyle()&&o===i.getTextFormat()||i.setTextStyle(r).setTextFormat(o)}}))}function D_(t){const e=n=>{const i=n.getParent();if(pe(n.getFirstChild())||!pe(i))return;const r=Ye(n,o=>ge(o)&&pe(o.getParent())&&ge(o.getPreviousSibling()));if(r===null&&n.getIndent()>0)n.setIndent(0);else if(ge(r)){const o=r.getPreviousSibling();if(ge(o)){const s=(function(l){let c=l,u=c.getFirstChild();for(;pe(u);){const d=u.getLastChild();if(!ge(d))break;c=d,u=c.getFirstChild()}return c})(o),a=s.getParent();if(pe(a)){const l=Jf(a);l+1<Jf(i)&&n.setIndent(l)}}}};return t.registerNodeTransform(rr,n=>{const i=[n];for(;i.length>0;){const r=i.shift();if(pe(r)){for(const o of r.getChildren())if(ge(o)){e(o);const s=o.getFirstChild();pe(s)&&i.push(s)}}}})}const hI={build:(t,e,n)=>zn(e),config:{hasStrictIndent:!1,shouldPreserveNumbering:!1},name:"@lexical/list/List",nodes:()=>[rr,ir],register(t,e,n){const i=n.getOutput();return lt(Dt(()=>tp(t,{restoreNumbering:i.shouldPreserveNumbering.value})),Dt(()=>i.hasStrictIndent.value?D_(t):void 0))}};function mI(t){const e=[];for(const n of t)if(ge(n)){e.push(n);const i=n.getChildren();if(i.length>1)for(const r of i)pe(r)&&e.push(Vn().append(r))}else e.push(Vn().append(n));return e}const gI={$import:(t,e)=>{let n;var i;return jb(e,"ol")?n=bn("number",e.start):n=(i=e).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||i.querySelector(":scope > [aria-checked]")!==null?bn("check"):bn("bullet"),tn(n,e),[n.splice(0,0,mI(t.$importChildren(e)))]},match:Bn.tag("ol","ul"),name:"@lexical/list/list"};function O_(t,e){if(e.length!==1)return e;const n=e[0];return hs(n)&&!t.getFormatType()&&n.getFormatType()?(t.setFormat(n.getFormatType()),n.getChildren()):e}const yI={$import:(t,e)=>{const n=e.getAttribute("aria-checked"),i=Vn(n==="true"||n!=="false"&&void 0);return Mn(i,e),tn(i,e),[i.splice(0,0,O_(i,t.$importChildren(e)))]},match:Bn.tag("li"),name:"@lexical/list/li"};function M_(t,e,n){const i=jb(n,"input")?n:n.querySelector('input[type="checkbox"]');if(!i||i.getAttribute("type")!=="checkbox")return[];const r=Vn(i.hasAttribute("checked"));return Mn(r,e),tn(r,e),[r.splice(0,0,O_(r,t.$importChildren(e)))]}const vI=[{$import:(t,e,n)=>{const i=e.querySelector(':scope > input[type="checkbox"]');return i?M_(t,e,i):n()},match:Bn.tag("li").classAll("task-list-item"),name:"@lexical/list/li-task-list-item"},{$import:(t,e,n)=>{const i=e.querySelector(":scope > .checkbox-wrapper");if(!i)return n();const r=i.querySelector(':scope > input[type="checkbox"]');return r?M_(t,e,r):n()},match:Bn.tag("li").classAll("joplin-checkbox"),name:"@lexical/list/li-joplin-checkbox"},gI,yI];Ji(to,{rules:vI});function xI({hasStrictIndent:t=!1,shouldPreserveNumbering:e=!1}){const[n]=tt();return N.useEffect(()=>{if(!n.hasNodes([rr,ir]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[n]),N.useEffect(()=>lt(tp(n,{restoreNumbering:e}),t?D_(n):()=>{}),[n,t,e]),(function(i){N.useEffect(()=>tp(i),[i])})(n),null}const bI=new Set(["http:","https:","mailto:","sms:","tel:"]);class Wn extends Ct{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new Wn(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",n={},i){super(i);const{target:r=null,rel:o=null,title:s=null}=n;this.__url=e,this.__target=r,this.__rel=o,this.__title=s}afterCloneFrom(e){super.afterCloneFrom(e),this.__url=e.__url,this.__rel=e.__rel,this.__target=e.__target,this.__title=e.__title}createDOM(e){const n=document.createElement("a");return this.updateLinkDOM(null,n,e),Zi(n,e.theme.link),n}updateLinkDOM(e,n,i){if(F0(n)){e&&e.__url===this.__url||(n.href=this.sanitizeUrl(this.__url));for(const r of["target","rel","title"]){const o=`__${r}`,s=this[o];e&&e[o]===s||(s?n[r]=s:n.removeAttribute(r))}}}updateDOM(e,n,i){return this.updateLinkDOM(e,n,i),!1}static importDOM(){return{a:e=>({conversion:wI,priority:1})}}static importJSON(e){return Ns().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=L_(e);try{const n=new URL(L_(e));if(!bI.has(n.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const n=this.getWritable();return n.__url=e,n}getTarget(){return this.getLatest().__target}setTarget(e){const n=this.getWritable();return n.__target=e,n}getRel(){return this.getLatest().__rel}setRel(e){const n=this.getWritable();return n.__rel=e,n}getTitle(){return this.getLatest().__title}setTitle(e){const n=this.getWritable();return n.__title=e,n}insertNewAfter(e,n=!0){const i=ht(this);return this.insertAfter(i,n),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n,i){if(!R(n))return!1;const r=n.anchor.getNode(),o=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(o)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(e){return this.getType()===e.getType()&&this.__url===e.__url&&this.__target===e.__target&&this.__rel===e.__rel&&this.__title===e.__title}}function I_(t){const e=nn(t,"next");return[e,e.getFlipped()]}function j_(t,e){for(const n of e)if(n.origin.isAttached()){const i=at(n);return void fi(t,i)}}function _I(t){const e=Z();let n=null,i=null;function r(){R(e)&&(j_(e.anchor,n),j_(e.focus,i),Ri(e))}R(e)&&(n=I_(e.anchor),i=I_(e.focus));let o=!1;for(const a of xt(t,"next")){const l=a.origin;if(D(l)&&!l.isInline()){const c=l.getChildren();if(c.length>0){const u=ht(t);u.append(...c),l.append(u),o=!0}Tf(l,rn(a),{$shouldSplit:()=>!1})}}function s(a,l,c){const[u,d]=a,f=h=>vn(h)&&h.origin.is(l);if(!f(u)&&!f(d))return a;const p=at(xt(c,"next"));return[p,p.getFlipped()]}if(t.isAttached()){const a=t.getPreviousSibling();if(Vt(a)&&a.shouldMergeAdjacentLink(t))return n&&(n=s(n,a,t)),i&&(i=s(i,a,t)),a.append(...t.getChildren()),t.remove(),void r();const l=t.getNextSibling();Vt(l)&&t.shouldMergeAdjacentLink(l)&&(n&&(n=s(n,t,l)),i&&(i=s(i,t,l)),t.append(...l.getChildren()),l.remove(),o=!0)}if(o){if(!t.canBeEmpty()&&t.isEmpty()){const a=t.getParent();t.remove(),a&&a.isEmpty()&&a.remove()}r()}}function wI(t){let e=null;if(F0(t)){const n=t.textContent;(n!==null&&n!==""||t.children.length>0)&&(e=Ns(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function Ns(t="",e){return yn(new Wn(t,e))}function Vt(t){return t instanceof Wn}class Fl extends Wn{__isUnlinked;constructor(e="",n={},i){super(e,n,i),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}afterCloneFrom(e){super.afterCloneFrom(e),this.__isUnlinked=e.__isUnlinked}static getType(){return"autolink"}static clone(e){return new Fl(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const n=this.getWritable();return n.__isUnlinked=e,n}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,n,i){return super.updateDOM(e,n,i)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return R_().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,n=!0){const i=R_(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,n),i}}function R_(t="",e){return yn(new Fl(t,e))}function As(t){return t instanceof Fl}const Ll=se("TOGGLE_LINK_COMMAND");function F_(t,e){if(t.type==="element"){const n=t.getNode();return D(n)||(function(i,...r){const o=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",i);for(const a of r)s.append("v",a);throw o.search=s.toString(),Error(`Minified Lexical error #${i}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[t.offset+e]||null}return null}function np(t,e={}){let n;if(t&&typeof t=="object"){const{url:u,...d}=t;n=u,e={...d,...e}}else n=t;const{target:i,title:r}=e,o=e.rel===void 0?"noreferrer":e.rel,s=Z();if(s===null||!R(s)&&!Xe(s))return;if(Xe(s)){const u=s.getNodes();return u.length===0?void 0:void u.forEach(d=>{if(n===null){const f=Ye(d,p=>!As(p)&&Vt(p));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{const f=Ye(d,p=>!As(p)&&Vt(p));if(f)f.setURL(n),i!==void 0&&f.setTarget(i),o!==void 0&&f.setRel(o);else{const p=Ns(n,{rel:o,target:i});d.insertBefore(p),p.append(d)}}})}if(s.isCollapsed()&&n===null)for(const u of s.getNodes()){const d=Ye(u,f=>!As(f)&&Vt(f));return void(d!==null&&(d.getParentOrThrow().splice(d.getIndexWithinParent(),0,d.getChildren()),d.remove()))}const a=s.extract();if(n===null){const u=new Set;return void a.forEach(d=>{const f=Ye(d,p=>!As(p)&&Vt(p));if(f!==null){const p=f.getKey();if(u.has(p))return;(function(h,m){const g=new Set(m.filter(S=>h.isParentOf(S)).map(S=>S.getKey())),y=h.getChildren(),x=S=>g.has(S.getKey())||D(S)&&m.some(k=>h.isParentOf(k)&&S.isParentOf(k)),b=y.filter(x);if(b.length===y.length)return y.forEach(S=>h.insertBefore(S)),void h.remove();const w=y.findIndex(x),_=y.findLastIndex(x),C=w===0,E=_===y.length-1;if(C)b.forEach(S=>h.insertBefore(S));else if(E)for(let S=b.length-1;S>=0;S--)h.insertAfter(b[S]);else{for(let k=b.length-1;k>=0;k--)h.insertAfter(b[k]);const S=y.slice(_+1);if(S.length>0){const k=ht(h);b[b.length-1].insertAfter(k),S.forEach(A=>k.append(A))}}})(f,a),u.add(p)}})}const l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(n),i!==void 0&&u.setTarget(i),o!==void 0&&u.setRel(o),r!==void 0&&u.setTitle(r))};if(a.length===1){const u=a[0],d=Ye(u,Vt);if(d!==null)return c(d)}(function(u){const d=Z();if(!R(d))return u();const f=Ri(d),p=f.isBackward(),h=F_(f.anchor,p?-1:0),m=F_(f.focus,p?0:-1);if(u(),h||m){const g=Z();if(R(g)){const y=g.clone();if(h){const x=h.getParent();x&&y.anchor.set(x.getKey(),h.getIndexWithinParent()+(p?1:0),"element")}if(m){const x=m.getParent();x&&y.focus.set(x.getKey(),m.getIndexWithinParent()+(p?0:1),"element")}pt(Ri(y))}}})(()=>{let u=null;for(const d of a){if(!d.isAttached())continue;const f=Ye(d,Vt);if(f){c(f);continue}if(D(d)){if(!d.isInline())continue;if(Vt(d)){if(!(As(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(const h of d.getChildren())d.insertBefore(h);d.remove();continue}}const p=d.getPreviousSibling();Vt(p)&&p.is(u)?p.append(d):(u=Ns(n,{rel:o,target:i,title:r}),d.insertAfter(u),u.append(d))}})}const SI=/^\+?[0-9\s()-]{5,}$/;function L_(t){return t.match(/^[a-z][a-z0-9+.-]*:/i)||t.match(/^[/#.]/)?t:t.includes("@")?`mailto:${t}`:SI.test(t)?`tel:${t}`:`https://${t}`}function $_(t,e){return lt(t.registerNodeTransform(Wn,_I),t.registerCommand(Ll,n=>{const i=e.validateUrl.peek(),r=e.attributes.peek();if(n===null)return np(null),!0;if(typeof n=="string")return!(i!==void 0&&!i(n))&&(np(n,r),!0);{const{url:o,target:s,rel:a,title:l}=n;return np(o,{...r,rel:a,target:s,title:l}),!0}},fe),Dt(()=>{const n=e.validateUrl.value;if(!n)return;const i=e.attributes.value;return t.registerCommand(ja,r=>{const o=Z();if(!R(o)||o.isCollapsed()||!Ln(r,ClipboardEvent)||r.clipboardData===null)return!1;const s=r.clipboardData.getData("text");return!!n(s)&&!o.getNodes().some(a=>D(a))&&(t.dispatchCommand(Ll,{...i,url:s}),r.preventDefault(),!0)},en)}))}const CI={build:(t,e,n)=>zn(e),config:{attributes:void 0,validateUrl:void 0},mergeConfig(t,e){const n=Rn(t,e);return t.attributes&&(n.attributes=Rn(t.attributes,n.attributes)),n},name:"@lexical/link/Link",nodes:()=>[Wn],register:(t,e,n)=>$_(t,n.getOutput())},kI=[{$import:(t,e)=>{if(!e.textContent&&e.children.length===0)return[];const n=e.getAttribute("href")||"",i={rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")};return Ub(t.$importChildren(e),()=>Ns(n,i))},match:Bn.tag("a"),name:"@lexical/link/a"}];Ji(to,{rules:kI});function TI({validateUrl:t,attributes:e}){const[n]=tt();return N.useEffect(()=>{if(!n.hasNodes([Wn]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),N.useEffect(()=>$_(n,zn({attributes:e,validateUrl:t})),[n,t,e]),null}const EI=nt?N.useLayoutEffect:N.useEffect;function NI({ignoreHistoryMergeTagChange:t=!0,ignoreSelectionChange:e=!1,onChange:n}){const[i]=tt();return EI(()=>{if(n)return i.registerUpdateListener(({editorState:r,dirtyElements:o,dirtyLeaves:s,prevEditorState:a,tags:l})=>{e&&o.size===0&&s.size===0||t&&l.has(Bi)||a.isEmpty()||n(r,i,l)})},[i,t,e,n]),null}function AI({defaultSelection:t}){const[e]=tt();return N.useEffect(()=>{e.focus(()=>{const n=document.activeElement,i=e.getRootElement();i===null||n!==null&&i.contains(n)||i.focus({preventScroll:!0})},{defaultSelection:t})},[t,e]),null}const PI=N.createContext(null),ip={didCatch:!1,error:null};class DI extends N.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=ip}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{error:n}=this.state;n!==null&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(ip))}componentDidCatch(e,n){this.props.onError?.(e,n)}componentDidUpdate(e,n){const{didCatch:i}=this.state,{resetKeys:r}=this.props;i&&n.error!==null&&OI(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:"keys"}),this.setState(ip))}render(){const{children:e,fallbackRender:n,FallbackComponent:i,fallback:r}=this.props,{didCatch:o,error:s}=this.state;let a=e;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(i)a=N.createElement(i,l);else if(r!==void 0)a=r;else throw s}return N.createElement(PI.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function OI(t=[],e=[]){return t.length!==e.length||t.some((n,i)=>!Object.is(n,e[i]))}function MI({children:t,onError:e}){const n=N.useCallback((i,r)=>{e(i instanceof Error?i:new Error(String(i),{cause:i}),r)},[e]);return v.jsx(DI,{fallback:v.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:n,children:t})}const z_=[jl,Es,rr,ir,Wn],B_={paragraph:"lexical-paragraph",heading:{h1:"lexical-h1",h2:"lexical-h2",h3:"lexical-h3",h4:"lexical-h4"},quote:"lexical-quote",list:{ul:"lexical-ul",ol:"lexical-ol",listitem:"lexical-listitem",nested:{listitem:"lexical-listitem-nested"}},link:"lexical-link",text:{bold:"lexical-bold",italic:"lexical-italic",underline:"lexical-underline"}},V_={isBold:!1,isItalic:!1,isUnderline:!1,isLink:!1,isUnorderedList:!1,isOrderedList:!1,blockType:"paragraph",canUndo:!1,canRedo:!1},$l=N.createContext({state:V_,tone:"light",orientation:"horizontal"}),mi=()=>N.useContext($l),rp=()=>{const[t]=tt(),[e,n]=N.useState(V_);return N.useEffect(()=>{const i=()=>{t.getEditorState().read(()=>{const r=Z();if(!R(r))return;const o=r.anchor.getNode(),s=ob(o,rr),a=s&&pe(s)?s.getListType():null;let l="paragraph";if(!a){const p=o.getKey()==="root"?o:o.getTopLevelElementOrThrow();qM(p)&&(l=p.getTag())}const c=r.hasFormat("bold"),u=r.hasFormat("italic"),d=r.hasFormat("underline"),f=Vt(o.getParent())||Vt(o);n(p=>({...p,isBold:c,isItalic:u,isUnderline:d,isLink:f,isUnorderedList:a==="bullet",isOrderedList:a==="number",blockType:l}))})};return lt(t.registerUpdateListener(()=>i()),t.registerCommand(os,r=>(n(o=>({...o,canUndo:r})),!1),en),t.registerCommand(rs,r=>(n(o=>({...o,canRedo:r})),!1),en))},[t]),e},W_=N.createContext(void 0),II=()=>({dismiss:N.useContext(W_)||(()=>{})}),Ps=t=>{const{trigger:e,children:n,placement:i="bottom-end",minWidth:r=200,className:o}=t,[s,a]=N.useState(!1),{Popover:l,anchorRef:c}=Ca({placement:i,onOutsideClick:()=>a(!1),minWidth:r});return v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:o,onClick:()=>a(!s),children:e}),v.jsx(l,{open:s,children:v.jsx(Zn,{padding:"sm",children:v.jsx(W_.Provider,{value:()=>a(!1),children:n})})})]})},jI="inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent",_t=O.forwardRef((t,e)=>{const{className:n,children:i,Icon:r,onClick:o,dismissOnClick:s=!0,...a}=t,{dismiss:l}=II(),c=u=>{o&&o(u),s&&l()};return v.jsxs("button",{ref:e,className:Q(jI,n),onClick:c,...a,children:[r&&v.jsx(r,{className:"h-5 w-5"}),i]})}),op=[{value:"paragraph",label:"Paragraph"},{value:"h1",label:"Heading 1"},{value:"h2",label:"Heading 2"},{value:"h3",label:"Heading 3"},{value:"h4",label:"Heading 4"}],K_=()=>{const[t]=tt(),{state:e,tone:n}=mi(),i=o=>{t.update(()=>{const s=Z();R(s)&&(o==="paragraph"?Q0(s,()=>De()):Q0(s,()=>tr(o)))})},r=op.find(o=>o.value===e.blockType)??op[0];return v.jsx(Ps,{placement:"bottom-start",minWidth:180,trigger:v.jsxs("button",{type:"button",onMouseDown:o=>o.preventDefault(),className:Q("lexical-tb-btn h-8 px-2 gap-1 text-sm font-medium",n==="dark"?"lexical-tb-btn-dark":"lexical-tb-btn-light"),children:[r.label,v.jsx(Ni,{className:"h-4 w-4"})]}),children:op.map(o=>v.jsx(_t,{Icon:o.value===e.blockType?kg:void 0,onClick:()=>i(o.value),className:o.value===e.blockType?void 0:"pl-11",children:o.label},o.value))})},RI={light:"lexical-tb-btn-light",dark:"lexical-tb-btn-dark"},Kn=O.forwardRef((t,e)=>{const{Icon:n,active:i=!1,tone:r="light",className:o,onMouseDown:s,...a}=t,l=c=>{c.preventDefault(),s?.(c)};return v.jsx("button",{ref:e,type:"button",onMouseDown:l,className:Q("lexical-tb-btn h-8 w-8",RI[r],i&&"lexical-tb-btn-active",o),...a,children:v.jsx(n,{className:"h-[18px] w-[18px]"})})}),U_=()=>{const[t]=tt(),{state:e,tone:n}=mi();return v.jsxs(v.Fragment,{children:[v.jsx(Kn,{Icon:hT,tone:n,active:e.isBold,"aria-label":"Bold",onClick:()=>t.dispatchCommand(Qt,"bold")}),v.jsx(Kn,{Icon:_T,tone:n,active:e.isItalic,"aria-label":"Italic",onClick:()=>t.dispatchCommand(Qt,"italic")}),v.jsx(Kn,{Icon:TT,tone:n,active:e.isUnderline,"aria-label":"Underline",onClick:()=>t.dispatchCommand(Qt,"underline")})]})},q_=()=>{const[t]=tt(),{state:e,tone:n}=mi(),i=()=>{t.dispatchCommand(e.isUnorderedList?ep:A_,void 0)},r=()=>{t.dispatchCommand(e.isOrderedList?ep:P_,void 0)};return v.jsxs(v.Fragment,{children:[v.jsx(Kn,{Icon:hu,tone:n,active:e.isUnorderedList,"aria-label":"Bullet list",onClick:i}),v.jsx(Kn,{Icon:ST,tone:n,active:e.isOrderedList,"aria-label":"Numbered list",onClick:r})]})},H_=()=>{const[t]=tt(),{state:e,tone:n}=mi(),i=()=>{if(e.isLink){t.dispatchCommand(Ll,null);return}const r=window.prompt("Enter URL");r&&t.dispatchCommand(Ll,r)};return v.jsx(Kn,{Icon:wT,tone:n,active:e.isLink,"aria-label":"Link",onClick:i})},Y_=()=>{const[t]=tt(),{state:e,tone:n}=mi();return v.jsxs(v.Fragment,{children:[v.jsx(Kn,{Icon:fT,tone:n,disabled:!e.canUndo,"aria-label":"Undo",onClick:()=>t.dispatchCommand(Fa,void 0)}),v.jsx(Kn,{Icon:pT,tone:n,disabled:!e.canRedo,"aria-label":"Redo",onClick:()=>t.dispatchCommand(La,void 0)})]})},FI={light:"lexical-tb-divider-light",dark:"lexical-tb-divider-dark"},zl=t=>{const{tone:e,className:n}=t,{tone:i,orientation:r}=mi(),o=e??i,s=r==="vertical";return v.jsx("div",{className:Q(s?"h-px w-full my-1":"w-px h-5 my-auto mx-1","shrink-0",FI[o],n)})},G_=4,LI=36,X_=t=>{const e=[];return O.Children.forEach(t,n=>{O.isValidElement(n)&&n.type===O.Fragment?e.push(...X_(n.props.children)):e.push(n)}),e},sp=t=>{const{children:e}=t,{state:n,tone:i}=mi(),r=X_(e),o=N.useRef(null),s=N.useRef(null),[a,l]=N.useState(r.length),c=N.useCallback(()=>{const f=o.current,p=s.current;if(!f||!p)return;const h=f.clientWidth,m=Array.from(p.children).map(b=>b.offsetWidth);if(m.reduce((b,w,_)=>b+w+(_>0?G_:0),0)<=h){l(m.length);return}let y=0,x=0;for(let b=0;b<m.length;b++){const w=m[b]+(b>0?G_:0);if(y+w+LI>h)break;y+=w,x++}l(x)},[]);N.useLayoutEffect(()=>{c()}),N.useEffect(()=>{const f=o.current,p=s.current;if(!f)return;const h=new ResizeObserver(()=>c());return h.observe(f),p&&h.observe(p),()=>h.disconnect()},[c]);const u=r.slice(0,a),d=r.slice(a);return v.jsxs("div",{ref:o,className:"relative flex flex-row items-center gap-1 min-w-0 flex-1",children:[v.jsx("div",{ref:s,"aria-hidden":!0,className:"pointer-events-none invisible absolute left-0 top-0 flex flex-row items-center gap-1 w-max",children:r.map((f,p)=>v.jsx("div",{className:"flex flex-row items-center",children:f},p))}),u.map((f,p)=>v.jsx(O.Fragment,{children:f},p)),d.length>0&&v.jsx(Ps,{placement:"bottom-end",minWidth:0,trigger:v.jsx("button",{type:"button","aria-label":"More",onMouseDown:f=>f.preventDefault(),className:Q("lexical-tb-btn h-8 w-8 shrink-0",i==="dark"?"lexical-tb-btn-dark":"lexical-tb-btn-light"),children:v.jsx(vT,{className:"h-[18px] w-[18px]"})}),children:v.jsx($l.Provider,{value:{state:n,tone:"light",orientation:"vertical"},children:v.jsx("div",{className:"flex flex-col items-stretch gap-1",onMouseDown:f=>f.preventDefault(),children:d.map((f,p)=>v.jsx(O.Fragment,{children:f},p))})})})]})},ap=()=>v.jsxs(v.Fragment,{children:[v.jsx(K_,{}),v.jsx(zl,{}),v.jsx(U_,{}),v.jsx(zl,{}),v.jsx(q_,{}),v.jsx(H_,{}),v.jsx(zl,{}),v.jsx(Y_,{})]}),$I=()=>ap(),J_=t=>{const{render:e,className:n}=t,[i]=tt(),r=rp();return v.jsx($l.Provider,{value:{state:r,tone:"light"},children:v.jsx("div",{className:Q("lexical-toolbar flex flex-row items-center p-1.5",n),children:v.jsx(sp,{children:e?e({editor:i,state:r,tone:"light"}):ap()})})})},Z_=t=>{const{render:e}=t,[n]=tt(),i=rp(),[r,o]=N.useState(!1),{refs:s,floatingStyles:a}=Bu({placement:"top-start",strategy:"fixed",middleware:[_N(8),SN(),wN({padding:8}),Lu({apply({rects:l,elements:c}){c.floating.style.width=`${l.reference.width}px`}})],whileElementsMounted:Ru});return N.useEffect(()=>n.registerRootListener(l=>s.setReference(l??null)),[n,s]),N.useEffect(()=>lt(n.registerCommand(gx,()=>(o(!0),!1),en),n.registerCommand(yx,()=>(o(!1),!1),en)),[n]),v.jsx($l.Provider,{value:{state:i,tone:"dark"},children:v.jsx(ba,{children:v.jsx(xo,{children:r&&v.jsx("div",{ref:s.setFloating,style:a,className:"z-50",children:v.jsx(qt.div,{className:"lexical-floating-toolbar flex w-full flex-row items-center p-1 rounded-xl",initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.1,ease:"easeInOut"},children:v.jsx(sp,{children:e?e({editor:n,state:i,tone:"dark"}):ap()})})})})})})},zI=t=>{const{label:e,description:n,error:i,placeholder:r,value:o,onChange:s,size:a="md",toolbar:l="static",renderToolbar:c,minRows:u=4,maxRows:d,autogrow:f=!1,namespace:p="InputLexical",nodes:h,autoFocus:m=!1,className:g}=t,y=N.useMemo(()=>({namespace:p,theme:B_,nodes:[...z_,...h??[]],editorState:o??null,onError:E=>{throw E}}),[]),x=N.useCallback(E=>{s?.(JSON.stringify(E.toJSON()))},[s]),b=Ht[a],w=!!i,_=E=>`calc(${E} * 1lh + 1.5rem)`,C=f?{minHeight:_(u),maxHeight:d?_(d):void 0}:{height:_(u)};return v.jsx(Yt.Provider,{value:a,children:v.jsxs("div",{className:Q("flex flex-col",g),children:[v.jsx(Ft,{children:e}),v.jsx(ZD,{initialConfig:y,children:v.jsxs("div",{className:Q("relative flex flex-col border input-base rounded-xl shadow-sm overflow-hidden transition-all duration-150 ring-0 focus-within:ring-4 focus-within:outline-none",w&&"input-error"),children:[l==="static"&&v.jsx(J_,{render:c}),v.jsx("div",{className:"relative flex-1 min-h-0",children:v.jsx(JM,{contentEditable:v.jsx(tI,{className:Q("lexical-content w-full outline-none px-3 py-3 leading-[1.55] overflow-y-auto mat-ui-hide-scrollbars",b),style:C,"aria-placeholder":r??"",placeholder:v.jsx("div",{className:Q("lexical-placeholder pointer-events-none absolute left-3 top-3",b),children:r??""})}),ErrorBoundary:MI})}),v.jsx(sI,{}),v.jsx(xI,{}),v.jsx(TI,{}),m&&v.jsx(AI,{}),s&&v.jsx(NI,{onChange:x}),l==="floating"&&v.jsx(Z_,{render:c})]})}),v.jsx(yt,{children:n}),v.jsx(vt,{children:i})]})})},BI=t=>{const{className:e,label:n,description:i,options:r,error:o,size:s="md",...a}=t;return v.jsx(Yt.Provider,{value:s,children:v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsx(Ft,{children:n}),v.jsxs("div",{className:"relative flex w-full flex-col",children:[v.jsx("select",{className:Q("appearance-none border input-base bg-none transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",Sn[s],Ht[s],Gn[s],Xn[s]),...a,children:r&&r.map((l,c)=>v.jsx("option",{value:l.value,disabled:l.disabled,children:l.label},c))}),v.jsxs(Cn,{children:[o&&v.jsx(un,{}),v.jsx(Xt,{Icon:Ni})]})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:o})]})})},Ds=O.forwardRef((t,e)=>{const{children:n,onClick:i,selected:r,disabled:o=!1,active:s=!1,className:a,...l}=t;return v.jsxs("div",{ref:e,...l,onClick:()=>!o&&i&&i(),className:Q("option-base px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",r&&!o&&"option-selected",s&&!o&&"option-active",o&&"option-disabled cursor-not-allowed hover:bg-transparent active:bg-transparent",a),children:[v.jsx("div",{className:"flex-1 min-w-0 break-all line-clamp-1",children:n}),r&&!o&&v.jsx("div",{className:"shrink-0",children:v.jsx(kg,{className:"h-5 w-5"})})]})}),Os=O.forwardRef((t,e)=>{const{children:n,className:i,...r}=t;return v.jsx("div",{ref:e,...r,className:Q("option-group-header px-4 pt-3 pb-1 text-xs font-semibold uppercase tracking-wide select-none",i),children:n})}),Ms=O.forwardRef((t,e)=>{const{className:n,...i}=t;return v.jsx("div",{ref:e,...i,className:Q("option-divider my-1 h-px",n)})}),Se=t=>!("kind"in t),Is=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:i,minWidth:r,maxWidth:o,open:s,onOpenChange:a,listRef:l,activeIndex:c,onNavigate:u,loop:d=!0,disabledIndices:f}=t,p=O.useMemo(()=>[Lu({apply({rects:E,elements:S}){i&&(S.floating.style.width=`${E.reference.width}px`),r&&(S.floating.style.minWidth=`${r}px`),o&&(S.floating.style.maxWidth=`${o}px`)}})],[i,o,r]),{refs:h,floatingStyles:m,context:g}=Bu({placement:e,open:s,onOpenChange:a,middleware:p,whileElementsMounted:Ru}),y=$N(g,{listRef:l,activeIndex:c,onNavigate:u,loop:d,virtual:!0,focusItemOnOpen:!1,disabledIndices:f}),{getReferenceProps:x,getFloatingProps:b,getItemProps:w}=FN([y]),_=O.useRef({onOutsideClick:n,floatingStyles:m,setFloating:h.setFloating,placement:e,getFloatingProps:b});_.current={onOutsideClick:n,floatingStyles:m,setFloating:h.setFloating,placement:e,getFloatingProps:b};const C=O.useMemo(()=>{const E=S=>{const{floatingStyles:k,setFloating:A,onOutsideClick:P,placement:X,getFloatingProps:W}=_.current,{className:I,open:Y,children:V}=S;return v.jsx(Ku,{open:Y,className:I,onOutsideClick:P,floatingStyles:k,setFloating:A,placement:X,floatingProps:W(),children:V})};return O.memo(E)},[]);return{anchorRef:h.setReference,Popover:C,getReferenceProps:x,getItemProps:w}},Q_=t=>{const{className:e,label:n,description:i,options:r,onChange:o,value:s,placeholder:a,maxHeight:l=300,error:c,size:u="md"}=t,[d,f]=N.useState(!1),[p,h]=N.useState(null),m=O.useRef(null),g=O.useRef([]),y=r?.find(S=>Se(S)&&S.value===s),x=N.useMemo(()=>r.map((S,k)=>!Se(S)||S.disabled?k:-1).filter(S=>S!==-1),[r]);Pi(d,()=>f(!1)),N.useEffect(()=>{if(d){m.current?.focus({preventScroll:!0});const S=r.findIndex(k=>Se(k)&&k.value===s);if(S>=0)h(S);else{const k=r.findIndex(A=>Se(A)&&!A.disabled);h(k>=0?k:null)}}else h(null)},[d]);const{anchorRef:b,Popover:w,getReferenceProps:_,getItemProps:C}=Is({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1),open:d,onOpenChange:f,listRef:g,activeIndex:p,onNavigate:h,disabledIndices:x}),E=S=>{const k=r[S];k&&Se(k)&&!k.disabled&&(o(k.value),f(!1))};return v.jsx(Yt.Provider,{value:u,children:v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsx(Ft,{children:n}),v.jsxs("div",{className:"relative flex w-full flex-col",ref:b,children:[v.jsxs("div",{..._({ref:m,role:"button",tabIndex:0,onClick:()=>f(!d),onKeyDown:S=>{S.key===" "?(S.preventDefault(),f(k=>!k)):S.key==="Enter"&&(S.preventDefault(),d&&p!=null?E(p):f(!0))}}),className:Q("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",Sn[u],Ht[u],Gn[u],s?ta[u]:Xn[u],c&&"select-trigger-error",d&&"ring-4"),children:[y&&v.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left",children:y.label}),!y&&a&&v.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder",children:a})]}),v.jsxs(Cn,{children:[c&&v.jsx(un,{}),!!s&&v.jsx(Xt,{Icon:Jn,onClick:()=>o(null)}),v.jsx(Xt,{Icon:Ni})]}),v.jsx(w,{open:d,children:v.jsx(Zn,{className:"!p-0",style:{maxHeight:l},children:v.jsx("div",{className:"flex flex-col p-2 gap-1",children:r.map((S,k)=>{if(!Se(S))return S.kind==="header"?v.jsx(Os,{ref:P=>{g.current[k]=P},children:S.label},`header-${k}`):v.jsx(Ms,{ref:P=>{g.current[k]=P}},`divider-${k}`);const A=S.value===s;return v.jsx(Ds,{...C({ref(P){g.current[k]=P}}),onClick:()=>E(k),selected:A,active:p===k,disabled:S.disabled,children:S.label},String(S.value))})})})})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:c})]})})},VI=t=>{const{className:e,label:n,description:i,options:r,onChange:o,onSearch:s,value:a,placeholder:l,maxHeight:c=300,error:u,size:d="md"}=t,[f,p]=N.useState(!1),[h,m]=N.useState(r),[g,y]=N.useState(""),[x,b]=N.useState(null),w=O.useRef(null),_=O.useRef(null),C=O.useRef([]),E=r?.find(V=>Se(V)&&V.value===a),S=N.useMemo(()=>g!==""?h:r,[g,h,r]),k=N.useMemo(()=>S.map((V,z)=>!Se(V)||V.disabled?z:-1).filter(V=>V!==-1),[S]);Pi(f,()=>p(!1)),N.useEffect(()=>{m(s(g))},[g,r,s]),N.useEffect(()=>{if(f){setTimeout(()=>_.current?.focus(),100);const V=r.findIndex(z=>Se(z)&&z.value===a);if(V>=0)b(V);else{const z=r.findIndex($=>Se($)&&!$.disabled);b(z>=0?z:null)}}else b(null),y("")},[f]),N.useEffect(()=>{if(!f)return;const V=S.findIndex(z=>Se(z)&&!z.disabled);b(V>=0?V:null)},[g,f,S]);const{anchorRef:A,Popover:P,getReferenceProps:X,getItemProps:W}=Is({placement:"bottom",fullWidth:!0,onOutsideClick:()=>p(!1),open:f,onOpenChange:p,listRef:C,activeIndex:x,onNavigate:b,disabledIndices:k}),I=V=>{const z=S[V];z&&Se(z)&&!z.disabled&&(o(z.value),p(!1))},Y=S.some(V=>Se(V));return v.jsx(Yt.Provider,{value:d,children:v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsx(Ft,{children:n}),v.jsxs("div",{className:"relative flex w-full flex-col",ref:A,children:[v.jsxs("div",{...X({ref:w,role:"button",tabIndex:0,onClick:()=>p(!f),onKeyDown:V=>{V.key===" "?(V.preventDefault(),p(z=>!z)):V.key==="Enter"&&!f&&(V.preventDefault(),p(!0))}}),className:Q("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",Sn[d],Ht[d],Gn[d],a?ta[d]:Xn[d],u&&"select-trigger-error",f&&"ring-4"),children:[E&&v.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left",children:E.label}),!E&&l&&v.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder",children:l})]}),v.jsxs(Cn,{children:[u&&v.jsx(un,{}),!!a&&v.jsx(Xt,{Icon:Jn,onClick:()=>o(null)}),v.jsx(Xt,{Icon:Ni})]}),v.jsx(P,{open:f,children:v.jsxs(Zn,{className:"gap-0 !p-0",style:{maxHeight:c},children:[v.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[v.jsx("input",{ref:_,type:"text",placeholder:"Search",value:g,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",onChange:V=>y(V.target.value),onKeyDown:V=>{V.key==="Enter"&&x!=null&&(V.preventDefault(),I(x))}}),v.jsx(ia,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),v.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[g!==""&&!Y&&v.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:v.jsx(mu,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),S.map((V,z)=>{if(!Se(V))return V.kind==="header"?v.jsx(Os,{ref:G=>{C.current[z]=G},children:V.label},`header-${z}`):v.jsx(Ms,{ref:G=>{C.current[z]=G}},`divider-${z}`);const $=V.value===a;return v.jsx(Ds,{...W({ref(G){C.current[z]=G}}),onClick:()=>I(z),selected:$,active:x===z,disabled:V.disabled,children:V.label},String(V.value))})]})]})})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:u})]})})},WI=(t,e)=>{const[n,i]=N.useState(t);return N.useEffect(()=>{const r=setTimeout(()=>{i(t)},e);return()=>{clearTimeout(r)}},[t,e]),n},KI=t=>{const{className:e,label:n,description:i,onChange:r,fetchOptionsByQuery:o,fetchOptionByValue:s,onSearchDebounceMs:a=300,value:l,placeholder:c,maxHeight:u=300,error:d,size:f="md"}=t,[p,h]=N.useState(!1),m=O.useRef(null),[g,y]=N.useState(""),[x,b]=N.useState([]),[w,_]=N.useState(null),C=O.useRef(null),[E,S]=N.useState(!1),[k,A]=N.useState(!1),[P,X]=N.useState(null),W=O.useRef([]),I=N.useMemo(()=>x.map((F,B)=>!Se(F)||F.disabled?B:-1).filter(F=>F!==-1),[x]);Pi(p,()=>h(!1));const Y=WI(g,a);N.useEffect(()=>{(async()=>{S(!0);const B=await o(Y);b(B),S(!1)})()},[Y,o]),N.useEffect(()=>{if(l==null){_(null);return}const F=x?.find(B=>Se(B)&&B.value===l);F?_(F):(async()=>{A(!0);const J=await s(l);_(J),A(!1)})()},[s,x,l]),N.useEffect(()=>{p?setTimeout(()=>C.current?.focus(),100):(X(null),y(""))},[p]),N.useEffect(()=>{if(!p)return;const F=x.findIndex(B=>Se(B)&&!B.disabled);X(F>=0?F:null)},[x,p]);const{anchorRef:V,Popover:z,getReferenceProps:$,getItemProps:G}=Is({placement:"bottom",fullWidth:!0,onOutsideClick:()=>h(!1),open:p,onOpenChange:h,listRef:W,activeIndex:P,onNavigate:X,disabledIndices:I}),T=F=>{const B=x[F];B&&Se(B)&&!B.disabled&&(r(B.value),h(!1))},M=x.some(F=>Se(F));return v.jsx(Yt.Provider,{value:f,children:v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsx(Ft,{children:n}),v.jsxs("div",{className:"relative flex w-full flex-col",ref:V,children:[v.jsxs("div",{...$({ref:m,role:"button",tabIndex:0,onClick:()=>h(!p),onKeyDown:F=>{F.key===" "?(F.preventDefault(),h(B=>!B)):F.key==="Enter"&&!p&&(F.preventDefault(),h(!0))}}),className:Q("flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",Sn[f],Ht[f],Gn[f],l?ta[f]:Xn[f],d&&"select-trigger-error",p&&"ring-4"),children:[!k&&w&&v.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left",children:w.label}),!k&&!w&&c&&v.jsx("span",{className:"flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder",children:c}),k&&v.jsx(Sr,{className:"h-4 w-4 text-[var(--color-input-text)]"})]}),v.jsxs(Cn,{children:[d&&v.jsx(un,{}),!!l&&v.jsx(Xt,{Icon:Jn,onClick:()=>r(null)}),v.jsx(Xt,{Icon:Ni})]}),v.jsx(z,{open:p,children:v.jsxs(Zn,{className:"gap-0 !p-0",style:{maxHeight:u},children:[v.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[v.jsx("input",{ref:C,type:"text",placeholder:"Search",value:g,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",onChange:F=>y(F.target.value),onKeyDown:F=>{F.key==="Enter"&&P!=null&&(F.preventDefault(),T(P))}}),v.jsx(ia,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),v.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[!E&&!M&&v.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:v.jsx(mu,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),E&&v.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:v.jsx(Sr,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),!E&&x.map((F,B)=>{if(!Se(F))return F.kind==="header"?v.jsx(Os,{ref:K=>{W.current[B]=K},children:F.label},`header-${B}`):v.jsx(Ms,{ref:K=>{W.current[B]=K}},`divider-${B}`);const J=F.value===l;return v.jsx(Ds,{...G({ref(K){W.current[B]=K}}),onClick:()=>T(B),selected:J,active:P===B,disabled:F.disabled,children:F.label},String(F.value))})]})]})})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:d})]})})},ew={red:"bg-red-100 text-red-700 ring-red-200 dark:bg-red-950 dark:text-red-300 dark:ring-red-800",orange:"bg-orange-100 text-orange-700 ring-orange-200 dark:bg-orange-950 dark:text-orange-300 dark:ring-orange-800",amber:"bg-amber-100 text-amber-700 ring-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:ring-amber-800",yellow:"bg-yellow-100 text-yellow-700 ring-yellow-200 dark:bg-yellow-950 dark:text-yellow-300 dark:ring-yellow-800",lime:"bg-lime-100 text-lime-700 ring-lime-200 dark:bg-lime-950 dark:text-lime-300 dark:ring-lime-800",green:"bg-green-100 text-green-700 ring-green-200 dark:bg-green-950 dark:text-green-300 dark:ring-green-800",emerald:"bg-emerald-100 text-emerald-700 ring-emerald-200 dark:bg-emerald-950 dark:text-emerald-300 dark:ring-emerald-800",teal:"bg-teal-100 text-teal-700 ring-teal-200 dark:bg-teal-950 dark:text-teal-300 dark:ring-teal-800",cyan:"bg-cyan-100 text-cyan-700 ring-cyan-200 dark:bg-cyan-950 dark:text-cyan-300 dark:ring-cyan-800",sky:"bg-sky-100 text-sky-700 ring-sky-200 dark:bg-sky-950 dark:text-sky-300 dark:ring-sky-800",blue:"bg-blue-100 text-blue-700 ring-blue-200 dark:bg-blue-950 dark:text-blue-300 dark:ring-blue-800",indigo:"bg-indigo-100 text-indigo-700 ring-indigo-200 dark:bg-indigo-950 dark:text-indigo-300 dark:ring-indigo-800",violet:"bg-violet-100 text-violet-700 ring-violet-200 dark:bg-violet-950 dark:text-violet-300 dark:ring-violet-800",purple:"bg-purple-100 text-purple-700 ring-purple-200 dark:bg-purple-950 dark:text-purple-300 dark:ring-purple-800",fuchsia:"bg-fuchsia-100 text-fuchsia-700 ring-fuchsia-200 dark:bg-fuchsia-950 dark:text-fuchsia-300 dark:ring-fuchsia-800",pink:"bg-pink-100 text-pink-700 ring-pink-200 dark:bg-pink-950 dark:text-pink-300 dark:ring-pink-800",rose:"bg-rose-100 text-rose-700 ring-rose-200 dark:bg-rose-950 dark:text-rose-300 dark:ring-rose-800",slate:"bg-slate-100 text-slate-700 ring-slate-200 dark:bg-slate-950 dark:text-slate-300 dark:ring-slate-800",gray:"bg-gray-100 text-gray-700 ring-gray-200 dark:bg-gray-950 dark:text-gray-300 dark:ring-gray-800",zinc:"bg-zinc-100 text-zinc-700 ring-zinc-200 dark:bg-zinc-950 dark:text-zinc-300 dark:ring-zinc-800",neutral:"bg-neutral-100 text-neutral-700 ring-neutral-200 dark:bg-neutral-950 dark:text-neutral-300 dark:ring-neutral-800",stone:"bg-stone-100 text-stone-700 ring-stone-200 dark:bg-stone-950 dark:text-stone-300 dark:ring-stone-800",white:"bg-[var(--color-badge-white-bg)] text-[var(--color-badge-white-text)] ring-[var(--color-badge-white-ring)]",black:"bg-[var(--color-badge-black-bg)] text-[var(--color-badge-black-text)] ring-[var(--color-badge-black-ring)]"},js=O.forwardRef((t,e)=>{const{className:n,children:i,onClick:r,showCloseIcon:o,Icon:s,color:a="gray"}=t,l=Q("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",ew[a],n);return r?v.jsx("div",{ref:e,children:v.jsxs("button",{className:Q("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:r,children:[s&&v.jsx(s,{className:"h-4 w-4 shrink-0"}),v.jsx("div",{className:"break-all line-clamp-1 text-left",children:i}),o&&v.jsx(Jn,{className:"h-4 w-4 shrink-0"})]})}):v.jsxs("div",{className:l,ref:e,children:[s&&v.jsx(s,{className:"h-4 w-4 shrink-0"}),v.jsx("div",{className:"break-all line-clamp-1 text-left",children:i})]})});function UI(t){const{enabled:e,triggerRef:n,measureRef:i,trayRef:r,itemCount:o,deps:s=[],gap:a=4}=t,[l,c]=N.useState(0);return N.useLayoutEffect(()=>{if(!e)return;const u=n.current,d=i.current;if(!u||!d)return;const f=()=>{if(o===0){c(0);return}if(o===1){c(1);return}const h=window.getComputedStyle(u),m=parseFloat(h.paddingLeft||"0"),g=u.getBoundingClientRect(),y=g.left+m;let x=g.right-parseFloat(h.paddingRight||"0");const b=r?.current;if(b){const A=b.getBoundingClientRect();A.width>0&&(x=Math.min(x,A.left-a))}const w=Math.max(0,x-y),_=Array.from(d.children);if(_.length<o+1)return;let C=0;for(let A=0;A<o;A++)C+=_[A].offsetWidth+(A>0?a:0);if(C<=w){c(o);return}const E=_[o].offsetWidth;let S=0,k=0;for(let A=0;A<o;A++){const P=_[A].offsetWidth,X=S+P+(A>0?a:0);if(X+E+a>w)break;S=X,k++}c(Math.max(1,k))},p=new ResizeObserver(f);return p.observe(u),r?.current&&p.observe(r.current),f(),()=>p.disconnect()},[e,o,...s]),l}const qI=t=>{const{className:e,label:n,description:i,options:r,onChange:o,onSearch:s,value:a,placeholder:l,maxHeight:c=300,error:u,size:d="md",singleLine:f=!1,color:p="blue"}=t,[h,m]=N.useState(!1),[g,y]=N.useState(r),[x,b]=N.useState(""),[w,_]=N.useState(null),C=O.useRef(null),E=O.useRef(null),S=O.useRef([]),k=O.useRef(null),A=O.useRef(null),P=N.useMemo(()=>a.map(j=>r.find(U=>Se(U)&&U.value===j)).filter(j=>j!==void 0),[a,r]),X=j=>{if(j==="")return r;const U=j.toLowerCase();return r.filter(oe=>Se(oe)&&typeof oe.label=="string"?oe.label.toLowerCase().includes(U):!0)},W=N.useMemo(()=>x!==""?g:r,[x,g,r]),I=N.useMemo(()=>W.map((j,U)=>!Se(j)||j.disabled?U:-1).filter(j=>j!==-1),[W]);Pi(h,()=>m(!1)),N.useEffect(()=>{y((s??X)(x))},[x,r,s]),N.useEffect(()=>{if(h){setTimeout(()=>E.current?.focus(),100);const j=r.findIndex(U=>Se(U)&&!U.disabled);_(j>=0?j:null)}else _(null),b("")},[h]),N.useEffect(()=>{if(!h)return;const j=W.findIndex(U=>Se(U)&&!U.disabled);_(j>=0?j:null)},[x,h,W]);const Y=UI({enabled:f,triggerRef:C,measureRef:k,trayRef:A,itemCount:P.length,deps:[P,u]}),{anchorRef:V,Popover:z,getReferenceProps:$,getItemProps:G}=Is({placement:"bottom",fullWidth:!0,onOutsideClick:()=>m(!1),open:h,onOpenChange:m,listRef:S,activeIndex:w,onNavigate:_,disabledIndices:I}),T=j=>{a.includes(j)?o(a.filter(U=>U!==j)):o([...a,j])},M=j=>{const U=W[j];U&&Se(U)&&!U.disabled&&T(U.value)},F=W.some(j=>Se(j)),B=a.length>0,J=f?Y:P.length,K=P.slice(0,J),ee=P.length-J;return v.jsx(Yt.Provider,{value:d,children:v.jsxs("div",{className:Q("flex flex-col",e),children:[v.jsx(Ft,{children:n}),v.jsxs("div",{className:"relative flex w-full flex-col",ref:V,children:[v.jsxs("div",{...$({ref:C,role:"button",tabIndex:0,onClick:()=>m(!h),onKeyDown:j=>{j.key===" "?(j.preventDefault(),m(U=>!U)):j.key==="Enter"&&!h?(j.preventDefault(),m(!0)):j.key==="Backspace"&&!h&&B&&(j.preventDefault(),o(a.slice(0,-1)))}}),className:Q("flex flex-row items-center gap-1 border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",f&&Q("flex-nowrap overflow-hidden",Sn[d]),!f&&Q("flex-wrap py-1.5",bg[d]),Ht[d],Gn[d],B?ta[d]:Xn[d],u&&"select-trigger-error",h&&"ring-4"),children:[B&&K.map(j=>v.jsx(js,{color:p,className:Q(f&&J>1&&"shrink-0",(!f||J===1)&&"max-w-full min-w-0"),children:j.label},String(j.value))),B&&ee>0&&v.jsxs("span",{className:"shrink-0 text-sm font-medium select-placeholder px-1",children:["+",ee," more"]}),!B&&l&&v.jsx("span",{className:"select-placeholder",children:l})]}),f&&v.jsxs("div",{ref:k,"aria-hidden":!0,className:"absolute top-0 left-0 invisible pointer-events-none flex flex-row flex-nowrap items-center gap-1 w-max",children:[P.map(j=>v.jsx(js,{color:p,children:j.label},String(j.value))),P.length>0&&v.jsxs("span",{className:"text-sm font-medium px-1",children:["+",P.length," more"]})]}),v.jsxs(Cn,{ref:A,children:[u&&v.jsx(un,{}),B&&v.jsx(Xt,{Icon:Jn,onClick:()=>o([])}),v.jsx(Xt,{Icon:Ni})]}),v.jsx(z,{open:h,children:v.jsxs(Zn,{className:"gap-0 !p-0",style:{maxHeight:c},children:[v.jsxs("div",{className:"sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm",children:[v.jsx("input",{ref:E,type:"text",placeholder:"Search",value:x,className:"appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",onChange:j=>b(j.target.value),onKeyDown:j=>{j.key==="Enter"&&w!=null?(j.preventDefault(),M(w)):j.key==="Backspace"&&x===""&&B&&(j.preventDefault(),o(a.slice(0,-1)))}}),v.jsx(ia,{className:"absolute select-search-icon left-4 top-4 h-4 w-4"})]}),v.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[x!==""&&!F&&v.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:v.jsx(mu,{className:"h-6 w-6 text-[var(--color-input-text)]"})}),W.map((j,U)=>{if(!Se(j))return j.kind==="header"?v.jsx(Os,{ref:ae=>{S.current[U]=ae},children:j.label},`header-${U}`):v.jsx(Ms,{ref:ae=>{S.current[U]=ae}},`divider-${U}`);const oe=a.includes(j.value);return v.jsx(Ds,{...G({ref(ae){S.current[U]=ae}}),onClick:()=>M(U),selected:oe,active:w===U,disabled:j.disabled,children:j.label},String(j.value))})]})]})})]}),v.jsx(yt,{children:i}),v.jsx(vt,{children:u})]})})},HI=O.forwardRef((t,e)=>{const{className:n,children:i,...r}=t;return v.jsx("div",{ref:e,className:Q("flex flex-col gap-6 border panel-base rounded-2xl shadow-sm px-6 py-6",n),...r,children:i})}),YI=O.forwardRef((t,e)=>{const{className:n,children:i,...r}=t;return v.jsx("div",{ref:e,className:Q("flex flex-col gap-1 border panel-base rounded-2xl shadow-sm p-2",n),...r,children:i})}),tw="input-description text-sm font-medium",GI=t=>{const{className:e,label:n,children:i,orientation:r="vertical",...o}=t;return r==="horizontal"?v.jsxs("div",{className:Q("flex flex-row items-center gap-3 px-3 py-2",e),...o,children:[v.jsx("div",{className:Q(tw,"w-1/2 line-clamp-1 break-all"),children:n}),v.jsx("div",{className:"w-1/2 line-clamp-1 break-all",children:i})]}):v.jsxs("div",{className:Q("flex flex-col gap-1 px-3 py-2",e),...o,children:[n&&v.jsx("div",{className:tw,children:n}),v.jsx("div",{children:i})]})},XI={error:yu,warning:ET,success:gu,info:NT},JI={error:"text-[var(--color-status-error)]",warning:"text-[var(--color-status-warning)]",success:"text-[var(--color-status-success)]",info:"text-[var(--color-status-info)]"},nw="inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent",ZI=t=>{const{className:e,children:n,Icon:i,status:r,...o}=t,s=r?XI[r]:null,a=v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"inline-flex flex-row items-center gap-3 min-w-0",children:[i&&v.jsx(i,{className:"h-5 w-5 shrink-0"}),v.jsx("span",{className:"truncate",children:n})]}),v.jsxs("span",{className:"inline-flex flex-row items-center gap-2 shrink-0",children:[s&&r&&v.jsx(s,{className:Q("h-5 w-5",JI[r])}),v.jsx(mT,{className:"h-5 w-5 text-[var(--color-input-icon-button-icon)]"})]})]});if(o.href!==void 0){const{href:l,...c}=o;return v.jsx("a",{href:l,className:Q(nw,e),...c,children:a})}return v.jsx("button",{className:Q(nw,e),...o,children:a})},QI=t=>{const{className:e,vertical:n=!1,...i}=t;return v.jsx("div",{className:Q(n?"w-px h-full bg-[var(--color-divider)]":"w-full h-px bg-[var(--color-divider)]",e),...i})},ej=t=>{const{children:e,content:n,className:i,placement:r="top",minWidth:o=100,maxWidth:s=200}=t,[a,l]=N.useState(!1),{anchorRef:c,Popover:u}=Ca({placement:r,minWidth:o,maxWidth:s});return v.jsxs("span",{ref:c,className:i,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e,v.jsx(u,{open:a,children:v.jsx(Zn,{children:n})})]})},tj=t=>{const{open:e,onDismiss:n,enableDismissOnOutsideClick:i,enableDismissOnEscKey:r,enableDismissButton:o,className:s,children:a,maxWidth:l=600}=t;return Pi(!!r&&e,n||(()=>{})),v.jsx(xo,{children:e&&v.jsxs(ba,{children:[v.jsx(qt.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:v.jsx(zu,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:i?n:void 0,lockScroll:!0})}),v.jsx("div",{className:"fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto z-20",children:v.jsxs(qt.div,{className:Q("flex flex-col modal-content rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",s),style:{transformOrigin:"bottom",maxWidth:l},initial:{opacity:0,scale:.98,translateY:10},animate:{opacity:1,scale:1,translateY:0},exit:{opacity:0,scale:.98,translateY:10},transition:{duration:.15,ease:"easeInOut"},children:[o&&v.jsx(pu,{Icon:Jn,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},nj=t=>{const{open:e,onDismiss:n,enableDismissOnOutsideClick:i,enableDismissOnEscKey:r,enableDismissButton:o,className:s,children:a,maxWidth:l=480}=t;return Pi(!!r&&e,n||(()=>{})),v.jsx(xo,{children:e&&v.jsxs(ba,{children:[v.jsx(qt.div,{style:{transformOrigin:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeInOut"},children:v.jsx(zu,{className:"modal-overlay backdrop-blur-[1px] z-10",onClick:i?n:void 0,lockScroll:!0})}),v.jsx("div",{className:"fixed inset-0 flex flex-row justify-end pointer-events-none z-20",children:v.jsxs(qt.div,{className:Q("flex flex-col modal-content shadow-xl p-6 lg:p-12 pointer-events-auto h-full w-full overflow-y-auto relative",s),style:{maxWidth:l},initial:{translateX:"100%"},animate:{translateX:0},exit:{translateX:"100%"},transition:{duration:.25,ease:[.32,.72,0,1]},children:[o&&v.jsx(pu,{Icon:Jn,className:"absolute top-4 right-4",variant:"transparent",size:"sm",onClick:n}),a]})})]})})},iw=t=>{const{className:e,tabs:n}=t;return v.jsx("div",{className:Q("h-12 tab-container p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto mat-ui-hide-scrollbars",e),children:n.map((i,r)=>{const o=Q("shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 tab-button transition-all duration-150 select-none focus:outline-none focus:ring-0",i.active&&"tab-button-active shadow-sm");return i.href?v.jsxs("a",{href:i.href,className:o,children:[i.Icon&&v.jsx(i.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),i.label]},r):v.jsxs("button",{className:o,onClick:i.onClick,children:[i.Icon&&v.jsx(i.Icon,{className:"h-5 w-5 shrink-0 mr-2 -ml-1"}),i.label]},r)})})},ij=t=>{const{duration:e=.3,ease:n="easeInOut",horizontal:i=!1,children:r,className:o,...s}=t,a=O.useRef(null),l=O.useRef(null),c=O.useRef(null);return O.useEffect(()=>{const u=a.current,d=l.current;if(!u||!d)return;let f=!0;const p=()=>{const m=i?u.scrollWidth-u.clientWidth:u.scrollHeight-u.clientHeight,g=i?u.scrollLeft:u.scrollTop;if(!(m<=0||Math.abs(m-g)<1)){if(f){f=!1,i?u.scrollLeft=m:u.scrollTop=m;return}c.current?.stop(),c.current=eT(g,m,{duration:e,ease:n,onUpdate:y=>{i?u.scrollLeft=y:u.scrollTop=y}})}},h=new ResizeObserver(p);return h.observe(d),()=>{h.disconnect(),c.current?.stop()}},[e,n,i]),v.jsx("div",{ref:a,className:Q("min-h-0 min-w-0",i?"overflow-x-auto":"overflow-y-auto",o),...s,children:v.jsx("div",{ref:l,children:r})})};function rj(t){const{onDelta:e,onDragStart:n,onDragEnd:i,disabled:r=!1,primaryButtonOnly:o=!0,preventScrollOnMove:s=!0}=t,[a,l]=O.useState(!1),c=O.useRef(!1),u=O.useRef(0),d=O.useRef(0),f=O.useRef(0),p=O.useRef(null),h=O.useRef(null),m=O.useRef({onDelta:e,onDragStart:n,onDragEnd:i,preventScrollOnMove:s});O.useEffect(()=>{m.current={onDelta:e,onDragStart:n,onDragEnd:i,preventScrollOnMove:s}});const g=O.useRef({}),y=O.useCallback(b=>{if(!c.current)return;const w={clientX:b??d.current,startX:u.current,totalDeltaX:f.current,target:p.current};c.current=!1,l(!1);const{move:_,up:C,keydown:E}=g.current;_&&window.removeEventListener("pointermove",_,!0),C&&(window.removeEventListener("pointerup",C,!0),window.removeEventListener("pointercancel",C,!0)),E&&window.removeEventListener("keydown",E,!0),g.current={},h.current!=null&&(cancelAnimationFrame(h.current),h.current=null),m.current.onDragEnd?.(w),p.current=null,f.current=0},[]),x=O.useCallback(b=>{if(r||o&&b.button!==0)return;b.target.setPointerCapture?.(b.pointerId),u.current=b.clientX,d.current=b.clientX,f.current=0,p.current=b.target,c.current=!0,l(!0);const w={clientX:b.clientX,startX:b.clientX,totalDeltaX:0,target:b.target};m.current.onDragStart?.(w);const _=S=>{c.current&&h.current==null&&(h.current=requestAnimationFrame(()=>{h.current=null;const k=S.clientX,A=k-d.current;if(A===0)return;d.current=k,f.current+=A;const P={clientX:k,startX:u.current,totalDeltaX:f.current,target:p.current};m.current.preventScrollOnMove&&S.preventDefault(),m.current.onDelta(A,P)}))},C=S=>{y(S.clientX)},E=S=>{S.key==="Escape"&&(S.preventDefault(),y())};g.current={move:_,up:C,keydown:E},window.addEventListener("pointermove",_,{passive:!s,capture:!0}),window.addEventListener("pointerup",C,{capture:!0}),window.addEventListener("pointercancel",C,{capture:!0}),window.addEventListener("keydown",E,!0)},[y,r,s,o]);return O.useEffect(()=>()=>{c.current&&y()},[y]),{isDragging:a,bind:{onPointerDown:x,role:"separator",style:{touchAction:"none",cursor:"col-resize",userSelect:"none"}}}}const rw=t=>{const{column:e,width:n,height:i,onResize:r,sortDirection:o,onSortClick:s}=t,a=!!e.sortable,{bind:l}=rj({onDelta:c=>r(c)});return v.jsxs("div",{style:{width:n,height:i},className:"flex flex-row items-stretch select-none shrink-0",children:[v.jsxs("div",{className:Q("flex-1 min-w-0 px-4 table-header-cell transition-colors duration-100 flex flex-row items-center gap-2",a&&"cursor-pointer"),onClick:a?s:void 0,children:[v.jsx("span",{className:"truncate",children:e.header}),a&&o==="asc"&&v.jsx(gT,{className:"h-4 w-4 shrink-0"}),a&&o==="desc"&&v.jsx(Ni,{className:"h-4 w-4 shrink-0"})]}),v.jsx("div",{...l,className:"cursor-ew-resize group py-4 table-resize-handle w-[8px]",children:v.jsx("div",{className:"w-0.5 h-full mx-auto table-resize-divider table-resize-divider-hover pointer-events-none"})})]})},oo=200,oj=60,sj=t=>{const e={};for(const n of t)e[n.id]=n.defaultWidth??oo;return e},ow=t=>{const{columns:e,rows:n,getRowId:i,onRowClick:r,sort:o,onSortChange:s,className:a,rowHeight:l=44,headerHeight:c=44}=t,[u,d]=N.useState(()=>sj(e));N.useEffect(()=>{d(y=>{const x={};let b=Object.keys(y).length!==e.length;for(const w of e)w.id in y?x[w.id]=y[w.id]:(x[w.id]=w.defaultWidth??oo,b=!0);return b?x:y})},[e]);const f=N.useCallback((y,x,b)=>{d(w=>{const _=w[y]??oo,C=Math.max(b,_+x);return C===_?w:{...w,[y]:C}})},[]),p=N.useCallback(y=>{if(s){if(!o||o.columnId!==y){s({columnId:y,direction:"asc"});return}if(o.direction==="asc"){s({columnId:y,direction:"desc"});return}s(null)}},[o,s]),h=e.reduce((y,x)=>y+(u[x.id]??x.defaultWidth??oo),0),m=N.useRef(null),g=y=>{m.current&&(m.current.scrollLeft=y.currentTarget.scrollLeft)};return v.jsxs("div",{className:Q("flex flex-col h-full w-full",a),children:[v.jsx("div",{ref:m,className:"overflow-hidden shrink-0 table-header-strip",style:{height:c},children:v.jsx("div",{className:"flex flex-row table-header font-medium",style:{width:h,minWidth:"100%"},children:e.map(y=>v.jsx(rw,{column:y,width:u[y.id]??y.defaultWidth??oo,height:c,onResize:x=>f(y.id,x,y.minWidth??oj),sortDirection:o?.columnId===y.id?o.direction:null,onSortClick:()=>p(y.id)},y.id))})}),v.jsx("div",{className:"flex-1 overflow-auto",onScroll:g,children:v.jsx("div",{className:"flex flex-col",style:{width:h,minWidth:"100%"},children:n.map((y,x)=>v.jsx("div",{className:Q("flex flex-row table-body-row transition-colors duration-100",r&&"cursor-pointer"),onClick:r?()=>r(y,x):void 0,children:e.map(b=>v.jsx("div",{className:"shrink-0 content-center px-4 relative",style:{width:u[b.id]??b.defaultWidth??oo,height:l},children:v.jsx("div",{className:"break-all line-clamp-1",children:b.renderCell(y,x)})},b.id))},i(y,x)))})})]})},lp=t=>{const{label:e,children:n,className:i}=t;return v.jsxs("div",{className:Q("flex flex-col dropdown-button-group",i),children:[e&&v.jsx("div",{className:"mb-2 text-sm dropdown-group-label font-semibold px-3",children:e}),n]})},aj=()=>v.jsx("div",{}),lj=[{id:1,email:"sarah.jennings@example.com",firstname:"Sarah",lastname:"Jennings",status:"active"},{id:2,email:"liam.patel@outlook.com",firstname:"Liam",lastname:"Patel",status:"inactive"},{id:3,email:"emily.wong@gmail.com",firstname:"Emily",lastname:"Wong",status:"active"},{id:4,email:"noah.thompson@yahoo.com",firstname:"Noah",lastname:"Thompson",status:"active"},{id:5,email:"isabella.martin@protonmail.com",firstname:"Isabella",lastname:"Martin",status:"active"},{id:6,email:"ethan.ross@company.io",firstname:"Ethan",lastname:"Ross",status:"inactive"},{id:7,email:"olivia.nguyen@example.org",firstname:"Olivia",lastname:"Nguyen",status:"active"},{id:8,email:"lucas.henderson@gmail.com",firstname:"Lucas",lastname:"Henderson",status:"inactive"},{id:9,email:"mia.johnson@workmail.com",firstname:"Mia",lastname:"Johnson",status:"active"},{id:10,email:"jackson.rivera@outlook.com",firstname:"Jackson",lastname:"Rivera",status:"active"},{id:11,email:"ava.sanders@example.com",firstname:"Ava",lastname:"Sanders",status:"active"},{id:12,email:"logan.bennett@company.io",firstname:"Logan",lastname:"Bennett",status:"inactive"}],cj=[{id:"id",header:"ID",renderCell:t=>t.id},{id:"email",header:"Email",renderCell:t=>v.jsx(js,{Icon:AT,onClick:()=>{},children:t.email})},{id:"firstname",header:"First Name",renderCell:t=>t.firstname},{id:"lastname",header:"Last Name",renderCell:t=>t.lastname},{id:"status",header:"Status",renderCell:()=>v.jsx(dj,{})}],uj=()=>v.jsxs("div",{className:"flex flex-col gap-6",children:[v.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[v.jsx(vu,{Icon:ia,placeholder:"Search..."}),v.jsx(na,{Icon:Eg}),v.jsx(Cg,{Icon:Tg,children:"New"}),v.jsxs(Ps,{trigger:v.jsx(na,{Icon:Eg}),children:[v.jsx(_t,{dismissOnClick:!1,Icon:Tg,children:"Add new"}),v.jsx(_t,{Icon:kT,children:"Remove"}),v.jsxs(lp,{label:"Test",className:"mt-2",children:[v.jsx(_t,{children:"Item 1"}),v.jsx(_t,{children:"Item 2"}),v.jsx(_t,{children:"Item 3"}),v.jsx(_t,{children:"Item 4"})]}),v.jsxs(lp,{label:"Test",className:"mt-2",children:[v.jsx(_t,{children:"Item 1"}),v.jsx(_t,{children:"Item 2"}),v.jsx(_t,{children:"Item 3"}),v.jsx(_t,{children:"Item 4"})]})]}),v.jsx(iw,{tabs:[{label:"Tab 1",Icon:hu,active:!0,onClick:()=>{}},{label:"Tab 2",active:!1,onClick:()=>{}},{label:"Tab 3",Icon:hu,active:!1,onClick:()=>{}}]})]}),v.jsx(Q_,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}}),v.jsx(ow,{className:"h-[300px] w-[300px]",columns:cj,rows:lj,getRowId:t=>t.id}),v.jsx(aj,{})]}),dj=()=>v.jsx(v.Fragment,{children:v.jsxs(Ps,{placement:"bottom-end",className:"inline-block",trigger:v.jsx(js,{onClick:()=>{},children:"Test"}),children:[v.jsx(_t,{children:"Option 1"}),v.jsx(_t,{children:"Option 2"}),v.jsx(_t,{children:"Option 3"})]})});ie.AutoScroll=ij,ie.Badge=js,ie.BadgeColor=ew,ie.Button=Cg,ie.ButtonIconRound=pu,ie.ButtonIconSquare=na,ie.Divider=QI,ie.DropdownButton=_t,ie.DropdownButtonGroup=lp,ie.DropdownMenu=Ps,ie.DropdownPanel=Zn,ie.Input=vu,ie.InputCheck=iA,ie.InputColor=GN,ie.InputDescription=yt,ie.InputError=vt,ie.InputErrorIcon=un,ie.InputFileMultiple=fP,ie.InputFileSingle=uP,ie.InputIconButton=Xt,ie.InputIconButtonTray=Cn,ie.InputLabel=Ft,ie.InputLexical=zI,ie.InputPassword=XN,ie.InputRadio=tA,ie.InputSelect=Q_,ie.InputSelectDivider=Ms,ie.InputSelectGroupHeader=Os,ie.InputSelectMultiple=qI,ie.InputSelectNative=BI,ie.InputSelectOption=Ds,ie.InputSelectSearchable=VI,ie.InputSelectSearchableAsync=KI,ie.InputTextArea=eA,ie.InputToggle=nA,ie.LEXICAL_NODES=z_,ie.LexicalBlockTypeSelect=K_,ie.LexicalDefaultToolbarContent=$I,ie.LexicalFloatingToolbar=Z_,ie.LexicalFormatButtons=U_,ie.LexicalHistoryButtons=Y_,ie.LexicalLinkButton=H_,ie.LexicalListButtons=q_,ie.LexicalToolbar=J_,ie.LexicalToolbarButton=Kn,ie.LexicalToolbarDivider=zl,ie.LexicalToolbarItems=sp,ie.Modal=tj,ie.Panel=HI,ie.PanelField=GI,ie.PanelLink=ZI,ie.PanelStack=YI,ie.PopoverBase=Ku,ie.SidebarModal=nj,ie.Spinner=Sr,ie.TabButtons=iw,ie.Table=ow,ie.TableColumnHead=rw,ie.Test=uj,ie.Tooltip=ej,ie.UploadFileTile=uv,ie.isSelectOption=Se,ie.lexicalTheme=B_,ie.useLexicalToolbar=mi,ie.useLexicalToolbarState=rp,ie.usePopover=Ca,ie.useSelectPopover=Is,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})}));
|
|
236
|
-
//# sourceMappingURL=index.umd.cjs.map
|