@fgbg/mdocs 0.8.21 → 0.8.23
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 +1 -1
- package/agent-skills/changelog/SKILL.md +17 -1
- package/agent-skills/index.json +1 -1
- package/bin/mdocs.js +1 -1
- package/dist/server/cli/main.js +22 -1
- package/dist/server/cli/main.js.map +1 -1
- package/dist/server/cli/self-update.js +4 -0
- package/dist/server/cli/self-update.js.map +1 -1
- package/dist/server/documents/tree-and-folders.test.js +54 -3
- package/dist/server/documents/tree-and-folders.test.js.map +1 -1
- package/dist/server/documents/tree.service.js +66 -5
- package/dist/server/documents/tree.service.js.map +1 -1
- package/dist/server/routes/documents.routes.js +16 -0
- package/dist/server/routes/documents.routes.js.map +1 -1
- package/dist/web/assets/{AgentChatPanel-D95hI02c.js → AgentChatPanel-CtdLYtSw.js} +1 -1
- package/dist/web/assets/{AgentSkillFormCard-BtJ0QjLG.js → AgentSkillFormCard-DeZnOTQg.js} +2 -2
- package/dist/web/assets/AiWriteWorkbench-hUYjin2m.js +7 -0
- package/dist/web/assets/DiagramEditor-NtNY3sZL-C9hL71kf.js +2 -0
- package/dist/web/assets/DocumentEditor-BmmnuieO.js +21 -0
- package/dist/web/assets/{MergeView-DgFQHD5_.js → MergeView-CjhCBNPa.js} +1 -1
- package/dist/web/assets/{PlaygroundPage-Dg57Xxpl.js → PlaygroundPage-CgaNgQEp.js} +1 -1
- package/dist/web/assets/SettingsPage-Fl5Tu7u3.js +1 -0
- package/dist/web/assets/{Toolbar-0Y2wmGwe.js → Toolbar-BaKuyXey.js} +1 -1
- package/dist/web/assets/{VisitorPickerModal-COxtOvc4.js → VisitorPickerModal-DPyg6mIt.js} +1 -1
- package/dist/web/assets/{copy-nOl0d3Th.js → copy-UkvgEfIg.js} +1 -1
- package/dist/web/assets/diagram-BLCqfrbF.js +6257 -0
- package/dist/web/assets/index-Ct5Vt4tz.js +185 -0
- package/dist/web/assets/index-Dt_PAYaR.css +1 -0
- package/dist/web/assets/meta2d-D3b5RRN8.js +110 -0
- package/dist/web/assets/{meta2dEngine-BD2XbzaV-e28q005B.js → meta2dEngine-BD2XbzaV-2ovN6JHu.js} +1 -1
- package/dist/web/assets/{motion-D-I76zAi.js → motion-Bz_inm1R.js} +1 -1
- package/dist/web/assets/{plus-DvBbg6jL.js → plus-B-uEAM2g.js} +1 -1
- package/dist/web/assets/react-6CQL39Gs.js +2382 -0
- package/dist/web/assets/react-vendor-BJFXgntS.js +242 -0
- package/dist/web/assets/{ui-C3xtW1w8.js → ui-TwLH91RV.js} +133 -133
- package/dist/web/index.html +5 -5
- package/package.json +2 -2
- package/dist/web/assets/AiWriteWorkbench-Qam8cfY6.js +0 -6
- package/dist/web/assets/DiagramEditor-BTRe45TX-Did98cnP.js +0 -2
- package/dist/web/assets/DocumentEditor-DtSzkl6A.js +0 -21
- package/dist/web/assets/SettingsPage-CkYpe5v7.js +0 -1
- package/dist/web/assets/diagram-BJFhx-27.js +0 -3016
- package/dist/web/assets/index-B-XJ-ScV.js +0 -185
- package/dist/web/assets/index-CGvsjO9f.css +0 -1
- package/dist/web/assets/meta2d-C8Z4cn-d.js +0 -110
- package/dist/web/assets/react-BsVOIHR8.js +0 -2126
- package/dist/web/assets/react-vendor-BNpqFP9B.js +0 -242
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-pp8916En.js","assets/javascript-XPxc2APE.js","assets/css-CLj8gQPS.js","assets/scss-D5BDwBP9.js","assets/vue-DMJtu8ND.js","assets/typescript-DttGkNCf.js","assets/json-CjLXzM_z.js","assets/svelte-DR4MIrkg.js","assets/xml-DtyAt_xK.js","assets/java-B2AjWfgk.js","assets/cpp-Bp17OOWP.js","assets/c-CyUOlKFr.js","assets/sql-CKXjX23X.js","assets/ruby-CM5gBc7p.js","assets/graphql-By4-2MiP.js","assets/jsx-BGEKFWBk.js","assets/tsx-Dio8iE-N.js","assets/shellscript-CE-5zpiL.js","assets/lua-JmSlR1pZ.js","assets/yaml-B92AUxDB.js","assets/php-R6g_5hLQ.js","assets/shellsession-BhddCRKA.js","assets/nginx-bBKbG2uI.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var P_=Object.defineProperty;var I_=Object.getPrototypeOf;var z_=Reflect.get;var Mg=e=>{throw TypeError(e)};var U_=(e,t,n)=>t in e?P_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var z=(e,t,n)=>U_(e,typeof t!="symbol"?t+"":t,n),Af=(e,t,n)=>t.has(e)||Mg("Cannot "+n);var Ft=(e,t,n)=>(Af(e,t,"read from private field"),n?n.call(e):t.get(e)),Po=(e,t,n)=>t.has(e)?Mg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Bn=(e,t,n,r)=>(Af(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Of=(e,t,n)=>(Af(e,t,"access private method"),n);var kg=(e,t,n)=>z_(I_(e),n,t);function B_(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var A3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function H_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O3(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Fb={exports:{}},Tc={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var G_=Symbol.for("react.transitional.element"),$_=Symbol.for("react.fragment");function qb(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var o in t)o!=="key"&&(n[o]=t[o])}else n=t;return t=n.ref,{$$typeof:G_,type:e,key:r,ref:t!==void 0?t:null,props:n}}Tc.Fragment=$_;Tc.jsx=qb;Tc.jsxs=qb;Fb.exports=Tc;var ee=Fb.exports,Yb={exports:{}},Ce={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Cp=Symbol.for("react.transitional.element"),j_=Symbol.for("react.portal"),V_=Symbol.for("react.fragment"),F_=Symbol.for("react.strict_mode"),q_=Symbol.for("react.profiler"),Y_=Symbol.for("react.consumer"),X_=Symbol.for("react.context"),K_=Symbol.for("react.forward_ref"),Q_=Symbol.for("react.suspense"),Z_=Symbol.for("react.memo"),Xb=Symbol.for("react.lazy"),W_=Symbol.for("react.activity"),Ng=Symbol.iterator;function J_(e){return e===null||typeof e!="object"?null:(e=Ng&&e[Ng]||e["@@iterator"],typeof e=="function"?e:null)}var Kb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qb=Object.assign,Zb={};function Ea(e,t,n){this.props=e,this.context=t,this.refs=Zb,this.updater=n||Kb}Ea.prototype.isReactComponent={};Ea.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ea.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wb(){}Wb.prototype=Ea.prototype;function Rp(e,t,n){this.props=e,this.context=t,this.refs=Zb,this.updater=n||Kb}var wp=Rp.prototype=new Wb;wp.constructor=Rp;Qb(wp,Ea.prototype);wp.isPureReactComponent=!0;var Lg=Array.isArray;function Vd(){}var Ze={H:null,A:null,T:null,S:null},Jb=Object.prototype.hasOwnProperty;function _p(e,t,n){var r=n.ref;return{$$typeof:Cp,type:e,key:t,ref:r!==void 0?r:null,props:n}}function e1(e,t){return _p(e.type,t,e.props)}function xp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Cp}function t1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Dg=/\/+/g;function Mf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?t1(""+e.key):t.toString(36)}function n1(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Vd,Vd):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ai(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Cp:case j_:a=!0;break;case Xb:return a=e._init,Ai(a(e._payload),t,n,r,o)}}if(a)return o=o(e),a=r===""?"."+Mf(e,0):r,Lg(o)?(n="",a!=null&&(n=a.replace(Dg,"$&/")+"/"),Ai(o,t,n,"",function(u){return u})):o!=null&&(xp(o)&&(o=e1(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(Dg,"$&/")+"/")+a)),t.push(o)),1;a=0;var l=r===""?".":r+":";if(Lg(e))for(var s=0;s<e.length;s++)r=e[s],i=l+Mf(r,s),a+=Ai(r,t,n,i,o);else if(s=J_(e),typeof s=="function")for(e=s.call(e),s=0;!(r=e.next()).done;)r=r.value,i=l+Mf(r,s++),a+=Ai(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return Ai(n1(e),t,n,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function Cs(e,t,n){if(e==null)return e;var r=[],o=0;return Ai(e,r,"","",function(i){return t.call(n,i,o++)}),r}function r1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Pg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},o1={map:Cs,forEach:function(e,t,n){Cs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Cs(e,function(){t++}),t},toArray:function(e){return Cs(e,function(t){return t})||[]},only:function(e){if(!xp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ce.Activity=W_;Ce.Children=o1;Ce.Component=Ea;Ce.Fragment=V_;Ce.Profiler=q_;Ce.PureComponent=Rp;Ce.StrictMode=F_;Ce.Suspense=Q_;Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ze;Ce.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ze.H.useMemoCache(e)}};Ce.cache=function(e){return function(){return e.apply(null,arguments)}};Ce.cacheSignal=function(){return null};Ce.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=Qb({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!Jb.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+2];r.children=a}return _p(e.type,o,r)};Ce.createContext=function(e){return e={$$typeof:X_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Y_,_context:e},e};Ce.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)Jb.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return _p(e,i,o)};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(e){return{$$typeof:K_,render:e}};Ce.isValidElement=xp;Ce.lazy=function(e){return{$$typeof:Xb,_payload:{_status:-1,_result:e},_init:r1}};Ce.memo=function(e,t){return{$$typeof:Z_,type:e,compare:t===void 0?null:t}};Ce.startTransition=function(e){var t=Ze.T,n={};Ze.T=n;try{var r=e(),o=Ze.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Vd,Pg)}catch(i){Pg(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ze.T=t}};Ce.unstable_useCacheRefresh=function(){return Ze.H.useCacheRefresh()};Ce.use=function(e){return Ze.H.use(e)};Ce.useActionState=function(e,t,n){return Ze.H.useActionState(e,t,n)};Ce.useCallback=function(e,t){return Ze.H.useCallback(e,t)};Ce.useContext=function(e){return Ze.H.useContext(e)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(e,t){return Ze.H.useDeferredValue(e,t)};Ce.useEffect=function(e,t){return Ze.H.useEffect(e,t)};Ce.useEffectEvent=function(e){return Ze.H.useEffectEvent(e)};Ce.useId=function(){return Ze.H.useId()};Ce.useImperativeHandle=function(e,t,n){return Ze.H.useImperativeHandle(e,t,n)};Ce.useInsertionEffect=function(e,t){return Ze.H.useInsertionEffect(e,t)};Ce.useLayoutEffect=function(e,t){return Ze.H.useLayoutEffect(e,t)};Ce.useMemo=function(e,t){return Ze.H.useMemo(e,t)};Ce.useOptimistic=function(e,t){return Ze.H.useOptimistic(e,t)};Ce.useReducer=function(e,t,n){return Ze.H.useReducer(e,t,n)};Ce.useRef=function(e){return Ze.H.useRef(e)};Ce.useState=function(e){return Ze.H.useState(e)};Ce.useSyncExternalStore=function(e,t,n){return Ze.H.useSyncExternalStore(e,t,n)};Ce.useTransition=function(){return Ze.H.useTransition()};Ce.version="19.2.5";Yb.exports=Ce;var m=Yb.exports;const i1=H_(m),Ac=B_({__proto__:null,default:i1},[m]);var e0={exports:{}},Oc={},t0={exports:{}},n0={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/(function(e){function t(_,D){var T=_.length;_.push(D);e:for(;0<T;){var N=T-1>>>1,I=_[N];if(0<o(I,D))_[N]=D,_[T]=I,T=N;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var D=_[0],T=_.pop();if(T!==D){_[0]=T;e:for(var N=0,I=_.length,q=I>>>1;N<q;){var B=2*(N+1)-1,$=_[B],ue=B+1,te=_[ue];if(0>o($,T))ue<I&&0>o(te,$)?(_[N]=te,_[ue]=T,N=ue):(_[N]=$,_[B]=T,N=B);else if(ue<I&&0>o(te,T))_[N]=te,_[ue]=T,N=ue;else break e}}return D}function o(_,D){var T=_.sortIndex-D.sortIndex;return T!==0?T:_.id-D.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],f=1,c=null,d=3,h=!1,y=!1,b=!1,E=!1,g=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function S(_){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=_)r(u),D.sortIndex=D.expirationTime,t(s,D);else break;D=n(u)}}function C(_){if(b=!1,S(_),!y)if(n(s)!==null)y=!0,w||(w=!0,U());else{var D=n(u);D!==null&&M(C,D.startTime-_)}}var w=!1,R=-1,x=5,O=-1;function k(){return E?!0:!(e.unstable_now()-O<x)}function P(){if(E=!1,w){var _=e.unstable_now();O=_;var D=!0;try{e:{y=!1,b&&(b=!1,p(R),R=-1),h=!0;var T=d;try{t:{for(S(_),c=n(s);c!==null&&!(c.expirationTime>_&&k());){var N=c.callback;if(typeof N=="function"){c.callback=null,d=c.priorityLevel;var I=N(c.expirationTime<=_);if(_=e.unstable_now(),typeof I=="function"){c.callback=I,S(_),D=!0;break t}c===n(s)&&r(s),S(_)}else r(s);c=n(s)}if(c!==null)D=!0;else{var q=n(u);q!==null&&M(C,q.startTime-_),D=!1}}break e}finally{c=null,d=T,h=!1}D=void 0}}finally{D?U():w=!1}}}var U;if(typeof v=="function")U=function(){v(P)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,L=A.port2;A.port1.onmessage=P,U=function(){L.postMessage(null)}}else U=function(){g(P,0)};function M(_,D){R=g(function(){_(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(_){switch(d){case 1:case 2:case 3:var D=3;break;default:D=d}var T=d;d=D;try{return _()}finally{d=T}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(_,D){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var T=d;d=_;try{return D()}finally{d=T}},e.unstable_scheduleCallback=function(_,D,T){var N=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?N+T:N):T=N,_){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=T+I,_={id:f++,callback:D,priorityLevel:_,startTime:T,expirationTime:I,sortIndex:-1},T>N?(_.sortIndex=T,t(u,_),n(s)===null&&_===n(u)&&(b?(p(R),R=-1):b=!0,M(C,T-N))):(_.sortIndex=I,t(s,_),y||h||(y=!0,w||(w=!0,U()))),_},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(_){var D=d;return function(){var T=d;d=D;try{return _.apply(this,arguments)}finally{d=T}}}})(n0);t0.exports=n0;var a1=t0.exports,r0={exports:{}},Kt={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var l1=m;function o0(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function qr(){}var Yt={d:{f:qr,r:function(){throw Error(o0(522))},D:qr,C:qr,L:qr,m:qr,X:qr,S:qr,M:qr},p:0,findDOMNode:null},s1=Symbol.for("react.portal");function u1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s1,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var il=l1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Mc(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yt;Kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(o0(299));return u1(e,t,null,n)};Kt.flushSync=function(e){var t=il.T,n=Yt.p;try{if(il.T=null,Yt.p=2,e)return e()}finally{il.T=t,Yt.p=n,Yt.d.f()}};Kt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Yt.d.C(e,t))};Kt.prefetchDNS=function(e){typeof e=="string"&&Yt.d.D(e)};Kt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Mc(n,t.crossOrigin),o=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Yt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:o,fetchPriority:i}):n==="script"&&Yt.d.X(e,{crossOrigin:r,integrity:o,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Kt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Mc(t.as,t.crossOrigin);Yt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Yt.d.M(e)};Kt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Mc(n,t.crossOrigin);Yt.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Kt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Mc(t.as,t.crossOrigin);Yt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Yt.d.m(e)};Kt.requestFormReset=function(e){Yt.d.r(e)};Kt.unstable_batchedUpdates=function(e,t){return e(t)};Kt.useFormState=function(e,t,n){return il.H.useFormState(e,t,n)};Kt.useFormStatus=function(){return il.H.useHostTransitionStatus()};Kt.version="19.2.5";function i0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i0)}catch(e){console.error(e)}}i0(),r0.exports=Kt;var Gt=r0.exports;/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-dom-client.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var Rt=a1,a0=m,c1=Gt;function H(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Kl(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ig(e){if(Kl(e)!==e)throw Error(H(188))}function f1(e){var t=e.alternate;if(!t){if(t=Kl(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Ig(o),e;if(i===r)return Ig(o),t;i=i.sibling}throw Error(H(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function c0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=c0(e),t!==null)return t;e=e.sibling}return null}var We=Object.assign,d1=Symbol.for("react.element"),Rs=Symbol.for("react.transitional.element"),Wa=Symbol.for("react.portal"),Li=Symbol.for("react.fragment"),f0=Symbol.for("react.strict_mode"),Fd=Symbol.for("react.profiler"),d0=Symbol.for("react.consumer"),xr=Symbol.for("react.context"),Tp=Symbol.for("react.forward_ref"),qd=Symbol.for("react.suspense"),Yd=Symbol.for("react.suspense_list"),Ap=Symbol.for("react.memo"),Qr=Symbol.for("react.lazy"),Xd=Symbol.for("react.activity"),h1=Symbol.for("react.memo_cache_sentinel"),zg=Symbol.iterator;function Ha(e){return e===null||typeof e!="object"?null:(e=zg&&e[zg]||e["@@iterator"],typeof e=="function"?e:null)}var p1=Symbol.for("react.client.reference");function Kd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===p1?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Li:return"Fragment";case Fd:return"Profiler";case f0:return"StrictMode";case qd:return"Suspense";case Yd:return"SuspenseList";case Xd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Wa:return"Portal";case xr:return e.displayName||"Context";case d0:return(e._context.displayName||"Context")+".Consumer";case Tp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ap:return t=e.displayName||null,t!==null?t:Kd(e.type)||"Memo";case Qr:t=e._payload,e=e._init;try{return Kd(e(t))}catch{}}return null}var Ja=Array.isArray,ve=a0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Be=c1.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Qo={pending:!1,data:null,method:null,action:null},Qd=[],Di=-1;function lr(e){return{current:e}}function Mt(e){0>Di||(e.current=Qd[Di],Qd[Di]=null,Di--)}function Xe(e,t){Di++,Qd[Di]=e.current,e.current=t}var rr=lr(null),_l=lr(null),co=lr(null),Tu=lr(null);function Au(e,t){switch(Xe(co,t),Xe(_l,e),Xe(rr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jy(t),e=NE(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Mt(rr),Xe(rr,e)}function ra(){Mt(rr),Mt(_l),Mt(co)}function Zd(e){e.memoizedState!==null&&Xe(Tu,e);var t=rr.current,n=NE(t,e.type);t!==n&&(Xe(_l,e),Xe(rr,n))}function Ou(e){_l.current===e&&(Mt(rr),Mt(_l)),Tu.current===e&&(Mt(Tu),Il._currentValue=Qo)}var kf,Ug;function Ho(e){if(kf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);kf=t&&t[1]||"",Ug=-1<n.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+kf+e+Ug}var Nf=!1;function Lf(e,t){if(!e||Nf)return"";Nf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(h){var d=h}Reflect.construct(e,[],c)}else{try{c.call()}catch(h){d=h}e.call(c.prototype)}}else{try{throw Error()}catch(h){d=h}(c=e())&&typeof c.catch=="function"&&c.catch(function(){})}}catch(h){if(h&&d&&typeof h.stack=="string")return[h.stack,d.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],l=i[1];if(a&&l){var s=a.split(`
|
|
45
|
-
`),u=l.split(`
|
|
46
|
-
`);for(o=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;o<u.length&&!u[o].includes("DetermineComponentFrameRoot");)o++;if(r===s.length||o===u.length)for(r=s.length-1,o=u.length-1;1<=r&&0<=o&&s[r]!==u[o];)o--;for(;1<=r&&0<=o;r--,o--)if(s[r]!==u[o]){if(r!==1||o!==1)do if(r--,o--,0>o||s[r]!==u[o]){var f=`
|
|
47
|
-
`+s[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=o);break}}}finally{Nf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ho(n):""}function m1(e,t){switch(e.tag){case 26:case 27:case 5:return Ho(e.type);case 16:return Ho("Lazy");case 13:return e.child!==t&&t!==null?Ho("Suspense Fallback"):Ho("Suspense");case 19:return Ho("SuspenseList");case 0:case 15:return Lf(e.type,!1);case 11:return Lf(e.type.render,!1);case 1:return Lf(e.type,!0);case 31:return Ho("Activity");default:return""}}function Bg(e){try{var t="",n=null;do t+=m1(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
48
|
-
Error generating stack: `+r.message+`
|
|
49
|
-
`+r.stack}}var Wd=Object.prototype.hasOwnProperty,Op=Rt.unstable_scheduleCallback,Df=Rt.unstable_cancelCallback,g1=Rt.unstable_shouldYield,y1=Rt.unstable_requestPaint,gn=Rt.unstable_now,v1=Rt.unstable_getCurrentPriorityLevel,h0=Rt.unstable_ImmediatePriority,p0=Rt.unstable_UserBlockingPriority,Mu=Rt.unstable_NormalPriority,b1=Rt.unstable_LowPriority,m0=Rt.unstable_IdlePriority,S1=Rt.log,E1=Rt.unstable_setDisableYieldValue,Ql=null,yn=null;function oo(e){if(typeof S1=="function"&&E1(e),yn&&typeof yn.setStrictMode=="function")try{yn.setStrictMode(Ql,e)}catch{}}var vn=Math.clz32?Math.clz32:w1,C1=Math.log,R1=Math.LN2;function w1(e){return e>>>=0,e===0?32:31-(C1(e)/R1|0)|0}var ws=256,_s=262144,xs=4194304;function Go(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function kc(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var o=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var l=r&134217727;return l!==0?(r=l&~i,r!==0?o=Go(r):(a&=l,a!==0?o=Go(a):n||(n=l&~e,n!==0&&(o=Go(n))))):(l=r&~i,l!==0?o=Go(l):a!==0?o=Go(a):n||(n=r&~e,n!==0&&(o=Go(n)))),o===0?0:t!==0&&t!==o&&!(t&i)&&(i=o&-o,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:o}function Zl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function g0(){var e=xs;return xs<<=1,!(xs&62914560)&&(xs=4194304),e}function Pf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function x1(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0<n;){var f=31-vn(n),c=1<<f;l[f]=0,s[f]=-1;var d=u[f];if(d!==null)for(u[f]=null,f=0;f<d.length;f++){var h=d[f];h!==null&&(h.lane&=-536870913)}n&=~c}r!==0&&y0(e,r,0),i!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=i&~(a&~t))}function y0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-vn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function v0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-vn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function b0(e,t){var n=t&-t;return n=n&42?1:Mp(n),n&(e.suspendedLanes|t)?0:n}function Mp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function kp(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function S0(){var e=Be.p;return e!==0?e:(e=window.event,e===void 0?32:jE(e.type))}function Hg(e,t){var n=Be.p;try{return Be.p=e,t()}finally{Be.p=n}}var Oo=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Oo,rn="__reactProps$"+Oo,Ca="__reactContainer$"+Oo,Jd="__reactEvents$"+Oo,T1="__reactListeners$"+Oo,A1="__reactHandles$"+Oo,Gg="__reactResources$"+Oo,Jl="__reactMarker$"+Oo;function Np(e){delete e[Lt],delete e[rn],delete e[Jd],delete e[T1],delete e[A1]}function Pi(e){var t=e[Lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ca]||n[Lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Xy(e);e!==null;){if(n=e[Lt])return n;e=Xy(e)}return t}e=n,n=e.parentNode}return null}function Ra(e){if(e=e[Lt]||e[Ca]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function el(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(H(33))}function qi(e){var t=e[Gg];return t||(t=e[Gg]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[Jl]=!0}var E0=new Set,C0={};function hi(e,t){oa(e,t),oa(e+"Capture",t)}function oa(e,t){for(C0[e]=t,e=0;e<t.length;e++)E0.add(t[e])}var O1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),$g={},jg={};function M1(e){return Wd.call(jg,e)?!0:Wd.call($g,e)?!1:O1.test(e)?jg[e]=!0:($g[e]=!0,!1)}function tu(e,t,n){if(M1(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Ts(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function mr(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function _n(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function R0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function k1(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function eh(e){if(!e._valueTracker){var t=R0(e)?"checked":"value";e._valueTracker=k1(e,t,""+e[t])}}function w0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=R0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ku(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var N1=/[\n"\\]/g;function On(e){return e.replace(N1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function th(e,t,n,r,o,i,a,l){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+_n(t)):e.value!==""+_n(t)&&(e.value=""+_n(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?nh(e,a,_n(t)):n!=null?nh(e,a,_n(n)):r!=null&&e.removeAttribute("value"),o==null&&i!=null&&(e.defaultChecked=!!i),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+_n(l):e.removeAttribute("name")}function _0(e,t,n,r,o,i,a,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){eh(e);return}n=n!=null?""+_n(n):"",t=t!=null?""+_n(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r=r??o,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),eh(e)}function nh(e,t,n){t==="number"&&ku(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Yi(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+_n(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function x0(e,t,n){if(t!=null&&(t=""+_n(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+_n(n):""}function T0(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(H(92));if(Ja(r)){if(1<r.length)throw Error(H(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=_n(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),eh(e)}function ia(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var L1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Vg(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||L1.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function A0(e,t,n){if(t!=null&&typeof t!="object")throw Error(H(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&n[o]!==r&&Vg(e,o,r)}else for(var i in t)t.hasOwnProperty(i)&&Vg(e,i,t[i])}function Lp(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var D1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),P1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function nu(e){return P1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Tr(){}var rh=null;function Dp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ii=null,Xi=null;function Fg(e){var t=Ra(e);if(t&&(e=t.stateNode)){var n=e[rn]||null;e:switch(e=t.stateNode,t.type){case"input":if(th(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+On(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=r[rn]||null;if(!o)throw Error(H(90));th(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&w0(r)}break e;case"textarea":x0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Yi(e,!!n.multiple,t,!1)}}}var If=!1;function O0(e,t,n){if(If)return e(t,n);If=!0;try{var r=e(t);return r}finally{if(If=!1,(Ii!==null||Xi!==null)&&(jc(),Ii&&(t=Ii,e=Xi,Xi=Ii=null,Fg(t),e)))for(t=0;t<e.length;t++)Fg(e[t])}}function xl(e,t){var n=e.stateNode;if(n===null)return null;var r=n[rn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var Lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oh=!1;if(Lr)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){oh=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{oh=!1}var io=null,Pp=null,ru=null;function M0(){if(ru)return ru;var e,t=Pp,n=t.length,r,o="value"in io?io.value:io.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return ru=o.slice(e,1<r?1-r:void 0)}function ou(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function As(){return!0}function qg(){return!1}function ln(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?As:qg,this.isPropagationStopped=qg,this}return We(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=As)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=As)},persist:function(){},isPersistent:As}),t}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nc=ln(pi),es=We({},pi,{view:0,detail:0}),I1=ln(es),zf,Uf,$a,Lc=We({},es,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ip,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==$a&&($a&&e.type==="mousemove"?(zf=e.screenX-$a.screenX,Uf=e.screenY-$a.screenY):Uf=zf=0,$a=e),zf)},movementY:function(e){return"movementY"in e?e.movementY:Uf}}),Yg=ln(Lc),z1=We({},Lc,{dataTransfer:0}),U1=ln(z1),B1=We({},es,{relatedTarget:0}),Bf=ln(B1),H1=We({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),G1=ln(H1),$1=We({},pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),j1=ln($1),V1=We({},pi,{data:0}),Xg=ln(V1),F1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Y1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Y1[e])?!!t[e]:!1}function Ip(){return X1}var K1=We({},es,{key:function(e){if(e.key){var t=F1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ou(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?q1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ip,charCode:function(e){return e.type==="keypress"?ou(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ou(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Q1=ln(K1),Z1=We({},Lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kg=ln(Z1),W1=We({},es,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ip}),J1=ln(W1),ex=We({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),tx=ln(ex),nx=We({},Lc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),rx=ln(nx),ox=We({},pi,{newState:0,oldState:0}),ix=ln(ox),ax=[9,13,27,32],zp=Lr&&"CompositionEvent"in window,al=null;Lr&&"documentMode"in document&&(al=document.documentMode);var lx=Lr&&"TextEvent"in window&&!al,k0=Lr&&(!zp||al&&8<al&&11>=al),Qg=" ",Zg=!1;function N0(e,t){switch(e){case"keyup":return ax.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function L0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zi=!1;function sx(e,t){switch(e){case"compositionend":return L0(t);case"keypress":return t.which!==32?null:(Zg=!0,Qg);case"textInput":return e=t.data,e===Qg&&Zg?null:e;default:return null}}function ux(e,t){if(zi)return e==="compositionend"||!zp&&N0(e,t)?(e=M0(),ru=Pp=io=null,zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return k0&&t.locale!=="ko"?null:t.data;default:return null}}var cx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cx[e.type]:t==="textarea"}function D0(e,t,n,r){Ii?Xi?Xi.push(r):Xi=[r]:Ii=r,t=Ku(t,"onChange"),0<t.length&&(n=new Nc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ll=null,Tl=null;function fx(e){OE(e,0)}function Dc(e){var t=el(e);if(w0(t))return e}function Jg(e,t){if(e==="change")return t}var P0=!1;if(Lr){var Hf;if(Lr){var Gf="oninput"in document;if(!Gf){var ey=document.createElement("div");ey.setAttribute("oninput","return;"),Gf=typeof ey.oninput=="function"}Hf=Gf}else Hf=!1;P0=Hf&&(!document.documentMode||9<document.documentMode)}function ty(){ll&&(ll.detachEvent("onpropertychange",I0),Tl=ll=null)}function I0(e){if(e.propertyName==="value"&&Dc(Tl)){var t=[];D0(t,Tl,e,Dp(e)),O0(fx,t)}}function dx(e,t,n){e==="focusin"?(ty(),ll=t,Tl=n,ll.attachEvent("onpropertychange",I0)):e==="focusout"&&ty()}function hx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Dc(Tl)}function px(e,t){if(e==="click")return Dc(t)}function mx(e,t){if(e==="input"||e==="change")return Dc(t)}function gx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:gx;function Al(e,t){if(Sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Wd.call(t,o)||!Sn(e[o],t[o]))return!1}return!0}function ny(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ry(e,t){var n=ny(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ny(n)}}function z0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function U0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ku(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ku(e.document)}return t}function Up(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var yx=Lr&&"documentMode"in document&&11>=document.documentMode,Ui=null,ih=null,sl=null,ah=!1;function oy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ah||Ui==null||Ui!==ku(r)||(r=Ui,"selectionStart"in r&&Up(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),sl&&Al(sl,r)||(sl=r,r=Ku(ih,"onSelect"),0<r.length&&(t=new Nc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ui)))}function Io(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bi={animationend:Io("Animation","AnimationEnd"),animationiteration:Io("Animation","AnimationIteration"),animationstart:Io("Animation","AnimationStart"),transitionrun:Io("Transition","TransitionRun"),transitionstart:Io("Transition","TransitionStart"),transitioncancel:Io("Transition","TransitionCancel"),transitionend:Io("Transition","TransitionEnd")},$f={},B0={};Lr&&(B0=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);function mi(e){if($f[e])return $f[e];if(!Bi[e])return e;var t=Bi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in B0)return $f[e]=t[n];return e}var H0=mi("animationend"),G0=mi("animationiteration"),$0=mi("animationstart"),vx=mi("transitionrun"),bx=mi("transitionstart"),Sx=mi("transitioncancel"),j0=mi("transitionend"),V0=new Map,lh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");lh.push("scrollEnd");function Qn(e,t){V0.set(e,t),hi(t,[e])}var Nu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},wn=[],Hi=0,Bp=0;function Pc(){for(var e=Hi,t=Bp=Hi=0;t<e;){var n=wn[t];wn[t++]=null;var r=wn[t];wn[t++]=null;var o=wn[t];wn[t++]=null;var i=wn[t];if(wn[t++]=null,r!==null&&o!==null){var a=r.pending;a===null?o.next=o:(o.next=a.next,a.next=o),r.pending=o}i!==0&&F0(n,o,i)}}function Ic(e,t,n,r){wn[Hi++]=e,wn[Hi++]=t,wn[Hi++]=n,wn[Hi++]=r,Bp|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Hp(e,t,n,r){return Ic(e,t,n,r),Lu(e)}function gi(e,t){return Ic(e,null,null,t),Lu(e)}function F0(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var o=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(o=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,o&&t!==null&&(o=31-vn(n),e=i.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=n|536870912),i):null}function Lu(e){if(50<yl)throw yl=0,Ah=null,Error(H(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Gi={};function Ex(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pn(e,t,n,r){return new Ex(e,t,n,r)}function Gp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mr(e,t){var n=e.alternate;return n===null?(n=pn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function q0(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function iu(e,t,n,r,o,i){var a=0;if(r=e,typeof e=="function")Gp(e)&&(a=1);else if(typeof e=="string")a=xT(e,n,rr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Xd:return e=pn(31,n,t,o),e.elementType=Xd,e.lanes=i,e;case Li:return Zo(n.children,o,i,t);case f0:a=8,o|=24;break;case Fd:return e=pn(12,n,t,o|2),e.elementType=Fd,e.lanes=i,e;case qd:return e=pn(13,n,t,o),e.elementType=qd,e.lanes=i,e;case Yd:return e=pn(19,n,t,o),e.elementType=Yd,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xr:a=10;break e;case d0:a=9;break e;case Tp:a=11;break e;case Ap:a=14;break e;case Qr:a=16,r=null;break e}a=29,n=Error(H(130,e===null?"null":typeof e,"")),r=null}return t=pn(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Zo(e,t,n,r){return e=pn(7,e,r,t),e.lanes=n,e}function jf(e,t,n){return e=pn(6,e,null,t),e.lanes=n,e}function Y0(e){var t=pn(18,null,null,0);return t.stateNode=e,t}function Vf(e,t,n){return t=pn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var iy=new WeakMap;function Mn(e,t){if(typeof e=="object"&&e!==null){var n=iy.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Bg(t)},iy.set(e,t),t)}return{value:e,source:t,stack:Bg(t)}}var $i=[],ji=0,Du=null,Ol=0,xn=[],Tn=0,_o=null,er=1,tr="";function Cr(e,t){$i[ji++]=Ol,$i[ji++]=Du,Du=e,Ol=t}function X0(e,t,n){xn[Tn++]=er,xn[Tn++]=tr,xn[Tn++]=_o,_o=e;var r=er;e=tr;var o=32-vn(r)-1;r&=~(1<<o),n+=1;var i=32-vn(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,er=1<<32-vn(t)+o|n<<o|r,tr=i+e}else er=1<<i|n<<o|r,tr=e}function $p(e){e.return!==null&&(Cr(e,1),X0(e,1,0))}function jp(e){for(;e===Du;)Du=$i[--ji],$i[ji]=null,Ol=$i[--ji],$i[ji]=null;for(;e===_o;)_o=xn[--Tn],xn[Tn]=null,tr=xn[--Tn],xn[Tn]=null,er=xn[--Tn],xn[Tn]=null}function K0(e,t){xn[Tn++]=er,xn[Tn++]=tr,xn[Tn++]=_o,er=t.id,tr=t.overflow,_o=e}var Dt=null,Qe=null,Ne=!1,fo=null,kn=!1,sh=Error(H(519));function xo(e){var t=Error(H(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ml(Mn(t,e)),sh}function ay(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Lt]=e,t[rn]=r,n){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(n=0;n<Dl.length;n++)Oe(Dl[n],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),_0(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),T0(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||kE(t.textContent,n)?(r.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),r.onScroll!=null&&Oe("scroll",t),r.onScrollEnd!=null&&Oe("scrollend",t),r.onClick!=null&&(t.onclick=Tr),t=!0):t=!1,t||xo(e,!0)}function ly(e){for(Dt=e.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:kn=!1;return;case 27:case 3:kn=!0;return;default:Dt=Dt.return}}function wi(e){if(e!==Dt)return!1;if(!Ne)return ly(e),Ne=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Lh(e.type,e.memoizedProps)),n=!n),n&&Qe&&xo(e),ly(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));Qe=Yy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));Qe=Yy(e)}else t===27?(t=Qe,Mo(e.type)?(e=zh,zh=null,Qe=e):Qe=t):Qe=Dt?In(e.stateNode.nextSibling):null;return!0}function ri(){Qe=Dt=null,Ne=!1}function Ff(){var e=fo;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),fo=null),e}function Ml(e){fo===null?fo=[e]:fo.push(e)}var uh=lr(null),yi=null,Ar=null;function Wr(e,t,n){Xe(uh,t._currentValue),t._currentValue=n}function kr(e){e._currentValue=uh.current,Mt(uh)}function ch(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function fh(e,t,n,r){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var i=o.dependencies;if(i!==null){var a=o.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=o;for(var s=0;s<t.length;s++)if(l.context===t[s]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),ch(i.return,n,e),r||(a=null);break e}i=l.next}}else if(o.tag===18){if(a=o.return,a===null)throw Error(H(341));a.lanes|=n,i=a.alternate,i!==null&&(i.lanes|=n),ch(a,n,e),a=null}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}}function wa(e,t,n,r){e=null;for(var o=t,i=!1;o!==null;){if(!i){if(o.flags&524288)i=!0;else if(o.flags&262144)break}if(o.tag===10){var a=o.alternate;if(a===null)throw Error(H(387));if(a=a.memoizedProps,a!==null){var l=o.type;Sn(o.pendingProps.value,a.value)||(e!==null?e.push(l):e=[l])}}else if(o===Tu.current){if(a=o.alternate,a===null)throw Error(H(387));a.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Il):e=[Il])}o=o.return}e!==null&&fh(t,e,n,r),t.flags|=262144}function Pu(e){for(e=e.firstContext;e!==null;){if(!Sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oi(e){yi=e,Ar=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pt(e){return Q0(yi,e)}function Os(e,t){return yi===null&&oi(e),Q0(e,t)}function Q0(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ar===null){if(e===null)throw Error(H(308));Ar=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ar=Ar.next=t;return n}var Cx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Rx=Rt.unstable_scheduleCallback,wx=Rt.unstable_NormalPriority,gt={$$typeof:xr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vp(){return{controller:new Cx,data:new Map,refCount:0}}function ts(e){e.refCount--,e.refCount===0&&Rx(wx,function(){e.controller.abort()})}var ul=null,dh=0,aa=0,Ki=null;function _x(e,t){if(ul===null){var n=ul=[];dh=0,aa=mm(),Ki={status:"pending",value:void 0,then:function(r){n.push(r)}}}return dh++,t.then(sy,sy),t}function sy(){if(--dh===0&&ul!==null){Ki!==null&&(Ki.status="fulfilled");var e=ul;ul=null,aa=0,Ki=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xx(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(r.status="rejected",r.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),r}var uy=ve.S;ve.S=function(e,t){cE=gn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&_x(e,t),uy!==null&&uy(e,t)};var Wo=lr(null);function Fp(){var e=Wo.current;return e!==null?e:Fe.pooledCache}function au(e,t){t===null?Xe(Wo,Wo.current):Xe(Wo,t.pool)}function Z0(){var e=Fp();return e===null?null:{parent:gt._currentValue,pool:e}}var _a=Error(H(460)),qp=Error(H(474)),zc=Error(H(542)),Iu={then:function(){}};function cy(e){return e=e.status,e==="fulfilled"||e==="rejected"}function W0(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Tr,Tr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dy(e),e;default:if(typeof t.status=="string")t.then(Tr,Tr);else{if(e=Fe,e!==null&&100<e.shellSuspendCounter)throw Error(H(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dy(e),e}throw Jo=t,_a}}function $o(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Jo=n,_a):n}}var Jo=null;function fy(){if(Jo===null)throw Error(H(459));var e=Jo;return Jo=null,e}function dy(e){if(e===_a||e===zc)throw Error(H(483))}var Qi=null,kl=0;function Ms(e){var t=kl;return kl+=1,Qi===null&&(Qi=[]),W0(Qi,e,t)}function ja(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ks(e,t){throw t.$$typeof===d1?Error(H(525)):(e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function J0(e){function t(g,p){if(e){var v=g.deletions;v===null?(g.deletions=[p],g.flags|=16):v.push(p)}}function n(g,p){if(!e)return null;for(;p!==null;)t(g,p),p=p.sibling;return null}function r(g){for(var p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function o(g,p){return g=Mr(g,p),g.index=0,g.sibling=null,g}function i(g,p,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<p?(g.flags|=67108866,p):v):(g.flags|=67108866,p)):(g.flags|=1048576,p)}function a(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function l(g,p,v,S){return p===null||p.tag!==6?(p=jf(v,g.mode,S),p.return=g,p):(p=o(p,v),p.return=g,p)}function s(g,p,v,S){var C=v.type;return C===Li?f(g,p,v.props.children,S,v.key):p!==null&&(p.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Qr&&$o(C)===p.type)?(p=o(p,v.props),ja(p,v),p.return=g,p):(p=iu(v.type,v.key,v.props,null,g.mode,S),ja(p,v),p.return=g,p)}function u(g,p,v,S){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=Vf(v,g.mode,S),p.return=g,p):(p=o(p,v.children||[]),p.return=g,p)}function f(g,p,v,S,C){return p===null||p.tag!==7?(p=Zo(v,g.mode,S,C),p.return=g,p):(p=o(p,v),p.return=g,p)}function c(g,p,v){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=jf(""+p,g.mode,v),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Rs:return v=iu(p.type,p.key,p.props,null,g.mode,v),ja(v,p),v.return=g,v;case Wa:return p=Vf(p,g.mode,v),p.return=g,p;case Qr:return p=$o(p),c(g,p,v)}if(Ja(p)||Ha(p))return p=Zo(p,g.mode,v,null),p.return=g,p;if(typeof p.then=="function")return c(g,Ms(p),v);if(p.$$typeof===xr)return c(g,Os(g,p),v);ks(g,p)}return null}function d(g,p,v,S){var C=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return C!==null?null:l(g,p,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Rs:return v.key===C?s(g,p,v,S):null;case Wa:return v.key===C?u(g,p,v,S):null;case Qr:return v=$o(v),d(g,p,v,S)}if(Ja(v)||Ha(v))return C!==null?null:f(g,p,v,S,null);if(typeof v.then=="function")return d(g,p,Ms(v),S);if(v.$$typeof===xr)return d(g,p,Os(g,v),S);ks(g,v)}return null}function h(g,p,v,S,C){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return g=g.get(v)||null,l(p,g,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Rs:return g=g.get(S.key===null?v:S.key)||null,s(p,g,S,C);case Wa:return g=g.get(S.key===null?v:S.key)||null,u(p,g,S,C);case Qr:return S=$o(S),h(g,p,v,S,C)}if(Ja(S)||Ha(S))return g=g.get(v)||null,f(p,g,S,C,null);if(typeof S.then=="function")return h(g,p,v,Ms(S),C);if(S.$$typeof===xr)return h(g,p,v,Os(p,S),C);ks(p,S)}return null}function y(g,p,v,S){for(var C=null,w=null,R=p,x=p=0,O=null;R!==null&&x<v.length;x++){R.index>x?(O=R,R=null):O=R.sibling;var k=d(g,R,v[x],S);if(k===null){R===null&&(R=O);break}e&&R&&k.alternate===null&&t(g,R),p=i(k,p,x),w===null?C=k:w.sibling=k,w=k,R=O}if(x===v.length)return n(g,R),Ne&&Cr(g,x),C;if(R===null){for(;x<v.length;x++)R=c(g,v[x],S),R!==null&&(p=i(R,p,x),w===null?C=R:w.sibling=R,w=R);return Ne&&Cr(g,x),C}for(R=r(R);x<v.length;x++)O=h(R,g,x,v[x],S),O!==null&&(e&&O.alternate!==null&&R.delete(O.key===null?x:O.key),p=i(O,p,x),w===null?C=O:w.sibling=O,w=O);return e&&R.forEach(function(P){return t(g,P)}),Ne&&Cr(g,x),C}function b(g,p,v,S){if(v==null)throw Error(H(151));for(var C=null,w=null,R=p,x=p=0,O=null,k=v.next();R!==null&&!k.done;x++,k=v.next()){R.index>x?(O=R,R=null):O=R.sibling;var P=d(g,R,k.value,S);if(P===null){R===null&&(R=O);break}e&&R&&P.alternate===null&&t(g,R),p=i(P,p,x),w===null?C=P:w.sibling=P,w=P,R=O}if(k.done)return n(g,R),Ne&&Cr(g,x),C;if(R===null){for(;!k.done;x++,k=v.next())k=c(g,k.value,S),k!==null&&(p=i(k,p,x),w===null?C=k:w.sibling=k,w=k);return Ne&&Cr(g,x),C}for(R=r(R);!k.done;x++,k=v.next())k=h(R,g,x,k.value,S),k!==null&&(e&&k.alternate!==null&&R.delete(k.key===null?x:k.key),p=i(k,p,x),w===null?C=k:w.sibling=k,w=k);return e&&R.forEach(function(U){return t(g,U)}),Ne&&Cr(g,x),C}function E(g,p,v,S){if(typeof v=="object"&&v!==null&&v.type===Li&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Rs:e:{for(var C=v.key;p!==null;){if(p.key===C){if(C=v.type,C===Li){if(p.tag===7){n(g,p.sibling),S=o(p,v.props.children),S.return=g,g=S;break e}}else if(p.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Qr&&$o(C)===p.type){n(g,p.sibling),S=o(p,v.props),ja(S,v),S.return=g,g=S;break e}n(g,p);break}else t(g,p);p=p.sibling}v.type===Li?(S=Zo(v.props.children,g.mode,S,v.key),S.return=g,g=S):(S=iu(v.type,v.key,v.props,null,g.mode,S),ja(S,v),S.return=g,g=S)}return a(g);case Wa:e:{for(C=v.key;p!==null;){if(p.key===C)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(g,p.sibling),S=o(p,v.children||[]),S.return=g,g=S;break e}else{n(g,p);break}else t(g,p);p=p.sibling}S=Vf(v,g.mode,S),S.return=g,g=S}return a(g);case Qr:return v=$o(v),E(g,p,v,S)}if(Ja(v))return y(g,p,v,S);if(Ha(v)){if(C=Ha(v),typeof C!="function")throw Error(H(150));return v=C.call(v),b(g,p,v,S)}if(typeof v.then=="function")return E(g,p,Ms(v),S);if(v.$$typeof===xr)return E(g,p,Os(g,v),S);ks(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,p!==null&&p.tag===6?(n(g,p.sibling),S=o(p,v),S.return=g,g=S):(n(g,p),S=jf(v,g.mode,S),S.return=g,g=S),a(g)):n(g,p)}return function(g,p,v,S){try{kl=0;var C=E(g,p,v,S);return Qi=null,C}catch(R){if(R===_a||R===zc)throw R;var w=pn(29,R,null,g.mode);return w.lanes=S,w.return=g,w}finally{}}}var ii=J0(!0),eS=J0(!1),Zr=!1;function Yp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function po(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ue&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Lu(e),F0(e,null,n),t}return Ic(e,r,t,n),Lu(e)}function cl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v0(e,n)}}function qf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ph=!1;function fl(){if(ph){var e=Ki;if(e!==null)throw e}}function dl(e,t,n,r){ph=!1;var o=e.updateQueue;Zr=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var s=l,u=s.next;s.next=null,a===null?i=u:a.next=u,a=s;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==a&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=s))}if(i!==null){var c=o.baseState;a=0,f=u=s=null,l=i;do{var d=l.lane&-536870913,h=d!==l.lane;if(h?(ke&d)===d:(r&d)===d){d!==0&&d===aa&&(ph=!0),f!==null&&(f=f.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var y=e,b=l;d=t;var E=n;switch(b.tag){case 1:if(y=b.payload,typeof y=="function"){c=y.call(E,c,d);break e}c=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=b.payload,d=typeof y=="function"?y.call(E,c,d):y,d==null)break e;c=We({},c,d);break e;case 2:Zr=!0}}d=l.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=o.callbacks,h===null?o.callbacks=[d]:h.push(d))}else h={lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=h,s=c):f=f.next=h,a|=d;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);f===null&&(s=c),o.baseState=s,o.firstBaseUpdate=u,o.lastBaseUpdate=f,i===null&&(o.shared.lanes=0),Ao|=a,e.lanes=a,e.memoizedState=c}}function tS(e,t){if(typeof e!="function")throw Error(H(191,e));e.call(t)}function nS(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)tS(n[e],t)}var la=lr(null),zu=lr(0);function hy(e,t){e=zr,Xe(zu,e),Xe(la,t),zr=e|t.baseLanes}function mh(){Xe(zu,zr),Xe(la,la.current)}function Xp(){zr=zu.current,Mt(la),Mt(zu)}var En=lr(null),Pn=null;function Jr(e){var t=e.alternate;Xe(ft,ft.current&1),Xe(En,e),Pn===null&&(t===null||la.current!==null||t.memoizedState!==null)&&(Pn=e)}function gh(e){Xe(ft,ft.current),Xe(En,e),Pn===null&&(Pn=e)}function rS(e){e.tag===22?(Xe(ft,ft.current),Xe(En,e),Pn===null&&(Pn=e)):eo()}function eo(){Xe(ft,ft.current),Xe(En,En.current)}function dn(e){Mt(En),Pn===e&&(Pn=null),Mt(ft)}var ft=lr(0);function Uu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ph(n)||Ih(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dr=0,we=null,Ve=null,pt=null,Bu=!1,Zi=!1,ai=!1,Hu=0,Nl=0,Wi=null,Tx=0;function ot(){throw Error(H(321))}function Kp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sn(e[n],t[n]))return!1;return!0}function Qp(e,t,n,r,o,i){return Dr=i,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ve.H=e===null||e.memoizedState===null?DS:lm,ai=!1,i=n(r,o),ai=!1,Zi&&(i=iS(t,n,r,o)),oS(e),i}function oS(e){ve.H=Ll;var t=Ve!==null&&Ve.next!==null;if(Dr=0,pt=Ve=we=null,Bu=!1,Nl=0,Wi=null,t)throw Error(H(300));e===null||vt||(e=e.dependencies,e!==null&&Pu(e)&&(vt=!0))}function iS(e,t,n,r){we=e;var o=0;do{if(Zi&&(Wi=null),Nl=0,Zi=!1,25<=o)throw Error(H(301));if(o+=1,pt=Ve=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}ve.H=PS,i=t(n,r)}while(Zi);return i}function Ax(){var e=ve.H,t=e.useState()[0];return t=typeof t.then=="function"?ns(t):t,e=e.useState()[0],(Ve!==null?Ve.memoizedState:null)!==e&&(we.flags|=1024),t}function Zp(){var e=Hu!==0;return Hu=0,e}function Wp(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Jp(e){if(Bu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bu=!1}Dr=0,pt=Ve=we=null,Zi=!1,Nl=Hu=0,Wi=null}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?we.memoizedState=pt=e:pt=pt.next=e,pt}function dt(){if(Ve===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var t=pt===null?we.memoizedState:pt.next;if(t!==null)pt=t,Ve=e;else{if(e===null)throw we.alternate===null?Error(H(467)):Error(H(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},pt===null?we.memoizedState=pt=e:pt=pt.next=e}return pt}function Uc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ns(e){var t=Nl;return Nl+=1,Wi===null&&(Wi=[]),e=W0(Wi,e,t),t=we,(pt===null?t.memoizedState:pt.next)===null&&(t=t.alternate,ve.H=t===null||t.memoizedState===null?DS:lm),e}function Bc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ns(e);if(e.$$typeof===xr)return Pt(e)}throw Error(H(438,String(e)))}function em(e){var t=null,n=we.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=we.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Uc(),we.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=h1;return t.index++,n}function Pr(e,t){return typeof t=="function"?t(e):t}function lu(e){var t=dt();return tm(t,Ve,e)}function tm(e,t,n){var r=e.queue;if(r===null)throw Error(H(311));r.lastRenderedReducer=n;var o=e.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}t.baseQueue=o=i,r.pending=null}if(i=e.baseState,o===null)e.memoizedState=i;else{t=o.next;var l=a=null,s=null,u=t,f=!1;do{var c=u.lane&-536870913;if(c!==u.lane?(ke&c)===c:(Dr&c)===c){var d=u.revertLane;if(d===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),c===aa&&(f=!0);else if((Dr&d)===d){u=u.next,d===aa&&(f=!0);continue}else c={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(l=s=c,a=i):s=s.next=c,we.lanes|=d,Ao|=d;c=u.action,ai&&n(i,c),i=u.hasEagerState?u.eagerState:n(i,c)}else d={lane:c,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(l=s=d,a=i):s=s.next=d,we.lanes|=c,Ao|=c;u=u.next}while(u!==null&&u!==t);if(s===null?a=i:s.next=l,!Sn(i,e.memoizedState)&&(vt=!0,f&&(n=Ki,n!==null)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=s,r.lastRenderedState=i}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Yf(e){var t=dt(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);Sn(i,t.memoizedState)||(vt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function aS(e,t,n){var r=we,o=dt(),i=Ne;if(i){if(n===void 0)throw Error(H(407));n=n()}else n=t();var a=!Sn((Ve||o).memoizedState,n);if(a&&(o.memoizedState=n,vt=!0),o=o.queue,nm(uS.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||pt!==null&&pt.memoizedState.tag&1){if(r.flags|=2048,sa(9,{destroy:void 0},sS.bind(null,r,o,n,t),null),Fe===null)throw Error(H(349));i||Dr&127||lS(r,t,n)}return n}function lS(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t=Uc(),we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function sS(e,t,n,r){t.value=n,t.getSnapshot=r,cS(t)&&fS(e)}function uS(e,t,n){return n(function(){cS(t)&&fS(e)})}function cS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sn(e,n)}catch{return!0}}function fS(e){var t=gi(e,2);t!==null&&tn(t,e,2)}function yh(e){var t=qt();if(typeof e=="function"){var n=e;if(e=n(),ai){oo(!0);try{n()}finally{oo(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:e},t}function dS(e,t,n,r){return e.baseState=n,tm(e,Ve,typeof r=="function"?r:Pr)}function Ox(e,t,n,r,o){if(Gc(e))throw Error(H(485));if(e=t.action,e!==null){var i={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){i.listeners.push(a)}};ve.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,hS(t,i)):(i.next=n.next,t.pending=n.next=i)}}function hS(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=ve.T,a={};ve.T=a;try{var l=n(o,r),s=ve.S;s!==null&&s(a,l),py(e,t,l)}catch(u){vh(e,t,u)}finally{i!==null&&a.types!==null&&(i.types=a.types),ve.T=i}}else try{i=n(o,r),py(e,t,i)}catch(u){vh(e,t,u)}}function py(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){my(e,t,r)},function(r){return vh(e,t,r)}):my(e,t,n)}function my(e,t,n){t.status="fulfilled",t.value=n,pS(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,hS(e,n)))}function vh(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,pS(t),t=t.next;while(t!==r)}e.action=null}function pS(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mS(e,t){return t}function gy(e,t){if(Ne){var n=Fe.formState;if(n!==null){e:{var r=we;if(Ne){if(Qe){t:{for(var o=Qe,i=kn;o.nodeType!==8;){if(!i){o=null;break t}if(o=In(o.nextSibling),o===null){o=null;break t}}i=o.data,o=i==="F!"||i==="F"?o:null}if(o){Qe=In(o.nextSibling),r=o.data==="F!";break e}}xo(r)}r=!1}r&&(t=n[0])}}return n=qt(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mS,lastRenderedState:t},n.queue=r,n=kS.bind(null,we,r),r.dispatch=n,r=yh(!1),i=am.bind(null,we,!1,r.queue),r=qt(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,n=Ox.bind(null,we,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function yy(e){var t=dt();return gS(t,Ve,e)}function gS(e,t,n){if(t=tm(e,t,mS)[0],e=lu(Pr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ns(t)}catch(a){throw a===_a?zc:a}else r=t;t=dt();var o=t.queue,i=o.dispatch;return n!==t.memoizedState&&(we.flags|=2048,sa(9,{destroy:void 0},Mx.bind(null,o,n),null)),[r,i,e]}function Mx(e,t){e.action=t}function vy(e){var t=dt(),n=Ve;if(n!==null)return gS(t,n,e);dt(),t=t.memoizedState,n=dt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function sa(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=we.updateQueue,t===null&&(t=Uc(),we.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function yS(){return dt().memoizedState}function su(e,t,n,r){var o=qt();we.flags|=e,o.memoizedState=sa(1|t,{destroy:void 0},n,r===void 0?null:r)}function Hc(e,t,n,r){var o=dt();r=r===void 0?null:r;var i=o.memoizedState.inst;Ve!==null&&r!==null&&Kp(r,Ve.memoizedState.deps)?o.memoizedState=sa(t,i,n,r):(we.flags|=e,o.memoizedState=sa(1|t,i,n,r))}function by(e,t){su(8390656,8,e,t)}function nm(e,t){Hc(2048,8,e,t)}function kx(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=Uc(),we.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vS(e){var t=dt().memoizedState;return kx({ref:t,nextImpl:e}),function(){if(Ue&2)throw Error(H(440));return t.impl.apply(void 0,arguments)}}function bS(e,t){return Hc(4,2,e,t)}function SS(e,t){return Hc(4,4,e,t)}function ES(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function CS(e,t,n){n=n!=null?n.concat([e]):null,Hc(4,4,ES.bind(null,t,e),n)}function rm(){}function RS(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Kp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wS(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Kp(t,r[1]))return r[0];if(r=e(),ai){oo(!0);try{e()}finally{oo(!1)}}return n.memoizedState=[r,t],r}function om(e,t,n){return n===void 0||Dr&1073741824&&!(ke&261930)?e.memoizedState=t:(e.memoizedState=n,e=dE(),we.lanes|=e,Ao|=e,n)}function _S(e,t,n,r){return Sn(n,t)?n:la.current!==null?(e=om(e,n,r),Sn(e,t)||(vt=!0),e):!(Dr&42)||Dr&1073741824&&!(ke&261930)?(vt=!0,e.memoizedState=n):(e=dE(),we.lanes|=e,Ao|=e,t)}function xS(e,t,n,r,o){var i=Be.p;Be.p=i!==0&&8>i?i:8;var a=ve.T,l={};ve.T=l,am(e,!1,t,n);try{var s=o(),u=ve.S;if(u!==null&&u(l,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var f=xx(s,r);hl(e,t,f,bn(e))}else hl(e,t,r,bn(e))}catch(c){hl(e,t,{then:function(){},status:"rejected",reason:c},bn())}finally{Be.p=i,a!==null&&l.types!==null&&(a.types=l.types),ve.T=a}}function Nx(){}function bh(e,t,n,r){if(e.tag!==5)throw Error(H(476));var o=TS(e).queue;xS(e,o,t,Qo,n===null?Nx:function(){return AS(e),n(r)})}function TS(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Qo,baseState:Qo,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:Qo},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function AS(e){var t=TS(e);t.next===null&&(t=e.alternate.memoizedState),hl(e,t.next.queue,{},bn())}function im(){return Pt(Il)}function OS(){return dt().memoizedState}function MS(){return dt().memoizedState}function Lx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bn();e=ho(n);var r=po(t,e,n);r!==null&&(tn(r,t,n),cl(r,t,n)),t={cache:Vp()},e.payload=t;return}t=t.return}}function Dx(e,t,n){var r=bn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Gc(e)?NS(t,n):(n=Hp(e,t,n,r),n!==null&&(tn(n,e,r),LS(n,t,r)))}function kS(e,t,n){var r=bn();hl(e,t,n,r)}function hl(e,t,n,r){var o={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gc(e))NS(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,Sn(l,a))return Ic(e,t,o,0),Fe===null&&Pc(),!1}catch{}finally{}if(n=Hp(e,t,o,r),n!==null)return tn(n,e,r),LS(n,t,r),!0}return!1}function am(e,t,n,r){if(r={lane:2,revertLane:mm(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Gc(e)){if(t)throw Error(H(479))}else t=Hp(e,n,r,2),t!==null&&tn(t,e,2)}function Gc(e){var t=e.alternate;return e===we||t!==null&&t===we}function NS(e,t){Zi=Bu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function LS(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v0(e,n)}}var Ll={readContext:Pt,use:Bc,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};Ll.useEffectEvent=ot;var DS={readContext:Pt,use:Bc,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:by,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,su(4194308,4,ES.bind(null,t,e),n)},useLayoutEffect:function(e,t){return su(4194308,4,e,t)},useInsertionEffect:function(e,t){su(4,2,e,t)},useMemo:function(e,t){var n=qt();t=t===void 0?null:t;var r=e();if(ai){oo(!0);try{e()}finally{oo(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=qt();if(n!==void 0){var o=n(t);if(ai){oo(!0);try{n(t)}finally{oo(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=Dx.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:function(e){e=yh(e);var t=e.queue,n=kS.bind(null,we,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:rm,useDeferredValue:function(e,t){var n=qt();return om(n,e,t)},useTransition:function(){var e=yh(!1);return e=xS.bind(null,we,e.queue,!0,!1),qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=we,o=qt();if(Ne){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Fe===null)throw Error(H(349));ke&127||lS(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,by(uS.bind(null,r,i,e),[e]),r.flags|=2048,sa(9,{destroy:void 0},sS.bind(null,r,i,n,t),null),n},useId:function(){var e=qt(),t=Fe.identifierPrefix;if(Ne){var n=tr,r=er;n=(r&~(1<<32-vn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Hu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Tx++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:im,useFormState:gy,useActionState:gy,useOptimistic:function(e){var t=qt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=am.bind(null,we,!0,n),n.dispatch=t,[e,t]},useMemoCache:em,useCacheRefresh:function(){return qt().memoizedState=Lx.bind(null,we)},useEffectEvent:function(e){var t=qt(),n={impl:e};return t.memoizedState=n,function(){if(Ue&2)throw Error(H(440));return n.impl.apply(void 0,arguments)}}},lm={readContext:Pt,use:Bc,useCallback:RS,useContext:Pt,useEffect:nm,useImperativeHandle:CS,useInsertionEffect:bS,useLayoutEffect:SS,useMemo:wS,useReducer:lu,useRef:yS,useState:function(){return lu(Pr)},useDebugValue:rm,useDeferredValue:function(e,t){var n=dt();return _S(n,Ve.memoizedState,e,t)},useTransition:function(){var e=lu(Pr)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ns(e),t]},useSyncExternalStore:aS,useId:OS,useHostTransitionStatus:im,useFormState:yy,useActionState:yy,useOptimistic:function(e,t){var n=dt();return dS(n,Ve,e,t)},useMemoCache:em,useCacheRefresh:MS};lm.useEffectEvent=vS;var PS={readContext:Pt,use:Bc,useCallback:RS,useContext:Pt,useEffect:nm,useImperativeHandle:CS,useInsertionEffect:bS,useLayoutEffect:SS,useMemo:wS,useReducer:Yf,useRef:yS,useState:function(){return Yf(Pr)},useDebugValue:rm,useDeferredValue:function(e,t){var n=dt();return Ve===null?om(n,e,t):_S(n,Ve.memoizedState,e,t)},useTransition:function(){var e=Yf(Pr)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ns(e),t]},useSyncExternalStore:aS,useId:OS,useHostTransitionStatus:im,useFormState:vy,useActionState:vy,useOptimistic:function(e,t){var n=dt();return Ve!==null?dS(n,Ve,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:em,useCacheRefresh:MS};PS.useEffectEvent=vS;function Xf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:We({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sh={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bn(),o=ho(r);o.payload=t,n!=null&&(o.callback=n),t=po(e,o,r),t!==null&&(tn(t,e,r),cl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bn(),o=ho(r);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=po(e,o,r),t!==null&&(tn(t,e,r),cl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bn(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=po(e,r,n),t!==null&&(tn(t,e,n),cl(t,e,n))}};function Sy(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Al(n,r)||!Al(o,i):!0}function Ey(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sh.enqueueReplaceState(t,t.state,null)}function li(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=We({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function IS(e){Nu(e)}function zS(e){console.error(e)}function US(e){Nu(e)}function Gu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Cy(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Eh(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){Gu(e,t)},n}function BS(e){return e=ho(e),e.tag=3,e}function HS(e,t,n,r){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){Cy(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){Cy(t,n,r),typeof o!="function"&&(mo===null?mo=new Set([this]):mo.add(this));var l=r.stack;this.componentDidCatch(r.value,{componentStack:l!==null?l:""})})}function Px(e,t,n,r,o){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&wa(t,n,o,!0),n=En.current,n!==null){switch(n.tag){case 31:case 13:return Pn===null?qu():n.alternate===null&&it===0&&(it=3),n.flags&=-257,n.flags|=65536,n.lanes=o,r===Iu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),id(e,r,o)),!1;case 22:return n.flags|=65536,r===Iu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),id(e,r,o)),!1}throw Error(H(435,n.tag))}return id(e,r,o),qu(),!1}if(Ne)return t=En.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==sh&&(e=Error(H(422),{cause:r}),Ml(Mn(e,n)))):(r!==sh&&(t=Error(H(423),{cause:r}),Ml(Mn(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=Mn(r,n),o=Eh(e.stateNode,r,o),qf(e,o),it!==4&&(it=2)),!1;var i=Error(H(520),{cause:r});if(i=Mn(i,n),gl===null?gl=[i]:gl.push(i),it!==4&&(it=2),t===null)return!0;r=Mn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Eh(n.stateNode,r,e),qf(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(mo===null||!mo.has(i))))return n.flags|=65536,o&=-o,n.lanes|=o,o=BS(o),HS(o,e,n,r),qf(n,o),!1}n=n.return}while(n!==null);return!1}var sm=Error(H(461)),vt=!1;function kt(e,t,n,r){t.child=e===null?eS(t,null,n,r):ii(t,e.child,n,r)}function Ry(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var l in r)l!=="ref"&&(a[l]=r[l])}else a=r;return oi(t),r=Qp(e,t,n,a,i,o),l=Zp(),e!==null&&!vt?(Wp(e,t,o),Ir(e,t,o)):(Ne&&l&&$p(t),t.flags|=1,kt(e,t,r,o),t.child)}function wy(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Gp(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,GS(e,t,i,r,o)):(e=iu(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!um(e,o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Al,n(a,r)&&e.ref===t.ref)return Ir(e,t,o)}return t.flags|=1,e=Mr(i,r),e.ref=t.ref,e.return=t,t.child=e}function GS(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Al(i,r)&&e.ref===t.ref)if(vt=!1,t.pendingProps=r=i,um(e,o))e.flags&131072&&(vt=!0);else return t.lanes=e.lanes,Ir(e,t,o)}return Ch(e,t,n,r,o)}function $S(e,t,n,r){var o=r.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~i}else r=0,t.child=null;return _y(e,t,i,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&au(t,i!==null?i.cachePool:null),i!==null?hy(t,i):mh(),rS(t);else return r=t.lanes=536870912,_y(e,t,i!==null?i.baseLanes|n:n,n,r)}else i!==null?(au(t,i.cachePool),hy(t,i),eo(),t.memoizedState=null):(e!==null&&au(t,null),mh(),eo());return kt(e,t,o,n),t.child}function tl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function _y(e,t,n,r,o){var i=Fp();return i=i===null?null:{parent:gt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&au(t,null),mh(),rS(t),e!==null&&wa(e,t,r,!0),t.childLanes=o,null}function uu(e,t){return t=$u({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xy(e,t,n){return ii(t,e.child,null,n),e=uu(t,t.pendingProps),e.flags|=2,dn(t),t.memoizedState=null,e}function Ix(e,t,n){var r=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(r.mode==="hidden")return e=uu(t,r),t.lanes=536870912,tl(null,e);if(gh(t),(e=Qe)?(e=DE(e,kn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_o!==null?{id:er,overflow:tr}:null,retryLane:536870912,hydrationErrors:null},n=Y0(e),n.return=t,t.child=n,Dt=t,Qe=null)):e=null,e===null)throw xo(t);return t.lanes=536870912,null}return uu(t,r)}var i=e.memoizedState;if(i!==null){var a=i.dehydrated;if(gh(t),o)if(t.flags&256)t.flags&=-257,t=xy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(H(558));else if(vt||wa(e,t,n,!1),o=(n&e.childLanes)!==0,vt||o){if(r=Fe,r!==null&&(a=b0(r,n),a!==0&&a!==i.retryLane))throw i.retryLane=a,gi(e,a),tn(r,e,a),sm;qu(),t=xy(e,t,n)}else e=i.treeContext,Qe=In(a.nextSibling),Dt=t,Ne=!0,fo=null,kn=!1,e!==null&&K0(t,e),t=uu(t,r),t.flags|=4096;return t}return e=Mr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function cu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(H(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ch(e,t,n,r,o){return oi(t),n=Qp(e,t,n,r,void 0,o),r=Zp(),e!==null&&!vt?(Wp(e,t,o),Ir(e,t,o)):(Ne&&r&&$p(t),t.flags|=1,kt(e,t,n,o),t.child)}function Ty(e,t,n,r,o,i){return oi(t),t.updateQueue=null,n=iS(t,r,n,o),oS(e),r=Zp(),e!==null&&!vt?(Wp(e,t,i),Ir(e,t,i)):(Ne&&r&&$p(t),t.flags|=1,kt(e,t,n,i),t.child)}function Ay(e,t,n,r,o){if(oi(t),t.stateNode===null){var i=Gi,a=n.contextType;typeof a=="object"&&a!==null&&(i=Pt(a)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Sh,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},Yp(t),a=n.contextType,i.context=typeof a=="object"&&a!==null?Pt(a):Gi,i.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(Xf(t,n,a,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(a=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),a!==i.state&&Sh.enqueueReplaceState(i,i.state,null),dl(t,r,i,o),fl(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,s=li(n,l);i.props=s;var u=i.context,f=n.contextType;a=Gi,typeof f=="object"&&f!==null&&(a=Pt(f));var c=n.getDerivedStateFromProps;f=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||u!==a)&&Ey(t,i,r,a),Zr=!1;var d=t.memoizedState;i.state=d,dl(t,r,i,o),fl(),u=t.memoizedState,l||d!==u||Zr?(typeof c=="function"&&(Xf(t,n,c,r),u=t.memoizedState),(s=Zr||Sy(t,n,s,r,d,u,a))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=a,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,hh(e,t),a=t.memoizedProps,f=li(n,a),i.props=f,c=t.pendingProps,d=i.context,u=n.contextType,s=Gi,typeof u=="object"&&u!==null&&(s=Pt(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==c||d!==s)&&Ey(t,i,r,s),Zr=!1,d=t.memoizedState,i.state=d,dl(t,r,i,o),fl();var h=t.memoizedState;a!==c||d!==h||Zr||e!==null&&e.dependencies!==null&&Pu(e.dependencies)?(typeof l=="function"&&(Xf(t,n,l,r),h=t.memoizedState),(f=Zr||Sy(t,n,f,r,d,h,s)||e!==null&&e.dependencies!==null&&Pu(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,h,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,h,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=s,r=f):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,cu(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=ii(t,e.child,null,o),t.child=ii(t,null,n,o)):kt(e,t,n,o),t.memoizedState=i.state,e=t.child):e=Ir(e,t,o),e}function Oy(e,t,n,r){return ri(),t.flags|=256,kt(e,t,n,r),t.child}var Kf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qf(e){return{baseLanes:e,cachePool:Z0()}}function Zf(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=mn),e}function jS(e,t,n){var r=t.pendingProps,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),a&&(o=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(o?Jr(t):eo(),(e=Qe)?(e=DE(e,kn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_o!==null?{id:er,overflow:tr}:null,retryLane:536870912,hydrationErrors:null},n=Y0(e),n.return=t,t.child=n,Dt=t,Qe=null)):e=null,e===null)throw xo(t);return Ih(e)?t.lanes=32:t.lanes=536870912,null}var l=r.children;return r=r.fallback,o?(eo(),o=t.mode,l=$u({mode:"hidden",children:l},o),r=Zo(r,o,n,null),l.return=t,r.return=t,l.sibling=r,t.child=l,r=t.child,r.memoizedState=Qf(n),r.childLanes=Zf(e,a,n),t.memoizedState=Kf,tl(null,r)):(Jr(t),Rh(t,l))}var s=e.memoizedState;if(s!==null&&(l=s.dehydrated,l!==null)){if(i)t.flags&256?(Jr(t),t.flags&=-257,t=Wf(e,t,n)):t.memoizedState!==null?(eo(),t.child=e.child,t.flags|=128,t=null):(eo(),l=r.fallback,o=t.mode,r=$u({mode:"visible",children:r.children},o),l=Zo(l,o,n,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,ii(t,e.child,null,n),r=t.child,r.memoizedState=Qf(n),r.childLanes=Zf(e,a,n),t.memoizedState=Kf,t=tl(null,r));else if(Jr(t),Ih(l)){if(a=l.nextSibling&&l.nextSibling.dataset,a)var u=a.dgst;a=u,r=Error(H(419)),r.stack="",r.digest=a,Ml({value:r,source:null,stack:null}),t=Wf(e,t,n)}else if(vt||wa(e,t,n,!1),a=(n&e.childLanes)!==0,vt||a){if(a=Fe,a!==null&&(r=b0(a,n),r!==0&&r!==s.retryLane))throw s.retryLane=r,gi(e,r),tn(a,e,r),sm;Ph(l)||qu(),t=Wf(e,t,n)}else Ph(l)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,Qe=In(l.nextSibling),Dt=t,Ne=!0,fo=null,kn=!1,e!==null&&K0(t,e),t=Rh(t,r.children),t.flags|=4096);return t}return o?(eo(),l=r.fallback,o=t.mode,s=e.child,u=s.sibling,r=Mr(s,{mode:"hidden",children:r.children}),r.subtreeFlags=s.subtreeFlags&65011712,u!==null?l=Mr(u,l):(l=Zo(l,o,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,tl(null,r),r=t.child,l=e.child.memoizedState,l===null?l=Qf(n):(o=l.cachePool,o!==null?(s=gt._currentValue,o=o.parent!==s?{parent:s,pool:s}:o):o=Z0(),l={baseLanes:l.baseLanes|n,cachePool:o}),r.memoizedState=l,r.childLanes=Zf(e,a,n),t.memoizedState=Kf,tl(e.child,r)):(Jr(t),n=e.child,e=n.sibling,n=Mr(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function Rh(e,t){return t=$u({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function $u(e,t){return e=pn(22,e,null,t),e.lanes=0,e}function Wf(e,t,n){return ii(t,e.child,null,n),e=Rh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function My(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ch(e.return,t,n)}function Jf(e,t,n,r,o,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.treeForkCount=i)}function VS(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;r=r.children;var a=ft.current,l=(a&2)!==0;if(l?(a=a&1|2,t.flags|=128):a&=1,Xe(ft,a),kt(e,t,r,n),r=Ne?Ol:0,!l&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&My(e,n,t);else if(e.tag===19)My(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Uu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Jf(t,!1,o,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Uu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Jf(t,!0,n,null,i,r);break;case"together":Jf(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ir(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ao|=t.lanes,!(n&t.childLanes))if(e!==null){if(wa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=Mr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function um(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Pu(e)))}function zx(e,t,n){switch(t.tag){case 3:Au(t,t.stateNode.containerInfo),Wr(t,gt,e.memoizedState.cache),ri();break;case 27:case 5:Zd(t);break;case 4:Au(t,t.stateNode.containerInfo);break;case 10:Wr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,gh(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Jr(t),t.flags|=128,null):n&t.child.childLanes?jS(e,t,n):(Jr(t),e=Ir(e,t,n),e!==null?e.sibling:null);Jr(t);break;case 19:var o=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(wa(e,t,n,!1),r=(n&t.childLanes)!==0),o){if(r)return VS(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Xe(ft,ft.current),r)break;return null;case 22:return t.lanes=0,$S(e,t,n,t.pendingProps);case 24:Wr(t,gt,e.memoizedState.cache)}return Ir(e,t,n)}function FS(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!um(e,n)&&!(t.flags&128))return vt=!1,zx(e,t,n);vt=!!(e.flags&131072)}else vt=!1,Ne&&t.flags&1048576&&X0(t,Ol,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=$o(t.elementType),t.type=e,typeof e=="function")Gp(e)?(r=li(e,r),t.tag=1,t=Ay(null,t,e,r,n)):(t.tag=0,t=Ch(null,t,e,r,n));else{if(e!=null){var o=e.$$typeof;if(o===Tp){t.tag=11,t=Ry(null,t,e,r,n);break e}else if(o===Ap){t.tag=14,t=wy(null,t,e,r,n);break e}}throw t=Kd(e)||e,Error(H(306,t,""))}}return t;case 0:return Ch(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,o=li(r,t.pendingProps),Ay(e,t,r,o,n);case 3:e:{if(Au(t,t.stateNode.containerInfo),e===null)throw Error(H(387));r=t.pendingProps;var i=t.memoizedState;o=i.element,hh(e,t),dl(t,r,null,n);var a=t.memoizedState;if(r=a.cache,Wr(t,gt,r),r!==i.cache&&fh(t,[gt],n,!0),fl(),r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Oy(e,t,r,n);break e}else if(r!==o){o=Mn(Error(H(424)),t),Ml(o),t=Oy(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Qe=In(e.firstChild),Dt=t,Ne=!0,fo=null,kn=!0,n=eS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ri(),r===o){t=Ir(e,t,n);break e}kt(e,t,r,n)}t=t.child}return t;case 26:return cu(e,t),e===null?(n=Qy(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ne||(n=t.type,e=t.pendingProps,r=Qu(co.current).createElement(n),r[Lt]=t,r[rn]=e,It(r,n,e),Tt(r),t.stateNode=r):t.memoizedState=Qy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Zd(t),e===null&&Ne&&(r=t.stateNode=PE(t.type,t.pendingProps,co.current),Dt=t,kn=!0,o=Qe,Mo(t.type)?(zh=o,Qe=In(r.firstChild)):Qe=o),kt(e,t,t.pendingProps.children,n),cu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((o=r=Qe)&&(r=hT(r,t.type,t.pendingProps,kn),r!==null?(t.stateNode=r,Dt=t,Qe=In(r.firstChild),kn=!1,o=!0):o=!1),o||xo(t)),Zd(t),o=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,r=i.children,Lh(o,i)?r=null:a!==null&&Lh(o,a)&&(t.flags|=32),t.memoizedState!==null&&(o=Qp(e,t,Ax,null,null,n),Il._currentValue=o),cu(e,t),kt(e,t,r,n),t.child;case 6:return e===null&&Ne&&((e=n=Qe)&&(n=pT(n,t.pendingProps,kn),n!==null?(t.stateNode=n,Dt=t,Qe=null,e=!0):e=!1),e||xo(t)),null;case 13:return jS(e,t,n);case 4:return Au(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ii(t,null,r,n):kt(e,t,r,n),t.child;case 11:return Ry(e,t,t.type,t.pendingProps,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Wr(t,t.type,r.value),kt(e,t,r.children,n),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,oi(t),o=Pt(o),r=r(o),t.flags|=1,kt(e,t,r,n),t.child;case 14:return wy(e,t,t.type,t.pendingProps,n);case 15:return GS(e,t,t.type,t.pendingProps,n);case 19:return VS(e,t,n);case 31:return Ix(e,t,n);case 22:return $S(e,t,n,t.pendingProps);case 24:return oi(t),r=Pt(gt),e===null?(o=Fp(),o===null&&(o=Fe,i=Vp(),o.pooledCache=i,i.refCount++,i!==null&&(o.pooledCacheLanes|=n),o=i),t.memoizedState={parent:r,cache:o},Yp(t),Wr(t,gt,o)):(e.lanes&n&&(hh(e,t),dl(t,null,null,n),fl()),o=e.memoizedState,i=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Wr(t,gt,r)):(r=i.cache,Wr(t,gt,r),r!==o.cache&&fh(t,[gt],n,!0))),kt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(H(156,t.tag))}function gr(e){e.flags|=4}function ed(e,t,n,r,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(mE())e.flags|=8192;else throw Jo=Iu,qp}else e.flags&=-16777217}function ky(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!UE(t))if(mE())e.flags|=8192;else throw Jo=Iu,qp}function Ns(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?g0():536870912,e.lanes|=t,ua|=t)}function Va(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&65011712,r|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ux(e,t,n){var r=t.pendingProps;switch(jp(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),kr(gt),ra(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(wi(t)?gr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ff())),Ke(t),null;case 26:var o=t.type,i=t.memoizedState;return e===null?(gr(t),i!==null?(Ke(t),ky(t,i)):(Ke(t),ed(t,o,null,r,n))):i?i!==e.memoizedState?(gr(t),Ke(t),ky(t,i)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&gr(t),Ke(t),ed(t,o,e,r,n)),null;case 27:if(Ou(t),n=co.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gr(t);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Ke(t),null}e=rr.current,wi(t)?ay(t):(e=PE(o,r,n),t.stateNode=e,gr(t))}return Ke(t),null;case 5:if(Ou(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gr(t);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Ke(t),null}if(i=rr.current,wi(t))ay(t);else{var a=Qu(co.current);switch(i){case 1:i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":i=a.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?a.createElement(o,{is:r.is}):a.createElement(o)}}i[Lt]=t,i[rn]=r;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)i.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=i;e:switch(It(i,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&gr(t)}}return Ke(t),ed(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gr(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(e=co.current,wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,o=Dt,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||kE(e.nodeValue,n)),e||xo(t,!0)}else e=Qu(e).createTextNode(r),e[Lt]=t,t.stateNode=e}return Ke(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=wi(t),n!==null){if(e===null){if(!r)throw Error(H(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(557));e[Lt]=t}else ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else n=Ff(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(dn(t),t):(dn(t),null);if(t.flags&128)throw Error(H(558))}return Ke(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(H(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(H(317));o[Lt]=t}else ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),o=!1}else o=Ff(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(dn(t),t):(dn(t),null)}return dn(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ns(t,t.updateQueue),Ke(t),null);case 4:return ra(),e===null&&gm(t.stateNode.containerInfo),Ke(t),null;case 10:return kr(t.type),Ke(t),null;case 19:if(Mt(ft),r=t.memoizedState,r===null)return Ke(t),null;if(o=(t.flags&128)!==0,i=r.rendering,i===null)if(o)Va(r,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Uu(e),i!==null){for(t.flags|=128,Va(r,!1),e=i.updateQueue,t.updateQueue=e,Ns(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)q0(n,e),n=n.sibling;return Xe(ft,ft.current&1|2),Ne&&Cr(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&gn()>Vu&&(t.flags|=128,o=!0,Va(r,!1),t.lanes=4194304)}else{if(!o)if(e=Uu(i),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Ns(t,e),Va(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ne)return Ke(t),null}else 2*gn()-r.renderingStartTime>Vu&&n!==536870912&&(t.flags|=128,o=!0,Va(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=gn(),e.sibling=null,n=ft.current,Xe(ft,o?n&1|2:n&1),Ne&&Cr(t,r.treeForkCount),e):(Ke(t),null);case 22:case 23:return dn(t),Xp(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),n=t.updateQueue,n!==null&&Ns(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Mt(Wo),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),kr(gt),Ke(t),null;case 25:return null;case 30:return null}throw Error(H(156,t.tag))}function Bx(e,t){switch(jp(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kr(gt),ra(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ou(t),null;case 31:if(t.memoizedState!==null){if(dn(t),t.alternate===null)throw Error(H(340));ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mt(ft),null;case 4:return ra(),null;case 10:return kr(t.type),null;case 22:case 23:return dn(t),Xp(),e!==null&&Mt(Wo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return kr(gt),null;case 25:return null;default:return null}}function qS(e,t){switch(jp(t),t.tag){case 3:kr(gt),ra();break;case 26:case 27:case 5:Ou(t);break;case 4:ra();break;case 31:t.memoizedState!==null&&dn(t);break;case 13:dn(t);break;case 19:Mt(ft);break;case 10:kr(t.type);break;case 22:case 23:dn(t),Xp(),e!==null&&Mt(Wo);break;case 24:kr(gt)}}function rs(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(l){$e(t,t.return,l)}}function To(e,t,n){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,l=a.destroy;if(l!==void 0){a.destroy=void 0,o=t;var s=n,u=l;try{u()}catch(f){$e(o,s,f)}}}r=r.next}while(r!==i)}}catch(f){$e(t,t.return,f)}}function YS(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{nS(t,n)}catch(r){$e(e,e.return,r)}}}function XS(e,t,n){n.props=li(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){$e(e,t,r)}}function pl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(o){$e(e,t,o)}}function nr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(o){$e(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){$e(e,t,o)}else n.current=null}function KS(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(o){$e(e,e.return,o)}}function td(e,t,n){try{var r=e.stateNode;lT(r,e.type,n,t),r[rn]=t}catch(o){$e(e,e.return,o)}}function QS(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mo(e.type)||e.tag===4}function nd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||QS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Mo(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Tr));else if(r!==4&&(r===27&&Mo(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(wh(e,t,n),e=e.sibling;e!==null;)wh(e,t,n),e=e.sibling}function ju(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Mo(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ju(e,t,n),e=e.sibling;e!==null;)ju(e,t,n),e=e.sibling}function ZS(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);It(t,r,n),t[Lt]=e,t[rn]=n}catch(i){$e(e,e.return,i)}}var wr=!1,mt=!1,rd=!1,Ny=typeof WeakSet=="function"?WeakSet:Set,xt=null;function Hx(e,t){if(e=e.containerInfo,kh=ec,e=U0(e),Up(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,s=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||o!==0&&c.nodeType!==3||(l=a+o),c!==i||r!==0&&c.nodeType!==3||(s=a+r),c.nodeType===3&&(a+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===o&&(l=a),d===i&&++f===r&&(s=a),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nh={focusedElem:e,selectionRange:n},ec=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){switch(t=xt,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,o=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var y=li(n.type,o);e=r.getSnapshotBeforeUpdate(y,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(b){$e(n,n.return,b)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Dh(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dh(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(H(163))}if(e=t.sibling,e!==null){e.return=t.return,xt=e;break}xt=t.return}}function WS(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vr(e,n),r&4&&rs(5,n);break;case 1:if(vr(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){$e(n,n.return,a)}else{var o=li(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){$e(n,n.return,a)}}r&64&&YS(n),r&512&&pl(n,n.return);break;case 3:if(vr(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{nS(e,t)}catch(a){$e(n,n.return,a)}}break;case 27:t===null&&r&4&&ZS(n);case 26:case 5:vr(e,n),t===null&&r&4&&KS(n),r&512&&pl(n,n.return);break;case 12:vr(e,n);break;case 31:vr(e,n),r&4&&tE(e,n);break;case 13:vr(e,n),r&4&&nE(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Kx.bind(null,n),mT(e,n))));break;case 22:if(r=n.memoizedState!==null||wr,!r){t=t!==null&&t.memoizedState!==null||mt,o=wr;var i=mt;wr=r,(mt=t)&&!i?Er(e,n,(n.subtreeFlags&8772)!==0):vr(e,n),wr=o,mt=i}break;case 30:break;default:vr(e,n)}}function JS(e){var t=e.alternate;t!==null&&(e.alternate=null,JS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Np(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,Wt=!1;function yr(e,t,n){for(n=n.child;n!==null;)eE(e,t,n),n=n.sibling}function eE(e,t,n){if(yn&&typeof yn.onCommitFiberUnmount=="function")try{yn.onCommitFiberUnmount(Ql,n)}catch{}switch(n.tag){case 26:mt||nr(n,t),yr(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:mt||nr(n,t);var r=Je,o=Wt;Mo(n.type)&&(Je=n.stateNode,Wt=!1),yr(e,t,n),vl(n.stateNode),Je=r,Wt=o;break;case 5:mt||nr(n,t);case 6:if(r=Je,o=Wt,Je=null,yr(e,t,n),Je=r,Wt=o,Je!==null)if(Wt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(n.stateNode)}catch(i){$e(n,t,i)}else try{Je.removeChild(n.stateNode)}catch(i){$e(n,t,i)}break;case 18:Je!==null&&(Wt?(e=Je,Fy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ha(e)):Fy(Je,n.stateNode));break;case 4:r=Je,o=Wt,Je=n.stateNode.containerInfo,Wt=!0,yr(e,t,n),Je=r,Wt=o;break;case 0:case 11:case 14:case 15:To(2,n,t),mt||To(4,n,t),yr(e,t,n);break;case 1:mt||(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&XS(n,t,r)),yr(e,t,n);break;case 21:yr(e,t,n);break;case 22:mt=(r=mt)||n.memoizedState!==null,yr(e,t,n),mt=r;break;default:yr(e,t,n)}}function tE(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ha(e)}catch(n){$e(t,t.return,n)}}}function nE(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ha(e)}catch(n){$e(t,t.return,n)}}function Gx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ny),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ny),t;default:throw Error(H(435,e.tag))}}function Ls(e,t){var n=Gx(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var o=Qx.bind(null,e,r);r.then(o,o)}})}function Qt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r],i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 27:if(Mo(l.type)){Je=l.stateNode,Wt=!1;break e}break;case 5:Je=l.stateNode,Wt=!1;break e;case 3:case 4:Je=l.stateNode.containerInfo,Wt=!0;break e}l=l.return}if(Je===null)throw Error(H(160));eE(i,a,o),Je=null,Wt=!1,i=o.alternate,i!==null&&(i.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)rE(t,e),t=t.sibling}var $n=null;function rE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),Zt(e),r&4&&(To(3,e,e.return),rs(3,e),To(5,e,e.return));break;case 1:Qt(t,e),Zt(e),r&512&&(mt||n===null||nr(n,n.return)),r&64&&wr&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var o=$n;if(Qt(t,e),Zt(e),r&512&&(mt||n===null||nr(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":i=o.getElementsByTagName("title")[0],(!i||i[Jl]||i[Lt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=o.createElement(r),o.head.insertBefore(i,o.querySelector("head > title"))),It(i,r,n),i[Lt]=e,Tt(i),r=i;break e;case"link":var a=Wy("link","href",o).get(r+(n.href||""));if(a){for(var l=0;l<a.length;l++)if(i=a[l],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(l,1);break t}}i=o.createElement(r),It(i,r,n),o.head.appendChild(i);break;case"meta":if(a=Wy("meta","content",o).get(r+(n.content||""))){for(l=0;l<a.length;l++)if(i=a[l],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(l,1);break t}}i=o.createElement(r),It(i,r,n),o.head.appendChild(i);break;default:throw Error(H(468,r))}i[Lt]=e,Tt(i),r=i}e.stateNode=r}else Jy(o,e.type,e.stateNode);else e.stateNode=Zy(o,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?Jy(o,e.type,e.stateNode):Zy(o,r,e.memoizedProps)):r===null&&e.stateNode!==null&&td(e,e.memoizedProps,n.memoizedProps)}break;case 27:Qt(t,e),Zt(e),r&512&&(mt||n===null||nr(n,n.return)),n!==null&&r&4&&td(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Qt(t,e),Zt(e),r&512&&(mt||n===null||nr(n,n.return)),e.flags&32){o=e.stateNode;try{ia(o,"")}catch(y){$e(e,e.return,y)}}r&4&&e.stateNode!=null&&(o=e.memoizedProps,td(e,o,n!==null?n.memoizedProps:o)),r&1024&&(rd=!0);break;case 6:if(Qt(t,e),Zt(e),r&4){if(e.stateNode===null)throw Error(H(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(y){$e(e,e.return,y)}}break;case 3:if(hu=null,o=$n,$n=Zu(t.containerInfo),Qt(t,e),$n=o,Zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ha(t.containerInfo)}catch(y){$e(e,e.return,y)}rd&&(rd=!1,oE(e));break;case 4:r=$n,$n=Zu(e.stateNode.containerInfo),Qt(t,e),Zt(e),$n=r;break;case 12:Qt(t,e),Zt(e);break;case 31:Qt(t,e),Zt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Ls(e,r)));break;case 13:Qt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($c=gn()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Ls(e,r)));break;case 22:o=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=wr,f=mt;if(wr=u||o,mt=f||s,Qt(t,e),mt=f,wr=u,Zt(e),r&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||s||wr||mt||jo(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(i=s.stateNode,o)a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{l=s.stateNode;var c=s.memoizedProps.style,d=c!=null&&c.hasOwnProperty("display")?c.display:null;l.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(y){$e(s,s.return,y)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=o?"":s.memoizedProps}catch(y){$e(s,s.return,y)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;o?qy(h,!0):qy(s.stateNode,!1)}catch(y){$e(s,s.return,y)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Ls(e,n))));break;case 19:Qt(t,e),Zt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Ls(e,r)));break;case 30:break;case 21:break;default:Qt(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(QS(r)){n=r;break}r=r.return}if(n==null)throw Error(H(160));switch(n.tag){case 27:var o=n.stateNode,i=nd(e);ju(e,i,o);break;case 5:var a=n.stateNode;n.flags&32&&(ia(a,""),n.flags&=-33);var l=nd(e);ju(e,l,a);break;case 3:case 4:var s=n.stateNode.containerInfo,u=nd(e);wh(e,u,s);break;default:throw Error(H(161))}}catch(f){$e(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function oE(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;oE(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)WS(e,t.alternate,t),t=t.sibling}function jo(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:To(4,t,t.return),jo(t);break;case 1:nr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&XS(t,t.return,n),jo(t);break;case 27:vl(t.stateNode);case 26:case 5:nr(t,t.return),jo(t);break;case 22:t.memoizedState===null&&jo(t);break;case 30:jo(t);break;default:jo(t)}e=e.sibling}}function Er(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:Er(o,i,n),rs(4,i);break;case 1:if(Er(o,i,n),r=i,o=r.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(u){$e(r,r.return,u)}if(r=i,o=r.updateQueue,o!==null){var l=r.stateNode;try{var s=o.shared.hiddenCallbacks;if(s!==null)for(o.shared.hiddenCallbacks=null,o=0;o<s.length;o++)tS(s[o],l)}catch(u){$e(r,r.return,u)}}n&&a&64&&YS(i),pl(i,i.return);break;case 27:ZS(i);case 26:case 5:Er(o,i,n),n&&r===null&&a&4&&KS(i),pl(i,i.return);break;case 12:Er(o,i,n);break;case 31:Er(o,i,n),n&&a&4&&tE(o,i);break;case 13:Er(o,i,n),n&&a&4&&nE(o,i);break;case 22:i.memoizedState===null&&Er(o,i,n),pl(i,i.return);break;case 30:break;default:Er(o,i,n)}t=t.sibling}}function cm(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ts(n))}function fm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ts(e))}function Hn(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)iE(e,t,n,r),t=t.sibling}function iE(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Hn(e,t,n,r),o&2048&&rs(9,t);break;case 1:Hn(e,t,n,r);break;case 3:Hn(e,t,n,r),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ts(e)));break;case 12:if(o&2048){Hn(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,l=i.onPostCommit;typeof l=="function"&&l(a,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){$e(t,t.return,s)}}else Hn(e,t,n,r);break;case 31:Hn(e,t,n,r);break;case 13:Hn(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,a=t.alternate,t.memoizedState!==null?i._visibility&2?Hn(e,t,n,r):ml(e,t):i._visibility&2?Hn(e,t,n,r):(i._visibility|=2,Oi(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),o&2048&&cm(a,t);break;case 24:Hn(e,t,n,r),o&2048&&fm(t.alternate,t);break;default:Hn(e,t,n,r)}}function Oi(e,t,n,r,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,a=t,l=n,s=r,u=a.flags;switch(a.tag){case 0:case 11:case 15:Oi(i,a,l,s,o),rs(8,a);break;case 23:break;case 22:var f=a.stateNode;a.memoizedState!==null?f._visibility&2?Oi(i,a,l,s,o):ml(i,a):(f._visibility|=2,Oi(i,a,l,s,o)),o&&u&2048&&cm(a.alternate,a);break;case 24:Oi(i,a,l,s,o),o&&u&2048&&fm(a.alternate,a);break;default:Oi(i,a,l,s,o)}t=t.sibling}}function ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:ml(n,r),o&2048&&cm(r.alternate,r);break;case 24:ml(n,r),o&2048&&fm(r.alternate,r);break;default:ml(n,r)}t=t.sibling}}var nl=8192;function _i(e,t,n){if(e.subtreeFlags&nl)for(e=e.child;e!==null;)aE(e,t,n),e=e.sibling}function aE(e,t,n){switch(e.tag){case 26:_i(e,t,n),e.flags&nl&&e.memoizedState!==null&&TT(n,$n,e.memoizedState,e.memoizedProps);break;case 5:_i(e,t,n);break;case 3:case 4:var r=$n;$n=Zu(e.stateNode.containerInfo),_i(e,t,n),$n=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=nl,nl=16777216,_i(e,t,n),nl=r):_i(e,t,n));break;default:_i(e,t,n)}}function lE(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fa(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];xt=r,uE(r,e)}lE(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)sE(e),e=e.sibling}function sE(e){switch(e.tag){case 0:case 11:case 15:Fa(e),e.flags&2048&&To(9,e,e.return);break;case 3:Fa(e);break;case 12:Fa(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,fu(e)):Fa(e);break;default:Fa(e)}}function fu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];xt=r,uE(r,e)}lE(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:To(8,t,t.return),fu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,fu(t));break;default:fu(t)}e=e.sibling}}function uE(e,t){for(;xt!==null;){var n=xt;switch(n.tag){case 0:case 11:case 15:To(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ts(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,xt=r;else e:for(n=e;xt!==null;){r=xt;var o=r.sibling,i=r.return;if(JS(r),r===n){xt=null;break e}if(o!==null){o.return=i,xt=o;break e}xt=i}}}var $x={getCacheForType:function(e){var t=Pt(gt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Pt(gt).controller.signal}},jx=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Fe=null,Me=null,ke=0,Ge=0,fn=null,ao=!1,xa=!1,dm=!1,zr=0,it=0,Ao=0,ei=0,hm=0,mn=0,ua=0,gl=null,Jt=null,_h=!1,$c=0,cE=0,Vu=1/0,Fu=null,mo=null,Et=0,go=null,ca=null,Nr=0,xh=0,Th=null,fE=null,yl=0,Ah=null;function bn(){return Ue&2&&ke!==0?ke&-ke:ve.T!==null?mm():S0()}function dE(){if(mn===0)if(!(ke&536870912)||Ne){var e=_s;_s<<=1,!(_s&3932160)&&(_s=262144),mn=e}else mn=536870912;return e=En.current,e!==null&&(e.flags|=32),mn}function tn(e,t,n){(e===Fe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(fa(e,0),lo(e,ke,mn,!1)),Wl(e,n),(!(Ue&2)||e!==Fe)&&(e===Fe&&(!(Ue&2)&&(ei|=n),it===4&&lo(e,ke,mn,!1)),sr(e))}function hE(e,t,n){if(Ue&6)throw Error(H(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Zl(e,t),o=r?qx(e,t):od(e,t,!0),i=r;do{if(o===0){xa&&!r&&lo(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Vx(n)){o=od(e,t,!1),i=!1;continue}if(o===2){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var l=e;o=gl;var s=l.current.memoizedState.isDehydrated;if(s&&(fa(l,a).flags|=256),a=od(l,a,!1),a!==2){if(dm&&!s){l.errorRecoveryDisabledLanes|=i,ei|=i,o=4;break e}i=Jt,Jt=o,i!==null&&(Jt===null?Jt=i:Jt.push.apply(Jt,i))}o=a}if(i=!1,o!==2)continue}}if(o===1){fa(e,0),lo(e,t,0,!0);break}e:{switch(r=e,i=o,i){case 0:case 1:throw Error(H(345));case 4:if((t&4194048)!==t)break;case 6:lo(r,t,mn,!ao);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(H(329))}if((t&62914560)===t&&(o=$c+300-gn(),10<o)){if(lo(r,t,mn,!ao),kc(r,0,!0)!==0)break e;Nr=t,r.timeoutHandle=LE(Ly.bind(null,r,n,Jt,Fu,_h,t,mn,ei,ua,ao,i,"Throttled",-0,0),o);break e}Ly(r,n,Jt,Fu,_h,t,mn,ei,ua,ao,i,null,-0,0)}}break}while(!0);sr(e)}function Ly(e,t,n,r,o,i,a,l,s,u,f,c,d,h){if(e.timeoutHandle=-1,c=t.subtreeFlags,c&8192||(c&16785408)===16785408){c={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tr},aE(t,i,c);var y=(i&62914560)===i?$c-gn():(i&4194048)===i?cE-gn():0;if(y=AT(c,y),y!==null){Nr=i,e.cancelPendingCommit=y(Py.bind(null,e,t,i,n,r,o,a,l,s,f,c,null,d,h)),lo(e,i,a,!u);return}}Py(e,t,i,n,r,o,a,l,s)}function Vx(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Sn(i(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function lo(e,t,n,r){t&=~hm,t&=~ei,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-vn(o),a=1<<i;r[i]=-1,o&=~a}n!==0&&y0(e,n,t)}function jc(){return Ue&6?!0:(os(0),!1)}function pm(){if(Me!==null){if(Ge===0)var e=Me.return;else e=Me,Ar=yi=null,Jp(e),Qi=null,kl=0,e=Me;for(;e!==null;)qS(e.alternate,e),e=e.return;Me=null}}function fa(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,cT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Nr=0,pm(),Fe=e,Me=n=Mr(e.current,null),ke=t,Ge=0,fn=null,ao=!1,xa=Zl(e,t),dm=!1,ua=mn=hm=ei=Ao=it=0,Jt=gl=null,_h=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var o=31-vn(r),i=1<<o;t|=e[o],r&=~i}return zr=t,Pc(),n}function pE(e,t){we=null,ve.H=Ll,t===_a||t===zc?(t=fy(),Ge=3):t===qp?(t=fy(),Ge=4):Ge=t===sm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fn=t,Me===null&&(it=1,Gu(e,Mn(t,e.current)))}function mE(){var e=En.current;return e===null?!0:(ke&4194048)===ke?Pn===null:(ke&62914560)===ke||ke&536870912?e===Pn:!1}function gE(){var e=ve.H;return ve.H=Ll,e===null?Ll:e}function yE(){var e=ve.A;return ve.A=$x,e}function qu(){it=4,ao||(ke&4194048)!==ke&&En.current!==null||(xa=!0),!(Ao&134217727)&&!(ei&134217727)||Fe===null||lo(Fe,ke,mn,!1)}function od(e,t,n){var r=Ue;Ue|=2;var o=gE(),i=yE();(Fe!==e||ke!==t)&&(Fu=null,fa(e,t)),t=!1;var a=it;e:do try{if(Ge!==0&&Me!==null){var l=Me,s=fn;switch(Ge){case 8:pm(),a=6;break e;case 3:case 2:case 9:case 6:En.current===null&&(t=!0);var u=Ge;if(Ge=0,fn=null,Vi(e,l,s,u),n&&xa){a=0;break e}break;default:u=Ge,Ge=0,fn=null,Vi(e,l,s,u)}}Fx(),a=it;break}catch(f){pE(e,f)}while(!0);return t&&e.shellSuspendCounter++,Ar=yi=null,Ue=r,ve.H=o,ve.A=i,Me===null&&(Fe=null,ke=0,Pc()),a}function Fx(){for(;Me!==null;)vE(Me)}function qx(e,t){var n=Ue;Ue|=2;var r=gE(),o=yE();Fe!==e||ke!==t?(Fu=null,Vu=gn()+500,fa(e,t)):xa=Zl(e,t);e:do try{if(Ge!==0&&Me!==null){t=Me;var i=fn;t:switch(Ge){case 1:Ge=0,fn=null,Vi(e,t,i,1);break;case 2:case 9:if(cy(i)){Ge=0,fn=null,Dy(t);break}t=function(){Ge!==2&&Ge!==9||Fe!==e||(Ge=7),sr(e)},i.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:cy(i)?(Ge=0,fn=null,Dy(t)):(Ge=0,fn=null,Vi(e,t,i,7));break;case 5:var a=null;switch(Me.tag){case 26:a=Me.memoizedState;case 5:case 27:var l=Me;if(a?UE(a):l.stateNode.complete){Ge=0,fn=null;var s=l.sibling;if(s!==null)Me=s;else{var u=l.return;u!==null?(Me=u,Vc(u)):Me=null}break t}}Ge=0,fn=null,Vi(e,t,i,5);break;case 6:Ge=0,fn=null,Vi(e,t,i,6);break;case 8:pm(),it=6;break e;default:throw Error(H(462))}}Yx();break}catch(f){pE(e,f)}while(!0);return Ar=yi=null,ve.H=r,ve.A=o,Ue=n,Me!==null?0:(Fe=null,ke=0,Pc(),it)}function Yx(){for(;Me!==null&&!g1();)vE(Me)}function vE(e){var t=FS(e.alternate,e,zr);e.memoizedProps=e.pendingProps,t===null?Vc(e):Me=t}function Dy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ty(n,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Ty(n,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Jp(t);default:qS(n,t),t=Me=q0(t,zr),t=FS(n,t,zr)}e.memoizedProps=e.pendingProps,t===null?Vc(e):Me=t}function Vi(e,t,n,r){Ar=yi=null,Jp(t),Qi=null,kl=0;var o=t.return;try{if(Px(e,o,t,n,ke)){it=1,Gu(e,Mn(n,e.current)),Me=null;return}}catch(i){if(o!==null)throw Me=o,i;it=1,Gu(e,Mn(n,e.current)),Me=null;return}t.flags&32768?(Ne||r===1?e=!0:xa||ke&536870912?e=!1:(ao=e=!0,(r===2||r===9||r===3||r===6)&&(r=En.current,r!==null&&r.tag===13&&(r.flags|=16384))),bE(t,e)):Vc(t)}function Vc(e){var t=e;do{if(t.flags&32768){bE(t,ao);return}e=t.return;var n=Ux(t.alternate,t,zr);if(n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);it===0&&(it=5)}function bE(e,t){do{var n=Bx(e.alternate,e);if(n!==null){n.flags&=32767,Me=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Me=e;return}Me=e=n}while(e!==null);it=6,Me=null}function Py(e,t,n,r,o,i,a,l,s){e.cancelPendingCommit=null;do Fc();while(Et!==0);if(Ue&6)throw Error(H(327));if(t!==null){if(t===e.current)throw Error(H(177));if(i=t.lanes|t.childLanes,i|=Bp,x1(e,n,i,a,l,s),e===Fe&&(Me=Fe=null,ke=0),ca=t,go=e,Nr=n,xh=i,Th=o,fE=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zx(Mu,function(){return wE(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=ve.T,ve.T=null,o=Be.p,Be.p=2,a=Ue,Ue|=4;try{Hx(e,t,n)}finally{Ue=a,Be.p=o,ve.T=r}}Et=1,SE(),EE(),CE()}}function SE(){if(Et===1){Et=0;var e=go,t=ca,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=ve.T,ve.T=null;var r=Be.p;Be.p=2;var o=Ue;Ue|=4;try{rE(t,e);var i=Nh,a=U0(e.containerInfo),l=i.focusedElem,s=i.selectionRange;if(a!==l&&l&&l.ownerDocument&&z0(l.ownerDocument.documentElement,l)){if(s!==null&&Up(l)){var u=s.start,f=s.end;if(f===void 0&&(f=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(f,l.value.length);else{var c=l.ownerDocument||document,d=c&&c.defaultView||window;if(d.getSelection){var h=d.getSelection(),y=l.textContent.length,b=Math.min(s.start,y),E=s.end===void 0?b:Math.min(s.end,y);!h.extend&&b>E&&(a=E,E=b,b=a);var g=ry(l,b),p=ry(l,E);if(g&&p&&(h.rangeCount!==1||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==p.node||h.focusOffset!==p.offset)){var v=c.createRange();v.setStart(g.node,g.offset),h.removeAllRanges(),b>E?(h.addRange(v),h.extend(p.node,p.offset)):(v.setEnd(p.node,p.offset),h.addRange(v))}}}}for(c=[],h=l;h=h.parentNode;)h.nodeType===1&&c.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<c.length;l++){var S=c[l];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}ec=!!kh,Nh=kh=null}finally{Ue=o,Be.p=r,ve.T=n}}e.current=t,Et=2}}function EE(){if(Et===2){Et=0;var e=go,t=ca,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ve.T,ve.T=null;var r=Be.p;Be.p=2;var o=Ue;Ue|=4;try{WS(e,t.alternate,t)}finally{Ue=o,Be.p=r,ve.T=n}}Et=3}}function CE(){if(Et===4||Et===3){Et=0,y1();var e=go,t=ca,n=Nr,r=fE;t.subtreeFlags&10256||t.flags&10256?Et=5:(Et=0,ca=go=null,RE(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(mo=null),kp(n),t=t.stateNode,yn&&typeof yn.onCommitFiberRoot=="function")try{yn.onCommitFiberRoot(Ql,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=ve.T,o=Be.p,Be.p=2,ve.T=null;try{for(var i=e.onRecoverableError,a=0;a<r.length;a++){var l=r[a];i(l.value,{componentStack:l.stack})}}finally{ve.T=t,Be.p=o}}Nr&3&&Fc(),sr(e),o=e.pendingLanes,n&261930&&o&42?e===Ah?yl++:(yl=0,Ah=e):yl=0,os(0)}}function RE(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ts(t)))}function Fc(){return SE(),EE(),CE(),wE()}function wE(){if(Et!==5)return!1;var e=go,t=xh;xh=0;var n=kp(Nr),r=ve.T,o=Be.p;try{Be.p=32>n?32:n,ve.T=null,n=Th,Th=null;var i=go,a=Nr;if(Et=0,ca=go=null,Nr=0,Ue&6)throw Error(H(331));var l=Ue;if(Ue|=4,sE(i.current),iE(i,i.current,a,n),Ue=l,os(0,!1),yn&&typeof yn.onPostCommitFiberRoot=="function")try{yn.onPostCommitFiberRoot(Ql,i)}catch{}return!0}finally{Be.p=o,ve.T=r,RE(e,t)}}function Iy(e,t,n){t=Mn(n,t),t=Eh(e.stateNode,t,2),e=po(e,t,2),e!==null&&(Wl(e,2),sr(e))}function $e(e,t,n){if(e.tag===3)Iy(e,e,n);else for(;t!==null;){if(t.tag===3){Iy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(mo===null||!mo.has(r))){e=Mn(n,e),n=BS(2),r=po(t,n,2),r!==null&&(HS(n,r,t,e),Wl(r,2),sr(r));break}}t=t.return}}function id(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jx;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(dm=!0,o.add(n),e=Xx.bind(null,e,t,n),t.then(e,e))}function Xx(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fe===e&&(ke&n)===n&&(it===4||it===3&&(ke&62914560)===ke&&300>gn()-$c?!(Ue&2)&&fa(e,0):hm|=n,ua===ke&&(ua=0)),sr(e)}function _E(e,t){t===0&&(t=g0()),e=gi(e,t),e!==null&&(Wl(e,t),sr(e))}function Kx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_E(e,n)}function Qx(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(H(314))}r!==null&&r.delete(t),_E(e,n)}function Zx(e,t){return Op(e,t)}var Yu=null,Mi=null,Oh=!1,Xu=!1,ad=!1,so=0;function sr(e){e!==Mi&&e.next===null&&(Mi===null?Yu=Mi=e:Mi=Mi.next=e),Xu=!0,Oh||(Oh=!0,Jx())}function os(e,t){if(!ad&&Xu){ad=!0;do for(var n=!1,r=Yu;r!==null;){if(e!==0){var o=r.pendingLanes;if(o===0)var i=0;else{var a=r.suspendedLanes,l=r.pingedLanes;i=(1<<31-vn(42|e)+1)-1,i&=o&~(a&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,zy(r,i))}else i=ke,i=kc(r,r===Fe?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||Zl(r,i)||(n=!0,zy(r,i));r=r.next}while(n);ad=!1}}function Wx(){xE()}function xE(){Xu=Oh=!1;var e=0;so!==0&&uT()&&(e=so);for(var t=gn(),n=null,r=Yu;r!==null;){var o=r.next,i=TE(r,t);i===0?(r.next=null,n===null?Yu=o:n.next=o,o===null&&(Mi=n)):(n=r,(e!==0||i&3)&&(Xu=!0)),r=o}Et!==0&&Et!==5||os(e),so!==0&&(so=0)}function TE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var a=31-vn(i),l=1<<a,s=o[a];s===-1?(!(l&n)||l&r)&&(o[a]=_1(l,t)):s<=t&&(e.expiredLanes|=l),i&=~l}if(t=Fe,n=ke,n=kc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Df(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Zl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Df(r),kp(n)){case 2:case 8:n=p0;break;case 32:n=Mu;break;case 268435456:n=m0;break;default:n=Mu}return r=AE.bind(null,e),n=Op(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Df(r),e.callbackPriority=2,e.callbackNode=null,2}function AE(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Fc()&&e.callbackNode!==n)return null;var r=ke;return r=kc(e,e===Fe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hE(e,r,t),TE(e,gn()),e.callbackNode!=null&&e.callbackNode===n?AE.bind(null,e):null)}function zy(e,t){if(Fc())return null;hE(e,t,!0)}function Jx(){fT(function(){Ue&6?Op(h0,Wx):xE()})}function mm(){if(so===0){var e=aa;e===0&&(e=ws,ws<<=1,!(ws&261888)&&(ws=256)),so=e}return so}function Uy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:nu(""+e)}function By(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function eT(e,t,n,r,o){if(t==="submit"&&n&&n.stateNode===o){var i=Uy((o[rn]||null).action),a=r.submitter;a&&(t=(t=a[rn]||null)?Uy(t.formAction):a.getAttribute("formAction"),t!==null&&(i=t,a=null));var l=new Nc("action","action",null,r,o);e.push({event:l,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(so!==0){var s=a?By(o,a):new FormData(o);bh(n,{pending:!0,data:s,method:o.method,action:i},null,s)}}else typeof i=="function"&&(l.preventDefault(),s=a?By(o,a):new FormData(o),bh(n,{pending:!0,data:s,method:o.method,action:i},i,s))},currentTarget:o}]})}}for(var ld=0;ld<lh.length;ld++){var sd=lh[ld],tT=sd.toLowerCase(),nT=sd[0].toUpperCase()+sd.slice(1);Qn(tT,"on"+nT)}Qn(H0,"onAnimationEnd");Qn(G0,"onAnimationIteration");Qn($0,"onAnimationStart");Qn("dblclick","onDoubleClick");Qn("focusin","onFocus");Qn("focusout","onBlur");Qn(vx,"onTransitionRun");Qn(bx,"onTransitionStart");Qn(Sx,"onTransitionCancel");Qn(j0,"onTransitionEnd");oa("onMouseEnter",["mouseout","mouseover"]);oa("onMouseLeave",["mouseout","mouseover"]);oa("onPointerEnter",["pointerout","pointerover"]);oa("onPointerLeave",["pointerout","pointerover"]);hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hi("onBeforeInput",["compositionend","keypress","textInput","paste"]);hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),rT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function OE(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==i&&o.isPropagationStopped())break e;i=l,o.currentTarget=u;try{i(o)}catch(f){Nu(f)}o.currentTarget=null,i=s}else for(a=0;a<r.length;a++){if(l=r[a],s=l.instance,u=l.currentTarget,l=l.listener,s!==i&&o.isPropagationStopped())break e;i=l,o.currentTarget=u;try{i(o)}catch(f){Nu(f)}o.currentTarget=null,i=s}}}}function Oe(e,t){var n=t[Jd];n===void 0&&(n=t[Jd]=new Set);var r=e+"__bubble";n.has(r)||(ME(t,e,2,!1),n.add(r))}function ud(e,t,n){var r=0;t&&(r|=4),ME(n,e,r,t)}var Ds="_reactListening"+Math.random().toString(36).slice(2);function gm(e){if(!e[Ds]){e[Ds]=!0,E0.forEach(function(n){n!=="selectionchange"&&(rT.has(n)||ud(n,!1,e),ud(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ds]||(t[Ds]=!0,ud("selectionchange",!1,t))}}function ME(e,t,n,r){switch(jE(t)){case 2:var o=kT;break;case 8:o=NT;break;default:o=Sm}n=o.bind(null,t,n,e),o=void 0,!oh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function cd(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===o)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&a.stateNode.containerInfo===o)return;a=a.return}for(;l!==null;){if(a=Pi(l),a===null)return;if(s=a.tag,s===5||s===6||s===26||s===27){r=i=a;continue e}l=l.parentNode}}r=r.return}O0(function(){var u=i,f=Dp(n),c=[];e:{var d=V0.get(e);if(d!==void 0){var h=Nc,y=e;switch(e){case"keypress":if(ou(n)===0)break e;case"keydown":case"keyup":h=Q1;break;case"focusin":y="focus",h=Bf;break;case"focusout":y="blur",h=Bf;break;case"beforeblur":case"afterblur":h=Bf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Yg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=U1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=J1;break;case H0:case G0:case $0:h=G1;break;case j0:h=tx;break;case"scroll":case"scrollend":h=I1;break;case"wheel":h=rx;break;case"copy":case"cut":case"paste":h=j1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Kg;break;case"toggle":case"beforetoggle":h=ix}var b=(t&4)!==0,E=!b&&(e==="scroll"||e==="scrollend"),g=b?d!==null?d+"Capture":null:d;b=[];for(var p=u,v;p!==null;){var S=p;if(v=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||v===null||g===null||(S=xl(p,g),S!=null&&b.push(Pl(p,S,v))),E)break;p=p.return}0<b.length&&(d=new h(d,y,null,n,f),c.push({event:d,listeners:b}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==rh&&(y=n.relatedTarget||n.fromElement)&&(Pi(y)||y[Ca]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?Pi(y):null,y!==null&&(E=Kl(y),b=y.tag,y!==E||b!==5&&b!==27&&b!==6)&&(y=null)):(h=null,y=u),h!==y)){if(b=Yg,S="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(b=Kg,S="onPointerLeave",g="onPointerEnter",p="pointer"),E=h==null?d:el(h),v=y==null?d:el(y),d=new b(S,p+"leave",h,n,f),d.target=E,d.relatedTarget=v,S=null,Pi(f)===u&&(b=new b(g,p+"enter",y,n,f),b.target=v,b.relatedTarget=E,S=b),E=S,h&&y)t:{for(b=oT,g=h,p=y,v=0,S=g;S;S=b(S))v++;S=0;for(var C=p;C;C=b(C))S++;for(;0<v-S;)g=b(g),v--;for(;0<S-v;)p=b(p),S--;for(;v--;){if(g===p||p!==null&&g===p.alternate){b=g;break t}g=b(g),p=b(p)}b=null}else b=null;h!==null&&Hy(c,d,h,b,!1),y!==null&&E!==null&&Hy(c,E,y,b,!0)}}e:{if(d=u?el(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var w=Jg;else if(Wg(d))if(P0)w=mx;else{w=hx;var R=dx}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&Lp(u.elementType)&&(w=Jg):w=px;if(w&&(w=w(e,u))){D0(c,w,n,f);break e}R&&R(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&nh(d,"number",d.value)}switch(R=u?el(u):window,e){case"focusin":(Wg(R)||R.contentEditable==="true")&&(Ui=R,ih=u,sl=null);break;case"focusout":sl=ih=Ui=null;break;case"mousedown":ah=!0;break;case"contextmenu":case"mouseup":case"dragend":ah=!1,oy(c,n,f);break;case"selectionchange":if(yx)break;case"keydown":case"keyup":oy(c,n,f)}var x;if(zp)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else zi?N0(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(k0&&n.locale!=="ko"&&(zi||O!=="onCompositionStart"?O==="onCompositionEnd"&&zi&&(x=M0()):(io=f,Pp="value"in io?io.value:io.textContent,zi=!0)),R=Ku(u,O),0<R.length&&(O=new Xg(O,e,null,n,f),c.push({event:O,listeners:R}),x?O.data=x:(x=L0(n),x!==null&&(O.data=x)))),(x=lx?sx(e,n):ux(e,n))&&(O=Ku(u,"onBeforeInput"),0<O.length&&(R=new Xg("onBeforeInput","beforeinput",null,n,f),c.push({event:R,listeners:O}),R.data=x)),eT(c,e,u,n,f)}OE(c,t)})}function Pl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ku(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||i===null||(o=xl(e,n),o!=null&&r.unshift(Pl(e,o,i)),o=xl(e,t),o!=null&&r.push(Pl(e,o,i))),e.tag===3)return r;e=e.return}return[]}function oT(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hy(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(l=l.tag,s!==null&&s===r)break;l!==5&&l!==26&&l!==27||u===null||(s=u,o?(u=xl(n,i),u!=null&&a.unshift(Pl(n,u,s))):o||(u=xl(n,i),u!=null&&a.push(Pl(n,u,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var iT=/\r\n?/g,aT=/\u0000|\uFFFD/g;function Gy(e){return(typeof e=="string"?e:""+e).replace(iT,`
|
|
50
|
-
`).replace(aT,"")}function kE(e,t){return t=Gy(t),Gy(e)===t}function je(e,t,n,r,o,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||ia(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&ia(e,""+r);break;case"className":Ts(e,"class",r);break;case"tabIndex":Ts(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Ts(e,n,r);break;case"style":A0(e,r,i);break;case"data":if(t!=="object"){Ts(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=nu(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&je(e,t,"name",o.name,o,null),je(e,t,"formEncType",o.formEncType,o,null),je(e,t,"formMethod",o.formMethod,o,null),je(e,t,"formTarget",o.formTarget,o,null)):(je(e,t,"encType",o.encType,o,null),je(e,t,"method",o.method,o,null),je(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=nu(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=Tr);break;case"onScroll":r!=null&&Oe("scroll",e);break;case"onScrollEnd":r!=null&&Oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(H(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error(H(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=nu(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),tu(e,"popover",r);break;case"xlinkActuate":mr(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":mr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":mr(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":mr(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":mr(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":mr(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":mr(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":mr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":mr(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":tu(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=D1.get(n)||n,tu(e,n,r))}}function Mh(e,t,n,r,o,i){switch(n){case"style":A0(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(H(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error(H(60));e.innerHTML=n}}break;case"children":typeof r=="string"?ia(e,r):(typeof r=="number"||typeof r=="bigint")&&ia(e,""+r);break;case"onScroll":r!=null&&Oe("scroll",e);break;case"onScrollEnd":r!=null&&Oe("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Tr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!C0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),i=e[rn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,o),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,o);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):tu(e,n,r)}}}function It(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var r=!1,o=!1,i;for(i in n)if(n.hasOwnProperty(i)){var a=n[i];if(a!=null)switch(i){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(H(137,t));default:je(e,t,i,a,n,null)}}o&&je(e,t,"srcSet",n.srcSet,n,null),r&&je(e,t,"src",n.src,n,null);return;case"input":Oe("invalid",e);var l=i=a=o=null,s=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":o=f;break;case"type":a=f;break;case"checked":s=f;break;case"defaultChecked":u=f;break;case"value":i=f;break;case"defaultValue":l=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(H(137,t));break;default:je(e,t,r,f,n,null)}}_0(e,i,l,s,u,a,o,!1);return;case"select":Oe("invalid",e),r=a=i=null;for(o in n)if(n.hasOwnProperty(o)&&(l=n[o],l!=null))switch(o){case"value":i=l;break;case"defaultValue":a=l;break;case"multiple":r=l;default:je(e,t,o,l,n,null)}t=i,n=a,e.multiple=!!r,t!=null?Yi(e,!!r,t,!1):n!=null&&Yi(e,!!r,n,!0);return;case"textarea":Oe("invalid",e),i=o=r=null;for(a in n)if(n.hasOwnProperty(a)&&(l=n[a],l!=null))switch(a){case"value":r=l;break;case"defaultValue":o=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(H(91));break;default:je(e,t,a,l,n,null)}T0(e,r,o,i);return;case"option":for(s in n)if(n.hasOwnProperty(s)&&(r=n[s],r!=null))switch(s){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:je(e,t,s,r,n,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(r=0;r<Dl.length;r++)Oe(Dl[r],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(H(137,t));default:je(e,t,u,r,n,null)}return;default:if(Lp(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&Mh(e,t,f,r,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(r=n[l],r!=null&&je(e,t,l,r,n,null))}function lT(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,i=null,a=null,l=null,s=null,u=null,f=null;for(h in n){var c=n[h];if(n.hasOwnProperty(h)&&c!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=c;default:r.hasOwnProperty(h)||je(e,t,h,null,r,c)}}for(var d in r){var h=r[d];if(c=n[d],r.hasOwnProperty(d)&&(h!=null||c!=null))switch(d){case"type":i=h;break;case"name":o=h;break;case"checked":u=h;break;case"defaultChecked":f=h;break;case"value":a=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(H(137,t));break;default:h!==c&&je(e,t,d,h,r,c)}}th(e,a,l,s,u,f,i,o);return;case"select":h=a=l=d=null;for(i in n)if(s=n[i],n.hasOwnProperty(i)&&s!=null)switch(i){case"value":break;case"multiple":h=s;default:r.hasOwnProperty(i)||je(e,t,i,null,r,s)}for(o in r)if(i=r[o],s=n[o],r.hasOwnProperty(o)&&(i!=null||s!=null))switch(o){case"value":d=i;break;case"defaultValue":l=i;break;case"multiple":a=i;default:i!==s&&je(e,t,o,i,r,s)}t=l,n=a,r=h,d!=null?Yi(e,!!n,d,!1):!!r!=!!n&&(t!=null?Yi(e,!!n,t,!0):Yi(e,!!n,n?[]:"",!1));return;case"textarea":h=d=null;for(l in n)if(o=n[l],n.hasOwnProperty(l)&&o!=null&&!r.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:je(e,t,l,null,r,o)}for(a in r)if(o=r[a],i=n[a],r.hasOwnProperty(a)&&(o!=null||i!=null))switch(a){case"value":d=o;break;case"defaultValue":h=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(H(91));break;default:o!==i&&je(e,t,a,o,r,i)}x0(e,d,h);return;case"option":for(var y in n)if(d=n[y],n.hasOwnProperty(y)&&d!=null&&!r.hasOwnProperty(y))switch(y){case"selected":e.selected=!1;break;default:je(e,t,y,null,r,d)}for(s in r)if(d=r[s],h=n[s],r.hasOwnProperty(s)&&d!==h&&(d!=null||h!=null))switch(s){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:je(e,t,s,d,r,h)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)d=n[b],n.hasOwnProperty(b)&&d!=null&&!r.hasOwnProperty(b)&&je(e,t,b,null,r,d);for(u in r)if(d=r[u],h=n[u],r.hasOwnProperty(u)&&d!==h&&(d!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(H(137,t));break;default:je(e,t,u,d,r,h)}return;default:if(Lp(t)){for(var E in n)d=n[E],n.hasOwnProperty(E)&&d!==void 0&&!r.hasOwnProperty(E)&&Mh(e,t,E,void 0,r,d);for(f in r)d=r[f],h=n[f],!r.hasOwnProperty(f)||d===h||d===void 0&&h===void 0||Mh(e,t,f,d,r,h);return}}for(var g in n)d=n[g],n.hasOwnProperty(g)&&d!=null&&!r.hasOwnProperty(g)&&je(e,t,g,null,r,d);for(c in r)d=r[c],h=n[c],!r.hasOwnProperty(c)||d===h||d==null&&h==null||je(e,t,c,d,r,h)}function $y(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sT(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var o=n[r],i=o.transferSize,a=o.initiatorType,l=o.duration;if(i&&l&&$y(a)){for(a=0,l=o.responseEnd,r+=1;r<n.length;r++){var s=n[r],u=s.startTime;if(u>l)break;var f=s.transferSize,c=s.initiatorType;f&&$y(c)&&(s=s.responseEnd,a+=f*(s<l?1:(l-u)/(s-u)))}if(--r,t+=8*(i+a)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var kh=null,Nh=null;function Qu(e){return e.nodeType===9?e:e.ownerDocument}function jy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function NE(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Lh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fd=null;function uT(){var e=window.event;return e&&e.type==="popstate"?e===fd?!1:(fd=e,!0):(fd=null,!1)}var LE=typeof setTimeout=="function"?setTimeout:void 0,cT=typeof clearTimeout=="function"?clearTimeout:void 0,Vy=typeof Promise=="function"?Promise:void 0,fT=typeof queueMicrotask=="function"?queueMicrotask:typeof Vy<"u"?function(e){return Vy.resolve(null).then(e).catch(dT)}:LE;function dT(e){setTimeout(function(){throw e})}function Mo(e){return e==="head"}function Fy(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(o),ha(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")vl(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,vl(n);for(var i=n.firstChild;i;){var a=i.nextSibling,l=i.nodeName;i[Jl]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=a}}else n==="body"&&vl(e.ownerDocument.body);n=o}while(n);ha(t)}function qy(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function Dh(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Dh(n),Np(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function hT(e,t,n,r){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Jl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=In(e.nextSibling),e===null)break}return null}function pT(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=In(e.nextSibling),e===null))return null;return e}function DE(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=In(e.nextSibling),e===null))return null;return e}function Ph(e){return e.data==="$?"||e.data==="$~"}function Ih(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function mT(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function In(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var zh=null;function Yy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return In(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Xy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function PE(e,t,n){switch(t=Qu(n),e){case"html":if(e=t.documentElement,!e)throw Error(H(452));return e;case"head":if(e=t.head,!e)throw Error(H(453));return e;case"body":if(e=t.body,!e)throw Error(H(454));return e;default:throw Error(H(451))}}function vl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Np(e)}var zn=new Map,Ky=new Set;function Zu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Gr=Be.d;Be.d={f:gT,r:yT,D:vT,C:bT,L:ST,m:ET,X:RT,S:CT,M:wT};function gT(){var e=Gr.f(),t=jc();return e||t}function yT(e){var t=Ra(e);t!==null&&t.tag===5&&t.type==="form"?AS(t):Gr.r(e)}var Ta=typeof document>"u"?null:document;function IE(e,t,n){var r=Ta;if(r&&typeof t=="string"&&t){var o=On(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),Ky.has(o)||(Ky.add(o),e={rel:e,crossOrigin:n,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),It(t,"link",e),Tt(t),r.head.appendChild(t)))}}function vT(e){Gr.D(e),IE("dns-prefetch",e,null)}function bT(e,t){Gr.C(e,t),IE("preconnect",e,t)}function ST(e,t,n){Gr.L(e,t,n);var r=Ta;if(r&&e&&t){var o='link[rel="preload"][as="'+On(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+On(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+On(n.imageSizes)+'"]')):o+='[href="'+On(e)+'"]';var i=o;switch(t){case"style":i=da(e);break;case"script":i=Aa(e)}zn.has(i)||(e=We({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zn.set(i,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(is(i))||t==="script"&&r.querySelector(as(i))||(t=r.createElement("link"),It(t,"link",e),Tt(t),r.head.appendChild(t)))}}function ET(e,t){Gr.m(e,t);var n=Ta;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+On(r)+'"][href="'+On(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Aa(e)}if(!zn.has(i)&&(e=We({rel:"modulepreload",href:e},t),zn.set(i,e),n.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(as(i)))return}r=n.createElement("link"),It(r,"link",e),Tt(r),n.head.appendChild(r)}}}function CT(e,t,n){Gr.S(e,t,n);var r=Ta;if(r&&e){var o=qi(r).hoistableStyles,i=da(e);t=t||"default";var a=o.get(i);if(!a){var l={loading:0,preload:null};if(a=r.querySelector(is(i)))l.loading=5;else{e=We({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zn.get(i))&&ym(e,n);var s=a=r.createElement("link");Tt(s),It(s,"link",e),s._p=new Promise(function(u,f){s.onload=u,s.onerror=f}),s.addEventListener("load",function(){l.loading|=1}),s.addEventListener("error",function(){l.loading|=2}),l.loading|=4,du(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:l},o.set(i,a)}}}function RT(e,t){Gr.X(e,t);var n=Ta;if(n&&e){var r=qi(n).hoistableScripts,o=Aa(e),i=r.get(o);i||(i=n.querySelector(as(o)),i||(e=We({src:e,async:!0},t),(t=zn.get(o))&&vm(e,t),i=n.createElement("script"),Tt(i),It(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function wT(e,t){Gr.M(e,t);var n=Ta;if(n&&e){var r=qi(n).hoistableScripts,o=Aa(e),i=r.get(o);i||(i=n.querySelector(as(o)),i||(e=We({src:e,async:!0,type:"module"},t),(t=zn.get(o))&&vm(e,t),i=n.createElement("script"),Tt(i),It(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function Qy(e,t,n,r){var o=(o=co.current)?Zu(o):null;if(!o)throw Error(H(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=da(n.href),n=qi(o).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=da(n.href);var i=qi(o).hoistableStyles,a=i.get(e);if(a||(o=o.ownerDocument||o,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,a),(i=o.querySelector(is(e)))&&!i._p&&(a.instance=i,a.state.loading=5),zn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},zn.set(e,n),i||_T(o,e,n,a.state))),t&&r===null)throw Error(H(528,""));return a}if(t&&r!==null)throw Error(H(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Aa(n),n=qi(o).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(H(444,e))}}function da(e){return'href="'+On(e)+'"'}function is(e){return'link[rel="stylesheet"]['+e+"]"}function zE(e){return We({},e,{"data-precedence":e.precedence,precedence:null})}function _T(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),It(t,"link",n),Tt(t),e.head.appendChild(t))}function Aa(e){return'[src="'+On(e)+'"]'}function as(e){return"script[async]"+e}function Zy(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+On(n.href)+'"]');if(r)return t.instance=r,Tt(r),r;var o=We({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Tt(r),It(r,"style",o),du(r,n.precedence,e),t.instance=r;case"stylesheet":o=da(n.href);var i=e.querySelector(is(o));if(i)return t.state.loading|=4,t.instance=i,Tt(i),i;r=zE(n),(o=zn.get(o))&&ym(r,o),i=(e.ownerDocument||e).createElement("link"),Tt(i);var a=i;return a._p=new Promise(function(l,s){a.onload=l,a.onerror=s}),It(i,"link",r),t.state.loading|=4,du(i,n.precedence,e),t.instance=i;case"script":return i=Aa(n.src),(o=e.querySelector(as(i)))?(t.instance=o,Tt(o),o):(r=n,(o=zn.get(i))&&(r=We({},n),vm(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),Tt(o),It(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(H(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,du(r,n.precedence,e));return t.instance}function du(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var l=r[a];if(l.dataset.precedence===t)i=l;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ym(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hu=null;function Wy(e,t,n){if(hu===null){var r=new Map,o=hu=new Map;o.set(n,r)}else o=hu,r=o.get(n),r||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[Jl]||i[Lt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var a=i.getAttribute(t)||"";a=e+a;var l=r.get(a);l?l.push(i):r.set(a,[i])}}return r}function Jy(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function xT(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function UE(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function TT(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var o=da(r.href),i=t.querySelector(is(o));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Wu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Tt(i);return}i=t.ownerDocument||t,r=zE(r),(o=zn.get(o))&&ym(r,o),i=i.createElement("link"),Tt(i);var a=i;a._p=new Promise(function(l,s){a.onload=l,a.onerror=s}),It(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Wu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var dd=0;function AT(e,t){return e.stylesheets&&e.count===0&&pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&dd===0&&(dd=62500*sT());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>dd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function Wu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ju=null;function pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ju=new Map,t.forEach(OT,e),Ju=null,Wu.call(e))}function OT(e,t){if(!(t.state.loading&4)){var n=Ju.get(e);if(n)var r=n.get(null);else{n=new Map,Ju.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}o=t.instance,a=o.getAttribute("data-precedence"),i=n.get(a)||r,i===r&&n.set(null,o),n.set(a,o),this.count++,r=Wu.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Il={$$typeof:xr,Provider:null,Consumer:null,_currentValue:Qo,_currentValue2:Qo,_threadCount:0};function MT(e,t,n,r,o,i,a,l,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pf(0),this.hiddenUpdates=Pf(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function BE(e,t,n,r,o,i,a,l,s,u,f,c){return e=new MT(e,t,n,a,s,u,f,c,l),t=1,i===!0&&(t|=24),i=pn(3,null,null,t),e.current=i,i.stateNode=e,t=Vp(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},Yp(i),e}function HE(e){return e?(e=Gi,e):Gi}function GE(e,t,n,r,o,i){o=HE(o),r.context===null?r.context=o:r.pendingContext=o,r=ho(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=po(e,r,t),n!==null&&(tn(n,e,t),cl(n,e,t))}function ev(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bm(e,t){ev(e,t),(e=e.alternate)&&ev(e,t)}function $E(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&tn(t,e,67108864),bm(e,67108864)}}function tv(e){if(e.tag===13||e.tag===31){var t=bn();t=Mp(t);var n=gi(e,t);n!==null&&tn(n,e,t),bm(e,t)}}var ec=!0;function kT(e,t,n,r){var o=ve.T;ve.T=null;var i=Be.p;try{Be.p=2,Sm(e,t,n,r)}finally{Be.p=i,ve.T=o}}function NT(e,t,n,r){var o=ve.T;ve.T=null;var i=Be.p;try{Be.p=8,Sm(e,t,n,r)}finally{Be.p=i,ve.T=o}}function Sm(e,t,n,r){if(ec){var o=Uh(r);if(o===null)cd(e,t,r,tc,n),nv(e,r);else if(DT(o,e,t,n,r))r.stopPropagation();else if(nv(e,r),t&4&&-1<LT.indexOf(e)){for(;o!==null;){var i=Ra(o);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var a=Go(i.pendingLanes);if(a!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var s=1<<31-vn(a);l.entanglements[1]|=s,a&=~s}sr(i),!(Ue&6)&&(Vu=gn()+500,os(0))}}break;case 31:case 13:l=gi(i,2),l!==null&&tn(l,i,2),jc(),bm(i,2)}if(i=Uh(r),i===null&&cd(e,t,r,tc,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else cd(e,t,r,null,n)}}function Uh(e){return e=Dp(e),Em(e)}var tc=null;function Em(e){if(tc=null,e=Pi(e),e!==null){var t=Kl(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s0(t),e!==null)return e;e=null}else if(n===31){if(e=u0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return tc=e,null}function jE(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(v1()){case h0:return 2;case p0:return 8;case Mu:case b1:return 32;case m0:return 268435456;default:return 32}default:return 32}}var Bh=!1,yo=null,vo=null,bo=null,zl=new Map,Ul=new Map,to=[],LT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function nv(e,t){switch(e){case"focusin":case"focusout":yo=null;break;case"dragenter":case"dragleave":vo=null;break;case"mouseover":case"mouseout":bo=null;break;case"pointerover":case"pointerout":zl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ul.delete(t.pointerId)}}function qa(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Ra(t),t!==null&&$E(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function DT(e,t,n,r,o){switch(t){case"focusin":return yo=qa(yo,e,t,n,r,o),!0;case"dragenter":return vo=qa(vo,e,t,n,r,o),!0;case"mouseover":return bo=qa(bo,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return zl.set(i,qa(zl.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ul.set(i,qa(Ul.get(i)||null,e,t,n,r,o)),!0}return!1}function VE(e){var t=Pi(e.target);if(t!==null){var n=Kl(t);if(n!==null){if(t=n.tag,t===13){if(t=s0(n),t!==null){e.blockedOn=t,Hg(e.priority,function(){tv(n)});return}}else if(t===31){if(t=u0(n),t!==null){e.blockedOn=t,Hg(e.priority,function(){tv(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Uh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rh=r,n.target.dispatchEvent(r),rh=null}else return t=Ra(n),t!==null&&$E(t),e.blockedOn=n,!1;t.shift()}return!0}function rv(e,t,n){mu(e)&&n.delete(t)}function PT(){Bh=!1,yo!==null&&mu(yo)&&(yo=null),vo!==null&&mu(vo)&&(vo=null),bo!==null&&mu(bo)&&(bo=null),zl.forEach(rv),Ul.forEach(rv)}function Ps(e,t){e.blockedOn===t&&(e.blockedOn=null,Bh||(Bh=!0,Rt.unstable_scheduleCallback(Rt.unstable_NormalPriority,PT)))}var Is=null;function ov(e){Is!==e&&(Is=e,Rt.unstable_scheduleCallback(Rt.unstable_NormalPriority,function(){Is===e&&(Is=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(Em(r||n)===null)continue;break}var i=Ra(n);i!==null&&(e.splice(t,3),t-=3,bh(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function ha(e){function t(s){return Ps(s,e)}yo!==null&&Ps(yo,e),vo!==null&&Ps(vo,e),bo!==null&&Ps(bo,e),zl.forEach(t),Ul.forEach(t);for(var n=0;n<to.length;n++){var r=to[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<to.length&&(n=to[0],n.blockedOn===null);)VE(n),n.blockedOn===null&&to.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[rn]||null;if(typeof i=="function")a||ov(n);else if(a){var l=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[rn]||null)l=a.formAction;else if(Em(o)!==null)continue}else l=a.action;typeof l=="function"?n[r+1]=l:(n.splice(r,3),r-=3),ov(n)}}}function FE(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(a){return o=a})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Cm(e){this._internalRoot=e}qc.prototype.render=Cm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));var n=t.current,r=bn();GE(n,r,e,t,null,null)};qc.prototype.unmount=Cm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;GE(e.current,2,null,e,null,null),jc(),t[Ca]=null}};function qc(e){this._internalRoot=e}qc.prototype.unstable_scheduleHydration=function(e){if(e){var t=S0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<to.length&&t!==0&&t<to[n].priority;n++);to.splice(n,0,e),n===0&&VE(e)}};var iv=a0.version;if(iv!=="19.2.5")throw Error(H(527,iv,"19.2.5"));Be.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=f1(t),e=e!==null?c0(e):null,e=e===null?null:e.stateNode,e};var IT={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:ve,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zs.isDisabled&&zs.supportsFiber)try{Ql=zs.inject(IT),yn=zs}catch{}}Oc.createRoot=function(e,t){if(!l0(e))throw Error(H(299));var n=!1,r="",o=IS,i=zS,a=US;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=BE(e,1,!1,null,null,n,r,null,o,i,a,FE),e[Ca]=t.current,gm(e),new Cm(t)};Oc.hydrateRoot=function(e,t,n){if(!l0(e))throw Error(H(299));var r=!1,o="",i=IS,a=zS,l=US,s=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=BE(e,1,!0,t,n??null,r,o,s,i,a,l,FE),t.context=HE(null),n=t.current,r=bn(),r=Mp(r),o=ho(r),o.callback=null,po(n,o,r),n=r,t.current.lanes=n,Wl(t,n),sr(t),e[Ca]=t.current,gm(e),new qc(t)};Oc.version="19.2.5";function qE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qE)}catch(e){console.error(e)}}qE(),e0.exports=Oc;var M3=e0.exports;/**
|
|
51
|
-
* react-router v7.14.2
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Remix Software Inc.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/var av="popstate";function lv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function zT(e={}){function t(o,i){let{pathname:a="/",search:l="",hash:s=""}=vi(o.location.hash.substring(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),Hh("",{pathname:a,search:l,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(o,i){let a=o.document.querySelector("base"),l="";if(a&&a.getAttribute("href")){let s=o.location.href,u=s.indexOf("#");l=u===-1?s:s.slice(0,u)}return l+"#"+(typeof i=="string"?i:Bl(i))}function r(o,i){Xn(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(i)})`)}return BT(t,n,r,e)}function nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function UT(){return Math.random().toString(36).substring(2,10)}function sv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Hh(e,t,n=null,r,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?vi(t):t,state:n,key:t&&t.key||r||UT(),unstable_mask:o}}function Bl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function vi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function BT(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l="POP",s=null,u=f();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function f(){return(a.state||{idx:null}).idx}function c(){l="POP";let E=f(),g=E==null?null:E-u;u=E,s&&s({action:l,location:b.location,delta:g})}function d(E,g){l="PUSH";let p=lv(E)?E:Hh(b.location,E,g);n&&n(p,E),u=f()+1;let v=sv(p,u),S=b.createHref(p.unstable_mask||p);try{a.pushState(v,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(S)}i&&s&&s({action:l,location:b.location,delta:1})}function h(E,g){l="REPLACE";let p=lv(E)?E:Hh(b.location,E,g);n&&n(p,E),u=f();let v=sv(p,u),S=b.createHref(p.unstable_mask||p);a.replaceState(v,"",S),i&&s&&s({action:l,location:b.location,delta:0})}function y(E){return HT(E)}let b={get action(){return l},get location(){return e(o,a)},listen(E){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(av,c),s=E,()=>{o.removeEventListener(av,c),s=null}},createHref(E){return t(o,E)},createURL:y,encodeLocation(E){let g=y(E);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:h,go(E){return a.go(E)}};return b}function HT(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),nt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Bl(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function YE(e,t,n="/"){return GT(e,t,n,!1)}function GT(e,t,n,r){let o=typeof t=="string"?vi(t):t,i=Ur(o.pathname||"/",n);if(i==null)return null;let a=XE(e);$T(a);let l=null;for(let s=0;l==null&&s<a.length;++s){let u=JT(i);l=ZT(a[s],u,r)}return l}function XE(e,t=[],n=[],r="",o=!1){let i=(a,l,s=o,u)=>{let f={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:l,route:a};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&s)return;nt(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let c=Vn([r,f.relativePath]),d=n.concat(f);a.children&&a.children.length>0&&(nt(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),XE(a.children,t,d,c,s)),!(a.path==null&&!a.index)&&t.push({path:c,score:KT(c,a.index),routesMeta:d})};return e.forEach((a,l)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,l);else for(let u of KE(a.path))i(a,l,!0,u)}),t}function KE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=KE(r.join("/")),l=[];return l.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function $T(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:QT(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var jT=/^:[\w-]+$/,VT=3,FT=2,qT=1,YT=10,XT=-2,uv=e=>e==="*";function KT(e,t){let n=e.split("/"),r=n.length;return n.some(uv)&&(r+=XT),t&&(r+=FT),n.filter(o=>!uv(o)).reduce((o,i)=>o+(jT.test(i)?VT:i===""?qT:YT),r)}function QT(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function ZT(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l<r.length;++l){let s=r[l],u=l===r.length-1,f=i==="/"?t:t.slice(i.length)||"/",c=nc({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},f),d=s.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=nc({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},f)),!c)return null;Object.assign(o,c.params),a.push({params:o,pathname:Vn([i,c.pathname]),pathnameBase:rA(Vn([i,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(i=Vn([i,c.pathnameBase]))}return a}function nc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=WT(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,{paramName:f,isOptional:c},d)=>{if(f==="*"){let y=l[d]||"";a=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const h=l[d];return c&&!h?u[f]=void 0:u[f]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function WT(e,t=!1,n=!0){Xn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s,u,f)=>{if(r.push({paramName:l,isOptional:s!=null}),s){let c=f.charAt(u+a.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function JT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ur(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var eA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function tA(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?vi(e):e,i;return n?(n=ZE(n),n.startsWith("/")?i=cv(n.substring(1),"/"):i=cv(n,t)):i=t,{pathname:i,search:oA(r),hash:iA(o)}}function cv(e,t){let n=rc(t).split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function hd(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function nA(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function QE(e){let t=nA(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Rm(e,t,n,r=!1){let o;typeof e=="string"?o=vi(e):(o={...e},nt(!o.pathname||!o.pathname.includes("?"),hd("?","pathname","search",o)),nt(!o.pathname||!o.pathname.includes("#"),hd("#","pathname","hash",o)),nt(!o.search||!o.search.includes("#"),hd("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=n;else{let c=t.length-1;if(!r&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),c-=1;o.pathname=d.join("/")}l=c>=0?t[c]:"/"}let s=tA(o,l),u=a&&a!=="/"&&a.endsWith("/"),f=(i||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||f)&&(s.pathname+="/"),s}var ZE=e=>e.replace(/\/\/+/g,"/"),Vn=e=>ZE(e.join("/")),rc=e=>e.replace(/\/+$/,""),rA=e=>rc(e).replace(/^\/*/,"/"),oA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,aA=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function lA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function sA(e){let t=e.map(n=>n.route.path).filter(Boolean);return Vn(t)||"/"}var WE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function JE(e,t){let n=e;if(typeof n!="string"||!eA.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(WE)try{let i=new URL(window.location.href),a=n.startsWith("//")?new URL(i.protocol+n):new URL(n),l=Ur(a.pathname,t);a.origin===i.origin&&l!=null?n=l+a.search+a.hash:o=!0}catch{Xn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var eC=["POST","PUT","PATCH","DELETE"];new Set(eC);var uA=["GET",...eC];new Set(uA);var Oa=m.createContext(null);Oa.displayName="DataRouter";var Yc=m.createContext(null);Yc.displayName="DataRouterState";var tC=m.createContext(!1);function cA(){return m.useContext(tC)}var nC=m.createContext({isTransitioning:!1});nC.displayName="ViewTransition";var fA=m.createContext(new Map);fA.displayName="Fetchers";var dA=m.createContext(null);dA.displayName="Await";var Un=m.createContext(null);Un.displayName="Navigation";var ls=m.createContext(null);ls.displayName="Location";var ur=m.createContext({outlet:null,matches:[],isDataRoute:!1});ur.displayName="Route";var wm=m.createContext(null);wm.displayName="RouteError";var rC="REACT_ROUTER_ERROR",hA="REDIRECT",pA="ROUTE_ERROR_RESPONSE";function mA(e){if(e.startsWith(`${rC}:${hA}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function gA(e){if(e.startsWith(`${rC}:${pA}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new aA(t.status,t.statusText,t.data)}catch{}}function yA(e,{relative:t}={}){nt(ss(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=m.useContext(Un),{hash:o,pathname:i,search:a}=us(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:Vn([n,i])),r.createHref({pathname:l,search:a,hash:o})}function ss(){return m.useContext(ls)!=null}function $r(){return nt(ss(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(ls).location}var oC="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function iC(e){m.useContext(Un).static||m.useLayoutEffect(e)}function vA(){let{isDataRoute:e}=m.useContext(ur);return e?kA():bA()}function bA(){nt(ss(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(Oa),{basename:t,navigator:n}=m.useContext(Un),{matches:r}=m.useContext(ur),{pathname:o}=$r(),i=JSON.stringify(QE(r)),a=m.useRef(!1);return iC(()=>{a.current=!0}),m.useCallback((s,u={})=>{if(Xn(a.current,oC),!a.current)return;if(typeof s=="number"){n.go(s);return}let f=Rm(s,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Vn([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,o,e])}m.createContext(null);function k3(){let{matches:e}=m.useContext(ur),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function us(e,{relative:t}={}){let{matches:n}=m.useContext(ur),{pathname:r}=$r(),o=JSON.stringify(QE(n));return m.useMemo(()=>Rm(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function SA(e,t){return aC(e,t)}function aC(e,t,n){var E;nt(ss(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=m.useContext(Un),{matches:o}=m.useContext(ur),i=o[o.length-1],a=i?i.params:{},l=i?i.pathname:"/",s=i?i.pathnameBase:"/",u=i&&i.route;{let g=u&&u.path||"";sC(l,!u||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
|
-
|
|
61
|
-
Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let f=$r(),c;if(t){let g=typeof t=="string"?vi(t):t;nt(s==="/"||((E=g.pathname)==null?void 0:E.startsWith(s)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${g.pathname}" was given in the \`location\` prop.`),c=g}else c=f;let d=c.pathname||"/",h=d;if(s!=="/"){let g=s.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=YE(e,{pathname:h});Xn(u||y!=null,`No routes matched location "${c.pathname}${c.search}${c.hash}" `),Xn(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=_A(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:Vn([s,r.encodeLocation?r.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:Vn([s,r.encodeLocation?r.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),o,n);return t&&b?m.createElement(ls.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...c},navigationType:"POP"}},b):b}function EA(){let e=MA(),t=lA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:i},"ErrorBoundary")," or"," ",m.createElement("code",{style:i},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:o},n):null,a)}var CA=m.createElement(EA,null),lC=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=gA(e.digest);n&&(e=n)}let t=e!==void 0?m.createElement(ur.Provider,{value:this.props.routeContext},m.createElement(wm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?m.createElement(RA,{error:e},t):t}};lC.contextType=tC;var pd=new WeakMap;function RA({children:e,error:t}){let{basename:n}=m.useContext(Un);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=mA(t.digest);if(r){let o=pd.get(t);if(o)throw o;let i=JE(r.location,n);if(WE&&!pd.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw pd.set(t,a),a}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function wA({routeContext:e,match:t,children:n}){let r=m.useContext(Oa);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(ur.Provider,{value:e},n)}function _A(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let f=o.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id])!==void 0);nt(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,f+1))}let a=!1,l=-1;if(n&&r){a=r.renderFallback;for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(l=f),c.route.id){let{loaderData:d,errors:h}=r,y=c.route.loader&&!d.hasOwnProperty(c.route.id)&&(!h||h[c.route.id]===void 0);if(c.route.lazy||y){n.isStatic&&(a=!0),l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}}let s=n==null?void 0:n.onError,u=r&&s?(f,c)=>{var d,h;s(f,{location:r.location,params:((h=(d=r.matches)==null?void 0:d[0])==null?void 0:h.params)??{},unstable_pattern:sA(r.matches),errorInfo:c})}:void 0;return o.reduceRight((f,c,d)=>{let h,y=!1,b=null,E=null;r&&(h=i&&c.route.id?i[c.route.id]:void 0,b=c.route.errorElement||CA,a&&(l<0&&d===0?(sC("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,E=null):l===d&&(y=!0,E=c.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,d+1)),p=()=>{let v;return h?v=b:y?v=E:c.route.Component?v=m.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,m.createElement(wA,{match:c,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:v})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?m.createElement(lC,{location:r.location,revalidation:r.revalidation,component:b,error:h,children:p(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:u}):p()},null)}function _m(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xA(e){let t=m.useContext(Oa);return nt(t,_m(e)),t}function TA(e){let t=m.useContext(Yc);return nt(t,_m(e)),t}function AA(e){let t=m.useContext(ur);return nt(t,_m(e)),t}function xm(e){let t=AA(e),n=t.matches[t.matches.length-1];return nt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function OA(){return xm("useRouteId")}function MA(){var r;let e=m.useContext(wm),t=TA("useRouteError"),n=xm("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function kA(){let{router:e}=xA("useNavigate"),t=xm("useNavigate"),n=m.useRef(!1);return iC(()=>{n.current=!0}),m.useCallback(async(o,i={})=>{Xn(n.current,oC),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var fv={};function sC(e,t,n){!t&&!fv[e]&&(fv[e]=!0,Xn(!1,n))}m.memo(NA);function NA({routes:e,future:t,state:n,isStatic:r,onError:o}){return aC(e,void 0,{state:n,isStatic:r,onError:o})}function LA(e){nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function DA({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,unstable_useTransitions:a}){nt(!ss(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=m.useMemo(()=>({basename:l,navigator:o,static:i,unstable_useTransitions:a,future:{}}),[l,o,i,a]);typeof n=="string"&&(n=vi(n));let{pathname:u="/",search:f="",hash:c="",state:d=null,key:h="default",unstable_mask:y}=n,b=m.useMemo(()=>{let E=Ur(u,l);return E==null?null:{location:{pathname:E,search:f,hash:c,state:d,key:h,unstable_mask:y},navigationType:r}},[l,u,f,c,d,h,r,y]);return Xn(b!=null,`<Router basename="${l}"> is not able to match the URL "${u}${f}${c}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:m.createElement(Un.Provider,{value:s},m.createElement(ls.Provider,{children:t,value:b}))}function N3({children:e,location:t}){return SA(Gh(e),t)}function Gh(e,t=[]){let n=[];return m.Children.forEach(e,(r,o)=>{if(!m.isValidElement(r))return;let i=[...t,o];if(r.type===m.Fragment){n.push.apply(n,Gh(r.props.children,i));return}nt(r.type===LA,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),nt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Gh(r.props.children,i)),n.push(a)}),n}var gu="get",yu="application/x-www-form-urlencoded";function Xc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function PA(e){return Xc(e)&&e.tagName.toLowerCase()==="button"}function IA(e){return Xc(e)&&e.tagName.toLowerCase()==="form"}function zA(e){return Xc(e)&&e.tagName.toLowerCase()==="input"}function UA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function BA(e,t){return e.button===0&&(!t||t==="_self")&&!UA(e)}var Us=null;function HA(){if(Us===null)try{new FormData(document.createElement("form"),0),Us=!1}catch{Us=!0}return Us}var GA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function md(e){return e!=null&&!GA.has(e)?(Xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yu}"`),null):e}function $A(e,t){let n,r,o,i,a;if(IA(e)){let l=e.getAttribute("action");r=l?Ur(l,t):null,n=e.getAttribute("method")||gu,o=md(e.getAttribute("enctype"))||yu,i=new FormData(e)}else if(PA(e)||zA(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(r=s?Ur(s,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||gu,o=md(e.getAttribute("formenctype"))||md(l.getAttribute("enctype"))||yu,i=new FormData(l,e),!HA()){let{name:u,type:f,value:c}=e;if(f==="image"){let d=u?`${u}.`:"";i.append(`${d}x`,"0"),i.append(`${d}y`,"0")}else u&&i.append(u,c)}}else{if(Xc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=gu,r=null,o=yu,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function uC(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&Ur(o.pathname,t)==="/"?o.pathname=`${rc(t)}/_root.${r}`:o.pathname=`${rc(o.pathname)}.${r}`,o}async function jA(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function VA(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function FA(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await jA(i,n);return a.links?a.links():[]}return[]}));return KA(r.flat(1).filter(VA).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function dv(e,t,n,r,o,i){let a=(s,u)=>n[u]?s.route.id!==n[u].route.id:!0,l=(s,u)=>{var f;return n[u].pathname!==s.pathname||((f=n[u].route.path)==null?void 0:f.endsWith("*"))&&n[u].params["*"]!==s.params["*"]};return i==="assets"?t.filter((s,u)=>a(s,u)||l(s,u)):i==="data"?t.filter((s,u)=>{var c;let f=r.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(a(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((c=n[0])==null?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function qA(e,t,{includeHydrateFallback:n}={}){return YA(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function YA(e){return[...new Set(e)]}function XA(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function KA(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(XA(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function Am(){let e=m.useContext(Oa);return Tm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function QA(){let e=m.useContext(Yc);return Tm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Om=m.createContext(void 0);Om.displayName="FrameworkContext";function Mm(){let e=m.useContext(Om);return Tm(e,"You must render this element inside a <HydratedRouter> element"),e}function ZA(e,t){let n=m.useContext(Om),[r,o]=m.useState(!1),[i,a]=m.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:f,onTouchStart:c}=t,d=m.useRef(null);m.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let b=g=>{g.forEach(p=>{a(p.isIntersecting)})},E=new IntersectionObserver(b,{threshold:.5});return d.current&&E.observe(d.current),()=>{E.disconnect()}}},[e]),m.useEffect(()=>{if(r){let b=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(b)}}},[r]);let h=()=>{o(!0)},y=()=>{o(!1),a(!1)};return n?e!=="intent"?[i,d,{}]:[i,d,{onFocus:Ya(l,h),onBlur:Ya(s,y),onMouseEnter:Ya(u,h),onMouseLeave:Ya(f,y),onTouchStart:Ya(c,h)}]:[!1,d,{}]}function Ya(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function WA({page:e,...t}){let n=cA(),{router:r}=Am(),o=m.useMemo(()=>YE(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?n?m.createElement(eO,{page:e,matches:o,...t}):m.createElement(tO,{page:e,matches:o,...t}):null}function JA(e){let{manifest:t,routeModules:n}=Mm(),[r,o]=m.useState([]);return m.useEffect(()=>{let i=!1;return FA(e,t,n).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,n]),r}function eO({page:e,matches:t,...n}){let r=$r(),{future:o}=Mm(),{basename:i}=Am(),a=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let l=uC(e,i,o.unstable_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?s=!0:u.push(f.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[i,o.unstable_trailingSlashAwareDataRequests,e,r,t]);return m.createElement(m.Fragment,null,a.map(l=>m.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...n})))}function tO({page:e,matches:t,...n}){let r=$r(),{future:o,manifest:i,routeModules:a}=Mm(),{basename:l}=Am(),{loaderData:s,matches:u}=QA(),f=m.useMemo(()=>dv(e,t,u,i,r,"data"),[e,t,u,i,r]),c=m.useMemo(()=>dv(e,t,u,i,r,"assets"),[e,t,u,i,r]),d=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let b=new Set,E=!1;if(t.forEach(p=>{var S;let v=i.routes[p.route.id];!v||!v.hasLoader||(!f.some(C=>C.route.id===p.route.id)&&p.route.id in s&&((S=a[p.route.id])!=null&&S.shouldRevalidate)||v.hasClientLoader?E=!0:b.add(p.route.id))}),b.size===0)return[];let g=uC(e,l,o.unstable_trailingSlashAwareDataRequests,"data");return E&&b.size>0&&g.searchParams.set("_routes",t.filter(p=>b.has(p.route.id)).map(p=>p.route.id).join(",")),[g.pathname+g.search]},[l,o.unstable_trailingSlashAwareDataRequests,s,r,i,f,t,e,a]),h=m.useMemo(()=>qA(c,i),[c,i]),y=JA(c);return m.createElement(m.Fragment,null,d.map(b=>m.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...n})),h.map(b=>m.createElement("link",{key:b,rel:"modulepreload",href:b,...n})),y.map(({key:b,link:E})=>m.createElement("link",{key:b,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function nO(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var rO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{rO&&(window.__reactRouterVersion="7.14.2")}catch{}function L3({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=m.useRef();o.current==null&&(o.current=zT({window:r,v5Compat:!0}));let i=o.current,[a,l]=m.useState({action:i.action,location:i.location}),s=m.useCallback(u=>{n===!1?l(u):m.startTransition(()=>l(u))},[n]);return m.useLayoutEffect(()=>i.listen(s),[i,s]),m.createElement(DA,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:i,unstable_useTransitions:n})}var cC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fC=m.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:a,unstable_mask:l,state:s,target:u,to:f,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h,...y},b){let{basename:E,navigator:g,unstable_useTransitions:p}=m.useContext(Un),v=typeof f=="string"&&cC.test(f),S=JE(f,E);f=S.to;let C=yA(f,{relative:o}),w=$r(),R=null;if(l){let M=Rm(l,[],w.unstable_mask?w.unstable_mask.pathname:"/",!0);E!=="/"&&(M.pathname=M.pathname==="/"?E:Vn([E,M.pathname])),R=g.createHref(M)}let[x,O,k]=ZA(r,y),P=lO(f,{replace:a,unstable_mask:l,state:s,target:u,preventScrollReset:c,relative:o,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:p});function U(M){t&&t(M),M.defaultPrevented||P(M)}let A=!(S.isExternal||i),L=m.createElement("a",{...y,...k,href:(A?R:void 0)||S.absoluteURL||C,onClick:A?U:t,ref:nO(b,O),target:u,"data-discover":!v&&n==="render"?"true":void 0});return x&&!v?m.createElement(m.Fragment,null,L,m.createElement(WA,{page:C})):L});fC.displayName="Link";var oO=m.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:a,viewTransition:l,children:s,...u},f){let c=us(a,{relative:u.relative}),d=$r(),h=m.useContext(Yc),{navigator:y,basename:b}=m.useContext(Un),E=h!=null&&dO(c)&&l===!0,g=y.encodeLocation?y.encodeLocation(c).pathname:c.pathname,p=d.pathname,v=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(p=p.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&b&&(v=Ur(v,b)||v);const S=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let C=p===g||!o&&p.startsWith(g)&&p.charAt(S)==="/",w=v!=null&&(v===g||!o&&v.startsWith(g)&&v.charAt(g.length)==="/"),R={isActive:C,isPending:w,isTransitioning:E},x=C?t:void 0,O;typeof r=="function"?O=r(R):O=[r,C?"active":null,w?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let k=typeof i=="function"?i(R):i;return m.createElement(fC,{...u,"aria-current":x,className:O,ref:f,style:k,to:a,viewTransition:l},typeof s=="function"?s(R):s)});oO.displayName="NavLink";var iO=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:a=gu,action:l,onSubmit:s,relative:u,preventScrollReset:f,viewTransition:c,unstable_defaultShouldRevalidate:d,...h},y)=>{let{unstable_useTransitions:b}=m.useContext(Un),E=cO(),g=fO(l,{relative:u}),p=a.toLowerCase()==="get"?"get":"post",v=typeof l=="string"&&cC.test(l),S=C=>{if(s&&s(C),C.defaultPrevented)return;C.preventDefault();let w=C.nativeEvent.submitter,R=(w==null?void 0:w.getAttribute("formmethod"))||a,x=()=>E(w||C.currentTarget,{fetcherKey:t,method:R,navigate:n,replace:o,state:i,relative:u,preventScrollReset:f,viewTransition:c,unstable_defaultShouldRevalidate:d});b&&n!==!1?m.startTransition(()=>x()):x()};return m.createElement("form",{ref:y,method:p,action:g,onSubmit:r?s:S,...h,"data-discover":!v&&e==="render"?"true":void 0})});iO.displayName="Form";function aO(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dC(e){let t=m.useContext(Oa);return nt(t,aO(e)),t}function lO(e,{target:t,replace:n,unstable_mask:r,state:o,preventScrollReset:i,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let f=vA(),c=$r(),d=us(e,{relative:a});return m.useCallback(h=>{if(BA(h,t)){h.preventDefault();let y=n!==void 0?n:Bl(c)===Bl(d),b=()=>f(e,{replace:y,unstable_mask:r,state:o,preventScrollReset:i,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:s});u?m.startTransition(()=>b()):b()}},[c,f,d,n,r,o,t,e,i,a,l,s,u])}var sO=0,uO=()=>`__${String(++sO)}__`;function cO(){let{router:e}=dC("useSubmit"),{basename:t}=m.useContext(Un),n=OA(),r=e.fetch,o=e.navigate;return m.useCallback(async(i,a={})=>{let{action:l,method:s,encType:u,formData:f,body:c}=$A(i,t);if(a.navigate===!1){let d=a.fetcherKey||uO();await r(d,n,a.action||l,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:f,body:c,formMethod:a.method||s,formEncType:a.encType||u,flushSync:a.flushSync})}else await o(a.action||l,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:f,body:c,formMethod:a.method||s,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,o,t,n])}function fO(e,{relative:t}={}){let{basename:n}=m.useContext(Un),r=m.useContext(ur);nt(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...us(e||".",{relative:t})},a=$r();if(e==null){i.search=a.search;let l=new URLSearchParams(i.search),s=l.getAll("index");if(s.some(f=>f==="")){l.delete("index"),s.filter(c=>c).forEach(c=>l.append("index",c));let f=l.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Vn([n,i.pathname])),Bl(i)}function dO(e,{relative:t}={}){let n=m.useContext(nC);nt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=dC("useViewTransitionState"),o=us(e,{relative:t});if(!n.isTransitioning)return!1;let i=Ur(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Ur(n.nextLocation.pathname,r)||n.nextLocation.pathname;return nc(o.pathname,a)!=null||nc(o.pathname,i)!=null}function $h(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const bl={};function Hl(e,t,n,r,o){let i={...jh(e,bl)};return t&&(i=vu(i,t)),n&&(i=vu(i,n)),r&&(i=vu(i,r)),i}function hO(e){if(e.length===0)return bl;if(e.length===1)return jh(e[0],bl);let t={...jh(e[0],bl)};for(let n=1;n<e.length;n+=1)t=vu(t,e[n]);return t}function vu(e,t){return hC(t)?t(e):pO(e,t)}function pO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=$h(e.style,r);break}case"className":{e[n]=pC(e.className,r);break}default:mO(n,r)?e[n]=gO(e[n],r):e[n]=r}}return e}function mO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function hC(e){return typeof e=="function"}function jh(e,t){return hC(e)?e(t):e??bl}function gO(e,t){return t?e?n=>{if(yO(n)){const o=n;Vh(o);const i=t(o);return o.baseUIHandlerPrevented||e==null||e(o),i}const r=t(n);return e==null||e(n),r}:t:e}function Vh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function pC(e,t){return t?e?t+" "+e:t:e}function yO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const vO=()=>{},ie=typeof document<"u"?m.useLayoutEffect:vO;function et(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const mC=m.createContext(void 0);function Ma(e){const t=m.useContext(mC);if(t===void 0&&!e)throw new Error(et(72));return t}const hv={};function on(e,t){const n=m.useRef(hv);return n.current===hv&&(n.current=e(t)),n}const bO=[];function km(e){m.useEffect(e,bO)}const Xa=0;class Kn{constructor(){z(this,"currentId",Xa);z(this,"clear",()=>{this.currentId!==Xa&&(clearTimeout(this.currentId),this.currentId=Xa)});z(this,"disposeEffect",()=>this.clear)}static create(){return new Kn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Xa,n()},t)}isStarted(){return this.currentId!==Xa}}function Cn(){const e=on(Kn.create).current;return km(e.disposeEffect),e}function Kc(){return typeof window<"u"}function ko(e){return Nm(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(Nm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nm(e){return Kc()?e instanceof Node||e instanceof at(e).Node:!1}function Ie(e){return Kc()?e instanceof Element||e instanceof at(e).Element:!1}function tt(e){return Kc()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function Fh(e){return!Kc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function bi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=an(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function SO(e){return/^(table|td|th)$/.test(ko(e))}function Qc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const EO=/transform|translate|scale|rotate|perspective|filter/,CO=/paint|layout|strict|content/,zo=e=>!!e&&e!=="none";let gd;function Lm(e){const t=Ie(e)?an(e):e;return zo(t.transform)||zo(t.translate)||zo(t.scale)||zo(t.rotate)||zo(t.perspective)||!Zc()&&(zo(t.backdropFilter)||zo(t.filter))||EO.test(t.willChange||"")||CO.test(t.contain||"")}function RO(e){let t=ar(e);for(;tt(t)&&!or(t);){if(Lm(t))return t;if(Qc(t))return null;t=ar(t)}return null}function Zc(){return gd==null&&(gd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gd}function or(e){return/^(html|body|#document)$/.test(ko(e))}function an(e){return at(e).getComputedStyle(e)}function Wc(e){return Ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ar(e){if(ko(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fh(e)&&e.host||cr(e);return Fh(t)?t.host:t}function gC(e){const t=ar(e);return or(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&bi(t)?t:gC(t)}function So(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=gC(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=at(o);if(i){const l=qh(a);return t.concat(a,a.visualViewport||[],bi(o)?o:[],l&&n?So(l):[])}else return t.concat(o,So(o,[],n))}function qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Nt(e){const t=on(wO,e).current;return t.next=e,ie(t.effect),t}function wO(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const yd=Ac[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],_O=yd&&yd!==m.useLayoutEffect?yd:e=>e();function W(e){const t=on(xO).current;return t.next=e,_O(t.effect),t.trampoline}function xO(){const e={next:void 0,callback:TO,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function TO(){}const ka=typeof navigator<"u",vd=kO(),yC=LO(),vC=NO(),AO=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),OO=vd.platform==="MacIntel"&&vd.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(vd.platform),bC=ka&&/apple/i.test(navigator.vendor),Yh=ka&&/android/i.test(yC)||/android/i.test(vC),MO=ka&&yC.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,SC=vC.includes("jsdom/");function kO(){if(!ka)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function NO(){if(!ka)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function LO(){if(!ka)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const Xh="data-base-ui-focusable",EC="active",CC="selected",RC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Eo="ArrowLeft",Co="ArrowRight",Dm="ArrowUp",cs="ArrowDown";function en(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function Re(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Fh(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function At(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Gn(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function DO(e){return e.matches("html,body")}function ct(e){return(e==null?void 0:e.ownerDocument)||document}function Pm(e){return tt(e)&&e.matches(RC)}function Kh(e){return e?e.getAttribute("role")==="combobox"&&Pm(e):!1}function oc(e){if(!e||SC)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ic(e){return e?e.hasAttribute(Xh)?e:e.querySelector(`[${Xh}]`)||e:null}function ti(e,t,n=!0){return e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ti(e,o.id,n)])}function pv(e,t){var o;let n=[],r=(o=e.find(i=>i.id===t))==null?void 0:o.parentId;for(;r;){const i=e.find(a=>a.id===r);r=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function Bt(e){e.preventDefault(),e.stopPropagation()}function PO(e){return"nativeEvent"in e}function wC(e){return e.mozInputSource===0&&e.isTrusted?!0:Yh&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _C(e){return SC?!1:!Yh&&e.width===0&&e.height===0||Yh&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function si(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function xC(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const IO=["top","right","bottom","left"],pa=Math.min,hn=Math.max,ma=Math.round,Fi=Math.floor,ir=e=>({x:e,y:e}),zO={left:"right",right:"left",bottom:"top",top:"bottom"};function Qh(e,t,n){return hn(e,pa(t,n))}function Br(e,t){return typeof e=="function"?e(t):e}function nn(e){return e.split("-")[0]}function No(e){return e.split("-")[1]}function Im(e){return e==="x"?"y":"x"}function zm(e){return e==="y"?"height":"width"}function Ln(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Um(e){return Im(Ln(e))}function UO(e,t,n){n===void 0&&(n=!1);const r=No(e),o=Um(e),i=zm(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ac(a)),[a,ac(a)]}function BO(e){const t=ac(e);return[Zh(e),t,Zh(t)]}function Zh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const mv=["left","right"],gv=["right","left"],HO=["top","bottom"],GO=["bottom","top"];function $O(e,t,n){switch(e){case"top":case"bottom":return n?t?gv:mv:t?mv:gv;case"left":case"right":return t?HO:GO;default:return[]}}function jO(e,t,n,r){const o=No(e);let i=$O(nn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Zh)))),i}function ac(e){const t=nn(e);return zO[t]+e.slice(t.length)}function VO(e){return{top:0,right:0,bottom:0,left:0,...e}}function TC(e){return typeof e!="number"?VO(e):{top:e,right:e,bottom:e,left:e}}function lc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Bs(e,t,n){return Math.floor(e/t)!==n}function Sl(e,t){return t<0||t>=e.current.length}function bd(e,t){return Ut(e,{disabledIndices:t})}function yv(e,t){return Ut(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ut(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do i+=n?-o:o;while(i>=0&&i<=e.current.length-1&&El(e,i,r));return i}function FO(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:i,disabledIndices:a,minIndex:l,maxIndex:s,prevIndex:u,stopEvent:f=!1}){let c=u;const d=[],h={};let y=!1;{let g=null,p=-1;e.current.forEach((v,S)=>{if(v==null)return;const C=v.closest('[role="row"]');C&&(y=!0),(C!==g||p===-1)&&(g=C,p+=1,d[p]=[]),d[p].push(S),h[S]=p})}const b=y&&d.length>0&&d.some(g=>g.length!==i);function E(g){if(!b||u===-1)return;const p=h[u];if(p==null)return;const v=d[p].indexOf(u);let S=g==="up"?p-1:p+1;r&&(S<0?S=d.length-1:S>=d.length&&(S=0));const C=new Set;for(;S>=0&&S<d.length&&!C.has(S);){C.add(S);const w=d[S];if(w.length===0){S=g==="up"?S-1:S+1;continue}const R=Math.min(v,w.length-1);for(let x=R;x>=0;x-=1){const O=w[x];if(!El(e,O,a))return O}S=g==="up"?S-1:S+1,r&&(S<0?S=d.length-1:S>=d.length&&(S=0))}}if(t.key===Dm){const g=E("up");if(g!==void 0)f&&Bt(t),c=g;else{if(f&&Bt(t),u===-1)c=s;else if(c=Ut(e,{startingIndex:c,amount:i,decrement:!0,disabledIndices:a}),r&&(u-i<l||c<0)){const p=u%i,v=s%i,S=s-(v-p);v===p?c=s:c=v>p?S:S-i}Sl(e,c)&&(c=u)}}if(t.key===cs){const g=E("down");g!==void 0?(f&&Bt(t),c=g):(f&&Bt(t),u===-1?c=l:(c=Ut(e,{startingIndex:u,amount:i,disabledIndices:a}),r&&u+i>s&&(c=Ut(e,{startingIndex:u%i-i,amount:i,disabledIndices:a}))),Sl(e,c)&&(c=u))}if(n==="both"){const g=Fi(u/i);t.key===(o?Eo:Co)&&(f&&Bt(t),u%i!==i-1?(c=Ut(e,{startingIndex:u,disabledIndices:a}),r&&Bs(c,i,g)&&(c=Ut(e,{startingIndex:u-u%i-1,disabledIndices:a}))):r&&(c=Ut(e,{startingIndex:u-u%i-1,disabledIndices:a})),Bs(c,i,g)&&(c=u)),t.key===(o?Co:Eo)&&(f&&Bt(t),u%i!==0?(c=Ut(e,{startingIndex:u,decrement:!0,disabledIndices:a}),r&&Bs(c,i,g)&&(c=Ut(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a}))):r&&(c=Ut(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a})),Bs(c,i,g)&&(c=u));const p=Fi(s/i)===g;Sl(e,c)&&(r&&p?c=t.key===(o?Co:Eo)?s:Ut(e,{startingIndex:u-u%i-1,disabledIndices:a}):c=u)}return c}function qO(e,t,n){const r=[];let o=0;return e.forEach(({width:i,height:a},l)=>{let s=!1;for(n&&(o=0);!s;){const u=[];for(let f=0;f<i;f+=1)for(let c=0;c<a;c+=1)u.push(o+f+c*t);o%t+i<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=l}),s=!0):o+=1}}),[...r]}function YO(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function XO(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function El(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}/*!
|
|
62
|
-
* tabbable 6.4.0
|
|
63
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
64
|
-
*/var KO=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],sc=KO.join(","),AC=typeof Element>"u",ga=AC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,uc=!AC&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},cc=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):cc(t.parentNode));return a},QO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},OC=function(t,n,r){if(cc(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(sc));return n&&ga.call(t,sc)&&o.unshift(t),o=o.filter(r),o},fc=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!cc(a,!1))if(a.tagName==="SLOT"){var l=a.assignedElements(),s=l.length?l:a.children,u=fc(s,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var f=ga.call(a,sc);f&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),d=!cc(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&d){var h=fc(c===!0?a.children:c.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},MC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},kC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||QO(t))&&!MC(t)?0:t.tabIndex},ZO=function(t,n){var r=kC(t);return r<0&&n&&!MC(t)?0:r},WO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},NC=function(t){return t.tagName==="INPUT"},JO=function(t){return NC(t)&&t.type==="hidden"},eM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},tM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},nM=function(t){if(!t.name)return!0;var n=t.form||uc(t),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){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",a.message),!1}var i=tM(o,t.form);return!i||i===t},rM=function(t){return NC(t)&&t.type==="radio"},oM=function(t){return rM(t)&&!nM(t)},iM=function(t){var n,r=t&&uc(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,l,s;for(i=!!((a=o)!==null&&a!==void 0&&(l=a.ownerDocument)!==null&&l!==void 0&&l.contains(o)||t!=null&&(s=t.ownerDocument)!==null&&s!==void 0&&s.contains(t));!i&&o;){var u,f,c;r=uc(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((f=o)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(o))}}return i},vv=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},aM=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ga.call(t,"details>summary:first-of-type"),l=a?t.parentElement:t;if(ga.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var u=t.parentElement,f=uc(t);if(u&&!u.shadowRoot&&o(u)===!0)return vv(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=s}if(iM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return vv(t);return!1},lM=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ga.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Wh=function(t,n){return!(n.disabled||JO(n)||aM(n,t)||eM(n)||lM(n))},Jh=function(t,n){return!(oM(n)||kC(n)<0||!Wh(t,n))},sM=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},LC=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,l=a?o.scopeParent:o,s=ZO(l,a),u=a?LC(o.candidates):l;s===0?a?n.push.apply(n,u):n.push(l):r.push({documentOrder:i,tabIndex:s,item:o,isScope:a,content:u})}),r.sort(WO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},fs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=fc([t],n.includeContainer,{filter:Jh.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:sM}):r=OC(t,n.includeContainer,Jh.bind(null,n)),LC(r)},uM=function(t,n){n=n||{};var r;return n.getShadowRoot?r=fc([t],n.includeContainer,{filter:Wh.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=OC(t,n.includeContainer,Wh.bind(null,n)),r},DC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ga.call(t,sc)===!1?!1:Jh(n,t)};const Na=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function PC(e,t){const n=fs(e,Na()),r=n.length;if(r===0)return;const o=en(ct(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function Jc(e){return PC(ct(e).body,1)||e}function IC(e){return PC(ct(e).body,-1)||e}function zC(e,t){if(!e)return null;const n=fs(ct(e).body,Na()),r=n.length;if(r===0)return null;const o=n.indexOf(e);if(o===-1)return null;const i=(o+t+r)%r;return n[i]}function UC(e){return zC(e,1)}function BC(e){return zC(e,-1)}function ni(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Re(n,r)}function cM(e){fs(e,Na()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function bv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const fM={...Ac};let Sv=0;function dM(e,t="mui"){const[n,r]=m.useState(e),o=e||n;return m.useEffect(()=>{n==null&&(Sv+=1,r(`${t}-${Sv}`))},[n,t]),o}const Ev=fM.useId;function jr(e,t){if(Ev!==void 0){const n=Ev();return e??(t?`${t}-${n}`:n)}return dM(e,t)}function HC(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}class Bm{constructor(){z(this,"nodesRef",{current:[]});z(this,"events",HC())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const GC=m.createContext(null),$C=m.createContext(null),fr=()=>{var e;return((e=m.useContext(GC))==null?void 0:e.id)||null},Lo=e=>{const t=m.useContext($C);return e??t};function Hm(e){const t=jr(),n=Lo(e),r=fr();return ie(()=>{if(!t)return;const o={id:t,parentId:r};return n==null||n.addNode(o),()=>{n==null||n.removeNode(o)}},[n,t,r]),t}function jC(e){const{children:t,id:n}=e,r=fr();return ee.jsx(GC.Provider,{value:m.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function VC(e){const{children:t,externalTree:n}=e,r=on(()=>n??new Bm).current;return ee.jsx($C.Provider,{value:r,children:t})}function FC(){}const dc=Object.freeze([]),Ct=Object.freeze({}),hM=500,qC=500,pM={style:{transition:"none"}},YC="data-base-ui-click-trigger",mM={fallbackAxisSide:"none"},Gm={fallbackAxisSide:"end"},gM={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$m="none",Fn="trigger-press",yt="trigger-hover",Gl="trigger-focus",jm="outside-press",Vm="item-press",Hr="focus-out",ds="escape-key",bu="list-navigation",yM="cancel-open",rl="sibling-open",vM="disabled",ui="imperative-action";function xe(e,t,n,r){let o=!1,i=!1;const a=Ct;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function ya(e){return`data-base-ui-${e}`}function Su(e,t,n){if(n&&!si(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}const bM=m.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Kn,currentIdRef:{current:null},currentContextRef:{current:null}});function SM(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:o=!0,open:i}=t,a=m.useContext(bM),{currentIdRef:l,delayRef:s,timeoutMs:u,initialDelayRef:f,currentContextRef:c,hasProvider:d,timeout:h}=a,[y,b]=m.useState(!1);return ie(()=>{function E(){var g;b(!1),(g=c.current)==null||g.setIsInstantPhase(!1),l.current=null,c.current=null,s.current=f.current}if(o&&l.current&&!i&&l.current===r){if(b(!1),u){const g=r;return h.start(u,()=>{n.select("open")||l.current&&l.current!==g||E()}),()=>{h.clear()}}E()}},[o,i,r,l,s,u,f,c,h,n]),ie(()=>{if(!o||!i)return;const E=c.current,g=l.current;h.clear(),c.current={onOpenChange:n.setOpen,setIsInstantPhase:b},l.current=r,s.current={open:0,close:Su(f.current,"close")},g!==null&&g!==r?(b(!0),E==null||E.setIsInstantPhase(!0),E==null||E.onOpenChange(!1,xe($m))):(b(!1),E==null||E.setIsInstantPhase(!1))},[o,i,r,n,l,s,u,f,c,h]),ie(()=>()=>{c.current=null},[c]),m.useMemo(()=>({hasProvider:d,delayRef:s,isInstantPhase:y}),[d,s,y])}function va(e,t,n,r){const o=on(XC).current;return CM(o,e,t,n,r)&&KC(o,[e,t,n,r]),o.callback}function EM(e){const t=on(XC).current;return RM(t,e)&&KC(t,e),t.callback}function XC(){return{callback:null,cleanup:null,refs:[]}}function CM(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function RM(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function KC(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const Fm={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1},Hs=null;class wM{constructor(){z(this,"callbacks",[]);z(this,"callbacksCount",0);z(this,"nextId",1);z(this,"startId",1);z(this,"isScheduled",!1);z(this,"tick",t=>{var o;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i<n.length;i+=1)(o=n[i])==null||o.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Gs=new wM;class Jn{constructor(){z(this,"currentId",Hs);z(this,"cancel",()=>{this.currentId!==Hs&&(Gs.cancel(this.currentId),this.currentId=Hs)});z(this,"disposeEffect",()=>this.cancel)}static create(){return new Jn}static request(t){return Gs.request(t)}static cancel(t){return Gs.cancel(t)}request(t){this.cancel(),this.currentId=Gs.request(()=>{this.currentId=Hs,t()})}}function Si(){const e=on(Jn.create).current;return km(e.disposeEffect),e}function Xt(e){return(e==null?void 0:e.ownerDocument)||document}const qn=m.forwardRef(function(t,n){const[r,o]=m.useState();ie(()=>{bC&&o("button")},[]);const i={tabIndex:0,role:r};return ee.jsx("span",{...t,ref:n,style:Fm,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});let Cv=0;function Eu(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Cv);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Cv=requestAnimationFrame(i)}const Ji={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Rv(e){return e==="inert"?Ji.inert:e==="aria-hidden"?Ji["aria-hidden"]:Ji.none}let $s=new WeakSet,js={},Sd=0;const QC=e=>e&&(e.host||QC(e.parentNode)),_M=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=QC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function xM(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,a=_M(t,e),l=new Set,s=new Set(a),u=[];js[o]||(js[o]=new WeakMap);const f=js[o];a.forEach(c),d(t),l.clear();function c(h){!h||l.has(h)||(l.add(h),h.parentNode&&c(h.parentNode))}function d(h){!h||s.has(h)||[].forEach.call(h.children,y=>{if(ko(y)!=="script")if(l.has(y))d(y);else{const b=i?y.getAttribute(i):null,E=b!==null&&b!=="false",g=Rv(i),p=(g.get(y)||0)+1,v=(f.get(y)||0)+1;g.set(y,p),f.set(y,v),u.push(y),p===1&&E&&$s.add(y),v===1&&y.setAttribute(o,""),!E&&i&&y.setAttribute(i,i==="inert"?"":"true")}})}return Sd+=1,()=>{u.forEach(h=>{const y=Rv(i),E=(y.get(h)||0)-1,g=(f.get(h)||0)-1;y.set(h,E),f.set(h,g),E||(!$s.has(h)&&i&&h.removeAttribute(i),$s.delete(h)),g||h.removeAttribute(o)}),Sd-=1,Sd||(Ji.inert=new WeakMap,Ji["aria-hidden"]=new WeakMap,Ji.none=new WeakMap,$s=new WeakSet,js={})}}function TM(e,t=!1,n=!1){const r=ct(e[0]).body;return xM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const AM=parseInt(m.version,10);function qm(e){return AM>=e}function wv(e){if(!m.isValidElement(e))return null;const t=e,n=t.props;return(qm(19)?n==null?void 0:n.ref:t.ref)??null}function OM(e,t){const n={};for(const r in e){const o=e[r];if(t!=null&&t.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function MM(e,t){return typeof e=="function"?e(t):e}function kM(e,t){return typeof e=="function"?e(t):e}function He(e,t,n={}){const r=t.render,o=NM(t,n);if(n.enabled===!1)return null;const i=n.state??Ct;return LM(e,r,o,i)}function NM(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Ct,ref:a,props:l,stateAttributesMapping:s,enabled:u=!0}=t,f=u?MM(n,i):void 0,c=u?kM(r,i):void 0,d=u?OM(i,s):Ct,h=u?$h(d,Array.isArray(l)?hO(l):l)??Ct:Ct;return typeof document<"u"&&(u?Array.isArray(a)?h.ref=EM([h.ref,wv(o),...a]):h.ref=va(h.ref,wv(o),a):va(null,null)),u?(f!==void 0&&(h.className=pC(h.className,f)),c!==void 0&&(h.style=$h(h.style,c)),h):Ct}function LM(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Hl(n,t.props);return o.ref=n.ref,m.cloneElement(t,o)}if(e&&typeof e=="string")return DM(e,n);throw new Error(et(8))}function DM(e,t){return e==="button"?m.createElement("button",{type:"button",...t,key:t.key}):e==="img"?m.createElement("img",{alt:"",...t,key:t.key}):m.createElement(e,t)}const ZC=m.createContext(null),WC=()=>m.useContext(ZC),PM=ya("portal");function JC(e={}){const{ref:t,container:n,componentProps:r=Ct,elementProps:o,elementState:i}=e,a=jr(),l=WC(),s=l==null?void 0:l.portalNode,[u,f]=m.useState(null),[c,d]=m.useState(null),h=m.useRef(null);ie(()=>{if(n===null){h.current&&(h.current=null,d(null),f(null));return}if(a==null)return;const E=(n&&(Nm(n)?n:n.current))??s??document.body;if(E==null){h.current&&(h.current=null,d(null),f(null));return}h.current!==E&&(h.current=E,d(null),f(E))},[n,s,a]);const y=He("div",r,{ref:[t,d],state:i,props:[{id:a,[PM]:""},o]});return{portalNode:c,portalSubtree:u&&y?Gt.createPortal(y,u):null}}const eR=m.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:l,...s}=t,{portalNode:u,portalSubtree:f}=JC({container:o,ref:n,componentProps:t,elementProps:s}),c=m.useRef(null),d=m.useRef(null),h=m.useRef(null),y=m.useRef(null),[b,E]=m.useState(null),g=b==null?void 0:b.modal,p=b==null?void 0:b.open,v=typeof l=="boolean"?l:!!b&&!b.modal&&b.open&&!!u;m.useEffect(()=>{if(!u||g)return;function C(w){u&&ni(w)&&(w.type==="focusin"?bv:cM)(u)}return u.addEventListener("focusin",C,!0),u.addEventListener("focusout",C,!0),()=>{u.removeEventListener("focusin",C,!0),u.removeEventListener("focusout",C,!0)}},[u,g]),m.useEffect(()=>{!u||p||bv(u)},[p,u]);const S=m.useMemo(()=>({beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:y,portalNode:u,setFocusManagerState:E}),[u]);return ee.jsxs(m.Fragment,{children:[f,ee.jsxs(ZC.Provider,{value:S,children:[v&&u&&ee.jsx(qn,{"data-type":"outside",ref:c,onFocus:C=>{var w;if(ni(C,u))(w=h.current)==null||w.focus();else{const R=b?b.domReference:null,x=IC(R);x==null||x.focus()}}}),v&&u&&ee.jsx("span",{"aria-owns":u.id,style:gM}),u&&Gt.createPortal(r,u),v&&u&&ee.jsx(qn,{"data-type":"outside",ref:d,onFocus:C=>{var w;if(ni(C,u))(w=y.current)==null||w.focus();else{const R=b?b.domReference:null,x=Jc(R);x==null||x.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,xe(Hr,C.nativeEvent)))}}})]})]})});function Vo(e){return e==null?e:"current"in e?e.current:e}function IM(e,t){const n=at(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const _v=20;let uo=[];function Ym(){uo=uo.filter(e=>e.isConnected)}function zM(e){Ym(),e&&ko(e)!=="body"&&(uo.push(e),uo.length>_v&&(uo=uo.slice(-_v)))}function Ed(){return Ym(),uo[uo.length-1]}function UM(e){if(!e)return null;const t=Na();return DC(e,t)?e:fs(e,t)[0]||e}function BM(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():an(e).display!=="none"}function xv(e,t){var a;if(!t.current.includes("floating")&&!((a=e.getAttribute("role"))!=null&&a.includes("dialog")))return;const n=Na(),o=uM(e,n).filter(l=>{const s=l.getAttribute("data-tabindex")||"";return DC(l,n)||l.hasAttribute("data-tabindex")&&!s.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function tR(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],initialFocus:i=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:s=!0,closeOnFocusOut:u=!0,openInteractionType:f="",getInsideElements:c=()=>[],nextFocusableElement:d,previousFocusableElement:h,beforeContentFocusGuardRef:y,externalTree:b}=e,E="rootStore"in t?t.rootStore:t,g=E.useState("open"),p=E.useState("domReferenceElement"),v=E.useState("floatingElement"),{events:S,dataRef:C}=E.context,w=W(()=>{var Q;return(Q=C.current.floatingContext)==null?void 0:Q.nodeId}),R=W(c),x=i===!1,O=Kh(p)&&x,k=Nt(o),P=Nt(i),U=Nt(a),A=Nt(f),L=Lo(b),M=WC(),_=m.useRef(null),D=m.useRef(null),T=m.useRef(!1),N=m.useRef(!1),I=m.useRef(!1),q=m.useRef(-1),B=m.useRef(""),$=m.useRef(""),ue=Cn(),te=Cn(),ce=Si(),oe=M!=null,J=ic(v),Se=W((Q=J)=>Q?fs(Q,Na()):[]),Ae=W(Q=>{const K=Se(Q);return k.current.map(()=>K).filter(Boolean).flat()});m.useEffect(()=>{if(r||!s)return;function Q(re){re.key==="Tab"&&Re(J,en(ct(J)))&&Se().length===0&&!O&&Bt(re)}const K=ct(J);return K.addEventListener("keydown",Q),()=>{K.removeEventListener("keydown",Q)}},[r,p,J,s,k,O,Se,Ae]),m.useEffect(()=>{if(r||!v)return;function Q(K){const re=At(K),ge=Se().indexOf(re);ge!==-1&&(q.current=ge)}return v.addEventListener("focusin",Q),()=>{v.removeEventListener("focusin",Q)}},[r,v,Se]),m.useEffect(()=>{if(r||!g)return;const Q=ct(J);function K(){I.current=!1}function re(ge){const le=At(ge),se=Re(v,le)||Re(p,le)||Re(M==null?void 0:M.portalNode,le);I.current=!se,$.current=ge.pointerType||"keyboard"}function de(){$.current="keyboard"}return Q.addEventListener("pointerdown",re,!0),Q.addEventListener("pointerup",K,!0),Q.addEventListener("pointercancel",K,!0),Q.addEventListener("keydown",de,!0),()=>{Q.removeEventListener("pointerdown",re,!0),Q.removeEventListener("pointerup",K,!0),Q.removeEventListener("pointercancel",K,!0),Q.removeEventListener("keydown",de,!0)}},[r,v,p,J,g,M]),m.useEffect(()=>{if(r||!u)return;function Q(){N.current=!0,te.start(0,()=>{N.current=!1})}function K(le){const se=le.relatedTarget,X=le.currentTarget,ae=At(le);queueMicrotask(()=>{const j=w(),Z=E.context.triggerElements,ye=!(Re(p,se)||Re(v,se)||Re(se,v)||Re(M==null?void 0:M.portalNode,se)||se!=null&&Z.hasElement(se)||Z.hasMatchingElement(me=>Re(me,se))||se!=null&&se.hasAttribute(ya("focus-guard"))||L&&(ti(L.nodesRef.current,j).find(me=>{var be,Te;return Re((be=me.context)==null?void 0:be.elements.floating,se)||Re((Te=me.context)==null?void 0:Te.elements.domReference,se)})||pv(L.nodesRef.current,j).find(me=>{var be,Te,De;return[(be=me.context)==null?void 0:be.elements.floating,ic((Te=me.context)==null?void 0:Te.elements.floating)].includes(se)||((De=me.context)==null?void 0:De.elements.domReference)===se})));if(X===p&&J&&xv(J,k),l&&X!==p&&!BM(ae)&&en(ct(J))===ct(J).body){if(tt(J)&&(J.focus(),l==="popup")){ce.request(()=>{J.focus()});return}const me=q.current,be=Se(),Te=be[me]||be[be.length-1]||J;tt(Te)&&Te.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(O||!s)&&se&&ye&&!N.current&&(O||se!==Ed())&&(T.current=!0,E.setOpen(!1,xe(Hr,le)))})}function re(){I.current||(C.current.insideReactTree=!0,ue.start(0,()=>{C.current.insideReactTree=!1}))}const de=tt(p)?p:null,ge=[];if(!(!v&&!de))return de&&(de.addEventListener("focusout",K),de.addEventListener("pointerdown",Q),ge.push(()=>{de.removeEventListener("focusout",K),de.removeEventListener("pointerdown",Q)})),v&&(v.addEventListener("focusout",K),M&&(v.addEventListener("focusout",re,!0),ge.push(()=>{v.removeEventListener("focusout",re,!0)})),ge.push(()=>{v.removeEventListener("focusout",K)})),()=>{ge.forEach(le=>{le()})}},[r,p,v,J,s,L,M,E,u,l,Se,O,w,k,C,ue,te,ce]);const G=m.useRef(null),Y=m.useRef(null),ne=va(G,y,M==null?void 0:M.beforeInsideRef),Le=va(Y,M==null?void 0:M.afterInsideRef);m.useEffect(()=>{var le,se,X;if(r||!v||!g)return;const Q=Array.from(((le=M==null?void 0:M.portalNode)==null?void 0:le.querySelectorAll(`[${ya("portal")}]`))||[]),re=(X=(se=(L?pv(L.nodesRef.current,w()):[]).find(ae=>{var j;return Kh(((j=ae.context)==null?void 0:j.elements.domReference)||null)}))==null?void 0:se.context)==null?void 0:X.elements.domReference,de=[v,re,...Q,...R(),_.current,D.current,G.current,Y.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Vo(h),Vo(d),O?p:null].filter(ae=>ae!=null),ge=TM(de,s||O);return()=>{ge()}},[g,r,p,v,s,k,M,O,L,w,R,d,h]),ie(()=>{if(!g||r||!tt(J))return;const Q=ct(J),K=en(Q);queueMicrotask(()=>{const re=Ae(J),de=P.current,ge=typeof de=="function"?de(A.current||""):de;if(ge===void 0||ge===!1)return;let le;ge===!0||ge===null?le=re[0]||J:le=Vo(ge),le=le||re[0]||J,!Re(J,K)&&Eu(le,{preventScroll:le===J})})},[r,g,J,x,Ae,P,A]),ie(()=>{if(r||!J)return;const Q=ct(J),K=en(Q);zM(K);function re(le){if(le.open||(B.current=IM(le.nativeEvent,$.current)),le.reason===yt&&le.nativeEvent.type==="mouseleave"&&(T.current=!0),le.reason===jm)if(le.nested)T.current=!1;else if(wC(le.nativeEvent)||_C(le.nativeEvent))T.current=!1;else{let se=!1;document.createElement("div").focus({get preventScroll(){return se=!0,!1}}),se?T.current=!1:T.current=!0}}S.on("openchange",re);const de=Q.createElement("span");de.setAttribute("tabindex","-1"),de.setAttribute("aria-hidden","true"),Object.assign(de.style,Fm),oe&&p&&p.insertAdjacentElement("afterend",de);function ge(){const le=U.current;let se=typeof le=="function"?le(B.current):le;if(se===void 0||se===!1)return null;if(se===null&&(se=!0),typeof se=="boolean"){const ae=p||Ed();return ae&&ae.isConnected?ae:de}const X=p||Ed()||de;return Vo(se)||X}return()=>{S.off("openchange",re);const le=en(Q),se=Re(v,le)||L&&ti(L.nodesRef.current,w(),!1).some(ae=>{var j;return Re((j=ae.context)==null?void 0:j.elements.floating,le)}),X=ge();queueMicrotask(()=>{const ae=UM(X),j=typeof U.current!="boolean";U.current&&!T.current&&tt(ae)&&(!(!j&&ae!==le&&le!==Q.body)||se)&&ae.focus({preventScroll:!0}),de.remove()})}},[r,v,J,U,C,S,L,oe,p,w]),m.useEffect(()=>{queueMicrotask(()=>{T.current=!1})},[r]),m.useEffect(()=>{if(r||!g)return;function Q(re){const de=At(re);de!=null&&de.closest(`[${YC}]`)&&(N.current=!0)}const K=ct(J);return K.addEventListener("pointerdown",Q,!0),()=>{K.removeEventListener("pointerdown",Q,!0)}},[r,g,J]),ie(()=>{if(!r&&M)return M.setFocusManagerState({modal:s,closeOnFocusOut:u,open:g,onOpenChange:E.setOpen,domReference:p}),()=>{M.setFocusManagerState(null)}},[r,M,s,g,E,u,p]),ie(()=>{if(!(r||!J))return xv(J,k),()=>{queueMicrotask(Ym)}},[r,J,k]);const pe=!r&&(s?!O:!0)&&(oe||s);return ee.jsxs(m.Fragment,{children:[pe&&ee.jsx(qn,{"data-type":"inside",ref:ne,onFocus:Q=>{var K;if(s){const re=Ae();Eu(re[re.length-1])}else if(M!=null&&M.portalNode)if(T.current=!1,ni(Q,M.portalNode)){const re=Jc(p);re==null||re.focus()}else(K=Vo(h??M.beforeOutsideRef))==null||K.focus()}}),n,pe&&ee.jsx(qn,{"data-type":"inside",ref:Le,onFocus:Q=>{var K;if(s)Eu(Ae()[0]);else if(M!=null&&M.portalNode)if(u&&(T.current=!0),ni(Q,M.portalNode)){const re=IC(p);re==null||re.focus()}else(K=Vo(d??M.afterOutsideRef))==null||K.focus()}})]})}function Xm(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:a=!0,ignoreMouse:l=!1,stickIfOpen:s=!0,touchOpenDelay:u=0}=t,f=m.useRef(void 0),c=Si(),d=Cn(),h=m.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const b=f.current,E=y.nativeEvent,g=n.select("open");if(y.button!==0||i==="click"||si(b,!0)&&l)return;const p=r.current.openEvent,v=p==null?void 0:p.type,S=n.select("domReferenceElement")!==y.currentTarget,C=g&&S||!(g&&a&&(!(p&&s)||v==="click"||v==="mousedown"));if(Pm(E.target)){const R=xe(Fn,E,E.target);C&&b==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,R)}):n.setOpen(C,R);return}const w=y.currentTarget;c.request(()=>{const R=xe(Fn,E,w);C&&b==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,R)}):n.setOpen(C,R)})},onClick(y){if(i==="mousedown-only")return;const b=f.current;if(i==="mousedown"&&b){f.current=void 0;return}if(si(b,!0)&&l)return;const E=n.select("open"),g=r.current.openEvent,p=n.select("domReferenceElement")!==y.currentTarget,v=E&&p||!(E&&a&&(!(g&&s)||xC(g))),S=xe(Fn,y.nativeEvent,y.currentTarget);v&&b==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(v,S)},onKeyDown(){f.current=void 0}}),[r,i,l,n,s,a,c,d,u]);return m.useMemo(()=>o?{reference:h}:Ct,[o,h])}function HM(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var h;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",s=["mouseenter","mousemove"].includes(((h=t.dataRef.current.openEvent)==null?void 0:h.type)||"")&&t.pointerType!=="touch";let u=i.width,f=i.height,c=i.x,d=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),c-=n||0,d-=r||0,u=0,f=0,!o||s?(u=t.axis==="y"?i.width:0,f=t.axis==="x"?i.height:0,c=a&&t.x!=null?t.x:c,d=l&&t.y!=null?t.y:d):o&&!s&&(f=t.axis==="x"?i.height:f,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:f,x:c,y:d,top:d,right:c+u,bottom:d+f,left:c}}}}function Tv(e){return e!=null&&e.clientX!=null}function GM(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),a=n.context.dataRef,{enabled:l=!0,axis:s="both",x:u=null,y:f=null}=t,c=m.useRef(!1),d=m.useRef(null),[h,y]=m.useState(),[b,E]=m.useState([]),g=W((w,R)=>{c.current||a.current.openEvent&&!Tv(a.current.openEvent)||n.set("positionReference",HM(i,{x:w,y:R,axis:s,dataRef:a,pointerType:h}))}),p=W(w=>{u!=null||f!=null||(r?d.current||E([]):g(w.clientX,w.clientY))}),v=si(h)?o:r,S=m.useCallback(()=>{if(!v||!l||u!=null||f!=null)return;const w=at(o);function R(x){const O=At(x);Re(o,O)?(w.removeEventListener("mousemove",R),d.current=null):g(x.clientX,x.clientY)}if(!a.current.openEvent||Tv(a.current.openEvent)){w.addEventListener("mousemove",R);const x=()=>{w.removeEventListener("mousemove",R),d.current=null};return d.current=x,x}n.set("positionReference",i)},[v,l,u,f,o,a,i,n,g]);m.useEffect(()=>S(),[S,b]),m.useEffect(()=>{l&&!o&&(c.current=!1)},[l,o]),m.useEffect(()=>{!l&&r&&(c.current=!0)},[l,r]),ie(()=>{l&&(u!=null||f!=null)&&(c.current=!1,g(u,f))},[l,u,f,g]);const C=m.useMemo(()=>{function w(R){y(R.pointerType)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:p,onMouseEnter:p}},[p]);return m.useMemo(()=>l?{reference:C}:{},[l,C])}function Av(e,t,n){let{reference:r,floating:o}=e;const i=Ln(t),a=Um(t),l=zm(a),s=nn(t),u=i==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let h;switch(s){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(No(t)){case"start":h[a]-=d*(n&&u?-1:1);break;case"end":h[a]+=d*(n&&u?-1:1);break}return h}async function $M(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:d=!1,padding:h=0}=Br(t,e),y=TC(h),E=l[d?c==="floating"?"reference":"floating":c],g=lc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(E)))==null||n?E:E.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:s})),p=c==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},C=lc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:p,offsetParent:v,strategy:s}):p);return{top:(g.top-C.top+y.top)/S.y,bottom:(C.bottom-g.bottom+y.bottom)/S.y,left:(g.left-C.left+y.left)/S.x,right:(C.right-g.right+y.right)/S.x}}const jM=50,VM=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:$M},s=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=Av(u,r,s),d=r,h=0;const y={};for(let b=0;b<i.length;b++){const E=i[b];if(!E)continue;const{name:g,fn:p}=E,{x:v,y:S,data:C,reset:w}=await p({x:f,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:y,rects:u,platform:l,elements:{reference:e,floating:t}});f=v??f,c=S??c,y[g]={...y[g],...C},w&&h<jM&&(h++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(u=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:f,y:c}=Av(u,d,s)),b=-1)}return{x:f,y:c,placement:d,strategy:o,middlewareData:y}},FM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:u}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...E}=Br(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=nn(o),p=Ln(l),v=nn(l)===l,S=await(s.isRTL==null?void 0:s.isRTL(u.floating)),C=d||(v||!b?[ac(l)]:BO(l)),w=y!=="none";!d&&w&&C.push(...jO(l,b,y,S));const R=[l,...C],x=await s.detectOverflow(t,E),O=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&O.push(x[g]),c){const L=UO(o,a,S);O.push(x[L[0]],x[L[1]])}if(k=[...k,{placement:o,overflows:O}],!O.every(L=>L<=0)){var P,U;const L=(((P=i.flip)==null?void 0:P.index)||0)+1,M=R[L];if(M&&(!(c==="alignment"?p!==Ln(M):!1)||k.every(T=>Ln(T.placement)===p?T.overflows[0]>0:!0)))return{data:{index:L,overflows:k},reset:{placement:M}};let _=(U=k.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:U.placement;if(!_)switch(h){case"bestFit":{var A;const D=(A=k.filter(T=>{if(w){const N=Ln(T.placement);return N===p||N==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(N=>N>0).reduce((N,I)=>N+I,0)]).sort((T,N)=>T[1]-N[1])[0])==null?void 0:A[0];D&&(_=D);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Ov(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mv(e){return IO.some(t=>e[t]>=0)}const qM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Br(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),l=Ov(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Mv(l)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),l=Ov(a,n.floating);return{data:{escapedOffsets:l,escaped:Mv(l)}}}default:return{}}}}},nR=new Set(["left","top"]);async function YM(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=nn(n),l=No(n),s=Ln(n)==="y",u=nR.has(a)?-1:1,f=i&&s?-1:1,c=Br(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof y=="number"&&(h=l==="end"?y*-1:y),s?{x:h*f,y:d*u}:{x:d*u,y:h*f}}const XM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await YM(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},KM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:g=>{let{x:p,y:v}=g;return{x:p,y:v}}},...u}=Br(e,t),f={x:n,y:r},c=await i.detectOverflow(t,u),d=Ln(nn(o)),h=Im(d);let y=f[h],b=f[d];if(a){const g=h==="y"?"top":"left",p=h==="y"?"bottom":"right",v=y+c[g],S=y-c[p];y=Qh(v,y,S)}if(l){const g=d==="y"?"top":"left",p=d==="y"?"bottom":"right",v=b+c[g],S=b-c[p];b=Qh(v,b,S)}const E=s.fn({...t,[h]:y,[d]:b});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[h]:a,[d]:l}}}}}},QM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=Br(e,t),f={x:n,y:r},c=Ln(o),d=Im(c);let h=f[d],y=f[c];const b=Br(l,t),E=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(s){const v=d==="y"?"height":"width",S=i.reference[d]-i.floating[v]+E.mainAxis,C=i.reference[d]+i.reference[v]-E.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var g,p;const v=d==="y"?"width":"height",S=nR.has(nn(o)),C=i.reference[c]-i.floating[v]+(S&&((g=a.offset)==null?void 0:g[c])||0)+(S?0:E.crossAxis),w=i.reference[c]+i.reference[v]+(S?0:((p=a.offset)==null?void 0:p[c])||0)-(S?E.crossAxis:0);y<C?y=C:y>w&&(y=w)}return{[d]:h,[c]:y}}}},ZM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...u}=Br(e,t),f=await a.detectOverflow(t,u),c=nn(o),d=No(o),h=Ln(o)==="y",{width:y,height:b}=i.floating;let E,g;c==="top"||c==="bottom"?(E=c,g=d===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(g=c,E=d==="end"?"top":"bottom");const p=b-f.top-f.bottom,v=y-f.left-f.right,S=pa(b-f[E],p),C=pa(y-f[g],v),w=!t.middlewareData.shift;let R=S,x=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(x=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=p),w&&!d){const k=hn(f.left,0),P=hn(f.right,0),U=hn(f.top,0),A=hn(f.bottom,0);h?x=y-2*(k!==0||P!==0?k+P:hn(f.left,f.right)):R=b-2*(U!==0||A!==0?U+A:hn(f.top,f.bottom))}await s({...t,availableWidth:x,availableHeight:R});const O=await a.getDimensions(l.floating);return y!==O.width||b!==O.height?{reset:{rects:!0}}:{}}}};function rR(e){const t=an(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=ma(n)!==i||ma(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Km(e){return Ie(e)?e:e.contextElement}function ea(e){const t=Km(e);if(!tt(t))return ir(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rR(t);let a=(i?ma(n.width):n.width)/r,l=(i?ma(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const WM=ir(0);function oR(e){const t=at(e);return!Zc()||!t.visualViewport?WM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==at(e)?!1:t}function ci(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Km(e);let a=ir(1);t&&(r?Ie(r)&&(a=ea(r)):a=ea(e));const l=JM(i,n,r)?oR(i):ir(0);let s=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,f=o.width/a.x,c=o.height/a.y;if(i){const d=at(i),h=r&&Ie(r)?at(r):r;let y=d,b=qh(y);for(;b&&r&&h!==y;){const E=ea(b),g=b.getBoundingClientRect(),p=an(b),v=g.left+(b.clientLeft+parseFloat(p.paddingLeft))*E.x,S=g.top+(b.clientTop+parseFloat(p.paddingTop))*E.y;s*=E.x,u*=E.y,f*=E.x,c*=E.y,s+=v,u+=S,y=at(b),b=qh(y)}}return lc({width:f,height:c,x:s,y:u})}function ef(e,t){const n=Wc(e).scrollLeft;return t?t.left+n:ci(cr(e)).left+n}function iR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ef(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ek(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=cr(r),l=t?Qc(t.floating):!1;if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},u=ir(1);const f=ir(0),c=tt(r);if((c||!c&&!i)&&((ko(r)!=="body"||bi(a))&&(s=Wc(r)),c)){const h=ci(r);u=ea(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const d=a&&!c&&!i?iR(a,s):ir(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+f.x+d.x,y:n.y*u.y-s.scrollTop*u.y+f.y+d.y}}function tk(e){return Array.from(e.getClientRects())}function nk(e){const t=cr(e),n=Wc(e),r=e.ownerDocument.body,o=hn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=hn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ef(e);const l=-n.scrollTop;return an(r).direction==="rtl"&&(a+=hn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}const kv=25;function rk(e,t){const n=at(e),r=cr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const f=Zc();(!f||f&&t==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}const u=ef(r);if(u<=0){const f=r.ownerDocument,c=f.body,d=getComputedStyle(c),h=f.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,y=Math.abs(r.clientWidth-c.clientWidth-h);y<=kv&&(i-=y)}else u<=kv&&(i+=u);return{width:i,height:a,x:l,y:s}}function ok(e,t){const n=ci(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=tt(e)?ea(e):ir(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,s=o*i.x,u=r*i.y;return{width:a,height:l,x:s,y:u}}function Nv(e,t,n){let r;if(t==="viewport")r=rk(e,n);else if(t==="document")r=nk(cr(e));else if(Ie(t))r=ok(t,n);else{const o=oR(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return lc(r)}function aR(e,t){const n=ar(e);return n===t||!Ie(n)||or(n)?!1:an(n).position==="fixed"||aR(n,t)}function ik(e,t){const n=t.get(e);if(n)return n;let r=So(e,[],!1).filter(l=>Ie(l)&&ko(l)!=="body"),o=null;const i=an(e).position==="fixed";let a=i?ar(e):e;for(;Ie(a)&&!or(a);){const l=an(a),s=Lm(a);!s&&l.position==="fixed"&&(o=null),(i?!s&&!o:!s&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||bi(a)&&!s&&aR(e,a))?r=r.filter(f=>f!==a):o=l,a=ar(a)}return t.set(e,r),r}function ak(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Qc(t)?[]:ik(t,this._c):[].concat(n),r],l=Nv(t,a[0],o);let s=l.top,u=l.right,f=l.bottom,c=l.left;for(let d=1;d<a.length;d++){const h=Nv(t,a[d],o);s=hn(h.top,s),u=pa(h.right,u),f=pa(h.bottom,f),c=hn(h.left,c)}return{width:u-c,height:f-s,x:c,y:s}}function lk(e){const{width:t,height:n}=rR(e);return{width:t,height:n}}function sk(e,t,n){const r=tt(t),o=cr(t),i=n==="fixed",a=ci(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=ir(0);function u(){s.x=ef(o)}if(r||!r&&!i)if((ko(t)!=="body"||bi(o))&&(l=Wc(t)),r){const h=ci(t,!0,i,t);s.x=h.x+t.clientLeft,s.y=h.y+t.clientTop}else o&&u();i&&!r&&o&&u();const f=o&&!r&&!i?iR(o,l):ir(0),c=a.left+l.scrollLeft-s.x-f.x,d=a.top+l.scrollTop-s.y-f.y;return{x:c,y:d,width:a.width,height:a.height}}function Cd(e){return an(e).position==="static"}function Lv(e,t){if(!tt(e)||an(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return cr(e)===n&&(n=n.ownerDocument.body),n}function lR(e,t){const n=at(e);if(Qc(e))return n;if(!tt(e)){let o=ar(e);for(;o&&!or(o);){if(Ie(o)&&!Cd(o))return o;o=ar(o)}return n}let r=Lv(e,t);for(;r&&SO(r)&&Cd(r);)r=Lv(r,t);return r&&or(r)&&Cd(r)&&!Lm(r)?n:r||RO(e)||n}const uk=async function(e){const t=this.getOffsetParent||lR,n=this.getDimensions,r=await n(e.floating);return{reference:sk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ck(e){return an(e).direction==="rtl"}const fk={convertOffsetParentRelativeRectToViewportRelativeRect:ek,getDocumentElement:cr,getClippingRect:ak,getOffsetParent:lR,getElementRects:uk,getClientRects:tk,getDimensions:lk,getScale:ea,isElement:Ie,isRTL:ck};function sR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dk(e,t){let n=null,r;const o=cr(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),i();const u=e.getBoundingClientRect(),{left:f,top:c,width:d,height:h}=u;if(l||t(),!d||!h)return;const y=Fi(c),b=Fi(o.clientWidth-(f+d)),E=Fi(o.clientHeight-(c+h)),g=Fi(f),v={rootMargin:-y+"px "+-b+"px "+-E+"px "+-g+"px",threshold:hn(0,pa(1,s))||1};let S=!0;function C(w){const R=w[0].intersectionRatio;if(R!==s){if(!S)return a();R?a(!1,R):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!sR(u,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function Dv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=Km(e),f=o||i?[...u?So(u):[],...t?So(t):[]]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const c=u&&l?dk(u,n):null;let d=-1,h=null;a&&(h=new ResizeObserver(g=>{let[p]=g;p&&p.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),u&&!s&&h.observe(u),t&&h.observe(t));let y,b=s?ci(e):null;s&&E();function E(){const g=ci(e);b&&!sR(b,g)&&n(),b=g,y=requestAnimationFrame(E)}return n(),()=>{var g;f.forEach(p=>{o&&p.removeEventListener("scroll",n),i&&p.removeEventListener("resize",n)}),c==null||c(),(g=h)==null||g.disconnect(),h=null,s&&cancelAnimationFrame(y)}}const hk=XM,pk=KM,mk=FM,gk=ZM,yk=qM,vk=QM,bk=(e,t,n)=>{const r=new Map,o={platform:fk,...n},i={...o.platform,_c:r};return VM(e,t,{...o,platform:i})};var Sk=typeof document<"u",Ek=function(){},Cu=Sk?m.useLayoutEffect:Ek;function hc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!hc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!hc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function uR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pv(e,t){const n=uR(e);return Math.round(t*n)/n}function Rd(e){const t=m.useRef(e);return Cu(()=>{t.current=e}),t}function cR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:u}=e,[f,c]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(r);hc(d,r)||h(r);const[y,b]=m.useState(null),[E,g]=m.useState(null),p=m.useCallback(T=>{T!==w.current&&(w.current=T,b(T))},[]),v=m.useCallback(T=>{T!==R.current&&(R.current=T,g(T))},[]),S=i||y,C=a||E,w=m.useRef(null),R=m.useRef(null),x=m.useRef(f),O=s!=null,k=Rd(s),P=Rd(o),U=Rd(u),A=m.useCallback(()=>{if(!w.current||!R.current)return;const T={placement:t,strategy:n,middleware:d};P.current&&(T.platform=P.current),bk(w.current,R.current,T).then(N=>{const I={...N,isPositioned:U.current!==!1};L.current&&!hc(x.current,I)&&(x.current=I,Gt.flushSync(()=>{c(I)}))})},[d,t,n,P,U]);Cu(()=>{u===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,c(T=>({...T,isPositioned:!1})))},[u]);const L=m.useRef(!1);Cu(()=>(L.current=!0,()=>{L.current=!1}),[]),Cu(()=>{if(S&&(w.current=S),C&&(R.current=C),S&&C){if(k.current)return k.current(S,C,A);A()}},[S,C,A,k,O]);const M=m.useMemo(()=>({reference:w,floating:R,setReference:p,setFloating:v}),[p,v]),_=m.useMemo(()=>({reference:S,floating:C}),[S,C]),D=m.useMemo(()=>{const T={position:n,left:0,top:0};if(!_.floating)return T;const N=Pv(_.floating,f.x),I=Pv(_.floating,f.y);return l?{...T,transform:"translate("+N+"px, "+I+"px)",...uR(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:I}},[n,l,_.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:A,refs:M,elements:_,floatingStyles:D}),[f,A,M,_,D])}const Ck=(e,t)=>{const n=hk(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rk=(e,t)=>{const n=pk(e);return{name:n.name,fn:n.fn,options:[e,t]}},wk=(e,t)=>({fn:vk(e).fn,options:[e,t]}),_k=(e,t)=>{const n=mk(e);return{name:n.name,fn:n.fn,options:[e,t]}},xk=(e,t)=>{const n=gk(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tk=(e,t)=>{const n=yk(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ak={intentional:"onClick",sloppy:"onPointerDown"};function Ok(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function Qm(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:l,dataRef:s}=n.context,{enabled:u=!0,escapeKey:f=!0,outsidePress:c=!0,outsidePressEvent:d="sloppy",referencePress:h=!1,referencePressEvent:y="sloppy",ancestorScroll:b=!1,bubbles:E,externalTree:g}=t,p=Lo(g),v=W(typeof c=="function"?c:()=>!1),S=typeof c=="function"?v:c,C=m.useRef(!1),{escapeKey:w,outsidePress:R}=Ok(E),x=m.useRef(null),O=Cn(),k=Cn(),P=W(()=>{k.clear(),s.current.insideReactTree=!1}),U=m.useRef(!1),A=m.useRef(""),L=W(G=>{A.current=G.pointerType}),M=W(()=>{const G=A.current,Y=G==="pen"||!G?"mouse":G,ne=typeof d=="function"?d():d;return typeof ne=="string"?ne:ne[Y]}),_=W(G=>{var Q;if(!r||!u||!f||G.key!=="Escape"||U.current)return;const Y=(Q=s.current.floatingContext)==null?void 0:Q.nodeId,ne=p?ti(p.nodesRef.current,Y):[];if(!w&&ne.length>0){let K=!0;if(ne.forEach(re=>{var de;(de=re.context)!=null&&de.open&&!re.context.dataRef.current.__escapeKeyBubbles&&(K=!1)}),!K)return}const Le=PO(G)?G.nativeEvent:G,pe=xe(ds,Le);n.setOpen(!1,pe),!w&&!pe.isPropagationAllowed&&G.stopPropagation()}),D=W(G=>{const Y=M();return Y==="intentional"&&G.type!=="click"||Y==="sloppy"&&G.type==="click"}),T=W(()=>{s.current.insideReactTree=!0,k.start(0,P)}),N=W((G,Y=!1)=>{var le;if(D(G)){P();return}if(s.current.insideReactTree){P();return}if(M()==="intentional"&&Y||typeof S=="function"&&!S(G))return;const ne=At(G),Le=`[${ya("inert")}]`,pe=ct(n.select("floatingElement")).querySelectorAll(Le),Q=n.context.triggerElements;if(ne&&(Q.hasElement(ne)||Q.hasMatchingElement(se=>Re(se,ne))))return;let K=Ie(ne)?ne:null;for(;K&&!or(K);){const se=ar(K);if(or(se)||!Ie(se))break;K=se}if(pe.length&&Ie(ne)&&!DO(ne)&&!Re(ne,n.select("floatingElement"))&&Array.from(pe).every(se=>!Re(K,se)))return;if(tt(ne)&&!("touches"in G)){const se=or(ne),X=an(ne),ae=/auto|scroll/,j=se||ae.test(X.overflowX),Z=se||ae.test(X.overflowY),ye=j&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,me=Z&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,be=X.direction==="rtl",Te=me&&(be?G.offsetX<=ne.offsetWidth-ne.clientWidth:G.offsetX>ne.clientWidth),De=ye&&G.offsetY>ne.clientHeight;if(Te||De)return}const re=(le=s.current.floatingContext)==null?void 0:le.nodeId,de=p&&ti(p.nodesRef.current,re).some(se=>{var X;return Gn(G,(X=se.context)==null?void 0:X.elements.floating)});if(Gn(G,n.select("floatingElement"))||Gn(G,n.select("domReferenceElement"))||de)return;const ge=p?ti(p.nodesRef.current,re):[];if(ge.length>0){let se=!0;if(ge.forEach(X=>{var ae;(ae=X.context)!=null&&ae.open&&!X.context.dataRef.current.__outsidePressBubbles&&(se=!1)}),!se)return}n.setOpen(!1,xe(jm,G)),P()}),I=W(G=>{M()!=="sloppy"||G.pointerType==="touch"||!n.select("open")||!u||Gn(G,n.select("floatingElement"))||Gn(G,n.select("domReferenceElement"))||N(G)}),q=W(G=>{if(M()!=="sloppy"||!n.select("open")||!u||Gn(G,n.select("floatingElement"))||Gn(G,n.select("domReferenceElement")))return;const Y=G.touches[0];Y&&(x.current={startTime:Date.now(),startX:Y.clientX,startY:Y.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{x.current&&(x.current.dismissOnTouchEnd=!1,x.current.dismissOnMouseDown=!1)}))}),B=W(G=>{const Y=At(G);function ne(){q(G),Y==null||Y.removeEventListener(G.type,ne)}Y==null||Y.addEventListener(G.type,ne)}),$=W(G=>{const Y=C.current;if(C.current=!1,O.clear(),G.type==="mousedown"&&x.current&&!x.current.dismissOnMouseDown)return;const ne=At(G);function Le(){G.type==="pointerdown"?I(G):N(G,Y),ne==null||ne.removeEventListener(G.type,Le)}ne==null||ne.addEventListener(G.type,Le)}),ue=W(G=>{if(M()!=="sloppy"||!x.current||Gn(G,n.select("floatingElement"))||Gn(G,n.select("domReferenceElement")))return;const Y=G.touches[0];if(!Y)return;const ne=Math.abs(Y.clientX-x.current.startX),Le=Math.abs(Y.clientY-x.current.startY),pe=Math.sqrt(ne*ne+Le*Le);pe>5&&(x.current.dismissOnTouchEnd=!0),pe>10&&(N(G),O.clear(),x.current=null)}),te=W(G=>{const Y=At(G);function ne(){ue(G),Y==null||Y.removeEventListener(G.type,ne)}Y==null||Y.addEventListener(G.type,ne)}),ce=W(G=>{M()!=="sloppy"||!x.current||Gn(G,n.select("floatingElement"))||Gn(G,n.select("domReferenceElement"))||(x.current.dismissOnTouchEnd&&N(G),O.clear(),x.current=null)}),oe=W(G=>{const Y=At(G);function ne(){ce(G),Y==null||Y.removeEventListener(G.type,ne)}Y==null||Y.addEventListener(G.type,ne)});m.useEffect(()=>{if(!r||!u)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=R;const G=new Kn;function Y(K){n.setOpen(!1,xe($m,K))}function ne(){G.clear(),U.current=!0}function Le(){G.start(Zc()?5:0,()=>{U.current=!1})}const pe=ct(o);pe.addEventListener("pointerdown",L,!0),f&&(pe.addEventListener("keydown",_),pe.addEventListener("compositionstart",ne),pe.addEventListener("compositionend",Le)),S&&(pe.addEventListener("click",$,!0),pe.addEventListener("pointerdown",$,!0),pe.addEventListener("touchstart",B,!0),pe.addEventListener("touchmove",te,!0),pe.addEventListener("touchend",oe,!0),pe.addEventListener("mousedown",$,!0));let Q=[];return b&&(Ie(a)&&(Q=So(a)),Ie(o)&&(Q=Q.concat(So(o))),!Ie(i)&&i&&i.contextElement&&(Q=Q.concat(So(i.contextElement)))),Q=Q.filter(K=>{var re;return K!==((re=pe.defaultView)==null?void 0:re.visualViewport)}),Q.forEach(K=>{K.addEventListener("scroll",Y,{passive:!0})}),()=>{pe.removeEventListener("pointerdown",L,!0),f&&(pe.removeEventListener("keydown",_),pe.removeEventListener("compositionstart",ne),pe.removeEventListener("compositionend",Le)),S&&(pe.removeEventListener("click",$,!0),pe.removeEventListener("pointerdown",$,!0),pe.removeEventListener("touchstart",B,!0),pe.removeEventListener("touchmove",te,!0),pe.removeEventListener("touchend",oe,!0),pe.removeEventListener("mousedown",$,!0)),Q.forEach(K=>{K.removeEventListener("scroll",Y)}),G.clear()}},[s,o,i,a,f,S,r,l,b,u,w,R,_,N,$,I,B,te,oe,L,n]),m.useEffect(P,[S,P]);const J=m.useMemo(()=>({onKeyDown:_,...h&&{[Ak[y]]:G=>{n.setOpen(!1,xe(Fn,G.nativeEvent))},...y!=="intentional"&&{onClick(G){n.setOpen(!1,xe(Fn,G.nativeEvent))}}}}),[_,n,h,y]),Se=W(G=>{const Y=At(G.nativeEvent);!Re(n.select("floatingElement"),Y)||G.button!==0||(C.current=!0)}),Ae=m.useMemo(()=>({onKeyDown:_,onPointerDown:Se,onMouseDown:Se,onMouseUp:Se,onClickCapture:T,onMouseDownCapture:T,onPointerDownCapture:T,onMouseUpCapture:T,onTouchEndCapture:T,onTouchMoveCapture:T}),[_,Se,T]);return m.useMemo(()=>u?{reference:J,floating:Ae,trigger:J}:{},[u,J,Ae])}var pc=Symbol("NOT_FOUND");function Mk(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function kk(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Nk(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Iv=e=>Array.isArray(e)?e:[e];function Lk(e){const t=Array.isArray(e[0])?e[0]:e;return Nk(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Dk(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function Pk(e){let t;return{get(n){return t&&e(t.key,n)?t.value:pc},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Ik(e,t){let n=[];function r(l){const s=n.findIndex(u=>t(l,u.key));if(s>-1){const u=n[s];return s>0&&(n.splice(s,1),n.unshift(u)),u.value}return pc}function o(l,s){r(l)===pc&&(n.unshift({key:l,value:s}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var zk=(e,t)=>e===t;function Uk(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function Bk(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=zk,maxSize:o=1,resultEqualityCheck:i}=n,a=Uk(r);let l=0;const s=o<=1?Pk(a):Ik(o,a);function u(){let f=s.get(arguments);if(f===pc){if(f=e.apply(null,arguments),l++,i){const d=s.getEntries().find(h=>i(h.value,f));d&&(f=d.value,l!==0&&l--)}s.put(arguments,f)}return f}return u.clearCache=()=>{s.clear(),u.resetResultsCount()},u.resultsCount=()=>l,u.resetResultsCount=()=>{l=0},u}var Hk=class{constructor(e){this.value=e}deref(){return this.value}},Gk=typeof WeakRef<"u"?WeakRef:Hk,$k=0,zv=1;function Vs(){return{s:$k,v:void 0,o:null,p:null}}function fR(e,t={}){let n=Vs();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var c;let l=n;const{length:s}=arguments;for(let d=0,h=s;d<h;d++){const y=arguments[d];if(typeof y=="function"||typeof y=="object"&&y!==null){let b=l.o;b===null&&(l.o=b=new WeakMap);const E=b.get(y);E===void 0?(l=Vs(),b.set(y,l)):l=E}else{let b=l.p;b===null&&(l.p=b=new Map);const E=b.get(y);E===void 0?(l=Vs(),b.set(y,l)):l=E}}const u=l;let f;if(l.s===zv)f=l.v;else if(f=e.apply(null,arguments),i++,r){const d=((c=o==null?void 0:o.deref)==null?void 0:c.call(o))??o;d!=null&&r(d,f)&&(f=d,i!==0&&i--),o=typeof f=="object"&&f!==null||typeof f=="function"?new Gk(f):f}return u.s=zv,u.v=f,f}return a.clearCache=()=>{n=Vs(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function dR(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,l,s={},u=o.pop();typeof u=="object"&&(s=u,u=o.pop()),Mk(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const f={...n,...s},{memoize:c,memoizeOptions:d=[],argsMemoize:h=fR,argsMemoizeOptions:y=[]}=f,b=Iv(d),E=Iv(y),g=Lk(o),p=c(function(){return i++,u.apply(null,arguments)},...b),v=h(function(){a++;const C=Dk(g,arguments);return l=p.apply(null,C),l},...E);return Object.assign(v,{resultFunc:u,memoizedResultFunc:p,dependencies:g,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>l,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:c,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var jk=dR(fR),Vk=Object.assign((e,t=jk)=>{kk(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,l,s)=>(a[n[s]]=l,a),{}))},{withTypes:()=>Vk});dR({memoize:Bk,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const fe=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error(et(1));let l;if(e)l=e;else throw new Error("Missing arguments");return l};var hR={exports:{}},pR={};/**
|
|
65
|
-
* @license React
|
|
66
|
-
* use-sync-external-store-shim.production.js
|
|
67
|
-
*
|
|
68
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the MIT license found in the
|
|
71
|
-
* LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var ba=m;function Fk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qk=typeof Object.is=="function"?Object.is:Fk,Yk=ba.useState,Xk=ba.useEffect,Kk=ba.useLayoutEffect,Qk=ba.useDebugValue;function Zk(e,t){var n=t(),r=Yk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Kk(function(){o.value=n,o.getSnapshot=t,wd(o)&&i({inst:o})},[e,n,t]),Xk(function(){return wd(o)&&i({inst:o}),e(function(){wd(o)&&i({inst:o})})},[e]),Qk(n),n}function wd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qk(e,n)}catch{return!0}}function Wk(e,t){return t()}var Jk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Wk:Zk;pR.useSyncExternalStore=ba.useSyncExternalStore!==void 0?ba.useSyncExternalStore:Jk;hR.exports=pR;var mR=hR.exports,gR={exports:{}},yR={};/**
|
|
73
|
-
* @license React
|
|
74
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
75
|
-
*
|
|
76
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the MIT license found in the
|
|
79
|
-
* LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/var tf=m,eN=mR;function tN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nN=typeof Object.is=="function"?Object.is:tN,rN=eN.useSyncExternalStore,oN=tf.useRef,iN=tf.useEffect,aN=tf.useMemo,lN=tf.useDebugValue;yR.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=oN(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=aN(function(){function s(h){if(!u){if(u=!0,f=h,h=r(h),o!==void 0&&a.hasValue){var y=a.value;if(o(y,h))return c=y}return c=h}if(y=c,nN(f,h))return y;var b=r(h);return o!==void 0&&o(y,b)?(f=h,y):(f=h,c=b)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return s(t())},d===null?void 0:function(){return s(d())}]},[t,n,r,o]);var l=rN(e,i[0],i[1]);return iN(function(){a.hasValue=!0,a.value=l},[l]),lN(l),l};gR.exports=yR;var sN=gR.exports;const uN=qm(19),cN=uN?dN:hN;function fN(e,t,n,r,o){return cN(e,t,n,r,o)}function dN(e,t,n,r,o){const i=m.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return mR.useSyncExternalStore(e.subscribe,i,i)}function hN(e,t,n,r,o){return sN.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class Cl{constructor(t){z(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));z(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Cl.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Cl.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Cl.prototype.setState.call(this,t)}}class nf extends Cl{constructor(n,r={},o){super(n);z(this,"controlledValues",new Map);z(this,"select",(n,r,o,i)=>{const a=this.selectors[n];return a(this.state,r,o,i)});z(this,"useState",(n,r,o,i)=>{m.useDebugValue(n);const a=this.selectors[n];return fN(this,a,r,o,i)});this.context=r,this.selectors=o}useSyncedValue(n,r){m.useDebugValue(n),ie(()=>{this.state[n]!==r&&this.set(n,r)},[n,r])}useSyncedValueWithCleanup(n,r){ie(()=>(this.state[n]!==r&&this.set(n,r),()=>{this.set(n,void 0)}),[n,r])}useSyncedValues(n){const r=Object.values(n);ie(()=>{this.update(n)},r)}useControlledProp(n,r,o){m.useDebugValue(n);const i=r!==void 0;this.controlledValues.has(n)||(this.controlledValues.set(n,i),!i&&!Object.is(this.state[n],o)&&super.setState({...this.state,[n]:o})),ie(()=>{i&&!Object.is(this.state[n],r)&&super.setState({...this.state,[n]:r})},[n,r,o,i])}set(n,r){this.controlledValues.get(n)!==!0&&super.set(n,r)}update(n){const r={...n};for(const o in r)if(Object.hasOwn(r,o)&&this.controlledValues.get(o)===!0){delete r[o];continue}super.update(r)}setState(n){const r={...n};for(const o in r)if(Object.hasOwn(r,o)&&this.controlledValues.get(o)===!0){delete r[o];continue}super.setState({...this.state,...r})}useContextCallback(n,r){m.useDebugValue(n);const o=W(r??FC);this.context[n]=o}useStateSetter(n){const r=m.useRef(void 0);return r.current===void 0&&(r.current=o=>{this.set(n,o)}),r.current}observe(n,r){let o;typeof n=="function"?o=n:o=this.selectors[n];let i=o(this.state);return r(i,i,this),this.subscribe(a=>{const l=o(a);if(!Object.is(i,l)){const s=i;i=l,r(l,s,this)}})}}const pN={open:fe(e=>e.open),domReferenceElement:fe(e=>e.domReferenceElement),referenceElement:fe(e=>e.positionReference??e.referenceElement),floatingElement:fe(e=>e.floatingElement),floatingId:fe(e=>e.floatingId)};class Zm extends nf{constructor(n){const{nested:r,noEmit:o,onOpenChange:i,triggerElements:a,...l}=n;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:HC(),nested:r,noEmit:o,triggerElements:a},pN);z(this,"setOpen",(n,r)=>{var o,i;if((!n||!this.state.open||xC(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const a={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",a)}(i=(o=this.context).onOpenChange)==null||i.call(o,n,r)})}}function vR(e,t=!1,n=!1){const[r,o]=m.useState(e&&t?"idle":void 0),[i,a]=m.useState(e);return e&&!i&&(a(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),ie(()=>{if(!e&&i&&r!=="ending"&&n){const l=Jn.request(()=>{o("ending")});return()=>{Jn.cancel(l)}}},[e,i,r,n]),ie(()=>{if(!e||t)return;const l=Jn.request(()=>{o(void 0)});return()=>{Jn.cancel(l)}},[t,e]),ie(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const l=Jn.request(()=>{o("idle")});return()=>{Jn.cancel(l)}},[t,e,i,o,r]),m.useMemo(()=>({mounted:i,setMounted:a,transitionStatus:r}),[i,r])}function hs(e,t=!1,n=!0){const r=Si();return W((o,i=null)=>{r.cancel();const a=Vo(e);a!=null&&(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():r.request(()=>{function l(){a&&Promise.all(a.getAnimations().map(s=>s.finished)).then(()=>{i!=null&&i.aborted||Gt.flushSync(o)}).catch(()=>{if(n){if(i!=null&&i.aborted)return;Gt.flushSync(o)}else a.getAnimations().length>0&&a.getAnimations().some(s=>s.pending||s.playState!=="finished")&&l()})}t?r.request(l):l()}))})}function La(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Nt(n),a=W(o),l=hs(r,n);m.useEffect(()=>{t&&l(()=>{n===i.current&&a()})},[t,n,a,l,i])}function bR(e,t){const n=m.useRef(null);return m.useCallback(r=>{e!==void 0&&(n.current!==null&&(t.context.triggerElements.delete(n.current),n.current=null),r!==null&&(n.current=e,t.context.triggerElements.add(e,r)))},[t,e])}function Wm(e,t,n,r){const o=n.useState("isMountedByTrigger",e),i=bR(e,n),a=W(l=>{i(l),l!==null&&n.select("open")&&n.select("activeTriggerId")==null&&n.update({activeTriggerId:e,activeTriggerElement:l,...r})});return ie(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:o}}function Jm(e){const t=e.useState("open");ie(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function eg(e,t,n){const{mounted:r,setMounted:o,transitionStatus:i}=vR(e);t.useSyncedValues({mounted:r,transitionStatus:i});const a=W(()=>{var s,u;o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(u=(s=t.context).onOpenChangeComplete)==null||u.call(s,!1)}),l=t.useState("preventUnmountingOnClose");return La({enabled:!l,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:i}}class ps{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function mN(){return new Zm({open:!1,floatingElement:null,referenceElement:null,triggerElements:new ps,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function tg(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:mN(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Ct,inactiveTriggerProps:Ct,popupProps:Ct}}const ng={open:fe(e=>e.open),mounted:fe(e=>e.mounted),transitionStatus:fe(e=>e.transitionStatus),floatingRootContext:fe(e=>e.floatingRootContext),preventUnmountingOnClose:fe(e=>e.preventUnmountingOnClose),payload:fe(e=>e.payload),activeTriggerId:fe(e=>e.activeTriggerId),activeTriggerElement:fe(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:fe((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:fe((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:fe((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:fe((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:fe(e=>e.popupProps),popupElement:fe(e=>e.popupElement),positionerElement:fe(e=>e.positionerElement)};function gN(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=jr(),i=fr()!=null,a=on(()=>new Zm({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new ps,floatingId:o,nested:i,noEmit:e.noEmit||!1})).current;return ie(()=>{const l={open:t,floatingId:o};r.reference!==void 0&&(l.referenceElement=r.reference,l.domReferenceElement=Ie(r.reference)?r.reference:null),r.floating!==void 0&&(l.floatingElement=r.floating),a.update(l)},[t,o,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=i,a.context.noEmit=e.noEmit||!1,a}function yN(e={}){const{nodeId:t,externalTree:n}=e,r=gN(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[a,l]=m.useState(null),s=m.useRef(null),u=Lo(n);ie(()=>{i.domReference&&(s.current=i.domReference)},[i.domReference]);const f=cR({...e,elements:{...i,...a&&{reference:a}}}),c=m.useCallback(R=>{const x=Ie(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;l(x),f.refs.setReference(x)},[f.refs]),[d,h]=m.useState(null),[y,b]=m.useState(null);o.useSyncedValue("referenceElement",d),o.useSyncedValue("domReferenceElement",Ie(d)?d:null),o.useSyncedValue("floatingElement",y);const E=m.useCallback(R=>{(Ie(R)||R===null)&&(s.current=R,h(R)),(Ie(f.refs.reference.current)||f.refs.reference.current===null||R!==null&&!Ie(R))&&f.refs.setReference(R)},[f.refs,h]),g=m.useCallback(R=>{b(R),f.refs.setFloating(R)},[f.refs]),p=m.useMemo(()=>({...f.refs,setReference:E,setFloating:g,setPositionReference:c,domReference:s}),[f.refs,E,g,c]),v=m.useMemo(()=>({...f.elements,domReference:i.domReference}),[f.elements,i.domReference]),S=o.useState("open"),C=o.useState("floatingId"),w=m.useMemo(()=>({...f,dataRef:o.context.dataRef,open:S,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:p,elements:v,nodeId:t,rootStore:o}),[f,p,v,t,o,S,C]);return ie(()=>{o.context.dataRef.current.floatingContext=w;const R=u==null?void 0:u.nodesRef.current.find(x=>x.id===t);R&&(R.context=w)}),m.useMemo(()=>({...f,context:w,refs:p,elements:v,rootStore:o}),[f,p,v,w,o])}function rg(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=jr(),a=fr()!=null,l=t.useState("open"),s=t.useState("activeTriggerElement"),u=t.useState(r?"popupElement":"positionerElement"),f=t.context.triggerElements,c=on(()=>new Zm({open:l,referenceElement:s,floatingElement:u,triggerElements:f,onOpenChange:o,floatingId:i,nested:a,noEmit:n})).current;return ie(()=>{const d={open:l,floatingId:i,referenceElement:s,floatingElement:u};Ie(s)&&(d.domReferenceElement=s),c.update(d)},[l,i,s,u,c]),c.context.onOpenChange=o,c.context.nested=a,c.context.noEmit=n,c}const _d=MO&&bC;function SR(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:o}=n.context,{enabled:i=!0,visibleOnly:a=!0}=t,l=m.useRef(!1),s=Cn(),u=m.useRef(!0);m.useEffect(()=>{const c=n.select("domReferenceElement");if(!i)return;const d=at(c);function h(){!n.select("open")&&tt(c)&&c===en(ct(c))&&(l.current=!0)}function y(){u.current=!0}function b(){u.current=!1}return d.addEventListener("blur",h),_d&&(d.addEventListener("keydown",y,!0),d.addEventListener("pointerdown",b,!0)),()=>{d.removeEventListener("blur",h),_d&&(d.removeEventListener("keydown",y,!0),d.removeEventListener("pointerdown",b,!0))}},[n,i]),m.useEffect(()=>{if(!i)return;function c(d){(d.reason===Fn||d.reason===ds)&&(l.current=!0)}return r.on("openchange",c),()=>{r.off("openchange",c)}},[r,i]);const f=m.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(c){if(l.current)return;const d=At(c.nativeEvent);if(a&&Ie(d)){if(_d&&!c.relatedTarget){if(!u.current&&!Pm(d))return}else if(!oc(d))return}n.setOpen(!0,xe(Gl,c.nativeEvent,c.currentTarget))},onBlur(c){l.current=!1;const d=c.relatedTarget,h=c.nativeEvent,y=Ie(d)&&d.hasAttribute(ya("focus-guard"))&&d.getAttribute("data-type")==="outside";s.start(0,()=>{var g;const b=n.select("domReferenceElement"),E=en(b?b.ownerDocument:document);!d&&E===b||Re((g=o.current.floatingContext)==null?void 0:g.refs.floating.current,E)||Re(b,E)||y||n.context.triggerElements.hasElement(c.relatedTarget)||n.setOpen(!1,xe(Gl,h))})}}),[o,n,a,s]);return m.useMemo(()=>i?{reference:f,trigger:f}:{},[i,f])}const ep=ya("safe-polygon"),vN=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${RC}`;function bN(e){return e?!!e.closest(vN):!1}function ER(e){const t=m.useRef(void 0),n=m.useRef(!1),r=m.useRef(void 0),o=m.useRef(!0),i=m.useRef(!1),a=m.useRef(()=>{}),l=m.useRef(!1),s=Cn(),u=Cn(),f=m.useRef(void 0);return m.useMemo(()=>{const c=e.context.dataRef.current;return c.hoverInteractionState||(c.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:o,performedPointerEventsMutationRef:i,unbindMouseMoveRef:a,restTimeoutPendingRef:l,openChangeTimeout:s,restTimeout:u,handleCloseOptionsRef:f}),c.hoverInteractionState},[e,t,n,r,o,i,a,l,s,u,f])}const SN=new Set(["click","mousedown"]);function og(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:l=!0,closeDelay:s=0,externalTree:u}=t,{pointerTypeRef:f,interactedInsideRef:c,handlerRef:d,performedPointerEventsMutationRef:h,unbindMouseMoveRef:y,restTimeoutPendingRef:b,openChangeTimeout:E,handleCloseOptionsRef:g}=ER(n),p=Lo(u),v=fr(),S=W(()=>c.current?!0:a.current.openEvent?SN.has(a.current.openEvent.type):!1),C=W(()=>{var P;const k=(P=a.current.openEvent)==null?void 0:P.type;return(k==null?void 0:k.includes("mouse"))&&k!=="mousedown"}),w=m.useCallback((k,P=!0)=>{const U=EN(s,f.current);U&&!d.current?E.start(U,()=>n.setOpen(!1,xe(yt,k))):P&&(E.clear(),n.setOpen(!1,xe(yt,k)))},[s,d,n,f,E]),R=W(()=>{y.current(),d.current=void 0}),x=W(()=>{if(h.current){const k=ct(o).body;k.style.pointerEvents="",k.removeAttribute(ep),h.current=!1}}),O=W(k=>{const P=At(k);if(!bN(P)){c.current=!1;return}c.current=!0});ie(()=>{r||(f.current=void 0,b.current=!1,c.current=!1,R(),x())},[r,f,b,c,R,x]),m.useEffect(()=>()=>{R()},[R]),m.useEffect(()=>x,[x]),ie(()=>{var k,P,U;if(l&&r&&(k=g.current)!=null&&k.blockPointerEvents&&C()&&Ie(i)&&o){h.current=!0;const A=ct(o).body;A.setAttribute(ep,"");const L=i,M=o,_=(U=(P=p==null?void 0:p.nodesRef.current.find(D=>D.id===v))==null?void 0:P.context)==null?void 0:U.elements.floating;return _&&(_.style.pointerEvents=""),A.style.pointerEvents="none",L.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{A.style.pointerEvents="",L.style.pointerEvents="",M.style.pointerEvents=""}}},[l,r,i,o,g,C,p,v,h]),m.useEffect(()=>{if(!l)return;function k(L){if(S()||!a.current.floatingContext||!n.select("open"))return;const M=n.context.triggerElements;L.relatedTarget&&M.hasElement(L.relatedTarget)||(x(),R(),S()||w(L))}function P(L){var M;E.clear(),x(),(M=d.current)==null||M.call(d,L),R()}function U(L){S()||w(L,!1)}const A=o;return A&&(A.addEventListener("mouseleave",k),A.addEventListener("mouseenter",P),A.addEventListener("mouseleave",U),A.addEventListener("pointerdown",O,!0)),()=>{A&&(A.removeEventListener("mouseleave",k),A.removeEventListener("mouseenter",P),A.removeEventListener("mouseleave",U),A.removeEventListener("pointerdown",O,!0))}})}function EN(e,t){return t&&!si(t)?0:typeof e=="function"?e():e}function xd(e){return typeof e=="function"?e():e}const CN={current:null};function rf(e,t={}){var D;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:o}=n.context,{enabled:i=!0,delay:a=0,handleClose:l=null,mouseOnly:s=!1,restMs:u=0,move:f=!0,triggerElementRef:c=CN,externalTree:d,isActiveTrigger:h=!0}=t,y=Lo(d),{pointerTypeRef:b,interactedInsideRef:E,handlerRef:g,blockMouseMoveRef:p,performedPointerEventsMutationRef:v,unbindMouseMoveRef:S,restTimeoutPendingRef:C,openChangeTimeout:w,restTimeout:R,handleCloseOptionsRef:x}=ER(n),O=Nt(l),k=Nt(a),P=Nt(u);h&&(x.current=(D=O.current)==null?void 0:D.__options);const U=W(()=>E.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=m.useCallback((T,N=!0)=>{const I=Su(k.current,"close",b.current);I&&!g.current?w.start(I,()=>n.setOpen(!1,xe(yt,T))):N&&(w.clear(),n.setOpen(!1,xe(yt,T)))},[k,g,n,b,w]),L=W(()=>{S.current(),g.current=void 0}),M=W(()=>{if(v.current){const T=ct(n.select("domReferenceElement")).body;T.style.pointerEvents="",T.removeAttribute(ep),v.current=!1}});m.useEffect(()=>{if(!i)return;function T(N){N.open||(w.clear(),R.clear(),p.current=!0,C.current=!1)}return o.on("openchange",T),()=>{o.off("openchange",T)}},[i,o,w,R,p,C]);const _=W(T=>{var q;if(U()||!r.current.floatingContext)return;const N=n.context.triggerElements;if(T.relatedTarget&&N.hasElement(T.relatedTarget))return;const I=c.current;(q=O.current)==null||q.call(O,{...r.current.floatingContext,tree:y,x:T.clientX,y:T.clientY,onClose(){M(),L(),!U()&&I===n.select("domReferenceElement")&&A(T)}})(T)});return m.useEffect(()=>{if(!i)return;const T=c.current??(h?n.select("domReferenceElement"):null);if(!Ie(T))return;function N(B){if(w.clear(),p.current=!1,s&&!si(b.current)||xd(P.current)>0&&!Su(k.current,"open"))return;const $=Su(k.current,"open",b.current),ue=n.select("domReferenceElement"),te=n.context.triggerElements,ce=(te.hasElement(B.target)||te.hasMatchingElement(Se=>Re(Se,B.target)))&&(!ue||!Re(ue,B.target)),oe=B.currentTarget??null,J=!n.select("open")||ce;$?w.start($,()=>{J&&n.setOpen(!0,xe(yt,B,oe))}):J&&n.setOpen(!0,xe(yt,B,oe))}function I(B){if(U()){M();return}S.current();const $=n.select("domReferenceElement"),ue=ct($);R.clear(),C.current=!1;const te=n.context.triggerElements;if(B.relatedTarget&&te.hasElement(B.relatedTarget))return;if(O.current&&r.current.floatingContext){n.select("open")||w.clear();const oe=c.current;g.current=O.current({...r.current.floatingContext,tree:y,x:B.clientX,y:B.clientY,onClose(){M(),L(),!U()&&oe===n.select("domReferenceElement")&&A(B,!0)}});const J=g.current;J(B),ue.addEventListener("mousemove",J),S.current=()=>{ue.removeEventListener("mousemove",J)};return}(b.current==="touch"?!Re(n.select("floatingElement"),B.relatedTarget):!0)&&A(B)}function q(B){_(B)}return n.select("open")&&T.addEventListener("mouseleave",q),f&&T.addEventListener("mousemove",N,{once:!0}),T.addEventListener("mouseenter",N),T.addEventListener("mouseleave",I),()=>{T.removeEventListener("mouseleave",q),f&&T.removeEventListener("mousemove",N),T.removeEventListener("mouseenter",N),T.removeEventListener("mouseleave",I)}},[L,M,p,r,k,A,n,i,O,_,h,U,s,f,b,P,R,C,w,c,y,S,g]),m.useMemo(()=>{function T(N){b.current=N.pointerType}return{onPointerDown:T,onPointerEnter:T,onMouseMove(N){const{nativeEvent:I}=N,q=N.currentTarget,B=n.select("domReferenceElement"),$=n.context.triggerElements,ue=n.select("open"),te=($.hasElement(N.target)||$.hasMatchingElement(oe=>Re(oe,N.target)))&&(!B||!Re(B,N.target));if(s&&!si(b.current)||ue&&!te||xd(P.current)===0||!te&&C.current&&N.movementX**2+N.movementY**2<2)return;R.clear();function ce(){!p.current&&(!ue||te)&&n.setOpen(!0,xe(yt,I,q))}b.current==="touch"?Gt.flushSync(()=>{ce()}):te&&ue?ce():(C.current=!0,R.start(xd(P.current),ce))}}},[p,s,n,b,P,R,C])}function Da(e=[]){const t=e.map(u=>u==null?void 0:u.reference),n=e.map(u=>u==null?void 0:u.floating),r=e.map(u=>u==null?void 0:u.item),o=e.map(u=>u==null?void 0:u.trigger),i=m.useCallback(u=>Fs(u,e,"reference"),t),a=m.useCallback(u=>Fs(u,e,"floating"),n),l=m.useCallback(u=>Fs(u,e,"item"),r),s=m.useCallback(u=>Fs(u,e,"trigger"),o);return m.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:l,getTriggerProps:s}),[i,a,l,s])}function Fs(e,t,n){var a;const r=new Map,o=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[Xh]="");for(const l in e)o&&e&&(l===EC||l===CC)||(i[l]=e[l]);for(let l=0;l<t.length;l+=1){let s;const u=(a=t[l])==null?void 0:a[n];typeof u=="function"?s=e?u(e):null:s=u,s&&Uv(i,s,o,r)}return Uv(i,e,o,r),i}function Uv(e,t,n,r){var o;for(const i in t){const a=t[i];n&&(i===EC||i===CC)||(i.startsWith("on")?(r.has(i)||r.set(i,[]),typeof a=="function"&&((o=r.get(i))==null||o.push(a),e[i]=(...l)=>{var s;return(s=r.get(i))==null?void 0:s.map(u=>u(...l)).find(u=>u!==void 0)})):e[i]=a)}}const RN="Escape";function of(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function qs(e,t){return of(t,e===Dm||e===cs,e===Eo||e===Co)}function Td(e,t,n){return of(t,e===cs,n?e===Eo:e===Co)||e==="Enter"||e===" "||e===""}function wN(e,t,n){return of(t,n?e===Eo:e===Co,e===cs)}function _N(e,t,n,r){const o=n?e===Co:e===Eo,i=e===Dm;return t==="both"||t==="horizontal"&&r&&r>1?e===RN:of(t,o,i)}function xN(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:l,activeIndex:s,onNavigate:u=()=>{},enabled:f=!0,selectedIndex:c=null,allowEscape:d=!1,loopFocus:h=!1,nested:y=!1,rtl:b=!1,virtual:E=!1,focusItemOnOpen:g="auto",focusItemOnHover:p=!0,openOnArrowKeyDown:v=!0,disabledIndices:S=void 0,orientation:C="vertical",parentOrientation:w,cols:R=1,scrollItemIntoView:x=!0,itemSizes:O,dense:k=!1,id:P,resetOnPointerLeave:U=!0,externalTree:A}=t,L=ic(o),M=Nt(L),_=fr(),D=Lo(A);ie(()=>{a.current.orientation=C},[a,C]);const T=Kh(i),N=m.useRef(g),I=m.useRef(c??-1),q=m.useRef(null),B=m.useRef(!0),$=W(X=>{u(I.current===-1?null:I.current,X)}),ue=m.useRef($),te=m.useRef(!!o),ce=m.useRef(r),oe=m.useRef(!1),J=m.useRef(!1),Se=Nt(S),Ae=Nt(r),G=Nt(x),Y=Nt(c),ne=Nt(U),Le=W(()=>{function X(ye){E?D==null||D.events.emit("virtualfocus",ye):Eu(ye,{sync:oe.current,preventScroll:!0})}const ae=l.current[I.current],j=J.current;ae&&X(ae),(oe.current?ye=>ye():requestAnimationFrame)(()=>{var Te;const ye=l.current[I.current]||ae;if(!ye)return;ae||X(ye);const me=G.current;me&&Q&&(j||!B.current)&&((Te=ye.scrollIntoView)==null||Te.call(ye,typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});ie(()=>{f&&(r&&o?(I.current=c??-1,N.current&&c!=null&&(J.current=!0,$())):te.current&&(I.current=-1,ue.current()))},[f,r,o,c,$]),ie(()=>{if(f){if(!r){oe.current=!1;return}if(o)if(s==null){if(oe.current=!1,Y.current!=null)return;if(te.current&&(I.current=-1,Le()),(!ce.current||!te.current)&&N.current&&(q.current!=null||N.current===!0&&q.current==null)){let X=0;const ae=()=>{l.current[0]==null?(X<2&&(X?requestAnimationFrame:queueMicrotask)(ae),X+=1):(I.current=q.current==null||Td(q.current,C,b)||y?bd(l):yv(l),q.current=null,$())};ae()}}else Sl(l,s)||(I.current=s,Le(),J.current=!1)}},[f,r,o,s,Y,y,l,C,b,$,Le,Se]),ie(()=>{var ye,me;if(!f||o||!D||E||!te.current)return;const X=D.nodesRef.current,ae=(me=(ye=X.find(be=>be.id===_))==null?void 0:ye.context)==null?void 0:me.elements.floating,j=en(ct(o)),Z=X.some(be=>be.context&&Re(be.context.elements.floating,j));ae&&!Z&&B.current&&ae.focus({preventScroll:!0})},[f,o,D,_,E]),ie(()=>{ue.current=$,ce.current=r,te.current=!!o}),ie(()=>{r||(q.current=null,N.current=g)},[r,g]);const pe=s!=null,Q=m.useMemo(()=>{function X(j){if(!Ae.current)return;const Z=l.current.indexOf(j.currentTarget);Z!==-1&&I.current!==Z&&(I.current=Z,$(j))}return{onFocus(j){oe.current=!0,X(j)},onClick:({currentTarget:j})=>j.focus({preventScroll:!0}),onMouseMove(j){oe.current=!0,J.current=!1,p&&X(j)},onPointerLeave(j){var ye;if(!Ae.current||!B.current||j.pointerType==="touch")return;oe.current=!0;const Z=j.relatedTarget;!p||l.current.includes(Z)||ne.current&&(I.current=-1,$(j),E||(ye=M.current)==null||ye.focus({preventScroll:!0}))}}},[Ae,M,p,l,$,ne,E]),K=m.useCallback(()=>{var X,ae,j;return w??((j=(ae=(X=D==null?void 0:D.nodesRef.current.find(Z=>Z.id===_))==null?void 0:X.context)==null?void 0:ae.dataRef)==null?void 0:j.current.orientation)},[_,D,w]),re=W(X=>{if(B.current=!1,oe.current=!0,X.which===229||!Ae.current&&X.currentTarget===M.current)return;if(y&&_N(X.key,C,b,R)){qs(X.key,K())||Bt(X),n.setOpen(!1,xe(bu,X.nativeEvent)),tt(i)&&(E?D==null||D.events.emit("virtualfocus",i):i.focus());return}const ae=I.current,j=bd(l,S),Z=yv(l,S);if(T||(X.key==="Home"&&(Bt(X),I.current=j,$(X)),X.key==="End"&&(Bt(X),I.current=Z,$(X))),R>1){const ye=O||Array.from({length:l.current.length},()=>({width:1,height:1})),me=qO(ye,R,k),be=me.findIndex($t=>$t!=null&&!El(l,$t,S)),Te=me.reduce(($t,un,he)=>un!=null&&!El(l,un,S)?he:$t,-1),De=me[FO({current:me.map($t=>$t!=null?l.current[$t]:null)},{event:X,orientation:C,loopFocus:h,rtl:b,cols:R,disabledIndices:XO([...(typeof S!="function"?S:null)||l.current.map(($t,un)=>El(l,un,S)?un:void 0),void 0],me),minIndex:be,maxIndex:Te,prevIndex:YO(I.current>Z?j:I.current,ye,me,R,X.key===cs?"bl":X.key===(b?Eo:Co)?"tr":"tl"),stopEvent:!0})];if(De!=null&&(I.current=De,$(X)),C==="both")return}if(qs(X.key,C)){if(Bt(X),r&&!E&&en(X.currentTarget.ownerDocument)===X.currentTarget){I.current=Td(X.key,C,b)?j:Z,$(X);return}Td(X.key,C,b)?h?ae>=Z?d&&ae!==l.current.length?I.current=-1:(oe.current=!1,I.current=j):I.current=Ut(l,{startingIndex:ae,disabledIndices:S}):I.current=Math.min(Z,Ut(l,{startingIndex:ae,disabledIndices:S})):h?ae<=j?d&&ae!==-1?I.current=l.current.length:(oe.current=!1,I.current=Z):I.current=Ut(l,{startingIndex:ae,decrement:!0,disabledIndices:S}):I.current=Math.max(j,Ut(l,{startingIndex:ae,decrement:!0,disabledIndices:S})),Sl(l,I.current)&&(I.current=-1),$(X)}}),de=m.useMemo(()=>E&&r&&pe&&{"aria-activedescendant":`${P}-${s}`},[E,r,pe,P,s]),ge=m.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...T?{}:de,onKeyDown(X){if(X.key==="Tab"&&X.shiftKey&&r&&!E){const ae=At(X.nativeEvent);if(ae&&!Re(M.current,ae))return;Bt(X),n.setOpen(!1,xe(Hr,X.nativeEvent)),tt(i)&&i.focus();return}re(X)},onPointerMove(){B.current=!0}}),[de,re,M,C,T,n,r,E,i]),le=m.useMemo(()=>{function X(j){g==="auto"&&wC(j.nativeEvent)&&(N.current=!E)}function ae(j){N.current=g,g==="auto"&&_C(j.nativeEvent)&&(N.current=!0)}return{onKeyDown(j){const Z=n.select("open");B.current=!1;const ye=j.key.startsWith("Arrow"),me=wN(j.key,K(),b),be=qs(j.key,C),Te=(y?me:be)||j.key==="Enter"||j.key.trim()==="";if(E&&Z)return re(j);if(!(!Z&&!v&&ye)){if(Te){const De=qs(j.key,K());q.current=y&&De?null:j.key}if(y){me&&(Bt(j),Z?(I.current=bd(l,Se.current),$(j)):n.setOpen(!0,xe(bu,j.nativeEvent,j.currentTarget)));return}be&&(Y.current!=null&&(I.current=Y.current),Bt(j),!Z&&v?n.setOpen(!0,xe(bu,j.nativeEvent,j.currentTarget)):re(j),Z&&$(j))}},onFocus(j){n.select("open")&&!E&&(I.current=-1,$(j))},onPointerDown:ae,onPointerEnter:ae,onMouseDown:X,onClick:X}},[re,Se,g,l,y,$,n,v,C,K,b,Y,E]),se=m.useMemo(()=>({...de,...le}),[de,le]);return m.useMemo(()=>f?{reference:se,floating:ge,item:Q,trigger:le}:{},[f,se,ge,le,Q])}const TN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function CR(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),i=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{enabled:l=!0,role:s="dialog"}=t,u=jr(),f=(i==null?void 0:i.id)||u,c=m.useMemo(()=>{var v;return((v=ic(a))==null?void 0:v.id)||o},[a,o]),d=TN.get(s)??s,y=fr()!=null,b=m.useMemo(()=>d==="tooltip"||s==="label"?Ct:{"aria-haspopup":d==="alertdialog"?"dialog":d,"aria-expanded":"false",...d==="listbox"&&{role:"combobox"},...d==="menu"&&y&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[d,y,s]),E=m.useMemo(()=>d==="tooltip"||s==="label"?{[`aria-${s==="label"?"labelledby":"describedby"}`]:r?c:void 0}:{...b,"aria-expanded":r?"true":"false","aria-controls":r?c:void 0,...d==="menu"&&{id:f}},[d,c,r,f,s,b]),g=m.useMemo(()=>{const v={id:c,...d&&{role:d}};return d==="tooltip"||s==="label"?v:{...v,...d==="menu"&&{"aria-labelledby":f}}},[d,c,f,s]),p=m.useCallback(({active:v,selected:S})=>{const C={role:"option",...v&&{id:`${c}-fui-option`}};switch(s){case"select":case"combobox":return{...C,"aria-selected":S}}return{}},[c,s]);return m.useMemo(()=>l?{reference:E,floating:g,item:p,trigger:b}:{},[l,E,g,b,p])}function AN(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.context.dataRef,{listRef:i,activeIndex:a,onMatch:l,onTypingChange:s,enabled:u=!0,findMatch:f=null,resetMs:c=750,ignoreKeys:d=dc,selectedIndex:h=null}=t,y=Cn(),b=m.useRef(""),E=m.useRef(h??a??-1),g=m.useRef(null);ie(()=>{r&&(y.clear(),g.current=null,b.current="")},[r,y]),ie(()=>{r&&b.current===""&&(E.current=h??a??-1)},[r,h,a]);const p=W(w=>{w?o.current.typing||(o.current.typing=w,s==null||s(w)):o.current.typing&&(o.current.typing=w,s==null||s(w))}),v=W(w=>{function R(U,A,L){const M=f?f(A,L):A.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(L.toLocaleLowerCase()))===0);return M?U.indexOf(M):-1}const x=i.current;if(b.current.length>0&&b.current[0]!==" "&&(R(x,x,b.current)===-1?p(!1):w.key===" "&&Bt(w)),x==null||d.includes(w.key)||w.key.length!==1||w.ctrlKey||w.metaKey||w.altKey)return;r&&w.key!==" "&&(Bt(w),p(!0)),x.every(U=>{var A,L;return U?((A=U[0])==null?void 0:A.toLocaleLowerCase())!==((L=U[1])==null?void 0:L.toLocaleLowerCase()):!0})&&b.current===w.key&&(b.current="",E.current=g.current),b.current+=w.key,y.start(c,()=>{b.current="",E.current=g.current,p(!1)});const k=E.current,P=R(x,[...x.slice((k||0)+1),...x.slice(0,(k||0)+1)],b.current);P!==-1?(l==null||l(P),g.current=P):w.key!==" "&&(b.current="",p(!1))}),S=m.useMemo(()=>({onKeyDown:v}),[v]),C=m.useMemo(()=>({onKeyDown:v,onKeyUp(w){w.key===" "&&p(!1)}}),[v,p]);return m.useMemo(()=>u?{reference:S,floating:C}:{},[u,S,C])}function Bv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,l=i-1;a<i;l=a++){const[s,u]=t[a]||[0,0],[f,c]=t[l]||[0,0];u>=r!=c>=r&&n<=(f-s)*(r-u)/(c-u)+s&&(o=!o)}return o}function ON(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function af(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o=new Kn;let i=!1,a=null,l=null,s=typeof performance<"u"?performance.now():0;function u(c,d){const h=performance.now(),y=h-s;if(a===null||l===null||y===0)return a=c,l=d,s=h,null;const b=c-a,E=d-l,p=Math.sqrt(b*b+E*E)/y;return a=c,l=d,s=h,p}const f=({x:c,y:d,placement:h,elements:y,onClose:b,nodeId:E,tree:g})=>function(v){function S(){o.clear(),b()}if(o.clear(),!y.domReference||!y.floating||h==null||c==null||d==null)return;const{clientX:C,clientY:w}=v,R=[C,w],x=At(v),O=v.type==="mouseleave",k=Re(y.floating,x),P=Re(y.domReference,x),U=y.domReference.getBoundingClientRect(),A=y.floating.getBoundingClientRect(),L=h.split("-")[0],M=c>A.right-A.width/2,_=d>A.bottom-A.height/2,D=ON(R,U),T=A.width>U.width,N=A.height>U.height,I=(T?U:A).left,q=(T?U:A).right,B=(N?U:A).top,$=(N?U:A).bottom;if(k&&(i=!0,!O))return;if(P&&(i=!1),P&&!O){i=!0;return}if(O&&Ie(v.relatedTarget)&&Re(y.floating,v.relatedTarget)||g&&ti(g.nodesRef.current,E).some(({context:ce})=>ce==null?void 0:ce.open))return;if(L==="top"&&d>=U.bottom-1||L==="bottom"&&d<=U.top+1||L==="left"&&c>=U.right-1||L==="right"&&c<=U.left+1)return S();let ue=[];switch(L){case"top":ue=[[I,U.top+1],[I,A.bottom-1],[q,A.bottom-1],[q,U.top+1]];break;case"bottom":ue=[[I,A.top+1],[I,U.bottom-1],[q,U.bottom-1],[q,A.top+1]];break;case"left":ue=[[A.right-1,$],[A.right-1,B],[U.left+1,B],[U.left+1,$]];break;case"right":ue=[[U.right-1,$],[U.right-1,B],[A.left+1,B],[A.left+1,$]];break}function te([ce,oe]){switch(L){case"top":{const J=[T?ce+t/2:M?ce+t*4:ce-t*4,oe+t+1],Se=[T?ce-t/2:M?ce+t*4:ce-t*4,oe+t+1],Ae=[[A.left,M||T?A.bottom-t:A.top],[A.right,M?T?A.bottom-t:A.top:A.bottom-t]];return[J,Se,...Ae]}case"bottom":{const J=[T?ce+t/2:M?ce+t*4:ce-t*4,oe-t],Se=[T?ce-t/2:M?ce+t*4:ce-t*4,oe-t],Ae=[[A.left,M||T?A.top+t:A.bottom],[A.right,M?T?A.top+t:A.bottom:A.top+t]];return[J,Se,...Ae]}case"left":{const J=[ce+t+1,N?oe+t/2:_?oe+t*4:oe-t*4],Se=[ce+t+1,N?oe-t/2:_?oe+t*4:oe-t*4];return[...[[_||N?A.right-t:A.left,A.top],[_?N?A.right-t:A.left:A.right-t,A.bottom]],J,Se]}case"right":{const J=[ce-t,N?oe+t/2:_?oe+t*4:oe-t*4],Se=[ce-t,N?oe-t/2:_?oe+t*4:oe-t*4],Ae=[[_||N?A.left+t:A.right,A.top],[_?N?A.left+t:A.right:A.left+t,A.bottom]];return[J,Se,...Ae]}default:return[]}}if(!Bv([C,w],ue)){if(i&&!D)return S();if(!O&&r){const ce=u(v.clientX,v.clientY);if(ce!==null&&ce<.1)return S()}Bv([C,w],te([c,d]))?!i&&r&&o.start(40,S):S()}};return f.__options={blockPointerEvents:n},f}const MN={...ng,disabled:fe(e=>e.disabled),instantType:fe(e=>e.instantType),isInstantPhase:fe(e=>e.isInstantPhase),trackCursorAxis:fe(e=>e.trackCursorAxis),disableHoverablePopup:fe(e=>e.disableHoverablePopup),lastOpenChangeReason:fe(e=>e.openChangeReason),closeDelay:fe(e=>e.closeDelay)};class lf extends nf{constructor(n){super({...kN(),...n},{popupRef:m.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new ps},MN);z(this,"setOpen",(n,r)=>{var u,f;const o=r.reason,i=o===yt,a=n&&o===Gl,l=!n&&(o===Fn||o===ds);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(f=(u=this.context).onOpenChange)==null||f.call(u,n,r),r.isCanceled)return;const s=()=>{var h;const c={open:n,openChangeReason:o};a?c.instantType="focus":l?c.instantType="dismiss":o===yt&&(c.instantType=void 0);const d=((h=r.trigger)==null?void 0:h.id)??null;(d||n)&&(c.activeTriggerId=d,c.activeTriggerElement=r.trigger??null),this.update(c)};i?Gt.flushSync(s):s()})}static useStore(n,r){const o=on(()=>n??new lf(r)).current,i=rg({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=i,o}}function kN(){return{...tg(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0}}function D3(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:o=!1,trackCursorAxis:i="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:s,handle:u,triggerId:f,defaultTriggerId:c=null,children:d}=e,h=lf.useStore(u==null?void 0:u.store,{open:r??n,activeTriggerId:f!==void 0?f:c});h.useControlledProp("open",r,n),h.useControlledProp("activeTriggerId",f,c),h.useContextCallback("onOpenChange",l),h.useContextCallback("onOpenChangeComplete",s);const y=h.useState("open"),b=h.useState("activeTriggerId"),E=h.useState("payload");h.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:o});const g=!t&&y;ie(()=>{y&&t&&h.setOpen(!1,xe(vM))},[y,t,h]),h.useSyncedValue("disabled",t),Jm(h);const{forceUnmount:p,transitionStatus:v}=eg(g,h),S=h.useState("isInstantPhase"),C=h.useState("instantType"),w=h.useState("lastOpenChangeReason"),R=m.useRef(null);ie(()=>{v==="ending"&&w===$m||v!=="ending"&&S?(C!=="delay"&&(R.current=C),h.set("instantType","delay")):R.current!==null&&(h.set("instantType",R.current),R.current=null)},[v,S,w,C,h]),ie(()=>{g&&b==null&&h.set("payload",void 0)},[h,b,g]);const x=m.useCallback(()=>{h.setOpen(!1,NN(h,ui))},[h]);m.useImperativeHandle(a,()=>({unmount:p,close:x}),[p,x]);const O=h.useState("floatingRootContext"),k=SR(O,{enabled:!t}),P=Qm(O,{enabled:!t,referencePress:!0}),U=GM(O,{enabled:!t&&i!=="none",axis:i==="none"?void 0:i}),{getReferenceProps:A,getFloatingProps:L,getTriggerProps:M}=Da([k,P,U]),_=m.useMemo(()=>A(),[A]),D=m.useMemo(()=>M(),[M]),T=m.useMemo(()=>L(),[L]);return h.useSyncedValues({floatingRootContext:O,activeTriggerProps:_,inactiveTriggerProps:D,popupProps:T}),ee.jsx(mC.Provider,{value:h,children:typeof d=="function"?d({payload:E}):d})}function NN(e,t){const n=xe(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}let mc=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const LN={[mc.startingStyle]:""},DN={[mc.endingStyle]:""},Pa={transitionStatus(e){return e==="starting"?LN:e==="ending"?DN:null}};let ig=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=mc.startingStyle]="startingStyle",e[e.endingStyle=mc.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e}({}),tp=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const PN={[tp.popupOpen]:""},IN={[tp.popupOpen]:"",[tp.pressed]:""},zN={[ig.open]:""},UN={[ig.closed]:""},BN={[ig.anchorHidden]:""},ag={open(e){return e?PN:null}},np={open(e){return e?IN:null}},Vr={open(e){return e?zN:UN},anchorHidden(e){return e?BN:null}};function Ei(e){return jr(e,"base-ui")}const HN=m.createContext(void 0);function GN(){return m.useContext(HN)}const $N=600,P3=m.forwardRef(function(t,n){const{className:r,render:o,handle:i,payload:a,disabled:l,delay:s,closeDelay:u,id:f,...c}=t,d=Ma(!0),h=(i==null?void 0:i.store)??d;if(!h)throw new Error(et(82));const y=Ei(f),b=h.useState("isTriggerActive",y),E=h.useState("floatingRootContext"),g=h.useState("isOpenedByTrigger",y),p=m.useRef(null),v=s??$N,S=u??0,{registerTrigger:C,isMountedByThisTrigger:w}=Wm(y,p,h,{payload:a,closeDelay:S}),R=GN(),{delayRef:x,isInstantPhase:O,hasProvider:k}=SM(E,{open:g});h.useSyncedValue("isInstantPhase",O);const P=h.useState("disabled"),U=l??P,A=h.useState("trackCursorAxis"),L=h.useState("disableHoverablePopup"),M=rf(E,{enabled:!U,mouseOnly:!0,move:!1,handleClose:!L&&A!=="both"?af():null,restMs(){const N=R==null?void 0:R.delay,I=typeof x.current=="object"?x.current.open:void 0;let q=v;return k&&(I!==0?q=s??N??v:q=0),q},delay(){const N=typeof x.current=="object"?x.current.close:void 0;let I=S;return u==null&&k&&(I=N),{close:I}},triggerElementRef:p,isActiveTrigger:b}),_=m.useMemo(()=>({open:g}),[g]),D=h.useState("triggerProps",w);return He("button",t,{state:_,ref:[n,C,p],props:[M,D,{id:y},c],stateAttributesMapping:ag})}),RR=m.createContext(void 0);function jN(){const e=m.useContext(RR);if(e===void 0)throw new Error(et(70));return e}const wR=m.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,...l}=t,{portalNode:s,portalSubtree:u}=JC({container:o,ref:n,componentProps:t,elementProps:l});return!u&&!s?null:ee.jsxs(m.Fragment,{children:[u,s&&Gt.createPortal(r,s)]})}),I3=m.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t;return Ma().useState("mounted")||r?ee.jsx(RR.Provider,{value:r,children:ee.jsx(wR,{ref:n,...o})}):null}),_R=m.createContext(void 0);function xR(){const e=m.useContext(_R);if(e===void 0)throw new Error(et(71));return e}const VN=m.createContext(void 0);function sf(){const e=m.useContext(VN);return(e==null?void 0:e.direction)??"ltr"}const FN=e=>({name:"arrow",options:e,async fn(t){var N,I;const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:u,padding:f=0,offsetParent:c="real"}=Br(e,t)||{};if(u==null)return{};const d=TC(f),h={x:n,y:r},y=Um(o),b=zm(y),E=await a.getDimensions(u),g=y==="y",p=g?"top":"left",v=g?"bottom":"right",S=g?"clientHeight":"clientWidth",C=i.reference[b]+i.reference[y]-h[y]-i.floating[b],w=h[y]-i.reference[y],R=c==="real"?await((N=a.getOffsetParent)==null?void 0:N.call(a,u)):l.floating;let x=l.floating[S]||i.floating[b];(!x||!await((I=a.isElement)==null?void 0:I.call(a,R)))&&(x=l.floating[S]||i.floating[b]);const O=C/2-w/2,k=x/2-E[b]/2-1,P=Math.min(d[p],k),U=Math.min(d[v],k),A=P,L=x-E[b]-U,M=x/2-E[b]/2+O,_=Qh(A,M,L),D=!s.arrow&&No(o)!=null&&M!==_&&i.reference[b]/2-(M<A?P:U)-E[b]/2<0,T=D?M<A?M-A:M-L:0;return{[y]:h[y]+T,data:{[y]:_,centerOffset:M-_-T,...D&&{alignmentOffset:T}},reset:D}}}),qN=(e,t)=>({...FN(e),options:[e,t]}),YN={name:"hide",async fn(e){var l;const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:((l=(await Tk().fn(e)).data)==null?void 0:l.referenceHidden)||i}}}},Ru={sideX:"left",sideY:"top"},TR={name:"adaptiveOrigin",async fn(e){var p,v;const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:l}=e,s=at(o),u=s.getComputedStyle(o);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:n,data:Ru};const c=await((p=i.getOffsetParent)==null?void 0:p.call(i,o));let d={width:0,height:0};if(a==="fixed"&&(s!=null&&s.visualViewport))d={width:s.visualViewport.width,height:s.visualViewport.height};else if(c===s){const S=Xt(o);d={width:S.documentElement.clientWidth,height:S.documentElement.clientHeight}}else await((v=i.isElement)==null?void 0:v.call(i,c))&&(d=await i.getDimensions(c));const h=nn(l);let y=t,b=n;h==="left"&&(y=d.width-(t+r.width)),h==="top"&&(b=d.height-(n+r.height));const E=h==="left"?"right":Ru.sideX,g=h==="top"?"bottom":Ru.sideY;return{x:y,y:b,data:{sideX:E,sideY:g}}}};function AR(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Hv(e,t,n){const{rects:r,placement:o}=e;return{side:AR(t,nn(o),n),align:No(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function lg(e){var Fr,jt;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:s=5,sticky:u=!1,arrowPadding:f=5,disableAnchorTracking:c=!1,keepMounted:d=!1,floatingRootContext:h,mounted:y,collisionAvoidance:b,shiftCrossAxis:E=!1,nodeId:g,adaptiveOrigin:p,lazyFlip:v=!1,externalTree:S}=e,[C,w]=m.useState(null);!y&&C!==null&&w(null);const R=b.side||"flip",x=b.align||"flip",O=b.fallbackAxisSide||"end",k=typeof t=="function"?t:void 0,P=W(k),U=k?P:t,A=Nt(t),M=sf()==="rtl",_=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":M?"left":"right","inline-start":M?"right":"left"}[r],D=i==="center"?_:`${_}-${i}`;let T=s;const N=1,I=r==="bottom"?N:0,q=r==="top"?N:0,B=r==="right"?N:0,$=r==="left"?N:0;typeof T=="number"?T={top:T+I,right:T+$,bottom:T+q,left:T+B}:T&&(T={top:(T.top||0)+I,right:(T.right||0)+$,bottom:(T.bottom||0)+q,left:(T.left||0)+B});const ue={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:T},te=m.useRef(null),ce=Nt(o),oe=Nt(a),Ae=[Ck(ze=>{const st=Hv(ze,r,M),Vt=typeof ce.current=="function"?ce.current(st):ce.current,rt=typeof oe.current=="function"?oe.current(st):oe.current;return{mainAxis:Vt,crossAxis:rt,alignmentAxis:rt}},[typeof o!="function"?o:0,typeof a!="function"?a:0,M,r])],G=x==="none"&&R!=="shift",Y=!G&&(u||E||R==="shift"),ne=R==="none"?null:_k({...ue,padding:{top:T.top+N,right:T.right+N,bottom:T.bottom+N,left:T.left+N},mainAxis:!E&&R==="flip",crossAxis:x==="flip"?"alignment":!1,fallbackAxisSideDirection:O}),Le=G?null:Rk(ze=>{const st=Xt(ze.elements.floating).documentElement;return{...ue,rootBoundary:E?{x:0,y:0,width:st.clientWidth,height:st.clientHeight}:void 0,mainAxis:x!=="none",crossAxis:Y,limiter:u||E?void 0:wk(Vt=>{if(!te.current)return{};const{width:rt,height:hr}=te.current.getBoundingClientRect(),pr=Ln(nn(Vt.placement)),Es=pr==="y"?rt:hr,xf=pr==="y"?T.left+T.right:T.top+T.bottom;return{offset:Es/2+xf/2}})}},[ue,u,E,T,x]);R==="shift"||x==="shift"||i==="center"?Ae.push(Le,ne):Ae.push(ne,Le),Ae.push(xk({...ue,apply({elements:{floating:ze},rects:{reference:st},availableWidth:Vt,availableHeight:rt}){Object.entries({"--available-width":`${Vt}px`,"--available-height":`${rt}px`,"--anchor-width":`${st.width}px`,"--anchor-height":`${st.height}px`}).forEach(([hr,pr])=>{ze.style.setProperty(hr,pr)})}}),qN(()=>({element:te.current||document.createElement("div"),padding:f,offsetParent:"floating"}),[f]),{name:"transformOrigin",fn(ze){var Tg,Ag,Og;const{elements:st,middlewareData:Vt,placement:rt,rects:hr,y:pr}=ze,Es=nn(rt),xf=Ln(Es),Ri=te.current,x_=((Tg=Vt.arrow)==null?void 0:Tg.x)||0,T_=((Ag=Vt.arrow)==null?void 0:Ag.y)||0,A_=(Ri==null?void 0:Ri.clientWidth)||0,O_=(Ri==null?void 0:Ri.clientHeight)||0,Tf=x_+A_/2,xg=T_+O_/2,M_=Math.abs(((Og=Vt.shift)==null?void 0:Og.y)||0),k_=hr.reference.height/2,Ba=typeof o=="function"?o(Hv(ze,r,M)):o,N_=M_>Ba,L_={top:`${Tf}px calc(100% + ${Ba}px)`,bottom:`${Tf}px ${-Ba}px`,left:`calc(100% + ${Ba}px) ${xg}px`,right:`${-Ba}px ${xg}px`}[Es],D_=`${Tf}px ${hr.reference.y+k_-pr}px`;return st.floating.style.setProperty("--transform-origin",Y&&xf==="y"&&N_?D_:L_),{}}},YN,p),ie(()=>{!y&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[y,h]);const pe=m.useMemo(()=>({elementResize:!c&&typeof ResizeObserver<"u",layoutShift:!c&&typeof IntersectionObserver<"u"}),[c]),{refs:Q,elements:K,x:re,y:de,middlewareData:ge,update:le,placement:se,context:X,isPositioned:ae,floatingStyles:j}=yN({rootContext:h,placement:D,middleware:Ae,strategy:n,whileElementsMounted:d?void 0:(...ze)=>Dv(...ze,pe),nodeId:g,externalTree:S}),{sideX:Z,sideY:ye}=ge.adaptiveOrigin||Ru,me=ae?n:"fixed",be=m.useMemo(()=>p?{position:me,[Z]:re,[ye]:de}:{position:me,...j},[p,me,Z,re,ye,de,j]),Te=m.useRef(null);ie(()=>{if(!y)return;const ze=A.current,st=typeof ze=="function"?ze():ze,rt=(Gv(st)?st.current:st)||null||null;rt!==Te.current&&(Q.setPositionReference(rt),Te.current=rt)},[y,Q,U,A]),m.useEffect(()=>{if(!y)return;const ze=A.current;typeof ze!="function"&&Gv(ze)&&ze.current!==Te.current&&(Q.setPositionReference(ze.current),Te.current=ze.current)},[y,Q,U,A]),m.useEffect(()=>{if(d&&y&&K.domReference&&K.floating)return Dv(K.domReference,K.floating,le,pe)},[d,y,K,le,pe]);const De=nn(se),$t=AR(r,De,M),un=No(se)||"center",he=!!((Fr=ge.hide)!=null&&Fr.referenceHidden);ie(()=>{v&&y&&ae&&w(De)},[v,y,ae,De]);const Pe=m.useMemo(()=>{var ze,st;return{position:"absolute",top:(ze=ge.arrow)==null?void 0:ze.y,left:(st=ge.arrow)==null?void 0:st.x}},[ge.arrow]),lt=((jt=ge.arrow)==null?void 0:jt.centerOffset)!==0;return m.useMemo(()=>({positionerStyles:be,arrowStyles:Pe,arrowRef:te,arrowUncentered:lt,side:$t,align:un,physicalSide:De,anchorHidden:he,refs:Q,context:X,isPositioned:ae,update:le}),[be,Pe,te,lt,$t,un,De,he,Q,X,ae,le])}function Gv(e){return e!=null&&"current"in e}function ms(e){return e==="starting"?pM:Ct}const z3=m.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:a="absolute",side:l="top",align:s="center",sideOffset:u=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:E=Gm,...g}=t,p=Ma(),v=jN(),S=p.useState("open"),C=p.useState("mounted"),w=p.useState("trackCursorAxis"),R=p.useState("disableHoverablePopup"),x=p.useState("floatingRootContext"),O=p.useState("instantType"),k=p.useState("transitionStatus"),P=lg({anchor:i,positionMethod:a,floatingRootContext:x,mounted:C,side:l,sideOffset:u,align:s,alignOffset:f,collisionBoundary:c,collisionPadding:d,sticky:y,arrowPadding:h,disableAnchorTracking:b,keepMounted:v,collisionAvoidance:E,adaptiveOrigin:TR}),U=m.useMemo(()=>{const _={};return(!S||w==="both"||R)&&(_.pointerEvents="none"),{role:"presentation",hidden:!C,style:{...P.positionerStyles,..._}}},[S,w,R,C,P.positionerStyles]),A=m.useMemo(()=>({open:S,side:P.side,align:P.align,anchorHidden:P.anchorHidden,instant:w!=="none"?"tracking-cursor":O}),[S,P.side,P.align,P.anchorHidden,w,O]),L=m.useMemo(()=>({...A,arrowRef:P.arrowRef,arrowStyles:P.arrowStyles,arrowUncentered:P.arrowUncentered}),[A,P.arrowRef,P.arrowStyles,P.arrowUncentered]),M=He("div",t,{state:A,props:[U,ms(k),g],ref:[n,p.useStateSetter("positionerElement")],stateAttributesMapping:Vr});return ee.jsx(_R.Provider,{value:L,children:M})});function $v(e){const t=an(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r;return(ma(n)!==i||ma(r)!==a)&&(n=i,r=a),{width:n,height:r}}const XN=typeof ResizeObserver<"u",KN=()=>!0;function OR(e){const{popupElement:t,positionerElement:n,content:r,mounted:o,enabled:i=KN,onMeasureLayout:a,onMeasureLayoutComplete:l,side:s,direction:u}=e,f=m.useRef(!0),c=hs(t,!0,!1),d=Si(),h=m.useRef(null),y=W(a),b=W(l),E=m.useMemo(()=>{let g=s==="top",p=s==="left";return u==="rtl"?(g=g||s==="inline-end",p=p||s==="inline-end"):(g=g||s==="inline-start",p=p||s==="inline-start"),g?{position:"absolute",[s==="top"?"bottom":"top"]:"0",[p?"right":"left"]:"0"}:Ct},[s,u]);ie(()=>{if(!o||!i()||!XN){f.current=!0,h.current=null;return}if(!t||!n)return;Object.entries(E).forEach(([O,k])=>{t.style.setProperty(O,k)});const g=new ResizeObserver(O=>{const k=O[0];k&&(h.current===null?h.current={width:Math.ceil(k.borderBoxSize[0].inlineSize),height:Math.ceil(k.borderBoxSize[0].blockSize)}:(h.current.width=Math.ceil(k.borderBoxSize[0].inlineSize),h.current.height=Math.ceil(k.borderBoxSize[0].blockSize)))});g.observe(t),t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto");const p=Ka(t,"position","static"),v=Ka(t,"transform","none"),S=Ka(t,"scale","1"),C=Ka(n,"--available-width","max-content"),w=Ka(n,"--available-height","max-content");if(y==null||y(),f.current||h.current===null){n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const O=$v(t);return n.style.setProperty("--positioner-width",`${O.width}px`),n.style.setProperty("--positioner-height",`${O.height}px`),p(),v(),S(),C(),w(),b==null||b(null,O),f.current=!1,()=>{g.disconnect()}}t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto"),n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const R=$v(t);t.style.setProperty("--popup-width",`${h.current.width}px`),t.style.setProperty("--popup-height",`${h.current.height}px`),p(),v(),C(),w(),b==null||b(h.current,R),n.style.setProperty("--positioner-width",`${R.width}px`),n.style.setProperty("--positioner-height",`${R.height}px`);const x=new AbortController;return d.request(()=>{t.style.setProperty("--popup-width",`${R.width}px`),t.style.setProperty("--popup-height",`${R.height}px`),c(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},x.signal)}),()=>{g.disconnect(),x.abort(),d.cancel()}},[r,t,n,c,d,i,o,y,b,E])}function Ka(e,t,n){const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}const QN={...Vr,...Pa},U3=m.forwardRef(function(t,n){const{className:r,render:o,...i}=t,a=Ma(),{side:l,align:s}=xR(),u=a.useState("open"),f=a.useState("mounted"),c=a.useState("instantType"),d=a.useState("transitionStatus"),h=a.useState("popupProps"),y=a.useState("payload"),b=a.useState("popupElement"),E=a.useState("positionerElement"),g=a.useState("floatingRootContext"),p=sf();La({open:u,ref:a.context.popupRef,onComplete(){var k,P;u&&((P=(k=a.context).onOpenChangeComplete)==null||P.call(k,!0))}});function v(){g.context.events.emit("measure-layout")}function S(k,P){g.context.events.emit("measure-layout-complete",{previousDimensions:k,nextDimensions:P})}const C=m.useCallback(()=>a.context.triggerElements.size>1,[a]);OR({popupElement:b,positionerElement:E,mounted:f,content:y,enabled:C,onMeasureLayout:v,onMeasureLayoutComplete:S,side:l,direction:p});const w=a.useState("disabled"),R=a.useState("closeDelay");og(g,{enabled:!w,closeDelay:R});const x=m.useMemo(()=>({open:u,side:l,align:s,instant:c,transitionStatus:d}),[u,l,s,c,d]);return He("div",t,{state:x,ref:[n,a.context.popupRef,a.useStateSetter("popupElement")],props:[h,ms(d),i],stateAttributesMapping:QN})}),B3=m.forwardRef(function(t,n){const{className:r,render:o,...i}=t,l=Ma().useState("instantType"),{open:s,arrowRef:u,side:f,align:c,arrowUncentered:d,arrowStyles:h}=xR(),y=m.useMemo(()=>({open:s,side:f,align:c,uncentered:d,instant:l}),[s,f,c,d,l]);return He("div",t,{state:y,ref:[n,u],props:[{style:h,"aria-hidden":!0},i],stateAttributesMapping:Vr})});function gs(e){return qm(19)?e:e?"true":void 0}function MR(e){const[t,n]=m.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}let jv=function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e}({});const ZN={activationDirection:e=>e?{"data-activation-direction":e}:null},H3=m.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,l=Ma(),s=l.useState("activeTriggerElement"),u=l.useState("open"),f=l.useState("floatingRootContext"),c=l.useState("instantType"),d=MR(u?s:null),h=m.useRef(null),[y,b]=m.useState(null),[E,g]=m.useState(null),p=m.useRef(null),v=m.useRef(null),S=hs(p,!0,!1),C=Si(),[w,R]=m.useState(null),[x,O]=m.useState(!1),k=W(()=>{var _,D,T;(_=p.current)==null||_.style.setProperty("animation","none"),(D=p.current)==null||D.style.setProperty("transition","none"),(T=v.current)==null||T.style.setProperty("display","none")}),P=W(_=>{var D,T,N;(D=p.current)==null||D.style.removeProperty("animation"),(T=p.current)==null||T.style.removeProperty("transition"),(N=v.current)==null||N.style.removeProperty("display"),w||R(_.previousDimensions)});m.useEffect(()=>(f.context.events.on("measure-layout",k),f.context.events.on("measure-layout-complete",P),()=>{f.context.events.off("measure-layout",k),f.context.events.off("measure-layout-complete",P)}),[f,k,P]);const U=m.useRef(null);ie(()=>{if(s&&d&&s!==d&&U.current!==s&&h.current){b(h.current),O(!0);const _=JN(d,s);g(_),C.request(()=>{C.request(()=>{O(!1),S(()=>{b(null),R(null),h.current=null})})}),U.current=s}},[s,d,y,S,C]),ie(()=>{const _=p.current;if(!_)return;const D=document.createElement("div");for(const T of Array.from(_.childNodes))D.appendChild(T.cloneNode(!0));h.current=D});const A=y!=null;let L;A?L=ee.jsxs(m.Fragment,{children:[ee.jsx("div",{"data-previous":!0,inert:gs(!0),ref:v,style:{[jv.popupWidth]:`${w==null?void 0:w.width}px`,[jv.popupHeight]:`${w==null?void 0:w.height}px`,position:"absolute"},"data-ending-style":x?void 0:""},"previous"),ee.jsx("div",{"data-current":!0,ref:p,"data-starting-style":x?"":void 0,children:i},"current")]}):L=ee.jsx("div",{"data-current":!0,ref:p,children:i},"current"),ie(()=>{const _=v.current;!_||!y||_.replaceChildren(...Array.from(y.childNodes))},[y]);const M=m.useMemo(()=>({activationDirection:WN(E),transitioning:A,instant:c}),[E,A,c]);return He("div",t,{state:M,ref:n,props:[a,{children:L}],stateAttributesMapping:ZN})});function WN(e){if(e)return`${Vv(e.horizontal,5,"right","left")} ${Vv(e.vertical,5,"down","up")}`}function Vv(e,t,n,r){return e>t?n:e<-t?r:""}function JN(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o={x:n.left+n.width/2,y:n.top+n.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-o.x,vertical:i.y-o.y}}class eL{constructor(){this.store=new lf}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(et(81,t));this.store.setOpen(!0,xe(ui,void 0,n))}close(){this.store.setOpen(!1,xe(ui,void 0,void 0))}get isOpen(){return this.store.state.open}}function G3(){return new eL}const kR=m.createContext(void 0);function uf(e){const t=m.useContext(kR);if(t===void 0&&!e)throw new Error(et(33));return t}const NR=m.createContext(void 0);function dr(e){const t=m.useContext(NR);if(t===void 0&&!e)throw new Error(et(36));return t}const tL=m.createContext(void 0);function cf(e=!0){const t=m.useContext(tL);if(t===void 0&&!e)throw new Error(et(25));return t}function nL({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=m.useRef(e!==void 0),[i,a]=m.useState(t),l=o?e:i,s=m.useCallback(u=>{o||a(u)},[]);return[l,s]}const LR=m.createContext(void 0);function rL(){const e=m.useContext(LR);if(e===void 0)throw new Error(et(30));return e}const oL=m.createContext(void 0);function sg(e=!1){const t=m.useContext(oL);if(t===void 0&&!e)throw new Error(et(16));return t}function iL(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,l=r&&t===!1;return{props:m.useMemo(()=>{const u={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(u.tabIndex=o,!i&&n&&(u.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||l)&&(u.disabled=n),u},[r,n,t,a,l,i,o])}}function ys(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=m.useRef(null),a=sg(!0)!==void 0,l=W(()=>{const d=i.current;return!!((d==null?void 0:d.tagName)==="A"&&(d!=null&&d.href))}),{props:s}=iL({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o}),u=m.useCallback(()=>{const d=i.current;aL(d)&&a&&t&&s.disabled===void 0&&d.disabled&&(d.disabled=!1)},[t,s.disabled,a]);ie(u,[u]);const f=m.useCallback((d={})=>{const{onClick:h,onMouseDown:y,onKeyUp:b,onKeyDown:E,onPointerDown:g,...p}=d;return Hl({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}h==null||h(S)},onMouseDown(S){t||y==null||y(S)},onKeyDown(S){if(t||(Vh(S),E==null||E(S)),S.baseUIHandlerPrevented)return;const C=S.target===S.currentTarget&&!o&&!l()&&!t,w=S.key==="Enter",R=S.key===" ";C&&((R||w)&&S.preventDefault(),w&&(h==null||h(S)))},onKeyUp(S){t||(Vh(S),b==null||b(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&(h==null||h(S))},onPointerDown(S){if(t){S.preventDefault();return}g==null||g(S)}},o?void 0:{role:"button"},s,p)},[t,s,o,l]),c=W(d=>{i.current=d,u()});return{getButtonProps:f,buttonRef:c}}function aL(e){return tt(e)&&e.tagName==="BUTTON"}const DR={type:"regular-item"};function ug(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:o,store:i,nativeButton:a,itemMetadata:l,nodeId:s}=e,u=m.useRef(null),f=cf(!0),c=f!==void 0,{events:d}=i.useState("floatingTreeRoot"),{getButtonProps:h,buttonRef:y}=ys({disabled:n,focusableWhenDisabled:!0,native:a}),b=m.useCallback(g=>Hl({id:o,role:"menuitem",tabIndex:r?0:-1,onMouseMove(p){s&&d.emit("itemhover",{nodeId:s,target:p.currentTarget})},onMouseEnter(){l.type==="submenu-trigger"&&l.setActive()},onKeyUp(p){p.key===" "&&i.context.typingRef.current&&p.preventBaseUIHandler()},onClick(p){t&&d.emit("close",{domEvent:p,reason:Vm})},onMouseUp(p){if(f){const v=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,c&&v&&Math.abs(p.clientX-v.x)<=1&&Math.abs(p.clientY-v.y)<=1)return}u.current&&i.context.allowMouseUpTriggerRef.current&&(!c||p.button===2)&&l.type==="regular-item"&&u.current.click()}},g,h),[o,r,h,t,d,i,c,f,l,s]),E=va(u,y);return m.useMemo(()=>({getItemProps:b,itemRef:E}),[b,E])}const PR=m.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function lL(){return m.useContext(PR)}let sL=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function ff(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:l,subscribeMapChange:s,elementsRef:u,labelsRef:f,nextIndexRef:c}=lL(),d=m.useRef(-1),[h,y]=m.useState(i??(o===sL.GuessFromOrder?()=>{if(d.current===-1){const g=c.current;c.current+=1,d.current=g}return d.current}:-1)),b=m.useRef(null),E=m.useCallback(g=>{var p;if(b.current=g,h!==-1&&g!==null&&(u.current[h]=g,f)){const v=t!==void 0;f.current[h]=v?t:((p=r==null?void 0:r.current)==null?void 0:p.textContent)??g.textContent}},[h,u,f,t,r]);return ie(()=>{if(i!=null)return;const g=b.current;if(g)return a(g,n),()=>{l(g)}},[i,a,l,n]),ie(()=>{if(i==null)return s(g=>{var v;const p=b.current?(v=g.get(b.current))==null?void 0:v.index:null;p!=null&&y(p)})},[i,s,y]),m.useMemo(()=>({ref:E,index:h}),[h,E])}let Fv=function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e}({});const IR={checked(e){return e?{[Fv.checked]:""}:{[Fv.unchecked]:""}},...Pa},$3=m.forwardRef(function(t,n){const{render:r,className:o,id:i,label:a,nativeButton:l=!1,disabled:s=!1,closeOnClick:u=!1,checked:f,defaultChecked:c,onCheckedChange:d,...h}=t,y=ff({label:a}),b=uf(!0),E=Ei(i),{store:g}=dr(),p=g.useState("isActive",y.index),v=g.useState("itemProps"),[S,C]=nL({controlled:f,default:c??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:w,itemRef:R}=ug({closeOnClick:u,disabled:s,highlighted:p,id:E,store:g,nativeButton:l,nodeId:b==null?void 0:b.nodeId,itemMetadata:DR}),x=m.useMemo(()=>({disabled:s,highlighted:p,checked:S}),[s,p,S]),O=W(P=>{const U={...xe(Vm,P.nativeEvent),preventUnmountOnClose:()=>{}};d==null||d(!S,U),!U.isCanceled&&C(A=>!A)}),k=He("div",t,{state:x,stateAttributesMapping:IR,props:[v,{role:"menuitemcheckbox","aria-checked":S,onClick:O},h,w],ref:[R,n,y.ref]});return ee.jsx(LR.Provider,{value:x,children:k})}),j3=m.forwardRef(function(t,n){const{render:r,className:o,keepMounted:i=!1,...a}=t,l=rL(),s=m.useRef(null),{transitionStatus:u,setMounted:f}=vR(l.checked);La({open:l.checked,ref:s,onComplete(){l.checked||f(!1)}});const c=m.useMemo(()=>({checked:l.checked,disabled:l.disabled,highlighted:l.highlighted,transitionStatus:u}),[l.checked,l.disabled,l.highlighted,u]);return He("span",t,{state:c,ref:[n,s],stateAttributesMapping:IR,props:{"aria-hidden":!0,...a},enabled:i||l.checked})}),zR=m.createContext(void 0);function uL(){const e=m.useContext(zR);if(e===void 0)throw new Error(et(31));return e}const V3=m.forwardRef(function(t,n){const{render:r,className:o,...i}=t,[a,l]=m.useState(void 0),s=m.useMemo(()=>({setLabelId:l}),[l]),u=He("div",t,{ref:n,props:{role:"group","aria-labelledby":a,...i}});return ee.jsx(zR.Provider,{value:s,children:u})}),F3=m.forwardRef(function(t,n){const{className:r,render:o,id:i,...a}=t,l=Ei(i),{setLabelId:s}=uL();return ie(()=>(s(l),()=>{s(void 0)}),[s,l]),He("div",t,{ref:n,props:{id:l,role:"presentation",...a}})}),q3=m.forwardRef(function(t,n){const{render:r,className:o,id:i,label:a,nativeButton:l=!1,disabled:s=!1,closeOnClick:u=!0,...f}=t,c=ff({label:a}),d=uf(!0),h=Ei(i),{store:y}=dr(),b=y.useState("isActive",c.index),E=y.useState("itemProps"),{getItemProps:g,itemRef:p}=ug({closeOnClick:u,disabled:s,highlighted:b,id:h,store:y,nativeButton:l,nodeId:d==null?void 0:d.nodeId,itemMetadata:DR}),v=m.useMemo(()=>({disabled:s,highlighted:b}),[s,b]);return He("div",t,{state:v,props:[E,f,g],ref:[p,n,c.ref]})}),cL=m.createContext(void 0);function UR(e){return m.useContext(cL)}const BR="ArrowUp",HR="ArrowDown",GR="ArrowLeft",$R="ArrowRight",jR="Home",VR="End",fL=new Set([GR,$R]),dL=new Set([BR,HR]),hL=new Set([...fL,...dL]);[...hL];const FR=new Set([BR,HR,GR,$R,jR,VR]),pL={...Vr,...Pa},Y3=m.forwardRef(function(t,n){const{render:r,className:o,finalFocus:i,...a}=t,{store:l}=dr(),{side:s,align:u}=uf(),f=UR()!=null,c=l.useState("open"),d=l.useState("transitionStatus"),h=l.useState("popupProps"),y=l.useState("mounted"),b=l.useState("instantType"),E=l.useState("activeTriggerElement"),g=l.useState("parent"),p=l.useState("lastOpenChangeReason"),v=l.useState("rootId"),S=l.useState("floatingRootContext"),C=l.useState("floatingTreeRoot"),w=l.useState("closeDelay"),R=l.useState("activeTriggerElement");La({open:c,ref:l.context.popupRef,onComplete(){var A,L;c&&((L=(A=l.context).onOpenChangeComplete)==null||L.call(A,!0))}}),m.useEffect(()=>{function A(L){l.setOpen(!1,xe(L.reason,L.domEvent))}return C.events.on("close",A),()=>{C.events.off("close",A)}},[C.events,l]);const x=l.useState("hoverEnabled"),O=l.useState("disabled");og(S,{enabled:x&&!O&&g.type!=="context-menu"&&g.type!=="menubar",closeDelay:w});const k=m.useMemo(()=>({transitionStatus:d,side:s,align:u,open:c,nested:g.type==="menu",instant:b}),[d,s,u,c,g.type,b]),P=He("div",t,{state:k,ref:[n,l.context.popupRef],stateAttributesMapping:pL,props:[h,{onKeyDown(A){f&&FR.has(A.key)&&A.stopPropagation()}},ms(d),a,{"data-rootownerid":v}]});let U=g.type===void 0||g.type==="context-menu";return(E||g.type==="menubar"&&p!==jm)&&(U=!0),ee.jsx(tR,{context:S,modal:!1,disabled:!y,returnFocus:i===void 0?U:i,initialFocus:g.type!=="menu",restoreFocus:!0,externalTree:g.type!=="menubar"?C:void 0,previousFocusableElement:R,nextFocusableElement:g.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:g.type===void 0?l.context.beforeContentFocusGuardRef:void 0,children:P})}),qR=m.createContext(void 0);function mL(){const e=m.useContext(qR);if(e===void 0)throw new Error(et(32));return e}const X3=m.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=dr();return i.useState("mounted")||r?ee.jsx(qR.Provider,{value:r,children:ee.jsx(eR,{ref:n,...o})}):null});function gL(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=W(o),a=m.useRef(0),l=on(vL).current,s=on(yL).current,[u,f]=m.useState(0),c=m.useRef(u),d=W((g,p)=>{s.set(g,p??null),c.current+=1,f(c.current)}),h=W(g=>{s.delete(g),c.current+=1,f(c.current)}),y=m.useMemo(()=>{const g=new Map;return Array.from(s.keys()).filter(v=>v.isConnected).sort(bL).forEach((v,S)=>{const C=s.get(v)??{};g.set(v,{...C,index:S})}),g},[s,u]);ie(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const g=new MutationObserver(p=>{const v=new Set,S=C=>v.has(C)?v.delete(C):v.add(C);p.forEach(C=>{C.removedNodes.forEach(S),C.addedNodes.forEach(S)}),v.size===0&&(c.current+=1,f(c.current))});return y.forEach((p,v)=>{v.parentElement&&g.observe(v.parentElement,{childList:!0})}),()=>{g.disconnect()}},[y]),ie(()=>{c.current===u&&(n.current.length!==y.size&&(n.current.length=y.size),r&&r.current.length!==y.size&&(r.current.length=y.size),a.current=y.size),i(y)},[i,y,n,r,u]),ie(()=>()=>{n.current=[]},[n]),ie(()=>()=>{r&&(r.current=[])},[r]);const b=W(g=>(l.add(g),()=>{l.delete(g)}));ie(()=>{l.forEach(g=>g(y))},[l,y]);const E=m.useMemo(()=>({register:d,unregister:h,subscribeMapChange:b,elementsRef:n,labelsRef:r,nextIndexRef:a}),[d,h,b,n,r,a]);return ee.jsx(PR.Provider,{value:E,children:t})}function yL(){return new Map}function vL(){return new Set}function bL(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const YR=m.forwardRef(function(t,n){const{cutout:r,...o}=t;let i;if(r){const a=r==null?void 0:r.getBoundingClientRect();i=`polygon(
|
|
81
|
-
0% 0%,
|
|
82
|
-
100% 0%,
|
|
83
|
-
100% 100%,
|
|
84
|
-
0% 100%,
|
|
85
|
-
0% 0%,
|
|
86
|
-
${a.left}px ${a.top}px,
|
|
87
|
-
${a.left}px ${a.bottom}px,
|
|
88
|
-
${a.right}px ${a.bottom}px,
|
|
89
|
-
${a.right}px ${a.top}px,
|
|
90
|
-
${a.left}px ${a.top}px
|
|
91
|
-
)`}return ee.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),K3=m.forwardRef(function(t,n){var Ae;const{anchor:r,positionMethod:o="absolute",className:i,render:a,side:l,align:s,sideOffset:u=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:E=mM,...g}=t,{store:p}=dr(),v=mL(),S=cf(!0),C=p.useState("parent"),w=p.useState("floatingRootContext"),R=p.useState("floatingTreeRoot"),x=p.useState("mounted"),O=p.useState("open"),k=p.useState("modal"),P=p.useState("activeTriggerElement"),U=p.useState("lastOpenChangeReason"),A=p.useState("floatingNodeId"),L=p.useState("floatingParentNodeId");let M=r,_=u,D=f,T=s,N=E;C.type==="context-menu"&&(M=r??((Ae=C.context)==null?void 0:Ae.anchor),T=T??"start",!l&&T!=="center"&&(D=t.alignOffset??2,_=t.sideOffset??-5));let I=l,q=T;C.type==="menu"?(I=I??"inline-end",q=q??"start",N=t.collisionAvoidance??Gm):C.type==="menubar"&&(I=I??"bottom",q=q??"start");const B=C.type==="context-menu",$=lg({anchor:M,floatingRootContext:w,positionMethod:S?"fixed":o,mounted:x,side:I,sideOffset:_,align:q,alignOffset:D,arrowPadding:B?0:h,collisionBoundary:c,collisionPadding:d,sticky:y,nodeId:A,keepMounted:v,disableAnchorTracking:b,collisionAvoidance:N,shiftCrossAxis:B,externalTree:R}),ue=m.useMemo(()=>{const G={};return O||(G.pointerEvents="none"),{role:"presentation",hidden:!x,style:{...$.positionerStyles,...G}}},[O,x,$.positionerStyles]);m.useEffect(()=>{function G(Y){Y.open?(Y.parentNodeId===A&&p.set("hoverEnabled",!1),Y.nodeId!==A&&Y.parentNodeId===p.select("floatingParentNodeId")&&p.setOpen(!1,xe(rl))):Y.parentNodeId===A&&Y.reason!==rl&&p.set("hoverEnabled",!0)}return R.events.on("menuopenchange",G),()=>{R.events.off("menuopenchange",G)}},[p,R.events,A]),m.useEffect(()=>{if(p.select("floatingParentNodeId")==null)return;function G(Y){if(Y.open||Y.nodeId!==p.select("floatingParentNodeId"))return;const ne=Y.reason??rl;p.setOpen(!1,xe(ne))}return R.events.on("menuopenchange",G),()=>{R.events.off("menuopenchange",G)}},[R.events,p]),m.useEffect(()=>{function G(Y){!O||Y.nodeId!==p.select("floatingParentNodeId")||Y.target&&P&&P!==Y.target&&p.setOpen(!1,xe(rl))}return R.events.on("itemhover",G),()=>{R.events.off("itemhover",G)}},[R.events,O,P,p]),m.useEffect(()=>{const G={open:O,nodeId:A,parentNodeId:L,reason:p.select("lastOpenChangeReason")};R.events.emit("menuopenchange",G)},[R.events,O,p,A,L]);const te=m.useMemo(()=>({open:O,side:$.side,align:$.align,anchorHidden:$.anchorHidden,nested:C.type==="menu"}),[O,$.side,$.align,$.anchorHidden,C.type]),ce=m.useMemo(()=>({side:$.side,align:$.align,arrowRef:$.arrowRef,arrowUncentered:$.arrowUncentered,arrowStyles:$.arrowStyles,nodeId:$.context.nodeId}),[$.side,$.align,$.arrowRef,$.arrowUncentered,$.arrowStyles,$.context.nodeId]),oe=He("div",t,{state:te,stateAttributesMapping:Vr,ref:[n,p.useStateSetter("positionerElement")],props:[ue,g]}),J=x&&C.type!=="menu"&&(C.type!=="menubar"&&k&&U!==yt||C.type==="menubar"&&C.context.modal);let Se=null;return C.type==="menubar"?Se=C.context.contentElement:C.type===void 0&&(Se=P),ee.jsxs(kR.Provider,{value:ce,children:[J&&ee.jsx(YR,{ref:C.type==="context-menu"||C.type==="nested-context-menu"?C.context.internalBackdropRef:null,inert:gs(!O),cutout:Se}),ee.jsx(jC,{id:A,children:ee.jsx(gL,{elementsRef:p.context.itemDomElements,labelsRef:p.context.itemLabels,children:oe})})]})});let qv={},Yv={},Xv="";function SL(e){if(typeof document>"u")return!1;const t=Xt(e);return at(t).innerWidth-t.documentElement.clientWidth>0}function EL(e){const t=Xt(e),n=t.documentElement,r=t.body,o=bi(n)?n:r,i=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=i}}function CL(e){var d,h;const t=Xt(e),n=t.documentElement,r=t.body,o=at(n);let i=0,a=0;const l=Jn.create(),s=typeof CSS<"u"&&((d=CSS.supports)==null?void 0:d.call(CSS,"scrollbar-gutter","stable"));if(AO&&(((h=o.visualViewport)==null?void 0:h.scale)??1)!==1)return()=>{};function u(){const y=o.getComputedStyle(n),b=o.getComputedStyle(r),p=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,qv={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Xv=n.style.scrollBehavior,Yv={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const v=n.scrollHeight>n.clientHeight,S=n.scrollWidth>n.clientWidth,C=y.overflowY==="scroll"||b.overflowY==="scroll",w=y.overflowX==="scroll"||b.overflowX==="scroll",R=Math.max(0,o.innerWidth-n.clientWidth),x=Math.max(0,o.innerHeight-n.clientHeight),O=parseFloat(b.marginTop)+parseFloat(b.marginBottom),k=parseFloat(b.marginLeft)+parseFloat(b.marginRight),P=bi(n)?n:r;if(s){n.style.scrollbarGutter=p,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:p,overflowY:"hidden",overflowX:"hidden"}),(v||C)&&(n.style.overflowY="scroll"),(S||w)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||x?`calc(100dvh - ${O+x}px)`:"100dvh",width:k||R?`calc(100vw - ${k+R}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function f(){Object.assign(n.style,qv),Object.assign(r.style,Yv),s||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Xv)}function c(){f(),l.request(u)}return u(),o.addEventListener("resize",c),()=>{l.cancel(),f(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",c)}}class RL{constructor(){z(this,"lockCount",0);z(this,"restore",null);z(this,"timeoutLock",Kn.create());z(this,"timeoutUnlock",Kn.create());z(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});z(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Xt(t).documentElement,o=at(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=FC;return}const i=OO||!SL(t);this.restore=i?EL(t):CL(t)}}const wL=new RL;function XR(e=!0,t=null){ie(()=>{if(e)return wL.acquire(t)},[e,t])}const _L=m.createContext(null);function KR(e){return m.useContext(_L)}function xL(e){const t=m.useRef(""),n=m.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:m.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function QR(e){const[t,n]=m.useState(null),r=W((l,s)=>{e||n(s)}),o=m.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:a}=xL(r);return m.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:a}}),[t,o,i,a])}const TL={...ng,disabled:fe(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:fe(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:fe(e=>e.parent.type==="menu"?e.parent.store.select("allowMouseEnter"):e.allowMouseEnter),stickIfOpen:fe(e=>e.stickIfOpen),parent:fe(e=>e.parent),rootId:fe(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:fe(e=>e.activeIndex),isActive:fe((e,t)=>e.activeIndex===t),hoverEnabled:fe(e=>e.hoverEnabled),instantType:fe(e=>e.instantType),lastOpenChangeReason:fe(e=>e.openChangeReason),floatingTreeRoot:fe(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:fe(e=>e.floatingNodeId),floatingParentNodeId:fe(e=>e.floatingParentNodeId),itemProps:fe(e=>e.itemProps),closeDelay:fe(e=>e.closeDelay),keyboardEventRelay:fe(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class cg extends nf{constructor(n){super({...AL(),...n},{positionerRef:m.createRef(),popupRef:m.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:m.createRef(),beforeContentFocusGuardRef:m.createRef(),onOpenChangeComplete:void 0,triggerElements:new ps},TL);z(this,"unsubscribeParentListener",null);this.observe(fe(r=>r.allowMouseEnter),(r,o)=>{this.state.parent.type==="menu"&&r!==o&&this.state.parent.store.set("allowMouseEnter",r)}),this.unsubscribeParentListener=this.observe("parent",r=>{var o;if((o=this.unsubscribeParentListener)==null||o.call(this),r.type==="menu"){this.unsubscribeParentListener=r.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=r.store.context.allowMouseUpTriggerRef;return}r.type!==void 0&&(this.context.allowMouseUpTriggerRef=r.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:r})}static useStore(n,r){return on(()=>n??new cg(r)).current}}function AL(){return{...tg(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Bm,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ct,keyboardEventRelay:void 0,closeDelay:0}}const ZR=m.createContext(void 0);function WR(){return m.useContext(ZR)}function OL(e){const{children:t,open:n,onOpenChange:r,onOpenChangeComplete:o,defaultOpen:i=!1,disabled:a=!1,modal:l,loopFocus:s=!0,orientation:u="vertical",actionsRef:f,closeParentOnEsc:c=!1,handle:d,triggerId:h,defaultTriggerId:y=null,highlightItemOnHover:b=!0}=e,E=cf(!0),g=dr(!0),p=KR(),v=WR(),S=m.useMemo(()=>v&&g?{type:"menu",store:g.store}:p?{type:"menubar",context:p}:E&&!g?{type:"context-menu",context:E}:{type:void 0},[E,g,p,v]),C=cg.useStore(d==null?void 0:d.store,{parent:S}),w=C.useState("floatingTreeRoot"),R=Hm(w),x=fr();ie(()=>{E&&!g?C.update({parent:{type:"context-menu",context:E},floatingNodeId:R,floatingParentNodeId:x}):g&&C.update({floatingNodeId:R,floatingParentNodeId:x})},[E,g,R,x,C]),C.useControlledProp("open",n,i),C.useControlledProp("activeTriggerId",h,y),C.useContextCallback("onOpenChangeComplete",o);const O=C.useState("open"),k=C.useState("activeTriggerElement"),P=C.useState("positionerElement"),U=C.useState("hoverEnabled"),A=C.useState("modal"),L=C.useState("disabled"),M=C.useState("lastOpenChangeReason"),_=C.useState("parent"),D=C.useState("activeIndex"),T=C.useState("payload"),N=C.useState("floatingParentNodeId"),I=m.useRef(null),q=N!=null;let B;C.useSyncedValues({disabled:a,modal:_.type===void 0?l:void 0,rootId:jr()});const{openMethod:$,triggerProps:ue,reset:te}=QR(O);Jm(C);const{forceUnmount:ce}=eg(O,C,()=>{C.update({allowMouseEnter:!1,stickIfOpen:!0}),te()}),oe=m.useRef(_.type!=="context-menu"),J=Cn();m.useEffect(()=>{if(O||(I.current=null),_.type==="context-menu"){if(!O){J.clear(),oe.current=!1;return}J.start(500,()=>{oe.current=!0})}},[J,O,_.type]),XR(O&&A&&M!==yt&&$!=="touch",P),ie(()=>{!O&&!U&&C.set("hoverEnabled",!0)},[O,U,C]);const Se=m.useRef(!0),Ae=Cn(),G=W((he,Pe)=>{const lt=Pe.reason;if(O===he&&Pe.trigger===k||(Pe.preventUnmountOnClose=()=>{C.set("preventUnmountingOnClose",!0)},!he&&Pe.trigger==null&&(Pe.trigger=k??void 0),r==null||r(he,Pe),Pe.isCanceled))return;const Fr={open:he,nativeEvent:Pe.event,reason:Pe.reason,nested:q};B==null||B.emit("openchange",Fr);const jt=Pe.event;if(he===!1&&(jt==null?void 0:jt.type)==="click"&&jt.pointerType==="touch"&&!Se.current)return;if(!he&&D!==null){const rt=C.context.itemDomElements.current[D];queueMicrotask(()=>{rt==null||rt.setAttribute("tabindex","-1")})}he&<===Gl?(Se.current=!1,Ae.start(300,()=>{Se.current=!0})):(Se.current=!0,Ae.clear());const ze=(lt===Fn||lt===Vm)&&jt.detail===0&&(jt==null?void 0:jt.isTrusted),st=!he&&(lt===ds||lt==null);function Vt(){var pr;const rt={open:he,openChangeReason:lt};I.current=Pe.event??null;const hr=((pr=Pe.trigger)==null?void 0:pr.id)??null;(hr||he)&&(rt.activeTriggerId=hr,rt.activeTriggerElement=Pe.trigger??null),C.update(rt)}lt===yt?Gt.flushSync(Vt):Vt(),_.type==="menubar"&&(lt===Gl||lt===Hr||lt===yt||lt===bu||lt===rl)?C.set("instantType","group"):ze||st?C.set("instantType",ze?"click":"dismiss"):C.set("instantType",void 0)}),Y=m.useCallback(he=>{const Pe=xe(he);return Pe.preventUnmountOnClose=()=>{C.set("preventUnmountingOnClose",!0)},Pe},[C]),ne=m.useCallback(()=>{C.setOpen(!1,Y(ui))},[C,Y]);m.useImperativeHandle(f,()=>({unmount:ce,close:ne}),[ce,ne]);let Le;_.type==="context-menu"&&(Le=_.context),m.useImperativeHandle(Le==null?void 0:Le.positionerRef,()=>P,[P]),m.useImperativeHandle(Le==null?void 0:Le.actionsRef,()=>({setOpen:G}),[G]);const pe=rg({popupStore:C,onOpenChange:G});B=pe.context.events,m.useEffect(()=>{const he=({open:Pe,eventDetails:lt})=>G(Pe,lt);return B.on("setOpen",he),()=>{B==null||B.off("setOpen",he)}},[B,G]);const Q=Qm(pe,{enabled:!L,bubbles:c&&_.type==="menu",outsidePress(){var he;return _.type!=="context-menu"||((he=I.current)==null?void 0:he.type)==="contextmenu"?!0:oe.current},externalTree:q?w:void 0}),K=CR(pe,{role:"menu"}),re=sf(),de=m.useCallback(he=>{C.select("activeIndex")!==he&&C.set("activeIndex",he)},[C]),ge=xN(pe,{enabled:!L,listRef:C.context.itemDomElements,activeIndex:D,nested:_.type!==void 0,loopFocus:s,orientation:u,parentOrientation:_.type==="menubar"?_.context.orientation:void 0,rtl:re==="rtl",disabledIndices:dc,onNavigate:de,openOnArrowKeyDown:_.type!=="context-menu",externalTree:q?w:void 0,focusItemOnHover:b}),le=m.useCallback(he=>{C.context.typingRef.current=he},[C]),se=AN(pe,{listRef:C.context.itemLabels,activeIndex:D,resetMs:hM,onMatch:he=>{O&&he!==D&&C.set("activeIndex",he)},onTypingChange:le}),{getReferenceProps:X,getFloatingProps:ae,getItemProps:j,getTriggerProps:Z}=Da([Q,K,ge,se]),ye=m.useMemo(()=>{const he=Hl(X(),{onMouseEnter(){C.set("hoverEnabled",!0)},onMouseMove(){C.set("allowMouseEnter",!0)}},ue);return delete he.role,he},[X,C,ue]),me=m.useMemo(()=>{const he=Z();if(!he)return he;const Pe=Hl(he,ue);return delete Pe.role,delete Pe["aria-controls"],Pe},[Z,ue]),be=Si(),Te=m.useMemo(()=>ae({onMouseEnter(){_.type==="menu"&&be.request(()=>C.set("hoverEnabled",!1))},onMouseMove(){C.set("allowMouseEnter",!0)},onClick(){C.select("hoverEnabled")&&C.set("hoverEnabled",!1)},onKeyDown(he){const Pe=C.select("keyboardEventRelay");Pe&&!he.isPropagationStopped()&&Pe(he)}}),[ae,_.type,be,C]),De=m.useMemo(()=>j(),[j]);C.useSyncedValues({floatingRootContext:pe,activeTriggerProps:ye,inactiveTriggerProps:me,popupProps:Te,itemProps:De});const $t=m.useMemo(()=>({store:C,parent:S}),[C,S]),un=ee.jsx(NR.Provider,{value:$t,children:typeof t=="function"?t({payload:T}):t});return _.type===void 0||_.type==="context-menu"?ee.jsx(VC,{externalTree:w,children:un}):un}function Q3(e){const t=dr().store,n=m.useMemo(()=>({parentMenu:t}),[t]);return ee.jsx(ZR.Provider,{value:n,children:ee.jsx(OL,{...e})})}function ML(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,l=parseFloat(r.width)||0,s=parseFloat(r.height)||0,u=Math.max(t.width,i,l),f=Math.max(t.height,a,s),c=u-t.width,d=f-t.height;return{left:t.left-c/2,right:t.right+c/2,top:t.top-d/2,bottom:t.bottom+d/2}}function kL(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=sg(),{ref:o,index:i}=ff(e),a=n===i,l=m.useRef(null),s=va(o,l);return{compositeProps:m.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(i)},onMouseMove(){const f=l.current;if(!t||!f)return;const c=f.hasAttribute("disabled")||f.ariaDisabled==="true";!a&&!c&&f.focus()}}),[a,r,i,t]),compositeRef:s,index:i}}function NL(e){const{render:t,className:n,state:r=Ct,props:o=dc,refs:i=dc,metadata:a,stateAttributesMapping:l,tag:s="div",...u}=e,{compositeProps:f,compositeRef:c}=kL({metadata:a});return He(s,e,{state:r,ref:[...i,c],props:[f,...o,u],stateAttributesMapping:l})}function JR(e){if(tt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!or(e))return JR(ar(e))}function LL(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,o=m.useRef(!1);return m.useMemo(()=>t?{onMouseDown:i=>{(n==="open"&&!r||n==="close"&&r)&&(o.current=!0,Xt(i.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:i=>{o.current&&(o.current=!1,i.preventBaseUIHandler())}}:Ct,[t,n,r])}const Ys=2,Z3=m.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,id:l,openOnHover:s,delay:u=100,closeDelay:f=0,handle:c,payload:d,...h}=t,y=dr(!0),b=(c==null?void 0:c.store)??(y==null?void 0:y.store);if(!b)throw new Error(et(85));const E=Ei(l),g=b.useState("isTriggerActive",E),p=b.useState("floatingRootContext"),v=b.useState("isOpenedByTrigger",E),S=m.useRef(null),C=PL(),w=sg(!0),R=Lo(),x=m.useMemo(()=>R??new Bm,[R]),O=Hm(x),k=fr(),{registerTrigger:P,isMountedByThisTrigger:U}=Wm(E,S,b,{payload:d,closeDelay:f,parent:C,floatingTreeRoot:x,floatingNodeId:O,floatingParentNodeId:k,keyboardEventRelay:w==null?void 0:w.relayKeyboardEvent}),A=b.useState("disabled"),L=i||A||C.type==="menubar"&&C.context.disabled,{getButtonProps:M,buttonRef:_}=ys({disabled:L,native:a});m.useEffect(()=>{!v&&C.type===void 0&&(b.context.allowMouseUpTriggerRef.current=!1)},[b,v,C.type]);const D=m.useRef(null),T=Cn(),N=W(K=>{if(!D.current)return;T.clear(),b.context.allowMouseUpTriggerRef.current=!1;const re=K.target;if(Re(D.current,re)||Re(b.select("positionerElement"),re)||re===D.current||re!=null&&JR(re)===b.select("rootId"))return;const de=ML(D.current);K.clientX>=de.left-Ys&&K.clientX<=de.right+Ys&&K.clientY>=de.top-Ys&&K.clientY<=de.bottom+Ys||x.events.emit("close",{domEvent:K,reason:yM})});m.useEffect(()=>{v&&b.select("lastOpenChangeReason")===yt&&Xt(D.current).addEventListener("mouseup",N,{once:!0})},[v,N,b]);const I=C.type==="menubar"&&C.context.hasSubmenuOpen,B=rf(p,{enabled:(s??I??!1)&&!L&&C.type!=="context-menu"&&(C.type!=="menubar"||I&&!U),handleClose:af({blockPointerEvents:C.type!=="menubar"}),mouseOnly:!0,move:!1,restMs:C.type===void 0?u:void 0,delay:{close:f},triggerElementRef:S,externalTree:x,isActiveTrigger:g}),$=DL(v,b.select("lastOpenChangeReason")),ue=Xm(p,{enabled:!L&&C.type!=="context-menu",event:v&&C.type==="menubar"?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:C.type===void 0?$:!1}),te=SR(p,{enabled:!L&&(C.type!=="menubar"&&v||I)}),ce=LL({open:v,enabled:C.type==="menubar",mouseDownAction:"open"}),oe=Da([ue,te]),J=C.type==="menubar",Se=m.useMemo(()=>({disabled:L,open:v}),[L,v]),Ae=b.useState("triggerProps",U),G=[D,n,_,P,S],Y=[oe.getReferenceProps(),B??Ct,Ae,{"aria-haspopup":"menu",id:E,onMouseDown:K=>{if(b.select("open"))return;T.start(200,()=>{b.context.allowMouseUpTriggerRef.current=!0}),Xt(K.currentTarget).addEventListener("mouseup",N,{once:!0})}},J?{role:"menuitem"}:{},ce,h,M],ne=m.useRef(null),Le=W(K=>{Gt.flushSync(()=>{b.setOpen(!1,xe(Hr,K.nativeEvent,K.currentTarget))});const re=BC(ne.current);re==null||re.focus()}),pe=W(K=>{var de;const re=b.select("positionerElement");if(re&&ni(K,re))(de=b.context.beforeContentFocusGuardRef.current)==null||de.focus();else{Gt.flushSync(()=>{b.setOpen(!1,xe(Hr,K.nativeEvent,K.currentTarget))});let ge=UC(S.current);for(;ge!==null&&Re(re,ge)||ge!=null&&ge.hasAttribute("aria-hidden");){const le=ge;if(ge=Jc(ge),ge===le)break}ge==null||ge.focus()}}),Q=He("button",t,{enabled:!J,stateAttributesMapping:np,state:Se,ref:G,props:Y});return J?ee.jsx(NL,{tag:"button",render:r,className:o,state:Se,refs:G,props:Y,stateAttributesMapping:np}):v?ee.jsxs(m.Fragment,{children:[ee.jsx(qn,{ref:ne,onFocus:Le},`${E}-pre-focus-guard`),ee.jsx(m.Fragment,{children:Q},E),ee.jsx(qn,{ref:b.context.triggerFocusTargetRef,onFocus:pe},`${E}-post-focus-guard`)]}):ee.jsx(m.Fragment,{children:Q},E)});function DL(e,t){const n=Cn(),[r,o]=m.useState(!1);return ie(()=>{e&&t==="trigger-hover"?(o(!0),n.start(qC,()=>{o(!1)})):e||(n.clear(),o(!1))},[e,t,n]),r}function PL(){const e=cf(!0),t=dr(!0),n=KR();return m.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const W3=m.forwardRef(function(t,n){const{className:r,render:o,orientation:i="horizontal",...a}=t,l=m.useMemo(()=>({orientation:i}),[i]);return He("div",t,{state:l,ref:n,props:[{role:"separator","aria-orientation":i},a]})}),J3=m.forwardRef(function(t,n){const{render:r,className:o,label:i,id:a,nativeButton:l=!1,openOnHover:s=!0,delay:u=100,closeDelay:f=0,disabled:c=!1,...d}=t,h=ff(),y=uf(),{store:b}=dr(),E=Ei(a),g=b.useState("open"),p=b.useState("floatingRootContext"),v=b.useState("floatingTreeRoot"),S=bR(E,b),C=m.useCallback(te=>{const ce=S(te);return te!==null&&b.select("open")&&b.select("activeTriggerId")==null&&b.update({activeTriggerId:E,activeTriggerElement:te,closeDelay:f}),ce},[S,f,b,E]),w=m.useRef(null),R=m.useCallback(te=>{w.current=te,b.set("activeTriggerElement",te)},[b]),x=WR();if(!(x!=null&&x.parentMenu))throw new Error(et(37));b.useSyncedValue("closeDelay",f);const O=x.parentMenu,k=O.useState("itemProps"),P=O.useState("isActive",h.index),U=m.useMemo(()=>({type:"submenu-trigger",setActive:()=>O.set("activeIndex",h.index)}),[O,h.index]),A=b.useState("disabled"),L=c||A,{getItemProps:M,itemRef:_}=ug({closeOnClick:!1,disabled:L,highlighted:P,id:E,store:b,nativeButton:l,itemMetadata:U,nodeId:y==null?void 0:y.nodeId}),D=b.useState("hoverEnabled"),T=b.useState("allowMouseEnter"),N=rf(p,{enabled:D&&s&&!L&&T,handleClose:af({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:u,delay:{open:u,close:f},triggerElementRef:w,externalTree:v}),I=Xm(p,{enabled:!L,event:"mousedown",toggle:!s,ignoreMouse:s,stickIfOpen:!1}),q=Da([I]),B=b.useState("triggerProps",!0);delete B.id;const $=m.useMemo(()=>({disabled:L,highlighted:P,open:g}),[L,P,g]);return He("div",t,{state:$,stateAttributesMapping:ag,props:[q.getReferenceProps(),N,B,k,{tabIndex:g||P?0:-1,onBlur(){P&&O.set("activeIndex",null)}},d,M],ref:[n,h.ref,_,C,R]})}),IL="modulepreload",zL=function(e){return"/"+e},Kv={},V=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(n.map(s=>{if(s=zL(s),s in Kv)return;Kv[s]=!0;const u=s.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${f}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":IL,u||(c.as="script"),c.crossOrigin="",c.href=s,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((d,h)=>{c.addEventListener("load",d),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return o.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};var rp=Object.defineProperty,UL=Object.getOwnPropertyDescriptor,BL=Object.getOwnPropertyNames,HL=Object.prototype.hasOwnProperty,GL=(e,t)=>{let n={};for(var r in e)rp(n,r,{get:e[r],enumerable:!0});return rp(n,Symbol.toStringTag,{value:"Module"}),n},$L=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=BL(t),i=0,a=o.length,l;i<a;i++)l=o[i],!HL.call(e,l)&&l!==n&&rp(e,l,{get:(s=>t[s]).bind(null,l),enumerable:!(r=UL(t,l))||r.enumerable});return e},jL=(e,t,n)=>($L(e,t,"default"),n),Ye=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function VL(e){return fg(e)}function fg(e){return Array.isArray(e)?FL(e):e instanceof RegExp?e:typeof e=="object"?qL(e):e}function FL(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=fg(e[n]);return t}function qL(e){let t={};for(let n in e)t[n]=fg(e[n]);return t}function ew(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function tw(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?tw(e.substring(0,e.length-1)):e.substr(~t+1)}var Ad=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xs=class{static hasCaptures(e){return e===null?!1:(Ad.lastIndex=0,Ad.test(e))}static replaceCaptures(e,t,n){return e.replace(Ad,(r,o,i,a)=>{let l=n[parseInt(o||i,10)];if(l){let s=t.substring(l.start,l.end);for(;s[0]===".";)s=s.substring(1);switch(a){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return r})}};function nw(e,t){return e<t?-1:e>t?1:0}function rw(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let o=0;o<n;o++){let i=nw(e[o],t[o]);if(i!==0)return i}return 0}return n-r}function Qv(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ow(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var iw=class{constructor(e){z(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},gc=class{constructor(e,t,n){z(this,"_cachedMatchRoot",new iw(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(KL(e),t)}static createFromParsedTheme(e,t){return ZL(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(o=>YL(e.parent,o.parentScopes));return r?new aw(r.fontStyle,r.foreground,r.background):null}},Od=class wu{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new wu(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new wu(n,t[r]);return n}push(t){return new wu(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function YL(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!XL(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function XL(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var aw=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function KL(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let o=0,i=t.length;o<i;o++){let a=t[o];if(!a.settings)continue;let l;if(typeof a.scope=="string"){let c=a.scope;c=c.replace(/^[,]+/,""),c=c.replace(/[,]+$/,""),l=c.split(",")}else Array.isArray(a.scope)?l=a.scope:l=[""];let s=-1;if(typeof a.settings.fontStyle=="string"){s=0;let c=a.settings.fontStyle.split(" ");for(let d=0,h=c.length;d<h;d++)switch(c[d]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let u=null;typeof a.settings.foreground=="string"&&Qv(a.settings.foreground)&&(u=a.settings.foreground);let f=null;typeof a.settings.background=="string"&&Qv(a.settings.background)&&(f=a.settings.background);for(let c=0,d=l.length;c<d;c++){let y=l[c].trim().split(" "),b=y[y.length-1],E=null;y.length>1&&(E=y.slice(0,y.length-1),E.reverse()),n[r++]=new QL(b,E,o,s,u,f)}}return n}var QL=class{constructor(e,t,n,r,o,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=i}},Ht=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Ht||{});function ZL(e,t){e.sort((s,u)=>{let f=nw(s.scope,u.scope);return f!==0||(f=rw(s.parentScopes,u.parentScopes),f!==0)?f:s.index-u.index});let n=0,r="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(r=s.foreground),s.background!==null&&(o=s.background)}let i=new WL(t),a=new aw(n,i.getId(r),i.getId(o)),l=new eD(new op(0,null,-1,0,0),[]);for(let s=0,u=e.length;s<u;s++){let f=e[s];l.insert(0,f.scope,f.parentScopes,f.fontStyle,i.getId(f.foreground),i.getId(f.background))}return new gc(i,a,l)}var WL=class{constructor(e){z(this,"_isFrozen");z(this,"_lastColorId");z(this,"_id2color");z(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},JL=Object.freeze([]),op=class lw{constructor(t,n,r,o,i){z(this,"scopeDepth");z(this,"parentScopes");z(this,"fontStyle");z(this,"foreground");z(this,"background");this.scopeDepth=t,this.parentScopes=n||JL,this.fontStyle=r,this.foreground=o,this.background=i}clone(){return new lw(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,o=t.length;r<o;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},eD=class ip{constructor(t,n=[],r={}){z(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,o=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[o]===">"&&o++,!(r>=t.parentScopes.length||o>=n.parentScopes.length);){const i=n.parentScopes[o].length-t.parentScopes[r].length;if(i!==0)return i;r++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),o,i;if(r===-1?(o=t,i=""):(o=t.substring(0,r),i=t.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(ip._cmpBySpecificity),n}insert(t,n,r,o,i,a){if(n===""){this._doInsertHere(t,r,o,i,a);return}let l=n.indexOf("."),s,u;l===-1?(s=n,u=""):(s=n.substring(0,l),u=n.substring(l+1));let f;this._children.hasOwnProperty(s)?f=this._children[s]:(f=new ip(this._mainRule.clone(),op.cloneArr(this._rulesWithParentScopes)),this._children[s]=f),f.insert(t+1,u,r,o,i,a)}_doInsertHere(t,n,r,o,i){if(n===null){this._mainRule.acceptOverwrite(t,r,o,i);return}for(let a=0,l=this._rulesWithParentScopes.length;a<l;a++){let s=this._rulesWithParentScopes[a];if(rw(s.parentScopes,n)===0){s.acceptOverwrite(t,r,o,i);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new op(t,n,r,o,i))}},Sa=class Rn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Rn.getLanguageId(t),r=Rn.getTokenType(t),o=Rn.getFontStyle(t),i=Rn.getForeground(t),a=Rn.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:i,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,o,i,a,l){let s=Rn.getLanguageId(t),u=Rn.getTokenType(t),f=Rn.containsBalancedBrackets(t)?1:0,c=Rn.getFontStyle(t),d=Rn.getForeground(t),h=Rn.getBackground(t);return n!==0&&(s=n),r!==8&&(u=r),o!==null&&(f=o?1:0),i!==-1&&(c=i),a!==0&&(d=a),l!==0&&(h=l),(s<<0|u<<8|f<<10|c<<11|d<<15|h<<24)>>>0}};function yc(e,t){const n=[],r=tD(e);let o=r.next();for(;o!==null;){let s=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let u=a();if(n.push({matcher:u,priority:s}),o!==",")break;o=r.next()}return n;function i(){if(o==="-"){o=r.next();const s=i();return u=>!!s&&!s(u)}if(o==="("){o=r.next();const s=l();return o===")"&&(o=r.next()),s}if(Zv(o)){const s=[];do s.push(o),o=r.next();while(Zv(o));return u=>t(s,u)}return null}function a(){const s=[];let u=i();for(;u;)s.push(u),u=i();return f=>s.every(c=>c(f))}function l(){const s=[];let u=a();for(;u&&(s.push(u),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");u=a()}return f=>s.some(c=>c(f))}}function Zv(e){return!!e&&!!e.match(/[\w\.:]+/)}function tD(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function sw(e){typeof e.dispose=="function"&&e.dispose()}var $l=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},nD=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},rD=class{constructor(){z(this,"_references",[]);z(this,"_seenReferenceKeys",new Set);z(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},oD=class{constructor(e,t){z(this,"seenFullScopeRequests",new Set);z(this,"seenPartialScopeRequests",new Set);z(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new $l(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new rD;for(const n of e)iD(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof $l){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function iD(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=n.lookup(t);e instanceof $l?_u({baseGrammar:i,selfGrammar:o},r):ap(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},r);const a=n.injections(e.scopeName);if(a)for(const l of a)r.add(new $l(l))}function ap(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];vc([r],t,n)}}function _u(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&vc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&vc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function vc(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const o=r.repository?ew({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&vc(r.patterns,{...t,repository:o},n);const i=r.include;if(!i)continue;const a=uw(i);switch(a.kind){case 0:_u({...t,selfGrammar:t.baseGrammar},n);break;case 1:_u(t,n);break;case 2:ap(a.ruleName,{...t,repository:o},n);break;case 3:case 4:const l=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const s={baseGrammar:t.baseGrammar,selfGrammar:l,repository:o};a.kind===4?ap(a.ruleName,s,n):_u(s,n)}else a.kind===4?n.add(new nD(a.scopeName,a.ruleName)):n.add(new $l(a.scopeName));break}}}var aD=class{constructor(){z(this,"kind",0)}},lD=class{constructor(){z(this,"kind",1)}},sD=class{constructor(e){z(this,"kind",2);this.ruleName=e}},uD=class{constructor(e){z(this,"kind",3);this.scopeName=e}},cD=class{constructor(e,t){z(this,"kind",4);this.scopeName=e,this.ruleName=t}};function uw(e){if(e==="$base")return new aD;if(e==="$self")return new lD;const t=e.indexOf("#");if(t===-1)return new uD(e);if(t===0)return new sD(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new cD(n,r)}}var fD=/\\(\d+)/,Wv=/\\(\d+)/g,dD=-1,cw=-2;var vs=class{constructor(e,t,n,r){z(this,"$location");z(this,"id");z(this,"_nameIsCapturing");z(this,"_name");z(this,"_contentNameIsCapturing");z(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Xs.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Xs.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${tw(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Xs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xs.replaceCaptures(this._contentName,e,t)}},hD=class extends vs{constructor(t,n,r,o,i){super(t,n,r,o);z(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,o){throw new Error("Not supported!")}},pD=class extends vs{constructor(t,n,r,o,i){super(t,n,r,null);z(this,"_match");z(this,"captures");z(this,"_cachedCompiledPatterns");this._match=new jl(o,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Vl,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Jv=class extends vs{constructor(t,n,r,o,i){super(t,n,r,o);z(this,"hasMissingPatterns");z(this,"patterns");z(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Vl,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},lp=class extends vs{constructor(t,n,r,o,i,a,l,s,u,f){super(t,n,r,o);z(this,"_begin");z(this,"beginCaptures");z(this,"_end");z(this,"endHasBackReferences");z(this,"endCaptures");z(this,"applyEndPatternLast");z(this,"hasMissingPatterns");z(this,"patterns");z(this,"_cachedCompiledPatterns");this._begin=new jl(i,this.id),this.beginCaptures=a,this._end=new jl(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=u||!1,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,o){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,o)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Vl;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},bc=class extends vs{constructor(t,n,r,o,i,a,l,s,u){super(t,n,r,o);z(this,"_begin");z(this,"beginCaptures");z(this,"whileCaptures");z(this,"_while");z(this,"whileHasBackReferences");z(this,"hasMissingPatterns");z(this,"patterns");z(this,"_cachedCompiledPatterns");z(this,"_cachedCompiledWhilePatterns");this._begin=new jl(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new jl(l,cw),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Vl;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,o){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,o)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Vl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},fw=class zt{static createCaptureRule(t,n,r,o,i){return t.registerRule(a=>new hD(n,a,r,o,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new pD(t.$vscodeTextmateLocation,t.id,t.name,t.match,zt._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=ew({},r,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new Jv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,zt._compilePatterns(i,n,r))}return t.while?new bc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,zt._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,zt._compileCaptures(t.whileCaptures||t.captures,n,r),zt._compilePatterns(t.patterns,n,r)):new lp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,zt._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,zt._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,zt._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const l=parseInt(a,10);l>i&&(i=l)}for(let a=0;a<=i;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const l=parseInt(a,10);let s=0;t[a].patterns&&(s=zt.getCompiledRuleId(t[a],n,r)),o[l]=zt.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let i=0,a=t.length;i<a;i++){const l=t[i];let s=-1;if(l.include){const u=uw(l.include);switch(u.kind){case 0:case 1:s=zt.getCompiledRuleId(r[l.include],n,r);break;case 2:let f=r[u.ruleName];f&&(s=zt.getCompiledRuleId(f,n,r));break;case 3:case 4:const c=u.scopeName,d=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(c,r);if(h)if(d){let y=h.repository[d];y&&(s=zt.getCompiledRuleId(y,n,h.repository))}else s=zt.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else s=zt.getCompiledRuleId(l,n,r);if(s!==-1){const u=n.getRule(s);let f=!1;if((u instanceof Jv||u instanceof lp||u instanceof bc)&&u.hasMissingPatterns&&u.patterns.length===0&&(f=!0),f)continue;o.push(s)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},jl=class dw{constructor(t,n){z(this,"source");z(this,"ruleId");z(this,"hasAnchor");z(this,"hasBackReferences");z(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let o=0,i=[],a=!1;for(let l=0;l<r;l++)if(t.charAt(l)==="\\"&&l+1<r){const u=t.charAt(l+1);u==="z"?(i.push(t.substring(o,l)),i.push("$(?!\\n)(?<!\\n)"),o=l+2):(u==="A"||u==="G")&&(a=!0),l++}this.hasAnchor=a,o===0?this.source=t:(i.push(t.substring(o,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=fD.test(this.source):this.hasBackReferences=!1}clone(){return new dw(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(o=>t.substring(o.start,o.end));return Wv.lastIndex=0,this.source.replace(Wv,(o,i)=>ow(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],o=[],i,a,l,s;for(i=0,a=this.source.length;i<a;i++)l=this.source.charAt(i),t[i]=l,n[i]=l,r[i]=l,o[i]=l,l==="\\"&&i+1<a&&(s=this.source.charAt(i+1),s==="A"?(t[i+1]="",n[i+1]="",r[i+1]="A",o[i+1]="A"):s==="G"?(t[i+1]="",n[i+1]="G",r[i+1]="",o[i+1]="G"):(t[i+1]=s,n[i+1]=s,r[i+1]=s,o[i+1]=s),i++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Vl=class{constructor(){z(this,"_items");z(this,"_hasAnchors");z(this,"_cached");z(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new eb(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(o=>o.resolveAnchors(t,n));return new eb(e,r,this._items.map(o=>o.ruleId))}},eb=class{constructor(e,t,n){z(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
92
|
-
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Md=class{constructor(e,t){this.languageId=e,this.tokenType=t}},_r,mD=(_r=class{constructor(t,n){z(this,"_defaultAttributes");z(this,"_embeddedLanguagesMatcher");z(this,"_getBasicScopeAttributes",new iw(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Md(n,r)}));this._defaultAttributes=new Md(t,8),this._embeddedLanguagesMatcher=new gD(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?_r._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(_r.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},z(_r,"_NULL_SCOPE_METADATA",new Md(0,0)),z(_r,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),_r),gD=class{constructor(e){z(this,"values");z(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>ow(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},tb=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function hw(e,t,n,r,o,i,a,l){const s=t.content.length;let u=!1,f=-1;if(a){const h=yD(e,t,n,r,o,i);o=h.stack,r=h.linePos,n=h.isFirstLine,f=h.anchorPosition}const c=Date.now();for(;!u;){if(l!==0&&Date.now()-c>l)return new tb(o,!0);d()}return new tb(o,!1);function d(){const h=vD(e,t,n,r,o,f);if(!h){i.produce(o,s),u=!0;return}const y=h.captureIndices,b=h.matchedRuleId,E=y&&y.length>0?y[0].end>r:!1;if(b===dD){const g=o.getRule(e);i.produce(o,y[0].start),o=o.withContentNameScopesList(o.nameScopesList),ol(e,t,n,o,i,g.endCaptures,y),i.produce(o,y[0].end);const p=o;if(o=o.parent,f=p.getAnchorPos(),!E&&p.getEnterPos()===r){o=p,i.produce(o,s),u=!0;return}}else{const g=e.getRule(b);i.produce(o,y[0].start);const p=o,v=g.getName(t.content,y),S=o.contentNameScopesList.pushAttributed(v,e);if(o=o.push(b,r,f,y[0].end===s,null,S,S),g instanceof lp){const C=g;ol(e,t,n,o,i,C.beginCaptures,y),i.produce(o,y[0].end),f=y[0].end;const w=C.getContentName(t.content,y),R=S.pushAttributed(w,e);if(o=o.withContentNameScopesList(R),C.endHasBackReferences&&(o=o.withEndRule(C.getEndWithResolvedBackReferences(t.content,y))),!E&&p.hasSameRuleAs(o)){o=o.pop(),i.produce(o,s),u=!0;return}}else if(g instanceof bc){const C=g;ol(e,t,n,o,i,C.beginCaptures,y),i.produce(o,y[0].end),f=y[0].end;const w=C.getContentName(t.content,y),R=S.pushAttributed(w,e);if(o=o.withContentNameScopesList(R),C.whileHasBackReferences&&(o=o.withEndRule(C.getWhileWithResolvedBackReferences(t.content,y))),!E&&p.hasSameRuleAs(o)){o=o.pop(),i.produce(o,s),u=!0;return}}else if(ol(e,t,n,o,i,g.captures,y),i.produce(o,y[0].end),o=o.pop(),!E){o=o.safePop(),i.produce(o,s),u=!0;return}}y[0].end>r&&(r=y[0].end,n=!1)}}function yD(e,t,n,r,o,i){let a=o.beginRuleCapturedEOL?0:-1;const l=[];for(let s=o;s;s=s.pop()){const u=s.getRule(e);u instanceof bc&&l.push({rule:u,stack:s})}for(let s=l.pop();s;s=l.pop()){const{ruleScanner:u,findOptions:f}=ED(s.rule,e,s.stack.endRule,n,r===a),c=u.findNextMatchSync(t,r,f);if(c){if(c.ruleId!==cw){o=s.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(i.produce(s.stack,c.captureIndices[0].start),ol(e,t,n,s.stack,i,s.rule.whileCaptures,c.captureIndices),i.produce(s.stack,c.captureIndices[0].end),a=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,n=!1))}else{o=s.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:a,isFirstLine:n}}function vD(e,t,n,r,o,i){const a=bD(e,t,n,r,o,i),l=e.getInjections();if(l.length===0)return a;const s=SD(l,e,t,n,r,o,i);if(!s)return a;if(!a)return s;const u=a.captureIndices[0].start,f=s.captureIndices[0].start;return f<u||s.priorityMatch&&f===u?s:a}function bD(e,t,n,r,o,i){const a=o.getRule(e),{ruleScanner:l,findOptions:s}=pw(a,e,o.endRule,n,r===i),u=l.findNextMatchSync(t,r,s);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function SD(e,t,n,r,o,i,a){let l=Number.MAX_VALUE,s=null,u,f=0;const c=i.contentNameScopesList.getScopeNames();for(let d=0,h=e.length;d<h;d++){const y=e[d];if(!y.matcher(c))continue;const b=t.getRule(y.ruleId),{ruleScanner:E,findOptions:g}=pw(b,t,null,r,o===a),p=E.findNextMatchSync(n,o,g);if(!p)continue;const v=p.captureIndices[0].start;if(!(v>=l)&&(l=v,s=p.captureIndices,u=p.ruleId,f=y.priority,l===o))break}return s?{priorityMatch:f===-1,captureIndices:s,matchedRuleId:u}:null}function pw(e,t,n,r,o){return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function ED(e,t,n,r,o){return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function ol(e,t,n,r,o,i,a){if(i.length===0)return;const l=t.content,s=Math.min(i.length,a.length),u=[],f=a[0].end;for(let c=0;c<s;c++){const d=i[c];if(d===null)continue;const h=a[c];if(h.length===0)continue;if(h.start>f)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,h.start):o.produce(r,h.start),d.retokenizeCapturedWithRuleId){const b=d.getName(l,a),E=r.contentNameScopesList.pushAttributed(b,e),g=d.getContentName(l,a),p=E.pushAttributed(g,e),v=r.push(d.retokenizeCapturedWithRuleId,h.start,-1,!1,null,E,p),S=e.createOnigString(l.substring(0,h.end));hw(e,S,n&&h.start===0,h.start,v,o,!1,0),sw(S);continue}const y=d.getName(l,a);if(y!==null){const E=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(y,e);u.push(new CD(E,h.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var CD=class{constructor(e,t){z(this,"scopes");z(this,"endPos");this.scopes=e,this.endPos=t}};function RD(e,t,n,r,o,i,a,l){return new _D(e,t,n,r,o,i,a,l)}function nb(e,t,n,r,o){const i=yc(t,Sc),a=fw.getCompiledRuleId(n,r,o.repository);for(const l of i)e.push({debugSelector:t,matcher:l.matcher,ruleId:a,grammar:o,priority:l.priority})}function Sc(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let o=n;o<t.length;o++)if(wD(t[o],r))return n=o+1,!0;return!1})}function wD(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var _D=class{constructor(e,t,n,r,o,i,a,l){z(this,"_rootId");z(this,"_lastRuleId");z(this,"_ruleId2desc");z(this,"_includedGrammars");z(this,"_grammarRepository");z(this,"_grammar");z(this,"_injections");z(this,"_basicScopeAttributesProvider");z(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=l,this._basicScopeAttributesProvider=new mD(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=rb(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const s of Object.keys(o)){const u=yc(s,Sc);for(const f of u)this._tokenTypeMatchers.push({matcher:f.matcher,type:o[s]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const o=r.injections;if(o)for(let a in o)nb(t,a,o[a],this,r);const i=this._grammarRepository.injections(n);i&&i.forEach(a=>{const l=this.getExternalGrammar(a);if(l){const s=l.injectionSelector;s&&nb(t,s,l,this,l)}})}return t.sort((o,i)=>o.priority-i.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=rb(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=fw.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===sp.NULL){o=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),f=this.themeProvider.getDefaults(),c=Sa.set(0,u.languageId,u.tokenType,null,f.fontStyle,f.foregroundId,f.backgroundId),d=this.getRule(this._rootId).getName(null,null);let h;d?h=Rl.createRootAndLookUpScopeName(d,c,this):h=Rl.createRoot("unknown",c),t=new sp(null,this._rootId,-1,-1,!1,null,h,h)}else o=!1,t.reset();e=e+`
|
|
93
|
-
`;const i=this.createOnigString(e),a=i.content.length,l=new TD(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),s=hw(this,i,o,0,t,l,!0,r);return sw(i),{lineLength:a,lineTokens:l,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function rb(e,t){return e=VL(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Rl=class Zn{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,o=(t==null?void 0:t.scopePath)??null;for(const i of n)o=Od.push(o,i.scopeNames),r=new Zn(r,o,i.encodedTokenAttributes);return r}static createRoot(t,n){return new Zn(null,new Od(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const o=r.getMetadataForScope(t),i=new Od(null,t),a=r.themeProvider.themeMatch(i),l=Zn.mergeAttributes(n,o,a);return new Zn(null,i,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Zn.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let o=-1,i=0,a=0;return r!==null&&(o=r.fontStyle,i=r.foregroundId,a=r.backgroundId),Sa.set(t,n.languageId,n.tokenType,null,o,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Zn._pushAttributed(this,t,n);const r=t.split(/ /g);let o=this;for(const i of r)o=Zn._pushAttributed(o,i,n);return o}static _pushAttributed(t,n,r){const o=r.getMetadataForScope(n),i=t.scopePath.push(n),a=r.themeProvider.themeMatch(i),l=Zn.mergeAttributes(t.tokenAttributes,o,a);return new Zn(t,i,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var o;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((o=r.parent)==null?void 0:o.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},An,sp=(An=class{constructor(t,n,r,o,i,a,l,s){z(this,"_stackElementBrand");z(this,"_enterPos");z(this,"_anchorPos");z(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=l,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}equals(t){return t===null?!1:An._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Rl.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){An._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,i,a,l){return new An(this,t,n,r,o,i,a,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,o;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(o=this.contentNameScopesList)==null?void 0:o.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new An(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Rl.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new An(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Rl.fromExtension(r,n.contentNameScopesList))}},z(An,"NULL",new An(null,0,0,0,!1,null,null,null)),An),xD=class{constructor(e,t){z(this,"balancedBracketScopes");z(this,"unbalancedBracketScopes");z(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):yc(n,Sc).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>yc(n,Sc).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},TD=class{constructor(e,t,n,r){z(this,"_emitBinaryTokens");z(this,"_lineText");z(this,"_tokens");z(this,"_binaryTokens");z(this,"_lastTokenEndIndex");z(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let o=(e==null?void 0:e.tokenAttributes)??0,i=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(e==null?void 0:e.getScopeNames())??[];for(const l of this._tokenTypeOverrides)l.matcher(a)&&(o=Sa.set(o,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(a))}if(i&&(o=Sa.set(o,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===o){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(o),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,o=this._binaryTokens.length;r<o;r++)n[r]=this._binaryTokens[r];return n}},AD=class{constructor(e,t){z(this,"_grammars",new Map);z(this,"_rawGrammars",new Map);z(this,"_injectionGrammars",new Map);z(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,o){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,RD(e,i,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},OD=class{constructor(t){z(this,"_options");z(this,"_syncRegistry");z(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new AD(gc.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(gc.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new xD(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,o,i){const a=new oD(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(l=>this._loadSingleGrammar(l.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,o,i)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,o)}_grammarForScopeName(t,n=0,r=null,o=null,i=null){return this._syncRegistry.grammarForScopeName(t,n,r,o,i)}},up=sp.NULL;function Ec(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[o,i]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof i=="string"?n[o]=i:o===r&&Object.assign(n,i);return n}function Ro(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function MD(e){return Array.isArray(e)?e:[e]}async function mw(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function df(e){return!e||["plaintext","txt","text","plain"].includes(e)}function gw(e){return e==="ansi"||df(e)}function hf(e){return e==="none"}function yw(e){return hf(e)}function pf(e,t=!1){var i;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const o=[];for(let a=0;a<n.length;a+=2){const l=t?n[a]+(n[a+1]||""):n[a];o.push([l,r]),r+=n[a].length,r+=((i=n[a+1])==null?void 0:i.length)||0}return o}const ob={light:"#333333",dark:"#bbbbbb"},ib={light:"#fffffe",dark:"#1e1e1e"},ab="__shiki_resolved";function mf(e){var l,s,u,f,c;if(e!=null&&e[ab])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const d=t.settings?t.settings.find(h=>!h.name&&!h.scope):void 0;(l=d==null?void 0:d.settings)!=null&&l.foreground&&(r=d.settings.foreground),(s=d==null?void 0:d.settings)!=null&&s.background&&(n=d.settings.background),!r&&((u=t==null?void 0:t.colors)!=null&&u["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((f=t==null?void 0:t.colors)!=null&&f["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?ob.light:ob.dark),n||(n=t.type==="light"?ib.light:ib.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const i=new Map;function a(d){var y;if(i.has(d))return i.get(d);o+=1;const h=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return(y=t.colorReplacements)!=null&&y[`#${h}`]?a(d):(i.set(d,h),h)}t.settings=t.settings.map(d=>{var E,g;const h=((E=d.settings)==null?void 0:E.foreground)&&!d.settings.foreground.startsWith("#"),y=((g=d.settings)==null?void 0:g.background)&&!d.settings.background.startsWith("#");if(!h&&!y)return d;const b={...d,settings:{...d.settings}};if(h){const p=a(d.settings.foreground);t.colorReplacements[p]=d.settings.foreground,b.settings.foreground=p}if(y){const p=a(d.settings.background);t.colorReplacements[p]=d.settings.background,b.settings.background=p}return b});for(const d of Object.keys(t.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!((c=t.colors[d])!=null&&c.startsWith("#"))){const h=a(t.colors[d]);t.colorReplacements[h]=t.colors[d],t.colors[d]=h}return Object.defineProperty(t,ab,{enumerable:!1,writable:!1,value:!0}),t}async function vw(e){return Array.from(new Set((await Promise.all(e.filter(t=>!gw(t)).map(async t=>await mw(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function bw(e){return(await Promise.all(e.map(async t=>yw(t)?null:mf(await mw(t))))).filter(t=>!!t)}function Sw(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Ye(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}var kD=class extends OD{constructor(t,n,r,o={}){super(t);z(this,"_resolvedThemes",new Map);z(this,"_resolvedGrammars",new Map);z(this,"_langMap",new Map);z(this,"_langGraph",new Map);z(this,"_textmateThemeCache",new WeakMap);z(this,"_loadedThemesCache",null);z(this,"_loadedLanguagesCache",null);this._resolver=t,this._themes=n,this._langs=r,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=mf(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=gc.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=Sw(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){var i,a,l,s;if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(u=>{var f;return(f=u.embeddedLangsLazy)==null?void 0:f.includes(t.name)}));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(u=>{this._alias[u]=t.name}),this._loadedLanguagesCache=null,n.size)for(const u of n)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(a=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||a.delete(u.scopeName),(s=(l=this._syncRegistry)==null?void 0:l._grammars)==null||s.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const n=Array.from(this._langGraph.entries()),r=n.filter(([o,i])=>!i);if(r.length){const o=n.filter(([i,a])=>{var l;return a?(l=a.embeddedLanguages||a.embeddedLangs)==null?void 0:l.some(s=>r.map(([u])=>u).includes(s)):!1}).filter(i=>!r.includes(i));throw new Ye(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of n)this._resolver.addLanguage(i);for(const[o,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}},ND=class{constructor(e,t){z(this,"_langs",new Map);z(this,"_scopeToLang",new Map);z(this,"_injections",new Map);z(this,"_onigLib");this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const o=t.slice(0,r).join(".");n=[...n,...this._injections.get(o)||[]]}return n}};let Qa=0;function LD(e){Qa+=1,e.warnings!==!1&&Qa>=10&&Qa%10===0&&console.warn(`[Shiki] ${Qa} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Ye("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(mf),o=new kD(new ND(e.engine,n),r,n,e.langAlias);let i;function a(p){return Sw(p,e.langAlias)}function l(p){E();const v=o.getGrammar(typeof p=="string"?p:p.name);if(!v)throw new Ye(`Language \`${p}\` not found, you may need to load it first`);return v}function s(p){if(p==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};E();const v=o.getTheme(p);if(!v)throw new Ye(`Theme \`${p}\` not found, you may need to load it first`);return v}function u(p){E();const v=s(p);return i!==p&&(o.setTheme(v),i=p),{theme:v,colorMap:o.getColorMap()}}function f(){return E(),o.getLoadedThemes()}function c(){return E(),o.getLoadedLanguages()}function d(...p){E(),o.loadLanguages(p.flat(1))}async function h(...p){return d(await vw(p))}function y(...p){E();for(const v of p.flat(1))o.loadTheme(v)}async function b(...p){return E(),y(await bw(p))}function E(){if(t)throw new Ye("Shiki instance has been disposed")}function g(){t||(t=!0,o.dispose(),Qa-=1)}return{setTheme:u,getTheme:s,getLanguage:l,getLoadedThemes:f,getLoadedLanguages:c,resolveLangAlias:a,loadLanguage:h,loadLanguageSync:d,loadTheme:b,loadThemeSync:y,dispose:g,[Symbol.dispose]:g}}async function DD(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([bw(e.themes||[]),vw(e.langs||[]),e.engine]);return LD({...e,themes:t,langs:n,engine:r})}const Ew=new WeakMap;function gf(e,t){Ew.set(e,t)}function Fl(e){return Ew.get(e)}var yf=class Cw{constructor(...t){z(this,"_stacks",{});z(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,o]=t;this.lang=r,this._stacks={[o]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Cw(Object.fromEntries(MD(n).map(r=>[r,up])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return PD(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function PD(e){const t=[],n=new Set;function r(o){var a;if(n.has(o))return;n.add(o);const i=(a=o==null?void 0:o.nameScopesList)==null?void 0:a.scopeName;i&&t.push(i),o.parent&&r(o.parent)}return r(e),t}function ID(e,t){if(!(e instanceof yf))throw new Ye("Invalid grammar state");return e.getInternalStack(t)}function Rw(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(df(e.resolveLangAlias(n.lang||"text"))||hf(r))return pf(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:o,colorMap:i}=e.setTheme(r),a=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==a.name)throw new Ye(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Ye(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return UD(t,a,o,i,n)}function zD(...e){if(e.length===2)return Fl(e[1]);const[t,n,r={}]=e,{lang:o="text",theme:i=t.getLoadedThemes()[0]}=r;if(df(o)||hf(i))throw new Ye("Plain language does not have grammar state");if(o==="ansi")throw new Ye("ANSI language does not have grammar state");const{theme:a,colorMap:l}=t.setTheme(i),s=t.getLanguage(o);return new yf(dg(n,s,a,l,r).stateStack,s.name,a.name)}function UD(e,t,n,r,o){const i=dg(e,t,n,r,o),a=new yf(i.stateStack,t.name,n.name);return gf(i.tokens,a),i.tokens}function dg(e,t,n,r,o){const i=Ec(n,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:l=500}=o,s=pf(e);let u=o.grammarState?ID(o.grammarState,n.name)??up:o.grammarContextCode!=null?dg(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:up,f=[];const c=[];for(let d=0,h=s.length;d<h;d++){const[y,b]=s[d];if(y===""){f=[],c.push([]);continue}if(a>0&&y.length>=a){f=[],c.push([{content:y,offset:b,color:"",fontStyle:0}]);continue}let E,g,p;o.includeExplanation&&(E=t.tokenizeLine(y,u,l),g=E.tokens,p=0);const v=t.tokenizeLine2(y,u,l),S=v.tokens.length/2;for(let C=0;C<S;C++){const w=v.tokens[2*C],R=C+1<S?v.tokens[2*C+2]:y.length;if(w===R)continue;const x=v.tokens[2*C+1],O=Ro(r[Sa.getForeground(x)],i),k=Sa.getFontStyle(x),P={content:y.substring(w,R),offset:b+w,color:O,fontStyle:k};if(o.includeExplanation){const U=[];if(o.includeExplanation!=="scopeName")for(const L of n.settings){let M;switch(typeof L.scope){case"string":M=L.scope.split(/,/).map(_=>_.trim());break;case"object":M=L.scope;break;default:continue}U.push({settings:L,selectors:M.map(_=>_.split(/ /))})}P.explanation=[];let A=0;for(;w+A<R;){const L=g[p],M=y.substring(L.startIndex,L.endIndex);A+=M.length,P.explanation.push({content:M,scopes:o.includeExplanation==="scopeName"?BD(L.scopes):HD(U,L.scopes)}),p+=1}}f.push(P)}c.push(f),f=[],u=v.ruleStack}return{tokens:c,stateStack:u}}function BD(e){return e.map(t=>({scopeName:t}))}function HD(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r];n[r]={scopeName:i,themeMatches:$D(e,i,t.slice(0,r))}}return n}function lb(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function GD(e,t,n){if(!lb(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)lb(e[r],n[o])&&(r-=1),o-=1;return r===-1}function $D(e,t,n){const r=[];for(const{selectors:o,settings:i}of e)for(const a of o)if(GD(a,t,n)){r.push(i);break}return r}function ww(e,t,n,r=Rw){const o=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),i=o.map(u=>{const f=r(e,t,{...n,theme:u.theme});return{tokens:f,state:Fl(f),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),a=jD(...i.map(u=>u.tokens)),l=a[0].map((u,f)=>u.map((c,d)=>{const h={content:c.content,variants:{},offset:c.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=c.explanation),a.forEach((y,b)=>{const{content:E,explanation:g,offset:p,...v}=y[f][d];h.variants[o[b].color]=v}),h})),s=i[0].state?new yf(Object.fromEntries(i.map(u=>{var f;return[u.theme,(f=u.state)==null?void 0:f.getInternalStack(u.theme)]})),i[0].state.lang):void 0;return s&&gf(l,s),l}function jD(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const o=e.map(s=>s[r]),i=t.map(()=>[]);t.forEach((s,u)=>s.push(i[u]));const a=o.map(()=>0),l=o.map(s=>s[0]);for(;l.every(s=>s);){const s=Math.min(...l.map(u=>u.content.length));for(let u=0;u<n;u++){const f=l[u];f.content.length===s?(i[u].push(f),a[u]+=1,l[u]=o[u][a[u]]):(i[u].push({...f,content:f.content.slice(0,s)}),l[u]={...f,content:f.content.slice(s),offset:f.offset+s})}}}return t}const VD=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class bs{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}bs.prototype.normal={};bs.prototype.property={};bs.prototype.space=void 0;function _w(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new bs(n,r,t)}function cp(e){return e.toLowerCase()}class sn{constructor(t,n){this.attribute=n,this.property=t}}sn.prototype.attribute="";sn.prototype.booleanish=!1;sn.prototype.boolean=!1;sn.prototype.commaOrSpaceSeparated=!1;sn.prototype.commaSeparated=!1;sn.prototype.defined=!1;sn.prototype.mustUseProperty=!1;sn.prototype.number=!1;sn.prototype.overloadedBoolean=!1;sn.prototype.property="";sn.prototype.spaceSeparated=!1;sn.prototype.space=void 0;let FD=0;const _e=Ci(),ht=Ci(),fp=Ci(),F=Ci(),qe=Ci(),ta=Ci(),cn=Ci();function Ci(){return 2**++FD}const dp=Object.freeze(Object.defineProperty({__proto__:null,boolean:_e,booleanish:ht,commaOrSpaceSeparated:cn,commaSeparated:ta,number:F,overloadedBoolean:fp,spaceSeparated:qe},Symbol.toStringTag,{value:"Module"})),kd=Object.keys(dp);class hg extends sn{constructor(t,n,r,o){let i=-1;if(super(t,n),sb(this,"space",o),typeof r=="number")for(;++i<kd.length;){const a=kd[i];sb(this,kd[i],(r&dp[a])===dp[a])}}}hg.prototype.defined=!0;function sb(e,t,n){n&&(e[t]=n)}function Ia(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new hg(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[cp(r)]=r,n[cp(i.attribute)]=r}return new bs(t,n,e.space)}const xw=Ia({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:qe,ariaCurrent:null,ariaDescribedBy:qe,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:qe,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:qe,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qe,ariaLevel:F,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:qe,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:qe,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:ht,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Tw(e,t){return t in e?e[t]:t}function Aw(e,t){return Tw(e,t.toLowerCase())}const qD=Ia({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ta,acceptCharset:qe,accessKey:qe,action:null,allow:null,allowFullScreen:_e,allowPaymentRequest:_e,allowUserMedia:_e,alt:null,as:null,async:_e,autoCapitalize:null,autoComplete:qe,autoFocus:_e,autoPlay:_e,blocking:qe,capture:null,charSet:null,checked:_e,cite:null,className:qe,cols:F,colSpan:null,content:null,contentEditable:ht,controls:_e,controlsList:qe,coords:F|ta,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_e,defer:_e,dir:null,dirName:null,disabled:_e,download:fp,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_e,formTarget:null,headers:qe,height:F,hidden:fp,high:F,href:null,hrefLang:null,htmlFor:qe,httpEquiv:qe,id:null,imageSizes:null,imageSrcSet:null,inert:_e,inputMode:null,integrity:null,is:null,isMap:_e,itemId:null,itemProp:qe,itemRef:qe,itemScope:_e,itemType:qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_e,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,multiple:_e,muted:_e,name:null,nonce:null,noModule:_e,noValidate:_e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:_e,optimum:F,pattern:null,ping:qe,placeholder:null,playsInline:_e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_e,referrerPolicy:null,rel:qe,required:_e,reversed:_e,rows:F,rowSpan:F,sandbox:qe,scope:null,scoped:_e,seamless:_e,selected:_e,shadowRootClonable:_e,shadowRootDelegatesFocus:_e,shadowRootMode:null,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:_e,useMap:null,value:ht,width:F,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qe,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_e,declare:_e,event:null,face:null,frame:null,frameBorder:null,hSpace:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:_e,noHref:_e,noShade:_e,noWrap:_e,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_e,disableRemotePlayback:_e,prefix:null,property:null,results:F,security:null,unselectable:null},space:"html",transform:Aw}),YD=Ia({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:cn,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:_e,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ta,g2:ta,glyphName:ta,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:F,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cn,rev:cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cn,requiredFeatures:cn,requiredFonts:cn,requiredFormats:cn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cn,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Tw}),Ow=Ia({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Mw=Ia({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Aw}),kw=Ia({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),nU={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},XD=/[A-Z]/g,ub=/-[a-z]/g,KD=/^data[-\w.:]+$/i;function QD(e,t){const n=cp(t);let r=t,o=sn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&KD.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ub,WD);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ub.test(i)){let a=i.replace(XD,ZD);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=hg}return new o(r,t)}function ZD(e){return"-"+e.toLowerCase()}function WD(e){return e.charAt(1).toUpperCase()}const JD=_w([xw,qD,Ow,Mw,kw],"html"),Nw=_w([xw,YD,Ow,Mw,kw],"svg"),cb={}.hasOwnProperty;function e2(e,t){const n=t||{};function r(o,...i){let a=r.invalid;const l=r.handlers;if(o&&cb.call(o,e)){const s=String(o[e]);a=cb.call(l,s)?l[s]:r.unknown}if(a)return a.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const t2=/["&'<>`]/g,n2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,o2=/[|\\{}()[\]^$+*?.]/g,fb=new WeakMap;function i2(e,t){if(e=e.replace(t.subset?a2(t.subset):t2,r),t.subset||t.escapeOnly)return e;return e.replace(n2,n).replace(r2,r);function n(o,i,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),t)}function r(o,i,a){return t.format(o.charCodeAt(0),a.charCodeAt(i+1),t)}}function a2(e){let t=fb.get(e);return t||(t=l2(e),fb.set(e,t)),t}function l2(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(o2,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const s2=/[\dA-Fa-f]/;function u2(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!s2.test(String.fromCharCode(t))?r:r+";"}const c2=/\d/;function f2(e,t,n){const r="&#"+String(e);return n&&t&&!c2.test(String.fromCharCode(t))?r:r+";"}const d2=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Nd={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},h2=["cent","copy","divide","gt","lt","not","para","times"],Lw={}.hasOwnProperty,hp={};let Ks;for(Ks in Nd)Lw.call(Nd,Ks)&&(hp[Nd[Ks]]=Ks);const p2=/[^\dA-Za-z]/;function m2(e,t,n,r){const o=String.fromCharCode(e);if(Lw.call(hp,o)){const i=hp[o],a="&"+i;return n&&d2.includes(i)&&!h2.includes(i)&&(!r||t&&t!==61&&p2.test(String.fromCharCode(t)))?a:a+";"}return""}function g2(e,t,n){let r=u2(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=m2(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const i=f2(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return o&&(!n.useShortestReferences||o.length<r.length)?o:r}function na(e,t){return i2(e,Object.assign({format:g2},t))}const y2=/^>|^->|<!--|-->|--!>|<!-$/g,v2=[">"],b2=["<",">"];function S2(e,t,n,r){return r.settings.bogusComments?"<?"+na(e.value,Object.assign({},r.settings.characterReferences,{subset:v2}))+">":"<!--"+e.value.replace(y2,o)+"-->";function o(i){return na(i,Object.assign({},r.settings.characterReferences,{subset:b2}))}}function E2(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function db(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function C2(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function R2(e){return e.join(" ").trim()}const w2=/[ \t\n\f\r]/g;function pg(e){return typeof e=="object"?e.type==="text"?hb(e.value):!1:hb(e)}function hb(e){return e.replace(w2,"")===""}const wt=Pw(1),Dw=Pw(-1),_2=[];function Pw(e){return t;function t(n,r,o){const i=n?n.children:_2;let a=(r||0)+e,l=i[a];if(!o)for(;l&&pg(l);)a+=e,l=i[a];return l}}const x2={}.hasOwnProperty;function Iw(e){return t;function t(n,r,o){return x2.call(e,n.tagName)&&e[n.tagName](n,r,o)}}const mg=Iw({body:A2,caption:Ld,colgroup:Ld,dd:N2,dt:k2,head:Ld,html:T2,li:M2,optgroup:L2,option:D2,p:O2,rp:pb,rt:pb,tbody:I2,td:mb,tfoot:z2,th:mb,thead:P2,tr:U2});function Ld(e,t,n){const r=wt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&pg(r.value.charAt(0)))}function T2(e,t,n){const r=wt(n,t);return!r||r.type!=="comment"}function A2(e,t,n){const r=wt(n,t);return!r||r.type!=="comment"}function O2(e,t,n){const r=wt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function M2(e,t,n){const r=wt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function k2(e,t,n){const r=wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function N2(e,t,n){const r=wt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function pb(e,t,n){const r=wt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function L2(e,t,n){const r=wt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function D2(e,t,n){const r=wt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function P2(e,t,n){const r=wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function I2(e,t,n){const r=wt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function z2(e,t,n){return!wt(n,t)}function U2(e,t,n){const r=wt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function mb(e,t,n){const r=wt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const B2=Iw({body:$2,colgroup:j2,head:G2,html:H2,tbody:V2});function H2(e){const t=wt(e,-1);return!t||t.type!=="comment"}function G2(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function $2(e){const t=wt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&pg(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function j2(e,t,n){const r=Dw(n,t),o=wt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&mg(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function V2(e,t,n){const r=Dw(n,t),o=wt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&mg(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Qs={name:[[`
|
|
94
|
-
\f\r &/=>`.split(""),`
|
|
95
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
96
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
97
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
98
|
-
\f\r &>`.split(""),`\0
|
|
99
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
100
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
101
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function F2(e,t,n,r){const o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags;let a=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const l=[];let s;o.space==="html"&&e.tagName==="svg"&&(r.schema=Nw);const u=q2(r,e.properties),f=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,f&&(a=!1),(u||!i||!B2(e,t,n))&&(l.push("<",e.tagName,u?" "+u:""),a&&(o.space==="svg"||r.settings.closeSelfClosing)&&(s=u.charAt(u.length-1),(!r.settings.tightSelfClosing||s==="/"||s&&s!=='"'&&s!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(f),!a&&(!i||!mg(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function q2(e,t){const n=[];let r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const i=Y2(e,o,t[o]);i&&n.push(i)}}for(;++r<n.length;){const i=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&i!=='"'&&i!=="'"&&(n[r]+=" ")}return n.join("")}function Y2(e,t,n){const r=QD(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let a=e.quote,l;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const s=na(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Qs.name[o][i]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?C2:R2)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?s:(e.settings.preferUnquoted&&(l=na(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Qs.unquoted[o][i]}))),l!==n&&(e.settings.quoteSmart&&db(n,a)>db(n,e.alternative)&&(a=e.alternative),l=a+na(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Qs.single:Qs.double)[o][i],attribute:!0}))+a),s+(l&&"="+l))}const X2=["<","&"];function zw(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:na(e.value,Object.assign({},r.settings.characterReferences,{subset:X2}))}function K2(e,t,n,r){return r.settings.allowDangerousHtml?e.value:zw(e,t,n,r)}function Q2(e,t,n,r){return r.all(e)}const Z2=e2("type",{invalid:W2,unknown:J2,handlers:{comment:S2,doctype:E2,element:F2,raw:K2,root:Q2,text:zw}});function W2(e){throw new Error("Expected node, not `"+e+"`")}function J2(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const eP={},tP={},nP=[];function rP(e,t){const n=t||eP,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:oP,all:iP,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||VD,characterReferences:n.characterReferences||tP,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Nw:JD,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function oP(e,t,n){return Z2(e,t,n,this)}function iP(e){const t=[],n=e&&e.children||nP;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Uw(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const o of n)o&&!e.properties.class.includes(o)&&e.properties.class.push(o);return e}function aP(e){const t=pf(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=o,a=0;for(const l of t){if(i<l.length)break;i-=l.length,a++}return{line:a,character:i}}function r(o,i){let a=0;for(let l=0;l<o;l++)a+=t[l].length;return a+=i,a}return{lines:t,indexToPos:n,posToIndex:r}}const gg="light-dark()",lP=["color","background-color"];function sP(e,t){let n=0;const r=[];for(const o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function uP(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,o)=>r-o);return n.length?e.map(r=>r.flatMap(o=>{const i=n.filter(a=>o.offset<a&&a<o.offset+o.content.length).map(a=>a-o.offset).sort((a,l)=>a-l);return i.length?sP(o,i):o})):e}function cP(e,t,n,r,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(f=>ql(e.variants[f])),l=new Set(a.flatMap(f=>Object.keys(f))),s={},u=(f,c)=>{const d=c==="color"?"":c==="background-color"?"-bg":`-${c}`;return n+t[f]+(c==="color"?"":d)};return a.forEach((f,c)=>{for(const d of l){const h=f[d]||"inherit";if(c===0&&r&&lP.includes(d))if(r===gg&&a.length>1){const y=t.findIndex(E=>E==="light"),b=t.findIndex(E=>E==="dark");if(y===-1||b===-1)throw new Ye('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');s[d]=`light-dark(${a[y][d]||"inherit"}, ${a[b][d]||"inherit"})`,o==="css-vars"&&(s[u(c,d)]=h)}else s[d]=h;else o==="css-vars"&&(s[u(c,d)]=h)}}),i.htmlStyle=s,i}function ql(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Ht.Italic&&(t["font-style"]="italic"),e.fontStyle&Ht.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Ht.Underline&&n.push("underline"),e.fontStyle&Ht.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Cc(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function fP(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let o=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new Ye(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...r.indexToPos(a),offset:a}}else{const l=r.lines[a.line];if(l===void 0)throw new Ye(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${r.lines.length}`);let s=a.character;if(s<0&&(s=l.length+s),s<0||s>l.length)throw new Ye(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${l.length}`);return{...a,character:s,offset:r.posToIndex(a.line,s)}}};const r=aP(n.source),i=(n.options.decorations||[]).map(a=>({...a,start:o(a.start),end:o(a.end)}));dP(i),e.set(n.meta,{decorations:i,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var r;if((r=this.options.decorations)!=null&&r.length)return uP(n,t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]))},code(n){var f;if(!((f=this.options.decorations)!=null&&f.length))return;const r=t(this),o=Array.from(n.children).filter(c=>c.type==="element"&&c.tagName==="span");if(o.length!==r.converter.lines.length)throw new Ye(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(c,d,h,y){const b=o[c];let E="",g=-1,p=-1;if(d===0&&(g=0),h===0&&(p=0),h===Number.POSITIVE_INFINITY&&(p=b.children.length),g===-1||p===-1)for(let S=0;S<b.children.length;S++)E+=Bw(b.children[S]),g===-1&&E.length===d&&(g=S+1),p===-1&&E.length===h&&(p=S+1);if(g===-1)throw new Ye(`Failed to find start index for decoration ${JSON.stringify(y.start)}`);if(p===-1)throw new Ye(`Failed to find end index for decoration ${JSON.stringify(y.end)}`);const v=b.children.slice(g,p);if(!y.alwaysWrap&&v.length===b.children.length)l(b,y,"line");else if(!y.alwaysWrap&&v.length===1&&v[0].type==="element")l(v[0],y,"token");else{const S={type:"element",tagName:"span",properties:{},children:v};l(S,y,"wrapper"),b.children.splice(g,v.length,S)}}function a(c,d){o[c]=l(o[c],d,"line")}function l(c,d,h){var E;const y=d.properties||{},b=d.transform||(g=>g);return c.tagName=d.tagName||"span",c.properties={...c.properties,...y,class:c.properties.class},(E=d.properties)!=null&&E.class&&Uw(c,d.properties.class),c=b(c,h)||c,c}const s=[],u=r.decorations.sort((c,d)=>d.start.offset-c.start.offset||c.end.offset-d.end.offset);for(const c of u){const{start:d,end:h}=c;if(d.line===h.line)i(d.line,d.character,h.character,c);else if(d.line<h.line){i(d.line,d.character,Number.POSITIVE_INFINITY,c);for(let y=d.line+1;y<h.line;y++)s.unshift(()=>a(y,c));i(h.line,0,h.character,c)}}s.forEach(c=>c())}}}function dP(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Ye(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const o=e[r],i=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,a=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,l=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,s=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(i||a||l||s){if(i&&a||l&&s||l&&n.start.offset===n.end.offset||a&&o.start.offset===o.end.offset)continue;throw new Ye(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function Bw(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Bw).join(""):""}const hP=[fP()];function Rc(e){const t=pP(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...hP]}function pP(e){const t=[],n=[],r=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:r.push(o)}return{pre:t,post:n,normal:r}}var qo=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Dd={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function mP(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function gb(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function gP(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Dd[r]&&t.push({type:"setDecoration",value:Dd[r]});else if(r<=29){const o=Dd[r-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:qo[r-30]}});else if(r===38){const o=gb(e);o&&t.push({type:"setForegroundColor",value:o})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:qo[r-40]}});else if(r===48){const o=gb(e);o&&t.push({type:"setBackgroundColor",value:o})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:qo[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:qo[r-100+8]}})}return t}function yP(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let i=0;do{const a=mP(r,i),l=a.sequence?r.substring(i,a.startPosition):r.substring(i);if(l.length>0&&o.push({value:l,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const s=gP(a.sequence);for(const u of s)u.type==="resetAll"?(e=null,t=null,n.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of s)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&n.add(u.value)}i=a.position}while(i<r.length);return o}}}var vP={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function bP(e=vP){function t(l){return e[l]}function n(l){return`#${l.map(s=>Math.max(0,Math.min(s,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(){if(r)return r;r=[];for(let u=0;u<qo.length;u++)r.push(t(qo[u]));let l=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let f=0;f<6;f++)for(let c=0;c<6;c++)r.push(n([l[u],l[f],l[c]]));let s=8;for(let u=0;u<24;u++,s+=10)r.push(n([s,s,s]));return r}function i(l){return o()[l]}function a(l){switch(l.type){case"named":return t(l.name);case"rgb":return n(l.rgb);case"table":return i(l.index)}}return{value:a}}const SP={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function EP(e,t,n){const r=Ec(e,n),o=pf(t),i=bP(Object.fromEntries(qo.map(l=>{var u;const s=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`;return[l,((u=e.colors)==null?void 0:u[s])||SP[l]]}))),a=yP();return o.map(l=>a.parse(l[0]).map(s=>{let u,f;s.decorations.has("reverse")?(u=s.background?i.value(s.background):e.bg,f=s.foreground?i.value(s.foreground):e.fg):(u=s.foreground?i.value(s.foreground):e.fg,f=s.background?i.value(s.background):void 0),u=Ro(u,r),f=Ro(f,r),s.decorations.has("dim")&&(u=CP(u));let c=Ht.None;return s.decorations.has("bold")&&(c|=Ht.Bold),s.decorations.has("italic")&&(c|=Ht.Italic),s.decorations.has("underline")&&(c|=Ht.Underline),s.decorations.has("strikethrough")&&(c|=Ht.Strikethrough),{content:s.value,offset:l[1],color:u,bgColor:f,fontStyle:c}}))}function CP(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const o=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${o}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const o=r[0],i=r[1],a=r[2],l=r[3];return`#${o}${o}${i}${i}${a}${a}${Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const o=r[0],i=r[1],a=r[2];return`#${o}${o}${i}${i}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function pp(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:o=e.getLoadedThemes()[0]}=n;if(!df(r)&&!hf(o)&&r==="ansi"){const{theme:i}=e.setTheme(o);return EP(i,t,n)}return Rw(e,t,n)}function wc(e,t,n){let r,o,i,a,l,s;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:f="--shiki-",colorsRendering:c="css-vars"}=n,d=Object.entries(n.themes).filter(g=>g[1]).map(g=>({color:g[0],theme:g[1]})).sort((g,p)=>g.color===u?-1:p.color===u?1:0);if(d.length===0)throw new Ye("`themes` option must not be empty");const h=ww(e,t,n,pp);if(s=Fl(h),u&&gg!==u&&!d.find(g=>g.color===u))throw new Ye(`\`themes\` option must contain the defaultColor key \`${u}\``);const y=d.map(g=>e.getTheme(g.theme)),b=d.map(g=>g.color);i=h.map(g=>g.map(p=>cP(p,b,f,u,c))),s&&gf(i,s);const E=d.map(g=>Ec(g.theme,n));o=yb(d,y,E,f,u,"fg",c),r=yb(d,y,E,f,u,"bg",c),a=`shiki-themes ${y.map(g=>g.name).join(" ")}`,l=u?void 0:[o,r].join(";")}else if("theme"in n){const u=Ec(n.theme,n);i=pp(e,t,n);const f=e.getTheme(n.theme);r=Ro(f.bg,u),o=Ro(f.fg,u),a=f.name,s=Fl(i)}else throw new Ye("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:o,bg:r,themeName:a,rootStyle:l,grammarState:s}}function yb(e,t,n,r,o,i,a){return e.map((l,s)=>{const u=Ro(t[s][i],n[s])||"inherit",f=`${r+l.color}${i==="bg"?"-bg":""}:${u}`;if(s===0&&o){if(o===gg&&e.length>1){const c=e.findIndex(h=>h.color==="light"),d=e.findIndex(h=>h.color==="dark");if(c===-1||d===-1)throw new Ye('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ro(t[c][i],n[c])||"inherit"}, ${Ro(t[d][i],n[d])||"inherit"});${f}`}return u}return a==="css-vars"?f:null}).filter(l=>!!l).join(";")}function _c(e,t,n,r={meta:{},options:n,codeToHast:(o,i)=>_c(e,o,i),codeToTokens:(o,i)=>wc(e,o,i)}){var y,b;let o=t;for(const E of Rc(n))o=((y=E.preprocess)==null?void 0:y.call(r,o,n))||o;let{tokens:i,fg:a,bg:l,themeName:s,rootStyle:u,grammarState:f}=wc(e,o,n);const{mergeWhitespaces:c=!0,mergeSameStyleTokens:d=!1}=n;c===!0?i=wP(i):c==="never"&&(i=_P(i)),d&&(i=xP(i));const h={...r,get source(){return o}};for(const E of Rc(n))i=((b=E.tokens)==null?void 0:b.call(h,i))||i;return RP(i,{...n,fg:a,bg:l,themeName:s,rootStyle:n.rootStyle===!1?!1:n.rootStyle??u},h,f)}function RP(e,t,n,r=Fl(e)){var b,E,g,p;const o=Rc(t),i=[],a={type:"root",children:[]},{structure:l="classic",tabindex:s="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),s!==!1&&s!=null&&(u.tabindex=s.toString());for(const[v,S]of Object.entries(t.meta||{}))v.startsWith("_")||(u[v]=S);let f={type:"element",tagName:"pre",properties:u,children:[],data:t.data},c={type:"element",tagName:"code",properties:{},children:i};const d=[],h={...n,structure:l,addClassToHast:Uw,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return f},get code(){return c},get lines(){return d}};if(e.forEach((v,S)=>{var R,x;S&&(l==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&i.push({type:"text",value:`
|
|
102
|
-
`}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},w=0;for(const O of v){let k={type:"element",tagName:"span",properties:{...O.htmlAttrs},children:[{type:"text",value:O.content}]};const P=Cc(O.htmlStyle||ql(O));P&&(k.properties.style=P);for(const U of o)k=((R=U==null?void 0:U.span)==null?void 0:R.call(h,k,S+1,w,C,O))||k;l==="inline"?a.children.push(k):l==="classic"&&C.children.push(k),w+=O.content.length}if(l==="classic"){for(const O of o)C=((x=O==null?void 0:O.line)==null?void 0:x.call(h,C,S+1))||C;d.push(C),i.push(C)}else l==="inline"&&d.push(C)}),l==="classic"){for(const v of o)c=((b=v==null?void 0:v.code)==null?void 0:b.call(h,c))||c;f.children.push(c);for(const v of o)f=((E=v==null?void 0:v.pre)==null?void 0:E.call(h,f))||f;a.children.push(f)}else if(l==="inline"){const v=[];let S={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const w of a.children)w.type==="element"&&w.tagName==="br"?(v.push(S),S={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(w.type==="element"||w.type==="text")&&S.children.push(w);v.push(S);let C={type:"element",tagName:"code",properties:{},children:v};for(const w of o)C=((g=w==null?void 0:w.code)==null?void 0:g.call(h,C))||C;a.children=[];for(let w=0;w<C.children.length;w++){w>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const R=C.children[w];R.type==="element"&&a.children.push(...R.children)}}let y=a;for(const v of o)y=((p=v==null?void 0:v.root)==null?void 0:p.call(h,y))||y;return r&&gf(y,r),y}function wP(e){return e.map(t=>{const n=[];let r="",o;return t.forEach((i,a)=>{const l=!(i.fontStyle&&(i.fontStyle&Ht.Underline||i.fontStyle&Ht.Strikethrough));l&&i.content.match(/^\s+$/)&&t[a+1]?(o===void 0&&(o=i.offset),r+=i.content):r?(l?n.push({...i,offset:o,content:r+i.content}):n.push({content:r,offset:o},i),o=void 0,r=""):n.push(i)}),n})}function _P(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,o,i,a]=r;if(!o&&!a)return n;const l=[{...n,offset:n.offset+o.length,content:i}];return o&&l.unshift({content:o,offset:n.offset}),a&&l.push({content:a,offset:n.offset+o.length+i.length}),l}))}function xP(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const o=n[n.length-1],i=Cc(o.htmlStyle||ql(o)),a=Cc(r.htmlStyle||ql(r)),l=o.fontStyle&&(o.fontStyle&Ht.Underline||o.fontStyle&Ht.Strikethrough),s=r.fontStyle&&(r.fontStyle&Ht.Underline||r.fontStyle&Ht.Strikethrough);!l&&!s&&i===a?o.content+=r.content:n.push({...r})}return n})}const TP=rP;function AP(e,t,n){var i;const r={meta:{},options:n,codeToHast:(a,l)=>_c(e,a,l),codeToTokens:(a,l)=>wc(e,a,l)};let o=TP(_c(e,t,n,r));for(const a of Rc(n))o=((i=a.postprocess)==null?void 0:i.call(r,o,n))||o;return o}async function OP(e){const t=await DD(e);return{getLastGrammarState:(...n)=>zD(t,...n),codeToTokensBase:(n,r)=>pp(t,n,r),codeToTokensWithThemes:(n,r)=>ww(t,n,r),codeToTokens:(n,r)=>wc(t,n,r),codeToHast:(n,r)=>_c(t,n,r),codeToHtml:(n,r)=>AP(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function MP(e){const t=e.langs,n=e.themes,r=e.engine;async function o(i){function a(c){var d;if(typeof c=="string"){if(c=((d=i.langAlias)==null?void 0:d[c])||c,gw(c))return[];const h=t[c];if(!h)throw new Ye(`Language \`${c}\` is not included in this bundle. You may want to load it from external source.`);return h}return c}function l(c){if(yw(c))return"none";if(typeof c=="string"){const d=n[c];if(!d)throw new Ye(`Theme \`${c}\` is not included in this bundle. You may want to load it from external source.`);return d}return c}const s=(i.themes??[]).map(c=>l(c)),u=(i.langs??[]).map(c=>a(c)),f=await OP({engine:i.engine??r(),...i,themes:s,langs:u});return{...f,loadLanguage(...c){return f.loadLanguage(...c.map(a))},loadTheme(...c){return f.loadTheme(...c.map(l))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return o}function kP(e){let t;async function n(r={}){if(t){const o=await t;return await Promise.all([o.loadTheme(...r.themes||[]),o.loadLanguage(...r.langs||[])]),o}else{t=e({...r,themes:[],langs:[]});const o=await t;return await Promise.all([o.loadTheme(...r.themes||[]),o.loadLanguage(...r.langs||[])]),o}}return n}function NP(e,t){const n=kP(e);async function r(o,i){var s;const a=await n({langs:[i.lang],themes:"theme"in i?[i.theme]:Object.values(i.themes)}),l=await((s=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:s.call(t,o,i.lang,a));return l&&await a.loadLanguage(...l),a}return{getSingletonHighlighter(o){return n(o)},async codeToHtml(o,i){return(await r(o,i)).codeToHtml(o,i)},async codeToHast(o,i){return(await r(o,i)).codeToHast(o,i)},async codeToTokens(o,i){return(await r(o,i)).codeToTokens(o,i)},async codeToTokensBase(o,i){return(await r(o,i)).codeToTokensBase(o,i)},async codeToTokensWithThemes(o,i){return(await r(o,i)).codeToTokensWithThemes(o,i)},async getLastGrammarState(o,i){return(await n({langs:[i.lang],themes:[i.theme]})).getLastGrammarState(o,i)}}}function LP(e={}){var a;const{name:t="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=e,o=l=>{var s;return(s=e.variableDefaults)!=null&&s[l]?`var(${n}${l}, ${e.variableDefaults[l]})`:`var(${n}${l})`},i={name:t,type:"dark",colors:{"editor.foreground":o("foreground"),"editor.background":o("background"),"terminal.ansiBlack":o("ansi-black"),"terminal.ansiRed":o("ansi-red"),"terminal.ansiGreen":o("ansi-green"),"terminal.ansiYellow":o("ansi-yellow"),"terminal.ansiBlue":o("ansi-blue"),"terminal.ansiMagenta":o("ansi-magenta"),"terminal.ansiCyan":o("ansi-cyan"),"terminal.ansiWhite":o("ansi-white"),"terminal.ansiBrightBlack":o("ansi-bright-black"),"terminal.ansiBrightRed":o("ansi-bright-red"),"terminal.ansiBrightGreen":o("ansi-bright-green"),"terminal.ansiBrightYellow":o("ansi-bright-yellow"),"terminal.ansiBrightBlue":o("ansi-bright-blue"),"terminal.ansiBrightMagenta":o("ansi-bright-magenta"),"terminal.ansiBrightCyan":o("ansi-bright-cyan"),"terminal.ansiBrightWhite":o("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:o("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:o("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:o("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:o("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:o("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:o("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:o("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:o("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:o("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:o("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:o("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:o("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:o("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:o("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:o("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:o("token-changed")}}]};return r||(i.tokenColors=(a=i.tokenColors)==null?void 0:a.map(l=>{var s;return(s=l.settings)!=null&&s.fontStyle&&delete l.settings.fontStyle,l})),i}const vb=4294967295;var DP=class{constructor(e,t={}){z(this,"regexps");this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:o}=t;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(i=>{if(typeof i!="string")return i;const a=r==null?void 0:r.get(i);if(a){if(a instanceof RegExp)return a;if(n)return null;throw a}try{const l=o(i);return r==null||r.set(i,l),l}catch(l){if(r==null||r.set(i,l),n)return null;throw l}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,o=[];function i(a,l,s=0){return{index:a,captureIndices:l.indices.map(u=>u==null?{start:vb,end:vb,length:0}:{start:u[0]+s,end:u[1]+s,length:u[1]-u[0]})}}for(let a=0;a<this.regexps.length;a++){const l=this.regexps[a];if(l)try{l.lastIndex=t;const s=l.exec(r);if(!s)continue;if(s.index===t)return i(a,s,0);o.push([a,s,0])}catch(s){if(this.options.forgiving)continue;throw s}}if(o.length){const a=Math.min(...o.map(l=>l[1].index));for(const[l,s,u]of o)if(s.index===a)return i(l,s,u)}return null}};function za(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function PP(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const yg=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Ot=String.raw;function Ua(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Hw=Ot`\[\^?`,Gw=`c.? | C(?:-.?)?|${Ot`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Ot`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Ot`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Ot`o\{[^\}]*\}?`}|${Ot`\d{1,3}`}`,vg=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Zs=new RegExp(Ot`
|
|
103
|
-
\\ (?:
|
|
104
|
-
${Gw}
|
|
105
|
-
| [gk]<[^>]*>?
|
|
106
|
-
| [gk]'[^']*'?
|
|
107
|
-
| .
|
|
108
|
-
)
|
|
109
|
-
| \( (?:
|
|
110
|
-
\? (?:
|
|
111
|
-
[:=!>({]
|
|
112
|
-
| <[=!]
|
|
113
|
-
| <[^>]*>
|
|
114
|
-
| '[^']*'
|
|
115
|
-
| ~\|?
|
|
116
|
-
| #(?:[^)\\]|\\.?)*
|
|
117
|
-
| [^:)]*[:)]
|
|
118
|
-
)?
|
|
119
|
-
| \*[^\)]*\)?
|
|
120
|
-
)?
|
|
121
|
-
| (?:${vg.source})+
|
|
122
|
-
| ${Hw}
|
|
123
|
-
| .
|
|
124
|
-
`.replace(/\s+/g,""),"gsu"),Pd=new RegExp(Ot`
|
|
125
|
-
\\ (?:
|
|
126
|
-
${Gw}
|
|
127
|
-
| .
|
|
128
|
-
)
|
|
129
|
-
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
130
|
-
| ${Hw}
|
|
131
|
-
| &&
|
|
132
|
-
| .
|
|
133
|
-
`.replace(/\s+/g,""),"gsu");function IP(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=tI(n.flags),o=[r.extended],i={captureGroup:n.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(c){o.push(c)},replaceCurrentModX(c){o[o.length-1]=c},singleline:n.rules.singleline};let a=[],l;for(Zs.lastIndex=0;l=Zs.exec(e);){const c=zP(i,e,l[0],Zs.lastIndex);c.tokens?a.push(...c.tokens):c.token&&a.push(c.token),c.lastIndex!==void 0&&(Zs.lastIndex=c.lastIndex)}const s=[];let u=0;a.filter(c=>c.type==="GroupOpen").forEach(c=>{c.kind==="capturing"?c.number=++u:c.raw==="("&&s.push(c)}),u||s.forEach((c,d)=>{c.kind="capturing",c.number=d+1});const f=u||s.length;return{tokens:a.map(c=>c.type==="EscapedNumber"?rI(c,f):c).flat(),flags:r}}function zP(e,t,n,r){const[o,i]=n;if(n==="["||n==="[^"){const a=UP(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(i))return{token:bb(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:XP(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:jw(n)}}if(i==="K")return{token:Vw("keep",n)};if(i==="N"||i==="R")return{token:Yo("newline",n,{negate:i==="N"})};if(i==="O")return{token:Yo("any",n)};if(i==="X")return{token:Yo("text_segment",n)};const a=$w(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(o==="("){if(i==="*")return{token:WP(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:ZP(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:ki("group",n)};if(n==="(?>")return{token:ki("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:ki(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:ki("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:ki("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:FP(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
|
|
134
|
-
`,r);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=r,{lastIndex:a.exec(t)?a.lastIndex:r}}}if(n===".")return{token:Yo("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":Ot`\A`,$:Ot`\Z`}[n]:n;return{token:bb(a,n)}}return n==="|"?{token:HP(n)}:vg.test(n)?{tokens:oI(n)}:{token:Or(za(n),n)}}function UP(e,t,n){const r=[Sb(t[1]==="^",t)];let o=1,i;for(Pd.lastIndex=n;i=Pd.exec(e);){const a=i[0];if(a[0]==="["&&a[1]!==":")o++,r.push(Sb(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Or(93,a));else if(o--,r.push(GP(a)),!o)break}else{const l=BP(a);Array.isArray(l)?r.push(...l):r.push(l)}}return{tokens:r,lastIndex:Pd.lastIndex||e.length}}function BP(e){if(e[0]==="\\")return $w(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!yg.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Yo("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?$P(e):e==="&&"?jP(e):Or(za(e),e)}function $w(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return QP(e);if("dDhHsSwW".includes(n))return JP(e);if(e.startsWith(Ot`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return eI(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),i=new TextEncoder;return[...o].map(a=>{const l=[...i.encode(a)].map(s=>`\\x${s.toString(16)}`).join("");return Or(za(a),l)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Or(nI(e),e);if(Eb.has(n))return Or(Eb.get(n),e);if(/\d/.test(n))return VP(t,e);if(e==="\\")throw new Error(Ot`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Or(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function HP(e){return{type:"Alternator",raw:e}}function bb(e,t){return{type:"Assertion",kind:e,raw:t}}function jw(e){return{type:"Backreference",raw:e}}function Or(e,t){return{type:"Character",value:e,raw:t}}function GP(e){return{type:"CharacterClassClose",raw:e}}function $P(e){return{type:"CharacterClassHyphen",raw:e}}function jP(e){return{type:"CharacterClassIntersector",raw:e}}function Sb(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Yo(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function Vw(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ua(n.flags),raw:t}}function VP(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function FP(e){return{type:"GroupClose",raw:e}}function ki(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function qP(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function YP(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function XP(e){return{type:"Subroutine",raw:e}}const KP=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Eb=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function QP(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Or(za(t.toUpperCase())-64,e)}function ZP(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const o=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),i=Rb(n),a=Rb(r),l={};if(i&&(l.enable=i),a&&(l.disable=a),e.endsWith(")"))return t.replaceCurrentModX(o),Vw("flags",e,{flags:l});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,ki("group",e,{...(i||a)&&{flags:l}});throw new Error(`Unexpected flag modifier "${e}"`)}function WP(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:o}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const i=o?o.split(",").filter(f=>f!=="").map(f=>/^[+-]?\d+$/.test(f)?+f:f):[],[a,l,s]=i,u=KP.has(n)?n.toLowerCase():"custom";switch(u){case"fail":case"mismatch":case"skip":if(i.length>0)throw new Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!i.length||i.length>2)throw new Error(`Named callout must have one or two arguments "${i}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(i.length===2&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);break;case"count":case"total_count":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(i.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(i.length!==3)throw new Error(`Named callout must have three arguments "${i}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument three must be a tag or number "${s}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${u}"`)}return qP(u,r??null,(o==null?void 0:o.split(","))??null,e)}function Cb(e){let t=null,n,r;if(e[0]==="{"){const{minStr:o,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+o>a||i&&+i>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+o,r=i===void 0?+o:i===""?1/0:+i,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return YP(t,n,r,e)}function JP(e){const t=e[1].toLowerCase();return Yo({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function eI(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Yo("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function Rb(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function tI(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function nI(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function rI(e,t){const{raw:n,inCharClass:r}=e,o=n.slice(1);if(!r&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[jw(n)];const i=[],a=o.match(/^[0-7]+|\d/g);for(let l=0;l<a.length;l++){const s=a[l];let u;if(l===0&&s!=="8"&&s!=="9"){if(u=parseInt(s,8),u>127)throw new Error(Ot`Octal encoded byte above 177 unsupported "${n}"`)}else u=za(s);i.push(Or(u,(l===0?"\\":"")+s))}return i}function oI(e){const t=[],n=new RegExp(vg,"gy");let r;for(;r=n.exec(e);){const o=r[0];if(o[0]==="{"){const i=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(i){const{min:a,max:l}=i.groups;if(+a>+l&&o.endsWith("?")){n.lastIndex--,t.push(Cb(o.slice(0,-1)));continue}}}t.push(Cb(o))}return t}function Fw(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function iI(e){return aI.has(e.type)}const aI=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function qw(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=IP(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o=(d,h)=>{const y=r.tokens[i.nextIndex];switch(i.parent=d,i.nextIndex++,y.type){case"Alternator":return fi();case"Assertion":return lI(y);case"Backreference":return sI(y,i);case"Character":return vf(y.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return uI(y,i,h);case"CharacterClassOpen":return cI(y,i,h);case"CharacterSet":return fI(y,i);case"Directive":return yI(y.kind,{flags:y.flags});case"GroupOpen":return dI(y,i,h);case"NamedCallout":return bI(y.kind,y.tag,y.arguments);case"Quantifier":return hI(y,i);case"Subroutine":return pI(y,i);default:throw new Error(`Unexpected token type "${y.type}"`)}},i={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:o},a=EI(vI(r.flags));let l=a.body[0];for(;i.nextIndex<r.tokens.length;){const d=o(l,{});d.type==="Alternative"?(a.body.push(d),l=d):l.body.push(d)}const{capturingGroups:s,hasNumberedRef:u,namedGroupsByName:f,subroutines:c}=i;if(u&&f.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:d}of c)if(typeof d=="number"){if(d>s.length)throw new Error("Subroutine uses a group number that's not defined");d&&(s[d-1].isSubroutined=!0)}else if(f.has(d)){if(f.get(d).length>1)throw new Error(Ot`Subroutine uses a duplicate group name "\g<${d}>"`);f.get(d)[0].isSubroutined=!0}else throw new Error(Ot`Subroutine uses a group name that's not defined "\g<${d}>"`);return a}function lI({kind:e}){return mp(Ua({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Ot`\B`||e===Ot`\Y`})}function sI({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),o=(i,a=!1)=>{const l=t.capturingGroups.length;let s=!1;if(i>l)if(t.skipBackrefValidation)s=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,gp(a?l+1-i:i,{orphan:s})};if(n){const i=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(i)return o(+i.groups.num,!!i.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return gp(r)}return o(+r)}function uI(e,t,n){const{tokens:r,walk:o}=t,i=t.parent,a=i.body.at(-1),l=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){const s=o(i,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&s.type==="Character")return i.body.pop(),gI(a,s);throw new Error("Invalid character class range")}return vf(za("-"))}function cI({negate:e},t,n){const{tokens:r,walk:o}=t,i=[xu()],a=r[t.nextIndex];let l=xb(a);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")i.push(xu()),t.nextIndex++;else{const u=i.at(-1);u.body.push(o(u,n))}l=xb(r[t.nextIndex],a)}const s=xu({negate:e});return i.length===1?s.body=i[0].body:(s.kind="intersection",s.body=i.map(u=>u.body.length===1?u.body[0]:u)),t.nextIndex++,s}function fI({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:i,unicodePropertyMap:a}=r;if(e==="property"){const l=bf(n);if(yg.has(l)&&!(a!=null&&a.has(l)))e="posix",n=l;else return Ni(n,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:i,unicodePropertyMap:a})}return e==="posix"?SI(n,{negate:t}):yp(e,{negate:t})}function dI(e,t,n){const{tokens:r,capturingGroups:o,namedGroupsByName:i,skipLookbehindValidation:a,walk:l}=t,s=CI(e),u=s.type==="AbsenceFunction",f=_b(s),c=f&&s.negate;if(s.type==="CapturingGroup"&&(o.push(s),s.name&&PP(i,s.name,[]).push(s)),u&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=Tb(r[t.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")s.body.push(fi()),t.nextIndex++;else{const h=s.body.at(-1),y=l(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||u,isInLookbehind:n.isInLookbehind||f,isInNegLookbehind:n.isInNegLookbehind||c});if(h.body.push(y),(f||n.isInLookbehind)&&!a){const b="Lookbehind includes a pattern not allowed by Oniguruma";if(c||n.isInNegLookbehind){if(wb(y)||y.type==="CapturingGroup")throw new Error(b)}else if(wb(y)||_b(y)&&y.negate)throw new Error(b)}}d=Tb(r[t.nextIndex])}return t.nextIndex++,s}function hI({kind:e,min:t,max:n},r){const o=r.parent,i=o.body.at(-1);if(!i||!iI(i))throw new Error("Quantifier requires a repeatable token");const a=Xw(e,t,n,i);return o.body.pop(),a}function pI({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let o=e.slice(3,-1);const i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(i){const l=+i.groups.num,s=n.length;if(t.hasNumberedRef=!0,o={"":l,"+":s+l,"-":s+1-l}[i.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const a=Kw(o);return r.push(a),a}function mI(e,t){return{type:"AbsenceFunction",kind:e,body:Ss(t==null?void 0:t.body)}}function fi(e){return{type:"Alternative",body:Qw(e==null?void 0:e.body)}}function mp(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function gp(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function Yw(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!RI(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Ss(t==null?void 0:t.body)}}function vf(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function xu(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Qw(e==null?void 0:e.body)}}function gI(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function yp(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function yI(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ua(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function vI(e){return{type:"Flags",...e}}function jn(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Ss(e==null?void 0:e.body)}}function Fo(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ss(e==null?void 0:e.body)}}function bI(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function SI(e,t){const n=!!(t!=null&&t.negate);if(!yg.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function Xw(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function EI(e,t){return{type:"Regex",body:Ss(t==null?void 0:t.body),flags:e}}function Kw(e){return{type:"Subroutine",ref:e}}function Ni(e,t){var o;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(o=n.unicodePropertyMap)==null?void 0:o.get(bf(e));if(!r){if(n.normalizeUnknownPropertyNames)r=wI(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Ot`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function CI({flags:e,kind:t,name:n,negate:r,number:o}){switch(t){case"absence_repeater":return mI("repeater");case"atomic":return jn({atomic:!0});case"capturing":return Yw(o,{name:n});case"group":return jn({flags:e});case"lookahead":case"lookbehind":return Fo({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ss(e){if(e===void 0)e=[fi()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function Qw(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function wb(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function _b(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function RI(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function wI(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function bf(e){return e.replace(/[- _]+/g,"").toLowerCase()}function xb(e,t){const n=t;return Ua(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function Tb(e){return Ua(e,"Unclosed group")}function wl(e,t,n=null){function r(i,a){for(let l=0;l<i.length;l++){const s=o(i[l],a,l,i);l=Math.max(-1,l+s)}}function o(i,a=null,l=null,s=null){var g,p;let u=0,f=!1;const c={node:i,parent:a,key:l,container:s,root:e,remove(){Ws(s).splice(Math.max(0,xi(l)+u),1),u--,f=!0},removeAllNextSiblings(){return Ws(s).splice(xi(l)+1)},removeAllPrevSiblings(){const v=xi(l)+u;return u-=v,Ws(s).splice(0,Math.max(0,v))},replaceWith(v,S={}){const C=!!S.traverse;s?s[Math.max(0,xi(l)+u)]=v:Ua(a,"Can't replace root node")[l]=v,C&&o(v,a,l,s),f=!0},replaceWithMultiple(v,S={}){const C=!!S.traverse;if(Ws(s).splice(Math.max(0,xi(l)+u),1,...v),u+=v.length-1,C){let w=0;for(let R=0;R<v.length;R++)w+=o(v[R],a,xi(l)+R+w,s)}f=!0},skip(){f=!0}},{type:d}=i,h=t["*"],y=t[d],b=typeof h=="function"?h:h==null?void 0:h.enter,E=typeof y=="function"?y:y==null?void 0:y.enter;if(b==null||b(c,n),E==null||E(c,n),!f)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(i.body,i);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(i.min,i,"min"),o(i.max,i,"max");break;case"Quantifier":o(i.body,i,"body");break;case"Regex":r(i.body,i),o(i.flags,i,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return(g=y==null?void 0:y.exit)==null||g.call(y,c,n),(p=h==null?void 0:h.exit)==null||p.call(h,c,n),u}return o(e),e}function Ws(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function xi(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const _I=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function xI(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function TI(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const Dn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function bg(e,t,n,r){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),i=[!1];let a=0,l="";for(const s of e.matchAll(o)){const{0:u,groups:{$skip:f}}=s;if(!f&&(!r||r===Dn.DEFAULT==!a)){n instanceof Function?l+=n(s,{context:a?Dn.CHAR_CLASS:Dn.DEFAULT,negated:i[i.length-1]}):l+=n;continue}u[0]==="["?(a++,i.push(u[1]==="^")):u==="]"&&a&&(a--,i.pop()),l+=u}return l}function Zw(e,t,n,r){bg(e,t,n,r)}function AI(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let i=0,a;for(;a=o.exec(e);){const{0:l,groups:{$skip:s}}=a;if(!s&&(!r||r===Dn.DEFAULT==!i))return a;l==="["?i++:l==="]"&&i&&i--,o.lastIndex==a.index&&o.lastIndex++}return null}function Js(e,t,n){return!!AI(e,t,0,n)}function OI(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,o=0,i=1,a;for(;a=n.exec(e);){const[l]=a;if(l==="[")o++;else if(o)l==="]"&&o--;else if(l==="(")i++;else if(l===")"&&(i--,!i)){r=a.index;break}}return e.slice(t,r)}const Ab=new RegExp(String.raw`(?<noncapturingStart>${_I})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function MI(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const o="(?>",i="(?:(?=(",a=[0],l=[];let s=0,u=0,f=NaN,c;do{c=!1;let d=0,h=0,y=!1,b;for(Ab.lastIndex=Number.isNaN(f)?0:f+i.length;b=Ab.exec(e);){const{0:E,index:g,groups:{capturingStart:p,noncapturingStart:v}}=b;if(E==="[")d++;else if(d)E==="]"&&d--;else if(E===o&&!y)f=g,y=!0;else if(y&&v)h++;else if(p)y?h++:(s++,a.push(s+u));else if(E===")"&&y){if(!h){u++;const S=s+u;if(e=`${e.slice(0,f)}${i}${e.slice(f+o.length,g)}))<$$${S}>)${e.slice(g+1)}`,c=!0,l.push(S),xI(n,S),r.size){const C=new Map;r.forEach((w,R)=>{C.set(R>=S?R+1:R,w.map(x=>x>=S?x+1:x))}),r=C}break}h--}}}while(c);return n.push(...l),e=bg(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:y}})=>{if(h){const b=+h;if(b>a.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${a[b]}`}return`\\${y}`},Dn.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const Ww=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Id=new RegExp(String.raw`
|
|
135
|
-
\\(?: \d+
|
|
136
|
-
| c[A-Za-z]
|
|
137
|
-
| [gk]<[^>]+>
|
|
138
|
-
| [pPu]\{[^\}]+\}
|
|
139
|
-
| u[A-Fa-f\d]{4}
|
|
140
|
-
| x[A-Fa-f\d]{2}
|
|
141
|
-
)
|
|
142
|
-
| \((?: \? (?: [:=!>]
|
|
143
|
-
| <(?:[=!]|[^>]+>)
|
|
144
|
-
| [A-Za-z\-]+:
|
|
145
|
-
| \(DEFINE\)
|
|
146
|
-
))?
|
|
147
|
-
| (?<qBase>${Ww})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
148
|
-
| \\?.
|
|
149
|
-
`.replace(/\s+/g,""),"gsu");function kI(e){if(!new RegExp(`${Ww}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,o="",i=0,a;for(Id.lastIndex=0;a=Id.exec(e);){const{0:l,index:s,groups:{qBase:u,qMod:f,invalidQ:c}}=a;if(l==="[")i||(r=s),i++;else if(l==="]")i?i--:r=null;else if(!i)if(f==="+"&&o&&!o.startsWith("(")){if(c)throw new Error(`Invalid quantifier "${l}"`);let d=-1;if(/^\{\d+\}$/.test(u))e=TI(e,s+u.length,f,"");else{if(o===")"||o==="]"){const h=o===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,h)}(?>${e.slice(h,s)}${u})${e.slice(s+l.length)}`}else e=`${e.slice(0,s-o.length)}(?>${o}${u})${e.slice(s+l.length)}`;d+=4}Id.lastIndex+=d}else l[0]==="("?t.push(s):l===")"&&(n=t.length?t.pop():null);o=l}return{pattern:e}}const Nn=String.raw,NI=Nn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,vp=Nn`\(\?R=(?<rDepth>[^\)]+)\)|${NI}`,Sf=Nn`\(\?<(?![=!])(?<captureName>[^>]+)>`,Jw=Nn`${Sf}|(?<unnamed>\()(?!\?)`,Uo=new RegExp(Nn`${Sf}|${vp}|\(\?|\\?.`,"gsu"),zd="Cannot use multiple overlapping recursions";function LI(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let o=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(vp,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if(r==="plugin"&&Js(e,Nn`\(\?\(DEFINE\)`,Dn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const i=[],a=Js(e,Nn`\\[1-9]`,Dn.DEFAULT),l=new Map,s=[];let u=!1,f=0,c=0,d;for(Uo.lastIndex=0;d=Uo.exec(e);){const{0:h,groups:{captureName:y,rDepth:b,gRNameOrNum:E,gRDepth:g}}=d;if(h==="[")f++;else if(f)h==="]"&&f--;else if(b){if(Ob(b),u)throw new Error(zd);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const p=e.slice(0,d.index),v=e.slice(Uo.lastIndex);if(Js(v,vp,Dn.DEFAULT))throw new Error(zd);const S=+b-1;e=Mb(p,v,S,!1,n,i,c),o=Nb(o,p,S,i.length,0,c);break}else if(E){Ob(g);let p=!1;for(const U of s)if(U.name===E||U.num===+E){if(p=!0,U.hasRecursedWithin)throw new Error(zd);break}if(!p)throw new Error(Nn`Recursive \g cannot be used outside the referenced group "${r==="external"?E:Nn`\g<${E}&R=${g}>`}"`);const v=l.get(E),S=OI(e,v);if(a&&Js(S,Nn`${Sf}|\((?!\?)`,Dn.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const C=e.slice(v,d.index),w=S.slice(C.length+h.length),R=i.length,x=+g-1,O=Mb(C,w,x,!0,n,i,c);o=Nb(o,C,x,i.length-R,R,c);const k=e.slice(0,v),P=e.slice(v+S.length);e=`${k}${O}${P}`,Uo.lastIndex+=O.length-h.length-C.length-w.length,s.forEach(U=>U.hasRecursedWithin=!0),u=!0}else if(y)c++,l.set(String(c),Uo.lastIndex),l.set(y,Uo.lastIndex),s.push({num:c,name:y});else if(h[0]==="("){const p=h==="(";p&&(c++,l.set(String(c),Uo.lastIndex)),s.push(p?{num:c}:{})}else h===")"&&s.pop()}return n.push(...i),{pattern:e,captureTransfers:o,hiddenCaptures:n}}function Ob(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function Mb(e,t,n,r,o,i,a){const l=new Set;r&&Zw(e+t,Sf,({groups:{captureName:u}})=>{l.add(u)},Dn.DEFAULT);const s=[n,r?l:null,o,i,a];return`${e}${kb(`(?:${e}`,"forward",...s)}(?:)${kb(`${t})`,"backward",...s)}${t}`}function kb(e,t,n,r,o,i,a){const s=f=>t==="forward"?f+2:n-f+2-1;let u="";for(let f=0;f<n;f++){const c=s(f);u+=bg(e,Nn`${Jw}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:h,unnamed:y,backref:b}})=>{if(b&&r&&!r.has(b))return d;const E=`_$${c}`;if(y||h){const g=a+i.length+1;return i.push(g),DI(o,g),y?d:`(?<${h}${E}>`}return Nn`\k<${b}${E}>`},Dn.DEFAULT)}return u}function DI(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Nb(e,t,n,r,o,i){if(e.size&&r){let a=0;Zw(t,Jw,()=>a++,Dn.DEFAULT);const l=i-a+o,s=new Map;return e.forEach((u,f)=>{const c=(r-a*n)/n,d=a*n,h=f>l+a?f+r:f,y=[];for(const b of u)if(b<=l)y.push(b);else if(b>l+a+c)y.push(b+r);else if(b<=l+a)for(let E=0;E<=n;E++)y.push(b+a*E);else for(let E=0;E<=n;E++)y.push(b+d+c*E);s.set(h,y)}),s}return e}var bt=String.fromCodePoint,Ee=String.raw,Yn={},Ef=globalThis.RegExp;Yn.flagGroups=(()=>{try{new Ef("(?i:)")}catch{return!1}return!0})();Yn.unicodeSets=(()=>{try{new Ef("[[]]","v")}catch{return!1}return!0})();Yn.bugFlagVLiteralHyphenIsRange=Yn.unicodeSets?(()=>{try{new Ef(Ee`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Yn.bugNestedClassIgnoresNegation=Yn.unicodeSets&&new Ef("[[^a]]","v").test("a");function xc(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function Yl(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function bp(e,t){return Lb[e]>=Lb[t]}function PI(e,t){if(e==null)throw new Error(t??"Value expected");return e}var Lb={ES2025:2025,ES2024:2024,ES2018:2018},II={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function e_(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!II[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Yn.flagGroups?"ES2025":Yn.unicodeSets?"ES2024":"ES2018"),t}var zI="[ -\r ]",UI=new Set([bt(304),bt(305)]),br=Ee`[\p{L}\p{M}\p{N}\p{Pc}]`;function t_(e){if(UI.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),o=GI.get(n),i=BI.get(n),a=HI.get(n);return[...r].length===1&&t.add(r),a&&t.add(a),o&&t.add(o),t.add(n),i&&t.add(i),[...t]}var Sg=new Map(`C Other
|
|
150
|
-
Cc Control cntrl
|
|
151
|
-
Cf Format
|
|
152
|
-
Cn Unassigned
|
|
153
|
-
Co Private_Use
|
|
154
|
-
Cs Surrogate
|
|
155
|
-
L Letter
|
|
156
|
-
LC Cased_Letter
|
|
157
|
-
Ll Lowercase_Letter
|
|
158
|
-
Lm Modifier_Letter
|
|
159
|
-
Lo Other_Letter
|
|
160
|
-
Lt Titlecase_Letter
|
|
161
|
-
Lu Uppercase_Letter
|
|
162
|
-
M Mark Combining_Mark
|
|
163
|
-
Mc Spacing_Mark
|
|
164
|
-
Me Enclosing_Mark
|
|
165
|
-
Mn Nonspacing_Mark
|
|
166
|
-
N Number
|
|
167
|
-
Nd Decimal_Number digit
|
|
168
|
-
Nl Letter_Number
|
|
169
|
-
No Other_Number
|
|
170
|
-
P Punctuation punct
|
|
171
|
-
Pc Connector_Punctuation
|
|
172
|
-
Pd Dash_Punctuation
|
|
173
|
-
Pe Close_Punctuation
|
|
174
|
-
Pf Final_Punctuation
|
|
175
|
-
Pi Initial_Punctuation
|
|
176
|
-
Po Other_Punctuation
|
|
177
|
-
Ps Open_Punctuation
|
|
178
|
-
S Symbol
|
|
179
|
-
Sc Currency_Symbol
|
|
180
|
-
Sk Modifier_Symbol
|
|
181
|
-
Sm Math_Symbol
|
|
182
|
-
So Other_Symbol
|
|
183
|
-
Z Separator
|
|
184
|
-
Zl Line_Separator
|
|
185
|
-
Zp Paragraph_Separator
|
|
186
|
-
Zs Space_Separator
|
|
187
|
-
ASCII
|
|
188
|
-
ASCII_Hex_Digit AHex
|
|
189
|
-
Alphabetic Alpha
|
|
190
|
-
Any
|
|
191
|
-
Assigned
|
|
192
|
-
Bidi_Control Bidi_C
|
|
193
|
-
Bidi_Mirrored Bidi_M
|
|
194
|
-
Case_Ignorable CI
|
|
195
|
-
Cased
|
|
196
|
-
Changes_When_Casefolded CWCF
|
|
197
|
-
Changes_When_Casemapped CWCM
|
|
198
|
-
Changes_When_Lowercased CWL
|
|
199
|
-
Changes_When_NFKC_Casefolded CWKCF
|
|
200
|
-
Changes_When_Titlecased CWT
|
|
201
|
-
Changes_When_Uppercased CWU
|
|
202
|
-
Dash
|
|
203
|
-
Default_Ignorable_Code_Point DI
|
|
204
|
-
Deprecated Dep
|
|
205
|
-
Diacritic Dia
|
|
206
|
-
Emoji
|
|
207
|
-
Emoji_Component EComp
|
|
208
|
-
Emoji_Modifier EMod
|
|
209
|
-
Emoji_Modifier_Base EBase
|
|
210
|
-
Emoji_Presentation EPres
|
|
211
|
-
Extended_Pictographic ExtPict
|
|
212
|
-
Extender Ext
|
|
213
|
-
Grapheme_Base Gr_Base
|
|
214
|
-
Grapheme_Extend Gr_Ext
|
|
215
|
-
Hex_Digit Hex
|
|
216
|
-
IDS_Binary_Operator IDSB
|
|
217
|
-
IDS_Trinary_Operator IDST
|
|
218
|
-
ID_Continue IDC
|
|
219
|
-
ID_Start IDS
|
|
220
|
-
Ideographic Ideo
|
|
221
|
-
Join_Control Join_C
|
|
222
|
-
Logical_Order_Exception LOE
|
|
223
|
-
Lowercase Lower
|
|
224
|
-
Math
|
|
225
|
-
Noncharacter_Code_Point NChar
|
|
226
|
-
Pattern_Syntax Pat_Syn
|
|
227
|
-
Pattern_White_Space Pat_WS
|
|
228
|
-
Quotation_Mark QMark
|
|
229
|
-
Radical
|
|
230
|
-
Regional_Indicator RI
|
|
231
|
-
Sentence_Terminal STerm
|
|
232
|
-
Soft_Dotted SD
|
|
233
|
-
Terminal_Punctuation Term
|
|
234
|
-
Unified_Ideograph UIdeo
|
|
235
|
-
Uppercase Upper
|
|
236
|
-
Variation_Selector VS
|
|
237
|
-
White_Space space
|
|
238
|
-
XID_Continue XIDC
|
|
239
|
-
XID_Start XIDS`.split(/\s/).map(e=>[bf(e),e])),BI=new Map([["s",bt(383)],[bt(383),"s"]]),HI=new Map([[bt(223),bt(7838)],[bt(107),bt(8490)],[bt(229),bt(8491)],[bt(969),bt(8486)]]),GI=new Map([Xr(453),Xr(456),Xr(459),Xr(498),...Ud(8072,8079),...Ud(8088,8095),...Ud(8104,8111),Xr(8124),Xr(8140),Xr(8188)]),$I=new Map([["alnum",Ee`[\p{Alpha}\p{Nd}]`],["alpha",Ee`\p{Alpha}`],["ascii",Ee`\p{ASCII}`],["blank",Ee`[\p{Zs}\t]`],["cntrl",Ee`\p{Cc}`],["digit",Ee`\p{Nd}`],["graph",Ee`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ee`\p{Lower}`],["print",Ee`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ee`[\p{P}\p{S}]`],["space",Ee`\p{space}`],["upper",Ee`\p{Upper}`],["word",Ee`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ee`\p{AHex}`]]);function jI(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Xr(e){const t=bt(e);return[t.toLowerCase(),t]}function Ud(e,t){return jI(e,t).map(n=>Xr(n))}var n_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function VI(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};r_(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:bp(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};wl(e,FI,r);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},i={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};wl(e,qI,i);const a={groupsByName:i.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:i.reffedNodesByReferencer};return wl(e,YI,a),e._originMap=i.groupOriginByCopy,e._strategy=r.strategy,e}var FI={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:o}=e;if(o==="repeater"){const i=jn();i.body[0].body.push(Fo({negate:!0,body:r}),Ni("Any"));const a=jn();a.body[0].body.push(Xw("greedy",0,1/0,i)),n(ut(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const o=e.body.filter(i=>i.kind==="flags");for(let i=n+1;i<t.body.length;i++){const a=t.body[i];Yl(r,a,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=i_(t.get(e));if(r){const o=jn({flags:r});o.body[0].body=e.body,e.body=[ut(o,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:o,remove:i,replaceWith:a},l){const{kind:s,negate:u}=e,{asciiWordBoundaries:f,avoidSubclass:c,supportedGNodes:d,wordIsAscii:h}=l;if(s==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${u?"Y":"y"}"`);if(s==="line_end")a(ut(Fo({body:[fi({body:[mp("string_end")]}),fi({body:[vf(10)]})]}),t));else if(s==="line_start")a(ut(Sr(Ee`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(s==="search_start")if(d.has(e))o.flags.sticky=!0,i();else{const y=r[n-1];if(y&&JI(y))a(ut(Fo({negate:!0}),t));else{if(c)throw new Error(Ee`Uses "\G" in a way that requires a subclass`);a(Kr(mp("string_start"),t)),l.strategy="clip_search"}}else if(!(s==="string_end"||s==="string_start"))if(s==="string_end_newline")a(ut(Sr(Ee`(?=\n?\z)`),t));else if(s==="word_boundary"){if(!h&&!f){const y=`(?:(?<=${br})(?!${br})|(?<!${br})(?=${br}))`,b=`(?:(?<=${br})(?=${br})|(?<!${br})(?!${br}))`;a(ut(Sr(u?b:y),t))}}else throw new Error(`Unexpected assertion kind "${s}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Hd(n)&&(n=Bd(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Hd(r)&&(r=Bd(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=xu({body:[e]});n(ut(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:o,digitIsAscii:i,spaceIsAscii:a,wordIsAscii:l}){const{kind:s,negate:u,value:f}=e;if(i&&(s==="digit"||f==="digit")){n(Kr(yp("digit",{negate:u}),t));return}if(a&&(s==="space"||f==="space")){n(ut(Gd(Sr(zI),u),t));return}if(l&&(s==="word"||f==="word")){n(Kr(yp("word",{negate:u}),t));return}if(s==="any")n(Kr(Ni("Any"),t));else if(s==="digit")n(Kr(Ni("Nd",{negate:u}),t));else if(s!=="dot")if(s==="text_segment"){if(r==="strict")throw new Error(Ee`Use of "\X" requires non-strict accuracy`);const c="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=Ee`\p{RI}{2}|${c}(?:\u200D${c})*`;n(ut(Sr(Ee`(?>\r\n|${o?Ee`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(s==="hex")n(Kr(Ni("AHex",{negate:u}),t));else if(s==="newline")n(ut(Sr(u?`[^
|
|
240
|
-
]`:`(?>\r
|
|
241
|
-
?|[
|
|
242
|
-
\v\f
\u2028\u2029])`),t));else if(s==="posix")if(!o&&(f==="graph"||f==="print")){if(r==="strict")throw new Error(`POSIX class "${f}" requires min target ES2024 or non-strict accuracy`);let c={graph:"!-~",print:" -~"}[f];u&&(c=`\0-${bt(c.codePointAt(0)-1)}${bt(c.codePointAt(2)+1)}-`),n(ut(Sr(`[${c}]`),t))}else n(ut(Gd(Sr($I.get(f)),u),t));else if(s==="property")Sg.has(bf(f))||(e.key="sc");else if(s==="space")n(Kr(Ni("space",{negate:u}),t));else if(s==="word")n(ut(Gd(Sr(br),u),t));else throw new Error(`Unexpected character set kind "${s}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:o,removeAllPrevSiblings:i,removeAllNextSiblings:a}){const{kind:l,flags:s}=e;if(l==="flags")if(!s.enable&&!s.disable)r();else{const u=jn({flags:s});u.body[0].body=a(),o(ut(u,t),{traverse:!0})}else if(l==="keep"){const u=n.body[0],c=n.body.length===1&&Fw(u,{type:"Group"})&&u.body[0].body.length===1?u.body[0]:n;if(t.parent!==c||c.body.length>1)throw new Error(Ee`Uses "\K" in a way that's unsupported`);const d=Fo({behind:!0});d.body[0].body=i(),o(ut(d,t))}else throw new Error(`Unexpected directive kind "${l}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(ut(Fo({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=jn();t.body[0].body.push(e.body),e.body=ut(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,o=!1;for(const i of e.body)if(i.body.length===1&&i.body[0].kind==="search_start")i.body.pop();else{const a=l_(i.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):o=!0}r&&!o&&n.forEach(i=>t.add(i))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Ee`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Hd(n)&&(n=Bd(n,t),e.ref=n)}},qI={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:o}=e;r||n.set(e,[...t.get(o).map(({node:i})=>i)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:o,groupsByName:i,multiplexCapturesToLeftByRef:a,openRefs:l,reffedNodesByReferencer:s}){const u=o.get(e);if(u&&l.has(e.number)){const c=Kr(Db(e.number),t);s.set(c,l.get(e.number)),n(c);return}l.set(e.number,e),a.set(e.number,[]),e.name&&Yl(a,e.name,[]);const f=a.get(e.name??e.number);for(let c=0;c<f.length;c++){const d=f[c];if(u===d.node||u&&u===d.origin||e===d.origin){f.splice(c,1);break}}if(a.get(e.number).push({node:e,origin:u}),e.name&&a.get(e.name).push({node:e,origin:u}),e.name){const c=Yl(i,e.name,new Map);let d=!1;if(u)d=!0;else for(const h of c.values())if(!h.hasDuplicateNameToRemove){d=!0;break}i.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:d})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=xc(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:o,ref:i}=e;if(o){let f=t;for(;(f=f.parent)&&!(f.type==="CapturingGroup"&&(f.name===i||f.number===i)););r.reffedNodesByReferencer.set(e,f);return}const a=r.subroutineRefMap.get(i),l=i===0,s=l?Db(0):o_(a,r.groupOriginByCopy,null);let u=s;if(!l){const f=i_(QI(a,d=>d.type==="Group"&&!!d.flags)),c=f?xc(r.globalFlags,f):r.globalFlags;XI(c,r.currentFlags)||(u=jn({flags:ZI(c)}),u.body[0].body.push(s))}n(ut(u,t),{traverse:!l})}},YI={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const i=r.reffedNodesByReferencer.get(e).filter(a=>KI(a,e));if(!i.length)n(ut(Fo({negate:!0}),t));else if(i.length>1){const a=jn({atomic:!0,body:i.reverse().map(l=>fi({body:[gp(l.number)]}))});n(ut(a,t))}else e.ref=i[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const o=Yw();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function r_(e){wl(e,{"*"({node:t,parent:n}){t.parent=n}})}function XI(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function KI(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=a_(n.parent);for(const o of r){if(o===n)break;if(o===e||s_(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function o_(e,t,n,r){const o=Array.isArray(e)?[]:{};for(const[i,a]of Object.entries(e))i==="parent"?o.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?o[i]=o_(a,t,o,n):(i==="type"&&a==="CapturingGroup"&&t.set(o,t.get(e)??e),o[i]=a);return o}function Db(e){const t=Kw(e);return t.isRecursive=!0,t}function QI(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Bd(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function i_(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(o=>{var i,a;(i=r.enable)!=null&&i[o]&&(delete n.disable[o],n.enable[o]=!0),(a=r.disable)!=null&&a[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function ZI({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function a_(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function l_(e){const t=e.find(n=>n.kind==="search_start"||ez(n,{negate:!1})||!WI(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const o=l_(r.body);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function s_(e,t){const n=a_(e)??[];for(const r of n)if(r===t||s_(r,t))return!0;return!1}function WI({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function JI(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function ez(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Fw(e.body[0],{type:"Assertion",kind:"search_start"})}function Hd(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Sr(e,t){const r=qw(e,{...t,unicodePropertyMap:Sg}).body;return r.length>1||r[0].body.length>1?jn({body:r}):r[0].body[0]}function Gd(e,t){return e.negate=t,e}function Kr(e,t){return e.parent=t,e}function ut(e,t){return r_(e),e.parent=t,e}function tz(e,t){const n=e_(t),r=bp(n.target,"ES2024"),o=bp(n.target,"ES2025"),i=n.rules.recursionLimit;if(!Number.isInteger(i)||i<2||i>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,l=null;if(!o){const h=[e.flags.ignoreCase];wl(e,nz,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(y){h.push(y)},setHasCasedChar(){h.at(-1)?a=!0:l=!0}})}const s={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!l)};let u=e;const f={accuracy:n.accuracy,appliedGlobalFlags:s,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:u,originMap:e._originMap,recursionLimit:i,useAppliedIgnoreCase:!!(!o&&a&&l),useFlagMods:o,useFlagV:r,verbose:n.verbose};function c(h){return f.lastNode=u,u=h,PI(rz[h.type],`Unexpected node type "${h.type}"`)(h,f,c)}const d={pattern:e.body.map(c).join("|"),flags:c(e.flags),options:{...e.options}};return r||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],f.captureMap.forEach((h,y)=>{h.hidden&&d._hiddenCaptures.push(y),h.transferTo&&Yl(d._captureTransfers,h.transferTo,[]).push(y)}),d}var nz={"*":{enter({node:e},t){if(Ib(e)){const n=t.getCurrentModI();t.pushModI(e.flags?xc({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Ib(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Eg(bt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),u_(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&n_.has(e.value)&&t.setHasCasedChar()}},rz={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ee`\B`:Ee`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:o,number:i}=e,a={ignoreCase:t.currentFlags.ignoreCase},l=t.originMap.get(e);return l&&(a.hidden=!0,i>l.number&&(a.transferTo=l.number)),t.captureMap.set(i,a),`(${o?`?<${o}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=bt(e),r=Ti(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Eg(n)){const o=t_(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:o,parent:i}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Yn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(zb)&&(a=[vf(45),...a.filter(u=>!zb(u))]);const l=()=>`[${o?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Yn.bugNestedClassIgnoresNegation)&&!o){const f=a.filter(c=>c.type==="CharacterClass"&&c.kind==="union"&&c.negate);if(f.length){const c=jn(),d=c.body[0];return c.parent=i,d.parent=c,a=a.filter(h=>!f.includes(h)),e.body=a,a.length?(e.parent=d,d.body.push(e)):c.body.pop(),f.forEach(h=>{const y=fi({body:[h]});h.parent=y,y.parent=c,c.body.push(y)}),n(c)}}t.inCharClass=!0;const u=l();return t.inCharClass=!1,u}const s=a[0];if(r==="union"&&!o&&s&&((!t.useFlagV||!t.verbose)&&i.kind==="union"&&!(Yn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&i.kind==="intersection"&&a.length===1&&s.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&i.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return l()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},i=Ti(n,o),a=Ti(r,o),l=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const s=u_(e);sz(s).forEach(f=>{l.add(Array.isArray(f)?`${Ti(f[0],o)}-${Ti(f[1],o)}`:Ti(f,o))})}return`${i}-${a}${[...l].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Ee`[^\n]`;if(e==="digit")return t?Ee`\D`:Ee`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&n_.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Ee`\P`:Ee`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Ee`\W`:Ee`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},o,i){const a=o.currentFlags;n&&(o.currentFlags=xc(a,n));const l=t.map(i).join("|"),s=!o.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!o.useFlagMods||!n)?l:`(?${uz(e,n,o.useFlagMods)}${l})`;return o.currentFlags=a,s},LookaroundAssertion({body:e,kind:t,negate:n},r,o){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,n){return n(e.body)+cz(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Ee`\g<${t}&R=${r}>`}},oz=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),iz=new Set(["-","\\","]","^","["]),az=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Pb=new Map([[9,Ee`\t`],[10,Ee`\n`],[11,Ee`\v`],[12,Ee`\f`],[13,Ee`\r`],[8232,Ee`\u2028`],[8233,Ee`\u2029`],[65279,Ee`\uFEFF`]]),lz=new RegExp("^\\p{Cased}$","u");function Eg(e){return lz.test(e)}function u_(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,o=e.max.value,i=[];if(r<65&&(o===65535||o>=131071)||r===65536&&o>=131071)return i;for(let a=r;a<=o;a++){const l=bt(a);if(!Eg(l))continue;const s=t_(l).filter(u=>{const f=u.codePointAt(0);return f<r||f>o});if(s.length&&(i.push(...s),n))break}return i}function Ti(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Pb.has(e))return Pb.get(e);if(e<32||e>126&&e<160||e>262143||t&&fz(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=n?r?az:iz:oz,i=bt(e);return(o.has(i)?"\\":"")+i}function sz(e){const t=e.map(o=>o.codePointAt(0)).sort((o,i)=>o-i),n=[];let r=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?r??(r=t[o]):r===null?n.push(t[o]):(n.push([r,t[o]]),r=null);return n}function uz(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:o,disable:i}=t;r=(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")+(i?"-":"")+(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")}return`${r}:`}function cz({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function Ib({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function fz(e){return e>47&&e<58}function zb({type:e,value:t}){return e==="Character"&&t===45}var no,Rr,Xo,ro,Ko,Xl,Sp,wo,dz=(wo=class extends RegExp{constructor(n,r,o){var t=(...uB)=>(super(...uB),Po(this,Xl),Po(this,no,new Map),Po(this,Rr,null),Po(this,Xo),Po(this,ro,null),Po(this,Ko,null),z(this,"rawOptions",{}),this);const i=!!(o!=null&&o.lazyCompile);if(n instanceof RegExp){if(o)throw new Error("Cannot provide options when copying a regexp");const a=n;t(a,r),Bn(this,Xo,a.source),a instanceof wo&&(Bn(this,no,Ft(a,no)),Bn(this,ro,Ft(a,ro)),Bn(this,Ko,Ft(a,Ko)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...o};t(i?"":n,r),Bn(this,Xo,n),Bn(this,no,pz(a.hiddenCaptures,a.transfers)),Bn(this,Ko,a.strategy),this.rawOptions=o??{}}i||Bn(this,Rr,this)}get source(){return Ft(this,Xo)||"(?:)"}exec(n){if(!Ft(this,Rr)){const{lazyCompile:i,...a}=this.rawOptions;Bn(this,Rr,new wo(Ft(this,Xo),this.flags,a))}const r=this.global||this.sticky,o=this.lastIndex;if(Ft(this,Ko)==="clip_search"&&r&&o){this.lastIndex=0;const i=Of(this,Xl,Sp).call(this,n.slice(o));return i&&(hz(i,o,n,this.hasIndices),this.lastIndex+=o),i}return Of(this,Xl,Sp).call(this,n)}},no=new WeakMap,Rr=new WeakMap,Xo=new WeakMap,ro=new WeakMap,Ko=new WeakMap,Xl=new WeakSet,Sp=function(n){Ft(this,Rr).lastIndex=this.lastIndex;const r=kg(wo.prototype,this,"exec").call(Ft(this,Rr),n);if(this.lastIndex=Ft(this,Rr).lastIndex,!r||!Ft(this,no).size)return r;const o=[...r];r.length=1;let i;this.hasIndices&&(i=[...r.indices],r.indices.length=1);const a=[0];for(let l=1;l<o.length;l++){const{hidden:s,transferTo:u}=Ft(this,no).get(l)??{};if(s?a.push(null):(a.push(r.length),r.push(o[l]),this.hasIndices&&r.indices.push(i[l])),u&&o[l]!==void 0){const f=a[u];if(!f)throw new Error(`Invalid capture transfer to "${f}"`);if(r[f]=o[l],this.hasIndices&&(r.indices[f]=i[l]),r.groups){Ft(this,ro)||Bn(this,ro,mz(this.source));const c=Ft(this,ro).get(u);c&&(r.groups[c]=o[l],this.hasIndices&&(r.indices.groups[c]=i[l]))}}}return r},wo);function hz(e,t,n,r){if(e.index+=t,e.input=n,r){const o=e.indices;for(let a=0;a<o.length;a++){const l=o[a];l&&(o[a]=[l[0]+t,l[1]+t])}const i=o.groups;i&&Object.keys(i).forEach(a=>{const l=i[a];l&&(i[a]=[l[0]+t,l[1]+t])})}}function pz(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,o]of t)for(const i of o)Yl(n,i,{}).transferTo=r;return n}function mz(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,o=0,i;for(;i=t.exec(e);){const{0:a,groups:{capture:l,name:s}}=i;a==="["?r++:r?a==="]"&&r--:l&&(o++,s&&n.set(o,s))}return n}function gz(e,t){const n=yz(e,t);return n.options?new dz(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function yz(e,t){const n=e_(t),r=qw(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Sg}),o=VI(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=tz(o,n),a=LI(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:"external"}),l=kI(a.pattern),s=MI(l.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),u={pattern:s.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const f=s.hiddenCaptures.sort((y,b)=>y-b),c=Array.from(s.captureTransfers),d=o._strategy,h=u.pattern.length>=n.lazyCompileLength;(f.length||c.length||d||h)&&(u.options={...f.length&&{hiddenCaptures:f},...c.length&&{transfers:c},...d&&{strategy:d},...h&&{lazyCompile:h}})}return u}function vz(e,t){return gz(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function c_(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>vz(n,{target:t.target})),{createScanner(n){return new DP(n,t)},createString(n){return{content:n}}}}var Cg=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function bz(){return 2147483648}function Sz(){return typeof performance<"u"?performance.now():Date.now()}const Ez=(e,t)=>e+(t-e%t)%t;async function Cz(e){let t,n;const r={};function o(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function i(h,y,b){r.HEAPU8.copyWithin(h,y,y+b)}function a(h){try{return t.grow(h-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}function l(h){const y=r.HEAPU8.length;h=h>>>0;const b=bz();if(h>b)return!1;for(let E=1;E<=4;E*=2){let g=y*(1+.2/E);g=Math.min(g,h+100663296);const p=Math.min(b,Ez(Math.max(h,g),65536));if(a(p))return!0}return!1}const s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,y,b=1024){const E=y+b;let g=y;for(;h[g]&&!(g>=E);)++g;if(g-y>16&&h.buffer&&s)return s.decode(h.subarray(y,g));let p="";for(;y<g;){let v=h[y++];if(!(v&128)){p+=String.fromCharCode(v);continue}const S=h[y++]&63;if((v&224)===192){p+=String.fromCharCode((v&31)<<6|S);continue}const C=h[y++]&63;if((v&240)===224?v=(v&15)<<12|S<<6|C:v=(v&7)<<18|S<<12|C<<6|h[y++]&63,v<65536)p+=String.fromCharCode(v);else{const w=v-65536;p+=String.fromCharCode(55296|w>>10,56320|w&1023)}}return p}function f(h,y){return h?u(r.HEAPU8,h,y):""}const c={emscripten_get_now:Sz,emscripten_memcpy_big:i,emscripten_resize_heap:l,fd_write:()=>0};async function d(){const y=await e({env:c,wasi_snapshot_preview1:c});t=y.memory,o(t.buffer),Object.assign(r,y),r.UTF8ToString=f}return await d(),r}var Rz=Object.defineProperty,wz=(e,t,n)=>t in e?Rz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,St=(e,t,n)=>wz(e,typeof t!="symbol"?t+"":t,n);let _t=null;function _z(e){throw new Cg(e.UTF8ToString(e.getLastOnigError()))}class Cf{constructor(t){St(this,"utf16Length"),St(this,"utf8Length"),St(this,"utf16Value"),St(this,"utf8Value"),St(this,"utf16OffsetToUtf8"),St(this,"utf8OffsetToUtf16");const n=t.length,r=Cf._utf8ByteLength(t),o=r!==n,i=o?new Uint32Array(n+1):null;o&&(i[n]=r);const a=o?new Uint32Array(r+1):null;o&&(a[r]=n);const l=new Uint8Array(r);let s=0;for(let u=0;u<n;u++){const f=t.charCodeAt(u);let c=f,d=!1;if(f>=55296&&f<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(c=(f-55296<<10)+65536|h-56320,d=!0)}o&&(i[u]=s,d&&(i[u+1]=s),c<=127?a[s+0]=u:c<=2047?(a[s+0]=u,a[s+1]=u):c<=65535?(a[s+0]=u,a[s+1]=u,a[s+2]=u):(a[s+0]=u,a[s+1]=u,a[s+2]=u,a[s+3]=u)),c<=127?l[s++]=c:c<=2047?(l[s++]=192|(c&1984)>>>6,l[s++]=128|(c&63)>>>0):c<=65535?(l[s++]=224|(c&61440)>>>12,l[s++]=128|(c&4032)>>>6,l[s++]=128|(c&63)>>>0):(l[s++]=240|(c&1835008)>>>18,l[s++]=128|(c&258048)>>>12,l[s++]=128|(c&4032)>>>6,l[s++]=128|(c&63)>>>0),d&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=l,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,o=t.length;r<o;r++){const i=t.charCodeAt(r);let a=i,l=!1;if(i>=55296&&i<=56319&&r+1<o){const s=t.charCodeAt(r+1);s>=56320&&s<=57343&&(a=(i-55296<<10)+65536|s-56320,l=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,l&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Rf=class Wn{constructor(t){if(St(this,"id",++Wn.LAST_ID),St(this,"_onigBinding"),St(this,"content"),St(this,"utf16Length"),St(this,"utf8Length"),St(this,"utf16OffsetToUtf8"),St(this,"utf8OffsetToUtf16"),St(this,"ptr"),!_t)throw new Cg("Must invoke loadWasm first.");this._onigBinding=_t,this.content=t;const n=new Cf(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Wn._sharedPtrInUse?(Wn._sharedPtr||(Wn._sharedPtr=_t.omalloc(1e4)),Wn._sharedPtrInUse=!0,_t.HEAPU8.set(n.utf8Value,Wn._sharedPtr),this.ptr=Wn._sharedPtr):this.ptr=n.createString(_t)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Wn._sharedPtr?Wn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};St(Rf,"LAST_ID",0);St(Rf,"_sharedPtr",0);St(Rf,"_sharedPtrInUse",!1);let f_=Rf;class xz{constructor(t){if(St(this,"_onigBinding"),St(this,"_ptr"),!_t)throw new Cg("Must invoke loadWasm first.");const n=[],r=[];for(let l=0,s=t.length;l<s;l++){const u=new Cf(t[l]);n[l]=u.createString(_t),r[l]=u.utf8Length}const o=_t.omalloc(4*t.length);_t.HEAPU32.set(n,o/4);const i=_t.omalloc(4*t.length);_t.HEAPU32.set(r,i/4);const a=_t.createOnigScanner(o,i,t.length);for(let l=0,s=t.length;l<s;l++)_t.ofree(n[l]);_t.ofree(i),_t.ofree(o),a===0&&_z(_t),this._onigBinding=_t,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let o=0;if(typeof r=="number"&&(o=r),typeof t=="string"){t=new f_(t);const i=this._findNextMatchSync(t,n,!1,o);return t.dispose(),i}return this._findNextMatchSync(t,n,!1,o)}_findNextMatchSync(t,n,r,o){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),o);if(a===0)return null;const l=i.HEAPU32;let s=a/4;const u=l[s++],f=l[s++],c=[];for(let d=0;d<f;d++){const h=t.convertUtf8OffsetToUtf16(l[s++]),y=t.convertUtf8OffsetToUtf16(l[s++]);c[d]={start:h,end:y,length:y-h}}return{index:u,captureIndices:c}}}function Tz(e){return typeof e.instantiator=="function"}function Az(e){return typeof e.default=="function"}function Oz(e){return typeof e.data<"u"}function Mz(e){return typeof Response<"u"&&e instanceof Response}function kz(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let eu;function Rg(e){if(eu)return eu;async function t(){_t=await Cz(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Tz(r)?r=await r.instantiator(n):Az(r)?r=await r.default(n):(Oz(r)&&(r=r.data),Mz(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Nz(r)(n):r=await Lz(r)(n):kz(r)?r=await $d(r)(n):r instanceof WebAssembly.Module?r=await $d(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await $d(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return eu=t(),eu}function $d(e){return t=>WebAssembly.instantiate(e,t)}function Nz(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Lz(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let d_;function Dz(e){d_=e}function Pz(){return d_}async function h_(e){return e&&await Rg(e),{createScanner(t){return new xz(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new f_(t)}}}const Iz=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:h_,getDefaultWasmLoader:Pz,loadWasm:Rg,setDefaultWasmLoader:Dz},Symbol.toStringTag,{value:"Module"}));var zz=GL({});jL(zz,Iz);const p_=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>V(()=>import("./andromeeda-C4gqWexZ.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>V(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>V(()=>import("./ayu-dark-DYE7WIF3.js"),[])},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>V(()=>import("./ayu-light-BA47KaF1.js"),[])},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>V(()=>import("./ayu-mirage-32ctXXKs.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>V(()=>import("./catppuccin-frappe-DFWUc33u.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>V(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>V(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>V(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>V(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>V(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>V(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>V(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>V(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>V(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>V(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>V(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>V(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>V(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>V(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>V(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>V(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>V(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>V(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>V(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>V(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>V(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[])},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>V(()=>import("./horizon-BUw7H-hv.js"),[])},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:()=>V(()=>import("./horizon-bright-CUuTKBJd.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>V(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>V(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>V(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>V(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>V(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>V(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>V(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>V(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>V(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>V(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>V(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>V(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>V(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>V(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>V(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>V(()=>import("./night-owl-light-CMTm3GFP.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>V(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>V(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>V(()=>import("./one-light-C3Wv6jpd.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>V(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>V(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>V(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>V(()=>import("./rose-pine-qdsjHGoJ.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>V(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>V(()=>import("./rose-pine-moon-D4_iv3hh.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>V(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>V(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>V(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>V(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>V(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>V(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>V(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>V(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>V(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>V(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>V(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],m_=Object.fromEntries(p_.map(e=>[e.id,e.import])),wf=[{id:"markdown",name:"Markdown",aliases:["md"],import:()=>V(()=>import("./markdown-CKXSK5AY.js"),[])},{id:"mdx",name:"MDX",import:()=>V(()=>import("./mdx-BWRhHdFl.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>V(()=>import("./javascript-XPxc2APE.js"),[])},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>V(()=>import("./typescript-DttGkNCf.js"),[])},{id:"jsx",name:"JSX",import:()=>V(()=>import("./jsx-BGEKFWBk.js"),[])},{id:"tsx",name:"TSX",import:()=>V(()=>import("./tsx-Dio8iE-N.js"),[])},{id:"html",name:"HTML",import:()=>V(()=>import("./html-pp8916En.js"),__vite__mapDeps([0,1,2]))},{id:"css",name:"CSS",import:()=>V(()=>import("./css-CLj8gQPS.js"),[])},{id:"scss",name:"SCSS",import:()=>V(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([3,2]))},{id:"less",name:"Less",import:()=>V(()=>import("./less-C76OjOdF.js"),[])},{id:"vue",name:"Vue",import:()=>V(()=>import("./vue-DMJtu8ND.js"),__vite__mapDeps([4,2,1,5,6,0]))},{id:"svelte",name:"Svelte",import:()=>V(()=>import("./svelte-DR4MIrkg.js"),__vite__mapDeps([7,1,5,2]))},{id:"json",name:"JSON",import:()=>V(()=>import("./json-CjLXzM_z.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>V(()=>import("./jsonc-BYi4HS05.js"),[])},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>V(()=>import("./yaml-B92AUxDB.js"),[])},{id:"toml",name:"TOML",import:()=>V(()=>import("./toml-Btlk-g9G.js"),[])},{id:"xml",name:"XML",import:()=>V(()=>import("./xml-DtyAt_xK.js"),__vite__mapDeps([8,9]))},{id:"ini",name:"INI",aliases:["properties"],import:()=>V(()=>import("./ini-DOGW4-0C.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>V(()=>import("./python-DgE28U1V.js"),[])},{id:"java",name:"Java",import:()=>V(()=>import("./java-B2AjWfgk.js"),[])},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>V(()=>import("./kotlin-DwKqsDKK.js"),[])},{id:"go",name:"Go",import:()=>V(()=>import("./go-C27-OAKa.js"),[])},{id:"rust",name:"Rust",aliases:["rs"],import:()=>V(()=>import("./rust-DJErdhjk.js"),[])},{id:"c",name:"C",import:()=>V(()=>import("./c-CyUOlKFr.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>V(()=>import("./cpp-Bp17OOWP.js"),__vite__mapDeps([10,11,12]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>V(()=>import("./csharp-DieIJxYJ.js"),[])},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>V(()=>import("./ruby-CM5gBc7p.js"),__vite__mapDeps([13,0,1,2,8,9,12,14,5,15,16,10,11,17,18,19]))},{id:"php",name:"PHP",import:()=>V(()=>import("./php-R6g_5hLQ.js"),__vite__mapDeps([20,0,1,2,8,9,12,6]))},{id:"swift",name:"Swift",import:()=>V(()=>import("./swift-DjrYMa62.js"),[])},{id:"lua",name:"Lua",import:()=>V(()=>import("./lua-JmSlR1pZ.js"),__vite__mapDeps([18,11]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>V(()=>import("./shellscript-CE-5zpiL.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>V(()=>import("./shellsession-BhddCRKA.js"),__vite__mapDeps([21,17]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>V(()=>import("./powershell-DdRAnR4Z.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>V(()=>import("./docker-DIG_IqVK.js"),[])},{id:"nginx",name:"Nginx",import:()=>V(()=>import("./nginx-bBKbG2uI.js"),__vite__mapDeps([22,18,11]))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>V(()=>import("./make-s9FKP0VE.js"),[])},{id:"cmake",name:"CMake",import:()=>V(()=>import("./cmake-Cv5ljclQ.js"),[])},{id:"sql",name:"SQL",import:()=>V(()=>import("./sql-CKXjX23X.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>V(()=>import("./graphql-By4-2MiP.js"),__vite__mapDeps([14,1,5,15,16]))},{id:"diff",name:"Diff",import:()=>V(()=>import("./diff-BlzBhZx2.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>V(()=>import("./proto-BZ_yZy5q.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>V(()=>import("./wasm-LUzQYg3H.js"),[])}],g_=wf,y_=Object.fromEntries(wf.map(e=>[e.id,e.import])),Uz=Object.fromEntries(wf.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))??[]})),v_={...y_,...Uz},Bz=y_,Hz=Object.fromEntries(g_.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.id]))??[]})),b_=MP({langs:v_,themes:m_,engine:c_}),{codeToHtml:Gz,codeToHast:$z,codeToTokensBase:jz,codeToTokens:Vz,codeToTokensWithThemes:Fz,getSingletonHighlighter:qz,getLastGrammarState:Yz}=NP(b_),rU=Object.freeze(Object.defineProperty({__proto__:null,bundledLanguages:v_,bundledLanguagesAlias:Hz,bundledLanguagesBase:Bz,bundledLanguagesInfo:g_,bundledThemes:m_,bundledThemesInfo:p_,codeToHast:$z,codeToHtml:Gz,codeToTokens:Vz,codeToTokensBase:jz,codeToTokensWithThemes:Fz,createCssVariablesTheme:LP,createHighlighter:b_,createJavaScriptRegexEngine:c_,createOnigurumaEngine:h_,getLastGrammarState:Yz,getSingletonHighlighter:qz,getTokenStyleObject:ql,loadWasm:Rg,normalizeTheme:mf,stringifyTokenStyle:Cc,supportedLanguagesInfo:wf},Symbol.toStringTag,{value:"Module"})),S_=m.createContext(void 0);function Do(e){const t=m.useContext(S_);if(t===void 0&&!e)throw new Error(et(47));return t}function Xz(){return{...tg(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}const Kz={...ng,disabled:fe(e=>e.disabled),instantType:fe(e=>e.instantType),openMethod:fe(e=>e.openMethod),openChangeReason:fe(e=>e.openChangeReason),modal:fe(e=>e.modal),stickIfOpen:fe(e=>e.stickIfOpen),titleElementId:fe(e=>e.titleElementId),descriptionElementId:fe(e=>e.descriptionElementId),openOnHover:fe(e=>e.openOnHover),closeDelay:fe(e=>e.closeDelay)};class _f extends nf{constructor(n){const r={...Xz(),...n};r.open&&(n==null?void 0:n.mounted)===void 0&&(r.mounted=!0);super(r,{popupRef:m.createRef(),backdropRef:m.createRef(),internalBackdropRef:m.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:m.createRef(),beforeContentFocusGuardRef:m.createRef(),stickIfOpenTimeout:new Kn,triggerElements:new ps},Kz);z(this,"setOpen",(n,r)=>{var f,c;const o=r.reason===yt,i=r.reason===Fn&&r.event.detail===0,a=!n&&(r.reason===ds||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(c=(f=this.context).onOpenChange)==null||c.call(f,n,r),r.isCanceled)return;const l={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger},s=this.state.floatingRootContext.context.events;s==null||s.emit("openchange",l);const u=()=>{var y;const d={open:n,openChangeReason:r.reason},h=((y=r.trigger)==null?void 0:y.id)??null;(h||n)&&(d.activeTriggerId=h,d.activeTriggerElement=r.trigger??null),this.update(d)};o?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(qC,()=>{this.set("stickIfOpen",!1)}),Gt.flushSync(u)):u(),i||a?this.set("instantType",i?"click":"dismiss"):r.reason===Hr?this.set("instantType","focus"):this.set("instantType",void 0)});z(this,"disposeEffect",()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(n,r){const o=on(()=>n??new _f(r)).current;return km(o.disposeEffect),o}}function Ub({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,modal:a=!1,handle:l,triggerId:s,defaultTriggerId:u=null}=e,f=_f.useStore(l==null?void 0:l.store,{open:n??r,modal:a,activeTriggerId:s!==void 0?s:u});f.useControlledProp("open",n,r),f.useControlledProp("activeTriggerId",s,u);const c=f.useState("open"),d=f.useState("positionerElement"),h=f.useState("payload"),y=f.useState("openChangeReason");f.useContextCallback("onOpenChange",o),f.useContextCallback("onOpenChangeComplete",i);const{openMethod:b,triggerProps:E,reset:g}=QR(c);Jm(f);const{forceUnmount:p}=eg(c,f,()=>{f.update({stickIfOpen:!0,openChangeReason:null}),g()});XR(c&&a===!0&&y!==yt&&b!=="touch",d),m.useEffect(()=>{c||f.context.stickIfOpenTimeout.clear()},[f,c]);const v=m.useCallback(M=>{const _=xe(M);return _.preventUnmountOnClose=()=>{f.set("preventUnmountingOnClose",!0)},_},[f]),S=m.useCallback(()=>{f.setOpen(!1,v(ui))},[f,v]);m.useImperativeHandle(e.actionsRef,()=>({unmount:p,close:S}),[p,S]);const C=rg({popupStore:f,onOpenChange:f.setOpen}),w=Qm(C,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),R=CR(C),{getReferenceProps:x,getFloatingProps:O,getTriggerProps:k}=Da([w,R]),P=m.useMemo(()=>x(E),[x,E]),U=m.useMemo(()=>k(E),[k,E]),A=m.useMemo(()=>O(),[O]);f.useSyncedValues({modal:a,openMethod:b,activeTriggerProps:P,inactiveTriggerProps:U,popupProps:A,floatingRootContext:C,nested:fr()!=null});const L=m.useMemo(()=>({store:f}),[f]);return ee.jsx(S_.Provider,{value:L,children:typeof t=="function"?t({payload:h}):t})}function oU(e){return Do(!0)?ee.jsx(Ub,{props:e}):ee.jsx(VC,{children:ee.jsx(Ub,{props:e})})}const Qz=300,iU=m.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,handle:l,payload:s,openOnHover:u=!1,delay:f=Qz,closeDelay:c=0,id:d,...h}=t,y=Do(!0),b=(l==null?void 0:l.store)??(y==null?void 0:y.store);if(!b)throw new Error(et(74));const E=Ei(d),g=b.useState("isTriggerActive",E),p=b.useState("floatingRootContext"),v=b.useState("isOpenedByTrigger",E),S=m.useRef(null),{registerTrigger:C,isMountedByThisTrigger:w}=Wm(E,S,b,{payload:s,disabled:i,openOnHover:u,closeDelay:c}),R=b.useState("openChangeReason"),x=b.useState("stickIfOpen"),O=b.useState("openMethod"),k=rf(p,{enabled:p!=null&&u&&(O!=="touch"||R!==Fn),mouseOnly:!0,move:!1,handleClose:af(),restMs:f,delay:{close:c},triggerElementRef:S,isActiveTrigger:g}),P=Xm(p,{enabled:p!=null,stickIfOpen:x}),U=Da([P]),A=b.useState("triggerProps",w),L=m.useMemo(()=>({disabled:i,open:v}),[i,v]),{getButtonProps:M,buttonRef:_}=ys({disabled:i,native:a}),D=m.useMemo(()=>({open(B){return B&&R===Fn?np.open(B):ag.open(B)}}),[R]),T=He("button",t,{state:L,ref:[_,n,C,S],props:[U.getReferenceProps(),k,A,{[YC]:"",id:E},h,M],stateAttributesMapping:D}),N=m.useRef(null),I=W(B=>{Gt.flushSync(()=>{b.setOpen(!1,xe(Hr,B.nativeEvent,B.currentTarget))});const $=BC(N.current);$==null||$.focus()}),q=W(B=>{var ue;const $=b.select("positionerElement");if($&&ni(B,$))(ue=b.context.beforeContentFocusGuardRef.current)==null||ue.focus();else{Gt.flushSync(()=>{b.setOpen(!1,xe(Hr,B.nativeEvent,B.currentTarget))});let te=UC(S.current);for(;te!==null&&Re($,te)||te!=null&&te.hasAttribute("aria-hidden");){const ce=te;if(te=Jc(te),te===ce)break}te==null||te.focus()}});return g?ee.jsxs(m.Fragment,{children:[ee.jsx(qn,{ref:N,onFocus:I}),ee.jsx(m.Fragment,{children:T},E),ee.jsx(qn,{ref:b.context.triggerFocusTargetRef,onFocus:q})]}):ee.jsx(m.Fragment,{children:T},E)}),E_=m.createContext(void 0);function Zz(){const e=m.useContext(E_);if(e===void 0)throw new Error(et(45));return e}const aU=m.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=Do();return i.useState("mounted")||r?ee.jsx(E_.Provider,{value:r,children:ee.jsx(eR,{ref:n,...o,renderGuards:!1})}):null}),C_=m.createContext(void 0);function R_(){const e=m.useContext(C_);if(!e)throw new Error(et(46));return e}const lU=m.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:a="absolute",side:l="bottom",align:s="center",sideOffset:u=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:E=Gm,...g}=t,{store:p}=Do(),v=Zz(),S=Hm(),C=p.useState("floatingRootContext"),w=p.useState("mounted"),R=p.useState("open"),x=p.useState("openChangeReason"),O=p.useState("activeTriggerElement"),k=p.useState("modal"),P=p.useState("positionerElement"),U=p.useState("instantType"),A=p.useState("transitionStatus"),L=m.useRef(null),M=hs(P,!1,!1),_=lg({anchor:i,floatingRootContext:C,positionMethod:a,mounted:w,side:l,sideOffset:u,align:s,alignOffset:f,arrowPadding:h,collisionBoundary:c,collisionPadding:d,sticky:y,disableAnchorTracking:b,keepMounted:v,nodeId:S,collisionAvoidance:E,adaptiveOrigin:TR}),D=m.useMemo(()=>{const $={};return R||($.pointerEvents="none"),{role:"presentation",hidden:!w,style:{..._.positionerStyles,...$}}},[R,w,_.positionerStyles]),T=m.useMemo(()=>({props:D,..._}),[D,_]),N=C==null?void 0:C.select("domReferenceElement");ie(()=>{const $=N,ue=L.current;if($&&(L.current=$),ue&&$&&$!==ue){p.set("instantType",void 0);const te=new AbortController;return M(()=>{p.set("instantType","trigger-change")},te.signal),()=>{te.abort()}}},[N,M,p]);const I=m.useMemo(()=>({open:R,side:T.side,align:T.align,anchorHidden:T.anchorHidden,instant:U}),[R,T.side,T.align,T.anchorHidden,U]),q=m.useCallback($=>{p.set("positionerElement",$)},[p]),B=He("div",t,{state:I,props:[T.props,ms(A),g],ref:[n,q],stateAttributesMapping:Vr});return ee.jsxs(C_.Provider,{value:T,children:[w&&k===!0&&x!==yt&&ee.jsx(YR,{ref:p.context.internalBackdropRef,inert:gs(!R),cutout:O}),ee.jsx(jC,{id:S,children:B})]})}),Wz={...Vr,...Pa},sU=m.forwardRef(function(t,n){const{className:r,render:o,initialFocus:i,finalFocus:a,...l}=t,{store:s}=Do(),u=R_(),f=UR()!=null,c=sf(),d=s.useState("open"),h=s.useState("openMethod"),y=s.useState("instantType"),b=s.useState("transitionStatus"),E=s.useState("popupProps"),g=s.useState("titleElementId"),p=s.useState("descriptionElementId"),v=s.useState("modal"),S=s.useState("mounted"),C=s.useState("openChangeReason"),w=s.useState("popupElement"),R=s.useState("payload"),x=s.useState("positionerElement"),O=s.useState("activeTriggerElement"),k=s.useState("floatingRootContext");La({open:d,ref:s.context.popupRef,onComplete(){var B,$;d&&(($=(B=s.context).onOpenChangeComplete)==null||$.call(B,!0))}});const P=s.useState("disabled"),U=s.useState("openOnHover"),A=s.useState("closeDelay");og(k,{enabled:U&&!P,closeDelay:A});function L(B){return B==="touch"?s.context.popupRef.current:!0}const M=i===void 0?L:i,_=m.useMemo(()=>({open:d,side:u.side,align:u.align,instant:y,transitionStatus:b}),[d,u.side,u.align,y,b]),D=m.useCallback(B=>{s.set("popupElement",B)},[s]);function T(){k.context.events.emit("measure-layout")}function N(B,$){k.context.events.emit("measure-layout-complete",{previousDimensions:B,nextDimensions:$})}const I=m.useCallback(()=>s.context.triggerElements.size>1,[s]);OR({popupElement:w,positionerElement:x,mounted:S,content:R,enabled:I,onMeasureLayout:T,onMeasureLayoutComplete:N,side:u.side,direction:c});const q=He("div",t,{state:_,ref:[n,s.context.popupRef,D],props:[E,{"aria-labelledby":g,"aria-describedby":p,onKeyDown(B){f&&FR.has(B.key)&&B.stopPropagation()}},ms(b),l],stateAttributesMapping:Wz});return ee.jsx(tR,{context:k,openInteractionType:h,modal:v==="trap-focus",disabled:!S||C===yt,initialFocus:M,returnFocus:a,restoreFocus:"popup",previousFocusableElement:tt(O)?O:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:q})}),uU=m.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a}=Do(),l=a.useState("open"),{arrowRef:s,side:u,align:f,arrowUncentered:c,arrowStyles:d}=R_(),h=m.useMemo(()=>({open:l,side:u,align:f,uncentered:c}),[l,u,f,c]);return He("div",t,{state:h,ref:[n,s],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:Vr})}),Jz={...Vr,...Pa},cU=m.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a}=Do(),l=a.useState("open"),s=a.useState("mounted"),u=a.useState("transitionStatus"),f=a.useState("openChangeReason"),c=m.useMemo(()=>({open:l,transitionStatus:u}),[l,u]);return He("div",t,{state:c,ref:[a.context.backdropRef,n],props:[{role:"presentation",hidden:!s,style:{pointerEvents:f===yt?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:Jz})});let Bb=function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e}({});const e3={activationDirection:e=>e?{"data-activation-direction":e}:null},fU=m.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{store:l}=Do(),s=l.useState("activeTriggerElement"),u=l.useState("open"),f=l.useState("floatingRootContext"),c=MR(u?s:null),d=m.useRef(null),[h,y]=m.useState(null),[b,E]=m.useState(null),g=m.useRef(null),p=m.useRef(null),v=hs(g,!0,!1),S=Si(),[C,w]=m.useState(null),[R,x]=m.useState(!1);ie(()=>{const M=g.current;if(!M)return;const _=document.createElement("div");for(const D of Array.from(M.childNodes))_.appendChild(D.cloneNode(!0));d.current=_});const O=W(()=>{var M,_,D;(M=g.current)==null||M.style.setProperty("animation","none"),(_=g.current)==null||_.style.setProperty("transition","none"),(D=p.current)==null||D.style.setProperty("display","none")}),k=W(M=>{var _,D,T;(_=g.current)==null||_.style.removeProperty("animation"),(D=g.current)==null||D.style.removeProperty("transition"),(T=p.current)==null||T.style.removeProperty("display"),C||w(M.previousDimensions)});m.useEffect(()=>(f.context.events.on("measure-layout",O),f.context.events.on("measure-layout-complete",k),()=>{f.context.events.off("measure-layout",O),f.context.events.off("measure-layout-complete",k)}),[f,O,k]);const P=m.useRef(null);ie(()=>{if(s&&c&&s!==c&&P.current!==s&&d.current){y(d.current),x(!0);const M=n3(c,s);E(M),S.request(()=>{S.request(()=>{x(!1),v(()=>{y(null),w(null),d.current=null})})}),P.current=s}},[s,c,h,v,S]);const U=h!=null;let A;U?A=ee.jsxs(m.Fragment,{children:[ee.jsx("div",{"data-previous":!0,inert:gs(!0),ref:p,style:{[Bb.popupWidth]:`${C==null?void 0:C.width}px`,[Bb.popupHeight]:`${C==null?void 0:C.height}px`,position:"absolute"},"data-ending-style":R?void 0:""},"previous"),ee.jsx("div",{"data-current":!0,ref:g,"data-starting-style":R?"":void 0,children:i},"current")]}):A=ee.jsx("div",{"data-current":!0,ref:g,children:i},"current"),ie(()=>{const M=p.current;!M||!h||M.replaceChildren(...Array.from(h.childNodes))},[h]);const L=m.useMemo(()=>({activationDirection:t3(b),transitioning:U}),[b,U]);return He("div",t,{state:L,ref:n,props:[a,{children:A}],stateAttributesMapping:e3})});function t3(e){if(e)return`${Hb(e.horizontal,5,"right","left")} ${Hb(e.vertical,5,"down","up")}`}function Hb(e,t,n,r){return e>t?n:e<-t?r:""}function n3(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o={x:n.left+n.width/2,y:n.top+n.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-o.x,vertical:i.y-o.y}}class r3{constructor(){this.store=new _f}open(t){const n=t?this.store.context.triggerElements.getById(t)??void 0:void 0;if(t&&!n)throw new Error(et(80,t));this.store.setOpen(!0,xe(ui,void 0,n))}close(){this.store.setOpen(!1,xe(ui,void 0,void 0))}get isOpen(){return this.store.state.open}}function dU(){return new r3}let Gb=0;function w_(e){return Gb+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Gb}`}const wg=m.createContext(void 0);function _g(){const e=m.useContext(wg);if(!e)throw new Error(et(73));return e}function jd(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const hU=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[a,l]=m.useState([]),[s,u]=m.useState(!1),[f,c]=m.useState(!1),[d,h]=m.useState(null);a.length===0&&(s&&u(!1),f&&c(!1));const y=s||f,b=m.useRef(new Map),E=m.useRef(null),g=m.useRef(!0),p=m.useRef(!1);function v(A){var T,N;const L=en(Xt(E.current));if(!E.current||!Re(E.current,L)||!oc(L))return;const M=a.findIndex(I=>I.id===A);let _=null,D=M+1;for(;D<a.length;){if(a[D].transitionStatus!=="ending"){_=a[D];break}D+=1}if(!_)for(D=M-1;D>=0;){if(a[D].transitionStatus!=="ending"){_=a[D];break}D-=1}_?(N=(T=_.ref)==null?void 0:T.current)==null||N.focus():d==null||d.focus({preventScroll:!0})}const S=W(()=>{p.current||(p.current=!0,b.current.forEach(A=>{if(A.timeout){A.timeout.clear();const L=Date.now()-A.start,M=A.delay-L;A.remaining=M>0?M:0}}))}),C=W(()=>{p.current&&(p.current=!1,b.current.forEach((A,L)=>{A.remaining=A.remaining>0?A.remaining:A.delay,A.timeout??(A.timeout=Kn.create()),A.timeout.start(A.remaining,()=>{b.current.delete(L),A.callback()}),A.start=Date.now()}))}),w=W(A=>{var _;l(D=>{const T=D.map(I=>I.id===A?{...I,transitionStatus:"ending",height:0}:I),N=T.filter(I=>I.transitionStatus!=="ending");return T.map(I=>{if(I.transitionStatus==="ending")return I;const q=N.indexOf(I)>=o;return{...I,limited:q}})});const L=b.current.get(A);L&&L.timeout&&(L.timeout.clear(),b.current.delete(A));const M=a.find(D=>D.id===A);(_=M==null?void 0:M.onClose)==null||_.call(M),v(A),a.length===1&&(u(!1),c(!1))}),R=W(A=>{var M;l(_=>_.filter(D=>D.id!==A));const L=a.find(_=>_.id===A);(M=L==null?void 0:L.onRemove)==null||M.call(L)}),x=W((A,L,M)=>{const _=Date.now(),D=g.current&&!s&&!f,T=D?Kn.create():void 0;T==null||T.start(L,()=>{b.current.delete(A),M()}),b.current.set(A,{timeout:T,start:D?_:0,delay:L,remaining:L,callback:M})}),O=W(A=>{const L=A.id||w_("toast"),M={...A,id:L,transitionStatus:"starting"};l(D=>{const T=[M,...D],N=T.filter(I=>I.transitionStatus!=="ending");if(N.length>o){const I=N.length-o,q=N.slice(-I);return T.map(B=>q.some($=>$.id===B.id)?{...B,limited:!0}:{...B,limited:!1})}return T.map(I=>({...I,limited:!1}))});const _=M.timeout??r;return M.type!=="loading"&&_>0&&x(L,_,()=>w(L)),(s||f||!g.current)&&S(),L}),k=W((A,L)=>{l(M=>M.map(_=>_.id===A?{..._,...L}:_))}),P=W((A,L)=>{const M=jd(L.loading),_=O({...M,type:"loading"}),D=A.then(T=>{const N=jd(L.success,T);k(_,{...N,type:"success"});const I=N.timeout??r;return I>0&&x(_,I,()=>w(_)),(s||f||!g.current)&&S(),T}).catch(T=>{const N=jd(L.error,T);k(_,{...N,type:"error"});const I=N.timeout??r;return I>0&&x(_,I,()=>w(_)),(s||f||!g.current)&&S(),Promise.reject(T)});return{}.hasOwnProperty.call(L,"setPromise")&&L.setPromise(D),D});m.useEffect(function(){return i?i[" subscribe"](({action:M,options:_})=>{const D=_.id;M==="promise"&&_.promise?P(_.promise,_):M==="update"&&D?k(D,_):M==="close"&&D?w(D):O(_)}):void 0},[O,k,x,r,i,P,w]);const U=m.useMemo(()=>({toasts:a,setToasts:l,hovering:s,setHovering:u,focused:f,setFocused:c,expanded:y,add:O,close:w,remove:R,update:k,promise:P,pauseTimers:S,resumeTimers:C,prevFocusElement:d,setPrevFocusElement:h,viewportRef:E,scheduleTimer:x,windowFocusedRef:g}),[O,w,f,s,y,S,d,P,R,C,x,a,k]);return ee.jsx(wg.Provider,{value:U,children:n})},o3=m.createContext(void 0);let i3=function(e){return e.frontmostHeight="--toast-frontmost-height",e}({});const pU=m.forwardRef(function(t,n){var T;const{render:r,className:o,children:i,...a}=t,{toasts:l,pauseTimers:s,resumeTimers:u,setHovering:f,setFocused:c,viewportRef:d,windowFocusedRef:h,prevFocusElement:y,setPrevFocusElement:b,expanded:E,focused:g}=_g(),p=m.useRef(!1),v=m.useRef(!1),S=l.length,C=((T=l[0])==null?void 0:T.height)??0,w=m.useMemo(()=>l.some(N=>N.transitionStatus==="ending"),[l]);m.useEffect(()=>{if(!d.current)return;function N(q){var B;S!==0&&q.key==="F6"&&q.target!==d.current&&(q.preventDefault(),b(en(Xt(d.current))),(B=d.current)==null||B.focus({preventScroll:!0}),s(),c(!0))}const I=at(d.current);return I.addEventListener("keydown",N),()=>{I.removeEventListener("keydown",N)}},[s,c,b,S,d]),m.useEffect(()=>{if(!d.current||!S)return;const N=at(d.current);function I(B){B.target===N&&(h.current=!1,s())}function q(B){if(B.relatedTarget||B.target===N)return;const $=At(B),ue=en(Xt(d.current));(!Re(d.current,$)||!oc(ue))&&u(),setTimeout(()=>{h.current=!0})}return N.addEventListener("blur",I,!0),N.addEventListener("focus",q,!0),()=>{N.removeEventListener("blur",I,!0),N.removeEventListener("focus",q,!0)}},[s,u,d,h,c,S]),m.useEffect(()=>{const N=d.current;if(!N||S===0)return;const I=Xt(N);function q(B){if(B.pointerType!=="touch")return;const $=At(B);Re(N,$)||(u(),f(!1),c(!1))}return I.addEventListener("pointerdown",q,!0),()=>{I.removeEventListener("pointerdown",q,!0)}},[S,u,c,f,d]);function R(N){var I,q,B;d.current&&(p.current=!0,N.relatedTarget===d.current?(B=(q=(I=l[0])==null?void 0:I.ref)==null?void 0:q.current)==null||B.focus():y==null||y.focus({preventScroll:!0}))}function x(N){N.key==="Tab"&&N.shiftKey&&N.target===d.current&&(N.preventDefault(),y==null||y.focus({preventScroll:!0}),u())}m.useEffect(()=>{!h.current||w||!v.current||(u(),f(!1),v.current=!1)},[w,u,f,h]);function O(){s(),f(!0),v.current=!1}function k(){l.some(N=>N.transitionStatus==="ending")?v.current=!0:(u(),f(!1))}function P(){if(p.current){p.current=!1;return}g||oc(Xt(d.current).activeElement)&&(c(!0),s())}function U(N){!g||Re(d.current,N.relatedTarget)||(c(!1),u())}const A={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:O,onMouseMove:O,onMouseLeave:k,onFocus:P,onBlur:U,onKeyDown:x,onClick:P},L=m.useMemo(()=>({expanded:E}),[E]),M=He("div",t,{ref:[n,d],state:L,props:[A,{style:{[i3.frontmostHeight]:C?`${C}px`:void 0}},a,{children:ee.jsxs(m.Fragment,{children:[S>0&&y&&ee.jsx(qn,{onFocus:R}),i,S>0&&y&&ee.jsx(qn,{onFocus:R})]})}]}),_=m.useMemo(()=>({viewportRef:d}),[d]),D=m.useMemo(()=>l.filter(N=>N.priority==="high"),[l]);return ee.jsxs(o3.Provider,{value:_,children:[S>0&&y&&ee.jsx(qn,{onFocus:R}),M,!g&&D.length>0&&ee.jsx("div",{style:Fm,children:D.map(N=>ee.jsxs("div",{role:"alert","aria-atomic":!0,children:[ee.jsx("div",{children:N.title}),ee.jsx("div",{children:N.description})]},N.id))})]})}),__=m.createContext(void 0);function di(){const e=m.useContext(__);if(!e)throw new Error(et(66));return e}let Bo=function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e}({});const a3={...Pa,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Za=40,l3=10,Yr=.5,s3=1;function $b(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function u3(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const a=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(a){const l=a[1].split(", ").map(parseFloat);l.length===6?(r=l[4],o=l[5],i=Math.sqrt(l[0]*l[0]+l[1]*l[1])):l.length===16&&(r=l[12],o=l[13],i=l[0])}}return{x:r,y:o,scale:i}}const mU=m.forwardRef(function(t,n){var ae;const{toast:r,render:o,className:i,swipeDirection:a=["down","right"],...l}=t,s=((ae=r.positionerProps)==null?void 0:ae.anchor)!==void 0;let u=[];s||(u=Array.isArray(a)?a:[a]);const f=u.length>0,{toasts:c,focused:d,close:h,remove:y,setToasts:b,pauseTimers:E,expanded:g,setHovering:p}=_g(),[v,S]=m.useState(void 0),[C,w]=m.useState(!1),[R,x]=m.useState(!1),[O,k]=m.useState(!1),[P,U]=m.useState({x:0,y:0}),[A,L]=m.useState({x:0,y:0,scale:1}),[M,_]=m.useState(),[D,T]=m.useState(),[N,I]=m.useState(null),q=m.useRef(null),B=m.useRef({x:0,y:0}),$=m.useRef({x:0,y:0,scale:1}),ue=m.useRef(void 0),te=m.useRef(0),ce=m.useRef(!1),oe=m.useRef({x:0,y:0}),J=m.useRef(!1),Se=m.useMemo(()=>c.indexOf(r),[r,c]),Ae=m.useMemo(()=>c.filter(j=>j.transitionStatus!=="ending").indexOf(r),[r,c]),G=m.useMemo(()=>c.slice(0,c.indexOf(r)).reduce((j,Z)=>j+(Z.height||0),0),[c,r]);La({open:r.transitionStatus!=="ending",ref:q,onComplete(){r.transitionStatus==="ending"&&y(r.id)}});const Y=W((j=!1)=>{const Z=q.current;if(!Z)return;const ye=Z.style.height;Z.style.height="auto";const me=Z.offsetHeight;Z.style.height=ye;function be(){b(Te=>Te.map(De=>De.id===r.id?{...De,ref:q,height:me,transitionStatus:void 0}:De))}j?Gt.flushSync(be):be()});ie(Y,[Y]);function ne(j,Z){let ye=j,me=Z;return!u.includes("left")&&!u.includes("right")?ye=j>0?j**Yr:-(Math.abs(j)**Yr):(!u.includes("right")&&j>0&&(ye=j**Yr),!u.includes("left")&&j<0&&(ye=-(Math.abs(j)**Yr))),!u.includes("up")&&!u.includes("down")?me=Z>0?Z**Yr:-(Math.abs(Z)**Yr):(!u.includes("down")&&Z>0&&(me=Z**Yr),!u.includes("up")&&Z<0&&(me=-(Math.abs(Z)**Yr))),{x:ye,y:me}}function Le(j){var me;if(j.button!==0)return;j.pointerType==="touch"&&E();const Z=At(j.nativeEvent);if(!(Z&&Z.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(ce.current=!1,ue.current=void 0,te.current=0,B.current={x:j.clientX,y:j.clientY},oe.current=B.current,q.current){const be=u3(q.current);$.current=be,L(be),U({x:be.x,y:be.y})}p(!0),w(!0),x(!1),I(null),J.current=!0,(me=q.current)==null||me.setPointerCapture(j.pointerId)}}function pe(j){if(!C)return;j.preventDefault(),J.current&&(B.current={x:j.clientX,y:j.clientY},J.current=!1);const{clientY:Z,clientX:ye,movementX:me,movementY:be}=j;(be<0&&Z>oe.current.y||be>0&&Z<oe.current.y)&&(oe.current={x:oe.current.x,y:Z}),(me<0&&ye>oe.current.x||me>0&&ye<oe.current.x)&&(oe.current={x:ye,y:oe.current.y});const Te=ye-B.current.x,De=Z-B.current.y,$t=Z-oe.current.y,un=ye-oe.current.x;if(!R&&Math.sqrt(Te*Te+De*De)>=s3&&(x(!0),N===null)){const ze=u.includes("left")||u.includes("right"),st=u.includes("up")||u.includes("down");if(ze&&st){const Vt=Math.abs(Te),rt=Math.abs(De);I(Vt>rt?"horizontal":"vertical")}}let he;if(!ue.current)N==="vertical"?De>0?he="down":De<0&&(he="up"):N==="horizontal"?Te>0?he="right":Te<0&&(he="left"):Math.abs(Te)>=Math.abs(De)?he=Te>0?"right":"left":he=De>0?"down":"up",he&&u.includes(he)&&(ue.current=he,te.current=$b(he,Te,De),S(he));else{const jt=ue.current,ze=$b(jt,un,$t);ze>Za?(ce.current=!1,S(jt)):!(u.includes("left")&&u.includes("right"))&&!(u.includes("up")&&u.includes("down"))&&te.current-ze>=l3&&(ce.current=!0)}const Pe=ne(Te,De);let lt=$.current.x,Fr=$.current.y;N==="horizontal"?(u.includes("left")||u.includes("right"))&&(lt+=Pe.x):(N==="vertical"||(u.includes("left")||u.includes("right"))&&(lt+=Pe.x),(u.includes("up")||u.includes("down"))&&(Fr+=Pe.y)),U({x:lt,y:Fr})}function Q(j){var Te;if(!C)return;if(w(!1),x(!1),I(null),(Te=q.current)==null||Te.releasePointerCapture(j.pointerId),ce.current){U({x:A.x,y:A.y}),S(void 0);return}let Z=!1;const ye=P.x-A.x,me=P.y-A.y;let be;for(const De of u){switch(De){case"right":ye>Za&&(Z=!0,be="right");break;case"left":ye<-Za&&(Z=!0,be="left");break;case"down":me>Za&&(Z=!0,be="down");break;case"up":me<-Za&&(Z=!0,be="up");break}if(Z)break}Z?(S(be),k(!0),h(r.id)):(U({x:A.x,y:A.y}),S(void 0))}function K(j){if(j.key==="Escape"){if(!q.current||!Re(q.current,en(Xt(q.current))))return;h(r.id)}}m.useEffect(()=>{if(!f)return;const j=q.current;if(!j)return;function Z(ye){Re(j,ye.target)&&ye.preventDefault()}return j.addEventListener("touchmove",Z,{passive:!1}),()=>{j.removeEventListener("touchmove",Z)}},[f]);function re(){if(!C&&P.x===A.x&&P.y===A.y&&!O)return{[Bo.swipeMovementX]:"0px",[Bo.swipeMovementY]:"0px"};const j=P.x-A.x,Z=P.y-A.y;return{transition:C?"none":void 0,transform:C?`translateX(${P.x}px) translateY(${P.y}px) scale(${A.scale})`:void 0,[Bo.swipeMovementX]:`${j}px`,[Bo.swipeMovementY]:`${Z}px`}}const de=r.priority==="high",ge={role:de?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":M,"aria-describedby":D,"aria-hidden":de&&!d?!0:void 0,onPointerDown:f?Le:void 0,onPointerMove:f?pe:void 0,onPointerUp:f?Q:void 0,onKeyDown:K,inert:gs(r.limited),style:{...re(),[Bo.index]:r.transitionStatus==="ending"?Se:Ae,[Bo.offsetY]:`${G}px`,[Bo.height]:r.height?`${r.height}px`:void 0}},le=m.useMemo(()=>({rootRef:q,toast:r,titleId:M,setTitleId:_,descriptionId:D,setDescriptionId:T,swiping:C,swipeDirection:v,recalculateHeight:Y,index:Se,visibleIndex:Ae,expanded:g}),[r,M,D,C,v,Y,Se,Ae,g]),se=m.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:g,limited:r.limited||!1,type:r.type,swiping:le.swiping,swipeDirection:le.swipeDirection}),[g,r.transitionStatus,r.limited,r.type,le.swiping,le.swipeDirection]),X=He("div",t,{ref:[n,le.rootRef],state:se,stateAttributesMapping:a3,props:[ge,l]});return ee.jsx(__.Provider,{value:le,children:X})}),gU=m.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:a,expanded:l,recalculateHeight:s}=di(),u=m.useRef(null);ie(()=>{const h=u.current;if(!h||(s(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const y=new ResizeObserver(()=>s(!0)),b=new MutationObserver(()=>s(!0));return y.observe(h),b.observe(h,{childList:!0,subtree:!0,characterData:!0}),()=>{y.disconnect(),b.disconnect()}},[s]);const f=a>0,c=m.useMemo(()=>({expanded:l,behind:f}),[l,f]);return He("div",t,{ref:[n,u],state:c,props:i})}),yU=m.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...l}=t,{toast:s}=di(),u=a??s.description,f=!!u,c=jr(i),{setDescriptionId:d}=di();ie(()=>{if(f)return d(c),()=>{d(void 0)}},[f,c,d]);const h=m.useMemo(()=>({type:s.type}),[s.type]),y=He("p",t,{ref:n,state:h,props:{...l,id:c,children:u}});return f?y:null}),vU=m.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...l}=t,{toast:s}=di(),u=a??s.title,f=!!u,c=jr(i),{setTitleId:d}=di();ie(()=>{if(f)return d(c),()=>{d(void 0)}},[f,c,d]);const h=m.useMemo(()=>({type:s.type}),[s.type]),y=He("h2",t,{ref:n,state:h,props:{...l,id:c,children:u}});return f?y:null}),bU=m.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:a=!0,...l}=t,{close:s,expanded:u}=_g(),{toast:f}=di(),[c,d]=m.useState(!1),{getButtonProps:h,buttonRef:y}=ys({disabled:i,native:a}),b=m.useMemo(()=>({type:f.type}),[f.type]);return He("button",t,{ref:[n,y],state:b,props:[{"aria-hidden":!u&&!c,onClick(){s(f.id)},onFocus(){d(!0)},onBlur(){d(!1)}},l,h]})}),SU=m.forwardRef(function(t,n){var b;const{render:r,className:o,disabled:i,nativeButton:a=!0,...l}=t,{toast:s}=di(),u=((b=s.actionProps)==null?void 0:b.children)??l.children,f=!!u,{getButtonProps:c,buttonRef:d}=ys({disabled:i,native:a}),h=m.useMemo(()=>({type:s.type}),[s.type]),y=He("button",t,{ref:[n,d],state:h,props:[l,s.actionProps,c,{children:u}]});return f?y:null}),EU=wR;function CU(){const e=m.useContext(wg);if(!e)throw new Error(et(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return m.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}function RU(){const e=[];function t(n){e.forEach(r=>r(n))}return{" subscribe":function(r){return e.push(r),()=>{const o=e.indexOf(r);o!==-1&&e.splice(o,1)}},add(n){const r=n.id||w_("toast"),o={...n,id:r,transitionStatus:"starting"};return t({action:"add",options:o}),r},close(n){t({action:"close",options:{id:n}})},update(n,r){t({action:"update",options:{...r,id:n}})},promise(n,r){let o=n;return t({action:"promise",options:{...r,promise:n,setPromise(i){o=i}}}),o}}}var c3=typeof document<"u",f3=function(){},Ep=c3?m.useLayoutEffect:f3;const d3={...Ac},h3=d3.useInsertionEffect,p3=h3||(e=>e());function m3(e){const t=m.useRef(()=>{});return p3(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const g3={...Ac};let jb=!1,y3=0;const Vb=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+y3++;function v3(){const[e,t]=m.useState(()=>jb?Vb():void 0);return Ep(()=>{e==null&&t(Vb())},[]),m.useEffect(()=>{jb=!0},[]),e}const b3=g3.useId,S3=b3||v3;function E3(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const C3=m.createContext(null),R3=m.createContext(null),w3=()=>{var e;return((e=m.useContext(C3))==null?void 0:e.id)||null},_3=()=>m.useContext(R3);function x3(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=S3(),i=m.useRef({}),[a]=m.useState(()=>E3()),l=w3()!=null,[s,u]=m.useState(r.reference),f=m3((h,y,b)=>{i.current.openEvent=h?y:void 0,a.emit("openchange",{open:h,event:y,reason:b,nested:l}),n==null||n(h,y,b)}),c=m.useMemo(()=>({setPositionReference:u}),[]),d=m.useMemo(()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference}),[s,r.reference,r.floating]);return m.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:d,events:a,floatingId:o,refs:c}),[t,f,d,a,o,c])}function wU(e){e===void 0&&(e={});const{nodeId:t}=e,n=x3({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=m.useState(null),[l,s]=m.useState(null),f=(o==null?void 0:o.domReference)||i,c=m.useRef(null),d=_3();Ep(()=>{f&&(c.current=f)},[f]);const h=cR({...e,elements:{...o,...l&&{reference:l}}}),y=m.useCallback(v=>{const S=Ie(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;s(S),h.refs.setReference(S)},[h.refs]),b=m.useCallback(v=>{(Ie(v)||v===null)&&(c.current=v,a(v)),(Ie(h.refs.reference.current)||h.refs.reference.current===null||v!==null&&!Ie(v))&&h.refs.setReference(v)},[h.refs]),E=m.useMemo(()=>({...h.refs,setReference:b,setPositionReference:y,domReference:c}),[h.refs,b,y]),g=m.useMemo(()=>({...h.elements,domReference:f}),[h.elements,f]),p=m.useMemo(()=>({...h,...r,refs:E,elements:g,nodeId:t}),[h,E,g,t,r]);return Ep(()=>{r.dataRef.current.floatingContext=p;const v=d==null?void 0:d.nodesRef.current.find(S=>S.id===t);v&&(v.context=p)}),m.useMemo(()=>({...h,context:p,refs:E,elements:g}),[h,E,g,p])}export{vU as $,g_ as A,p_ as B,ql as C,iU as D,lU as E,sU as F,uU as G,fU as H,aU as I,dU as J,cU as K,db as L,j3 as M,Nw as N,JD as O,oU as P,pg as Q,i1 as R,W3 as S,P3 as T,QD as U,C2 as V,R2 as W,nU as X,mU as Y,gU as Z,V as _,Ac as a,bU as a0,yU as a1,SU as a2,RU as a3,hU as a4,EU as a5,pU as a6,CU as a7,O3 as a8,k3 as a9,vA as aa,N3 as ab,LA as ac,L3 as ad,fC as ae,OD as af,gc as ag,rP as ah,Ht as ai,up as aj,Sa as ak,gz as al,Ck as am,_k as an,Rk as ao,wU as ap,bk as aq,hk as ar,mk as as,pk as at,rU as au,Gt as b,M3 as c,A3 as d,z3 as e,U3 as f,H_ as g,B3 as h,D3 as i,ee as j,I3 as k,G3 as l,Hl as m,H3 as n,V3 as o,Q3 as p,Z3 as q,m as r,X3 as s,K3 as t,Y3 as u,$3 as v,q3 as w,F3 as x,J3 as y,OL as z};
|