88 lines
552 KiB
JavaScript
88 lines
552 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_namespaceId-BQCnE1dA.js","assets/getPseudoElementBounds-2CMatPTG.js","assets/_databaseId-s-ZBH3Ks.js"])))=>i.map(i=>d[i]);
|
||
var Zx=Object.defineProperty;var Kx=(e,t,n)=>t in e?Zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pe=(e,t,n)=>Kx(e,typeof t!="symbol"?t+"":t,n);function Xx(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const r in a)if(r!=="default"&&!(r in e)){const l=Object.getOwnPropertyDescriptor(a,r);l&&Object.defineProperty(e,r,l.get?l:{enumerable:!0,get:()=>a[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(r){if(r.ep)return;r.ep=!0;const l=n(r);fetch(r.href,l)}})();function Qx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k0={exports:{}},Ju={};/**
|
||
* @license React
|
||
* react-jsx-runtime.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Fx=Symbol.for("react.transitional.element"),Jx=Symbol.for("react.fragment");function D0(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:Fx,type:e,key:a,ref:t!==void 0?t:null,props:n}}Ju.Fragment=Jx;Ju.jsx=D0;Ju.jsxs=D0;k0.exports=Ju;var U=k0.exports;const ed=new WeakMap,Wx=new WeakMap,ru={current:[]};let Vc=!1,Io=0;const ko=new Set,ts=new Map;function L0(e){for(const t of e){if(ru.current.includes(t))continue;ru.current.push(t),t.recompute();const n=Wx.get(t);if(n)for(const a of n){const r=ed.get(a);r!=null&&r.length&&L0(r)}}}function e2(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function t2(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function z0(e){if(Io>0&&!ts.has(e)&&ts.set(e,e.prevState),ko.add(e),!(Io>0)&&!Vc)try{for(Vc=!0;ko.size>0;){const t=Array.from(ko);ko.clear();for(const n of t){const a=ts.get(n)??n.prevState;n.prevState=a,e2(n)}for(const n of t){const a=ed.get(n);a&&(ru.current.push(n),L0(a))}for(const n of t){const a=ed.get(n);if(a)for(const r of a)t2(r)}}}finally{Vc=!1,ru.current=[],ts.clear()}}function n2(e){Io++;try{e()}finally{if(Io--,Io===0){const t=ko.values().next().value;t&&z0(t)}}}function a2(e){return typeof e=="function"}class r2{constructor(t,n){this.listeners=new Set,this.subscribe=a=>{var r,l;this.listeners.add(a);const o=(l=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:l.call(r,a,this);return()=>{this.listeners.delete(a),o==null||o()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,a,r;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):a2(t)?this.state=t(this.prevState):this.state=t,(r=(a=this.options)==null?void 0:a.onUpdate)==null||r.call(a),z0(this)}}const Ia="__TSR_index",Ap="popstate",_p="beforeunload";function l2(e){let t=e.getLocation();const n=new Set,a=o=>{t=e.getLocation(),n.forEach(i=>i({location:t,action:o}))},r=o=>{e.notifyOnIndexChange??!0?a(o):t=e.getLocation()},l=async({task:o,navigateOpts:i,...s})=>{var d,h;if((i==null?void 0:i.ignoreBlocker)??!1){o();return}const c=((d=e.getBlockers)==null?void 0:d.call(e))??[],f=s.type==="PUSH"||s.type==="REPLACE";if(typeof document<"u"&&c.length&&f)for(const p of c){const v=lu(s.path,s.state);if(await p.blockerFn({currentLocation:t,nextLocation:v,action:s.type})){(h=e.onBlocked)==null||h.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,i,s)=>{const u=t.state[Ia];i=Np(u+1,i),l({task:()=>{e.pushState(o,i),a({type:"PUSH"})},navigateOpts:s,type:"PUSH",path:o,state:i})},replace:(o,i,s)=>{const u=t.state[Ia];i=Np(u,i),l({task:()=>{e.replaceState(o,i),a({type:"REPLACE"})},navigateOpts:s,type:"REPLACE",path:o,state:i})},go:(o,i)=>{l({task:()=>{e.go(o),r({type:"GO",index:o})},navigateOpts:i,type:"GO"})},back:o=>{l({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),r({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{l({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),r({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[Ia]!==0,createHref:o=>e.createHref(o),block:o=>{var s;if(!e.setBlockers)return()=>{};const i=((s=e.getBlockers)==null?void 0:s.call(e))??[];return e.setBlockers([...i,o]),()=>{var c,f;const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];(f=e.setBlockers)==null||f.call(e,u.filter(d=>d!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:a}}function Np(e,t){t||(t={});const n=xh();return{...t,key:n,__TSR_key:n,[Ia]:e}}function o2(e){var C,A;const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let r=[];const l=()=>r,o=T=>r=T,i=T=>T,s=()=>lu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!((C=t.history.state)!=null&&C.__TSR_key)&&!((A=t.history.state)!=null&&A.key)){const T=xh();t.history.replaceState({[Ia]:0,key:T,__TSR_key:T},"")}let u=s(),c,f=!1,d=!1,h=!1,p=!1;const v=()=>u;let E,g;const y=()=>{E&&(w._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),w._ignoreSubscribers=!1,E=void 0,g=void 0,c=void 0)},S=(T,k,M)=>{const L=i(k);g||(c=u),u=lu(k,M),E={href:L,state:M,isPush:(E==null?void 0:E.isPush)||T==="push"},g||(g=Promise.resolve().then(()=>y()))},b=T=>{u=s(),w.notify({type:T})},x=async()=>{if(d){d=!1;return}const T=s(),k=T.state[Ia]-u.state[Ia],M=k===1,L=k===-1,z=!M&&!L||f;f=!1;const _=z?"GO":L?"BACK":"FORWARD",N=z?{type:"GO",index:k}:{type:L?"BACK":"FORWARD"};if(h)h=!1;else{const D=l();if(typeof document<"u"&&D.length){for(const O of D)if(await O.blockerFn({currentLocation:u,nextLocation:T,action:_})){d=!0,t.history.go(1),w.notify(N);return}}}u=s(),w.notify(N)},R=T=>{if(p){p=!1;return}let k=!1;const M=l();if(typeof document<"u"&&M.length)for(const L of M){const z=L.enableBeforeUnload??!0;if(z===!0){k=!0;break}if(typeof z=="function"&&z()===!0){k=!0;break}}if(k)return T.preventDefault(),T.returnValue=""},w=l2({getLocation:v,getLength:()=>t.history.length,pushState:(T,k)=>S("push",T,k),replaceState:(T,k)=>S("replace",T,k),back:T=>(T&&(h=!0),p=!0,t.history.back()),forward:T=>{T&&(h=!0),p=!0,t.history.forward()},go:T=>{f=!0,t.history.go(T)},createHref:T=>i(T),flush:y,destroy:()=>{t.history.pushState=n,t.history.replaceState=a,t.removeEventListener(_p,R,{capture:!0}),t.removeEventListener(Ap,x)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:l,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(_p,R,{capture:!0}),t.addEventListener(Ap,x),t.history.pushState=function(...T){const k=n.apply(t.history,T);return w._ignoreSubscribers||b("PUSH"),k},t.history.replaceState=function(...T){const k=a.apply(t.history,T);return w._ignoreSubscribers||b("REPLACE"),k},w}function i2(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function lu(e,t){const n=i2(e),a=n.indexOf("#"),r=n.indexOf("?"),l=xh();return{href:n,pathname:n.substring(0,a>0?r>0?Math.min(a,r):a:r>0?r:n.length),hash:a>-1?n.substring(a):"",search:r>-1?n.slice(r,a===-1?void 0:a):"",state:t||{[Ia]:0,key:l,__TSR_key:l}}}function xh(){return(Math.random()+1).toString(36).substring(7)}const s2=!1;function Po(e){let t;return n2(()=>{t=e()}),t}function ui(e){return e[e.length-1]}function u2(e){return typeof e=="function"}function Da(e,t){return u2(e)?e(t):e}const c2=Object.prototype.hasOwnProperty,kp=Object.prototype.propertyIsEnumerable;function Bt(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=t,r=zp(e)&&zp(a);if(!r&&!(ou(e)&&ou(a)))return a;const l=r?e:Dp(e);if(!l)return a;const o=r?a:Dp(a);if(!o)return a;const i=l.length,s=o.length,u=r?new Array(s):{};let c=0;for(let f=0;f<s;f++){const d=r?f:o[f],h=e[d],p=a[d];if(h===p){u[d]=h,(r?f<i:c2.call(e,d))&&c++;continue}if(h===null||p===null||typeof h!="object"||typeof p!="object"){u[d]=p;continue}const v=Bt(h,p,n+1);u[d]=v,v===h&&c++}return i===s&&c===i?e:u}function Dp(e){const t=Object.getOwnPropertyNames(e);for(const r of t)if(!kp.call(e,r))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const a=t;for(const r of n){if(!kp.call(e,r))return!1;a.push(r)}return a}function ou(e){if(!Lp(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Lp(n)||!n.hasOwnProperty("isPrototypeOf"))}function Lp(e){return Object.prototype.toString.call(e)==="[object Object]"}function zp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Cr(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,r=e.length;a<r;a++)if(!Cr(e[a],t[a],n))return!1;return!0}if(ou(e)&&ou(t)){const a=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const o in t)if((!a||t[o]!==void 0)&&!Cr(e[o],t[o],n))return!1;return!0}let r=0;if(!a)r=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&r++;let l=0;for(const o in t)if((!a||t[o]!==void 0)&&(l++,l>r||!Cr(e[o],t[o],n)))return!1;return r===l}return!1}function _l(e){let t,n;const a=new Promise((r,l)=>{t=r,n=l});return a.status="pending",a.resolve=r=>{a.status="resolved",a.value=r,t(r),e==null||e(r)},a.reject=r=>{a.status="rejected",n(r)},a}function f2(e){return typeof(e==null?void 0:e.message)!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function vl(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function d2(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Up(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return d2(t)}const U0=["http:","https:","mailto:","tel:"];function iu(e){if(!e)return!1;try{const t=new URL(e);return!U0.includes(t.protocol)}catch{return!1}}function yo(e,t){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return e;const n=/%25|%5C/gi;let a=0,r="",l;for(;(l=n.exec(e))!==null;)r+=Up(e.slice(a,l.index))+l[0],a=n.lastIndex;return r=r+Up(a?e.slice(a):e),r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function h2(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var m2="Invariant failed";function fa(e,t){if(!e)throw new Error(m2)}function su(e){const t=new Map;let n,a;const r=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,a&&(a.next=l,l.prev=a)):(l.next.prev=void 0,n=l.next,l.next=void 0,a&&(l.prev=a,a.next=l)),a=l)};return{get(l){const o=t.get(l);if(o)return r(o),o.value},set(l,o){if(t.size>=e&&n){const s=n;t.delete(s.key),s.next&&(n=s.next,s.next.prev=void 0),s===a&&(a=void 0)}const i=t.get(l);if(i)i.value=o,r(i);else{const s={key:l,value:o,prev:a};a&&(a.next=s),a=s,n||(n=s),t.set(l,s)}},clear(){t.clear(),n=void 0,a=void 0}}}const Nl=0,Dr=1,Lr=2,ci=3,wr=4,j0=5;function p2(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function wh(e,t,n=new Uint16Array(6)){const a=e.indexOf("/",t),r=a===-1?e.length:a,l=e.substring(t,r);if(!l||!l.includes("$"))return n[0]=Nl,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n;if(l==="$"){const i=e.length;return n[0]=Lr,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}if(l.charCodeAt(0)===36)return n[0]=Dr,n[1]=t,n[2]=t+1,n[3]=r,n[4]=r,n[5]=r,n;const o=p2(l);if(o){const[i,s]=o,u=l.charCodeAt(i+1);if(u===45){if(i+2<l.length&&l.charCodeAt(i+2)===36){const c=i+3,f=s;if(c<f)return n[0]=ci,n[1]=t+i,n[2]=t+c,n[3]=t+f,n[4]=t+s+1,n[5]=r,n}}else if(u===36){const c=i+1,f=i+2;return f===s?(n[0]=Lr,n[1]=t+i,n[2]=t+c,n[3]=t+f,n[4]=t+s+1,n[5]=e.length,n):(n[0]=Dr,n[1]=t+i,n[2]=t+f,n[3]=t+s,n[4]=t+s+1,n[5]=r,n)}}return n[0]=Nl,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}function Wu(e,t,n,a,r,l,o){var s,u,c,f,d,h,p,v,E,g,y,S,b;o==null||o(n);let i=a;{const x=n.fullPath??n.from,R=x.length,w=((s=n.options)==null?void 0:s.caseSensitive)??e,C=!!((c=(u=n.options)==null?void 0:u.params)!=null&&c.parse&&((d=(f=n.options)==null?void 0:f.skipRouteOnParseError)!=null&&d.params));for(;i<R;){const T=wh(x,i,t);let k;const M=i,L=T[5];switch(i=L+1,l++,T[0]){case Nl:{const _=x.substring(T[2],T[3]);if(w){const N=(h=r.static)==null?void 0:h.get(_);if(N)k=N;else{r.static??(r.static=new Map);const D=Rr(n.fullPath??n.from);D.parent=r,D.depth=l,k=D,r.static.set(_,D)}}else{const N=_.toLowerCase(),D=(p=r.staticInsensitive)==null?void 0:p.get(N);if(D)k=D;else{r.staticInsensitive??(r.staticInsensitive=new Map);const O=Rr(n.fullPath??n.from);O.parent=r,O.depth=l,k=O,r.staticInsensitive.set(N,O)}}break}case Dr:{const _=x.substring(M,T[1]),N=x.substring(T[4],L),D=w&&!!(_||N),O=_?D?_:_.toLowerCase():void 0,H=N?D?N:N.toLowerCase():void 0,j=!C&&((v=r.dynamic)==null?void 0:v.find(Z=>!Z.skipOnParamError&&Z.caseSensitive===D&&Z.prefix===O&&Z.suffix===H));if(j)k=j;else{const Z=Pc(Dr,n.fullPath??n.from,D,O,H);k=Z,Z.depth=l,Z.parent=r,r.dynamic??(r.dynamic=[]),r.dynamic.push(Z)}break}case ci:{const _=x.substring(M,T[1]),N=x.substring(T[4],L),D=w&&!!(_||N),O=_?D?_:_.toLowerCase():void 0,H=N?D?N:N.toLowerCase():void 0,j=!C&&((E=r.optional)==null?void 0:E.find(Z=>!Z.skipOnParamError&&Z.caseSensitive===D&&Z.prefix===O&&Z.suffix===H));if(j)k=j;else{const Z=Pc(ci,n.fullPath??n.from,D,O,H);k=Z,Z.parent=r,Z.depth=l,r.optional??(r.optional=[]),r.optional.push(Z)}break}case Lr:{const _=x.substring(M,T[1]),N=x.substring(T[4],L),D=w&&!!(_||N),O=_?D?_:_.toLowerCase():void 0,H=N?D?N:N.toLowerCase():void 0,j=Pc(Lr,n.fullPath??n.from,D,O,H);k=j,j.parent=r,j.depth=l,r.wildcard??(r.wildcard=[]),r.wildcard.push(j)}}r=k}if(C&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const T=Rr(n.fullPath??n.from);T.kind=j0,T.parent=r,l++,T.depth=l,r.pathless??(r.pathless=[]),r.pathless.push(T),r=T}const A=(n.path||!n.children)&&!n.isRoot;if(A&&x.endsWith("/")){const T=Rr(n.fullPath??n.from);T.kind=wr,T.parent=r,l++,T.depth=l,r.index=T,r=T}r.parse=((y=(g=n.options)==null?void 0:g.params)==null?void 0:y.parse)??null,r.skipOnParamError=C,r.parsingPriority=((b=(S=n.options)==null?void 0:S.skipRouteOnParseError)==null?void 0:b.priority)??0,A&&!r.route&&(r.route=n,r.fullPath=n.fullPath??n.from)}if(n.children)for(const x of n.children)Wu(e,t,x,i,r,l,o)}function Ic(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ta(e){var t,n,a;if(e.pathless)for(const r of e.pathless)Ta(r);if(e.static)for(const r of e.static.values())Ta(r);if(e.staticInsensitive)for(const r of e.staticInsensitive.values())Ta(r);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Ic);for(const r of e.dynamic)Ta(r)}if((n=e.optional)!=null&&n.length){e.optional.sort(Ic);for(const r of e.optional)Ta(r)}if((a=e.wildcard)!=null&&a.length){e.wildcard.sort(Ic);for(const r of e.wildcard)Ta(r)}}function Rr(e){return{kind:Nl,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Pc(e,t,n,a,r){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:a,suffix:r}}function g2(e,t){const n=Rr("/"),a=new Uint16Array(6);for(const r of e)Wu(!1,a,r,1,n,0);Ta(n),t.masksTree=n,t.flatCache=su(1e3)}function y2(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const a=Rh(e,t.masksTree);return t.flatCache.set(e,a),a}function v2(e,t,n,a,r){e||(e="/"),a||(a="/");const l=t?`case\0${e}`:e;let o=r.singleCache.get(l);if(!o){o=Rr("/");const i=new Uint16Array(6);Wu(t,i,{from:e},1,o,0),r.singleCache.set(l,o)}return Rh(a,o,n)}function b2(e,t,n=!1){const a=n?e:`nofuzz\0${e}`,r=t.matchCache.get(a);if(r!==void 0)return r;e||(e="/");let l;try{l=Rh(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)l=null;else throw o}return l&&(l.branch=x2(l.route)),t.matchCache.set(a,l),l}function S2(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function E2(e,t=!1,n){const a=Rr(e.fullPath),r=new Uint16Array(6),l={},o={};let i=0;return Wu(t,r,e,1,a,0,u=>{if(n==null||n(u,i),fa(!(u.id in l),`Duplicate routes found with id: ${String(u.id)}`),l[u.id]=u,i!==0&&u.path){const c=S2(u.fullPath);(!o[c]||u.fullPath.endsWith("/"))&&(o[c]=u)}i++}),Ta(a),{processedTree:{segmentTree:a,singleCache:su(1e3),matchCache:su(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:o}}function Rh(e,t,n=!1){const a=e.split("/"),r=R2(e,a,t,n);if(!r)return null;const[l]=H0(e,a,r);return{route:r.node.route,rawParams:l,parsedParams:r.parsedParams}}function H0(e,t,n){var c,f,d,h,p,v,E,g,y,S;const a=w2(n.node);let r=null;const l={};let o=((c=n.extract)==null?void 0:c.part)??0,i=((f=n.extract)==null?void 0:f.node)??0,s=((d=n.extract)==null?void 0:d.path)??0,u=((h=n.extract)==null?void 0:h.segment)??0;for(;i<a.length;o++,i++,s++,u++){const b=a[i];if(b.kind===wr)break;if(b.kind===j0){u--,o--,s--;continue}const x=t[o],R=s;if(x&&(s+=x.length),b.kind===Dr){r??(r=n.node.fullPath.split("/"));const w=r[u],C=((p=b.prefix)==null?void 0:p.length)??0;if(w.charCodeAt(C)===123){const T=((v=b.suffix)==null?void 0:v.length)??0,k=w.substring(C+2,w.length-T-1),M=x.substring(C,x.length-T);l[k]=decodeURIComponent(M)}else{const T=w.substring(1);l[T]=decodeURIComponent(x)}}else if(b.kind===ci){if(n.skipped&1<<i){o--,s=R-1;continue}r??(r=n.node.fullPath.split("/"));const w=r[u],C=((E=b.prefix)==null?void 0:E.length)??0,A=((g=b.suffix)==null?void 0:g.length)??0,T=w.substring(C+3,w.length-A-1),k=b.suffix||b.prefix?x.substring(C,x.length-A):x;k&&(l[T]=decodeURIComponent(k))}else if(b.kind===Lr){const w=b,C=e.substring(R+(((y=w.prefix)==null?void 0:y.length)??0),e.length-(((S=w.suffix)==null?void 0:S.length)??0)),A=decodeURIComponent(C);l["*"]=A,l._splat=A;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:o,node:i,path:s,segment:u}]}function x2(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function w2(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function R2(e,t,n,a){if(e==="/"&&n.index)return{node:n.index,skipped:0};const r=!ui(t),l=r&&e!=="/",o=t.length-(r?1:0),i=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let s=null,u=null,c=null;for(;i.length;){const f=i.pop(),{node:d,index:h,skipped:p,depth:v,statics:E,dynamics:g,optionals:y}=f;let{extract:S,rawParams:b,parsedParams:x}=f;if(d.skipOnParamError){if(!qc(e,t,f))continue;b=f.rawParams,S=f.extract,x=f.parsedParams}a&&d.route&&d.kind!==wr&&vo(u,f)&&(u=f);const R=h===o;if(R&&(d.route&&!l&&vo(c,f)&&(c=f),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const w=R?void 0:t[h];let C;if(R&&d.index){const A={node:d.index,index:h,skipped:p,depth:v+1,statics:E,dynamics:g,optionals:y,extract:S,rawParams:b,parsedParams:x};let T=!0;if(d.index.skipOnParamError&&(qc(e,t,A)||(T=!1)),T){if(E===o&&!g&&!y&&!p)return A;vo(c,A)&&(c=A)}}if(d.wildcard&&vo(s,f))for(const A of d.wildcard){const{prefix:T,suffix:k}=A;if(T&&(R||!(A.caseSensitive?w:C??(C=w.toLowerCase())).startsWith(T)))continue;if(k){if(R)continue;const L=t.slice(h).join("/").slice(-k.length);if((A.caseSensitive?L:L.toLowerCase())!==k)continue}const M={node:A,index:o,skipped:p,depth:v,statics:E,dynamics:g,optionals:y,extract:S,rawParams:b,parsedParams:x};if(!(A.skipOnParamError&&!qc(e,t,M))){s=M;break}}if(d.optional){const A=p|1<<v,T=v+1;for(let k=d.optional.length-1;k>=0;k--){const M=d.optional[k];i.push({node:M,index:h,skipped:A,depth:T,statics:E,dynamics:g,optionals:y,extract:S,rawParams:b,parsedParams:x})}if(!R)for(let k=d.optional.length-1;k>=0;k--){const M=d.optional[k],{prefix:L,suffix:z}=M;if(L||z){const _=M.caseSensitive?w:C??(C=w.toLowerCase());if(L&&!_.startsWith(L)||z&&!_.endsWith(z))continue}i.push({node:M,index:h+1,skipped:p,depth:T,statics:E,dynamics:g,optionals:y+1,extract:S,rawParams:b,parsedParams:x})}}if(!R&&d.dynamic&&w)for(let A=d.dynamic.length-1;A>=0;A--){const T=d.dynamic[A],{prefix:k,suffix:M}=T;if(k||M){const L=T.caseSensitive?w:C??(C=w.toLowerCase());if(k&&!L.startsWith(k)||M&&!L.endsWith(M))continue}i.push({node:T,index:h+1,skipped:p,depth:v+1,statics:E,dynamics:g+1,optionals:y,extract:S,rawParams:b,parsedParams:x})}if(!R&&d.staticInsensitive){const A=d.staticInsensitive.get(C??(C=w.toLowerCase()));A&&i.push({node:A,index:h+1,skipped:p,depth:v+1,statics:E+1,dynamics:g,optionals:y,extract:S,rawParams:b,parsedParams:x})}if(!R&&d.static){const A=d.static.get(w);A&&i.push({node:A,index:h+1,skipped:p,depth:v+1,statics:E+1,dynamics:g,optionals:y,extract:S,rawParams:b,parsedParams:x})}if(d.pathless){const A=v+1;for(let T=d.pathless.length-1;T>=0;T--){const k=d.pathless[T];i.push({node:k,index:h,skipped:p,depth:A,statics:E,dynamics:g,optionals:y,extract:S,rawParams:b,parsedParams:x})}}}if(c&&s)return vo(s,c)?c:s;if(c)return c;if(s)return s;if(a&&u){let f=u.index;for(let h=0;h<u.index;h++)f+=t[h].length;const d=f===e.length?"/":e.slice(f);return u.rawParams??(u.rawParams={}),u.rawParams["**"]=decodeURIComponent(d),u}return null}function qc(e,t,n){try{const[a,r]=H0(e,t,n);n.rawParams=a,n.extract=r;const l=n.node.parse(a);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function vo(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===wr)>(e.node.kind===wr)||t.node.kind===wr==(e.node.kind===wr)&&t.depth>e.depth))):!0}function Ds(e){return Ch(e.filter(t=>t!==void 0).join("/"))}function Ch(e){return e.replace(/\/{2,}/g,"/")}function B0(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ra(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function V0(e){return ra(B0(e))}function uu(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function C2(e,t,n){return uu(e,n)===uu(t,n)}function T2({base:e,to:t,trailingSlash:n="never",cache:a}){const r=t.startsWith("/"),l=!r&&t===".";let o;if(a){o=r?t:l?e:e+"\0"+t;const f=a.get(o);if(f)return f}let i;if(l)i=e.split("/");else if(r)i=t.split("/");else{for(i=e.split("/");i.length>1&&ui(i)==="";)i.pop();const f=t.split("/");for(let d=0,h=f.length;d<h;d++){const p=f[d];p===""?d?d===h-1&&i.push(p):i=[p]:p===".."?i.pop():p==="."||i.push(p)}}i.length>1&&(ui(i)===""?n==="never"&&i.pop():n==="always"&&i.push(""));let s,u="";for(let f=0;f<i.length;f++){f>0&&(u+="/");const d=i[f];if(!d)continue;s=wh(d,0,s);const h=s[0];if(h===Nl){u+=d;continue}const p=s[5],v=d.substring(0,s[1]),E=d.substring(s[4],p),g=d.substring(s[2],s[3]);h===Dr?u+=v||E?`${v}{$${g}}${E}`:`$${g}`:h===Lr?u+=v||E?`${v}{$}${E}`:"$":u+=`${v}{-$${g}}${E}`}u=Ch(u);const c=u||"/";return o&&a&&a.set(o,c),c}function M2(e){const t=new Map(e.map(r=>[encodeURIComponent(r),r])),n=Array.from(t.keys()).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(n,"g");return r=>r.replace(a,l=>t.get(l)??l)}function $c(e,t,n){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(r=>jp(r,n)).join("/"):jp(a,n)}function Yc({path:e,params:t,decoder:n,...a}){let r=!1;const l={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:r};const o=e.length;let i=0,s,u="";for(;i<o;){const f=i;s=wh(e,f,s);const d=s[5];if(i=d+1,f===d)continue;const h=s[0];if(h===Nl){u+="/"+e.substring(f,d);continue}if(h===Lr){const p=t._splat;l._splat=p,l["*"]=p;const v=e.substring(f,s[1]),E=e.substring(s[4],d);if(!p){r=!0,(v||E)&&(u+="/"+v+E);continue}const g=$c("_splat",t,n);u+="/"+v+g+E;continue}if(h===Dr){const p=e.substring(s[2],s[3]);!r&&!(p in t)&&(r=!0),l[p]=t[p];const v=e.substring(f,s[1]),E=e.substring(s[4],d),g=$c(p,t,n)??"undefined";u+="/"+v+g+E;continue}if(h===ci){const p=e.substring(s[2],s[3]),v=t[p];if(v==null)continue;l[p]=v;const E=e.substring(f,s[1]),g=e.substring(s[4],d),y=$c(p,t,n)??"";u+="/"+E+y+g;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:l,interpolatedPath:u||"/",isMissingParams:r}}function jp(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function an(e){return!!(e!=null&&e.isNotFound)}function O2(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const td="tsr-scroll-restoration-v1_3",A2=(e,t)=>{let n;return(...a)=>{n||(n=setTimeout(()=>{e(...a),n=null},t))}};function _2(){const e=O2();if(!e)return null;const t=e.getItem(td);let n=t?JSON.parse(t):{};return{state:n,set:a=>{n=Da(a,n)||n;try{e.setItem(td,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const ns=_2(),N2=e=>e.state.__TSR_key||e.href;function k2(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let cu=!1;function D2({storageKey:e,key:t,behavior:n,shouldScrollRestoration:a,scrollToTopSelectors:r,location:l}){var u,c;let o;try{o=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const i=t||((u=window.history.state)==null?void 0:u.__TSR_key),s=o[i];cu=!0;e:{if(a&&s&&Object.keys(s).length>0){for(const h in s){const p=s[h];if(h==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(h){const v=document.querySelector(h);v&&(v.scrollLeft=p.scrollX,v.scrollTop=p.scrollY)}}break e}const f=(l??window.location).hash.split("#",2)[1];if(f){const h=((c=window.history.state)==null?void 0:c.__hashScrollIntoViewOptions)??!0;if(h){const p=document.getElementById(f);p&&p.scrollIntoView(h)}break e}const d={top:0,left:0,behavior:n};if(window.scrollTo(d),r)for(const h of r){if(h==="window")continue;const p=typeof h=="function"?h():document.querySelector(h);p&&p.scrollTo(d)}}cu=!1}function L2(e,t){if(!ns||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!ns))return;e.isScrollRestorationSetup=!0,cu=!1;const a=e.options.getScrollRestorationKey||N2;window.history.scrollRestoration="manual";const r=l=>{if(cu||!e.isScrollRestoring)return;let o="";if(l.target===document||l.target===window)o="window";else{const s=l.target.getAttribute("data-scroll-restoration-id");s?o=`[data-scroll-restoration-id="${s}"]`:o=k2(l.target)}const i=a(e.state.location);ns.set(s=>{const u=s[i]||(s[i]={}),c=u[o]||(u[o]={});if(o==="window")c.scrollX=window.scrollX||0,c.scrollY=window.scrollY||0;else if(o){const f=document.querySelector(o);f&&(c.scrollX=f.scrollLeft||0,c.scrollY=f.scrollTop||0)}return s})};typeof document<"u"&&document.addEventListener("scroll",A2(r,100),!0),e.subscribe("onRendered",l=>{const o=a(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(D2({storageKey:td,key:o,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ns.set(i=>(i[o]||(i[o]={}),i)))})}function z2(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function U2(e,t=String){const n=new URLSearchParams;for(const a in e){const r=e[a];r!==void 0&&n.set(a,t(r))}return n.toString()}function Gc(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function j2(e){const t=new URLSearchParams(e),n={};for(const[a,r]of t.entries()){const l=n[a];l==null?n[a]=Gc(r):Array.isArray(l)?l.push(Gc(r)):n[a]=[l,Gc(r)]}return n}const H2=V2(JSON.parse),B2=I2(JSON.stringify,JSON.parse);function V2(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=j2(t);for(const a in n){const r=n[a];if(typeof r=="string")try{n[a]=e(r)}catch{}}return n}}function I2(e,t){const n=typeof t=="function";function a(r){if(typeof r=="object"&&r!==null)try{return e(r)}catch{}else if(n&&typeof r=="string")try{return t(r),e(r)}catch{}return r}return r=>{const l=U2(r,a);return l?`?${l}`:""}}const mn="__root__";function P2(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&typeof e.href=="string"&&iu(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${U0.join(", ")} protocols are allowed.`);if(!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function En(e){return e instanceof Response&&!!e.options}const Ls=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},ec=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),bl=(e,t,n=!0)=>{const a={...e.router.options.context??{}},r=n?t:t-1;for(let l=0;l<=r;l++){const o=e.matches[l];if(!o)continue;const i=e.router.getMatch(o.id);i&&Object.assign(a,i.__routeContext,i.__beforeLoadContext)}return a},I0=(e,t)=>{var r;const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&((r=e.router.options)!=null&&r.defaultNotFoundComponent)&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),fa(n.options.notFoundComponent);const a=e.matches.find(l=>l.routeId===n.id);fa(a,"Could not find match for route: "+n.id),e.updateMatch(a.id,l=>({...l,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,I0(e,t))},La=(e,t,n)=>{var a,r,l;if(!(!En(n)&&!an(n))){if(En(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){(a=t._nonReactive.beforeLoadPromise)==null||a.resolve(),(r=t._nonReactive.loaderPromise)==null||r.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const o=En(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:o,context:bl(e,t.index),isFetching:!1,error:n})),an(n)&&!n.routeId&&(n.routeId=t.routeId),(l=t._nonReactive.loadPromise)==null||l.resolve()}throw En(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(I0(e,n),n)}},P0=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,bo=(e,t,n,a)=>{var i,s;const{id:r,routeId:l}=e.matches[t],o=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),La(e,e.router.getMatch(r),n);try{(s=(i=o.options).onError)==null||s.call(i,n)}catch(u){n=u,La(e,e.router.getMatch(r),n)}e.updateMatch(r,u=>{var c,f;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(f=u._nonReactive.loadPromise)==null||f.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},q0=(e,t,n,a)=>{var o;if(a._nonReactive.pendingTimeout!==void 0)return;const r=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!ec(e,t)&&(n.options.loader||n.options.beforeLoad||G0(n))&&typeof r=="number"&&r!==1/0&&(n.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent)))){const i=setTimeout(()=>{Ls(e)},r);a._nonReactive.pendingTimeout=i}},q2=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;q0(e,t,n,a);const r=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&La(e,l,l.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(r):r()},$2=(e,t,n,a)=>{const r=e.router.getMatch(t),l=r._nonReactive.loadPromise;r._nonReactive.loadPromise=_l(()=>{l==null||l.resolve()});const{paramsError:o,searchError:i}=r;o&&bo(e,n,o,"PARSE_PARAMS"),i&&bo(e,n,i,"VALIDATE_SEARCH"),q0(e,t,a,r);const s=new AbortController;let u=!1;const c=()=>{u||(u=!0,e.updateMatch(t,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:s})))},f=()=>{var b;(b=r._nonReactive.beforeLoadPromise)==null||b.resolve(),r._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,x=>({...x,isFetching:!1}))};if(!a.options.beforeLoad){Po(()=>{c(),f()});return}r._nonReactive.beforeLoadPromise=_l();const d={...bl(e,n,!1),...r.__routeContext},{search:h,params:p,cause:v}=r,E=ec(e,t),g={search:h,abortController:s,params:p,preload:E,context:d,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":v,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},y=b=>{if(b===void 0){Po(()=>{c(),f()});return}(En(b)||an(b))&&(c(),bo(e,n,b,"BEFORE_LOAD")),Po(()=>{c(),e.updateMatch(t,x=>({...x,__beforeLoadContext:b})),f()})};let S;try{if(S=a.options.beforeLoad(g),vl(S))return c(),S.catch(b=>{bo(e,n,b,"BEFORE_LOAD")}).then(y)}catch(b){c(),bo(e,n,b,"BEFORE_LOAD")}y(S)},Y2=(e,t)=>{const{id:n,routeId:a}=e.matches[t],r=e.router.looseRoutesById[a],l=()=>i(),o=()=>$2(e,n,t,r),i=()=>{if(P0(e,n))return;const s=q2(e,n,r);return vl(s)?s.then(o):o()};return l()},G2=(e,t,n)=>{var l,o,i,s,u,c;const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const r={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([(o=(l=n.options).head)==null?void 0:o.call(l,r),(s=(i=n.options).scripts)==null?void 0:s.call(i,r),(c=(u=n.options).headers)==null?void 0:c.call(u,r)]).then(([f,d,h])=>{const p=f==null?void 0:f.meta,v=f==null?void 0:f.links,E=f==null?void 0:f.scripts,g=f==null?void 0:f.styles;return{meta:p,links:v,headScripts:E,headers:h,scripts:d,styles:g}})},$0=(e,t,n,a)=>{const r=e.matchPromises[n-1],{params:l,loaderDeps:o,abortController:i,cause:s}=e.router.getMatch(t),u=bl(e,n),c=ec(e,t);return{params:l,deps:o,preload:!!c,parentMatchPromise:r,abortController:i,context:u,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:c?"preload":s,route:a,...e.router.options.additionalContext}},Hp=async(e,t,n,a)=>{var r,l,o,i,s,u;try{const c=e.router.getMatch(t);try{(!(s2??e.router.isServer)||c.ssr===!0)&&Y0(a);const f=(l=(r=a.options).loader)==null?void 0:l.call(r,$0(e,t,n,a)),d=a.options.loader&&vl(f);if(!!(d||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(t,v=>({...v,isFetching:"loader"})),a.options.loader){const v=d?await f:f;La(e,e.router.getMatch(t),v),v!==void 0&&e.updateMatch(t,E=>({...E,loaderData:v}))}a._lazyPromise&&await a._lazyPromise;const p=c._nonReactive.minPendingPromise;p&&await p,a._componentsPromise&&await a._componentsPromise,e.updateMatch(t,v=>({...v,error:void 0,context:bl(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(f){let d=f;if((d==null?void 0:d.name)==="AbortError"){e.updateMatch(t,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:bl(e,n)}));return}const h=c._nonReactive.minPendingPromise;h&&await h,an(f)&&await((i=(o=a.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:i.call(o)),La(e,e.router.getMatch(t),f);try{(u=(s=a.options).onError)==null||u.call(s,f)}catch(p){d=p,La(e,e.router.getMatch(t),p)}e.updateMatch(t,p=>({...p,error:d,context:bl(e,n),status:"error",isFetching:!1}))}}catch(c){const f=e.router.getMatch(t);f&&(f._nonReactive.loaderPromise=void 0),La(e,f,c)}},Z2=async(e,t)=>{var u,c;const{id:n,routeId:a}=e.matches[t];let r=!1,l=!1;const o=e.router.looseRoutesById[a];if(!P0(e,n)){const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const d=e.router.getMatch(n),h=d._nonReactive.error||d.error;h&&La(e,d,h)}else{const d=Date.now()-f.updatedAt,h=ec(e,n),p=h?o.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:o.options.staleTime??e.router.options.defaultStaleTime??0,v=o.options.shouldReload,E=typeof v=="function"?v($0(e,n,t,o)):v,g=!!h&&!e.router.state.matches.some(x=>x.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=_l(),g!==y.preload&&e.updateMatch(n,x=>({...x,preload:g}));const{status:S,invalid:b}=y;r=S==="success"&&(b||(E??d>p)),h&&o.options.preload===!1||(r&&!e.sync?(l=!0,(async()=>{var x,R;try{await Hp(e,n,t,o);const w=e.router.getMatch(n);(x=w._nonReactive.loaderPromise)==null||x.resolve(),(R=w._nonReactive.loadPromise)==null||R.resolve(),w._nonReactive.loaderPromise=void 0}catch(w){En(w)&&await e.router.navigate(w.options)}})()):(S!=="success"||r&&e.sync)&&await Hp(e,n,t,o))}}const i=e.router.getMatch(n);l||((u=i._nonReactive.loaderPromise)==null||u.resolve(),(c=i._nonReactive.loadPromise)==null||c.resolve()),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0,l||(i._nonReactive.loaderPromise=void 0),i._nonReactive.dehydrated=void 0;const s=l?i.isFetching:!1;return s!==i.isFetching||i.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:s,invalid:!1})),e.router.getMatch(n)):i};async function Bp(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&Ls(t);try{for(let i=0;i<t.matches.length;i++){const s=Y2(t,i);vl(s)&&await s}const n=t.firstBadMatchIndex??t.matches.length;for(let i=0;i<n;i++)t.matchPromises.push(Z2(t,i));const r=(await Promise.allSettled(t.matchPromises)).filter(i=>i.status==="rejected").map(i=>i.reason);let l;for(const i of r){if(En(i))throw i;!l&&an(i)&&(l=i)}for(const i of t.matches){const{id:s,routeId:u}=i,c=t.router.looseRoutesById[u];try{const f=G2(t,s,c);if(f){const d=await f;t.updateMatch(s,h=>({...h,...d}))}}catch(f){console.error(`Error executing head for route ${u}:`,f)}}if(l)throw l;const o=Ls(t);vl(o)&&await o}catch(n){if(an(n)&&!t.preload){const a=Ls(t);throw vl(a)&&await a,n}if(En(n))throw n}return t.matches}async function Y0(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...a}=t.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{var a;const n=[];for(const r of Z0){const l=(a=e.options[r])==null?void 0:a.preload;l&&n.push(l())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function G0(e){var t;for(const n of Z0)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Z0=["component","errorComponent","pendingComponent","notFoundComponent"];function K2(e){return{input:({url:t})=>{for(const n of e)t=nd(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=K0(e[n],t);return t}}}function X2(e){const t=V0(e.basepath),n=`/${t}`,a=`${n}/`,r=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?a:a.toLowerCase();return{input:({url:o})=>{const i=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return i===r?o.pathname="/":i.startsWith(l)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=Ds(["/",t,o.pathname]),o)}}function nd(e,t){var a;const n=(a=e==null?void 0:e.input)==null?void 0:a.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function K0(e,t){var a;const n=(a=e==null?void 0:e.output)==null?void 0:a.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Tr(e){const t=e.resolvedLocation,n=e.location,a=(t==null?void 0:t.pathname)!==n.pathname,r=(t==null?void 0:t.href)!==n.href,l=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:a,hrefChanged:r,hashChanged:l}}class Q2{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var d;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const a=this.options,r=this.basepath??(a==null?void 0:a.basepath)??"/",l=this.basepath===void 0,o=a==null?void 0:a.rewrite;if(this.options={...a,...n},this.isServer=this.options.isServer??typeof document>"u",this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=M2(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=o2()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let h;this.resolvePathCache=su(1e3),h=this.buildRouteTree(),this.setRoutes(h)}!this.__store&&this.latestLocation&&(this.__store=new r2(J2(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(h=>!["redirected"].includes(h.status))}}}),L2(this));let i=!1;const s=this.options.basepath??"/",u=this.options.rewrite;if(l||r!==s||o!==u){this.basepath=s;const h=[],p=V0(s);p&&p!=="/"&&h.push(X2({basepath:s})),u&&h.push(u),this.rewrite=h.length===0?void 0:h.length===1?h[0]:K2(h),this.history&&this.updateLatestLocation(),i=!0}i&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof((d=window.CSS)==null?void 0:d.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=E2(this.routeTree,this.options.caseSensitive,(a,r)=>{a.init({originalIndex:r})});return this.options.routeMasks&&g2(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,a)=>{const r={eventType:n,fn:a};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const r=({pathname:s,search:u,hash:c,href:f,state:d})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(s)){const y=this.options.parseSearch(u),S=this.options.stringifySearch(y);return{href:s+S+c,publicHref:f,pathname:yo(s),external:!1,searchStr:S,search:Bt(a==null?void 0:a.search,y),hash:yo(c.slice(1)),state:Bt(a==null?void 0:a.state,d)}}const h=new URL(f,this.origin),p=nd(this.rewrite,h),v=this.options.parseSearch(p.search),E=this.options.stringifySearch(v);return p.search=E,{href:p.href.replace(p.origin,""),publicHref:f,pathname:yo(p.pathname),external:!!this.rewrite&&p.origin!==this.origin,searchStr:E,search:Bt(a==null?void 0:a.search,v),hash:yo(p.hash.slice(1)),state:Bt(a==null?void 0:a.state,d)}},l=r(n),{__tempLocation:o,__tempKey:i}=l.state;if(o&&(!i||i===this.tempLocationKey)){const s=r(o);return s.state.key=l.state.key,s.state.__TSR_key=l.state.__TSR_key,delete s.state.__tempLocation,{...s,maskedLocation:l}}return l},this.resolvePathWithBase=(n,a)=>T2({base:n,to:Ch(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,a,r)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},r):this.matchRoutesInternal(n,a),this.getMatchedRoutes=n=>W2({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),a=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...a]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const a=(l={})=>{var L,z;const o=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,i=this.matchRoutesLightweight(o);l.from;const s=l.unsafeRelative==="path"?o.pathname:l.from??i.fullPath,u=this.resolvePathWithBase(s,"."),c=i.search,f={...i.params},d=l.to?this.resolvePathWithBase(u,`${l.to}`):this.resolvePathWithBase(u,"."),h=l.params===!1||l.params===null?{}:(l.params??!0)===!0?f:Object.assign(f,Da(l.params,f)),p=Yc({path:d,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath,v=this.getMatchedRoutes(p);let E=v.matchedRoutes;(v.foundRoute?v.foundRoute.path!=="/"&&v.routeParams["**"]:ra(p))&&this.options.notFoundRoute&&(E=[...E,this.options.notFoundRoute]);let y=!1;if(Object.keys(h).length>0)for(const _ of E){const N=((L=_.options.params)==null?void 0:L.stringify)??_.options.stringifyParams;N&&(y=!0,Object.assign(h,N(h)))}const S=n.leaveParams?d:yo(y?Yc({path:d,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath:p);let b=c;if(n._includeValidateSearch&&((z=this.options.search)!=null&&z.strict)){const _={};E.forEach(N=>{if(N.options.validateSearch)try{Object.assign(_,zs(N.options.validateSearch,{..._,...b}))}catch{}}),b=_}b=ew({search:b,dest:l,destRoutes:E,_includeValidateSearch:n._includeValidateSearch}),b=Bt(c,b);const x=this.options.stringifySearch(b),R=l.hash===!0?o.hash:l.hash?Da(l.hash,o.hash):void 0,w=R?`#${R}`:"";let C=l.state===!0?o.state:l.state?Da(l.state,o.state):{};C=Bt(o.state,C);const A=`${S}${x}${w}`;let T,k,M=!1;if(this.rewrite){const _=new URL(A,this.origin),N=K0(this.rewrite,_);T=_.href.replace(_.origin,""),N.origin!==this.origin?(k=N.href,M=!0):k=N.pathname+N.search+N.hash}else T=h2(A),k=T;return{publicHref:k,href:T,pathname:S,search:b,searchStr:x,state:C,hash:R??"",external:M,unmaskOnReload:l.unmaskOnReload}},r=(l={},o)=>{const i=a(l);let s=o?a(o):void 0;if(!s){const u={};if(this.options.routeMasks){const c=y2(i.pathname,this.processedTree);if(c){Object.assign(u,c.rawParams);const{from:f,params:d,...h}=c.route,p=d===!1||d===null?{}:(d??!0)===!0?u:Object.assign(u,Da(d,u));o={from:n.from,...h,params:p},s=a(o)}}}return s&&(i.maskedLocation=s),i};return n.mask?r(n,{from:n.from,...n.mask}):r(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:a,...r})=>{const l=()=>{const s=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];s.forEach(c=>{r.state[c]=this.latestLocation.state[c]});const u=Cr(r.state,this.latestLocation.state);return s.forEach(c=>{delete r.state[c]}),u},o=ra(this.latestLocation.href)===ra(r.href),i=this.commitLocationPromise;if(this.commitLocationPromise=_l(()=>{i==null||i.resolve()}),o&&l())this.load();else{let{maskedLocation:s,hashScrollIntoView:u,...c}=r;s&&(c={...s,state:{...s.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[r.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:a})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:r,viewTransition:l,ignoreBlocker:o,href:i,...s}={})=>{if(i){const f=this.history.location.state.__TSR_index,d=lu(i,{__TSR_index:n?f:f+1}),h=new URL(d.pathname,this.origin),p=nd(this.rewrite,h);s.to=p.pathname,s.search=this.options.parseSearch(d.search),s.hash=d.hash.slice(1)}const u=this.buildLocation({...s,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:l,replace:n,resetScroll:a,hashScrollIntoView:r,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:n,reloadDocument:a,href:r,publicHref:l,...o})=>{var s;let i=!1;if(r)try{new URL(`${r}`),i=!0}catch{}if(i&&!a&&(a=!0),a){if(n!==void 0||!r){const c=this.buildLocation({to:n,...o});r=r??c.publicHref,l=l??c.publicHref}const u=!i&&l?l:r;if(iu(u))return Promise.resolve();if(!o.ignoreBlocker){const c=this.history,f=((s=c.getBlockers)==null?void 0:s.call(c))??[];for(const d of f)if(d!=null&&d.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...o,href:r,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:a.cachedMatches.filter(r=>!n.some(l=>l.id===r.id))}))},this.load=async n=>{let a,r,l;for(l=new Promise(i=>{this.startTransition(async()=>{var s;try{this.beforeLoad();const u=this.latestLocation,c=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Tr({resolvedLocation:c,location:u})}),this.emit({type:"onBeforeLoad",...Tr({resolvedLocation:c,location:u})}),await Bp({router:this,sync:n==null?void 0:n.sync,matches:this.state.pendingMatches,location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let f=[],d=[],h=[];Po(()=>{this.__store.setState(p=>{const v=p.matches,E=p.pendingMatches||p.matches;return f=v.filter(g=>!E.some(y=>y.id===g.id)),d=E.filter(g=>!v.some(y=>y.id===g.id)),h=E.filter(g=>v.some(y=>y.id===g.id)),{...p,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...p.cachedMatches,...f.filter(g=>g.status!=="error"&&g.status!=="notFound")]}}),this.clearExpiredCache()}),[[f,"onLeave"],[d,"onEnter"],[h,"onStay"]].forEach(([p,v])=>{p.forEach(E=>{var g,y;(y=(g=this.looseRoutesById[E.routeId].options)[v])==null||y.call(g,E)})})})})}})}catch(u){En(u)?(a=u,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):an(u)&&(r=u),this.__store.setState(c=>({...c,statusCode:a?a.status:r?404:c.matches.some(f=>f.status==="error")?500:200,redirect:a}))}this.latestLoadPromise===l&&((s=this.commitLocationPromise)==null||s.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.__store.state.matches.some(i=>i.status==="error")&&(o=500),o!==void 0&&this.__store.setState(i=>({...i,statusCode:o}))},this.startViewTransition=n=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,o=this.state.resolvedLocation,i=typeof a.types=="function"?a.types(Tr({resolvedLocation:o,location:l})):a.types;if(i===!1){n();return}r={update:n,types:i}}else r=n;document.startViewTransition(r)}else n()},this.updateMatch=(n,a)=>{this.startTransition(()=>{var l;const r=(l=this.state.pendingMatches)!=null&&l.some(o=>o.id===n)?"pendingMatches":this.state.matches.some(o=>o.id===n)?"matches":this.state.cachedMatches.some(o=>o.id===n)?"cachedMatches":"";r&&this.__store.setState(o=>{var i;return{...o,[r]:(i=o[r])==null?void 0:i.map(s=>s.id===n?a(s):s)}})})},this.getMatch=n=>{var r;const a=l=>l.id===n;return this.state.cachedMatches.find(a)??((r=this.state.pendingMatches)==null?void 0:r.find(a))??this.state.matches.find(a)},this.invalidate=n=>{const a=r=>{var l;return((l=n==null?void 0:n.filter)==null?void 0:l.call(n,r))??!0?{...r,invalid:!0,...n!=null&&n.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r};return this.__store.setState(r=>{var l;return{...r,matches:r.matches.map(a),cachedMatches:r.cachedMatches.map(a),pendingMatches:(l=r.pendingMatches)==null?void 0:l.map(a)}}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const a=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const r=n.options._builtLocation??this.buildLocation(n.options),l=this.getParsedLocationHref(r);n.options.href=l,n.headers.set("Location",l)}else if(a)try{const r=new URL(a);if(this.origin&&r.origin===this.origin){const l=r.pathname+r.search+r.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n==null?void 0:n.filter;a!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(l=>!a(l))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=a=>{const r=this.looseRoutesById[a.routeId];if(!r.options.loader)return!0;const l=(a.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Y0,this.preloadRoute=async n=>{const a=this.buildLocation(n);let r=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(i=>i.id)),o=new Set([...l,...this.state.cachedMatches.map(i=>i.id)]);Po(()=>{r.forEach(i=>{o.has(i.id)||this.__store.setState(s=>({...s,cachedMatches:[...s.cachedMatches,i]}))})});try{return r=await Bp({router:this,matches:r,location:a,preload:!0,updateMatch:(i,s)=>{l.has(i)?r=r.map(u=>u.id===i?s(u):u):this.updateMatch(i,s)}}),r}catch(i){if(En(i))return i.options.reloadDocument?void 0:await this.preloadRoute({...i.options,_fromLocation:a});an(i)||console.error(i);return}},this.matchRoute=(n,a)=>{const r={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(r);if(a!=null&&a.pending&&this.state.status!=="pending")return!1;const i=((a==null?void 0:a.pending)===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,s=v2(l.pathname,(a==null?void 0:a.caseSensitive)??!1,(a==null?void 0:a.fuzzy)??!1,i.pathname,this.processedTree);return!s||n.params&&!Cr(s.rawParams,n.params,{partial:!0})?!1:(a==null?void 0:a.includeSearch)??!0?Cr(i.search,l.search,{partial:!0})?s.rawParams:!1:s.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??B2,parseSearch:t.parseSearch??H2}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:a}){this.routesById=t,this.routesByPath=n,this.processedTree=a;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(t){return(t==null?void 0:t.id)?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){var f,d;const a=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:l,parsedParams:o}=a;let{matchedRoutes:i}=a,s=!1;(r?r.path!=="/"&&l["**"]:ra(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:s=!0);const u=s?nw(this.options.notFoundMode,i):void 0,c=new Array(i.length);for(let h=0;h<i.length;h++){const p=i[h],v=c[h-1];let E,g,y;{const _=(v==null?void 0:v.search)??t.search,N=(v==null?void 0:v._strictSearch)??void 0;try{const D=zs(p.options.validateSearch,{..._})??void 0;E={..._,...D},g={...N,...D},y=void 0}catch(D){let O=D;if(D instanceof fu||(O=new fu(D.message,{cause:D})),n!=null&&n.throwOnError)throw O;E=_,g={},y=O}}const S=((d=(f=p.options).loaderDeps)==null?void 0:d.call(f,{search:E}))??"",b=S?JSON.stringify(S):"",{interpolatedPath:x,usedParams:R}=Yc({path:p.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),w=p.id+x+b,C=this.getMatch(w),A=this.state.matches.find(_=>_.routeId===p.id),T=(C==null?void 0:C._strictParams)??R;let k;if(!C)try{Vp(p,R,o,T)}catch(_){if(an(_)||En(_)?k=_:k=new F2(_.message,{cause:_}),n!=null&&n.throwOnError)throw k}Object.assign(l,T);const M=A?"stay":"enter";let L;if(C)L={...C,cause:M,params:A?Bt(A.params,l):l,_strictParams:T,search:Bt(A?A.search:C.search,E),_strictSearch:g};else{const _=p.options.loader||p.options.beforeLoad||p.lazyFn||G0(p)?"pending":"success";L={id:w,ssr:p.options.ssr,index:h,routeId:p.id,params:A?Bt(A.params,l):l,_strictParams:T,pathname:x,updatedAt:Date.now(),search:A?Bt(A.search,E):E,_strictSearch:g,searchError:void 0,status:_,isFetching:!1,error:void 0,paramsError:k,__routeContext:void 0,_nonReactive:{loadPromise:_l()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:A?Bt(A.loaderDeps,S):S,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n!=null&&n.preload||(L.globalNotFound=u===p.id),L.searchError=y;const z=this.getParentContext(v);L.context={...z,...L.__routeContext,...L.__beforeLoadContext},c[h]=L}for(let h=0;h<c.length;h++){const p=c[h],v=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)){const g=c[h-1],y=this.getParentContext(g);if(v.options.context){const S={deps:p.loaderDeps,params:p.params,context:y??{},location:t,navigate:b=>this.navigate({...b,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:c,routeId:v.id};p.__routeContext=v.options.context(S)??void 0}p.context={...y,...p.__routeContext,...p.__beforeLoadContext}}}return c}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:a,parsedParams:r}=this.getMatchedRoutes(t.pathname),l=ui(n),o={...t.search};for(const c of n)try{Object.assign(o,zs(c.options.validateSearch,o))}catch{}const i=ui(this.state.matches),s=i&&i.routeId===l.id&&t.pathname===this.state.location.pathname;let u;if(s)u=i.params;else{const c={...a};for(const f of n)try{Vp(f,a,r??{},c)}catch{}u=c}return{matchedRoutes:n,fullPath:l.fullPath,search:o,params:u}}}class fu extends Error{}class F2 extends Error{}function J2(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function zs(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new fu("Async validation not supported");if(n.issues)throw new fu(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function W2({pathname:e,routesById:t,processedTree:n}){const a={},r=ra(e);let l,o;const i=b2(r,n,!0);return i&&(l=i.route,Object.assign(a,i.rawParams),o=Object.assign({},i.parsedParams)),{matchedRoutes:(i==null?void 0:i.branch)||[t[mn]],routeParams:a,foundRoute:l,parsedParams:o}}function ew({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){return tw(n)(e,t,a??!1)}function tw(e){var r;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)(r=l.options.search)!=null&&r.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const o=({search:i,next:s})=>{let u=i;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(u=l.options.preSearchFilters.reduce((f,d)=>d(f),i));const c=s(u);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((f,d)=>d(f),c):c};t.middlewares.push(o)}if(l.options.validateSearch){const o=({search:i,next:s})=>{const u=s(i);if(!t._includeValidateSearch)return u;try{return{...u,...zs(l.options.validateSearch,u)??void 0}}catch{return u}};t.middlewares.push(o)}}const n=({search:l})=>{const o=t.dest;return o.search?o.search===!0?l:Da(o.search,l):{}};t.middlewares.push(n);const a=(l,o,i)=>{if(l>=i.length)return o;const s=i[l];return s({search:o,next:c=>a(l+1,c,i)})};return function(o,i,s){return t.dest=i,t._includeValidateSearch=s,a(0,o,t.middlewares)}}function nw(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const a=t[n];if(a.children)return a.id}return mn}function Vp(e,t,n,a){var l;const r=((l=e.options.params)==null?void 0:l.parse)??e.options.parseParams;if(r)if(e.options.skipRouteOnParseError)for(const o in t)o in n&&(a[o]=n[o]);else{const o=r(a);Object.assign(a,o)}}const aw="Error preloading route! ☝️";class X0{constructor(t){if(this.init=n=>{var u,c;this.originalIndex=n.originalIndex;const a=this.options,r=!(a!=null&&a.path)&&!(a!=null&&a.id);this.parentRoute=(c=(u=this.options).getParentRoute)==null?void 0:c.call(u),r?this._path=mn:this.parentRoute||fa(!1);let l=r?mn:a==null?void 0:a.path;l&&l!=="/"&&(l=B0(l));const o=(a==null?void 0:a.id)||l;let i=r?mn:Ds([this.parentRoute.id===mn?"":this.parentRoute.id,o]);l===mn&&(l="/"),i!==mn&&(i=Ds(["/",i]));const s=i===mn?"/":Ds([this.parentRoute.fullPath,l]);this._path=l,this._id=i,this._fullPath=s,this._to=ra(s)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>P2({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class rw extends X0{constructor(t){super(t)}}var Q0={exports:{}},be={};/**
|
||
* @license React
|
||
* react.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Th=Symbol.for("react.transitional.element"),lw=Symbol.for("react.portal"),ow=Symbol.for("react.fragment"),iw=Symbol.for("react.strict_mode"),sw=Symbol.for("react.profiler"),uw=Symbol.for("react.consumer"),cw=Symbol.for("react.context"),fw=Symbol.for("react.forward_ref"),dw=Symbol.for("react.suspense"),hw=Symbol.for("react.memo"),F0=Symbol.for("react.lazy"),mw=Symbol.for("react.activity"),Ip=Symbol.iterator;function pw(e){return e===null||typeof e!="object"?null:(e=Ip&&e[Ip]||e["@@iterator"],typeof e=="function"?e:null)}var J0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},W0=Object.assign,ev={};function Jl(e,t,n){this.props=e,this.context=t,this.refs=ev,this.updater=n||J0}Jl.prototype.isReactComponent={};Jl.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")};Jl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function tv(){}tv.prototype=Jl.prototype;function Mh(e,t,n){this.props=e,this.context=t,this.refs=ev,this.updater=n||J0}var Oh=Mh.prototype=new tv;Oh.constructor=Mh;W0(Oh,Jl.prototype);Oh.isPureReactComponent=!0;var Pp=Array.isArray;function ad(){}var Ze={H:null,A:null,T:null,S:null},nv=Object.prototype.hasOwnProperty;function Ah(e,t,n){var a=n.ref;return{$$typeof:Th,type:e,key:t,ref:a!==void 0?a:null,props:n}}function gw(e,t){return Ah(e.type,t,e.props)}function _h(e){return typeof e=="object"&&e!==null&&e.$$typeof===Th}function yw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qp=/\/+/g;function Zc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?yw(""+e.key):t.toString(36)}function vw(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(ad,ad):(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 tl(e,t,n,a,r){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(l){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Th:case lw:o=!0;break;case F0:return o=e._init,tl(o(e._payload),t,n,a,r)}}if(o)return r=r(e),o=a===""?"."+Zc(e,0):a,Pp(r)?(n="",o!=null&&(n=o.replace(qp,"$&/")+"/"),tl(r,t,n,"",function(u){return u})):r!=null&&(_h(r)&&(r=gw(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(qp,"$&/")+"/")+o)),t.push(r)),1;o=0;var i=a===""?".":a+":";if(Pp(e))for(var s=0;s<e.length;s++)a=e[s],l=i+Zc(a,s),o+=tl(a,t,n,l,r);else if(s=pw(e),typeof s=="function")for(e=s.call(e),s=0;!(a=e.next()).done;)a=a.value,l=i+Zc(a,s++),o+=tl(a,t,n,l,r);else if(l==="object"){if(typeof e.then=="function")return tl(vw(e),t,n,a,r);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 o}function as(e,t,n){if(e==null)return e;var a=[],r=0;return tl(e,a,"","",function(l){return t.call(n,l,r++)}),a}function bw(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 $p=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)},Sw={map:as,forEach:function(e,t,n){as(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return as(e,function(){t++}),t},toArray:function(e){return as(e,function(t){return t})||[]},only:function(e){if(!_h(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};be.Activity=mw;be.Children=Sw;be.Component=Jl;be.Fragment=ow;be.Profiler=sw;be.PureComponent=Mh;be.StrictMode=iw;be.Suspense=dw;be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ze;be.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ze.H.useMemoCache(e)}};be.cache=function(e){return function(){return e.apply(null,arguments)}};be.cacheSignal=function(){return null};be.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=W0({},e.props),r=e.key;if(t!=null)for(l in t.key!==void 0&&(r=""+t.key),t)!nv.call(t,l)||l==="key"||l==="__self"||l==="__source"||l==="ref"&&t.ref===void 0||(a[l]=t[l]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var o=Array(l),i=0;i<l;i++)o[i]=arguments[i+2];a.children=o}return Ah(e.type,r,a)};be.createContext=function(e){return e={$$typeof:cw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:uw,_context:e},e};be.createElement=function(e,t,n){var a,r={},l=null;if(t!=null)for(a in t.key!==void 0&&(l=""+t.key),t)nv.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(r[a]=t[a]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var i=Array(o),s=0;s<o;s++)i[s]=arguments[s+2];r.children=i}if(e&&e.defaultProps)for(a in o=e.defaultProps,o)r[a]===void 0&&(r[a]=o[a]);return Ah(e,l,r)};be.createRef=function(){return{current:null}};be.forwardRef=function(e){return{$$typeof:fw,render:e}};be.isValidElement=_h;be.lazy=function(e){return{$$typeof:F0,_payload:{_status:-1,_result:e},_init:bw}};be.memo=function(e,t){return{$$typeof:hw,type:e,compare:t===void 0?null:t}};be.startTransition=function(e){var t=Ze.T,n={};Ze.T=n;try{var a=e(),r=Ze.S;r!==null&&r(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(ad,$p)}catch(l){$p(l)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ze.T=t}};be.unstable_useCacheRefresh=function(){return Ze.H.useCacheRefresh()};be.use=function(e){return Ze.H.use(e)};be.useActionState=function(e,t,n){return Ze.H.useActionState(e,t,n)};be.useCallback=function(e,t){return Ze.H.useCallback(e,t)};be.useContext=function(e){return Ze.H.useContext(e)};be.useDebugValue=function(){};be.useDeferredValue=function(e,t){return Ze.H.useDeferredValue(e,t)};be.useEffect=function(e,t){return Ze.H.useEffect(e,t)};be.useEffectEvent=function(e){return Ze.H.useEffectEvent(e)};be.useId=function(){return Ze.H.useId()};be.useImperativeHandle=function(e,t,n){return Ze.H.useImperativeHandle(e,t,n)};be.useInsertionEffect=function(e,t){return Ze.H.useInsertionEffect(e,t)};be.useLayoutEffect=function(e,t){return Ze.H.useLayoutEffect(e,t)};be.useMemo=function(e,t){return Ze.H.useMemo(e,t)};be.useOptimistic=function(e,t){return Ze.H.useOptimistic(e,t)};be.useReducer=function(e,t,n){return Ze.H.useReducer(e,t,n)};be.useRef=function(e){return Ze.H.useRef(e)};be.useState=function(e){return Ze.H.useState(e)};be.useSyncExternalStore=function(e,t,n){return Ze.H.useSyncExternalStore(e,t,n)};be.useTransition=function(){return Ze.H.useTransition()};be.version="19.2.1";Q0.exports=be;var m=Q0.exports;const tr=Qx(m),Ni=Xx({__proto__:null,default:tr},[m]),Ew="use",Yp=Ni[Ew],rs=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Kc(e){const t=m.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function xw(e,t,n={},a={}){m.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const r=new IntersectionObserver(([l])=>{t(l)},n);return r.observe(e.current),()=>{r.disconnect()}},[t,n,a.disabled,e])}function ww(e){const t=m.useRef(null);return m.useImperativeHandle(e,()=>t.current,[]),t}function Nh(e){const t=e.errorComponent??kh;return U.jsx(Rw,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?m.createElement(t,{error:n,reset:a}):e.children})}class Rw extends m.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function kh({error:e}){const[t,n]=m.useState(!1);return U.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[U.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),U.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(a=>!a),children:t?"Hide Error":"Show Error"})]}),U.jsx("div",{style:{height:".25rem"}}),t?U.jsx("div",{children:U.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?U.jsx("code",{children:e.message}):null})}):null]})}function Cw({children:e,fallback:t=null}){return av()?U.jsx(tr.Fragment,{children:e}):U.jsx(tr.Fragment,{children:t})}function av(){return tr.useSyncExternalStore(Tw,()=>!0,()=>!1)}function Tw(){return()=>{}}var rv={exports:{}},lv={},ov={exports:{}},iv={};/**
|
||
* @license React
|
||
* use-sync-external-store-shim.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var kl=m;function Mw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ow=typeof Object.is=="function"?Object.is:Mw,Aw=kl.useState,_w=kl.useEffect,Nw=kl.useLayoutEffect,kw=kl.useDebugValue;function Dw(e,t){var n=t(),a=Aw({inst:{value:n,getSnapshot:t}}),r=a[0].inst,l=a[1];return Nw(function(){r.value=n,r.getSnapshot=t,Xc(r)&&l({inst:r})},[e,n,t]),_w(function(){return Xc(r)&&l({inst:r}),e(function(){Xc(r)&&l({inst:r})})},[e]),kw(n),n}function Xc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ow(e,n)}catch{return!0}}function Lw(e,t){return t()}var zw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Lw:Dw;iv.useSyncExternalStore=kl.useSyncExternalStore!==void 0?kl.useSyncExternalStore:zw;ov.exports=iv;var Uw=ov.exports;/**
|
||
* @license React
|
||
* use-sync-external-store-shim/with-selector.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var tc=m,jw=Uw;function Hw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bw=typeof Object.is=="function"?Object.is:Hw,Vw=jw.useSyncExternalStore,Iw=tc.useRef,Pw=tc.useEffect,qw=tc.useMemo,$w=tc.useDebugValue;lv.useSyncExternalStoreWithSelector=function(e,t,n,a,r){var l=Iw(null);if(l.current===null){var o={hasValue:!1,value:null};l.current=o}else o=l.current;l=qw(function(){function s(h){if(!u){if(u=!0,c=h,h=a(h),r!==void 0&&o.hasValue){var p=o.value;if(r(p,h))return f=p}return f=h}if(p=f,Bw(c,h))return p;var v=a(h);return r!==void 0&&r(p,v)?(c=h,p):(c=h,f=v)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return s(t())},d===null?void 0:function(){return s(d())}]},[t,n,a,r]);var i=Vw(e,l[0],l[1]);return Pw(function(){o.hasValue=!0,o.value=i},[i]),$w(i),i};rv.exports=lv;var Yw=rv.exports;function Gw(e,t=a=>a,n={}){const a=n.equal??Zw;return Yw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,a)}function Zw(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,r]of e)if(!t.has(a)||!Object.is(r,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Gp(e);if(n.length!==Gp(t).length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0}function Gp(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Qc=m.createContext(null);function sv(){return typeof document>"u"?Qc:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Qc,Qc)}function Mn(e){const t=m.useContext(sv());return e==null||e.warn,t}function rn(e){const t=Mn({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,a=m.useRef(void 0);return Gw(n.__store,r=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Bt(a.current,e.select(r));return a.current=l,l}return e.select(r)}return r})}const nc=m.createContext(void 0),Kw=m.createContext(void 0);function qn(e){const t=m.useContext(e.from?Kw:nc);return rn({select:a=>{const r=a.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(fa(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function Dh(e){return qn({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Lh(e){const{select:t,...n}=e;return qn({...n,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function zh(e){return qn({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Uh(e){return qn({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function jh(e){const t=Mn();return m.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}var uv={exports:{}},Ut={};/**
|
||
* @license React
|
||
* react-dom.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Xw=m;function cv(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 Ra(){}var Lt={d:{f:Ra,r:function(){throw Error(cv(522))},D:Ra,C:Ra,L:Ra,m:Ra,X:Ra,S:Ra,M:Ra},p:0,findDOMNode:null},Qw=Symbol.for("react.portal");function Fw(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qw,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var qo=Xw.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ac(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Lt;Ut.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(cv(299));return Fw(e,t,null,n)};Ut.flushSync=function(e){var t=qo.T,n=Lt.p;try{if(qo.T=null,Lt.p=2,e)return e()}finally{qo.T=t,Lt.p=n,Lt.d.f()}};Ut.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Lt.d.C(e,t))};Ut.prefetchDNS=function(e){typeof e=="string"&&Lt.d.D(e)};Ut.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=ac(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,l=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Lt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:r,fetchPriority:l}):n==="script"&&Lt.d.X(e,{crossOrigin:a,integrity:r,fetchPriority:l,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ut.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=ac(t.as,t.crossOrigin);Lt.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&&Lt.d.M(e)};Ut.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=ac(n,t.crossOrigin);Lt.d.L(e,n,{crossOrigin:a,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})}};Ut.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=ac(t.as,t.crossOrigin);Lt.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 Lt.d.m(e)};Ut.requestFormReset=function(e){Lt.d.r(e)};Ut.unstable_batchedUpdates=function(e,t){return e(t)};Ut.useFormState=function(e,t,n){return qo.H.useFormState(e,t,n)};Ut.useFormStatus=function(){return qo.H.useHostTransitionStatus()};Ut.version="19.2.1";function fv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fv)}catch(e){console.error(e)}}fv(),uv.exports=Ut;var zt=uv.exports;function Jw(e,t){const n=Mn(),a=ww(t),{activeProps:r,inactiveProps:l,activeOptions:o,to:i,preload:s,preloadDelay:u,hashScrollIntoView:c,replace:f,startTransition:d,resetScroll:h,viewTransition:p,children:v,target:E,disabled:g,style:y,className:S,onClick:b,onFocus:x,onMouseEnter:R,onMouseLeave:w,onTouchStart:C,ignoreBlocker:A,params:T,search:k,hash:M,state:L,mask:z,reloadDocument:_,unsafeRelative:N,from:D,_fromLocation:O,...H}=e,j=av(),Z=rn({select:le=>le.location.search,structuralSharing:!0}),q=e.from,P=m.useMemo(()=>({...e,from:q}),[n,Z,q,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=m.useMemo(()=>n.buildLocation({...P}),[n,P]),$=Q.maskedLocation?Q.maskedLocation.publicHref:Q.publicHref,de=Q.maskedLocation?Q.maskedLocation.external:Q.external,K=m.useMemo(()=>rR($,de,n.history,g),[g,de,$,n.history]),F=m.useMemo(()=>{if(K!=null&&K.external)return iu(K.href)?void 0:K.href;if(!lR(i)&&!(typeof i!="string"||i.indexOf(":")===-1))try{return new URL(i),iu(i)?void 0:i}catch{}},[i,K]),he=rn({select:le=>{if(F)return!1;if(o!=null&&o.exact){if(!C2(le.location.pathname,Q.pathname,n.basepath))return!1}else{const Ee=uu(le.location.pathname,n.basepath),me=uu(Q.pathname,n.basepath);if(!(Ee.startsWith(me)&&(Ee.length===me.length||Ee[me.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Cr(le.location.search,Q.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?j&&le.location.hash===Q.hash:!0}}),ge=he?Da(r,{})??Ww:Fc,V=he?Fc:Da(l,{})??Fc,J=[S,ge.className,V.className].filter(Boolean).join(" "),te=(y||ge.style||V.style)&&{...y,...ge.style,...V.style},[we,ne]=m.useState(!1),Y=m.useRef(!1),X=e.reloadDocument||F?!1:s??n.options.defaultPreload,re=u??n.options.defaultPreloadDelay??0,fe=m.useCallback(()=>{n.preloadRoute({...P}).catch(le=>{console.warn(le),console.warn(aw)})},[n,P]),De=m.useCallback(le=>{le!=null&&le.isIntersecting&&fe()},[fe]);xw(a,De,aR,{disabled:!!g||X!=="viewport"}),m.useEffect(()=>{Y.current||!g&&X==="render"&&(fe(),Y.current=!0)},[g,fe,X]);const ie=le=>{const Ee=le.currentTarget.getAttribute("target"),me=E!==void 0?E:Ee;if(!g&&!oR(le)&&!le.defaultPrevented&&(!me||me==="_self")&&le.button===0){le.preventDefault(),zt.flushSync(()=>{ne(!0)});const Ne=n.subscribe("onResolved",()=>{Ne(),ne(!1)});n.navigate({...P,replace:f,resetScroll:h,hashScrollIntoView:c,startTransition:d,viewTransition:p,ignoreBlocker:A})}};if(F)return{...H,ref:a,href:F,...v&&{children:v},...E&&{target:E},...g&&{disabled:g},...y&&{style:y},...S&&{className:S},...b&&{onClick:b},...x&&{onFocus:x},...R&&{onMouseEnter:R},...w&&{onMouseLeave:w},...C&&{onTouchStart:C}};const ee=le=>{g||X&&fe()},G=ee,W=le=>{if(!(g||!X))if(!re)fe();else{const Ee=le.target;if(So.has(Ee))return;const me=setTimeout(()=>{So.delete(Ee),fe()},re);So.set(Ee,me)}},se=le=>{if(g||!X||!re)return;const Ee=le.target,me=So.get(Ee);me&&(clearTimeout(me),So.delete(Ee))};return{...H,...ge,...V,href:K==null?void 0:K.href,ref:a,onClick:Eo([b,ie]),onFocus:Eo([x,ee]),onMouseEnter:Eo([R,W]),onMouseLeave:Eo([w,se]),onTouchStart:Eo([C,G]),disabled:!!g,target:E,...te&&{style:te},...J&&{className:J},...g&&eR,...he&&tR,...j&&we&&nR}}const Fc={},Ww={className:"active"},eR={role:"link","aria-disabled":!0},tR={"data-status":"active","aria-current":"page"},nR={"data-transitioning":"transitioning"},So=new WeakMap,aR={rootMargin:"100px"},Eo=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function rR(e,t,n,a){if(!a)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function lR(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Hh=m.forwardRef((e,t)=>{const{_asChild:n,...a}=e,{type:r,...l}=Jw(a,t),o=typeof a.children=="function"?a.children({isActive:l["data-status"]==="active"}):a.children;if(!n){const{disabled:i,...s}=l;return m.createElement("a",s,o)}return m.createElement(n,l,o)});function oR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let iR=class extends X0{constructor(t){super(t),this.useMatch=n=>qn({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>qn({...n,from:this.id,select:a=>n!=null&&n.select?n.select(a.context):a.context}),this.useSearch=n=>Uh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>zh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Lh({...n,from:this.id}),this.useLoaderData=n=>Dh({...n,from:this.id}),this.useNavigate=()=>jh({from:this.fullPath}),this.Link=tr.forwardRef((n,a)=>U.jsx(Hh,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function sR(e){return new iR(e)}class uR extends rw{constructor(t){super(t),this.useMatch=n=>qn({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>qn({...n,from:this.id,select:a=>n!=null&&n.select?n.select(a.context):a.context}),this.useSearch=n=>Uh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>zh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Lh({...n,from:this.id}),this.useLoaderData=n=>Dh({...n,from:this.id}),this.useNavigate=()=>jh({from:this.fullPath}),this.Link=tr.forwardRef((n,a)=>U.jsx(Hh,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function cR(e){return new uR(e)}function fi(e){return typeof e=="object"?new Zp(e,{silent:!0}).createRoute(e):new Zp(e,{silent:!0}).createRoute}class Zp{constructor(t,n){this.path=t,this.createRoute=a=>{this.silent;const r=sR(a);return r.isRoot=!1,r},this.silent=n==null?void 0:n.silent}}class Kp{constructor(t){this.useMatch=n=>qn({select:n==null?void 0:n.select,from:this.options.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>qn({from:this.options.id,select:a=>n!=null&&n.select?n.select(a.context):a.context}),this.useSearch=n=>Uh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useParams=n=>zh({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Lh({...n,from:this.options.id}),this.useLoaderData=n=>Dh({...n,from:this.options.id}),this.useNavigate=()=>{const n=Mn();return jh({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Xp(e){return typeof e=="object"?new Kp(e):t=>new Kp({id:e,...t})}function Bh(e,t){let n,a,r,l;const o=()=>(n||(n=e().then(s=>{n=void 0,a=s[t]}).catch(s=>{if(r=s,f2(r)&&r instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const u=`tanstack_router_reload:${r.message}`;sessionStorage.getItem(u)||(sessionStorage.setItem(u,"1"),l=!0)}})),n),i=function(u){if(l)throw window.location.reload(),new Promise(()=>{});if(r)throw r;if(!a)if(Yp)Yp(o());else throw o();return m.createElement(a,u)};return i.preload=o,i}function fR(){const e=Mn(),t=m.useRef({router:e,mounted:!1}),[n,a]=m.useState(!1),{hasPendingMatches:r,isLoading:l}=rn({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(d=>d.status==="pending")}),structuralSharing:!0}),o=Kc(l),i=l||n||r,s=Kc(i),u=l||r,c=Kc(u);return e.startTransition=f=>{a(!0),m.startTransition(()=>{f(),a(!1)})},m.useEffect(()=>{const f=e.history.subscribe(e.load),d=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ra(e.latestLocation.publicHref)!==ra(d.publicHref)&&e.commitLocation({...d,replace:!0}),()=>{f()}},[e,e.history]),rs(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(d){console.error(d)}})()},[e]),rs(()=>{o&&!l&&e.emit({type:"onLoad",...Tr(e.state)})},[o,e,l]),rs(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...Tr(e.state)})},[u,c,e]),rs(()=>{if(s&&!i){const f=Tr(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(d=>({...d,status:"idle",resolvedLocation:d.location})),f.hrefChanged&&z2(e)}},[i,s,e]),null}function dR(e){const t=rn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return U.jsx(Nh,{getResetKey:()=>t,onCatch:(n,a)=>{var r;if(an(n))(r=e.onCatch)==null||r.call(e,n,a);else throw n},errorComponent:({error:n})=>{var a;if(an(n))return(a=e.fallback)==null?void 0:a.call(e,n);throw n},children:e.children})}function hR(){return U.jsx("p",{children:"Not Found"})}function nl(e){return U.jsx(U.Fragment,{children:e.children})}function dv(e,t,n){return t.options.notFoundComponent?U.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?U.jsx(e.options.defaultNotFoundComponent,{...n}):U.jsx(hR,{})}function mR(){return Mn().isScrollRestoring,null}const hv=m.memo(function({matchId:t}){var v,E;const n=Mn(),a=rn({select:g=>{var b;const y=g.matches.findIndex(x=>x.id===t),S=g.matches[y];return fa(S),{routeId:S.routeId,ssr:S.ssr,_displayPending:S._displayPending,resetKey:g.loadedAt,parentRouteId:(b=g.matches[y-1])==null?void 0:b.routeId}},structuralSharing:!0}),r=n.routesById[a.routeId],l=r.options.pendingComponent??n.options.defaultPendingComponent,o=l?U.jsx(l,{}):null,i=r.options.errorComponent??n.options.defaultErrorComponent,s=r.options.onCatch??n.options.defaultOnCatch,u=r.isRoot?r.options.notFoundComponent??((v=n.options.notFoundRoute)==null?void 0:v.options.component):r.options.notFoundComponent,c=a.ssr===!1||a.ssr==="data-only",f=(!r.isRoot||r.options.wrapInSuspense||c)&&(r.options.wrapInSuspense??l??(((E=r.options.errorComponent)==null?void 0:E.preload)||c))?m.Suspense:nl,d=i?Nh:nl,h=u?dR:nl,p=r.isRoot?r.options.shellComponent??nl:nl;return U.jsxs(p,{children:[U.jsx(nc.Provider,{value:t,children:U.jsx(f,{fallback:o,children:U.jsx(d,{getResetKey:()=>a.resetKey,errorComponent:i||kh,onCatch:(g,y)=>{if(an(g))throw g;s==null||s(g,y)},children:U.jsx(h,{fallback:g=>{if(!u||g.routeId&&g.routeId!==a.routeId||!g.routeId&&!r.isRoot)throw g;return m.createElement(u,g)},children:c||a._displayPending?U.jsx(Cw,{fallback:o,children:U.jsx(Qp,{matchId:t})}):U.jsx(Qp,{matchId:t})})})})}),a.parentRouteId===mn&&n.options.scrollRestoration?U.jsxs(U.Fragment,{children:[U.jsx(pR,{}),U.jsx(mR,{})]}):null]})});function pR(){const e=Mn(),t=m.useRef(void 0);return U.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Tr(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Qp=m.memo(function({matchId:t}){var s,u,c,f;const n=Mn(),{match:a,key:r,routeId:l}=rn({select:d=>{const h=d.matches.find(y=>y.id===t),p=h.routeId,v=n.routesById[p].options.remountDeps??n.options.defaultRemountDeps,E=v==null?void 0:v({routeId:p,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:E?JSON.stringify(E):void 0,routeId:p,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),o=n.routesById[l],i=m.useMemo(()=>{const d=o.options.component??n.options.defaultComponent;return d?U.jsx(d,{},r):U.jsx(mv,{})},[r,o.options.component,n.options.defaultComponent]);if(a._displayPending)throw(s=n.getMatch(a.id))==null?void 0:s._nonReactive.displayPendingPromise;if(a._forcePending)throw(u=n.getMatch(a.id))==null?void 0:u._nonReactive.minPendingPromise;if(a.status==="pending"){const d=o.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise){const p=_l();h._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw(c=n.getMatch(a.id))==null?void 0:c._nonReactive.loadPromise}if(a.status==="notFound")return fa(an(a.error)),dv(n,o,a.error);if(a.status==="redirected")throw fa(En(a.error)),(f=n.getMatch(a.id))==null?void 0:f._nonReactive.loadPromise;if(a.status==="error")throw a.error;return i}),mv=m.memo(function(){const t=Mn(),n=m.useContext(nc),a=rn({select:u=>{var c;return(c=u.matches.find(f=>f.id===n))==null?void 0:c.routeId}}),r=t.routesById[a],l=rn({select:u=>{const f=u.matches.find(d=>d.id===n);return fa(f),f.globalNotFound}}),o=rn({select:u=>{var d;const c=u.matches,f=c.findIndex(h=>h.id===n);return(d=c[f+1])==null?void 0:d.id}}),i=t.options.defaultPendingComponent?U.jsx(t.options.defaultPendingComponent,{}):null;if(l)return dv(t,r,void 0);if(!o)return null;const s=U.jsx(hv,{matchId:o});return a===mn?U.jsx(m.Suspense,{fallback:i,children:s}):s});function gR(){const e=Mn(),n=e.routesById[mn].options.pendingComponent??e.options.defaultPendingComponent,a=n?U.jsx(n,{}):null,r=typeof document<"u"&&e.ssr?nl:m.Suspense,l=U.jsxs(r,{fallback:a,children:[U.jsx(fR,{}),U.jsx(yR,{})]});return e.options.InnerWrap?U.jsx(e.options.InnerWrap,{children:l}):l}function yR(){const e=Mn(),t=rn({select:r=>{var l;return(l=r.matches[0])==null?void 0:l.id}}),n=rn({select:r=>r.loadedAt}),a=t?U.jsx(hv,{matchId:t}):null;return U.jsx(nc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:U.jsx(Nh,{getResetKey:()=>n,errorComponent:kh,onCatch:r=>{r.message||r.toString()},children:a})})}const vR=e=>new bR(e);class bR extends Q2{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=fi,globalThis.createLazyFileRoute=Xp):typeof window<"u"&&(window.createFileRoute=fi,window.createLazyFileRoute=Xp);function SR({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const a=sv(),r=U.jsx(a.Provider,{value:e,children:t});return e.options.Wrap?U.jsx(e.options.Wrap,{children:r}):r}function ER({router:e,...t}){return U.jsx(SR,{router:e,...t,children:U.jsx(gR,{})})}var pv={exports:{}},rc={},gv={exports:{}},yv={};/**
|
||
* @license React
|
||
* scheduler.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(e){function t(N,D){var O=N.length;N.push(D);e:for(;0<O;){var H=O-1>>>1,j=N[H];if(0<r(j,D))N[H]=D,N[O]=j,O=H;else break e}}function n(N){return N.length===0?null:N[0]}function a(N){if(N.length===0)return null;var D=N[0],O=N.pop();if(O!==D){N[0]=O;e:for(var H=0,j=N.length,Z=j>>>1;H<Z;){var q=2*(H+1)-1,P=N[q],Q=q+1,$=N[Q];if(0>r(P,O))Q<j&&0>r($,P)?(N[H]=$,N[Q]=O,H=Q):(N[H]=P,N[q]=O,H=q);else if(Q<j&&0>r($,O))N[H]=$,N[Q]=O,H=Q;else break e}}return D}function r(N,D){var O=N.sortIndex-D.sortIndex;return O!==0?O:N.id-D.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,i=o.now();e.unstable_now=function(){return o.now()-i}}var s=[],u=[],c=1,f=null,d=3,h=!1,p=!1,v=!1,E=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function b(N){for(var D=n(u);D!==null;){if(D.callback===null)a(u);else if(D.startTime<=N)a(u),D.sortIndex=D.expirationTime,t(s,D);else break;D=n(u)}}function x(N){if(v=!1,b(N),!p)if(n(s)!==null)p=!0,R||(R=!0,M());else{var D=n(u);D!==null&&_(x,D.startTime-N)}}var R=!1,w=-1,C=5,A=-1;function T(){return E?!0:!(e.unstable_now()-A<C)}function k(){if(E=!1,R){var N=e.unstable_now();A=N;var D=!0;try{e:{p=!1,v&&(v=!1,y(w),w=-1),h=!0;var O=d;try{t:{for(b(N),f=n(s);f!==null&&!(f.expirationTime>N&&T());){var H=f.callback;if(typeof H=="function"){f.callback=null,d=f.priorityLevel;var j=H(f.expirationTime<=N);if(N=e.unstable_now(),typeof j=="function"){f.callback=j,b(N),D=!0;break t}f===n(s)&&a(s),b(N)}else a(s);f=n(s)}if(f!==null)D=!0;else{var Z=n(u);Z!==null&&_(x,Z.startTime-N),D=!1}}break e}finally{f=null,d=O,h=!1}D=void 0}}finally{D?M():R=!1}}}var M;if(typeof S=="function")M=function(){S(k)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,z=L.port2;L.port1.onmessage=k,M=function(){z.postMessage(null)}}else M=function(){g(k,0)};function _(N,D){w=g(function(){N(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(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(N){switch(d){case 1:case 2:case 3:var D=3;break;default:D=d}var O=d;d=D;try{return N()}finally{d=O}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(N,D){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var O=d;d=N;try{return D()}finally{d=O}},e.unstable_scheduleCallback=function(N,D,O){var H=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?H+O:H):O=H,N){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=O+j,N={id:c++,callback:D,priorityLevel:N,startTime:O,expirationTime:j,sortIndex:-1},O>H?(N.sortIndex=O,t(u,N),n(s)===null&&N===n(u)&&(v?(y(w),w=-1):v=!0,_(x,O-H))):(N.sortIndex=j,t(s,N),p||h||(p=!0,R||(R=!0,M()))),N},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(N){var D=d;return function(){var O=d;d=D;try{return N.apply(this,arguments)}finally{d=O}}}})(yv);gv.exports=yv;var xR=gv.exports;/**
|
||
* @license React
|
||
* react-dom-client.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var vt=xR,vv=m,wR=zt;function I(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function bv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ki(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 Sv(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 Ev(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 Fp(e){if(ki(e)!==e)throw Error(I(188))}function RR(e){var t=e.alternate;if(!t){if(t=ki(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var l=r.alternate;if(l===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===l.child){for(l=r.child;l;){if(l===n)return Fp(r),e;if(l===a)return Fp(r),t;l=l.sibling}throw Error(I(188))}if(n.return!==a.return)n=r,a=l;else{for(var o=!1,i=r.child;i;){if(i===n){o=!0,n=r,a=l;break}if(i===a){o=!0,a=r,n=l;break}i=i.sibling}if(!o){for(i=l.child;i;){if(i===n){o=!0,n=l,a=r;break}if(i===a){o=!0,a=l,n=r;break}i=i.sibling}if(!o)throw Error(I(189))}}if(n.alternate!==a)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function xv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=xv(e),t!==null)return t;e=e.sibling}return null}var Ke=Object.assign,CR=Symbol.for("react.element"),ls=Symbol.for("react.transitional.element"),Do=Symbol.for("react.portal"),ll=Symbol.for("react.fragment"),wv=Symbol.for("react.strict_mode"),rd=Symbol.for("react.profiler"),Rv=Symbol.for("react.consumer"),la=Symbol.for("react.context"),Vh=Symbol.for("react.forward_ref"),ld=Symbol.for("react.suspense"),od=Symbol.for("react.suspense_list"),Ih=Symbol.for("react.memo"),Ma=Symbol.for("react.lazy"),id=Symbol.for("react.activity"),TR=Symbol.for("react.memo_cache_sentinel"),Jp=Symbol.iterator;function xo(e){return e===null||typeof e!="object"?null:(e=Jp&&e[Jp]||e["@@iterator"],typeof e=="function"?e:null)}var MR=Symbol.for("react.client.reference");function sd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===MR?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ll:return"Fragment";case rd:return"Profiler";case wv:return"StrictMode";case ld:return"Suspense";case od:return"SuspenseList";case id:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Do:return"Portal";case la:return e.displayName||"Context";case Rv:return(e._context.displayName||"Context")+".Consumer";case Vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ih:return t=e.displayName||null,t!==null?t:sd(e.type)||"Memo";case Ma:t=e._payload,e=e._init;try{return sd(e(t))}catch{}}return null}var Lo=Array.isArray,ye=vv.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ze=wR.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Mr={pending:!1,data:null,method:null,action:null},ud=[],ol=-1;function Yn(e){return{current:e}}function Et(e){0>ol||(e.current=ud[ol],ud[ol]=null,ol--)}function qe(e,t){ol++,ud[ol]=e.current,e.current=t}var Vn=Yn(null),di=Yn(null),Pa=Yn(null),du=Yn(null);function hu(e,t){switch(qe(Pa,t),qe(di,e),qe(Vn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ry(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ry(t),e=$1(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Et(Vn),qe(Vn,e)}function Dl(){Et(Vn),Et(di),Et(Pa)}function cd(e){e.memoizedState!==null&&qe(du,e);var t=Vn.current,n=$1(t,e.type);t!==n&&(qe(di,e),qe(Vn,n))}function mu(e){di.current===e&&(Et(Vn),Et(di)),du.current===e&&(Et(du),wi._currentValue=Mr)}var Jc,Wp;function yr(e){if(Jc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jc=t&&t[1]||"",Wp=-1<n.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Jc+e+Wp}var Wc=!1;function ef(e,t){if(!e||Wc)return"";Wc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(h){var d=h}Reflect.construct(e,[],f)}else{try{f.call()}catch(h){d=h}e.call(f.prototype)}}else{try{throw Error()}catch(h){d=h}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(h){if(h&&d&&typeof h.stack=="string")return[h.stack,d.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=a.DetermineComponentFrameRoot(),o=l[0],i=l[1];if(o&&i){var s=o.split(`
|
||
`),u=i.split(`
|
||
`);for(r=a=0;a<s.length&&!s[a].includes("DetermineComponentFrameRoot");)a++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(a===s.length||r===u.length)for(a=s.length-1,r=u.length-1;1<=a&&0<=r&&s[a]!==u[r];)r--;for(;1<=a&&0<=r;a--,r--)if(s[a]!==u[r]){if(a!==1||r!==1)do if(a--,r--,0>r||s[a]!==u[r]){var c=`
|
||
`+s[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=r);break}}}finally{Wc=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?yr(n):""}function OR(e,t){switch(e.tag){case 26:case 27:case 5:return yr(e.type);case 16:return yr("Lazy");case 13:return e.child!==t&&t!==null?yr("Suspense Fallback"):yr("Suspense");case 19:return yr("SuspenseList");case 0:case 15:return ef(e.type,!1);case 11:return ef(e.type.render,!1);case 1:return ef(e.type,!0);case 31:return yr("Activity");default:return""}}function eg(e){try{var t="",n=null;do t+=OR(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
||
Error generating stack: `+a.message+`
|
||
`+a.stack}}var fd=Object.prototype.hasOwnProperty,Ph=vt.unstable_scheduleCallback,tf=vt.unstable_cancelCallback,AR=vt.unstable_shouldYield,_R=vt.unstable_requestPaint,ln=vt.unstable_now,NR=vt.unstable_getCurrentPriorityLevel,Cv=vt.unstable_ImmediatePriority,Tv=vt.unstable_UserBlockingPriority,pu=vt.unstable_NormalPriority,kR=vt.unstable_LowPriority,Mv=vt.unstable_IdlePriority,DR=vt.log,LR=vt.unstable_setDisableYieldValue,Di=null,on=null;function za(e){if(typeof DR=="function"&&LR(e),on&&typeof on.setStrictMode=="function")try{on.setStrictMode(Di,e)}catch{}}var sn=Math.clz32?Math.clz32:jR,zR=Math.log,UR=Math.LN2;function jR(e){return e>>>=0,e===0?32:31-(zR(e)/UR|0)|0}var os=256,is=262144,ss=4194304;function vr(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 lc(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var i=a&134217727;return i!==0?(a=i&~l,a!==0?r=vr(a):(o&=i,o!==0?r=vr(o):n||(n=i&~e,n!==0&&(r=vr(n))))):(i=a&~l,i!==0?r=vr(i):o!==0?r=vr(o):n||(n=a&~e,n!==0&&(r=vr(n)))),r===0?0:t!==0&&t!==r&&!(t&l)&&(l=r&-r,n=t&-t,l>=n||l===32&&(n&4194048)!==0)?t:r}function Li(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function HR(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 Ov(){var e=ss;return ss<<=1,!(ss&62914560)&&(ss=4194304),e}function nf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function BR(e,t,n,a,r,l){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var i=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var c=31-sn(n),f=1<<c;i[c]=0,s[c]=-1;var d=u[c];if(d!==null)for(u[c]=null,c=0;c<d.length;c++){var h=d[c];h!==null&&(h.lane&=-536870913)}n&=~f}a!==0&&Av(e,a,0),l!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=l&~(o&~t))}function Av(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-sn(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function _v(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-sn(n),r=1<<a;r&t|e[a]&t&&(e[a]|=t),n&=~r}}function Nv(e,t){var n=t&-t;return n=n&42?1:qh(n),n&(e.suspendedLanes|t)?0:n}function qh(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 $h(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function kv(){var e=ze.p;return e!==0?e:(e=window.event,e===void 0?32:tS(e.type))}function tg(e,t){var n=ze.p;try{return ze.p=e,t()}finally{ze.p=n}}var sr=Math.random().toString(36).slice(2),Ct="__reactFiber$"+sr,Yt="__reactProps$"+sr,Wl="__reactContainer$"+sr,dd="__reactEvents$"+sr,VR="__reactListeners$"+sr,IR="__reactHandles$"+sr,ng="__reactResources$"+sr,Ui="__reactMarker$"+sr;function Yh(e){delete e[Ct],delete e[Yt],delete e[dd],delete e[VR],delete e[IR]}function il(e){var t=e[Ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Wl]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=uy(e);e!==null;){if(n=e[Ct])return n;e=uy(e)}return t}e=n,n=e.parentNode}return null}function eo(e){if(e=e[Ct]||e[Wl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function zo(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(I(33))}function Sl(e){var t=e[ng];return t||(t=e[ng]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[Ui]=!0}var Dv=new Set,Lv={};function $r(e,t){Ll(e,t),Ll(e+"Capture",t)}function Ll(e,t){for(Lv[e]=t,e=0;e<t.length;e++)Dv.add(t[e])}var PR=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]*$"),ag={},rg={};function qR(e){return fd.call(rg,e)?!0:fd.call(ag,e)?!1:PR.test(e)?rg[e]=!0:(ag[e]=!0,!1)}function Us(e,t,n){if(qR(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function us(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 Qn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function pn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $R(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var r=a.get,l=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){n=""+o,l.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hd(e){if(!e._valueTracker){var t=zv(e)?"checked":"value";e._valueTracker=$R(e,t,""+e[t])}}function Uv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=zv(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function gu(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 YR=/[\n"\\]/g;function vn(e){return e.replace(YR,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function md(e,t,n,a,r,l,o,i){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+pn(t)):e.value!==""+pn(t)&&(e.value=""+pn(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?pd(e,o,pn(t)):n!=null?pd(e,o,pn(n)):a!=null&&e.removeAttribute("value"),r==null&&l!=null&&(e.defaultChecked=!!l),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.name=""+pn(i):e.removeAttribute("name")}function jv(e,t,n,a,r,l,o,i){if(l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.type=l),t!=null||n!=null){if(!(l!=="submit"&&l!=="reset"||t!=null)){hd(e);return}n=n!=null?""+pn(n):"",t=t!=null?""+pn(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}a=a??r,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=i?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),hd(e)}function pd(e,t,n){t==="number"&&gu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function El(e,t,n,a){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&a&&(e[n].defaultSelected=!0)}else{for(n=""+pn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Hv(e,t,n){if(t!=null&&(t=""+pn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+pn(n):""}function Bv(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(I(92));if(Lo(a)){if(1<a.length)throw Error(I(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=pn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),hd(e)}function zl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var GR=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 lg(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||GR.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Vv(e,t,n){if(t!=null&&typeof t!="object")throw Error(I(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var r in t)a=t[r],t.hasOwnProperty(r)&&n[r]!==a&&lg(e,r,a)}else for(var l in t)t.hasOwnProperty(l)&&lg(e,l,t[l])}function Gh(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 ZR=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"]]),KR=/^[\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 js(e){return KR.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function oa(){}var gd=null;function Zh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sl=null,xl=null;function og(e){var t=eo(e);if(t&&(e=t.stateNode)){var n=e[Yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(md(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="'+vn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var r=a[Yt]||null;if(!r)throw Error(I(90));md(a,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Uv(a)}break e;case"textarea":Hv(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&El(e,!!n.multiple,t,!1)}}}var af=!1;function Iv(e,t,n){if(af)return e(t,n);af=!0;try{var a=e(t);return a}finally{if(af=!1,(sl!==null||xl!==null)&&(yc(),sl&&(t=sl,e=xl,xl=sl=null,og(t),e)))for(t=0;t<e.length;t++)og(e[t])}}function hi(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Yt]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yd=!1;if(da)try{var wo={};Object.defineProperty(wo,"passive",{get:function(){yd=!0}}),window.addEventListener("test",wo,wo),window.removeEventListener("test",wo,wo)}catch{yd=!1}var Ua=null,Kh=null,Hs=null;function Pv(){if(Hs)return Hs;var e,t=Kh,n=t.length,a,r="value"in Ua?Ua.value:Ua.textContent,l=r.length;for(e=0;e<n&&t[e]===r[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===r[l-a];a++);return Hs=r.slice(e,1<a?1-a:void 0)}function Bs(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 cs(){return!0}function ig(){return!1}function Xt(e){function t(n,a,r,l,o){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=l,this.target=o,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],this[i]=n?n(l):l[i]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?cs:ig,this.isPropagationStopped=ig,this}return Ke(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=cs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cs)},persist:function(){},isPersistent:cs}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oc=Xt(Yr),ji=Ke({},Yr,{view:0,detail:0}),XR=Xt(ji),rf,lf,Ro,ic=Ke({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xh,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!==Ro&&(Ro&&e.type==="mousemove"?(rf=e.screenX-Ro.screenX,lf=e.screenY-Ro.screenY):lf=rf=0,Ro=e),rf)},movementY:function(e){return"movementY"in e?e.movementY:lf}}),sg=Xt(ic),QR=Ke({},ic,{dataTransfer:0}),FR=Xt(QR),JR=Ke({},ji,{relatedTarget:0}),of=Xt(JR),WR=Ke({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),eC=Xt(WR),tC=Ke({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nC=Xt(tC),aC=Ke({},Yr,{data:0}),ug=Xt(aC),rC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lC={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"},oC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oC[e])?!!t[e]:!1}function Xh(){return iC}var sC=Ke({},ji,{key:function(e){if(e.key){var t=rC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xh,charCode:function(e){return e.type==="keypress"?Bs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uC=Xt(sC),cC=Ke({},ic,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cg=Xt(cC),fC=Ke({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xh}),dC=Xt(fC),hC=Ke({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),mC=Xt(hC),pC=Ke({},ic,{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}),gC=Xt(pC),yC=Ke({},Yr,{newState:0,oldState:0}),vC=Xt(yC),bC=[9,13,27,32],Qh=da&&"CompositionEvent"in window,$o=null;da&&"documentMode"in document&&($o=document.documentMode);var SC=da&&"TextEvent"in window&&!$o,qv=da&&(!Qh||$o&&8<$o&&11>=$o),fg=" ",dg=!1;function $v(e,t){switch(e){case"keyup":return bC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ul=!1;function EC(e,t){switch(e){case"compositionend":return Yv(t);case"keypress":return t.which!==32?null:(dg=!0,fg);case"textInput":return e=t.data,e===fg&&dg?null:e;default:return null}}function xC(e,t){if(ul)return e==="compositionend"||!Qh&&$v(e,t)?(e=Pv(),Hs=Kh=Ua=null,ul=!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 qv&&t.locale!=="ko"?null:t.data;default:return null}}var wC={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 hg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wC[e.type]:t==="textarea"}function Gv(e,t,n,a){sl?xl?xl.push(a):xl=[a]:sl=a,t=Lu(t,"onChange"),0<t.length&&(n=new oc("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Yo=null,mi=null;function RC(e){I1(e,0)}function sc(e){var t=zo(e);if(Uv(t))return e}function mg(e,t){if(e==="change")return t}var Zv=!1;if(da){var sf;if(da){var uf="oninput"in document;if(!uf){var pg=document.createElement("div");pg.setAttribute("oninput","return;"),uf=typeof pg.oninput=="function"}sf=uf}else sf=!1;Zv=sf&&(!document.documentMode||9<document.documentMode)}function gg(){Yo&&(Yo.detachEvent("onpropertychange",Kv),mi=Yo=null)}function Kv(e){if(e.propertyName==="value"&&sc(mi)){var t=[];Gv(t,mi,e,Zh(e)),Iv(RC,t)}}function CC(e,t,n){e==="focusin"?(gg(),Yo=t,mi=n,Yo.attachEvent("onpropertychange",Kv)):e==="focusout"&&gg()}function TC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sc(mi)}function MC(e,t){if(e==="click")return sc(t)}function OC(e,t){if(e==="input"||e==="change")return sc(t)}function AC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:AC;function pi(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var r=n[a];if(!fd.call(t,r)||!cn(e[r],t[r]))return!1}return!0}function yg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vg(e,t){var n=yg(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yg(n)}}function Xv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=gu(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=gu(e.document)}return t}function Fh(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 _C=da&&"documentMode"in document&&11>=document.documentMode,cl=null,vd=null,Go=null,bd=!1;function bg(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bd||cl==null||cl!==gu(a)||(a=cl,"selectionStart"in a&&Fh(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Go&&pi(Go,a)||(Go=a,a=Lu(vd,"onSelect"),0<a.length&&(t=new oc("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=cl)))}function pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fl={animationend:pr("Animation","AnimationEnd"),animationiteration:pr("Animation","AnimationIteration"),animationstart:pr("Animation","AnimationStart"),transitionrun:pr("Transition","TransitionRun"),transitionstart:pr("Transition","TransitionStart"),transitioncancel:pr("Transition","TransitionCancel"),transitionend:pr("Transition","TransitionEnd")},cf={},Fv={};da&&(Fv=document.createElement("div").style,"AnimationEvent"in window||(delete fl.animationend.animation,delete fl.animationiteration.animation,delete fl.animationstart.animation),"TransitionEvent"in window||delete fl.transitionend.transition);function Gr(e){if(cf[e])return cf[e];if(!fl[e])return e;var t=fl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fv)return cf[e]=t[n];return e}var Jv=Gr("animationend"),Wv=Gr("animationiteration"),eb=Gr("animationstart"),NC=Gr("transitionrun"),kC=Gr("transitionstart"),DC=Gr("transitioncancel"),tb=Gr("transitionend"),nb=new Map,Sd="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(" ");Sd.push("scrollEnd");function Dn(e,t){nb.set(e,t),$r(t,[e])}var yu=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)},hn=[],dl=0,Jh=0;function uc(){for(var e=dl,t=Jh=dl=0;t<e;){var n=hn[t];hn[t++]=null;var a=hn[t];hn[t++]=null;var r=hn[t];hn[t++]=null;var l=hn[t];if(hn[t++]=null,a!==null&&r!==null){var o=a.pending;o===null?r.next=r:(r.next=o.next,o.next=r),a.pending=r}l!==0&&ab(n,r,l)}}function cc(e,t,n,a){hn[dl++]=e,hn[dl++]=t,hn[dl++]=n,hn[dl++]=a,Jh|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Wh(e,t,n,a){return cc(e,t,n,a),vu(e)}function Zr(e,t){return cc(e,null,null,t),vu(e)}function ab(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var r=!1,l=e.return;l!==null;)l.childLanes|=n,a=l.alternate,a!==null&&(a.childLanes|=n),l.tag===22&&(e=l.stateNode,e===null||e._visibility&1||(r=!0)),e=l,l=l.return;return e.tag===3?(l=e.stateNode,r&&t!==null&&(r=31-sn(n),e=l.hiddenUpdates,a=e[r],a===null?e[r]=[t]:a.push(t),t.lane=n|536870912),l):null}function vu(e){if(50<ti)throw ti=0,Id=null,Error(I(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hl={};function LC(e,t,n,a){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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(e,t,n,a){return new LC(e,t,n,a)}function em(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sa(e,t){var n=e.alternate;return n===null?(n=tn(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 rb(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 Vs(e,t,n,a,r,l){var o=0;if(a=e,typeof e=="function")em(e)&&(o=1);else if(typeof e=="string")o=B4(e,n,Vn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case id:return e=tn(31,n,t,r),e.elementType=id,e.lanes=l,e;case ll:return Or(n.children,r,l,t);case wv:o=8,r|=24;break;case rd:return e=tn(12,n,t,r|2),e.elementType=rd,e.lanes=l,e;case ld:return e=tn(13,n,t,r),e.elementType=ld,e.lanes=l,e;case od:return e=tn(19,n,t,r),e.elementType=od,e.lanes=l,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case la:o=10;break e;case Rv:o=9;break e;case Vh:o=11;break e;case Ih:o=14;break e;case Ma:o=16,a=null;break e}o=29,n=Error(I(130,e===null?"null":typeof e,"")),a=null}return t=tn(o,n,t,r),t.elementType=e,t.type=a,t.lanes=l,t}function Or(e,t,n,a){return e=tn(7,e,a,t),e.lanes=n,e}function ff(e,t,n){return e=tn(6,e,null,t),e.lanes=n,e}function lb(e){var t=tn(18,null,null,0);return t.stateNode=e,t}function df(e,t,n){return t=tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Sg=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var n=Sg.get(e);return n!==void 0?n:(t={value:e,source:t,stack:eg(t)},Sg.set(e,t),t)}return{value:e,source:t,stack:eg(t)}}var ml=[],pl=0,bu=null,gi=0,gn=[],yn=0,nr=null,jn=1,Hn="";function na(e,t){ml[pl++]=gi,ml[pl++]=bu,bu=e,gi=t}function ob(e,t,n){gn[yn++]=jn,gn[yn++]=Hn,gn[yn++]=nr,nr=e;var a=jn;e=Hn;var r=32-sn(a)-1;a&=~(1<<r),n+=1;var l=32-sn(t)+r;if(30<l){var o=r-r%5;l=(a&(1<<o)-1).toString(32),a>>=o,r-=o,jn=1<<32-sn(t)+r|n<<r|a,Hn=l+e}else jn=1<<l|n<<r|a,Hn=e}function tm(e){e.return!==null&&(na(e,1),ob(e,1,0))}function nm(e){for(;e===bu;)bu=ml[--pl],ml[pl]=null,gi=ml[--pl],ml[pl]=null;for(;e===nr;)nr=gn[--yn],gn[yn]=null,Hn=gn[--yn],gn[yn]=null,jn=gn[--yn],gn[yn]=null}function ib(e,t){gn[yn++]=jn,gn[yn++]=Hn,gn[yn++]=nr,jn=t.id,Hn=t.overflow,nr=e}var Tt=null,Ge=null,_e=!1,qa=null,Sn=!1,Ed=Error(I(519));function ar(e){var t=Error(I(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yi(bn(t,e)),Ed}function Eg(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Ct]=e,t[Yt]=a,n){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(n=0;n<Ei.length;n++)Te(Ei[n],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),jv(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),Bv(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||q1(t.textContent,n)?(a.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),a.onScroll!=null&&Te("scroll",t),a.onScrollEnd!=null&&Te("scrollend",t),a.onClick!=null&&(t.onclick=oa),t=!0):t=!1,t||ar(e,!0)}function xg(e){for(Tt=e.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:Sn=!1;return;case 27:case 3:Sn=!0;return;default:Tt=Tt.return}}function Jr(e){if(e!==Tt)return!1;if(!_e)return xg(e),_e=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Gd(e.type,e.memoizedProps)),n=!n),n&&Ge&&ar(e),xg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));Ge=sy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));Ge=sy(e)}else t===27?(t=Ge,ur(e.type)?(e=Qd,Qd=null,Ge=e):Ge=t):Ge=Tt?Cn(e.stateNode.nextSibling):null;return!0}function zr(){Ge=Tt=null,_e=!1}function hf(){var e=qa;return e!==null&&(It===null?It=e:It.push.apply(It,e),qa=null),e}function yi(e){qa===null?qa=[e]:qa.push(e)}var xd=Yn(null),Kr=null,ia=null;function Aa(e,t,n){qe(xd,t._currentValue),t._currentValue=n}function ua(e){e._currentValue=xd.current,Et(xd)}function wd(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Rd(e,t,n,a){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var l=r.dependencies;if(l!==null){var o=r.child;l=l.firstContext;e:for(;l!==null;){var i=l;l=r;for(var s=0;s<t.length;s++)if(i.context===t[s]){l.lanes|=n,i=l.alternate,i!==null&&(i.lanes|=n),wd(l.return,n,e),a||(o=null);break e}l=i.next}}else if(r.tag===18){if(o=r.return,o===null)throw Error(I(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),wd(o,n,e),o=null}else o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===e){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}}function to(e,t,n,a){e=null;for(var r=t,l=!1;r!==null;){if(!l){if(r.flags&524288)l=!0;else if(r.flags&262144)break}if(r.tag===10){var o=r.alternate;if(o===null)throw Error(I(387));if(o=o.memoizedProps,o!==null){var i=r.type;cn(r.pendingProps.value,o.value)||(e!==null?e.push(i):e=[i])}}else if(r===du.current){if(o=r.alternate,o===null)throw Error(I(387));o.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(wi):e=[wi])}r=r.return}e!==null&&Rd(t,e,n,a),t.flags|=262144}function Su(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ur(e){Kr=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mt(e){return sb(Kr,e)}function fs(e,t){return Kr===null&&Ur(e),sb(e,t)}function sb(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ia===null){if(e===null)throw Error(I(308));ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ia=ia.next=t;return n}var zC=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},UC=vt.unstable_scheduleCallback,jC=vt.unstable_NormalPriority,ct={$$typeof:la,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function am(){return{controller:new zC,data:new Map,refCount:0}}function Hi(e){e.refCount--,e.refCount===0&&UC(jC,function(){e.controller.abort()})}var Zo=null,Cd=0,Ul=0,wl=null;function HC(e,t){if(Zo===null){var n=Zo=[];Cd=0,Ul=Om(),wl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Cd++,t.then(wg,wg),t}function wg(){if(--Cd===0&&Zo!==null){wl!==null&&(wl.status="fulfilled");var e=Zo;Zo=null,Ul=0,wl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function BC(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(a.status="rejected",a.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),a}var Rg=ye.S;ye.S=function(e,t){x1=ln(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&HC(e,t),Rg!==null&&Rg(e,t)};var Ar=Yn(null);function rm(){var e=Ar.current;return e!==null?e:Pe.pooledCache}function Is(e,t){t===null?qe(Ar,Ar.current):qe(Ar,t.pool)}function ub(){var e=rm();return e===null?null:{parent:ct._currentValue,pool:e}}var no=Error(I(460)),lm=Error(I(474)),fc=Error(I(542)),Eu={then:function(){}};function Cg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function cb(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(oa,oa),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mg(e),e;default:if(typeof t.status=="string")t.then(oa,oa);else{if(e=Pe,e!==null&&100<e.shellSuspendCounter)throw Error(I(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=a}},function(a){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mg(e),e}throw _r=t,no}}function br(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(_r=n,no):n}}var _r=null;function Tg(){if(_r===null)throw Error(I(459));var e=_r;return _r=null,e}function Mg(e){if(e===no||e===fc)throw Error(I(483))}var Rl=null,vi=0;function ds(e){var t=vi;return vi+=1,Rl===null&&(Rl=[]),cb(Rl,e,t)}function Co(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function hs(e,t){throw t.$$typeof===CR?Error(I(525)):(e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function fb(e){function t(g,y){if(e){var S=g.deletions;S===null?(g.deletions=[y],g.flags|=16):S.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function a(g){for(var y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function r(g,y){return g=sa(g,y),g.index=0,g.sibling=null,g}function l(g,y,S){return g.index=S,e?(S=g.alternate,S!==null?(S=S.index,S<y?(g.flags|=67108866,y):S):(g.flags|=67108866,y)):(g.flags|=1048576,y)}function o(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function i(g,y,S,b){return y===null||y.tag!==6?(y=ff(S,g.mode,b),y.return=g,y):(y=r(y,S),y.return=g,y)}function s(g,y,S,b){var x=S.type;return x===ll?c(g,y,S.props.children,b,S.key):y!==null&&(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ma&&br(x)===y.type)?(y=r(y,S.props),Co(y,S),y.return=g,y):(y=Vs(S.type,S.key,S.props,null,g.mode,b),Co(y,S),y.return=g,y)}function u(g,y,S,b){return y===null||y.tag!==4||y.stateNode.containerInfo!==S.containerInfo||y.stateNode.implementation!==S.implementation?(y=df(S,g.mode,b),y.return=g,y):(y=r(y,S.children||[]),y.return=g,y)}function c(g,y,S,b,x){return y===null||y.tag!==7?(y=Or(S,g.mode,b,x),y.return=g,y):(y=r(y,S),y.return=g,y)}function f(g,y,S){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=ff(""+y,g.mode,S),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ls:return S=Vs(y.type,y.key,y.props,null,g.mode,S),Co(S,y),S.return=g,S;case Do:return y=df(y,g.mode,S),y.return=g,y;case Ma:return y=br(y),f(g,y,S)}if(Lo(y)||xo(y))return y=Or(y,g.mode,S,null),y.return=g,y;if(typeof y.then=="function")return f(g,ds(y),S);if(y.$$typeof===la)return f(g,fs(g,y),S);hs(g,y)}return null}function d(g,y,S,b){var x=y!==null?y.key:null;if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return x!==null?null:i(g,y,""+S,b);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ls:return S.key===x?s(g,y,S,b):null;case Do:return S.key===x?u(g,y,S,b):null;case Ma:return S=br(S),d(g,y,S,b)}if(Lo(S)||xo(S))return x!==null?null:c(g,y,S,b,null);if(typeof S.then=="function")return d(g,y,ds(S),b);if(S.$$typeof===la)return d(g,y,fs(g,S),b);hs(g,S)}return null}function h(g,y,S,b,x){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return g=g.get(S)||null,i(y,g,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ls:return g=g.get(b.key===null?S:b.key)||null,s(y,g,b,x);case Do:return g=g.get(b.key===null?S:b.key)||null,u(y,g,b,x);case Ma:return b=br(b),h(g,y,S,b,x)}if(Lo(b)||xo(b))return g=g.get(S)||null,c(y,g,b,x,null);if(typeof b.then=="function")return h(g,y,S,ds(b),x);if(b.$$typeof===la)return h(g,y,S,fs(y,b),x);hs(y,b)}return null}function p(g,y,S,b){for(var x=null,R=null,w=y,C=y=0,A=null;w!==null&&C<S.length;C++){w.index>C?(A=w,w=null):A=w.sibling;var T=d(g,w,S[C],b);if(T===null){w===null&&(w=A);break}e&&w&&T.alternate===null&&t(g,w),y=l(T,y,C),R===null?x=T:R.sibling=T,R=T,w=A}if(C===S.length)return n(g,w),_e&&na(g,C),x;if(w===null){for(;C<S.length;C++)w=f(g,S[C],b),w!==null&&(y=l(w,y,C),R===null?x=w:R.sibling=w,R=w);return _e&&na(g,C),x}for(w=a(w);C<S.length;C++)A=h(w,g,C,S[C],b),A!==null&&(e&&A.alternate!==null&&w.delete(A.key===null?C:A.key),y=l(A,y,C),R===null?x=A:R.sibling=A,R=A);return e&&w.forEach(function(k){return t(g,k)}),_e&&na(g,C),x}function v(g,y,S,b){if(S==null)throw Error(I(151));for(var x=null,R=null,w=y,C=y=0,A=null,T=S.next();w!==null&&!T.done;C++,T=S.next()){w.index>C?(A=w,w=null):A=w.sibling;var k=d(g,w,T.value,b);if(k===null){w===null&&(w=A);break}e&&w&&k.alternate===null&&t(g,w),y=l(k,y,C),R===null?x=k:R.sibling=k,R=k,w=A}if(T.done)return n(g,w),_e&&na(g,C),x;if(w===null){for(;!T.done;C++,T=S.next())T=f(g,T.value,b),T!==null&&(y=l(T,y,C),R===null?x=T:R.sibling=T,R=T);return _e&&na(g,C),x}for(w=a(w);!T.done;C++,T=S.next())T=h(w,g,C,T.value,b),T!==null&&(e&&T.alternate!==null&&w.delete(T.key===null?C:T.key),y=l(T,y,C),R===null?x=T:R.sibling=T,R=T);return e&&w.forEach(function(M){return t(g,M)}),_e&&na(g,C),x}function E(g,y,S,b){if(typeof S=="object"&&S!==null&&S.type===ll&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ls:e:{for(var x=S.key;y!==null;){if(y.key===x){if(x=S.type,x===ll){if(y.tag===7){n(g,y.sibling),b=r(y,S.props.children),b.return=g,g=b;break e}}else if(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ma&&br(x)===y.type){n(g,y.sibling),b=r(y,S.props),Co(b,S),b.return=g,g=b;break e}n(g,y);break}else t(g,y);y=y.sibling}S.type===ll?(b=Or(S.props.children,g.mode,b,S.key),b.return=g,g=b):(b=Vs(S.type,S.key,S.props,null,g.mode,b),Co(b,S),b.return=g,g=b)}return o(g);case Do:e:{for(x=S.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===S.containerInfo&&y.stateNode.implementation===S.implementation){n(g,y.sibling),b=r(y,S.children||[]),b.return=g,g=b;break e}else{n(g,y);break}else t(g,y);y=y.sibling}b=df(S,g.mode,b),b.return=g,g=b}return o(g);case Ma:return S=br(S),E(g,y,S,b)}if(Lo(S))return p(g,y,S,b);if(xo(S)){if(x=xo(S),typeof x!="function")throw Error(I(150));return S=x.call(S),v(g,y,S,b)}if(typeof S.then=="function")return E(g,y,ds(S),b);if(S.$$typeof===la)return E(g,y,fs(g,S),b);hs(g,S)}return typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint"?(S=""+S,y!==null&&y.tag===6?(n(g,y.sibling),b=r(y,S),b.return=g,g=b):(n(g,y),b=ff(S,g.mode,b),b.return=g,g=b),o(g)):n(g,y)}return function(g,y,S,b){try{vi=0;var x=E(g,y,S,b);return Rl=null,x}catch(w){if(w===no||w===fc)throw w;var R=tn(29,w,null,g.mode);return R.lanes=b,R.return=g,R}finally{}}}var jr=fb(!0),db=fb(!1),Oa=!1;function om(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Td(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 $a(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,Le&2){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,t=vu(e),ab(e,null,n),t}return cc(e,a,t,n),vu(e)}function Ko(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,_v(e,n)}}function mf(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var r=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};l===null?r=l=o:l=l.next=o,n=n.next}while(n!==null);l===null?r=l=t:l=l.next=t}else r=l=t;n={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:l,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Md=!1;function Xo(){if(Md){var e=wl;if(e!==null)throw e}}function Qo(e,t,n,a){Md=!1;var r=e.updateQueue;Oa=!1;var l=r.firstBaseUpdate,o=r.lastBaseUpdate,i=r.shared.pending;if(i!==null){r.shared.pending=null;var s=i,u=s.next;s.next=null,o===null?l=u:o.next=u,o=s;var c=e.alternate;c!==null&&(c=c.updateQueue,i=c.lastBaseUpdate,i!==o&&(i===null?c.firstBaseUpdate=u:i.next=u,c.lastBaseUpdate=s))}if(l!==null){var f=r.baseState;o=0,c=u=s=null,i=l;do{var d=i.lane&-536870913,h=d!==i.lane;if(h?(Ae&d)===d:(a&d)===d){d!==0&&d===Ul&&(Md=!0),c!==null&&(c=c.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var p=e,v=i;d=t;var E=n;switch(v.tag){case 1:if(p=v.payload,typeof p=="function"){f=p.call(E,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=v.payload,d=typeof p=="function"?p.call(E,f,d):p,d==null)break e;f=Ke({},f,d);break e;case 2:Oa=!0}}d=i.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=r.callbacks,h===null?r.callbacks=[d]:h.push(d))}else h={lane:d,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=h,s=f):c=c.next=h,o|=d;if(i=i.next,i===null){if(i=r.shared.pending,i===null)break;h=i,i=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);c===null&&(s=f),r.baseState=s,r.firstBaseUpdate=u,r.lastBaseUpdate=c,l===null&&(r.shared.lanes=0),lr|=o,e.lanes=o,e.memoizedState=f}}function hb(e,t){if(typeof e!="function")throw Error(I(191,e));e.call(t)}function mb(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)hb(n[e],t)}var jl=Yn(null),xu=Yn(0);function Og(e,t){e=ga,qe(xu,e),qe(jl,t),ga=e|t.baseLanes}function Od(){qe(xu,ga),qe(jl,jl.current)}function im(){ga=xu.current,Et(jl),Et(xu)}var fn=Yn(null),Rn=null;function _a(e){var t=e.alternate;qe(lt,lt.current&1),qe(fn,e),Rn===null&&(t===null||jl.current!==null||t.memoizedState!==null)&&(Rn=e)}function Ad(e){qe(lt,lt.current),qe(fn,e),Rn===null&&(Rn=e)}function pb(e){e.tag===22?(qe(lt,lt.current),qe(fn,e),Rn===null&&(Rn=e)):Na()}function Na(){qe(lt,lt.current),qe(fn,fn.current)}function Wt(e){Et(fn),Rn===e&&(Rn=null),Et(lt)}var lt=Yn(0);function wu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Kd(n)||Xd(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 ha=0,Se=null,Ie=null,st=null,Ru=!1,Cl=!1,Hr=!1,Cu=0,bi=0,Tl=null,VC=0;function et(){throw Error(I(321))}function sm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cn(e[n],t[n]))return!1;return!0}function um(e,t,n,a,r,l){return ha=l,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ye.H=e===null||e.memoizedState===null?Gb:Sm,Hr=!1,l=n(a,r),Hr=!1,Cl&&(l=yb(t,n,a,r)),gb(e),l}function gb(e){ye.H=Si;var t=Ie!==null&&Ie.next!==null;if(ha=0,st=Ie=Se=null,Ru=!1,bi=0,Tl=null,t)throw Error(I(300));e===null||ft||(e=e.dependencies,e!==null&&Su(e)&&(ft=!0))}function yb(e,t,n,a){Se=e;var r=0;do{if(Cl&&(Tl=null),bi=0,Cl=!1,25<=r)throw Error(I(301));if(r+=1,st=Ie=null,e.updateQueue!=null){var l=e.updateQueue;l.lastEffect=null,l.events=null,l.stores=null,l.memoCache!=null&&(l.memoCache.index=0)}ye.H=Zb,l=t(n,a)}while(Cl);return l}function IC(){var e=ye.H,t=e.useState()[0];return t=typeof t.then=="function"?Bi(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(Se.flags|=1024),t}function cm(){var e=Cu!==0;return Cu=0,e}function fm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function dm(e){if(Ru){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ru=!1}ha=0,st=Ie=Se=null,Cl=!1,bi=Cu=0,Tl=null}function kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Se.memoizedState=st=e:st=st.next=e,st}function ot(){if(Ie===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=st===null?Se.memoizedState:st.next;if(t!==null)st=t,Ie=e;else{if(e===null)throw Se.alternate===null?Error(I(467)):Error(I(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},st===null?Se.memoizedState=st=e:st=st.next=e}return st}function dc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bi(e){var t=bi;return bi+=1,Tl===null&&(Tl=[]),e=cb(Tl,e,t),t=Se,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,ye.H=t===null||t.memoizedState===null?Gb:Sm),e}function hc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Bi(e);if(e.$$typeof===la)return Mt(e)}throw Error(I(438,String(e)))}function hm(e){var t=null,n=Se.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Se.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=dc(),Se.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=TR;return t.index++,n}function ma(e,t){return typeof t=="function"?t(e):t}function Ps(e){var t=ot();return mm(t,Ie,e)}function mm(e,t,n){var a=e.queue;if(a===null)throw Error(I(311));a.lastRenderedReducer=n;var r=e.baseQueue,l=a.pending;if(l!==null){if(r!==null){var o=r.next;r.next=l.next,l.next=o}t.baseQueue=r=l,a.pending=null}if(l=e.baseState,r===null)e.memoizedState=l;else{t=r.next;var i=o=null,s=null,u=t,c=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(Ae&f)===f:(ha&f)===f){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}),f===Ul&&(c=!0);else if((ha&d)===d){u=u.next,d===Ul&&(c=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(i=s=f,o=l):s=s.next=f,Se.lanes|=d,lr|=d;f=u.action,Hr&&n(l,f),l=u.hasEagerState?u.eagerState:n(l,f)}else d={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(i=s=d,o=l):s=s.next=d,Se.lanes|=f,lr|=f;u=u.next}while(u!==null&&u!==t);if(s===null?o=l:s.next=i,!cn(l,e.memoizedState)&&(ft=!0,c&&(n=wl,n!==null)))throw n;e.memoizedState=l,e.baseState=o,e.baseQueue=s,a.lastRenderedState=l}return r===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function pf(e){var t=ot(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var a=n.dispatch,r=n.pending,l=t.memoizedState;if(r!==null){n.pending=null;var o=r=r.next;do l=e(l,o.action),o=o.next;while(o!==r);cn(l,t.memoizedState)||(ft=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,a]}function vb(e,t,n){var a=Se,r=ot(),l=_e;if(l){if(n===void 0)throw Error(I(407));n=n()}else n=t();var o=!cn((Ie||r).memoizedState,n);if(o&&(r.memoizedState=n,ft=!0),r=r.queue,pm(Eb.bind(null,a,r,e),[e]),r.getSnapshot!==t||o||st!==null&&st.memoizedState.tag&1){if(a.flags|=2048,Hl(9,{destroy:void 0},Sb.bind(null,a,r,n,t),null),Pe===null)throw Error(I(349));l||ha&127||bb(a,t,n)}return n}function bb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t=dc(),Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Sb(e,t,n,a){t.value=n,t.getSnapshot=a,xb(t)&&wb(e)}function Eb(e,t,n){return n(function(){xb(t)&&wb(e)})}function xb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cn(e,n)}catch{return!0}}function wb(e){var t=Zr(e,2);t!==null&&qt(t,e,2)}function _d(e){var t=kt();if(typeof e=="function"){var n=e;if(e=n(),Hr){za(!0);try{n()}finally{za(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:e},t}function Rb(e,t,n,a){return e.baseState=n,mm(e,Ie,typeof a=="function"?a:ma)}function PC(e,t,n,a,r){if(pc(e))throw Error(I(485));if(e=t.action,e!==null){var l={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){l.listeners.push(o)}};ye.T!==null?n(!0):l.isTransition=!1,a(l),n=t.pending,n===null?(l.next=t.pending=l,Cb(t,l)):(l.next=n.next,t.pending=n.next=l)}}function Cb(e,t){var n=t.action,a=t.payload,r=e.state;if(t.isTransition){var l=ye.T,o={};ye.T=o;try{var i=n(r,a),s=ye.S;s!==null&&s(o,i),Ag(e,t,i)}catch(u){Nd(e,t,u)}finally{l!==null&&o.types!==null&&(l.types=o.types),ye.T=l}}else try{l=n(r,a),Ag(e,t,l)}catch(u){Nd(e,t,u)}}function Ag(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){_g(e,t,a)},function(a){return Nd(e,t,a)}):_g(e,t,n)}function _g(e,t,n){t.status="fulfilled",t.value=n,Tb(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Cb(e,n)))}function Nd(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Tb(t),t=t.next;while(t!==a)}e.action=null}function Tb(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Mb(e,t){return t}function Ng(e,t){if(_e){var n=Pe.formState;if(n!==null){e:{var a=Se;if(_e){if(Ge){t:{for(var r=Ge,l=Sn;r.nodeType!==8;){if(!l){r=null;break t}if(r=Cn(r.nextSibling),r===null){r=null;break t}}l=r.data,r=l==="F!"||l==="F"?r:null}if(r){Ge=Cn(r.nextSibling),a=r.data==="F!";break e}}ar(a)}a=!1}a&&(t=n[0])}}return n=kt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mb,lastRenderedState:t},n.queue=a,n=qb.bind(null,Se,a),a.dispatch=n,a=_d(!1),l=bm.bind(null,Se,!1,a.queue),a=kt(),r={state:t,dispatch:null,action:e,pending:null},a.queue=r,n=PC.bind(null,Se,r,l,n),r.dispatch=n,a.memoizedState=e,[t,n,!1]}function kg(e){var t=ot();return Ob(t,Ie,e)}function Ob(e,t,n){if(t=mm(e,t,Mb)[0],e=Ps(ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Bi(t)}catch(o){throw o===no?fc:o}else a=t;t=ot();var r=t.queue,l=r.dispatch;return n!==t.memoizedState&&(Se.flags|=2048,Hl(9,{destroy:void 0},qC.bind(null,r,n),null)),[a,l,e]}function qC(e,t){e.action=t}function Dg(e){var t=ot(),n=Ie;if(n!==null)return Ob(t,n,e);ot(),t=t.memoizedState,n=ot();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Hl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Se.updateQueue,t===null&&(t=dc(),Se.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Ab(){return ot().memoizedState}function qs(e,t,n,a){var r=kt();Se.flags|=e,r.memoizedState=Hl(1|t,{destroy:void 0},n,a===void 0?null:a)}function mc(e,t,n,a){var r=ot();a=a===void 0?null:a;var l=r.memoizedState.inst;Ie!==null&&a!==null&&sm(a,Ie.memoizedState.deps)?r.memoizedState=Hl(t,l,n,a):(Se.flags|=e,r.memoizedState=Hl(1|t,l,n,a))}function Lg(e,t){qs(8390656,8,e,t)}function pm(e,t){mc(2048,8,e,t)}function $C(e){Se.flags|=4;var t=Se.updateQueue;if(t===null)t=dc(),Se.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _b(e){var t=ot().memoizedState;return $C({ref:t,nextImpl:e}),function(){if(Le&2)throw Error(I(440));return t.impl.apply(void 0,arguments)}}function Nb(e,t){return mc(4,2,e,t)}function kb(e,t){return mc(4,4,e,t)}function Db(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 Lb(e,t,n){n=n!=null?n.concat([e]):null,mc(4,4,Db.bind(null,t,e),n)}function gm(){}function zb(e,t){var n=ot();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&sm(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Ub(e,t){var n=ot();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&sm(t,a[1]))return a[0];if(a=e(),Hr){za(!0);try{e()}finally{za(!1)}}return n.memoizedState=[a,t],a}function ym(e,t,n){return n===void 0||ha&1073741824&&!(Ae&261930)?e.memoizedState=t:(e.memoizedState=n,e=R1(),Se.lanes|=e,lr|=e,n)}function jb(e,t,n,a){return cn(n,t)?n:jl.current!==null?(e=ym(e,n,a),cn(e,t)||(ft=!0),e):!(ha&42)||ha&1073741824&&!(Ae&261930)?(ft=!0,e.memoizedState=n):(e=R1(),Se.lanes|=e,lr|=e,t)}function Hb(e,t,n,a,r){var l=ze.p;ze.p=l!==0&&8>l?l:8;var o=ye.T,i={};ye.T=i,bm(e,!1,t,n);try{var s=r(),u=ye.S;if(u!==null&&u(i,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=BC(s,a);Fo(e,t,c,un(e))}else Fo(e,t,a,un(e))}catch(f){Fo(e,t,{then:function(){},status:"rejected",reason:f},un())}finally{ze.p=l,o!==null&&i.types!==null&&(o.types=i.types),ye.T=o}}function YC(){}function kd(e,t,n,a){if(e.tag!==5)throw Error(I(476));var r=Bb(e).queue;Hb(e,r,t,Mr,n===null?YC:function(){return Vb(e),n(a)})}function Bb(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Mr,baseState:Mr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:Mr},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Vb(e){var t=Bb(e);t.next===null&&(t=e.alternate.memoizedState),Fo(e,t.next.queue,{},un())}function vm(){return Mt(wi)}function Ib(){return ot().memoizedState}function Pb(){return ot().memoizedState}function GC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=un();e=$a(n);var a=Ya(t,e,n);a!==null&&(qt(a,t,n),Ko(a,t,n)),t={cache:am()},e.payload=t;return}t=t.return}}function ZC(e,t,n){var a=un();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},pc(e)?$b(t,n):(n=Wh(e,t,n,a),n!==null&&(qt(n,e,a),Yb(n,t,a)))}function qb(e,t,n){var a=un();Fo(e,t,n,a)}function Fo(e,t,n,a){var r={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(pc(e))$b(t,r);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var o=t.lastRenderedState,i=l(o,n);if(r.hasEagerState=!0,r.eagerState=i,cn(i,o))return cc(e,t,r,0),Pe===null&&uc(),!1}catch{}finally{}if(n=Wh(e,t,r,a),n!==null)return qt(n,e,a),Yb(n,t,a),!0}return!1}function bm(e,t,n,a){if(a={lane:2,revertLane:Om(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},pc(e)){if(t)throw Error(I(479))}else t=Wh(e,n,a,2),t!==null&&qt(t,e,2)}function pc(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function $b(e,t){Cl=Ru=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Yb(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,_v(e,n)}}var Si={readContext:Mt,use:hc,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Si.useEffectEvent=et;var Gb={readContext:Mt,use:hc,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:Lg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,qs(4194308,4,Db.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qs(4194308,4,e,t)},useInsertionEffect:function(e,t){qs(4,2,e,t)},useMemo:function(e,t){var n=kt();t=t===void 0?null:t;var a=e();if(Hr){za(!0);try{e()}finally{za(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=kt();if(n!==void 0){var r=n(t);if(Hr){za(!0);try{n(t)}finally{za(!1)}}}else r=t;return a.memoizedState=a.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=ZC.bind(null,Se,e),[a.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:function(e){e=_d(e);var t=e.queue,n=qb.bind(null,Se,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gm,useDeferredValue:function(e,t){var n=kt();return ym(n,e,t)},useTransition:function(){var e=_d(!1);return e=Hb.bind(null,Se,e.queue,!0,!1),kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Se,r=kt();if(_e){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Pe===null)throw Error(I(349));Ae&127||bb(a,t,n)}r.memoizedState=n;var l={value:n,getSnapshot:t};return r.queue=l,Lg(Eb.bind(null,a,l,e),[e]),a.flags|=2048,Hl(9,{destroy:void 0},Sb.bind(null,a,l,n,t),null),n},useId:function(){var e=kt(),t=Pe.identifierPrefix;if(_e){var n=Hn,a=jn;n=(a&~(1<<32-sn(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Cu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=VC++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vm,useFormState:Ng,useActionState:Ng,useOptimistic:function(e){var t=kt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=bm.bind(null,Se,!0,n),n.dispatch=t,[e,t]},useMemoCache:hm,useCacheRefresh:function(){return kt().memoizedState=GC.bind(null,Se)},useEffectEvent:function(e){var t=kt(),n={impl:e};return t.memoizedState=n,function(){if(Le&2)throw Error(I(440));return n.impl.apply(void 0,arguments)}}},Sm={readContext:Mt,use:hc,useCallback:zb,useContext:Mt,useEffect:pm,useImperativeHandle:Lb,useInsertionEffect:Nb,useLayoutEffect:kb,useMemo:Ub,useReducer:Ps,useRef:Ab,useState:function(){return Ps(ma)},useDebugValue:gm,useDeferredValue:function(e,t){var n=ot();return jb(n,Ie.memoizedState,e,t)},useTransition:function(){var e=Ps(ma)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Bi(e),t]},useSyncExternalStore:vb,useId:Ib,useHostTransitionStatus:vm,useFormState:kg,useActionState:kg,useOptimistic:function(e,t){var n=ot();return Rb(n,Ie,e,t)},useMemoCache:hm,useCacheRefresh:Pb};Sm.useEffectEvent=_b;var Zb={readContext:Mt,use:hc,useCallback:zb,useContext:Mt,useEffect:pm,useImperativeHandle:Lb,useInsertionEffect:Nb,useLayoutEffect:kb,useMemo:Ub,useReducer:pf,useRef:Ab,useState:function(){return pf(ma)},useDebugValue:gm,useDeferredValue:function(e,t){var n=ot();return Ie===null?ym(n,e,t):jb(n,Ie.memoizedState,e,t)},useTransition:function(){var e=pf(ma)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Bi(e),t]},useSyncExternalStore:vb,useId:Ib,useHostTransitionStatus:vm,useFormState:Dg,useActionState:Dg,useOptimistic:function(e,t){var n=ot();return Ie!==null?Rb(n,Ie,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:hm,useCacheRefresh:Pb};Zb.useEffectEvent=_b;function gf(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Dd={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=un(),r=$a(a);r.payload=t,n!=null&&(r.callback=n),t=Ya(e,r,a),t!==null&&(qt(t,e,a),Ko(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=un(),r=$a(a);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=Ya(e,r,a),t!==null&&(qt(t,e,a),Ko(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=un(),a=$a(n);a.tag=2,t!=null&&(a.callback=t),t=Ya(e,a,n),t!==null&&(qt(t,e,n),Ko(t,e,n))}};function zg(e,t,n,a,r,l,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,l,o):t.prototype&&t.prototype.isPureReactComponent?!pi(n,a)||!pi(r,l):!0}function Ug(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Dd.enqueueReplaceState(t,t.state,null)}function Br(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=Ke({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function Kb(e){yu(e)}function Xb(e){console.error(e)}function Qb(e){yu(e)}function Tu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function jg(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Ld(e,t,n){return n=$a(n),n.tag=3,n.payload={element:null},n.callback=function(){Tu(e,t)},n}function Fb(e){return e=$a(e),e.tag=3,e}function Jb(e,t,n,a){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var l=a.value;e.payload=function(){return r(l)},e.callback=function(){jg(t,n,a)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){jg(t,n,a),typeof r!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var i=a.stack;this.componentDidCatch(a.value,{componentStack:i!==null?i:""})})}function KC(e,t,n,a,r){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&to(t,n,r,!0),n=fn.current,n!==null){switch(n.tag){case 31:case 13:return Rn===null?Nu():n.alternate===null&&tt===0&&(tt=3),n.flags&=-257,n.flags|=65536,n.lanes=r,a===Eu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Mf(e,a,r)),!1;case 22:return n.flags|=65536,a===Eu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Mf(e,a,r)),!1}throw Error(I(435,n.tag))}return Mf(e,a,r),Nu(),!1}if(_e)return t=fn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,a!==Ed&&(e=Error(I(422),{cause:a}),yi(bn(e,n)))):(a!==Ed&&(t=Error(I(423),{cause:a}),yi(bn(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,a=bn(a,n),r=Ld(e.stateNode,a,r),mf(e,r),tt!==4&&(tt=2)),!1;var l=Error(I(520),{cause:a});if(l=bn(l,n),ei===null?ei=[l]:ei.push(l),tt!==4&&(tt=2),t===null)return!0;a=bn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Ld(n.stateNode,a,e),mf(n,e),!1;case 1:if(t=n.type,l=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Ga===null||!Ga.has(l))))return n.flags|=65536,r&=-r,n.lanes|=r,r=Fb(r),Jb(r,e,n,a),mf(n,r),!1}n=n.return}while(n!==null);return!1}var Em=Error(I(461)),ft=!1;function xt(e,t,n,a){t.child=e===null?db(t,null,n,a):jr(t,e.child,n,a)}function Hg(e,t,n,a,r){n=n.render;var l=t.ref;if("ref"in a){var o={};for(var i in a)i!=="ref"&&(o[i]=a[i])}else o=a;return Ur(t),a=um(e,t,n,o,l,r),i=cm(),e!==null&&!ft?(fm(e,t,r),pa(e,t,r)):(_e&&i&&tm(t),t.flags|=1,xt(e,t,a,r),t.child)}function Bg(e,t,n,a,r){if(e===null){var l=n.type;return typeof l=="function"&&!em(l)&&l.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=l,Wb(e,t,l,a,r)):(e=Vs(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!xm(e,r)){var o=l.memoizedProps;if(n=n.compare,n=n!==null?n:pi,n(o,a)&&e.ref===t.ref)return pa(e,t,r)}return t.flags|=1,e=sa(l,a),e.ref=t.ref,e.return=t,t.child=e}function Wb(e,t,n,a,r){if(e!==null){var l=e.memoizedProps;if(pi(l,a)&&e.ref===t.ref)if(ft=!1,t.pendingProps=a=l,xm(e,r))e.flags&131072&&(ft=!0);else return t.lanes=e.lanes,pa(e,t,r)}return zd(e,t,n,a,r)}function e1(e,t,n,a){var r=a.children,l=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if(t.flags&128){if(l=l!==null?l.baseLanes|n:n,e!==null){for(a=t.child=e.child,r=0;a!==null;)r=r|a.lanes|a.childLanes,a=a.sibling;a=r&~l}else a=0,t.child=null;return Vg(e,t,l,n,a)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Is(t,l!==null?l.cachePool:null),l!==null?Og(t,l):Od(),pb(t);else return a=t.lanes=536870912,Vg(e,t,l!==null?l.baseLanes|n:n,n,a)}else l!==null?(Is(t,l.cachePool),Og(t,l),Na(),t.memoizedState=null):(e!==null&&Is(t,null),Od(),Na());return xt(e,t,r,n),t.child}function Uo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vg(e,t,n,a,r){var l=rm();return l=l===null?null:{parent:ct._currentValue,pool:l},t.memoizedState={baseLanes:n,cachePool:l},e!==null&&Is(t,null),Od(),pb(t),e!==null&&to(e,t,a,!0),t.childLanes=r,null}function $s(e,t){return t=Mu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ig(e,t,n){return jr(t,e.child,null,n),e=$s(t,t.pendingProps),e.flags|=2,Wt(t),t.memoizedState=null,e}function XC(e,t,n){var a=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(_e){if(a.mode==="hidden")return e=$s(t,a),t.lanes=536870912,Uo(null,e);if(Ad(t),(e=Ge)?(e=G1(e,Sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:nr!==null?{id:jn,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},n=lb(e),n.return=t,t.child=n,Tt=t,Ge=null)):e=null,e===null)throw ar(t);return t.lanes=536870912,null}return $s(t,a)}var l=e.memoizedState;if(l!==null){var o=l.dehydrated;if(Ad(t),r)if(t.flags&256)t.flags&=-257,t=Ig(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(I(558));else if(ft||to(e,t,n,!1),r=(n&e.childLanes)!==0,ft||r){if(a=Pe,a!==null&&(o=Nv(a,n),o!==0&&o!==l.retryLane))throw l.retryLane=o,Zr(e,o),qt(a,e,o),Em;Nu(),t=Ig(e,t,n)}else e=l.treeContext,Ge=Cn(o.nextSibling),Tt=t,_e=!0,qa=null,Sn=!1,e!==null&&ib(t,e),t=$s(t,a),t.flags|=4096;return t}return e=sa(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ys(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(I(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function zd(e,t,n,a,r){return Ur(t),n=um(e,t,n,a,void 0,r),a=cm(),e!==null&&!ft?(fm(e,t,r),pa(e,t,r)):(_e&&a&&tm(t),t.flags|=1,xt(e,t,n,r),t.child)}function Pg(e,t,n,a,r,l){return Ur(t),t.updateQueue=null,n=yb(t,a,n,r),gb(e),a=cm(),e!==null&&!ft?(fm(e,t,l),pa(e,t,l)):(_e&&a&&tm(t),t.flags|=1,xt(e,t,n,l),t.child)}function qg(e,t,n,a,r){if(Ur(t),t.stateNode===null){var l=hl,o=n.contextType;typeof o=="object"&&o!==null&&(l=Mt(o)),l=new n(a,l),t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Dd,t.stateNode=l,l._reactInternals=t,l=t.stateNode,l.props=a,l.state=t.memoizedState,l.refs={},om(t),o=n.contextType,l.context=typeof o=="object"&&o!==null?Mt(o):hl,l.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(gf(t,n,o,a),l.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(o=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),o!==l.state&&Dd.enqueueReplaceState(l,l.state,null),Qo(t,a,l,r),Xo(),l.state=t.memoizedState),typeof l.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){l=t.stateNode;var i=t.memoizedProps,s=Br(n,i);l.props=s;var u=l.context,c=n.contextType;o=hl,typeof c=="object"&&c!==null&&(o=Mt(c));var f=n.getDerivedStateFromProps;c=typeof f=="function"||typeof l.getSnapshotBeforeUpdate=="function",i=t.pendingProps!==i,c||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(i||u!==o)&&Ug(t,l,a,o),Oa=!1;var d=t.memoizedState;l.state=d,Qo(t,a,l,r),Xo(),u=t.memoizedState,i||d!==u||Oa?(typeof f=="function"&&(gf(t,n,f,a),u=t.memoizedState),(s=Oa||zg(t,n,s,a,d,u,o))?(c||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=u),l.props=a,l.state=u,l.context=o,a=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{l=t.stateNode,Td(e,t),o=t.memoizedProps,c=Br(n,o),l.props=c,f=t.pendingProps,d=l.context,u=n.contextType,s=hl,typeof u=="object"&&u!==null&&(s=Mt(u)),i=n.getDerivedStateFromProps,(u=typeof i=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==f||d!==s)&&Ug(t,l,a,s),Oa=!1,d=t.memoizedState,l.state=d,Qo(t,a,l,r),Xo();var h=t.memoizedState;o!==f||d!==h||Oa||e!==null&&e.dependencies!==null&&Su(e.dependencies)?(typeof i=="function"&&(gf(t,n,i,a),h=t.memoizedState),(c=Oa||zg(t,n,c,a,d,h,s)||e!==null&&e.dependencies!==null&&Su(e.dependencies))?(u||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(a,h,s),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(a,h,s)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=h),l.props=a,l.state=h,l.context=s,a=c):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),a=!1)}return l=a,Ys(e,t),a=(t.flags&128)!==0,l||a?(l=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:l.render(),t.flags|=1,e!==null&&a?(t.child=jr(t,e.child,null,r),t.child=jr(t,null,n,r)):xt(e,t,n,r),t.memoizedState=l.state,e=t.child):e=pa(e,t,r),e}function $g(e,t,n,a){return zr(),t.flags|=256,xt(e,t,n,a),t.child}var yf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vf(e){return{baseLanes:e,cachePool:ub()}}function bf(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=nn),e}function t1(e,t,n){var a=t.pendingProps,r=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(lt.current&2)!==0),o&&(r=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(_e){if(r?_a(t):Na(),(e=Ge)?(e=G1(e,Sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:nr!==null?{id:jn,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},n=lb(e),n.return=t,t.child=n,Tt=t,Ge=null)):e=null,e===null)throw ar(t);return Xd(e)?t.lanes=32:t.lanes=536870912,null}var i=a.children;return a=a.fallback,r?(Na(),r=t.mode,i=Mu({mode:"hidden",children:i},r),a=Or(a,r,n,null),i.return=t,a.return=t,i.sibling=a,t.child=i,a=t.child,a.memoizedState=vf(n),a.childLanes=bf(e,o,n),t.memoizedState=yf,Uo(null,a)):(_a(t),Ud(t,i))}var s=e.memoizedState;if(s!==null&&(i=s.dehydrated,i!==null)){if(l)t.flags&256?(_a(t),t.flags&=-257,t=Sf(e,t,n)):t.memoizedState!==null?(Na(),t.child=e.child,t.flags|=128,t=null):(Na(),i=a.fallback,r=t.mode,a=Mu({mode:"visible",children:a.children},r),i=Or(i,r,n,null),i.flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,jr(t,e.child,null,n),a=t.child,a.memoizedState=vf(n),a.childLanes=bf(e,o,n),t.memoizedState=yf,t=Uo(null,a));else if(_a(t),Xd(i)){if(o=i.nextSibling&&i.nextSibling.dataset,o)var u=o.dgst;o=u,a=Error(I(419)),a.stack="",a.digest=o,yi({value:a,source:null,stack:null}),t=Sf(e,t,n)}else if(ft||to(e,t,n,!1),o=(n&e.childLanes)!==0,ft||o){if(o=Pe,o!==null&&(a=Nv(o,n),a!==0&&a!==s.retryLane))throw s.retryLane=a,Zr(e,a),qt(o,e,a),Em;Kd(i)||Nu(),t=Sf(e,t,n)}else Kd(i)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,Ge=Cn(i.nextSibling),Tt=t,_e=!0,qa=null,Sn=!1,e!==null&&ib(t,e),t=Ud(t,a.children),t.flags|=4096);return t}return r?(Na(),i=a.fallback,r=t.mode,s=e.child,u=s.sibling,a=sa(s,{mode:"hidden",children:a.children}),a.subtreeFlags=s.subtreeFlags&65011712,u!==null?i=sa(u,i):(i=Or(i,r,n,null),i.flags|=2),i.return=t,a.return=t,a.sibling=i,t.child=a,Uo(null,a),a=t.child,i=e.child.memoizedState,i===null?i=vf(n):(r=i.cachePool,r!==null?(s=ct._currentValue,r=r.parent!==s?{parent:s,pool:s}:r):r=ub(),i={baseLanes:i.baseLanes|n,cachePool:r}),a.memoizedState=i,a.childLanes=bf(e,o,n),t.memoizedState=yf,Uo(e.child,a)):(_a(t),n=e.child,e=n.sibling,n=sa(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Ud(e,t){return t=Mu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mu(e,t){return e=tn(22,e,null,t),e.lanes=0,e}function Sf(e,t,n){return jr(t,e.child,null,n),e=Ud(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yg(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),wd(e.return,t,n)}function Ef(e,t,n,a,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:r,treeForkCount:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=n,o.tailMode=r,o.treeForkCount=l)}function n1(e,t,n){var a=t.pendingProps,r=a.revealOrder,l=a.tail;a=a.children;var o=lt.current,i=(o&2)!==0;if(i?(o=o&1|2,t.flags|=128):o&=1,qe(lt,o),xt(e,t,a,n),a=_e?gi:0,!i&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yg(e,n,t);else if(e.tag===19)Yg(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(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&wu(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Ef(t,!1,r,n,l,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&wu(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Ef(t,!0,n,null,l,a);break;case"together":Ef(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function pa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),lr|=t.lanes,!(n&t.childLanes))if(e!==null){if(to(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=sa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xm(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Su(e)))}function QC(e,t,n){switch(t.tag){case 3:hu(t,t.stateNode.containerInfo),Aa(t,ct,e.memoizedState.cache),zr();break;case 27:case 5:cd(t);break;case 4:hu(t,t.stateNode.containerInfo);break;case 10:Aa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ad(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(_a(t),t.flags|=128,null):n&t.child.childLanes?t1(e,t,n):(_a(t),e=pa(e,t,n),e!==null?e.sibling:null);_a(t);break;case 19:var r=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(to(e,t,n,!1),a=(n&t.childLanes)!==0),r){if(a)return n1(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),qe(lt,lt.current),a)break;return null;case 22:return t.lanes=0,e1(e,t,n,t.pendingProps);case 24:Aa(t,ct,e.memoizedState.cache)}return pa(e,t,n)}function a1(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!xm(e,n)&&!(t.flags&128))return ft=!1,QC(e,t,n);ft=!!(e.flags&131072)}else ft=!1,_e&&t.flags&1048576&&ob(t,gi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=br(t.elementType),t.type=e,typeof e=="function")em(e)?(a=Br(e,a),t.tag=1,t=qg(null,t,e,a,n)):(t.tag=0,t=zd(null,t,e,a,n));else{if(e!=null){var r=e.$$typeof;if(r===Vh){t.tag=11,t=Hg(null,t,e,a,n);break e}else if(r===Ih){t.tag=14,t=Bg(null,t,e,a,n);break e}}throw t=sd(e)||e,Error(I(306,t,""))}}return t;case 0:return zd(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,r=Br(a,t.pendingProps),qg(e,t,a,r,n);case 3:e:{if(hu(t,t.stateNode.containerInfo),e===null)throw Error(I(387));a=t.pendingProps;var l=t.memoizedState;r=l.element,Td(e,t),Qo(t,a,null,n);var o=t.memoizedState;if(a=o.cache,Aa(t,ct,a),a!==l.cache&&Rd(t,[ct],n,!0),Xo(),a=o.element,l.isDehydrated)if(l={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){t=$g(e,t,a,n);break e}else if(a!==r){r=bn(Error(I(424)),t),yi(r),t=$g(e,t,a,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(Ge=Cn(e.firstChild),Tt=t,_e=!0,qa=null,Sn=!0,n=db(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zr(),a===r){t=pa(e,t,n);break e}xt(e,t,a,n)}t=t.child}return t;case 26:return Ys(e,t),e===null?(n=fy(t.type,null,t.pendingProps,null))?t.memoizedState=n:_e||(n=t.type,e=t.pendingProps,a=zu(Pa.current).createElement(n),a[Ct]=t,a[Yt]=e,Ot(a,n,e),St(a),t.stateNode=a):t.memoizedState=fy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return cd(t),e===null&&_e&&(a=t.stateNode=Z1(t.type,t.pendingProps,Pa.current),Tt=t,Sn=!0,r=Ge,ur(t.type)?(Qd=r,Ge=Cn(a.firstChild)):Ge=r),xt(e,t,t.pendingProps.children,n),Ys(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&_e&&((r=a=Ge)&&(a=T4(a,t.type,t.pendingProps,Sn),a!==null?(t.stateNode=a,Tt=t,Ge=Cn(a.firstChild),Sn=!1,r=!0):r=!1),r||ar(t)),cd(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,a=l.children,Gd(r,l)?a=null:o!==null&&Gd(r,o)&&(t.flags|=32),t.memoizedState!==null&&(r=um(e,t,IC,null,null,n),wi._currentValue=r),Ys(e,t),xt(e,t,a,n),t.child;case 6:return e===null&&_e&&((e=n=Ge)&&(n=M4(n,t.pendingProps,Sn),n!==null?(t.stateNode=n,Tt=t,Ge=null,e=!0):e=!1),e||ar(t)),null;case 13:return t1(e,t,n);case 4:return hu(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=jr(t,null,a,n):xt(e,t,a,n),t.child;case 11:return Hg(e,t,t.type,t.pendingProps,n);case 7:return xt(e,t,t.pendingProps,n),t.child;case 8:return xt(e,t,t.pendingProps.children,n),t.child;case 12:return xt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Aa(t,t.type,a.value),xt(e,t,a.children,n),t.child;case 9:return r=t.type._context,a=t.pendingProps.children,Ur(t),r=Mt(r),a=a(r),t.flags|=1,xt(e,t,a,n),t.child;case 14:return Bg(e,t,t.type,t.pendingProps,n);case 15:return Wb(e,t,t.type,t.pendingProps,n);case 19:return n1(e,t,n);case 31:return XC(e,t,n);case 22:return e1(e,t,n,t.pendingProps);case 24:return Ur(t),a=Mt(ct),e===null?(r=rm(),r===null&&(r=Pe,l=am(),r.pooledCache=l,l.refCount++,l!==null&&(r.pooledCacheLanes|=n),r=l),t.memoizedState={parent:a,cache:r},om(t),Aa(t,ct,r)):(e.lanes&n&&(Td(e,t),Qo(t,null,null,n),Xo()),r=e.memoizedState,l=t.memoizedState,r.parent!==a?(r={parent:a,cache:a},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Aa(t,ct,a)):(a=l.cache,Aa(t,ct,a),a!==r.cache&&Rd(t,[ct],n,!0))),xt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(I(156,t.tag))}function Fn(e){e.flags|=4}function xf(e,t,n,a,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(M1())e.flags|=8192;else throw _r=Eu,lm}else e.flags&=-16777217}function Gg(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Q1(t))if(M1())e.flags|=8192;else throw _r=Eu,lm}function ms(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ov():536870912,e.lanes|=t,Bl|=t)}function To(e,t){if(!_e)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 a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags&65011712,a|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function FC(e,t,n){var a=t.pendingProps;switch(nm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ua(ct),Dl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Jr(t)?Fn(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hf())),Ye(t),null;case 26:var r=t.type,l=t.memoizedState;return e===null?(Fn(t),l!==null?(Ye(t),Gg(t,l)):(Ye(t),xf(t,r,null,a,n))):l?l!==e.memoizedState?(Fn(t),Ye(t),Gg(t,l)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Fn(t),Ye(t),xf(t,r,e,a,n)),null;case 27:if(mu(t),n=Pa.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Fn(t);else{if(!a){if(t.stateNode===null)throw Error(I(166));return Ye(t),null}e=Vn.current,Jr(t)?Eg(t):(e=Z1(r,a,n),t.stateNode=e,Fn(t))}return Ye(t),null;case 5:if(mu(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Fn(t);else{if(!a){if(t.stateNode===null)throw Error(I(166));return Ye(t),null}if(l=Vn.current,Jr(t))Eg(t);else{var o=zu(Pa.current);switch(l){case 1:l=o.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:l=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":l=o.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":l=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":l=o.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild);break;case"select":l=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?l.multiple=!0:a.size&&(l.size=a.size);break;default:l=typeof a.is=="string"?o.createElement(r,{is:a.is}):o.createElement(r)}}l[Ct]=t,l[Yt]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)l.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=l;e:switch(Ot(l,r,a),r){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Fn(t)}}return Ye(t),xf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Fn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(I(166));if(e=Pa.current,Jr(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,r=Tt,r!==null)switch(r.tag){case 27:case 5:a=r.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||q1(e.nodeValue,n)),e||ar(t,!0)}else e=zu(e).createTextNode(a),e[Ct]=t,t.stateNode=e}return Ye(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Jr(t),n!==null){if(e===null){if(!a)throw Error(I(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(557));e[Ct]=t}else zr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else n=hf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if(t.flags&128)throw Error(I(558))}return Ye(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Jr(t),a!==null&&a.dehydrated!==null){if(e===null){if(!r)throw Error(I(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(I(317));r[Ct]=t}else zr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ye(t),r=!1}else r=hf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),t.flags&128?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,r=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(r=a.alternate.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==r&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ms(t,t.updateQueue),Ye(t),null);case 4:return Dl(),e===null&&Am(t.stateNode.containerInfo),Ye(t),null;case 10:return ua(t.type),Ye(t),null;case 19:if(Et(lt),a=t.memoizedState,a===null)return Ye(t),null;if(r=(t.flags&128)!==0,l=a.rendering,l===null)if(r)To(a,!1);else{if(tt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=wu(e),l!==null){for(t.flags|=128,To(a,!1),e=l.updateQueue,t.updateQueue=e,ms(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)rb(n,e),n=n.sibling;return qe(lt,lt.current&1|2),_e&&na(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ln()>Au&&(t.flags|=128,r=!0,To(a,!1),t.lanes=4194304)}else{if(!r)if(e=wu(l),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ms(t,e),To(a,!0),a.tail===null&&a.tailMode==="hidden"&&!l.alternate&&!_e)return Ye(t),null}else 2*ln()-a.renderingStartTime>Au&&n!==536870912&&(t.flags|=128,r=!0,To(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(e=a.last,e!==null?e.sibling=l:t.child=l,a.last=l)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ln(),e.sibling=null,n=lt.current,qe(lt,r?n&1|2:n&1),_e&&na(t,a.treeForkCount),e):(Ye(t),null);case 22:case 23:return Wt(t),im(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),n=t.updateQueue,n!==null&&ms(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&Et(Ar),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ua(ct),Ye(t),null;case 25:return null;case 30:return null}throw Error(I(156,t.tag))}function JC(e,t){switch(nm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ua(ct),Dl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return mu(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(I(340));zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Et(lt),null;case 4:return Dl(),null;case 10:return ua(t.type),null;case 22:case 23:return Wt(t),im(),e!==null&&Et(Ar),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ua(ct),null;case 25:return null;default:return null}}function r1(e,t){switch(nm(t),t.tag){case 3:ua(ct),Dl();break;case 26:case 27:case 5:mu(t);break;case 4:Dl();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:Et(lt);break;case 10:ua(t.type);break;case 22:case 23:Wt(t),im(),e!==null&&Et(Ar);break;case 24:ua(ct)}}function Vi(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var r=a.next;n=r;do{if((n.tag&e)===e){a=void 0;var l=n.create,o=n.inst;a=l(),o.destroy=a}n=n.next}while(n!==r)}}catch(i){Be(t,t.return,i)}}function rr(e,t,n){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var l=r.next;a=l;do{if((a.tag&e)===e){var o=a.inst,i=o.destroy;if(i!==void 0){o.destroy=void 0,r=t;var s=n,u=i;try{u()}catch(c){Be(r,s,c)}}}a=a.next}while(a!==l)}}catch(c){Be(t,t.return,c)}}function l1(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{mb(t,n)}catch(a){Be(e,e.return,a)}}}function o1(e,t,n){n.props=Br(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Be(e,t,a)}}function Jo(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(r){Be(e,t,r)}}function Bn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(r){Be(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Be(e,t,r)}else n.current=null}function i1(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(r){Be(e,e.return,r)}}function wf(e,t,n){try{var a=e.stateNode;S4(a,e.type,n,t),a[Yt]=t}catch(r){Be(e,e.return,r)}}function s1(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ur(e.type)||e.tag===4}function Rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||s1(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&&ur(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 jd(e,t,n){var a=e.tag;if(a===5||a===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=oa));else if(a!==4&&(a===27&&ur(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(jd(e,t,n),e=e.sibling;e!==null;)jd(e,t,n),e=e.sibling}function Ou(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&ur(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ou(e,t,n),e=e.sibling;e!==null;)Ou(e,t,n),e=e.sibling}function u1(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ot(t,a,n),t[Ct]=e,t[Yt]=n}catch(l){Be(e,e.return,l)}}var aa=!1,ut=!1,Cf=!1,Zg=typeof WeakSet=="function"?WeakSet:Set,bt=null;function WC(e,t){if(e=e.containerInfo,$d=Bu,e=Qv(e),Fh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var r=a.anchorOffset,l=a.focusNode;a=a.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,i=-1,s=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||r!==0&&f.nodeType!==3||(i=o+r),f!==l||a!==0&&f.nodeType!==3||(s=o+a),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===r&&(i=o),d===l&&++c===a&&(s=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=i===-1||s===-1?null:{start:i,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yd={focusedElem:e,selectionRange:n},Bu=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,l=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++)r=e[n],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&l!==null){e=void 0,n=t,r=l.memoizedProps,l=l.memoizedState,a=n.stateNode;try{var p=Br(n.type,r);e=a.getSnapshotBeforeUpdate(p,l),a.__reactInternalSnapshotBeforeUpdate=e}catch(v){Be(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Zd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(I(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function c1(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(e,n),a&4&&Vi(5,n);break;case 1:if(Wn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){Be(n,n.return,o)}else{var r=Br(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Be(n,n.return,o)}}a&64&&l1(n),a&512&&Jo(n,n.return);break;case 3:if(Wn(e,n),a&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{mb(e,t)}catch(o){Be(n,n.return,o)}}break;case 27:t===null&&a&4&&u1(n);case 26:case 5:Wn(e,n),t===null&&a&4&&i1(n),a&512&&Jo(n,n.return);break;case 12:Wn(e,n);break;case 31:Wn(e,n),a&4&&h1(e,n);break;case 13:Wn(e,n),a&4&&m1(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=s4.bind(null,n),O4(e,n))));break;case 22:if(a=n.memoizedState!==null||aa,!a){t=t!==null&&t.memoizedState!==null||ut,r=aa;var l=ut;aa=a,(ut=t)&&!l?ta(e,n,(n.subtreeFlags&8772)!==0):Wn(e,n),aa=r,ut=l}break;case 30:break;default:Wn(e,n)}}function f1(e){var t=e.alternate;t!==null&&(e.alternate=null,f1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yh(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 Xe=null,Vt=!1;function Jn(e,t,n){for(n=n.child;n!==null;)d1(e,t,n),n=n.sibling}function d1(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Di,n)}catch{}switch(n.tag){case 26:ut||Bn(n,t),Jn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ut||Bn(n,t);var a=Xe,r=Vt;ur(n.type)&&(Xe=n.stateNode,Vt=!1),Jn(e,t,n),ni(n.stateNode),Xe=a,Vt=r;break;case 5:ut||Bn(n,t);case 6:if(a=Xe,r=Vt,Xe=null,Jn(e,t,n),Xe=a,Vt=r,Xe!==null)if(Vt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(n.stateNode)}catch(l){Be(n,t,l)}else try{Xe.removeChild(n.stateNode)}catch(l){Be(n,t,l)}break;case 18:Xe!==null&&(Vt?(e=Xe,oy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ql(e)):oy(Xe,n.stateNode));break;case 4:a=Xe,r=Vt,Xe=n.stateNode.containerInfo,Vt=!0,Jn(e,t,n),Xe=a,Vt=r;break;case 0:case 11:case 14:case 15:rr(2,n,t),ut||rr(4,n,t),Jn(e,t,n);break;case 1:ut||(Bn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&o1(n,t,a)),Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:ut=(a=ut)||n.memoizedState!==null,Jn(e,t,n),ut=a;break;default:Jn(e,t,n)}}function h1(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ql(e)}catch(n){Be(t,t.return,n)}}}function m1(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ql(e)}catch(n){Be(t,t.return,n)}}function e4(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zg),t;default:throw Error(I(435,e.tag))}}function ps(e,t){var n=e4(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var r=u4.bind(null,e,a);a.then(r,r)}})}function jt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var r=n[a],l=e,o=t,i=o;e:for(;i!==null;){switch(i.tag){case 27:if(ur(i.type)){Xe=i.stateNode,Vt=!1;break e}break;case 5:Xe=i.stateNode,Vt=!1;break e;case 3:case 4:Xe=i.stateNode.containerInfo,Vt=!0;break e}i=i.return}if(Xe===null)throw Error(I(160));d1(l,o,r),Xe=null,Vt=!1,l=r.alternate,l!==null&&(l.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)p1(t,e),t=t.sibling}var Nn=null;function p1(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(t,e),Ht(e),a&4&&(rr(3,e,e.return),Vi(3,e),rr(5,e,e.return));break;case 1:jt(t,e),Ht(e),a&512&&(ut||n===null||Bn(n,n.return)),a&64&&aa&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var r=Nn;if(jt(t,e),Ht(e),a&512&&(ut||n===null||Bn(n,n.return)),a&4){var l=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(a){case"title":l=r.getElementsByTagName("title")[0],(!l||l[Ui]||l[Ct]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=r.createElement(a),r.head.insertBefore(l,r.querySelector("head > title"))),Ot(l,a,n),l[Ct]=e,St(l),a=l;break e;case"link":var o=hy("link","href",r).get(a+(n.href||""));if(o){for(var i=0;i<o.length;i++)if(l=o[i],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(i,1);break t}}l=r.createElement(a),Ot(l,a,n),r.head.appendChild(l);break;case"meta":if(o=hy("meta","content",r).get(a+(n.content||""))){for(i=0;i<o.length;i++)if(l=o[i],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(i,1);break t}}l=r.createElement(a),Ot(l,a,n),r.head.appendChild(l);break;default:throw Error(I(468,a))}l[Ct]=e,St(l),a=l}e.stateNode=a}else my(r,e.type,e.stateNode);else e.stateNode=dy(r,a,e.memoizedProps);else l!==a?(l===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):l.count--,a===null?my(r,e.type,e.stateNode):dy(r,a,e.memoizedProps)):a===null&&e.stateNode!==null&&wf(e,e.memoizedProps,n.memoizedProps)}break;case 27:jt(t,e),Ht(e),a&512&&(ut||n===null||Bn(n,n.return)),n!==null&&a&4&&wf(e,e.memoizedProps,n.memoizedProps);break;case 5:if(jt(t,e),Ht(e),a&512&&(ut||n===null||Bn(n,n.return)),e.flags&32){r=e.stateNode;try{zl(r,"")}catch(p){Be(e,e.return,p)}}a&4&&e.stateNode!=null&&(r=e.memoizedProps,wf(e,r,n!==null?n.memoizedProps:r)),a&1024&&(Cf=!0);break;case 6:if(jt(t,e),Ht(e),a&4){if(e.stateNode===null)throw Error(I(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(p){Be(e,e.return,p)}}break;case 3:if(Ks=null,r=Nn,Nn=Uu(t.containerInfo),jt(t,e),Nn=r,Ht(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ql(t.containerInfo)}catch(p){Be(e,e.return,p)}Cf&&(Cf=!1,g1(e));break;case 4:a=Nn,Nn=Uu(e.stateNode.containerInfo),jt(t,e),Ht(e),Nn=a;break;case 12:jt(t,e),Ht(e);break;case 31:jt(t,e),Ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ps(e,a)));break;case 13:jt(t,e),Ht(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(gc=ln()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ps(e,a)));break;case 22:r=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=aa,c=ut;if(aa=u||r,ut=c||s,jt(t,e),ut=c,aa=u,Ht(e),a&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||s||aa||ut||Sr(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(l=s.stateNode,r)o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{i=s.stateNode;var f=s.memoizedProps.style,d=f!=null&&f.hasOwnProperty("display")?f.display:null;i.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(p){Be(s,s.return,p)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=r?"":s.memoizedProps}catch(p){Be(s,s.return,p)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;r?iy(h,!0):iy(s.stateNode,!1)}catch(p){Be(s,s.return,p)}}}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}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,ps(e,n))));break;case 19:jt(t,e),Ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ps(e,a)));break;case 30:break;case 21:break;default:jt(t,e),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(s1(a)){n=a;break}a=a.return}if(n==null)throw Error(I(160));switch(n.tag){case 27:var r=n.stateNode,l=Rf(e);Ou(e,l,r);break;case 5:var o=n.stateNode;n.flags&32&&(zl(o,""),n.flags&=-33);var i=Rf(e);Ou(e,i,o);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Rf(e);jd(e,u,s);break;default:throw Error(I(161))}}catch(c){Be(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function g1(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;g1(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)c1(e,t.alternate,t),t=t.sibling}function Sr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:rr(4,t,t.return),Sr(t);break;case 1:Bn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&o1(t,t.return,n),Sr(t);break;case 27:ni(t.stateNode);case 26:case 5:Bn(t,t.return),Sr(t);break;case 22:t.memoizedState===null&&Sr(t);break;case 30:Sr(t);break;default:Sr(t)}e=e.sibling}}function ta(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,r=e,l=t,o=l.flags;switch(l.tag){case 0:case 11:case 15:ta(r,l,n),Vi(4,l);break;case 1:if(ta(r,l,n),a=l,r=a.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(u){Be(a,a.return,u)}if(a=l,r=a.updateQueue,r!==null){var i=a.stateNode;try{var s=r.shared.hiddenCallbacks;if(s!==null)for(r.shared.hiddenCallbacks=null,r=0;r<s.length;r++)hb(s[r],i)}catch(u){Be(a,a.return,u)}}n&&o&64&&l1(l),Jo(l,l.return);break;case 27:u1(l);case 26:case 5:ta(r,l,n),n&&a===null&&o&4&&i1(l),Jo(l,l.return);break;case 12:ta(r,l,n);break;case 31:ta(r,l,n),n&&o&4&&h1(r,l);break;case 13:ta(r,l,n),n&&o&4&&m1(r,l);break;case 22:l.memoizedState===null&&ta(r,l,n),Jo(l,l.return);break;case 30:break;default:ta(r,l,n)}t=t.sibling}}function wm(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&&Hi(n))}function Rm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Hi(e))}function An(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)y1(e,t,n,a),t=t.sibling}function y1(e,t,n,a){var r=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,n,a),r&2048&&Vi(9,t);break;case 1:An(e,t,n,a);break;case 3:An(e,t,n,a),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Hi(e)));break;case 12:if(r&2048){An(e,t,n,a),e=t.stateNode;try{var l=t.memoizedProps,o=l.id,i=l.onPostCommit;typeof i=="function"&&i(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Be(t,t.return,s)}}else An(e,t,n,a);break;case 31:An(e,t,n,a);break;case 13:An(e,t,n,a);break;case 23:break;case 22:l=t.stateNode,o=t.alternate,t.memoizedState!==null?l._visibility&2?An(e,t,n,a):Wo(e,t):l._visibility&2?An(e,t,n,a):(l._visibility|=2,al(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),r&2048&&wm(o,t);break;case 24:An(e,t,n,a),r&2048&&Rm(t.alternate,t);break;default:An(e,t,n,a)}}function al(e,t,n,a,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var l=e,o=t,i=n,s=a,u=o.flags;switch(o.tag){case 0:case 11:case 15:al(l,o,i,s,r),Vi(8,o);break;case 23:break;case 22:var c=o.stateNode;o.memoizedState!==null?c._visibility&2?al(l,o,i,s,r):Wo(l,o):(c._visibility|=2,al(l,o,i,s,r)),r&&u&2048&&wm(o.alternate,o);break;case 24:al(l,o,i,s,r),r&&u&2048&&Rm(o.alternate,o);break;default:al(l,o,i,s,r)}t=t.sibling}}function Wo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,r=a.flags;switch(a.tag){case 22:Wo(n,a),r&2048&&wm(a.alternate,a);break;case 24:Wo(n,a),r&2048&&Rm(a.alternate,a);break;default:Wo(n,a)}t=t.sibling}}var jo=8192;function Wr(e,t,n){if(e.subtreeFlags&jo)for(e=e.child;e!==null;)v1(e,t,n),e=e.sibling}function v1(e,t,n){switch(e.tag){case 26:Wr(e,t,n),e.flags&jo&&e.memoizedState!==null&&V4(n,Nn,e.memoizedState,e.memoizedProps);break;case 5:Wr(e,t,n);break;case 3:case 4:var a=Nn;Nn=Uu(e.stateNode.containerInfo),Wr(e,t,n),Nn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=jo,jo=16777216,Wr(e,t,n),jo=a):Wr(e,t,n));break;default:Wr(e,t,n)}}function b1(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 Mo(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];bt=a,E1(a,e)}b1(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)S1(e),e=e.sibling}function S1(e){switch(e.tag){case 0:case 11:case 15:Mo(e),e.flags&2048&&rr(9,e,e.return);break;case 3:Mo(e);break;case 12:Mo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Gs(e)):Mo(e);break;default:Mo(e)}}function Gs(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];bt=a,E1(a,e)}b1(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:rr(8,t,t.return),Gs(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Gs(t));break;default:Gs(t)}e=e.sibling}}function E1(e,t){for(;bt!==null;){var n=bt;switch(n.tag){case 0:case 11:case 15:rr(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Hi(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,bt=a;else e:for(n=e;bt!==null;){a=bt;var r=a.sibling,l=a.return;if(f1(a),a===n){bt=null;break e}if(r!==null){r.return=l,bt=r;break e}bt=l}}}var t4={getCacheForType:function(e){var t=Mt(ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Mt(ct).controller.signal}},n4=typeof WeakMap=="function"?WeakMap:Map,Le=0,Pe=null,Me=null,Ae=0,He=0,Jt=null,ja=!1,ao=!1,Cm=!1,ga=0,tt=0,lr=0,Nr=0,Tm=0,nn=0,Bl=0,ei=null,It=null,Hd=!1,gc=0,x1=0,Au=1/0,_u=null,Ga=null,yt=0,Za=null,Vl=null,ca=0,Bd=0,Vd=null,w1=null,ti=0,Id=null;function un(){return Le&2&&Ae!==0?Ae&-Ae:ye.T!==null?Om():kv()}function R1(){if(nn===0)if(!(Ae&536870912)||_e){var e=is;is<<=1,!(is&3932160)&&(is=262144),nn=e}else nn=536870912;return e=fn.current,e!==null&&(e.flags|=32),nn}function qt(e,t,n){(e===Pe&&(He===2||He===9)||e.cancelPendingCommit!==null)&&(Il(e,0),Ha(e,Ae,nn,!1)),zi(e,n),(!(Le&2)||e!==Pe)&&(e===Pe&&(!(Le&2)&&(Nr|=n),tt===4&&Ha(e,Ae,nn,!1)),Gn(e))}function C1(e,t,n){if(Le&6)throw Error(I(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Li(e,t),r=a?l4(e,t):Tf(e,t,!0),l=a;do{if(r===0){ao&&!a&&Ha(e,t,0,!1);break}else{if(n=e.current.alternate,l&&!a4(n)){r=Tf(e,t,!1),l=!1;continue}if(r===2){if(l=t,e.errorRecoveryDisabledLanes&l)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var i=e;r=ei;var s=i.current.memoizedState.isDehydrated;if(s&&(Il(i,o).flags|=256),o=Tf(i,o,!1),o!==2){if(Cm&&!s){i.errorRecoveryDisabledLanes|=l,Nr|=l,r=4;break e}l=It,It=r,l!==null&&(It===null?It=l:It.push.apply(It,l))}r=o}if(l=!1,r!==2)continue}}if(r===1){Il(e,0),Ha(e,t,0,!0);break}e:{switch(a=e,l=r,l){case 0:case 1:throw Error(I(345));case 4:if((t&4194048)!==t)break;case 6:Ha(a,t,nn,!ja);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(I(329))}if((t&62914560)===t&&(r=gc+300-ln(),10<r)){if(Ha(a,t,nn,!ja),lc(a,0,!0)!==0)break e;ca=t,a.timeoutHandle=Y1(Kg.bind(null,a,n,It,_u,Hd,t,nn,Nr,Bl,ja,l,"Throttled",-0,0),r);break e}Kg(a,n,It,_u,Hd,t,nn,Nr,Bl,ja,l,null,-0,0)}}break}while(!0);Gn(e)}function Kg(e,t,n,a,r,l,o,i,s,u,c,f,d,h){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:oa},v1(t,l,f);var p=(l&62914560)===l?gc-ln():(l&4194048)===l?x1-ln():0;if(p=I4(f,p),p!==null){ca=l,e.cancelPendingCommit=p(Qg.bind(null,e,t,l,n,a,r,o,i,s,c,f,null,d,h)),Ha(e,l,o,!u);return}}Qg(e,t,l,n,a,r,o,i,s)}function a4(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 a=0;a<n.length;a++){var r=n[a],l=r.getSnapshot;r=r.value;try{if(!cn(l(),r))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 Ha(e,t,n,a){t&=~Tm,t&=~Nr,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var r=t;0<r;){var l=31-sn(r),o=1<<l;a[l]=-1,r&=~o}n!==0&&Av(e,n,t)}function yc(){return Le&6?!0:(Ii(0),!1)}function Mm(){if(Me!==null){if(He===0)var e=Me.return;else e=Me,ia=Kr=null,dm(e),Rl=null,vi=0,e=Me;for(;e!==null;)r1(e.alternate,e),e=e.return;Me=null}}function Il(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,w4(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ca=0,Mm(),Pe=e,Me=n=sa(e.current,null),Ae=t,He=0,Jt=null,ja=!1,ao=Li(e,t),Cm=!1,Bl=nn=Tm=Nr=lr=tt=0,It=ei=null,Hd=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var r=31-sn(a),l=1<<r;t|=e[r],a&=~l}return ga=t,uc(),n}function T1(e,t){Se=null,ye.H=Si,t===no||t===fc?(t=Tg(),He=3):t===lm?(t=Tg(),He=4):He=t===Em?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,Me===null&&(tt=1,Tu(e,bn(t,e.current)))}function M1(){var e=fn.current;return e===null?!0:(Ae&4194048)===Ae?Rn===null:(Ae&62914560)===Ae||Ae&536870912?e===Rn:!1}function O1(){var e=ye.H;return ye.H=Si,e===null?Si:e}function A1(){var e=ye.A;return ye.A=t4,e}function Nu(){tt=4,ja||(Ae&4194048)!==Ae&&fn.current!==null||(ao=!0),!(lr&134217727)&&!(Nr&134217727)||Pe===null||Ha(Pe,Ae,nn,!1)}function Tf(e,t,n){var a=Le;Le|=2;var r=O1(),l=A1();(Pe!==e||Ae!==t)&&(_u=null,Il(e,t)),t=!1;var o=tt;e:do try{if(He!==0&&Me!==null){var i=Me,s=Jt;switch(He){case 8:Mm(),o=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(t=!0);var u=He;if(He=0,Jt=null,gl(e,i,s,u),n&&ao){o=0;break e}break;default:u=He,He=0,Jt=null,gl(e,i,s,u)}}r4(),o=tt;break}catch(c){T1(e,c)}while(!0);return t&&e.shellSuspendCounter++,ia=Kr=null,Le=a,ye.H=r,ye.A=l,Me===null&&(Pe=null,Ae=0,uc()),o}function r4(){for(;Me!==null;)_1(Me)}function l4(e,t){var n=Le;Le|=2;var a=O1(),r=A1();Pe!==e||Ae!==t?(_u=null,Au=ln()+500,Il(e,t)):ao=Li(e,t);e:do try{if(He!==0&&Me!==null){t=Me;var l=Jt;t:switch(He){case 1:He=0,Jt=null,gl(e,t,l,1);break;case 2:case 9:if(Cg(l)){He=0,Jt=null,Xg(t);break}t=function(){He!==2&&He!==9||Pe!==e||(He=7),Gn(e)},l.then(t,t);break e;case 3:He=7;break e;case 4:He=5;break e;case 7:Cg(l)?(He=0,Jt=null,Xg(t)):(He=0,Jt=null,gl(e,t,l,7));break;case 5:var o=null;switch(Me.tag){case 26:o=Me.memoizedState;case 5:case 27:var i=Me;if(o?Q1(o):i.stateNode.complete){He=0,Jt=null;var s=i.sibling;if(s!==null)Me=s;else{var u=i.return;u!==null?(Me=u,vc(u)):Me=null}break t}}He=0,Jt=null,gl(e,t,l,5);break;case 6:He=0,Jt=null,gl(e,t,l,6);break;case 8:Mm(),tt=6;break e;default:throw Error(I(462))}}o4();break}catch(c){T1(e,c)}while(!0);return ia=Kr=null,ye.H=a,ye.A=r,Le=n,Me!==null?0:(Pe=null,Ae=0,uc(),tt)}function o4(){for(;Me!==null&&!AR();)_1(Me)}function _1(e){var t=a1(e.alternate,e,ga);e.memoizedProps=e.pendingProps,t===null?vc(e):Me=t}function Xg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Pg(n,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=Pg(n,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:dm(t);default:r1(n,t),t=Me=rb(t,ga),t=a1(n,t,ga)}e.memoizedProps=e.pendingProps,t===null?vc(e):Me=t}function gl(e,t,n,a){ia=Kr=null,dm(t),Rl=null,vi=0;var r=t.return;try{if(KC(e,r,t,n,Ae)){tt=1,Tu(e,bn(n,e.current)),Me=null;return}}catch(l){if(r!==null)throw Me=r,l;tt=1,Tu(e,bn(n,e.current)),Me=null;return}t.flags&32768?(_e||a===1?e=!0:ao||Ae&536870912?e=!1:(ja=e=!0,(a===2||a===9||a===3||a===6)&&(a=fn.current,a!==null&&a.tag===13&&(a.flags|=16384))),N1(t,e)):vc(t)}function vc(e){var t=e;do{if(t.flags&32768){N1(t,ja);return}e=t.return;var n=FC(t.alternate,t,ga);if(n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);tt===0&&(tt=5)}function N1(e,t){do{var n=JC(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);tt=6,Me=null}function Qg(e,t,n,a,r,l,o,i,s){e.cancelPendingCommit=null;do bc();while(yt!==0);if(Le&6)throw Error(I(327));if(t!==null){if(t===e.current)throw Error(I(177));if(l=t.lanes|t.childLanes,l|=Jh,BR(e,n,l,o,i,s),e===Pe&&(Me=Pe=null,Ae=0),Vl=t,Za=e,ca=n,Bd=l,Vd=r,w1=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,c4(pu,function(){return U1(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=ye.T,ye.T=null,r=ze.p,ze.p=2,o=Le,Le|=4;try{WC(e,t,n)}finally{Le=o,ze.p=r,ye.T=a}}yt=1,k1(),D1(),L1()}}function k1(){if(yt===1){yt=0;var e=Za,t=Vl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=ye.T,ye.T=null;var a=ze.p;ze.p=2;var r=Le;Le|=4;try{p1(t,e);var l=Yd,o=Qv(e.containerInfo),i=l.focusedElem,s=l.selectionRange;if(o!==i&&i&&i.ownerDocument&&Xv(i.ownerDocument.documentElement,i)){if(s!==null&&Fh(i)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in i)i.selectionStart=u,i.selectionEnd=Math.min(c,i.value.length);else{var f=i.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var h=d.getSelection(),p=i.textContent.length,v=Math.min(s.start,p),E=s.end===void 0?v:Math.min(s.end,p);!h.extend&&v>E&&(o=E,E=v,v=o);var g=vg(i,v),y=vg(i,E);if(g&&y&&(h.rangeCount!==1||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var S=f.createRange();S.setStart(g.node,g.offset),h.removeAllRanges(),v>E?(h.addRange(S),h.extend(y.node,y.offset)):(S.setEnd(y.node,y.offset),h.addRange(S))}}}}for(f=[],h=i;h=h.parentNode;)h.nodeType===1&&f.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<f.length;i++){var b=f[i];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Bu=!!$d,Yd=$d=null}finally{Le=r,ze.p=a,ye.T=n}}e.current=t,yt=2}}function D1(){if(yt===2){yt=0;var e=Za,t=Vl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ye.T,ye.T=null;var a=ze.p;ze.p=2;var r=Le;Le|=4;try{c1(e,t.alternate,t)}finally{Le=r,ze.p=a,ye.T=n}}yt=3}}function L1(){if(yt===4||yt===3){yt=0,_R();var e=Za,t=Vl,n=ca,a=w1;t.subtreeFlags&10256||t.flags&10256?yt=5:(yt=0,Vl=Za=null,z1(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Ga=null),$h(n),t=t.stateNode,on&&typeof on.onCommitFiberRoot=="function")try{on.onCommitFiberRoot(Di,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=ye.T,r=ze.p,ze.p=2,ye.T=null;try{for(var l=e.onRecoverableError,o=0;o<a.length;o++){var i=a[o];l(i.value,{componentStack:i.stack})}}finally{ye.T=t,ze.p=r}}ca&3&&bc(),Gn(e),r=e.pendingLanes,n&261930&&r&42?e===Id?ti++:(ti=0,Id=e):ti=0,Ii(0)}}function z1(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Hi(t)))}function bc(){return k1(),D1(),L1(),U1()}function U1(){if(yt!==5)return!1;var e=Za,t=Bd;Bd=0;var n=$h(ca),a=ye.T,r=ze.p;try{ze.p=32>n?32:n,ye.T=null,n=Vd,Vd=null;var l=Za,o=ca;if(yt=0,Vl=Za=null,ca=0,Le&6)throw Error(I(331));var i=Le;if(Le|=4,S1(l.current),y1(l,l.current,o,n),Le=i,Ii(0,!1),on&&typeof on.onPostCommitFiberRoot=="function")try{on.onPostCommitFiberRoot(Di,l)}catch{}return!0}finally{ze.p=r,ye.T=a,z1(e,t)}}function Fg(e,t,n){t=bn(n,t),t=Ld(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(zi(e,2),Gn(e))}function Be(e,t,n){if(e.tag===3)Fg(e,e,n);else for(;t!==null;){if(t.tag===3){Fg(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ga===null||!Ga.has(a))){e=bn(n,e),n=Fb(2),a=Ya(t,n,2),a!==null&&(Jb(n,a,t,e),zi(a,2),Gn(a));break}}t=t.return}}function Mf(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new n4;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(n)||(Cm=!0,r.add(n),e=i4.bind(null,e,t,n),t.then(e,e))}function i4(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Pe===e&&(Ae&n)===n&&(tt===4||tt===3&&(Ae&62914560)===Ae&&300>ln()-gc?!(Le&2)&&Il(e,0):Tm|=n,Bl===Ae&&(Bl=0)),Gn(e)}function j1(e,t){t===0&&(t=Ov()),e=Zr(e,t),e!==null&&(zi(e,t),Gn(e))}function s4(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),j1(e,n)}function u4(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(I(314))}a!==null&&a.delete(t),j1(e,n)}function c4(e,t){return Ph(e,t)}var ku=null,rl=null,Pd=!1,Du=!1,Of=!1,Ba=0;function Gn(e){e!==rl&&e.next===null&&(rl===null?ku=rl=e:rl=rl.next=e),Du=!0,Pd||(Pd=!0,d4())}function Ii(e,t){if(!Of&&Du){Of=!0;do for(var n=!1,a=ku;a!==null;){if(e!==0){var r=a.pendingLanes;if(r===0)var l=0;else{var o=a.suspendedLanes,i=a.pingedLanes;l=(1<<31-sn(42|e)+1)-1,l&=r&~(o&~i),l=l&201326741?l&201326741|1:l?l|2:0}l!==0&&(n=!0,Jg(a,l))}else l=Ae,l=lc(a,a===Pe?l:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(l&3)||Li(a,l)||(n=!0,Jg(a,l));a=a.next}while(n);Of=!1}}function f4(){H1()}function H1(){Du=Pd=!1;var e=0;Ba!==0&&x4()&&(e=Ba);for(var t=ln(),n=null,a=ku;a!==null;){var r=a.next,l=B1(a,t);l===0?(a.next=null,n===null?ku=r:n.next=r,r===null&&(rl=n)):(n=a,(e!==0||l&3)&&(Du=!0)),a=r}yt!==0&&yt!==5||Ii(e),Ba!==0&&(Ba=0)}function B1(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,l=e.pendingLanes&-62914561;0<l;){var o=31-sn(l),i=1<<o,s=r[o];s===-1?(!(i&n)||i&a)&&(r[o]=HR(i,t)):s<=t&&(e.expiredLanes|=i),l&=~i}if(t=Pe,n=Ae,n=lc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(He===2||He===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&tf(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Li(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&tf(a),$h(n)){case 2:case 8:n=Tv;break;case 32:n=pu;break;case 268435456:n=Mv;break;default:n=pu}return a=V1.bind(null,e),n=Ph(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&tf(a),e.callbackPriority=2,e.callbackNode=null,2}function V1(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(bc()&&e.callbackNode!==n)return null;var a=Ae;return a=lc(e,e===Pe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(C1(e,a,t),B1(e,ln()),e.callbackNode!=null&&e.callbackNode===n?V1.bind(null,e):null)}function Jg(e,t){if(bc())return null;C1(e,t,!0)}function d4(){R4(function(){Le&6?Ph(Cv,f4):H1()})}function Om(){if(Ba===0){var e=Ul;e===0&&(e=os,os<<=1,!(os&261888)&&(os=256)),Ba=e}return Ba}function Wg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:js(""+e)}function ey(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 h4(e,t,n,a,r){if(t==="submit"&&n&&n.stateNode===r){var l=Wg((r[Yt]||null).action),o=a.submitter;o&&(t=(t=o[Yt]||null)?Wg(t.formAction):o.getAttribute("formAction"),t!==null&&(l=t,o=null));var i=new oc("action","action",null,a,r);e.push({event:i,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ba!==0){var s=o?ey(r,o):new FormData(r);kd(n,{pending:!0,data:s,method:r.method,action:l},null,s)}}else typeof l=="function"&&(i.preventDefault(),s=o?ey(r,o):new FormData(r),kd(n,{pending:!0,data:s,method:r.method,action:l},l,s))},currentTarget:r}]})}}for(var Af=0;Af<Sd.length;Af++){var _f=Sd[Af],m4=_f.toLowerCase(),p4=_f[0].toUpperCase()+_f.slice(1);Dn(m4,"on"+p4)}Dn(Jv,"onAnimationEnd");Dn(Wv,"onAnimationIteration");Dn(eb,"onAnimationStart");Dn("dblclick","onDoubleClick");Dn("focusin","onFocus");Dn("focusout","onBlur");Dn(NC,"onTransitionRun");Dn(kC,"onTransitionStart");Dn(DC,"onTransitionCancel");Dn(tb,"onTransitionEnd");Ll("onMouseEnter",["mouseout","mouseover"]);Ll("onMouseLeave",["mouseout","mouseover"]);Ll("onPointerEnter",["pointerout","pointerover"]);Ll("onPointerLeave",["pointerout","pointerover"]);$r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$r("onBeforeInput",["compositionend","keypress","textInput","paste"]);$r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ei="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(" "),g4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ei));function I1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],r=a.event;a=a.listeners;e:{var l=void 0;if(t)for(var o=a.length-1;0<=o;o--){var i=a[o],s=i.instance,u=i.currentTarget;if(i=i.listener,s!==l&&r.isPropagationStopped())break e;l=i,r.currentTarget=u;try{l(r)}catch(c){yu(c)}r.currentTarget=null,l=s}else for(o=0;o<a.length;o++){if(i=a[o],s=i.instance,u=i.currentTarget,i=i.listener,s!==l&&r.isPropagationStopped())break e;l=i,r.currentTarget=u;try{l(r)}catch(c){yu(c)}r.currentTarget=null,l=s}}}}function Te(e,t){var n=t[dd];n===void 0&&(n=t[dd]=new Set);var a=e+"__bubble";n.has(a)||(P1(t,e,2,!1),n.add(a))}function Nf(e,t,n){var a=0;t&&(a|=4),P1(n,e,a,t)}var gs="_reactListening"+Math.random().toString(36).slice(2);function Am(e){if(!e[gs]){e[gs]=!0,Dv.forEach(function(n){n!=="selectionchange"&&(g4.has(n)||Nf(n,!1,e),Nf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gs]||(t[gs]=!0,Nf("selectionchange",!1,t))}}function P1(e,t,n,a){switch(tS(t)){case 2:var r=$4;break;case 8:r=Y4;break;default:r=Dm}n=r.bind(null,t,n,e),r=void 0,!yd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function kf(e,t,n,a,r){var l=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var i=a.stateNode.containerInfo;if(i===r)break;if(o===4)for(o=a.return;o!==null;){var s=o.tag;if((s===3||s===4)&&o.stateNode.containerInfo===r)return;o=o.return}for(;i!==null;){if(o=il(i),o===null)return;if(s=o.tag,s===5||s===6||s===26||s===27){a=l=o;continue e}i=i.parentNode}}a=a.return}Iv(function(){var u=l,c=Zh(n),f=[];e:{var d=nb.get(e);if(d!==void 0){var h=oc,p=e;switch(e){case"keypress":if(Bs(n)===0)break e;case"keydown":case"keyup":h=uC;break;case"focusin":p="focus",h=of;break;case"focusout":p="blur",h=of;break;case"beforeblur":case"afterblur":h=of;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=sg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=FR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=dC;break;case Jv:case Wv:case eb:h=eC;break;case tb:h=mC;break;case"scroll":case"scrollend":h=XR;break;case"wheel":h=gC;break;case"copy":case"cut":case"paste":h=nC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=cg;break;case"toggle":case"beforetoggle":h=vC}var v=(t&4)!==0,E=!v&&(e==="scroll"||e==="scrollend"),g=v?d!==null?d+"Capture":null:d;v=[];for(var y=u,S;y!==null;){var b=y;if(S=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||S===null||g===null||(b=hi(y,g),b!=null&&v.push(xi(y,b,S))),E)break;y=y.return}0<v.length&&(d=new h(d,p,null,n,c),f.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==gd&&(p=n.relatedTarget||n.fromElement)&&(il(p)||p[Wl]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?il(p):null,p!==null&&(E=ki(p),v=p.tag,p!==E||v!==5&&v!==27&&v!==6)&&(p=null)):(h=null,p=u),h!==p)){if(v=sg,b="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=cg,b="onPointerLeave",g="onPointerEnter",y="pointer"),E=h==null?d:zo(h),S=p==null?d:zo(p),d=new v(b,y+"leave",h,n,c),d.target=E,d.relatedTarget=S,b=null,il(c)===u&&(v=new v(g,y+"enter",p,n,c),v.target=S,v.relatedTarget=E,b=v),E=b,h&&p)t:{for(v=y4,g=h,y=p,S=0,b=g;b;b=v(b))S++;b=0;for(var x=y;x;x=v(x))b++;for(;0<S-b;)g=v(g),S--;for(;0<b-S;)y=v(y),b--;for(;S--;){if(g===y||y!==null&&g===y.alternate){v=g;break t}g=v(g),y=v(y)}v=null}else v=null;h!==null&&ty(f,d,h,v,!1),p!==null&&E!==null&&ty(f,E,p,v,!0)}}e:{if(d=u?zo(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var R=mg;else if(hg(d))if(Zv)R=OC;else{R=TC;var w=CC}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&Gh(u.elementType)&&(R=mg):R=MC;if(R&&(R=R(e,u))){Gv(f,R,n,c);break e}w&&w(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&pd(d,"number",d.value)}switch(w=u?zo(u):window,e){case"focusin":(hg(w)||w.contentEditable==="true")&&(cl=w,vd=u,Go=null);break;case"focusout":Go=vd=cl=null;break;case"mousedown":bd=!0;break;case"contextmenu":case"mouseup":case"dragend":bd=!1,bg(f,n,c);break;case"selectionchange":if(_C)break;case"keydown":case"keyup":bg(f,n,c)}var C;if(Qh)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else ul?$v(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(qv&&n.locale!=="ko"&&(ul||A!=="onCompositionStart"?A==="onCompositionEnd"&&ul&&(C=Pv()):(Ua=c,Kh="value"in Ua?Ua.value:Ua.textContent,ul=!0)),w=Lu(u,A),0<w.length&&(A=new ug(A,e,null,n,c),f.push({event:A,listeners:w}),C?A.data=C:(C=Yv(n),C!==null&&(A.data=C)))),(C=SC?EC(e,n):xC(e,n))&&(A=Lu(u,"onBeforeInput"),0<A.length&&(w=new ug("onBeforeInput","beforeinput",null,n,c),f.push({event:w,listeners:A}),w.data=C)),h4(f,e,u,n,c)}I1(f,t)})}function xi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lu(e,t){for(var n=t+"Capture",a=[];e!==null;){var r=e,l=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||l===null||(r=hi(e,n),r!=null&&a.unshift(xi(e,r,l)),r=hi(e,t),r!=null&&a.push(xi(e,r,l))),e.tag===3)return a;e=e.return}return[]}function y4(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ty(e,t,n,a,r){for(var l=t._reactName,o=[];n!==null&&n!==a;){var i=n,s=i.alternate,u=i.stateNode;if(i=i.tag,s!==null&&s===a)break;i!==5&&i!==26&&i!==27||u===null||(s=u,r?(u=hi(n,l),u!=null&&o.unshift(xi(n,u,s))):r||(u=hi(n,l),u!=null&&o.push(xi(n,u,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var v4=/\r\n?/g,b4=/\u0000|\uFFFD/g;function ny(e){return(typeof e=="string"?e:""+e).replace(v4,`
|
||
`).replace(b4,"")}function q1(e,t){return t=ny(t),ny(e)===t}function Ve(e,t,n,a,r,l){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||zl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&zl(e,""+a);break;case"className":us(e,"class",a);break;case"tabIndex":us(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":us(e,n,a);break;case"style":Vv(e,a,l);break;case"data":if(t!=="object"){us(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=js(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="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 l=="function"&&(n==="formAction"?(t!=="input"&&Ve(e,t,"name",r.name,r,null),Ve(e,t,"formEncType",r.formEncType,r,null),Ve(e,t,"formMethod",r.formMethod,r,null),Ve(e,t,"formTarget",r.formTarget,r,null)):(Ve(e,t,"encType",r.encType,r,null),Ve(e,t,"method",r.method,r,null),Ve(e,t,"target",r.target,r,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=js(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=oa);break;case"onScroll":a!=null&&Te("scroll",e);break;case"onScrollEnd":a!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(I(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(I(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=js(""+a),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":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Te("beforetoggle",e),Te("toggle",e),Us(e,"popover",a);break;case"xlinkActuate":Qn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Qn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Qn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Qn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Qn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Qn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Us(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=ZR.get(n)||n,Us(e,n,a))}}function qd(e,t,n,a,r,l){switch(n){case"style":Vv(e,a,l);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(I(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(I(60));e.innerHTML=n}}break;case"children":typeof a=="string"?zl(e,a):(typeof a=="number"||typeof a=="bigint")&&zl(e,""+a);break;case"onScroll":a!=null&&Te("scroll",e);break;case"onScrollEnd":a!=null&&Te("scrollend",e);break;case"onClick":a!=null&&(e.onclick=oa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lv.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),l=e[Yt]||null,l=l!=null?l[n]:null,typeof l=="function"&&e.removeEventListener(t,l,r),typeof a=="function")){typeof l!="function"&&l!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,r);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Us(e,n,a)}}}function Ot(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var a=!1,r=!1,l;for(l in n)if(n.hasOwnProperty(l)){var o=n[l];if(o!=null)switch(l){case"src":a=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:Ve(e,t,l,o,n,null)}}r&&Ve(e,t,"srcSet",n.srcSet,n,null),a&&Ve(e,t,"src",n.src,n,null);return;case"input":Te("invalid",e);var i=l=o=r=null,s=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var c=n[a];if(c!=null)switch(a){case"name":r=c;break;case"type":o=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":l=c;break;case"defaultValue":i=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(I(137,t));break;default:Ve(e,t,a,c,n,null)}}jv(e,l,i,s,u,o,r,!1);return;case"select":Te("invalid",e),a=o=l=null;for(r in n)if(n.hasOwnProperty(r)&&(i=n[r],i!=null))switch(r){case"value":l=i;break;case"defaultValue":o=i;break;case"multiple":a=i;default:Ve(e,t,r,i,n,null)}t=l,n=o,e.multiple=!!a,t!=null?El(e,!!a,t,!1):n!=null&&El(e,!!a,n,!0);return;case"textarea":Te("invalid",e),l=r=a=null;for(o in n)if(n.hasOwnProperty(o)&&(i=n[o],i!=null))switch(o){case"value":a=i;break;case"defaultValue":r=i;break;case"children":l=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(I(91));break;default:Ve(e,t,o,i,n,null)}Bv(e,a,r,l);return;case"option":for(s in n)if(n.hasOwnProperty(s)&&(a=n[s],a!=null))switch(s){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ve(e,t,s,a,n,null)}return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(a=0;a<Ei.length;a++)Te(Ei[a],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("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)&&(a=n[u],a!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:Ve(e,t,u,a,n,null)}return;default:if(Gh(t)){for(c in n)n.hasOwnProperty(c)&&(a=n[c],a!==void 0&&qd(e,t,c,a,n,void 0));return}}for(i in n)n.hasOwnProperty(i)&&(a=n[i],a!=null&&Ve(e,t,i,a,n,null))}function S4(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,l=null,o=null,i=null,s=null,u=null,c=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&f!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=f;default:a.hasOwnProperty(h)||Ve(e,t,h,null,a,f)}}for(var d in a){var h=a[d];if(f=n[d],a.hasOwnProperty(d)&&(h!=null||f!=null))switch(d){case"type":l=h;break;case"name":r=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":o=h;break;case"defaultValue":i=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(I(137,t));break;default:h!==f&&Ve(e,t,d,h,a,f)}}md(e,o,i,s,u,c,l,r);return;case"select":h=o=i=d=null;for(l in n)if(s=n[l],n.hasOwnProperty(l)&&s!=null)switch(l){case"value":break;case"multiple":h=s;default:a.hasOwnProperty(l)||Ve(e,t,l,null,a,s)}for(r in a)if(l=a[r],s=n[r],a.hasOwnProperty(r)&&(l!=null||s!=null))switch(r){case"value":d=l;break;case"defaultValue":i=l;break;case"multiple":o=l;default:l!==s&&Ve(e,t,r,l,a,s)}t=i,n=o,a=h,d!=null?El(e,!!n,d,!1):!!a!=!!n&&(t!=null?El(e,!!n,t,!0):El(e,!!n,n?[]:"",!1));return;case"textarea":h=d=null;for(i in n)if(r=n[i],n.hasOwnProperty(i)&&r!=null&&!a.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:Ve(e,t,i,null,a,r)}for(o in a)if(r=a[o],l=n[o],a.hasOwnProperty(o)&&(r!=null||l!=null))switch(o){case"value":d=r;break;case"defaultValue":h=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(I(91));break;default:r!==l&&Ve(e,t,o,r,a,l)}Hv(e,d,h);return;case"option":for(var p in n)if(d=n[p],n.hasOwnProperty(p)&&d!=null&&!a.hasOwnProperty(p))switch(p){case"selected":e.selected=!1;break;default:Ve(e,t,p,null,a,d)}for(s in a)if(d=a[s],h=n[s],a.hasOwnProperty(s)&&d!==h&&(d!=null||h!=null))switch(s){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Ve(e,t,s,d,a,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 v in n)d=n[v],n.hasOwnProperty(v)&&d!=null&&!a.hasOwnProperty(v)&&Ve(e,t,v,null,a,d);for(u in a)if(d=a[u],h=n[u],a.hasOwnProperty(u)&&d!==h&&(d!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(I(137,t));break;default:Ve(e,t,u,d,a,h)}return;default:if(Gh(t)){for(var E in n)d=n[E],n.hasOwnProperty(E)&&d!==void 0&&!a.hasOwnProperty(E)&&qd(e,t,E,void 0,a,d);for(c in a)d=a[c],h=n[c],!a.hasOwnProperty(c)||d===h||d===void 0&&h===void 0||qd(e,t,c,d,a,h);return}}for(var g in n)d=n[g],n.hasOwnProperty(g)&&d!=null&&!a.hasOwnProperty(g)&&Ve(e,t,g,null,a,d);for(f in a)d=a[f],h=n[f],!a.hasOwnProperty(f)||d===h||d==null&&h==null||Ve(e,t,f,d,a,h)}function ay(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function E4(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var r=n[a],l=r.transferSize,o=r.initiatorType,i=r.duration;if(l&&i&&ay(o)){for(o=0,i=r.responseEnd,a+=1;a<n.length;a++){var s=n[a],u=s.startTime;if(u>i)break;var c=s.transferSize,f=s.initiatorType;c&&ay(f)&&(s=s.responseEnd,o+=c*(s<i?1:(i-u)/(s-u)))}if(--a,t+=8*(l+o)/(r.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 $d=null,Yd=null;function zu(e){return e.nodeType===9?e:e.ownerDocument}function ry(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 $1(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 Gd(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 Df=null;function x4(){var e=window.event;return e&&e.type==="popstate"?e===Df?!1:(Df=e,!0):(Df=null,!1)}var Y1=typeof setTimeout=="function"?setTimeout:void 0,w4=typeof clearTimeout=="function"?clearTimeout:void 0,ly=typeof Promise=="function"?Promise:void 0,R4=typeof queueMicrotask=="function"?queueMicrotask:typeof ly<"u"?function(e){return ly.resolve(null).then(e).catch(C4)}:Y1;function C4(e){setTimeout(function(){throw e})}function ur(e){return e==="head"}function oy(e,t){var n=t,a=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(r),ql(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")ni(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ni(n);for(var l=n.firstChild;l;){var o=l.nextSibling,i=l.nodeName;l[Ui]||i==="SCRIPT"||i==="STYLE"||i==="LINK"&&l.rel.toLowerCase()==="stylesheet"||n.removeChild(l),l=o}}else n==="body"&&ni(e.ownerDocument.body);n=r}while(n);ql(t)}function iy(e,t){var n=e;e=0;do{var a=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||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Zd(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":Zd(n),Yh(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function T4(e,t,n,a){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ui])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(l=e.getAttribute("rel"),l==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(l!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(l=e.getAttribute("src"),(l!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&l&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var l=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===l)return e}else return e;if(e=Cn(e.nextSibling),e===null)break}return null}function M4(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Cn(e.nextSibling),e===null))return null;return e}function G1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Cn(e.nextSibling),e===null))return null;return e}function Kd(e){return e.data==="$?"||e.data==="$~"}function Xd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function O4(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Cn(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 Qd=null;function sy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Cn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function uy(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 Z1(e,t,n){switch(t=zu(n),e){case"html":if(e=t.documentElement,!e)throw Error(I(452));return e;case"head":if(e=t.head,!e)throw Error(I(453));return e;case"body":if(e=t.body,!e)throw Error(I(454));return e;default:throw Error(I(451))}}function ni(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yh(e)}var Tn=new Map,cy=new Set;function Uu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sa=ze.d;ze.d={f:A4,r:_4,D:N4,C:k4,L:D4,m:L4,X:U4,S:z4,M:j4};function A4(){var e=Sa.f(),t=yc();return e||t}function _4(e){var t=eo(e);t!==null&&t.tag===5&&t.type==="form"?Vb(t):Sa.r(e)}var ro=typeof document>"u"?null:document;function K1(e,t,n){var a=ro;if(a&&typeof t=="string"&&t){var r=vn(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),cy.has(r)||(cy.add(r),e={rel:e,crossOrigin:n,href:t},a.querySelector(r)===null&&(t=a.createElement("link"),Ot(t,"link",e),St(t),a.head.appendChild(t)))}}function N4(e){Sa.D(e),K1("dns-prefetch",e,null)}function k4(e,t){Sa.C(e,t),K1("preconnect",e,t)}function D4(e,t,n){Sa.L(e,t,n);var a=ro;if(a&&e&&t){var r='link[rel="preload"][as="'+vn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+vn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+vn(n.imageSizes)+'"]')):r+='[href="'+vn(e)+'"]';var l=r;switch(t){case"style":l=Pl(e);break;case"script":l=lo(e)}Tn.has(l)||(e=Ke({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Tn.set(l,e),a.querySelector(r)!==null||t==="style"&&a.querySelector(Pi(l))||t==="script"&&a.querySelector(qi(l))||(t=a.createElement("link"),Ot(t,"link",e),St(t),a.head.appendChild(t)))}}function L4(e,t){Sa.m(e,t);var n=ro;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+vn(a)+'"][href="'+vn(e)+'"]',l=r;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":l=lo(e)}if(!Tn.has(l)&&(e=Ke({rel:"modulepreload",href:e},t),Tn.set(l,e),n.querySelector(r)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qi(l)))return}a=n.createElement("link"),Ot(a,"link",e),St(a),n.head.appendChild(a)}}}function z4(e,t,n){Sa.S(e,t,n);var a=ro;if(a&&e){var r=Sl(a).hoistableStyles,l=Pl(e);t=t||"default";var o=r.get(l);if(!o){var i={loading:0,preload:null};if(o=a.querySelector(Pi(l)))i.loading=5;else{e=Ke({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Tn.get(l))&&_m(e,n);var s=o=a.createElement("link");St(s),Ot(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){i.loading|=1}),s.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Zs(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:i},r.set(l,o)}}}function U4(e,t){Sa.X(e,t);var n=ro;if(n&&e){var a=Sl(n).hoistableScripts,r=lo(e),l=a.get(r);l||(l=n.querySelector(qi(r)),l||(e=Ke({src:e,async:!0},t),(t=Tn.get(r))&&Nm(e,t),l=n.createElement("script"),St(l),Ot(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},a.set(r,l))}}function j4(e,t){Sa.M(e,t);var n=ro;if(n&&e){var a=Sl(n).hoistableScripts,r=lo(e),l=a.get(r);l||(l=n.querySelector(qi(r)),l||(e=Ke({src:e,async:!0,type:"module"},t),(t=Tn.get(r))&&Nm(e,t),l=n.createElement("script"),St(l),Ot(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},a.set(r,l))}}function fy(e,t,n,a){var r=(r=Pa.current)?Uu(r):null;if(!r)throw Error(I(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Pl(n.href),n=Sl(r).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Pl(n.href);var l=Sl(r).hoistableStyles,o=l.get(e);if(o||(r=r.ownerDocument||r,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},l.set(e,o),(l=r.querySelector(Pi(e)))&&!l._p&&(o.instance=l,o.state.loading=5),Tn.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},Tn.set(e,n),l||H4(r,e,n,o.state))),t&&a===null)throw Error(I(528,""));return o}if(t&&a!==null)throw Error(I(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=lo(n),n=Sl(r).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(I(444,e))}}function Pl(e){return'href="'+vn(e)+'"'}function Pi(e){return'link[rel="stylesheet"]['+e+"]"}function X1(e){return Ke({},e,{"data-precedence":e.precedence,precedence:null})}function H4(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ot(t,"link",n),St(t),e.head.appendChild(t))}function lo(e){return'[src="'+vn(e)+'"]'}function qi(e){return"script[async]"+e}function dy(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+vn(n.href)+'"]');if(a)return t.instance=a,St(a),a;var r=Ke({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),St(a),Ot(a,"style",r),Zs(a,n.precedence,e),t.instance=a;case"stylesheet":r=Pl(n.href);var l=e.querySelector(Pi(r));if(l)return t.state.loading|=4,t.instance=l,St(l),l;a=X1(n),(r=Tn.get(r))&&_m(a,r),l=(e.ownerDocument||e).createElement("link"),St(l);var o=l;return o._p=new Promise(function(i,s){o.onload=i,o.onerror=s}),Ot(l,"link",a),t.state.loading|=4,Zs(l,n.precedence,e),t.instance=l;case"script":return l=lo(n.src),(r=e.querySelector(qi(l)))?(t.instance=r,St(r),r):(a=n,(r=Tn.get(l))&&(a=Ke({},n),Nm(a,r)),e=e.ownerDocument||e,r=e.createElement("script"),St(r),Ot(r,"link",a),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(I(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,Zs(a,n.precedence,e));return t.instance}function Zs(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=a.length?a[a.length-1]:null,l=r,o=0;o<a.length;o++){var i=a[o];if(i.dataset.precedence===t)l=i;else if(l!==r)break}l?l.parentNode.insertBefore(e,l.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function _m(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Nm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ks=null;function hy(e,t,n){if(Ks===null){var a=new Map,r=Ks=new Map;r.set(n,a)}else r=Ks,a=r.get(n),a||(a=new Map,r.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var l=n[r];if(!(l[Ui]||l[Ct]||e==="link"&&l.getAttribute("rel")==="stylesheet")&&l.namespaceURI!=="http://www.w3.org/2000/svg"){var o=l.getAttribute(t)||"";o=e+o;var i=a.get(o);i?i.push(l):a.set(o,[l])}}return a}function my(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function B4(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 Q1(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function V4(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var r=Pl(a.href),l=t.querySelector(Pi(r));if(l){t=l._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ju.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=l,St(l);return}l=t.ownerDocument||t,a=X1(a),(r=Tn.get(r))&&_m(a,r),l=l.createElement("link"),St(l);var o=l;o._p=new Promise(function(i,s){o.onload=i,o.onerror=s}),Ot(l,"link",a),n.instance=l}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ju.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Lf=0;function I4(e,t){return e.stylesheets&&e.count===0&&Xs(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Xs(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4+t);0<e.imgBytes&&Lf===0&&(Lf=62500*E4());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xs(e,e.stylesheets),e.unsuspend)){var l=e.unsuspend;e.unsuspend=null,l()}},(e.imgBytes>Lf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(r)}}:null}function ju(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Hu=null;function Xs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Hu=new Map,t.forEach(P4,e),Hu=null,ju.call(e))}function P4(e,t){if(!(t.state.loading&4)){var n=Hu.get(e);if(n)var a=n.get(null);else{n=new Map,Hu.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),l=0;l<r.length;l++){var o=r[l];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),a=o)}a&&n.set(null,a)}r=t.instance,o=r.getAttribute("data-precedence"),l=n.get(o)||a,l===a&&n.set(null,r),n.set(o,r),this.count++,a=ju.bind(this),r.addEventListener("load",a),r.addEventListener("error",a),l?l.parentNode.insertBefore(r,l.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var wi={$$typeof:la,Provider:null,Consumer:null,_currentValue:Mr,_currentValue2:Mr,_threadCount:0};function q4(e,t,n,a,r,l,o,i,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=nf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nf(0),this.hiddenUpdates=nf(null),this.identifierPrefix=a,this.onUncaughtError=r,this.onCaughtError=l,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function F1(e,t,n,a,r,l,o,i,s,u,c,f){return e=new q4(e,t,n,o,s,u,c,f,i),t=1,l===!0&&(t|=24),l=tn(3,null,null,t),e.current=l,l.stateNode=e,t=am(),t.refCount++,e.pooledCache=t,t.refCount++,l.memoizedState={element:a,isDehydrated:n,cache:t},om(l),e}function J1(e){return e?(e=hl,e):hl}function W1(e,t,n,a,r,l){r=J1(r),a.context===null?a.context=r:a.pendingContext=r,a=$a(t),a.payload={element:n},l=l===void 0?null:l,l!==null&&(a.callback=l),n=Ya(e,a,t),n!==null&&(qt(n,e,t),Ko(n,e,t))}function py(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function km(e,t){py(e,t),(e=e.alternate)&&py(e,t)}function eS(e){if(e.tag===13||e.tag===31){var t=Zr(e,67108864);t!==null&&qt(t,e,67108864),km(e,67108864)}}function gy(e){if(e.tag===13||e.tag===31){var t=un();t=qh(t);var n=Zr(e,t);n!==null&&qt(n,e,t),km(e,t)}}var Bu=!0;function $4(e,t,n,a){var r=ye.T;ye.T=null;var l=ze.p;try{ze.p=2,Dm(e,t,n,a)}finally{ze.p=l,ye.T=r}}function Y4(e,t,n,a){var r=ye.T;ye.T=null;var l=ze.p;try{ze.p=8,Dm(e,t,n,a)}finally{ze.p=l,ye.T=r}}function Dm(e,t,n,a){if(Bu){var r=Fd(a);if(r===null)kf(e,t,a,Vu,n),yy(e,a);else if(Z4(r,e,t,n,a))a.stopPropagation();else if(yy(e,a),t&4&&-1<G4.indexOf(e)){for(;r!==null;){var l=eo(r);if(l!==null)switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var o=vr(l.pendingLanes);if(o!==0){var i=l;for(i.pendingLanes|=2,i.entangledLanes|=2;o;){var s=1<<31-sn(o);i.entanglements[1]|=s,o&=~s}Gn(l),!(Le&6)&&(Au=ln()+500,Ii(0))}}break;case 31:case 13:i=Zr(l,2),i!==null&&qt(i,l,2),yc(),km(l,2)}if(l=Fd(a),l===null&&kf(e,t,a,Vu,n),l===r)break;r=l}r!==null&&a.stopPropagation()}else kf(e,t,a,null,n)}}function Fd(e){return e=Zh(e),Lm(e)}var Vu=null;function Lm(e){if(Vu=null,e=il(e),e!==null){var t=ki(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Sv(t),e!==null)return e;e=null}else if(n===31){if(e=Ev(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 Vu=e,null}function tS(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(NR()){case Cv:return 2;case Tv:return 8;case pu:case kR:return 32;case Mv:return 268435456;default:return 32}default:return 32}}var Jd=!1,Ka=null,Xa=null,Qa=null,Ri=new Map,Ci=new Map,ka=[],G4="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 yy(e,t){switch(e){case"focusin":case"focusout":Ka=null;break;case"dragenter":case"dragleave":Xa=null;break;case"mouseover":case"mouseout":Qa=null;break;case"pointerover":case"pointerout":Ri.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ci.delete(t.pointerId)}}function Oo(e,t,n,a,r,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:l,targetContainers:[r]},t!==null&&(t=eo(t),t!==null&&eS(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Z4(e,t,n,a,r){switch(t){case"focusin":return Ka=Oo(Ka,e,t,n,a,r),!0;case"dragenter":return Xa=Oo(Xa,e,t,n,a,r),!0;case"mouseover":return Qa=Oo(Qa,e,t,n,a,r),!0;case"pointerover":var l=r.pointerId;return Ri.set(l,Oo(Ri.get(l)||null,e,t,n,a,r)),!0;case"gotpointercapture":return l=r.pointerId,Ci.set(l,Oo(Ci.get(l)||null,e,t,n,a,r)),!0}return!1}function nS(e){var t=il(e.target);if(t!==null){var n=ki(t);if(n!==null){if(t=n.tag,t===13){if(t=Sv(n),t!==null){e.blockedOn=t,tg(e.priority,function(){gy(n)});return}}else if(t===31){if(t=Ev(n),t!==null){e.blockedOn=t,tg(e.priority,function(){gy(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 Qs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Fd(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);gd=a,n.target.dispatchEvent(a),gd=null}else return t=eo(n),t!==null&&eS(t),e.blockedOn=n,!1;t.shift()}return!0}function vy(e,t,n){Qs(e)&&n.delete(t)}function K4(){Jd=!1,Ka!==null&&Qs(Ka)&&(Ka=null),Xa!==null&&Qs(Xa)&&(Xa=null),Qa!==null&&Qs(Qa)&&(Qa=null),Ri.forEach(vy),Ci.forEach(vy)}function ys(e,t){e.blockedOn===t&&(e.blockedOn=null,Jd||(Jd=!0,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,K4)))}var vs=null;function by(e){vs!==e&&(vs=e,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,function(){vs===e&&(vs=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],r=e[t+2];if(typeof a!="function"){if(Lm(a||n)===null)continue;break}var l=eo(n);l!==null&&(e.splice(t,3),t-=3,kd(l,{pending:!0,data:r,method:n.method,action:a},a,r))}}))}function ql(e){function t(s){return ys(s,e)}Ka!==null&&ys(Ka,e),Xa!==null&&ys(Xa,e),Qa!==null&&ys(Qa,e),Ri.forEach(t),Ci.forEach(t);for(var n=0;n<ka.length;n++){var a=ka[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ka.length&&(n=ka[0],n.blockedOn===null);)nS(n),n.blockedOn===null&&ka.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var r=n[a],l=n[a+1],o=r[Yt]||null;if(typeof l=="function")o||by(n);else if(o){var i=null;if(l&&l.hasAttribute("formAction")){if(r=l,o=l[Yt]||null)i=o.formAction;else if(Lm(r)!==null)continue}else i=o.action;typeof i=="function"?n[a+1]=i:(n.splice(a,3),a-=3),by(n)}}}function aS(){function e(l){l.canIntercept&&l.info==="react-transition"&&l.intercept({handler:function(){return new Promise(function(o){return r=o})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var l=navigation.currentEntry;l&&l.url!=null&&navigation.navigate(l.url,{state:l.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function zm(e){this._internalRoot=e}Sc.prototype.render=zm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));var n=t.current,a=un();W1(n,a,e,t,null,null)};Sc.prototype.unmount=zm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;W1(e.current,2,null,e,null,null),yc(),t[Wl]=null}};function Sc(e){this._internalRoot=e}Sc.prototype.unstable_scheduleHydration=function(e){if(e){var t=kv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ka.length&&t!==0&&t<ka[n].priority;n++);ka.splice(n,0,e),n===0&&nS(e)}};var Sy=vv.version;if(Sy!=="19.2.1")throw Error(I(527,Sy,"19.2.1"));ze.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=RR(t),e=e!==null?xv(e):null,e=e===null?null:e.stateNode,e};var X4={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:ye,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bs.isDisabled&&bs.supportsFiber)try{Di=bs.inject(X4),on=bs}catch{}}rc.createRoot=function(e,t){if(!bv(e))throw Error(I(299));var n=!1,a="",r=Kb,l=Xb,o=Qb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(l=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=F1(e,1,!1,null,null,n,a,null,r,l,o,aS),e[Wl]=t.current,Am(e),new zm(t)};rc.hydrateRoot=function(e,t,n){if(!bv(e))throw Error(I(299));var a=!1,r="",l=Kb,o=Xb,i=Qb,s=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(l=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(i=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=F1(e,1,!0,t,n??null,a,r,s,l,o,i,aS),t.context=J1(null),n=t.current,a=un(),a=qh(a),r=$a(a),r.callback=null,Ya(n,r,a),n=a,t.current.lanes=n,zi(t,n),Gn(t),e[Wl]=t.current,Am(e),new Sc(t)};rc.version="19.2.1";function rS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rS)}catch(e){console.error(e)}}rS(),pv.exports=rc;var Q4=pv.exports;const F4=e=>({...e,baseUrl:"/cdn-cgi/explorer/api",throwOnError:!0}),J4={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},W4=({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:a,responseValidator:r,sseDefaultRetryDelay:l,sseMaxRetryAttempts:o,sseMaxRetryDelay:i,sseSleepFn:s,url:u,...c})=>{let f;const d=s??(v=>new Promise(E=>setTimeout(E,v)));return{stream:async function*(){let v=l??3e3,E=0;const g=c.signal??new AbortController().signal;for(;!g.aborted;){E++;const y=c.headers instanceof Headers?c.headers:new Headers(c.headers);f!==void 0&&y.set("Last-Event-ID",f);try{const S={redirect:"follow",...c,body:c.serializedBody,headers:y,signal:g};let b=new Request(u,S);e&&(b=await e(u,S));const R=await(c.fetch??globalThis.fetch)(b);if(!R.ok)throw new Error(`SSE failed: ${R.status} ${R.statusText}`);if(!R.body)throw new Error("No body in SSE response");const w=R.body.pipeThrough(new TextDecoderStream).getReader();let C="";const A=()=>{try{w.cancel()}catch{}};g.addEventListener("abort",A);try{for(;;){const{done:T,value:k}=await w.read();if(T)break;C+=k,C=C.replace(/\r\n/g,`
|
||
`).replace(/\r/g,`
|
||
`);const M=C.split(`
|
||
|
||
`);C=M.pop()??"";for(const L of M){const z=L.split(`
|
||
`),_=[];let N;for(const H of z)if(H.startsWith("data:"))_.push(H.replace(/^data:\s*/,""));else if(H.startsWith("event:"))N=H.replace(/^event:\s*/,"");else if(H.startsWith("id:"))f=H.replace(/^id:\s*/,"");else if(H.startsWith("retry:")){const j=Number.parseInt(H.replace(/^retry:\s*/,""),10);Number.isNaN(j)||(v=j)}let D,O=!1;if(_.length){const H=_.join(`
|
||
`);try{D=JSON.parse(H),O=!0}catch{D=H}}O&&(r&&await r(D),a&&(D=await a(D))),n==null||n({data:D,event:N,id:f,retry:v}),_.length&&(yield D)}}}finally{g.removeEventListener("abort",A),w.releaseLock()}break}catch(S){if(t==null||t(S),o!==void 0&&E>=o)break;const b=Math.min(v*2**(E-1),i??3e4);await d(b)}}}()}},eT=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},tT=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},nT=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},lS=({allowReserved:e,explode:t,name:n,style:a,value:r})=>{if(!t){const i=(e?r:r.map(s=>encodeURIComponent(s))).join(tT(a));switch(a){case"label":return`.${i}`;case"matrix":return`;${n}=${i}`;case"simple":return i;default:return`${n}=${i}`}}const l=eT(a),o=r.map(i=>a==="label"||a==="simple"?e?i:encodeURIComponent(i):Ec({allowReserved:e,name:n,value:i})).join(l);return a==="label"||a==="matrix"?l+o:o},Ec=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},oS=({allowReserved:e,explode:t,name:n,style:a,value:r,valueOnly:l})=>{if(r instanceof Date)return l?r.toISOString():`${n}=${r.toISOString()}`;if(a!=="deepObject"&&!t){let s=[];Object.entries(r).forEach(([c,f])=>{s=[...s,c,e?f:encodeURIComponent(f)]});const u=s.join(",");switch(a){case"form":return`${n}=${u}`;case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;default:return u}}const o=nT(a),i=Object.entries(r).map(([s,u])=>Ec({allowReserved:e,name:a==="deepObject"?`${n}[${s}]`:s,value:u})).join(o);return a==="label"||a==="matrix"?o+i:i},aT=/\{[^{}]+\}/g,rT=({path:e,url:t})=>{let n=t;const a=t.match(aT);if(a)for(const r of a){let l=!1,o=r.substring(1,r.length-1),i="simple";o.endsWith("*")&&(l=!0,o=o.substring(0,o.length-1)),o.startsWith(".")?(o=o.substring(1),i="label"):o.startsWith(";")&&(o=o.substring(1),i="matrix");const s=e[o];if(s==null)continue;if(Array.isArray(s)){n=n.replace(r,lS({explode:l,name:o,style:i,value:s}));continue}if(typeof s=="object"){n=n.replace(r,oS({explode:l,name:o,style:i,value:s,valueOnly:!0}));continue}if(i==="matrix"){n=n.replace(r,`;${Ec({name:o,value:s})}`);continue}const u=encodeURIComponent(i==="label"?`.${s}`:s);n=n.replace(r,u)}return n},lT=({baseUrl:e,path:t,query:n,querySerializer:a,url:r})=>{const l=r.startsWith("/")?r:`/${r}`;let o=(e??"")+l;t&&(o=rT({path:t,url:o}));let i=n?a(n):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(o+=`?${i}`),o};function Ey(e){const t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}const oT=async(e,t)=>{const n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},iS=({parameters:e={},...t}={})=>a=>{const r=[];if(a&&typeof a=="object")for(const l in a){const o=a[l];if(o==null)continue;const i=e[l]||t;if(Array.isArray(o)){const s=lS({allowReserved:i.allowReserved,explode:!0,name:l,style:"form",value:o,...i.array});s&&r.push(s)}else if(typeof o=="object"){const s=oS({allowReserved:i.allowReserved,explode:!0,name:l,style:"deepObject",value:o,...i.object});s&&r.push(s)}else{const s=Ec({allowReserved:i.allowReserved,name:l,value:o});s&&r.push(s)}}return r.join("&")},iT=e=>{var n;if(!e)return"stream";const t=(n=e.split(";")[0])==null?void 0:n.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(a=>t.startsWith(a)))return"blob";if(t.startsWith("text/"))return"text"}},sT=(e,t)=>{var n,a;return t?!!(e.headers.has(t)||(n=e.query)!=null&&n[t]||(a=e.headers.get("Cookie"))!=null&&a.includes(`${t}=`)):!1},uT=async({security:e,...t})=>{for(const n of e){if(sT(t,n.name))continue;const a=await oT(n,t.auth);if(!a)continue;const r=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[r]=a;break;case"cookie":t.headers.append("Cookie",`${r}=${a}`);break;case"header":default:t.headers.set(r,a);break}}},xy=e=>lT({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:iS(e.querySerializer),url:e.url}),wy=(e,t)=>{var a;const n={...e,...t};return(a=n.baseUrl)!=null&&a.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=sS(e.headers,t.headers),n},cT=e=>{const t=[];return e.forEach((n,a)=>{t.push([a,n])}),t},sS=(...e)=>{const t=new Headers;for(const n of e){if(!n)continue;const a=n instanceof Headers?cT(n):Object.entries(n);for(const[r,l]of a)if(l===null)t.delete(r);else if(Array.isArray(l))for(const o of l)t.append(r,o);else l!==void 0&&t.set(r,typeof l=="object"?JSON.stringify(l):l)}return t};class zf{constructor(){pe(this,"fns",[])}clear(){this.fns=[]}eject(t){const n=this.getInterceptorIndex(t);this.fns[n]&&(this.fns[n]=null)}exists(t){const n=this.getInterceptorIndex(t);return!!this.fns[n]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,n){const a=this.getInterceptorIndex(t);return this.fns[a]?(this.fns[a]=n,t):!1}use(t){return this.fns.push(t),this.fns.length-1}}const fT=()=>({error:new zf,request:new zf,response:new zf}),dT=iS({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),hT={"Content-Type":"application/json"},uS=(e={})=>({...J4,headers:hT,parseAs:"auto",querySerializer:dT,...e}),mT=(e={})=>{let t=wy(uS(),e);const n=()=>({...t}),a=u=>(t=wy(t,u),n()),r=fT(),l=async u=>{const c={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:sS(t.headers,u.headers),serializedBody:void 0};c.security&&await uT({...c,security:c.security}),c.requestValidator&&await c.requestValidator(c),c.body!==void 0&&c.bodySerializer&&(c.serializedBody=c.bodySerializer(c.body)),(c.body===void 0||c.serializedBody==="")&&c.headers.delete("Content-Type");const f=xy(c);return{opts:c,url:f}},o=async u=>{const{opts:c,url:f}=await l(u),d={redirect:"follow",...c,body:Ey(c)};let h=new Request(f,d);for(const x of r.request.fns)x&&(h=await x(h,c));const p=c.fetch;let v;try{v=await p(h)}catch(x){let R=x;for(const w of r.error.fns)w&&(R=await w(x,void 0,h,c));if(R=R||{},c.throwOnError)throw R;return c.responseStyle==="data"?void 0:{error:R,request:h,response:void 0}}for(const x of r.response.fns)x&&(v=await x(v,h,c));const E={request:h,response:v};if(v.ok){const x=(c.parseAs==="auto"?iT(v.headers.get("Content-Type")):c.parseAs)??"json";if(v.status===204||v.headers.get("Content-Length")==="0"){let w;switch(x){case"arrayBuffer":case"blob":case"text":w=await v[x]();break;case"formData":w=new FormData;break;case"stream":w=v.body;break;case"json":default:w={};break}return c.responseStyle==="data"?w:{data:w,...E}}let R;switch(x){case"arrayBuffer":case"blob":case"formData":case"text":R=await v[x]();break;case"json":{const w=await v.text();R=w?JSON.parse(w):{};break}case"stream":return c.responseStyle==="data"?v.body:{data:v.body,...E}}return x==="json"&&(c.responseValidator&&await c.responseValidator(R),c.responseTransformer&&(R=await c.responseTransformer(R))),c.responseStyle==="data"?R:{data:R,...E}}const g=await v.text();let y;try{y=JSON.parse(g)}catch{}const S=y??g;let b=S;for(const x of r.error.fns)x&&(b=await x(S,v,h,c));if(b=b||{},c.throwOnError)throw b;return c.responseStyle==="data"?void 0:{error:b,...E}},i=u=>c=>o({...c,method:u}),s=u=>async c=>{const{opts:f,url:d}=await l(c);return W4({...f,body:f.body,headers:f.headers,method:u,onRequest:async(h,p)=>{let v=new Request(h,p);for(const E of r.request.fns)E&&(v=await E(v,f));return v},serializedBody:Ey(f),url:d})};return{buildUrl:xy,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:n,head:i("HEAD"),interceptors:r,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:o,setConfig:a,sse:{connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),head:s("HEAD"),options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),trace:s("TRACE")},trace:i("TRACE")}},cr=mT(F4(uS({baseUrl:"/cdn-cgi/explorer/api"}))),pT=e=>cr.get({url:"/storage/kv/namespaces",...e}),E_=e=>(e.client??cr).get({url:"/storage/kv/namespaces/{namespace_id}/keys",...e}),x_=e=>(e.client??cr).delete({url:"/storage/kv/namespaces/{namespace_id}/values/{key_name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),w_=e=>(e.client??cr).get({url:"/storage/kv/namespaces/{namespace_id}/values/{key_name}",...e}),R_=e=>(e.client??cr).put({bodySerializer:null,url:"/storage/kv/namespaces/{namespace_id}/values/{key_name}",...e,headers:{"Content-Type":"application/octet-stream",...e.headers}}),C_=e=>(e.client??cr).post({url:"/storage/kv/namespaces/{namespace_id}/bulk/get",...e,headers:{"Content-Type":"application/json",...e.headers}}),gT=e=>cr.get({url:"/d1/database",...e}),yT=e=>(e.client??cr).post({url:"/d1/database/{database_id}/raw",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ry={};function xc(e,t){const n=m.useRef(Ry);return n.current===Ry&&(n.current=e(t)),n}const Uf=Ni[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],vT=Uf&&Uf!==m.useLayoutEffect?Uf:e=>e();function Vr(e){const t=xc(bT).current;return t.next=e,vT(t.effect),t.trampoline}function bT(){const e={next:void 0,callback:ST,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function ST(){}function Um(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(a=>n.searchParams.append("args[]",a)),`Base UI error #${e}; visit ${n} for the full message.`}function Wd(e,t,n,a){const r=xc(cS).current;return xT(r,e,t,n,a)&&fS(r,[e,t,n,a]),r.callback}function ET(e){const t=xc(cS).current;return wT(t,e)&&fS(t,e),t.callback}function cS(){return{callback:null,cleanup:null,refs:[]}}function xT(e,t,n,a,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==a||e.refs[3]!==r}function wT(e,t){return e.refs.length!==t.length||e.refs.some((n,a)=>n!==t[a])}function fS(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 a=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const l=t[r];if(l!=null)switch(typeof l){case"function":{const o=l(n);typeof o=="function"&&(a[r]=o);break}case"object":{l.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const l=t[r];if(l!=null)switch(typeof l){case"function":{const o=a[r];typeof o=="function"?o():l(null);break}case"object":{l.current=null;break}}}}}}}const RT=parseInt(m.version,10);function CT(e){return RT>=e}function Cy(e){if(!m.isValidElement(e))return null;const t=e,n=t.props;return(CT(19)?n==null?void 0:n.ref:t.ref)??null}function eh(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function TT(e,t){const n={};for(const a in e){const r=e[a];if(t!=null&&t.hasOwnProperty(a)){const l=t[a](r);l!=null&&Object.assign(n,l);continue}r===!0?n[`data-${a.toLowerCase()}`]="":r&&(n[`data-${a.toLowerCase()}`]=r.toString())}return n}function MT(e,t){return typeof e=="function"?e(t):e}function OT(e,t){return typeof e=="function"?e(t):e}const ai={};function dS(e,t,n,a,r){let l={...th(e,ai)};return t&&(l=Ho(l,t)),n&&(l=Ho(l,n)),a&&(l=Ho(l,a)),r&&(l=Ho(l,r)),l}function AT(e){if(e.length===0)return ai;if(e.length===1)return th(e[0],ai);let t={...th(e[0],ai)};for(let n=1;n<e.length;n+=1)t=Ho(t,e[n]);return t}function Ho(e,t){return hS(t)?t(e):_T(e,t)}function _T(e,t){if(!t)return e;for(const n in t){const a=t[n];switch(n){case"style":{e[n]=eh(e.style,a);break}case"className":{e[n]=mS(e.className,a);break}default:NT(n,a)?e[n]=kT(e[n],a):e[n]=a}}return e}function NT(e,t){const n=e.charCodeAt(0),a=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&a===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function hS(e){return typeof e=="function"}function th(e,t){return hS(e)?e(t):e??ai}function kT(e,t){return t?e?n=>{if(DT(n)){const r=n;nh(r);const l=t(r);return r.baseUIHandlerPrevented||e==null||e(r),l}const a=t(n);return e==null||e(n),a}:t:e}function nh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function mS(e,t){return t?e?t+" "+e:t:e}function DT(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function T_(){}const M_=Object.freeze([]),xr=Object.freeze({});function jm(e,t,n={}){const a=t.render,r=LT(t,n);if(n.enabled===!1)return null;const l=n.state??xr;return zT(e,a,r,l)}function LT(e,t={}){const{className:n,style:a,render:r}=e,{state:l=xr,ref:o,props:i,stateAttributesMapping:s,enabled:u=!0}=t,c=u?MT(n,l):void 0,f=u?OT(a,l):void 0,d=u?TT(l,s):xr,h=u?eh(d,Array.isArray(i)?AT(i):i)??xr:xr;return typeof document<"u"&&(u?Array.isArray(o)?h.ref=ET([h.ref,Cy(r),...o]):h.ref=Wd(h.ref,Cy(r),o):Wd(null,null)),u?(c!==void 0&&(h.className=mS(h.className,c)),f!==void 0&&(h.style=eh(h.style,f)),h):xr}function zT(e,t,n,a){if(t){if(typeof t=="function")return t(n,a);const r=dS(n,t.props);return r.ref=n.ref,m.cloneElement(t,r)}if(e&&typeof e=="string")return UT(e,n);throw new Error(Um(8))}function UT(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)}function jT({controlled:e,default:t,name:n,state:a="value"}){const{current:r}=m.useRef(e!==void 0),[l,o]=m.useState(t),i=r?e:l,s=m.useCallback(u=>{r||o(u)},[]);return[i,s]}const HT=()=>{},xn=typeof document<"u"?m.useLayoutEffect:HT,BT={...Ni};let Ty=0;function VT(e,t="mui"){const[n,a]=m.useState(e),r=e||n;return m.useEffect(()=>{n==null&&(Ty+=1,a(`${t}-${Ty}`))},[n,t]),r}const My=BT.useId;function IT(e,t){if(My!==void 0){const n=My();return e??(t?`${t}-${n}`:n)}return VT(e,t)}function PT(e){return IT(e,"base-ui")}const qT="none",$T="trigger-press",O_="trigger-hover",A_="trigger-focus",__="outside-press",N_="item-press",k_="close-press",D_="focus-out",L_="escape-key",z_="list-navigation",U_="cancel-open",j_="sibling-open",H_="imperative-action",B_="window-resize";function pS(e,t,n,a){let r=!1,l=!1;const o=xr;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){l=!0},get isCanceled(){return r},get isPropagationAllowed(){return l},trigger:n,...o}}const YT=[];function gS(e){m.useEffect(e,YT)}const Ss=null;class GT{constructor(){pe(this,"callbacks",[]);pe(this,"callbacksCount",0);pe(this,"nextId",1);pe(this,"startId",1);pe(this,"isScheduled",!1);pe(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let l=0;l<n.length;l+=1)(r=n[l])==null||r.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 Es=new GT;class at{constructor(){pe(this,"currentId",Ss);pe(this,"cancel",()=>{this.currentId!==Ss&&(Es.cancel(this.currentId),this.currentId=Ss)});pe(this,"disposeEffect",()=>this.cancel)}static create(){return new at}static request(t){return Es.request(t)}static cancel(t){return Es.cancel(t)}request(t){this.cancel(),this.currentId=Es.request(()=>{this.currentId=Ss,t()})}}function yS(){const e=xc(at.create).current;return gS(e.disposeEffect),e}function ZT(e){return e==null?e:"current"in e?e.current:e}let Ti=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const KT={[Ti.startingStyle]:""},XT={[Ti.endingStyle]:""},vS={transitionStatus(e){return e==="starting"?KT:e==="ending"?XT:null}};function bS(e,t=!1,n=!0){const a=yS();return Vr((r,l=null)=>{a.cancel();function o(){zt.flushSync(r)}const i=ZT(e);if(i==null)return;const s=i;if(typeof s.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let u=function(){const f=Ti.startingStyle;if(!s.hasAttribute(f)){a.request(c);return}const d=new MutationObserver(()=>{s.hasAttribute(f)||(d.disconnect(),c())});d.observe(s,{attributes:!0,attributeFilter:[f]}),l==null||l.addEventListener("abort",()=>d.disconnect(),{once:!0})},c=function(){Promise.all(s.getAnimations().map(f=>f.finished)).then(()=>{l!=null&&l.aborted||o()}).catch(()=>{const f=s.getAnimations();if(n){if(l!=null&&l.aborted)return;o()}else f.length>0&&f.some(d=>d.pending||d.playState!=="finished")&&c()})};if(t){u();return}a.request(c)}})}function QT(e,t=!1,n=!1){const[a,r]=m.useState(e&&t?"idle":void 0),[l,o]=m.useState(e);return e&&!l&&(o(!0),r("starting")),!e&&l&&a!=="ending"&&!n&&r("ending"),!e&&!l&&a==="ending"&&r(void 0),xn(()=>{if(!e&&l&&a!=="ending"&&n){const i=at.request(()=>{r("ending")});return()=>{at.cancel(i)}}},[e,l,a,n]),xn(()=>{if(!e||t)return;const i=at.request(()=>{r(void 0)});return()=>{at.cancel(i)}},[t,e]),xn(()=>{if(!e||!t)return;e&&l&&a!=="idle"&&r("starting");const i=at.request(()=>{r("idle")});return()=>{at.cancel(i)}},[t,e,l,r,a]),m.useMemo(()=>({mounted:l,setMounted:o,transitionStatus:a}),[l,a])}function FT(e){const{open:t,defaultOpen:n,onOpenChange:a,disabled:r}=e,l=t!==void 0,[o,i]=jT({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:s,setMounted:u,transitionStatus:c}=QT(o,!0,!0),[f,d]=m.useState(o),[{height:h,width:p},v]=m.useState({height:void 0,width:void 0}),E=PT(),[g,y]=m.useState(),S=g??E,[b,x]=m.useState(!1),[R,w]=m.useState(!1),C=m.useRef(null),A=m.useRef(null),T=m.useRef(null),k=m.useRef(null),M=bS(k,!1),L=Vr(z=>{const _=!o,N=pS($T,z.nativeEvent);if(a(_,N),N.isCanceled)return;const D=k.current;A.current==="css-animation"&&D!=null&&D.style.removeProperty("animation-name"),!b&&!R&&(A.current!=null&&A.current!=="css-animation"&&!s&&_&&u(!0),A.current==="css-animation"&&(!f&&_&&d(!0),!s&&_&&u(!0))),i(_),A.current==="none"&&s&&!_&&u(!1)});return xn(()=>{l&&A.current==="none"&&!R&&!o&&u(!1)},[l,R,o,t,u]),m.useMemo(()=>({abortControllerRef:C,animationTypeRef:A,disabled:r,handleTrigger:L,height:h,mounted:s,open:o,panelId:S,panelRef:k,runOnceAnimationsFinish:M,setDimensions:v,setHiddenUntilFound:x,setKeepMounted:w,setMounted:u,setOpen:i,setPanelIdState:y,setVisible:d,transitionDimensionRef:T,transitionStatus:c,visible:f,width:p}),[C,A,r,L,h,s,o,S,k,M,v,x,w,u,i,d,T,c,f,p])}const SS=m.createContext(void 0);function ES(){const e=m.useContext(SS);if(e===void 0)throw new Error(Um(15));return e}let ri=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ti.startingStyle]="startingStyle",e[e.endingStyle=Ti.endingStyle]="endingStyle",e}({}),JT=function(e){return e.panelOpen="data-panel-open",e}({});const WT={[ri.open]:""},e6={[ri.closed]:""},t6={open(e){return e?{[JT.panelOpen]:""}:null}},n6={open(e){return e?WT:e6}},xS={...n6,...vS},a6=m.forwardRef(function(t,n){const{render:a,className:r,defaultOpen:l=!1,disabled:o=!1,onOpenChange:i,open:s,...u}=t,c=Vr(i),f=FT({open:s,defaultOpen:l,onOpenChange:c,disabled:o}),d=m.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),h=m.useMemo(()=>({...f,onOpenChange:c,state:d}),[f,c,d]),p=jm("div",t,{state:d,ref:n,props:u,stateAttributesMapping:xS});return U.jsx(SS.Provider,{value:h,children:p})});function wc(){return typeof window<"u"}function Hm(e){return wS(e)?(e.nodeName||"").toLowerCase():"#document"}function oo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function r6(e){var t;return(t=(wS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wS(e){return wc()?e instanceof Node||e instanceof oo(e).Node:!1}function RS(e){return wc()?e instanceof Element||e instanceof oo(e).Element:!1}function Bm(e){return wc()?e instanceof HTMLElement||e instanceof oo(e).HTMLElement:!1}function Oy(e){return!wc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oo(e).ShadowRoot}const l6=new Set(["inline","contents"]);function CS(e){const{overflow:t,overflowX:n,overflowY:a,display:r}=MS(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!l6.has(r)}const o6=new Set(["table","td","th"]);function V_(e){return o6.has(Hm(e))}const i6=[":popover-open",":modal"];function s6(e){return i6.some(t=>{try{return e.matches(t)}catch{return!1}})}const u6=["transform","translate","scale","rotate","perspective"],c6=["transform","translate","scale","rotate","perspective","filter"],f6=["paint","layout","strict","content"];function d6(e){const t=h6(),n=RS(e)?MS(e):e;return u6.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||c6.some(a=>(n.willChange||"").includes(a))||f6.some(a=>(n.contain||"").includes(a))}function I_(e){let t=ah(e);for(;Bm(t)&&!TS(t);){if(d6(t))return t;if(s6(t))return null;t=ah(t)}return null}function h6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const m6=new Set(["html","body","#document"]);function TS(e){return m6.has(Hm(e))}function MS(e){return oo(e).getComputedStyle(e)}function P_(e){return RS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ah(e){if(Hm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Oy(e)&&e.host||r6(e);return Oy(t)?t.host:t}function OS(e){const t=ah(e);return TS(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bm(t)&&CS(t)?t:OS(t)}function Ay(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=OS(e),l=r===((a=e.ownerDocument)==null?void 0:a.body),o=oo(r);if(l){const i=p6(o);return t.concat(o,o.visualViewport||[],CS(r)?r:[],i&&n?Ay(i):[])}return t.concat(r,Ay(r,[],n))}function p6(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const g6=m.createContext(void 0);function y6(e=!1){const t=m.useContext(g6);if(t===void 0&&!e)throw new Error(Um(16));return t}function v6(e){const{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:r=0,isNativeButton:l}=e,o=a&&t!==!1,i=a&&t===!1;return{props:m.useMemo(()=>{const u={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return a||(u.tabIndex=r,!l&&n&&(u.tabIndex=t?r:-1)),(l&&(t||o)||!l&&n)&&(u["aria-disabled"]=n),l&&(!t||i)&&(u.disabled=n),u},[a,n,t,o,i,l,r])}}function b6(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:r=!0}=e,l=m.useRef(null),o=y6(!0)!==void 0,i=Vr(()=>{const d=l.current;return!!((d==null?void 0:d.tagName)==="A"&&(d!=null&&d.href))}),{props:s}=v6({focusableWhenDisabled:n,disabled:t,composite:o,tabIndex:a,isNativeButton:r}),u=m.useCallback(()=>{const d=l.current;S6(d)&&o&&t&&s.disabled===void 0&&d.disabled&&(d.disabled=!1)},[t,s.disabled,o]);xn(u,[u]);const c=m.useCallback((d={})=>{const{onClick:h,onMouseDown:p,onKeyUp:v,onKeyDown:E,onPointerDown:g,...y}=d;return dS({type:r?"button":void 0,onClick(b){if(t){b.preventDefault();return}h==null||h(b)},onMouseDown(b){t||p==null||p(b)},onKeyDown(b){if(t||(nh(b),E==null||E(b)),b.baseUIHandlerPrevented)return;const x=b.target===b.currentTarget&&!r&&!i()&&!t,R=b.key==="Enter",w=b.key===" ";x&&((w||R)&&b.preventDefault(),R&&(h==null||h(b)))},onKeyUp(b){t||(nh(b),v==null||v(b)),!b.baseUIHandlerPrevented&&b.target===b.currentTarget&&!r&&!t&&b.key===" "&&(h==null||h(b))},onPointerDown(b){if(t){b.preventDefault();return}g==null||g(b)}},r?void 0:{role:"button"},s,y)},[t,s,r,i]),f=Vr(d=>{l.current=d,u()});return{getButtonProps:c,buttonRef:f}}function S6(e){return Bm(e)&&e.tagName==="BUTTON"}const E6={...t6,...vS},x6=m.forwardRef(function(t,n){const{panelId:a,open:r,handleTrigger:l,state:o,disabled:i}=ES(),{className:s,disabled:u=i,id:c,render:f,nativeButton:d=!0,...h}=t,{getButtonProps:p,buttonRef:v}=b6({disabled:u,focusableWhenDisabled:!0,native:d}),E=m.useMemo(()=>({"aria-controls":r?a:void 0,"aria-expanded":r,onClick:l}),[a,r,l]);return jm("button",t,{state:o,ref:[n,v],props:[E,h,p],stateAttributesMapping:E6})});let w6=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});function R6(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:a,height:r,hiddenUntilFound:l,keepMounted:o,id:i,mounted:s,onOpenChange:u,open:c,panelRef:f,runOnceAnimationsFinish:d,setDimensions:h,setMounted:p,setOpen:v,setVisible:E,transitionDimensionRef:g,visible:y,width:S}=e,b=m.useRef(!1),x=m.useRef(null),R=m.useRef(c),w=m.useRef(c),C=yS(),A=m.useMemo(()=>n.current==="css-animation"?!y:!c&&!s,[c,s,y,n]),T=Vr(M=>{if(!M)return;if(n.current==null||g.current==null){const _=getComputedStyle(M),N=_.animationName!=="none"&&_.animationName!=="",D=_.transitionDuration!=="0s"&&_.transitionDuration!=="";N&&D||(_.animationName==="none"&&_.transitionDuration!=="0s"?n.current="css-transition":_.animationName!=="none"&&_.transitionDuration==="0s"?n.current="css-animation":n.current="none"),M.getAttribute(w6.orientation)==="horizontal"||_.transitionProperty.indexOf("width")>-1?g.current="width":g.current="height"}if(n.current!=="css-transition")return;(r===void 0||S===void 0)&&(h({height:M.scrollHeight,width:M.scrollWidth}),w.current&&M.style.setProperty("transition-duration","0s"));let L=-1,z=-1;return L=at.request(()=>{w.current=!1,z=at.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})}),()=>{at.cancel(L),at.cancel(z)}}),k=Wd(a,f,T);return xn(()=>{if(n.current!=="css-transition")return;const M=f.current;if(!M)return;let L=-1;if(t.current!=null&&(t.current.abort(),t.current=null),c){const z={"justify-content":M.style.justifyContent,"align-items":M.style.alignItems,"align-content":M.style.alignContent,"justify-items":M.style.justifyItems};Object.keys(z).forEach(_=>{M.style.setProperty(_,"initial","important")}),!w.current&&!o&&M.setAttribute(ri.startingStyle,""),h({height:M.scrollHeight,width:M.scrollWidth}),L=at.request(()=>{Object.entries(z).forEach(([_,N])=>{N===""?M.style.removeProperty(_):M.style.setProperty(_,N)})})}else{if(M.scrollHeight===0&&M.scrollWidth===0)return;h({height:M.scrollHeight,width:M.scrollWidth});const z=new AbortController;t.current=z;const _=z.signal;let N=null;const D=ri.endingStyle;return N=new MutationObserver(O=>{O.some(j=>j.type==="attributes"&&j.attributeName===D)&&(N==null||N.disconnect(),N=null,d(()=>{h({height:0,width:0}),M.style.removeProperty("content-visibility"),p(!1),t.current===z&&(t.current=null)},_))}),N.observe(M,{attributes:!0,attributeFilter:[D]}),()=>{N==null||N.disconnect(),C.cancel(),t.current===z&&(z.abort(),t.current=null)}}return()=>{at.cancel(L)}},[t,n,C,l,o,s,c,f,d,h,p]),xn(()=>{if(n.current!=="css-animation")return;const M=f.current;M&&(x.current=M.style.animationName||x.current,M.style.setProperty("animation-name","none"),h({height:M.scrollHeight,width:M.scrollWidth}),!R.current&&!b.current&&M.style.removeProperty("animation-name"),c?(t.current!=null&&(t.current.abort(),t.current=null),p(!0),E(!0)):(t.current=new AbortController,d(()=>{p(!1),E(!1),t.current=null},t.current.signal)))},[t,n,c,f,d,h,p,E,y]),gS(()=>{const M=at.request(()=>{R.current=!1});return()=>at.cancel(M)}),xn(()=>{if(!l)return;const M=f.current;if(!M)return;let L=-1,z=-1;return c&&b.current&&(M.style.transitionDuration="0s",h({height:M.scrollHeight,width:M.scrollWidth}),L=at.request(()=>{b.current=!1,z=at.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})})),()=>{at.cancel(L),at.cancel(z)}},[l,c,f,h]),xn(()=>{const M=f.current;M&&l&&A&&(M.setAttribute("hidden","until-found"),n.current==="css-transition"&&M.setAttribute(ri.startingStyle,""))},[l,A,n,f]),m.useEffect(function(){const L=f.current;if(!L)return;function z(_){b.current=!0,v(!0),u(!0,pS(qT,_))}return L.addEventListener("beforematch",z),()=>{L.removeEventListener("beforematch",z)}},[u,f,v]),m.useMemo(()=>({props:{hidden:A,id:i,ref:k}}),[A,i,k])}let _y=function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e}({});function C6(e){const{enabled:t=!0,open:n,ref:a,onComplete:r}=e,l=Vr(r),o=bS(a,n,!1);m.useEffect(()=>{if(!t)return;const i=new AbortController;return o(l,i.signal),()=>{i.abort()}},[t,n,l,o])}const T6=m.forwardRef(function(t,n){const{className:a,hiddenUntilFound:r,keepMounted:l,render:o,id:i,...s}=t,{abortControllerRef:u,animationTypeRef:c,height:f,mounted:d,onOpenChange:h,open:p,panelId:v,panelRef:E,runOnceAnimationsFinish:g,setDimensions:y,setHiddenUntilFound:S,setKeepMounted:b,setMounted:x,setPanelIdState:R,setOpen:w,setVisible:C,state:A,transitionDimensionRef:T,visible:k,width:M,transitionStatus:L}=ES(),z=r??!1,_=l??!1;xn(()=>{if(i)return R(i),()=>{R(void 0)}},[i,R]),xn(()=>{S(z)},[S,z]),xn(()=>{b(_)},[b,_]);const{props:N}=R6({abortControllerRef:u,animationTypeRef:c,externalRef:n,height:f,hiddenUntilFound:z,id:v,keepMounted:_,mounted:d,onOpenChange:h,open:p,panelRef:E,runOnceAnimationsFinish:g,setDimensions:y,setMounted:x,setOpen:w,setVisible:C,transitionDimensionRef:T,visible:k,width:M});C6({open:p&&L==="idle",ref:E,onComplete(){p&&y({height:void 0,width:void 0})}});const D=m.useMemo(()=>({...A,transitionStatus:L}),[A,L]),O=jm("div",t,{state:D,ref:[n,E],props:[N,{style:{[_y.collapsiblePanelHeight]:f===void 0?"auto":`${f}px`,[_y.collapsiblePanelWidth]:M===void 0?"auto":`${M}px`}},s],stateAttributesMapping:xS});return _||z||!_&&d?O:null});function AS(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=AS(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function M6(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=AS(e))&&(a&&(a+=" "),a+=t);return a}const O6=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},A6=(e,t)=>({classGroupId:e,validator:t}),_S=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Iu="-",Ny=[],_6="arbitrary..",N6=e=>{const t=D6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return k6(r);const l=r.split(Iu),o=l[0]===""&&l.length>1?1:0;return NS(l,o,t)},getConflictingClassGroupIds:(r,l)=>{if(l){const o=a[r],i=n[r];return o?i?O6(i,o):o:i||Ny}return n[r]||Ny}}},NS=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],r=n.nextPart.get(a);if(r){const s=NS(e,t+1,r);if(s)return s}const l=n.validators;if(l===null)return;const o=t===0?e.join(Iu):e.slice(t).join(Iu),i=l.length;for(let s=0;s<i;s++){const u=l[s];if(u.validator(o))return u.classGroupId}},k6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?_6+a:void 0})(),D6=e=>{const{theme:t,classGroups:n}=e;return L6(n,t)},L6=(e,t)=>{const n=_S();for(const a in e){const r=e[a];Vm(r,n,a,t)}return n},Vm=(e,t,n,a)=>{const r=e.length;for(let l=0;l<r;l++){const o=e[l];z6(o,t,n,a)}},z6=(e,t,n,a)=>{if(typeof e=="string"){U6(e,t,n);return}if(typeof e=="function"){j6(e,t,n,a);return}H6(e,t,n,a)},U6=(e,t,n)=>{const a=e===""?t:kS(t,e);a.classGroupId=n},j6=(e,t,n,a)=>{if(B6(e)){Vm(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(A6(n,e))},H6=(e,t,n,a)=>{const r=Object.entries(e),l=r.length;for(let o=0;o<l;o++){const[i,s]=r[o];Vm(s,kS(t,i),n,a)}},kS=(e,t)=>{let n=e;const a=t.split(Iu),r=a.length;for(let l=0;l<r;l++){const o=a[l];let i=n.nextPart.get(o);i||(i=_S(),n.nextPart.set(o,i)),n=i}return n},B6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,V6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const r=(l,o)=>{n[l]=o,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(l){let o=n[l];if(o!==void 0)return o;if((o=a[l])!==void 0)return r(l,o),o},set(l,o){l in n?n[l]=o:r(l,o)}}},rh="!",ky=":",I6=[],Dy=(e,t,n,a,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:r}),P6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=r=>{const l=[];let o=0,i=0,s=0,u;const c=r.length;for(let v=0;v<c;v++){const E=r[v];if(o===0&&i===0){if(E===ky){l.push(r.slice(s,v)),s=v+1;continue}if(E==="/"){u=v;continue}}E==="["?o++:E==="]"?o--:E==="("?i++:E===")"&&i--}const f=l.length===0?r:r.slice(s);let d=f,h=!1;f.endsWith(rh)?(d=f.slice(0,-1),h=!0):f.startsWith(rh)&&(d=f.slice(1),h=!0);const p=u&&u>s?u-s:void 0;return Dy(l,h,d,p)};if(t){const r=t+ky,l=a;a=o=>o.startsWith(r)?l(o.slice(r.length)):Dy(I6,!1,o,void 0,!0)}if(n){const r=a;a=l=>n({className:l,parseClassName:r})}return a},q6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let r=[];for(let l=0;l<n.length;l++){const o=n[l],i=o[0]==="[",s=t.has(o);i||s?(r.length>0&&(r.sort(),a.push(...r),r=[]),a.push(o)):r.push(o)}return r.length>0&&(r.sort(),a.push(...r)),a}},$6=e=>({cache:V6(e.cacheSize),parseClassName:P6(e),sortModifiers:q6(e),...N6(e)}),Y6=/\s+/,G6=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:l}=t,o=[],i=e.trim().split(Y6);let s="";for(let u=i.length-1;u>=0;u-=1){const c=i[u],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:v}=n(c);if(f){s=c+(s.length>0?" "+s:s);continue}let E=!!v,g=a(E?p.substring(0,v):p);if(!g){if(!E){s=c+(s.length>0?" "+s:s);continue}if(g=a(p),!g){s=c+(s.length>0?" "+s:s);continue}E=!1}const y=d.length===0?"":d.length===1?d[0]:l(d).join(":"),S=h?y+rh:y,b=S+g;if(o.indexOf(b)>-1)continue;o.push(b);const x=r(g,E);for(let R=0;R<x.length;++R){const w=x[R];o.push(S+w)}s=c+(s.length>0?" "+s:s)}return s},Z6=(...e)=>{let t=0,n,a,r="";for(;t<e.length;)(n=e[t++])&&(a=DS(n))&&(r&&(r+=" "),r+=a);return r},DS=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=DS(e[a]))&&(n&&(n+=" "),n+=t);return n},K6=(e,...t)=>{let n,a,r,l;const o=s=>{const u=t.reduce((c,f)=>f(c),e());return n=$6(u),a=n.cache.get,r=n.cache.set,l=i,i(s)},i=s=>{const u=a(s);if(u)return u;const c=G6(s,n);return r(s,c),c};return l=o,(...s)=>l(Z6(...s))},X6=[],gt=e=>{const t=n=>n[e]||X6;return t.isThemeGetter=!0,t},LS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Q6=/^\d+\/\d+$/,F6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,J6=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,W6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,e8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=e=>Q6.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>!!e&&Number.isInteger(Number(e)),jf=e=>e.endsWith("%")&&Re(e.slice(0,-1)),ea=e=>F6.test(e),n8=()=>!0,a8=e=>J6.test(e)&&!W6.test(e),US=()=>!1,r8=e=>e8.test(e),l8=e=>t8.test(e),o8=e=>!ue(e)&&!ce(e),i8=e=>io(e,BS,US),ue=e=>LS.test(e),gr=e=>io(e,VS,a8),Hf=e=>io(e,d8,Re),Ly=e=>io(e,jS,US),s8=e=>io(e,HS,l8),xs=e=>io(e,IS,r8),ce=e=>zS.test(e),Ao=e=>so(e,VS),u8=e=>so(e,h8),zy=e=>so(e,jS),c8=e=>so(e,BS),f8=e=>so(e,HS),ws=e=>so(e,IS,!0),io=(e,t,n)=>{const a=LS.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},so=(e,t,n=!1)=>{const a=zS.exec(e);return a?a[1]?t(a[1]):n:!1},jS=e=>e==="position"||e==="percentage",HS=e=>e==="image"||e==="url",BS=e=>e==="length"||e==="size"||e==="bg-size",VS=e=>e==="length",d8=e=>e==="number",h8=e=>e==="family-name",IS=e=>e==="shadow",m8=()=>{const e=gt("color"),t=gt("font"),n=gt("text"),a=gt("font-weight"),r=gt("tracking"),l=gt("leading"),o=gt("breakpoint"),i=gt("container"),s=gt("spacing"),u=gt("radius"),c=gt("shadow"),f=gt("inset-shadow"),d=gt("text-shadow"),h=gt("drop-shadow"),p=gt("blur"),v=gt("perspective"),E=gt("aspect"),g=gt("ease"),y=gt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...b(),ce,ue],R=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],C=()=>[ce,ue,s],A=()=>[el,"full","auto",...C()],T=()=>[Ca,"none","subgrid",ce,ue],k=()=>["auto",{span:["full",Ca,ce,ue]},Ca,ce,ue],M=()=>[Ca,"auto",ce,ue],L=()=>["auto","min","max","fr",ce,ue],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...C()],D=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],O=()=>[e,ce,ue],H=()=>[...b(),zy,Ly,{position:[ce,ue]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",c8,i8,{size:[ce,ue]}],q=()=>[jf,Ao,gr],P=()=>["","none","full",u,ce,ue],Q=()=>["",Re,Ao,gr],$=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[Re,jf,zy,Ly],F=()=>["","none",p,ce,ue],he=()=>["none",Re,ce,ue],ge=()=>["none",Re,ce,ue],V=()=>[Re,ce,ue],J=()=>[el,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ea],breakpoint:[ea],color:[n8],container:[ea],"drop-shadow":[ea],ease:["in","out","in-out"],font:[o8],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ea],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ea],shadow:[ea],spacing:["px",Re],text:[ea],"text-shadow":[ea],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,ue,ce,E]}],container:["container"],columns:[{columns:[Re,ue,ce,i]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Ca,"auto",ce,ue]}],basis:[{basis:[el,"full","auto",i,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,el,"auto","initial","none",ue]}],grow:[{grow:["",Re,ce,ue]}],shrink:[{shrink:["",Re,ce,ue]}],order:[{order:[Ca,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[i,"screen",...D()]}],"min-w":[{"min-w":[i,"screen","none",...D()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[o]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Ao,gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,ce,Hf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jf,ue]}],"font-family":[{font:[u8,ue,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,ce,ue]}],"line-clamp":[{"line-clamp":[Re,"none",ce,Hf]}],leading:[{leading:[l,...C()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ce,gr]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Re,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ca,ce,ue],radial:["",ce,ue],conic:[Ca,ce,ue]},f8,s8]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ce,ue]}],"outline-w":[{outline:["",Re,Ao,gr]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",c,ws,xs]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",f,ws,xs]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Re,gr]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",d,ws,xs]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Re,ce,ue]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:F()}],brightness:[{brightness:[Re,ce,ue]}],contrast:[{contrast:[Re,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",h,ws,xs]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Re,ce,ue]}],"hue-rotate":[{"hue-rotate":[Re,ce,ue]}],invert:[{invert:["",Re,ce,ue]}],saturate:[{saturate:[Re,ce,ue]}],sepia:[{sepia:["",Re,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Re,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ce,ue]}],ease:[{ease:["linear","initial",g,ce,ue]}],delay:[{delay:[Re,ce,ue]}],animate:[{animate:["none",y,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,ce,ue]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:V()}],"skew-x":[{"skew-x":V()}],"skew-y":[{"skew-y":V()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:J()}],"translate-x":[{"translate-x":J()}],"translate-y":[{"translate-y":J()}],"translate-z":[{"translate-z":J()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ue]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Re,Ao,gr,Hf]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},p8=K6(m8);function Pu(...e){return p8(M6(e))}const g8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),m.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),y8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M196,35.52C177.62,25.51,153.48,20,128,20S78.38,25.51,60,35.52C39.37,46.79,28,62.58,28,80v96c0,17.42,11.37,33.21,32,44.48,18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52c20.66-11.27,32-27.06,32-44.48V80C228,62.58,216.63,46.79,196,35.52ZM204,128c0,17-31.21,36-76,36s-76-19-76-36v-8.46a88.9,88.9,0,0,0,8,4.94c18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52a88.9,88.9,0,0,0,8-4.94ZM128,44c44.79,0,76,19,76,36s-31.21,36-76,36S52,97,52,80,83.21,44,128,44Zm0,168c-44.79,0-76-19-76-36v-8.46a88.9,88.9,0,0,0,8,4.94c18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52a88.9,88.9,0,0,0,8-4.94V176C204,193,172.79,212,128,212Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,80c0,26.51-39.4,48-88,48S40,106.51,40,80s39.4-48,88-48S216,53.49,216,80Z",opacity:"0.2"}),m.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64Zm-21.61,74.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,26C75.29,26,34,49.72,34,80v96c0,30.28,41.29,54,94,54s94-23.72,94-54V80C222,49.72,180.71,26,128,26Zm0,12c44.45,0,82,19.23,82,42s-37.55,42-82,42S46,102.77,46,80,83.55,38,128,38Zm82,138c0,22.77-37.55,42-82,42s-82-19.23-82-42V154.79C62,171.16,92.37,182,128,182s66-10.84,82-27.21Zm0-48c0,22.77-37.55,42-82,42s-82-19.23-82-42V106.79C62,123.16,92.37,134,128,134s66-10.84,82-27.21Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M192.14,42.55C174.94,33.17,152.16,28,128,28S81.06,33.17,63.86,42.55C45.89,52.35,36,65.65,36,80v96c0,14.35,9.89,27.65,27.86,37.45,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c18-9.8,27.86-23.1,27.86-37.45V80C220,65.65,210.11,52.35,192.14,42.55ZM212,176c0,11.29-8.41,22.1-23.69,30.43C172.27,215.18,150.85,220,128,220s-44.27-4.82-60.31-13.57C52.41,198.1,44,187.29,44,176V149.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm0-48c0,11.29-8.41,22.1-23.69,30.43C172.27,167.18,150.85,172,128,172s-44.27-4.82-60.31-13.57C52.41,150.1,44,139.29,44,128V101.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm-23.69-17.57C172.27,119.18,150.85,124,128,124s-44.27-4.82-60.31-13.57C52.41,102.1,44,91.29,44,80s8.41-22.1,23.69-30.43C83.73,40.82,105.15,36,128,36s44.27,4.82,60.31,13.57C203.59,57.9,212,68.71,212,80S203.59,102.1,188.31,110.43Z"}))]]),v8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M248,160a40,40,0,1,0-52.64,37.94A28,28,0,0,1,168,220H144a28,28,0,0,1-28-28V154.9c31.73-5.78,56-34.09,56-67.73V40a12,12,0,0,0-12-12H136a12,12,0,0,0,0,24h12V87.17c0,24.4-19.47,44.52-43.41,44.83A44,44,0,0,1,60,88V52H72a12,12,0,0,0,0-24H48A12,12,0,0,0,36,40V88a68,68,0,0,0,56,66.93V192a52.06,52.06,0,0,0,52,52h24a52.06,52.06,0,0,0,51.61-45.72A40.08,40.08,0,0,0,248,160Zm-40,16a16,16,0,1,1,16-16A16,16,0,0,1,208,176Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M240,160a32,32,0,1,1-32-32A32,32,0,0,1,240,160Z",opacity:"0.2"}),m.createElement("path",{d:"M220,160a12,12,0,1,1-12-12A12,12,0,0,1,220,160Zm-4.55,39.29A48.08,48.08,0,0,1,168,240H144a48.05,48.05,0,0,1-48-48V151.49A64,64,0,0,1,40,88V40a8,8,0,0,1,8-8H72a8,8,0,0,1,0,16H56V88a48,48,0,0,0,48.64,48c26.11-.34,47.36-22.25,47.36-48.83V48H136a8,8,0,0,1,0-16h24a8,8,0,0,1,8,8V87.17c0,32.84-24.53,60.29-56,64.31V192a32,32,0,0,0,32,32h24a32.06,32.06,0,0,0,31.22-25,40,40,0,1,1,16.23.27ZM232,160a24,24,0,1,0-24,24A24,24,0,0,0,232,160Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M240,160a32,32,0,1,0-39.93,31,8,8,0,0,0-.07,1,32,32,0,0,1-32,32H144a32,32,0,0,1-32-32V151.48c31.47-4,56-31.47,56-64.31V40a8,8,0,0,0-8-8H136a8,8,0,0,0,0,16h16V87.17c0,26.58-21.25,48.49-47.36,48.83A48,48,0,0,1,56,88V48H72a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V88a64,64,0,0,0,56,63.49V192a48.05,48.05,0,0,0,48,48h24a48.05,48.05,0,0,0,48-48,8,8,0,0,0-.07-1A32,32,0,0,0,240,160Zm-32,8a8,8,0,1,1,8-8A8,8,0,0,1,208,168Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M218,160a10,10,0,1,1-10-10A10,10,0,0,1,218,160Zm-4.35,37.58A46.05,46.05,0,0,1,168,238H144a46.06,46.06,0,0,1-46-46V149.71A62,62,0,0,1,42,88V40a6,6,0,0,1,6-6H72a6,6,0,0,1,0,12H54V88a50,50,0,0,0,50,50h.67c27.2-.36,49.33-23.16,49.33-50.83V46H136a6,6,0,0,1,0-12h24a6,6,0,0,1,6,6V87.17c0,32.43-24.68,59.44-56,62.52V192a34,34,0,0,0,34,34h24a34.05,34.05,0,0,0,33.56-28.56,38,38,0,1,1,12.09.14ZM234,160a26,26,0,1,0-26,26A26,26,0,0,0,234,160Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M220,160a12,12,0,1,1-12-12A12,12,0,0,1,220,160Zm-4.55,39.29A48.08,48.08,0,0,1,168,240H144a48.05,48.05,0,0,1-48-48V151.49A64,64,0,0,1,40,88V40a8,8,0,0,1,8-8H72a8,8,0,0,1,0,16H56V88a48,48,0,0,0,48.64,48c26.11-.34,47.36-22.25,47.36-48.83V48H136a8,8,0,0,1,0-16h24a8,8,0,0,1,8,8V87.17c0,32.84-24.53,60.29-56,64.31V192a32,32,0,0,0,32,32h24a32.06,32.06,0,0,0,31.22-25,40,40,0,1,1,16.23.27ZM232,160a24,24,0,1,0-24,24A24,24,0,0,0,232,160Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,160a8,8,0,1,1-8-8A8,8,0,0,1,216,160Zm-4.17,35.79A44.06,44.06,0,0,1,168,236H144a44.05,44.05,0,0,1-44-44V147.85A60,60,0,0,1,44,88V40a4,4,0,0,1,4-4H72a4,4,0,0,1,0,8H52V88a52,52,0,0,0,52.69,52C133,139.63,156,115.93,156,87.17V44H136a4,4,0,0,1,0-8h24a4,4,0,0,1,4,4V87.17c0,32-24.84,58.59-56,60.69V192a36,36,0,0,0,36,36h24a36.05,36.05,0,0,0,35.8-32.25,36,36,0,1,1,8,0ZM236,160a28,28,0,1,0-28,28A28,28,0,0,0,236,160Z"}))]]),b8=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM44,116H76v24H44Zm56,0H212v24H100ZM212,68V92H44V68ZM44,164H76v24H44Zm56,24V164H212v24Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M88,104v96H32V104Z",opacity:"0.2"}),m.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM216,64V96H40V64ZM40,160H80v32H40Zm176,32H96V160H216v32Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM40,160H80v32H40Zm176,32H96V160H216v32Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM38,110H82v36H38Zm56,0H218v36H94ZM218,62V98H38V62ZM38,192V158H82v36H40A2,2,0,0,1,38,192Zm178,2H94V158H218v34A2,2,0,0,1,216,194Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM216,64V96H40V64ZM40,160H80v32H40Zm176,32H96V160H216v32Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52ZM36,108H84v40H36Zm56,0H220v40H92ZM220,60v40H36V60ZM36,192V156H84v40H40A4,4,0,0,1,36,192Zm180,4H92V156H220v36A4,4,0,0,1,216,196Z"}))]]),S8=m.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),$i=m.forwardRef((e,t)=>{const{alt:n,color:a,size:r,weight:l,mirrored:o,children:i,weights:s,...u}=e,{color:c="currentColor",size:f,weight:d="regular",mirrored:h=!1,...p}=m.useContext(S8);return m.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:r??f,height:r??f,fill:a??c,viewBox:"0 0 256 256",transform:o||h?"scale(-1, 1)":void 0,...p,...u},!!n&&m.createElement("title",null,n),i,s.get(l??d))});$i.displayName="IconBase";const PS=m.forwardRef((e,t)=>m.createElement($i,{ref:t,...e,weights:g8}));PS.displayName="CaretRightIcon";const qS=m.forwardRef((e,t)=>m.createElement($i,{ref:t,...e,weights:y8}));qS.displayName="DatabaseIcon";const $S=m.forwardRef((e,t)=>m.createElement($i,{ref:t,...e,weights:v8}));$S.displayName="StethoscopeIcon";const YS=m.forwardRef((e,t)=>m.createElement($i,{ref:t,...e,weights:b8}));YS.displayName="TableIcon";function Rc(){return typeof window<"u"}function fr(e){return Im(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zn(e){var t;return(t=(Im(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Im(e){return Rc()?e instanceof Node||e instanceof dt(e).Node:!1}function je(e){return Rc()?e instanceof Element||e instanceof dt(e).Element:!1}function Qe(e){return Rc()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function lh(e){return!Rc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}const E8=new Set(["inline","contents"]);function Xr(e){const{overflow:t,overflowX:n,overflowY:a,display:r}=Gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!E8.has(r)}const x8=new Set(["table","td","th"]);function w8(e){return x8.has(fr(e))}const R8=[":popover-open",":modal"];function Cc(e){return R8.some(t=>{try{return e.matches(t)}catch{return!1}})}const C8=["transform","translate","scale","rotate","perspective"],T8=["transform","translate","scale","rotate","perspective","filter"],M8=["paint","layout","strict","content"];function Pm(e){const t=Tc(),n=je(e)?Gt(e):e;return C8.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||T8.some(a=>(n.willChange||"").includes(a))||M8.some(a=>(n.contain||"").includes(a))}function O8(e){let t=$n(e);for(;Qe(t)&&!In(t);){if(Pm(t))return t;if(Cc(t))return null;t=$n(t)}return null}function Tc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const A8=new Set(["html","body","#document"]);function In(e){return A8.has(fr(e))}function Gt(e){return dt(e).getComputedStyle(e)}function Mc(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $n(e){if(fr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lh(e)&&e.host||Zn(e);return lh(t)?t.host:t}function GS(e){const t=$n(e);return In(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qe(t)&&Xr(t)?t:GS(t)}function Fa(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=GS(e),l=r===((a=e.ownerDocument)==null?void 0:a.body),o=dt(r);if(l){const i=oh(o);return t.concat(o,o.visualViewport||[],Xr(r)?r:[],i&&n?Fa(i):[])}return t.concat(r,Fa(r,[],n))}function oh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const _8=["top","right","bottom","left"],$l=Math.min,en=Math.max,Yl=Math.round,yl=Math.floor,Pn=e=>({x:e,y:e}),N8={left:"right",right:"left",bottom:"top",top:"bottom"},k8={start:"end",end:"start"};function ih(e,t,n){return en(e,$l(t,n))}function ya(e,t){return typeof e=="function"?e(t):e}function $t(e){return e.split("-")[0]}function dr(e){return e.split("-")[1]}function qm(e){return e==="x"?"y":"x"}function $m(e){return e==="y"?"height":"width"}const D8=new Set(["top","bottom"]);function wn(e){return D8.has($t(e))?"y":"x"}function Ym(e){return qm(wn(e))}function L8(e,t,n){n===void 0&&(n=!1);const a=dr(e),r=Ym(e),l=$m(r);let o=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(o=qu(o)),[o,qu(o)]}function z8(e){const t=qu(e);return[sh(e),t,sh(t)]}function sh(e){return e.replace(/start|end/g,t=>k8[t])}const Uy=["left","right"],jy=["right","left"],U8=["top","bottom"],j8=["bottom","top"];function H8(e,t,n){switch(e){case"top":case"bottom":return n?t?jy:Uy:t?Uy:jy;case"left":case"right":return t?U8:j8;default:return[]}}function B8(e,t,n,a){const r=dr(e);let l=H8($t(e),n==="start",a);return r&&(l=l.map(o=>o+"-"+r),t&&(l=l.concat(l.map(sh)))),l}function qu(e){return e.replace(/left|right|bottom|top/g,t=>N8[t])}function V8(e){return{top:0,right:0,bottom:0,left:0,...e}}function ZS(e){return typeof e!="number"?V8(e):{top:e,right:e,bottom:e,left:e}}function $u(e){const{x:t,y:n,width:a,height:r}=e;return{width:a,height:r,top:n,left:t,right:t+a,bottom:n+r,x:t,y:n}}function Hy(e,t,n){let{reference:a,floating:r}=e;const l=wn(t),o=Ym(t),i=$m(o),s=$t(t),u=l==="y",c=a.x+a.width/2-r.width/2,f=a.y+a.height/2-r.height/2,d=a[i]/2-r[i]/2;let h;switch(s){case"top":h={x:c,y:a.y-r.height};break;case"bottom":h={x:c,y:a.y+a.height};break;case"right":h={x:a.x+a.width,y:f};break;case"left":h={x:a.x-r.width,y:f};break;default:h={x:a.x,y:a.y}}switch(dr(t)){case"start":h[o]-=d*(n&&u?-1:1);break;case"end":h[o]+=d*(n&&u?-1:1);break}return h}const I8=async(e,t,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:l=[],platform:o}=n,i=l.filter(Boolean),s=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:f}=Hy(u,a,s),d=a,h={},p=0;for(let v=0;v<i.length;v++){const{name:E,fn:g}=i[v],{x:y,y:S,data:b,reset:x}=await g({x:c,y:f,initialPlacement:a,placement:d,strategy:r,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=y??c,f=S??f,h={...h,[E]:{...h[E],...b}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(u=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):x.rects),{x:c,y:f}=Hy(u,d,s)),v=-1)}return{x:c,y:f,placement:d,strategy:r,middlewareData:h}};async function Mi(e,t){var n;t===void 0&&(t={});const{x:a,y:r,platform:l,rects:o,elements:i,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=ya(t,e),p=ZS(h),v=i[d?f==="floating"?"reference":"floating":f],E=$u(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(v)))==null||n?v:v.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(i.floating)),boundary:u,rootBoundary:c,strategy:s})),g=f==="floating"?{x:a,y:r,width:o.floating.width,height:o.floating.height}:o.reference,y=await(l.getOffsetParent==null?void 0:l.getOffsetParent(i.floating)),S=await(l.isElement==null?void 0:l.isElement(y))?await(l.getScale==null?void 0:l.getScale(y))||{x:1,y:1}:{x:1,y:1},b=$u(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:g,offsetParent:y,strategy:s}):g);return{top:(E.top-b.top+p.top)/S.y,bottom:(b.bottom-E.bottom+p.bottom)/S.y,left:(E.left-b.left+p.left)/S.x,right:(b.right-E.right+p.right)/S.x}}const P8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:r,middlewareData:l,rects:o,initialPlacement:i,platform:s,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...E}=ya(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const g=$t(r),y=wn(i),S=$t(i)===i,b=await(s.isRTL==null?void 0:s.isRTL(u.floating)),x=d||(S||!v?[qu(i)]:z8(i)),R=p!=="none";!d&&R&&x.push(...B8(i,v,p,b));const w=[i,...x],C=await Mi(t,E),A=[];let T=((a=l.flip)==null?void 0:a.overflows)||[];if(c&&A.push(C[g]),f){const z=L8(r,o,b);A.push(C[z[0]],C[z[1]])}if(T=[...T,{placement:r,overflows:A}],!A.every(z=>z<=0)){var k,M;const z=(((k=l.flip)==null?void 0:k.index)||0)+1,_=w[z];if(_&&(!(f==="alignment"&&y!==wn(_))||T.every(D=>wn(D.placement)===y?D.overflows[0]>0:!0)))return{data:{index:z,overflows:T},reset:{placement:_}};let N=(M=T.filter(D=>D.overflows[0]<=0).sort((D,O)=>D.overflows[1]-O.overflows[1])[0])==null?void 0:M.placement;if(!N)switch(h){case"bestFit":{var L;const D=(L=T.filter(O=>{if(R){const H=wn(O.placement);return H===y||H==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(H=>H>0).reduce((H,j)=>H+j,0)]).sort((O,H)=>O[1]-H[1])[0])==null?void 0:L[0];D&&(N=D);break}case"initialPlacement":N=i;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function By(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vy(e){return _8.some(t=>e[t]>=0)}const q8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...r}=ya(e,t);switch(a){case"referenceHidden":{const l=await Mi(t,{...r,elementContext:"reference"}),o=By(l,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Vy(o)}}}case"escaped":{const l=await Mi(t,{...r,altBoundary:!0}),o=By(l,n.floating);return{data:{escapedOffsets:o,escaped:Vy(o)}}}default:return{}}}}},KS=new Set(["left","top"]);async function $8(e,t){const{placement:n,platform:a,elements:r}=e,l=await(a.isRTL==null?void 0:a.isRTL(r.floating)),o=$t(n),i=dr(n),s=wn(n)==="y",u=KS.has(o)?-1:1,c=l&&s?-1:1,f=ya(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof p=="number"&&(h=i==="end"?p*-1:p),s?{x:h*c,y:d*u}:{x:d*u,y:h*c}}const Y8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:r,y:l,placement:o,middlewareData:i}=t,s=await $8(t,e);return o===((n=i.offset)==null?void 0:n.placement)&&(a=i.arrow)!=null&&a.alignmentOffset?{}:{x:r+s.x,y:l+s.y,data:{...s,placement:o}}}}},G8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:r}=t,{mainAxis:l=!0,crossAxis:o=!1,limiter:i={fn:E=>{let{x:g,y}=E;return{x:g,y}}},...s}=ya(e,t),u={x:n,y:a},c=await Mi(t,s),f=wn($t(r)),d=qm(f);let h=u[d],p=u[f];if(l){const E=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+c[E],S=h-c[g];h=ih(y,h,S)}if(o){const E=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+c[E],S=p-c[g];p=ih(y,p,S)}const v=i.fn({...t,[d]:h,[f]:p});return{...v,data:{x:v.x-n,y:v.y-a,enabled:{[d]:l,[f]:o}}}}}},Z8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:r,rects:l,middlewareData:o}=t,{offset:i=0,mainAxis:s=!0,crossAxis:u=!0}=ya(e,t),c={x:n,y:a},f=wn(r),d=qm(f);let h=c[d],p=c[f];const v=ya(i,t),E=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const S=d==="y"?"height":"width",b=l.reference[d]-l.floating[S]+E.mainAxis,x=l.reference[d]+l.reference[S]-E.mainAxis;h<b?h=b:h>x&&(h=x)}if(u){var g,y;const S=d==="y"?"width":"height",b=KS.has($t(r)),x=l.reference[f]-l.floating[S]+(b&&((g=o.offset)==null?void 0:g[f])||0)+(b?0:E.crossAxis),R=l.reference[f]+l.reference[S]+(b?0:((y=o.offset)==null?void 0:y[f])||0)-(b?E.crossAxis:0);p<x?p=x:p>R&&(p=R)}return{[d]:h,[f]:p}}}},K8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:r,rects:l,platform:o,elements:i}=t,{apply:s=()=>{},...u}=ya(e,t),c=await Mi(t,u),f=$t(r),d=dr(r),h=wn(r)==="y",{width:p,height:v}=l.floating;let E,g;f==="top"||f==="bottom"?(E=f,g=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=f,E=d==="end"?"top":"bottom");const y=v-c.top-c.bottom,S=p-c.left-c.right,b=$l(v-c[E],y),x=$l(p-c[g],S),R=!t.middlewareData.shift;let w=b,C=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=S),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(w=y),R&&!d){const T=en(c.left,0),k=en(c.right,0),M=en(c.top,0),L=en(c.bottom,0);h?C=p-2*(T!==0||k!==0?T+k:en(c.left,c.right)):w=v-2*(M!==0||L!==0?M+L:en(c.top,c.bottom))}await s({...t,availableWidth:C,availableHeight:w});const A=await o.getDimensions(i.floating);return p!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function XS(e){const t=Gt(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const r=Qe(e),l=r?e.offsetWidth:n,o=r?e.offsetHeight:a,i=Yl(n)!==l||Yl(a)!==o;return i&&(n=l,a=o),{width:n,height:a,$:i}}function Gm(e){return je(e)?e:e.contextElement}function Ml(e){const t=Gm(e);if(!Qe(t))return Pn(1);const n=t.getBoundingClientRect(),{width:a,height:r,$:l}=XS(t);let o=(l?Yl(n.width):n.width)/a,i=(l?Yl(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!i||!Number.isFinite(i))&&(i=1),{x:o,y:i}}const X8=Pn(0);function QS(e){const t=dt(e);return!Tc()||!t.visualViewport?X8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==dt(e)?!1:t}function Ir(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),l=Gm(e);let o=Pn(1);t&&(a?je(a)&&(o=Ml(a)):o=Ml(e));const i=Q8(l,n,a)?QS(l):Pn(0);let s=(r.left+i.x)/o.x,u=(r.top+i.y)/o.y,c=r.width/o.x,f=r.height/o.y;if(l){const d=dt(l),h=a&&je(a)?dt(a):a;let p=d,v=oh(p);for(;v&&a&&h!==p;){const E=Ml(v),g=v.getBoundingClientRect(),y=Gt(v),S=g.left+(v.clientLeft+parseFloat(y.paddingLeft))*E.x,b=g.top+(v.clientTop+parseFloat(y.paddingTop))*E.y;s*=E.x,u*=E.y,c*=E.x,f*=E.y,s+=S,u+=b,p=dt(v),v=oh(p)}}return $u({width:c,height:f,x:s,y:u})}function Oc(e,t){const n=Mc(e).scrollLeft;return t?t.left+n:Ir(Zn(e)).left+n}function FS(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Oc(e,n),r=n.top+t.scrollTop;return{x:a,y:r}}function F8(e){let{elements:t,rect:n,offsetParent:a,strategy:r}=e;const l=r==="fixed",o=Zn(a),i=t?Cc(t.floating):!1;if(a===o||i&&l)return n;let s={scrollLeft:0,scrollTop:0},u=Pn(1);const c=Pn(0),f=Qe(a);if((f||!f&&!l)&&((fr(a)!=="body"||Xr(o))&&(s=Mc(a)),Qe(a))){const h=Ir(a);u=Ml(a),c.x=h.x+a.clientLeft,c.y=h.y+a.clientTop}const d=o&&!f&&!l?FS(o,s):Pn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-s.scrollTop*u.y+c.y+d.y}}function J8(e){return Array.from(e.getClientRects())}function W8(e){const t=Zn(e),n=Mc(e),a=e.ownerDocument.body,r=en(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=en(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let o=-n.scrollLeft+Oc(e);const i=-n.scrollTop;return Gt(a).direction==="rtl"&&(o+=en(t.clientWidth,a.clientWidth)-r),{width:r,height:l,x:o,y:i}}const Iy=25;function e3(e,t){const n=dt(e),a=Zn(e),r=n.visualViewport;let l=a.clientWidth,o=a.clientHeight,i=0,s=0;if(r){l=r.width,o=r.height;const c=Tc();(!c||c&&t==="fixed")&&(i=r.offsetLeft,s=r.offsetTop)}const u=Oc(a);if(u<=0){const c=a.ownerDocument,f=c.body,d=getComputedStyle(f),h=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(a.clientWidth-f.clientWidth-h);p<=Iy&&(l-=p)}else u<=Iy&&(l+=u);return{width:l,height:o,x:i,y:s}}const t3=new Set(["absolute","fixed"]);function n3(e,t){const n=Ir(e,!0,t==="fixed"),a=n.top+e.clientTop,r=n.left+e.clientLeft,l=Qe(e)?Ml(e):Pn(1),o=e.clientWidth*l.x,i=e.clientHeight*l.y,s=r*l.x,u=a*l.y;return{width:o,height:i,x:s,y:u}}function Py(e,t,n){let a;if(t==="viewport")a=e3(e,n);else if(t==="document")a=W8(Zn(e));else if(je(t))a=n3(t,n);else{const r=QS(e);a={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $u(a)}function JS(e,t){const n=$n(e);return n===t||!je(n)||In(n)?!1:Gt(n).position==="fixed"||JS(n,t)}function a3(e,t){const n=t.get(e);if(n)return n;let a=Fa(e,[],!1).filter(i=>je(i)&&fr(i)!=="body"),r=null;const l=Gt(e).position==="fixed";let o=l?$n(e):e;for(;je(o)&&!In(o);){const i=Gt(o),s=Pm(o);!s&&i.position==="fixed"&&(r=null),(l?!s&&!r:!s&&i.position==="static"&&r&&t3.has(r.position)||Xr(o)&&!s&&JS(e,o))?a=a.filter(u=>u!==o):r=i,o=$n(o)}return t.set(e,a),a}function r3(e){let{element:t,boundary:n,rootBoundary:a,strategy:r}=e;const l=[...n==="clippingAncestors"?Cc(t)?[]:a3(t,this._c):[].concat(n),a],o=l[0],i=l.reduce((s,u)=>{const c=Py(t,u,r);return s.top=en(c.top,s.top),s.right=$l(c.right,s.right),s.bottom=$l(c.bottom,s.bottom),s.left=en(c.left,s.left),s},Py(t,o,r));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}}function l3(e){const{width:t,height:n}=XS(e);return{width:t,height:n}}function o3(e,t,n){const a=Qe(t),r=Zn(t),l=n==="fixed",o=Ir(e,!0,l,t);let i={scrollLeft:0,scrollTop:0};const s=Pn(0);function u(){s.x=Oc(r)}if(a||!a&&!l)if((fr(t)!=="body"||Xr(r))&&(i=Mc(t)),a){const h=Ir(t,!0,l,t);s.x=h.x+t.clientLeft,s.y=h.y+t.clientTop}else r&&u();l&&!a&&r&&u();const c=r&&!a&&!l?FS(r,i):Pn(0),f=o.left+i.scrollLeft-s.x-c.x,d=o.top+i.scrollTop-s.y-c.y;return{x:f,y:d,width:o.width,height:o.height}}function Bf(e){return Gt(e).position==="static"}function qy(e,t){if(!Qe(e)||Gt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zn(e)===n&&(n=n.ownerDocument.body),n}function WS(e,t){const n=dt(e);if(Cc(e))return n;if(!Qe(e)){let r=$n(e);for(;r&&!In(r);){if(je(r)&&!Bf(r))return r;r=$n(r)}return n}let a=qy(e,t);for(;a&&w8(a)&&Bf(a);)a=qy(a,t);return a&&In(a)&&Bf(a)&&!Pm(a)?n:a||O8(e)||n}const i3=async function(e){const t=this.getOffsetParent||WS,n=this.getDimensions,a=await n(e.floating);return{reference:o3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function s3(e){return Gt(e).direction==="rtl"}const u3={convertOffsetParentRelativeRectToViewportRelativeRect:F8,getDocumentElement:Zn,getClippingRect:r3,getOffsetParent:WS,getElementRects:i3,getClientRects:J8,getDimensions:l3,getScale:Ml,isElement:je,isRTL:s3};function eE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function c3(e,t){let n=null,a;const r=Zn(e);function l(){var i;clearTimeout(a),(i=n)==null||i.disconnect(),n=null}function o(i,s){i===void 0&&(i=!1),s===void 0&&(s=1),l();const u=e.getBoundingClientRect(),{left:c,top:f,width:d,height:h}=u;if(i||t(),!d||!h)return;const p=yl(f),v=yl(r.clientWidth-(c+d)),E=yl(r.clientHeight-(f+h)),g=yl(c),y={rootMargin:-p+"px "+-v+"px "+-E+"px "+-g+"px",threshold:en(0,$l(1,s))||1};let S=!0;function b(x){const R=x[0].intersectionRatio;if(R!==s){if(!S)return o();R?o(!1,R):a=setTimeout(()=>{o(!1,1e-7)},1e3)}R===1&&!eE(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(b,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(b,y)}n.observe(e)}return o(!0),l}function $y(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:s=!1}=a,u=Gm(e),c=r||l?[...u?Fa(u):[],...Fa(t)]:[];c.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),l&&g.addEventListener("resize",n)});const f=u&&i?c3(u,n):null;let d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!s&&h.observe(u),h.observe(t));let p,v=s?Ir(e):null;s&&E();function E(){const g=Ir(e);v&&!eE(v,g)&&n(),v=g,p=requestAnimationFrame(E)}return n(),()=>{var g;c.forEach(y=>{r&&y.removeEventListener("scroll",n),l&&y.removeEventListener("resize",n)}),f==null||f(),(g=h)==null||g.disconnect(),h=null,s&&cancelAnimationFrame(p)}}const f3=Y8,d3=G8,h3=P8,m3=K8,p3=q8,g3=Z8,y3=(e,t,n)=>{const a=new Map,r={platform:u3,...n},l={...r.platform,_c:a};return I8(e,t,{...r,platform:l})};var v3=typeof document<"u",b3=function(){},Fs=v3?m.useLayoutEffect:b3;function Yu(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,a,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Yu(e[a],t[a]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,r[a]))return!1;for(a=n;a--!==0;){const l=r[a];if(!(l==="_owner"&&e.$$typeof)&&!Yu(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function tE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yy(e,t){const n=tE(e);return Math.round(t*n)/n}function Vf(e){const t=m.useRef(e);return Fs(()=>{t.current=e}),t}function S3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:r,elements:{reference:l,floating:o}={},transform:i=!0,whileElementsMounted:s,open:u}=e,[c,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(a);Yu(d,a)||h(a);const[p,v]=m.useState(null),[E,g]=m.useState(null),y=m.useCallback(O=>{O!==R.current&&(R.current=O,v(O))},[]),S=m.useCallback(O=>{O!==w.current&&(w.current=O,g(O))},[]),b=l||p,x=o||E,R=m.useRef(null),w=m.useRef(null),C=m.useRef(c),A=s!=null,T=Vf(s),k=Vf(r),M=Vf(u),L=m.useCallback(()=>{if(!R.current||!w.current)return;const O={placement:t,strategy:n,middleware:d};k.current&&(O.platform=k.current),y3(R.current,w.current,O).then(H=>{const j={...H,isPositioned:M.current!==!1};z.current&&!Yu(C.current,j)&&(C.current=j,zt.flushSync(()=>{f(j)}))})},[d,t,n,k,M]);Fs(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[u]);const z=m.useRef(!1);Fs(()=>(z.current=!0,()=>{z.current=!1}),[]),Fs(()=>{if(b&&(R.current=b),x&&(w.current=x),b&&x){if(T.current)return T.current(b,x,L);L()}},[b,x,L,T,A]);const _=m.useMemo(()=>({reference:R,floating:w,setReference:y,setFloating:S}),[y,S]),N=m.useMemo(()=>({reference:b,floating:x}),[b,x]),D=m.useMemo(()=>{const O={position:n,left:0,top:0};if(!N.floating)return O;const H=Yy(N.floating,c.x),j=Yy(N.floating,c.y);return i?{...O,transform:"translate("+H+"px, "+j+"px)",...tE(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:j}},[n,i,N.floating,c.x,c.y]);return m.useMemo(()=>({...c,update:L,refs:_,elements:N,floatingStyles:D}),[c,L,_,N,D])}const E3=(e,t)=>({...f3(e),options:[e,t]}),x3=(e,t)=>({...d3(e),options:[e,t]}),w3=(e,t)=>({...g3(e),options:[e,t]}),R3=(e,t)=>({...h3(e),options:[e,t]}),C3=(e,t)=>({...m3(e),options:[e,t]}),T3=(e,t)=>({...p3(e),options:[e,t]});var M3=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Gu=M3.join(","),nE=typeof Element>"u",Gl=nE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zu=!nE&&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},Oi=function(e,t){var n;t===void 0&&(t=!0);var a=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),r=a===""||a==="true",l=r||t&&e&&Oi(e.parentNode);return l},O3=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},aE=function(e,t,n){if(Oi(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(Gu));return t&&Gl.call(e,Gu)&&a.unshift(e),a=a.filter(n),a},Ku=function(e,t,n){for(var a=[],r=Array.from(e);r.length;){var l=r.shift();if(!Oi(l,!1))if(l.tagName==="SLOT"){var o=l.assignedElements(),i=o.length?o:l.children,s=Ku(i,!0,n);n.flatten?a.push.apply(a,s):a.push({scopeParent:l,candidates:s})}else{var u=Gl.call(l,Gu);u&&n.filter(l)&&(t||!e.includes(l))&&a.push(l);var c=l.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(l),f=!Oi(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(l));if(c&&f){var d=Ku(c===!0?l.children:c.children,!0,n);n.flatten?a.push.apply(a,d):a.push({scopeParent:l,candidates:d})}else r.unshift.apply(r,l.children)}}return a},rE=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},lE=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||O3(e))&&!rE(e)?0:e.tabIndex},A3=function(e,t){var n=lE(e);return n<0&&t&&!rE(e)?0:n},_3=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},oE=function(e){return e.tagName==="INPUT"},N3=function(e){return oE(e)&&e.type==="hidden"},k3=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},D3=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},L3=function(e){if(!e.name)return!0;var t=e.form||Zu(e),n=function(l){return t.querySelectorAll('input[type="radio"][name="'+l+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=n(window.CSS.escape(e.name));else try{a=n(e.name)}catch(l){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",l.message),!1}var r=D3(a,e.form);return!r||r===e},z3=function(e){return oE(e)&&e.type==="radio"},U3=function(e){return z3(e)&&!L3(e)},j3=function(e){var t,n=e&&Zu(e),a=(t=n)===null||t===void 0?void 0:t.host,r=!1;if(n&&n!==e){var l,o,i;for(r=!!((l=a)!==null&&l!==void 0&&(o=l.ownerDocument)!==null&&o!==void 0&&o.contains(a)||e!=null&&(i=e.ownerDocument)!==null&&i!==void 0&&i.contains(e));!r&&a;){var s,u,c;n=Zu(a),a=(s=n)===null||s===void 0?void 0:s.host,r=!!((u=a)!==null&&u!==void 0&&(c=u.ownerDocument)!==null&&c!==void 0&&c.contains(a))}}return r},Gy=function(e){var t=e.getBoundingClientRect(),n=t.width,a=t.height;return n===0&&a===0},H3=function(e,t){var n=t.displayCheck,a=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var r=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!r}if(getComputedStyle(e).visibility==="hidden")return!0;var l=Gl.call(e,"details>summary:first-of-type"),o=l?e.parentElement:e;if(Gl.call(o,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof a=="function"){for(var i=e;e;){var s=e.parentElement,u=Zu(e);if(s&&!s.shadowRoot&&a(s)===!0)return Gy(e);e.assignedSlot?e=e.assignedSlot:!s&&u!==e.ownerDocument?e=u.host:e=s}e=i}if(j3(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Gy(e);return!1},B3=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var a=t.children.item(n);if(a.tagName==="LEGEND")return Gl.call(t,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}t=t.parentElement}return!1},uh=function(e,t){return!(t.disabled||Oi(t)||N3(t)||H3(t,e)||k3(t)||B3(t))},ch=function(e,t){return!(U3(t)||lE(t)<0||!uh(e,t))},V3=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},iE=function(e){var t=[],n=[];return e.forEach(function(a,r){var l=!!a.scopeParent,o=l?a.scopeParent:a,i=A3(o,l),s=l?iE(a.candidates):o;i===0?l?t.push.apply(t,s):t.push(o):n.push({documentOrder:r,tabIndex:i,item:a,isScope:l,content:s})}),n.sort(_3).reduce(function(a,r){return r.isScope?a.push.apply(a,r.content):a.push(r.content),a},[]).concat(t)},Yi=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Ku([e],t.includeContainer,{filter:ch.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:V3}):n=aE(e,t.includeContainer,ch.bind(null,t)),iE(n)},I3=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Ku([e],t.includeContainer,{filter:uh.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=aE(e,t.includeContainer,uh.bind(null,t)),n},sE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Gl.call(e,Gu)===!1?!1:ch(t,e)},Xu=Symbol("NOT_FOUND");function P3(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function q3(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function $3(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${t}[${n}]`)}}var Zy=e=>Array.isArray(e)?e:[e];function Y3(e){const t=Array.isArray(e[0])?e[0]:e;return $3(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function G3(e,t){const n=[],{length:a}=e;for(let r=0;r<a;r++)n.push(e[r].apply(null,t));return n}function Z3(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Xu},put(n,a){t={key:n,value:a}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function K3(e,t){let n=[];function a(i){const s=n.findIndex(u=>t(i,u.key));if(s>-1){const u=n[s];return s>0&&(n.splice(s,1),n.unshift(u)),u.value}return Xu}function r(i,s){a(i)===Xu&&(n.unshift({key:i,value:s}),n.length>e&&n.pop())}function l(){return n}function o(){n=[]}return{get:a,put:r,getEntries:l,clear:o}}var X3=(e,t)=>e===t;function Q3(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;const{length:a}=t;for(let r=0;r<a;r++)if(!e(t[r],n[r]))return!1;return!0}}function F3(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:a=X3,maxSize:r=1,resultEqualityCheck:l}=n,o=Q3(a);let i=0;const s=r<=1?Z3(o):K3(r,o);function u(){let c=s.get(arguments);if(c===Xu){if(c=e.apply(null,arguments),i++,l){const f=s.getEntries().find(d=>l(d.value,c));f&&(c=f.value,i!==0&&i--)}s.put(arguments,c)}return c}return u.clearCache=()=>{s.clear(),u.resetResultsCount()},u.resultsCount=()=>i,u.resetResultsCount=()=>{i=0},u}var J3=class{constructor(e){this.value=e}deref(){return this.value}},W3=typeof WeakRef<"u"?WeakRef:J3,eM=0,Ky=1;function Rs(){return{s:eM,v:void 0,o:null,p:null}}function uE(e,t={}){let n=Rs();const{resultEqualityCheck:a}=t;let r,l=0;function o(){var f;let i=n;const{length:s}=arguments;for(let d=0,h=s;d<h;d++){const p=arguments[d];if(typeof p=="function"||typeof p=="object"&&p!==null){let v=i.o;v===null&&(i.o=v=new WeakMap);const E=v.get(p);E===void 0?(i=Rs(),v.set(p,i)):i=E}else{let v=i.p;v===null&&(i.p=v=new Map);const E=v.get(p);E===void 0?(i=Rs(),v.set(p,i)):i=E}}const u=i;let c;if(i.s===Ky)c=i.v;else if(c=e.apply(null,arguments),l++,a){const d=((f=r==null?void 0:r.deref)==null?void 0:f.call(r))??r;d!=null&&a(d,c)&&(c=d,l!==0&&l--),r=typeof c=="object"&&c!==null||typeof c=="function"?new W3(c):c}return u.s=Ky,u.v=c,c}return o.clearCache=()=>{n=Rs(),o.resetResultsCount()},o.resultsCount=()=>l,o.resetResultsCount=()=>{l=0},o}function cE(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,a=(...r)=>{let l=0,o=0,i,s={},u=r.pop();typeof u=="object"&&(s=u,u=r.pop()),P3(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...s},{memoize:f,memoizeOptions:d=[],argsMemoize:h=uE,argsMemoizeOptions:p=[]}=c,v=Zy(d),E=Zy(p),g=Y3(r),y=f(function(){return l++,u.apply(null,arguments)},...v),S=h(function(){o++;const b=G3(g,arguments);return i=y.apply(null,b),i},...E);return Object.assign(S,{resultFunc:u,memoizedResultFunc:y,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>i,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:f,argsMemoize:h})};return Object.assign(a,{withTypes:()=>a}),a}var tM=cE(uE),nM=Object.assign((e,t=tM)=>{q3(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),a=n.map(r=>e[r]);return t(a,(...r)=>r.reduce((l,o,i)=>(l[n[i]]=o,l),{}))},{withTypes:()=>nM}),Xy={exports:{}},If={},Qy;function aM(){if(Qy)return If;Qy=1;var e=tr;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,r=e.useEffect,l=e.useLayoutEffect,o=e.useDebugValue;function i(f,d){var h=d(),p=a({inst:{value:h,getSnapshot:d}}),v=p[0].inst,E=p[1];return l(function(){v.value=h,v.getSnapshot=d,s(v)&&E({inst:v})},[f,h,d]),r(function(){return s(v)&&E({inst:v}),f(function(){s(v)&&E({inst:v})})},[f]),o(h),h}function s(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function u(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return If.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,If}var Fy;function fE(){return Fy||(Fy=1,Xy.exports=aM()),Xy.exports}var rM=fE(),Jy={exports:{}},Pf={},Wy;function lM(){if(Wy)return Pf;Wy=1;var e=tr,t=fE();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var a=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,l=e.useRef,o=e.useEffect,i=e.useMemo,s=e.useDebugValue;return Pf.useSyncExternalStoreWithSelector=function(u,c,f,d,h){var p=l(null);if(p.current===null){var v={hasValue:!1,value:null};p.current=v}else v=p.current;p=i(function(){function g(R){if(!y){if(y=!0,S=R,R=d(R),h!==void 0&&v.hasValue){var w=v.value;if(h(w,R))return b=w}return b=R}if(w=b,a(S,R))return w;var C=d(R);return h!==void 0&&h(w,C)?(S=R,w):(S=R,b=C)}var y=!1,S,b,x=f===void 0?null:f;return[function(){return g(c())},x===null?void 0:function(){return g(x())}]},[c,f,d,h]);var E=r(u,p[0],p[1]);return o(function(){v.hasValue=!0,v.value=E},[E]),s(E),E},Pf}var e0;function oM(){return e0||(e0=1,Jy.exports=lM()),Jy.exports}var iM=oM();const sM=()=>{},oe=typeof document<"u"?m.useLayoutEffect:sM;function Je(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(a=>n.searchParams.append("args[]",a)),`Base UI error #${e}; visit ${n} for the full message.`}const dE=m.createContext(void 0);function Gi(e){const t=m.useContext(dE);if(t===void 0&&!e)throw new Error(Je(72));return t}const t0={};function Zt(e,t){const n=m.useRef(t0);return n.current===t0&&(n.current=e(t)),n}const uM=[];function hE(e){m.useEffect(e,uM)}const _o=0;class or{constructor(){pe(this,"currentId",_o);pe(this,"clear",()=>{this.currentId!==_o&&(clearTimeout(this.currentId),this.currentId=_o)});pe(this,"disposeEffect",()=>this.clear)}static create(){return new or}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=_o,n()},t)}isStarted(){return this.currentId!==_o}}function Kt(){const e=Zt(or.create).current;return hE(e.disposeEffect),e}function wt(e){const t=Zt(cM,e).current;return t.next=e,oe(t.effect),t}function cM(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const qf=Ni[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],fM=qf&&qf!==m.useLayoutEffect?qf:e=>e();function ae(e){const t=Zt(dM).current;return t.next=e,fM(t.effect),t.trampoline}function dM(){const e={next:void 0,callback:hM,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function hM(){}const uo=typeof navigator<"u",$f=yM(),mE=bM(),pE=vM(),mM=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),pM=$f.platform==="MacIntel"&&$f.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test($f.platform),gE=uo&&/apple/i.test(navigator.vendor),fh=uo&&/android/i.test(mE)||/android/i.test(pE),gM=uo&&mE.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,yE=pE.includes("jsdom/");function yM(){if(!uo)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 vM(){if(!uo)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function bM(){if(!uo)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const dh="data-base-ui-focusable",vE="active",bE="selected",SE="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ja="ArrowLeft",Wa="ArrowRight",Zm="ArrowUp",Zi="ArrowDown";function Un(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 Oe(e,t){var a;if(!e||!t)return!1;const n=(a=t.getRootNode)==null?void 0:a.call(t);if(e.contains(t))return!0;if(n&&lh(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Rt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _n(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 SM(e){return e.matches("html,body")}function rt(e){return(e==null?void 0:e.ownerDocument)||document}function Km(e){return Qe(e)&&e.matches(SE)}function hh(e){return e?e.getAttribute("role")==="combobox"&&Km(e):!1}function EM(e){if(!e||yE)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Qu(e){return e?e.hasAttribute(dh)?e:e.querySelector(`[${dh}]`)||e:null}function kr(e,t,n=!0){return e.filter(a=>{var r;return a.parentId===t&&(!n||((r=a.context)==null?void 0:r.open))}).flatMap(a=>[a,...kr(e,a.id,n)])}function n0(e,t){var r;let n=[],a=(r=e.find(l=>l.id===t))==null?void 0:r.parentId;for(;a;){const l=e.find(o=>o.id===a);a=l==null?void 0:l.parentId,l&&(n=n.concat(l))}return n}function Nt(e){e.preventDefault(),e.stopPropagation()}function xM(e){return"nativeEvent"in e}function EE(e){return e.mozInputSource===0&&e.isTrusted?!0:fh&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function xE(e){return yE?!1:!fh&&e.width===0&&e.height===0||fh&&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 Pr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function wE(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Cs(e,t,n){return Math.floor(e/t)!==n}function li(e,t){return t<0||t>=e.current.length}function Yf(e,t){return _t(e,{disabledIndices:t})}function a0(e,t){return _t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function _t(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:a,amount:r=1}={}){let l=t;do l+=n?-r:r;while(l>=0&&l<=e.current.length-1&&oi(e,l,a));return l}function wM(e,{event:t,orientation:n,loopFocus:a,rtl:r,cols:l,disabledIndices:o,minIndex:i,maxIndex:s,prevIndex:u,stopEvent:c=!1}){let f=u;const d=[],h={};let p=!1;{let g=null,y=-1;e.current.forEach((S,b)=>{if(S==null)return;const x=S.closest('[role="row"]');x&&(p=!0),(x!==g||y===-1)&&(g=x,y+=1,d[y]=[]),d[y].push(b),h[b]=y})}const v=p&&d.length>0&&d.some(g=>g.length!==l);function E(g){if(!v||u===-1)return;const y=h[u];if(y==null)return;const S=d[y].indexOf(u);let b=g==="up"?y-1:y+1;a&&(b<0?b=d.length-1:b>=d.length&&(b=0));const x=new Set;for(;b>=0&&b<d.length&&!x.has(b);){x.add(b);const R=d[b];if(R.length===0){b=g==="up"?b-1:b+1;continue}const w=Math.min(S,R.length-1);for(let C=w;C>=0;C-=1){const A=R[C];if(!oi(e,A,o))return A}b=g==="up"?b-1:b+1,a&&(b<0?b=d.length-1:b>=d.length&&(b=0))}}if(t.key===Zm){const g=E("up");if(g!==void 0)c&&Nt(t),f=g;else{if(c&&Nt(t),u===-1)f=s;else if(f=_t(e,{startingIndex:f,amount:l,decrement:!0,disabledIndices:o}),a&&(u-l<i||f<0)){const y=u%l,S=s%l,b=s-(S-y);S===y?f=s:f=S>y?b:b-l}li(e,f)&&(f=u)}}if(t.key===Zi){const g=E("down");g!==void 0?(c&&Nt(t),f=g):(c&&Nt(t),u===-1?f=i:(f=_t(e,{startingIndex:u,amount:l,disabledIndices:o}),a&&u+l>s&&(f=_t(e,{startingIndex:u%l-l,amount:l,disabledIndices:o}))),li(e,f)&&(f=u))}if(n==="both"){const g=yl(u/l);t.key===(r?Ja:Wa)&&(c&&Nt(t),u%l!==l-1?(f=_t(e,{startingIndex:u,disabledIndices:o}),a&&Cs(f,l,g)&&(f=_t(e,{startingIndex:u-u%l-1,disabledIndices:o}))):a&&(f=_t(e,{startingIndex:u-u%l-1,disabledIndices:o})),Cs(f,l,g)&&(f=u)),t.key===(r?Wa:Ja)&&(c&&Nt(t),u%l!==0?(f=_t(e,{startingIndex:u,decrement:!0,disabledIndices:o}),a&&Cs(f,l,g)&&(f=_t(e,{startingIndex:u+(l-u%l),decrement:!0,disabledIndices:o}))):a&&(f=_t(e,{startingIndex:u+(l-u%l),decrement:!0,disabledIndices:o})),Cs(f,l,g)&&(f=u));const y=yl(s/l)===g;li(e,f)&&(a&&y?f=t.key===(r?Wa:Ja)?s:_t(e,{startingIndex:u-u%l-1,disabledIndices:o}):f=u)}return f}function RM(e,t,n){const a=[];let r=0;return e.forEach(({width:l,height:o},i)=>{let s=!1;for(n&&(r=0);!s;){const u=[];for(let c=0;c<l;c+=1)for(let f=0;f<o;f+=1)u.push(r+c+f*t);r%t+l<=t&&u.every(c=>a[c]==null)?(u.forEach(c=>{a[c]=i}),s=!0):r+=1}}),[...a]}function CM(e,t,n,a,r){if(e===-1)return-1;const l=n.indexOf(e),o=t[e];switch(r){case"tl":return l;case"tr":return o?l+o.width-1:l;case"bl":return o?l+(o.height-1)*a:l;case"br":return n.lastIndexOf(e);default:return-1}}function TM(e,t){return t.flatMap((n,a)=>e.includes(n)?[a]:[])}function oi(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const a=e.current[t];return a?a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true":!1}const co=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function RE(e,t){const n=Yi(e,co()),a=n.length;if(a===0)return;const r=Un(rt(e)),l=n.indexOf(r),o=l===-1?t===1?0:a-1:l+t;return n[o]}function Xm(e){return RE(rt(e).body,1)||e}function CE(e){return RE(rt(e).body,-1)||e}function TE(e,t){if(!e)return null;const n=Yi(rt(e).body,co()),a=n.length;if(a===0)return null;const r=n.indexOf(e);if(r===-1)return null;const l=(r+t+a)%a;return n[l]}function MM(e){return TE(e,1)}function OM(e){return TE(e,-1)}function Ol(e,t){const n=t||e.currentTarget,a=e.relatedTarget;return!a||!Oe(n,a)}function AM(e){Yi(e,co()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function r0(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}const _M={...Ni};let l0=0;function NM(e,t="mui"){const[n,a]=m.useState(e),r=e||n;return m.useEffect(()=>{n==null&&(l0+=1,a(`${t}-${l0}`))},[n,t]),r}const o0=_M.useId;function Qr(e,t){if(o0!==void 0){const n=o0();return e??(t?`${t}-${n}`:n)}return NM(e,t)}function ME(){const e=new Map;return{emit(t,n){var a;(a=e.get(t))==null||a.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var a;(a=e.get(t))==null||a.delete(n)}}}class Qm{constructor(){pe(this,"nodesRef",{current:[]});pe(this,"events",ME())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(a=>a===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const OE=m.createContext(null),AE=m.createContext(null),Ea=()=>{var e;return((e=m.useContext(OE))==null?void 0:e.id)||null},hr=e=>{const t=m.useContext(AE);return e??t};function _E(e){const t=Qr(),n=hr(e),a=Ea();return oe(()=>{if(!t)return;const r={id:t,parentId:a};return n==null||n.addNode(r),()=>{n==null||n.removeNode(r)}},[n,t,a]),t}function kM(e){const{children:t,id:n}=e,a=Ea();return U.jsx(OE.Provider,{value:m.useMemo(()=>({id:n,parentId:a}),[n,a]),children:t})}function DM(e){const{children:t,externalTree:n}=e,a=Zt(()=>n??new Qm).current;return U.jsx(AE.Provider,{value:a,children:t})}function Pt(){}const Zl=Object.freeze([]),Fe=Object.freeze({}),LM=500,zM=500,UM={style:{transition:"none"}},NE="data-base-ui-click-trigger",jM={fallbackAxisSide:"none"},kE={fallbackAxisSide:"end"},HM={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ki="none",er="trigger-press",Dt="trigger-hover",Ai="trigger-focus",Fm="outside-press",Ac="item-press",BM="close-press",Kl="focus-out",_c="escape-key",Js="list-navigation",VM="cancel-open",Bo="sibling-open",IM="disabled",Jm="imperative-action";function Ce(e,t,n,a){let r=!1,l=!1;const o=Fe;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){l=!0},get isCanceled(){return r},get isPropagationAllowed(){return l},trigger:n,...o}}function Xl(e){return`data-base-ui-${e}`}function Ws(e,t,n){if(n&&!Pr(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const a=e();return typeof a=="number"?a:a==null?void 0:a[t]}return e==null?void 0:e[t]}const PM=m.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new or,currentIdRef:{current:null},currentContextRef:{current:null}});function qM(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,a=n.useState("floatingId"),{enabled:r=!0,open:l}=t,o=m.useContext(PM),{currentIdRef:i,delayRef:s,timeoutMs:u,initialDelayRef:c,currentContextRef:f,hasProvider:d,timeout:h}=o,[p,v]=m.useState(!1);return oe(()=>{function E(){var g;v(!1),(g=f.current)==null||g.setIsInstantPhase(!1),i.current=null,f.current=null,s.current=c.current}if(r&&i.current&&!l&&i.current===a){if(v(!1),u){const g=a;return h.start(u,()=>{n.select("open")||i.current&&i.current!==g||E()}),()=>{h.clear()}}E()}},[r,l,a,i,s,u,c,f,h,n]),oe(()=>{if(!r||!l)return;const E=f.current,g=i.current;h.clear(),f.current={onOpenChange:n.setOpen,setIsInstantPhase:v},i.current=a,s.current={open:0,close:Ws(c.current,"close")},g!==null&&g!==a?(v(!0),E==null||E.setIsInstantPhase(!0),E==null||E.onOpenChange(!1,Ce(Ki))):(v(!1),E==null||E.setIsInstantPhase(!1))},[r,l,a,n,i,s,u,c,f,h]),oe(()=>()=>{f.current=null},[f]),m.useMemo(()=>({hasProvider:d,delayRef:s,isInstantPhase:p}),[d,s,p])}function qr(e,t,n,a){const r=Zt(DE).current;return YM(r,e,t,n,a)&&LE(r,[e,t,n,a]),r.callback}function $M(e){const t=Zt(DE).current;return GM(t,e)&&LE(t,e),t.callback}function DE(){return{callback:null,cleanup:null,refs:[]}}function YM(e,t,n,a,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==a||e.refs[3]!==r}function GM(e,t){return e.refs.length!==t.length||e.refs.some((n,a)=>n!==t[a])}function LE(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 a=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const l=t[r];if(l!=null)switch(typeof l){case"function":{const o=l(n);typeof o=="function"&&(a[r]=o);break}case"object":{l.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const l=t[r];if(l!=null)switch(typeof l){case"function":{const o=a[r];typeof o=="function"?o():l(null);break}case"object":{l.current=null;break}}}}}}}const Wm={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},Ts=null;class ZM{constructor(){pe(this,"callbacks",[]);pe(this,"callbacksCount",0);pe(this,"nextId",1);pe(this,"startId",1);pe(this,"isScheduled",!1);pe(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let l=0;l<n.length;l+=1)(r=n[l])==null||r.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 Ms=new ZM;class zn{constructor(){pe(this,"currentId",Ts);pe(this,"cancel",()=>{this.currentId!==Ts&&(Ms.cancel(this.currentId),this.currentId=Ts)});pe(this,"disposeEffect",()=>this.cancel)}static create(){return new zn}static request(t){return Ms.request(t)}static cancel(t){return Ms.cancel(t)}request(t){this.cancel(),this.currentId=Ms.request(()=>{this.currentId=Ts,t()})}}function Xi(){const e=Zt(zn.create).current;return hE(e.disposeEffect),e}function va(e){return(e==null?void 0:e.ownerDocument)||document}const Ql=m.forwardRef(function(e,t){const[n,a]=m.useState();return oe(()=>{gE&&a("button")},[]),U.jsx("span",{...e,ref:t,style:Wm,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});let i0=0;function eu(e,t={}){const{preventScroll:n=!1,cancelPrevious:a=!0,sync:r=!1}=t;a&&cancelAnimationFrame(i0);const l=()=>e==null?void 0:e.focus({preventScroll:n});r?l():i0=requestAnimationFrame(l)}const Al={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function s0(e){return e==="inert"?Al.inert:e==="aria-hidden"?Al["aria-hidden"]:Al.none}let Os=new WeakSet,As={},Gf=0;const zE=e=>e&&(e.host||zE(e.parentNode)),KM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const a=zE(n);return e.contains(a)?a:null}).filter(n=>n!=null);function XM(e,t,n,a){const r="data-base-ui-inert",l=a?"inert":n?"aria-hidden":null,o=KM(t,e),i=new Set,s=new Set(o),u=[];As[r]||(As[r]=new WeakMap);const c=As[r];o.forEach(f),d(t),i.clear();function f(h){!h||i.has(h)||(i.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||s.has(h)||[].forEach.call(h.children,p=>{if(fr(p)!=="script")if(i.has(p))d(p);else{const v=l?p.getAttribute(l):null,E=v!==null&&v!=="false",g=s0(l),y=(g.get(p)||0)+1,S=(c.get(p)||0)+1;g.set(p,y),c.set(p,S),u.push(p),y===1&&E&&Os.add(p),S===1&&p.setAttribute(r,""),!E&&l&&p.setAttribute(l,l==="inert"?"":"true")}})}return Gf+=1,()=>{u.forEach(h=>{const p=s0(l),v=(p.get(h)||0)-1,E=(c.get(h)||0)-1;p.set(h,v),c.set(h,E),v||(!Os.has(h)&&l&&h.removeAttribute(l),Os.delete(h)),E||h.removeAttribute(r)}),Gf-=1,Gf||(Al.inert=new WeakMap,Al["aria-hidden"]=new WeakMap,Al.none=new WeakMap,Os=new WeakSet,As={})}}function QM(e,t=!1,n=!1){const a=rt(e[0]).body;return XM(e.concat(Array.from(a.querySelectorAll("[aria-live]"))),a,t,n)}const FM=parseInt(m.version,10);function ep(e){return FM>=e}function u0(e){if(!m.isValidElement(e))return null;const t=e,n=t.props;return(ep(19)?n==null?void 0:n.ref:t.ref)??null}function mh(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function JM(e,t){const n={};for(const a in e){const r=e[a];if(t!=null&&t.hasOwnProperty(a)){const l=t[a](r);l!=null&&Object.assign(n,l);continue}r===!0?n[`data-${a.toLowerCase()}`]="":r&&(n[`data-${a.toLowerCase()}`]=r.toString())}return n}function WM(e,t){return typeof e=="function"?e(t):e}function eO(e,t){return typeof e=="function"?e(t):e}const ii={};function ba(e,t,n,a,r){let l={...ph(e,ii)};return t&&(l=tu(l,t)),n&&(l=tu(l,n)),a&&(l=tu(l,a)),l}function tO(e){if(e.length===0)return ii;if(e.length===1)return ph(e[0],ii);let t={...ph(e[0],ii)};for(let n=1;n<e.length;n+=1)t=tu(t,e[n]);return t}function tu(e,t){return UE(t)?t(e):nO(e,t)}function nO(e,t){if(!t)return e;for(const n in t){const a=t[n];switch(n){case"style":{e[n]=mh(e.style,a);break}case"className":{e[n]=jE(e.className,a);break}default:aO(n,a)?e[n]=rO(e[n],a):e[n]=a}}return e}function aO(e,t){const n=e.charCodeAt(0),a=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&a===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function UE(e){return typeof e=="function"}function ph(e,t){return UE(e)?e(t):e??ii}function rO(e,t){return t?e?n=>{if(lO(n)){const r=n;gh(r);const l=t(r);return r.baseUIHandlerPrevented||(e==null||e(r)),l}const a=t(n);return e==null||e(n),a}:t:e}function gh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function jE(e,t){return t?e?t+" "+e:t:e}function lO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ke(e,t,n={}){const a=t.render,r=oO(t,n);if(n.enabled===!1)return null;const l=n.state??Fe;return iO(e,a,r,l)}function oO(e,t={}){const{className:n,style:a,render:r}=e,{state:l=Fe,ref:o,props:i,stateAttributesMapping:s,enabled:u=!0}=t,c=u?WM(n,l):void 0,f=u?eO(a,l):void 0,d=u?JM(l,s):Fe,h=u?mh(d,Array.isArray(i)?tO(i):i)??Fe:Fe;return typeof document<"u"&&(u?Array.isArray(o)?h.ref=$M([h.ref,u0(r),...o]):h.ref=qr(h.ref,u0(r),o):qr(null,null)),u?(c!==void 0&&(h.className=jE(h.className,c)),f!==void 0&&(h.style=mh(h.style,f)),h):Fe}function iO(e,t,n,a){if(t){if(typeof t=="function")return t(n,a);const r=ba(n,t.props);return r.ref=n.ref,m.cloneElement(t,r)}if(e&&typeof e=="string")return sO(e,n);throw new Error(Je(8))}function sO(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 HE=m.createContext(null),BE=()=>m.useContext(HE),uO=Xl("portal");function VE(e={}){var p;const{ref:t,container:n,componentProps:a=Fe,elementProps:r,elementState:l}=e,o=Qr(),i=(p=BE())==null?void 0:p.portalNode,[s,u]=m.useState(null),[c,f]=m.useState(null),d=m.useRef(null);oe(()=>{if(n===null){d.current&&(d.current=null,f(null),u(null));return}if(o==null)return;const v=(n&&(Im(n)?n:n.current))??i??document.body;if(v==null){d.current&&(d.current=null,f(null),u(null));return}d.current!==v&&(d.current=v,f(null),u(v))},[n,i,o]);const h=ke("div",a,{ref:[t,f],state:l,props:[{id:o,[uO]:""},r]});return{portalNode:c,portalSubtree:s&&h?zt.createPortal(h,s):null}}const IE=m.forwardRef(function(e,t){const{children:n,container:a,className:r,render:l,renderGuards:o,...i}=e,{portalNode:s,portalSubtree:u}=VE({container:a,ref:t,componentProps:e,elementProps:i}),c=m.useRef(null),f=m.useRef(null),d=m.useRef(null),h=m.useRef(null),[p,v]=m.useState(null),E=p==null?void 0:p.modal,g=p==null?void 0:p.open,y=typeof o=="boolean"?o:!!p&&!p.modal&&p.open&&!!s;m.useEffect(()=>{if(!s||E)return;function b(x){s&&Ol(x)&&(x.type==="focusin"?r0:AM)(s)}return s.addEventListener("focusin",b,!0),s.addEventListener("focusout",b,!0),()=>{s.removeEventListener("focusin",b,!0),s.removeEventListener("focusout",b,!0)}},[s,E]),m.useEffect(()=>{!s||g||r0(s)},[g,s]);const S=m.useMemo(()=>({beforeOutsideRef:c,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:h,portalNode:s,setFocusManagerState:v}),[s]);return U.jsxs(m.Fragment,{children:[u,U.jsxs(HE.Provider,{value:S,children:[y&&s&&U.jsx(Ql,{"data-type":"outside",ref:c,onFocus:b=>{var x,R;if(Ol(b,s))(x=d.current)==null||x.focus();else{const w=p?p.domReference:null;(R=CE(w))==null||R.focus()}}}),y&&s&&U.jsx("span",{"aria-owns":s.id,style:HM}),s&&zt.createPortal(n,s),y&&s&&U.jsx(Ql,{"data-type":"outside",ref:f,onFocus:b=>{var x,R;if(Ol(b,s))(x=h.current)==null||x.focus();else{const w=p?p.domReference:null;(R=Xm(w))==null||R.focus(),p!=null&&p.closeOnFocusOut&&(p==null||p.onOpenChange(!1,Ce(Kl,b.nativeEvent)))}}})]})]})});function Er(e){return e==null?e:"current"in e?e.current:e}function cO(e,t){const n=dt(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 c0=20;let Va=[];function tp(){Va=Va.filter(e=>e.isConnected)}function fO(e){tp(),e&&fr(e)!=="body"&&(Va.push(e),Va.length>c0&&(Va=Va.slice(-c0)))}function Zf(){return tp(),Va[Va.length-1]}function dO(e){if(!e)return null;const t=co();return sE(e,t)?e:Yi(e,t)[0]||e}function hO(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Gt(e).display!=="none"}function f0(e,t){var l;if(!t.current.includes("floating")&&!((l=e.getAttribute("role"))!=null&&l.includes("dialog")))return;const n=co(),a=I3(e,n).filter(o=>{const i=o.getAttribute("data-tabindex")||"";return sE(o,n)||o.hasAttribute("data-tabindex")&&!i.startsWith("-")}),r=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?r!=="0"&&e.setAttribute("tabindex","0"):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function PE(e){const{context:t,children:n,disabled:a=!1,order:r=["content"],initialFocus:l=!0,returnFocus:o=!0,restoreFocus:i=!1,modal:s=!0,closeOnFocusOut:u=!0,openInteractionType:c="",getInsideElements:f=()=>[],nextFocusableElement:d,previousFocusableElement:h,beforeContentFocusGuardRef:p,externalTree:v}=e,E="rootStore"in t?t.rootStore:t,g=E.useState("open"),y=E.useState("domReferenceElement"),S=E.useState("floatingElement"),{events:b,dataRef:x}=E.context,R=ae(()=>{var Y;return(Y=x.current.floatingContext)==null?void 0:Y.nodeId}),w=ae(f),C=l===!1,A=hh(y)&&C,T=wt(r),k=wt(l),M=wt(o),L=wt(c),z=hr(v),_=BE(),N=m.useRef(null),D=m.useRef(null),O=m.useRef(!1),H=m.useRef(!1),j=m.useRef(!1),Z=m.useRef(-1),q=m.useRef(""),P=m.useRef(""),Q=Kt(),$=Kt(),de=Xi(),K=_!=null,F=Qu(S),he=ae((Y=F)=>Y?Yi(Y,co()):[]),ge=ae(Y=>{const X=he(Y);return T.current.map(()=>X).filter(Boolean).flat()});m.useEffect(()=>{if(a||!s)return;function Y(re){re.key==="Tab"&&Oe(F,Un(rt(F)))&&he().length===0&&!A&&Nt(re)}const X=rt(F);return X.addEventListener("keydown",Y),()=>{X.removeEventListener("keydown",Y)}},[a,y,F,s,T,A,he,ge]),m.useEffect(()=>{if(a||!S)return;function Y(X){const re=Rt(X),fe=he().indexOf(re);fe!==-1&&(Z.current=fe)}return S.addEventListener("focusin",Y),()=>{S.removeEventListener("focusin",Y)}},[a,S,he]),m.useEffect(()=>{if(a||!g)return;const Y=rt(F);function X(){j.current=!1}function re(De){const ie=Rt(De),ee=Oe(S,ie)||Oe(y,ie)||Oe(_==null?void 0:_.portalNode,ie);j.current=!ee,P.current=De.pointerType||"keyboard"}function fe(){P.current="keyboard"}return Y.addEventListener("pointerdown",re,!0),Y.addEventListener("pointerup",X,!0),Y.addEventListener("pointercancel",X,!0),Y.addEventListener("keydown",fe,!0),()=>{Y.removeEventListener("pointerdown",re,!0),Y.removeEventListener("pointerup",X,!0),Y.removeEventListener("pointercancel",X,!0),Y.removeEventListener("keydown",fe,!0)}},[a,S,y,F,g,_]),m.useEffect(()=>{if(a||!u)return;function Y(){H.current=!0,$.start(0,()=>{H.current=!1})}function X(ie){const ee=ie.relatedTarget,G=ie.currentTarget,W=Rt(ie);queueMicrotask(()=>{const se=R(),le=E.context.triggerElements,Ee=!(Oe(y,ee)||Oe(S,ee)||Oe(ee,S)||Oe(_==null?void 0:_.portalNode,ee)||ee!=null&&le.hasElement(ee)||le.hasMatchingElement(me=>Oe(me,ee))||ee!=null&&ee.hasAttribute(Xl("focus-guard"))||z&&(kr(z.nodesRef.current,se).find(me=>{var Ne,nt;return Oe((Ne=me.context)==null?void 0:Ne.elements.floating,ee)||Oe((nt=me.context)==null?void 0:nt.elements.domReference,ee)})||n0(z.nodesRef.current,se).find(me=>{var Ne,nt,At;return[(Ne=me.context)==null?void 0:Ne.elements.floating,Qu((nt=me.context)==null?void 0:nt.elements.floating)].includes(ee)||((At=me.context)==null?void 0:At.elements.domReference)===ee})));if(G===y&&F&&f0(F,T),i&&G!==y&&!hO(W)&&Un(rt(F))===rt(F).body){if(Qe(F)&&(F.focus(),i==="popup")){de.request(()=>{F.focus()});return}const me=Z.current,Ne=he(),nt=Ne[me]||Ne[Ne.length-1]||F;Qe(nt)&&nt.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(A||!s)&&ee&&Ee&&!H.current&&(A||ee!==Zf())&&(O.current=!0,E.setOpen(!1,Ce(Kl,ie)))})}function re(){j.current||(x.current.insideReactTree=!0,Q.start(0,()=>{x.current.insideReactTree=!1}))}const fe=Qe(y)?y:null,De=[];if(!(!S&&!fe))return fe&&(fe.addEventListener("focusout",X),fe.addEventListener("pointerdown",Y),De.push(()=>{fe.removeEventListener("focusout",X),fe.removeEventListener("pointerdown",Y)})),S&&(S.addEventListener("focusout",X),_&&(S.addEventListener("focusout",re,!0),De.push(()=>{S.removeEventListener("focusout",re,!0)})),De.push(()=>{S.removeEventListener("focusout",X)})),()=>{De.forEach(ie=>{ie()})}},[a,y,S,F,s,z,_,E,u,i,he,A,R,T,x,Q,$,de]);const V=m.useRef(null),J=m.useRef(null),te=qr(V,p,_==null?void 0:_.beforeInsideRef),we=qr(J,_==null?void 0:_.afterInsideRef);m.useEffect(()=>{var De,ie,ee;if(a||!S||!g)return;const Y=Array.from(((De=_==null?void 0:_.portalNode)==null?void 0:De.querySelectorAll(`[${Xl("portal")}]`))||[]),X=(ee=(ie=(z?n0(z.nodesRef.current,R()):[]).find(G=>{var W;return hh(((W=G.context)==null?void 0:W.elements.domReference)||null)}))==null?void 0:ie.context)==null?void 0:ee.elements.domReference,re=[S,X,...Y,...w(),N.current,D.current,V.current,J.current,_==null?void 0:_.beforeOutsideRef.current,_==null?void 0:_.afterOutsideRef.current,Er(h),Er(d),A?y:null].filter(G=>G!=null),fe=QM(re,s||A);return()=>{fe()}},[g,a,y,S,s,T,_,A,z,R,w,d,h]),oe(()=>{if(!g||a||!Qe(F))return;const Y=rt(F),X=Un(Y);queueMicrotask(()=>{const re=ge(F),fe=k.current,De=typeof fe=="function"?fe(L.current||""):fe;if(De===void 0||De===!1)return;let ie;De===!0||De===null?ie=re[0]||F:ie=Er(De),ie=ie||re[0]||F,!Oe(F,X)&&eu(ie,{preventScroll:ie===F})})},[a,g,F,C,ge,k,L]),oe(()=>{if(a||!F)return;const Y=rt(F),X=Un(Y);fO(X);function re(ie){if(ie.open||(q.current=cO(ie.nativeEvent,P.current)),ie.reason===Dt&&ie.nativeEvent.type==="mouseleave"&&(O.current=!0),ie.reason===Fm)if(ie.nested)O.current=!1;else if(EE(ie.nativeEvent)||xE(ie.nativeEvent))O.current=!1;else{let ee=!1;document.createElement("div").focus({get preventScroll(){return ee=!0,!1}}),ee?O.current=!1:O.current=!0}}b.on("openchange",re);const fe=Y.createElement("span");fe.setAttribute("tabindex","-1"),fe.setAttribute("aria-hidden","true"),Object.assign(fe.style,Wm),K&&y&&y.insertAdjacentElement("afterend",fe);function De(){const ie=M.current;let ee=typeof ie=="function"?ie(q.current):ie;if(ee===void 0||ee===!1)return null;if(ee===null&&(ee=!0),typeof ee=="boolean"){const W=y||Zf();return W&&W.isConnected?W:fe}const G=y||Zf()||fe;return Er(ee)||G}return()=>{b.off("openchange",re);const ie=Un(Y),ee=Oe(S,ie)||z&&kr(z.nodesRef.current,R(),!1).some(W=>{var se;return Oe((se=W.context)==null?void 0:se.elements.floating,ie)}),G=De();queueMicrotask(()=>{const W=dO(G),se=typeof M.current!="boolean";M.current&&!O.current&&Qe(W)&&(!(!se&&W!==ie&&ie!==Y.body)||ee)&&W.focus({preventScroll:!0}),fe.remove()})}},[a,S,F,M,x,b,z,K,y,R]),m.useEffect(()=>{queueMicrotask(()=>{O.current=!1})},[a]),m.useEffect(()=>{if(a||!g)return;function Y(re){var fe;(fe=Rt(re))!=null&&fe.closest(`[${NE}]`)&&(H.current=!0)}const X=rt(F);return X.addEventListener("pointerdown",Y,!0),()=>{X.removeEventListener("pointerdown",Y,!0)}},[a,g,F]),oe(()=>{if(!a&&_)return _.setFocusManagerState({modal:s,closeOnFocusOut:u,open:g,onOpenChange:E.setOpen,domReference:y}),()=>{_.setFocusManagerState(null)}},[a,_,s,g,E,u,y]),oe(()=>{if(!(a||!F))return f0(F,T),()=>{queueMicrotask(tp)}},[a,F,T]);const ne=!a&&(s?!A:!0)&&(K||s);return U.jsxs(m.Fragment,{children:[ne&&U.jsx(Ql,{"data-type":"inside",ref:te,onFocus:Y=>{var X,re;if(s){const fe=ge();eu(fe[fe.length-1])}else _!=null&&_.portalNode&&(O.current=!1,Ol(Y,_.portalNode)?(X=Xm(y))==null||X.focus():(re=Er(h??_.beforeOutsideRef))==null||re.focus())}}),n,ne&&U.jsx(Ql,{"data-type":"inside",ref:we,onFocus:Y=>{var X,re;s?eu(ge()[0]):_!=null&&_.portalNode&&(u&&(O.current=!0),Ol(Y,_.portalNode)?(X=CE(y))==null||X.focus():(re=Er(d??_.afterOutsideRef))==null||re.focus())}})]})}function np(e,t={}){const n="rootStore"in e?e.rootStore:e,a=n.context.dataRef,{enabled:r=!0,event:l="click",toggle:o=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:u=0}=t,c=m.useRef(void 0),f=Xi(),d=Kt(),h=m.useMemo(()=>({onPointerDown(p){c.current=p.pointerType},onMouseDown(p){const v=c.current,E=p.nativeEvent,g=n.select("open");if(p.button!==0||l==="click"||Pr(v,!0)&&i)return;const y=a.current.openEvent,S=y==null?void 0:y.type,b=n.select("domReferenceElement")!==p.currentTarget,x=g&&b||!(g&&o&&(!(y&&s)||S==="click"||S==="mousedown"));if(Km(E.target)){const w=Ce(er,E,E.target);x&&v==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,w)}):n.setOpen(x,w);return}const R=p.currentTarget;f.request(()=>{const w=Ce(er,E,R);x&&v==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,w)}):n.setOpen(x,w)})},onClick(p){if(l==="mousedown-only")return;const v=c.current;if(l==="mousedown"&&v){c.current=void 0;return}if(Pr(v,!0)&&i)return;const E=n.select("open"),g=a.current.openEvent,y=n.select("domReferenceElement")!==p.currentTarget,S=E&&y||!(E&&o&&(!(g&&s)||wE(g))),b=Ce(er,p.nativeEvent,p.currentTarget);S&&v==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,b)}):n.setOpen(S,b)},onKeyDown(){c.current=void 0}}),[a,l,i,n,s,o,f,d,u]);return m.useMemo(()=>r?{reference:h}:Fe,[r,h])}function mO(e,t){let n=null,a=null,r=!1;return{contextElement:e||void 0,getBoundingClientRect(){var h;const l=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},o=t.axis==="x"||t.axis==="both",i=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=l.width,c=l.height,f=l.x,d=l.y;return n==null&&t.x&&o&&(n=l.x-t.x),a==null&&t.y&&i&&(a=l.y-t.y),f-=n||0,d-=a||0,u=0,c=0,!r||s?(u=t.axis==="y"?l.width:0,c=t.axis==="x"?l.height:0,f=o&&t.x!=null?t.x:f,d=i&&t.y!=null?t.y:d):r&&!s&&(c=t.axis==="x"?l.height:c,u=t.axis==="y"?l.width:u),r=!0,{width:u,height:c,x:f,y:d,top:d,right:f+u,bottom:d+c,left:f}}}}function d0(e){return e!=null&&e.clientX!=null}function pO(e,t={}){const n="rootStore"in e?e.rootStore:e,a=n.useState("open"),r=n.useState("floatingElement"),l=n.useState("domReferenceElement"),o=n.context.dataRef,{enabled:i=!0,axis:s="both",x:u=null,y:c=null}=t,f=m.useRef(!1),d=m.useRef(null),[h,p]=m.useState(),[v,E]=m.useState([]),g=ae((R,w)=>{f.current||o.current.openEvent&&!d0(o.current.openEvent)||n.set("positionReference",mO(l,{x:R,y:w,axis:s,dataRef:o,pointerType:h}))}),y=ae(R=>{u!=null||c!=null||(a?d.current||E([]):g(R.clientX,R.clientY))}),S=Pr(h)?r:a,b=m.useCallback(()=>{if(!S||!i||u!=null||c!=null)return;const R=dt(r);function w(C){const A=Rt(C);Oe(r,A)?(R.removeEventListener("mousemove",w),d.current=null):g(C.clientX,C.clientY)}if(!o.current.openEvent||d0(o.current.openEvent)){R.addEventListener("mousemove",w);const C=()=>{R.removeEventListener("mousemove",w),d.current=null};return d.current=C,C}n.set("positionReference",l)},[S,i,u,c,r,o,l,n,g]);m.useEffect(()=>b(),[b,v]),m.useEffect(()=>{i&&!r&&(f.current=!1)},[i,r]),m.useEffect(()=>{!i&&a&&(f.current=!0)},[i,a]),oe(()=>{i&&(u!=null||c!=null)&&(f.current=!1,g(u,c))},[i,u,c,g]);const x=m.useMemo(()=>{function R(w){p(w.pointerType)}return{onPointerDown:R,onPointerEnter:R,onMouseMove:y,onMouseEnter:y}},[y]);return m.useMemo(()=>i?{reference:x}:{},[i,x])}const gO={intentional:"onClick",sloppy:"onPointerDown"};function yO(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 ap(e,t={}){const n="rootStore"in e?e.rootStore:e,a=n.useState("open"),r=n.useState("floatingElement"),l=n.useState("referenceElement"),o=n.useState("domReferenceElement"),{onOpenChange:i,dataRef:s}=n.context,{enabled:u=!0,escapeKey:c=!0,outsidePress:f=!0,outsidePressEvent:d="sloppy",referencePress:h=!1,referencePressEvent:p="sloppy",ancestorScroll:v=!1,bubbles:E,externalTree:g}=t,y=hr(g),S=ae(typeof f=="function"?f:()=>!1),b=typeof f=="function"?S:f,x=m.useRef(!1),{escapeKey:R,outsidePress:w}=yO(E),C=m.useRef(null),A=Kt(),T=Kt(),k=ae(()=>{T.clear(),s.current.insideReactTree=!1}),M=m.useRef(!1),L=m.useRef(""),z=ae(V=>{L.current=V.pointerType}),_=ae(()=>{const V=L.current,J=V==="pen"||!V?"mouse":V,te=typeof d=="function"?d():d;return typeof te=="string"?te:te[J]}),N=ae(V=>{var Y;if(!a||!u||!c||V.key!=="Escape"||M.current)return;const J=(Y=s.current.floatingContext)==null?void 0:Y.nodeId,te=y?kr(y.nodesRef.current,J):[];if(!R&&te.length>0){let X=!0;if(te.forEach(re=>{var fe;(fe=re.context)!=null&&fe.open&&!re.context.dataRef.current.__escapeKeyBubbles&&(X=!1)}),!X)return}const we=xM(V)?V.nativeEvent:V,ne=Ce(_c,we);n.setOpen(!1,ne),!R&&!ne.isPropagationAllowed&&V.stopPropagation()}),D=ae(V=>{const J=_();return J==="intentional"&&V.type!=="click"||J==="sloppy"&&V.type==="click"}),O=ae(()=>{s.current.insideReactTree=!0,T.start(0,k)}),H=ae((V,J=!1)=>{var ie;if(D(V)){k();return}if(s.current.insideReactTree){k();return}if(_()==="intentional"&&J||typeof b=="function"&&!b(V))return;const te=Rt(V),we=`[${Xl("inert")}]`,ne=rt(n.select("floatingElement")).querySelectorAll(we),Y=n.context.triggerElements;if(te&&(Y.hasElement(te)||Y.hasMatchingElement(ee=>Oe(ee,te))))return;let X=je(te)?te:null;for(;X&&!In(X);){const ee=$n(X);if(In(ee)||!je(ee))break;X=ee}if(ne.length&&je(te)&&!SM(te)&&!Oe(te,n.select("floatingElement"))&&Array.from(ne).every(ee=>!Oe(X,ee)))return;if(Qe(te)&&!("touches"in V)){const ee=In(te),G=Gt(te),W=/auto|scroll/,se=ee||W.test(G.overflowX),le=ee||W.test(G.overflowY),Ee=se&&te.clientWidth>0&&te.scrollWidth>te.clientWidth,me=le&&te.clientHeight>0&&te.scrollHeight>te.clientHeight,Ne=G.direction==="rtl",nt=me&&(Ne?V.offsetX<=te.offsetWidth-te.clientWidth:V.offsetX>te.clientWidth),At=Ee&&V.offsetY>te.clientHeight;if(nt||At)return}const re=(ie=s.current.floatingContext)==null?void 0:ie.nodeId,fe=y&&kr(y.nodesRef.current,re).some(ee=>{var G;return _n(V,(G=ee.context)==null?void 0:G.elements.floating)});if(_n(V,n.select("floatingElement"))||_n(V,n.select("domReferenceElement"))||fe)return;const De=y?kr(y.nodesRef.current,re):[];if(De.length>0){let ee=!0;if(De.forEach(G=>{var W;(W=G.context)!=null&&W.open&&!G.context.dataRef.current.__outsidePressBubbles&&(ee=!1)}),!ee)return}n.setOpen(!1,Ce(Fm,V)),k()}),j=ae(V=>{_()!=="sloppy"||V.pointerType==="touch"||!n.select("open")||!u||_n(V,n.select("floatingElement"))||_n(V,n.select("domReferenceElement"))||H(V)}),Z=ae(V=>{if(_()!=="sloppy"||!n.select("open")||!u||_n(V,n.select("floatingElement"))||_n(V,n.select("domReferenceElement")))return;const J=V.touches[0];J&&(C.current={startTime:Date.now(),startX:J.clientX,startY:J.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}),q=ae(V=>{const J=Rt(V);function te(){Z(V),J==null||J.removeEventListener(V.type,te)}J==null||J.addEventListener(V.type,te)}),P=ae(V=>{const J=x.current;if(x.current=!1,A.clear(),V.type==="mousedown"&&C.current&&!C.current.dismissOnMouseDown)return;const te=Rt(V);function we(){V.type==="pointerdown"?j(V):H(V,J),te==null||te.removeEventListener(V.type,we)}te==null||te.addEventListener(V.type,we)}),Q=ae(V=>{if(_()!=="sloppy"||!C.current||_n(V,n.select("floatingElement"))||_n(V,n.select("domReferenceElement")))return;const J=V.touches[0];if(!J)return;const te=Math.abs(J.clientX-C.current.startX),we=Math.abs(J.clientY-C.current.startY),ne=Math.sqrt(te*te+we*we);ne>5&&(C.current.dismissOnTouchEnd=!0),ne>10&&(H(V),A.clear(),C.current=null)}),$=ae(V=>{const J=Rt(V);function te(){Q(V),J==null||J.removeEventListener(V.type,te)}J==null||J.addEventListener(V.type,te)}),de=ae(V=>{_()!=="sloppy"||!C.current||_n(V,n.select("floatingElement"))||_n(V,n.select("domReferenceElement"))||(C.current.dismissOnTouchEnd&&H(V),A.clear(),C.current=null)}),K=ae(V=>{const J=Rt(V);function te(){de(V),J==null||J.removeEventListener(V.type,te)}J==null||J.addEventListener(V.type,te)});m.useEffect(()=>{if(!a||!u)return;s.current.__escapeKeyBubbles=R,s.current.__outsidePressBubbles=w;const V=new or;function J(X){n.setOpen(!1,Ce(Ki,X))}function te(){V.clear(),M.current=!0}function we(){V.start(Tc()?5:0,()=>{M.current=!1})}const ne=rt(r);ne.addEventListener("pointerdown",z,!0),c&&(ne.addEventListener("keydown",N),ne.addEventListener("compositionstart",te),ne.addEventListener("compositionend",we)),b&&(ne.addEventListener("click",P,!0),ne.addEventListener("pointerdown",P,!0),ne.addEventListener("touchstart",q,!0),ne.addEventListener("touchmove",$,!0),ne.addEventListener("touchend",K,!0),ne.addEventListener("mousedown",P,!0));let Y=[];return v&&(je(o)&&(Y=Fa(o)),je(r)&&(Y=Y.concat(Fa(r))),!je(l)&&l&&l.contextElement&&(Y=Y.concat(Fa(l.contextElement)))),Y=Y.filter(X=>{var re;return X!==((re=ne.defaultView)==null?void 0:re.visualViewport)}),Y.forEach(X=>{X.addEventListener("scroll",J,{passive:!0})}),()=>{ne.removeEventListener("pointerdown",z,!0),c&&(ne.removeEventListener("keydown",N),ne.removeEventListener("compositionstart",te),ne.removeEventListener("compositionend",we)),b&&(ne.removeEventListener("click",P,!0),ne.removeEventListener("pointerdown",P,!0),ne.removeEventListener("touchstart",q,!0),ne.removeEventListener("touchmove",$,!0),ne.removeEventListener("touchend",K,!0),ne.removeEventListener("mousedown",P,!0)),Y.forEach(X=>{X.removeEventListener("scroll",J)}),V.clear()}},[s,r,l,o,c,b,a,i,v,u,R,w,N,H,P,j,q,$,K,z,n]),m.useEffect(k,[b,k]);const F=m.useMemo(()=>({onKeyDown:N,...h&&{[gO[p]]:V=>{n.setOpen(!1,Ce(er,V.nativeEvent))},...p!=="intentional"&&{onClick(V){n.setOpen(!1,Ce(er,V.nativeEvent))}}}}),[N,n,h,p]),he=ae(V=>{const J=Rt(V.nativeEvent);!Oe(n.select("floatingElement"),J)||V.button!==0||(x.current=!0)}),ge=m.useMemo(()=>({onKeyDown:N,onPointerDown:he,onMouseDown:he,onMouseUp:he,onClickCapture:O,onMouseDownCapture:O,onPointerDownCapture:O,onMouseUpCapture:O,onTouchEndCapture:O,onTouchMoveCapture:O}),[N,he,O]);return m.useMemo(()=>u?{reference:F,floating:ge,trigger:F}:{},[u,F,ge])}cE({memoize:F3,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const B=(e,t,n,a,r,l,...o)=>{if(o.length>0)throw new Error(Je(1));let i;if(e)i=e;else throw new Error("Missing arguments");return i},vO=ep(19),bO=vO?EO:xO;function SO(e,t,n,a,r){return bO(e,t,n,a,r)}function EO(e,t,n,a,r){const l=m.useCallback(()=>t(e.getSnapshot(),n,a,r),[e,t,n,a,r]);return rM.useSyncExternalStore(e.subscribe,l,l)}function xO(e,t,n,a,r){return iM.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,n,a,r))}class si{constructor(t){pe(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));pe(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 a of this.listeners){if(n!==this.updateTick)return;a(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){si.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||si.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};si.prototype.setState.call(this,t)}}class Nc extends si{constructor(n,a={},r){super(n);pe(this,"controlledValues",new Map);pe(this,"select",(n,a,r,l)=>{const o=this.selectors[n];return o(this.state,a,r,l)});pe(this,"useState",(n,a,r,l)=>{m.useDebugValue(n);const o=this.selectors[n];return SO(this,o,a,r,l)});this.context=a,this.selectors=r}useSyncedValue(n,a){m.useDebugValue(n),oe(()=>{this.state[n]!==a&&this.set(n,a)},[n,a])}useSyncedValueWithCleanup(n,a){oe(()=>(this.state[n]!==a&&this.set(n,a),()=>{this.set(n,void 0)}),[n,a])}useSyncedValues(n){const a=Object.values(n);oe(()=>{this.update(n)},a)}useControlledProp(n,a,r){m.useDebugValue(n);const l=a!==void 0;this.controlledValues.has(n)||(this.controlledValues.set(n,l),!l&&!Object.is(this.state[n],r)&&super.setState({...this.state,[n]:r})),oe(()=>{l&&!Object.is(this.state[n],a)&&super.setState({...this.state,[n]:a})},[n,a,r,l])}set(n,a){this.controlledValues.get(n)!==!0&&super.set(n,a)}update(n){const a={...n};for(const r in a)if(Object.hasOwn(a,r)&&this.controlledValues.get(r)===!0){delete a[r];continue}super.update(a)}setState(n){const a={...n};for(const r in a)if(Object.hasOwn(a,r)&&this.controlledValues.get(r)===!0){delete a[r];continue}super.setState({...this.state,...a})}useContextCallback(n,a){m.useDebugValue(n);const r=ae(a??Pt);this.context[n]=r}useStateSetter(n){const a=m.useRef(void 0);return a.current===void 0&&(a.current=r=>{this.set(n,r)}),a.current}observe(n,a){let r;typeof n=="function"?r=n:r=this.selectors[n];let l=r(this.state);return a(l,l,this),this.subscribe(o=>{const i=r(o);if(!Object.is(l,i)){const s=l;l=i,a(i,s,this)}})}}const wO={open:B(e=>e.open),domReferenceElement:B(e=>e.domReferenceElement),referenceElement:B(e=>e.positionReference??e.referenceElement),floatingElement:B(e=>e.floatingElement),floatingId:B(e=>e.floatingId)};class rp extends Nc{constructor(n){const{nested:a,noEmit:r,onOpenChange:l,triggerElements:o,...i}=n;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:l,dataRef:{current:{}},events:ME(),nested:a,noEmit:r,triggerElements:o},wO);pe(this,"setOpen",(n,a)=>{var r,l;if((!n||!this.state.open||wE(a.event))&&(this.context.dataRef.current.openEvent=n?a.event:void 0),!this.context.noEmit){const o={open:n,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",o)}(l=(r=this.context).onOpenChange)==null||l.call(r,n,a)})}}function lp(e,t=!1,n=!1){const[a,r]=m.useState(e&&t?"idle":void 0),[l,o]=m.useState(e);return e&&!l&&(o(!0),r("starting")),!e&&l&&a!=="ending"&&!n&&r("ending"),!e&&!l&&a==="ending"&&r(void 0),oe(()=>{if(!e&&l&&a!=="ending"&&n){const i=zn.request(()=>{r("ending")});return()=>{zn.cancel(i)}}},[e,l,a,n]),oe(()=>{if(!e||t)return;const i=zn.request(()=>{r(void 0)});return()=>{zn.cancel(i)}},[t,e]),oe(()=>{if(!e||!t)return;e&&l&&a!=="idle"&&r("starting");const i=zn.request(()=>{r("idle")});return()=>{zn.cancel(i)}},[t,e,l,r,a]),m.useMemo(()=>({mounted:l,setMounted:o,transitionStatus:a}),[l,a])}function qE(e,t=!1,n=!0){const a=Xi();return ae((r,l=null)=>{a.cancel();const o=Er(e);o!=null&&(typeof o.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?r():a.request(()=>{function i(){o&&Promise.all(o.getAnimations().map(s=>s.finished)).then(()=>{l!=null&&l.aborted||zt.flushSync(r)}).catch(()=>{if(n){if(l!=null&&l.aborted)return;zt.flushSync(r)}else o.getAnimations().length>0&&o.getAnimations().some(s=>s.pending||s.playState!=="finished")&&i()})}t?a.request(i):i()}))})}function fo(e){const{enabled:t=!0,open:n,ref:a,onComplete:r}=e,l=wt(n),o=ae(r),i=qE(a,n);m.useEffect(()=>{t&&i(()=>{n===l.current&&o()})},[t,n,o,i,l])}function $E(e,t){const n=m.useRef(null);return m.useCallback(a=>{e!==void 0&&(n.current!==null&&(t.context.triggerElements.delete(n.current),n.current=null),a!==null&&(n.current=e,t.context.triggerElements.add(e,a)))},[t,e])}function op(e,t,n,a){const r=n.useState("isMountedByTrigger",e),l=$E(e,n),o=ae(i=>{l(i),i!==null&&n.select("open")&&n.select("activeTriggerId")==null&&n.update({activeTriggerId:e,activeTriggerElement:i,...a})});return oe(()=>{r&&n.update({activeTriggerElement:t.current,...a})},[r,n,t,...Object.values(a)]),{registerTrigger:o,isMountedByThisTrigger:r}}function ip(e){const t=e.useState("open");oe(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[a,r]=n.value;e.update({activeTriggerId:a,activeTriggerElement:r})}}},[t,e])}function sp(e,t,n){const{mounted:a,setMounted:r,transitionStatus:l}=lp(e);t.useSyncedValues({mounted:a,transitionStatus:l});const o=ae(()=>{var s,u;r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(u=(s=t.context).onOpenChangeComplete)==null||u.call(s,!1)}),i=t.useState("preventUnmountingOnClose");return fo({enabled:!i,open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:l}}class Qi{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const a=this.idMap.get(t);a!==n&&(a!==void 0&&this.elements.delete(a),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 up(){return new rp({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Qi,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function cp(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:up(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Fe,inactiveTriggerProps:Fe,popupProps:Fe}}const fp={open:B(e=>e.open),mounted:B(e=>e.mounted),transitionStatus:B(e=>e.transitionStatus),floatingRootContext:B(e=>e.floatingRootContext),preventUnmountingOnClose:B(e=>e.preventUnmountingOnClose),payload:B(e=>e.payload),activeTriggerId:B(e=>e.activeTriggerId),activeTriggerElement:B(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:B((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:B((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:B((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:B((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:B(e=>e.popupProps),popupElement:B(e=>e.popupElement),positionerElement:B(e=>e.positionerElement)};function RO(e){const{open:t=!1,onOpenChange:n,elements:a={}}=e,r=Qr(),l=Ea()!=null,o=Zt(()=>new rp({open:t,onOpenChange:n,referenceElement:a.reference??null,floatingElement:a.floating??null,triggerElements:a.triggers??new Qi,floatingId:r,nested:l,noEmit:e.noEmit||!1})).current;return oe(()=>{const i={open:t,floatingId:r};a.reference!==void 0&&(i.referenceElement=a.reference,i.domReferenceElement=je(a.reference)?a.reference:null),a.floating!==void 0&&(i.floatingElement=a.floating),o.update(i)},[t,r,a.reference,a.floating,o]),o.context.onOpenChange=n,o.context.nested=l,o.context.noEmit=e.noEmit||!1,o}function CO(e={}){const{nodeId:t,externalTree:n}=e,a=RO(e),r=e.rootContext||a,l={reference:r.useState("referenceElement"),floating:r.useState("floatingElement"),domReference:r.useState("domReferenceElement")},[o,i]=m.useState(null),s=m.useRef(null),u=hr(n);oe(()=>{l.domReference&&(s.current=l.domReference)},[l.domReference]);const c=S3({...e,elements:{...l,...o&&{reference:o}}}),f=m.useCallback(w=>{const C=je(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;i(C),c.refs.setReference(C)},[c.refs]),[d,h]=m.useState(null),[p,v]=m.useState(null);r.useSyncedValue("referenceElement",d),r.useSyncedValue("domReferenceElement",je(d)?d:null),r.useSyncedValue("floatingElement",p);const E=m.useCallback(w=>{(je(w)||w===null)&&(s.current=w,h(w)),(je(c.refs.reference.current)||c.refs.reference.current===null||w!==null&&!je(w))&&c.refs.setReference(w)},[c.refs,h]),g=m.useCallback(w=>{v(w),c.refs.setFloating(w)},[c.refs]),y=m.useMemo(()=>({...c.refs,setReference:E,setFloating:g,setPositionReference:f,domReference:s}),[c.refs,E,g,f]),S=m.useMemo(()=>({...c.elements,domReference:l.domReference}),[c.elements,l.domReference]),b=r.useState("open"),x=r.useState("floatingId"),R=m.useMemo(()=>({...c,dataRef:r.context.dataRef,open:b,onOpenChange:r.setOpen,events:r.context.events,floatingId:x,refs:y,elements:S,nodeId:t,rootStore:r}),[c,y,S,t,r,b,x]);return oe(()=>{r.context.dataRef.current.floatingContext=R;const w=u==null?void 0:u.nodesRef.current.find(C=>C.id===t);w&&(w.context=R)}),m.useMemo(()=>({...c,context:R,refs:y,elements:S,rootStore:r}),[c,y,S,R,r])}function dp(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:a=!1,onOpenChange:r}=e,l=Qr(),o=Ea()!=null,i=t.useState("open"),s=t.useState("activeTriggerElement"),u=t.useState(a?"popupElement":"positionerElement"),c=t.context.triggerElements,f=Zt(()=>new rp({open:i,referenceElement:s,floatingElement:u,triggerElements:c,onOpenChange:r,floatingId:l,nested:o,noEmit:n})).current;return oe(()=>{const d={open:i,floatingId:l,referenceElement:s,floatingElement:u};je(s)&&(d.domReferenceElement=s),f.update(d)},[i,l,s,u,f]),f.context.onOpenChange=r,f.context.nested=o,f.context.noEmit=n,f}const Kf=gM&≧function YE(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:a,dataRef:r}=n.context,{enabled:l=!0,visibleOnly:o=!0}=t,i=m.useRef(!1),s=Kt(),u=m.useRef(!0);m.useEffect(()=>{const f=n.select("domReferenceElement");if(!l)return;const d=dt(f);function h(){!n.select("open")&&Qe(f)&&f===Un(rt(f))&&(i.current=!0)}function p(){u.current=!0}function v(){u.current=!1}return d.addEventListener("blur",h),Kf&&(d.addEventListener("keydown",p,!0),d.addEventListener("pointerdown",v,!0)),()=>{d.removeEventListener("blur",h),Kf&&(d.removeEventListener("keydown",p,!0),d.removeEventListener("pointerdown",v,!0))}},[n,l]),m.useEffect(()=>{if(!l)return;function f(d){(d.reason===er||d.reason===_c)&&(i.current=!0)}return a.on("openchange",f),()=>{a.off("openchange",f)}},[a,l]);const c=m.useMemo(()=>({onMouseLeave(){i.current=!1},onFocus(f){if(i.current)return;const d=Rt(f.nativeEvent);if(o&&je(d)){if(Kf&&!f.relatedTarget){if(!u.current&&!Km(d))return}else if(!EM(d))return}n.setOpen(!0,Ce(Ai,f.nativeEvent,f.currentTarget))},onBlur(f){i.current=!1;const d=f.relatedTarget,h=f.nativeEvent,p=je(d)&&d.hasAttribute(Xl("focus-guard"))&&d.getAttribute("data-type")==="outside";s.start(0,()=>{var g;const v=n.select("domReferenceElement"),E=Un(v?v.ownerDocument:document);!d&&E===v||Oe((g=r.current.floatingContext)==null?void 0:g.refs.floating.current,E)||Oe(v,E)||p||n.context.triggerElements.hasElement(f.relatedTarget)||n.setOpen(!1,Ce(Ai,h))})}}),[r,n,o,s]);return m.useMemo(()=>l?{reference:c,trigger:c}:{},[l,c])}const yh=Xl("safe-polygon"),TO=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${SE}`;function MO(e){return e?!!e.closest(TO):!1}function GE(e){const t=m.useRef(void 0),n=m.useRef(!1),a=m.useRef(void 0),r=m.useRef(!0),l=m.useRef(!1),o=m.useRef(()=>{}),i=m.useRef(!1),s=Kt(),u=Kt(),c=m.useRef(void 0);return m.useMemo(()=>{const f=e.context.dataRef.current;return f.hoverInteractionState||(f.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:a,blockMouseMoveRef:r,performedPointerEventsMutationRef:l,unbindMouseMoveRef:o,restTimeoutPendingRef:i,openChangeTimeout:s,restTimeout:u,handleCloseOptionsRef:c}),f.hoverInteractionState},[e,t,n,a,r,l,o,i,s,u,c])}const OO=new Set(["click","mousedown"]);function ZE(e,t={}){const n="rootStore"in e?e.rootStore:e,a=n.useState("open"),r=n.useState("floatingElement"),l=n.useState("domReferenceElement"),{dataRef:o}=n.context,{enabled:i=!0,closeDelay:s=0,externalTree:u}=t,{pointerTypeRef:c,interactedInsideRef:f,handlerRef:d,performedPointerEventsMutationRef:h,unbindMouseMoveRef:p,restTimeoutPendingRef:v,openChangeTimeout:E,handleCloseOptionsRef:g}=GE(n),y=hr(u),S=Ea(),b=ae(()=>f.current?!0:o.current.openEvent?OO.has(o.current.openEvent.type):!1),x=ae(()=>{var k;const T=(k=o.current.openEvent)==null?void 0:k.type;return(T==null?void 0:T.includes("mouse"))&&T!=="mousedown"}),R=m.useCallback((T,k=!0)=>{const M=AO(s,c.current);M&&!d.current?E.start(M,()=>n.setOpen(!1,Ce(Dt,T))):k&&(E.clear(),n.setOpen(!1,Ce(Dt,T)))},[s,d,n,c,E]),w=ae(()=>{p.current(),d.current=void 0}),C=ae(()=>{if(h.current){const T=rt(r).body;T.style.pointerEvents="",T.removeAttribute(yh),h.current=!1}}),A=ae(T=>{const k=Rt(T);if(!MO(k)){f.current=!1;return}f.current=!0});oe(()=>{a||(c.current=void 0,v.current=!1,f.current=!1,w(),C())},[a,c,v,f,w,C]),m.useEffect(()=>()=>{w()},[w]),m.useEffect(()=>C,[C]),oe(()=>{var T,k,M;if(i&&a&&((T=g.current)!=null&&T.blockPointerEvents)&&x()&&je(l)&&r){h.current=!0;const L=rt(r).body;L.setAttribute(yh,"");const z=l,_=r,N=(M=(k=y==null?void 0:y.nodesRef.current.find(D=>D.id===S))==null?void 0:k.context)==null?void 0:M.elements.floating;return N&&(N.style.pointerEvents=""),L.style.pointerEvents="none",z.style.pointerEvents="auto",_.style.pointerEvents="auto",()=>{L.style.pointerEvents="",z.style.pointerEvents="",_.style.pointerEvents=""}}},[i,a,l,r,g,x,y,S,h]),m.useEffect(()=>{if(!i)return;function T(z){if(b()||!o.current.floatingContext||!n.select("open"))return;const _=n.context.triggerElements;z.relatedTarget&&_.hasElement(z.relatedTarget)||(C(),w(),b()||R(z))}function k(z){var _;E.clear(),C(),(_=d.current)==null||_.call(d,z),w()}function M(z){b()||R(z,!1)}const L=r;return L&&(L.addEventListener("mouseleave",T),L.addEventListener("mouseenter",k),L.addEventListener("mouseleave",M),L.addEventListener("pointerdown",A,!0)),()=>{L&&(L.removeEventListener("mouseleave",T),L.removeEventListener("mouseenter",k),L.removeEventListener("mouseleave",M),L.removeEventListener("pointerdown",A,!0))}})}function AO(e,t){return t&&!Pr(t)?0:typeof e=="function"?e():e}function Xf(e){return typeof e=="function"?e():e}const _O={current:null};function hp(e,t={}){var D;const n="rootStore"in e?e.rootStore:e,{dataRef:a,events:r}=n.context,{enabled:l=!0,delay:o=0,handleClose:i=null,mouseOnly:s=!1,restMs:u=0,move:c=!0,triggerElementRef:f=_O,externalTree:d,isActiveTrigger:h=!0}=t,p=hr(d),{pointerTypeRef:v,interactedInsideRef:E,handlerRef:g,blockMouseMoveRef:y,performedPointerEventsMutationRef:S,unbindMouseMoveRef:b,restTimeoutPendingRef:x,openChangeTimeout:R,restTimeout:w,handleCloseOptionsRef:C}=GE(n),A=wt(i),T=wt(o),k=wt(u);h&&(C.current=(D=A.current)==null?void 0:D.__options);const M=ae(()=>E.current?!0:a.current.openEvent?["click","mousedown"].includes(a.current.openEvent.type):!1),L=m.useCallback((O,H=!0)=>{const j=Ws(T.current,"close",v.current);j&&!g.current?R.start(j,()=>n.setOpen(!1,Ce(Dt,O))):H&&(R.clear(),n.setOpen(!1,Ce(Dt,O)))},[T,g,n,v,R]),z=ae(()=>{b.current(),g.current=void 0}),_=ae(()=>{if(S.current){const O=rt(n.select("domReferenceElement")).body;O.style.pointerEvents="",O.removeAttribute(yh),S.current=!1}});m.useEffect(()=>{if(!l)return;function O(H){H.open||(R.clear(),w.clear(),y.current=!0,x.current=!1)}return r.on("openchange",O),()=>{r.off("openchange",O)}},[l,r,R,w,y,x]);const N=ae(O=>{var Z;if(M()||!a.current.floatingContext)return;const H=n.context.triggerElements;if(O.relatedTarget&&H.hasElement(O.relatedTarget))return;const j=f.current;(Z=A.current)==null||Z.call(A,{...a.current.floatingContext,tree:p,x:O.clientX,y:O.clientY,onClose(){_(),z(),!M()&&j===n.select("domReferenceElement")&&L(O)}})(O)});return m.useEffect(()=>{if(!l)return;const O=f.current??(h?n.select("domReferenceElement"):null);if(!je(O))return;function H(q){if(R.clear(),y.current=!1,s&&!Pr(v.current)||Xf(k.current)>0&&!Ws(T.current,"open"))return;const P=Ws(T.current,"open",v.current),Q=n.select("domReferenceElement"),$=n.context.triggerElements,de=($.hasElement(q.target)||$.hasMatchingElement(he=>Oe(he,q.target)))&&(!Q||!Oe(Q,q.target)),K=q.currentTarget??null,F=!n.select("open")||de;P?R.start(P,()=>{F&&n.setOpen(!0,Ce(Dt,q,K))}):F&&n.setOpen(!0,Ce(Dt,q,K))}function j(q){if(M()){_();return}b.current();const P=n.select("domReferenceElement"),Q=rt(P);w.clear(),x.current=!1;const $=n.context.triggerElements;if(!(q.relatedTarget&&$.hasElement(q.relatedTarget))){if(A.current&&a.current.floatingContext){n.select("open")||R.clear();const de=f.current;g.current=A.current({...a.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){_(),z(),!M()&&de===n.select("domReferenceElement")&&L(q,!0)}});const K=g.current;K(q),Q.addEventListener("mousemove",K),b.current=()=>{Q.removeEventListener("mousemove",K)};return}(v.current!=="touch"||!Oe(n.select("floatingElement"),q.relatedTarget))&&L(q)}}function Z(q){N(q)}return n.select("open")&&O.addEventListener("mouseleave",Z),c&&O.addEventListener("mousemove",H,{once:!0}),O.addEventListener("mouseenter",H),O.addEventListener("mouseleave",j),()=>{O.removeEventListener("mouseleave",Z),c&&O.removeEventListener("mousemove",H),O.removeEventListener("mouseenter",H),O.removeEventListener("mouseleave",j)}},[z,_,y,a,T,L,n,l,A,N,h,M,s,c,v,k,w,x,R,f,p,b,g]),m.useMemo(()=>{function O(H){v.current=H.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(H){const{nativeEvent:j}=H,Z=H.currentTarget,q=n.select("domReferenceElement"),P=n.context.triggerElements,Q=n.select("open"),$=(P.hasElement(H.target)||P.hasMatchingElement(K=>Oe(K,H.target)))&&(!q||!Oe(q,H.target));if(s&&!Pr(v.current)||Q&&!$||Xf(k.current)===0||!$&&x.current&&H.movementX**2+H.movementY**2<2)return;w.clear();function de(){!y.current&&(!Q||$)&&n.setOpen(!0,Ce(Dt,j,Z))}v.current==="touch"?zt.flushSync(()=>{de()}):$&&Q?de():(x.current=!0,w.start(Xf(k.current),de))}}},[y,s,n,v,k,w,x])}function ho(e=[]){const t=e.map(u=>u==null?void 0:u.reference),n=e.map(u=>u==null?void 0:u.floating),a=e.map(u=>u==null?void 0:u.item),r=e.map(u=>u==null?void 0:u.trigger),l=m.useCallback(u=>_s(u,e,"reference"),t),o=m.useCallback(u=>_s(u,e,"floating"),n),i=m.useCallback(u=>_s(u,e,"item"),a),s=m.useCallback(u=>_s(u,e,"trigger"),r);return m.useMemo(()=>({getReferenceProps:l,getFloatingProps:o,getItemProps:i,getTriggerProps:s}),[l,o,i,s])}function _s(e,t,n){var o;const a=new Map,r=n==="item",l={};n==="floating"&&(l.tabIndex=-1,l[dh]="");for(const i in e)r&&e&&(i===vE||i===bE)||(l[i]=e[i]);for(let i=0;i<t.length;i+=1){let s;const u=(o=t[i])==null?void 0:o[n];typeof u=="function"?s=e?u(e):null:s=u,s&&h0(l,s,r,a)}return h0(l,e,r,a),l}function h0(e,t,n,a){var r;for(const l in t){const o=t[l];n&&(l===vE||l===bE)||(l.startsWith("on")?(a.has(l)||a.set(l,[]),typeof o=="function"&&((r=a.get(l))==null||r.push(o),e[l]=(...i)=>{var s;return(s=a.get(l))==null?void 0:s.map(u=>u(...i)).find(u=>u!==void 0)})):e[l]=o)}}const NO="Escape";function kc(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ns(e,t){return kc(t,e===Zm||e===Zi,e===Ja||e===Wa)}function Qf(e,t,n){return kc(t,e===Zi,n?e===Ja:e===Wa)||e==="Enter"||e===" "||e===""}function kO(e,t,n){return kc(t,n?e===Ja:e===Wa,e===Zi)}function DO(e,t,n,a){const r=n?e===Wa:e===Ja,l=e===Zm;return t==="both"||t==="horizontal"&&a&&a>1?e===NO:kc(t,r,l)}function LO(e,t){const n="rootStore"in e?e.rootStore:e,a=n.useState("open"),r=n.useState("floatingElement"),l=n.useState("domReferenceElement"),o=n.context.dataRef,{listRef:i,activeIndex:s,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:d=!1,loopFocus:h=!1,nested:p=!1,rtl:v=!1,virtual:E=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:S=!0,disabledIndices:b=void 0,orientation:x="vertical",parentOrientation:R,cols:w=1,scrollItemIntoView:C=!0,itemSizes:A,dense:T=!1,id:k,resetOnPointerLeave:M=!0,externalTree:L}=t,z=Qu(r),_=wt(z),N=Ea(),D=hr(L);oe(()=>{o.current.orientation=x},[o,x]);const O=hh(l),H=m.useRef(g),j=m.useRef(f??-1),Z=m.useRef(null),q=m.useRef(!0),P=ae(G=>{u(j.current===-1?null:j.current,G)}),Q=m.useRef(P),$=m.useRef(!!r),de=m.useRef(a),K=m.useRef(!1),F=m.useRef(!1),he=wt(b),ge=wt(a),V=wt(C),J=wt(f),te=wt(M),we=ae(()=>{function G(le){E?D==null||D.events.emit("virtualfocus",le):eu(le,{sync:K.current,preventScroll:!0})}const W=i.current[j.current],se=F.current;W&&G(W),(K.current?le=>le():requestAnimationFrame)(()=>{var me;const le=i.current[j.current]||W;if(!le)return;W||G(le);const Ee=V.current;Ee&&Y&&(se||!q.current)&&((me=le.scrollIntoView)==null||me.call(le,typeof Ee=="boolean"?{block:"nearest",inline:"nearest"}:Ee))})});oe(()=>{c&&(a&&r?(j.current=f??-1,H.current&&f!=null&&(F.current=!0,P())):$.current&&(j.current=-1,Q.current()))},[c,a,r,f,P]),oe(()=>{if(c){if(!a){K.current=!1;return}if(r)if(s==null){if(K.current=!1,J.current!=null)return;if($.current&&(j.current=-1,we()),(!de.current||!$.current)&&H.current&&(Z.current!=null||H.current===!0&&Z.current==null)){let G=0;const W=()=>{i.current[0]==null?(G<2&&(G?requestAnimationFrame:queueMicrotask)(W),G+=1):(j.current=Z.current==null||Qf(Z.current,x,v)||p?Yf(i):a0(i),Z.current=null,P())};W()}}else li(i,s)||(j.current=s,we(),F.current=!1)}},[c,a,r,s,J,p,i,x,v,P,we,he]),oe(()=>{var Ee,me;if(!c||r||!D||E||!$.current)return;const G=D.nodesRef.current,W=(me=(Ee=G.find(Ne=>Ne.id===N))==null?void 0:Ee.context)==null?void 0:me.elements.floating,se=Un(rt(r)),le=G.some(Ne=>Ne.context&&Oe(Ne.context.elements.floating,se));W&&!le&&q.current&&W.focus({preventScroll:!0})},[c,r,D,N,E]),oe(()=>{Q.current=P,de.current=a,$.current=!!r}),oe(()=>{a||(Z.current=null,H.current=g)},[a,g]);const ne=s!=null,Y=m.useMemo(()=>{function G(W){if(!ge.current)return;const se=i.current.indexOf(W.currentTarget);se!==-1&&j.current!==se&&(j.current=se,P(W))}return{onFocus(W){K.current=!0,G(W)},onClick:({currentTarget:W})=>W.focus({preventScroll:!0}),onMouseMove(W){K.current=!0,F.current=!1,y&&G(W)},onPointerLeave(W){var le;if(!ge.current||!q.current||W.pointerType==="touch")return;K.current=!0;const se=W.relatedTarget;!y||i.current.includes(se)||te.current&&(j.current=-1,P(W),E||((le=_.current)==null||le.focus({preventScroll:!0})))}}},[ge,_,y,i,P,te,E]),X=m.useCallback(()=>{var G,W,se;return R??((se=(W=(G=D==null?void 0:D.nodesRef.current.find(le=>le.id===N))==null?void 0:G.context)==null?void 0:W.dataRef)==null?void 0:se.current.orientation)},[N,D,R]),re=ae(G=>{if(q.current=!1,K.current=!0,G.which===229||!ge.current&&G.currentTarget===_.current)return;if(p&&DO(G.key,x,v,w)){Ns(G.key,X())||Nt(G),n.setOpen(!1,Ce(Js,G.nativeEvent)),Qe(l)&&(E?D==null||D.events.emit("virtualfocus",l):l.focus());return}const W=j.current,se=Yf(i,b),le=a0(i,b);if(O||(G.key==="Home"&&(Nt(G),j.current=se,P(G)),G.key==="End"&&(Nt(G),j.current=le,P(G))),w>1){const Ee=A||Array.from({length:i.current.length},()=>({width:1,height:1})),me=RM(Ee,w,T),Ne=me.findIndex($e=>$e!=null&&!oi(i,$e,b)),nt=me.reduce(($e,mt,ve)=>mt!=null&&!oi(i,mt,b)?ve:$e,-1),At=me[wM({current:me.map($e=>$e!=null?i.current[$e]:null)},{event:G,orientation:x,loopFocus:h,rtl:v,cols:w,disabledIndices:TM([...(typeof b!="function"?b:null)||i.current.map(($e,mt)=>oi(i,mt,b)?mt:void 0),void 0],me),minIndex:Ne,maxIndex:nt,prevIndex:CM(j.current>le?se:j.current,Ee,me,w,G.key===Zi?"bl":G.key===(v?Ja:Wa)?"tr":"tl"),stopEvent:!0})];if(At!=null&&(j.current=At,P(G)),x==="both")return}if(Ns(G.key,x)){if(Nt(G),a&&!E&&Un(G.currentTarget.ownerDocument)===G.currentTarget){j.current=Qf(G.key,x,v)?se:le,P(G);return}Qf(G.key,x,v)?h?W>=le?d&&W!==i.current.length?j.current=-1:(K.current=!1,j.current=se):j.current=_t(i,{startingIndex:W,disabledIndices:b}):j.current=Math.min(le,_t(i,{startingIndex:W,disabledIndices:b})):h?W<=se?d&&W!==-1?j.current=i.current.length:(K.current=!1,j.current=le):j.current=_t(i,{startingIndex:W,decrement:!0,disabledIndices:b}):j.current=Math.max(se,_t(i,{startingIndex:W,decrement:!0,disabledIndices:b})),li(i,j.current)&&(j.current=-1),P(G)}}),fe=m.useMemo(()=>E&&a&&ne&&{"aria-activedescendant":`${k}-${s}`},[E,a,ne,k,s]),De=m.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...O?{}:fe,onKeyDown(G){if(G.key==="Tab"&&G.shiftKey&&a&&!E){const W=Rt(G.nativeEvent);if(W&&!Oe(_.current,W))return;Nt(G),n.setOpen(!1,Ce(Kl,G.nativeEvent)),Qe(l)&&l.focus();return}re(G)},onPointerMove(){q.current=!0}}),[fe,re,_,x,O,n,a,E,l]),ie=m.useMemo(()=>{function G(se){g==="auto"&&EE(se.nativeEvent)&&(H.current=!E)}function W(se){H.current=g,g==="auto"&&xE(se.nativeEvent)&&(H.current=!0)}return{onKeyDown(se){const le=n.select("open");q.current=!1;const Ee=se.key.startsWith("Arrow"),me=kO(se.key,X(),v),Ne=Ns(se.key,x),nt=(p?me:Ne)||se.key==="Enter"||se.key.trim()==="";if(E&&le)return re(se);if(!(!le&&!S&&Ee)){if(nt){const At=Ns(se.key,X());Z.current=p&&At?null:se.key}if(p){me&&(Nt(se),le?(j.current=Yf(i,he.current),P(se)):n.setOpen(!0,Ce(Js,se.nativeEvent,se.currentTarget)));return}Ne&&(J.current!=null&&(j.current=J.current),Nt(se),!le&&S?n.setOpen(!0,Ce(Js,se.nativeEvent,se.currentTarget)):re(se),le&&P(se))}},onFocus(se){n.select("open")&&!E&&(j.current=-1,P(se))},onPointerDown:W,onPointerEnter:W,onMouseDown:G,onClick:G}},[re,he,g,i,p,P,n,S,x,X,v,J,E]),ee=m.useMemo(()=>({...fe,...ie}),[fe,ie]);return m.useMemo(()=>c?{reference:ee,floating:De,item:Y,trigger:ie}:{},[c,ee,De,ie,Y])}const zO=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function KE(e,t={}){const n="rootStore"in e?e.rootStore:e,a=n.useState("open"),r=n.useState("floatingId"),l=n.useState("domReferenceElement"),o=n.useState("floatingElement"),{enabled:i=!0,role:s="dialog"}=t,u=Qr(),c=(l==null?void 0:l.id)||u,f=m.useMemo(()=>{var y;return((y=Qu(o))==null?void 0:y.id)||r},[o,r]),d=zO.get(s)??s,h=Ea()!=null,p=m.useMemo(()=>d==="tooltip"||s==="label"?Fe:{"aria-haspopup":d==="alertdialog"?"dialog":d,"aria-expanded":"false",...d==="listbox"&&{role:"combobox"},...d==="menu"&&h&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[d,h,s]),v=m.useMemo(()=>d==="tooltip"||s==="label"?{[`aria-${s==="label"?"labelledby":"describedby"}`]:a?f:void 0}:{...p,"aria-expanded":a?"true":"false","aria-controls":a?f:void 0,...d==="menu"&&{id:c}},[d,f,a,c,s,p]),E=m.useMemo(()=>{const y={id:f,...d&&{role:d}};return d==="tooltip"||s==="label"?y:{...y,...d==="menu"&&{"aria-labelledby":c}}},[d,f,c,s]),g=m.useCallback(({active:y,selected:S})=>{const b={role:"option",...y&&{id:`${f}-fui-option`}};switch(s){case"select":case"combobox":return{...b,"aria-selected":S}}return{}},[f,s]);return m.useMemo(()=>i?{reference:v,floating:E,item:g,trigger:p}:{},[i,v,E,p,g])}function UO(e,t){const n="rootStore"in e?e.rootStore:e,a=n.useState("open"),r=n.context.dataRef,{listRef:l,activeIndex:o,onMatch:i,onTypingChange:s,enabled:u=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:d=Zl,selectedIndex:h=null}=t,p=Kt(),v=m.useRef(""),E=m.useRef(h??o??-1),g=m.useRef(null);oe(()=>{a&&(p.clear(),g.current=null,v.current="")},[a,p]),oe(()=>{a&&v.current===""&&(E.current=h??o??-1)},[a,h,o]);const y=ae(R=>{R?r.current.typing||(r.current.typing=R,s==null||s(R)):r.current.typing&&(r.current.typing=R,s==null||s(R))}),S=ae(R=>{function w(k,M,L){const z=c?c(M,L):M.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(L.toLocaleLowerCase()))===0);return z?k.indexOf(z):-1}const C=l.current;if(v.current.length>0&&v.current[0]!==" "&&(w(C,C,v.current)===-1?y(!1):R.key===" "&&Nt(R)),C==null||d.includes(R.key)||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;a&&R.key!==" "&&(Nt(R),y(!0)),C.every(k=>{var M,L;return k?((M=k[0])==null?void 0:M.toLocaleLowerCase())!==((L=k[1])==null?void 0:L.toLocaleLowerCase()):!0})&&v.current===R.key&&(v.current="",E.current=g.current),v.current+=R.key,p.start(f,()=>{v.current="",E.current=g.current,y(!1)});const A=E.current,T=w(C,[...C.slice((A||0)+1),...C.slice(0,(A||0)+1)],v.current);T!==-1?(i==null||i(T),g.current=T):R.key!==" "&&(v.current="",y(!1))}),b=m.useMemo(()=>({onKeyDown:S}),[S]),x=m.useMemo(()=>({onKeyDown:S,onKeyUp(R){R.key===" "&&y(!1)}}),[S,y]);return m.useMemo(()=>u?{reference:b,floating:x}:{},[u,b,x])}function m0(e,t){const[n,a]=e;let r=!1;const l=t.length;for(let o=0,i=l-1;o<l;i=o++){const[s,u]=t[o]||[0,0],[c,f]=t[i]||[0,0];u>=a!=f>=a&&n<=(c-s)*(a-u)/(f-u)+s&&(r=!r)}return r}function jO(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function mp(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:a=!0}=e,r=new or;let l=!1,o=null,i=null,s=typeof performance<"u"?performance.now():0;function u(f,d){const h=performance.now(),p=h-s;if(o===null||i===null||p===0)return o=f,i=d,s=h,null;const v=f-o,E=d-i,g=Math.sqrt(v*v+E*E)/p;return o=f,i=d,s=h,g}const c=({x:f,y:d,placement:h,elements:p,onClose:v,nodeId:E,tree:g})=>function(y){function S(){r.clear(),v()}if(r.clear(),!p.domReference||!p.floating||h==null||f==null||d==null)return;const{clientX:b,clientY:x}=y,R=[b,x],w=Rt(y),C=y.type==="mouseleave",A=Oe(p.floating,w),T=Oe(p.domReference,w),k=p.domReference.getBoundingClientRect(),M=p.floating.getBoundingClientRect(),L=h.split("-")[0],z=f>M.right-M.width/2,_=d>M.bottom-M.height/2,N=jO(R,k),D=M.width>k.width,O=M.height>k.height,H=(D?k:M).left,j=(D?k:M).right,Z=(O?k:M).top,q=(O?k:M).bottom;if(A&&(l=!0,!C))return;if(T&&(l=!1),T&&!C){l=!0;return}if(C&&je(y.relatedTarget)&&Oe(p.floating,y.relatedTarget)||g&&kr(g.nodesRef.current,E).some(({context:$})=>$==null?void 0:$.open))return;if(L==="top"&&d>=k.bottom-1||L==="bottom"&&d<=k.top+1||L==="left"&&f>=k.right-1||L==="right"&&f<=k.left+1)return S();let P=[];switch(L){case"top":P=[[H,k.top+1],[H,M.bottom-1],[j,M.bottom-1],[j,k.top+1]];break;case"bottom":P=[[H,M.top+1],[H,k.bottom-1],[j,k.bottom-1],[j,M.top+1]];break;case"left":P=[[M.right-1,q],[M.right-1,Z],[k.left+1,Z],[k.left+1,q]];break;case"right":P=[[k.right-1,q],[k.right-1,Z],[M.left+1,Z],[M.left+1,q]];break}function Q([$,de]){switch(L){case"top":{const K=[D?$+t/2:z?$+t*4:$-t*4,de+t+1],F=[D?$-t/2:z?$+t*4:$-t*4,de+t+1],he=[[M.left,z||D?M.bottom-t:M.top],[M.right,z?D?M.bottom-t:M.top:M.bottom-t]];return[K,F,...he]}case"bottom":{const K=[D?$+t/2:z?$+t*4:$-t*4,de-t],F=[D?$-t/2:z?$+t*4:$-t*4,de-t],he=[[M.left,z||D?M.top+t:M.bottom],[M.right,z?D?M.top+t:M.bottom:M.top+t]];return[K,F,...he]}case"left":{const K=[$+t+1,O?de+t/2:_?de+t*4:de-t*4],F=[$+t+1,O?de-t/2:_?de+t*4:de-t*4];return[[_||O?M.right-t:M.left,M.top],[_?O?M.right-t:M.left:M.right-t,M.bottom],K,F]}case"right":{const K=[$-t,O?de+t/2:_?de+t*4:de-t*4],F=[$-t,O?de-t/2:_?de+t*4:de-t*4],he=[[_||O?M.left+t:M.right,M.top],[_?O?M.left+t:M.right:M.left+t,M.bottom]];return[K,F,...he]}default:return[]}}if(!m0([b,x],P)){if(l&&!N)return S();if(!C&&a){const $=u(y.clientX,y.clientY);if($!==null&&$<.1)return S()}m0([b,x],Q([f,d]))?!l&&a&&r.start(40,S):S()}};return c.__options={blockPointerEvents:n},c}const HO={...fp,disabled:B(e=>e.disabled),instantType:B(e=>e.instantType),isInstantPhase:B(e=>e.isInstantPhase),trackCursorAxis:B(e=>e.trackCursorAxis),disableHoverablePopup:B(e=>e.disableHoverablePopup),lastOpenChangeReason:B(e=>e.openChangeReason),closeDelay:B(e=>e.closeDelay)};class pp extends Nc{constructor(n){super({...BO(),...n},{popupRef:m.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Qi},HO);pe(this,"setOpen",(n,a)=>{var u,c;const r=a.reason,l=r===Dt,o=n&&r===Ai,i=!n&&(r===er||r===_c);if(a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(c=(u=this.context).onOpenChange)==null||c.call(u,n,a),a.isCanceled)return;const s=()=>{var h;const f={open:n,openChangeReason:r};o?f.instantType="focus":i?f.instantType="dismiss":r===Dt&&(f.instantType=void 0);const d=((h=a.trigger)==null?void 0:h.id)??null;(d||n)&&(f.activeTriggerId=d,f.activeTriggerElement=a.trigger??null),this.update(f)};l?zt.flushSync(s):s()})}static useStore(n,a){const r=Zt(()=>n??new pp(a)).current,l=dp({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=l,r}}function BO(){return{...cp(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0}}function VO(e){const{disabled:t=!1,defaultOpen:n=!1,open:a,disableHoverablePopup:r=!1,trackCursorAxis:l="none",actionsRef:o,onOpenChange:i,onOpenChangeComplete:s,handle:u,triggerId:c,defaultTriggerId:f=null,children:d}=e,h=pp.useStore(u==null?void 0:u.store,{open:a??n,activeTriggerId:c!==void 0?c:f});h.useControlledProp("open",a,n),h.useControlledProp("activeTriggerId",c,f),h.useContextCallback("onOpenChange",i),h.useContextCallback("onOpenChangeComplete",s);const p=h.useState("open"),v=h.useState("activeTriggerId"),E=h.useState("payload");h.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:r});const g=!t&&p;oe(()=>{p&&t&&h.setOpen(!1,Ce(IM))},[p,t,h]),h.useSyncedValue("disabled",t),ip(h);const{forceUnmount:y,transitionStatus:S}=sp(g,h),b=h.useState("isInstantPhase"),x=h.useState("instantType"),R=h.useState("lastOpenChangeReason"),w=m.useRef(null);oe(()=>{S==="ending"&&R===Ki||S!=="ending"&&b?(x!=="delay"&&(w.current=x),h.set("instantType","delay")):w.current!==null&&(h.set("instantType",w.current),w.current=null)},[S,b,R,x,h]),oe(()=>{g&&v==null&&h.set("payload",void 0)},[h,v,g]);const C=m.useCallback(()=>{h.setOpen(!1,IO(h,Jm))},[h]);m.useImperativeHandle(o,()=>({unmount:y,close:C}),[y,C]);const A=h.useState("floatingRootContext"),T=YE(A,{enabled:!t}),k=ap(A,{enabled:!t,referencePress:!0}),M=pO(A,{enabled:!t&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:L,getFloatingProps:z,getTriggerProps:_}=ho([T,k,M]),N=m.useMemo(()=>L(),[L]),D=m.useMemo(()=>_(),[_]),O=m.useMemo(()=>z(),[z]);return h.useSyncedValues({floatingRootContext:A,activeTriggerProps:N,inactiveTriggerProps:D,popupProps:O}),U.jsx(dE.Provider,{value:h,children:typeof d=="function"?d({payload:E}):d})}function IO(e,t){const n=Ce(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}let Fl=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const PO={[Fl.startingStyle]:""},qO={[Fl.endingStyle]:""},mo={transitionStatus(e){return e==="starting"?PO:e==="ending"?qO:null}};let kn=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fl.startingStyle]="startingStyle",e[e.endingStyle=Fl.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e}({}),vh=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const $O={[vh.popupOpen]:""},YO={[vh.popupOpen]:"",[vh.pressed]:""},GO={[kn.open]:""},ZO={[kn.closed]:""},KO={[kn.anchorHidden]:""},Dc={open(e){return e?$O:null}},_i={open(e){return e?YO:null}},it={open(e){return e?GO:ZO},anchorHidden(e){return e?KO:null}};function ht(e){return Qr(e,"base-ui")}const XO=m.createContext(void 0);function QO(){return m.useContext(XO)}const FO=600,JO=m.forwardRef(function(e,t){const{className:n,render:a,handle:r,payload:l,disabled:o,delay:i,closeDelay:s,id:u,...c}=e,f=Gi(!0),d=(r==null?void 0:r.store)??f;if(!d)throw new Error(Je(82));const h=ht(u),p=d.useState("isTriggerActive",h),v=d.useState("floatingRootContext"),E=d.useState("isOpenedByTrigger",h),g=m.useRef(null),y=i??FO,S=s??0,{registerTrigger:b,isMountedByThisTrigger:x}=op(h,g,d,{payload:l,closeDelay:S}),R=QO(),{delayRef:w,isInstantPhase:C,hasProvider:A}=qM(v,{open:E});d.useSyncedValue("isInstantPhase",C);const T=d.useState("disabled"),k=o??T,M=d.useState("trackCursorAxis"),L=d.useState("disableHoverablePopup"),z=hp(v,{enabled:!k,mouseOnly:!0,move:!1,handleClose:!L&&M!=="both"?mp():null,restMs(){const D=R==null?void 0:R.delay,O=typeof w.current=="object"?w.current.open:void 0;let H=y;return A&&(O!==0?H=i??D??y:H=0),H},delay(){const D=typeof w.current=="object"?w.current.close:void 0;let O=S;return s==null&&A&&(O=D),{close:O}},triggerElementRef:g,isActiveTrigger:p}),_=m.useMemo(()=>({open:E}),[E]),N=d.useState("triggerProps",x);return ke("button",e,{state:_,ref:[t,b,g],props:[z,N,{id:h},c],stateAttributesMapping:Dc})}),XE=m.createContext(void 0);function WO(){const e=m.useContext(XE);if(e===void 0)throw new Error(Je(70));return e}const eA=m.forwardRef(function(e,t){const{children:n,container:a,className:r,render:l,...o}=e,{portalNode:i,portalSubtree:s}=VE({container:a,ref:t,componentProps:e,elementProps:o});return!s&&!i?null:U.jsxs(m.Fragment,{children:[s,i&&zt.createPortal(n,i)]})}),tA=m.forwardRef(function(e,t){const{keepMounted:n=!1,...a}=e;return Gi().useState("mounted")||n?U.jsx(XE.Provider,{value:n,children:U.jsx(eA,{ref:t,...a})}):null}),QE=m.createContext(void 0);function FE(){const e=m.useContext(QE);if(e===void 0)throw new Error(Je(71));return e}const nA=m.createContext(void 0);function gp(){var e;return((e=m.useContext(nA))==null?void 0:e.direction)??"ltr"}const aA=e=>({name:"arrow",options:e,async fn(t){var H,j;const{x:n,y:a,placement:r,rects:l,platform:o,elements:i,middlewareData:s}=t,{element:u,padding:c=0,offsetParent:f="real"}=ya(e,t)||{};if(u==null)return{};const d=ZS(c),h={x:n,y:a},p=Ym(r),v=$m(p),E=await o.getDimensions(u),g=p==="y",y=g?"top":"left",S=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=l.reference[v]+l.reference[p]-h[p]-l.floating[v],R=h[p]-l.reference[p],w=f==="real"?await((H=o.getOffsetParent)==null?void 0:H.call(o,u)):i.floating;let C=i.floating[b]||l.floating[v];(!C||!await((j=o.isElement)==null?void 0:j.call(o,w)))&&(C=i.floating[b]||l.floating[v]);const A=x/2-R/2,T=C/2-E[v]/2-1,k=Math.min(d[y],T),M=Math.min(d[S],T),L=k,z=C-E[v]-M,_=C/2-E[v]/2+A,N=ih(L,_,z),D=!s.arrow&&dr(r)!=null&&_!==N&&l.reference[v]/2-(_<L?k:M)-E[v]/2<0,O=D?_<L?_-L:_-z:0;return{[p]:h[p]+O,data:{[p]:N,centerOffset:_-N-O,...D&&{alignmentOffset:O}},reset:D}}}),rA=(e,t)=>({...aA(e),options:[e,t]}),lA={name:"hide",async fn(e){var o;const{width:t,height:n,x:a,y:r}=e.rects.reference,l=t===0&&n===0&&a===0&&r===0;return{data:{referenceHidden:((o=(await T3().fn(e)).data)==null?void 0:o.referenceHidden)||l}}}},nu={sideX:"left",sideY:"top"},oA={name:"adaptiveOrigin",async fn(e){var g,y;const{x:t,y:n,rects:{floating:a},elements:{floating:r},platform:l,strategy:o,placement:i}=e,s=dt(r),u=s.getComputedStyle(r);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:n,data:nu};const c=await((g=l.getOffsetParent)==null?void 0:g.call(l,r));let f={width:0,height:0};if(o==="fixed"&&(s!=null&&s.visualViewport))f={width:s.visualViewport.width,height:s.visualViewport.height};else if(c===s){const S=va(r);f={width:S.documentElement.clientWidth,height:S.documentElement.clientHeight}}else await((y=l.isElement)==null?void 0:y.call(l,c))&&(f=await l.getDimensions(c));const d=$t(i);let h=t,p=n;d==="left"&&(h=f.width-(t+a.width)),d==="top"&&(p=f.height-(n+a.height));const v=d==="left"?"right":nu.sideX,E=d==="top"?"bottom":nu.sideY;return{x:h,y:p,data:{sideX:v,sideY:E}}}};function JE(e,t,n){const a=e==="inline-start"||e==="inline-end";return{top:"top",right:a?n?"inline-start":"inline-end":"right",bottom:"bottom",left:a?n?"inline-end":"inline-start":"left"}[t]}function p0(e,t,n){const{rects:a,placement:r}=e;return{side:JE(t,$t(r),n),align:dr(r)||"center",anchor:{width:a.reference.width,height:a.reference.height},positioner:{width:a.floating.width,height:a.floating.height}}}function WE(e){var ve,Ue;const{anchor:t,positionMethod:n="absolute",side:a="bottom",sideOffset:r=0,align:l="center",alignOffset:o=0,collisionBoundary:i,collisionPadding:s=5,sticky:u=!1,arrowPadding:c=5,disableAnchorTracking:f=!1,keepMounted:d=!1,floatingRootContext:h,mounted:p,collisionAvoidance:v,shiftCrossAxis:E=!1,nodeId:g,adaptiveOrigin:y,lazyFlip:S=!1,externalTree:b}=e,[x,R]=m.useState(null);!p&&x!==null&&R(null);const w=v.side||"flip",C=v.align||"flip",A=v.fallbackAxisSide||"end",T=typeof t=="function"?t:void 0,k=ae(T),M=T?k:t,L=wt(t),z=gp()==="rtl",_=x||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":z?"left":"right","inline-start":z?"right":"left"}[a],N=l==="center"?_:`${_}-${l}`;let D=s;const O=1,H=a==="bottom"?O:0,j=a==="top"?O:0,Z=a==="right"?O:0,q=a==="left"?O:0;typeof D=="number"?D={top:D+H,right:D+q,bottom:D+j,left:D+Z}:D&&(D={top:(D.top||0)+H,right:(D.right||0)+q,bottom:(D.bottom||0)+j,left:(D.left||0)+Z});const P={boundary:i==="clipping-ancestors"?"clippingAncestors":i,padding:D},Q=m.useRef(null),$=wt(r),de=wt(o),K=[E3(xe=>{const pt=p0(xe,a,z),We=typeof $.current=="function"?$.current(pt):$.current,On=typeof de.current=="function"?de.current(pt):de.current;return{mainAxis:We,crossAxis:On,alignmentAxis:On}},[typeof r!="function"?r:0,typeof o!="function"?o:0,z,a])],F=C==="none"&&w!=="shift",he=!F&&(u||E||w==="shift"),ge=w==="none"?null:R3({...P,padding:{top:D.top+O,right:D.right+O,bottom:D.bottom+O,left:D.left+O},mainAxis:!E&&w==="flip",crossAxis:C==="flip"?"alignment":!1,fallbackAxisSideDirection:A}),V=F?null:x3(xe=>{const pt=va(xe.elements.floating).documentElement;return{...P,rootBoundary:E?{x:0,y:0,width:pt.clientWidth,height:pt.clientHeight}:void 0,mainAxis:C!=="none",crossAxis:he,limiter:u||E?void 0:w3(We=>{if(!Q.current)return{};const{width:On,height:wa}=Q.current.getBoundingClientRect(),Kn=wn($t(We.placement)),dn=Kn==="y"?On:wa,Fr=Kn==="y"?D.left+D.right:D.top+D.bottom;return{offset:dn/2+Fr/2}})}},[P,u,E,D,C]);w==="shift"||C==="shift"||l==="center"?K.push(V,ge):K.push(ge,V),K.push(C3({...P,apply({elements:{floating:xe},rects:{reference:pt},availableWidth:We,availableHeight:On}){Object.entries({"--available-width":`${We}px`,"--available-height":`${On}px`,"--anchor-width":`${pt.width}px`,"--anchor-height":`${pt.height}px`}).forEach(([wa,Kn])=>{xe.style.setProperty(wa,Kn)})}}),rA(()=>({element:Q.current||document.createElement("div"),padding:c,offsetParent:"floating"}),[c]),{name:"transformOrigin",fn(xe){var Tp,Mp,Op;const{elements:pt,middlewareData:We,placement:On,rects:wa,y:Kn}=xe,dn=$t(On),Fr=wn(dn),Xn=Q.current,Hx=((Tp=We.arrow)==null?void 0:Tp.x)||0,Bx=((Mp=We.arrow)==null?void 0:Mp.y)||0,Vx=(Xn==null?void 0:Xn.clientWidth)||0,Ix=(Xn==null?void 0:Xn.clientHeight)||0,Bc=Hx+Vx/2,Cp=Bx+Ix/2,Px=Math.abs(((Op=We.shift)==null?void 0:Op.y)||0),qx=wa.reference.height/2,go=typeof r=="function"?r(p0(xe,a,z)):r,$x=Px>go,Yx={top:`${Bc}px calc(100% + ${go}px)`,bottom:`${Bc}px ${-go}px`,left:`calc(100% + ${go}px) ${Cp}px`,right:`${-go}px ${Cp}px`}[dn],Gx=`${Bc}px ${wa.reference.y+qx-Kn}px`;return pt.floating.style.setProperty("--transform-origin",he&&Fr==="y"&&$x?Gx:Yx),{}}},lA,y),oe(()=>{!p&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[p,h]);const J=m.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:te,elements:we,x:ne,y:Y,middlewareData:X,update:re,placement:fe,context:De,isPositioned:ie,floatingStyles:ee}=CO({rootContext:h,placement:N,middleware:K,strategy:n,whileElementsMounted:d?void 0:(...xe)=>$y(...xe,J),nodeId:g,externalTree:b}),{sideX:G,sideY:W}=X.adaptiveOrigin||nu,se=ie?n:"fixed",le=m.useMemo(()=>y?{position:se,[G]:ne,[W]:Y}:{position:se,...ee},[y,se,G,ne,W,Y,ee]),Ee=m.useRef(null);oe(()=>{if(!p)return;const xe=L.current,pt=typeof xe=="function"?xe():xe,We=(g0(pt)?pt.current:pt)||null||null;We!==Ee.current&&(te.setPositionReference(We),Ee.current=We)},[p,te,M,L]),m.useEffect(()=>{if(!p)return;const xe=L.current;typeof xe!="function"&&g0(xe)&&xe.current!==Ee.current&&(te.setPositionReference(xe.current),Ee.current=xe.current)},[p,te,M,L]),m.useEffect(()=>{if(d&&p&&we.domReference&&we.floating)return $y(we.domReference,we.floating,re,J)},[d,p,we,re,J]);const me=$t(fe),Ne=JE(a,me,z),nt=dr(fe)||"center",At=!!((ve=X.hide)!=null&&ve.referenceHidden);oe(()=>{S&&p&&ie&&R(me)},[S,p,ie,me]);const $e=m.useMemo(()=>{var xe,pt;return{position:"absolute",top:(xe=X.arrow)==null?void 0:xe.y,left:(pt=X.arrow)==null?void 0:pt.x}},[X.arrow]),mt=((Ue=X.arrow)==null?void 0:Ue.centerOffset)!==0;return m.useMemo(()=>({positionerStyles:le,arrowStyles:$e,arrowRef:Q,arrowUncentered:mt,side:Ne,align:nt,physicalSide:me,anchorHidden:At,refs:te,context:De,isPositioned:ie,update:re}),[le,$e,Q,mt,Ne,nt,me,At,te,De,ie,re])}function g0(e){return e!=null&&"current"in e}function yp(e){return e==="starting"?UM:Fe}const iA=m.forwardRef(function(e,t){const{render:n,className:a,anchor:r,positionMethod:l="absolute",side:o="top",align:i="center",sideOffset:s=0,alignOffset:u=0,collisionBoundary:c="clipping-ancestors",collisionPadding:f=5,arrowPadding:d=5,sticky:h=!1,disableAnchorTracking:p=!1,collisionAvoidance:v=kE,...E}=e,g=Gi(),y=WO(),S=g.useState("open"),b=g.useState("mounted"),x=g.useState("trackCursorAxis"),R=g.useState("disableHoverablePopup"),w=g.useState("floatingRootContext"),C=g.useState("instantType"),A=g.useState("transitionStatus"),T=WE({anchor:r,positionMethod:l,floatingRootContext:w,mounted:b,side:o,sideOffset:s,align:i,alignOffset:u,collisionBoundary:c,collisionPadding:f,sticky:h,arrowPadding:d,disableAnchorTracking:p,keepMounted:y,collisionAvoidance:v,adaptiveOrigin:oA}),k=m.useMemo(()=>{const _={};return(!S||x==="both"||R)&&(_.pointerEvents="none"),{role:"presentation",hidden:!b,style:{...T.positionerStyles,..._}}},[S,x,R,b,T.positionerStyles]),M=m.useMemo(()=>({open:S,side:T.side,align:T.align,anchorHidden:T.anchorHidden,instant:x!=="none"?"tracking-cursor":C}),[S,T.side,T.align,T.anchorHidden,x,C]),L=m.useMemo(()=>({...M,arrowRef:T.arrowRef,arrowStyles:T.arrowStyles,arrowUncentered:T.arrowUncentered}),[M,T.arrowRef,T.arrowStyles,T.arrowUncentered]),z=ke("div",e,{state:M,props:[k,yp(A),E],ref:[t,g.useStateSetter("positionerElement")],stateAttributesMapping:it});return U.jsx(QE.Provider,{value:L,children:z})});function y0(e){const t=Gt(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const r=Qe(e),l=r?e.offsetWidth:n,o=r?e.offsetHeight:a;return(Yl(n)!==l||Yl(a)!==o)&&(n=l,a=o),{width:n,height:a}}const sA=typeof ResizeObserver<"u",uA=()=>!0;function cA(e){const{popupElement:t,positionerElement:n,content:a,mounted:r,enabled:l=uA,onMeasureLayout:o,onMeasureLayoutComplete:i,side:s,direction:u}=e,c=m.useRef(!0),f=qE(t,!0,!1),d=Xi(),h=m.useRef(null),p=ae(o),v=ae(i),E=m.useMemo(()=>{let g=s==="top",y=s==="left";return u==="rtl"?(g=g||s==="inline-end",y=y||s==="inline-end"):(g=g||s==="inline-start",y=y||s==="inline-start"),g?{position:"absolute",[s==="top"?"bottom":"top"]:"0",[y?"right":"left"]:"0"}:Fe},[s,u]);oe(()=>{if(!r||!l()||!sA){c.current=!0,h.current=null;return}if(!t||!n)return;Object.entries(E).forEach(([A,T])=>{t.style.setProperty(A,T)});const g=new ResizeObserver(A=>{const T=A[0];T&&(h.current===null?h.current={width:Math.ceil(T.borderBoxSize[0].inlineSize),height:Math.ceil(T.borderBoxSize[0].blockSize)}:(h.current.width=Math.ceil(T.borderBoxSize[0].inlineSize),h.current.height=Math.ceil(T.borderBoxSize[0].blockSize)))});g.observe(t),t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto");const y=No(t,"position","static"),S=No(t,"transform","none"),b=No(t,"scale","1"),x=No(n,"--available-width","max-content"),R=No(n,"--available-height","max-content");if(p==null||p(),c.current||h.current===null){n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const A=y0(t);return n.style.setProperty("--positioner-width",`${A.width}px`),n.style.setProperty("--positioner-height",`${A.height}px`),y(),S(),b(),x(),R(),v==null||v(null,A),c.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 w=y0(t);t.style.setProperty("--popup-width",`${h.current.width}px`),t.style.setProperty("--popup-height",`${h.current.height}px`),y(),S(),x(),R(),v==null||v(h.current,w),n.style.setProperty("--positioner-width",`${w.width}px`),n.style.setProperty("--positioner-height",`${w.height}px`);const C=new AbortController;return d.request(()=>{t.style.setProperty("--popup-width",`${w.width}px`),t.style.setProperty("--popup-height",`${w.height}px`),f(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},C.signal)}),()=>{g.disconnect(),C.abort(),d.cancel()}},[a,t,n,f,d,l,r,p,v,E])}function No(e,t,n){const a=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,a)}}const fA={...it,...mo},dA=m.forwardRef(function(e,t){const{className:n,render:a,...r}=e,l=Gi(),{side:o,align:i}=FE(),s=l.useState("open"),u=l.useState("mounted"),c=l.useState("instantType"),f=l.useState("transitionStatus"),d=l.useState("popupProps"),h=l.useState("payload"),p=l.useState("popupElement"),v=l.useState("positionerElement"),E=l.useState("floatingRootContext"),g=gp();fo({open:s,ref:l.context.popupRef,onComplete(){var C,A;s&&((A=(C=l.context).onOpenChangeComplete)==null||A.call(C,!0))}});function y(){E.context.events.emit("measure-layout")}function S(C,A){E.context.events.emit("measure-layout-complete",{previousDimensions:C,nextDimensions:A})}const b=m.useCallback(()=>l.context.triggerElements.size>1,[l]);cA({popupElement:p,positionerElement:v,mounted:u,content:h,enabled:b,onMeasureLayout:y,onMeasureLayoutComplete:S,side:o,direction:g});const x=l.useState("disabled"),R=l.useState("closeDelay");ZE(E,{enabled:!x,closeDelay:R});const w=m.useMemo(()=>({open:s,side:o,align:i,instant:c,transitionStatus:f}),[s,o,i,c,f]);return ke("div",e,{state:w,ref:[t,l.context.popupRef,l.useStateSetter("popupElement")],props:[d,yp(f),r],stateAttributesMapping:fA})}),hA=m.forwardRef(function(e,t){const{className:n,render:a,...r}=e,l=Gi().useState("instantType"),{open:o,arrowRef:i,side:s,align:u,arrowUncentered:c,arrowStyles:f}=FE(),d=m.useMemo(()=>({open:o,side:s,align:u,uncentered:c,instant:l}),[o,s,u,c,l]);return ke("div",e,{state:d,ref:[t,i],props:[{style:f,"aria-hidden":!0},r],stateAttributesMapping:it})});function ex(e){return ep(19)?e:e?"true":void 0}const tx=m.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function nx(e=!1){const t=m.useContext(tx);if(!t&&!e)throw new Error(Je(86));return t}const q_=m.forwardRef(function(e,t){const{render:n,className:a,disabled:r=!1,...l}=e,[o,i]=m.useState(void 0),s=m.useMemo(()=>({disabled:r}),[r]),u=ke("fieldset",e,{ref:t,state:s,props:[{"aria-labelledby":o},l]}),c=m.useMemo(()=>({legendId:o,setLegendId:i,disabled:r}),[o,i,r]);return U.jsx(tx.Provider,{value:c,children:u})}),$_=m.forwardRef(function(e,t){const{render:n,className:a,id:r,...l}=e,{disabled:o,setLegendId:i}=nx(),s=ht(r);oe(()=>(i(s),()=>{i(void 0)}),[i,s]);const u=m.useMemo(()=>({disabled:o??!1}),[o]);return ke("div",e,{state:u,ref:t,props:[{id:s},l]})});let v0=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const Lc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Qt={valid(e){return e===null?null:e?{[v0.valid]:""}:{[v0.invalid]:""}}},ax=m.createContext({invalid:void 0,name:void 0,validityData:{state:Lc,errors:[],error:"",value:"",initialValue:null},setValidityData:Pt,disabled:void 0,touched:!1,setTouched:Pt,dirty:!1,setDirty:Pt,filled:!1,setFilled:Pt,focused:!1,setFocused:Pt,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Fe)=>e,getInputValidationProps:(e=Fe)=>e,inputRef:{current:null},commit:async()=>{}}});function ir(e=!0){const t=m.useContext(ax);if(t.setValidityData===Pt&&!e)throw new Error(Je(28));return t}const mA=m.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Pt,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function po(){return m.useContext(mA)}const rx=m.createContext({controlId:void 0,setControlId:Pt,labelId:void 0,setLabelId:Pt,messageIds:[],setMessageIds:Pt,getDescriptionProps:e=>e});function xa(){return m.useContext(rx)}const pA=function(e){const t=ht(),[n,a]=m.useState(e.initialControlId===void 0?t:e.initialControlId),[r,l]=m.useState(void 0),[o,i]=m.useState([]),{messageIds:s}=xa(),u=m.useCallback(f=>ba({"aria-describedby":s.concat(o).join(" ")||void 0},f),[s,o]),c=m.useMemo(()=>({controlId:n,setControlId:a,labelId:r,setLabelId:l,messageIds:o,setMessageIds:i,getDescriptionProps:u}),[n,a,r,l,o,i,u]);return U.jsx(rx.Provider,{value:c,children:e.children})};function bh(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const au=Object.keys(Lc);function gA(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of au)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function yA(e){const{formRef:t,clearErrors:n}=po(),{setValidityData:a,validate:r,validityData:l,validationDebounceTime:o,invalid:i,markedDirtyRef:s,state:u,name:c,shouldValidateOnChange:f}=e,{controlId:d,getDescriptionProps:h}=xa(),p=Kt(),v=m.useRef(null),E=ae(async(S,b=!1)=>{const x=v.current;if(!x)return;if(b){if(u.valid!==!1)return;const L=x.validity;if(!L.valueMissing){const _={value:S,state:{...Lc,valid:!0},error:"",errors:[],initialValue:l.initialValue};if(x.setCustomValidity(""),d){const N=t.current.fields.get(d);N&&t.current.fields.set(d,{...N,...bh(_,!1)})}a(_);return}const z=au.reduce((_,N)=>(_[N]=L[N],_),{});if(!z.valid&&!gA(z))return}function R(L){const z=au.reduce((N,D)=>(N[D]=L.validity[D],N),{});let _=!1;for(const N of au)if(N!=="valid"){if(N==="valueMissing"&&z[N])_=!0;else if(z[N])return z}return _&&!s.current&&(z.valid=!0,z.valueMissing=!1),z}p.clear();let w=null,C=[];const A=R(x);let T;const k=f();if(x.validationMessage&&!k)T=x.validationMessage,C=[x.validationMessage];else{const L=Array.from(t.current.fields.values()).reduce((_,N)=>(N.name&&(_[N.name]=N.getValue()),_),{}),z=r(S,L);typeof z=="object"&&z!==null&&"then"in z?w=await z:w=z,w!==null?(A.valid=!1,A.customError=!0,Array.isArray(w)?(C=w,x.setCustomValidity(w.join(`
|
||
`))):w&&(C=[w],x.setCustomValidity(w))):k&&(x.setCustomValidity(""),A.customError=!1,x.validationMessage?(T=x.validationMessage,C=[x.validationMessage]):x.validity.valid&&!A.valid&&(A.valid=!0))}const M={value:S,state:A,error:T??(Array.isArray(w)?w[0]:w??""),errors:C,initialValue:l.initialValue};if(d){const L=t.current.fields.get(d);L&&t.current.fields.set(d,{...L,...bh(M,i)})}a(M)}),g=m.useCallback((S={})=>ba(h,u.valid===!1?{"aria-invalid":!0}:Fe,S),[h,u.valid]),y=m.useCallback((S={})=>ba({onChange(b){if(b.nativeEvent.defaultPrevented)return;if(n(c),!f()){E(b.currentTarget.value,!0);return}if(i)return;const x=b.currentTarget;if(x.value===""){E(x.value);return}p.clear(),o?p.start(o,()=>{E(x.value)}):E(x.value)}},g(S)),[g,n,c,p,E,i,o,f]);return m.useMemo(()=>({getValidationProps:g,getInputValidationProps:y,inputRef:v,commit:E}),[g,y,E])}const vA=m.forwardRef(function(e,t){const{errors:n,validationMode:a,submitAttemptedRef:r}=po(),{render:l,className:o,validate:i,validationDebounceTime:s=0,validationMode:u=a,name:c,disabled:f=!1,invalid:d,dirty:h,touched:p,...v}=e,{disabled:E}=nx(),g=ae(i||(()=>null)),y=E||f,[S,b]=m.useState(!1),[x,R]=m.useState(!1),[w,C]=m.useState(!1),[A,T]=m.useState(!1),k=h??x,M=p??S,L=m.useRef(!1),z=ae($=>{h===void 0&&($&&(L.current=!0),R($))}),_=ae($=>{p===void 0&&b($)}),N=ae(()=>u==="onChange"||u==="onSubmit"&&r.current),D=!!(d||c&&{}.hasOwnProperty.call(n,c)&&n[c]!==void 0),[O,H]=m.useState({state:Lc,error:"",errors:[],value:null,initialValue:null}),j=!D&&O.state.valid,Z=m.useMemo(()=>({disabled:y,touched:M,dirty:k,valid:j,filled:w,focused:A}),[y,M,k,j,w,A]),q=yA({setValidityData:H,validate:g,validityData:O,validationDebounceTime:s,invalid:D,markedDirtyRef:L,state:Z,name:c,shouldValidateOnChange:N}),P=m.useMemo(()=>({invalid:D,name:c,validityData:O,setValidityData:H,disabled:y,touched:M,setTouched:_,dirty:k,setDirty:z,filled:w,setFilled:C,focused:A,setFocused:T,validate:g,validationMode:u,validationDebounceTime:s,shouldValidateOnChange:N,state:Z,markedDirtyRef:L,validation:q}),[D,c,O,y,M,_,k,z,w,C,A,T,g,u,s,N,Z,q]),Q=ke("div",e,{ref:t,state:Z,props:v,stateAttributesMapping:Qt});return U.jsx(ax.Provider,{value:P,children:Q})}),Y_=m.forwardRef(function(e,t){return U.jsx(pA,{children:U.jsx(vA,{...e,ref:t})})}),G_=m.forwardRef(function(e,t){const{render:n,className:a,id:r,...l}=e,o=ir(!1),{controlId:i,setLabelId:s,labelId:u}=xa(),c=ht(r),f=m.useRef(null);return oe(()=>(c&&s(c),()=>{s(void 0)}),[c,s]),ke("label",e,{ref:[t,f],state:o.state,props:[{id:u,htmlFor:i??void 0,onMouseDown(d){var h;(h=Rt(d.nativeEvent))!=null&&h.closest("button,input,select,textarea")||!d.defaultPrevented&&d.detail>1&&d.preventDefault()}},l],stateAttributesMapping:Qt})}),Z_=m.forwardRef(function(e,t){const{render:n,id:a,className:r,match:l,...o}=e,i=ht(a),{validityData:s,state:u,name:c}=ir(!1),{setMessageIds:f}=xa(),{errors:d}=po(),h=c?d[c]:null;let p=!1;h||l===!0?p=!0:l?p=!!s.state[l]:p=s.state.valid===!1,oe(()=>{if(!(!p||!i))return f(E=>E.concat(i)),()=>{f(E=>E.filter(g=>g!==i))}},[p,i,f]);const v=ke("div",e,{ref:t,state:u,props:[{id:i,children:h||(s.errors.length>1?m.createElement("ul",{},s.errors.map(E=>m.createElement("li",{key:E},E))):s.error)},o],stateAttributesMapping:Qt});return p?v:null}),K_=m.forwardRef(function(e,t){const{render:n,id:a,className:r,...l}=e,o=ht(a),i=ir(!1),{setMessageIds:s}=xa();return oe(()=>{if(o)return s(u=>u.concat(o)),()=>{s(u=>u.filter(c=>c!==o))}},[o,s]),ke("p",e,{ref:t,state:i.state,props:[{id:o},l],stateAttributesMapping:Qt})});function Fi({controlled:e,default:t,name:n,state:a="value"}){const{current:r}=m.useRef(e!==void 0),[l,o]=m.useState(t),i=r?e:l,s=m.useCallback(u=>{r||o(u)},[]);return[i,s]}function bA(e={}){const{id:t,implicit:n=!1,controlRef:a}=e,{controlId:r,setControlId:l}=xa(),o=ht(t);return oe(()=>{if(!(!n&&!t||l===Pt)){if(n){const i=a==null?void 0:a.current;je(i)&&i.closest("label")!=null?l(t??null):l(r??o)}else t&&l(t);return()=>{t&&l(void 0)}}},[t,a,r,l,n,o]),r??o}function vp(e){const{enabled:t=!0,value:n,id:a,name:r,controlRef:l,commit:o}=e,{formRef:i}=po(),{invalid:s,markedDirtyRef:u,validityData:c,setValidityData:f}=ir(),d=ae(e.getValue);oe(()=>{if(!t)return;let h=n;h===void 0&&(h=d()),c.initialValue===null&&h!==null&&f(p=>({...p,initialValue:h}))},[t,f,n,c.initialValue,d]),oe(()=>{!t||!a||i.current.fields.set(a,{getValue:d,name:r,controlRef:l,validityData:bh(c,s),validate(){let h=n;h===void 0&&(h=d()),u.current=!0,zt.flushSync(()=>o(h))}})},[o,l,t,i,d,a,s,u,r,c,n]),oe(()=>{const h=i.current.fields;return()=>{a&&h.delete(a)}},[i,a])}const SA=m.forwardRef(function(e,t){const{render:n,className:a,id:r,name:l,value:o,disabled:i=!1,onValueChange:s,defaultValue:u,...c}=e,{state:f,name:d,disabled:h}=ir(),p=h||i,v=d??l,E=m.useMemo(()=>({...f,disabled:p}),[f,p]),{setTouched:g,setDirty:y,validityData:S,setFocused:b,setFilled:x,validationMode:R,validation:w}=ir(),{labelId:C}=xa(),A=bA({id:r});oe(()=>{var _;const z=o!=null;(_=w.inputRef.current)!=null&&_.value||z&&o!==""?x(!0):z&&o===""&&x(!1)},[w.inputRef,x,o]);const[T,k]=Fi({controlled:o,default:u,name:"FieldControl",state:"value"}),M=o!==void 0,L=ae((z,_)=>{s==null||s(z,_),!_.isCanceled&&k(z)});return vp({id:A,name:v,commit:w.commit,value:T,getValue:()=>{var z;return(z=w.inputRef.current)==null?void 0:z.value},controlRef:w.inputRef}),ke("input",e,{ref:t,state:E,props:[{id:A,disabled:p,name:v,ref:w.inputRef,"aria-labelledby":C,...M?{value:T}:{defaultValue:u},onChange(z){const _=z.currentTarget.value;L(_,Ce(Ki,z.nativeEvent)),y(_!==S.initialValue),x(_!=="")},onFocus(){b(!0)},onBlur(z){g(!0),b(!1),R==="onBlur"&&w.commit(z.currentTarget.value)},onKeyDown(z){z.currentTarget.tagName==="INPUT"&&z.key==="Enter"&&(g(!0),w.commit(z.currentTarget.value))}},w.getInputValidationProps(),c],stateAttributesMapping:Qt})}),EA=m.createContext({disabled:!1});function xA(){return m.useContext(EA)}const lx=m.createContext(void 0);function wA(e=!0){const t=m.useContext(lx);if(t===void 0&&!e)throw new Error(Je(3));return t}let b0=function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});function ox(e){return m.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[b0.checked]:""}:{[b0.unchecked]:""}},...Qt}),[e.indeterminate])}const RA=m.createContext(void 0);function bp(e=!1){const t=m.useContext(RA);if(t===void 0&&!e)throw new Error(Je(16));return t}function CA(e){const{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:r=0,isNativeButton:l}=e,o=a&&t!==!1,i=a&&t===!1;return{props:m.useMemo(()=>{const s={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return a||(s.tabIndex=r,!l&&n&&(s.tabIndex=t?r:-1)),(l&&(t||o)||!l&&n)&&(s["aria-disabled"]=n),l&&(!t||i)&&(s.disabled=n),s},[a,n,t,o,i,l,r])}}function Ji(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:r=!0}=e,l=m.useRef(null),o=bp(!0)!==void 0,i=ae(()=>{const d=l.current;return!!((d==null?void 0:d.tagName)==="A"&&(d!=null&&d.href))}),{props:s}=CA({focusableWhenDisabled:n,disabled:t,composite:o,tabIndex:a,isNativeButton:r}),u=m.useCallback(()=>{const d=l.current;TA(d)&&o&&t&&s.disabled===void 0&&d.disabled&&(d.disabled=!1)},[t,s.disabled,o]);oe(u,[u]);const c=m.useCallback((d={})=>{const{onClick:h,onMouseDown:p,onKeyUp:v,onKeyDown:E,onPointerDown:g,...y}=d;return ba({type:r?"button":void 0,onClick(S){if(t){S.preventDefault();return}h==null||h(S)},onMouseDown(S){t||(p==null||p(S))},onKeyDown(S){if(t||(gh(S),E==null||E(S)),S.baseUIHandlerPrevented)return;const b=S.target===S.currentTarget&&!r&&!i()&&!t,x=S.key==="Enter",R=S.key===" ";b&&((R||x)&&S.preventDefault(),x&&(h==null||h(S)))},onKeyUp(S){t||(gh(S),v==null||v(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!r&&!t&&S.key===" "&&(h==null||h(S))},onPointerDown(S){if(t){S.preventDefault();return}g==null||g(S)}},r?void 0:{role:"button"},s,y)},[t,s,r,i]),f=ae(d=>{l.current=d,u()});return{getButtonProps:c,buttonRef:f}}function TA(e){return Qe(e)&&e.tagName==="BUTTON"}const ix=m.createContext(void 0);function MA(){const e=m.useContext(ix);if(e===void 0)throw new Error(Je(14));return e}function sx(e,t){const n=m.useRef(e),a=ae(t);oe(()=>{n.current!==e&&a(n.current)},[e,a]),oe(()=>{n.current=e},[e])}const ux="data-parent",X_=m.forwardRef(function(e,t){const{checked:n,className:a,defaultChecked:r=!1,disabled:l=!1,id:o,indeterminate:i=!1,inputRef:s,name:u,onCheckedChange:c,parent:f=!1,readOnly:d=!1,render:h,required:p=!1,uncheckedValue:v,value:E,nativeButton:g=!1,...y}=e,{clearErrors:S}=po(),{disabled:b,name:x,setDirty:R,setFilled:w,setFocused:C,setTouched:A,state:T,validationMode:k,validityData:M,shouldValidateOnChange:L,validation:z}=ir(),_=xA(),{labelId:N,controlId:D,setControlId:O,getDescriptionProps:H}=xa(),j=wA(),Z=j==null?void 0:j.parent,q=Z&&j.allValues,P=b||_.disabled||(j==null?void 0:j.disabled)||l,Q=x??u,$=E??Q,de=ht(),K=ht();let F=D;q?F=f?K:`${Z.id}-${$}`:o&&(F=o);let he={};q&&(f?he=j.parent.getParentProps():$&&(he=j.parent.getChildProps($)));const ge=ae(c),{checked:V=n,indeterminate:J=i,onCheckedChange:te,...we}=he,ne=j==null?void 0:j.value,Y=j==null?void 0:j.setValue,X=j==null?void 0:j.defaultValue,re=m.useRef(null),{getButtonProps:fe,buttonRef:De}=Ji({disabled:P,native:g}),ie=(j==null?void 0:j.validation)??z,[ee,G]=Fi({controlled:$&&ne&&!f?ne.includes($):V,default:$&&X&&!f?X.includes($):r,name:"Checkbox",state:"checked"});oe(()=>{if(O!==Pt)return O(F),()=>{O(void 0)}},[F,j,O,f]),vp({enabled:!j,id:de,commit:ie.commit,value:ee,controlRef:re,name:Q,getValue:()=>ee});const W=m.useRef(null),se=qr(s,W,ie.inputRef);oe(()=>{W.current&&(W.current.indeterminate=J,ee&&w(!0))},[ee,J,w]),sx(ee,()=>{j&&!f||(S(Q),w(ee),R(ee!==M.initialValue),L()?ie.commit(ee):ie.commit(ee,!0))});const le=ba({checked:ee,disabled:P,name:f?void 0:Q,id:F??void 0,required:p,ref:se,style:Wm,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange($e){if($e.nativeEvent.defaultPrevented)return;const mt=$e.target.checked,ve=Ce(Ki,$e.nativeEvent);if(te==null||te(mt,ve),ge(mt,ve),!ve.isCanceled&&(G(mt),$&&ne&&Y&&!f)){const Ue=mt?[...ne,$]:ne.filter(xe=>xe!==$);Y(Ue,ve)}},onFocus(){var $e;($e=re.current)==null||$e.focus()}},E!==void 0?{value:(j?ee&&E:E)||""}:Fe,H,j?ie.getValidationProps:ie.getInputValidationProps),Ee=q?!!V:ee,me=q&&J||i;m.useEffect(()=>{Z&&$&&Z.disabledStatesRef.current.set($,P)},[Z,P,$]);const Ne=m.useMemo(()=>({...T,checked:Ee,disabled:P,readOnly:d,required:p,indeterminate:me}),[T,Ee,P,d,p,me]),nt=ox(Ne),At=ke("span",e,{state:Ne,ref:[De,re,t,j==null?void 0:j.registerControlRef],props:[{id:de,role:"checkbox","aria-checked":J?"mixed":ee,"aria-readonly":d||void 0,"aria-required":p||void 0,"aria-labelledby":N,[ux]:f?"":void 0,onFocus(){C(!0)},onBlur(){const $e=W.current;$e&&(A(!0),C(!1),k==="onBlur"&&ie.commit(j?ne:$e.checked))},onClick($e){var mt;d||P||($e.preventDefault(),(mt=W.current)==null||mt.click())}},H,ie.getValidationProps,y,we,fe],stateAttributesMapping:nt});return U.jsxs(ix.Provider,{value:Ne,children:[At,!ee&&!j&&Q&&!f&&v!==void 0&&U.jsx("input",{type:"hidden",name:Q,value:v}),U.jsx("input",{...le})]})}),S0=[];function OA(e){const{allValues:t=S0,value:n=S0,onValueChange:a}=e,r=m.useRef(n),l=m.useRef(new Map),[o,i]=m.useState("mixed"),s=ht(),u=n.length===t.length,c=n.length!==t.length&&n.length>0,f=ae(a),d=m.useCallback(()=>({id:s,indeterminate:c,checked:u,"aria-controls":t.map(p=>`${s}-${p}`).join(" "),onCheckedChange(p,v){const E=r.current,g=t.filter(S=>l.current.get(S)&&E.includes(S)),y=t.filter(S=>!l.current.get(S)||l.current.get(S)&&E.includes(S));if(E.length===y.length||E.length===0){n.length===y.length?f(g,v):f(y,v);return}o==="mixed"?(f(y,v),i("on")):o==="on"?(f(g,v),i("off")):o==="off"&&(f(E,v),i("mixed"))}}),[t,u,s,c,f,o,n.length]),h=m.useCallback(p=>({checked:n.includes(p),onCheckedChange(v,E){const g=n.slice();v?g.push(p):g.splice(g.indexOf(p),1),r.current=g,f(g,E),i("mixed")}}),[f,n]);return m.useMemo(()=>({id:s,indeterminate:c,getParentProps:d,getChildProps:h,disabledStatesRef:l}),[s,c,d,h])}function AA(e,t,n=(a,r)=>a===r){return e.length===t.length&&e.every((a,r)=>n(a,t[r]))}const Q_=m.forwardRef(function(e,t){const{allValues:n,className:a,defaultValue:r,disabled:l=!1,id:o,onValueChange:i,render:s,value:u,...c}=e,{disabled:f,name:d,state:h,validation:p,setFilled:v,setDirty:E,shouldValidateOnChange:g,validityData:y}=ir(),{labelId:S,getDescriptionProps:b}=xa(),{clearErrors:x}=po(),R=f||l,[w,C]=Fi({controlled:u,default:r,name:"CheckboxGroup",state:"value"}),A=ae((O,H)=>{i==null||i(O,H),!H.isCanceled&&C(O)}),T=OA({allValues:n,value:u,onValueChange:i}),k=ht(o),M=m.useRef(null),L=m.useCallback(O=>{M.current==null&&O!=null&&!O.hasAttribute(ux)&&(M.current=O)},[]);vp({enabled:!!d,id:k,commit:p.commit,value:w,controlRef:M,name:d,getValue:()=>w});const z=w??Zl;sx(z,()=>{d&&x(d);const O=Array.isArray(y.initialValue)?y.initialValue:Zl;v(z.length>0),E(!AA(z,O)),g()?p.commit(z):p.commit(z,!0)});const _=m.useMemo(()=>({...h,disabled:R}),[h,R]),N=m.useMemo(()=>({allValues:n,value:w,defaultValue:r,setValue:A,parent:T,disabled:R,validation:p,registerControlRef:L}),[n,w,r,A,T,R,p,L]),D=ke("div",e,{state:_,ref:t,props:[{role:"group","aria-labelledby":S},b,c],stateAttributesMapping:Qt});return U.jsx(lx.Provider,{value:N,children:D})}),F_=m.forwardRef(function(e,t){const{render:n,className:a,keepMounted:r=!1,...l}=e,o=MA(),i=o.checked||o.indeterminate,{transitionStatus:s,setMounted:u}=lp(i),c=m.useRef(null),f=m.useMemo(()=>({...o,transitionStatus:s}),[o,s]);fo({open:i,ref:c,onComplete(){i||u(!1)}});const d=ox(o),h=m.useMemo(()=>({...d,...mo,...Qt}),[d]),p=r||i,v=ke("span",e,{enabled:p,ref:[t,c],state:f,stateAttributesMapping:h,props:l});return p?v:null}),J_=m.forwardRef(function(e,t){return U.jsx(SA,{ref:t,...e})});function Fu(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}B(e=>e.id),B(e=>e.query),B(e=>e.items),B(e=>e.selectedValue),B(e=>e.open),B(e=>e.mounted),B(e=>e.forceMounted),B(e=>e.inline),B(e=>e.activeIndex),B(e=>e.selectedIndex),B((e,t)=>e.activeIndex===t),B((e,t)=>{const n=e.isItemEqualToValue,a=e.selectedValue;return Array.isArray(a)?a.some(r=>Fu(r,t,n)):Fu(a,t,n)}),B(e=>e.transitionStatus),B(e=>e.popupProps),B(e=>e.inputProps),B(e=>e.triggerProps),B(e=>e.getItemProps),B(e=>e.positionerElement),B(e=>e.listElement),B(e=>e.triggerElement),B(e=>e.inputElement),B(e=>e.popupSide),B(e=>e.openMethod),B(e=>e.inputInsidePopup),B(e=>e.selectionMode),B(e=>e.listRef),B(e=>e.labelsRef),B(e=>e.popupRef),B(e=>e.emptyRef),B(e=>e.inputRef),B(e=>e.keyboardActiveRef),B(e=>e.chipsContainerRef),B(e=>e.clearRef),B(e=>e.valuesRef),B(e=>e.allValuesRef),B(e=>e.name),B(e=>e.disabled),B(e=>e.readOnly),B(e=>e.required),B(e=>e.grid),B(e=>e.isGrouped),B(e=>e.virtualized),B(e=>e.onOpenChangeComplete),B(e=>e.openOnInputClick),B(e=>e.itemToStringLabel),B(e=>e.isItemEqualToValue),B(e=>e.modal),B(e=>e.autoHighlight),B(e=>e.submitOnItemClick);function E0(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function _A(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?E0(e.value):E0(e)}function NA(e){const t=m.useRef(""),n=m.useCallback(a=>{a.defaultPrevented||(t.current=a.pointerType,e(a,a.pointerType))},[e]);return{onClick:m.useCallback(a=>{if(a.detail===0){e(a,"keyboard");return}"pointerType"in a&&e(a,a.pointerType),e(a,t.current),t.current=""},[e]),onPointerDown:n}}function cx(e){const[t,n]=m.useState(null),a=ae((i,s)=>{e||n(s)}),r=m.useCallback(()=>{n(null)},[]),{onClick:l,onPointerDown:o}=NA(a);return m.useMemo(()=>({openMethod:t,reset:r,triggerProps:{onClick:l,onPointerDown:o}}),[t,r,l,o])}({..._i,...Qt});function kA(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),a=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||a.content!=="none"))return t;const r=parseFloat(n.width)||0,l=parseFloat(n.height)||0,o=parseFloat(a.width)||0,i=parseFloat(a.height)||0,s=Math.max(t.width,r,o),u=Math.max(t.height,l,i),c=s-t.width,f=u-t.height;return{left:t.left-c/2,right:t.right+c/2,top:t.top-f/2,bottom:t.bottom+f/2}}({..._i,...Qt});const fx=m.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function DA(){return m.useContext(fx)}function LA(e){const{children:t,elementsRef:n,labelsRef:a,onMapChange:r}=e,l=ae(r),o=m.useRef(0),i=Zt(UA).current,s=Zt(zA).current,[u,c]=m.useState(0),f=m.useRef(u),d=ae((g,y)=>{s.set(g,y??null),f.current+=1,c(f.current)}),h=ae(g=>{s.delete(g),f.current+=1,c(f.current)}),p=m.useMemo(()=>{const g=new Map;return Array.from(s.keys()).filter(y=>y.isConnected).sort(jA).forEach((y,S)=>{const b=s.get(y)??{};g.set(y,{...b,index:S})}),g},[s,u]);oe(()=>{if(typeof MutationObserver!="function"||p.size===0)return;const g=new MutationObserver(y=>{const S=new Set,b=x=>S.has(x)?S.delete(x):S.add(x);y.forEach(x=>{x.removedNodes.forEach(b),x.addedNodes.forEach(b)}),S.size===0&&(f.current+=1,c(f.current))});return p.forEach((y,S)=>{S.parentElement&&g.observe(S.parentElement,{childList:!0})}),()=>{g.disconnect()}},[p]),oe(()=>{f.current===u&&(n.current.length!==p.size&&(n.current.length=p.size),a&&a.current.length!==p.size&&(a.current.length=p.size),o.current=p.size),l(p)},[l,p,n,a,u]),oe(()=>()=>{n.current=[]},[n]),oe(()=>()=>{a&&(a.current=[])},[a]);const v=ae(g=>(i.add(g),()=>{i.delete(g)}));oe(()=>{i.forEach(g=>g(p))},[i,p]);const E=m.useMemo(()=>({register:d,unregister:h,subscribeMapChange:v,elementsRef:n,labelsRef:a,nextIndexRef:o}),[d,h,v,n,a,o]);return U.jsx(fx.Provider,{value:E,children:t})}function zA(){return new Map}function UA(){return new Set}function jA(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}({...it});let x0={},w0={},R0="";function HA(e){if(typeof document>"u")return!1;const t=va(e);return dt(t).innerWidth-t.documentElement.clientWidth>0}function BA(e){const t=va(e),n=t.documentElement,a=t.body,r=Xr(n)?n:a,l=r.style.overflow;return r.style.overflow="hidden",()=>{r.style.overflow=l}}function VA(e){var d,h;const t=va(e),n=t.documentElement,a=t.body,r=dt(n);let l=0,o=0;const i=zn.create(),s=typeof CSS<"u"&&((d=CSS.supports)==null?void 0:d.call(CSS,"scrollbar-gutter","stable"));if(mM&&(((h=r.visualViewport)==null?void 0:h.scale)??1)!==1)return()=>{};function u(){const p=r.getComputedStyle(n),v=r.getComputedStyle(a),E=(p.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=n.scrollTop,o=n.scrollLeft,x0={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},R0=n.style.scrollBehavior,w0={position:a.style.position,height:a.style.height,width:a.style.width,boxSizing:a.style.boxSizing,overflowY:a.style.overflowY,overflowX:a.style.overflowX,scrollBehavior:a.style.scrollBehavior};const g=n.scrollHeight>n.clientHeight,y=n.scrollWidth>n.clientWidth,S=p.overflowY==="scroll"||v.overflowY==="scroll",b=p.overflowX==="scroll"||v.overflowX==="scroll",x=Math.max(0,r.innerWidth-n.clientWidth),R=Math.max(0,r.innerHeight-n.clientHeight),w=parseFloat(v.marginTop)+parseFloat(v.marginBottom),C=parseFloat(v.marginLeft)+parseFloat(v.marginRight),A=Xr(n)?n:a;if(s){n.style.scrollbarGutter=E,A.style.overflowY="hidden",A.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(g||S)&&(n.style.overflowY="scroll"),(y||b)&&(n.style.overflowX="scroll"),Object.assign(a.style,{position:"relative",height:w||R?`calc(100dvh - ${w+R}px)`:"100dvh",width:C||x?`calc(100vw - ${C+x}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),a.scrollTop=l,a.scrollLeft=o,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function c(){Object.assign(n.style,x0),Object.assign(a.style,w0),s||(n.scrollTop=l,n.scrollLeft=o,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=R0)}function f(){c(),i.request(u)}return u(),r.addEventListener("resize",f),()=>{i.cancel(),c(),typeof r.removeEventListener=="function"&&r.removeEventListener("resize",f)}}class IA{constructor(){pe(this,"lockCount",0);pe(this,"restore",null);pe(this,"timeoutLock",or.create());pe(this,"timeoutUnlock",or.create());pe(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});pe(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 n=va(t).documentElement,a=dt(n).getComputedStyle(n).overflowY;if(a==="hidden"||a==="clip"){this.restore=Pt;return}const r=pM||!HA(t);this.restore=r?BA(t):VA(t)}}const PA=new IA;function dx(e=!0,t=null){oe(()=>{if(e)return PA.acquire(t)},[e,t])}const hx=m.forwardRef(function(e,t){const{cutout:n,...a}=e;let r;if(n){const l=n==null?void 0:n.getBoundingClientRect();r=`polygon(
|
||
0% 0%,
|
||
100% 0%,
|
||
100% 100%,
|
||
0% 100%,
|
||
0% 0%,
|
||
${l.left}px ${l.top}px,
|
||
${l.left}px ${l.bottom}px,
|
||
${l.right}px ${l.bottom}px,
|
||
${l.right}px ${l.top}px,
|
||
${l.left}px ${l.top}px
|
||
)`}return U.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...a,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:r}})});({...it});let qA=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function Wi(e={}){const{label:t,metadata:n,textRef:a,indexGuessBehavior:r,index:l}=e,{register:o,unregister:i,subscribeMapChange:s,elementsRef:u,labelsRef:c,nextIndexRef:f}=DA(),d=m.useRef(-1),[h,p]=m.useState(l??(r===qA.GuessFromOrder?()=>{if(d.current===-1){const g=f.current;f.current+=1,d.current=g}return d.current}:-1)),v=m.useRef(null),E=m.useCallback(g=>{var y;if(v.current=g,h!==-1&&g!==null&&(u.current[h]=g,c)){const S=t!==void 0;c.current[h]=S?t:((y=a==null?void 0:a.current)==null?void 0:y.textContent)??g.textContent}},[h,u,c,t,a]);return oe(()=>{if(l!=null)return;const g=v.current;if(g)return o(g,n),()=>{i(g)}},[l,o,i,n]),oe(()=>{if(l==null)return s(g=>{var S;const y=v.current?(S=g.get(v.current))==null?void 0:S.index:null;y!=null&&p(y)})},[l,s,p]),m.useMemo(()=>({ref:E,index:h}),[h,E])}({...Dc});const W_=m.forwardRef(function(e,t){const{className:n,render:a,orientation:r="horizontal",...l}=e,o=m.useMemo(()=>({orientation:r}),[r]);return ke("div",e,{state:o,ref:t,props:[{role:"separator","aria-orientation":r},l]})}),mx=m.createContext(void 0);function mr(e){const t=m.useContext(mx);if(e===!1&&t===void 0)throw new Error(Je(27));return t}const $A={...it,...mo},eN=m.forwardRef(function(e,t){const{render:n,className:a,forceRender:r=!1,...l}=e,{store:o}=mr(),i=o.useState("open"),s=o.useState("nested"),u=o.useState("mounted"),c=o.useState("transitionStatus"),f=m.useMemo(()=>({open:i,transitionStatus:c}),[i,c]);return ke("div",e,{state:f,ref:[o.context.backdropRef,t],stateAttributesMapping:$A,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:r||!s})}),tN=m.forwardRef(function(e,t){const{render:n,className:a,disabled:r=!1,nativeButton:l=!0,...o}=e,{store:i}=mr(),s=i.useState("open");function u(h){s&&i.setOpen(!1,Ce(BM,h.nativeEvent))}const{getButtonProps:c,buttonRef:f}=Ji({disabled:r,native:l}),d=m.useMemo(()=>({disabled:r}),[r]);return ke("button",e,{state:d,ref:[t,f],props:[{onClick:u},o,c]})}),nN=m.forwardRef(function(e,t){const{render:n,className:a,id:r,...l}=e,{store:o}=mr(),i=ht(r);return o.useSyncedValueWithCleanup("descriptionElementId",i),ke("p",e,{ref:t,props:[{id:i},l]})});let YA=function(e){return e.nestedDialogs="--nested-dialogs",e}({}),GA=function(e){return e[e.open=kn.open]="open",e[e.closed=kn.closed]="closed",e[e.startingStyle=kn.startingStyle]="startingStyle",e[e.endingStyle=kn.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const px=m.createContext(void 0);function ZA(){const e=m.useContext(px);if(e===void 0)throw new Error(Je(26));return e}const gx="ArrowUp",yx="ArrowDown",vx="ArrowLeft",bx="ArrowRight",Sx="Home",Ex="End",KA=new Set([vx,bx]),XA=new Set([gx,yx]),QA=new Set([...KA,...XA]);[...QA];const xx=new Set([gx,yx,vx,bx,Sx,Ex]),FA={...it,...mo,nestedDialogOpen(e){return e?{[GA.nestedDialogOpen]:""}:null}},aN=m.forwardRef(function(e,t){const{className:n,finalFocus:a,initialFocus:r,render:l,...o}=e,{store:i}=mr(),s=i.useState("descriptionElementId"),u=i.useState("disablePointerDismissal"),c=i.useState("floatingRootContext"),f=i.useState("popupProps"),d=i.useState("modal"),h=i.useState("mounted"),p=i.useState("nested"),v=i.useState("nestedOpenDialogCount"),E=i.useState("open"),g=i.useState("openMethod"),y=i.useState("titleElementId"),S=i.useState("transitionStatus"),b=i.useState("role");ZA(),fo({open:E,ref:i.context.popupRef,onComplete(){var T,k;E&&((k=(T=i.context).onOpenChangeComplete)==null||k.call(T,!0))}});function x(T){return T==="touch"?i.context.popupRef.current:!0}const R=r===void 0?x:r,w=v>0,C=m.useMemo(()=>({open:E,nested:p,transitionStatus:S,nestedDialogOpen:w}),[E,p,S,w]),A=ke("div",e,{state:C,props:[f,{"aria-labelledby":y??void 0,"aria-describedby":s??void 0,role:b,tabIndex:-1,hidden:!h,onKeyDown(T){xx.has(T.key)&&T.stopPropagation()},style:{[YA.nestedDialogs]:v}},o],ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],stateAttributesMapping:FA});return U.jsx(PE,{context:c,openInteractionType:g,disabled:!h,closeOnFocusOut:!u,initialFocus:R,returnFocus:a,modal:d!==!1,restoreFocus:"popup",children:A})}),rN=m.forwardRef(function(e,t){const{keepMounted:n=!1,...a}=e,{store:r}=mr(),l=r.useState("mounted"),o=r.useState("modal");return l||n?U.jsx(px.Provider,{value:n,children:U.jsxs(IE,{ref:t,...a,children:[l&&o===!0&&U.jsx(hx,{ref:r.context.internalBackdropRef,inert:ex(!open)}),e.children]})}):null});function JA(e){const{store:t,parentContext:n,actionsRef:a}=e,r=t.useState("open"),l=t.useState("disablePointerDismissal"),o=t.useState("modal"),i=t.useState("popupElement"),{openMethod:s,triggerProps:u,reset:c}=cx(r);ip(t);const{forceUnmount:f}=sp(r,t,()=>{c()}),d=ae(T=>{const k=Ce(T);return k.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},k}),h=m.useCallback(()=>{t.setOpen(!1,d(Jm))},[t,d]);m.useImperativeHandle(a,()=>({unmount:f,close:h}),[f,h]);const p=dp({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,E]=m.useState(0),g=v===0,y=KE(p),S=ap(p,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:o==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(T){if("button"in T&&T.button!==0||"touches"in T&&T.touches.length!==1)return!1;const k=Rt(T);if(g&&!l){const M=k;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===M||t.context.backdropRef.current===M||Oe(M,i)&&!(M!=null&&M.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:g});dx(r&&o===!0,i);const{getReferenceProps:b,getFloatingProps:x,getTriggerProps:R}=ho([y,S]);t.useContextCallback("onNestedDialogOpen",T=>{E(T+1)}),t.useContextCallback("onNestedDialogClose",()=>{E(0)}),m.useEffect(()=>(n!=null&&n.onNestedDialogOpen&&r&&n.onNestedDialogOpen(v),n!=null&&n.onNestedDialogClose&&!r&&n.onNestedDialogClose(),()=>{n!=null&&n.onNestedDialogClose&&r&&n.onNestedDialogClose()}),[r,n,v]);const w=m.useMemo(()=>b(u),[b,u]),C=m.useMemo(()=>R(u),[R,u]),A=m.useMemo(()=>x(),[x]);t.useSyncedValues({openMethod:s,activeTriggerProps:w,inactiveTriggerProps:C,popupProps:A,floatingRootContext:p,nestedOpenDialogCount:v})}const WA={...fp,modal:B(e=>e.modal),nested:B(e=>e.nested),nestedOpenDialogCount:B(e=>e.nestedOpenDialogCount),disablePointerDismissal:B(e=>e.disablePointerDismissal),openMethod:B(e=>e.openMethod),descriptionElementId:B(e=>e.descriptionElementId),titleElementId:B(e=>e.titleElementId),viewportElement:B(e=>e.viewportElement),role:B(e=>e.role)};class e5 extends Nc{constructor(n){super(t5(n),{popupRef:m.createRef(),backdropRef:m.createRef(),internalBackdropRef:m.createRef(),triggerElements:new Qi,onOpenChange:void 0,onOpenChangeComplete:void 0},WA);pe(this,"setOpen",(n,a)=>{var i,s,u,c;if(a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),(s=(i=this.context).onOpenChange)==null||s.call(i,n,a),a.isCanceled)return;const r={open:n,nativeEvent:a.event,reason:a.reason,nested:this.state.nested};(u=this.state.floatingRootContext.context.events)==null||u.emit("openchange",r);const l={open:n},o=((c=a.trigger)==null?void 0:c.id)??null;(o||n)&&(l.activeTriggerId=o,l.activeTriggerElement=a.trigger??null),this.update(l)})}}function t5(e={}){return{...cp(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function lN(e){const{children:t,open:n,defaultOpen:a=!1,onOpenChange:r,onOpenChangeComplete:l,disablePointerDismissal:o=!1,modal:i=!0,actionsRef:s,handle:u,triggerId:c,defaultTriggerId:f=null}=e,d=mr(!0),h=!!d,p=Zt(()=>(u==null?void 0:u.store)??new e5({open:n??a,activeTriggerId:c!==void 0?c:f,modal:i,disablePointerDismissal:o,nested:h})).current;p.useControlledProp("open",n,a),p.useControlledProp("activeTriggerId",c,f),p.useSyncedValues({disablePointerDismissal:o,nested:h,modal:i}),p.useContextCallback("onOpenChange",r),p.useContextCallback("onOpenChangeComplete",l);const v=p.useState("payload");JA({store:p,actionsRef:s,parentContext:d==null?void 0:d.store.context});const E=m.useMemo(()=>({store:p}),[p]);return U.jsx(mx.Provider,{value:E,children:typeof t=="function"?t({payload:v}):t})}(function(e){return e[e.open=kn.open]="open",e[e.closed=kn.closed]="closed",e[e.startingStyle=kn.startingStyle]="startingStyle",e[e.endingStyle=kn.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});({...it});const oN=m.forwardRef(function(e,t){const{render:n,className:a,id:r,...l}=e,{store:o}=mr(),i=ht(r);return o.useSyncedValueWithCleanup("titleElementId",i),ke("h2",e,{ref:t,props:[{id:i},l]})}),iN=m.forwardRef(function(e,t){const{render:n,className:a,disabled:r=!1,nativeButton:l=!0,id:o,payload:i,handle:s,...u}=e,c=mr(!0),f=(s==null?void 0:s.store)??(c==null?void 0:c.store);if(!f)throw new Error(Je(79));const d=ht(o),h=f.useState("floatingRootContext"),p=f.useState("isOpenedByTrigger",d),v=m.useRef(null),{registerTrigger:E,isMountedByThisTrigger:g}=op(d,v,f,{payload:i}),{getButtonProps:y,buttonRef:S}=Ji({disabled:r,native:l}),b=np(h,{enabled:h!=null}),x=ho([b]),R=m.useMemo(()=>({disabled:r,open:p}),[r,p]),w=f.useState("triggerProps",g);return ke("button",e,{state:R,ref:[S,t,E,v],props:[x.getReferenceProps(),w,{[NE]:"",id:d},u,y],stateAttributesMapping:Dc})}),wx=m.createContext(void 0);function es(e){const t=m.useContext(wx);if(t===void 0&&!e)throw new Error(Je(33));return t}const Rx=m.createContext(void 0);function Ln(e){const t=m.useContext(Rx);if(t===void 0&&!e)throw new Error(Je(36));return t}const n5=m.createContext(void 0);function zc(e=!0){const t=m.useContext(n5);if(t===void 0&&!e)throw new Error(Je(25));return t}({...it});const a5=m.createContext(void 0),Sp={type:"regular-item"};function Uc(e){const{closeOnClick:t,disabled:n=!1,highlighted:a,id:r,store:l,nativeButton:o,itemMetadata:i,nodeId:s}=e,u=m.useRef(null),c=zc(!0),f=c!==void 0,{events:d}=l.useState("floatingTreeRoot"),{getButtonProps:h,buttonRef:p}=Ji({disabled:n,focusableWhenDisabled:!0,native:o}),v=m.useCallback(g=>ba({id:r,role:"menuitem",tabIndex:a?0:-1,onMouseMove(y){s&&d.emit("itemhover",{nodeId:s,target:y.currentTarget})},onMouseEnter(){i.type==="submenu-trigger"&&i.setActive()},onKeyUp(y){y.key===" "&&l.context.typingRef.current&&y.preventBaseUIHandler()},onClick(y){t&&d.emit("close",{domEvent:y,reason:Ac})},onMouseUp(y){if(c){const S=c.initialCursorPointRef.current;if(c.initialCursorPointRef.current=null,f&&S&&Math.abs(y.clientX-S.x)<=1&&Math.abs(y.clientY-S.y)<=1)return}u.current&&l.context.allowMouseUpTriggerRef.current&&(!f||y.button===2)&&i.type==="regular-item"&&u.current.click()}},g,h),[r,a,h,t,d,l,f,c,i,s]),E=qr(u,p);return m.useMemo(()=>({getItemProps:v,itemRef:E}),[v,E])}let C0=function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e}({});const Ep={checked(e){return e?{[C0.checked]:""}:{[C0.unchecked]:""}},...mo},sN=m.forwardRef(function(e,t){const{render:n,className:a,id:r,label:l,nativeButton:o=!1,disabled:i=!1,closeOnClick:s=!1,checked:u,defaultChecked:c,onCheckedChange:f,...d}=e,h=Wi({label:l}),p=es(!0),v=ht(r),{store:E}=Ln(),g=E.useState("isActive",h.index),y=E.useState("itemProps"),[S,b]=Fi({controlled:u,default:c??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:x,itemRef:R}=Uc({closeOnClick:s,disabled:i,highlighted:g,id:v,store:E,nativeButton:o,nodeId:p==null?void 0:p.nodeId,itemMetadata:Sp}),w=m.useMemo(()=>({disabled:i,highlighted:g,checked:S}),[i,g,S]),C=ae(T=>{const k={...Ce(Ac,T.nativeEvent),preventUnmountOnClose:()=>{}};f==null||f(!S,k),!k.isCanceled&&b(M=>!M)}),A=ke("div",e,{state:w,stateAttributesMapping:Ep,props:[y,{role:"menuitemcheckbox","aria-checked":S,onClick:C},d,x],ref:[R,t,h.ref]});return U.jsx(a5.Provider,{value:w,children:A})}),Cx=m.createContext(void 0);function r5(){const e=m.useContext(Cx);if(e===void 0)throw new Error(Je(31));return e}const uN=m.forwardRef(function(e,t){const{render:n,className:a,...r}=e,[l,o]=m.useState(void 0),i=m.useMemo(()=>({setLabelId:o}),[o]),s=ke("div",e,{ref:t,props:{role:"group","aria-labelledby":l,...r}});return U.jsx(Cx.Provider,{value:i,children:s})}),cN=m.forwardRef(function(e,t){const{className:n,render:a,id:r,...l}=e,o=ht(r),{setLabelId:i}=r5();return oe(()=>(i(o),()=>{i(void 0)}),[i,o]),ke("div",e,{ref:t,props:{id:o,role:"presentation",...l}})}),fN=m.forwardRef(function(e,t){const{render:n,className:a,id:r,label:l,nativeButton:o=!1,disabled:i=!1,closeOnClick:s=!0,...u}=e,c=Wi({label:l}),f=es(!0),d=ht(r),{store:h}=Ln(),p=h.useState("isActive",c.index),v=h.useState("itemProps"),{getItemProps:E,itemRef:g}=Uc({closeOnClick:s,disabled:i,highlighted:p,id:d,store:h,nativeButton:o,nodeId:f==null?void 0:f.nodeId,itemMetadata:Sp}),y=m.useMemo(()=>({disabled:i,highlighted:p}),[i,p]);return ke("div",e,{state:y,props:[v,u,E],ref:[g,t,c.ref]})}),l5=m.createContext(void 0);function o5(e){return m.useContext(l5)}const i5={...it,...mo},dN=m.forwardRef(function(e,t){const{render:n,className:a,finalFocus:r,...l}=e,{store:o}=Ln(),{side:i,align:s}=es(),u=o5()!=null,c=o.useState("open"),f=o.useState("transitionStatus"),d=o.useState("popupProps"),h=o.useState("mounted"),p=o.useState("instantType"),v=o.useState("activeTriggerElement"),E=o.useState("parent"),g=o.useState("lastOpenChangeReason"),y=o.useState("rootId"),S=o.useState("floatingRootContext"),b=o.useState("floatingTreeRoot"),x=o.useState("closeDelay"),R=o.useState("activeTriggerElement");fo({open:c,ref:o.context.popupRef,onComplete(){var M,L;c&&((L=(M=o.context).onOpenChangeComplete)==null||L.call(M,!0))}}),m.useEffect(()=>{function M(L){o.setOpen(!1,Ce(L.reason,L.domEvent))}return b.events.on("close",M),()=>{b.events.off("close",M)}},[b.events,o]);const w=o.useState("hoverEnabled"),C=o.useState("disabled");ZE(S,{enabled:w&&!C&&E.type!=="context-menu"&&E.type!=="menubar",closeDelay:x});const A=m.useMemo(()=>({transitionStatus:f,side:i,align:s,open:c,nested:E.type==="menu",instant:p}),[f,i,s,c,E.type,p]),T=ke("div",e,{state:A,ref:[t,o.context.popupRef],stateAttributesMapping:i5,props:[d,{onKeyDown(M){u&&xx.has(M.key)&&M.stopPropagation()}},yp(f),l,{"data-rootownerid":y}]});let k=E.type===void 0||E.type==="context-menu";return(v||E.type==="menubar"&&g!==Fm)&&(k=!0),U.jsx(PE,{context:S,modal:!1,disabled:!h,returnFocus:r===void 0?k:r,initialFocus:E.type!=="menu",restoreFocus:!0,externalTree:E.type!=="menubar"?b:void 0,previousFocusableElement:R,nextFocusableElement:E.type===void 0?o.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:E.type===void 0?o.context.beforeContentFocusGuardRef:void 0,children:T})}),Tx=m.createContext(void 0);function s5(){const e=m.useContext(Tx);if(e===void 0)throw new Error(Je(32));return e}const hN=m.forwardRef(function(e,t){const{keepMounted:n=!1,...a}=e,{store:r}=Ln();return r.useState("mounted")||n?U.jsx(Tx.Provider,{value:n,children:U.jsx(IE,{ref:t,...a})}):null}),mN=m.forwardRef(function(e,t){var he;const{anchor:n,positionMethod:a="absolute",className:r,render:l,side:o,align:i,sideOffset:s=0,alignOffset:u=0,collisionBoundary:c="clipping-ancestors",collisionPadding:f=5,arrowPadding:d=5,sticky:h=!1,disableAnchorTracking:p=!1,collisionAvoidance:v=jM,...E}=e,{store:g}=Ln(),y=s5(),S=zc(!0),b=g.useState("parent"),x=g.useState("floatingRootContext"),R=g.useState("floatingTreeRoot"),w=g.useState("mounted"),C=g.useState("open"),A=g.useState("modal"),T=g.useState("activeTriggerElement"),k=g.useState("lastOpenChangeReason"),M=g.useState("floatingNodeId"),L=g.useState("floatingParentNodeId");let z=n,_=s,N=u,D=i,O=v;b.type==="context-menu"&&(z=n??((he=b.context)==null?void 0:he.anchor),D=D??"start",!o&&D!=="center"&&(N=e.alignOffset??2,_=e.sideOffset??-5));let H=o,j=D;b.type==="menu"?(H=H??"inline-end",j=j??"start",O=e.collisionAvoidance??kE):b.type==="menubar"&&(H=H??"bottom",j=j??"start");const Z=b.type==="context-menu",q=WE({anchor:z,floatingRootContext:x,positionMethod:S?"fixed":a,mounted:w,side:H,sideOffset:_,align:j,alignOffset:N,arrowPadding:Z?0:d,collisionBoundary:c,collisionPadding:f,sticky:h,nodeId:M,keepMounted:y,disableAnchorTracking:p,collisionAvoidance:O,shiftCrossAxis:Z,externalTree:R}),P=m.useMemo(()=>{const ge={};return C||(ge.pointerEvents="none"),{role:"presentation",hidden:!w,style:{...q.positionerStyles,...ge}}},[C,w,q.positionerStyles]);m.useEffect(()=>{function ge(V){V.open?(V.parentNodeId===M&&g.set("hoverEnabled",!1),V.nodeId!==M&&V.parentNodeId===g.select("floatingParentNodeId")&&g.setOpen(!1,Ce(Bo))):V.parentNodeId===M&&V.reason!==Bo&&g.set("hoverEnabled",!0)}return R.events.on("menuopenchange",ge),()=>{R.events.off("menuopenchange",ge)}},[g,R.events,M]),m.useEffect(()=>{if(g.select("floatingParentNodeId")==null)return;function ge(V){if(V.open||V.nodeId!==g.select("floatingParentNodeId"))return;const J=V.reason??Bo;g.setOpen(!1,Ce(J))}return R.events.on("menuopenchange",ge),()=>{R.events.off("menuopenchange",ge)}},[R.events,g]),m.useEffect(()=>{function ge(V){!C||V.nodeId!==g.select("floatingParentNodeId")||V.target&&T&&T!==V.target&&g.setOpen(!1,Ce(Bo))}return R.events.on("itemhover",ge),()=>{R.events.off("itemhover",ge)}},[R.events,C,T,g]),m.useEffect(()=>{const ge={open:C,nodeId:M,parentNodeId:L,reason:g.select("lastOpenChangeReason")};R.events.emit("menuopenchange",ge)},[R.events,C,g,M,L]);const Q=m.useMemo(()=>({open:C,side:q.side,align:q.align,anchorHidden:q.anchorHidden,nested:b.type==="menu"}),[C,q.side,q.align,q.anchorHidden,b.type]),$=m.useMemo(()=>({side:q.side,align:q.align,arrowRef:q.arrowRef,arrowUncentered:q.arrowUncentered,arrowStyles:q.arrowStyles,nodeId:q.context.nodeId}),[q.side,q.align,q.arrowRef,q.arrowUncentered,q.arrowStyles,q.context.nodeId]),de=ke("div",e,{state:Q,stateAttributesMapping:it,ref:[t,g.useStateSetter("positionerElement")],props:[P,E]}),K=w&&b.type!=="menu"&&(b.type!=="menubar"&&A&&k!==Dt||b.type==="menubar"&&b.context.modal);let F=null;return b.type==="menubar"?F=b.context.contentElement:b.type===void 0&&(F=T),U.jsxs(wx.Provider,{value:$,children:[K&&U.jsx(hx,{ref:b.type==="context-menu"||b.type==="nested-context-menu"?b.context.internalBackdropRef:null,inert:ex(!C),cutout:F}),U.jsx(kM,{id:M,children:U.jsx(LA,{elementsRef:g.context.itemDomElements,labelsRef:g.context.itemLabels,children:de})})]})}),Mx=m.createContext(void 0);function u5(){const e=m.useContext(Mx);if(e===void 0)throw new Error(Je(34));return e}const pN=m.memo(m.forwardRef(function(e,t){const{render:n,className:a,value:r,defaultValue:l,onValueChange:o,disabled:i=!1,...s}=e,[u,c]=Fi({controlled:r,default:l,name:"MenuRadioGroup"}),f=ae(o),d=ae((E,g)=>{f==null||f(E,g),!g.isCanceled&&c(E)}),h=m.useMemo(()=>({disabled:i}),[i]),p=ke("div",e,{state:h,ref:t,props:{role:"group","aria-disabled":i||void 0,...s}}),v=m.useMemo(()=>({value:u,setValue:d,disabled:i}),[u,d,i]);return U.jsx(Mx.Provider,{value:v,children:p})})),Ox=m.createContext(void 0);function c5(){const e=m.useContext(Ox);if(e===void 0)throw new Error(Je(35));return e}const gN=m.forwardRef(function(e,t){const{render:n,className:a,id:r,label:l,nativeButton:o=!1,disabled:i=!1,closeOnClick:s=!1,value:u,...c}=e,f=Wi({label:l}),d=es(!0),h=ht(r),{store:p}=Ln(),v=p.useState("isActive",f.index),E=p.useState("itemProps"),{value:g,setValue:y,disabled:S}=u5(),b=S||i,x=g===u,{getItemProps:R,itemRef:w}=Uc({closeOnClick:s,disabled:b,highlighted:v,id:h,store:p,nativeButton:o,nodeId:d==null?void 0:d.nodeId,itemMetadata:Sp}),C=m.useMemo(()=>({disabled:b,highlighted:v,checked:x}),[b,v,x]),A=ae(k=>{const M={...Ce(Ac,k.nativeEvent),preventUnmountOnClose:()=>{}};y(u,M)}),T=ke("div",e,{state:C,stateAttributesMapping:Ep,props:[E,{role:"menuitemradio","aria-checked":x,onClick:A},c,R],ref:[w,t,f.ref]});return U.jsx(Ox.Provider,{value:C,children:T})}),yN=m.forwardRef(function(e,t){const{render:n,className:a,keepMounted:r=!1,...l}=e,o=c5(),i=m.useRef(null),{transitionStatus:s,setMounted:u}=lp(o.checked);fo({open:o.checked,ref:i,onComplete(){o.checked||u(!1)}});const c=m.useMemo(()=>({checked:o.checked,disabled:o.disabled,highlighted:o.highlighted,transitionStatus:s}),[o.checked,o.disabled,o.highlighted,s]);return ke("span",e,{state:c,stateAttributesMapping:Ep,ref:[t,i],props:{"aria-hidden":!0,...l},enabled:r||o.checked})}),f5=m.createContext(null);function Ax(e){return m.useContext(f5)}const d5={...fp,disabled:B(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:B(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:B(e=>e.parent.type==="menu"?e.parent.store.select("allowMouseEnter"):e.allowMouseEnter),stickIfOpen:B(e=>e.stickIfOpen),parent:B(e=>e.parent),rootId:B(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:B(e=>e.activeIndex),isActive:B((e,t)=>e.activeIndex===t),hoverEnabled:B(e=>e.hoverEnabled),instantType:B(e=>e.instantType),lastOpenChangeReason:B(e=>e.openChangeReason),floatingTreeRoot:B(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:B(e=>e.floatingNodeId),floatingParentNodeId:B(e=>e.floatingParentNodeId),itemProps:B(e=>e.itemProps),closeDelay:B(e=>e.closeDelay),keyboardEventRelay:B(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class xp extends Nc{constructor(n){super({...h5(),...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 Qi},d5);pe(this,"unsubscribeParentListener",null);this.observe(B(a=>a.allowMouseEnter),(a,r)=>{this.state.parent.type==="menu"&&a!==r&&this.state.parent.store.set("allowMouseEnter",a)}),this.unsubscribeParentListener=this.observe("parent",a=>{var r;if((r=this.unsubscribeParentListener)==null||r.call(this),a.type==="menu"){this.unsubscribeParentListener=a.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=a.store.context.allowMouseUpTriggerRef;return}a.type!==void 0&&(this.context.allowMouseUpTriggerRef=a.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,a){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:a})}static useStore(n,a){return Zt(()=>n??new xp(a)).current}}function h5(){return{...cp(),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 Qm,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Fe,keyboardEventRelay:void 0,closeDelay:0}}const _x=m.createContext(void 0);function Nx(){return m.useContext(_x)}function m5(e){const{children:t,open:n,onOpenChange:a,onOpenChangeComplete:r,defaultOpen:l=!1,disabled:o=!1,modal:i,loopFocus:s=!0,orientation:u="vertical",actionsRef:c,closeParentOnEsc:f=!1,handle:d,triggerId:h,defaultTriggerId:p=null,highlightItemOnHover:v=!0}=e,E=zc(!0),g=Ln(!0),y=Ax(),S=Nx(),b=m.useMemo(()=>S&&g?{type:"menu",store:g.store}:y?{type:"menubar",context:y}:E&&!g?{type:"context-menu",context:E}:{type:void 0},[E,g,y,S]),x=xp.useStore(d==null?void 0:d.store,{parent:b}),R=x.useState("floatingTreeRoot"),w=_E(R),C=Ea();oe(()=>{E&&!g?x.update({parent:{type:"context-menu",context:E},floatingNodeId:w,floatingParentNodeId:C}):g&&x.update({floatingNodeId:w,floatingParentNodeId:C})},[E,g,w,C,x]),x.useControlledProp("open",n,l),x.useControlledProp("activeTriggerId",h,p),x.useContextCallback("onOpenChangeComplete",r);const A=x.useState("open"),T=x.useState("activeTriggerElement"),k=x.useState("positionerElement"),M=x.useState("hoverEnabled"),L=x.useState("modal"),z=x.useState("disabled"),_=x.useState("lastOpenChangeReason"),N=x.useState("parent"),D=x.useState("activeIndex"),O=x.useState("payload"),H=x.useState("floatingParentNodeId"),j=m.useRef(null),Z=H!=null;let q;x.useSyncedValues({disabled:o,modal:N.type===void 0?i:void 0,rootId:Qr()});const{openMethod:P,triggerProps:Q,reset:$}=cx(A);ip(x);const{forceUnmount:de}=sp(A,x,()=>{x.update({allowMouseEnter:!1,stickIfOpen:!0}),$()}),K=m.useRef(N.type!=="context-menu"),F=Kt();m.useEffect(()=>{if(A||(j.current=null),N.type==="context-menu"){if(!A){F.clear(),K.current=!1;return}F.start(500,()=>{K.current=!0})}},[F,A,N.type]),dx(A&&L&&_!==Dt&&P!=="touch",k),oe(()=>{!A&&!M&&x.set("hoverEnabled",!0)},[A,M,x]);const he=m.useRef(!0),ge=Kt(),V=ae((ve,Ue)=>{const xe=Ue.reason;if(A===ve&&Ue.trigger===T||(Ue.preventUnmountOnClose=()=>{x.set("preventUnmountingOnClose",!0)},!ve&&Ue.trigger==null&&(Ue.trigger=T??void 0),a==null||a(ve,Ue),Ue.isCanceled))return;const pt={open:ve,nativeEvent:Ue.event,reason:Ue.reason,nested:Z};q==null||q.emit("openchange",pt);const We=Ue.event;if(ve===!1&&(We==null?void 0:We.type)==="click"&&We.pointerType==="touch"&&!he.current)return;if(!ve&&D!==null){const dn=x.context.itemDomElements.current[D];queueMicrotask(()=>{dn==null||dn.setAttribute("tabindex","-1")})}ve&&xe===Ai?(he.current=!1,ge.start(300,()=>{he.current=!0})):(he.current=!0,ge.clear());const On=(xe===er||xe===Ac)&&We.detail===0&&(We==null?void 0:We.isTrusted),wa=!ve&&(xe===_c||xe==null);function Kn(){var Xn;const dn={open:ve,openChangeReason:xe};j.current=Ue.event??null;const Fr=((Xn=Ue.trigger)==null?void 0:Xn.id)??null;(Fr||ve)&&(dn.activeTriggerId=Fr,dn.activeTriggerElement=Ue.trigger??null),x.update(dn)}xe===Dt?zt.flushSync(Kn):Kn(),N.type==="menubar"&&(xe===Ai||xe===Kl||xe===Dt||xe===Js||xe===Bo)?x.set("instantType","group"):On||wa?x.set("instantType",On?"click":"dismiss"):x.set("instantType",void 0)}),J=m.useCallback(ve=>{const Ue=Ce(ve);return Ue.preventUnmountOnClose=()=>{x.set("preventUnmountingOnClose",!0)},Ue},[x]),te=m.useCallback(()=>{x.setOpen(!1,J(Jm))},[x,J]);m.useImperativeHandle(c,()=>({unmount:de,close:te}),[de,te]);let we;N.type==="context-menu"&&(we=N.context),m.useImperativeHandle(we==null?void 0:we.positionerRef,()=>k,[k]),m.useImperativeHandle(we==null?void 0:we.actionsRef,()=>({setOpen:V}),[V]);const ne=dp({popupStore:x,onOpenChange:V});q=ne.context.events,m.useEffect(()=>{const ve=({open:Ue,eventDetails:xe})=>V(Ue,xe);return q.on("setOpen",ve),()=>{q==null||q.off("setOpen",ve)}},[q,V]);const Y=ap(ne,{enabled:!z,bubbles:f&&N.type==="menu",outsidePress(){var ve;return N.type!=="context-menu"||((ve=j.current)==null?void 0:ve.type)==="contextmenu"?!0:K.current},externalTree:Z?R:void 0}),X=KE(ne,{role:"menu"}),re=gp(),fe=m.useCallback(ve=>{x.select("activeIndex")!==ve&&x.set("activeIndex",ve)},[x]),De=LO(ne,{enabled:!z,listRef:x.context.itemDomElements,activeIndex:D,nested:N.type!==void 0,loopFocus:s,orientation:u,parentOrientation:N.type==="menubar"?N.context.orientation:void 0,rtl:re==="rtl",disabledIndices:Zl,onNavigate:fe,openOnArrowKeyDown:N.type!=="context-menu",externalTree:Z?R:void 0,focusItemOnHover:v}),ie=m.useCallback(ve=>{x.context.typingRef.current=ve},[x]),ee=UO(ne,{listRef:x.context.itemLabels,activeIndex:D,resetMs:LM,onMatch:ve=>{A&&ve!==D&&x.set("activeIndex",ve)},onTypingChange:ie}),{getReferenceProps:G,getFloatingProps:W,getItemProps:se,getTriggerProps:le}=ho([Y,X,De,ee]),Ee=m.useMemo(()=>{const ve=ba(G(),{onMouseEnter(){x.set("hoverEnabled",!0)},onMouseMove(){x.set("allowMouseEnter",!0)}},Q);return delete ve.role,ve},[G,x,Q]),me=m.useMemo(()=>{const ve=le();if(!ve)return ve;const Ue=ba(ve,Q);return delete Ue.role,delete Ue["aria-controls"],Ue},[le,Q]),Ne=Xi(),nt=m.useMemo(()=>W({onMouseEnter(){N.type==="menu"&&Ne.request(()=>x.set("hoverEnabled",!1))},onMouseMove(){x.set("allowMouseEnter",!0)},onClick(){x.select("hoverEnabled")&&x.set("hoverEnabled",!1)},onKeyDown(ve){const Ue=x.select("keyboardEventRelay");Ue&&!ve.isPropagationStopped()&&Ue(ve)}}),[W,N.type,Ne,x]),At=m.useMemo(()=>se(),[se]);x.useSyncedValues({floatingRootContext:ne,activeTriggerProps:Ee,inactiveTriggerProps:me,popupProps:nt,itemProps:At});const $e=m.useMemo(()=>({store:x,parent:b}),[x,b]),mt=U.jsx(Rx.Provider,{value:$e,children:typeof t=="function"?t({payload:O}):t});return N.type===void 0||N.type==="context-menu"?U.jsx(DM,{externalTree:R,children:mt}):mt}function vN(e){const t=Ln().store,n=m.useMemo(()=>({parentMenu:t}),[t]);return U.jsx(_x.Provider,{value:n,children:U.jsx(m5,{...e})})}function p5(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:a}=bp(),{ref:r,index:l}=Wi(e),o=n===l,i=m.useRef(null),s=qr(r,i);return{compositeProps:m.useMemo(()=>({tabIndex:o?0:-1,onFocus(){a(l)},onMouseMove(){const u=i.current;if(!t||!u)return;const c=u.hasAttribute("disabled")||u.ariaDisabled==="true";!o&&!c&&u.focus()}}),[o,a,l,t]),compositeRef:s,index:l}}function g5(e){const{render:t,className:n,state:a=Fe,props:r=Zl,refs:l=Zl,metadata:o,stateAttributesMapping:i,tag:s="div",...u}=e,{compositeProps:c,compositeRef:f}=p5({metadata:o});return ke(s,e,{state:a,ref:[...l,f],props:[c,...r,u],stateAttributesMapping:i})}function kx(e){if(Qe(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!In(e))return kx($n(e))}function y5(e){const{enabled:t=!0,mouseDownAction:n,open:a}=e,r=m.useRef(!1);return m.useMemo(()=>t?{onMouseDown:l=>{(n==="open"&&!a||n==="close"&&a)&&(r.current=!0,va(l.currentTarget).addEventListener("click",()=>{r.current=!1},{once:!0}))},onClick:l=>{r.current&&(r.current=!1,l.preventBaseUIHandler())}}:Fe,[t,n,a])}const ks=2,bN=m.forwardRef(function(e,t){const{render:n,className:a,disabled:r=!1,nativeButton:l=!0,id:o,openOnHover:i,delay:s=100,closeDelay:u=0,handle:c,payload:f,...d}=e,h=Ln(!0),p=(c==null?void 0:c.store)??(h==null?void 0:h.store);if(!p)throw new Error(Je(85));const v=ht(o),E=p.useState("isTriggerActive",v),g=p.useState("floatingRootContext"),y=p.useState("isOpenedByTrigger",v),S=m.useRef(null),b=b5(),x=bp(!0),R=hr(),w=m.useMemo(()=>R??new Qm,[R]),C=_E(w),A=Ea(),{registerTrigger:T,isMountedByThisTrigger:k}=op(v,S,p,{payload:f,closeDelay:u,parent:b,floatingTreeRoot:w,floatingNodeId:C,floatingParentNodeId:A,keyboardEventRelay:x==null?void 0:x.relayKeyboardEvent}),M=p.useState("disabled"),L=r||M||b.type==="menubar"&&b.context.disabled,{getButtonProps:z,buttonRef:_}=Ji({disabled:L,native:l});m.useEffect(()=>{!y&&b.type===void 0&&(p.context.allowMouseUpTriggerRef.current=!1)},[p,y,b.type]);const N=m.useRef(null),D=Kt(),O=ae(ne=>{if(!N.current)return;D.clear(),p.context.allowMouseUpTriggerRef.current=!1;const Y=ne.target;if(Oe(N.current,Y)||Oe(p.select("positionerElement"),Y)||Y===N.current||Y!=null&&kx(Y)===p.select("rootId"))return;const X=kA(N.current);ne.clientX>=X.left-ks&&ne.clientX<=X.right+ks&&ne.clientY>=X.top-ks&&ne.clientY<=X.bottom+ks||w.events.emit("close",{domEvent:ne,reason:VM})});m.useEffect(()=>{y&&p.select("lastOpenChangeReason")===Dt&&va(N.current).addEventListener("mouseup",O,{once:!0})},[y,O,p]);const H=b.type==="menubar"&&b.context.hasSubmenuOpen,j=hp(g,{enabled:(i??H??!1)&&!L&&b.type!=="context-menu"&&(b.type!=="menubar"||H&&!k),handleClose:mp({blockPointerEvents:b.type!=="menubar"}),mouseOnly:!0,move:!1,restMs:b.type===void 0?s:void 0,delay:{close:u},triggerElementRef:S,externalTree:w,isActiveTrigger:E}),Z=v5(y,p.select("lastOpenChangeReason")),q=np(g,{enabled:!L&&b.type!=="context-menu",event:y&&b.type==="menubar"?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:b.type===void 0?Z:!1}),P=YE(g,{enabled:!L&&(b.type!=="menubar"&&y||H)}),Q=y5({open:y,enabled:b.type==="menubar",mouseDownAction:"open"}),$=ho([q,P]),de=b.type==="menubar",K=m.useMemo(()=>({disabled:L,open:y}),[L,y]),F=p.useState("triggerProps",k),he=[N,t,_,T,S],ge=[$.getReferenceProps(),j??Fe,F,{"aria-haspopup":"menu",id:v,onMouseDown:ne=>{p.select("open")||(D.start(200,()=>{p.context.allowMouseUpTriggerRef.current=!0}),va(ne.currentTarget).addEventListener("mouseup",O,{once:!0}))}},de?{role:"menuitem"}:{},Q,d,z],V=m.useRef(null),J=ae(ne=>{var Y;zt.flushSync(()=>{p.setOpen(!1,Ce(Kl,ne.nativeEvent,ne.currentTarget))}),(Y=OM(V.current))==null||Y.focus()}),te=ae(ne=>{var X;const Y=p.select("positionerElement");if(Y&&Ol(ne,Y))(X=p.context.beforeContentFocusGuardRef.current)==null||X.focus();else{zt.flushSync(()=>{p.setOpen(!1,Ce(Kl,ne.nativeEvent,ne.currentTarget))});let re=MM(S.current);for(;re!==null&&Oe(Y,re)||re!=null&&re.hasAttribute("aria-hidden");){const fe=re;if(re=Xm(re),re===fe)break}re==null||re.focus()}}),we=ke("button",e,{enabled:!de,stateAttributesMapping:_i,state:K,ref:he,props:ge});return de?U.jsx(g5,{tag:"button",render:n,className:a,state:K,refs:he,props:ge,stateAttributesMapping:_i}):y?U.jsxs(m.Fragment,{children:[U.jsx(Ql,{ref:V,onFocus:J},`${v}-pre-focus-guard`),U.jsx(m.Fragment,{children:we},v),U.jsx(Ql,{ref:p.context.triggerFocusTargetRef,onFocus:te},`${v}-post-focus-guard`)]}):U.jsx(m.Fragment,{children:we},v)});function v5(e,t){const n=Kt(),[a,r]=m.useState(!1);return oe(()=>{e&&t==="trigger-hover"?(r(!0),n.start(zM,()=>{r(!1)})):e||(n.clear(),r(!1))},[e,t,n]),a}function b5(){const e=zc(!0),t=Ln(!0),n=Ax();return m.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const SN=m.forwardRef(function(e,t){const{render:n,className:a,label:r,id:l,nativeButton:o=!1,openOnHover:i=!0,delay:s=100,closeDelay:u=0,disabled:c=!1,...f}=e,d=Wi(),h=es(),{store:p}=Ln(),v=ht(l),E=p.useState("open"),g=p.useState("floatingRootContext"),y=p.useState("floatingTreeRoot"),S=$E(v,p),b=m.useCallback(P=>{const Q=S(P);return P!==null&&p.select("open")&&p.select("activeTriggerId")==null&&p.update({activeTriggerId:v,activeTriggerElement:P,closeDelay:u}),Q},[S,u,p,v]),x=m.useRef(null),R=m.useCallback(P=>{x.current=P,p.set("activeTriggerElement",P)},[p]),w=Nx();if(!(w!=null&&w.parentMenu))throw new Error(Je(37));p.useSyncedValue("closeDelay",u);const C=w.parentMenu,A=C.useState("itemProps"),T=C.useState("isActive",d.index),k=m.useMemo(()=>({type:"submenu-trigger",setActive:()=>C.set("activeIndex",d.index)}),[C,d.index]),M=p.useState("disabled"),L=c||M,{getItemProps:z,itemRef:_}=Uc({closeOnClick:!1,disabled:L,highlighted:T,id:v,store:p,nativeButton:o,itemMetadata:k,nodeId:h==null?void 0:h.nodeId}),N=p.useState("hoverEnabled"),D=p.useState("allowMouseEnter"),O=hp(g,{enabled:N&&i&&!L&&D,handleClose:mp({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:s,delay:{open:s,close:u},triggerElementRef:x,externalTree:y}),H=np(g,{enabled:!L,event:"mousedown",toggle:!i,ignoreMouse:i,stickIfOpen:!1}),j=ho([H]),Z=p.useState("triggerProps",!0);delete Z.id;const q=m.useMemo(()=>({disabled:L,highlighted:T,open:E}),[L,T,E]);return ke("div",e,{state:q,stateAttributesMapping:Dc,props:[j.getReferenceProps(),O,Z,A,{tabIndex:E||T?0:-1,onBlur(){T&&C.set("activeIndex",null)}},f,z],ref:[t,d.ref,_,b,R]})});B(e=>e.id),B(e=>e.modal),B(e=>e.multiple),B(e=>e.items),B(e=>e.itemToStringLabel),B(e=>e.itemToStringValue),B(e=>e.isItemEqualToValue),B(e=>e.value),B(e=>e.open),B(e=>e.mounted),B(e=>e.forceMount),B(e=>e.transitionStatus),B(e=>e.openMethod),B(e=>e.activeIndex),B(e=>e.selectedIndex),B((e,t)=>e.activeIndex===t),B((e,t,n)=>{const a=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(l=>Fu(l,n,a)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Fu(r,n,a)}),B((e,t)=>e.selectedIndex===t),B(e=>e.popupProps),B(e=>e.triggerProps),B(e=>e.triggerElement),B(e=>e.positionerElement),B(e=>e.listElement),B(e=>e.scrollUpArrowVisible),B(e=>e.scrollDownArrowVisible),B(e=>e.hasScrollArrows),B(e=>{const{multiple:t,value:n,itemToStringValue:a}=e;return t&&Array.isArray(n)&&n.length===0?"":_A(n,a)});({..._i,...Qt});({...it});({...it});({...it});({...Qt});B(e=>e.disabled),B(e=>e.instantType),B(e=>e.openMethod),B(e=>e.openChangeReason),B(e=>e.modal),B(e=>e.stickIfOpen),B(e=>e.titleElementId),B(e=>e.descriptionElementId),B(e=>e.openOnHover),B(e=>e.closeDelay);({...it});({...it});({...Qt});let Dx=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fl.startingStyle]="startingStyle",e[e.endingStyle=Fl.endingStyle]="endingStyle",e}({});Dx.open+"";Dx.closed+"";({...it});up();up();({...it});({...it});const S5=["−","-","‒","–","—","﹣"],E5=["+","﹢"],x5=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),Lx=e=>`[${e.map(x5).join("")}]`;Lx(["-"].concat(S5));Lx(["+"].concat(E5));({...Qt});({...it});({...it});function T0({content:e,children:t,align:n,asChild:a,side:r,className:l,...o}){return U.jsxs(VO,{...o,children:[U.jsx(JO,{className:l,render:a?t:void 0,children:a?void 0:t}),U.jsx(tA,{children:U.jsx(iA,{align:n,side:r,sideOffset:10,children:U.jsxs(dA,{className:Pu("flex origin-[var(--transform-origin)] flex-col rounded-md bg-kumo-base px-2.5 py-1.5 text-sm text-kumo-default","shadow-lg shadow-kumo-tip-shadow outline outline-kumo-fill","transition-[transform,opacity] duration-150","data-[starting-style]:scale-90 data-[starting-style]:opacity-0","data-[ending-style]:scale-90 data-[ending-style]:opacity-0","data-[instant]:duration-0","kumo-tooltip-popup"),children:[U.jsx(hA,{className:Pu("flex","data-[side=bottom]:top-[-8px]","data-[side=left]:right-[-13px] data-[side=left]:rotate-90","data-[side=right]:left-[-13px] data-[side=right]:-rotate-90","data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"),children:U.jsx(w5,{})}),e]})})})]})}function w5(e){return U.jsxs("svg",{width:"20",height:"10",viewBox:"0 0 20 10",fill:"none",...e,children:[U.jsx("path",{d:"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",className:"fill-kumo-base"}),U.jsx("path",{d:"M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z",className:"fill-kumo-tip-shadow"}),U.jsx("path",{d:"M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z",className:"fill-kumo-tip-stroke"})]})}const R5=e=>m.createElement("svg",{width:32,height:32,viewBox:"0 0 66 30",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("path",{d:"M52.688 13.028c-.22 0-.437.008-.654.015a.3.3 0 0 0-.102.024.37.37 0 0 0-.236.255l-.93 3.249c-.401 1.397-.252 2.687.422 3.634.618.876 1.646 1.39 2.894 1.45l5.045.306a.45.45 0 0 1 .435.41.5.5 0 0 1-.025.223.64.64 0 0 1-.547.426l-5.242.306c-2.848.132-5.912 2.456-6.987 5.29l-.378 1a.28.28 0 0 0 .248.382h18.054a.48.48 0 0 0 .464-.35c.32-1.153.482-2.344.48-3.54 0-7.22-5.79-13.072-12.933-13.072M44.807 29.578l.334-1.175c.402-1.397.253-2.687-.42-3.634-.62-.876-1.647-1.39-2.896-1.45l-23.665-.306a.47.47 0 0 1-.374-.199.5.5 0 0 1-.052-.434.64.64 0 0 1 .552-.426l23.886-.306c2.836-.131 5.9-2.456 6.975-5.29l1.362-3.6a.9.9 0 0 0 .04-.477C48.997 5.259 42.789 0 35.367 0c-6.842 0-12.647 4.462-14.73 10.665a6.92 6.92 0 0 0-4.911-1.374c-3.28.33-5.92 3.002-6.246 6.318a7.2 7.2 0 0 0 .18 2.472C4.3 18.241 0 22.679 0 28.133q0 .74.106 1.453a.46.46 0 0 0 .457.402h43.704a.57.57 0 0 0 .54-.418"})),C5=e=>m.createElement("svg",{width:20,height:20,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("path",{fill:"currentColor",d:"M22 44.95h-7v-4h7zm-7-8h7v-4h-7zm7-8h-7v-4h7zm4 16h23v-4H26zm23-8H26v-4h23zm-23-8h23v-4H26z"}),m.createElement("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"m6 12 2-2h19l1.675.907 3.408 5.225H56l2 2V52l-2 2H8l-2-2zm4 2v36h44V20.132H31l-1.675-.908L25.917 14z"}));function M0({emptyLabel:e,error:t,icon:n,items:a,loading:r,title:l}){return U.jsxs(a6,{defaultOpen:!0,className:"py-0.5",children:[U.jsxs(x6,{className:"group flex items-center gap-2 w-[calc(100%-0.25rem)] ml-1 p-3 bg-transparent font-semibold text-xs text-text cursor-pointer transition-colors rounded-l-md hover:bg-surface-tertiary",children:[U.jsx(PS,{className:"w-3.5 h-3.5 text-muted transition-transform duration-200 group-data-panel-open:rotate-90",weight:"bold"}),U.jsx(n,{className:"w-4 h-4 text-muted"}),l]}),U.jsx(T6,{className:"overflow-hidden transition-[height,opacity] duration-200 ease-out data-starting-style:h-0 data-starting-style:opacity-0 data-ending-style:h-0 data-ending-style:opacity-0",children:U.jsxs("ul",{className:"list-none ml-3 pl-3 space-y-0.5 border-l border-border",children:[r?U.jsx("li",{className:"py-1.5 px-2 text-text-secondary text-sm",children:"Loading..."}):null,t?U.jsx("li",{className:"py-1.5 px-2 text-danger text-sm",children:t}):null,!r&&!t?a.map(o=>U.jsx("li",{children:U.jsx(Hh,{className:Pu("block py-2.5 px-2 text-text text-sm no-underline rounded-l-md cursor-pointer transition-colors hover:bg-surface-tertiary",{"bg-primary/10 text-primary font-medium":o.isActive}),params:o.link.params,search:o.link.search,to:o.link.to,children:o.label})},o.id)):null,!r&&!t&&a.length===0&&U.jsx("li",{className:"py-1.5 px-2 text-text-secondary text-sm italic",children:e})]})})]})}function T5({currentPath:e,d1Error:t,databases:n,kvError:a,loading:r,namespaces:l}){return U.jsxs("aside",{className:"w-sidebar bg-bg-secondary border-r border-border flex flex-col",children:[U.jsxs("a",{className:"flex items-center gap-2.5 p-4 min-h-16.75 box-border",href:"/",children:[U.jsx(R5,{className:"shrink-0 text-primary"}),U.jsxs("div",{className:"flex flex-col gap-px",children:[U.jsx("span",{className:"text-sm font-semibold text-text leading-tight",children:"Local Explorer"}),U.jsx("span",{className:"text-[10px] font-medium text-text-secondary uppercase tracking-wide",children:"Cloudflare DevTools"})]})]}),U.jsx(M0,{emptyLabel:"No namespaces",error:a,icon:C5,items:l.map(o=>({id:o.id,isActive:e===`/kv/${o.id}`,label:o.title,link:{params:{namespaceId:o.id},to:"/kv/$namespaceId"}})),loading:r,title:"KV Namespaces"}),U.jsx(M0,{emptyLabel:"No databases",error:t,icon:qS,items:n.map(o=>({id:o.uuid,isActive:e===`/d1/${o.uuid}`,label:o.name,link:{params:{databaseId:o.uuid},search:{table:void 0},to:"/d1/$databaseId"}})),loading:r,title:"D1 Databases"})]})}const jc=cR({component:M5});function M5(){const[e,t]=m.useState([]),[n,a]=m.useState([]),[r,l]=m.useState(!0),[o,i]=m.useState(null),[s,u]=m.useState(null),f=rn().location.pathname;return m.useEffect(()=>{async function d(){var v,E;const[h,p]=await Promise.allSettled([pT(),gT()]);h.status==="fulfilled"?t(((v=h.value.data)==null?void 0:v.result)??[]):i(`KV Error: ${h.reason instanceof Error?h.reason.message:JSON.stringify(h.reason)}`),p.status==="fulfilled"?a(((E=p.value.data)==null?void 0:E.result)??[]):u(`D1 Error: ${p.reason instanceof Error?p.reason.message:JSON.stringify(p.reason)}`),l(!1)}d()},[]),U.jsxs("div",{className:"flex min-h-screen",children:[U.jsx(T5,{currentPath:f,d1Error:s,databases:n,kvError:o,loading:r,namespaces:e}),U.jsx("main",{className:"flex-1 overflow-y-auto flex flex-col",children:U.jsx(mv,{})})]})}const O5="modulepreload",A5=function(e){return"/cdn-cgi/explorer/"+e},O0={},wp=function(t,n,a){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),i=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(s=>{if(s=A5(s),s in O0)return;O0[s]=!0;const u=s.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":O5,u||(f.as="script"),f.crossOrigin="",f.href=s,i&&f.setAttribute("nonce",i),document.head.appendChild(f),u)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${s}`)))})}))}function l(o){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o}return r.then(o=>{for(const i of o||[])i.status==="rejected"&&l(i.reason);return t().catch(l)})},_5=()=>wp(()=>import("./index-DXBHNrBq.js"),[]),N5=fi("/")({component:Bh(_5,"component")}),k5=()=>wp(()=>import("./_namespaceId-BQCnE1dA.js"),__vite__mapDeps([0,1])),D5=fi("/kv/$namespaceId")({component:Bh(k5,"component")});function L5(e){return`'${e.replace(/'/g,"''")}'`}function z5(e){if(e===void 0)return"DEFAULT";if(e===null)return"NULL";if(typeof e=="string")return L5(e);if(typeof e=="number"||typeof e=="bigint")return e.toString();throw e instanceof ArrayBuffer||Array.isArray(e)?new Error("Blob escape is not supported yet"):new Error(e.toString()+" is unrecognized type of value")}function U5({headers:e,rows:t,transformHeader:n,transformValue:a}){const r=new Set,l=e.map((i,s)=>{const u=n(i,s);let c=u.name,f=1;for(;r.has(c);)c=`${u.name}_${f++}`;return r.add(c),{...u,name:c}}),o=t.map(i=>l.reduce((s,u,c)=>(s[u.name]=a?a(i[c],u):i[c],s),{}));return{headers:l,rows:o}}function j5({data:e}){var r;let n=e.rows.map(l=>({...l,children:[]}));const a=n.reduce((l,o)=>({...l,[o.id]:o}),{});for(const l of n)l.parent&&((r=a[l.parent])==null||r.children.push(l));return n=n.filter(l=>l.parent===0),U.jsx("div",{className:"w-full h-full grow p-8 overflow-auto",children:U.jsx("div",{className:"font-mono text-sm",children:U.jsx(zx,{data:n})})})}function zx({data:e}){return U.jsx(U.Fragment,{children:e.map(t=>{const{label:n,performance:a}=H5(t.detail);return U.jsxs(m.Fragment,{children:[U.jsxs("div",{className:"h-8 flex gap-2 items-center",children:[U.jsx("div",{className:Pu("inline-flex border rounded-full",{"bg-green-500":a==="fast","bg-red-500":a==="slow","bg-yellow-500":a==="medium","bg-gray-500":a==="neutral"}),style:{width:10,height:10,marginLeft:-5}}),U.jsx("div",{children:n})]}),U.jsx("div",{className:"pl-4 border-l",children:U.jsx(zx,{data:t.children})})]},t.id)})})}function H5(e){return e.startsWith("SCAN ")?{performance:"slow",label:U.jsxs("div",{className:"flex items-center",children:[U.jsx("strong",{children:"SCAN "}),U.jsxs("span",{className:"border border-color p-1 mx-2 rounded flex items-center gap-2",children:[U.jsx(YS,{}),e.substring(5)]})]})}:e.startsWith("CORRELATED ")?{performance:"slow",label:U.jsxs("div",{children:[U.jsx(T0,{side:"bottom",content:U.jsxs("div",{className:"flex flex-col gap-2",children:[U.jsxs("div",{children:["This subquery depends on values from the outer query, so it's evaluated once per outer row."," ",U.jsx("strong",{className:"text-red-500",children:"Can be slow on large inputs"}),"."]}),U.jsx("div",{className:"text-green-500",children:"Mitigate by indexing the correlated columns or rewriting as a JOIN + aggregate."})]}),children:U.jsx("strong",{className:"underline cursor-pointer",children:"CORRELATED"})}),U.jsx("span",{children:e.substring(10)})]})}:e.startsWith("SEARCH ")?{performance:"fast",label:U.jsxs("div",{children:[U.jsx("strong",{children:"SEARCH "}),U.jsx("span",{children:e.substring(6)})]})}:e.startsWith("USE TEMP B-TREE FOR ORDER BY")||e.startsWith("USE TEMP B-TREE FOR GROUP BY")||e.startsWith("USE TEMP B-TREE FOR DISTINCT")?{performance:"medium",label:U.jsx(T0,{side:"bottom",content:U.jsxs("div",{className:"flex flex-col gap-2",children:[U.jsxs("div",{children:["SQLite can’t return rows in the requested order/grouping directly, so it gathers them into a temporary structure and processes them before returning results."," ",U.jsx("span",{className:"text-red-500",children:"This adds extra work and grows with result size."})]}),U.jsx("div",{className:"text-green-500",children:"Add an index that matches the clause (ORDER BY / GROUP BY / DISTINCT) to avoid the temp structure."})]}),children:U.jsx("strong",{className:"underline cursor-pointer",children:e})})}:{label:U.jsx("span",{children:e}),performance:"neutral"}}const B5=/^\s+/,V5=/^(`([^`\n]|``)+`|"([^"\n]|"")+"|\[[^\]\n]+\]|[a-zA-Z_][a-zA-Z0-9_]*)/,I5=/^(?:'(?:[^'\n]|'')*'|"(?:[^"\n]|"")*")/,P5=/^\d+(\.\d+)?/,q5=/^:[a-zA-Z_][a-zA-Z0-9_]*/,$5=/^(--.*|\/\*[\s\S]*?\*\/)/,Y5=/^(::|<>|!=|<=|>=|=|<|>|\+|-|\*|\/)/,G5=/^[`,;().]/,Z5=[{matchToken:e=>{var t;return((t=B5.exec(e))==null?void 0:t[0])??null},type:"WHITESPACE"},{matchToken:e=>{var t;return((t=V5.exec(e))==null?void 0:t[0])??null},type:"IDENTIFIER"},{matchToken:e=>{var t;return((t=I5.exec(e))==null?void 0:t[0])??null},type:"STRING"},{matchToken:e=>{var t;return((t=P5.exec(e))==null?void 0:t[0])??null},type:"NUMBER"},{matchToken:e=>{var t;return((t=q5.exec(e))==null?void 0:t[0])??null},type:"PLACEHOLDER"},{matchToken:e=>{var t;return((t=$5.exec(e))==null?void 0:t[0])??null},type:"COMMENT"},{matchToken:e=>{var t;return((t=Y5.exec(e))==null?void 0:t[0])??null},type:"OPERATOR"},{matchToken:e=>{var t;return((t=G5.exec(e))==null?void 0:t[0])??null},type:"PUNCTUATION"}];function Rp(e,t){try{const n=new Array,a=e.length;let r=0,l="";for(;r<a;){let o=!1;const i=e.substring(r);for(const{type:s,matchToken:u}of Z5){const c=u(i);if(c){l!==""&&(n.push({type:"UNKNOWN",value:l}),l=""),n.push({type:s,value:c}),r+=c.length,o=!0;break}}o||(l+=i[0],r++)}return l!==""&&n.push({type:"UNKNOWN",value:l}),n}catch{return[{type:"SQL",value:e}]}}class K5{constructor(){pe(this,"dialect","sqlite");pe(this,"isSupportDropTable",!0);pe(this,"isSupportEditTable",!0);pe(this,"isSupportExplain",!1);pe(this,"isSupportReturningValue",!1);pe(this,"isSupportRowid",!1)}}class X5 extends K5{constructor(t){super(),this.conn=t}escapeValue(t){return z5(t)}getColumnTypeHint(){return null}async query(t){return this.conn.query(t)}async transaction(t){return this.conn.transaction(t)}async batch(t){if(this.conn.batch)return this.conn.batch(t);const n=[];for(const a of t){const r=await this.query(a);n.push(r)}return n}async dropTable(t,n){await this.query(`DROP TABLE ${this.escapeId(t)}.${this.escapeId(n)}`)}generateTableSchemaStatement(t){throw new Error("Not yet implemented")}async findFirst(t,n,a){const r=Object.entries(a).map(([o,i])=>`${this.escapeId(o)} = ${this.escapeValue(i)}`).join(" AND "),l=`SELECT * FROM ${this.escapeId(t)}.${this.escapeId(n)} ${r?"WHERE "+r:""} LIMIT 1 OFFSET 0`;return this.query(l)}createMutationStatements(t,n,a,r){r&&a.forEach(o=>Q5(o,r));const l=this.isSupportRowid&&!(r!=null&&r.withoutRowId);return a.map(o=>o.operation==="INSERT"?W5(this,t,n,o.values,this.isSupportReturningValue,l):o.operation==="DELETE"?t_(this,t,n,o.where):e_(this,t,n,o.values,o.where,this.isSupportReturningValue,l))}async mutateTableRows(t,n,a,r){var s;const l=this.createMutationStatements(t,n,a,r),o=await this.transaction(l),i=[];for(let u=0;u<o.length;u++){const c=o[u],f=a[u];if(!c||!f){i.push({});continue}const{operation:d}=f;if(d==="UPDATE"){if(c.rows.length===1)i.push({record:c.rows[0]});else{const h=await this.findFirst(t,n,f.where);i.push({lastId:c.lastInsertRowid,record:h.rows[0]})}continue}if(d==="INSERT"){if(c.rows.length===1)i.push({record:c.rows[0]});else if(f.autoIncrementPkColumn){const h=await this.findFirst(t,n,{[f.autoIncrementPkColumn]:c.lastInsertRowid});i.push({lastId:c.lastInsertRowid,record:h.rows[0]})}else if((s=f.pk)!=null&&s.length){const h=f.pk.reduce((v,E)=>(v[E]=f.values[E],v),{}),p=await this.findFirst(t,n,h);i.push({lastId:c.lastInsertRowid,record:p.rows[0]})}else i.push({});continue}i.push({})}return i}buildExplainStatement(t){throw new Error("Not implemented")}getQueryTabOverride(t,n){return null}}function Q5(e,t){const{operation:n}=e,{pk:a,autoIncrement:r}=t,l=n!=="INSERT"?e.where:{},o=n!=="DELETE"?e.values:{},i=a.some(u=>l[u]==null),s=a.some(u=>(u in o?o[u]:l[u])==null);if(a.length===0)throw new Error("This table has no primary key. Unsafe to perform insert, update, or delete operations.");switch(n){case"DELETE":if(i)throw new Error("Cannot delete a row with NULL in primary key columns.");break;case"UPDATE":if(i)throw new Error("Cannot update a row with NULL in primary key columns.");if(s)throw new Error("Cannot update a row causing NULL in primary key columns.");break;case"INSERT":{const u=a[0];if(r&&u&&o[u]===null)throw new Error("Cannot insert a row with NULL in the auto-increment primary key column.");if(!r&&s)throw new Error("Cannot insert a row with NULL in primary key columns.");break}}}function Ux(e,t){const n=Object.entries(t).map(([a,r])=>r==null?`${e.escapeId(a)} IS NULL`:`${e.escapeId(a)} = ${e.escapeValue(r)}`).join(" AND ");return n.length>0?"WHERE "+n:null}function F5(e,t){return Object.entries(t).map(([n,a])=>`${e.escapeId(n)} = ${e.escapeValue(a)}`).join(", ")}function J5(e,t){const n=[],a=[];for(const[r,l]of Object.entries(t))n.push(e.escapeId(r)),a.push(e.escapeValue(l));return`(${n.join(", ")}) VALUES(${a.join(", ")})`}function W5(e,t,n,a,r,l){return["INSERT INTO",`${e.escapeId(t)}.${e.escapeId(n)}`,J5(e,a),r?`RETURNING ${l?"rowid, ":""}*`:""].join(" ")}function e_(e,t,n,a,r,l,o){return["UPDATE",`${e.escapeId(t)}.${e.escapeId(n)}`,"SET",F5(e,a),Ux(e,r),l?`RETURNING ${o?"rowid, ":""}*`:""].filter(Boolean).join(" ")}function t_(e,t,n,a){return["DELETE FROM",`${e.escapeId(t)}.${e.escapeId(n)}`,Ux(e,a)].filter(Boolean).join(" ")}function jx(e,t){if(e===t)return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!jx(e[r],t[r]))return!1;return!0}function A0(e,t){const n={...e};for(const a of t)delete n[a];return n}function Ff(e){return e.length>=2&&e.startsWith("(")&&e.endsWith(")")?e:`(${e})`}function Jf(e,t){var l,o,i,s,u,c,f,d,h,p,v;const n=[e.escapeId(t.name),t.type];(l=t.constraint)!=null&&l.primaryKey&&n.push(["PRIMARY KEY",t.constraint.primaryKeyOrder,t.constraint.primaryKeyConflict?`ON CONFLICT ${t.constraint.primaryKeyConflict}`:void 0,t.constraint.autoIncrement?"AUTOINCREMENT":void 0].filter(Boolean).join(" ")),(o=t.constraint)!=null&&o.unique&&n.push(["UNIQUE",t.constraint.uniqueConflict?`ON CONFLICT ${t.constraint.uniqueConflict}`:void 0].filter(Boolean).join(" ")),(i=t.constraint)!=null&&i.notNull&&n.push(["NOT NULL",t.constraint.notNullConflict?`ON CONFLICT ${t.constraint.notNullConflict}`:void 0].filter(Boolean).join(" ")),(s=t.constraint)!=null&&s.defaultValue&&n.push(["DEFAULT",e.escapeValue(t.constraint.defaultValue)].join(" ")),(u=t.constraint)!=null&&u.defaultExpression&&n.push(["DEFAULT",Ff(t.constraint.defaultExpression)].join(" ")),(c=t.constraint)!=null&&c.generatedExpression&&n.push(["GENERATED ALWAYS AS",Ff(t.constraint.generatedExpression),t.constraint.generatedType].join(" ")),(f=t.constraint)!=null&&f.checkExpression&&n.push("CHECK "+Ff(t.constraint.checkExpression));const a=(h=(d=t.constraint)==null?void 0:d.foreignKey)==null?void 0:h.foreignTableName,r=(((v=(p=t.constraint)==null?void 0:p.foreignKey)==null?void 0:v.foreignColumns)??[void 0])[0];return a&&r&&n.push(["REFERENCES",e.escapeId(a)+`(${e.escapeId(r)})`].join(" ")),n.join(" ")}function n_(e,t){var n,a,r,l;return t.primaryKey?`PRIMARY KEY (${(n=t.primaryColumns)==null?void 0:n.map(e.escapeId).join(", ")})`:t.unique?`UNIQUE (${(a=t.uniqueColumns)==null?void 0:a.map(e.escapeId).join(", ")})`:t.checkExpression!==void 0?`CHECK (${t.checkExpression})`:t.foreignKey?`FOREIGN KEY (${(r=t.foreignKey.columns)==null?void 0:r.map(e.escapeId).join(", ")}) REFERENCES ${e.escapeId(t.foreignKey.foreignTableName??"")} (${(l=t.foreignKey.foreignColumns)==null?void 0:l.map(e.escapeId).join(", ")})`:""}function a_(e,t){var l;const n=!t.name.old,a=[];for(const o of t.columns)o.new===null?a.push(`DROP COLUMN ${e.escapeId(((l=o.old)==null?void 0:l.name)??"")}`):o.old===null?n?a.push(Jf(e,o.new)):a.push("ADD "+Jf(e,o.new)):(o.new.name!==o.old.name&&a.push(`RENAME COLUMN ${e.escapeId(o.old.name)} TO ${e.escapeId(o.new.name)}`),jx(A0(o.old,["name"]),A0(o.new,["name"]))||a.push(`ALTER COLUMN ${e.escapeId(o.new.name)} TO ${Jf(e,o.new)}`));for(const o of t.constraints)o.new&&n&&a.push(n_(e,o.new));if(n||t.name.new!==t.name.old&&a.push(`RENAME TO ${e.escapeId(t.name.new??"")}`),n)return[`CREATE TABLE ${e.escapeId(t.schemaName??"main")}.${e.escapeId(t.name.new||"no_table_name")}(
|
||
${a.map(o=>" "+o).join(`,
|
||
`)}
|
||
)`];const r=`ALTER TABLE ${e.escapeId(t.schemaName??"main")}.${e.escapeId(t.name.old??"")} `;return a.map(o=>r+o)}function Sh(e){let t=e.replace(/^["`[]/g,"");return t=t.replace(/["`\]]$/g,""),t=t.replace(/""/g,'"'),t}class Hc{constructor(t){pe(this,"ptr",0);for(this.tokens=t;this.tokens.length>0&&this.tokens[0].type==="WHITESPACE";)this.tokens.shift();for(;this.tokens.length>0&&this.tokens[this.tokens.length-1].type==="WHITESPACE";)this.tokens.pop();this.tokens=t}getPointer(){return this.ptr}toStringRange(t,n){return this.tokens.slice(t,n).map(a=>a.value).join("")}read(){return this.end()?"":this.tokens[this.ptr].value}consumeBlock(){return this.match("(")?this.consumeParen().toString():this.consume()}currentType(){return this.tokens[this.ptr].type}consumeParen(){if(this.read()!=="(")throw new Error("Expecting (");const t=this.ptr+1;let n=1;for(;n>0;){if(!this.next())throw new Error("Expecting closing paren");this.read()==="("&&n++,this.read()===")"&&n--}const a=new Hc(this.tokens.slice(t,this.ptr));return this.next(),a}consume(){const t=this.read();return this.next(),t}consumeIdentifier(){const t=Sh(this.read());return this.next(),t}expectToken(t){if(!this.match(t))throw new Error(`Expecting ${t}`);this.next()}expectTokenOptional(t){this.match(t)&&this.next()}expectTokensOptional(t){if(t.length===0)return;const[n]=t;if(this.match(n)){this.next();for(const a of t.slice(1))this.expectToken(a)}}expectTokens(t){for(const n of t)this.expectToken(n)}next(){for(this.ptr=this.ptr+1;this.ptr<this.tokens.length;this.ptr++)if(this.currentType()!=="WHITESPACE")return!0;return!1}match(t){return this.end()?!1:this.read().toLowerCase()===t.toLowerCase()}matchTokens(t){return t.some(n=>this.read().toLowerCase()===n.toLowerCase())}end(){return this.ptr>=this.tokens.length}toString(){return this.tokens.map(t=>t.value).join("")}toStringWithParen(){return"("+this.toString()+")"}}function r_(e,t){const n=t.consumeIdentifier();if(!n)return null;let a=t.read();[",","CHECK","COLLATE","CONSTRAINT","DEFAULT","GENERATED","NOT","PRIMARY","REFERENCES","UNIQUE"].includes(a.toUpperCase())?a="":t.next(),t.match("(")&&(a+=t.consumeParen().toStringWithParen());const r=Ft(e,t);return{name:n,pk:r==null?void 0:r.primaryKey,constraint:r,type:a}}function Wf(e){if(e.match("ON")&&(e.next(),!!e.match("CONFLICT")&&(e.next(),!e.end()))){const t=e.read().toUpperCase();return e.next(),t}}function Vo(e){const t=[];for(;!e.end()&&(t.push(e.consumeIdentifier()),!!e.match(","));)e.next();return t}function Ft(e,t){var n,a;if(t.match("CONSTRAINT")){t.next();const r=t.consume();return{...Ft(e,t),name:r}}else if(t.match("PRIMARY")){let r,l,o=!1;if(t.next(),!t.match("KEY"))throw new Error("PRIMARY must follow by KEY");t.next(),t.match("(")&&(l=Vo(t.consumeParen())),t.match("ASC")?(r="ASC",t.next()):t.match("DESC")&&(r="DESC",t.next());const i=Wf(t);return t.match("AUTOINCREMENT")&&(o=!0,t.next()),{primaryKey:!0,primaryKeyOrder:r,primaryColumns:l,autoIncrement:o,primaryKeyConflict:i,...Ft(e,t)}}else if(t.match("NOT")){if(t.next(),!t.match("NULL"))throw new Error("NOT should follow by NULL");return t.next(),{notNull:!0,notNullConflict:Wf(t),...Ft(e,t)}}else{if(t.match("NULL"))return t.next(),{notNull:!1,...Ft(e,t)};if(t.match("UNIQUE")){let r;return t.next(),t.read()==="("&&(r=Vo(t.consumeParen())),{unique:!0,uniqueConflict:Wf(t),uniqueColumns:r,...Ft(e,t)}}else if(t.match("DEFAULT")){let r,l;return t.next(),t.currentType()==="STRING"?(r=t.read().slice(1,-1),t.next()):t.currentType()==="OPERATOR"?t.match("+")?(t.next(),r=Number(t.read()),t.next()):t.match("-")&&(t.next(),r=-Number(t.read()),t.next()):t.currentType()==="NUMBER"?(r=Number(t.read()),t.next()):t.match("(")?l=t.consumeParen().toString():(t.match("current_timestamp")||t.match("current_time")||t.match("current_date")||t.match("true")||t.match("false")||t.match("null"))&&(l=t.read(),t.next()),{defaultValue:r,defaultExpression:l,...Ft(e,t)}}else{if(t.match("CHECK"))return t.next(),{checkExpression:t.consumeBlock(),...Ft(e,t)};if(t.match("COLLATE")){t.next();const r=t.read();return t.next(),{collate:r,...Ft(e,t)}}else if(t.match("FOREIGN")){if(t.next(),!t.match("KEY"))throw new Error("FOREIGN should follow by KEY");t.next();const r=t.consumeParen(),l=Vo(r),o=Ft(e,t);return{foreignKey:{foreignSchemaName:e,foreignTableName:((n=o==null?void 0:o.foreignKey)==null?void 0:n.foreignTableName)??"",foreignColumns:((a=o==null?void 0:o.foreignKey)==null?void 0:a.foreignColumns)??[],columns:l}}}else if(t.match("REFERENCES")){t.next();const r=t.consumeIdentifier();let l=[];for(;!t.end()&&!t.match("(")&&!t.match(",");)t.next();return t.match("(")&&(l=Vo(t.consumeParen())),{foreignKey:{foreignSchemaName:e,foreignTableName:r,foreignColumns:l},...Ft(e,t)}}else if(t.match("GENERATED")){if(t.next(),!t.match("ALWAYS"))throw new Error("GENERATED should follow by ALWAYS");if(t.next(),!t.match("AS"))throw new Error("GENERATED ALWAYS should follow by AS");t.next();const r=t.consumeBlock();return{generatedType:t.match("STORED")?"STORED":"VIRTUAL",generatedExpression:r,...Ft(e,t)}}}}}function l_(e,t){var o;let n=!0,a=!1;const r=new Array,l=new Array;for(;n;){if(n=!1,t.matchTokens(["CHECK","CONSTRAINT","FOREIGN","PRIMARY","UNIQUE"])){const i=Ft(e,t);i&&(a=!0,l.push(i),n=!0)}else if(!a){const i=r_(e,t);i&&(r.push(i),n=!0)}for(;t.read()!==","&&!t.end();)t.next();if(t.end())break;t.next()}for(const i of l)if(i.primaryKey&&i.primaryColumns)for(const s of i.primaryColumns){const u=r.find(c=>s.toLowerCase()===c.name.toLowerCase());u&&(u.pk=!0)}for(const i of r){const s=(o=i.constraint)==null?void 0:o.foreignKey;s!=null&&s.foreignColumns&&s.foreignColumns.length===0&&(s.foreignColumns=[i.name])}return{columns:r,constraints:l}}function o_(e){if(!e)return{};let t,n;const a=e;for(;!a.end();)a.match("content")?(a.next(),a.match("=")&&(a.next(),a.end()||(t=Sh(a.read()),a.next()))):a.match("content_rowid")&&(a.next(),a.match("=")&&(a.next(),a.end()||(n=Sh(a.read()),a.next()))),a.next();return{content:t,contentRowId:n}}function Eh(e){if(e.match("WITHOUT")){if(e.next(),e.match("ROWID"))return e.next(),e.match(",")?(e.next(),{withoutRowId:!0,...Eh(e)}):{withoutRowId:!0}}else if(e.match("STRICT"))return e.next(),e.match(",")?(e.next(),{strict:!0,...Eh(e)}):{strict:!0}}function _0(e,t){const n=new Hc(Rp(t).filter(s=>s.type!=="COMMENT"));n.expectToken("CREATE"),n.expectTokenOptional("TEMP"),n.expectTokenOptional("TEMPORARY"),n.expectTokenOptional("VIRTUAL"),n.expectToken("TABLE"),n.expectTokensOptional(["IF","NOT","EXISTS"]);const a=n.consumeIdentifier();let r;n.match("USING")&&(n.next(),n.match("FTS5")&&(n.next(),r=o_(n.consumeParen())));const l=n.match("(")?l_(e,n.consumeParen()):{columns:[],constraints:[]},o=l.columns.filter(s=>s.pk).map(s=>s.name),i=l.columns.some(s=>{var u;return!!((u=s.constraint)!=null&&u.autoIncrement)});return{schemaName:e,tableName:a,...l,autoIncrement:i,fts5:r,pk:o,...Eh(n)}}function i_(e){const t=new Hc(Rp(e)),n={columns:[],name:"",tableName:"",type:"KEY"};return t.expectToken("CREATE"),t.match("UNIQUE")&&(n.type="UNIQUE",t.next()),t.expectToken("INDEX"),t.expectTokensOptional(["IF","NOT","EXISTS"]),n.name=t.consumeIdentifier(),t.expectToken("ON"),n.tableName=t.consumeIdentifier(),t.match("(")&&(n.columns=Vo(t.consumeParen())),n}class s_ extends X5{constructor(){super(...arguments);pe(this,"isSupportEditTable",!0);pe(this,"isSupportExplain",!0);pe(this,"isSupportReturningValue",!0);pe(this,"isSupportRowid",!0)}escapeId(n){return`"${n.replace(/"/g,'""')}"`}getColumnTypeHint(n){return n?(n=n.toUpperCase(),n.includes("TEXT")||n.includes("CHAR")||n.includes("CLOB")||n.includes("STRING")?"TEXT":n.includes("INT")||n.includes("NUMBER")||n.includes("REAL")||n.includes("DOUBLE")||n.includes("FLOAT")?"NUMBER":n.includes("BLOB")?"BLOB":"TEXT"):null}async schemas(){const n="main",a=await this.query("SELECT * FROM sqlite_master;");let r=new Array;const l=a.rows;for(const s of l)if(s.type==="table")try{r.push({type:"table",schemaName:n,name:s.name,tableSchema:{..._0(n,s.sql),createScript:s.sql}})}catch{console.warn(`Failed to parse schema for table: ${s.name}`),r.push({type:"table",name:s.name,schemaName:n})}else s.type==="trigger"?r.push({type:"trigger",name:s.name,tableName:s.tbl_name,schemaName:n}):s.type==="view"&&r.push({type:"view",name:s.name,schemaName:n});const o=r.filter(s=>{var u;return(u=s.tableSchema)==null?void 0:u.fts5}).map(s=>s.name),i=new Set(o.map(s=>[`${s}_content`,`${s}_idx`,`${s}_docsize`,`${s}_config`,`${s}_data`]).flat());return r=r.filter(s=>!i.has(s.name)),{[n]:r}}async tableSchema(n,a){const r=`SELECT * FROM ${this.escapeId(n)}.sqlite_schema WHERE tbl_name = ${this.escapeValue(a)} AND "type" IN ('table', 'view', 'index');`,o=(await this.query(r)).rows,i=o.filter(c=>c.type==="index"&&c.sql!==null),s=[];for(const c of i)try{s.push(i_(c.sql))}catch{continue}const u=o.find(c=>c.type==="table"||c.type==="view");if(!u)throw new Error("Unexpected error finding table "+a);if(u.type==="view")return this.getFallbackTableSchema(n,a);try{const c=u.sql,f={..._0(n,c),createScript:c,indexes:s,schemaName:n,type:"table"};return f.fts5?{...await this.getFallbackTableSchema(n,a),fts5:f.fts5}:f}catch{throw new Error(`Failed to parse CREATE TABLE script for '${a}'`)}}async getFallbackTableSchema(n,a){const r=`SELECT * FROM ${this.escapeId(n)}.pragma_table_info(${this.escapeValue(a)});`,i=(await this.query(r)).rows.map(s=>({name:s.name,pk:!!s.pk,type:s.type}));return{autoIncrement:!1,columns:i,pk:i.filter(s=>s.pk).map(s=>s.name),schemaName:n,tableName:a}}async selectTable(n,a,r){const l=await this.tableSchema(n,a),{limit:o,offset:i,orderByColumn:s,orderByDirection:u}=r,c=!l.fts5&&l.pk.length===0&&!l.withoutRowId&&!l.columns.find(S=>S.name==="rowid")&&l.type==="table";c&&(l.columns=[{constraint:{primaryKey:!0,autoIncrement:!0},name:"rowid",type:"INTEGER"},...l.columns],l.pk=["rowid"],l.autoIncrement=!0);const f=`${this.escapeId(n)}.${this.escapeId(a)}`;let d="*";c?d="rowid, *":l.fts5&&(d="rank, *");const h=`SELECT ${d} FROM ${f}`,p=s&&u&&["ASC","DESC"].includes(u)?`ORDER BY ${this.escapeId(s)} ${u}`:"",v=`LIMIT ${this.escapeValue(o)} OFFSET ${this.escapeValue(i)}`,E=r.whereRaw?`WHERE ${r.whereRaw}`:"",g=[h,E,p,v].filter(Boolean).join(" "),y=await this.conn.query(g);return l.fts5?{result:y,schema:{...l,columns:[{name:"rank",type:"INTEGER"},...l.columns]}}:{result:y,schema:l}}generateTableSchemaStatement(n){return a_(this,n)}buildExplainStatement(n){const l=Rp(n.trim()).filter(o=>o.type!=="COMMENT").map(o=>o.value==="?"?{type:"STRING",value:"''"}:o).map(o=>o.value).join("").replace(/^(?!EXPLAIN\s+QUERY\s+PLAN\b)(?:EXPLAIN\b(?:\s+ANALYZE\b)?\s*)?/i,"EXPLAIN QUERY PLAN ");if(!l.startsWith("EXPLAIN QUERY PLAN "))throw new Error("Explain statement must start with EXPLAIN QUERY PLAN");return l}getQueryTabOverride(n,a){return n.toUpperCase().startsWith("EXPLAIN QUERY PLAN ")?{component:j5({data:a}),icon:$S,label:"Explain"}:null}}class u_{constructor(t){this.databaseId=t}async query(t){const[n]=await this.transaction([t]);if(!n)throw new Error("No result returned from query");return n}async transaction(t){var r;const n=t.map(l=>l.trim().replace(/;+$/,"")),a=await yT({body:{sql:n.join(";")},path:{database_id:this.databaseId}});if(!((r=a.data)!=null&&r.result))throw new Error("Invalid response: missing result data");return a.data.result.map(l=>this.transformResult(l))}transformResult(t){var a,r,l,o,i,s,u;const n=((a=t.results)==null?void 0:a.rows)??[];return{...U5({headers:((r=t.results)==null?void 0:r.columns)??[],rows:n,transformHeader:c=>({name:c,displayName:c})}),lastInsertRowid:(l=t.meta)==null?void 0:l.last_row_id,stat:{queryDurationMs:((o=t.meta)==null?void 0:o.duration)??null,rowsAffected:((i=t.meta)==null?void 0:i.changes)??0,rowsRead:((s=t.meta)==null?void 0:s.rows_read)??null,rowsWritten:((u=t.meta)==null?void 0:u.rows_written)??null,rowCount:n.length}}}}class c_ extends s_{constructor(t){super(new u_(t))}async schemas(){const t=await super.schemas(),n=new Set(["_cf_METADATA"]);return Object.fromEntries(Object.entries(t).map(([a,r])=>[a,r.filter(l=>!n.has(l.name))]))}}const f_=()=>wp(()=>import("./_databaseId-s-ZBH3Ks.js"),__vite__mapDeps([2,1])),d_=fi("/d1/$databaseId")({component:Bh(f_,"component"),loader:async e=>({tables:((await new c_(e.params.databaseId).schemas()).main??[]).filter(l=>l.type==="table"||l.type==="view").map(l=>({label:l.name,value:l.name})).sort((l,o)=>l.label.localeCompare(o.label))}),validateSearch:e=>({table:typeof e.table=="string"?e.table:void 0})}),h_=N5.update({id:"/",path:"/",getParentRoute:()=>jc}),m_=D5.update({id:"/kv/$namespaceId",path:"/kv/$namespaceId",getParentRoute:()=>jc}),p_=d_.update({id:"/d1/$databaseId",path:"/d1/$databaseId",getParentRoute:()=>jc}),g_={IndexRoute:h_,D1DatabaseIdRoute:p_,KvNamespaceIdRoute:m_},y_=jc._addFileChildren(g_)._addFileTypes(),v_=vR({routeTree:y_,basepath:"/cdn-cgi/explorer/"}),N0=document.getElementById("root");N0&&Q4.createRoot(N0).render(U.jsx(m.StrictMode,{children:U.jsx(ER,{router:v_})}));export{G_ as $,dS as A,Wd as B,N_ as C,__ as D,xr as E,j_ as F,yS as G,D_ as H,z_ as I,M_ as J,y6 as K,TS as L,ah as M,U_ as N,E_ as O,C_ as P,C5 as Q,D5 as R,R5 as S,x_ as T,w_ as U,R_ as V,tr as W,T0 as X,X_ as Y,F_ as Z,Y_ as _,QT as a,Q_ as a0,q_ as a1,$_ as a2,Z_ as a3,K_ as a4,J_ as a5,rN as a6,eN as a7,aN as a8,tN as a9,d_ as aA,jh as aB,c_ as aC,qS as aD,Hh as aE,gS as aF,CS as aG,at as aH,Oy as aI,Hm as aJ,wS as aK,ZT as aL,MS as aM,Ay as aN,r6 as aO,p6 as aP,h6 as aQ,s6 as aR,V_ as aS,d6 as aT,I_ as aU,P_ as aV,Uw as aW,Yw as aX,CT as aY,Ti as aZ,nN as aa,oN as ab,iN as ac,lN as ad,m5 as ae,uN as af,pN as ag,vN as ah,hN as ai,W_ as aj,cN as ak,yN as al,gN as am,sN as an,fN as ao,mN as ap,dN as aq,SN as ar,PS as as,bN as at,T_ as au,jT as av,qT as aw,B_ as ax,jx as ay,YS as az,Vr as b,C6 as c,IT as d,xc as e,pS as f,oo as g,Bm as h,RS as i,U as j,$T as k,L_ as l,O_ as m,zt as n,H_ as o,$i as p,jm as q,m as r,vS as s,A_ as t,xn as u,b6 as v,k_ as w,PT as x,Um as y,Pu as z};
|