const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/handlers-BZMpTxHj.js","assets/index-Ba6sSZJj.js","assets/handleRequest-DkR_syvk.js","assets/index-0OsKgfwZ.js"])))=>i.map(i=>d[i]);
var yO=Object.defineProperty;var X$=e=>{throw TypeError(e)};var xO=(e,t,n)=>t in e?yO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var iu=(e,t,n)=>xO(e,typeof t!="symbol"?t+"":t,n),_0=(e,t,n)=>t.has(e)||X$("Cannot "+n);var _=(e,t,n)=>(_0(e,t,"read from private field"),n?n.call(e):t.get(e)),Ce=(e,t,n)=>t.has(e)?X$("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pe=(e,t,n,r)=>(_0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ie=(e,t,n)=>(_0(e,t,"access private method"),n);var om=(e,t,n,r)=>({set _(o){pe(e,t,o,n)},get _(){return _(e,t,r)}});function M7(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var im=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O7={exports:{}},nv={},_7={exports:{}},Ke={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var mh=Symbol.for("react.element"),bO=Symbol.for("react.portal"),wO=Symbol.for("react.fragment"),$O=Symbol.for("react.strict_mode"),SO=Symbol.for("react.profiler"),EO=Symbol.for("react.provider"),CO=Symbol.for("react.context"),DO=Symbol.for("react.forward_ref"),jO=Symbol.for("react.suspense"),PO=Symbol.for("react.memo"),RO=Symbol.for("react.lazy"),J$=Symbol.iterator;function kO(e){return e===null||typeof e!="object"?null:(e=J$&&e[J$]||e["@@iterator"],typeof e=="function"?e:null)}var L7={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V7=Object.assign,B7={};function _c(e,t,n){this.props=e,this.context=t,this.refs=B7,this.updater=n||L7}_c.prototype.isReactComponent={};_c.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};_c.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function z7(){}z7.prototype=_c.prototype;function p3(e,t,n){this.props=e,this.context=t,this.refs=B7,this.updater=n||L7}var g3=p3.prototype=new z7;g3.constructor=p3;V7(g3,_c.prototype);g3.isPureReactComponent=!0;var e5=Array.isArray,U7=Object.prototype.hasOwnProperty,v3={current:null},q7={key:!0,ref:!0,__self:!0,__source:!0};function H7(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)U7.call(t,r)&&!q7.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:mh,type:e,key:i,ref:a,props:o,_owner:v3.current}}function TO(e,t){return{$$typeof:mh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function y3(e){return typeof e=="object"&&e!==null&&e.$$typeof===mh}function IO(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var t5=/\/+/g;function L0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?IO(""+e.key):t.toString(36)}function up(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case mh:case bO:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+L0(a,0):r,e5(o)?(n="",e!=null&&(n=e.replace(t5,"$&/")+"/"),up(o,t,n,"",function(c){return c})):o!=null&&(y3(o)&&(o=TO(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(t5,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",e5(e))for(var l=0;l<e.length;l++){i=e[l];var u=r+L0(i,l);a+=up(i,t,n,u,o)}else if(u=kO(e),typeof u=="function")for(e=u.call(e),l=0;!(i=e.next()).done;)i=i.value,u=r+L0(i,l++),a+=up(i,t,n,u,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function am(e,t,n){if(e==null)return e;var r=[],o=0;return up(e,r,"","",function(i){return t.call(n,i,o++)}),r}function AO(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 lr={current:null},cp={transition:null},NO={ReactCurrentDispatcher:lr,ReactCurrentBatchConfig:cp,ReactCurrentOwner:v3};function W7(){throw Error("act(...) is not supported in production builds of React.")}Ke.Children={map:am,forEach:function(e,t,n){am(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return am(e,function(){t++}),t},toArray:function(e){return am(e,function(t){return t})||[]},only:function(e){if(!y3(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ke.Component=_c;Ke.Fragment=wO;Ke.Profiler=SO;Ke.PureComponent=p3;Ke.StrictMode=$O;Ke.Suspense=jO;Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NO;Ke.act=W7;Ke.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=V7({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=v3.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)U7.call(t,u)&&!q7.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:mh,type:e.type,key:o,ref:i,props:r,_owner:a}};Ke.createContext=function(e){return e={$$typeof:CO,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:EO,_context:e},e.Consumer=e};Ke.createElement=H7;Ke.createFactory=function(e){var t=H7.bind(null,e);return t.type=e,t};Ke.createRef=function(){return{current:null}};Ke.forwardRef=function(e){return{$$typeof:DO,render:e}};Ke.isValidElement=y3;Ke.lazy=function(e){return{$$typeof:RO,_payload:{_status:-1,_result:e},_init:AO}};Ke.memo=function(e,t){return{$$typeof:PO,type:e,compare:t===void 0?null:t}};Ke.startTransition=function(e){var t=cp.transition;cp.transition={};try{e()}finally{cp.transition=t}};Ke.unstable_act=W7;Ke.useCallback=function(e,t){return lr.current.useCallback(e,t)};Ke.useContext=function(e){return lr.current.useContext(e)};Ke.useDebugValue=function(){};Ke.useDeferredValue=function(e){return lr.current.useDeferredValue(e)};Ke.useEffect=function(e,t){return lr.current.useEffect(e,t)};Ke.useId=function(){return lr.current.useId()};Ke.useImperativeHandle=function(e,t,n){return lr.current.useImperativeHandle(e,t,n)};Ke.useInsertionEffect=function(e,t){return lr.current.useInsertionEffect(e,t)};Ke.useLayoutEffect=function(e,t){return lr.current.useLayoutEffect(e,t)};Ke.useMemo=function(e,t){return lr.current.useMemo(e,t)};Ke.useReducer=function(e,t,n){return lr.current.useReducer(e,t,n)};Ke.useRef=function(e){return lr.current.useRef(e)};Ke.useState=function(e){return lr.current.useState(e)};Ke.useSyncExternalStore=function(e,t,n){return lr.current.useSyncExternalStore(e,t,n)};Ke.useTransition=function(){return lr.current.useTransition()};Ke.version="18.3.1";_7.exports=Ke;var m=_7.exports;const U=pi(m),vf=M7({__proto__:null,default:U},[m]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var FO=m,MO=Symbol.for("react.element"),OO=Symbol.for("react.fragment"),_O=Object.prototype.hasOwnProperty,LO=FO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VO={key:!0,ref:!0,__self:!0,__source:!0};function G7(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)_O.call(t,r)&&!VO.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:MO,type:e,key:i,ref:a,props:o,_owner:LO.current}}nv.Fragment=OO;nv.jsx=G7;nv.jsxs=G7;O7.exports=nv;var s=O7.exports,Ll=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},xc=typeof window>"u"||"Deno"in globalThis;function no(){}function BO(e,t){return typeof e=="function"?e(t):e}function J1(e){return typeof e=="number"&&e>=0&&e!==1/0}function K7(e,t){return Math.max(e+(t||0)-Date.now(),0)}function n5(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==x3(a,t.options))return!1}else if(!yf(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function r5(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ai(t.options.mutationKey)!==ai(i))return!1}else if(!yf(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function x3(e,t){return((t==null?void 0:t.queryKeyHashFn)||ai)(e)}function ai(e){return JSON.stringify(e,(t,n)=>ex(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function yf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!yf(e[n],t[n])):!1}function b3(e,t){if(e===t)return e;const n=o5(e)&&o5(t);if(n||ex(e)&&ex(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,l=n?[]:{};let u=0;for(let c=0;c<a;c++){const d=n?c:i[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(l[d]=void 0,u++):(l[d]=b3(e[d],t[d]),l[d]===e[d]&&e[d]!==void 0&&u++)}return o===a&&u===o?e:l}return t}function _p(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function o5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ex(e){if(!i5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!i5(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function i5(e){return Object.prototype.toString.call(e)==="[object Object]"}function zO(e){return new Promise(t=>{setTimeout(t,e)})}function tx(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?b3(e,t):t}function UO(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function qO(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var rv=Symbol(),Js,Ra,ic,C7,HO=(C7=class extends Ll{constructor(){super();Ce(this,Js);Ce(this,Ra);Ce(this,ic);pe(this,ic,t=>{if(!xc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){_(this,Ra)||this.setEventListener(_(this,ic))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,Ra))==null||t.call(this),pe(this,Ra,void 0))}setEventListener(t){var n;pe(this,ic,t),(n=_(this,Ra))==null||n.call(this),pe(this,Ra,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){_(this,Js)!==t&&(pe(this,Js,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof _(this,Js)=="boolean"?_(this,Js):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Js=new WeakMap,Ra=new WeakMap,ic=new WeakMap,C7),w3=new HO,ac,ka,sc,D7,WO=(D7=class extends Ll{constructor(){super();Ce(this,ac,!0);Ce(this,ka);Ce(this,sc);pe(this,sc,t=>{if(!xc&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){_(this,ka)||this.setEventListener(_(this,sc))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,ka))==null||t.call(this),pe(this,ka,void 0))}setEventListener(t){var n;pe(this,sc,t),(n=_(this,ka))==null||n.call(this),pe(this,ka,t(this.setOnline.bind(this)))}setOnline(t){_(this,ac)!==t&&(pe(this,ac,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return _(this,ac)}},ac=new WeakMap,ka=new WeakMap,sc=new WeakMap,D7),Lp=new WO;function GO(e){return Math.min(1e3*2**e,3e4)}function Q7(e){return(e??"online")==="online"?Lp.isOnline():!0}var Z7=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function V0(e){return e instanceof Z7}function Y7(e){let t=!1,n=0,r=!1,o,i,a;const l=new Promise((x,y)=>{i=x,a=y}),u=x=>{var y;r||(g(new Z7(x)),(y=e.abort)==null||y.call(e))},c=()=>{t=!0},d=()=>{t=!1},f=()=>w3.isFocused()&&(e.networkMode==="always"||Lp.isOnline())&&e.canRun(),h=()=>Q7(e.networkMode)&&e.canRun(),p=x=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,x),o==null||o(),i(x))},g=x=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,x),o==null||o(),a(x))},v=()=>new Promise(x=>{var y;o=w=>{(r||f())&&x(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var x;o=void 0,r||(x=e.onContinue)==null||x.call(e)}),b=()=>{if(r)return;let x;try{x=e.fn()}catch(y){x=Promise.reject(y)}Promise.resolve(x).then(p).catch(y=>{var D;if(r)return;const w=e.retry??(xc?0:3),S=e.retryDelay??GO,C=typeof S=="function"?S(n,y):S,E=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,y);if(t||!E){g(y);return}n++,(D=e.onFail)==null||D.call(e,n,y),zO(C).then(()=>f()?void 0:v()).then(()=>{t?g(y):b()})})};return{promise:l,cancel:u,continue:()=>(o==null||o(),l),cancelRetry:c,continueRetry:d,canStart:h,start:()=>(h()?b():v().then(b),l)}}function KO(){let e=[],t=0,n=h=>{h()},r=h=>{h()},o=h=>setTimeout(h,0);const i=h=>{o=h},a=h=>{let p;t++;try{p=h()}finally{t--,t||c()}return p},l=h=>{t?e.push(h):o(()=>{n(h)})},u=h=>(...p)=>{l(()=>{h(...p)})},c=()=>{const h=e;e=[],h.length&&o(()=>{r(()=>{h.forEach(p=>{n(p)})})})};return{batch:a,batchCalls:u,schedule:l,setNotifyFunction:h=>{n=h},setBatchNotifyFunction:h=>{r=h},setScheduler:i}}var _t=KO(),el,j7,X7=(j7=class{constructor(){Ce(this,el)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),J1(this.gcTime)&&pe(this,el,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xc?1/0:5*60*1e3))}clearGcTimeout(){_(this,el)&&(clearTimeout(_(this,el)),pe(this,el,void 0))}},el=new WeakMap,j7),lc,uc,to,Wn,lh,tl,So,Di,P7,QO=(P7=class extends X7{constructor(t){super();Ce(this,So);Ce(this,lc);Ce(this,uc);Ce(this,to);Ce(this,Wn);Ce(this,lh);Ce(this,tl);pe(this,tl,!1),pe(this,lh,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,to,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,lc,t.state||ZO(this.options)),this.state=_(this,lc),this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={..._(this,lh),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,to).remove(this)}setData(t,n){const r=tx(this.state.data,t,this.options);return Ie(this,So,Di).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ie(this,So,Di).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=_(this,Wn))==null?void 0:r.promise;return(o=_(this,Wn))==null||o.cancel(t),n?n.then(no).catch(no):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(_(this,lc))}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!K7(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,Wn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,Wn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),_(this,to).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(_(this,Wn)&&(_(this,tl)?_(this,Wn).cancel({revert:!0}):_(this,Wn).cancelRetry()),this.scheduleGc()),_(this,to).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ie(this,So,Di).call(this,{type:"invalidate"})}fetch(t,n){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(_(this,Wn))return _(this,Wn).continueRetry(),_(this,Wn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,o={queryKey:this.queryKey,meta:this.meta},i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(pe(this,tl,!0),r.signal)})};i(o);const a=()=>!this.options.queryFn||this.options.queryFn===rv?Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)):(pe(this,tl,!1),this.options.persister?this.options.persister(this.options.queryFn,o,this):this.options.queryFn(o)),l={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(l),(c=this.options.behavior)==null||c.onFetch(l,this),pe(this,uc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Ie(this,So,Di).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta});const u=h=>{var p,g,v,b;V0(h)&&h.silent||Ie(this,So,Di).call(this,{type:"error",error:h}),V0(h)||((g=(p=_(this,to).config).onError)==null||g.call(p,h,this),(b=(v=_(this,to).config).onSettled)==null||b.call(v,this.state.data,h,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return pe(this,Wn,Y7({fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var p,g,v,b;if(h===void 0){u(new Error(`${this.queryHash} data is undefined`));return}this.setData(h),(g=(p=_(this,to).config).onSuccess)==null||g.call(p,h,this),(b=(v=_(this,to).config).onSettled)==null||b.call(v,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:u,onFail:(h,p)=>{Ie(this,So,Di).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{Ie(this,So,Di).call(this,{type:"pause"})},onContinue:()=>{Ie(this,So,Di).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),_(this,Wn).start()}},lc=new WeakMap,uc=new WeakMap,to=new WeakMap,Wn=new WeakMap,lh=new WeakMap,tl=new WeakMap,So=new WeakSet,Di=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...J7(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return V0(o)&&o.revert&&_(this,uc)?{..._(this,uc),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),_t.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,to).notify({query:this,type:"updated",action:t})})},P7);function J7(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Q7(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ZO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Qo,R7,YO=(R7=class extends Ll{constructor(t={}){super();Ce(this,Qo);this.config=t,pe(this,Qo,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??x3(o,n);let a=this.get(i);return a||(a=new QO({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){_(this,Qo).has(t.queryHash)||(_(this,Qo).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=_(this,Qo).get(t.queryHash);n&&(t.destroy(),n===t&&_(this,Qo).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){_t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return _(this,Qo).get(t)}getAll(){return[..._(this,Qo).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>n5(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>n5(t,r)):n}notify(t){_t.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){_t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){_t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Qo=new WeakMap,R7),Zo,Gn,nl,Yo,xa,k7,XO=(k7=class extends X7{constructor(t){super();Ce(this,Yo);Ce(this,Zo);Ce(this,Gn);Ce(this,nl);this.mutationId=t.mutationId,pe(this,Gn,t.mutationCache),pe(this,Zo,[]),this.state=t.state||eD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){_(this,Zo).includes(t)||(_(this,Zo).push(t),this.clearGcTimeout(),_(this,Gn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,Zo,_(this,Zo).filter(n=>n!==t)),this.scheduleGc(),_(this,Gn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){_(this,Zo).length||(this.state.status==="pending"?this.scheduleGc():_(this,Gn).remove(this))}continue(){var t;return((t=_(this,nl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,u,c,d,f,h,p,g,v,b,x,y,w,S,C,E,D;pe(this,nl,Y7({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:($,T)=>{Ie(this,Yo,xa).call(this,{type:"failed",failureCount:$,error:T})},onPause:()=>{Ie(this,Yo,xa).call(this,{type:"pause"})},onContinue:()=>{Ie(this,Yo,xa).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,Gn).canRun(this)}));const n=this.state.status==="pending",r=!_(this,nl).canStart();try{if(!n){Ie(this,Yo,xa).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=_(this,Gn).config).onMutate)==null?void 0:i.call(o,t,this));const T=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));T!==this.state.context&&Ie(this,Yo,xa).call(this,{type:"pending",context:T,variables:t,isPaused:r})}const $=await _(this,nl).start();return await((c=(u=_(this,Gn).config).onSuccess)==null?void 0:c.call(u,$,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,$,t,this.state.context)),await((p=(h=_(this,Gn).config).onSettled)==null?void 0:p.call(h,$,null,this.state.variables,this.state.context,this)),await((v=(g=this.options).onSettled)==null?void 0:v.call(g,$,null,t,this.state.context)),Ie(this,Yo,xa).call(this,{type:"success",data:$}),$}catch($){try{throw await((x=(b=_(this,Gn).config).onError)==null?void 0:x.call(b,$,t,this.state.context,this)),await((w=(y=this.options).onError)==null?void 0:w.call(y,$,t,this.state.context)),await((C=(S=_(this,Gn).config).onSettled)==null?void 0:C.call(S,void 0,$,this.state.variables,this.state.context,this)),await((D=(E=this.options).onSettled)==null?void 0:D.call(E,void 0,$,t,this.state.context)),$}finally{Ie(this,Yo,xa).call(this,{type:"error",error:$})}}finally{_(this,Gn).runNext(this)}}},Zo=new WeakMap,Gn=new WeakMap,nl=new WeakMap,Yo=new WeakSet,xa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),_t.batch(()=>{_(this,Zo).forEach(r=>{r.onMutationUpdate(t)}),_(this,Gn).notify({mutation:this,type:"updated",action:t})})},k7);function eD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fr,uh,T7,JO=(T7=class extends Ll{constructor(t={}){super();Ce(this,Fr);Ce(this,uh);this.config=t,pe(this,Fr,new Map),pe(this,uh,Date.now())}build(t,n,r){const o=new XO({mutationCache:this,mutationId:++om(this,uh)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=sm(t),r=_(this,Fr).get(n)??[];r.push(t),_(this,Fr).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=sm(t);if(_(this,Fr).has(n)){const o=(r=_(this,Fr).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?_(this,Fr).delete(n):_(this,Fr).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=_(this,Fr).get(sm(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=_(this,Fr).get(sm(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){_t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[..._(this,Fr).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>r5(n,r))}findAll(t={}){return this.getAll().filter(n=>r5(t,n))}notify(t){_t.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return _t.batch(()=>Promise.all(t.map(n=>n.continue().catch(no))))}},Fr=new WeakMap,uh=new WeakMap,T7);function sm(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function e_(e){return{onFetch:(t,n)=>{const r=async()=>{var g,v,b,x,y;const o=t.options,i=(b=(v=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:b.direction,a=((x=t.state.data)==null?void 0:x.pages)||[],l=((y=t.state.data)==null?void 0:y.pageParams)||[],u={pages:[],pageParams:[]};let c=!1;const d=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},f=t.options.queryFn&&t.options.queryFn!==rv?t.options.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`)),h=async(w,S,C)=>{if(c)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const E={queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};d(E);const D=await f(E),{maxPages:$}=t.options,T=C?qO:UO;return{pages:T(w.pages,D,$),pageParams:T(w.pageParams,S,$)}};let p;if(i&&a.length){const w=i==="backward",S=w?t_:a5,C={pages:a,pageParams:l},E=S(o,C);p=await h(C,E,w)}else{p=await h(u,l[0]??o.initialPageParam);const w=e??a.length;for(let S=1;S<w;S++){const C=a5(o,p);p=await h(p,C)}}return p};t.options.persister?t.fetchFn=()=>{var o,i;return(i=(o=t.options).persister)==null?void 0:i.call(o,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function a5(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function t_(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}var Gt,Ta,Ia,cc,dc,Aa,fc,hc,I7,n_=(I7=class{constructor(e={}){Ce(this,Gt);Ce(this,Ta);Ce(this,Ia);Ce(this,cc);Ce(this,dc);Ce(this,Aa);Ce(this,fc);Ce(this,hc);pe(this,Gt,e.queryCache||new YO),pe(this,Ta,e.mutationCache||new JO),pe(this,Ia,e.defaultOptions||{}),pe(this,cc,new Map),pe(this,dc,new Map),pe(this,Aa,0)}mount(){om(this,Aa)._++,_(this,Aa)===1&&(pe(this,fc,w3.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,Gt).onFocus())})),pe(this,hc,Lp.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,Gt).onOnline())})))}unmount(){var e,t;om(this,Aa)._--,_(this,Aa)===0&&((e=_(this,fc))==null||e.call(this),pe(this,fc,void 0),(t=_(this,hc))==null||t.call(this),pe(this,hc,void 0))}isFetching(e){return _(this,Gt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return _(this,Ta).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,Gt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=_(this,Gt).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(n.staleTime)&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return _(this,Gt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=_(this,Gt).get(r.queryHash),i=o==null?void 0:o.state.data,a=BO(t,i);if(a!==void 0)return _(this,Gt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _t.batch(()=>_(this,Gt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,Gt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=_(this,Gt);_t.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=_(this,Gt),r={type:"active",...e};return _t.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=_t.batch(()=>_(this,Gt).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(no).catch(no)}invalidateQueries(e={},t={}){return _t.batch(()=>{if(_(this,Gt).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=_t.batch(()=>_(this,Gt).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(no)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(no)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=_(this,Gt).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(no).catch(no)}fetchInfiniteQuery(e){return e.behavior=e_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(no).catch(no)}resumePausedMutations(){return Lp.isOnline()?_(this,Ta).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,Gt)}getMutationCache(){return _(this,Ta)}getDefaultOptions(){return _(this,Ia)}setDefaultOptions(e){pe(this,Ia,e)}setQueryDefaults(e,t){_(this,cc).set(ai(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[..._(this,cc).values()];let n={};return t.forEach(r=>{yf(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){_(this,dc).set(ai(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[..._(this,dc).values()];let n={};return t.forEach(r=>{yf(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={..._(this,Ia).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=x3(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===rv&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{..._(this,Ia).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){_(this,Gt).clear(),_(this,Ta).clear()}},Gt=new WeakMap,Ta=new WeakMap,Ia=new WeakMap,cc=new WeakMap,dc=new WeakMap,Aa=new WeakMap,fc=new WeakMap,hc=new WeakMap,I7),pr,xt,ch,Kn,rl,mc,Xo,dh,pc,gc,ol,il,Na,vc,st,Md,nx,rx,ox,ix,ax,sx,lx,tD,A7,$3=(A7=class extends Ll{constructor(t,n){super();Ce(this,st);Ce(this,pr);Ce(this,xt);Ce(this,ch);Ce(this,Kn);Ce(this,rl);Ce(this,mc);Ce(this,Xo);Ce(this,dh);Ce(this,pc);Ce(this,gc);Ce(this,ol);Ce(this,il);Ce(this,Na);Ce(this,vc,new Set);this.options=n,pe(this,pr,t),pe(this,Xo,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,xt).addObserver(this),s5(_(this,xt),this.options)?Ie(this,st,Md).call(this):this.updateResult(),Ie(this,st,ix).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ux(_(this,xt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ux(_(this,xt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ie(this,st,ax).call(this),Ie(this,st,sx).call(this),_(this,xt).removeObserver(this)}setOptions(t,n){const r=this.options,o=_(this,xt);if(this.options=_(this,pr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");Ie(this,st,lx).call(this),_(this,xt).setOptions(this.options),r._defaulted&&!_p(this.options,r)&&_(this,pr).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,xt),observer:this});const i=this.hasListeners();i&&l5(_(this,xt),o,this.options,r)&&Ie(this,st,Md).call(this),this.updateResult(n),i&&(_(this,xt)!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&Ie(this,st,nx).call(this);const a=Ie(this,st,rx).call(this);i&&(_(this,xt)!==o||this.options.enabled!==r.enabled||a!==_(this,Na))&&Ie(this,st,ox).call(this,a)}getOptimisticResult(t){const n=_(this,pr).getQueryCache().build(_(this,pr),t),r=this.createResult(n,t);return o_(this,r)&&(pe(this,Kn,r),pe(this,mc,this.options),pe(this,rl,_(this,xt).state)),r}getCurrentResult(){return _(this,Kn)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){_(this,vc).add(t)}getCurrentQuery(){return _(this,xt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=_(this,pr).defaultQueryOptions(t),r=_(this,pr).getQueryCache().build(_(this,pr),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ie(this,st,Md).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,Kn)))}createResult(t,n){var D;const r=_(this,xt),o=this.options,i=_(this,Kn),a=_(this,rl),l=_(this,mc),c=t!==r?t.state:_(this,ch),{state:d}=t;let f={...d},h=!1,p;if(n._optimisticResults){const $=this.hasListeners(),T=!$&&s5(t,n),A=$&&l5(t,r,n,o);(T||A)&&(f={...f,...J7(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:b}=f;if(n.select&&f.data!==void 0)if(i&&f.data===(a==null?void 0:a.data)&&n.select===_(this,dh))p=_(this,pc);else try{pe(this,dh,n.select),p=n.select(f.data),p=tx(i==null?void 0:i.data,p,n),pe(this,pc,p),pe(this,Xo,null)}catch($){pe(this,Xo,$)}else p=f.data;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let $;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))$=i.data;else if($=typeof n.placeholderData=="function"?n.placeholderData((D=_(this,gc))==null?void 0:D.state.data,_(this,gc)):n.placeholderData,n.select&&$!==void 0)try{$=n.select($),pe(this,Xo,null)}catch(T){pe(this,Xo,T)}$!==void 0&&(b="success",p=tx(i==null?void 0:i.data,$,n),h=!0)}_(this,Xo)&&(g=_(this,Xo),p=_(this,pc),v=Date.now(),b="error");const x=f.fetchStatus==="fetching",y=b==="pending",w=b==="error",S=y&&x,C=p!==void 0;return{status:b,fetchStatus:f.fetchStatus,isPending:y,isSuccess:b==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!y,isLoadingError:w&&!C,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&C,isStale:S3(t,n),refetch:this.refetch}}updateResult(t){const n=_(this,Kn),r=this.createResult(_(this,xt),this.options);if(pe(this,rl,_(this,xt).state),pe(this,mc,this.options),_(this,rl).data!==void 0&&pe(this,gc,_(this,xt)),_p(r,n))return;pe(this,Kn,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!_(this,vc).size)return!0;const u=new Set(l??_(this,vc));return this.options.throwOnError&&u.add("error"),Object.keys(_(this,Kn)).some(c=>{const d=c;return _(this,Kn)[d]!==n[d]&&u.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),Ie(this,st,tD).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ie(this,st,ix).call(this)}},pr=new WeakMap,xt=new WeakMap,ch=new WeakMap,Kn=new WeakMap,rl=new WeakMap,mc=new WeakMap,Xo=new WeakMap,dh=new WeakMap,pc=new WeakMap,gc=new WeakMap,ol=new WeakMap,il=new WeakMap,Na=new WeakMap,vc=new WeakMap,st=new WeakSet,Md=function(t){Ie(this,st,lx).call(this);let n=_(this,xt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(no)),n},nx=function(){if(Ie(this,st,ax).call(this),xc||_(this,Kn).isStale||!J1(this.options.staleTime))return;const n=K7(_(this,Kn).dataUpdatedAt,this.options.staleTime)+1;pe(this,ol,setTimeout(()=>{_(this,Kn).isStale||this.updateResult()},n))},rx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,xt)):this.options.refetchInterval)??!1},ox=function(t){Ie(this,st,sx).call(this),pe(this,Na,t),!(xc||this.options.enabled===!1||!J1(_(this,Na))||_(this,Na)===0)&&pe(this,il,setInterval(()=>{(this.options.refetchIntervalInBackground||w3.isFocused())&&Ie(this,st,Md).call(this)},_(this,Na)))},ix=function(){Ie(this,st,nx).call(this),Ie(this,st,ox).call(this,Ie(this,st,rx).call(this))},ax=function(){_(this,ol)&&(clearTimeout(_(this,ol)),pe(this,ol,void 0))},sx=function(){_(this,il)&&(clearInterval(_(this,il)),pe(this,il,void 0))},lx=function(){const t=_(this,pr).getQueryCache().build(_(this,pr),this.options);if(t===_(this,xt))return;const n=_(this,xt);pe(this,xt,t),pe(this,ch,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},tD=function(t){_t.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(_(this,Kn))}),_(this,pr).getQueryCache().notify({query:_(this,xt),type:"observerResultsUpdated"})})},A7);function r_(e,t){return t.enabled!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function s5(e,t){return r_(e,t)||e.state.data!==void 0&&ux(e,t,t.refetchOnMount)}function ux(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&S3(e,t)}return!1}function l5(e,t,n,r){return(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&S3(e,n)}function S3(e,t){return t.enabled!==!1&&e.isStaleByTime(t.staleTime)}function o_(e,t){return!_p(e.getCurrentResult(),t)}function u5(e,t){return e.filter(n=>!t.includes(n))}function i_(e,t,n){const r=e.slice(0);return r[t]=n,r}var al,Eo,yc,Mr,sl,fh,hh,Gr,nD,cx,dx,fx,N7,a_=(N7=class extends Ll{constructor(t,n,r){super();Ce(this,Gr);Ce(this,al);Ce(this,Eo);Ce(this,yc);Ce(this,Mr);Ce(this,sl);Ce(this,fh);Ce(this,hh);pe(this,al,t),pe(this,yc,[]),pe(this,Mr,[]),pe(this,Eo,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&_(this,Mr).forEach(t=>{t.subscribe(n=>{Ie(this,Gr,dx).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,_(this,Mr).forEach(t=>{t.destroy()})}setQueries(t,n,r){pe(this,yc,t),_t.batch(()=>{const o=_(this,Mr),i=Ie(this,Gr,cx).call(this,_(this,yc));i.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions,r));const a=i.map(c=>c.observer),l=a.map(c=>c.getCurrentResult()),u=a.some((c,d)=>c!==o[d]);o.length===a.length&&!u||(pe(this,Mr,a),pe(this,Eo,l),this.hasListeners()&&(u5(o,a).forEach(c=>{c.destroy()}),u5(a,o).forEach(c=>{c.subscribe(d=>{Ie(this,Gr,dx).call(this,c,d)})}),Ie(this,Gr,fx).call(this)))})}getCurrentResult(){return _(this,Eo)}getQueries(){return _(this,Mr).map(t=>t.getCurrentQuery())}getObservers(){return _(this,Mr)}getOptimisticResult(t,n){const r=Ie(this,Gr,cx).call(this,t),o=r.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[o,i=>Ie(this,Gr,nD).call(this,i??o,n),()=>r.map((i,a)=>{const l=o[a];return i.defaultedQueryOptions.notifyOnChangeProps?l:i.observer.trackResult(l,u=>{r.forEach(c=>{c.observer.trackProp(u)})})})]}},al=new WeakMap,Eo=new WeakMap,yc=new WeakMap,Mr=new WeakMap,sl=new WeakMap,fh=new WeakMap,hh=new WeakMap,Gr=new WeakSet,nD=function(t,n){return n?((!_(this,sl)||_(this,Eo)!==_(this,hh)||n!==_(this,fh))&&(pe(this,fh,n),pe(this,hh,_(this,Eo)),pe(this,sl,b3(_(this,sl),n(t)))),_(this,sl)):t},cx=function(t){const n=_(this,Mr),r=new Map(n.map(f=>[f.options.queryHash,f])),o=t.map(f=>_(this,al).defaultQueryOptions(f)),i=o.flatMap(f=>{const h=r.get(f.queryHash);return h!=null?[{defaultedQueryOptions:f,observer:h}]:[]}),a=new Set(i.map(f=>f.defaultedQueryOptions.queryHash)),l=o.filter(f=>!a.has(f.queryHash)),u=f=>{const h=_(this,al).defaultQueryOptions(f);return _(this,Mr).find(g=>g.options.queryHash===h.queryHash)??new $3(_(this,al),h)},c=l.map(f=>({defaultedQueryOptions:f,observer:u(f)})),d=(f,h)=>o.indexOf(f.defaultedQueryOptions)-o.indexOf(h.defaultedQueryOptions);return i.concat(c).sort(d)},dx=function(t,n){const r=_(this,Mr).indexOf(t);r!==-1&&(pe(this,Eo,i_(_(this,Eo),r,n)),Ie(this,Gr,fx).call(this))},fx=function(){_t.batch(()=>{this.listeners.forEach(t=>{t(_(this,Eo))})})},N7),Fa,Ma,gr,Ti,Gi,dp,hx,F7,s_=(F7=class extends Ll{constructor(n,r){super();Ce(this,Gi);Ce(this,Fa);Ce(this,Ma);Ce(this,gr);Ce(this,Ti);pe(this,Fa,n),this.setOptions(r),this.bindMethods(),Ie(this,Gi,dp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=_(this,Fa).defaultMutationOptions(n),_p(this.options,r)||_(this,Fa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,gr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ai(r.mutationKey)!==ai(this.options.mutationKey)?this.reset():((o=_(this,gr))==null?void 0:o.state.status)==="pending"&&_(this,gr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=_(this,gr))==null||n.removeObserver(this)}onMutationUpdate(n){Ie(this,Gi,dp).call(this),Ie(this,Gi,hx).call(this,n)}getCurrentResult(){return _(this,Ma)}reset(){var n;(n=_(this,gr))==null||n.removeObserver(this),pe(this,gr,void 0),Ie(this,Gi,dp).call(this),Ie(this,Gi,hx).call(this)}mutate(n,r){var o;return pe(this,Ti,r),(o=_(this,gr))==null||o.removeObserver(this),pe(this,gr,_(this,Fa).getMutationCache().build(_(this,Fa),this.options)),_(this,gr).addObserver(this),_(this,gr).execute(n)}},Fa=new WeakMap,Ma=new WeakMap,gr=new WeakMap,Ti=new WeakMap,Gi=new WeakSet,dp=function(){var r;const n=((r=_(this,gr))==null?void 0:r.state)??eD();pe(this,Ma,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},hx=function(n){_t.batch(()=>{var r,o,i,a,l,u,c,d;if(_(this,Ti)&&this.hasListeners()){const f=_(this,Ma).variables,h=_(this,Ma).context;(n==null?void 0:n.type)==="success"?((o=(r=_(this,Ti)).onSuccess)==null||o.call(r,n.data,f,h),(a=(i=_(this,Ti)).onSettled)==null||a.call(i,n.data,null,f,h)):(n==null?void 0:n.type)==="error"&&((u=(l=_(this,Ti)).onError)==null||u.call(l,n.error,f,h),(d=(c=_(this,Ti)).onSettled)==null||d.call(c,void 0,n.error,f,h))}this.listeners.forEach(f=>{f(_(this,Ma))})})},F7),rD=m.createContext(void 0),ph=e=>{const t=m.useContext(rD);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},l_=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(rD.Provider,{value:e,children:t})),oD=m.createContext(!1),iD=()=>m.useContext(oD);oD.Provider;function u_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var c_=m.createContext(u_()),aD=()=>m.useContext(c_);function sD(e,t){return typeof e=="function"?e(...t):!!e}function d_(){}var lD=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},uD=e=>{m.useEffect(()=>{e.clearReset()},[e])},cD=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&sD(n,[e.error,r]),dD=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},f_=(e,t)=>e.isLoading&&e.isFetching&&!t,mx=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,px=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function h_({queries:e,...t},n){const r=ph(n),o=iD(),i=aD(),a=m.useMemo(()=>e.map(g=>{const v=r.defaultQueryOptions(g);return v._optimisticResults=o?"isRestoring":"optimistic",v}),[e,r,o]);a.forEach(g=>{dD(g),lD(g,i)}),uD(i);const[l]=m.useState(()=>new a_(r,a,t)),[u,c,d]=l.getOptimisticResult(a,t.combine);m.useSyncExternalStore(m.useCallback(g=>o?()=>{}:l.subscribe(_t.batchCalls(g)),[l,o]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setQueries(a,t,{listeners:!1})},[a,t,l]);const h=u.some((g,v)=>mx(a[v],g))?u.flatMap((g,v)=>{const b=a[v];if(b){const x=new $3(r,b);if(mx(b,g))return px(b,x,i);f_(g,o)&&px(b,x,i)}return[]}):[];if(h.length>0)throw Promise.all(h);const p=u.find((g,v)=>{const b=a[v];return b&&cD({result:g,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash)})});if(p!=null&&p.error)throw p.error;return c(d())}function m_(e,t,n){const r=ph(n),o=iD(),i=aD(),a=r.defaultQueryOptions(e);a._optimisticResults=o?"isRestoring":"optimistic",dD(a),lD(a,i),uD(i);const[l]=m.useState(()=>new t(r,a)),u=l.getOptimisticResult(a);if(m.useSyncExternalStore(m.useCallback(c=>{const d=o?()=>{}:l.subscribe(_t.batchCalls(c));return l.updateResult(),d},[l,o]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),mx(a,u))throw px(a,l,i);if(cD({result:u,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw u.error;return a.notifyOnChangeProps?u:l.trackResult(u)}function ov(e,t){return m_(e,$3,t)}function fD(e,t){const n=ph(t),r=n.getQueryCache();return m.useSyncExternalStore(m.useCallback(o=>r.subscribe(_t.batchCalls(o)),[r]),()=>n.isFetching(e),()=>n.isFetching(e))}function p_(e,t){const n=ph(t),[r]=m.useState(()=>new s_(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);const o=m.useSyncExternalStore(m.useCallback(a=>r.subscribe(_t.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=m.useCallback((a,l)=>{r.mutate(a,l).catch(d_)},[r]);if(o.error&&sD(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}var hD={exports:{}},Kr={},mD={exports:{}},pD={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its 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(M,O){var q=M.length;M.push(O);e:for(;0<q;){var H=q-1>>>1,G=M[H];if(0<o(G,O))M[H]=O,M[q]=G,q=H;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var O=M[0],q=M.pop();if(q!==O){M[0]=q;e:for(var H=0,G=M.length,ce=G>>>1;H<ce;){var Z=2*(H+1)-1,ee=M[Z],re=Z+1,Q=M[re];if(0>o(ee,q))re<G&&0>o(Q,ee)?(M[H]=Q,M[re]=q,H=re):(M[H]=ee,M[Z]=q,H=Z);else if(re<G&&0>o(Q,q))M[H]=Q,M[re]=q,H=re;else break e}}return O}function o(M,O){var q=M.sortIndex-O.sortIndex;return q!==0?q:M.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var u=[],c=[],d=1,f=null,h=3,p=!1,g=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=M)r(c),O.sortIndex=O.expirationTime,t(u,O);else break;O=n(c)}}function S(M){if(v=!1,w(M),!g)if(n(u)!==null)g=!0,I(C);else{var O=n(c);O!==null&&R(S,O.startTime-M)}}function C(M,O){g=!1,v&&(v=!1,x($),$=-1),p=!0;var q=h;try{for(w(O),f=n(u);f!==null&&(!(f.expirationTime>O)||M&&!P());){var H=f.callback;if(typeof H=="function"){f.callback=null,h=f.priorityLevel;var G=H(f.expirationTime<=O);O=e.unstable_now(),typeof G=="function"?f.callback=G:f===n(u)&&r(u),w(O)}else r(u);f=n(u)}if(f!==null)var ce=!0;else{var Z=n(c);Z!==null&&R(S,Z.startTime-O),ce=!1}return ce}finally{f=null,h=q,p=!1}}var E=!1,D=null,$=-1,T=5,A=-1;function P(){return!(e.unstable_now()-A<T)}function k(){if(D!==null){var M=e.unstable_now();A=M;var O=!0;try{O=D(!0,M)}finally{O?N():(E=!1,D=null)}}else E=!1}var N;if(typeof y=="function")N=function(){y(k)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,F=j.port2;j.port1.onmessage=k,N=function(){F.postMessage(null)}}else N=function(){b(k,0)};function I(M){D=M,E||(E=!0,N())}function R(M,O){$=b(function(){M(e.unstable_now())},O)}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(M){M.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,I(C))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var q=h;h=O;try{return M()}finally{h=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,O){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var q=h;h=M;try{return O()}finally{h=q}},e.unstable_scheduleCallback=function(M,O,q){var H=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?H+q:H):q=H,M){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=q+G,M={id:d++,callback:O,priorityLevel:M,startTime:q,expirationTime:G,sortIndex:-1},q>H?(M.sortIndex=q,t(c,M),n(u)===null&&M===n(c)&&(v?(x($),$=-1):v=!0,R(S,q-H))):(M.sortIndex=G,t(u,M),g||p||(g=!0,I(C))),M},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(M){var O=h;return function(){var q=h;h=O;try{return M.apply(this,arguments)}finally{h=q}}}})(pD);mD.exports=pD;var g_=mD.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var v_=m,Hr=g_;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var gD=new Set,xf={};function Vl(e,t){bc(e,t),bc(e+"Capture",t)}function bc(e,t){for(xf[e]=t,e=0;e<t.length;e++)gD.add(t[e])}var Ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gx=Object.prototype.hasOwnProperty,y_=/^[: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]*$/,c5={},d5={};function x_(e){return gx.call(d5,e)?!0:gx.call(c5,e)?!1:y_.test(e)?d5[e]=!0:(c5[e]=!0,!1)}function b_(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function w_(e,t,n,r){if(t===null||typeof t>"u"||b_(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ur(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var An={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){An[e]=new ur(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];An[t]=new ur(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){An[e]=new ur(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){An[e]=new ur(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){An[e]=new ur(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){An[e]=new ur(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){An[e]=new ur(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){An[e]=new ur(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){An[e]=new ur(e,5,!1,e.toLowerCase(),null,!1,!1)});var E3=/[\-:]([a-z])/g;function C3(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(E3,C3);An[t]=new ur(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(E3,C3);An[t]=new ur(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(E3,C3);An[t]=new ur(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){An[e]=new ur(e,1,!1,e.toLowerCase(),null,!1,!1)});An.xlinkHref=new ur("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){An[e]=new ur(e,1,!1,e.toLowerCase(),null,!0,!0)});function D3(e,t,n,r){var o=An.hasOwnProperty(t)?An[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(w_(t,n,o,r)&&(n=null),r||o===null?x_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var na=v_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,lm=Symbol.for("react.element"),Su=Symbol.for("react.portal"),Eu=Symbol.for("react.fragment"),j3=Symbol.for("react.strict_mode"),vx=Symbol.for("react.profiler"),vD=Symbol.for("react.provider"),yD=Symbol.for("react.context"),P3=Symbol.for("react.forward_ref"),yx=Symbol.for("react.suspense"),xx=Symbol.for("react.suspense_list"),R3=Symbol.for("react.memo"),Ea=Symbol.for("react.lazy"),xD=Symbol.for("react.offscreen"),f5=Symbol.iterator;function nd(e){return e===null||typeof e!="object"?null:(e=f5&&e[f5]||e["@@iterator"],typeof e=="function"?e:null)}var Ut=Object.assign,B0;function Od(e){if(B0===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);B0=t&&t[1]||""}return`
`+B0+e}var z0=!1;function U0(e,t){if(!e||z0)return"";z0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
`),i=r.stack.split(`
`),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||o[a]!==i[l]){var u=`
`+o[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=l);break}}}finally{z0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Od(e):""}function $_(e){switch(e.tag){case 5:return Od(e.type);case 16:return Od("Lazy");case 13:return Od("Suspense");case 19:return Od("SuspenseList");case 0:case 2:case 15:return e=U0(e.type,!1),e;case 11:return e=U0(e.type.render,!1),e;case 1:return e=U0(e.type,!0),e;default:return""}}function bx(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Eu:return"Fragment";case Su:return"Portal";case vx:return"Profiler";case j3:return"StrictMode";case yx:return"Suspense";case xx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yD:return(e.displayName||"Context")+".Consumer";case vD:return(e._context.displayName||"Context")+".Provider";case P3:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R3:return t=e.displayName||null,t!==null?t:bx(e.type)||"Memo";case Ea:t=e._payload,e=e._init;try{return bx(e(t))}catch{}}return null}function S_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return bx(t);case 8:return t===j3?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function cs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function E_(e){var t=bD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function um(e){e._valueTracker||(e._valueTracker=E_(e))}function wD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vp(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}}function wx(e,t){var n=t.checked;return Ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function h5(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=cs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $D(e,t){t=t.checked,t!=null&&D3(e,"checked",t,!1)}function $x(e,t){$D(e,t);var n=cs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Sx(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sx(e,t.type,cs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function m5(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Sx(e,t,n){(t!=="number"||Vp(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var _d=Array.isArray;function Bu(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+cs(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ex(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return Ut({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function p5(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ie(92));if(_d(n)){if(1<n.length)throw Error(ie(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:cs(n)}}function SD(e,t){var n=cs(t.value),r=cs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function g5(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ED(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Cx(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ED(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cm,CD=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cm=cm||document.createElement("div"),cm.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},C_=["Webkit","ms","Moz","O"];Object.keys(Gd).forEach(function(e){C_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gd[t]=Gd[e]})});function DD(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gd.hasOwnProperty(e)&&Gd[e]?(""+t).trim():t+"px"}function jD(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=DD(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var D_=Ut({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Dx(e,t){if(t){if(D_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function jx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Px=null;function k3(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rx=null,zu=null,Uu=null;function v5(e){if(e=yh(e)){if(typeof Rx!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=uv(t),Rx(e.stateNode,e.type,t))}}function PD(e){zu?Uu?Uu.push(e):Uu=[e]:zu=e}function RD(){if(zu){var e=zu,t=Uu;if(Uu=zu=null,v5(e),t)for(e=0;e<t.length;e++)v5(t[e])}}function kD(e,t){return e(t)}function TD(){}var q0=!1;function ID(e,t,n){if(q0)return e(t,n);q0=!0;try{return kD(e,t,n)}finally{q0=!1,(zu!==null||Uu!==null)&&(TD(),RD())}}function wf(e,t){var n=e.stateNode;if(n===null)return null;var r=uv(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ie(231,t,typeof n));return n}var kx=!1;if(Ki)try{var rd={};Object.defineProperty(rd,"passive",{get:function(){kx=!0}}),window.addEventListener("test",rd,rd),window.removeEventListener("test",rd,rd)}catch{kx=!1}function j_(e,t,n,r,o,i,a,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Kd=!1,Bp=null,zp=!1,Tx=null,P_={onError:function(e){Kd=!0,Bp=e}};function R_(e,t,n,r,o,i,a,l,u){Kd=!1,Bp=null,j_.apply(P_,arguments)}function k_(e,t,n,r,o,i,a,l,u){if(R_.apply(this,arguments),Kd){if(Kd){var c=Bp;Kd=!1,Bp=null}else throw Error(ie(198));zp||(zp=!0,Tx=c)}}function Bl(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 AD(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 y5(e){if(Bl(e)!==e)throw Error(ie(188))}function T_(e){var t=e.alternate;if(!t){if(t=Bl(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return y5(o),e;if(i===r)return y5(o),t;i=i.sibling}throw Error(ie(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a)throw Error(ie(189))}}if(n.alternate!==r)throw Error(ie(190))}if(n.tag!==3)throw Error(ie(188));return n.stateNode.current===n?e:t}function ND(e){return e=T_(e),e!==null?FD(e):null}function FD(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=FD(e);if(t!==null)return t;e=e.sibling}return null}var MD=Hr.unstable_scheduleCallback,x5=Hr.unstable_cancelCallback,I_=Hr.unstable_shouldYield,A_=Hr.unstable_requestPaint,nn=Hr.unstable_now,N_=Hr.unstable_getCurrentPriorityLevel,T3=Hr.unstable_ImmediatePriority,OD=Hr.unstable_UserBlockingPriority,Up=Hr.unstable_NormalPriority,F_=Hr.unstable_LowPriority,_D=Hr.unstable_IdlePriority,iv=null,ni=null;function M_(e){if(ni&&typeof ni.onCommitFiberRoot=="function")try{ni.onCommitFiberRoot(iv,e,void 0,(e.current.flags&128)===128)}catch{}}var Ao=Math.clz32?Math.clz32:L_,O_=Math.log,__=Math.LN2;function L_(e){return e>>>=0,e===0?32:31-(O_(e)/__|0)|0}var dm=64,fm=4194304;function Ld(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function qp(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~o;l!==0?r=Ld(l):(i&=a,i!==0&&(r=Ld(i)))}else a=n&~o,a!==0?r=Ld(a):i!==0&&(r=Ld(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ao(t),o=1<<n,r|=e[n],t&=~o;return r}function V_(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function B_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Ao(i),l=1<<a,u=o[a];u===-1?(!(l&n)||l&r)&&(o[a]=V_(l,t)):u<=t&&(e.expiredLanes|=l),i&=~l}}function Ix(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function LD(){var e=dm;return dm<<=1,!(dm&4194240)&&(dm=64),e}function H0(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ao(t),e[t]=n}function z_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ao(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function I3(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ao(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ct=0;function VD(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var BD,A3,zD,UD,qD,Ax=!1,hm=[],Qa=null,Za=null,Ya=null,$f=new Map,Sf=new Map,ja=[],U_="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 submit".split(" ");function b5(e,t){switch(e){case"focusin":case"focusout":Qa=null;break;case"dragenter":case"dragleave":Za=null;break;case"mouseover":case"mouseout":Ya=null;break;case"pointerover":case"pointerout":$f.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sf.delete(t.pointerId)}}function od(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=yh(t),t!==null&&A3(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function q_(e,t,n,r,o){switch(t){case"focusin":return Qa=od(Qa,e,t,n,r,o),!0;case"dragenter":return Za=od(Za,e,t,n,r,o),!0;case"mouseover":return Ya=od(Ya,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return $f.set(i,od($f.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Sf.set(i,od(Sf.get(i)||null,e,t,n,r,o)),!0}return!1}function HD(e){var t=Bs(e.target);if(t!==null){var n=Bl(t);if(n!==null){if(t=n.tag,t===13){if(t=AD(n),t!==null){e.blockedOn=t,qD(e.priority,function(){zD(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 fp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Nx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Px=r,n.target.dispatchEvent(r),Px=null}else return t=yh(n),t!==null&&A3(t),e.blockedOn=n,!1;t.shift()}return!0}function w5(e,t,n){fp(e)&&n.delete(t)}function H_(){Ax=!1,Qa!==null&&fp(Qa)&&(Qa=null),Za!==null&&fp(Za)&&(Za=null),Ya!==null&&fp(Ya)&&(Ya=null),$f.forEach(w5),Sf.forEach(w5)}function id(e,t){e.blockedOn===t&&(e.blockedOn=null,Ax||(Ax=!0,Hr.unstable_scheduleCallback(Hr.unstable_NormalPriority,H_)))}function Ef(e){function t(o){return id(o,e)}if(0<hm.length){id(hm[0],e);for(var n=1;n<hm.length;n++){var r=hm[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qa!==null&&id(Qa,e),Za!==null&&id(Za,e),Ya!==null&&id(Ya,e),$f.forEach(t),Sf.forEach(t),n=0;n<ja.length;n++)r=ja[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ja.length&&(n=ja[0],n.blockedOn===null);)HD(n),n.blockedOn===null&&ja.shift()}var qu=na.ReactCurrentBatchConfig,Hp=!0;function W_(e,t,n,r){var o=ct,i=qu.transition;qu.transition=null;try{ct=1,N3(e,t,n,r)}finally{ct=o,qu.transition=i}}function G_(e,t,n,r){var o=ct,i=qu.transition;qu.transition=null;try{ct=4,N3(e,t,n,r)}finally{ct=o,qu.transition=i}}function N3(e,t,n,r){if(Hp){var o=Nx(e,t,n,r);if(o===null)ty(e,t,r,Wp,n),b5(e,r);else if(q_(o,e,t,n,r))r.stopPropagation();else if(b5(e,r),t&4&&-1<U_.indexOf(e)){for(;o!==null;){var i=yh(o);if(i!==null&&BD(i),i=Nx(e,t,n,r),i===null&&ty(e,t,r,Wp,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else ty(e,t,r,null,n)}}var Wp=null;function Nx(e,t,n,r){if(Wp=null,e=k3(r),e=Bs(e),e!==null)if(t=Bl(e),t===null)e=null;else if(n=t.tag,n===13){if(e=AD(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 Wp=e,null}function WD(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(N_()){case T3:return 1;case OD:return 4;case Up:case F_:return 16;case _D:return 536870912;default:return 16}default:return 16}}var Oa=null,F3=null,hp=null;function GD(){if(hp)return hp;var e,t=F3,n=t.length,r,o="value"in Oa?Oa.value:Oa.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return hp=o.slice(e,1<r?1-r:void 0)}function mp(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 mm(){return!0}function $5(){return!1}function Qr(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?mm:$5,this.isPropagationStopped=$5,this}return Ut(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=mm)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=mm)},persist:function(){},isPersistent:mm}),t}var Lc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},M3=Qr(Lc),vh=Ut({},Lc,{view:0,detail:0}),K_=Qr(vh),W0,G0,ad,av=Ut({},vh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:O3,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!==ad&&(ad&&e.type==="mousemove"?(W0=e.screenX-ad.screenX,G0=e.screenY-ad.screenY):G0=W0=0,ad=e),W0)},movementY:function(e){return"movementY"in e?e.movementY:G0}}),S5=Qr(av),Q_=Ut({},av,{dataTransfer:0}),Z_=Qr(Q_),Y_=Ut({},vh,{relatedTarget:0}),K0=Qr(Y_),X_=Ut({},Lc,{animationName:0,elapsedTime:0,pseudoElement:0}),J_=Qr(X_),eL=Ut({},Lc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tL=Qr(eL),nL=Ut({},Lc,{data:0}),E5=Qr(nL),rL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oL={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"},iL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=iL[e])?!!t[e]:!1}function O3(){return aL}var sL=Ut({},vh,{key:function(e){if(e.key){var t=rL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?oL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:O3,charCode:function(e){return e.type==="keypress"?mp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lL=Qr(sL),uL=Ut({},av,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),C5=Qr(uL),cL=Ut({},vh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:O3}),dL=Qr(cL),fL=Ut({},Lc,{propertyName:0,elapsedTime:0,pseudoElement:0}),hL=Qr(fL),mL=Ut({},av,{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}),pL=Qr(mL),gL=[9,13,27,32],_3=Ki&&"CompositionEvent"in window,Qd=null;Ki&&"documentMode"in document&&(Qd=document.documentMode);var vL=Ki&&"TextEvent"in window&&!Qd,KD=Ki&&(!_3||Qd&&8<Qd&&11>=Qd),D5=" ",j5=!1;function QD(e,t){switch(e){case"keyup":return gL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZD(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cu=!1;function yL(e,t){switch(e){case"compositionend":return ZD(t);case"keypress":return t.which!==32?null:(j5=!0,D5);case"textInput":return e=t.data,e===D5&&j5?null:e;default:return null}}function xL(e,t){if(Cu)return e==="compositionend"||!_3&&QD(e,t)?(e=GD(),hp=F3=Oa=null,Cu=!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 KD&&t.locale!=="ko"?null:t.data;default:return null}}var bL={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 P5(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bL[e.type]:t==="textarea"}function YD(e,t,n,r){PD(r),t=Gp(t,"onChange"),0<t.length&&(n=new M3("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zd=null,Cf=null;function wL(e){lj(e,0)}function sv(e){var t=Pu(e);if(wD(t))return e}function $L(e,t){if(e==="change")return t}var XD=!1;if(Ki){var Q0;if(Ki){var Z0="oninput"in document;if(!Z0){var R5=document.createElement("div");R5.setAttribute("oninput","return;"),Z0=typeof R5.oninput=="function"}Q0=Z0}else Q0=!1;XD=Q0&&(!document.documentMode||9<document.documentMode)}function k5(){Zd&&(Zd.detachEvent("onpropertychange",JD),Cf=Zd=null)}function JD(e){if(e.propertyName==="value"&&sv(Cf)){var t=[];YD(t,Cf,e,k3(e)),ID(wL,t)}}function SL(e,t,n){e==="focusin"?(k5(),Zd=t,Cf=n,Zd.attachEvent("onpropertychange",JD)):e==="focusout"&&k5()}function EL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sv(Cf)}function CL(e,t){if(e==="click")return sv(t)}function DL(e,t){if(e==="input"||e==="change")return sv(t)}function jL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _o=typeof Object.is=="function"?Object.is:jL;function Df(e,t){if(_o(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!gx.call(t,o)||!_o(e[o],t[o]))return!1}return!0}function T5(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function I5(e,t){var n=T5(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=T5(n)}}function ej(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ej(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tj(){for(var e=window,t=Vp();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vp(e.document)}return t}function L3(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")}function PL(e){var t=tj(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ej(n.ownerDocument.documentElement,n)){if(r!==null&&L3(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=I5(n,i);var a=I5(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var RL=Ki&&"documentMode"in document&&11>=document.documentMode,Du=null,Fx=null,Yd=null,Mx=!1;function A5(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mx||Du==null||Du!==Vp(r)||(r=Du,"selectionStart"in r&&L3(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Yd&&Df(Yd,r)||(Yd=r,r=Gp(Fx,"onSelect"),0<r.length&&(t=new M3("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Du)))}function pm(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ju={animationend:pm("Animation","AnimationEnd"),animationiteration:pm("Animation","AnimationIteration"),animationstart:pm("Animation","AnimationStart"),transitionend:pm("Transition","TransitionEnd")},Y0={},nj={};Ki&&(nj=document.createElement("div").style,"AnimationEvent"in window||(delete ju.animationend.animation,delete ju.animationiteration.animation,delete ju.animationstart.animation),"TransitionEvent"in window||delete ju.transitionend.transition);function lv(e){if(Y0[e])return Y0[e];if(!ju[e])return e;var t=ju[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in nj)return Y0[e]=t[n];return e}var rj=lv("animationend"),oj=lv("animationiteration"),ij=lv("animationstart"),aj=lv("transitionend"),sj=new Map,N5="abort auxClick 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(" ");function bs(e,t){sj.set(e,t),Vl(t,[e])}for(var X0=0;X0<N5.length;X0++){var J0=N5[X0],kL=J0.toLowerCase(),TL=J0[0].toUpperCase()+J0.slice(1);bs(kL,"on"+TL)}bs(rj,"onAnimationEnd");bs(oj,"onAnimationIteration");bs(ij,"onAnimationStart");bs("dblclick","onDoubleClick");bs("focusin","onFocus");bs("focusout","onBlur");bs(aj,"onTransitionEnd");bc("onMouseEnter",["mouseout","mouseover"]);bc("onMouseLeave",["mouseout","mouseover"]);bc("onPointerEnter",["pointerout","pointerover"]);bc("onPointerLeave",["pointerout","pointerover"]);Vl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vd="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(" "),IL=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vd));function F5(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,k_(r,t,void 0,e),e.currentTarget=null}function lj(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==i&&o.isPropagationStopped())break e;F5(o,l,c),i=u}else for(a=0;a<r.length;a++){if(l=r[a],u=l.instance,c=l.currentTarget,l=l.listener,u!==i&&o.isPropagationStopped())break e;F5(o,l,c),i=u}}}if(zp)throw e=Tx,zp=!1,Tx=null,e}function jt(e,t){var n=t[Bx];n===void 0&&(n=t[Bx]=new Set);var r=e+"__bubble";n.has(r)||(uj(t,e,2,!1),n.add(r))}function ey(e,t,n){var r=0;t&&(r|=4),uj(n,e,r,t)}var gm="_reactListening"+Math.random().toString(36).slice(2);function jf(e){if(!e[gm]){e[gm]=!0,gD.forEach(function(n){n!=="selectionchange"&&(IL.has(n)||ey(n,!1,e),ey(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gm]||(t[gm]=!0,ey("selectionchange",!1,t))}}function uj(e,t,n,r){switch(WD(t)){case 1:var o=W_;break;case 4:o=G_;break;default:o=N3}n=o.bind(null,t,n,e),o=void 0,!kx||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ty(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===o||u.nodeType===8&&u.parentNode===o))return;a=a.return}for(;l!==null;){if(a=Bs(l),a===null)return;if(u=a.tag,u===5||u===6){r=i=a;continue e}l=l.parentNode}}r=r.return}ID(function(){var c=i,d=k3(n),f=[];e:{var h=sj.get(e);if(h!==void 0){var p=M3,g=e;switch(e){case"keypress":if(mp(n)===0)break e;case"keydown":case"keyup":p=lL;break;case"focusin":g="focus",p=K0;break;case"focusout":g="blur",p=K0;break;case"beforeblur":case"afterblur":p=K0;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":p=S5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Z_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=dL;break;case rj:case oj:case ij:p=J_;break;case aj:p=hL;break;case"scroll":p=K_;break;case"wheel":p=pL;break;case"copy":case"cut":case"paste":p=tL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=C5}var v=(t&4)!==0,b=!v&&e==="scroll",x=v?h!==null?h+"Capture":null:h;v=[];for(var y=c,w;y!==null;){w=y;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,x!==null&&(S=wf(y,x),S!=null&&v.push(Pf(y,S,w)))),b)break;y=y.return}0<v.length&&(h=new p(h,g,null,n,d),f.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Px&&(g=n.relatedTarget||n.fromElement)&&(Bs(g)||g[Qi]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?Bs(g):null,g!==null&&(b=Bl(g),g!==b||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(v=S5,S="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=C5,S="onPointerLeave",x="onPointerEnter",y="pointer"),b=p==null?h:Pu(p),w=g==null?h:Pu(g),h=new v(S,y+"leave",p,n,d),h.target=b,h.relatedTarget=w,S=null,Bs(d)===c&&(v=new v(x,y+"enter",g,n,d),v.target=w,v.relatedTarget=b,S=v),b=S,p&&g)t:{for(v=p,x=g,y=0,w=v;w;w=au(w))y++;for(w=0,S=x;S;S=au(S))w++;for(;0<y-w;)v=au(v),y--;for(;0<w-y;)x=au(x),w--;for(;y--;){if(v===x||x!==null&&v===x.alternate)break t;v=au(v),x=au(x)}v=null}else v=null;p!==null&&M5(f,h,p,v,!1),g!==null&&b!==null&&M5(f,b,g,v,!0)}}e:{if(h=c?Pu(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var C=$L;else if(P5(h))if(XD)C=DL;else{C=EL;var E=SL}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=CL);if(C&&(C=C(e,c))){YD(f,C,n,d);break e}E&&E(e,h,c),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&Sx(h,"number",h.value)}switch(E=c?Pu(c):window,e){case"focusin":(P5(E)||E.contentEditable==="true")&&(Du=E,Fx=c,Yd=null);break;case"focusout":Yd=Fx=Du=null;break;case"mousedown":Mx=!0;break;case"contextmenu":case"mouseup":case"dragend":Mx=!1,A5(f,n,d);break;case"selectionchange":if(RL)break;case"keydown":case"keyup":A5(f,n,d)}var D;if(_3)e:{switch(e){case"compositionstart":var $="onCompositionStart";break e;case"compositionend":$="onCompositionEnd";break e;case"compositionupdate":$="onCompositionUpdate";break e}$=void 0}else Cu?QD(e,n)&&($="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&($="onCompositionStart");$&&(KD&&n.locale!=="ko"&&(Cu||$!=="onCompositionStart"?$==="onCompositionEnd"&&Cu&&(D=GD()):(Oa=d,F3="value"in Oa?Oa.value:Oa.textContent,Cu=!0)),E=Gp(c,$),0<E.length&&($=new E5($,e,null,n,d),f.push({event:$,listeners:E}),D?$.data=D:(D=ZD(n),D!==null&&($.data=D)))),(D=vL?yL(e,n):xL(e,n))&&(c=Gp(c,"onBeforeInput"),0<c.length&&(d=new E5("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=D))}lj(f,t)})}function Pf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gp(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=wf(e,n),i!=null&&r.unshift(Pf(e,i,o)),i=wf(e,t),i!=null&&r.push(Pf(e,i,o))),e=e.return}return r}function au(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function M5(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var l=n,u=l.alternate,c=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&c!==null&&(l=c,o?(u=wf(n,i),u!=null&&a.unshift(Pf(n,u,l))):o||(u=wf(n,i),u!=null&&a.push(Pf(n,u,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var AL=/\r\n?/g,NL=/\u0000|\uFFFD/g;function O5(e){return(typeof e=="string"?e:""+e).replace(AL,`
`).replace(NL,"")}function vm(e,t,n){if(t=O5(t),O5(e)!==t&&n)throw Error(ie(425))}function Kp(){}var Ox=null,_x=null;function Lx(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vx=typeof setTimeout=="function"?setTimeout:void 0,FL=typeof clearTimeout=="function"?clearTimeout:void 0,_5=typeof Promise=="function"?Promise:void 0,ML=typeof queueMicrotask=="function"?queueMicrotask:typeof _5<"u"?function(e){return _5.resolve(null).then(e).catch(OL)}:Vx;function OL(e){setTimeout(function(){throw e})}function ny(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Ef(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ef(t)}function Xa(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==="$?")break;if(t==="/$")return null}}return e}function L5(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Vc=Math.random().toString(36).slice(2),Jo="__reactFiber$"+Vc,Rf="__reactProps$"+Vc,Qi="__reactContainer$"+Vc,Bx="__reactEvents$"+Vc,_L="__reactListeners$"+Vc,LL="__reactHandles$"+Vc;function Bs(e){var t=e[Jo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qi]||n[Jo]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=L5(e);e!==null;){if(n=e[Jo])return n;e=L5(e)}return t}e=n,n=e.parentNode}return null}function yh(e){return e=e[Jo]||e[Qi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Pu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function uv(e){return e[Rf]||null}var zx=[],Ru=-1;function ws(e){return{current:e}}function Pt(e){0>Ru||(e.current=zx[Ru],zx[Ru]=null,Ru--)}function $t(e,t){Ru++,zx[Ru]=e.current,e.current=t}var ds={},Bn=ws(ds),Er=ws(!1),xl=ds;function wc(e,t){var n=e.type.contextTypes;if(!n)return ds;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Cr(e){return e=e.childContextTypes,e!=null}function Qp(){Pt(Er),Pt(Bn)}function V5(e,t,n){if(Bn.current!==ds)throw Error(ie(168));$t(Bn,t),$t(Er,n)}function cj(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ie(108,S_(e)||"Unknown",o));return Ut({},n,r)}function Zp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ds,xl=Bn.current,$t(Bn,e),$t(Er,Er.current),!0}function B5(e,t,n){var r=e.stateNode;if(!r)throw Error(ie(169));n?(e=cj(e,t,xl),r.__reactInternalMemoizedMergedChildContext=e,Pt(Er),Pt(Bn),$t(Bn,e)):Pt(Er),$t(Er,n)}var ki=null,cv=!1,ry=!1;function dj(e){ki===null?ki=[e]:ki.push(e)}function VL(e){cv=!0,dj(e)}function $s(){if(!ry&&ki!==null){ry=!0;var e=0,t=ct;try{var n=ki;for(ct=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ki=null,cv=!1}catch(o){throw ki!==null&&(ki=ki.slice(e+1)),MD(T3,$s),o}finally{ct=t,ry=!1}}return null}var ku=[],Tu=0,Yp=null,Xp=0,io=[],ao=0,bl=null,Ai=1,Ni="";function Ts(e,t){ku[Tu++]=Xp,ku[Tu++]=Yp,Yp=e,Xp=t}function fj(e,t,n){io[ao++]=Ai,io[ao++]=Ni,io[ao++]=bl,bl=e;var r=Ai;e=Ni;var o=32-Ao(r)-1;r&=~(1<<o),n+=1;var i=32-Ao(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Ai=1<<32-Ao(t)+o|n<<o|r,Ni=i+e}else Ai=1<<i|n<<o|r,Ni=e}function V3(e){e.return!==null&&(Ts(e,1),fj(e,1,0))}function B3(e){for(;e===Yp;)Yp=ku[--Tu],ku[Tu]=null,Xp=ku[--Tu],ku[Tu]=null;for(;e===bl;)bl=io[--ao],io[ao]=null,Ni=io[--ao],io[ao]=null,Ai=io[--ao],io[ao]=null}var zr=null,Vr=null,It=!1,jo=null;function hj(e,t){var n=co(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function z5(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,zr=e,Vr=Xa(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,zr=e,Vr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=bl!==null?{id:Ai,overflow:Ni}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=co(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,zr=e,Vr=null,!0):!1;default:return!1}}function Ux(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qx(e){if(It){var t=Vr;if(t){var n=t;if(!z5(e,t)){if(Ux(e))throw Error(ie(418));t=Xa(n.nextSibling);var r=zr;t&&z5(e,t)?hj(r,n):(e.flags=e.flags&-4097|2,It=!1,zr=e)}}else{if(Ux(e))throw Error(ie(418));e.flags=e.flags&-4097|2,It=!1,zr=e}}}function U5(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;zr=e}function ym(e){if(e!==zr)return!1;if(!It)return U5(e),It=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Lx(e.type,e.memoizedProps)),t&&(t=Vr)){if(Ux(e))throw mj(),Error(ie(418));for(;t;)hj(e,t),t=Xa(t.nextSibling)}if(U5(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vr=Xa(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vr=null}}else Vr=zr?Xa(e.stateNode.nextSibling):null;return!0}function mj(){for(var e=Vr;e;)e=Xa(e.nextSibling)}function $c(){Vr=zr=null,It=!1}function z3(e){jo===null?jo=[e]:jo.push(e)}var BL=na.ReactCurrentBatchConfig;function sd(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ie(309));var r=n.stateNode}if(!r)throw Error(ie(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var l=o.refs;a===null?delete l[i]:l[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(ie(284));if(!n._owner)throw Error(ie(290,e))}return e}function xm(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function q5(e){var t=e._init;return t(e._payload)}function pj(e){function t(x,y){if(e){var w=x.deletions;w===null?(x.deletions=[y],x.flags|=16):w.push(y)}}function n(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function r(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function o(x,y){return x=ns(x,y),x.index=0,x.sibling=null,x}function i(x,y,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<y?(x.flags|=2,y):w):(x.flags|=2,y)):(x.flags|=1048576,y)}function a(x){return e&&x.alternate===null&&(x.flags|=2),x}function l(x,y,w,S){return y===null||y.tag!==6?(y=cy(w,x.mode,S),y.return=x,y):(y=o(y,w),y.return=x,y)}function u(x,y,w,S){var C=w.type;return C===Eu?d(x,y,w.props.children,S,w.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ea&&q5(C)===y.type)?(S=o(y,w.props),S.ref=sd(x,y,w),S.return=x,S):(S=wp(w.type,w.key,w.props,null,x.mode,S),S.ref=sd(x,y,w),S.return=x,S)}function c(x,y,w,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=dy(w,x.mode,S),y.return=x,y):(y=o(y,w.children||[]),y.return=x,y)}function d(x,y,w,S,C){return y===null||y.tag!==7?(y=ul(w,x.mode,S,C),y.return=x,y):(y=o(y,w),y.return=x,y)}function f(x,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=cy(""+y,x.mode,w),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case lm:return w=wp(y.type,y.key,y.props,null,x.mode,w),w.ref=sd(x,null,y),w.return=x,w;case Su:return y=dy(y,x.mode,w),y.return=x,y;case Ea:var S=y._init;return f(x,S(y._payload),w)}if(_d(y)||nd(y))return y=ul(y,x.mode,w,null),y.return=x,y;xm(x,y)}return null}function h(x,y,w,S){var C=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:l(x,y,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case lm:return w.key===C?u(x,y,w,S):null;case Su:return w.key===C?c(x,y,w,S):null;case Ea:return C=w._init,h(x,y,C(w._payload),S)}if(_d(w)||nd(w))return C!==null?null:d(x,y,w,S,null);xm(x,w)}return null}function p(x,y,w,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(w)||null,l(y,x,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case lm:return x=x.get(S.key===null?w:S.key)||null,u(y,x,S,C);case Su:return x=x.get(S.key===null?w:S.key)||null,c(y,x,S,C);case Ea:var E=S._init;return p(x,y,w,E(S._payload),C)}if(_d(S)||nd(S))return x=x.get(w)||null,d(y,x,S,C,null);xm(y,S)}return null}function g(x,y,w,S){for(var C=null,E=null,D=y,$=y=0,T=null;D!==null&&$<w.length;$++){D.index>$?(T=D,D=null):T=D.sibling;var A=h(x,D,w[$],S);if(A===null){D===null&&(D=T);break}e&&D&&A.alternate===null&&t(x,D),y=i(A,y,$),E===null?C=A:E.sibling=A,E=A,D=T}if($===w.length)return n(x,D),It&&Ts(x,$),C;if(D===null){for(;$<w.length;$++)D=f(x,w[$],S),D!==null&&(y=i(D,y,$),E===null?C=D:E.sibling=D,E=D);return It&&Ts(x,$),C}for(D=r(x,D);$<w.length;$++)T=p(D,x,$,w[$],S),T!==null&&(e&&T.alternate!==null&&D.delete(T.key===null?$:T.key),y=i(T,y,$),E===null?C=T:E.sibling=T,E=T);return e&&D.forEach(function(P){return t(x,P)}),It&&Ts(x,$),C}function v(x,y,w,S){var C=nd(w);if(typeof C!="function")throw Error(ie(150));if(w=C.call(w),w==null)throw Error(ie(151));for(var E=C=null,D=y,$=y=0,T=null,A=w.next();D!==null&&!A.done;$++,A=w.next()){D.index>$?(T=D,D=null):T=D.sibling;var P=h(x,D,A.value,S);if(P===null){D===null&&(D=T);break}e&&D&&P.alternate===null&&t(x,D),y=i(P,y,$),E===null?C=P:E.sibling=P,E=P,D=T}if(A.done)return n(x,D),It&&Ts(x,$),C;if(D===null){for(;!A.done;$++,A=w.next())A=f(x,A.value,S),A!==null&&(y=i(A,y,$),E===null?C=A:E.sibling=A,E=A);return It&&Ts(x,$),C}for(D=r(x,D);!A.done;$++,A=w.next())A=p(D,x,$,A.value,S),A!==null&&(e&&A.alternate!==null&&D.delete(A.key===null?$:A.key),y=i(A,y,$),E===null?C=A:E.sibling=A,E=A);return e&&D.forEach(function(k){return t(x,k)}),It&&Ts(x,$),C}function b(x,y,w,S){if(typeof w=="object"&&w!==null&&w.type===Eu&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case lm:e:{for(var C=w.key,E=y;E!==null;){if(E.key===C){if(C=w.type,C===Eu){if(E.tag===7){n(x,E.sibling),y=o(E,w.props.children),y.return=x,x=y;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ea&&q5(C)===E.type){n(x,E.sibling),y=o(E,w.props),y.ref=sd(x,E,w),y.return=x,x=y;break e}n(x,E);break}else t(x,E);E=E.sibling}w.type===Eu?(y=ul(w.props.children,x.mode,S,w.key),y.return=x,x=y):(S=wp(w.type,w.key,w.props,null,x.mode,S),S.ref=sd(x,y,w),S.return=x,x=S)}return a(x);case Su:e:{for(E=w.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(x,y.sibling),y=o(y,w.children||[]),y.return=x,x=y;break e}else{n(x,y);break}else t(x,y);y=y.sibling}y=dy(w,x.mode,S),y.return=x,x=y}return a(x);case Ea:return E=w._init,b(x,y,E(w._payload),S)}if(_d(w))return g(x,y,w,S);if(nd(w))return v(x,y,w,S);xm(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(x,y.sibling),y=o(y,w),y.return=x,x=y):(n(x,y),y=cy(w,x.mode,S),y.return=x,x=y),a(x)):n(x,y)}return b}var Sc=pj(!0),gj=pj(!1),Jp=ws(null),eg=null,Iu=null,U3=null;function q3(){U3=Iu=eg=null}function H3(e){var t=Jp.current;Pt(Jp),e._currentValue=t}function Hx(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hu(e,t){eg=e,U3=Iu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($r=!0),e.firstContext=null)}function po(e){var t=e._currentValue;if(U3!==e)if(e={context:e,memoizedValue:t,next:null},Iu===null){if(eg===null)throw Error(ie(308));Iu=e,eg.dependencies={lanes:0,firstContext:e}}else Iu=Iu.next=e;return t}var zs=null;function W3(e){zs===null?zs=[e]:zs.push(e)}function vj(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,W3(t)):(n.next=o.next,o.next=n),t.interleaved=n,Zi(e,r)}function Zi(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ca=!1;function G3(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yj(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,et&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Zi(e,n)}return o=r.interleaved,o===null?(t.next=t,W3(r)):(t.next=o.next,o.next=t),r.interleaved=t,Zi(e,n)}function pp(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,I3(e,n)}}function H5(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function tg(e,t,n,r){var o=e.updateQueue;Ca=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var u=l,c=u.next;u.next=null,a===null?i=c:a.next=c,a=u;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(i!==null){var f=o.baseState;a=0,d=c=u=null,l=i;do{var h=l.lane,p=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,v=l;switch(h=t,p=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,h=typeof g=="function"?g.call(p,f,h):g,h==null)break e;f=Ut({},f,h);break e;case 2:Ca=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(c=d=p,u=f):d=d.next=p,a|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(d===null&&(u=f),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);$l|=a,e.lanes=a,e.memoizedState=f}}function W5(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(ie(191,o));o.call(r)}}}var xh={},ri=ws(xh),kf=ws(xh),Tf=ws(xh);function Us(e){if(e===xh)throw Error(ie(174));return e}function K3(e,t){switch($t(Tf,t),$t(kf,e),$t(ri,xh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cx(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cx(t,e)}Pt(ri),$t(ri,t)}function Ec(){Pt(ri),Pt(kf),Pt(Tf)}function xj(e){Us(Tf.current);var t=Us(ri.current),n=Cx(t,e.type);t!==n&&($t(kf,e),$t(ri,n))}function Q3(e){kf.current===e&&(Pt(ri),Pt(kf))}var Mt=ws(0);function ng(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 oy=[];function Z3(){for(var e=0;e<oy.length;e++)oy[e]._workInProgressVersionPrimary=null;oy.length=0}var gp=na.ReactCurrentDispatcher,iy=na.ReactCurrentBatchConfig,wl=0,Vt=null,bn=null,Cn=null,rg=!1,Xd=!1,If=0,zL=0;function Nn(){throw Error(ie(321))}function Y3(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_o(e[n],t[n]))return!1;return!0}function X3(e,t,n,r,o,i){if(wl=i,Vt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,gp.current=e===null||e.memoizedState===null?WL:GL,e=n(r,o),Xd){i=0;do{if(Xd=!1,If=0,25<=i)throw Error(ie(301));i+=1,Cn=bn=null,t.updateQueue=null,gp.current=KL,e=n(r,o)}while(Xd)}if(gp.current=og,t=bn!==null&&bn.next!==null,wl=0,Cn=bn=Vt=null,rg=!1,t)throw Error(ie(300));return e}function J3(){var e=If!==0;return If=0,e}function Go(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Cn===null?Vt.memoizedState=Cn=e:Cn=Cn.next=e,Cn}function go(){if(bn===null){var e=Vt.alternate;e=e!==null?e.memoizedState:null}else e=bn.next;var t=Cn===null?Vt.memoizedState:Cn.next;if(t!==null)Cn=t,bn=e;else{if(e===null)throw Error(ie(310));bn=e,e={memoizedState:bn.memoizedState,baseState:bn.baseState,baseQueue:bn.baseQueue,queue:bn.queue,next:null},Cn===null?Vt.memoizedState=Cn=e:Cn=Cn.next=e}return Cn}function Af(e,t){return typeof t=="function"?t(e):t}function ay(e){var t=go(),n=t.queue;if(n===null)throw Error(ie(311));n.lastRenderedReducer=e;var r=bn,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=a=null,u=null,c=i;do{var d=c.lane;if((wl&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=f,a=r):u=u.next=f,Vt.lanes|=d,$l|=d}c=c.next}while(c!==null&&c!==i);u===null?a=r:u.next=l,_o(r,t.memoizedState)||($r=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Vt.lanes|=i,$l|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sy(e){var t=go(),n=t.queue;if(n===null)throw Error(ie(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);_o(i,t.memoizedState)||($r=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function bj(){}function wj(e,t){var n=Vt,r=go(),o=t(),i=!_o(r.memoizedState,o);if(i&&(r.memoizedState=o,$r=!0),r=r.queue,ew(Ej.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Cn!==null&&Cn.memoizedState.tag&1){if(n.flags|=2048,Nf(9,Sj.bind(null,n,r,o,t),void 0,null),jn===null)throw Error(ie(349));wl&30||$j(n,t,o)}return o}function $j(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Vt.updateQueue,t===null?(t={lastEffect:null,stores:null},Vt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Sj(e,t,n,r){t.value=n,t.getSnapshot=r,Cj(t)&&Dj(e)}function Ej(e,t,n){return n(function(){Cj(t)&&Dj(e)})}function Cj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_o(e,n)}catch{return!0}}function Dj(e){var t=Zi(e,1);t!==null&&No(t,e,1,-1)}function G5(e){var t=Go();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Af,lastRenderedState:e},t.queue=e,e=e.dispatch=HL.bind(null,Vt,e),[t.memoizedState,e]}function Nf(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Vt.updateQueue,t===null?(t={lastEffect:null,stores:null},Vt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function jj(){return go().memoizedState}function vp(e,t,n,r){var o=Go();Vt.flags|=e,o.memoizedState=Nf(1|t,n,void 0,r===void 0?null:r)}function dv(e,t,n,r){var o=go();r=r===void 0?null:r;var i=void 0;if(bn!==null){var a=bn.memoizedState;if(i=a.destroy,r!==null&&Y3(r,a.deps)){o.memoizedState=Nf(t,n,i,r);return}}Vt.flags|=e,o.memoizedState=Nf(1|t,n,i,r)}function K5(e,t){return vp(8390656,8,e,t)}function ew(e,t){return dv(2048,8,e,t)}function Pj(e,t){return dv(4,2,e,t)}function Rj(e,t){return dv(4,4,e,t)}function kj(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tj(e,t,n){return n=n!=null?n.concat([e]):null,dv(4,4,kj.bind(null,t,e),n)}function tw(){}function Ij(e,t){var n=go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Y3(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Aj(e,t){var n=go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Y3(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Nj(e,t,n){return wl&21?(_o(n,t)||(n=LD(),Vt.lanes|=n,$l|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$r=!0),e.memoizedState=n)}function UL(e,t){var n=ct;ct=n!==0&&4>n?n:4,e(!0);var r=iy.transition;iy.transition={};try{e(!1),t()}finally{ct=n,iy.transition=r}}function Fj(){return go().memoizedState}function qL(e,t,n){var r=ts(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Mj(e))Oj(t,n);else if(n=vj(e,t,n,r),n!==null){var o=nr();No(n,e,r,o),_j(n,t,r)}}function HL(e,t,n){var r=ts(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mj(e))Oj(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,_o(l,a)){var u=t.interleaved;u===null?(o.next=o,W3(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=vj(e,t,o,r),n!==null&&(o=nr(),No(n,e,r,o),_j(n,t,r))}}function Mj(e){var t=e.alternate;return e===Vt||t!==null&&t===Vt}function Oj(e,t){Xd=rg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _j(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,I3(e,n)}}var og={readContext:po,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useInsertionEffect:Nn,useLayoutEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useMutableSource:Nn,useSyncExternalStore:Nn,useId:Nn,unstable_isNewReconciler:!1},WL={readContext:po,useCallback:function(e,t){return Go().memoizedState=[e,t===void 0?null:t],e},useContext:po,useEffect:K5,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vp(4194308,4,kj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vp(4194308,4,e,t)},useInsertionEffect:function(e,t){return vp(4,2,e,t)},useMemo:function(e,t){var n=Go();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Go();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qL.bind(null,Vt,e),[r.memoizedState,e]},useRef:function(e){var t=Go();return e={current:e},t.memoizedState=e},useState:G5,useDebugValue:tw,useDeferredValue:function(e){return Go().memoizedState=e},useTransition:function(){var e=G5(!1),t=e[0];return e=UL.bind(null,e[1]),Go().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Vt,o=Go();if(It){if(n===void 0)throw Error(ie(407));n=n()}else{if(n=t(),jn===null)throw Error(ie(349));wl&30||$j(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,K5(Ej.bind(null,r,i,e),[e]),r.flags|=2048,Nf(9,Sj.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Go(),t=jn.identifierPrefix;if(It){var n=Ni,r=Ai;n=(r&~(1<<32-Ao(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=If++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zL++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},GL={readContext:po,useCallback:Ij,useContext:po,useEffect:ew,useImperativeHandle:Tj,useInsertionEffect:Pj,useLayoutEffect:Rj,useMemo:Aj,useReducer:ay,useRef:jj,useState:function(){return ay(Af)},useDebugValue:tw,useDeferredValue:function(e){var t=go();return Nj(t,bn.memoizedState,e)},useTransition:function(){var e=ay(Af)[0],t=go().memoizedState;return[e,t]},useMutableSource:bj,useSyncExternalStore:wj,useId:Fj,unstable_isNewReconciler:!1},KL={readContext:po,useCallback:Ij,useContext:po,useEffect:ew,useImperativeHandle:Tj,useInsertionEffect:Pj,useLayoutEffect:Rj,useMemo:Aj,useReducer:sy,useRef:jj,useState:function(){return sy(Af)},useDebugValue:tw,useDeferredValue:function(e){var t=go();return bn===null?t.memoizedState=e:Nj(t,bn.memoizedState,e)},useTransition:function(){var e=sy(Af)[0],t=go().memoizedState;return[e,t]},useMutableSource:bj,useSyncExternalStore:wj,useId:Fj,unstable_isNewReconciler:!1};function $o(e,t){if(e&&e.defaultProps){t=Ut({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Wx(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ut({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fv={isMounted:function(e){return(e=e._reactInternals)?Bl(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nr(),o=ts(e),i=Bi(r,o);i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,o),t!==null&&(No(t,e,o,r),pp(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nr(),o=ts(e),i=Bi(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,o),t!==null&&(No(t,e,o,r),pp(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nr(),r=ts(e),o=Bi(n,r);o.tag=2,t!=null&&(o.callback=t),t=Ja(e,o,r),t!==null&&(No(t,e,r,n),pp(t,e,r))}};function Q5(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Df(n,r)||!Df(o,i):!0}function Lj(e,t,n){var r=!1,o=ds,i=t.contextType;return typeof i=="object"&&i!==null?i=po(i):(o=Cr(t)?xl:Bn.current,r=t.contextTypes,i=(r=r!=null)?wc(e,o):ds),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fv,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Z5(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fv.enqueueReplaceState(t,t.state,null)}function Gx(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},G3(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=po(i):(i=Cr(t)?xl:Bn.current,o.context=wc(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Wx(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&fv.enqueueReplaceState(o,o.state,null),tg(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Cc(e,t){try{var n="",r=t;do n+=$_(r),r=r.return;while(r);var o=n}catch(i){o=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function ly(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Kx(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var QL=typeof WeakMap=="function"?WeakMap:Map;function Vj(e,t,n){n=Bi(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ag||(ag=!0,ob=r),Kx(e,t)},n}function Bj(e,t,n){n=Bi(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Kx(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Kx(e,t),typeof r!="function"&&(es===null?es=new Set([this]):es.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Y5(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new QL;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=uV.bind(null,e,t,n),t.then(e,e))}function X5(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function J5(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Bi(-1,1),t.tag=2,Ja(n,t,1))),n.lanes|=1),e)}var ZL=na.ReactCurrentOwner,$r=!1;function Zn(e,t,n,r){t.child=e===null?gj(t,null,n,r):Sc(t,e.child,n,r)}function eS(e,t,n,r,o){n=n.render;var i=t.ref;return Hu(t,o),r=X3(e,t,n,r,i,o),n=J3(),e!==null&&!$r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Yi(e,t,o)):(It&&n&&V3(t),t.flags|=1,Zn(e,t,r,o),t.child)}function tS(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!uw(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,zj(e,t,i,r,o)):(e=wp(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Df,n(a,r)&&e.ref===t.ref)return Yi(e,t,o)}return t.flags|=1,e=ns(i,r),e.ref=t.ref,e.return=t,t.child=e}function zj(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Df(i,r)&&e.ref===t.ref)if($r=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&($r=!0);else return t.lanes=e.lanes,Yi(e,t,o)}return Qx(e,t,n,r,o)}function Uj(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},$t(Nu,_r),_r|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,$t(Nu,_r),_r|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,$t(Nu,_r),_r|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,$t(Nu,_r),_r|=r;return Zn(e,t,o,n),t.child}function qj(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qx(e,t,n,r,o){var i=Cr(n)?xl:Bn.current;return i=wc(t,i),Hu(t,o),n=X3(e,t,n,r,i,o),r=J3(),e!==null&&!$r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Yi(e,t,o)):(It&&r&&V3(t),t.flags|=1,Zn(e,t,n,o),t.child)}function nS(e,t,n,r,o){if(Cr(n)){var i=!0;Zp(t)}else i=!1;if(Hu(t,o),t.stateNode===null)yp(e,t),Lj(t,n,r),Gx(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var u=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=po(c):(c=Cr(n)?xl:Bn.current,c=wc(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||u!==c)&&Z5(t,a,r,c),Ca=!1;var h=t.memoizedState;a.state=h,tg(t,r,a,o),u=t.memoizedState,l!==r||h!==u||Er.current||Ca?(typeof d=="function"&&(Wx(t,n,d,r),u=t.memoizedState),(l=Ca||Q5(t,n,l,r,h,u,c))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,yj(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:$o(t.type,l),a.props=c,f=t.pendingProps,h=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=po(u):(u=Cr(n)?xl:Bn.current,u=wc(t,u));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||h!==u)&&Z5(t,a,r,u),Ca=!1,h=t.memoizedState,a.state=h,tg(t,r,a,o);var g=t.memoizedState;l!==f||h!==g||Er.current||Ca?(typeof p=="function"&&(Wx(t,n,p,r),g=t.memoizedState),(c=Ca||Q5(t,n,c,r,h,g,u)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=u,r=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Zx(e,t,n,r,i,o)}function Zx(e,t,n,r,o,i){qj(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&B5(t,n,!1),Yi(e,t,i);r=t.stateNode,ZL.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Sc(t,e.child,null,i),t.child=Sc(t,null,l,i)):Zn(e,t,l,i),t.memoizedState=r.state,o&&B5(t,n,!0),t.child}function Hj(e){var t=e.stateNode;t.pendingContext?V5(e,t.pendingContext,t.pendingContext!==t.context):t.context&&V5(e,t.context,!1),K3(e,t.containerInfo)}function rS(e,t,n,r,o){return $c(),z3(o),t.flags|=256,Zn(e,t,n,r),t.child}var Yx={dehydrated:null,treeContext:null,retryLane:0};function Xx(e){return{baseLanes:e,cachePool:null,transitions:null}}function Wj(e,t,n){var r=t.pendingProps,o=Mt.current,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),$t(Mt,o&1),e===null)return qx(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=pv(a,r,0,null),e=ul(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Xx(n),t.memoizedState=Yx,e):nw(t,a));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return YL(e,t,a,r,l,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,l=o.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=ns(o,u),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=ns(l,i):(i=ul(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?Xx(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=Yx,r}return i=e.child,e=i.sibling,r=ns(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function nw(e,t){return t=pv({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function bm(e,t,n,r){return r!==null&&z3(r),Sc(t,e.child,null,n),e=nw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function YL(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=ly(Error(ie(422))),bm(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=pv({mode:"visible",children:r.children},o,0,null),i=ul(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Sc(t,e.child,null,a),t.child.memoizedState=Xx(a),t.memoizedState=Yx,i);if(!(t.mode&1))return bm(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(ie(419)),r=ly(i,r,void 0),bm(e,t,a,r)}if(l=(a&e.childLanes)!==0,$r||l){if(r=jn,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Zi(e,o),No(r,e,o,-1))}return lw(),r=ly(Error(ie(421))),bm(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=cV.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Vr=Xa(o.nextSibling),zr=t,It=!0,jo=null,e!==null&&(io[ao++]=Ai,io[ao++]=Ni,io[ao++]=bl,Ai=e.id,Ni=e.overflow,bl=t),t=nw(t,r.children),t.flags|=4096,t)}function oS(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hx(e.return,t,n)}function uy(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Gj(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Zn(e,t,r.children,n),r=Mt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oS(e,n,t);else if(e.tag===19)oS(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}r&=1}if($t(Mt,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ng(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),uy(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ng(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}uy(t,!0,n,null,i);break;case"together":uy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yp(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yi(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$l|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,n=ns(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ns(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function XL(e,t,n){switch(t.tag){case 3:Hj(t),$c();break;case 5:xj(t);break;case 1:Cr(t.type)&&Zp(t);break;case 4:K3(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;$t(Jp,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?($t(Mt,Mt.current&1),t.flags|=128,null):n&t.child.childLanes?Wj(e,t,n):($t(Mt,Mt.current&1),e=Yi(e,t,n),e!==null?e.sibling:null);$t(Mt,Mt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Gj(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),$t(Mt,Mt.current),r)break;return null;case 22:case 23:return t.lanes=0,Uj(e,t,n)}return Yi(e,t,n)}var Kj,Jx,Qj,Zj;Kj=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Jx=function(){};Qj=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Us(ri.current);var i=null;switch(n){case"input":o=wx(e,o),r=wx(e,r),i=[];break;case"select":o=Ut({},o,{value:void 0}),r=Ut({},r,{value:void 0}),i=[];break;case"textarea":o=Ex(e,o),r=Ex(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Kp)}Dx(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var l=o[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(xf.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(l=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(i=i||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(xf.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&jt("scroll",e),i||l===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Zj=function(e,t,n,r){n!==r&&(t.flags|=4)};function ld(e,t){if(!It)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function JL(e,t,n){var r=t.pendingProps;switch(B3(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fn(t),null;case 1:return Cr(t.type)&&Qp(),Fn(t),null;case 3:return r=t.stateNode,Ec(),Pt(Er),Pt(Bn),Z3(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ym(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,jo!==null&&(sb(jo),jo=null))),Jx(e,t),Fn(t),null;case 5:Q3(t);var o=Us(Tf.current);if(n=t.type,e!==null&&t.stateNode!=null)Qj(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ie(166));return Fn(t),null}if(e=Us(ri.current),ym(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Jo]=t,r[Rf]=i,e=(t.mode&1)!==0,n){case"dialog":jt("cancel",r),jt("close",r);break;case"iframe":case"object":case"embed":jt("load",r);break;case"video":case"audio":for(o=0;o<Vd.length;o++)jt(Vd[o],r);break;case"source":jt("error",r);break;case"img":case"image":case"link":jt("error",r),jt("load",r);break;case"details":jt("toggle",r);break;case"input":h5(r,i),jt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},jt("invalid",r);break;case"textarea":p5(r,i),jt("invalid",r)}Dx(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&vm(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&vm(r.textContent,l,e),o=["children",""+l]):xf.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&jt("scroll",r)}switch(n){case"input":um(r),m5(r,i,!0);break;case"textarea":um(r),g5(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Kp)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ED(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Jo]=t,e[Rf]=r,Kj(e,t,!1,!1),t.stateNode=e;e:{switch(a=jx(n,r),n){case"dialog":jt("cancel",e),jt("close",e),o=r;break;case"iframe":case"object":case"embed":jt("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vd.length;o++)jt(Vd[o],e);o=r;break;case"source":jt("error",e),o=r;break;case"img":case"image":case"link":jt("error",e),jt("load",e),o=r;break;case"details":jt("toggle",e),o=r;break;case"input":h5(e,r),o=wx(e,r),jt("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ut({},r,{value:void 0}),jt("invalid",e);break;case"textarea":p5(e,r),o=Ex(e,r),jt("invalid",e);break;default:o=r}Dx(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];i==="style"?jD(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&CD(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&bf(e,u):typeof u=="number"&&bf(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(xf.hasOwnProperty(i)?u!=null&&i==="onScroll"&&jt("scroll",e):u!=null&&D3(e,i,u,a))}switch(n){case"input":um(e),m5(e,r,!1);break;case"textarea":um(e),g5(e);break;case"option":r.value!=null&&e.setAttribute("value",""+cs(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Bu(e,!!r.multiple,i,!1):r.defaultValue!=null&&Bu(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Kp)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Fn(t),null;case 6:if(e&&t.stateNode!=null)Zj(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ie(166));if(n=Us(Tf.current),Us(ri.current),ym(t)){if(r=t.stateNode,n=t.memoizedProps,r[Jo]=t,(i=r.nodeValue!==n)&&(e=zr,e!==null))switch(e.tag){case 3:vm(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vm(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Jo]=t,t.stateNode=r}return Fn(t),null;case 13:if(Pt(Mt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(It&&Vr!==null&&t.mode&1&&!(t.flags&128))mj(),$c(),t.flags|=98560,i=!1;else if(i=ym(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(ie(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ie(317));i[Jo]=t}else $c(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fn(t),i=!1}else jo!==null&&(sb(jo),jo=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Mt.current&1?$n===0&&($n=3):lw())),t.updateQueue!==null&&(t.flags|=4),Fn(t),null);case 4:return Ec(),Jx(e,t),e===null&&jf(t.stateNode.containerInfo),Fn(t),null;case 10:return H3(t.type._context),Fn(t),null;case 17:return Cr(t.type)&&Qp(),Fn(t),null;case 19:if(Pt(Mt),i=t.memoizedState,i===null)return Fn(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)ld(i,!1);else{if($n!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ng(e),a!==null){for(t.flags|=128,ld(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return $t(Mt,Mt.current&1|2),t.child}e=e.sibling}i.tail!==null&&nn()>Dc&&(t.flags|=128,r=!0,ld(i,!1),t.lanes=4194304)}else{if(!r)if(e=ng(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ld(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!It)return Fn(t),null}else 2*nn()-i.renderingStartTime>Dc&&n!==1073741824&&(t.flags|=128,r=!0,ld(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=nn(),t.sibling=null,n=Mt.current,$t(Mt,r?n&1|2:n&1),t):(Fn(t),null);case 22:case 23:return sw(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_r&1073741824&&(Fn(t),t.subtreeFlags&6&&(t.flags|=8192)):Fn(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function eV(e,t){switch(B3(t),t.tag){case 1:return Cr(t.type)&&Qp(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ec(),Pt(Er),Pt(Bn),Z3(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Q3(t),null;case 13:if(Pt(Mt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));$c()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pt(Mt),null;case 4:return Ec(),null;case 10:return H3(t.type._context),null;case 22:case 23:return sw(),null;case 24:return null;default:return null}}var wm=!1,Ln=!1,tV=typeof WeakSet=="function"?WeakSet:Set,we=null;function Au(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qt(e,t,r)}else n.current=null}function eb(e,t,n){try{n()}catch(r){Qt(e,t,r)}}var iS=!1;function nV(e,t){if(Ox=Hp,e=tj(),L3(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||o!==0&&f.nodeType!==3||(l=a+o),f!==i||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===o&&(l=a),h===i&&++d===r&&(u=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(_x={focusedElem:e,selectionRange:n},Hp=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,b=g.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?v:$o(t.type,v),b);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(S){Qt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return g=iS,iS=!1,g}function Jd(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&eb(t,n,i)}o=o.next}while(o!==r)}}function hv(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function tb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Yj(e){var t=e.alternate;t!==null&&(e.alternate=null,Yj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jo],delete t[Rf],delete t[Bx],delete t[_L],delete t[LL])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Xj(e){return e.tag===5||e.tag===3||e.tag===4}function aS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xj(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.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 nb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kp));else if(r!==4&&(e=e.child,e!==null))for(nb(e,t,n),e=e.sibling;e!==null;)nb(e,t,n),e=e.sibling}function rb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(rb(e,t,n),e=e.sibling;e!==null;)rb(e,t,n),e=e.sibling}var Tn=null,Co=!1;function ha(e,t,n){for(n=n.child;n!==null;)Jj(e,t,n),n=n.sibling}function Jj(e,t,n){if(ni&&typeof ni.onCommitFiberUnmount=="function")try{ni.onCommitFiberUnmount(iv,n)}catch{}switch(n.tag){case 5:Ln||Au(n,t);case 6:var r=Tn,o=Co;Tn=null,ha(e,t,n),Tn=r,Co=o,Tn!==null&&(Co?(e=Tn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Tn.removeChild(n.stateNode));break;case 18:Tn!==null&&(Co?(e=Tn,n=n.stateNode,e.nodeType===8?ny(e.parentNode,n):e.nodeType===1&&ny(e,n),Ef(e)):ny(Tn,n.stateNode));break;case 4:r=Tn,o=Co,Tn=n.stateNode.containerInfo,Co=!0,ha(e,t,n),Tn=r,Co=o;break;case 0:case 11:case 14:case 15:if(!Ln&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&eb(n,t,a),o=o.next}while(o!==r)}ha(e,t,n);break;case 1:if(!Ln&&(Au(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Qt(n,t,l)}ha(e,t,n);break;case 21:ha(e,t,n);break;case 22:n.mode&1?(Ln=(r=Ln)||n.memoizedState!==null,ha(e,t,n),Ln=r):ha(e,t,n);break;default:ha(e,t,n)}}function sS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tV),t.forEach(function(r){var o=dV.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function wo(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:Tn=l.stateNode,Co=!1;break e;case 3:Tn=l.stateNode.containerInfo,Co=!0;break e;case 4:Tn=l.stateNode.containerInfo,Co=!0;break e}l=l.return}if(Tn===null)throw Error(ie(160));Jj(i,a,o),Tn=null,Co=!1;var u=o.alternate;u!==null&&(u.return=null),o.return=null}catch(c){Qt(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)eP(t,e),t=t.sibling}function eP(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wo(t,e),Wo(e),r&4){try{Jd(3,e,e.return),hv(3,e)}catch(v){Qt(e,e.return,v)}try{Jd(5,e,e.return)}catch(v){Qt(e,e.return,v)}}break;case 1:wo(t,e),Wo(e),r&512&&n!==null&&Au(n,n.return);break;case 5:if(wo(t,e),Wo(e),r&512&&n!==null&&Au(n,n.return),e.flags&32){var o=e.stateNode;try{bf(o,"")}catch(v){Qt(e,e.return,v)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&$D(o,i),jx(l,a);var c=jx(l,i);for(a=0;a<u.length;a+=2){var d=u[a],f=u[a+1];d==="style"?jD(o,f):d==="dangerouslySetInnerHTML"?CD(o,f):d==="children"?bf(o,f):D3(o,d,f,c)}switch(l){case"input":$x(o,i);break;case"textarea":SD(o,i);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Bu(o,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?Bu(o,!!i.multiple,i.defaultValue,!0):Bu(o,!!i.multiple,i.multiple?[]:"",!1))}o[Rf]=i}catch(v){Qt(e,e.return,v)}}break;case 6:if(wo(t,e),Wo(e),r&4){if(e.stateNode===null)throw Error(ie(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(v){Qt(e,e.return,v)}}break;case 3:if(wo(t,e),Wo(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ef(t.containerInfo)}catch(v){Qt(e,e.return,v)}break;case 4:wo(t,e),Wo(e);break;case 13:wo(t,e),Wo(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(iw=nn())),r&4&&sS(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ln=(c=Ln)||d,wo(t,e),Ln=c):wo(t,e),Wo(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(we=e,d=e.child;d!==null;){for(f=we=d;we!==null;){switch(h=we,p=h.child,h.tag){case 0:case 11:case 14:case 15:Jd(4,h,h.return);break;case 1:Au(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){Qt(r,n,v)}}break;case 5:Au(h,h.return);break;case 22:if(h.memoizedState!==null){uS(f);continue}}p!==null?(p.return=h,we=p):uS(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{o=f.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,u=f.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=DD("display",a))}catch(v){Qt(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(v){Qt(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:wo(t,e),Wo(e),r&4&&sS(e);break;case 21:break;default:wo(t,e),Wo(e)}}function Wo(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Xj(n)){var r=n;break e}n=n.return}throw Error(ie(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(bf(o,""),r.flags&=-33);var i=aS(e);rb(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,l=aS(e);nb(e,l,a);break;default:throw Error(ie(161))}}catch(u){Qt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rV(e,t,n){we=e,tP(e)}function tP(e,t,n){for(var r=(e.mode&1)!==0;we!==null;){var o=we,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||wm;if(!a){var l=o.alternate,u=l!==null&&l.memoizedState!==null||Ln;l=wm;var c=Ln;if(wm=a,(Ln=u)&&!c)for(we=o;we!==null;)a=we,u=a.child,a.tag===22&&a.memoizedState!==null?cS(o):u!==null?(u.return=a,we=u):cS(o);for(;i!==null;)we=i,tP(i),i=i.sibling;we=o,wm=l,Ln=c}lS(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,we=i):lS(e)}}function lS(e){for(;we!==null;){var t=we;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ln||hv(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ln)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:$o(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&W5(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}W5(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ef(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}Ln||t.flags&512&&tb(t)}catch(h){Qt(t,t.return,h)}}if(t===e){we=null;break}if(n=t.sibling,n!==null){n.return=t.return,we=n;break}we=t.return}}function uS(e){for(;we!==null;){var t=we;if(t===e){we=null;break}var n=t.sibling;if(n!==null){n.return=t.return,we=n;break}we=t.return}}function cS(e){for(;we!==null;){var t=we;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{hv(4,t)}catch(u){Qt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(u){Qt(t,o,u)}}var i=t.return;try{tb(t)}catch(u){Qt(t,i,u)}break;case 5:var a=t.return;try{tb(t)}catch(u){Qt(t,a,u)}}}catch(u){Qt(t,t.return,u)}if(t===e){we=null;break}var l=t.sibling;if(l!==null){l.return=t.return,we=l;break}we=t.return}}var oV=Math.ceil,ig=na.ReactCurrentDispatcher,rw=na.ReactCurrentOwner,mo=na.ReactCurrentBatchConfig,et=0,jn=null,hn=null,In=0,_r=0,Nu=ws(0),$n=0,Ff=null,$l=0,mv=0,ow=0,ef=null,xr=null,iw=0,Dc=1/0,ji=null,ag=!1,ob=null,es=null,$m=!1,_a=null,sg=0,tf=0,ib=null,xp=-1,bp=0;function nr(){return et&6?nn():xp!==-1?xp:xp=nn()}function ts(e){return e.mode&1?et&2&&In!==0?In&-In:BL.transition!==null?(bp===0&&(bp=LD()),bp):(e=ct,e!==0||(e=window.event,e=e===void 0?16:WD(e.type)),e):1}function No(e,t,n,r){if(50<tf)throw tf=0,ib=null,Error(ie(185));gh(e,n,r),(!(et&2)||e!==jn)&&(e===jn&&(!(et&2)&&(mv|=n),$n===4&&Pa(e,In)),Dr(e,r),n===1&&et===0&&!(t.mode&1)&&(Dc=nn()+500,cv&&$s()))}function Dr(e,t){var n=e.callbackNode;B_(e,t);var r=qp(e,e===jn?In:0);if(r===0)n!==null&&x5(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&x5(n),t===1)e.tag===0?VL(dS.bind(null,e)):dj(dS.bind(null,e)),ML(function(){!(et&6)&&$s()}),n=null;else{switch(VD(r)){case 1:n=T3;break;case 4:n=OD;break;case 16:n=Up;break;case 536870912:n=_D;break;default:n=Up}n=uP(n,nP.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nP(e,t){if(xp=-1,bp=0,et&6)throw Error(ie(327));var n=e.callbackNode;if(Wu()&&e.callbackNode!==n)return null;var r=qp(e,e===jn?In:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=lg(e,r);else{t=r;var o=et;et|=2;var i=oP();(jn!==e||In!==t)&&(ji=null,Dc=nn()+500,ll(e,t));do try{sV();break}catch(l){rP(e,l)}while(!0);q3(),ig.current=i,et=o,hn!==null?t=0:(jn=null,In=0,t=$n)}if(t!==0){if(t===2&&(o=Ix(e),o!==0&&(r=o,t=ab(e,o))),t===1)throw n=Ff,ll(e,0),Pa(e,r),Dr(e,nn()),n;if(t===6)Pa(e,r);else{if(o=e.current.alternate,!(r&30)&&!iV(o)&&(t=lg(e,r),t===2&&(i=Ix(e),i!==0&&(r=i,t=ab(e,i))),t===1))throw n=Ff,ll(e,0),Pa(e,r),Dr(e,nn()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(ie(345));case 2:Is(e,xr,ji);break;case 3:if(Pa(e,r),(r&130023424)===r&&(t=iw+500-nn(),10<t)){if(qp(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){nr(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Vx(Is.bind(null,e,xr,ji),t);break}Is(e,xr,ji);break;case 4:if(Pa(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-Ao(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oV(r/1960))-r,10<r){e.timeoutHandle=Vx(Is.bind(null,e,xr,ji),r);break}Is(e,xr,ji);break;case 5:Is(e,xr,ji);break;default:throw Error(ie(329))}}}return Dr(e,nn()),e.callbackNode===n?nP.bind(null,e):null}function ab(e,t){var n=ef;return e.current.memoizedState.isDehydrated&&(ll(e,t).flags|=256),e=lg(e,t),e!==2&&(t=xr,xr=n,t!==null&&sb(t)),e}function sb(e){xr===null?xr=e:xr.push.apply(xr,e)}function iV(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!_o(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pa(e,t){for(t&=~ow,t&=~mv,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ao(t),r=1<<n;e[n]=-1,t&=~r}}function dS(e){if(et&6)throw Error(ie(327));Wu();var t=qp(e,0);if(!(t&1))return Dr(e,nn()),null;var n=lg(e,t);if(e.tag!==0&&n===2){var r=Ix(e);r!==0&&(t=r,n=ab(e,r))}if(n===1)throw n=Ff,ll(e,0),Pa(e,t),Dr(e,nn()),n;if(n===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Is(e,xr,ji),Dr(e,nn()),null}function aw(e,t){var n=et;et|=1;try{return e(t)}finally{et=n,et===0&&(Dc=nn()+500,cv&&$s())}}function Sl(e){_a!==null&&_a.tag===0&&!(et&6)&&Wu();var t=et;et|=1;var n=mo.transition,r=ct;try{if(mo.transition=null,ct=1,e)return e()}finally{ct=r,mo.transition=n,et=t,!(et&6)&&$s()}}function sw(){_r=Nu.current,Pt(Nu)}function ll(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,FL(n)),hn!==null)for(n=hn.return;n!==null;){var r=n;switch(B3(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Qp();break;case 3:Ec(),Pt(Er),Pt(Bn),Z3();break;case 5:Q3(r);break;case 4:Ec();break;case 13:Pt(Mt);break;case 19:Pt(Mt);break;case 10:H3(r.type._context);break;case 22:case 23:sw()}n=n.return}if(jn=e,hn=e=ns(e.current,null),In=_r=t,$n=0,Ff=null,ow=mv=$l=0,xr=ef=null,zs!==null){for(t=0;t<zs.length;t++)if(n=zs[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}zs=null}return e}function rP(e,t){do{var n=hn;try{if(q3(),gp.current=og,rg){for(var r=Vt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}rg=!1}if(wl=0,Cn=bn=Vt=null,Xd=!1,If=0,rw.current=null,n===null||n.return===null){$n=1,Ff=t,hn=null;break}e:{var i=e,a=n.return,l=n,u=t;if(t=In,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=X5(a);if(p!==null){p.flags&=-257,J5(p,a,l,i,t),p.mode&1&&Y5(i,c,t),t=p,u=c;var g=t.updateQueue;if(g===null){var v=new Set;v.add(u),t.updateQueue=v}else g.add(u);break e}else{if(!(t&1)){Y5(i,c,t),lw();break e}u=Error(ie(426))}}else if(It&&l.mode&1){var b=X5(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),J5(b,a,l,i,t),z3(Cc(u,l));break e}}i=u=Cc(u,l),$n!==4&&($n=2),ef===null?ef=[i]:ef.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=Vj(i,u,t);H5(i,x);break e;case 1:l=u;var y=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(es===null||!es.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=Bj(i,l,t);H5(i,S);break e}}i=i.return}while(i!==null)}aP(n)}catch(C){t=C,hn===n&&n!==null&&(hn=n=n.return);continue}break}while(!0)}function oP(){var e=ig.current;return ig.current=og,e===null?og:e}function lw(){($n===0||$n===3||$n===2)&&($n=4),jn===null||!($l&268435455)&&!(mv&268435455)||Pa(jn,In)}function lg(e,t){var n=et;et|=2;var r=oP();(jn!==e||In!==t)&&(ji=null,ll(e,t));do try{aV();break}catch(o){rP(e,o)}while(!0);if(q3(),et=n,ig.current=r,hn!==null)throw Error(ie(261));return jn=null,In=0,$n}function aV(){for(;hn!==null;)iP(hn)}function sV(){for(;hn!==null&&!I_();)iP(hn)}function iP(e){var t=lP(e.alternate,e,_r);e.memoizedProps=e.pendingProps,t===null?aP(e):hn=t,rw.current=null}function aP(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=eV(n,t),n!==null){n.flags&=32767,hn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{$n=6,hn=null;return}}else if(n=JL(n,t,_r),n!==null){hn=n;return}if(t=t.sibling,t!==null){hn=t;return}hn=t=e}while(t!==null);$n===0&&($n=5)}function Is(e,t,n){var r=ct,o=mo.transition;try{mo.transition=null,ct=1,lV(e,t,n,r)}finally{mo.transition=o,ct=r}return null}function lV(e,t,n,r){do Wu();while(_a!==null);if(et&6)throw Error(ie(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(z_(e,i),e===jn&&(hn=jn=null,In=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||$m||($m=!0,uP(Up,function(){return Wu(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=mo.transition,mo.transition=null;var a=ct;ct=1;var l=et;et|=4,rw.current=null,nV(e,n),eP(n,e),PL(_x),Hp=!!Ox,_x=Ox=null,e.current=n,rV(n),A_(),et=l,ct=a,mo.transition=i}else e.current=n;if($m&&($m=!1,_a=e,sg=o),i=e.pendingLanes,i===0&&(es=null),M_(n.stateNode),Dr(e,nn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ag)throw ag=!1,e=ob,ob=null,e;return sg&1&&e.tag!==0&&Wu(),i=e.pendingLanes,i&1?e===ib?tf++:(tf=0,ib=e):tf=0,$s(),null}function Wu(){if(_a!==null){var e=VD(sg),t=mo.transition,n=ct;try{if(mo.transition=null,ct=16>e?16:e,_a===null)var r=!1;else{if(e=_a,_a=null,sg=0,et&6)throw Error(ie(331));var o=et;for(et|=4,we=e.current;we!==null;){var i=we,a=i.child;if(we.flags&16){var l=i.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(we=c;we!==null;){var d=we;switch(d.tag){case 0:case 11:case 15:Jd(8,d,i)}var f=d.child;if(f!==null)f.return=d,we=f;else for(;we!==null;){d=we;var h=d.sibling,p=d.return;if(Yj(d),d===c){we=null;break}if(h!==null){h.return=p,we=h;break}we=p}}}var g=i.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}we=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,we=a;else e:for(;we!==null;){if(i=we,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Jd(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,we=x;break e}we=i.return}}var y=e.current;for(we=y;we!==null;){a=we;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,we=w;else e:for(a=y;we!==null;){if(l=we,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:hv(9,l)}}catch(C){Qt(l,l.return,C)}if(l===a){we=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,we=S;break e}we=l.return}}if(et=o,$s(),ni&&typeof ni.onPostCommitFiberRoot=="function")try{ni.onPostCommitFiberRoot(iv,e)}catch{}r=!0}return r}finally{ct=n,mo.transition=t}}return!1}function fS(e,t,n){t=Cc(n,t),t=Vj(e,t,1),e=Ja(e,t,1),t=nr(),e!==null&&(gh(e,1,t),Dr(e,t))}function Qt(e,t,n){if(e.tag===3)fS(e,e,n);else for(;t!==null;){if(t.tag===3){fS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(es===null||!es.has(r))){e=Cc(n,e),e=Bj(t,e,1),t=Ja(t,e,1),e=nr(),t!==null&&(gh(t,1,e),Dr(t,e));break}}t=t.return}}function uV(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=nr(),e.pingedLanes|=e.suspendedLanes&n,jn===e&&(In&n)===n&&($n===4||$n===3&&(In&130023424)===In&&500>nn()-iw?ll(e,0):ow|=n),Dr(e,t)}function sP(e,t){t===0&&(e.mode&1?(t=fm,fm<<=1,!(fm&130023424)&&(fm=4194304)):t=1);var n=nr();e=Zi(e,t),e!==null&&(gh(e,t,n),Dr(e,n))}function cV(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sP(e,n)}function dV(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ie(314))}r!==null&&r.delete(t),sP(e,n)}var lP;lP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Er.current)$r=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return $r=!1,XL(e,t,n);$r=!!(e.flags&131072)}else $r=!1,It&&t.flags&1048576&&fj(t,Xp,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yp(e,t),e=t.pendingProps;var o=wc(t,Bn.current);Hu(t,n),o=X3(null,t,r,e,o,n);var i=J3();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Cr(r)?(i=!0,Zp(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,G3(t),o.updater=fv,t.stateNode=o,o._reactInternals=t,Gx(t,r,e,n),t=Zx(null,t,r,!0,i,n)):(t.tag=0,It&&i&&V3(t),Zn(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yp(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=hV(r),e=$o(r,e),o){case 0:t=Qx(null,t,r,e,n);break e;case 1:t=nS(null,t,r,e,n);break e;case 11:t=eS(null,t,r,e,n);break e;case 14:t=tS(null,t,r,$o(r.type,e),n);break e}throw Error(ie(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$o(r,o),Qx(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$o(r,o),nS(e,t,r,o,n);case 3:e:{if(Hj(t),e===null)throw Error(ie(387));r=t.pendingProps,i=t.memoizedState,o=i.element,yj(e,t),tg(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Cc(Error(ie(423)),t),t=rS(e,t,r,n,o);break e}else if(r!==o){o=Cc(Error(ie(424)),t),t=rS(e,t,r,n,o);break e}else for(Vr=Xa(t.stateNode.containerInfo.firstChild),zr=t,It=!0,jo=null,n=gj(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($c(),r===o){t=Yi(e,t,n);break e}Zn(e,t,r,n)}t=t.child}return t;case 5:return xj(t),e===null&&qx(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Lx(r,o)?a=null:i!==null&&Lx(r,i)&&(t.flags|=32),qj(e,t),Zn(e,t,a,n),t.child;case 6:return e===null&&qx(t),null;case 13:return Wj(e,t,n);case 4:return K3(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Sc(t,null,r,n):Zn(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$o(r,o),eS(e,t,r,o,n);case 7:return Zn(e,t,t.pendingProps,n),t.child;case 8:return Zn(e,t,t.pendingProps.children,n),t.child;case 12:return Zn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,$t(Jp,r._currentValue),r._currentValue=a,i!==null)if(_o(i.value,a)){if(i.children===o.children&&!Er.current){t=Yi(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Bi(-1,n&-n),u.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Hx(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ie(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Hx(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Zn(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hu(t,n),o=po(o),r=r(o),t.flags|=1,Zn(e,t,r,n),t.child;case 14:return r=t.type,o=$o(r,t.pendingProps),o=$o(r.type,o),tS(e,t,r,o,n);case 15:return zj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$o(r,o),yp(e,t),t.tag=1,Cr(r)?(e=!0,Zp(t)):e=!1,Hu(t,n),Lj(t,r,o),Gx(t,r,o,n),Zx(null,t,r,!0,e,n);case 19:return Gj(e,t,n);case 22:return Uj(e,t,n)}throw Error(ie(156,t.tag))};function uP(e,t){return MD(e,t)}function fV(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function co(e,t,n,r){return new fV(e,t,n,r)}function uw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hV(e){if(typeof e=="function")return uw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===P3)return 11;if(e===R3)return 14}return 2}function ns(e,t){var n=e.alternate;return n===null?(n=co(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&14680064,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}function wp(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")uw(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Eu:return ul(n.children,o,i,t);case j3:a=8,o|=8;break;case vx:return e=co(12,n,t,o|2),e.elementType=vx,e.lanes=i,e;case yx:return e=co(13,n,t,o),e.elementType=yx,e.lanes=i,e;case xx:return e=co(19,n,t,o),e.elementType=xx,e.lanes=i,e;case xD:return pv(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vD:a=10;break e;case yD:a=9;break e;case P3:a=11;break e;case R3:a=14;break e;case Ea:a=16,r=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=co(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ul(e,t,n,r){return e=co(7,e,r,t),e.lanes=n,e}function pv(e,t,n,r){return e=co(22,e,r,t),e.elementType=xD,e.lanes=n,e.stateNode={isHidden:!1},e}function cy(e,t,n){return e=co(6,e,null,t),e.lanes=n,e}function dy(e,t,n){return t=co(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mV(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=H0(0),this.expirationTimes=H0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=H0(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function cw(e,t,n,r,o,i,a,l,u){return e=new mV(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=co(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},G3(i),e}function pV(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Su,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cP(e){if(!e)return ds;e=e._reactInternals;e:{if(Bl(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Cr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var n=e.type;if(Cr(n))return cj(e,n,t)}return t}function dP(e,t,n,r,o,i,a,l,u){return e=cw(n,r,!0,e,o,i,a,l,u),e.context=cP(null),n=e.current,r=nr(),o=ts(n),i=Bi(r,o),i.callback=t??null,Ja(n,i,o),e.current.lanes=o,gh(e,o,r),Dr(e,r),e}function gv(e,t,n,r){var o=t.current,i=nr(),a=ts(o);return n=cP(n),t.context===null?t.context=n:t.pendingContext=n,t=Bi(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ja(o,t,a),e!==null&&(No(e,o,a,i),pp(e,o,a)),a}function ug(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function hS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dw(e,t){hS(e,t),(e=e.alternate)&&hS(e,t)}function gV(){return null}var fP=typeof reportError=="function"?reportError:function(e){console.error(e)};function fw(e){this._internalRoot=e}vv.prototype.render=fw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));gv(e,t,null,null)};vv.prototype.unmount=fw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sl(function(){gv(null,e,null,null)}),t[Qi]=null}};function vv(e){this._internalRoot=e}vv.prototype.unstable_scheduleHydration=function(e){if(e){var t=UD();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ja.length&&t!==0&&t<ja[n].priority;n++);ja.splice(n,0,e),n===0&&HD(e)}};function hw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mS(){}function vV(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=ug(a);i.call(c)}}var a=dP(t,r,e,0,null,!1,!1,"",mS);return e._reactRootContainer=a,e[Qi]=a.current,jf(e.nodeType===8?e.parentNode:e),Sl(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var c=ug(u);l.call(c)}}var u=cw(e,0,!1,null,null,!1,!1,"",mS);return e._reactRootContainer=u,e[Qi]=u.current,jf(e.nodeType===8?e.parentNode:e),Sl(function(){gv(t,u,n,r)}),u}function xv(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var l=o;o=function(){var u=ug(a);l.call(u)}}gv(t,a,e,o)}else a=vV(n,t,e,o,r);return ug(a)}BD=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ld(t.pendingLanes);n!==0&&(I3(t,n|1),Dr(t,nn()),!(et&6)&&(Dc=nn()+500,$s()))}break;case 13:Sl(function(){var r=Zi(e,1);if(r!==null){var o=nr();No(r,e,1,o)}}),dw(e,1)}};A3=function(e){if(e.tag===13){var t=Zi(e,134217728);if(t!==null){var n=nr();No(t,e,134217728,n)}dw(e,134217728)}};zD=function(e){if(e.tag===13){var t=ts(e),n=Zi(e,t);if(n!==null){var r=nr();No(n,e,t,r)}dw(e,t)}};UD=function(){return ct};qD=function(e,t){var n=ct;try{return ct=e,t()}finally{ct=n}};Rx=function(e,t,n){switch(t){case"input":if($x(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=uv(r);if(!o)throw Error(ie(90));wD(r),$x(r,o)}}}break;case"textarea":SD(e,n);break;case"select":t=n.value,t!=null&&Bu(e,!!n.multiple,t,!1)}};kD=aw;TD=Sl;var yV={usingClientEntryPoint:!1,Events:[yh,Pu,uv,PD,RD,aw]},ud={findFiberByHostInstance:Bs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xV={bundleType:ud.bundleType,version:ud.version,rendererPackageName:ud.rendererPackageName,rendererConfig:ud.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:na.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ND(e),e===null?null:e.stateNode},findFiberByHostInstance:ud.findFiberByHostInstance||gV,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sm.isDisabled&&Sm.supportsFiber)try{iv=Sm.inject(xV),ni=Sm}catch{}}Kr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yV;Kr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hw(t))throw Error(ie(200));return pV(e,t,null,n)};Kr.createRoot=function(e,t){if(!hw(e))throw Error(ie(299));var n=!1,r="",o=fP;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=cw(e,1,!1,null,null,n,!1,r,o),e[Qi]=t.current,jf(e.nodeType===8?e.parentNode:e),new fw(t)};Kr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=ND(t),e=e===null?null:e.stateNode,e};Kr.flushSync=function(e){return Sl(e)};Kr.hydrate=function(e,t,n){if(!yv(t))throw Error(ie(200));return xv(null,e,t,!0,n)};Kr.hydrateRoot=function(e,t,n){if(!hw(e))throw Error(ie(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=fP;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=dP(t,null,e,1,n??null,o,!1,i,a),e[Qi]=t.current,jf(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new vv(t)};Kr.render=function(e,t,n){if(!yv(t))throw Error(ie(200));return xv(null,e,t,!1,n)};Kr.unmountComponentAtNode=function(e){if(!yv(e))throw Error(ie(40));return e._reactRootContainer?(Sl(function(){xv(null,null,e,!1,function(){e._reactRootContainer=null,e[Qi]=null})}),!0):!1};Kr.unstable_batchedUpdates=aw;Kr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yv(n))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return xv(e,t,n,!1,r)};Kr.version="18.3.1-next-f1338f8080-20240426";function hP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hP)}catch(e){console.error(e)}}hP(),hD.exports=Kr;var or=hD.exports;const mw=pi(or),bV=M7({__proto__:null,default:mw},[or]);var mP,pS=or;mP=pS.createRoot,pS.hydrateRoot;/**
 * @remix-run/router v1.17.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tt.apply(this,arguments)}var Kt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Kt||(Kt={}));const gS="popstate";function wV(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:a,hash:l}=r.location;return Mf("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:El(o)}return SV(t,n,null,e)}function Oe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $V(){return Math.random().toString(36).substr(2,8)}function vS(e,t){return{usr:e.state,key:e.key,idx:t}}function Mf(e,t,n,r){return n===void 0&&(n=null),Tt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ra(t):t,{state:n,key:t&&t.key||r||$V()})}function El(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ra(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function SV(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l=Kt.Pop,u=null,c=d();c==null&&(c=0,a.replaceState(Tt({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function f(){l=Kt.Pop;let b=d(),x=b==null?null:b-c;c=b,u&&u({action:l,location:v.location,delta:x})}function h(b,x){l=Kt.Push;let y=Mf(v.location,b,x);n&&n(y,b),c=d()+1;let w=vS(y,c),S=v.createHref(y);try{a.pushState(w,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(S)}i&&u&&u({action:l,location:v.location,delta:1})}function p(b,x){l=Kt.Replace;let y=Mf(v.location,b,x);n&&n(y,b),c=d();let w=vS(y,c),S=v.createHref(y);a.replaceState(w,"",S),i&&u&&u({action:l,location:v.location,delta:0})}function g(b){let x=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof b=="string"?b:El(b);return y=y.replace(/ $/,"%20"),Oe(x,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,x)}let v={get action(){return l},get location(){return e(o,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(gS,f),u=b,()=>{o.removeEventListener(gS,f),u=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let x=g(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(b){return a.go(b)}};return v}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const EV=new Set(["lazy","caseSensitive","path","id","index","children"]);function CV(e){return e.index===!0}function Of(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let a=[...n,String(i)],l=typeof o.id=="string"?o.id:a.join("-");if(Oe(o.index!==!0||!o.children,"Cannot specify children on an index route"),Oe(!r[l],'Found a route id collision on id "'+l+`".  Route id's must be globally unique within Data Router usages`),CV(o)){let u=Tt({},o,t(o),{id:l});return r[l]=u,u}else{let u=Tt({},o,t(o),{id:l,children:void 0});return r[l]=u,o.children&&(u.children=Of(o.children,t,a,r)),u}})}function Fs(e,t,n){return n===void 0&&(n="/"),$p(e,t,n,!1)}function $p(e,t,n,r){let o=typeof t=="string"?ra(t):t,i=Lo(o.pathname||"/",n);if(i==null)return null;let a=gP(e);DV(a);let l=null;for(let u=0;l==null&&u<a.length;++u){let c=OV(i);l=FV(a[u],c,r)}return l}function pP(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function gP(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,a,l)=>{let u={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};u.relativePath.startsWith("/")&&(Oe(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=zi([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(Oe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),gP(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:AV(c,i.index),routesMeta:d})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let u of vP(i.path))o(i,a,u)}),t}function vP(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=vP(r.join("/")),l=[];return l.push(...a.map(u=>u===""?i:[i,u].join("/"))),o&&l.push(...a),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function DV(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:NV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const jV=/^:[\w-]+$/,PV=3,RV=2,kV=1,TV=10,IV=-2,yS=e=>e==="*";function AV(e,t){let n=e.split("/"),r=n.length;return n.some(yS)&&(r+=IV),t&&(r+=RV),n.filter(o=>!yS(o)).reduce((o,i)=>o+(jV.test(i)?PV:i===""?kV:TV),r)}function NV(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function FV(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l<r.length;++l){let u=r[l],c=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=cg({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),h=u.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=cg({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;Object.assign(o,f.params),a.push({params:o,pathname:zi([i,f.pathname]),pathnameBase:VV(zi([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=zi([i,f.pathnameBase]))}return a}function cg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=MV(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let v=l[f]||"";a=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const g=l[f];return p&&!g?c[h]=void 0:c[h]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function MV(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,u)=>(r.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function OV(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Lo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function _V(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ra(e):e;return{pathname:n?n.startsWith("/")?n:LV(n,t):t,search:BV(r),hash:zV(o)}}function LV(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function fy(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function yP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bv(e,t){let n=yP(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function wv(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=ra(e):(o=Tt({},e),Oe(!o.pathname||!o.pathname.includes("?"),fy("?","pathname","search",o)),Oe(!o.pathname||!o.pathname.includes("#"),fy("#","pathname","hash",o)),Oe(!o.search||!o.search.includes("#"),fy("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}l=f>=0?t[f]:"/"}let u=_V(o,l),c=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const zi=e=>e.join("/").replace(/\/\/+/g,"/"),VV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),BV=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,UV=function(t,n){n===void 0&&(n=302);let r=n;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let o=new Headers(r.headers);return o.set("Location",t),new Response(null,Tt({},r,{headers:o}))};class pw{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function $v(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const xP=["post","put","patch","delete"],qV=new Set(xP),HV=["get",...xP],WV=new Set(HV),GV=new Set([301,302,303,307,308]),KV=new Set([307,308]),hy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},QV={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},gw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ZV=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),bP="remix-router-transitions";function YV(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Oe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let V=e.detectErrorBoundary;o=z=>({hasErrorBoundary:V(z)})}else o=ZV;let i={},a=Of(e.routes,o,void 0,i),l,u=e.basename||"/",c=e.unstable_dataStrategy||nB,d=e.unstable_patchRoutesOnMiss,f=Tt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,g=null,v=null,b=null,x=e.hydrationData!=null,y=Fs(a,e.history.location,u),w=null;if(y==null&&!d){let V=Qn(404,{pathname:e.history.location.pathname}),{matches:z,route:K}=PS(a);y=z,w={[K.id]:V}}let S;if(!y)S=!1,y=[];else if(y.some(V=>V.route.lazy))S=!1;else if(!y.some(V=>V.route.loader))S=!0;else if(f.v7_partialHydration){let V=e.hydrationData?e.hydrationData.loaderData:null,z=e.hydrationData?e.hydrationData.errors:null,K=X=>X.route.loader?typeof X.route.loader=="function"&&X.route.loader.hydrate===!0?!1:V&&V[X.route.id]!==void 0||z&&z[X.route.id]!==void 0:!0;if(z){let X=y.findIndex(xe=>z[xe.route.id]!==void 0);S=y.slice(0,X+1).every(K)}else S=y.every(K)}else S=e.hydrationData!=null;let C,E={historyAction:e.history.action,location:e.history.location,matches:y,initialized:S,navigation:hy,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},D=Kt.Pop,$=!1,T,A=!1,P=new Map,k=null,N=!1,j=!1,F=[],I=[],R=new Map,M=0,O=-1,q=new Map,H=new Set,G=new Map,ce=new Map,Z=new Set,ee=new Map,re=new Map,Q=new Map,ue=!1;function J(){if(h=e.history.listen(V=>{let{action:z,location:K,delta:X}=V;if(ue){ue=!1;return}jc(re.size===0||X!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let xe=G$({currentLocation:E.location,nextLocation:K,historyAction:z});if(xe&&X!=null){ue=!0,e.history.go(X*-1),Xh(xe,{state:"blocked",location:K,proceed(){Xh(xe,{state:"proceeding",proceed:void 0,reset:void 0,location:K}),e.history.go(X)},reset(){let Ee=new Map(E.blockers);Ee.set(xe,xu),Me({blockers:Ee})}});return}return yn(z,K)}),n){pB(t,P);let V=()=>gB(t,P);t.addEventListener("pagehide",V),k=()=>t.removeEventListener("pagehide",V)}return E.initialized||yn(Kt.Pop,E.location,{initialHydration:!0}),C}function oe(){h&&h(),k&&k(),p.clear(),T&&T.abort(),E.fetchers.forEach((V,z)=>kt(z)),E.blockers.forEach((V,z)=>W$(z))}function ve(V){return p.add(V),()=>p.delete(V)}function Me(V,z){z===void 0&&(z={}),E=Tt({},E,V);let K=[],X=[];f.v7_fetcherPersist&&E.fetchers.forEach((xe,Ee)=>{xe.state==="idle"&&(Z.has(Ee)?X.push(Ee):K.push(Ee))}),[...p].forEach(xe=>xe(E,{deletedFetchers:X,unstable_viewTransitionOpts:z.viewTransitionOpts,unstable_flushSync:z.flushSync===!0})),f.v7_fetcherPersist&&(K.forEach(xe=>E.fetchers.delete(xe)),X.forEach(xe=>kt(xe)))}function un(V,z,K){var X,xe;let{flushSync:Ee}=K===void 0?{}:K,Te=E.actionData!=null&&E.navigation.formMethod!=null&&Do(E.navigation.formMethod)&&E.navigation.state==="loading"&&((X=V.state)==null?void 0:X._isRedirect)!==!0,ye;z.actionData?Object.keys(z.actionData).length>0?ye=z.actionData:ye=null:Te?ye=E.actionData:ye=null;let Ve=z.loaderData?DS(E.loaderData,z.loaderData,z.matches||[],z.errors):E.loaderData,Se=E.blockers;Se.size>0&&(Se=new Map(Se),Se.forEach((it,pt)=>Se.set(pt,xu)));let Be=$===!0||E.navigation.formMethod!=null&&Do(E.navigation.formMethod)&&((xe=V.state)==null?void 0:xe._isRedirect)!==!0;l&&(a=l,l=void 0),N||D===Kt.Pop||(D===Kt.Push?e.history.push(V,V.state):D===Kt.Replace&&e.history.replace(V,V.state));let mt;if(D===Kt.Pop){let it=P.get(E.location.pathname);it&&it.has(V.pathname)?mt={currentLocation:E.location,nextLocation:V}:P.has(V.pathname)&&(mt={currentLocation:V,nextLocation:E.location})}else if(A){let it=P.get(E.location.pathname);it?it.add(V.pathname):(it=new Set([V.pathname]),P.set(E.location.pathname,it)),mt={currentLocation:E.location,nextLocation:V}}Me(Tt({},z,{actionData:ye,loaderData:Ve,historyAction:D,location:V,initialized:!0,navigation:hy,revalidation:"idle",restoreScrollPosition:Q$(V,z.matches||E.matches),preventScrollReset:Be,blockers:Se}),{viewTransitionOpts:mt,flushSync:Ee===!0}),D=Kt.Pop,$=!1,A=!1,N=!1,j=!1,F=[],I=[]}async function cr(V,z){if(typeof V=="number"){e.history.go(V);return}let K=lb(E.location,E.matches,u,f.v7_prependBasename,V,f.v7_relativeSplatPath,z==null?void 0:z.fromRouteId,z==null?void 0:z.relative),{path:X,submission:xe,error:Ee}=xS(f.v7_normalizeFormMethod,!1,K,z),Te=E.location,ye=Mf(E.location,X,z&&z.state);ye=Tt({},ye,e.history.encodeLocation(ye));let Ve=z&&z.replace!=null?z.replace:void 0,Se=Kt.Push;Ve===!0?Se=Kt.Replace:Ve===!1||xe!=null&&Do(xe.formMethod)&&xe.formAction===E.location.pathname+E.location.search&&(Se=Kt.Replace);let Be=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,mt=(z&&z.unstable_flushSync)===!0,it=G$({currentLocation:Te,nextLocation:ye,historyAction:Se});if(it){Xh(it,{state:"blocked",location:ye,proceed(){Xh(it,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),cr(V,z)},reset(){let pt=new Map(E.blockers);pt.set(it,xu),Me({blockers:pt})}});return}return await yn(Se,ye,{submission:xe,pendingError:Ee,preventScrollReset:Be,replace:z&&z.replace,enableViewTransition:z&&z.unstable_viewTransition,flushSync:mt})}function Tr(){if(Nt(),Me({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){yn(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}yn(D||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation})}}async function yn(V,z,K){T&&T.abort(),T=null,D=V,N=(K&&K.startUninterruptedRevalidation)===!0,pO(E.location,E.matches),$=(K&&K.preventScrollReset)===!0,A=(K&&K.enableViewTransition)===!0;let X=l||a,xe=K&&K.overrideNavigation,Ee=Fs(X,z,u),Te=(K&&K.flushSync)===!0,ye=Z$(Ee,X,z.pathname);if(ye.active&&ye.matches&&(Ee=ye.matches),!Ee){let{error:at,notFoundMatches:Rn,route:cn}=M0(z.pathname);un(z,{matches:Rn,loaderData:{},errors:{[cn.id]:at}},{flushSync:Te});return}if(E.initialized&&!j&&lB(E.location,z)&&!(K&&K.submission&&Do(K.submission.formMethod))){un(z,{matches:Ee},{flushSync:Te});return}T=new AbortController;let Ve=su(e.history,z,T.signal,K&&K.submission),Se;if(K&&K.pendingError)Se=[nf(Ee).route.id,{type:wt.error,error:K.pendingError}];else if(K&&K.submission&&Do(K.submission.formMethod)){let at=await bi(Ve,z,K.submission,Ee,ye.active,{replace:K.replace,flushSync:Te});if(at.shortCircuited)return;if(at.pendingActionResult){let[Rn,cn]=at.pendingActionResult;if(Lr(cn)&&$v(cn.error)&&cn.error.status===404){T=null,un(z,{matches:at.matches,loaderData:{},errors:{[Rn]:cn.error}});return}}Ee=at.matches||Ee,Se=at.pendingActionResult,xe=my(z,K.submission),Te=!1,ye.active=!1,Ve=su(e.history,Ve.url,Ve.signal)}let{shortCircuited:Be,matches:mt,loaderData:it,errors:pt}=await L(Ve,z,Ee,ye.active,xe,K&&K.submission,K&&K.fetcherSubmission,K&&K.replace,K&&K.initialHydration===!0,Te,Se);Be||(T=null,un(z,Tt({matches:mt||Ee},jS(Se),{loaderData:it,errors:pt})))}async function bi(V,z,K,X,xe,Ee){Ee===void 0&&(Ee={}),Nt();let Te=hB(z,K);if(Me({navigation:Te},{flushSync:Ee.flushSync===!0}),xe){let Se=await em(X,z.pathname,V.signal);if(Se.type==="aborted")return{shortCircuited:!0};if(Se.type==="error"){let{error:Be,notFoundMatches:mt,route:it}=Jh(z.pathname,Se);return{matches:mt,pendingActionResult:[it.id,{type:wt.error,error:Be}]}}else if(Se.matches)X=Se.matches;else{let{notFoundMatches:Be,error:mt,route:it}=M0(z.pathname);return{matches:Be,pendingActionResult:[it.id,{type:wt.error,error:mt}]}}}let ye,Ve=Bd(X,z);if(!Ve.route.action&&!Ve.route.lazy)ye={type:wt.error,error:Qn(405,{method:V.method,pathname:z.pathname,routeId:Ve.route.id})};else if(ye=(await Le("action",V,[Ve],X))[0],V.signal.aborted)return{shortCircuited:!0};if(Hs(ye)){let Se;return Ee&&Ee.replace!=null?Se=Ee.replace:Se=SS(ye.response.headers.get("Location"),new URL(V.url),u)===E.location.pathname+E.location.search,await be(V,ye,{submission:K,replace:Se}),{shortCircuited:!0}}if(qs(ye))throw Qn(400,{type:"defer-action"});if(Lr(ye)){let Se=nf(X,Ve.route.id);return(Ee&&Ee.replace)!==!0&&(D=Kt.Push),{matches:X,pendingActionResult:[Se.route.id,ye]}}return{matches:X,pendingActionResult:[Ve.route.id,ye]}}async function L(V,z,K,X,xe,Ee,Te,ye,Ve,Se,Be){let mt=xe||my(z,Ee),it=Ee||Te||TS(mt),pt=!N&&(!f.v7_partialHydration||!Ve);if(X){if(pt){let Wt=W(Be);Me(Tt({navigation:mt},Wt!==void 0?{actionData:Wt}:{}),{flushSync:Se})}let qe=await em(K,z.pathname,V.signal);if(qe.type==="aborted")return{shortCircuited:!0};if(qe.type==="error"){let{error:Wt,notFoundMatches:Ar,route:yt}=Jh(z.pathname,qe);return{matches:Ar,loaderData:{},errors:{[yt.id]:Wt}}}else if(qe.matches)K=qe.matches;else{let{error:Wt,notFoundMatches:Ar,route:yt}=M0(z.pathname);return{matches:Ar,loaderData:{},errors:{[yt.id]:Wt}}}}let at=l||a,[Rn,cn]=bS(e.history,E,K,it,z,f.v7_partialHydration&&Ve===!0,f.unstable_skipActionErrorRevalidation,j,F,I,Z,G,H,at,u,Be);if(O0(qe=>!(K&&K.some(Wt=>Wt.route.id===qe))||Rn&&Rn.some(Wt=>Wt.route.id===qe)),O=++M,Rn.length===0&&cn.length===0){let qe=ed();return un(z,Tt({matches:K,loaderData:{},errors:Be&&Lr(Be[1])?{[Be[0]]:Be[1].error}:null},jS(Be),qe?{fetchers:new Map(E.fetchers)}:{}),{flushSync:Se}),{shortCircuited:!0}}if(pt){let qe={};if(!X){qe.navigation=mt;let Wt=W(Be);Wt!==void 0&&(qe.actionData=Wt)}cn.length>0&&(qe.fetchers=Y(cn)),Me(qe,{flushSync:Se})}cn.forEach(qe=>{R.has(qe.key)&&dr(qe.key),qe.controller&&R.set(qe.key,qe.controller)});let td=()=>cn.forEach(qe=>dr(qe.key));T&&T.signal.addEventListener("abort",td);let{loaderResults:fa,fetcherResults:nu}=await rt(E.matches,K,Rn,cn,V);if(V.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",td),cn.forEach(qe=>R.delete(qe.key));let ru=RS([...fa,...nu]);if(ru){if(ru.idx>=Rn.length){let qe=cn[ru.idx-Rn.length].key;H.add(qe)}return await be(V,ru.result,{replace:ye}),{shortCircuited:!0}}let{loaderData:ou,errors:Ho}=CS(E,K,Rn,fa,Be,cn,nu,ee);ee.forEach((qe,Wt)=>{qe.subscribe(Ar=>{(Ar||qe.done)&&ee.delete(Wt)})}),f.v7_partialHydration&&Ve&&E.errors&&Object.entries(E.errors).filter(qe=>{let[Wt]=qe;return!Rn.some(Ar=>Ar.route.id===Wt)}).forEach(qe=>{let[Wt,Ar]=qe;Ho=Object.assign(Ho||{},{[Wt]:Ar})});let tm=ed(),nm=H$(O),rm=tm||nm||cn.length>0;return Tt({matches:K,loaderData:ou,errors:Ho},rm?{fetchers:new Map(E.fetchers)}:{})}function W(V){if(V&&!Lr(V[1]))return{[V[0]]:V[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function Y(V){return V.forEach(z=>{let K=E.fetchers.get(z.key),X=cd(void 0,K?K.data:void 0);E.fetchers.set(z.key,X)}),new Map(E.fetchers)}function he(V,z,K,X){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");R.has(V)&&dr(V);let xe=(X&&X.unstable_flushSync)===!0,Ee=l||a,Te=lb(E.location,E.matches,u,f.v7_prependBasename,K,f.v7_relativeSplatPath,z,X==null?void 0:X.relative),ye=Fs(Ee,Te,u),Ve=Z$(ye,Ee,Te);if(Ve.active&&Ve.matches&&(ye=Ve.matches),!ye){Dt(V,z,Qn(404,{pathname:Te}),{flushSync:xe});return}let{path:Se,submission:Be,error:mt}=xS(f.v7_normalizeFormMethod,!0,Te,X);if(mt){Dt(V,z,mt,{flushSync:xe});return}let it=Bd(ye,Se);if($=(X&&X.preventScrollReset)===!0,Be&&Do(Be.formMethod)){de(V,z,Se,it,ye,Ve.active,xe,Be);return}G.set(V,{routeId:z,path:Se}),se(V,z,Se,it,ye,Ve.active,xe,Be)}async function de(V,z,K,X,xe,Ee,Te,ye){Nt(),G.delete(V);function Ve(yt){if(!yt.route.action&&!yt.route.lazy){let wi=Qn(405,{method:ye.formMethod,pathname:K,routeId:z});return Dt(V,z,wi,{flushSync:Te}),!0}return!1}if(!Ee&&Ve(X))return;let Se=E.fetchers.get(V);Xt(V,mB(ye,Se),{flushSync:Te});let Be=new AbortController,mt=su(e.history,K,Be.signal,ye);if(Ee){let yt=await em(xe,K,mt.signal);if(yt.type==="aborted")return;if(yt.type==="error"){let{error:wi}=Jh(K,yt);Dt(V,z,wi,{flushSync:Te});return}else if(yt.matches){if(xe=yt.matches,X=Bd(xe,K),Ve(X))return}else{Dt(V,z,Qn(404,{pathname:K}),{flushSync:Te});return}}R.set(V,Be);let it=M,at=(await Le("action",mt,[X],xe))[0];if(mt.signal.aborted){R.get(V)===Be&&R.delete(V);return}if(f.v7_fetcherPersist&&Z.has(V)){if(Hs(at)||Lr(at)){Xt(V,ba(void 0));return}}else{if(Hs(at))if(R.delete(V),O>it){Xt(V,ba(void 0));return}else return H.add(V),Xt(V,cd(ye)),be(mt,at,{fetcherSubmission:ye});if(Lr(at)){Dt(V,z,at.error);return}}if(qs(at))throw Qn(400,{type:"defer-action"});let Rn=E.navigation.location||E.location,cn=su(e.history,Rn,Be.signal),td=l||a,fa=E.navigation.state!=="idle"?Fs(td,E.navigation.location,u):E.matches;Oe(fa,"Didn't find any matches after fetcher action");let nu=++M;q.set(V,nu);let ru=cd(ye,at.data);E.fetchers.set(V,ru);let[ou,Ho]=bS(e.history,E,fa,ye,Rn,!1,f.unstable_skipActionErrorRevalidation,j,F,I,Z,G,H,td,u,[X.route.id,at]);Ho.filter(yt=>yt.key!==V).forEach(yt=>{let wi=yt.key,Y$=E.fetchers.get(wi),vO=cd(void 0,Y$?Y$.data:void 0);E.fetchers.set(wi,vO),R.has(wi)&&dr(wi),yt.controller&&R.set(wi,yt.controller)}),Me({fetchers:new Map(E.fetchers)});let tm=()=>Ho.forEach(yt=>dr(yt.key));Be.signal.addEventListener("abort",tm);let{loaderResults:nm,fetcherResults:rm}=await rt(E.matches,fa,ou,Ho,cn);if(Be.signal.aborted)return;Be.signal.removeEventListener("abort",tm),q.delete(V),R.delete(V),Ho.forEach(yt=>R.delete(yt.key));let qe=RS([...nm,...rm]);if(qe){if(qe.idx>=ou.length){let yt=Ho[qe.idx-ou.length].key;H.add(yt)}return be(cn,qe.result)}let{loaderData:Wt,errors:Ar}=CS(E,E.matches,ou,nm,void 0,Ho,rm,ee);if(E.fetchers.has(V)){let yt=ba(at.data);E.fetchers.set(V,yt)}H$(nu),E.navigation.state==="loading"&&nu>O?(Oe(D,"Expected pending action"),T&&T.abort(),un(E.navigation.location,{matches:fa,loaderData:Wt,errors:Ar,fetchers:new Map(E.fetchers)})):(Me({errors:Ar,loaderData:DS(E.loaderData,Wt,fa,Ar),fetchers:new Map(E.fetchers)}),j=!1)}async function se(V,z,K,X,xe,Ee,Te,ye){let Ve=E.fetchers.get(V);Xt(V,cd(ye,Ve?Ve.data:void 0),{flushSync:Te});let Se=new AbortController,Be=su(e.history,K,Se.signal);if(Ee){let at=await em(xe,K,Be.signal);if(at.type==="aborted")return;if(at.type==="error"){let{error:Rn}=Jh(K,at);Dt(V,z,Rn,{flushSync:Te});return}else if(at.matches)xe=at.matches,X=Bd(xe,K);else{Dt(V,z,Qn(404,{pathname:K}),{flushSync:Te});return}}R.set(V,Se);let mt=M,pt=(await Le("loader",Be,[X],xe))[0];if(qs(pt)&&(pt=await CP(pt,Be.signal,!0)||pt),R.get(V)===Se&&R.delete(V),!Be.signal.aborted){if(Z.has(V)){Xt(V,ba(void 0));return}if(Hs(pt))if(O>mt){Xt(V,ba(void 0));return}else{H.add(V),await be(Be,pt);return}if(Lr(pt)){Dt(V,z,pt.error);return}Oe(!qs(pt),"Unhandled fetcher deferred data"),Xt(V,ba(pt.data))}}async function be(V,z,K){let{submission:X,fetcherSubmission:xe,replace:Ee}=K===void 0?{}:K;z.response.headers.has("X-Remix-Revalidate")&&(j=!0);let Te=z.response.headers.get("Location");Oe(Te,"Expected a Location header on the redirect Response"),Te=SS(Te,new URL(V.url),u);let ye=Mf(E.location,Te,{_isRedirect:!0});if(n){let pt=!1;if(z.response.headers.has("X-Remix-Reload-Document"))pt=!0;else if(gw.test(Te)){const at=e.history.createURL(Te);pt=at.origin!==t.location.origin||Lo(at.pathname,u)==null}if(pt){Ee?t.location.replace(Te):t.location.assign(Te);return}}T=null;let Ve=Ee===!0?Kt.Replace:Kt.Push,{formMethod:Se,formAction:Be,formEncType:mt}=E.navigation;!X&&!xe&&Se&&Be&&mt&&(X=TS(E.navigation));let it=X||xe;if(KV.has(z.response.status)&&it&&Do(it.formMethod))await yn(Ve,ye,{submission:Tt({},it,{formAction:Te}),preventScrollReset:$});else{let pt=my(ye,X);await yn(Ve,ye,{overrideNavigation:pt,fetcherSubmission:xe,preventScrollReset:$})}}async function Le(V,z,K,X){try{let xe=await rB(c,V,z,K,X,i,o);return await Promise.all(xe.map((Ee,Te)=>{if(cB(Ee)){let ye=Ee.result;return{type:wt.redirect,response:aB(ye,z,K[Te].route.id,X,u,f.v7_relativeSplatPath)}}return iB(Ee)}))}catch(xe){return K.map(()=>({type:wt.error,error:xe}))}}async function rt(V,z,K,X,xe){let[Ee,...Te]=await Promise.all([K.length?Le("loader",xe,K,z):[],...X.map(ye=>{if(ye.matches&&ye.match&&ye.controller){let Ve=su(e.history,ye.path,ye.controller.signal);return Le("loader",Ve,[ye.match],ye.matches).then(Se=>Se[0])}else return Promise.resolve({type:wt.error,error:Qn(404,{pathname:ye.path})})})]);return await Promise.all([kS(V,K,Ee,Ee.map(()=>xe.signal),!1,E.loaderData),kS(V,X.map(ye=>ye.match),Te,X.map(ye=>ye.controller?ye.controller.signal:null),!0)]),{loaderResults:Ee,fetcherResults:Te}}function Nt(){j=!0,F.push(...O0()),G.forEach((V,z)=>{R.has(z)&&(I.push(z),dr(z))})}function Xt(V,z,K){K===void 0&&(K={}),E.fetchers.set(V,z),Me({fetchers:new Map(E.fetchers)},{flushSync:(K&&K.flushSync)===!0})}function Dt(V,z,K,X){X===void 0&&(X={});let xe=nf(E.matches,z);kt(V),Me({errors:{[xe.route.id]:K},fetchers:new Map(E.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function Ir(V){return f.v7_fetcherPersist&&(ce.set(V,(ce.get(V)||0)+1),Z.has(V)&&Z.delete(V)),E.fetchers.get(V)||QV}function kt(V){let z=E.fetchers.get(V);R.has(V)&&!(z&&z.state==="loading"&&q.has(V))&&dr(V),G.delete(V),q.delete(V),H.delete(V),Z.delete(V),E.fetchers.delete(V)}function qo(V){if(f.v7_fetcherPersist){let z=(ce.get(V)||0)-1;z<=0?(ce.delete(V),Z.add(V)):ce.set(V,z)}else kt(V);Me({fetchers:new Map(E.fetchers)})}function dr(V){let z=R.get(V);Oe(z,"Expected fetch controller: "+V),z.abort(),R.delete(V)}function Yh(V){for(let z of V){let K=Ir(z),X=ba(K.data);E.fetchers.set(z,X)}}function ed(){let V=[],z=!1;for(let K of H){let X=E.fetchers.get(K);Oe(X,"Expected fetcher: "+K),X.state==="loading"&&(H.delete(K),V.push(K),z=!0)}return Yh(V),z}function H$(V){let z=[];for(let[K,X]of q)if(X<V){let xe=E.fetchers.get(K);Oe(xe,"Expected fetcher: "+K),xe.state==="loading"&&(dr(K),q.delete(K),z.push(K))}return Yh(z),z.length>0}function hO(V,z){let K=E.blockers.get(V)||xu;return re.get(V)!==z&&re.set(V,z),K}function W$(V){E.blockers.delete(V),re.delete(V)}function Xh(V,z){let K=E.blockers.get(V)||xu;Oe(K.state==="unblocked"&&z.state==="blocked"||K.state==="blocked"&&z.state==="blocked"||K.state==="blocked"&&z.state==="proceeding"||K.state==="blocked"&&z.state==="unblocked"||K.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+K.state+" -> "+z.state);let X=new Map(E.blockers);X.set(V,z),Me({blockers:X})}function G$(V){let{currentLocation:z,nextLocation:K,historyAction:X}=V;if(re.size===0)return;re.size>1&&jc(!1,"A router only supports one blocker at a time");let xe=Array.from(re.entries()),[Ee,Te]=xe[xe.length-1],ye=E.blockers.get(Ee);if(!(ye&&ye.state==="proceeding")&&Te({currentLocation:z,nextLocation:K,historyAction:X}))return Ee}function M0(V){let z=Qn(404,{pathname:V}),K=l||a,{matches:X,route:xe}=PS(K);return O0(),{notFoundMatches:X,route:xe,error:z}}function Jh(V,z){let K=z.partialMatches,X=K[K.length-1].route,xe=Qn(400,{type:"route-discovery",routeId:X.id,pathname:V,message:z.error!=null&&"message"in z.error?z.error:String(z.error)});return{notFoundMatches:K,route:X,error:xe}}function O0(V){let z=[];return ee.forEach((K,X)=>{(!V||V(X))&&(K.cancel(),z.push(X),ee.delete(X))}),z}function mO(V,z,K){if(g=V,b=z,v=K||null,!x&&E.navigation===hy){x=!0;let X=Q$(E.location,E.matches);X!=null&&Me({restoreScrollPosition:X})}return()=>{g=null,b=null,v=null}}function K$(V,z){return v&&v(V,z.map(X=>pP(X,E.loaderData)))||V.key}function pO(V,z){if(g&&b){let K=K$(V,z);g[K]=b()}}function Q$(V,z){if(g){let K=K$(V,z),X=g[K];if(typeof X=="number")return X}return null}function Z$(V,z,K){if(d)if(V){if(V[V.length-1].route.path==="*")return{active:!0,matches:$p(z,K,u,!0)}}else return{active:!0,matches:$p(z,K,u,!0)||[]};return{active:!1,matches:null}}async function em(V,z,K){let X=V,xe=X.length>0?X[X.length-1].route:null;for(;;){try{await tB(d,z,X,a||l,i,o,Q,K)}catch(Se){return{type:"error",error:Se,partialMatches:X}}if(K.aborted)return{type:"aborted"};let Ee=l||a,Te=Fs(Ee,z,u),ye=!1;if(Te){let Se=Te[Te.length-1].route;if(Se.index)return{type:"success",matches:Te};if(Se.path&&Se.path.length>0)if(Se.path==="*")ye=!0;else return{type:"success",matches:Te}}let Ve=$p(Ee,z,u,!0);if(!Ve||X.map(Se=>Se.route.id).join("-")===Ve.map(Se=>Se.route.id).join("-"))return{type:"success",matches:ye?Te:null};if(X=Ve,xe=X[X.length-1].route,xe.path==="*")return{type:"success",matches:X}}}function gO(V){i={},l=Of(V,o,void 0,i)}return C={get basename(){return u},get future(){return f},get state(){return E},get routes(){return a},get window(){return t},initialize:J,subscribe:ve,enableScrollRestoration:mO,navigate:cr,fetch:he,revalidate:Tr,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:Ir,deleteFetcher:qo,dispose:oe,getBlocker:hO,deleteBlocker:W$,patchRoutes(V,z){return $P(V,z,a||l,i,o)},_internalFetchControllers:R,_internalActiveDeferreds:ee,_internalSetRoutes:gO},C}function XV(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lb(e,t,n,r,o,i,a,l){let u,c;if(a){u=[];for(let f of t)if(u.push(f),f.route.id===a){c=f;break}}else u=t,c=t[t.length-1];let d=wv(o||".",bv(u,i),Lo(e.pathname,n)||e.pathname,l==="path");return o==null&&(d.search=e.search,d.hash=e.hash),(o==null||o===""||o===".")&&c&&c.route.index&&!vw(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:zi([n,d.pathname])),El(d)}function xS(e,t,n,r){if(!r||!XV(r))return{path:n};if(r.formMethod&&!fB(r.formMethod))return{path:n,error:Qn(405,{method:r.formMethod})};let o=()=>({path:n,error:Qn(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),l=SP(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Do(a))return o();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,g)=>{let[v,b]=g;return""+p+v+"="+b+`
`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Do(a))return o();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}Oe(typeof FormData=="function","FormData is not available in this environment");let u,c;if(r.formData)u=ub(r.formData),c=r.formData;else if(r.body instanceof FormData)u=ub(r.body),c=r.body;else if(r.body instanceof URLSearchParams)u=r.body,c=ES(u);else if(r.body==null)u=new URLSearchParams,c=new FormData;else try{u=new URLSearchParams(r.body),c=ES(u)}catch{return o()}let d={formMethod:a,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Do(d.formMethod))return{path:n,submission:d};let f=ra(n);return t&&f.search&&vw(f.search)&&u.append("index",""),f.search="?"+u,{path:El(f),submission:d}}function JV(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function bS(e,t,n,r,o,i,a,l,u,c,d,f,h,p,g,v){let b=v?Lr(v[1])?v[1].error:v[1].data:void 0,x=e.createURL(t.location),y=e.createURL(o),w=v&&Lr(v[1])?v[0]:void 0,S=w?JV(n,w):n,C=v?v[1].statusCode:void 0,E=a&&C&&C>=400,D=S.filter((T,A)=>{let{route:P}=T;if(P.lazy)return!0;if(P.loader==null)return!1;if(i)return typeof P.loader!="function"||P.loader.hydrate?!0:t.loaderData[P.id]===void 0&&(!t.errors||t.errors[P.id]===void 0);if(eB(t.loaderData,t.matches[A],T)||u.some(j=>j===T.route.id))return!0;let k=t.matches[A],N=T;return wS(T,Tt({currentUrl:x,currentParams:k.params,nextUrl:y,nextParams:N.params},r,{actionResult:b,unstable_actionStatus:C,defaultShouldRevalidate:E?!1:l||x.pathname+x.search===y.pathname+y.search||x.search!==y.search||wP(k,N)}))}),$=[];return f.forEach((T,A)=>{if(i||!n.some(F=>F.route.id===T.routeId)||d.has(A))return;let P=Fs(p,T.path,g);if(!P){$.push({key:A,routeId:T.routeId,path:T.path,matches:null,match:null,controller:null});return}let k=t.fetchers.get(A),N=Bd(P,T.path),j=!1;h.has(A)?j=!1:c.includes(A)?j=!0:k&&k.state!=="idle"&&k.data===void 0?j=l:j=wS(N,Tt({currentUrl:x,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:b,unstable_actionStatus:C,defaultShouldRevalidate:E?!1:l})),j&&$.push({key:A,routeId:T.routeId,path:T.path,matches:P,match:N,controller:new AbortController})}),[D,$]}function eB(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function wP(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function wS(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function tB(e,t,n,r,o,i,a,l){let u=[t,...n.map(c=>c.route.id)].join("-");try{let c=a.get(u);c||(c=e({path:t,matches:n,patch:(d,f)=>{l.aborted||$P(d,f,r,o,i)}}),a.set(u,c)),c&&uB(c)&&await c}finally{a.delete(u)}}function $P(e,t,n,r,o){if(e){var i;let a=r[e];Oe(a,"No route found to patch children into: routeId = "+e);let l=Of(t,o,[e,"patch",String(((i=a.children)==null?void 0:i.length)||"0")],r);a.children?a.children.push(...l):a.children=l}else{let a=Of(t,o,["patch",String(n.length||"0")],r);n.push(...a)}}async function $S(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Oe(o,"No route found in manifest");let i={};for(let a in r){let u=o[a]!==void 0&&a!=="hasErrorBoundary";jc(!u,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!u&&!EV.has(a)&&(i[a]=r[a])}Object.assign(o,i),Object.assign(o,Tt({},t(o),{lazy:void 0}))}function nB(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function rB(e,t,n,r,o,i,a,l){let u=r.reduce((f,h)=>f.add(h.route.id),new Set),c=new Set,d=await e({matches:o.map(f=>{let h=u.has(f.route.id);return Tt({},f,{shouldLoad:h,resolve:g=>(c.add(f.route.id),h?oB(t,n,f,i,a,g,l):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:o[0].params,context:l});return o.forEach(f=>Oe(c.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,h)=>u.has(o[h].route.id))}async function oB(e,t,n,r,o,i,a){let l,u,c=d=>{let f,h=new Promise((v,b)=>f=b);u=()=>f(),t.signal.addEventListener("abort",u);let p=v=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:a},...v!==void 0?[v]:[]),g;return i?g=i(v=>p(v)):g=(async()=>{try{return{type:"data",result:await p()}}catch(v){return{type:"error",result:v}}})(),Promise.race([g,h])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[h]=await Promise.all([c(d).catch(p=>{f=p}),$S(n.route,o,r)]);if(f!==void 0)throw f;l=h}else if(await $S(n.route,o,r),d=n.route[e],d)l=await c(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw Qn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)l=await c(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw Qn(404,{pathname:h})}Oe(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:wt.error,result:d}}finally{u&&t.signal.removeEventListener("abort",u)}return l}async function iB(e){let{result:t,type:n,status:r}=e;if(EP(t)){let a;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?a=null:a=await t.json():a=await t.text()}catch(l){return{type:wt.error,error:l}}return n===wt.error?{type:wt.error,error:new pw(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:wt.data,data:a,statusCode:t.status,headers:t.headers}}if(n===wt.error)return{type:wt.error,error:t,statusCode:$v(t)?t.status:r};if(dB(t)){var o,i;return{type:wt.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}return{type:wt.data,data:t,statusCode:r}}function aB(e,t,n,r,o,i){let a=e.headers.get("Location");if(Oe(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!gw.test(a)){let l=r.slice(0,r.findIndex(u=>u.route.id===n)+1);a=lb(new URL(t.url),l,o,!0,a,i),e.headers.set("Location",a)}return e}function SS(e,t,n){if(gw.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=Lo(o.pathname,n)!=null;if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function su(e,t,n,r){let o=e.createURL(SP(t)).toString(),i={signal:n};if(r&&Do(r.formMethod)){let{formMethod:a,formEncType:l}=r;i.method=a.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(r.json)):l==="text/plain"?i.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?i.body=ub(r.formData):i.body=r.formData}return new Request(o,i)}function ub(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function ES(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function sB(e,t,n,r,o,i){let a={},l=null,u,c=!1,d={},f=r&&Lr(r[1])?r[1].error:void 0;return n.forEach((h,p)=>{let g=t[p].route.id;if(Oe(!Hs(h),"Cannot handle redirect results in processLoaderData"),Lr(h)){let v=h.error;if(f!==void 0&&(v=f,f=void 0),l=l||{},i)l[g]=v;else{let b=nf(e,g);l[b.route.id]==null&&(l[b.route.id]=v)}a[g]=void 0,c||(c=!0,u=$v(h.error)?h.error.status:500),h.headers&&(d[g]=h.headers)}else qs(h)?(o.set(g,h.deferredData),a[g]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!c&&(u=h.statusCode),h.headers&&(d[g]=h.headers)):(a[g]=h.data,h.statusCode&&h.statusCode!==200&&!c&&(u=h.statusCode),h.headers&&(d[g]=h.headers))}),f!==void 0&&r&&(l={[r[0]]:f},a[r[0]]=void 0),{loaderData:a,errors:l,statusCode:u||200,loaderHeaders:d}}function CS(e,t,n,r,o,i,a,l){let{loaderData:u,errors:c}=sB(t,n,r,o,l,!1);for(let d=0;d<i.length;d++){let{key:f,match:h,controller:p}=i[d];Oe(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let g=a[d];if(!(p&&p.signal.aborted))if(Lr(g)){let v=nf(e.matches,h==null?void 0:h.route.id);c&&c[v.route.id]||(c=Tt({},c,{[v.route.id]:g.error})),e.fetchers.delete(f)}else if(Hs(g))Oe(!1,"Unhandled fetcher revalidation redirect");else if(qs(g))Oe(!1,"Unhandled fetcher deferred data");else{let v=ba(g.data);e.fetchers.set(f,v)}}return{loaderData:u,errors:c}}function DS(e,t,n,r){let o=Tt({},t);for(let i of n){let a=i.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(o[a]=t[a]):e[a]!==void 0&&i.route.loader&&(o[a]=e[a]),r&&r.hasOwnProperty(a))break}return o}function jS(e){return e?Lr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function nf(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function PS(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Qn(e,t){let{pathname:n,routeId:r,method:o,type:i,message:a}=t===void 0?{}:t,l="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(l="Bad Request",i==="route-discovery"?u='Unable to match URL "'+n+'" - the `children()` function for '+("route `"+r+"` threw the following error:\n"+a):o&&n&&r?u="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?u="defer() is not supported in actions":i==="invalid-body"&&(u="Unable to encode submission body")):e===403?(l="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",u='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?u="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(u='Invalid request method "'+o.toUpperCase()+'"')),new pw(e||500,l,new Error(u),!0)}function RS(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Hs(n))return{result:n,idx:t}}}function SP(e){let t=typeof e=="string"?ra(e):e;return El(Tt({},t,{hash:""}))}function lB(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function uB(e){return typeof e=="object"&&e!=null&&"then"in e}function cB(e){return EP(e.result)&&GV.has(e.result.status)}function qs(e){return e.type===wt.deferred}function Lr(e){return e.type===wt.error}function Hs(e){return(e&&e.type)===wt.redirect}function dB(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function EP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function fB(e){return WV.has(e.toLowerCase())}function Do(e){return qV.has(e.toLowerCase())}async function kS(e,t,n,r,o,i){for(let a=0;a<n.length;a++){let l=n[a],u=t[a];if(!u)continue;let c=e.find(f=>f.route.id===u.route.id),d=c!=null&&!wP(c,u)&&(i&&i[u.route.id])!==void 0;if(qs(l)&&(o||d)){let f=r[a];Oe(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await CP(l,f,o).then(h=>{h&&(n[a]=h||n[a])})}}}async function CP(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:wt.data,data:e.deferredData.unwrappedData}}catch(o){return{type:wt.error,error:o}}return{type:wt.data,data:e.deferredData.data}}}function vw(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Bd(e,t){let n=typeof t=="string"?ra(t).search:t.search;if(e[e.length-1].route.index&&vw(n||""))return e[e.length-1];let r=yP(e);return r[r.length-1]}function TS(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function my(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function hB(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function cd(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function mB(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ba(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function pB(e,t){try{let n=e.sessionStorage.getItem(bP);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function gB(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(bP,JSON.stringify(n))}catch(r){jc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
 * React Router v6.24.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cl.apply(this,arguments)}const bh=m.createContext(null),yw=m.createContext(null),oa=m.createContext(null),wh=m.createContext(null),gi=m.createContext({outlet:null,matches:[],isDataRoute:!1}),DP=m.createContext(null);function vB(e,t){let{relative:n}=t===void 0?{}:t;Bc()||Oe(!1);let{basename:r,navigator:o}=m.useContext(oa),{hash:i,pathname:a,search:l}=$h(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:zi([r,a])),o.createHref({pathname:u,search:l,hash:i})}function Bc(){return m.useContext(wh)!=null}function qn(){return Bc()||Oe(!1),m.useContext(wh).location}function yB(){return m.useContext(wh).navigationType}function jP(e){m.useContext(oa).static||m.useLayoutEffect(e)}function Fe(){let{isDataRoute:e}=m.useContext(gi);return e?IB():xB()}function xB(){Bc()||Oe(!1);let e=m.useContext(bh),{basename:t,future:n,navigator:r}=m.useContext(oa),{matches:o}=m.useContext(gi),{pathname:i}=qn(),a=JSON.stringify(bv(o,n.v7_relativeSplatPath)),l=m.useRef(!1);return jP(()=>{l.current=!0}),m.useCallback(function(c,d){if(d===void 0&&(d={}),!l.current)return;if(typeof c=="number"){r.go(c);return}let f=wv(c,JSON.parse(a),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:zi([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,a,i,e])}const bB=m.createContext(null);function wB(e){let t=m.useContext(gi).outlet;return t&&m.createElement(bB.Provider,{value:e},t)}function Sv(){let{matches:e}=m.useContext(gi),t=e[e.length-1];return t?t.params:{}}function $h(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(oa),{matches:o}=m.useContext(gi),{pathname:i}=qn(),a=JSON.stringify(bv(o,r.v7_relativeSplatPath));return m.useMemo(()=>wv(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function $B(e,t,n,r){Bc()||Oe(!1);let{navigator:o}=m.useContext(oa),{matches:i}=m.useContext(gi),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let c=qn(),d;if(t){var f;let b=typeof t=="string"?ra(t):t;u==="/"||(f=b.pathname)!=null&&f.startsWith(u)||Oe(!1),d=b}else d=c;let h=d.pathname||"/",p=h;if(u!=="/"){let b=u.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=Fs(e,{pathname:p}),v=jB(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:zi([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:zi([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&v?m.createElement(wh.Provider,{value:{location:Cl({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Kt.Pop}},v):v}function SB(){let e=TP(),t=$v(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:o},n):null,null)}const EB=m.createElement(SB,null);class CB extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(gi.Provider,{value:this.props.routeContext},m.createElement(DP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function DB(e){let{routeContext:t,match:n,children:r}=e,o=m.useContext(bh);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(gi.Provider,{value:t},r)}function jB(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let a=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let d=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||Oe(!1),a=a.slice(0,Math.min(a.length,d+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:h,errors:p}=n,g=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){u=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((d,f,h)=>{let p,g=!1,v=null,b=null;n&&(p=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||EB,u&&(c<0&&h===0?(AB("route-fallback",!1),g=!0,b=null):c===h&&(g=!0,b=f.route.hydrateFallbackElement||null)));let x=t.concat(a.slice(0,h+1)),y=()=>{let w;return p?w=v:g?w=b:f.route.Component?w=m.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,m.createElement(DB,{match:f,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?m.createElement(CB,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var xw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xw||{}),Dl=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Dl||{});function PP(e){let t=m.useContext(bh);return t||Oe(!1),t}function Ev(e){let t=m.useContext(yw);return t||Oe(!1),t}function PB(e){let t=m.useContext(gi);return t||Oe(!1),t}function RP(e){let t=PB(),n=t.matches[t.matches.length-1];return n.route.id||Oe(!1),n.route.id}function kP(){return Ev(Dl.UseNavigation).navigation}function RB(){let{matches:e,loaderData:t}=Ev(Dl.UseMatches);return m.useMemo(()=>e.map(n=>pP(n,t)),[e,t])}function TP(){var e;let t=m.useContext(DP),n=Ev(Dl.UseRouteError),r=RP(Dl.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let kB=0;function TB(e){let{router:t,basename:n}=PP(xw.UseBlocker),r=Ev(Dl.UseBlocker),[o,i]=m.useState(""),a=m.useCallback(l=>{if(typeof e!="function")return!!e;if(n==="/")return e(l);let{currentLocation:u,nextLocation:c,historyAction:d}=l;return e({currentLocation:Cl({},u,{pathname:Lo(u.pathname,n)||u.pathname}),nextLocation:Cl({},c,{pathname:Lo(c.pathname,n)||c.pathname}),historyAction:d})},[n,e]);return m.useEffect(()=>{let l=String(++kB);return i(l),()=>t.deleteBlocker(l)},[t]),m.useEffect(()=>{o!==""&&t.getBlocker(o,a)},[t,o,a]),o&&r.blockers.has(o)?r.blockers.get(o):xu}function IB(){let{router:e}=PP(xw.UseNavigateStable),t=RP(Dl.UseNavigateStable),n=m.useRef(!1);return jP(()=>{n.current=!0}),m.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Cl({fromRouteId:t},i)))},[e,t])}const IS={};function AB(e,t,n){!t&&!IS[e]&&(IS[e]=!0)}function ks(e){let{to:t,replace:n,state:r,relative:o}=e;Bc()||Oe(!1);let{future:i,static:a}=m.useContext(oa),{matches:l}=m.useContext(gi),{pathname:u}=qn(),c=Fe(),d=wv(t,bv(l,i.v7_relativeSplatPath),u,o==="path"),f=JSON.stringify(d);return m.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:o}),[c,f,o,n,r]),null}function an(e){return wB(e.context)}function te(e){Oe(!1)}function NB(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Kt.Pop,navigator:i,static:a=!1,future:l}=e;Bc()&&Oe(!1);let u=t.replace(/^\/*/,"/"),c=m.useMemo(()=>({basename:u,navigator:i,static:a,future:Cl({v7_relativeSplatPath:!1},l)}),[u,l,i,a]);typeof r=="string"&&(r=ra(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:g="default"}=r,v=m.useMemo(()=>{let b=Lo(d,u);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:g},navigationType:o}},[u,d,f,h,p,g,o]);return v==null?null:m.createElement(oa.Provider,{value:c},m.createElement(wh.Provider,{children:n,value:v}))}new Promise(()=>{});function cb(e,t){t===void 0&&(t=[]);let n=[];return m.Children.forEach(e,(r,o)=>{if(!m.isValidElement(r))return;let i=[...t,o];if(r.type===m.Fragment){n.push.apply(n,cb(r.props.children,i));return}r.type!==te&&Oe(!1),!r.props.index||!r.props.children||Oe(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=cb(r.props.children,i)),n.push(a)}),n}function FB(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:m.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:m.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:m.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
 * React Router DOM v6.24.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(this,arguments)}function IP(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function MB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function OB(e,t){return e.button===0&&(!t||t==="_self")&&!MB(e)}function db(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function _B(e,t){let n=db(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const LB=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],VB=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],BB="6";try{window.__reactRouterVersion=BB}catch{}function zB(e,t){return YV({basename:t==null?void 0:t.basename,future:Pc({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:wV({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||UB(),routes:e,mapRouteProperties:FB,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,unstable_patchRoutesOnMiss:t==null?void 0:t.unstable_patchRoutesOnMiss,window:t==null?void 0:t.window}).initialize()}function UB(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Pc({},t,{errors:qB(t.errors)})),t}function qB(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new pw(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const AP=m.createContext({isTransitioning:!1}),HB=m.createContext(new Map),WB="startTransition",AS=vf[WB],GB="flushSync",NS=bV[GB];function KB(e){AS?AS(e):e()}function dd(e){NS?NS(e):e()}class QB{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function ZB(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=m.useState(n.state),[a,l]=m.useState(),[u,c]=m.useState({isTransitioning:!1}),[d,f]=m.useState(),[h,p]=m.useState(),[g,v]=m.useState(),b=m.useRef(new Map),{v7_startTransition:x}=r||{},y=m.useCallback(D=>{x?KB(D):D()},[x]),w=m.useCallback((D,$)=>{let{deletedFetchers:T,unstable_flushSync:A,unstable_viewTransitionOpts:P}=$;T.forEach(N=>b.current.delete(N)),D.fetchers.forEach((N,j)=>{N.data!==void 0&&b.current.set(j,N.data)});let k=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!P||k){A?dd(()=>i(D)):y(()=>i(D));return}if(A){dd(()=>{h&&(d&&d.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:P.currentLocation,nextLocation:P.nextLocation})});let N=n.window.document.startViewTransition(()=>{dd(()=>i(D))});N.finished.finally(()=>{dd(()=>{f(void 0),p(void 0),l(void 0),c({isTransitioning:!1})})}),dd(()=>p(N));return}h?(d&&d.resolve(),h.skipTransition(),v({state:D,currentLocation:P.currentLocation,nextLocation:P.nextLocation})):(l(D),c({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}))},[n.window,h,d,b,y]);m.useLayoutEffect(()=>n.subscribe(w),[n,w]),m.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new QB)},[u]),m.useEffect(()=>{if(d&&a&&n.window){let D=a,$=d.promise,T=n.window.document.startViewTransition(async()=>{y(()=>i(D)),await $});T.finished.finally(()=>{f(void 0),p(void 0),l(void 0),c({isTransitioning:!1})}),p(T)}},[y,a,d,n.window]),m.useEffect(()=>{d&&a&&o.location.key===a.location.key&&d.resolve()},[d,h,o.location,a]),m.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),c({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),v(void 0))},[u.isTransitioning,g]),m.useEffect(()=>{},[]);let S=m.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:D=>n.navigate(D),push:(D,$,T)=>n.navigate(D,{state:$,preventScrollReset:T==null?void 0:T.preventScrollReset}),replace:(D,$,T)=>n.navigate(D,{replace:!0,state:$,preventScrollReset:T==null?void 0:T.preventScrollReset})}),[n]),C=n.basename||"/",E=m.useMemo(()=>({router:n,navigator:S,static:!1,basename:C}),[n,S,C]);return m.createElement(m.Fragment,null,m.createElement(bh.Provider,{value:E},m.createElement(yw.Provider,{value:o},m.createElement(HB.Provider,{value:b.current},m.createElement(AP.Provider,{value:u},m.createElement(NB,{basename:C,location:o.location,navigationType:o.historyAction,navigator:S,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?m.createElement(YB,{routes:n.routes,future:n.future,state:o}):t))))),null)}function YB(e){let{routes:t,future:n,state:r}=e;return $B(t,void 0,r,n)}const XB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",JB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rr=m.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:l,target:u,to:c,preventScrollReset:d,unstable_viewTransition:f}=t,h=IP(t,LB),{basename:p}=m.useContext(oa),g,v=!1;if(typeof c=="string"&&JB.test(c)&&(g=c,XB))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),C=Lo(S.pathname,p);S.origin===w.origin&&C!=null?c=C+S.search+S.hash:v=!0}catch{}let b=vB(c,{relative:o}),x=nz(c,{replace:a,state:l,target:u,preventScrollReset:d,relative:o,unstable_viewTransition:f});function y(w){r&&r(w),w.defaultPrevented||x(w)}return m.createElement("a",Pc({},h,{href:g||b,onClick:v||i?r:y,ref:n,target:u}))}),ez=m.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:a=!1,style:l,to:u,unstable_viewTransition:c,children:d}=t,f=IP(t,VB),h=$h(u,{relative:f.relative}),p=qn(),g=m.useContext(yw),{navigator:v,basename:b}=m.useContext(oa),x=g!=null&&rz(h)&&c===!0,y=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,w=p.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;o||(w=w.toLowerCase(),S=S?S.toLowerCase():null,y=y.toLowerCase()),S&&b&&(S=Lo(S,b)||S);const C=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let E=w===y||!a&&w.startsWith(y)&&w.charAt(C)==="/",D=S!=null&&(S===y||!a&&S.startsWith(y)&&S.charAt(y.length)==="/"),$={isActive:E,isPending:D,isTransitioning:x},T=E?r:void 0,A;typeof i=="function"?A=i($):A=[i,E?"active":null,D?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let P=typeof l=="function"?l($):l;return m.createElement(Rr,Pc({},f,{"aria-current":T,className:A,ref:n,style:P,to:u,unstable_viewTransition:c}),typeof d=="function"?d($):d)});var fb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(fb||(fb={}));var FS;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(FS||(FS={}));function tz(e){let t=m.useContext(bh);return t||Oe(!1),t}function nz(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l}=t===void 0?{}:t,u=Fe(),c=qn(),d=$h(e,{relative:a});return m.useCallback(f=>{if(OB(f,n)){f.preventDefault();let h=r!==void 0?r:El(c)===El(d);u(e,{replace:h,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l})}},[c,u,d,r,o,n,e,i,a,l])}function bw(e){let t=m.useRef(db(e)),n=m.useRef(!1),r=qn(),o=m.useMemo(()=>_B(r.search,n.current?null:t.current),[r.search]),i=Fe(),a=m.useCallback((l,u)=>{const c=db(typeof l=="function"?l(o):l);n.current=!0,i("?"+c,u)},[i,o]);return[o,a]}function rz(e,t){t===void 0&&(t={});let n=m.useContext(AP);n==null&&Oe(!1);let{basename:r}=tz(fb.useViewTransitionState),o=$h(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Lo(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Lo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return cg(o.pathname,a)!=null||cg(o.pathname,i)!=null}const NP=e=>e.replace(/[A-Z]/g,t=>"_"+t.toLowerCase()),oz=e=>e.replace(/_./g,t=>t[1].toUpperCase()),MS=e=>typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)&&!(e instanceof Error)&&e!==null,dg=(e,t=(n,r)=>r)=>n=>{if(!MS(n))return n;if(Array.isArray(n))return n.map(dg(e,t));const r={};for(const[o,i]of Object.entries(n))r[e(o)]=MS(i)?dg(e,t)(i):t(o,i);return r},iz=(e,t)=>{if(typeof t=="string"&&(e!=null&&e.startsWith("time_")||e==="timestamp")){const n=new Date(t);return isNaN(n.getTime())?t:n}return t},az=dg(NP),sz=dg(oz,iz);function lz(e){return e!=null}const Xde=[e=>new Set(e).size===e.length,{message:"Items must be unique"}];function FP(e,t){return t instanceof Date?t.toISOString():t}function OS(e,t){return`${encodeURIComponent(NP(e))}=${encodeURIComponent(FP(e,t))}`}async function uz(e){const t=await e.text();let n;try{n=t.length>0?sz(JSON.parse(t)):{}}catch(r){return{type:"client_error",response:e,error:r,text:t}}return e.ok?{type:"success",response:e,data:n}:{type:"error",response:e,data:n}}class cz{constructor({host:t="",baseParams:n={},token:r}={}){iu(this,"host");iu(this,"token");iu(this,"baseParams");this.host=t,this.token=r;const o=new Headers({"Content-Type":"application/json"});r&&o.append("Authorization",`Bearer ${r}`),this.baseParams=_S({headers:o},n)}async request({body:t,path:n,query:r,host:o,...i}){const a=(o||this.host)+n+MP(r),l={..._S(this.baseParams,i),body:JSON.stringify(az(t),FP)};return uz(await fetch(a,l))}}function _S(e,t){const n=new Headers(e.headers);for(const[r,o]of new Headers(t.headers).entries())n.set(r,o);return{...e,...t,headers:n}}function MP(e){const t=Object.entries(e||{}).filter(([n,r])=>lz(r)).map(([n,r])=>Array.isArray(r)?r.map(o=>OS(n,o)).join("&"):OS(n,r)).join("&");return t?"?"+t:""}class dz extends cz{constructor(){super(...arguments);iu(this,"methods",{deviceAuthRequest:(n,r={})=>this.request({path:"/device/auth",method:"POST",...r}),deviceAuthConfirm:({body:n},r={})=>this.request({path:"/device/confirm",method:"POST",body:n,...r}),deviceAccessToken:(n,r={})=>this.request({path:"/device/token",method:"POST",...r}),probeList:({query:n={}},r={})=>this.request({path:"/experimental/v1/probes",method:"GET",query:n,...r}),probeCreate:({query:n,body:r},o={})=>this.request({path:"/experimental/v1/probes",method:"POST",body:r,query:n,...o}),probeView:({path:n,query:r},o={})=>this.request({path:`/experimental/v1/probes/${n.probe}`,method:"GET",query:r,...o}),probeDelete:({path:n,query:r},o={})=>this.request({path:`/experimental/v1/probes/${n.probe}`,method:"DELETE",query:r,...o}),loginSaml:({path:n},r={})=>this.request({path:`/login/${n.siloName}/saml/${n.providerName}`,method:"POST",...r}),certificateList:({query:n={}},r={})=>this.request({path:"/v1/certificates",method:"GET",query:n,...r}),certificateCreate:({body:n},r={})=>this.request({path:"/v1/certificates",method:"POST",body:n,...r}),certificateView:({path:n},r={})=>this.request({path:`/v1/certificates/${n.certificate}`,method:"GET",...r}),certificateDelete:({path:n},r={})=>this.request({path:`/v1/certificates/${n.certificate}`,method:"DELETE",...r}),diskList:({query:n={}},r={})=>this.request({path:"/v1/disks",method:"GET",query:n,...r}),diskCreate:({query:n,body:r},o={})=>this.request({path:"/v1/disks",method:"POST",body:r,query:n,...o}),diskView:({path:n,query:r={}},o={})=>this.request({path:`/v1/disks/${n.disk}`,method:"GET",query:r,...o}),diskDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/disks/${n.disk}`,method:"DELETE",query:r,...o}),diskBulkWriteImport:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/disks/${n.disk}/bulk-write`,method:"POST",body:o,query:r,...i}),diskBulkWriteImportStart:({path:n,query:r={}},o={})=>this.request({path:`/v1/disks/${n.disk}/bulk-write-start`,method:"POST",query:r,...o}),diskBulkWriteImportStop:({path:n,query:r={}},o={})=>this.request({path:`/v1/disks/${n.disk}/bulk-write-stop`,method:"POST",query:r,...o}),diskFinalizeImport:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/disks/${n.disk}/finalize`,method:"POST",body:o,query:r,...i}),diskMetricsList:({path:n,query:r={}},o={})=>this.request({path:`/v1/disks/${n.disk}/metrics/${n.metric}`,method:"GET",query:r,...o}),floatingIpList:({query:n={}},r={})=>this.request({path:"/v1/floating-ips",method:"GET",query:n,...r}),floatingIpCreate:({query:n,body:r},o={})=>this.request({path:"/v1/floating-ips",method:"POST",body:r,query:n,...o}),floatingIpView:({path:n,query:r={}},o={})=>this.request({path:`/v1/floating-ips/${n.floatingIp}`,method:"GET",query:r,...o}),floatingIpUpdate:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/floating-ips/${n.floatingIp}`,method:"PUT",body:o,query:r,...i}),floatingIpDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/floating-ips/${n.floatingIp}`,method:"DELETE",query:r,...o}),floatingIpAttach:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/floating-ips/${n.floatingIp}/attach`,method:"POST",body:o,query:r,...i}),floatingIpDetach:({path:n,query:r={}},o={})=>this.request({path:`/v1/floating-ips/${n.floatingIp}/detach`,method:"POST",query:r,...o}),groupList:({query:n={}},r={})=>this.request({path:"/v1/groups",method:"GET",query:n,...r}),groupView:({path:n},r={})=>this.request({path:`/v1/groups/${n.groupId}`,method:"GET",...r}),imageList:({query:n={}},r={})=>this.request({path:"/v1/images",method:"GET",query:n,...r}),imageCreate:({query:n={},body:r},o={})=>this.request({path:"/v1/images",method:"POST",body:r,query:n,...o}),imageView:({path:n,query:r={}},o={})=>this.request({path:`/v1/images/${n.image}`,method:"GET",query:r,...o}),imageDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/images/${n.image}`,method:"DELETE",query:r,...o}),imageDemote:({path:n,query:r},o={})=>this.request({path:`/v1/images/${n.image}/demote`,method:"POST",query:r,...o}),imagePromote:({path:n,query:r={}},o={})=>this.request({path:`/v1/images/${n.image}/promote`,method:"POST",query:r,...o}),instanceList:({query:n={}},r={})=>this.request({path:"/v1/instances",method:"GET",query:n,...r}),instanceCreate:({query:n,body:r},o={})=>this.request({path:"/v1/instances",method:"POST",body:r,query:n,...o}),instanceView:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}`,method:"GET",query:r,...o}),instanceDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}`,method:"DELETE",query:r,...o}),instanceDiskList:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}/disks`,method:"GET",query:r,...o}),instanceDiskAttach:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/instances/${n.instance}/disks/attach`,method:"POST",body:o,query:r,...i}),instanceDiskDetach:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/instances/${n.instance}/disks/detach`,method:"POST",body:o,query:r,...i}),instanceExternalIpList:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}/external-ips`,method:"GET",query:r,...o}),instanceEphemeralIpAttach:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/instances/${n.instance}/external-ips/ephemeral`,method:"POST",body:o,query:r,...i}),instanceEphemeralIpDetach:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}/external-ips/ephemeral`,method:"DELETE",query:r,...o}),instanceMigrate:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/instances/${n.instance}/migrate`,method:"POST",body:o,query:r,...i}),instanceReboot:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}/reboot`,method:"POST",query:r,...o}),instanceSerialConsole:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}/serial-console`,method:"GET",query:r,...o}),instanceSshPublicKeyList:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}/ssh-public-keys`,method:"GET",query:r,...o}),instanceStart:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}/start`,method:"POST",query:r,...o}),instanceStop:({path:n,query:r={}},o={})=>this.request({path:`/v1/instances/${n.instance}/stop`,method:"POST",query:r,...o}),projectIpPoolList:({query:n={}},r={})=>this.request({path:"/v1/ip-pools",method:"GET",query:n,...r}),projectIpPoolView:({path:n},r={})=>this.request({path:`/v1/ip-pools/${n.pool}`,method:"GET",...r}),loginLocal:({path:n,body:r},o={})=>this.request({path:`/v1/login/${n.siloName}/local`,method:"POST",body:r,...o}),logout:(n,r={})=>this.request({path:"/v1/logout",method:"POST",...r}),currentUserView:(n,r={})=>this.request({path:"/v1/me",method:"GET",...r}),currentUserGroups:({query:n={}},r={})=>this.request({path:"/v1/me/groups",method:"GET",query:n,...r}),currentUserSshKeyList:({query:n={}},r={})=>this.request({path:"/v1/me/ssh-keys",method:"GET",query:n,...r}),currentUserSshKeyCreate:({body:n},r={})=>this.request({path:"/v1/me/ssh-keys",method:"POST",body:n,...r}),currentUserSshKeyView:({path:n},r={})=>this.request({path:`/v1/me/ssh-keys/${n.sshKey}`,method:"GET",...r}),currentUserSshKeyDelete:({path:n},r={})=>this.request({path:`/v1/me/ssh-keys/${n.sshKey}`,method:"DELETE",...r}),siloMetric:({path:n,query:r={}},o={})=>this.request({path:`/v1/metrics/${n.metricName}`,method:"GET",query:r,...o}),instanceNetworkInterfaceList:({query:n={}},r={})=>this.request({path:"/v1/network-interfaces",method:"GET",query:n,...r}),instanceNetworkInterfaceCreate:({query:n,body:r},o={})=>this.request({path:"/v1/network-interfaces",method:"POST",body:r,query:n,...o}),instanceNetworkInterfaceView:({path:n,query:r={}},o={})=>this.request({path:`/v1/network-interfaces/${n.interface}`,method:"GET",query:r,...o}),instanceNetworkInterfaceUpdate:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/network-interfaces/${n.interface}`,method:"PUT",body:o,query:r,...i}),instanceNetworkInterfaceDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/network-interfaces/${n.interface}`,method:"DELETE",query:r,...o}),ping:(n,r={})=>this.request({path:"/v1/ping",method:"GET",...r}),policyView:(n,r={})=>this.request({path:"/v1/policy",method:"GET",...r}),policyUpdate:({body:n},r={})=>this.request({path:"/v1/policy",method:"PUT",body:n,...r}),projectList:({query:n={}},r={})=>this.request({path:"/v1/projects",method:"GET",query:n,...r}),projectCreate:({body:n},r={})=>this.request({path:"/v1/projects",method:"POST",body:n,...r}),projectView:({path:n},r={})=>this.request({path:`/v1/projects/${n.project}`,method:"GET",...r}),projectUpdate:({path:n,body:r},o={})=>this.request({path:`/v1/projects/${n.project}`,method:"PUT",body:r,...o}),projectDelete:({path:n},r={})=>this.request({path:`/v1/projects/${n.project}`,method:"DELETE",...r}),projectPolicyView:({path:n},r={})=>this.request({path:`/v1/projects/${n.project}/policy`,method:"GET",...r}),projectPolicyUpdate:({path:n,body:r},o={})=>this.request({path:`/v1/projects/${n.project}/policy`,method:"PUT",body:r,...o}),snapshotList:({query:n={}},r={})=>this.request({path:"/v1/snapshots",method:"GET",query:n,...r}),snapshotCreate:({query:n,body:r},o={})=>this.request({path:"/v1/snapshots",method:"POST",body:r,query:n,...o}),snapshotView:({path:n,query:r={}},o={})=>this.request({path:`/v1/snapshots/${n.snapshot}`,method:"GET",query:r,...o}),snapshotDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/snapshots/${n.snapshot}`,method:"DELETE",query:r,...o}),physicalDiskList:({query:n={}},r={})=>this.request({path:"/v1/system/hardware/disks",method:"GET",query:n,...r}),physicalDiskView:({path:n},r={})=>this.request({path:`/v1/system/hardware/disks/${n.diskId}`,method:"GET",...r}),rackList:({query:n={}},r={})=>this.request({path:"/v1/system/hardware/racks",method:"GET",query:n,...r}),rackView:({path:n},r={})=>this.request({path:`/v1/system/hardware/racks/${n.rackId}`,method:"GET",...r}),sledList:({query:n={}},r={})=>this.request({path:"/v1/system/hardware/sleds",method:"GET",query:n,...r}),sledAdd:({body:n},r={})=>this.request({path:"/v1/system/hardware/sleds",method:"POST",body:n,...r}),sledView:({path:n},r={})=>this.request({path:`/v1/system/hardware/sleds/${n.sledId}`,method:"GET",...r}),sledPhysicalDiskList:({path:n,query:r={}},o={})=>this.request({path:`/v1/system/hardware/sleds/${n.sledId}/disks`,method:"GET",query:r,...o}),sledInstanceList:({path:n,query:r={}},o={})=>this.request({path:`/v1/system/hardware/sleds/${n.sledId}/instances`,method:"GET",query:r,...o}),sledSetProvisionPolicy:({path:n,body:r},o={})=>this.request({path:`/v1/system/hardware/sleds/${n.sledId}/provision-policy`,method:"PUT",body:r,...o}),sledListUninitialized:({query:n={}},r={})=>this.request({path:"/v1/system/hardware/sleds-uninitialized",method:"GET",query:n,...r}),networkingSwitchPortList:({query:n={}},r={})=>this.request({path:"/v1/system/hardware/switch-port",method:"GET",query:n,...r}),networkingSwitchPortApplySettings:({path:n,query:r,body:o},i={})=>this.request({path:`/v1/system/hardware/switch-port/${n.port}/settings`,method:"POST",body:o,query:r,...i}),networkingSwitchPortClearSettings:({path:n,query:r},o={})=>this.request({path:`/v1/system/hardware/switch-port/${n.port}/settings`,method:"DELETE",query:r,...o}),networkingSwitchPortStatus:({path:n,query:r},o={})=>this.request({path:`/v1/system/hardware/switch-port/${n.port}/status`,method:"GET",query:r,...o}),switchList:({query:n={}},r={})=>this.request({path:"/v1/system/hardware/switches",method:"GET",query:n,...r}),switchView:({path:n},r={})=>this.request({path:`/v1/system/hardware/switches/${n.switchId}`,method:"GET",...r}),siloIdentityProviderList:({query:n={}},r={})=>this.request({path:"/v1/system/identity-providers",method:"GET",query:n,...r}),localIdpUserCreate:({query:n,body:r},o={})=>this.request({path:"/v1/system/identity-providers/local/users",method:"POST",body:r,query:n,...o}),localIdpUserDelete:({path:n,query:r},o={})=>this.request({path:`/v1/system/identity-providers/local/users/${n.userId}`,method:"DELETE",query:r,...o}),localIdpUserSetPassword:({path:n,query:r,body:o},i={})=>this.request({path:`/v1/system/identity-providers/local/users/${n.userId}/set-password`,method:"POST",body:o,query:r,...i}),samlIdentityProviderCreate:({query:n,body:r},o={})=>this.request({path:"/v1/system/identity-providers/saml",method:"POST",body:r,query:n,...o}),samlIdentityProviderView:({path:n,query:r},o={})=>this.request({path:`/v1/system/identity-providers/saml/${n.provider}`,method:"GET",query:r,...o}),ipPoolList:({query:n={}},r={})=>this.request({path:"/v1/system/ip-pools",method:"GET",query:n,...r}),ipPoolCreate:({body:n},r={})=>this.request({path:"/v1/system/ip-pools",method:"POST",body:n,...r}),ipPoolView:({path:n},r={})=>this.request({path:`/v1/system/ip-pools/${n.pool}`,method:"GET",...r}),ipPoolUpdate:({path:n,body:r},o={})=>this.request({path:`/v1/system/ip-pools/${n.pool}`,method:"PUT",body:r,...o}),ipPoolDelete:({path:n},r={})=>this.request({path:`/v1/system/ip-pools/${n.pool}`,method:"DELETE",...r}),ipPoolRangeList:({path:n,query:r={}},o={})=>this.request({path:`/v1/system/ip-pools/${n.pool}/ranges`,method:"GET",query:r,...o}),ipPoolRangeAdd:({path:n,body:r},o={})=>this.request({path:`/v1/system/ip-pools/${n.pool}/ranges/add`,method:"POST",body:r,...o}),ipPoolRangeRemove:({path:n,body:r},o={})=>this.request({path:`/v1/system/ip-pools/${n.pool}/ranges/remove`,method:"POST",body:r,...o}),ipPoolSiloList:({path:n,query:r={}},o={})=>this.request({path:`/v1/system/ip-pools/${n.pool}/silos`,method:"GET",query:r,...o}),ipPoolSiloLink:({path:n,body:r},o={})=>this.request({path:`/v1/system/ip-pools/${n.pool}/silos`,method:"POST",body:r,...o}),ipPoolSiloUpdate:({path:n,body:r},o={})=>this.request({path:`/v1/system/ip-pools/${n.pool}/silos/${n.silo}`,method:"PUT",body:r,...o}),ipPoolSiloUnlink:({path:n},r={})=>this.request({path:`/v1/system/ip-pools/${n.pool}/silos/${n.silo}`,method:"DELETE",...r}),ipPoolUtilizationView:({path:n},r={})=>this.request({path:`/v1/system/ip-pools/${n.pool}/utilization`,method:"GET",...r}),ipPoolServiceView:(n,r={})=>this.request({path:"/v1/system/ip-pools-service",method:"GET",...r}),ipPoolServiceRangeList:({query:n={}},r={})=>this.request({path:"/v1/system/ip-pools-service/ranges",method:"GET",query:n,...r}),ipPoolServiceRangeAdd:({body:n},r={})=>this.request({path:"/v1/system/ip-pools-service/ranges/add",method:"POST",body:n,...r}),ipPoolServiceRangeRemove:({body:n},r={})=>this.request({path:"/v1/system/ip-pools-service/ranges/remove",method:"POST",body:n,...r}),systemMetric:({path:n,query:r={}},o={})=>this.request({path:`/v1/system/metrics/${n.metricName}`,method:"GET",query:r,...o}),networkingAddressLotList:({query:n={}},r={})=>this.request({path:"/v1/system/networking/address-lot",method:"GET",query:n,...r}),networkingAddressLotCreate:({body:n},r={})=>this.request({path:"/v1/system/networking/address-lot",method:"POST",body:n,...r}),networkingAddressLotDelete:({path:n},r={})=>this.request({path:`/v1/system/networking/address-lot/${n.addressLot}`,method:"DELETE",...r}),networkingAddressLotBlockList:({path:n,query:r={}},o={})=>this.request({path:`/v1/system/networking/address-lot/${n.addressLot}/blocks`,method:"GET",query:r,...o}),networkingAllowListView:(n,r={})=>this.request({path:"/v1/system/networking/allow-list",method:"GET",...r}),networkingAllowListUpdate:({body:n},r={})=>this.request({path:"/v1/system/networking/allow-list",method:"PUT",body:n,...r}),networkingBfdDisable:({body:n},r={})=>this.request({path:"/v1/system/networking/bfd-disable",method:"POST",body:n,...r}),networkingBfdEnable:({body:n},r={})=>this.request({path:"/v1/system/networking/bfd-enable",method:"POST",body:n,...r}),networkingBfdStatus:(n,r={})=>this.request({path:"/v1/system/networking/bfd-status",method:"GET",...r}),networkingBgpConfigList:({query:n={}},r={})=>this.request({path:"/v1/system/networking/bgp",method:"GET",query:n,...r}),networkingBgpConfigCreate:({body:n},r={})=>this.request({path:"/v1/system/networking/bgp",method:"POST",body:n,...r}),networkingBgpConfigDelete:({query:n},r={})=>this.request({path:"/v1/system/networking/bgp",method:"DELETE",query:n,...r}),networkingBgpAnnounceSetList:({query:n},r={})=>this.request({path:"/v1/system/networking/bgp-announce",method:"GET",query:n,...r}),networkingBgpAnnounceSetCreate:({body:n},r={})=>this.request({path:"/v1/system/networking/bgp-announce",method:"POST",body:n,...r}),networkingBgpAnnounceSetDelete:({query:n},r={})=>this.request({path:"/v1/system/networking/bgp-announce",method:"DELETE",query:n,...r}),networkingBgpMessageHistory:({query:n},r={})=>this.request({path:"/v1/system/networking/bgp-message-history",method:"GET",query:n,...r}),networkingBgpImportedRoutesIpv4:({query:n},r={})=>this.request({path:"/v1/system/networking/bgp-routes-ipv4",method:"GET",query:n,...r}),networkingBgpStatus:(n,r={})=>this.request({path:"/v1/system/networking/bgp-status",method:"GET",...r}),networkingLoopbackAddressList:({query:n={}},r={})=>this.request({path:"/v1/system/networking/loopback-address",method:"GET",query:n,...r}),networkingLoopbackAddressCreate:({body:n},r={})=>this.request({path:"/v1/system/networking/loopback-address",method:"POST",body:n,...r}),networkingLoopbackAddressDelete:({path:n},r={})=>this.request({path:`/v1/system/networking/loopback-address/${n.rackId}/${n.switchLocation}/${n.address}/${n.subnetMask}`,method:"DELETE",...r}),networkingSwitchPortSettingsList:({query:n={}},r={})=>this.request({path:"/v1/system/networking/switch-port-settings",method:"GET",query:n,...r}),networkingSwitchPortSettingsCreate:({body:n},r={})=>this.request({path:"/v1/system/networking/switch-port-settings",method:"POST",body:n,...r}),networkingSwitchPortSettingsDelete:({query:n={}},r={})=>this.request({path:"/v1/system/networking/switch-port-settings",method:"DELETE",query:n,...r}),networkingSwitchPortSettingsView:({path:n},r={})=>this.request({path:`/v1/system/networking/switch-port-settings/${n.port}`,method:"GET",...r}),systemPolicyView:(n,r={})=>this.request({path:"/v1/system/policy",method:"GET",...r}),systemPolicyUpdate:({body:n},r={})=>this.request({path:"/v1/system/policy",method:"PUT",body:n,...r}),roleList:({query:n={}},r={})=>this.request({path:"/v1/system/roles",method:"GET",query:n,...r}),roleView:({path:n},r={})=>this.request({path:`/v1/system/roles/${n.roleName}`,method:"GET",...r}),systemQuotasList:({query:n={}},r={})=>this.request({path:"/v1/system/silo-quotas",method:"GET",query:n,...r}),siloList:({query:n={}},r={})=>this.request({path:"/v1/system/silos",method:"GET",query:n,...r}),siloCreate:({body:n},r={})=>this.request({path:"/v1/system/silos",method:"POST",body:n,...r}),siloView:({path:n},r={})=>this.request({path:`/v1/system/silos/${n.silo}`,method:"GET",...r}),siloDelete:({path:n},r={})=>this.request({path:`/v1/system/silos/${n.silo}`,method:"DELETE",...r}),siloIpPoolList:({path:n,query:r={}},o={})=>this.request({path:`/v1/system/silos/${n.silo}/ip-pools`,method:"GET",query:r,...o}),siloPolicyView:({path:n},r={})=>this.request({path:`/v1/system/silos/${n.silo}/policy`,method:"GET",...r}),siloPolicyUpdate:({path:n,body:r},o={})=>this.request({path:`/v1/system/silos/${n.silo}/policy`,method:"PUT",body:r,...o}),siloQuotasView:({path:n},r={})=>this.request({path:`/v1/system/silos/${n.silo}/quotas`,method:"GET",...r}),siloQuotasUpdate:({path:n,body:r},o={})=>this.request({path:`/v1/system/silos/${n.silo}/quotas`,method:"PUT",body:r,...o}),siloUserList:({query:n={}},r={})=>this.request({path:"/v1/system/users",method:"GET",query:n,...r}),siloUserView:({path:n,query:r},o={})=>this.request({path:`/v1/system/users/${n.userId}`,method:"GET",query:r,...o}),userBuiltinList:({query:n={}},r={})=>this.request({path:"/v1/system/users-builtin",method:"GET",query:n,...r}),userBuiltinView:({path:n},r={})=>this.request({path:`/v1/system/users-builtin/${n.user}`,method:"GET",...r}),siloUtilizationList:({query:n={}},r={})=>this.request({path:"/v1/system/utilization/silos",method:"GET",query:n,...r}),siloUtilizationView:({path:n},r={})=>this.request({path:`/v1/system/utilization/silos/${n.silo}`,method:"GET",...r}),timeseriesQuery:({body:n},r={})=>this.request({path:"/v1/timeseries/query",method:"POST",body:n,...r}),timeseriesSchemaList:({query:n={}},r={})=>this.request({path:"/v1/timeseries/schema",method:"GET",query:n,...r}),userList:({query:n={}},r={})=>this.request({path:"/v1/users",method:"GET",query:n,...r}),utilizationView:(n,r={})=>this.request({path:"/v1/utilization",method:"GET",...r}),vpcFirewallRulesView:({query:n},r={})=>this.request({path:"/v1/vpc-firewall-rules",method:"GET",query:n,...r}),vpcFirewallRulesUpdate:({query:n,body:r},o={})=>this.request({path:"/v1/vpc-firewall-rules",method:"PUT",body:r,query:n,...o}),vpcRouterRouteList:({query:n={}},r={})=>this.request({path:"/v1/vpc-router-routes",method:"GET",query:n,...r}),vpcRouterRouteCreate:({query:n,body:r},o={})=>this.request({path:"/v1/vpc-router-routes",method:"POST",body:r,query:n,...o}),vpcRouterRouteView:({path:n,query:r},o={})=>this.request({path:`/v1/vpc-router-routes/${n.route}`,method:"GET",query:r,...o}),vpcRouterRouteUpdate:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/vpc-router-routes/${n.route}`,method:"PUT",body:o,query:r,...i}),vpcRouterRouteDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/vpc-router-routes/${n.route}`,method:"DELETE",query:r,...o}),vpcRouterList:({query:n={}},r={})=>this.request({path:"/v1/vpc-routers",method:"GET",query:n,...r}),vpcRouterCreate:({query:n,body:r},o={})=>this.request({path:"/v1/vpc-routers",method:"POST",body:r,query:n,...o}),vpcRouterView:({path:n,query:r={}},o={})=>this.request({path:`/v1/vpc-routers/${n.router}`,method:"GET",query:r,...o}),vpcRouterUpdate:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/vpc-routers/${n.router}`,method:"PUT",body:o,query:r,...i}),vpcRouterDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/vpc-routers/${n.router}`,method:"DELETE",query:r,...o}),vpcSubnetList:({query:n={}},r={})=>this.request({path:"/v1/vpc-subnets",method:"GET",query:n,...r}),vpcSubnetCreate:({query:n,body:r},o={})=>this.request({path:"/v1/vpc-subnets",method:"POST",body:r,query:n,...o}),vpcSubnetView:({path:n,query:r={}},o={})=>this.request({path:`/v1/vpc-subnets/${n.subnet}`,method:"GET",query:r,...o}),vpcSubnetUpdate:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/vpc-subnets/${n.subnet}`,method:"PUT",body:o,query:r,...i}),vpcSubnetDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/vpc-subnets/${n.subnet}`,method:"DELETE",query:r,...o}),vpcSubnetListNetworkInterfaces:({path:n,query:r={}},o={})=>this.request({path:`/v1/vpc-subnets/${n.subnet}/network-interfaces`,method:"GET",query:r,...o}),vpcList:({query:n={}},r={})=>this.request({path:"/v1/vpcs",method:"GET",query:n,...r}),vpcCreate:({query:n,body:r},o={})=>this.request({path:"/v1/vpcs",method:"POST",body:r,query:n,...o}),vpcView:({path:n,query:r={}},o={})=>this.request({path:`/v1/vpcs/${n.vpc}`,method:"GET",query:r,...o}),vpcUpdate:({path:n,query:r={},body:o},i={})=>this.request({path:`/v1/vpcs/${n.vpc}`,method:"PUT",body:o,query:r,...i}),vpcDelete:({path:n,query:r={}},o={})=>this.request({path:`/v1/vpcs/${n.vpc}`,method:"DELETE",query:r,...o})});iu(this,"ws",{instanceSerialConsoleStream:({host:n,secure:r=!0,path:o,query:i={}})=>{const a=r?"wss:":"ws:",l=`/v1/instances/${o.instance}/serial-console/stream`;return new WebSocket(a+"//"+n+l+MP(i))}})}}function vo(e,t){if(!e)throw new Error(`Invariant failed: ${t}`)}const rr=e=>e&&e.charAt(0).toUpperCase()+e.slice(1),fz=e=>e.replace(/[\W|_]+/g," ").replace(/([A-Z])([A-Z]+)/g,(t,n,r)=>`${n}${r.toLowerCase()}`).replace(/(?:^\w|[A-Z]|\b\w)/g,(t,n)=>n===0?t.toLowerCase():t.toUpperCase()).replace(/([A-Z])([A-Z]+)/g,(t,n,r)=>`${n}${r.toLowerCase()}`).replace(/\s+/g,""),hz=e=>fz(e).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),mz=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Jde=(e,t)=>e.length<=2?e.join(` ${t} `):[...e.slice(0,-1),`${t} ${e.at(-1)}`].join(", "),LS=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substring(1).toLowerCase()),pz=/^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$/u,gz=/^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu,VS=e=>{const t=pz.test(e),n=!t&&gz.test(e);return{isv4:t,isv6:n,valid:t||n}};function vz(e,t){const n=/^already exists: ([^"]+)/.exec(t);if(n)return n[1].trim();const r=mz(e),o=r.indexOf("create");return o<1?null:r[o-1].replace(/s$/,"")}function yz(e,t){if(t.type==="client_error")return{message:"Error reading API response",statusCode:t.response.status,requestId:void 0};let n;const r=t.data.errorCode;if(r==="Forbidden")n="Action not authorized";else if(r==="ObjectNotFound")n=rr(t.data.message);else if(r==="ObjectAlreadyExists"){const o=vz(e,t.data.message);o&&(n=`${rr(o)} name already exists`)}return n||(n=xz(t.data.message)||rr(t.data.message)||"Unknown server error"),{message:n,errorCode:t.data.errorCode||void 0,statusCode:t.response.status,requestId:t.data.requestId}}function xz(e){var n;if(!e)return;const t=(n=/^unable to parse JSON body: (.+) at line \d+ column \d+$/.exec(e))==null?void 0:n[1];return t&&rr(t)}function bz(e={includeCurrent:!1}){const{pathname:t,search:n}=window.location;return e.includeCurrent?`/login?redirect_uri=${encodeURIComponent(t+n)}`:"/login"}function fg(e){window.location.assign(bz(e))}const rs=e=>t=>{if(t.type==="success")return t.data;t.response.status===401&&e!=="loginLocal"&&fg({includeCurrent:!0});const n=yz(e,t);{const r=window.location.pathname+window.location.search;console.error(`More info about API ${n.statusCode||"error"} on ${r}

API URL:        ${t.response.url}
Request ID:     ${n.requestId}
Error code:     ${n.errorCode}
Error message:  ${n.message.replace(/\n/g,`
`+" ".repeat(16))}
`)}throw n},wz=e=>(t,n,r={})=>ov({queryKey:[t,n],queryFn:({signal:o})=>e[t](n,{signal:o}).then(rs(t)),throwOnError:o=>o.statusCode===404,...r}),$z=e=>(t,n,r={})=>h_({queries:n.map(o=>({queryKey:[t,o],queryFn:({signal:i})=>e[t](o,{signal:i}).then(rs(t)),throwOnError:i=>i.statusCode===404,...r,select:i=>({...i,params:o})}))}),Sz=e=>(t,n,r={})=>{const o=[t,n],i=ov({queryKey:o,queryFn:({signal:a})=>e[t](n,{signal:a}).then(rs(t)),throwOnError:a=>a.statusCode===404,...r});return vo(i.data,`Expected query to be prefetched. Key: ${JSON.stringify(o)}`),i},hb="errors-allowed",Ez=e=>(t,n,r={})=>ov({queryKey:[t,n,hb],queryFn:({signal:o})=>e[t](n,{signal:o}).then(rs(t)).then(i=>({type:"success",data:i})).catch(i=>({type:"error",data:i})),...r}),Cz=e=>(t,n)=>p_({mutationFn:({signal:r,...o})=>e[t](o,{signal:r}).then(rs(t)),...n}),OP=(e,t)=>({invalidateQueries:(n,r)=>t.invalidateQueries(n?{queryKey:[n],...r}:void 0),setQueryData:(n,r,o)=>t.setQueryData([n,r],o),setQueryDataErrorsAllowed:(n,r,o)=>t.setQueryData([n,r,hb],o),fetchQuery:(n,r,o={})=>t.fetchQuery({queryKey:[n,r],queryFn:()=>e[n](r).then(rs(n)),...o}),prefetchQuery:(n,r,o={})=>t.prefetchQuery({queryKey:[n,r],queryFn:()=>e[n](r).then(rs(n)),...o}),prefetchQueryErrorsAllowed:(n,r,o)=>t.prefetchQuery({queryKey:[n,r,hb],queryFn:()=>e[n](r).then(rs(n)).then(i=>({type:"success",data:i})).catch(i=>{if(i.statusCode!==o.expectedStatusCode)throw i;return console.log(o.explanation),{type:"error",data:i}}),...o})}),Dz=e=>()=>OP(e,ph()),Fo=new dz({host:""}),Ze=wz(Fo.methods);$z(Fo.methods);const Pe=Sz(Fo.methods),_P=Ez(Fo.methods),fe=Cz(Fo.methods),LP=new n_({defaultOptions:{queries:{retry:!1,staleTime:2e3,refetchOnWindowFocus:!1}}}),ae=OP(Fo.methods,LP),ke=Dz(Fo.methods);function jz(e,t){const n=Math.min(e.length,t.length),r=[];for(let o=0;o<n;o++)r.push([e[o],t[o]]);return r}function BS(e){if(e.type!=="success")throw e.type==="error"&&console.error(e.data.message),e;return e.data}function zS(e){console.log(`%c${e}`,"font-size: 16px; font-weight: bold;")}typeof window<"u"&&(window.oxide=Fo.methods,window.oxql={query:async e=>{const t=await Fo.methods.timeseriesQuery({body:{query:e}}),n=BS(t);zS(n.length+" timeseries returned");for(const r of n)for(const o of Object.values(r.timeseries)){const i=Object.entries(o.fields).map(([a,l])=>`${a}: ${l.value}`).join(", ");zS(`Data for { ${i} }`),console.table(jz(o.points.timestamps,o.points.values[0].values.values))}return n},schemas:async e=>{const t=await Fo.methods.timeseriesSchemaList({query:{limit:1e3}});let r=BS(t).items;return e&&(r=r.filter(o=>o.timeseriesName.includes(e))),console.table(r),r}});function Pz(e,t,n){let r=o=>e(o,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}function zc(e,t,n){let r=e.length-t.length;if(r===0)return e(...t);if(r===1)return Pz(e,t,n);throw new Error("Wrong number of arguments")}function US(...e){return zc(Rz,e)}var Rz=(e,t)=>{let n=0;for(let[r,o]of e.entries()){let i=t(o,r,e);n+=i}return n};function kz(...e){return zc(Tz,e)}var Tz=(e,t)=>e.length>=t,VP={asc:(e,t)=>e>t,desc:(e,t)=>e<t};function BP(e,t){let[n,...r]=t;if(!Iz(n)){let i=mb(...r);return e(n,i)}let o=mb(n,...r);return i=>e(i,o)}function mb(e,t,...n){let r=typeof e=="function"?e:e[0],o=typeof e=="function"?"asc":e[1],{[o]:i}=VP,a=t===void 0?void 0:mb(t,...n);return(l,u)=>{let c=r(l),d=r(u);return i(c,d)?1:i(d,c)?-1:(a==null?void 0:a(l,u))??0}}function Iz(e){if(qS(e))return!0;if(typeof e!="object"||!Array.isArray(e))return!1;let[t,n,...r]=e;return qS(t)&&typeof n=="string"&&n in VP&&r.length===0}var qS=e=>typeof e=="function"&&e.length===1;function Az(...e){return zc(Nz,e)}function Nz(e,t){let n=e.findIndex(t);return n===-1?[[...e],[]]:[e.slice(0,n),e.slice(n)]}function Cv(...e){return BP(Fz,e)}var Fz=(e,t)=>[...e].sort(t);function _f(...e){return zc(Mz,e)}function Mz(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function zP(...e){return zc(Oz,e)}function Oz(e,t){let n={};for(let[r,o]of Object.entries(e)){let i=t(o,r,e);n[r]=i}return n}function _z(...e){return zc(Lz,e)}var Lz=(e,t)=>{let n={};for(let[r,o]of e.entries()){let i=t(o,r,e);if(i!==void 0){let{[i]:a}=n;a===void 0&&(a=[],n[i]=a),a.push(o)}}return n};function Vz(...e){return BP(Bz,e)}function Bz(e,t){if(!kz(e,2))return e[0];let[n]=e,[,...r]=e;for(let o of r)t(o,n)<0&&(n=o);return n}const zz=e=>Cv(Object.keys(e),t=>e[t]),ww={collaborator:1,admin:0,viewer:2},Uz=zz(ww),qz=e=>Vz(e,t=>ww[t]);function Dv(e,t){const n=t.roleAssignments.filter(r=>r.identityId!==e.identityId);return n.push(e),{roleAssignments:n}}function UP(e,t){return{roleAssignments:t.roleAssignments.filter(r=>r.identityId!==e)}}function pb(e,t){const{data:n}=Pe("userList",{}),{data:r}=Pe("groupList",{});return m.useMemo(()=>{const o=(n==null?void 0:n.items)||[],i=(r==null?void 0:r.items)||[],a=Object.fromEntries(o.concat(i).map(l=>[l.id,l]));return e.map(l=>{var u;return{id:l.identityId,identityType:l.identityType,name:((u=a[l.identityId])==null?void 0:u.displayName)||"",roleName:l.roleName,roleSource:t}})},[e,t,n,r])}function qP(e,t){const n=+(e.identityType==="silo_group");return+(t.identityType==="silo_group")-n||e.name.localeCompare(t.name)}function HP(e){const{data:t}=Pe("userList",{}),{data:n}=Pe("groupList",{});return m.useMemo(()=>{const r=new Set((e==null?void 0:e.roleAssignments.map(a=>a.identityId))||[]),o=n.items.map(a=>({...a,identityType:"silo_group"})),i=t.items.map(a=>({...a,identityType:"silo_user"}));return o.concat(i).filter(a=>!r.has(a.id))||[]},[t,n,e])}function Hz(e,t){const r=Intl.NumberFormat(t,{maximumFractionDigits:2}).formatToParts(e),[o,i]=Az(r,a=>a.type==="decimal");return[o.map(a=>a.value).join(""),i.map(a=>a.value).join("")]}function Wz(e,t){return typeof e=="number"?e*100/t:Number(e*10000n/t)/100}function $w(e,t){const n=Intl.NumberFormat("en-US",{maximumFractionDigits:t,useGrouping:!1});return Number(n.format(e))}const Gz=(e,t)=>Intl.NumberFormat(t,{notation:"engineering",maximumFractionDigits:1}).format(e).toLowerCase();function Kz(e,t){const n=Intl.NumberFormat(t,{notation:"compact",maximumFractionDigits:1}),r=e>=1e6;return[r?e<1e15?n.format(e):Gz(e,t):e.toLocaleString(t),r]}function gb(e){return Math.ceil(e/10)*10}const WP=1024,Qz=1024*WP,jr=1024*Qz,Zz=1024*jr,Sr=(e,t=2)=>$w(e/jr,t),La=(e,t=2)=>$w(e/Zz,t),efe=8,py=64,tfe=1,gy=256,nfe=1,vy=1023;function Yz(e){const t=/^([0-9]{1,5})((?:-)[0-9]{1,5})?$/.exec(e.trim());if(!t)return null;const n=parseInt(t[1],10),r=t[2]?parseInt(t[2].slice(1),10):n;return r<n?null:[n,r]}const GP=e=>_f(e,["name","action","description","direction","filters","priority","status","targets"]),Sw=(...e)=>{const t=e.length,n=Math.floor(63/t)-Math.ceil(6/t)-1;return e.map(r=>r.substring(0,n)).join("-").concat(`-${Math.random().toString(16).substring(2,8)}`)},Xz={start:["stopped"],reboot:["running"],stop:["running","starting"],delete:["stopped","failed"],detachDisk:["creating","stopped","failed"],attachDisk:["creating","stopped"],updateNic:["stopped"],serialConsole:["running","rebooting","migrating","repairing"]},_n=zP(Xz,e=>{const t=n=>e.includes(n.runState);return t.states=e,t}),Jz={delete:["detached","creating","faulted"],snapshot:["attached","detached"],attach:["creating","detached"]},Va=zP(Jz,e=>{const t=n=>e.includes(n.state.state);return t.states=e,t}),yy="001de000-1334-4000-8000-000000000000",eU=.909,xy=.7;function rfe(e){return{disk_tib:Math.ceil(xy*e.length*32*eU),ram_gib:Math.ceil(Sr(xy*US(e,t=>t.usablePhysicalRam))),cpu:Math.ceil(xy*US(e,t=>t.usableHardwareThreads))}}function tU(e){const t={cpus:0,memory:0,storage:0},n={cpus:0,memory:0,storage:0};return e.forEach(({allocated:r,provisioned:o})=>{n.cpus+=o.cpus,n.memory+=o.memory,n.storage+=o.storage,t.cpus+=r.cpus,t.memory+=r.memory,t.storage+=r.storage}),{totalAllocated:t,totalProvisioned:n}}function KP(e,t,n,r,o){if(!e||!t)return;const i=[];if(e.length===0||e[0].timestamp.getTime()>n.getTime()){const a=t.length>0?o(t.at(-1).datum.datum):0;i.push({timestamp:n.getTime(),value:a})}return i.push(...e.map(({datum:a,timestamp:l})=>({timestamp:l.getTime(),value:o(a.datum)}))),i.push({timestamp:r.getTime(),value:i.at(-1).value}),i}function QP({ipv4:e,ipv6:t}){return{ipv4:e,ipv6:{allocated:BigInt(t.allocated),capacity:BigInt(t.capacity)}}}var nU={VITE_VERCEL_GIT_REPO_ID:"249571104",VITE_VERCEL_ENV:"preview",VITE_VERCEL_GIT_PULL_REQUEST_ID:"2328",VITE_VERCEL_BRANCH_URL:"console-git-simplerformnavguard-oxidecomputer.vercel.app",VITE_VERCEL_GIT_COMMIT_SHA:"cb5486a86ef066f5b28702cb58d0ea1262322d3a",VITE_VERCEL_URL:"console-9n2vwl7z4-oxidecomputer.vercel.app",VITE_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Charlie Park",VITE_VERCEL_GIT_PREVIOUS_SHA:"",VITE_VERCEL_PROJECT_PRODUCTION_URL:"console-preview.oxide.computer",VITE_VERCEL_GIT_REPO_OWNER:"oxidecomputer",VITE_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"charliepark",VITE_VERCEL_GIT_PROVIDER:"github",VITE_VERCEL_GIT_COMMIT_REF:"simplerFormNavGuard",VITE_VERCEL_GIT_REPO_SLUG:"console",VITE_VERCEL_GIT_COMMIT_MESSAGE:"fix issue with isDirty evaluation",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const HS=e=>{let t;const n=new Set,r=(d,f)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,p))}},o=()=>t,u={setState:r,getState:o,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(nU?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,o,u);return u},rU=e=>e?HS(e):HS;var ZP={exports:{}},YP={},XP={exports:{}},JP={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Rc=m;function oU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var iU=typeof Object.is=="function"?Object.is:oU,aU=Rc.useState,sU=Rc.useEffect,lU=Rc.useLayoutEffect,uU=Rc.useDebugValue;function cU(e,t){var n=t(),r=aU({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return lU(function(){o.value=n,o.getSnapshot=t,by(o)&&i({inst:o})},[e,n,t]),sU(function(){return by(o)&&i({inst:o}),e(function(){by(o)&&i({inst:o})})},[e]),uU(n),n}function by(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!iU(e,n)}catch{return!0}}function dU(e,t){return t()}var fU=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?dU:cU;JP.useSyncExternalStore=Rc.useSyncExternalStore!==void 0?Rc.useSyncExternalStore:fU;XP.exports=JP;var hU=XP.exports;/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var jv=m,mU=hU;function pU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gU=typeof Object.is=="function"?Object.is:pU,vU=mU.useSyncExternalStore,yU=jv.useRef,xU=jv.useEffect,bU=jv.useMemo,wU=jv.useDebugValue;YP.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=yU(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=bU(function(){function u(p){if(!c){if(c=!0,d=p,p=r(p),o!==void 0&&a.hasValue){var g=a.value;if(o(g,p))return f=g}return f=p}if(g=f,gU(d,p))return g;var v=r(p);return o!==void 0&&o(g,v)?g:(d=p,f=v)}var c=!1,d,f,h=n===void 0?null:n;return[function(){return u(t())},h===null?void 0:function(){return u(h())}]},[t,n,r,o]);var l=vU(e,i[0],i[1]);return xU(function(){a.hasValue=!0,a.value=l},[l]),wU(l),l};ZP.exports=YP;var $U=ZP.exports;const SU=pi($U);var eR={VITE_VERCEL_GIT_REPO_ID:"249571104",VITE_VERCEL_ENV:"preview",VITE_VERCEL_GIT_PULL_REQUEST_ID:"2328",VITE_VERCEL_BRANCH_URL:"console-git-simplerformnavguard-oxidecomputer.vercel.app",VITE_VERCEL_GIT_COMMIT_SHA:"cb5486a86ef066f5b28702cb58d0ea1262322d3a",VITE_VERCEL_URL:"console-9n2vwl7z4-oxidecomputer.vercel.app",VITE_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Charlie Park",VITE_VERCEL_GIT_PREVIOUS_SHA:"",VITE_VERCEL_PROJECT_PRODUCTION_URL:"console-preview.oxide.computer",VITE_VERCEL_GIT_REPO_OWNER:"oxidecomputer",VITE_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"charliepark",VITE_VERCEL_GIT_PROVIDER:"github",VITE_VERCEL_GIT_COMMIT_REF:"simplerFormNavGuard",VITE_VERCEL_GIT_REPO_SLUG:"console",VITE_VERCEL_GIT_COMMIT_MESSAGE:"fix issue with isDirty evaluation",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:EU}=U,{useSyncExternalStoreWithSelector:CU}=SU;let WS=!1;const DU=e=>e;function jU(e,t=DU,n){(eR?"production":void 0)!=="production"&&n&&!WS&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),WS=!0);const r=CU(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return EU(r),r}const GS=e=>{(eR?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?rU(e):e,n=(r,o)=>jU(t,r,o);return Object.assign(n,t),n},Ew=e=>e?GS(e):GS,Pv=Ew(()=>({actionConfig:null}));function os(e){Pv.setState({actionConfig:e})}function wy(){Pv.setState({actionConfig:null})}let Em;const PU=new Uint8Array(16);function RU(){if(!Em&&(Em=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Em))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Em(PU)}const kn=[];for(let e=0;e<256;++e)kn.push((e+256).toString(16).slice(1));function kU(e,t=0){return kn[e[t+0]]+kn[e[t+1]]+kn[e[t+2]]+kn[e[t+3]]+"-"+kn[e[t+4]]+kn[e[t+5]]+"-"+kn[e[t+6]]+kn[e[t+7]]+"-"+kn[e[t+8]]+kn[e[t+9]]+"-"+kn[e[t+10]]+kn[e[t+11]]+kn[e[t+12]]+kn[e[t+13]]+kn[e[t+14]]+kn[e[t+15]]}const TU=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),KS={randomUUID:TU};function IU(e,t,n){if(KS.randomUUID&&!t&&!e)return KS.randomUUID();e=e||{};const r=e.random||(e.rng||RU)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return kU(r)}const Cw=Ew(()=>({toasts:[]}));function De(e){Cw.setState(({toasts:t})=>({toasts:[...t,{id:IU(),options:e}]}))}function AU(e){Cw.setState(({toasts:t})=>({toasts:t.filter(n=>n.id!==e)}))}function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re.apply(this,arguments)}function Ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function NU(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Dw(...e){return t=>e.forEach(n=>NU(n,t))}function zn(...e){return m.useCallback(Dw(...e),e)}function ia(e,t=[]){let n=[];function r(i,a){const l=m.createContext(a),u=n.length;n=[...n,a];function c(f){const{scope:h,children:p,...g}=f,v=(h==null?void 0:h[e][u])||l,b=m.useMemo(()=>g,Object.values(g));return m.createElement(v.Provider,{value:b},p)}function d(f,h){const p=(h==null?void 0:h[e][u])||l,g=m.useContext(p);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}const o=()=>{const i=n.map(a=>m.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,FU(o,...t)]}function FU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:c})=>{const f=u(i)[`__scope${c}`];return{...l,...f}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const jl=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},MU=vf.useId||(()=>{});let OU=0;function Ui(e){const[t,n]=m.useState(MU());return jl(()=>{e||n(r=>r??String(OU++))},[e]),e||(t?`radix-${t}`:"")}function si(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function zl({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=_U({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,l=si(n),u=m.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&l(f)}else o(c)},[i,e,o,l]);return[a,u]}function _U({defaultProp:e,onChange:t}){const n=m.useState(e),[r]=n,o=m.useRef(r),i=si(t);return m.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Lf=m.forwardRef((e,t)=>{const{children:n,...r}=e,o=m.Children.toArray(n),i=o.find(VU);if(i){const a=i.props.children,l=o.map(u=>u===i?m.Children.count(a)>1?m.Children.only(null):m.isValidElement(a)?a.props.children:null:u);return m.createElement(vb,Re({},r,{ref:t}),m.isValidElement(a)?m.cloneElement(a,void 0,l):null)}return m.createElement(vb,Re({},r,{ref:t}),n)});Lf.displayName="Slot";const vb=m.forwardRef((e,t)=>{const{children:n,...r}=e;return m.isValidElement(n)?m.cloneElement(n,{...BU(r,n.props),ref:t?Dw(t,n.ref):n.ref}):m.Children.count(n)>1?m.Children.only(null):null});vb.displayName="SlotClone";const LU=({children:e})=>m.createElement(m.Fragment,null,e);function VU(e){return m.isValidElement(e)&&e.type===LU}function BU(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const zU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],gn=zU.reduce((e,t)=>{const n=m.forwardRef((r,o)=>{const{asChild:i,...a}=r,l=i?Lf:t;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(l,Re({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function tR(e,t){e&&or.flushSync(()=>e.dispatchEvent(t))}function UU(e,t=globalThis==null?void 0:globalThis.document){const n=si(e);m.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const yb="dismissableLayer.update",qU="dismissableLayer.pointerDownOutside",HU="dismissableLayer.focusOutside";let QS;const WU=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nR=m.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...c}=e,d=m.useContext(WU),[f,h]=m.useState(null),p=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,g]=m.useState({}),v=zn(t,$=>h($)),b=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(x),w=f?b.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,C=w>=y,E=GU($=>{const T=$.target,A=[...d.branches].some(P=>P.contains(T));!C||A||(i==null||i($),l==null||l($),$.defaultPrevented||u==null||u())},p),D=KU($=>{const T=$.target;[...d.branches].some(P=>P.contains(T))||(a==null||a($),l==null||l($),$.defaultPrevented||u==null||u())},p);return UU($=>{w===d.layers.size-1&&(o==null||o($),!$.defaultPrevented&&u&&($.preventDefault(),u()))},p),m.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(QS=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ZS(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=QS)}},[f,p,r,d]),m.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ZS())},[f,d]),m.useEffect(()=>{const $=()=>g({});return document.addEventListener(yb,$),()=>document.removeEventListener(yb,$)},[]),m.createElement(gn.div,Re({},c,{ref:v,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)}))});function GU(e,t=globalThis==null?void 0:globalThis.document){const n=si(e),r=m.useRef(!1),o=m.useRef(()=>{});return m.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){rR(qU,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function KU(e,t=globalThis==null?void 0:globalThis.document){const n=si(e),r=m.useRef(!1);return m.useEffect(()=>{const o=i=>{i.target&&!r.current&&rR(HU,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ZS(){const e=new CustomEvent(yb);document.dispatchEvent(e)}function rR(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?tR(o,i):o.dispatchEvent(i)}const $y="focusScope.autoFocusOnMount",Sy="focusScope.autoFocusOnUnmount",YS={bubbles:!1,cancelable:!0},oR=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=m.useState(null),c=si(o),d=si(i),f=m.useRef(null),h=zn(t,v=>u(v)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let v=function(w){if(p.paused||!l)return;const S=w.target;l.contains(S)?f.current=S:wa(f.current,{select:!0})},b=function(w){if(p.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||wa(f.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&wa(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const y=new MutationObserver(x);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),y.disconnect()}}},[r,l,p.paused]),m.useEffect(()=>{if(l){JS.add(p);const v=document.activeElement;if(!l.contains(v)){const x=new CustomEvent($y,YS);l.addEventListener($y,c),l.dispatchEvent(x),x.defaultPrevented||(QU(eq(iR(l)),{select:!0}),document.activeElement===v&&wa(l))}return()=>{l.removeEventListener($y,c),setTimeout(()=>{const x=new CustomEvent(Sy,YS);l.addEventListener(Sy,d),l.dispatchEvent(x),x.defaultPrevented||wa(v??document.body,{select:!0}),l.removeEventListener(Sy,d),JS.remove(p)},0)}}},[l,c,d,p]);const g=m.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(b&&x){const y=v.currentTarget,[w,S]=ZU(y);w&&S?!v.shiftKey&&x===S?(v.preventDefault(),n&&wa(w,{select:!0})):v.shiftKey&&x===w&&(v.preventDefault(),n&&wa(S,{select:!0})):x===y&&v.preventDefault()}},[n,r,p.paused]);return m.createElement(gn.div,Re({tabIndex:-1},a,{ref:h,onKeyDown:g}))});function QU(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wa(r,{select:t}),document.activeElement!==n)return}function ZU(e){const t=iR(e),n=XS(t,e),r=XS(t.reverse(),e);return[n,r]}function iR(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XS(e,t){for(const n of e)if(!YU(n,{upTo:t}))return n}function YU(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XU(e){return e instanceof HTMLInputElement&&"select"in e}function wa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XU(e)&&t&&e.select()}}const JS=JU();function JU(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=eE(e,t),e.unshift(t)},remove(t){var n;e=eE(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function eE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function eq(e){return e.filter(t=>t.tagName!=="A")}const aR=m.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?mw.createPortal(m.createElement(gn.div,Re({},o,{ref:t})),r):null});function tq(e,t){return m.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Ul=e=>{const{present:t,children:n}=e,r=nq(t),o=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),i=zn(r.ref,o.ref);return typeof n=="function"||r.isPresent?m.cloneElement(o,{ref:i}):null};Ul.displayName="Presence";function nq(e){const[t,n]=m.useState(),r=m.useRef({}),o=m.useRef(e),i=m.useRef("none"),a=e?"mounted":"unmounted",[l,u]=tq(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=Cm(r.current);i.current=l==="mounted"?c:"none"},[l]),jl(()=>{const c=r.current,d=o.current;if(d!==e){const h=i.current,p=Cm(c);e?u("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),jl(()=>{if(t){const c=f=>{const p=Cm(r.current).includes(f.animationName);f.target===t&&p&&or.flushSync(()=>u("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=Cm(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:m.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Cm(e){return(e==null?void 0:e.animationName)||"none"}let Ey=0;function sR(){m.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:tE()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:tE()),Ey++,()=>{Ey===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ey--}},[])}function tE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ei=function(){return ei=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ei.apply(this,arguments)};function lR(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function rq(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oq(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function iq(e,t){return oq(t||null,function(n){return e.forEach(function(r){return rq(r,n)})})}function aq(e){return e}function sq(e,t){t===void 0&&(t=aq);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var u=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(u)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return o}function lq(e){e===void 0&&(e={});var t=sq(null);return t.options=ei({async:!0,ssr:!1},e),t}var uR=function(e){var t=e.sideCar,n=lR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,ei({},n))};uR.isSideCarExport=!0;function uq(e,t){return e.useMedium(t),uR}var cR=lq(),Cy=function(){},jw=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Cy,onWheelCapture:Cy,onTouchMoveCapture:Cy}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,g=e.inert,v=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,y=lR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=h,S=iq([n,t]),C=ei(ei({},y),o);return m.createElement(m.Fragment,null,d&&m.createElement(w,{sideCar:cR,removeScrollBar:c,shards:f,noIsolation:p,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:n}),a?m.cloneElement(m.Children.only(l),ei(ei({},C),{ref:S})):m.createElement(x,ei({},C,{className:u,ref:S}),l))});jw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};var xb=!1;if(typeof window<"u")try{var Dm=Object.defineProperty({},"passive",{get:function(){return xb=!0,!0}});window.addEventListener("test",Dm,Dm),window.removeEventListener("test",Dm,Dm)}catch{xb=!1}var lu=xb?{passive:!1}:!1,cq=function(e){return e.tagName==="TEXTAREA"},dR=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cq(e)&&n[t]==="visible")},dq=function(e){return dR(e,"overflowY")},fq=function(e){return dR(e,"overflowX")},nE=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=fR(e,n);if(r){var o=hR(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},hq=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},mq=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},fR=function(e,t){return e==="v"?dq(t):fq(t)},hR=function(e,t){return e==="v"?hq(t):mq(t)},pq=function(e,t){return e==="h"&&t==="rtl"?-1:1},gq=function(e,t,n,r,o){var i=pq(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,u=t.contains(l),c=!1,d=a>0,f=0,h=0;do{var p=hR(e,l),g=p[0],v=p[1],b=p[2],x=v-b-i*g;(g||x)&&fR(e,l)&&(f+=x,h+=g),l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(d&&(o&&f===0||!o&&a>f)||!d&&(o&&h===0||!o&&-a>h))&&(c=!0),c},jm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rE=function(e){return[e.deltaX,e.deltaY]},vq=function(e){return e&&"current"in e?e.current:e},yq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uu=[];function xq(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),o=m.useState({})[0],i=m.useRef(e);m.useEffect(function(){i.current=e},[e]);var a=m.useCallback(function(h,p){if("touches"in h&&h.touches.length===2)return!i.current.allowPinchZoom;var g=jm(h),v=n.current,b="deltaX"in h?h.deltaX:v[0]-g[0],x="deltaY"in h?h.deltaY:v[1]-g[1],y,w=h.target,S=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in h&&S==="h"&&w.type==="range")return!1;var C=nE(S,w);if(!C)return!0;if(C?y=S:(y=S==="v"?"h":"v",C=nE(S,w)),!C)return!1;if(!r.current&&"changedTouches"in h&&(b||x)&&(r.current=y),!y)return!0;var E=r.current||y;return gq(E,p,h,E==="h"?b:x,!0)},[]),l=m.useCallback(function(h){var p=h;if(!(!uu.length||uu[uu.length-1]!==o)){var g="deltaY"in p?rE(p):jm(p),v=t.current.filter(function(y){return y.name===p.type&&y.target===p.target&&yq(y.delta,g)})[0];if(v&&v.should){p.cancelable&&p.preventDefault();return}if(!v){var b=(i.current.shards||[]).map(vq).filter(Boolean).filter(function(y){return y.contains(p.target)}),x=b.length>0?a(p,b[0]):!i.current.noIsolation;x&&p.cancelable&&p.preventDefault()}}},[]),u=m.useCallback(function(h,p,g,v){var b={name:h,delta:p,target:g,should:v};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),c=m.useCallback(function(h){n.current=jm(h),r.current=void 0},[]),d=m.useCallback(function(h){u(h.type,rE(h),h.target,a(h,e.lockRef.current))},[]),f=m.useCallback(function(h){u(h.type,jm(h),h.target,a(h,e.lockRef.current))},[]);return m.useEffect(function(){return uu.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,lu),document.addEventListener("touchmove",l,lu),document.addEventListener("touchstart",c,lu),function(){uu=uu.filter(function(h){return h!==o}),document.removeEventListener("wheel",l,lu),document.removeEventListener("touchmove",l,lu),document.removeEventListener("touchstart",c,lu)}},[]),m.createElement(m.Fragment,null)}const bq=uq(cR,xq);var mR=m.forwardRef(function(e,t){return m.createElement(jw,ei({},e,{ref:t,sideCar:bq}))});mR.classNames=jw.classNames;const wq=mR;var $q=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cu=new WeakMap,Pm=new WeakMap,Rm={},Dy=0,Sq=function(e,t,n,r){var o=Array.isArray(e)?e:[e];Rm[n]||(Rm[n]=new WeakMap);var i=Rm[n],a=[],l=new Set,u=new Set(o),c=function(f){!f||l.has(f)||(l.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(l.has(h))d(h);else{var p=h.getAttribute(r),g=p!==null&&p!=="false",v=(cu.get(h)||0)+1,b=(i.get(h)||0)+1;cu.set(h,v),i.set(h,b),a.push(h),v===1&&g&&Pm.set(h,!0),b===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}})};return d(t),l.clear(),Dy++,function(){a.forEach(function(f){var h=cu.get(f)-1,p=i.get(f)-1;cu.set(f,h),i.set(f,p),h||(Pm.has(f)||f.removeAttribute(r),Pm.delete(f)),p||f.removeAttribute(n)}),Dy--,Dy||(cu=new WeakMap,cu=new WeakMap,Pm=new WeakMap,Rm={})}},pR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||$q(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Sq(r,o,n,"aria-hidden")):function(){return null}};const gR="Dialog",[vR,ofe]=ia(gR),[Eq,ql]=vR(gR),Cq=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=m.useRef(null),u=m.useRef(null),[c=!1,d]=zl({prop:r,defaultProp:o,onChange:i});return m.createElement(Eq,{scope:t,triggerRef:l,contentRef:u,contentId:Ui(),titleId:Ui(),descriptionId:Ui(),open:c,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(f=>!f),[d]),modal:a},n)},yR="DialogPortal",[Dq,jq]=vR(yR,{forceMount:void 0}),Pq=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=ql(yR,t);return m.createElement(Dq,{scope:t,forceMount:n},m.Children.map(r,a=>m.createElement(Ul,{present:n||i.open},m.createElement(aR,{asChild:!0,container:o},a))))},Vf="DialogContent",Rq=m.forwardRef((e,t)=>{const n=jq(Vf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ql(Vf,e.__scopeDialog);return m.createElement(Ul,{present:r||i.open},i.modal?m.createElement(kq,Re({},o,{ref:t})):m.createElement(Tq,Re({},o,{ref:t})))}),kq=m.forwardRef((e,t)=>{const n=ql(Vf,e.__scopeDialog),r=m.useRef(null),o=zn(t,n.contentRef,r);return m.useEffect(()=>{const i=r.current;if(i)return pR(i)},[]),m.createElement(xR,Re({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,i=>i.preventDefault())}))}),Tq=m.forwardRef((e,t)=>{const n=ql(Vf,e.__scopeDialog),r=m.useRef(!1),o=m.useRef(!1);return m.createElement(xR,Re({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var l;r.current||(l=n.triggerRef.current)===null||l===void 0||l.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,l;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=i.target;((l=n.triggerRef.current)===null||l===void 0?void 0:l.contains(u))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),xR=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=ql(Vf,n),u=m.useRef(null),c=zn(t,u);return sR(),m.createElement(m.Fragment,null,m.createElement(oR,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},m.createElement(nR,Re({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Mq(l.open)},a,{ref:c,onDismiss:()=>l.onOpenChange(!1)}))),!1)}),Iq="DialogTitle",Aq=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ql(Iq,n);return m.createElement(gn.h2,Re({id:o.titleId},r,{ref:t}))});const Nq="DialogClose",Fq=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ql(Nq,n);return m.createElement(gn.button,Re({type:"button"},r,{ref:t,onClick:Ye(e.onClick,()=>o.onOpenChange(!1))}))});function Mq(e){return e?"open":"closed"}const Pw=Cq,Rw=Pq,kw=Rq,bR=Aq,wR=Fq;var Oq=Object.defineProperty,_q=(e,t)=>{for(var n in t)Oq(e,n,{get:t[n],enumerable:!0})},kr={};_q(kr,{assign:()=>Bq,colors:()=>is,createStringInterpolator:()=>Ow,skipAnimation:()=>PR,to:()=>jR,willAdvance:()=>_w});var Tw=Eh(),_e=e=>Sh(e,Tw),Iw=Eh();_e.write=e=>Sh(e,Iw);var Rv=Eh();_e.onStart=e=>Sh(e,Rv);var Aw=Eh();_e.onFrame=e=>Sh(e,Aw);var Nw=Eh();_e.onFinish=e=>Sh(e,Nw);var Gu=[];_e.setTimeout=(e,t)=>{const n=_e.now()+t,r=()=>{const i=Gu.findIndex(a=>a.cancel==r);~i&&Gu.splice(i,1),za-=~i?1:0},o={time:n,handler:e,cancel:r};return Gu.splice($R(n),0,o),za+=1,SR(),o};var $R=e=>~(~Gu.findIndex(t=>t.time>e)||~Gu.length);_e.cancel=e=>{Rv.delete(e),Aw.delete(e),Nw.delete(e),Tw.delete(e),Iw.delete(e)};_e.sync=e=>{bb=!0,_e.batchedUpdates(e),bb=!1};_e.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,_e.onStart(n)}return r.handler=e,r.cancel=()=>{Rv.delete(n),t=null},r};var Fw=typeof window<"u"?window.requestAnimationFrame:()=>{};_e.use=e=>Fw=e;_e.now=typeof performance<"u"?()=>performance.now():Date.now;_e.batchedUpdates=e=>e();_e.catch=console.error;_e.frameLoop="always";_e.advance=()=>{_e.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):CR()};var Ba=-1,za=0,bb=!1;function Sh(e,t){bb?(t.delete(e),e(0)):(t.add(e),SR())}function SR(){Ba<0&&(Ba=0,_e.frameLoop!=="demand"&&Fw(ER))}function Lq(){Ba=-1}function ER(){~Ba&&(Fw(ER),_e.batchedUpdates(CR))}function CR(){const e=Ba;Ba=_e.now();const t=$R(Ba);if(t&&(DR(Gu.splice(0,t),n=>n.handler()),za-=t),!za){Lq();return}Rv.flush(),Tw.flush(e?Math.min(64,Ba-e):16.667),Aw.flush(),Iw.flush(),Nw.flush()}function Eh(){let e=new Set,t=e;return{add(n){za+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return za-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,za-=t.size,DR(t,r=>r(n)&&e.add(r)),za+=e.size,t=e)}}}function DR(e,t){e.forEach(n=>{try{t(n)}catch(r){_e.catch(r)}})}function wb(){}var Vq=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),le={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Pi(e,t){if(le.arr(e)){if(!le.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var ze=(e,t)=>e.forEach(t);function li(e,t,n){if(le.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var tr=e=>le.und(e)?[]:le.arr(e)?e:[e];function rf(e,t){if(e.size){const n=Array.from(e);e.clear(),ze(n,t)}}var zd=(e,...t)=>rf(e,n=>n(...t)),Mw=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ow,jR,is=null,PR=!1,_w=wb,Bq=e=>{e.to&&(jR=e.to),e.now&&(_e.now=e.now),e.colors!==void 0&&(is=e.colors),e.skipAnimation!=null&&(PR=e.skipAnimation),e.createStringInterpolator&&(Ow=e.createStringInterpolator),e.requestAnimationFrame&&_e.use(e.requestAnimationFrame),e.batchedUpdates&&(_e.batchedUpdates=e.batchedUpdates),e.willAdvance&&(_w=e.willAdvance),e.frameLoop&&(_e.frameLoop=e.frameLoop)},of=new Set,uo=[],jy=[],hg=0,kv={get idle(){return!of.size&&!uo.length},start(e){hg>e.priority?(of.add(e),_e.onStart(zq)):(RR(e),_e($b))},advance:$b,sort(e){if(hg)_e.onFrame(()=>kv.sort(e));else{const t=uo.indexOf(e);~t&&(uo.splice(t,1),kR(e))}},clear(){uo=[],of.clear()}};function zq(){of.forEach(RR),of.clear(),_e($b)}function RR(e){uo.includes(e)||kR(e)}function kR(e){uo.splice(Uq(uo,t=>t.priority>e.priority),0,e)}function $b(e){const t=jy;for(let n=0;n<uo.length;n++){const r=uo[n];hg=r.priority,r.idle||(_w(r),r.advance(e),r.idle||t.push(r))}return hg=0,jy=uo,jy.length=0,uo=t,uo.length>0}function Uq(e,t){const n=e.findIndex(t);return n<0?e.length:n}var qq=(e,t,n)=>Math.min(Math.max(n,e),t),Hq={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},To="[-+]?\\d*\\.?\\d+",mg=To+"%";function Tv(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Wq=new RegExp("rgb"+Tv(To,To,To)),Gq=new RegExp("rgba"+Tv(To,To,To,To)),Kq=new RegExp("hsl"+Tv(To,mg,mg)),Qq=new RegExp("hsla"+Tv(To,mg,mg,To)),Zq=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yq=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Xq=/^#([0-9a-fA-F]{6})$/,Jq=/^#([0-9a-fA-F]{8})$/;function eH(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Xq.exec(e))?parseInt(t[1]+"ff",16)>>>0:is&&is[e]!==void 0?is[e]:(t=Wq.exec(e))?(du(t[1])<<24|du(t[2])<<16|du(t[3])<<8|255)>>>0:(t=Gq.exec(e))?(du(t[1])<<24|du(t[2])<<16|du(t[3])<<8|aE(t[4]))>>>0:(t=Zq.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Jq.exec(e))?parseInt(t[1],16)>>>0:(t=Yq.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Kq.exec(e))?(oE(iE(t[1]),km(t[2]),km(t[3]))|255)>>>0:(t=Qq.exec(e))?(oE(iE(t[1]),km(t[2]),km(t[3]))|aE(t[4]))>>>0:null}function Py(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function oE(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=Py(o,r,e+1/3),a=Py(o,r,e),l=Py(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function du(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function iE(e){return(parseFloat(e)%360+360)%360/360}function aE(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function km(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function sE(e){let t=eH(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var Bf=(e,t,n)=>{if(le.fun(e))return e;if(le.arr(e))return Bf({range:e,output:t,extrapolate:n});if(le.str(e.output[0]))return Ow(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||(c=>c);return c=>{const d=nH(c,i);return tH(c,i[d],i[d+1],o[d],o[d+1],u,a,l,r.map)}};function tH(e,t,n,r,o,i,a,l,u){let c=u?u(e):e;if(c<t){if(a==="identity")return c;a==="clamp"&&(c=t)}if(c>n){if(l==="identity")return c;l==="clamp"&&(c=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?c=-c:n===1/0?c=c-t:c=(c-t)/(n-t),c=i(c),r===-1/0?c=-c:o===1/0?c=c+r:c=c*(o-r)+r,c)}function nH(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var rH=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return qq(0,1,o/e)},pg=1.70158,Tm=pg*1.525,lE=pg+1,uE=2*Math.PI/3,cE=2*Math.PI/4.5,Im=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,oH={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>lE*e*e*e-pg*e*e,easeOutBack:e=>1+lE*Math.pow(e-1,3)+pg*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Tm+1)*2*e-Tm)/2:(Math.pow(2*e-2,2)*((Tm+1)*(e*2-2)+Tm)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*uE),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*uE)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*cE))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*cE)/2+1,easeInBounce:e=>1-Im(1-e),easeOutBounce:Im,easeInOutBounce:e=>e<.5?(1-Im(1-2*e))/2:(1+Im(2*e-1))/2,steps:rH},zf=Symbol.for("FluidValue.get"),kc=Symbol.for("FluidValue.observers"),so=e=>!!(e&&e[zf]),vr=e=>e&&e[zf]?e[zf]():e,dE=e=>e[kc]||null;function iH(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Uf(e,t){const n=e[kc];n&&n.forEach(r=>{iH(r,t)})}var TR=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");aH(this,e)}},aH=(e,t)=>IR(e,zf,t);function Uc(e,t){if(e[zf]){let n=e[kc];n||IR(e,kc,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function qf(e,t){const n=e[kc];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[kc]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var IR=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Sp=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,sH=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,fE=new RegExp(`(${Sp.source})(%|[a-z]+)`,"i"),lH=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Iv=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,AR=e=>{const[t,n]=uH(e);if(!t||Mw())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&Iv.test(n))return AR(n);if(n)return n}return e},uH=e=>{const t=Iv.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Ry,cH=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,NR=e=>{Ry||(Ry=is?new RegExp(`(${Object.keys(is).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>vr(i).replace(Iv,AR).replace(sH,sE).replace(Ry,sE)),n=t.map(i=>i.match(Sp).map(Number)),o=n[0].map((i,a)=>n.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(i=>Bf({...e,output:i}));return i=>{var u;const a=!fE.test(t[0])&&((u=t.find(c=>fE.test(c)))==null?void 0:u.replace(Sp,""));let l=0;return t[0].replace(Sp,()=>`${o[l++](i)}${a||""}`).replace(lH,cH)}},Lw="react-spring: ",FR=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Lw}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},dH=FR(console.warn);function fH(){dH(`${Lw}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var hH=FR(console.warn);function mH(){hH(`${Lw}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Av(e){return le.str(e)&&(e[0]=="#"||/\d/.test(e)||!Mw()&&Iv.test(e)||e in(is||{}))}var Fu=Mw()?m.useEffect:m.useLayoutEffect,pH=()=>{const e=m.useRef(!1);return Fu(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function MR(){const e=m.useState()[1],t=pH();return()=>{t.current&&e(Math.random())}}function gH(e,t){const[n]=m.useState(()=>({inputs:t,result:e()})),r=m.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&vH(t,i.inputs)||(i={inputs:t,result:e()}):i=n,m.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function vH(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var OR=e=>m.useEffect(e,yH),yH=[];function xH(e){const t=m.useRef();return m.useEffect(()=>{t.current=e}),t.current}var Hf=Symbol.for("Animated:node"),bH=e=>!!e&&e[Hf]===e,Ko=e=>e&&e[Hf],Vw=(e,t)=>Vq(e,Hf,t),Nv=e=>e&&e[Hf]&&e[Hf].getPayload(),_R=class{constructor(){Vw(this,this)}getPayload(){return this.payload||[]}},Ch=class extends _R{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,le.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Ch(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return le.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,le.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Wf=class extends Ch{constructor(e){super(0),this._string=null,this._toString=Bf({output:[e,e]})}static create(e){return new Wf(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(le.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Bf({output:[this.getValue(),e]})),this._value=0,super.reset()}},gg={dependencies:null},Fv=class extends _R{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return li(this.source,(n,r)=>{bH(n)?t[r]=n.getValue(e):so(n)?t[r]=vr(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ze(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return li(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){gg.dependencies&&so(e)&&gg.dependencies.add(e);const t=Nv(e);t&&ze(t,n=>this.add(n))}},LR=class extends Fv{constructor(e){super(e)}static create(e){return new LR(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(wH)),!0)}};function wH(e){return(Av(e)?Wf:Ch).create(e)}function Sb(e){const t=Ko(e);return t?t.constructor:le.arr(e)?LR:Av(e)?Wf:Ch}var hE=(e,t)=>{const n=!le.fun(e)||e.prototype&&e.prototype.isReactComponent;return m.forwardRef((r,o)=>{const i=m.useRef(null),a=n&&m.useCallback(g=>{i.current=EH(o,g)},[o]),[l,u]=SH(r,t),c=MR(),d=()=>{const g=i.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&c()},f=new $H(d,u),h=m.useRef();Fu(()=>(h.current=f,ze(u,g=>Uc(g,f)),()=>{h.current&&(ze(h.current.deps,g=>qf(g,h.current)),_e.cancel(h.current.update))})),m.useEffect(d,[]),OR(()=>()=>{const g=h.current;ze(g.deps,v=>qf(v,g))});const p=t.getComponentProps(l.getValue());return m.createElement(e,{...p,ref:a})})},$H=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&_e.write(this.update)}};function SH(e,t){const n=new Set;return gg.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Fv(e),gg.dependencies=null,[e,n]}function EH(e,t){return e&&(le.fun(e)?e(t):e.current=t),t}var mE=Symbol.for("AnimatedComponent"),CH=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Fv(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const l=pE(a)||"Anonymous";return le.str(a)?a=i[a]||(i[a]=hE(a,o)):a=a[mE]||(a[mE]=hE(a,o)),a.displayName=`Animated(${l})`,a};return li(e,(a,l)=>{le.arr(e)&&(l=pE(a)),i[l]=i(a)}),{animated:i}},pE=e=>le.str(e)?e:e&&le.str(e.displayName)?e.displayName:le.fun(e)&&e.name||null;function yr(e,...t){return le.fun(e)?e(...t):e}var af=(e,t)=>e===!0||!!(t&&e&&(le.fun(e)?e(t):tr(e).includes(t))),VR=(e,t)=>le.obj(e)?t&&e[t]:e,BR=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,DH=e=>e,Bw=(e,t=DH)=>{let n=jH;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);le.und(i)||(r[o]=i)}return r},jH=["config","onProps","onStart","onChange","onPause","onResume","onRest"],PH={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function RH(e){const t={};let n=0;if(li(e,(r,o)=>{PH[o]||(t[o]=r,n++)}),n)return t}function zw(e){const t=RH(e);if(t){const n={to:t};return li(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function Gf(e){return e=vr(e),le.arr(e)?e.map(Gf):Av(e)?kr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function kH(e){for(const t in e)return!0;return!1}function Eb(e){return le.fun(e)||le.arr(e)&&le.obj(e[0])}function gE(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function TH(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var zR={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Cb={...zR.default,mass:1,damping:1,easing:oH.linear,clamp:!1},IH=class{constructor(){this.velocity=0,Object.assign(this,Cb)}};function AH(e,t,n){n&&(n={...n},vE(n,t),t={...n,...t}),vE(e,t),Object.assign(e,t);for(const a in Cb)e[a]==null&&(e[a]=Cb[a]);let{frequency:r,damping:o}=e;const{mass:i}=e;return le.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function vE(e,t){if(!le.und(t.decay))e.duration=void 0;else{const n=!le.und(t.tension)||!le.und(t.friction);(n||!le.und(t.frequency)||!le.und(t.damping)||!le.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var yE=[],NH=class{constructor(){this.changed=!1,this.values=yE,this.toValues=null,this.fromValues=yE,this.config=new IH,this.immediate=!1}};function UR(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,l)=>{let u,c,d=af(n.cancel??(r==null?void 0:r.cancel),t);if(d)p();else{le.und(n.pause)||(o.paused=af(n.pause,t));let g=r==null?void 0:r.pause;g!==!0&&(g=o.paused||af(g,t)),u=yr(n.delay||0,t),g?(o.resumeQueue.add(h),i.pause()):(i.resume(),h())}function f(){o.resumeQueue.add(h),o.timeouts.delete(c),c.cancel(),u=c.time-_e.now()}function h(){u>0&&!kr.skipAnimation?(o.delayed=!0,c=_e.setTimeout(p,u),o.pauseQueue.add(f),o.timeouts.add(c)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(c),e<=(o.cancelId||0)&&(d=!0);try{i.start({...n,callId:e,cancel:d},a)}catch(g){l(g)}}})}var Uw=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ku(e.get()):t.every(n=>n.noop)?qR(e.get()):Po(e.get(),t.every(n=>n.finished)),qR=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Po=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ku=e=>({value:e,cancelled:!0,finished:!1});function HR(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:l,promise:u}=n;return!i&&e===l&&!t.reset?u:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=Bw(t,(b,x)=>x==="onRest"?void 0:b);let d,f;const h=new Promise((b,x)=>(d=b,f=x)),p=b=>{const x=o<=(n.cancelId||0)&&Ku(r)||o!==n.asyncId&&Po(r,!1);if(x)throw b.result=x,f(b),b},g=(b,x)=>{const y=new xE,w=new bE;return(async()=>{if(kr.skipAnimation)throw Kf(n),w.result=Po(r,!1),f(w),w;p(y);const S=le.obj(b)?{...b}:{...x,to:b};S.parentId=o,li(c,(E,D)=>{le.und(S[D])&&(S[D]=E)});const C=await r.start(S);return p(y),n.paused&&await new Promise(E=>{n.resumeQueue.add(E)}),C})()};let v;if(kr.skipAnimation)return Kf(n),Po(r,!1);try{let b;le.arr(e)?b=(async x=>{for(const y of x)await g(y)})(e):b=Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([b.then(d),h]),v=Po(r.get(),!0,!1)}catch(b){if(b instanceof xE)v=b.result;else if(b instanceof bE)v=b.result;else throw b}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?u:void 0)}return le.fun(a)&&_e.batchedUpdates(()=>{a(v,r,r.item)}),v})()}function Kf(e,t){rf(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var xE=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},bE=class extends Error{constructor(){super("SkipAnimationSignal")}},Db=e=>e instanceof qw,FH=1,qw=class extends TR{constructor(){super(...arguments),this.id=FH++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ko(this);return e&&e.getValue()}to(...e){return kr.to(this,e)}interpolate(...e){return fH(),kr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Uf(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||kv.sort(this),Uf(this,{type:"priority",parent:this,priority:e})}},Pl=Symbol.for("SpringPhase"),WR=1,jb=2,Pb=4,ky=e=>(e[Pl]&WR)>0,ma=e=>(e[Pl]&jb)>0,fd=e=>(e[Pl]&Pb)>0,wE=(e,t)=>t?e[Pl]|=jb|WR:e[Pl]&=~jb,$E=(e,t)=>t?e[Pl]|=Pb:e[Pl]&=~Pb,MH=class extends qw{constructor(e,t){if(super(),this.animation=new NH,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!le.und(e)||!le.und(t)){const n=le.obj(e)?{...e}:{...t,from:e};le.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ma(this)||this._state.asyncTo)||fd(this)}get goal(){return vr(this.animation.to)}get velocity(){const e=Ko(this);return e instanceof Ch?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ky(this)}get isAnimating(){return ma(this)}get isPaused(){return fd(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=Nv(r.to);!a&&so(r.to)&&(o=tr(vr(r.to))),r.values.forEach((c,d)=>{if(c.done)return;const f=c.constructor==Wf?1:a?a[d].lastPosition:o[d];let h=r.immediate,p=f;if(!h){if(p=c.lastPosition,i.tension<=0){c.done=!0;return}let g=c.elapsedTime+=e;const v=r.fromValues[d],b=c.v0!=null?c.v0:c.v0=le.arr(i.velocity)?i.velocity[d]:i.velocity;let x;const y=i.precision||(v==f?.005:Math.min(1,Math.abs(f-v)*.001));if(le.und(i.duration))if(i.decay){const w=i.decay===!0?.998:i.decay,S=Math.exp(-(1-w)*g);p=v+b/(1-w)*(1-S),h=Math.abs(c.lastPosition-p)<=y,x=b*S}else{x=c.lastVelocity==null?b:c.lastVelocity;const w=i.restVelocity||y/10,S=i.clamp?0:i.bounce,C=!le.und(S),E=v==f?c.v0>0:v<f;let D,$=!1;const T=1,A=Math.ceil(e/T);for(let P=0;P<A&&(D=Math.abs(x)>w,!(!D&&(h=Math.abs(f-p)<=y,h)));++P){C&&($=p==f||p>f==E,$&&(x=-x*S,p=f));const k=-i.tension*1e-6*(p-f),N=-i.friction*.001*x,j=(k+N)/i.mass;x=x+j*T,p=p+x*T}}else{let w=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,c.durationProgress>0&&(c.elapsedTime=i.duration*c.durationProgress,g=c.elapsedTime+=e)),w=(i.progress||0)+g/this._memoizedDuration,w=w>1?1:w<0?0:w,c.durationProgress=w),p=v+i.easing(w)*(f-v),x=(p-c.lastPosition)/e,h=w==1}c.lastVelocity=x,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}a&&!a[d].done&&(h=!1),h?c.done=!0:t=!1,c.setValue(p,i.round)&&(n=!0)});const l=Ko(this),u=l.getValue();if(t){const c=vr(r.to);(u!==c||n)&&!i.decay?(l.setValue(c),this._onChange(c)):n&&i.decay&&this._onChange(u),this._stop()}else n&&this._onChange(u)}set(e){return _e.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ma(this)){const{to:e,config:t}=this.animation;_e.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return le.und(e)?(n=this.queue||[],this.queue=[]):n=[le.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Uw(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Kf(this._state,e&&this._lastCallId),_e.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=le.obj(n)?n[t]:n,(n==null||Eb(n))&&(n=void 0),r=le.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ky(this)||(e.reverse&&([n,r]=[r,n]),r=vr(r),le.und(r)?Ko(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Bw(e,(a,l)=>/^on/.test(l)?VR(a,n):a)),EE(this,e,"onProps"),md(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return UR(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{fd(this)||($E(this,!0),zd(i.pauseQueue),md(this,"onPause",Po(this,hd(this,this.animation.to)),this))},resume:()=>{fd(this)&&($E(this,!1),ma(this)&&this._resume(),zd(i.resumeQueue),md(this,"onResume",Po(this,hd(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const l=GR(e);if(l)return this._update(l,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ku(this));const r=!le.und(e.to),o=!le.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ku(this));const{key:i,defaultProps:a,animation:l}=this,{to:u,from:c}=l;let{to:d=u,from:f=c}=e;o&&!r&&(!t.default||le.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);const h=!Pi(f,c);h&&(l.from=f),f=vr(f);const p=!Pi(d,u);p&&this._focus(d);const g=Eb(t.to),{config:v}=l,{decay:b,velocity:x}=v;(r||o)&&(v.velocity=0),t.config&&!g&&AH(v,yr(t.config,i),t.config!==a.config?yr(a.config,i):void 0);let y=Ko(this);if(!y||le.und(d))return n(Po(this,!0));const w=le.und(t.reset)?o&&!t.default:!le.und(f)&&af(t.reset,i),S=w?f:this.get(),C=Gf(d),E=le.num(C)||le.arr(C)||Av(C),D=!g&&(!E||af(a.immediate||t.immediate,i));if(p){const P=Sb(d);if(P!==y.constructor)if(D)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${P.name}, as the "to" prop suggests`)}const $=y.constructor;let T=so(d),A=!1;if(!T){const P=w||!ky(this)&&h;(p||P)&&(A=Pi(Gf(S),C),T=!A),(!Pi(l.immediate,D)&&!D||!Pi(v.decay,b)||!Pi(v.velocity,x))&&(T=!0)}if(A&&ma(this)&&(l.changed&&!w?T=!0:T||this._stop(u)),!g&&((T||so(u))&&(l.values=y.getPayload(),l.toValues=so(d)?null:$==Wf?[1]:tr(C)),l.immediate!=D&&(l.immediate=D,!D&&!w&&this._set(u)),T)){const{onRest:P}=l;ze(OH,N=>EE(this,t,N));const k=Po(this,hd(this,u));zd(this._pendingCalls,k),this._pendingCalls.add(n),l.changed&&_e.batchedUpdates(()=>{var N;l.changed=!w,P==null||P(k,this),w?yr(a.onRest,k):(N=l.onStart)==null||N.call(l,k,this)})}w&&this._set(S),g?n(HR(t.to,t,this._state,this)):T?this._start():ma(this)&&!p?this._pendingCalls.add(n):n(qR(S))}_focus(e){const t=this.animation;e!==t.to&&(dE(this)&&this._detach(),t.to=e,dE(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;so(t)&&(Uc(t,this),Db(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;so(e)&&qf(e,this)}_set(e,t=!0){const n=vr(e);if(!le.und(n)){const r=Ko(this);if(!r||!Pi(n,r.getValue())){const o=Sb(n);!r||r.constructor!=o?Vw(this,o.create(n)):r.setValue(n),r&&_e.batchedUpdates(()=>{this._onChange(n,t)})}}return Ko(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,md(this,"onStart",Po(this,hd(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),yr(this.animation.onChange,e,this)),yr(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ko(this).reset(vr(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ma(this)||(wE(this,!0),fd(this)||this._resume())}_resume(){kr.skipAnimation?this.finish():kv.start(this)}_stop(e,t){if(ma(this)){wE(this,!1);const n=this.animation;ze(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Uf(this,{type:"idle",parent:this});const r=t?Ku(this.get()):Po(this.get(),hd(this,e??n.to));zd(this._pendingCalls,r),n.changed&&(n.changed=!1,md(this,"onRest",r,this))}}};function hd(e,t){const n=Gf(t),r=Gf(e.get());return Pi(r,n)}function GR(e,t=e.loop,n=e.to){const r=yr(t);if(r){const o=r!==!0&&zw(r),i=(o||e).reverse,a=!o||o.reset;return vg({...e,loop:t,default:!1,pause:void 0,to:!i||Eb(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function vg(e){const{to:t,from:n}=e=zw(e),r=new Set;return le.obj(t)&&SE(t,r),le.obj(n)&&SE(n,r),e.keys=r.size?Array.from(r):null,e}function SE(e,t){li(e,(n,r)=>n!=null&&t.add(r))}var OH=["onStart","onRest","onChange","onPause","onResume"];function EE(e,t,n){e.animation[n]=t[n]!==BR(t,n)?VR(t[n],e.key):void 0}function md(e,t,...n){var r,o,i,a;(o=(r=e.animation)[t])==null||o.call(r,...n),(a=(i=e.defaultProps)[t])==null||a.call(i,...n)}var _H=["onStart","onChange","onRest"],LH=1,VH=class{constructor(e,t){this.id=LH++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];le.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(vg(e)),this}start(e){let{queue:t}=this;return e?t=tr(e).map(vg):this.queue=[],this._flush?this._flush(this,t):(YR(this,t),BH(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;ze(tr(t),r=>n[r].stop(!!e))}else Kf(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(le.und(e))this.start({pause:!0});else{const t=this.springs;ze(tr(e),n=>t[n].pause())}return this}resume(e){if(le.und(e))this.start({pause:!1});else{const t=this.springs;ze(tr(e),n=>t[n].resume())}return this}each(e){li(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,rf(e,([l,u])=>{u.value=this.get(),l(u,this,this._item)}));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&t.size&&rf(t,([l,u])=>{u.value=a,l(u,this,this._item)}),i&&(this._started=!1,rf(n,([l,u])=>{u.value=a,l(u,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;_e.onFrame(this._onFrame)}};function BH(e,t){return Promise.all(t.map(n=>KR(e,n))).then(n=>Uw(e,n))}async function KR(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:l,onResolve:u}=t,c=le.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=le.arr(o)||le.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):ze(_H,v=>{const b=t[v];if(le.fun(b)){const x=e._events[v];t[v]=({finished:y,cancelled:w})=>{const S=x.get(b);S?(y||(S.finished=!1),w&&(S.cancelled=!0)):x.set(b,{value:null,finished:y||!1,cancelled:w||!1})},c&&(c[v]=t[v])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,zd(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const h=(r||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),p=t.cancel===!0||BR(t,"cancel")===!0;(d||p&&f.asyncId)&&h.push(UR(++e._lastAsyncId,{props:t,state:f,actions:{pause:wb,resume:wb,start(v,b){p?(Kf(f,e._lastAsyncId),b(Ku(e))):(v.onRest=l,b(HR(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});const g=Uw(e,await Promise.all(h));if(a&&g.finished&&!(n&&g.noop)){const v=GR(t,a,o);if(v)return YR(e,[v]),KR(e,v,!0)}return u&&_e.batchedUpdates(()=>u(g,e,e.item)),g}function zH(e,t){const n={...e.springs};return t&&ze(tr(t),r=>{le.und(r.keys)&&(r=vg(r)),le.obj(r.to)||(r={...r,to:void 0}),ZR(n,r,o=>QR(o))}),UH(e,n),n}function UH(e,t){li(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Uc(n,e))})}function QR(e,t){const n=new MH;return n.key=e,t&&Uc(n,t),n}function ZR(e,t,n){t.keys&&ze(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function YR(e,t){ze(t,n=>{ZR(e.springs,n,r=>QR(r,e))})}var Mv=({children:e,...t})=>{const n=m.useContext(yg),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=gH(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=yg;return m.createElement(i,{value:t},e)},yg=qH(Mv,{});Mv.Provider=yg.Provider;Mv.Consumer=yg.Consumer;function qH(e,t){return Object.assign(e,m.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var HH=()=>{const e=[],t=function(r){mH();const o=[];return ze(e,(i,a)=>{if(le.und(r))o.push(i.start());else{const l=n(r,i,a);l&&o.push(i.start(l))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return ze(e,r=>r.pause(...arguments)),this},t.resume=function(){return ze(e,r=>r.resume(...arguments)),this},t.set=function(r){ze(e,(o,i)=>{const a=le.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return ze(e,(i,a)=>{if(le.und(r))o.push(i.start());else{const l=this._getProps(r,i,a);l&&o.push(i.start(l))}}),o},t.stop=function(){return ze(e,r=>r.stop(...arguments)),this},t.update=function(r){return ze(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return le.fun(r)?r(i,o):r};return t._getProps=n,t};function Dh(e,t,n){const r=le.fun(t)&&t,{reset:o,sort:i,trail:a=0,expires:l=!0,exitBeforeEnter:u=!1,onDestroyed:c,ref:d,config:f}=r?r():t,h=m.useMemo(()=>r||arguments.length==3?HH():void 0,[]),p=tr(e),g=[],v=m.useRef(null),b=o?null:v.current;Fu(()=>{v.current=g}),OR(()=>(ze(g,j=>{h==null||h.add(j.ctrl),j.ctrl.ref=h}),()=>{ze(v.current,j=>{j.expired&&clearTimeout(j.expirationId),gE(j.ctrl,h),j.ctrl.stop(!0)})}));const x=GH(p,r?r():t,b),y=o&&v.current||[];Fu(()=>ze(y,({ctrl:j,item:F,key:I})=>{gE(j,h),yr(c,F,I)}));const w=[];if(b&&ze(b,(j,F)=>{j.expired?(clearTimeout(j.expirationId),y.push(j)):(F=w[F]=x.indexOf(j.key),~F&&(g[F]=j))}),ze(p,(j,F)=>{g[F]||(g[F]={key:x[F],item:j,phase:"mount",ctrl:new VH},g[F].ctrl.item=j)}),w.length){let j=-1;const{leave:F}=r?r():t;ze(w,(I,R)=>{const M=b[R];~I?(j=g.indexOf(M),g[j]={...M,item:p[I]}):F&&g.splice(++j,0,M)})}le.fun(i)&&g.sort((j,F)=>i(j.item,F.item));let S=-a;const C=MR(),E=Bw(t),D=new Map,$=m.useRef(new Map),T=m.useRef(!1);ze(g,(j,F)=>{const I=j.key,R=j.phase,M=r?r():t;let O,q;const H=yr(M.delay||0,I);if(R=="mount")O=M.enter,q="enter";else{const ee=x.indexOf(I)<0;if(R!="leave")if(ee)O=M.leave,q="leave";else if(O=M.update)q="update";else return;else if(!ee)O=M.enter,q="enter";else return}if(O=yr(O,j.item,F),O=le.obj(O)?zw(O):{to:O},!O.config){const ee=f||E.config;O.config=yr(ee,j.item,F,q)}S+=a;const G={...E,delay:H+S,ref:d,immediate:M.immediate,reset:!1,...O};if(q=="enter"&&le.und(G.from)){const ee=r?r():t,re=le.und(ee.initial)||b?ee.from:ee.initial;G.from=yr(re,j.item,F)}const{onResolve:ce}=G;G.onResolve=ee=>{yr(ce,ee);const re=v.current,Q=re.find(ue=>ue.key===I);if(Q&&!(ee.cancelled&&Q.phase!="update")&&Q.ctrl.idle){const ue=re.every(J=>J.ctrl.idle);if(Q.phase=="leave"){const J=yr(l,Q.item);if(J!==!1){const oe=J===!0?0:J;if(Q.expired=!0,!ue&&oe>0){oe<=2147483647&&(Q.expirationId=setTimeout(C,oe));return}}}ue&&re.some(J=>J.expired)&&($.current.delete(Q),u&&(T.current=!0),C())}};const Z=zH(j.ctrl,G);q==="leave"&&u?$.current.set(j,{phase:q,springs:Z,payload:G}):D.set(j,{phase:q,springs:Z,payload:G})});const A=m.useContext(Mv),P=xH(A),k=A!==P&&kH(A);Fu(()=>{k&&ze(g,j=>{j.ctrl.start({default:A})})},[A]),ze(D,(j,F)=>{if($.current.size){const I=g.findIndex(R=>R.key===F.key);g.splice(I,1)}}),Fu(()=>{ze($.current.size?$.current:D,({phase:j,payload:F},I)=>{const{ctrl:R}=I;I.phase=j,h==null||h.add(R),k&&j=="enter"&&R.start({default:A}),F&&(TH(R,F.ref),(R.ref||h)&&!T.current?R.update(F):(R.start(F),T.current&&(T.current=!1)))})},o?void 0:n);const N=j=>m.createElement(m.Fragment,null,g.map((F,I)=>{const{springs:R}=D.get(F)||F.ctrl,M=j({...R},F.item,F,I);return M&&M.type?m.createElement(M.type,{...M.props,key:le.str(F.key)||le.num(F.key)?F.key:F.ctrl.id,ref:M.ref}):M}));return h?[N,h]:N}var WH=1;function GH(e,{key:t,keys:n=t},r){if(n===null){const o=new Set;return e.map(i=>{const a=r&&r.find(l=>l.item===i&&l.phase!=="leave"&&!o.has(l));return a?(o.add(a),a.key):WH++})}return le.und(n)?e:le.fun(n)?e.map(n):tr(n)}var KH=class extends qw{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Bf(...t);const n=this._get(),r=Sb(n);Vw(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Pi(t,n)||(Ko(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&CE(this._active)&&Ty(this)}_get(){const e=le.arr(this.source)?this.source.map(vr):tr(vr(this.source));return this.calc(...e)}_start(){this.idle&&!CE(this._active)&&(this.idle=!1,ze(Nv(this),e=>{e.done=!1}),kr.skipAnimation?(_e.batchedUpdates(()=>this.advance()),Ty(this)):kv.start(this))}_attach(){let e=1;ze(tr(this.source),t=>{so(t)&&Uc(t,this),Db(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){ze(tr(this.source),e=>{so(e)&&qf(e,this)}),this._active.clear(),Ty(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=tr(this.source).reduce((t,n)=>Math.max(t,(Db(n)?n.priority:0)+1),0))}};function QH(e){return e.idle!==!1}function CE(e){return!e.size||Array.from(e).every(QH)}function Ty(e){e.idle||(e.idle=!0,ze(Nv(e),t=>{t.done=!0}),Uf(e,{type:"idle",parent:e}))}kr.assign({createStringInterpolator:NR,to:(e,t)=>new KH(e,t)});var XR=/^--/;function ZH(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!XR.test(e)&&!(sf.hasOwnProperty(e)&&sf[e])?t+"px":(""+t).trim()}var DE={};function YH(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:l,...u}=t,c=Object.values(u),d=Object.keys(u).map(f=>n||e.hasAttribute(f)?f:DE[f]||(DE[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase())));o!==void 0&&(e.textContent=o);for(const f in r)if(r.hasOwnProperty(f)){const h=ZH(f,r[f]);XR.test(f)?e.style.setProperty(f,h):e.style[f]=h}d.forEach((f,h)=>{e.setAttribute(f,c[h])}),i!==void 0&&(e.scrollTop=i),a!==void 0&&(e.scrollLeft=a),l!==void 0&&e.setAttribute("viewBox",l)}var sf={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},XH=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),JH=["Webkit","Ms","Moz","O"];sf=Object.keys(sf).reduce((e,t)=>(JH.forEach(n=>e[XH(n,t)]=e[t]),e),sf);var eW=/^(matrix|translate|scale|rotate|skew)/,tW=/^(translate)/,nW=/^(rotate|skew)/,Iy=(e,t)=>le.num(e)&&e!==0?e+t:e,Ep=(e,t)=>le.arr(e)?e.every(n=>Ep(n,t)):le.num(e)?e===t:parseFloat(e)===t,rW=class extends Fv{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(a=>[`translate3d(${a.map(l=>Iy(l,"px")).join(",")})`,Ep(a,0)])),li(r,(a,l)=>{if(l==="transform")o.push([a||""]),i.push(u=>[u,u===""]);else if(eW.test(l)){if(delete r[l],le.und(a))return;const u=tW.test(l)?"px":nW.test(l)?"deg":"";o.push(tr(a)),i.push(l==="rotate3d"?([c,d,f,h])=>[`rotate3d(${c},${d},${f},${Iy(h,u)})`,Ep(h,0)]:c=>[`${l}(${c.map(d=>Iy(d,u)).join(",")})`,Ep(c,l.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new oW(o,i)),super(r)}},oW=class extends TR{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ze(this.inputs,(n,r)=>{const o=vr(n[0]),[i,a]=this.transforms[r](le.arr(o)?o:n.map(vr));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&ze(this.inputs,t=>ze(t,n=>so(n)&&Uc(n,this)))}observerRemoved(e){e==0&&ze(this.inputs,t=>ze(t,n=>so(n)&&qf(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Uf(this,e)}},iW=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];kr.assign({batchedUpdates:or.unstable_batchedUpdates,createStringInterpolator:NR,colors:Hq});var aW=CH(iW,{applyAnimatedValues:YH,createAnimatedStyle:e=>new rW(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),jh=aW.animated;const Ov=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 4.72a1 1 0 0 1 .684-.948l8-2.667a1 1 0 0 1 .632 0l8 2.667a1 1 0 0 1 .684.949v8.572a8 8 0 0 1-4.115 6.993l-4.4 2.444a1 1 0 0 1-.97 0l-4.4-2.444A8 8 0 0 1 3 13.293V4.72ZM7 15a3 3 0 0 1 3-3h4a3 3 0 0 1 3 3v1.434a1 1 0 0 1-.485.857l-4 2.4a1 1 0 0 1-1.03 0l-4-2.4A1 1 0 0 1 7 16.434V15Zm5-5a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",fill:"currentColor"})]}),Qf=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11c0 .138-.003.275-.01.412A5.001 5.001 0 0 1 18 21H7A6 6 0 0 1 4.097 9.748 8 8 0 0 1 20 11Z",fill:"currentColor"})]}),JR=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 3h10a1 1 0 0 1 1 1v2H1V4a1 1 0 0 1 1-1ZM1 8h21a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V8Z",fill:"currentColor"})]}),_v=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.499 11.71a1 1 0 0 0 1.002 0l8.252-4.777a.5.5 0 0 0 0-.866L12.5 1.29a1 1 0 0 0-1.002 0L3.247 6.067a.5.5 0 0 0 0 .866L11.5 11.71ZM11 14.088a1 1 0 0 0-.514-.874L2.743 8.913A.5.5 0 0 0 2 9.35v8.062a1 1 0 0 0 .514.874l7.743 4.301A.5.5 0 0 0 11 22.15v-8.062Zm2 0a1 1 0 0 1 .514-.874l7.743-4.301A.5.5 0 0 1 22 9.35v8.062a1 1 0 0 1-.514.874l-7.743 4.301A.5.5 0 0 1 13 22.15v-8.062Z",fill:"currentColor"})]}),Ph=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-2V6a1 1 0 0 0-1-1H7V3ZM3 7h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Z",fill:"currentColor"})]}),Ss=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.412 1.09a11.108 11.108 0 0 0-2.824 0c-.332.453-.671 1.049-.992 1.798C9.108 4.026 8.703 5.42 8.423 7h7.154c-.28-1.58-.685-2.974-1.173-4.112-.32-.749-.66-1.345-.992-1.798Zm2.694.702c.656 1.436 1.173 3.212 1.5 5.208h4.195a11.04 11.04 0 0 0-5.695-5.208ZM22.586 9h-4.724c.09.966.138 1.97.138 3s-.048 2.034-.138 3h4.724c.27-.954.414-1.96.414-3s-.144-2.046-.414-3Zm-.785 8h-4.195c-.327 1.995-.844 3.772-1.5 5.208A11.041 11.041 0 0 0 21.801 17Zm-8.389 5.91a11.12 11.12 0 0 1-2.824 0c-.332-.453-.671-1.049-.992-1.798-.488-1.138-.893-2.532-1.173-4.112h7.154c-.28 1.58-.685 2.974-1.173 4.112-.32.749-.66 1.345-.992 1.798Zm-5.518-.702A11.04 11.04 0 0 1 2.199 17h4.195c.327 1.995.844 3.772 1.5 5.208ZM1.414 15h4.724C6.048 14.034 6 13.03 6 12s.048-2.034.138-3H1.414C1.144 9.954 1 10.96 1 12s.144 2.046.414 3ZM2.2 7h4.195c.327-1.996.844-3.772 1.5-5.208A11.04 11.04 0 0 0 2.199 7ZM8 12c0 1.04.052 2.044.147 3h7.706c.095-.956.147-1.96.147-3s-.052-2.044-.147-3H8.147C8.052 9.956 8 10.96 8 12Z",fill:"currentColor"})]}),sW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.173 2.707a1 1 0 0 1 1.414 0l.707.707a1 1 0 0 1 0 1.414l-.233.233 1.232 1.232a1 1 0 0 1-1.414 1.414l-1.232-1.231-1.464 1.464 1.231 1.232a1 1 0 0 1 0 1.414l-.707.707a1 1 0 0 1-1.414 0L15.06 10.06 13.623 11.5a6.5 6.5 0 1 1-2.359-1.884l6.909-6.908ZM8.5 19a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z",fill:"currentColor"})]}),ek=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 10a1 1 0 0 0 1 1h7c.552 0 1.006-.45.945-.998a9.004 9.004 0 0 0-7.947-7.947C13.45 1.995 13 2.448 13 3v7ZM2 13c0-4.633 3.5-8.449 8.002-8.945.549-.06.998.393.998.945v7a1 1 0 0 0 1 1h7c.552 0 1.006.45.945.998A9.001 9.001 0 0 1 2 13Z",fill:"currentColor"})]}),Rh=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2h7a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm11 0h7a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm7 11h-7a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-7a1 1 0 0 0-1-1ZM6 17a1 1 0 0 0 1 1h3a1 1 0 1 0 0-2H8v-2a1 1 0 1 0-2 0v3Z",fill:"currentColor"})]}),Lv=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3Zm6 4.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM3 13a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1v-7a1 1 0 0 0-1-1H3Zm6 4.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z",fill:"currentColor"})]}),lW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 7.091a1 1 0 0 1 .518-.876l9-4.95a1 1 0 0 1 .964 0l9 4.95a1 1 0 0 1 .518.876v9.818a1 1 0 0 1-.518.876l-9 4.95a1 1 0 0 1-.964 0l-9-4.95A1 1 0 0 1 2 16.909V7.09ZM12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z",fill:"currentColor"})]}),tk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.486 1.309 2.714 6.57a.5.5 0 0 0 0 .858l8.77 5.262a1 1 0 0 0 1.03 0l8.77-5.262a.5.5 0 0 0 0-.858l-8.77-5.262a1 1 0 0 0-1.03 0Zm-8.187 9.47 8.187 4.912a1 1 0 0 0 1.028 0l8.187-4.912a.858.858 0 0 1 .883 1.47l-9.07 5.442a1 1 0 0 1-1.028 0l-9.07-5.441a.858.858 0 0 1 .883-1.47Zm8.187 9.912L3.299 15.78a.858.858 0 0 0-.883 1.47l9.07 5.442a1 1 0 0 0 1.028 0l9.07-5.441a.857.857 0 0 0-.883-1.47l-8.187 4.911a1 1 0 0 1-1.028 0Z",fill:"currentColor"})]}),Vv=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M18.3 2.375A1 1 0 0 0 17.52 2H17a1 1 0 0 0-1 1v3.1H5V3a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V7.35a1 1 0 0 0-.22-.624l-3.48-4.35ZM12 18c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4Z",fill:"currentColor"})]}),kh=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 13.29a6.316 6.316 0 0 1-3-5.354V3.541a.75.75 0 0 1 .513-.712l5.25-1.75a.75.75 0 0 1 .474 0l5.25 1.75a.75.75 0 0 1 .513.712v4.395c0 2.152-1.12 4.126-3 5.348a7.33 7.33 0 0 1-.2.125l-2.43 1.38a.75.75 0 0 1-.74 0L5.2 13.41a6.375 6.375 0 0 1-.2-.12Zm0-2.887c0 .175.06.347.18.474.29.307.63.576 1.011.795l.003.002 1.435.815c.23.13.512.13.742 0l1.416-.804c.394-.242.74-.523 1.033-.835a.69.69 0 0 0 .18-.475V10a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v.402ZM10 5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",fill:"currentColor"})]}),uW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M9 7h3.978a.5.5 0 0 1 .394.807L7.895 14.85A.5.5 0 0 1 7 14.543V9H3.022a.5.5 0 0 1-.394-.807L8.105 1.15A.5.5 0 0 1 9 1.457V7Z",fill:"currentColor"})]}),cW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 3a.75.75 0 0 0-.75.75V6h14V3.75a.75.75 0 0 0-.75-.75H13V1h-2v2H5V1H3v2H1.75ZM1 7h14v7.25a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75V7Zm2 2.75A.75.75 0 0 1 3.75 9h2.5a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1-.75-.75v-2.5Z",fill:"currentColor"})]}),Hw=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.333 7v.018A3 3 0 0 1 13 13H4a4 4 0 0 1-.254-7.992A5.001 5.001 0 0 1 13.333 7Z",fill:"currentColor"})]}),dW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 0v3h2V0h2v3h1.25a.75.75 0 0 1 .75.75V5h3v2h-3v2h3v2h-3v1.25a.75.75 0 0 1-.75.75H11v3H9v-3H7v3H5v-3H3.75a.75.75 0 0 1-.75-.75V11H0V9h3V7H0V5h3V3.75A.75.75 0 0 1 3.75 3H5V0h2Zm0 9V7h2v2H7Zm3.5-4h-5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-5a.5.5 0 0 0-.5-.5Z",fill:"currentColor"})]}),nk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M11.72.224A.75.75 0 0 0 11.185 0H2.75A.75.75 0 0 0 2 .75v14.5c0 .414.336.75.75.75h10.5a.75.75 0 0 0 .75-.75V2.852a.75.75 0 0 0-.215-.525L11.72.224ZM4 8.75A.75.75 0 0 1 4.75 8h3.5a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-.75.75h-3.5A.75.75 0 0 1 4 9.25v-.5Zm6 3.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1-.75-.75v-.5a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v.5Zm1-5.91a.75.75 0 0 1-.75.75h-5.5A.75.75 0 0 1 4 6.34v-.59A.75.75 0 0 1 4.75 5h5.5a.75.75 0 0 1 .75.75v.59Z",fill:"currentColor"})]}),rk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM4.995 6.409a.75.75 0 0 1 0-1.06l.353-.354a.75.75 0 0 1 1.061 0L8 6.585l1.591-1.59a.75.75 0 0 1 1.06 0l.354.353a.75.75 0 0 1 0 1.061L9.415 8l1.59 1.591a.75.75 0 0 1 0 1.06l-.353.354a.75.75 0 0 1-1.061 0L8 9.415l-1.591 1.59a.75.75 0 0 1-1.06 0l-.354-.353a.75.75 0 0 1 0-1.061L6.585 8l-1.59-1.591Z",fill:"currentColor"})]}),Th=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 2h6.773a.75.75 0 0 1 .75.75v1.16H1V2.75A.75.75 0 0 1 1.75 2ZM1 5h13.25a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75V5Z",fill:"currentColor"})]}),Rl=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("g",{fill:"currentColor",children:s.jsx("path",{d:"M1.523 5.312A.375.375 0 0 0 1 5.657v5.808a.75.75 0 0 0 .451.688l5.024 2.184A.375.375 0 0 0 7 13.993V8.154a.75.75 0 0 0-.455-.69L1.523 5.313ZM9 13.993c0 .27.277.452.525.344l5.024-2.184a.75.75 0 0 0 .451-.688V5.657c0-.27-.275-.451-.523-.345L9.455 7.465A.75.75 0 0 0 9 8.154v5.84ZM12.891 3.816a.375.375 0 0 0 .002-.689L8.299 1.13a.75.75 0 0 0-.598 0L3.107 3.127c-.301.131-.3.56.002.689l4.596 1.97a.75.75 0 0 0 .59 0l4.596-1.97Z"})})]}),fW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm.25-11a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-.75.75h-.5A.75.75 0 0 1 7 5.25v-.5A.75.75 0 0 1 7.75 4h.5Zm0 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-3.5A.75.75 0 0 1 7.75 7h.5Z",fill:"currentColor"})]}),Bv=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 1.75A.75.75 0 0 1 6.75 1h7.5a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-.75.75H13V3.75a.75.75 0 0 0-.75-.75H6V1.75Zm-5 4A.75.75 0 0 1 1.75 5h8.5a.75.75 0 0 1 .75.75v8.5a.75.75 0 0 1-.75.75h-8.5a.75.75 0 0 1-.75-.75v-8.5Z",fill:"currentColor"})]}),fs=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 8c0-.424.008-.841.024-1.25h4.452a32.576 32.576 0 0 1-.023 3H5.797A32.353 32.353 0 0 1 5.75 8Zm-1.5 0c0-.423.008-.84.023-1.25H.097a8.06 8.06 0 0 0 .095 3h4.103C4.265 9.18 4.25 8.595 4.25 8ZM.688 11.25a8.026 8.026 0 0 0 4.54 4.257 13.39 13.39 0 0 1-.068-.22c-.34-1.135-.599-2.512-.752-4.037H.688Zm8.326 4.686a8.085 8.085 0 0 1-2.028 0 9.783 9.783 0 0 1-.389-1.08c-.298-.995-.535-2.224-.681-3.606h4.168c-.146 1.382-.383 2.611-.681 3.605-.123.41-.254.771-.389 1.081Zm1.758-.43a8.027 8.027 0 0 0 4.54-4.256h-3.72c-.153 1.525-.412 2.902-.752 4.037l-.068.22Zm5.036-5.756a8.027 8.027 0 0 0 .095-3h-4.176a34.235 34.235 0 0 1-.022 3h4.103Zm-.293-4.5A8.024 8.024 0 0 0 10.772.493l.068.22c.377 1.257.654 2.812.798 4.537h3.877ZM6.985.064a8.078 8.078 0 0 1 2.03 0c.134.31.265.67.388 1.08.334 1.113.59 2.52.73 4.106H5.867c.14-1.587.395-2.993.729-4.106.123-.41.254-.77.388-1.08Zm-1.757.43A8.024 8.024 0 0 0 .485 5.25h3.877c.144-1.725.421-3.28.798-4.537l.068-.22Z",fill:"currentColor"})]}),Ww=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m14.53.53.94.94a.75.75 0 0 1 0 1.06L15 3l.5.5a.707.707 0 0 1-1 1L14 4l-1 1 .47.47a.75.75 0 0 1 0 1.06l-.94.94a.75.75 0 0 1-1.06 0L11 7 9.392 8.608a5 5 0 1 1-2-2L13.47.53a.75.75 0 0 1 1.06 0ZM5 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",fill:"currentColor"})]}),zv=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.75c0-.414.337-.755.749-.704a6.003 6.003 0 0 1 5.205 5.205c.05.412-.29.749-.704.749h-4.5A.75.75 0 0 1 9 6.25v-4.5ZM1 9a6.001 6.001 0 0 1 5.251-5.954c.412-.05.749.29.749.704v4.5c0 .414.336.75.75.75h4.5c.414 0 .755.337.704.749A6.001 6.001 0 0 1 1 9Z",fill:"currentColor"})]}),ok=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.25 1h-4.5a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h4.5A.75.75 0 0 0 7 6.25v-4.5A.75.75 0 0 0 6.25 1Zm8 0h-4.5a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-.75-.75Zm-4.5 8h4.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1-.75-.75v-4.5A.75.75 0 0 1 9.75 9Zm-6.5 0h-.5a.75.75 0 0 0-.75.75v3.5c0 .414.336.75.75.75h3.5a.75.75 0 0 0 .75-.75v-.5a.75.75 0 0 0-.75-.75H4V9.75A.75.75 0 0 0 3.25 9Z",fill:"currentColor"})]}),ik=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 13.745a7 7 0 1 0-8-11.49 7 7 0 0 0 8 11.49Zm-7.88-2.59A3.001 3.001 0 0 1 7 9h2c1.363 0 2.514.91 2.88 2.155A4.99 4.99 0 0 1 8 13a4.99 4.99 0 0 1-3.88-1.845ZM10 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",fill:"currentColor"})]}),ak=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.806 4.182A4 4 0 0 1 11.873 7h-.968a.375.375 0 0 0-.265.64l1.83 1.83a.75.75 0 0 0 1.06 0l1.83-1.83a.375.375 0 0 0-.265-.64h-1.179A6 6 0 0 0 4.32 3.262c-.327.254-.324.733-.031 1.026l.353.353c.293.293.765.286 1.107.053a4 4 0 0 1 1.058-.512ZM2.084 9H.905a.375.375 0 0 1-.265-.64l1.83-1.83a.75.75 0 0 1 1.06 0l1.83 1.83a.375.375 0 0 1-.265.64h-.968a4 4 0 0 0 6.125 2.306c.342-.233.814-.24 1.107.053l.353.353c.293.293.296.772-.031 1.027A6 6 0 0 1 2.084 9Z",fill:"currentColor"})]}),hW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 4.75A.75.75 0 0 1 .75 4h14.5a.75.75 0 0 1 .75.75V6h-1.25a.75.75 0 0 0-.75.75v.5c0 .414.336.75.75.75H16v1.25a.75.75 0 0 1-.75.75H.75A.75.75 0 0 1 0 9.25v-4.5ZM6.25 9h-1.5A.75.75 0 0 1 4 8.25v-2.5A.75.75 0 0 1 4.75 5h1.5a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-.75.75Zm5 0h-1.5A.75.75 0 0 1 9 8.25v-2.5A.75.75 0 0 1 9.75 5h1.5a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-.75.75ZM14 11H2v1.25c0 .414.336.75.75.75h10.5a.75.75 0 0 0 .75-.75V11Z",fill:"currentColor"})]}),sk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.25 2a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-.75.75H.75A.75.75 0 0 1 0 6.25v-3.5A.75.75 0 0 1 .75 2h14.5ZM4 4.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM15.25 9a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-.75.75H.75a.75.75 0 0 1-.75-.75v-3.5A.75.75 0 0 1 .75 9h14.5ZM4 11.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",fill:"currentColor"})]}),lk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m7.705 1.127-5.9 2.528a.375.375 0 0 0 0 .69l5.9 2.528a.75.75 0 0 0 .59 0l5.9-2.528a.375.375 0 0 0 0-.69l-5.9-2.528a.75.75 0 0 0-.59 0ZM1 7.505v-.368a.75.75 0 0 1 1.045-.689l5.66 2.425a.75.75 0 0 0 .59 0l5.66-2.425a.75.75 0 0 1 1.045.69v.367a.75.75 0 0 1-.455.69l-6.25 2.678a.75.75 0 0 1-.59 0l-6.25-2.678A.75.75 0 0 1 1 7.505Zm0 3.632v.368c0 .3.179.572.455.69l6.25 2.678a.75.75 0 0 0 .59 0l6.25-2.678a.75.75 0 0 0 .455-.69v-.368a.75.75 0 0 0-1.045-.689l-5.66 2.425a.75.75 0 0 1-.59 0l-5.66-2.425a.75.75 0 0 0-1.045.69Z",fill:"currentColor"})]}),mW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.75 4h14.5a.75.75 0 0 1 .75.75v6.5a.75.75 0 0 1-.75.75H3.31a.75.75 0 0 1-.53-.22L.22 9.22A.75.75 0 0 1 0 8.69V4.75A.75.75 0 0 1 .75 4Zm2.5 4h-1.5A.75.75 0 0 1 1 7.25v-1.5A.75.75 0 0 1 1.75 5h1.5a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-.75.75Zm4.5 3h1.5a.75.75 0 0 0 .75-.75v-4.5A.75.75 0 0 0 9.25 5h-1.5a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75Zm4 0h1.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-.75-.75h-1.5a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75Z",fill:"currentColor"})]}),Gw=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.625 1a.75.75 0 0 1 .6.3l2.625 3.5a.75.75 0 0 1 .15.45v9a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75V1.75A.75.75 0 0 1 1.75 1h.5a.75.75 0 0 1 .75.75V5h7V1.75a.75.75 0 0 1 .75-.75h.875ZM8 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",fill:"currentColor"})]}),pW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM7 3.75A.75.75 0 0 1 7.75 3h.5a.75.75 0 0 1 .75.75V7h2.25a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-.75.75h-3.5A.75.75 0 0 1 7 8.25v-4.5Z",fill:"currentColor"})]}),uk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm.083-9.5c.368 0 .667.299.667.667V5.25h2.083c.368 0 .667.299.667.667v.166a.667.667 0 0 1-.667.667H6.75v2.083a.667.667 0 0 1-.667.667h-.166a.667.667 0 0 1-.667-.667V6.75H3.167a.667.667 0 0 1-.667-.667v-.166c0-.368.299-.667.667-.667H5.25V3.167c0-.368.299-.667.667-.667h.166Z",fill:"currentColor"})]}),gW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.492 2.651c.28.242.31.665.067.944L5.447 9.463a.667.667 0 0 1-.974.035L1.475 6.516a.667.667 0 0 1 0-.946l.237-.235a.667.667 0 0 1 .94 0l2.24 2.226L9.3 2.501a.667.667 0 0 1 .938-.068l.253.218Z",fill:"currentColor"})]}),Uv=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M10.301 2.76a.667.667 0 0 0 0-.944l-.117-.117a.667.667 0 0 0-.943 0L6 4.939 2.76 1.7a.667.667 0 0 0-.944 0l-.117.117a.667.667 0 0 0 0 .943L4.939 6 1.7 9.24a.667.667 0 0 0 0 .944l.117.117c.26.26.683.26.943 0L6 7.061l3.24 3.24c.261.26.683.26.944 0l.117-.117a.667.667 0 0 0 0-.943L7.061 6l3.24-3.24Z",fill:"currentColor"})]}),Kw=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M8.807 6.597a.667.667 0 0 0 0-1.194l-5.842-2.92A.667.667 0 0 0 2 3.079v5.842c0 .496.522.818.965.596l5.842-2.92Z",fill:"currentColor"})]}),vW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M5.403 8.807a.667.667 0 0 0 1.194 0l2.92-5.842A.667.667 0 0 0 8.921 2H3.079a.667.667 0 0 0-.596.965l2.92 5.842Z",fill:"currentColor"})]}),ck=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M3.193 5.403a.667.667 0 0 0 0 1.194l5.842 2.92c.443.222.965-.1.965-.596V3.079a.667.667 0 0 0-.965-.596l-5.842 2.92Z",fill:"currentColor"})]}),yW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 2.5v-1H4V.67C4 .3 4.3 0 4.67 0h5.66c.37 0 .67.3.67.67v7.66c0 .37-.3.67-.67.67H9.5V2.5Zm-7 8v-6h4v6h-4ZM1 3.67c0-.37.3-.67.67-.67h5.66c.37 0 .67.3.67.67v7.66c0 .37-.3.67-.67.67H1.67a.67.67 0 0 1-.67-.67V3.67Z",fill:"currentColor"})]}),xW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12ZM3.167 6.75a.667.667 0 0 1-.667-.667v-.166c0-.368.299-.667.667-.667h5.666c.368 0 .667.299.667.667v.166a.667.667 0 0 1-.667.667H3.167Z",fill:"currentColor"})]}),hs=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm.083-9c.368 0 .667.299.667.667v2.666A.667.667 0 0 1 6.083 7h-.166a.667.667 0 0 1-.667-.667V3.667c0-.368.299-.667.667-.667h.166Zm0 5c.368 0 .667.299.667.667v.166a.667.667 0 0 1-.667.667h-.166a.667.667 0 0 1-.667-.667v-.166c0-.368.299-.667.667-.667h.166Z",fill:"currentColor"})]}),dk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 1.667C5 1.299 5.299 1 5.667 1h.666c.368 0 .667.299.667.667v.666A.667.667 0 0 1 6.333 3h-.666A.667.667 0 0 1 5 2.333v-.666Zm0 4C5 5.299 5.299 5 5.667 5h.666c.368 0 .667.299.667.667v.666A.667.667 0 0 1 6.333 7h-.666A.667.667 0 0 1 5 6.333v-.666Zm2 4A.667.667 0 0 0 6.333 9h-.666A.667.667 0 0 0 5 9.667v.666c0 .368.299.667.667.667h.666A.667.667 0 0 0 7 10.333v-.666Z",fill:"currentColor"})]}),fk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M3.47 1.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L6.94 6 3.47 2.53a.75.75 0 0 1 0-1.06Z",fill:"currentColor"})]}),hk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{d:"M8.53 1.47a.75.75 0 0 0-1.06 0l-4 4a.75.75 0 0 0 0 1.06l4 4a.75.75 0 0 0 1.06-1.06L5.06 6l3.47-3.47a.75.75 0 0 0 0-1.06Z",fill:"currentColor"})]}),Ih=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.667 1H5.02l.99.99.51.51H2.5v7h7V5.48l.51.51.99.99v3.353a.667.667 0 0 1-.667.667H1.667A.667.667 0 0 1 1 10.333V1.667C1 1.299 1.299 1 1.667 1ZM9.5 3.5l-1-1-.1-.1-.261-.261L7 1h3.333c.368 0 .667.299.667.667V5L9.862 3.862 9.6 3.6l-.1-.1Z",fill:"currentColor"})]}),Vo=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm3.111-7.003a.667.667 0 0 0-.05-.941l-.123-.112a.667.667 0 0 0-.942.05L5.36 6.924 4 5.632a.667.667 0 0 0-.943.023l-.114.12a.667.667 0 0 0 .023.943l1.979 1.885c.272.26.704.242.955-.037l3.211-3.567Z",fill:"currentColor"})]}),bW=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12ZM4.472 8.528a.667.667 0 0 1-.944 0l-.056-.056a.667.667 0 0 1 0-.944l4.056-4.056c.26-.26.683-.26.944 0l.056.056c.26.26.26.683 0 .944L4.472 8.528Z",fill:"currentColor"})]}),Qw=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m6.597 1.193 4.92 9.842a.667.667 0 0 1-.596.965H1.079a.667.667 0 0 1-.596-.965l4.92-9.842a.667.667 0 0 1 1.194 0ZM6.083 4c.368 0 .667.299.667.667v2.666A.667.667 0 0 1 6.083 8h-.166a.667.667 0 0 1-.667-.667V4.667c0-.368.299-.667.667-.667h.166Zm0 5c.368 0 .667.299.667.667v.166a.667.667 0 0 1-.667.667h-.166a.667.667 0 0 1-.667-.667v-.166c0-.368.299-.667.667-.667h.166Z",fill:"currentColor"})]}),mk=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12ZM4.982 3.96c-.063.095-.11.198-.145.3-.09.261-.31.49-.587.49h-.5c-.276 0-.502-.225-.455-.497a2.97 2.97 0 0 1 .434-1.118C4.151 2.495 4.885 2 6 2c1.04 0 1.77.355 2.223.902.427.517.527 1.108.527 1.466 0 .598-.182 1.064-.522 1.417-.268.278-.61.45-.826.558l-.062.031c-.253.13-.37.206-.447.3a.518.518 0 0 0-.094.18c-.066.211-.228.396-.449.396h-.43c-.37 0-.683-.304-.6-.665.076-.334.214-.619.412-.861.298-.365.681-.56.928-.686.292-.149.407-.21.487-.293.035-.036.103-.112.103-.377 0-.12-.04-.337-.184-.51C6.95 3.715 6.678 3.5 6 3.5c-.604 0-.87.236-1.018.46Zm.143 4.96c0-.37.3-.67.67-.67h.41c.37 0 .67.3.67.67v.41c0 .37-.3.67-.67.67h-.41a.67.67 0 0 1-.67-.67v-.41Z",fill:"currentColor"})]}),Zw=({title:e,titleId:t,...n})=>s.jsxs("svg",{width:6,height:14,viewBox:"0 0 6 14",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":t,...n,children:[e?s.jsx("title",{id:t,children:e}):null,s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.322.536a.375.375 0 0 0-.644 0L.341 4.432C.19 4.682.37 5 .662 5h4.676a.375.375 0 0 0 .321-.568L3.322.536Zm-.644 12.928a.375.375 0 0 0 .644 0l2.337-3.896A.375.375 0 0 0 5.338 9H.662a.375.375 0 0 0-.321.568l2.337 3.896Z",fill:"currentColor"})]});var pk={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var l=arguments[a];l&&(i=o(i,r(l)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var l in i)t.call(i,l)&&i[l]&&(a=o(a,l));return a}function o(i,a){return a?i?i+" "+a:i+a:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(pk);var wW=pk.exports;const ne=pi(wW),Jt=e=>t=>{const n=m.forwardRef(({className:r,children:o,...i},a)=>U.createElement(e,{className:ne(t[0],r),...i,ref:a},o));return n.displayName=`classed.${e}`,n},St={button:Jt("button"),div:Jt("div"),footer:Jt("footer"),h1:Jt("h1"),h2:Jt("h2"),h3:Jt("h3"),h4:Jt("h4"),hr:Jt("hr"),header:Jt("header"),input:Jt("input"),label:Jt("label"),li:Jt("li"),main:Jt("main"),ol:Jt("ol"),p:Jt("p"),span:Jt("span"),table:Jt("table"),tbody:Jt("tbody"),td:Jt("td"),th:Jt("th"),tr:Jt("tr")},Hl=({className:e,size:t="base",variant:n="primary"})=>{const r=t==="lg"?36:12,o=t==="lg"?18:6,i=t==="lg"?16:5,a=t==="lg"?3:2;return s.jsxs("svg",{width:r,height:r,viewBox:`0 0 ${r+" "+r}`,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Spinner",className:ne("spinner",`spinner-${n}`,`spinner-${t}`,e),children:[s.jsx("circle",{fill:"none",className:"bg",strokeWidth:a,strokeLinecap:"round",cx:o,cy:o,r:i,strokeOpacity:.2}),s.jsx("circle",{className:"path",fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",cx:o,cy:o,r:i})]})},Yw=({isLoading:e,children:t=null,minTime:n=500})=>{const[r,o]=m.useState(e),i=m.useRef(null),a=m.useRef(0);return m.useEffect(()=>{if(e)o(!0),a.current=Date.now();else{i.current&&clearTimeout(i.current);const l=Date.now()-a.current,u=Math.max(0,n-l);u===0?o(!1):i.current=setTimeout(()=>o(!1),u)}return()=>{i.current&&clearTimeout(i.current)}},[e,n]),r?s.jsx(Hl,{}):s.jsx(s.Fragment,{children:t})};function gk(e){return vk(e)?(e.nodeName||"").toLowerCase():"#document"}function qc(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $W(e){var t;return(t=(vk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vk(e){return e instanceof Node||e instanceof qc(e).Node}function Jn(e){return e instanceof Element||e instanceof qc(e).Element}function Xw(e){return e instanceof HTMLElement||e instanceof qc(e).HTMLElement}function Rb(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qc(e).ShadowRoot}function jE(e){return["html","body","#document"].includes(gk(e))}function SW(e){return qc(e).getComputedStyle(e)}function EW(e){if(gk(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rb(e)&&e.host||$W(e);return Rb(t)?t.host:t}function kb(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Tc(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Rb(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yk(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Jw(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function CW(e){return jW()?!1:!PE()&&e.width===0&&e.height===0||PE()&&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 xk(){return/apple/i.test(navigator.vendor)}function PE(){const e=/android/i;return e.test(yk())||e.test(Jw())}function DW(){return yk().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function jW(){return Jw().includes("jsdom/")}function Tb(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function PW(e){return"nativeEvent"in e}function RW(e){return e.matches("html,body")}function Ua(e){return(e==null?void 0:e.ownerDocument)||document}function Ay(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 bu(e){return"composedPath"in e?e.composedPath()[0]:e.target}const kW="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function TW(e){return Xw(e)&&e.matches(kW)}const bk=["top","right","bottom","left"],RE=["start","end"],kE=bk.reduce((e,t)=>e.concat(t,t+"-"+RE[0],t+"-"+RE[1]),[]),Zf=Math.min,As=Math.max,IW={left:"right",right:"left",bottom:"top",top:"bottom"},AW={start:"end",end:"start"};function Ib(e,t,n){return As(e,Zf(t,n))}function ui(e,t){return typeof e=="function"?e(t):e}function Bo(e){return e.split("-")[0]}function Mo(e){return e.split("-")[1]}function e2(e){return e==="x"?"y":"x"}function t2(e){return e==="y"?"height":"width"}function Hc(e){return["top","bottom"].includes(Bo(e))?"y":"x"}function n2(e){return e2(Hc(e))}function wk(e,t,n){n===void 0&&(n=!1);const r=Mo(e),o=n2(e),i=t2(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bg(a)),[a,bg(a)]}function NW(e){const t=bg(e);return[xg(e),t,xg(t)]}function xg(e){return e.replace(/start|end/g,t=>AW[t])}function FW(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function MW(e,t,n,r){const o=Mo(e);let i=FW(Bo(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(xg)))),i}function bg(e){return e.replace(/left|right|bottom|top/g,t=>IW[t])}function OW(e){return{top:0,right:0,bottom:0,left:0,...e}}function $k(e){return typeof e!="number"?OW(e):{top:e,right:e,bottom:e,left:e}}function wg(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function TE(e,t,n){let{reference:r,floating:o}=e;const i=Hc(t),a=n2(t),l=t2(a),u=Bo(t),c=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(u){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Mo(t)){case"start":p[a]-=h*(n&&c?-1:1);break;case"end":p[a]+=h*(n&&c?-1:1);break}return p}const _W=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=TE(c,r,u),h=r,p={},g=0;for(let v=0;v<l.length;v++){const{name:b,fn:x}=l[v],{x:y,y:w,data:S,reset:C}=await x({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});d=y??d,f=w??f,p={...p,[b]:{...p[b],...S}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:f}=TE(c,h,u)),v=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:p}};async function qi(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=ui(t,e),g=$k(p),b=l[h?f==="floating"?"reference":"floating":f],x=wg(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:u})),y=f==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=wg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:u}):y);return{top:(x.top-C.top+g.top)/S.y,bottom:(C.bottom-x.bottom+g.bottom)/S.y,left:(x.left-C.left+g.left)/S.x,right:(C.right-x.right+g.right)/S.x}}const LW=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:c,padding:d=0}=ui(e,t)||{};if(c==null)return{};const f=$k(d),h={x:n,y:r},p=n2(o),g=t2(p),v=await a.getDimensions(c),b=p==="y",x=b?"top":"left",y=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[p]-h[p]-i.floating[g],C=h[p]-i.reference[p],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let D=E?E[w]:0;(!D||!await(a.isElement==null?void 0:a.isElement(E)))&&(D=l.floating[w]||i.floating[g]);const $=S/2-C/2,T=D/2-v[g]/2-1,A=Zf(f[x],T),P=Zf(f[y],T),k=A,N=D-v[g]-P,j=D/2-v[g]/2+$,F=Ib(k,j,N),I=!u.arrow&&Mo(o)!=null&&j!==F&&i.reference[g]/2-(j<k?A:P)-v[g]/2<0,R=I?j<k?j-k:j-N:0;return{[p]:h[p]+R,data:{[p]:F,centerOffset:j-F-R,...I&&{alignmentOffset:R}},reset:I}}});function VW(e,t,n){return(e?[...n.filter(o=>Mo(o)===e),...n.filter(o=>Mo(o)!==e)]:n.filter(o=>Bo(o)===o)).filter(o=>e?Mo(o)===e||(t?xg(o)!==o:!1):!0)}const BW=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:l,platform:u,elements:c}=t,{crossAxis:d=!1,alignment:f,allowedPlacements:h=kE,autoAlignment:p=!0,...g}=ui(e,t),v=f!==void 0||h===kE?VW(f||null,p,h):h,b=await qi(t,g),x=((n=a.autoPlacement)==null?void 0:n.index)||0,y=v[x];if(y==null)return{};const w=wk(y,i,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==y)return{reset:{placement:v[0]}};const S=[b[Bo(y)],b[w[0]],b[w[1]]],C=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:S}],E=v[x+1];if(E)return{data:{index:x+1,overflows:C},reset:{placement:E}};const D=C.map(A=>{const P=Mo(A.placement);return[A.placement,P&&d?A.overflows.slice(0,2).reduce((k,N)=>k+N,0):A.overflows[0],A.overflows]}).sort((A,P)=>A[1]-P[1]),T=((o=D.filter(A=>A[2].slice(0,Mo(A[0])?2:3).every(P=>P<=0))[0])==null?void 0:o[0])||D[0][0];return T!==l?{data:{index:x+1,overflows:C},reset:{placement:T}}:{}}}},zW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=ui(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Bo(o),y=Bo(l)===l,w=await(u.isRTL==null?void 0:u.isRTL(c.floating)),S=h||(y||!v?[bg(l)]:NW(l));!h&&g!=="none"&&S.push(...MW(l,v,g,w));const C=[l,...S],E=await qi(t,b),D=[];let $=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&D.push(E[x]),f){const k=wk(o,a,w);D.push(E[k[0]],E[k[1]])}if($=[...$,{placement:o,overflows:D}],!D.every(k=>k<=0)){var T,A;const k=(((T=i.flip)==null?void 0:T.index)||0)+1,N=C[k];if(N)return{data:{index:k,overflows:$},reset:{placement:N}};let j=(A=$.filter(F=>F.overflows[0]<=0).sort((F,I)=>F.overflows[1]-I.overflows[1])[0])==null?void 0:A.placement;if(!j)switch(p){case"bestFit":{var P;const F=(P=$.map(I=>[I.placement,I.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((I,R)=>I[1]-R[1])[0])==null?void 0:P[0];F&&(j=F);break}case"initialPlacement":j=l;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function IE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AE(e){return bk.some(t=>e[t]>=0)}const UW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ui(e,t);switch(r){case"referenceHidden":{const i=await qi(t,{...o,elementContext:"reference"}),a=IE(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:AE(a)}}}case"escaped":{const i=await qi(t,{...o,altBoundary:!0}),a=IE(i,n.floating);return{data:{escapedOffsets:a,escaped:AE(a)}}}default:return{}}}}};async function qW(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Bo(n),l=Mo(n),u=Hc(n)==="y",c=["left","top"].includes(a)?-1:1,d=i&&u?-1:1,f=ui(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),u?{x:p*d,y:h*c}:{x:h*c,y:p*d}}const qv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,u=await qW(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},HW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x,y}=b;return{x,y}}},...u}=ui(e,t),c={x:n,y:r},d=await qi(t,u),f=Hc(Bo(o)),h=e2(f);let p=c[h],g=c[f];if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=p+d[b],w=p-d[x];p=Ib(y,p,w)}if(a){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+d[b],w=g-d[x];g=Ib(y,g,w)}const v=l.fn({...t,[h]:p,[f]:g});return{...v,data:{x:v.x-n,y:v.y-r}}}}},WW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=ui(e,t),d={x:n,y:r},f=Hc(o),h=e2(f);let p=d[h],g=d[f];const v=ui(l,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const w=h==="y"?"height":"width",S=i.reference[h]-i.floating[w]+b.mainAxis,C=i.reference[h]+i.reference[w]-b.mainAxis;p<S?p=S:p>C&&(p=C)}if(c){var x,y;const w=h==="y"?"width":"height",S=["top","left"].includes(Bo(o)),C=i.reference[f]-i.floating[w]+(S&&((x=a.offset)==null?void 0:x[f])||0)+(S?0:b.crossAxis),E=i.reference[f]+i.reference[w]+(S?0:((y=a.offset)==null?void 0:y[f])||0)-(S?b.crossAxis:0);g<C?g=C:g>E&&(g=E)}return{[h]:p,[f]:g}}}},GW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...l}=ui(e,t),u=await qi(t,l),c=Bo(n),d=Mo(n),f=Hc(n)==="y",{width:h,height:p}=r.floating;let g,v;c==="top"||c==="bottom"?(g=c,v=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=c,g=d==="end"?"top":"bottom");const b=p-u[g],x=h-u[v],y=!t.middlewareData.shift;let w=b,S=x;if(f){const E=h-u.left-u.right;S=d||y?Zf(x,E):E}else{const E=p-u.top-u.bottom;w=d||y?Zf(b,E):E}if(y&&!d){const E=As(u.left,0),D=As(u.right,0),$=As(u.top,0),T=As(u.bottom,0);f?S=h-2*(E!==0||D!==0?E+D:As(u.left,u.right)):w=p-2*($!==0||T!==0?$+T:As(u.top,u.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return h!==C.width||p!==C.height?{reset:{rects:!0}}:{}}}},Ab=Math.min,Qu=Math.max,$g=Math.round,Am=Math.floor,ms=e=>({x:e,y:e});function ps(e){return Sk(e)?(e.nodeName||"").toLowerCase():"#document"}function Ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function aa(e){var t;return(t=(Sk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sk(e){return e instanceof Node||e instanceof Ur(e).Node}function Xi(e){return e instanceof Element||e instanceof Ur(e).Element}function ci(e){return e instanceof HTMLElement||e instanceof Ur(e).HTMLElement}function NE(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ur(e).ShadowRoot}function Ah(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=yo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function KW(e){return["table","td","th"].includes(ps(e))}function r2(e){const t=o2(),n=yo(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function QW(e){let t=Ic(e);for(;ci(t)&&!Hv(t);){if(r2(t))return t;t=Ic(t)}return null}function o2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hv(e){return["html","body","#document"].includes(ps(e))}function yo(e){return Ur(e).getComputedStyle(e)}function Wv(e){return Xi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ic(e){if(ps(e)==="html")return e;const t=e.assignedSlot||e.parentNode||NE(e)&&e.host||aa(e);return NE(t)?t.host:t}function Ek(e){const t=Ic(e);return Hv(t)?e.ownerDocument?e.ownerDocument.body:e.body:ci(t)&&Ah(t)?t:Ek(t)}function as(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ek(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ur(o);return i?t.concat(a,a.visualViewport||[],Ah(o)?o:[],a.frameElement&&n?as(a.frameElement):[]):t.concat(o,as(o,[],n))}function Ck(e){const t=yo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ci(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=$g(n)!==i||$g(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function i2(e){return Xi(e)?e:e.contextElement}function Zu(e){const t=i2(e);if(!ci(t))return ms(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ck(t);let a=(i?$g(n.width):n.width)/r,l=(i?$g(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const ZW=ms(0);function Dk(e){const t=Ur(e);return!o2()||!t.visualViewport?ZW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function YW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ur(e)?!1:t}function kl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=i2(e);let a=ms(1);t&&(r?Xi(r)&&(a=Zu(r)):a=Zu(e));const l=YW(i,n,r)?Dk(i):ms(0);let u=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const h=Ur(i),p=r&&Xi(r)?Ur(r):r;let g=h,v=g.frameElement;for(;v&&r&&p!==g;){const b=Zu(v),x=v.getBoundingClientRect(),y=yo(v),w=x.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,S=x.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;u*=b.x,c*=b.y,d*=b.x,f*=b.y,u+=w,c+=S,g=Ur(v),v=g.frameElement}}return wg({width:d,height:f,x:u,y:c})}const XW=[":popover-open",":modal"];function jk(e){return XW.some(t=>{try{return e.matches(t)}catch{return!1}})}function JW(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=aa(r),l=t?jk(t.floating):!1;if(r===a||l&&i)return n;let u={scrollLeft:0,scrollTop:0},c=ms(1);const d=ms(0),f=ci(r);if((f||!f&&!i)&&((ps(r)!=="body"||Ah(a))&&(u=Wv(r)),ci(r))){const h=kl(r);c=Zu(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x,y:n.y*c.y-u.scrollTop*c.y+d.y}}function eG(e){return Array.from(e.getClientRects())}function Pk(e){return kl(aa(e)).left+Wv(e).scrollLeft}function tG(e){const t=aa(e),n=Wv(e),r=e.ownerDocument.body,o=Qu(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qu(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Pk(e);const l=-n.scrollTop;return yo(r).direction==="rtl"&&(a+=Qu(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function nG(e,t){const n=Ur(e),r=aa(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const c=o2();(!c||c&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}function rG(e,t){const n=kl(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ci(e)?Zu(e):ms(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:a,height:l,x:u,y:c}}function FE(e,t,n){let r;if(t==="viewport")r=nG(e,n);else if(t==="document")r=tG(aa(e));else if(Xi(t))r=rG(t,n);else{const o=Dk(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return wg(r)}function Rk(e,t){const n=Ic(e);return n===t||!Xi(n)||Hv(n)?!1:yo(n).position==="fixed"||Rk(n,t)}function oG(e,t){const n=t.get(e);if(n)return n;let r=as(e,[],!1).filter(l=>Xi(l)&&ps(l)!=="body"),o=null;const i=yo(e).position==="fixed";let a=i?Ic(e):e;for(;Xi(a)&&!Hv(a);){const l=yo(a),u=r2(a);!u&&l.position==="fixed"&&(o=null),(i?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ah(a)&&!u&&Rk(e,a))?r=r.filter(d=>d!==a):o=l,a=Ic(a)}return t.set(e,r),r}function iG(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?oG(t,this._c):[].concat(n),r],l=a[0],u=a.reduce((c,d)=>{const f=FE(t,d,o);return c.top=Qu(f.top,c.top),c.right=Ab(f.right,c.right),c.bottom=Ab(f.bottom,c.bottom),c.left=Qu(f.left,c.left),c},FE(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function aG(e){const{width:t,height:n}=Ck(e);return{width:t,height:n}}function sG(e,t,n){const r=ci(t),o=aa(t),i=n==="fixed",a=kl(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const u=ms(0);if(r||!r&&!i)if((ps(t)!=="body"||Ah(o))&&(l=Wv(t)),r){const f=kl(t,!0,i,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else o&&(u.x=Pk(o));const c=a.left+l.scrollLeft-u.x,d=a.top+l.scrollTop-u.y;return{x:c,y:d,width:a.width,height:a.height}}function ME(e,t){return!ci(e)||yo(e).position==="fixed"?null:t?t(e):e.offsetParent}function kk(e,t){const n=Ur(e);if(!ci(e)||jk(e))return n;let r=ME(e,t);for(;r&&KW(r)&&yo(r).position==="static";)r=ME(r,t);return r&&(ps(r)==="html"||ps(r)==="body"&&yo(r).position==="static"&&!r2(r))?n:r||QW(e)||n}const lG=async function(e){const t=this.getOffsetParent||kk,n=this.getDimensions;return{reference:sG(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function uG(e){return yo(e).direction==="rtl"}const Tk={convertOffsetParentRelativeRectToViewportRelativeRect:JW,getDocumentElement:aa,getClippingRect:iG,getOffsetParent:kk,getElementRects:lG,getClientRects:eG,getDimensions:aG,getScale:Zu,isElement:Xi,isRTL:uG};function cG(e,t){let n=null,r;const o=aa(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),i();const{left:c,top:d,width:f,height:h}=e.getBoundingClientRect();if(l||t(),!f||!h)return;const p=Am(d),g=Am(o.clientWidth-(c+f)),v=Am(o.clientHeight-(d+h)),b=Am(c),y={rootMargin:-p+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Qu(0,Ab(1,u))||1};let w=!0;function S(C){const E=C[0].intersectionRatio;if(E!==u){if(!w)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return a(!0),i}function a2(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=i2(e),d=o||i?[...c?as(c):[],...as(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=c&&l?cG(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(x=>{let[y]=x;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),c&&!u&&p.observe(c),p.observe(t));let g,v=u?kl(e):null;u&&b();function b(){const x=kl(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&n(),v=x,g=requestAnimationFrame(b)}return n(),()=>{var x;d.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f==null||f(),(x=p)==null||x.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const dG=BW,Ik=HW,s2=zW,Ak=GW,fG=UW,OE=LW,hG=WW,mG=(e,t,n)=>{const r=new Map,o={platform:Tk,...n},i={...o.platform,_c:r};return _W(e,t,{...o,platform:i})},Nk=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?OE({element:r.current,padding:o}).fn(n):{}:r?OE({element:r,padding:o}).fn(n):{}}}};var Cp=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Sg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Sg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Sg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Fk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _E(e,t){const n=Fk(e);return Math.round(t*n)/n}function LE(e){const t=m.useRef(e);return Cp(()=>{t.current=e}),t}function Mk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=m.useState(r);Sg(h,r)||p(r);const[g,v]=m.useState(null),[b,x]=m.useState(null),y=m.useCallback(R=>{R!==E.current&&(E.current=R,v(R))},[]),w=m.useCallback(R=>{R!==D.current&&(D.current=R,x(R))},[]),S=i||g,C=a||b,E=m.useRef(null),D=m.useRef(null),$=m.useRef(d),T=u!=null,A=LE(u),P=LE(o),k=m.useCallback(()=>{if(!E.current||!D.current)return;const R={placement:t,strategy:n,middleware:h};P.current&&(R.platform=P.current),mG(E.current,D.current,R).then(M=>{const O={...M,isPositioned:!0};N.current&&!Sg($.current,O)&&($.current=O,or.flushSync(()=>{f(O)}))})},[h,t,n,P]);Cp(()=>{c===!1&&$.current.isPositioned&&($.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[c]);const N=m.useRef(!1);Cp(()=>(N.current=!0,()=>{N.current=!1}),[]),Cp(()=>{if(S&&(E.current=S),C&&(D.current=C),S&&C){if(A.current)return A.current(S,C,k);k()}},[S,C,k,A,T]);const j=m.useMemo(()=>({reference:E,floating:D,setReference:y,setFloating:w}),[y,w]),F=m.useMemo(()=>({reference:S,floating:C}),[S,C]),I=m.useMemo(()=>{const R={position:n,left:0,top:0};if(!F.floating)return R;const M=_E(F.floating,d.x),O=_E(F.floating,d.y);return l?{...R,transform:"translate("+M+"px, "+O+"px)",...Fk(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:O}},[n,l,F.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:k,refs:j,elements:F,floatingStyles:I}),[d,k,j,F,I])}/*!
* tabbable 6.1.1
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var pG=["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])"],Nb=pG.join(","),Ok=typeof Element>"u",Yf=Ok?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Eg=!Ok&&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},Cg=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},gG=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},vG=function(t,n,r){if(Cg(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Nb));return n&&Yf.call(t,Nb)&&o.unshift(t),o=o.filter(r),o},yG=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Cg(a,!1))if(a.tagName==="SLOT"){var l=a.assignedElements(),u=l.length?l:a.children,c=e(u,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var d=Yf.call(a,Nb);d&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),h=!Cg(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&h){var p=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},_k=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||gG(t))&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},xG=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Lk=function(t){return t.tagName==="INPUT"},bG=function(t){return Lk(t)&&t.type==="hidden"},wG=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},$G=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},SG=function(t){if(!t.name)return!0;var n=t.form||Eg(t),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=$G(o,t.form);return!i||i===t},EG=function(t){return Lk(t)&&t.type==="radio"},CG=function(t){return EG(t)&&!SG(t)},DG=function(t){var n,r=t&&Eg(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,l,u;for(i=!!((a=o)!==null&&a!==void 0&&(l=a.ownerDocument)!==null&&l!==void 0&&l.contains(o)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!i&&o;){var c,d,f;r=Eg(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},VE=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},jG=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Yf.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Yf.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var u=t.parentElement,c=Eg(t);if(u&&!u.shadowRoot&&o(u)===!0)return VE(t);t.assignedSlot?t=t.assignedSlot:!u&&c!==t.ownerDocument?t=c.host:t=u}t=l}if(DG(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return VE(t);return!1},PG=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Yf.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},RG=function(t,n){return!(n.disabled||Cg(n)||bG(n)||jG(n,t)||wG(n)||PG(n))},BE=function(t,n){return!(CG(n)||_k(n)<0||!RG(t,n))},kG=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},TG=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,l=a?o.scopeParent:o,u=_k(l,a),c=a?e(o.candidates):l;u===0?a?n.push.apply(n,c):n.push(l):r.push({documentOrder:i,tabIndex:u,item:o,isScope:a,content:c})}),r.sort(xG).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Vk=function(t,n){n=n||{};var r;return n.getShadowRoot?r=yG([t],n.includeContainer,{filter:BE.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:kG}):r=vG(t,n.includeContainer,BE.bind(null,n)),TG(r)};const Bk={...vf},IG=Bk.useInsertionEffect,AG=IG||(e=>e());function Ms(e){const t=m.useRef(()=>{});return AG(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var oi=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dg.apply(this,arguments)}let zE=!1,NG=0;const UE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+NG++;function FG(){const[e,t]=m.useState(()=>zE?UE():void 0);return oi(()=>{e==null&&t(UE())},[]),m.useEffect(()=>{zE=!0},[]),e}const MG=Bk.useId,Gv=MG||FG,OG=m.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:l=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:d,stroke:f,d:h,style:{transform:p,...g}={},...v}=t,b=Gv();if(!o)return null;const x=c*2,y=x/2,w=a/2*(u/-8+1),S=l/2*u/4,[C,E]=r.split("-"),D=Tk.isRTL(o),$=!!h,T=C==="top"||C==="bottom",A=d&&E==="end"?"bottom":"top";let P=d&&E==="end"?"right":"left";d&&D&&(P=E==="end"?"left":"right");const k=(i==null?void 0:i.x)!=null?d||i.x:"",N=(i==null?void 0:i.y)!=null?d||i.y:"",j=h||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(l-S))+(" Q"+a/2+","+l+" "+w+","+(l-S))+" Z",F={top:$?"rotate(180deg)":"",left:$?"rotate(90deg)":"rotate(-90deg)",bottom:$?"":"rotate(180deg)",right:$?"rotate(-90deg)":"rotate(90deg)"}[C];return m.createElement("svg",Dg({},v,{"aria-hidden":!0,ref:n,width:$?a:a+x,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[P]:k,[A]:N,[C]:T||$?"100%":"calc(100% - "+x/2+"px)",transform:""+F+(p??""),...g}}),x>0&&m.createElement("path",{clipPath:"url(#"+b+")",fill:"none",stroke:f,strokeWidth:x+(h?0:1),d:j}),m.createElement("path",{stroke:x&&!h?v.fill:"none",d:j}),m.createElement("clipPath",{id:b},m.createElement("rect",{x:-y,y:y*($?-1:1),width:a+x,height:a})))});function _G(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const LG=m.createContext(null),VG=m.createContext(null),l2=()=>{var e;return((e=m.useContext(LG))==null?void 0:e.id)||null},u2=()=>m.useContext(VG);function Nh(e){return"data-floating-ui-"+e}function qE(e){const t=m.useRef(e);return oi(()=>{t.current=e}),t}const HE=Nh("safe-polygon");function Ny(e,t,n){return n&&!Tb(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function BG(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:{domReference:a,floating:l},refs:u}=e,{enabled:c=!0,delay:d=0,handleClose:f=null,mouseOnly:h=!1,restMs:p=0,move:g=!0}=t,v=u2(),b=l2(),x=qE(f),y=qE(d),w=m.useRef(),S=m.useRef(-1),C=m.useRef(),E=m.useRef(-1),D=m.useRef(!0),$=m.useRef(!1),T=m.useRef(()=>{}),A=m.useCallback(()=>{var j;const F=(j=o.current.openEvent)==null?void 0:j.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);m.useEffect(()=>{if(!c)return;function j(F){let{open:I}=F;I||(clearTimeout(S.current),clearTimeout(E.current),D.current=!0)}return i.on("openchange",j),()=>{i.off("openchange",j)}},[c,i]),m.useEffect(()=>{if(!c||!x.current||!n)return;function j(I){A()&&r(!1,I,"hover")}const F=Ua(l).documentElement;return F.addEventListener("mouseleave",j),()=>{F.removeEventListener("mouseleave",j)}},[l,n,r,c,x,A]);const P=m.useCallback(function(j,F,I){F===void 0&&(F=!0),I===void 0&&(I="hover");const R=Ny(y.current,"close",w.current);R&&!C.current?(clearTimeout(S.current),S.current=window.setTimeout(()=>r(!1,j,I),R)):F&&(clearTimeout(S.current),r(!1,j,I))},[y,r]),k=m.useCallback(()=>{T.current(),C.current=void 0},[]),N=m.useCallback(()=>{if($.current){const j=Ua(u.floating.current).body;j.style.pointerEvents="",j.removeAttribute(HE),$.current=!1}},[u]);return m.useEffect(()=>{if(!c)return;function j(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(M){if(clearTimeout(S.current),D.current=!1,h&&!Tb(w.current)||p>0&&!Ny(y.current,"open"))return;const O=Ny(y.current,"open",w.current);O?S.current=window.setTimeout(()=>{r(!0,M,"hover")},O):r(!0,M,"hover")}function I(M){if(j())return;T.current();const O=Ua(l);if(clearTimeout(E.current),x.current){n||clearTimeout(S.current),C.current=x.current({...e,tree:v,x:M.clientX,y:M.clientY,onClose(){N(),k(),P(M,!0,"safe-polygon")}});const H=C.current;O.addEventListener("mousemove",H),T.current=()=>{O.removeEventListener("mousemove",H)};return}(w.current==="touch"?!Tc(l,M.relatedTarget):!0)&&P(M)}function R(M){j()||x.current==null||x.current({...e,tree:v,x:M.clientX,y:M.clientY,onClose(){N(),k(),P(M)}})(M)}if(Jn(a)){const M=a;return n&&M.addEventListener("mouseleave",R),l==null||l.addEventListener("mouseleave",R),g&&M.addEventListener("mousemove",F,{once:!0}),M.addEventListener("mouseenter",F),M.addEventListener("mouseleave",I),()=>{n&&M.removeEventListener("mouseleave",R),l==null||l.removeEventListener("mouseleave",R),g&&M.removeEventListener("mousemove",F),M.removeEventListener("mouseenter",F),M.removeEventListener("mouseleave",I)}}},[a,l,c,e,h,p,g,P,k,N,r,n,v,y,x,o]),oi(()=>{var j;if(c&&n&&(j=x.current)!=null&&j.__options.blockPointerEvents&&A()){const I=Ua(l).body;if(I.setAttribute(HE,""),I.style.pointerEvents="none",$.current=!0,Jn(a)&&l){var F;const R=a,M=v==null||(F=v.nodesRef.current.find(O=>O.id===b))==null||(F=F.context)==null?void 0:F.elements.floating;return M&&(M.style.pointerEvents=""),R.style.pointerEvents="auto",l.style.pointerEvents="auto",()=>{R.style.pointerEvents="",l.style.pointerEvents=""}}}},[c,n,b,l,a,v,x,A]),oi(()=>{n||(w.current=void 0,k(),N())},[n,k,N]),m.useEffect(()=>()=>{k(),clearTimeout(S.current),clearTimeout(E.current),N()},[c,a,k,N]),m.useMemo(()=>{if(!c)return{};function j(F){w.current=F.pointerType}return{reference:{onPointerDown:j,onPointerEnter:j,onMouseMove(F){function I(){D.current||r(!0,F.nativeEvent,"hover")}h&&!Tb(w.current)||n||p===0||(clearTimeout(E.current),w.current==="touch"?I():E.current=window.setTimeout(I,p))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(F){P(F.nativeEvent,!1)}}}},[c,h,n,p,r,P])}function Fy(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var l;return o.parentId===a.id&&((l=o.context)==null?void 0:l.open)})}),n=n.concat(r);return n}const zk=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Uk(e,t){const n=Vk(e,zk());t==="prev"&&n.reverse();const r=n.indexOf(kb(Ua(e)));return n.slice(r+1)[0]}function zG(){return Uk(document.body,"next")}function UG(){return Uk(document.body,"prev")}function My(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Tc(n,r)}function qG(e){Vk(e,zk()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function HG(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const qk={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let WG;function WE(e){e.key==="Tab"&&(e.target,clearTimeout(WG))}const GE=m.forwardRef(function(t,n){const[r,o]=m.useState();oi(()=>(xk()&&o("button"),document.addEventListener("keydown",WE),()=>{document.removeEventListener("keydown",WE)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Nh("focus-guard")]:"",style:qk};return m.createElement("span",Dg({},t,i))}),Hk=m.createContext(null),KE=Nh("portal");function GG(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Gv(),o=QG(),[i,a]=m.useState(null),l=m.useRef(null);return oi(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{l.current=null})},[i]),oi(()=>{if(l.current)return;const u=t?document.getElementById(t):null;if(!u)return;const c=document.createElement("div");c.id=r,c.setAttribute(KE,""),u.appendChild(c),l.current=c,a(c)},[t,r]),oi(()=>{if(l.current)return;let u=n||(o==null?void 0:o.portalNode);u&&!Jn(u)&&(u=u.current),u=u||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,u.appendChild(c));const d=document.createElement("div");d.id=r,d.setAttribute(KE,""),u=c||u,u.appendChild(d),l.current=d,a(d)},[t,n,r,o]),i}function KG(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=GG({id:n,root:r}),[a,l]=m.useState(null),u=m.useRef(null),c=m.useRef(null),d=m.useRef(null),f=m.useRef(null),h=!!a&&!a.modal&&a.open&&o&&!!(r||i);return m.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function p(g){i&&My(g)&&(g.type==="focusin"?HG:qG)(i)}return i.addEventListener("focusin",p,!0),i.addEventListener("focusout",p,!0),()=>{i.removeEventListener("focusin",p,!0),i.removeEventListener("focusout",p,!0)}},[i,o,a==null?void 0:a.modal]),m.createElement(Hk.Provider,{value:m.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:u,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:f,portalNode:i,setFocusManagerState:l}),[o,i])},h&&i&&m.createElement(GE,{"data-type":"outside",ref:u,onFocus:p=>{if(My(p,i)){var g;(g=d.current)==null||g.focus()}else{const v=UG()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus()}}}),h&&i&&m.createElement("span",{"aria-owns":i.id,style:qk}),i&&or.createPortal(t,i),h&&i&&m.createElement(GE,{"data-type":"outside",ref:c,onFocus:p=>{if(My(p,i)){var g;(g=f.current)==null||g.focus()}else{const v=zG()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,p.nativeEvent))}}}))}const QG=()=>m.useContext(Hk),ZG={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},YG={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},QE=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function XG(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,nodeId:o,elements:{reference:i,domReference:a,floating:l},dataRef:u}=e,{enabled:c=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:h="pointerdown",referencePress:p=!1,referencePressEvent:g="pointerdown",ancestorScroll:v=!1,bubbles:b,capture:x}=t,y=u2(),w=Ms(typeof f=="function"?f:()=>!1),S=typeof f=="function"?w:f,C=m.useRef(!1),E=m.useRef(!1),{escapeKey:D,outsidePress:$}=QE(b),{escapeKey:T,outsidePress:A}=QE(x),P=Ms(F=>{if(!n||!c||!d||F.key!=="Escape")return;const I=y?Fy(y.nodesRef.current,o):[];if(!D&&(F.stopPropagation(),I.length>0)){let R=!0;if(I.forEach(M=>{var O;if((O=M.context)!=null&&O.open&&!M.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}r(!1,PW(F)?F.nativeEvent:F,"escape-key")}),k=Ms(F=>{var I;const R=()=>{var M;P(F),(M=bu(F))==null||M.removeEventListener("keydown",R)};(I=bu(F))==null||I.addEventListener("keydown",R)}),N=Ms(F=>{const I=C.current;C.current=!1;const R=E.current;if(E.current=!1,h==="click"&&R||I||typeof S=="function"&&!S(F))return;const M=bu(F),O="["+Nh("inert")+"]",q=Ua(l).querySelectorAll(O);let H=Jn(M)?M:null;for(;H&&!jE(H);){const Z=EW(H);if(jE(Z)||!Jn(Z))break;H=Z}if(q.length&&Jn(M)&&!RW(M)&&!Tc(M,l)&&Array.from(q).every(Z=>!Tc(H,Z)))return;if(Xw(M)&&l){const Z=M.clientWidth>0&&M.scrollWidth>M.clientWidth,ee=M.clientHeight>0&&M.scrollHeight>M.clientHeight;let re=ee&&F.offsetX>M.clientWidth;if(ee&&SW(M).direction==="rtl"&&(re=F.offsetX<=M.offsetWidth-M.clientWidth),re||Z&&F.offsetY>M.clientHeight)return}const G=y&&Fy(y.nodesRef.current,o).some(Z=>{var ee;return Ay(F,(ee=Z.context)==null?void 0:ee.elements.floating)});if(Ay(F,l)||Ay(F,a)||G)return;const ce=y?Fy(y.nodesRef.current,o):[];if(ce.length>0){let Z=!0;if(ce.forEach(ee=>{var re;if((re=ee.context)!=null&&re.open&&!ee.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,F,"outside-press")}),j=Ms(F=>{var I;const R=()=>{var M;N(F),(M=bu(F))==null||M.removeEventListener(h,R)};(I=bu(F))==null||I.addEventListener(h,R)});return m.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=D,u.current.__outsidePressBubbles=$;function F(M){r(!1,M,"ancestor-scroll")}const I=Ua(l);d&&I.addEventListener("keydown",T?k:P,T),S&&I.addEventListener(h,A?j:N,A);let R=[];return v&&(Jn(a)&&(R=as(a)),Jn(l)&&(R=R.concat(as(l))),!Jn(i)&&i&&i.contextElement&&(R=R.concat(as(i.contextElement)))),R=R.filter(M=>{var O;return M!==((O=I.defaultView)==null?void 0:O.visualViewport)}),R.forEach(M=>{M.addEventListener("scroll",F,{passive:!0})}),()=>{d&&I.removeEventListener("keydown",T?k:P,T),S&&I.removeEventListener(h,A?j:N,A),R.forEach(M=>{M.removeEventListener("scroll",F)})}},[u,l,a,i,d,S,h,n,r,v,c,D,$,P,T,k,N,A,j]),m.useEffect(()=>{C.current=!1},[S,h]),m.useMemo(()=>c?{reference:{onKeyDown:P,[ZG[g]]:F=>{p&&r(!1,F.nativeEvent,"reference-press")}},floating:{onKeyDown:P,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[YG[h]]:()=>{C.current=!0}}}:{},[c,p,h,g,r,P])}function Wk(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e,[i,a]=m.useState(null),[l,u]=m.useState(null),d=((t=e.elements)==null?void 0:t.reference)||i;oi(()=>{d&&(v.current=d)},[d]);const f=Mk({...e,elements:{...e.elements,...l&&{reference:l}}}),h=u2(),p=l2()!=null,g=Ms(($,T,A)=>{b.current.openEvent=$?T:void 0,x.emit("openchange",{open:$,event:T,reason:A,nested:p}),r==null||r($,T,A)}),v=m.useRef(null),b=m.useRef({}),x=m.useState(()=>_G())[0],y=Gv(),w=m.useCallback($=>{const T=Jn($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;u(T),f.refs.setReference(T)},[f.refs]),S=m.useCallback($=>{(Jn($)||$===null)&&(v.current=$,a($)),(Jn(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!Jn($))&&f.refs.setReference($)},[f.refs]),C=m.useMemo(()=>({...f.refs,setReference:S,setPositionReference:w,domReference:v}),[f.refs,S,w]),E=m.useMemo(()=>({...f.elements,domReference:d}),[f.elements,d]),D=m.useMemo(()=>({...f,refs:C,elements:E,dataRef:b,nodeId:o,floatingId:y,events:x,open:n,onOpenChange:g}),[f,o,y,x,n,g,C,E]);return oi(()=>{const $=h==null?void 0:h.nodesRef.current.find(T=>T.id===o);$&&($.context=D)}),m.useMemo(()=>({...f,context:D,refs:C,elements:E}),[f,C,E,D])}function JG(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,refs:i,elements:{domReference:a}}=e,{enabled:l=!0,visibleOnly:u=!0}=t,c=m.useRef(!1),d=m.useRef(),f=m.useRef(!0);return m.useEffect(()=>{if(!l)return;const h=qc(a);function p(){!n&&Xw(a)&&a===kb(Ua(a))&&(c.current=!0)}function g(){f.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",g,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",g,!0)}},[a,n,l]),m.useEffect(()=>{if(!l)return;function h(p){let{reason:g}=p;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,l]),m.useEffect(()=>()=>{clearTimeout(d.current)},[]),m.useMemo(()=>l?{reference:{onPointerDown(h){CW(h.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=bu(h.nativeEvent);if(u&&Jn(p))try{if(xk()&&DW())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!TW(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,g=Jn(p)&&p.hasAttribute(Nh("focus-guard"))&&p.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const v=kb(a?a.ownerDocument:document);!p&&v===a||Tc(i.floating.current,v)||Tc(a,v)||g||r(!1,h.nativeEvent,"focus")})}}}:{},[l,u,a,i,r])}const ZE="active",YE="selected";function Oy(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ZE]:a,[YE]:l,...u}=e;i=u}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(a=>{const l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(u=>{let[c,d]=u;if(!(o&&[ZE,YE].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var f;(f=r.get(c))==null||f.push(d),a[c]=function(){for(var h,p=arguments.length,g=new Array(p),v=0;v<p;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else a[c]=d}),a),{})}}function Gk(e){e===void 0&&(e=[]);const t=e,n=m.useCallback(i=>Oy(i,e,"reference"),t),r=m.useCallback(i=>Oy(i,e,"floating"),t),o=m.useCallback(i=>Oy(i,e,"item"),e.map(i=>i==null?void 0:i.item));return m.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}const eK=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function tK(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,l=(n=eK.get(a))!=null?n:a,u=Gv(),d=l2()!=null;return m.useMemo(()=>{if(!i)return{};const f={id:o,...l&&{role:l}};return l==="tooltip"||a==="label"?{reference:{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0},floating:f}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":r?o:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:u},...l==="menu"&&d&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},floating:{...f,...l==="menu"&&{"aria-labelledby":u}},item(h){let{active:p,selected:g}=h;const v={role:"option",...p&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":p&&g};case"combobox":return{...v,...p&&{"aria-selected":!0}}}return{}}}},[i,a,l,r,o,u,d])}function XE(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const nK=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:a=0,minItemsVisible:l=4,referenceOverflowThreshold:u=0,scrollRef:c,...d}=e,{rects:f,elements:{floating:h}}=t,p=n.current[a];if(!p)return{};const g={...t,...await qv(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-i).fn(t)},v=(c==null?void 0:c.current)||h,b=await qi(XE(g,v.scrollHeight),d),x=await qi(g,{...d,elementContext:"reference"}),y=Math.max(0,b.top),w=g.y+y,S=Math.max(0,v.scrollHeight-y-Math.max(0,b.bottom));return v.style.maxHeight=S+"px",v.scrollTop=y,o&&(v.offsetHeight<p.offsetHeight*Math.min(l,n.current.length-1)-1||x.top>=-u||x.bottom>=-u?or.flushSync(()=>o(!0)):or.flushSync(()=>o(!1))),r&&(r.current=await qi(XE({...g,y:w},v.offsetHeight),d)),{y:w}}});function rK(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:a,onChange:l}=t,u=Ms(l),c=m.useRef(!1),d=m.useRef(null),f=m.useRef(null);return m.useEffect(()=>{if(!o)return;function h(g){if(g.ctrlKey||!p||i.current==null)return;const v=g.deltaY,b=i.current.top>=-.5,x=i.current.bottom>=-.5,y=p.scrollHeight-p.clientHeight,w=v<0?-1:1,S=v<0?"max":"min";p.scrollHeight<=p.clientHeight||(!b&&v>0||!x&&v<0?(g.preventDefault(),or.flushSync(()=>{u(C=>C+Math[S](v,y*w))})):/firefox/i.test(Jw())&&(p.scrollTop+=v))}const p=(a==null?void 0:a.current)||r.floating;if(n&&p)return p.addEventListener("wheel",h),requestAnimationFrame(()=>{d.current=p.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{d.current=null,f.current=null,p.removeEventListener("wheel",h)}},[o,n,r.floating,i,a,u]),m.useMemo(()=>o?{floating:{onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const h=(a==null?void 0:a.current)||r.floating;if(!(!i.current||!h||!c.current)){if(d.current!==null){const p=h.scrollTop-d.current;(i.current.bottom<-.5&&p<-1||i.current.top<-.5&&p>1)&&or.flushSync(()=>u(g=>g+p))}requestAnimationFrame(()=>{d.current=h.scrollTop})}}}}:{},[o,i,r.floating,a,u])}function c2(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Fh=e=>e.type==="checkbox",Mu=e=>e instanceof Date,Yn=e=>e==null;const Kk=e=>typeof e=="object";var Sn=e=>!Yn(e)&&!Array.isArray(e)&&Kk(e)&&!Mu(e),Qk=e=>Sn(e)&&e.target?Fh(e.target)?e.target.checked:e.target.value:e,oK=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Zk=(e,t)=>e.has(oK(t)),iK=e=>{const t=e.constructor&&e.constructor.prototype;return Sn(t)&&t.hasOwnProperty("isPrototypeOf")},d2=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function mr(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(d2&&(e instanceof Blob||e instanceof FileList))&&(n||Sn(e)))if(t=n?[]:{},!n&&!iK(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=mr(e[r]));else return e;return t}var Mh=e=>Array.isArray(e)?e.filter(Boolean):[],Zt=e=>e===void 0,ge=(e,t,n)=>{if(!t||!Sn(e))return n;const r=Mh(t.split(/[,[\].]+?/)).reduce((o,i)=>Yn(o)?o:o[i],e);return Zt(r)||r===e?Zt(e[t])?n:e[t]:r},Ro=e=>typeof e=="boolean";const jg={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ko={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},$i={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},aK=U.createContext(null),f2=()=>U.useContext(aK);var Yk=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==ko.all&&(t._proxyFormState[a]=!r||ko.all),n&&(n[a]=!0),e[a]}});return o},Or=e=>Sn(e)&&!Object.keys(e).length,Xk=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Or(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!r||ko.all))},Dp=e=>Array.isArray(e)?e:[e],Jk=(e,t,n)=>!e||!t||e===t||Dp(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function h2(e){const t=U.useRef(e);t.current=e,U.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function sK(e){const t=f2(),{control:n=t.control,disabled:r,name:o,exact:i}=e||{},[a,l]=U.useState(n._formState),u=U.useRef(!0),c=U.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=U.useRef(o);return d.current=o,h2({disabled:r,next:f=>u.current&&Jk(d.current,f.name,i)&&Xk(f,c.current,n._updateFormState)&&l({...n._formState,...f}),subject:n._subjects.state}),U.useEffect(()=>(u.current=!0,c.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),Yk(a,n,c.current,!1)}var ti=e=>typeof e=="string",e8=(e,t,n,r,o)=>ti(e)?(r&&t.watch.add(e),ge(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),ge(n,i))):(r&&(t.watchAll=!0),n);function Os(e){const t=f2(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:a}=e||{},l=U.useRef(r);l.current=r,h2({disabled:i,subject:n._subjects.values,next:d=>{Jk(l.current,d.name,a)&&c(mr(e8(l.current,n._names,d.values||n._formValues,!1,o)))}});const[u,c]=U.useState(n._getWatch(r,o));return U.useEffect(()=>n._removeUnmounted()),u}var m2=e=>/^\w*$/.test(e),t8=e=>Mh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),gt=(e,t,n)=>{let r=-1;const o=m2(t)?[t]:t8(t),i=o.length,a=i-1;for(;++r<i;){const l=o[r];let u=n;if(r!==a){const c=e[l];u=Sn(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}e[l]=u,e=e[l]}return e};function on(e){const t=f2(),{name:n,disabled:r,control:o=t.control,shouldUnregister:i}=e,a=Zk(o._names.array,n),l=Os({control:o,name:n,defaultValue:ge(o._formValues,n,ge(o._defaultValues,n,e.defaultValue)),exact:!0}),u=sK({control:o,name:n}),c=U.useRef(o.register(n,{...e.rules,value:l,...Ro(e.disabled)?{disabled:e.disabled}:{}}));return U.useEffect(()=>{const d=o._options.shouldUnregister||i,f=(h,p)=>{const g=ge(o._fields,h);g&&(g._f.mount=p)};if(f(n,!0),d){const h=mr(ge(o._options.defaultValues,n));gt(o._defaultValues,n,h),Zt(ge(o._formValues,n))&&gt(o._formValues,n,h)}return()=>{(a?d&&!o._state.action:d)?o.unregister(n):f(n,!1)}},[n,o,a,i]),U.useEffect(()=>{ge(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:ge(o._fields,n)._f.value})},[r,n,o]),{field:{name:n,value:l,...Ro(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:U.useCallback(d=>c.current.onChange({target:{value:Qk(d),name:n},type:jg.CHANGE}),[n]),onBlur:U.useCallback(()=>c.current.onBlur({target:{value:ge(o._formValues,n),name:n},type:jg.BLUR}),[n,o]),ref:d=>{const f=ge(o._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:h=>d.setCustomValidity(h),reportValidity:()=>d.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ge(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!ge(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ge(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ge(u.validatingFields,n)},error:{enumerable:!0,get:()=>ge(u.errors,n)}})}}var lK=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},JE=e=>({isOnSubmit:!e||e===ko.onSubmit,isOnBlur:e===ko.onBlur,isOnChange:e===ko.onChange,isOnAll:e===ko.all,isOnTouch:e===ko.onTouched}),eC=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const lf=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=ge(e,o);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)break;if(a.ref&&t(a.ref,a.name)&&!r)break;lf(l,t)}else Sn(l)&&lf(l,t)}}};var uK=(e,t,n)=>{const r=Mh(ge(e,n));return gt(r,"root",t[n]),gt(e,n,r),e},p2=e=>e.type==="file",qa=e=>typeof e=="function",Pg=e=>{if(!d2)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},jp=e=>ti(e),g2=e=>e.type==="radio",Rg=e=>e instanceof RegExp;const tC={value:!1,isValid:!1},nC={value:!0,isValid:!0};var n8=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Zt(e[0].attributes.value)?Zt(e[0].value)||e[0].value===""?nC:{value:e[0].value,isValid:!0}:nC:tC}return tC};const rC={isValid:!1,value:null};var r8=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,rC):rC;function oC(e,t,n="validate"){if(jp(e)||Array.isArray(e)&&e.every(jp)||Ro(e)&&!e)return{type:n,message:jp(e)?e:"",ref:t}}var fu=e=>Sn(e)&&!Rg(e)?e:{value:e,message:""},iC=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:l,maxLength:u,minLength:c,min:d,max:f,pattern:h,validate:p,name:g,valueAsNumber:v,mount:b,disabled:x}=e._f,y=ge(t,g);if(!b||x)return{};const w=a?a[0]:i,S=k=>{r&&w.reportValidity&&(w.setCustomValidity(Ro(k)?"":k||""),w.reportValidity())},C={},E=g2(i),D=Fh(i),$=E||D,T=(v||p2(i))&&Zt(i.value)&&Zt(y)||Pg(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,A=lK.bind(null,g,n,C),P=(k,N,j,F=$i.maxLength,I=$i.minLength)=>{const R=k?N:j;C[g]={type:k?F:I,message:R,ref:i,...A(k?F:I,R)}};if(o?!Array.isArray(y)||!y.length:l&&(!$&&(T||Yn(y))||Ro(y)&&!y||D&&!n8(a).isValid||E&&!r8(a).isValid)){const{value:k,message:N}=jp(l)?{value:!!l,message:l}:fu(l);if(k&&(C[g]={type:$i.required,message:N,ref:w,...A($i.required,N)},!n))return S(N),C}if(!T&&(!Yn(d)||!Yn(f))){let k,N;const j=fu(f),F=fu(d);if(!Yn(y)&&!isNaN(y)){const I=i.valueAsNumber||y&&+y;Yn(j.value)||(k=I>j.value),Yn(F.value)||(N=I<F.value)}else{const I=i.valueAsDate||new Date(y),R=q=>new Date(new Date().toDateString()+" "+q),M=i.type=="time",O=i.type=="week";ti(j.value)&&y&&(k=M?R(y)>R(j.value):O?y>j.value:I>new Date(j.value)),ti(F.value)&&y&&(N=M?R(y)<R(F.value):O?y<F.value:I<new Date(F.value))}if((k||N)&&(P(!!k,j.message,F.message,$i.max,$i.min),!n))return S(C[g].message),C}if((u||c)&&!T&&(ti(y)||o&&Array.isArray(y))){const k=fu(u),N=fu(c),j=!Yn(k.value)&&y.length>+k.value,F=!Yn(N.value)&&y.length<+N.value;if((j||F)&&(P(j,k.message,N.message),!n))return S(C[g].message),C}if(h&&!T&&ti(y)){const{value:k,message:N}=fu(h);if(Rg(k)&&!y.match(k)&&(C[g]={type:$i.pattern,message:N,ref:i,...A($i.pattern,N)},!n))return S(N),C}if(p){if(qa(p)){const k=await p(y,t),N=oC(k,w);if(N&&(C[g]={...N,...A($i.validate,N.message)},!n))return S(N.message),C}else if(Sn(p)){let k={};for(const N in p){if(!Or(k)&&!n)break;const j=oC(await p[N](y,t),w,N);j&&(k={...j,...A(N,j.message)},S(j.message),n&&(C[g]=k))}if(!Or(k)&&(C[g]={ref:w,...k},!n))return C}}return S(!0),C};function cK(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Zt(e)?r++:e[t[r++]];return e}function dK(e){for(const t in e)if(e.hasOwnProperty(t)&&!Zt(e[t]))return!1;return!0}function xn(e,t){const n=Array.isArray(t)?t:m2(t)?[t]:t8(t),r=n.length===1?e:cK(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(Sn(r)&&Or(r)||Array.isArray(r)&&dK(r))&&xn(e,n.slice(0,-1)),e}var _y=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},kg=e=>Yn(e)||!Kk(e);function Ws(e,t){if(kg(e)||kg(t))return e===t;if(Mu(e)&&Mu(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Mu(i)&&Mu(a)||Sn(i)&&Sn(a)||Array.isArray(i)&&Array.isArray(a)?!Ws(i,a):i!==a)return!1}}return!0}var o8=e=>e.type==="select-multiple",fK=e=>g2(e)||Fh(e),Ly=e=>Pg(e)&&e.isConnected,i8=e=>{for(const t in e)if(qa(e[t]))return!0;return!1};function Tg(e,t={}){const n=Array.isArray(e);if(Sn(e)||n)for(const r in e)Array.isArray(e[r])||Sn(e[r])&&!i8(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Tg(e[r],t[r])):Yn(e[r])||(t[r]=!0);return t}function a8(e,t,n){const r=Array.isArray(e);if(Sn(e)||r)for(const o in e)Array.isArray(e[o])||Sn(e[o])&&!i8(e[o])?Zt(t)||kg(n[o])?n[o]=Array.isArray(e[o])?Tg(e[o],[]):{...Tg(e[o])}:a8(e[o],Yn(t)?{}:t[o],n[o]):n[o]=!Ws(e[o],t[o]);return n}var Nm=(e,t)=>a8(e,t,Tg(t)),s8=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Zt(e)?e:t?e===""?NaN:e&&+e:n&&ti(e)?new Date(e):r?r(e):e;function Vy(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return p2(t)?t.files:g2(t)?r8(e.refs).value:o8(t)?[...t.selectedOptions].map(({value:n})=>n):Fh(t)?n8(e.refs).value:s8(Zt(t.value)?e.ref.value:t.value,e)}var hK=(e,t,n,r)=>{const o={};for(const i of e){const a=ge(t,i);a&&gt(o,i,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},pd=e=>Zt(e)?e:Rg(e)?e.source:Sn(e)?Rg(e.value)?e.value.source:e.value:e,mK=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function aC(e,t,n){const r=ge(e,n);if(r||m2(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),a=ge(t,i),l=ge(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(l&&l.type)return{name:i,error:l};o.pop()}return{name:n}}var pK=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,gK=(e,t)=>!Mh(ge(e,t)).length&&xn(e,t);const vK={mode:ko.onSubmit,reValidateMode:ko.onChange,shouldFocusError:!0};function yK(e={}){let t={...vK,...e},n={submitCount:0,isDirty:!1,isLoading:qa(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Sn(t.defaultValues)||Sn(t.values)?mr(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:mr(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:_y(),array:_y(),state:_y()},h=JE(t.mode),p=JE(t.reValidateMode),g=t.criteriaMode===ko.all,v=L=>W=>{clearTimeout(c),c=setTimeout(L,W)},b=async L=>{if(d.isValid||L){const W=t.resolver?Or((await $()).errors):await A(r,!0);W!==n.isValid&&f.state.next({isValid:W})}},x=(L,W)=>{(d.isValidating||d.validatingFields)&&((L||Array.from(l.mount)).forEach(Y=>{Y&&(W?gt(n.validatingFields,Y,W):xn(n.validatingFields,Y))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Or(n.validatingFields)}))},y=(L,W=[],Y,he,de=!0,se=!0)=>{if(he&&Y){if(a.action=!0,se&&Array.isArray(ge(r,L))){const be=Y(ge(r,L),he.argA,he.argB);de&&gt(r,L,be)}if(se&&Array.isArray(ge(n.errors,L))){const be=Y(ge(n.errors,L),he.argA,he.argB);de&&gt(n.errors,L,be),gK(n.errors,L)}if(d.touchedFields&&se&&Array.isArray(ge(n.touchedFields,L))){const be=Y(ge(n.touchedFields,L),he.argA,he.argB);de&&gt(n.touchedFields,L,be)}d.dirtyFields&&(n.dirtyFields=Nm(o,i)),f.state.next({name:L,isDirty:k(L,W),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else gt(i,L,W)},w=(L,W)=>{gt(n.errors,L,W),f.state.next({errors:n.errors})},S=L=>{n.errors=L,f.state.next({errors:n.errors,isValid:!1})},C=(L,W,Y,he)=>{const de=ge(r,L);if(de){const se=ge(i,L,Zt(Y)?ge(o,L):Y);Zt(se)||he&&he.defaultChecked||W?gt(i,L,W?se:Vy(de._f)):F(L,se),a.mount&&b()}},E=(L,W,Y,he,de)=>{let se=!1,be=!1;const Le={name:L},rt=!!(ge(r,L)&&ge(r,L)._f.disabled);if(!Y||he){d.isDirty&&(be=n.isDirty,n.isDirty=Le.isDirty=k(),se=be!==Le.isDirty);const Nt=rt||Ws(ge(o,L),W);be=!!(!rt&&ge(n.dirtyFields,L)),Nt||rt?xn(n.dirtyFields,L):gt(n.dirtyFields,L,!0),Le.dirtyFields=n.dirtyFields,se=se||d.dirtyFields&&be!==!Nt}if(Y){const Nt=ge(n.touchedFields,L);Nt||(gt(n.touchedFields,L,Y),Le.touchedFields=n.touchedFields,se=se||d.touchedFields&&Nt!==Y)}return se&&de&&f.state.next(Le),se?Le:{}},D=(L,W,Y,he)=>{const de=ge(n.errors,L),se=d.isValid&&Ro(W)&&n.isValid!==W;if(e.delayError&&Y?(u=v(()=>w(L,Y)),u(e.delayError)):(clearTimeout(c),u=null,Y?gt(n.errors,L,Y):xn(n.errors,L)),(Y?!Ws(de,Y):de)||!Or(he)||se){const be={...he,...se&&Ro(W)?{isValid:W}:{},errors:n.errors,name:L};n={...n,...be},f.state.next(be)}},$=async L=>{x(L,!0);const W=await t.resolver(i,t.context,hK(L||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return x(L),W},T=async L=>{const{errors:W}=await $(L);if(L)for(const Y of L){const he=ge(W,Y);he?gt(n.errors,Y,he):xn(n.errors,Y)}else n.errors=W;return W},A=async(L,W,Y={valid:!0})=>{for(const he in L){const de=L[he];if(de){const{_f:se,...be}=de;if(se){const Le=l.array.has(se.name);x([he],!0);const rt=await iC(de,i,g,t.shouldUseNativeValidation&&!W,Le);if(x([he]),rt[se.name]&&(Y.valid=!1,W))break;!W&&(ge(rt,se.name)?Le?uK(n.errors,rt,se.name):gt(n.errors,se.name,rt[se.name]):xn(n.errors,se.name))}be&&await A(be,W,Y)}}return Y.valid},P=()=>{for(const L of l.unMount){const W=ge(r,L);W&&(W._f.refs?W._f.refs.every(Y=>!Ly(Y)):!Ly(W._f.ref))&&re(L)}l.unMount=new Set},k=(L,W)=>(L&&W&&gt(i,L,W),!Ws(H(),o)),N=(L,W,Y)=>e8(L,l,{...a.mount?i:Zt(W)?o:ti(L)?{[L]:W}:W},Y,W),j=L=>Mh(ge(a.mount?i:o,L,e.shouldUnregister?ge(o,L,[]):[])),F=(L,W,Y={})=>{const he=ge(r,L);let de=W;if(he){const se=he._f;se&&(!se.disabled&&gt(i,L,s8(W,se)),de=Pg(se.ref)&&Yn(W)?"":W,o8(se.ref)?[...se.ref.options].forEach(be=>be.selected=de.includes(be.value)):se.refs?Fh(se.ref)?se.refs.length>1?se.refs.forEach(be=>(!be.defaultChecked||!be.disabled)&&(be.checked=Array.isArray(de)?!!de.find(Le=>Le===be.value):de===be.value)):se.refs[0]&&(se.refs[0].checked=!!de):se.refs.forEach(be=>be.checked=be.value===de):p2(se.ref)?se.ref.value="":(se.ref.value=de,se.ref.type||f.values.next({name:L,values:{...i}})))}(Y.shouldDirty||Y.shouldTouch)&&E(L,de,Y.shouldTouch,Y.shouldDirty,!0),Y.shouldValidate&&q(L)},I=(L,W,Y)=>{for(const he in W){const de=W[he],se=`${L}.${he}`,be=ge(r,se);(l.array.has(L)||!kg(de)||be&&!be._f)&&!Mu(de)?I(se,de,Y):F(se,de,Y)}},R=(L,W,Y={})=>{const he=ge(r,L),de=l.array.has(L),se=mr(W);gt(i,L,se),de?(f.array.next({name:L,values:{...i}}),(d.isDirty||d.dirtyFields)&&Y.shouldDirty&&f.state.next({name:L,dirtyFields:Nm(o,i),isDirty:k(L,se)})):he&&!he._f&&!Yn(se)?I(L,se,Y):F(L,se,Y),eC(L,l)&&f.state.next({...n}),f.values.next({name:a.mount?L:void 0,values:{...i}})},M=async L=>{a.mount=!0;const W=L.target;let Y=W.name,he=!0;const de=ge(r,Y),se=()=>W.type?Vy(de._f):Qk(L),be=Le=>{he=Number.isNaN(Le)||Le===ge(i,Y,Le)};if(de){let Le,rt;const Nt=se(),Xt=L.type===jg.BLUR||L.type===jg.FOCUS_OUT,Dt=!mK(de._f)&&!t.resolver&&!ge(n.errors,Y)&&!de._f.deps||pK(Xt,ge(n.touchedFields,Y),n.isSubmitted,p,h),Ir=eC(Y,l,Xt);gt(i,Y,Nt),Xt?(de._f.onBlur&&de._f.onBlur(L),u&&u(0)):de._f.onChange&&de._f.onChange(L);const kt=E(Y,Nt,Xt,!1),qo=!Or(kt)||Ir;if(!Xt&&f.values.next({name:Y,type:L.type,values:{...i}}),Dt)return d.isValid&&b(),qo&&f.state.next({name:Y,...Ir?{}:kt});if(!Xt&&Ir&&f.state.next({...n}),t.resolver){const{errors:dr}=await $([Y]);if(be(Nt),he){const Yh=aC(n.errors,r,Y),ed=aC(dr,r,Yh.name||Y);Le=ed.error,Y=ed.name,rt=Or(dr)}}else x([Y],!0),Le=(await iC(de,i,g,t.shouldUseNativeValidation))[Y],x([Y]),be(Nt),he&&(Le?rt=!1:d.isValid&&(rt=await A(r,!0)));he&&(de._f.deps&&q(de._f.deps),D(Y,rt,Le,kt))}},O=(L,W)=>{if(ge(n.errors,W)&&L.focus)return L.focus(),1},q=async(L,W={})=>{let Y,he;const de=Dp(L);if(t.resolver){const se=await T(Zt(L)?L:de);Y=Or(se),he=L?!de.some(be=>ge(se,be)):Y}else L?(he=(await Promise.all(de.map(async se=>{const be=ge(r,se);return await A(be&&be._f?{[se]:be}:be)}))).every(Boolean),!(!he&&!n.isValid)&&b()):he=Y=await A(r);return f.state.next({...!ti(L)||d.isValid&&Y!==n.isValid?{}:{name:L},...t.resolver||!L?{isValid:Y}:{},errors:n.errors}),W.shouldFocus&&!he&&lf(r,O,L?de:l.mount),he},H=L=>{const W={...a.mount?i:o};return Zt(L)?W:ti(L)?ge(W,L):L.map(Y=>ge(W,Y))},G=(L,W)=>({invalid:!!ge((W||n).errors,L),isDirty:!!ge((W||n).dirtyFields,L),isTouched:!!ge((W||n).touchedFields,L),isValidating:!!ge((W||n).validatingFields,L),error:ge((W||n).errors,L)}),ce=L=>{L&&Dp(L).forEach(W=>xn(n.errors,W)),f.state.next({errors:L?n.errors:{}})},Z=(L,W,Y)=>{const he=(ge(r,L,{_f:{}})._f||{}).ref;gt(n.errors,L,{...W,ref:he}),f.state.next({name:L,errors:n.errors,isValid:!1}),Y&&Y.shouldFocus&&he&&he.focus&&he.focus()},ee=(L,W)=>qa(L)?f.values.subscribe({next:Y=>L(N(void 0,W),Y)}):N(L,W,!0),re=(L,W={})=>{for(const Y of L?Dp(L):l.mount)l.mount.delete(Y),l.array.delete(Y),W.keepValue||(xn(r,Y),xn(i,Y)),!W.keepError&&xn(n.errors,Y),!W.keepDirty&&xn(n.dirtyFields,Y),!W.keepTouched&&xn(n.touchedFields,Y),!W.keepIsValidating&&xn(n.validatingFields,Y),!t.shouldUnregister&&!W.keepDefaultValue&&xn(o,Y);f.values.next({values:{...i}}),f.state.next({...n,...W.keepDirty?{isDirty:k()}:{}}),!W.keepIsValid&&b()},Q=({disabled:L,name:W,field:Y,fields:he,value:de})=>{if(Ro(L)){const se=L?void 0:Zt(de)?Vy(Y?Y._f:ge(he,W)._f):de;gt(i,W,se),E(W,se,!1,!1,!0)}},ue=(L,W={})=>{let Y=ge(r,L);const he=Ro(W.disabled);return gt(r,L,{...Y||{},_f:{...Y&&Y._f?Y._f:{ref:{name:L}},name:L,mount:!0,...W}}),l.mount.add(L),Y?Q({field:Y,disabled:W.disabled,name:L,value:W.value}):C(L,!0,W.value),{...he?{disabled:W.disabled}:{},...t.progressive?{required:!!W.required,min:pd(W.min),max:pd(W.max),minLength:pd(W.minLength),maxLength:pd(W.maxLength),pattern:pd(W.pattern)}:{},name:L,onChange:M,onBlur:M,ref:de=>{if(de){ue(L,W),Y=ge(r,L);const se=Zt(de.value)&&de.querySelectorAll&&de.querySelectorAll("input,select,textarea")[0]||de,be=fK(se),Le=Y._f.refs||[];if(be?Le.find(rt=>rt===se):se===Y._f.ref)return;gt(r,L,{_f:{...Y._f,...be?{refs:[...Le.filter(Ly),se,...Array.isArray(ge(o,L))?[{}]:[]],ref:{type:se.type,name:L}}:{ref:se}}}),C(L,!1,void 0,se)}else Y=ge(r,L,{}),Y._f&&(Y._f.mount=!1),(t.shouldUnregister||W.shouldUnregister)&&!(Zk(l.array,L)&&a.action)&&l.unMount.add(L)}}},J=()=>t.shouldFocusError&&lf(r,O,l.mount),oe=L=>{Ro(L)&&(f.state.next({disabled:L}),lf(r,(W,Y)=>{let he=L;const de=ge(r,Y);de&&Ro(de._f.disabled)&&(he||(he=de._f.disabled)),W.disabled=he},0,!1))},ve=(L,W)=>async Y=>{let he;Y&&(Y.preventDefault&&Y.preventDefault(),Y.persist&&Y.persist());let de=mr(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:se,values:be}=await $();n.errors=se,de=be}else await A(r);if(xn(n.errors,"root"),Or(n.errors)){f.state.next({errors:{}});try{await L(de,Y)}catch(se){he=se}}else W&&await W({...n.errors},Y),J(),setTimeout(J);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Or(n.errors)&&!he,submitCount:n.submitCount+1,errors:n.errors}),he)throw he},Me=(L,W={})=>{ge(r,L)&&(Zt(W.defaultValue)?R(L,mr(ge(o,L))):(R(L,W.defaultValue),gt(o,L,mr(W.defaultValue))),W.keepTouched||xn(n.touchedFields,L),W.keepDirty||(xn(n.dirtyFields,L),n.isDirty=W.defaultValue?k(L,mr(ge(o,L))):k()),W.keepError||(xn(n.errors,L),d.isValid&&b()),f.state.next({...n}))},un=(L,W={})=>{const Y=L?mr(L):o,he=mr(Y),de=Or(L),se=de?o:he;if(W.keepDefaultValues||(o=Y),!W.keepValues){if(W.keepDirtyValues)for(const be of l.mount)ge(n.dirtyFields,be)?gt(se,be,ge(i,be)):R(be,ge(se,be));else{if(d2&&Zt(L))for(const be of l.mount){const Le=ge(r,be);if(Le&&Le._f){const rt=Array.isArray(Le._f.refs)?Le._f.refs[0]:Le._f.ref;if(Pg(rt)){const Nt=rt.closest("form");if(Nt){Nt.reset();break}}}}r={}}i=e.shouldUnregister?W.keepDefaultValues?mr(o):{}:mr(se),f.array.next({values:{...se}}),f.values.next({values:{...se}})}l={mount:W.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!W.keepIsValid||!!W.keepDirtyValues,a.watch=!!e.shouldUnregister,f.state.next({submitCount:W.keepSubmitCount?n.submitCount:0,isDirty:de?!1:W.keepDirty?n.isDirty:!!(W.keepDefaultValues&&!Ws(L,o)),isSubmitted:W.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:de?[]:W.keepDirtyValues?W.keepDefaultValues&&i?Nm(o,i):n.dirtyFields:W.keepDefaultValues&&L?Nm(o,L):{},touchedFields:W.keepTouched?n.touchedFields:{},errors:W.keepErrors?n.errors:{},isSubmitSuccessful:W.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},cr=(L,W)=>un(qa(L)?L(i):L,W);return{control:{register:ue,unregister:re,getFieldState:G,handleSubmit:ve,setError:Z,_executeSchema:$,_getWatch:N,_getDirty:k,_updateValid:b,_removeUnmounted:P,_updateFieldArray:y,_updateDisabledField:Q,_getFieldArray:j,_reset:un,_resetDefaultValues:()=>qa(t.defaultValues)&&t.defaultValues().then(L=>{cr(L,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:L=>{n={...n,...L}},_disableForm:oe,_subjects:f,_proxyFormState:d,_setErrors:S,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(L){a=L},get _defaultValues(){return o},get _names(){return l},set _names(L){l=L},get _formState(){return n},set _formState(L){n=L},get _options(){return t},set _options(L){t={...t,...L}}},trigger:q,register:ue,handleSubmit:ve,watch:ee,setValue:R,getValues:H,reset:cr,resetField:Me,clearErrors:ce,unregister:re,setError:Z,setFocus:(L,W={})=>{const Y=ge(r,L),he=Y&&Y._f;if(he){const de=he.refs?he.refs[0]:he.ref;de.focus&&(de.focus(),W.shouldSelect&&de.select())}},getFieldState:G}}function Kv(e={}){const t=U.useRef(),n=U.useRef(),[r,o]=U.useState({isDirty:!1,isValidating:!1,isLoading:qa(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:qa(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...yK(e),formState:r});const i=t.current.control;return i._options=e,h2({subject:i._subjects.state,next:a=>{Xk(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),U.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),U.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),U.useEffect(()=>{e.values&&!Ws(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),U.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),U.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),U.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=Yk(r,i),t.current}function Ge(e){return Kv({mode:"onSubmit",...e})}var l8="Expected a function",sC=NaN,xK="[object Symbol]",bK=/^\s+|\s+$/g,wK=/^[-+]0x[0-9a-f]+$/i,$K=/^0b[01]+$/i,SK=/^0o[0-7]+$/i,EK=parseInt,CK=typeof im=="object"&&im&&im.Object===Object&&im,DK=typeof self=="object"&&self&&self.Object===Object&&self,jK=CK||DK||Function("return this")(),PK=Object.prototype,RK=PK.toString,kK=Math.max,TK=Math.min,By=function(){return jK.Date.now()};function IK(e,t,n){var r,o,i,a,l,u,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(l8);t=lC(t)||0,Ig(n)&&(d=!!n.leading,f="maxWait"in n,i=f?kK(lC(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(E){var D=r,$=o;return r=o=void 0,c=E,a=e.apply($,D),a}function g(E){return c=E,l=setTimeout(x,t),d?p(E):a}function v(E){var D=E-u,$=E-c,T=t-D;return f?TK(T,i-$):T}function b(E){var D=E-u,$=E-c;return u===void 0||D>=t||D<0||f&&$>=i}function x(){var E=By();if(b(E))return y(E);l=setTimeout(x,v(E))}function y(E){return l=void 0,h&&r?p(E):(r=o=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,r=u=o=l=void 0}function S(){return l===void 0?a:y(By())}function C(){var E=By(),D=b(E);if(r=arguments,o=this,u=E,D){if(l===void 0)return g(u);if(f)return l=setTimeout(x,t),p(u)}return l===void 0&&(l=setTimeout(x,t)),a}return C.cancel=w,C.flush=S,C}function AK(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(l8);return Ig(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),IK(e,t,{leading:r,maxWait:t,trailing:o})}function Ig(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function NK(e){return!!e&&typeof e=="object"}function FK(e){return typeof e=="symbol"||NK(e)&&RK.call(e)==xK}function lC(e){if(typeof e=="number")return e;if(FK(e))return sC;if(Ig(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ig(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(bK,"");var n=$K.test(e);return n||SK.test(e)?EK(e.slice(2),n?2:8):wK.test(e)?sC:+e}var MK=AK;const OK=pi(MK),u8=(e,t,n)=>{const[r,o]=m.useState(),[i,a]=m.useState(!0),[l,u]=m.useState(!1);return m.useLayoutEffect(()=>{if(!(e!=null&&e.current))return;const c=()=>{if(!(e!=null&&e.current))return;const h=e.current,p=t==="vertical"?h.scrollHeight>h.clientHeight:h.scrollWidth>h.clientWidth;o(p),n&&n(p)},d=OK(()=>{if(!(e!=null&&e.current))return;const h=e.current,[p,g]=t==="vertical"?[h.scrollTop,h.scrollHeight-h.clientHeight]:[h.scrollLeft,h.scrollWidth-h.clientWidth];a(p===0),u(p>=g&&l===!1)},125,{leading:!0,trailing:!0});c();const{current:f}=e;return f.addEventListener("scroll",d),window.addEventListener("resize",d),()=>{f.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[n,e,i,l,t]),{isOverflow:r,scrollStart:i,scrollEnd:l}};var c8={exports:{}};(function(e){(function(t,n,r){if(!t)return;for(var o={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},i={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},l={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},u,c=1;c<20;++c)o[111+c]="f"+c;for(c=0;c<=9;++c)o[c+96]=c.toString();function d(D,$,T){if(D.addEventListener){D.addEventListener($,T,!1);return}D.attachEvent("on"+$,T)}function f(D){if(D.type=="keypress"){var $=String.fromCharCode(D.which);return D.shiftKey||($=$.toLowerCase()),$}return o[D.which]?o[D.which]:i[D.which]?i[D.which]:String.fromCharCode(D.which).toLowerCase()}function h(D,$){return D.sort().join(",")===$.sort().join(",")}function p(D){var $=[];return D.shiftKey&&$.push("shift"),D.altKey&&$.push("alt"),D.ctrlKey&&$.push("ctrl"),D.metaKey&&$.push("meta"),$}function g(D){if(D.preventDefault){D.preventDefault();return}D.returnValue=!1}function v(D){if(D.stopPropagation){D.stopPropagation();return}D.cancelBubble=!0}function b(D){return D=="shift"||D=="ctrl"||D=="alt"||D=="meta"}function x(){if(!u){u={};for(var D in o)D>95&&D<112||o.hasOwnProperty(D)&&(u[o[D]]=D)}return u}function y(D,$,T){return T||(T=x()[D]?"keydown":"keypress"),T=="keypress"&&$.length&&(T="keydown"),T}function w(D){return D==="+"?["+"]:(D=D.replace(/\+{2}/g,"+plus"),D.split("+"))}function S(D,$){var T,A,P,k=[];for(T=w(D),P=0;P<T.length;++P)A=T[P],l[A]&&(A=l[A]),$&&$!="keypress"&&a[A]&&(A=a[A],k.push("shift")),b(A)&&k.push(A);return $=y(A,k,$),{key:A,modifiers:k,action:$}}function C(D,$){return D===null||D===n?!1:D===$?!0:C(D.parentNode,$)}function E(D){var $=this;if(D=D||n,!($ instanceof E))return new E(D);$.target=D,$._callbacks={},$._directMap={};var T={},A,P=!1,k=!1,N=!1;function j(H){H=H||{};var G=!1,ce;for(ce in T){if(H[ce]){G=!0;continue}T[ce]=0}G||(N=!1)}function F(H,G,ce,Z,ee,re){var Q,ue,J=[],oe=ce.type;if(!$._callbacks[H])return[];for(oe=="keyup"&&b(H)&&(G=[H]),Q=0;Q<$._callbacks[H].length;++Q)if(ue=$._callbacks[H][Q],!(!Z&&ue.seq&&T[ue.seq]!=ue.level)&&oe==ue.action&&(oe=="keypress"&&!ce.metaKey&&!ce.ctrlKey||h(G,ue.modifiers))){var ve=!Z&&ue.combo==ee,Me=Z&&ue.seq==Z&&ue.level==re;(ve||Me)&&$._callbacks[H].splice(Q,1),J.push(ue)}return J}function I(H,G,ce,Z){$.stopCallback(G,G.target||G.srcElement,ce,Z)||H(G,ce)===!1&&(g(G),v(G))}$._handleKey=function(H,G,ce){var Z=F(H,G,ce),ee,re={},Q=0,ue=!1;for(ee=0;ee<Z.length;++ee)Z[ee].seq&&(Q=Math.max(Q,Z[ee].level));for(ee=0;ee<Z.length;++ee){if(Z[ee].seq){if(Z[ee].level!=Q)continue;ue=!0,re[Z[ee].seq]=1,I(Z[ee].callback,ce,Z[ee].combo,Z[ee].seq);continue}ue||I(Z[ee].callback,ce,Z[ee].combo)}var J=ce.type=="keypress"&&k;ce.type==N&&!b(H)&&!J&&j(re),k=ue&&ce.type=="keydown"};function R(H){typeof H.which!="number"&&(H.which=H.keyCode);var G=f(H);if(G){if(H.type=="keyup"&&P===G){P=!1;return}$.handleKey(G,p(H),H)}}function M(){clearTimeout(A),A=setTimeout(j,1e3)}function O(H,G,ce,Z){T[H]=0;function ee(oe){return function(){N=oe,++T[H],M()}}function re(oe){I(ce,oe,H),Z!=="keyup"&&(P=f(oe)),setTimeout(j,10)}for(var Q=0;Q<G.length;++Q){var ue=Q+1===G.length,J=ue?re:ee(Z||S(G[Q+1]).action);q(G[Q],J,Z,H,Q)}}function q(H,G,ce,Z,ee){$._directMap[H+":"+ce]=G,H=H.replace(/\s+/g," ");var re=H.split(" "),Q;if(re.length>1){O(H,re,G,ce);return}Q=S(H,ce),$._callbacks[Q.key]=$._callbacks[Q.key]||[],F(Q.key,Q.modifiers,{type:Q.action},Z,H,ee),$._callbacks[Q.key][Z?"unshift":"push"]({callback:G,modifiers:Q.modifiers,action:Q.action,seq:Z,level:ee,combo:H})}$._bindMultiple=function(H,G,ce){for(var Z=0;Z<H.length;++Z)q(H[Z],G,ce)},d(D,"keypress",R),d(D,"keydown",R),d(D,"keyup",R)}E.prototype.bind=function(D,$,T){var A=this;return D=D instanceof Array?D:[D],A._bindMultiple.call(A,D,$,T),A},E.prototype.unbind=function(D,$){var T=this;return T.bind.call(T,D,function(){},$)},E.prototype.trigger=function(D,$){var T=this;return T._directMap[D+":"+$]&&T._directMap[D+":"+$]({},D),T},E.prototype.reset=function(){var D=this;return D._callbacks={},D._directMap={},D},E.prototype.stopCallback=function(D,$){var T=this;if((" "+$.className+" ").indexOf(" mousetrap ")>-1||C($,T.target))return!1;if("composedPath"in D&&typeof D.composedPath=="function"){var A=D.composedPath()[0];A!==D.target&&($=A)}return $.tagName=="INPUT"||$.tagName=="SELECT"||$.tagName=="TEXTAREA"||$.isContentEditable},E.prototype.handleKey=function(){var D=this;return D._handleKey.apply(D,arguments)},E.addKeycodes=function(D){for(var $ in D)D.hasOwnProperty($)&&(o[$]=D[$]);u=null},E.init=function(){var D=E(n);for(var $ in D)$.charAt(0)!=="_"&&(E[$]=function(T){return function(){return D[T].apply(D,arguments)}}($))},E.init(),t.Mousetrap=E,e.exports&&(e.exports=E),typeof r=="function"&&r.amd&&r(function(){return E})})(typeof window<"u"?window:null,typeof window<"u"?document:null)})(c8);var _K=c8.exports;const zy=pi(_K);(function(e){if(e){var t={},n=e.prototype.stopCallback;e.prototype.stopCallback=function(r,o,i,a){var l=this;return l.paused?!0:t[i]||t[a]?!1:n.call(l,r,o,i)},e.prototype.bindGlobal=function(r,o,i){var a=this;if(a.bind(r,o,i),r instanceof Array){for(var l=0;l<r.length;l++)t[r[l]]=!0;return}t[r]=!0},e.init()}})(typeof Mousetrap<"u"?Mousetrap:void 0);const LK=(e,t,{global:n=!1}={})=>{const r=m.useRef(t);m.useEffect(()=>{r.current=t},[t]),m.useEffect(()=>((n?zy.bindGlobal:zy.bind)(e,(i,a)=>r.current(i,a)),()=>{zy.unbind(e)}),[JSON.stringify(e),n])},Zr=(...e)=>t=>{const n={};for(const r of e){const o=t[r];n[r]=o}return n},Uo=Zr("project"),d8=Zr("project","floatingIp"),Wc=Zr("project","instance"),Gc=Zr("project","vpc"),f8=Zr("project","vpc","rule"),h8=Zr("project","vpc","subnet"),m8=Zr("silo"),p8=Zr("image"),g8=Zr("silo","provider"),v8=Zr("project","image"),y8=Zr("project","snapshot"),v2=Zr("sledId"),y2=Zr("pool");function Yr(e){const t=e(Sv());return m.useMemo(()=>t,[ai([t])])}const VK=()=>Yr(d8),ut=()=>Yr(Uo),BK=()=>Yr(v8),zK=()=>Yr(y8),sa=()=>Yr(Wc),Wl=()=>Yr(Gc),UK=()=>Yr(h8),qK=()=>Yr(f8),Gl=()=>Yr(m8),HK=()=>Yr(p8),x8=()=>Yr(g8),b8=()=>Yr(v2),Es=()=>Yr(y2);Fb.loader=async()=>(await Promise.all([ae.prefetchQuery("currentUserView",{},{staleTime:6e4}),ae.prefetchQuery("currentUserGroups",{},{staleTime:6e4}),ae.prefetchQueryErrorsAllowed("systemPolicyView",{},{explanation:"/v1/system/policy 403 is expected if user is not a fleet viewer.",expectedStatusCode:403,staleTime:6e4})]),null);function Fb(){return s.jsxs(s.Fragment,{children:[s.jsx(mQ,{}),s.jsx(an,{})]})}function Kl(){const{data:e}=Pe("currentUserView",{}),{data:t}=Pe("currentUserGroups",{}),{data:n}=_P("systemPolicyView",{});vo(n,"System policy must be prefetched");const r=n.type==="success";return{me:e,myGroups:t,isFleetViewer:r}}var Qv={exports:{}},w8={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",Ĳ:"IJ",ĳ:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ŉ:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},$8=Object.keys(w8).join("|"),WK=new RegExp($8,"g"),GK=new RegExp($8,"");function KK(e){return w8[e]}var S8=function(e){return e.replace(WK,KK)},QK=function(e){return!!e.match(GK)};Qv.exports=S8;Qv.exports.has=QK;Qv.exports.remove=S8;var ZK=Qv.exports;const YK=pi(ZK);/**
 * @name match-sorter
 * @license MIT license.
 * @copyright (c) 2020 Kent C. Dodds
 * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
 */const Xn={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},XK=(e,t)=>String(e.rankedValue).localeCompare(String(t.rankedValue));function x2(e,t,n){n===void 0&&(n={});const{keys:r,threshold:o=Xn.MATCHES,baseSort:i=XK,sorter:a=c=>c.sort((d,f)=>nQ(d,f,i))}=n,l=e.reduce(u,[]);return a(l).map(c=>{let{item:d}=c;return d});function u(c,d,f){const h=JK(d,r,t,n),{rank:p,keyThreshold:g=o}=h;return p>=g&&c.push({...h,item:d,index:f}),c}}x2.rankings=Xn;function JK(e,t,n,r){if(!t){const i=e;return{rankedValue:i,rank:uC(i,n,r),keyIndex:-1,keyThreshold:r.threshold}}return iQ(e,t).reduce((i,a,l)=>{let{rank:u,rankedValue:c,keyIndex:d,keyThreshold:f}=i,{itemValue:h,attributes:p}=a,g=uC(h,n,r),v=c;const{minRanking:b,maxRanking:x,threshold:y}=p;return g<b&&g>=Xn.MATCHES?g=b:g>x&&(g=x),g>u&&(u=g,d=l,f=y,v=h),{rankedValue:v,rank:u,keyIndex:d,keyThreshold:f}},{rankedValue:e,rank:Xn.NO_MATCH,keyIndex:-1,keyThreshold:r.threshold})}function uC(e,t,n){return e=cC(e,n),t=cC(t,n),t.length>e.length?Xn.NO_MATCH:e===t?Xn.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Xn.EQUAL:e.startsWith(t)?Xn.STARTS_WITH:e.includes(` ${t}`)?Xn.WORD_STARTS_WITH:e.includes(t)?Xn.CONTAINS:t.length===1?Xn.NO_MATCH:eQ(e).includes(t)?Xn.ACRONYM:tQ(e,t))}function eQ(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(i=>{t+=i.substr(0,1)})}),t}function tQ(e,t){let n=0,r=0;function o(u,c,d){for(let f=d,h=c.length;f<h;f++)if(c[f]===u)return n+=1,f+1;return-1}function i(u){const c=1/u,d=n/t.length;return Xn.MATCHES+d*c}const a=o(t[0],e,0);if(a<0)return Xn.NO_MATCH;r=a;for(let u=1,c=t.length;u<c;u++){const d=t[u];if(r=o(d,e,r),!(r>-1))return Xn.NO_MATCH}const l=r-a;return i(l)}function nQ(e,t,n){const{rank:i,keyIndex:a}=e,{rank:l,keyIndex:u}=t;return i===l?a===u?n(e,t):a<u?-1:1:i>l?-1:1}function cC(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=YK(e)),e}function rQ(e,t){typeof t=="object"&&(t=t.key);let n;if(typeof t=="function")n=t(e);else if(e==null)n=null;else if(Object.hasOwnProperty.call(e,t))n=e[t];else{if(t.includes("."))return oQ(t,e);n=null}return n==null?[]:Array.isArray(n)?n:[String(n)]}function oQ(e,t){const n=e.split(".");let r=[t];for(let o=0,i=n.length;o<i;o++){const a=n[o];let l=[];for(let u=0,c=r.length;u<c;u++){const d=r[u];if(d!=null)if(Object.hasOwnProperty.call(d,a)){const f=d[a];f!=null&&l.push(f)}else a==="*"&&(l=l.concat(d))}r=l}return Array.isArray(r[0])?[].concat(...r):r}function iQ(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r],a=aQ(i),l=rQ(e,i);for(let u=0,c=l.length;u<c;u++)n.push({itemValue:l[u],attributes:a})}return n}const dC={maxRanking:1/0,minRanking:-1/0};function aQ(e){return typeof e=="string"?dC:{...dC,...e}}const Hi={end:"End",home:"Home",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",delete:"Delete",backspace:"Backspace",enter:"Enter",space:" ",escape:"Escape"};function b2(e,t){return Object.entries(_z(e,t))}function E8(e,t,n){if(e.length<=1)return e;if(n&&e.length===2){const r=m.cloneElement(n,{key:"conj"});return[e[0],r,e[1]]}return e.flatMap((r,o)=>{if(o===0)return[r];const i=m.cloneElement(t,{key:`sep-${o}`});if(n&&o===e.length-1){const a=m.cloneElement(n,{key:"conj"});return[i,a,r]}return[i,r]})}const w2=m.forwardRef((e,t)=>s.jsx("div",{ref:t,"aria-hidden":!0,className:"fixed inset-0 z-10 overflow-auto bg-scrim"}));function sQ(e,t,n,r,o="li"){m.useEffect(()=>{const i=e.current,a=t.current,l=a==null?void 0:a.querySelectorAll(o)[n];if(i&&a&&l){const u=i.getBoundingClientRect().top,c=u+r,{top:d,bottom:f}=l.getBoundingClientRect(),{top:h}=a.getBoundingClientRect(),p=d<u,g=f>c,v=d-h-1,b=f-h;p?i.scrollTo({top:v-1-32}):g&&i.scrollTo({top:b-r+2})}},[r,n,o])}const fC=384,lQ=St.div`absolute z-10 h-full w-full border border-accent pointer-events-none`;function uQ(e){const[t,n]=m.useState(""),r=x2(e.items,t,{keys:["value"],baseSort:(v,b)=>v.index<b.index?-1:1}),o=r.filter(v=>!v.navGroup),i=b2(r.filter(v=>v.navGroup),v=>v.navGroup),a=o.length>0?[["Actions",r.filter(v=>!v.navGroup)],...i]:i,l=[].concat(...a.map(([v,b])=>b)),[u,c]=m.useState(0),d=l[u],f=U.createRef(),h=U.createRef(),p=U.createRef();sQ(f,h,u,fC);function g(){n(""),c(0),e.onDismiss()}return s.jsx(Pw,{"aria-label":e["aria-label"],open:e.isOpen,onOpenChange:v=>{v||g()},children:s.jsxs(Rw,{children:[s.jsx(w2,{}),s.jsx(kw,{className:"fixed inset-0 z-modal mx-auto mt-[20vh] w-[46rem] bg-transparent p-0",children:s.jsxs("div",{onKeyDown:v=>{const b=l.length-1;if(v.key===Hi.enter)d&&(d.onSelect(),g());else if(v.key===Hi.down){const x=u===b?0:u+1;c(x)}else if(v.key===Hi.up){const x=u===0?b:u-1;c(x)}},role:"combobox",tabIndex:-1,"aria-controls":"TODO","aria-expanded":!0,children:[s.jsxs("div",{className:ne("flex h-14 w-full overflow-y-auto rounded-lg border bg-raise border-secondary elevation-3"),children:[s.jsx("input",{ref:p,className:ne("mousetrap caret-gray-100 w-full bg-transparent px-4 text-sans-xl focus:outline-none",e.inputClassName),value:t,onChange:v=>{c(0),n(v.target.value)},placeholder:"Search",spellCheck:"false"}),t.length>0&&s.jsx("button",{type:"button",className:"flex items-center py-6 pl-6 pr-4 text-secondary",onClick:()=>{var v;n(""),(v=p.current)==null||v.focus()},children:s.jsx(Uv,{})}),s.jsx("button",{type:"button",onClick:g,className:"flex h-full items-center border-l px-6 align-middle text-mono-sm text-secondary border-secondary",children:"Dismiss"})]}),r.length>0&&s.jsxs("div",{className:"relative mt-5 transform-gpu overflow-hidden rounded-lg elevation-3",children:[s.jsx("div",{className:"overflow-y-auto",ref:f,style:{maxHeight:fC},children:s.jsx("ul",{ref:h,children:a.map(([v,b])=>s.jsxs("div",{children:[s.jsx("h3",{className:"sticky top-0 z-20 h-[32px] px-4 py-2 text-mono-sm text-secondary bg-tertiary",children:v}),b.map(x=>s.jsxs("div",{className:"relative -mt-px first-of-type:mt-0",children:[x.value===(d==null?void 0:d.value)&&s.jsx(lQ,{}),s.jsx("li",{role:"option",className:ne("box-border block h-full w-full cursor-pointer select-none overflow-visible border p-4 text-sans-md text-secondary bg-raise border-secondary hover:bg-hover",x.value===(d==null?void 0:d.value)&&"text-accent bg-accent-secondary hover:bg-accent-secondary-hover"),"aria-selected":x.value===(d==null?void 0:d.value),onClick:()=>{x.onSelect(),g()},children:x.value})]},x.value))]},v))})}),s.jsxs("div",{className:"flex justify-between rounded-b-[3px] px-4 py-2 text-secondary bg-tertiary",children:[s.jsx(Uy,{keys:["Enter"],action:"submit"}),s.jsx(Uy,{keys:["Arrow Up","Arrow Down"],action:"select"}),s.jsx(Uy,{keys:["Esc"],action:"close"})]})]})]})})]})})}const Uy=({keys:e,action:t})=>s.jsxs("div",{children:[s.jsx("div",{className:"mr-1 inline-block",children:e.map(n=>s.jsx("kbd",{className:"mr-1 inline-block rounded border border-[rgba(255,255,255,.15)] px-2 py-1 text-mono-xs text-default",children:n},n))}),s.jsxs("span",{className:"text-sans-sm text-tertiary",children:["to ",t]})]}),Mn=({project:e})=>`${B.projects()}/${e}`,gd=({project:e,instance:t})=>`${B.instances({project:e})}/${t}`,vd=({project:e,vpc:t})=>`${B.vpcs({project:e})}/${t}`,B={projects:()=>"/projects",projectsNew:()=>"/projects-new",project:e=>`${Mn(e)}/instances`,projectEdit:e=>`${Mn(e)}/edit`,projectAccess:e=>`${Mn(e)}/access`,projectImages:e=>`${Mn(e)}/images`,projectImagesNew:e=>`${Mn(e)}/images-new`,projectImage:e=>`${B.projectImages(e)}/${e.image}`,projectImageEdit:e=>`${B.projectImage(e)}/edit`,instances:e=>`${Mn(e)}/instances`,instancesNew:e=>`${Mn(e)}/instances-new`,instance:e=>B.instanceStorage(e),instanceMetrics:e=>`${gd(e)}/metrics`,instanceStorage:e=>`${gd(e)}/storage`,instanceConnect:e=>`${gd(e)}/connect`,instanceNetworking:e=>`${gd(e)}/networking`,serialConsole:e=>`${gd(e)}/serial-console`,disksNew:e=>`${Mn(e)}/disks-new`,disks:e=>`${Mn(e)}/disks`,snapshotsNew:e=>`${Mn(e)}/snapshots-new`,snapshots:e=>`${Mn(e)}/snapshots`,snapshotImagesNew:e=>`${Mn(e)}/snapshots/${e.snapshot}/images-new`,vpcsNew:e=>`${Mn(e)}/vpcs-new`,vpcs:e=>`${Mn(e)}/vpcs`,vpc:e=>B.vpcFirewallRules(e),vpcEdit:e=>`${vd(e)}/edit`,vpcFirewallRules:e=>`${vd(e)}/firewall-rules`,vpcFirewallRulesNew:e=>`${vd(e)}/firewall-rules-new`,vpcFirewallRuleClone:e=>`${B.vpcFirewallRulesNew(e)}/${e.rule}`,vpcFirewallRuleEdit:e=>`${B.vpcFirewallRules(e)}/${e.rule}/edit`,vpcSubnets:e=>`${vd(e)}/subnets`,vpcSubnetsNew:e=>`${vd(e)}/subnets-new`,vpcSubnetsEdit:e=>`${B.vpcSubnets(e)}/${e.subnet}/edit`,floatingIps:e=>`${Mn(e)}/floating-ips`,floatingIpsNew:e=>`${Mn(e)}/floating-ips-new`,floatingIp:e=>`${B.floatingIps(e)}/${e.floatingIp}`,floatingIpEdit:e=>`${B.floatingIp(e)}/edit`,siloUtilization:()=>"/utilization",siloAccess:()=>"/access",siloImages:()=>"/images",siloImage:e=>`${B.siloImages()}/${e.image}`,siloImageEdit:e=>`${B.siloImage(e)}/edit`,system:()=>"/system",systemIssues:()=>"/system/issues",systemUtilization:()=>"/system/utilization",systemHealth:()=>"/system/health",ipPools:()=>"/system/networking/ip-pools",ipPoolsNew:()=>"/system/networking/ip-pools-new",ipPool:e=>`${B.ipPools()}/${e.pool}`,ipPoolEdit:e=>`${B.ipPool(e)}/edit`,ipPoolRangeAdd:e=>`${B.ipPool(e)}/ranges-add`,inventory:()=>"/system/inventory",rackInventory:()=>"/system/inventory/racks",sledInventory:()=>"/system/inventory/sleds",diskInventory:()=>"/system/inventory/disks",sled:({sledId:e})=>`/system/inventory/sleds/${e}`,sledInstances:({sledId:e})=>`/system/inventory/sleds/${e}/instances`,silos:()=>"/system/silos",silosNew:()=>"/system/silos-new",silo:({silo:e})=>`/system/silos/${e}`,siloIpPools:e=>`${B.silo(e)}?tab=ip-pools`,siloIdpsNew:e=>`${B.silo(e)}/idps-new`,samlIdp:e=>`${B.silo(e)}/idps/saml/${e.provider}`,profile:()=>"/settings/profile",sshKeys:()=>"/settings/ssh-keys",sshKeysNew:()=>"/settings/ssh-keys-new",deviceSuccess:()=>"/device/success"},C8=(e,t)=>{const n=new Set(t.map(r=>r.value));return e.filter(r=>!n.has(r.value))},Tl=Ew(()=>({items:[],isOpen:!1}));function cQ(e){Tl.setState(({items:t})=>({items:C8(t,e).concat(e)}))}function dQ(e){Tl.setState(({items:t})=>({items:C8(t,e)}))}function D8(){Tl.setState({isOpen:!0})}function j8(){Tl.setState({isOpen:!1})}function fQ(){const e=qn(),t=Fe(),{isFleetViewer:n}=Kl();return m.useMemo(()=>{const r=[];return e.pathname.startsWith("/settings/")||r.push({navGroup:"User",value:"Settings",onSelect:()=>t(B.profile())}),n&&!e.pathname.startsWith("/system/")&&r.push({navGroup:"System",value:"Manage system",onSelect:()=>t(B.silos())}),r},[e.pathname,t,n])}function la(e){const t=qn(),n=fQ();m.useEffect(()=>{const r=[...e,...n];return vo(r.length===new Set(r.map(o=>o.value)).size,"Items being added to the list of quick actions must have unique `value` values."),cQ(r),()=>dQ(r)},[e,n,t.pathname])}function hQ(e){const{items:t,isOpen:n}=Tl.getState();t.length>0&&!n?(e.preventDefault(),D8()):j8()}function mQ(){const e=Tl(n=>n.items),t=Tl(n=>n.isOpen);return LK("mod+k",hQ,{global:!0}),s.jsx(uQ,{isOpen:t,onDismiss:j8,"aria-label":"Quick actions",items:e})}kr.assign({skipAnimation:!0});const hC=()=>window.matchMedia("(prefers-reduced-motion: reduce)");function pQ(){const[e,t]=m.useState(hC().matches);return m.useEffect(()=>{const n=hC(),r=()=>t(n.matches);return r(),n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function gQ(){const e=pQ();return m.useEffect(()=>{kr.assign({skipAnimation:e})},[e]),null}const vQ={success:s.jsx(Vo,{}),error:s.jsx(hs,{}),notice:s.jsx(Qw,{}),info:s.jsx(hs,{className:"rotate-180"})},yQ={success:"bg-accent-secondary",error:"bg-error-secondary",notice:"bg-notice-secondary",info:"bg-info-secondary"},mC={success:"text-accent children:text-accent",error:"text-error children:text-error",notice:"text-notice children:text-notice",info:"text-info children:text-info"},xQ={success:"text-accent-secondary",error:"text-error-secondary",notice:"text-notice-secondary",info:"text-info-secondary"},bQ={success:"text-accent-secondary hover:text-accent",error:"text-error-secondary hover:text-error",notice:"text-notice-secondary hover:text-notice",info:"text-info-secondary hover:text-info"},Bt=({title:e,content:t,className:n,variant:r="success",cta:o,icon:i})=>s.jsxs("div",{className:ne("relative flex items-start overflow-hidden rounded-lg p-4 elevation-1",yQ[r],mC[r],n),children:[s.jsx("div",{className:"mt-[2px] flex [&>svg]:h-3 [&>svg]:w-3",children:i||vQ[r]}),s.jsxs("div",{className:"flex-1 pl-2.5",children:[e&&s.jsx("div",{className:"text-sans-semi-md",children:e}),s.jsx("div",{className:ne("text-sans-md [&>a]:underline",e?xQ[r]:mC[r]),children:t}),o&&s.jsxs(Rr,{className:ne("mt-1 flex items-center underline text-sans-md",bQ[r]),to:o.link,children:[o.text,s.jsx(Ih,{className:"ml-1"})]})]})]}),P8=m.createContext(!1),wQ=()=>m.useContext(P8);function $2(){const e=EQ(),t=wQ();return e?"z-modalDropdown":t?"z-sideModalDropdown":"z-contentDropdown"}function ss({children:e,onDismiss:t,title:n,subtitle:r,isOpen:o,animate:i=!0,errors:a}){const l="side-modal-title",u=jh(kw),d=Dh(o,{from:{x:50},enter:{x:0},config:o&&i?{tension:650,mass:.125}:{duration:0}});return s.jsx(P8.Provider,{value:!0,children:d(({x:f},h)=>h&&s.jsx(Pw,{open:!0,onOpenChange:p=>{p||t()},modal:!1,children:s.jsxs(Rw,{children:[s.jsx(w2,{}),s.jsxs(u,{className:"DialogContent ox-side-modal pointer-events-auto fixed bottom-0 right-0 top-0 z-sideModal m-0 flex w-[32rem] flex-col justify-between border-l p-0 bg-raise border-secondary elevation-2","aria-labelledby":l,style:{transform:f.to(p=>`translate3d(${p}%, 0px, 0px)`)},children:[n&&s.jsx(bR,{asChild:!0,children:s.jsxs(s.Fragment,{children:[s.jsx(ss.Title,{id:l,title:n,subtitle:r}),a&&a.length>0&&s.jsx("div",{className:"mb-6",children:s.jsx(Bt,{variant:"error",content:a.length===1?a[0]:s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[a.length," issues:"]}),s.jsx("ul",{className:"ml-4 list-disc",children:a.map((p,g)=>s.jsx("li",{children:p},g))})]}),title:a.length>1?"Errors":"Error"})})]})}),e]})]})}))})}const R8=St.h3`mt-2 flex items-center gap-1.5 text-sans-md text-accent`;ss.Title=({title:e,id:t,subtitle:n})=>s.jsxs("div",{className:"items-top mb-4 mt-8",children:[s.jsx("h2",{className:"flex w-full items-center justify-between break-words pr-8 text-sans-2xl",id:t,children:e}),n]});function $Q({children:e}){const t=m.useRef(null),{scrollStart:n}=u8(t,"vertical");return s.jsx("div",{ref:t,className:ne("body relative h-full overflow-y-auto pb-12 pt-8",!n&&"border-t border-t-secondary"),children:e})}ss.Body=$Q;ss.Section=St.div`p-8 space-y-6 border-secondary`;ss.Footer=({children:e,error:t})=>s.jsxs("footer",{className:"flex w-full items-center justify-end gap-[0.625rem] border-t py-5 border-secondary children:shrink-0",children:[t&&s.jsxs("div",{className:"flex grow items-center gap-1.5 text-sans-md text-error",children:[s.jsx(hs,{className:"shrink-0"}),s.jsx("span",{children:"Error"})]}),e,s.jsx(wR,{className:"absolute right-[var(--content-gutter)] top-10 -m-2 flex rounded p-2 hover:bg-hover","aria-label":"Close",children:s.jsx(Uv,{className:"text-secondary"})})]});const vi=m.forwardRef(({delay:e=250,children:t,content:n,placement:r},o)=>{const[i,a]=m.useState(!1),l=m.useRef(null),{refs:u,floatingStyles:c,context:d}=Wk({open:i,onOpenChange:a,placement:r,whileElementsMounted:a2,middleware:[r?s2():dG(),qv(12),Nk({element:l,padding:12})]}),{getReferenceProps:f,getFloatingProps:h}=Gk([BG(d,{move:!1,delay:{open:e,close:0}}),JG(d),XG(d),tK(d,{role:"tooltip"})]),p=m.cloneElement(m.Children.only(t),{...f(),ref:c2([u.setReference,o])}),g=$2();return s.jsxs(s.Fragment,{children:[p,s.jsx(KG,{children:i&&s.jsxs("div",{ref:u.setFloating,className:ne("ox-tooltip max-content max-w-sm",g),...h(),style:c,children:[n,s.jsx(OG,{width:12,height:8,strokeWidth:1,tipRadius:2,stroke:"var(--stroke-secondary)",fill:"var(--surface-raise)",ref:l,context:d})]})})]})}),Zv=e=>e.when?U.cloneElement(e.with,[],e.children):s.jsx(s.Fragment,{children:e.children}),SQ={sm:"h-8 px-3 text-mono-sm [&>svg]:w-4",icon:"h-8 w-8 text-mono-sm [&>svg]:w-4",base:"h-10 px-4 text-mono-sm [&>svg]:w-5"},Ql=({size:e="base",variant:t="primary"}={})=>ne("ox-button elevation-1 rounded inline-flex items-center justify-center align-top disabled:cursor-not-allowed shrink-0",`btn-${t}`,SQ[e],t==="danger"?"focus:outline-destructive-secondary":"focus:outline-accent-secondary"),pC=e=>{e.stopPropagation(),e.preventDefault()},Je=m.forwardRef(({type:e="button",children:t,size:n,variant:r,className:o,loading:i,innerClassName:a,disabled:l,onClick:u,disabledReason:c,...d},f)=>{const h=l||i;return s.jsx(Zv,{when:h&&c,with:s.jsx(vi,{content:c,ref:f}),children:s.jsxs("button",{className:ne(Ql({size:n,variant:r}),o,{"visually-disabled":h}),ref:f,type:e,onMouseDown:h?pC:void 0,onClick:h?pC:u,"aria-disabled":h,...d,children:[i&&s.jsx(Hl,{className:"absolute",variant:r}),s.jsx("span",{className:ne("flex items-center",a,{invisible:i}),children:t})]})})}),k8=m.createContext(!1),EQ=()=>m.useContext(k8);function $e({children:e,onDismiss:t,title:n,isOpen:r}){const o=m.useId(),i=jh(kw),l=Dh(r,{from:{y:-5},enter:{y:0},config:r?{tension:650,mass:.125}:{duration:0}});return s.jsx(k8.Provider,{value:!0,children:l(({y:u},c)=>c&&s.jsx(Pw,{open:!0,onOpenChange:d=>{d||t()},modal:!1,children:s.jsxs(Rw,{children:[s.jsx(w2,{}),s.jsxs(i,{className:"pointer-events-auto fixed left-1/2 top-1/2 z-modal m-0 flex max-h-[min(800px,80vh)] w-auto min-w-[28rem] max-w-[32rem] flex-col justify-between rounded-lg border p-0 bg-raise border-secondary elevation-2","aria-labelledby":o,style:{transform:u.to(d=>`translate3d(-50%, ${-50+d}%, 0px)`)},onFocusOutside:d=>d.preventDefault(),children:[n&&s.jsx(bR,{asChild:!0,children:s.jsx(CQ,{id:o,children:n})}),e,s.jsx(wR,{className:"absolute right-2 top-3 flex rounded p-2 hover:bg-hover","aria-label":"Close",children:s.jsx(Uv,{className:"text-secondary"})})]})]})}))})}const CQ=m.forwardRef(({children:e,id:t},n)=>s.jsx("div",{ref:n,className:"flex items-center justify-between border-b px-4 py-4 bg-secondary border-b-secondary",children:s.jsx("h2",{className:"text-sans-semi-lg",id:t,children:e})}));$e.Body=St.div`py-2 overflow-y-auto`;$e.Section=St.div`p-4 space-y-4 border-b border-secondary text-secondary last-of-type:border-none text-sans-md`;$e.Footer=({children:e,onDismiss:t,onAction:n,actionType:r="primary",actionText:o,actionLoading:i,cancelText:a,disabled:l=!1})=>s.jsxs("footer",{className:"flex items-center justify-between border-t px-3 py-3 border-secondary",children:[s.jsx("div",{className:"mr-4",children:e}),s.jsxs("div",{className:"space-x-2",children:[s.jsx(Je,{variant:"secondary",size:"sm",onClick:t,children:a||"Cancel"}),s.jsx(Je,{size:"sm",variant:r,onClick:n,disabled:l,loading:i,children:o})]})]});function DQ(){const e=Pv(u=>u.actionConfig),[t,n]=m.useState(!1);if(!e)return null;const{doAction:r,modalContent:o,errorTitle:i,modalTitle:a,actionType:l}=e;return s.jsxs($e,{isOpen:!0,onDismiss:wy,title:a,children:[s.jsx($e.Section,{children:o}),s.jsx($e.Footer,{onDismiss:wy,onAction:async()=>{n(!0);try{await r()}catch(u){De({variant:"error",title:i,content:u.message})}n(!1),wy()},cancelText:"Cancel",actionText:"Confirm",actionType:l,actionLoading:t})]})}const jQ=m.createContext(null),qy={didCatch:!1,error:null};let PQ=class extends m.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=qy}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(qy)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&RQ(t.resetKeys,o)){var i,a;(i=(a=this.props).onReset)===null||i===void 0||i.call(a,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(qy)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:a}=this.state;let l=t;if(i){const u={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")l=n(u);else if(r)l=m.createElement(r,u);else if(o===null||m.isValidElement(o))l=o;else throw a}return m.createElement(jQ.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},l)}};function RQ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const kQ=()=>s.jsx("div",{className:"fixed bottom-0 left-0 right-0 top-0 -z-10",style:{background:"radial-gradient(200% 100% at 50% 100%, var(--surface-default) 0%, #161B1D 100%)"}});function T8({children:e}){return s.jsxs("div",{className:"flex w-full justify-center",children:[s.jsx(kQ,{}),s.jsxs("div",{className:"relative flex w-full justify-between",children:[s.jsxs(Rr,{to:"/",className:"flex items-center p-6 text-mono-sm text-secondary hover:text-default",children:[s.jsx(hk,{title:"Select",className:"mr-2 text-tertiary"}),"Back to console"]}),s.jsx(TQ,{className:"mr-6 mt-4"})]}),s.jsxs("div",{className:"absolute left-1/2 top-1/2 flex w-96 -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center space-y-4 rounded-lg border p-8 !bg-raise border-secondary elevation-3",children:[s.jsxs("div",{className:"my-2 flex h-12 w-12 items-center justify-center",children:[s.jsx("div",{className:"absolute h-12 w-12 rounded-full opacity-20 bg-destructive motion-safe:animate-[ping_2s_cubic-bezier(0,0,0.2,1)_infinite]"}),s.jsx(hs,{className:"relative h-8 w-8 text-error"})]}),s.jsx("div",{className:"space-y-2 text-center",children:e})]})]})}function I8(){return s.jsxs(T8,{children:[s.jsx("h1",{className:"text-sans-2xl",children:"Page not found"}),s.jsx("p",{className:"text-tertiary",children:"The page you are looking for doesn't exist or you may not have access to it."})]})}function TQ({className:e}){const t=fe("logout",{onSuccess:()=>fg({includeCurrent:!1})});return s.jsx(Je,{onClick:()=>t.mutate({}),className:e,size:"sm",variant:"ghost",children:"Sign out"})}const S2={type:"error",statusCode:404};function A8({error:e}){return"statusCode"in e&&e.statusCode===404?s.jsx(I8,{}):s.jsxs(T8,{children:[s.jsx("h1",{className:"text-sans-2xl",children:"Something went wrong"}),s.jsx("p",{className:"text-tertiary",children:"Please try again. If the problem persists, contact your administrator."})]})}const IQ=e=>s.jsx(PQ,{FallbackComponent:A8,children:e.children});function AQ(){const e=TP();return s.jsx(A8,{error:e})}const NQ="modulepreload",FQ=function(e){return"/"+e},gC={},Yu=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.all(n.map(u=>{if(u=FQ(u),u in gC)return;gC[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!r)for(let p=i.length-1;p>=0;p--){const g=i[p];if(g.href===u&&(!c||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":NQ,c||(h.as="script",h.crossOrigin=""),h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),c)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}return o.then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})};function MQ(){const e=parseFloat("");return Number.isNaN(e)?null:e}const OQ=MQ();function _Q(e){return e==null||Number.isNaN(e)?!1:e>Math.random()*100}const N8=(e,t)=>e+Math.floor(Math.random()*(t-e)),LQ=()=>{const e=[401,403,404,404,404,404,404,500,500];return e[N8(0,e.length)]},VQ=async e=>new Promise(t=>setTimeout(t,e));async function BQ(){const{handlers:e}=await Yu(async()=>{const{handlers:i}=await import("./handlers-BZMpTxHj.js");return{handlers:i}},__vite__mapDeps([0,1,2])),{http:t,HttpResponse:n}=await Yu(async()=>{const{http:i,HttpResponse:a}=await import("./index-Ba6sSZJj.js");return{http:i,HttpResponse:a}},__vite__mapDeps([1,2])),{setupWorker:r}=await Yu(async()=>{const{setupWorker:i}=await import("./index-0OsKgfwZ.js");return{setupWorker:i}},__vite__mapDeps([3,2])),o=t.all("/v1/*",async()=>{if(await VQ(N8(200,400)),_Q(OQ))return new n(null,{status:LQ(),headers:{"X-Chaos":""}})});await r(o,...e).start({quiet:!0,onUnhandledRequest(i){const a=new URL(i.url).pathname;a.startsWith("/v1/")&&console.warn(`[MSW] Warning: captured an API request without a matching request handler:

  • ${i.method} ${a}

If you want to intercept this unhandled request, create a request handler for it.`)}})}/**
 * filesize
 *
 * @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
 * @license BSD-3-Clause
 * @version 10.1.1
 */const zQ="array",UQ="bit",vC="bits",qQ="byte",yC="bytes",hu="",HQ="exponent",WQ="function",xC="iec",GQ="Invalid number",KQ="Invalid rounding method",Hy="jedec",QQ="object",bC=".",ZQ="round",YQ="s",XQ="si",JQ="kbit",eZ="kB",tZ=" ",nZ="string",rZ="0",Wy={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function Cs(e,{bits:t=!1,pad:n=!1,base:r=-1,round:o=2,locale:i=hu,localeOptions:a={},separator:l=hu,spacer:u=tZ,symbols:c={},standard:d=hu,output:f=nZ,fullform:h=!1,fullforms:p=[],exponent:g=-1,roundingMethod:v=ZQ,precision:b=0}={}){let x=g,y=Number(e),w=[],S=0,C=hu;d===XQ?(r=10,d=Hy):d===xC||d===Hy?r=2:r===2?d=xC:(r=10,d=Hy);const E=r===10?1e3:1024,D=h===!0,$=y<0,T=Math[v];if(typeof e!="bigint"&&isNaN(e))throw new TypeError(GQ);if(typeof T!==WQ)throw new TypeError(KQ);if($&&(y=-y),(x===-1||isNaN(x))&&(x=Math.floor(Math.log(y)/Math.log(E)),x<0&&(x=0)),x>8&&(b>0&&(b+=8-x),x=8),f===HQ)return x;if(y===0)w[0]=0,C=w[1]=Wy.symbol[d][t?vC:yC][x];else{S=y/(r===2?Math.pow(2,x*10):Math.pow(1e3,x)),t&&(S=S*8,S>=E&&x<8&&(S=S/E,x++));const A=Math.pow(10,x>0?o:0);w[0]=T(S*A)/A,w[0]===E&&x<8&&g===-1&&(w[0]=1,x++),C=w[1]=r===10&&x===1?t?JQ:eZ:Wy.symbol[d][t?vC:yC][x]}if($&&(w[0]=-w[0]),b>0&&(w[0]=w[0].toPrecision(b)),w[1]=c[w[1]]||w[1],i===!0?w[0]=w[0].toLocaleString():i.length>0?w[0]=w[0].toLocaleString(i,a):l.length>0&&(w[0]=w[0].toString().replace(bC,l)),n&&Number.isInteger(w[0])===!1&&o>0){const A=l||bC,P=w[0].toString().split(A),k=P[1]||hu,N=k.length,j=o-N;w[0]=`${P[0]}${A}${k.padEnd(N+j,rZ)}`}return D&&(w[1]=p[x]?p[x]:Wy.fullform[d][x]+(t?UQ:qQ)+(w[0]===1?hu:YQ)),f===zQ?w:f===QQ?{value:w[0],symbol:w[1],exponent:x,unit:C}:w.join(u)}function Ac({children:e,className:t}){return s.jsx(vi,{content:e,placement:"top",children:s.jsx("button",{className:ne("inline-flex [&>svg]:pointer-events-none",t),type:"button",children:s.jsx(mk,{className:"text-quinary"})})})}const bo=({id:e,children:t,htmlFor:n,tip:r,optional:o,as:i,className:a})=>{const l=i||"label";return s.jsxs("div",{className:ne(a,"flex h-4 items-center space-x-2"),children:[s.jsxs(l,{id:e,className:"flex items-center text-sans-md",htmlFor:n,children:[t,o&&s.jsx("span",{className:"pl-1 text-tertiary","aria-hidden":"true",children:"(Optional)"})]}),r&&s.jsx(Ac,{children:r})]})},F8=7e3;let uf=null;function Xf(e,t="assertive",n=F8){uf||(uf=new iZ),uf.announce(e,t,n)}function oZ(e){uf&&uf.clear(e)}class iZ{createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=F8){if(!this.node)return;let o=document.createElement("div");o.textContent=t,n==="assertive"?this.assertiveLog.appendChild(o):this.politeLog.appendChild(o),t!==""&&setTimeout(()=>{o.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&(this.politeLog.innerHTML=""))}constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}}const aZ=U.forwardRef(({type:e="text",error:t,className:n,disabled:r,fieldClassName:o,as:i,...a},l)=>{const u=i||"input";return s.jsx("div",{className:ne("flex rounded border",t?"border-error-secondary hover:border-error":"border-default hover:border-hover",r&&"!border-default",n),children:s.jsx(u,{ref:l,type:e,className:ne("w-full rounded border-none px-3 py-[0.6875rem] !outline-offset-1 text-sans-md text-default bg-default placeholder:text-quaternary focus:outline-none disabled:cursor-not-allowed disabled:text-tertiary disabled:bg-disabled",t&&"focus-error",o,r&&"text-disabled bg-disabled"),"aria-invalid":t,disabled:r,...a})})}),yi=({id:e,children:t,className:n})=>s.jsx("div",{id:e,className:ne("mt-1 text-sans-sm text-tertiary [&_>_a]:underline hover:[&_>_a]:text-default",n),children:t}),sZ=({children:e})=>(m.useEffect(()=>Xf(e,"assertive"),[e]),s.jsx("div",{className:"ml-px py-2 text-sans-md text-destructive",children:e}));function Kc({error:e,label:t}){if(!e)return null;const n=e.type==="required"?`${t} is required`:e.message;return n?s.jsx(sZ,{children:n}):null}function ot({name:e,label:t=rr(e),units:n,tooltipText:r,description:o,required:i,...a}){const l=m.useId();return s.jsxs("div",{className:"max-w-lg",children:[s.jsxs("div",{className:"mb-2",children:[s.jsxs(bo,{htmlFor:l,id:`${l}-label`,tip:r,optional:!i,children:[t," ",n&&s.jsxs("span",{className:"ml-1 text-secondary",children:["(",n,")"]})]}),o&&s.jsx(yi,{id:`${l}-help-text`,className:"mb-2",children:o})]}),s.jsx(Ag,{name:e,...a,id:l})]})}const Ag=({name:e,type:t="text",label:n=rr(e),validate:r,control:o,tooltipText:i,required:a,id:l,transform:u,...c})=>{const d=m.useId(),f=l||d,{field:{onChange:h,...p},fieldState:{error:g}}=on({name:e,control:o,rules:{required:a,validate:r}});return s.jsxs(s.Fragment,{children:[s.jsx(aZ,{id:f,title:n,type:t,error:!!g,"aria-labelledby":ne(`${f}-label`,!!i&&`${f}-help-text`),"aria-describedby":i?`${f}-label-tip`:void 0,onChange:v=>h(u?u(v.target.value):v.target.value),...p,...c}),s.jsx(Kc,{error:g,label:n})]})},wC=512;function At(e){return s.jsx(ot,{as:"textarea",validate:lZ,...e})}function lZ(e){if(e.length>wC)return`A description must be no longer than ${wC} characters`}const Rt=typeof document<"u"?U.useLayoutEffect:()=>{};function Dn(e){const t=m.useRef(null);return Rt(()=>{t.current=e},[e]),m.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function uZ(e){let[t,n]=m.useState(e),r=m.useRef(null),o=Dn(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}t===a.value?o():n(a.value)});Rt(()=>{r.current&&o()});let i=Dn(a=>{r.current=a(t),o()});return[t,i]}const Ng={prefix:String(Math.round(Math.random()*1e10)),current:0},M8=U.createContext(Ng),cZ=U.createContext(!1);let dZ=!!(typeof window<"u"&&window.document&&window.document.createElement),Gy=new WeakMap;function fZ(e=!1){let t=m.useContext(M8),n=m.useRef(null);if(n.current===null&&!e){var r,o;let i=(o=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(i){let a=Gy.get(i);a==null?Gy.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==a.state&&(t.current=a.id,Gy.delete(i))}n.current=++t.current}return n.current}function hZ(e){let t=m.useContext(M8);t===Ng&&!dZ&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=fZ(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function mZ(e){let t=U.useId(),[n]=m.useState(E2()),r=n?"react-aria":`react-aria${Ng.prefix}`;return e||`${r}-${t}`}const pZ=typeof U.useId=="function"?mZ:hZ;function gZ(){return!1}function vZ(){return!0}function yZ(e){return()=>{}}function E2(){return typeof U.useSyncExternalStore=="function"?U.useSyncExternalStore(yZ,gZ,vZ):m.useContext(cZ)}let xZ=!!(typeof window<"u"&&window.document&&window.document.createElement),Fg=new Map;function ii(e){let[t,n]=m.useState(e),r=m.useRef(null),o=pZ(t),i=m.useCallback(a=>{r.current=a},[]);return xZ&&Fg.set(o,i),Rt(()=>{let a=o;return()=>{Fg.delete(a)}},[o]),m.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),o}function bZ(e,t){if(e===t)return e;let n=Fg.get(e);if(n)return n(t),t;let r=Fg.get(t);return r?(r(e),e):t}function Mg(e=[]){let t=ii(),[n,r]=uZ(t),o=m.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return Rt(o,[t,o,...e]),n}function Nc(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const vt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},fo=e=>e&&"window"in e&&e.window===e?e:vt(e).defaultView||window;function O8(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=O8(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wZ(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=O8(e))&&(r&&(r+=" "),r+=t);return r}function zt(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let o in r){let i=t[o],a=r[o];typeof i=="function"&&typeof a=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?t[o]=Nc(i,a):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof a=="string"?t[o]=wZ(i,a):o==="id"&&i&&a?t.id=bZ(i,a):t[o]=a!==void 0?a:i}}return t}const $Z=new Set(["id"]),SZ=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),EZ=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),CZ=/^(data-.*)$/;function Zl(e,t={}){let{labelable:n,isLink:r,propNames:o}=t,i={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&($Z.has(a)||n&&SZ.has(a)||r&&EZ.has(a)||o!=null&&o.has(a)||CZ.test(a))&&(i[a]=e[a]);return i}function Ha(e){if(DZ())e.focus({preventScroll:!0});else{let t=jZ(e);e.focus(),PZ(t)}}let Fm=null;function DZ(){if(Fm==null){Fm=!1;try{document.createElement("div").focus({get preventScroll(){return Fm=!0,!0}})}catch{}}return Fm}function jZ(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function PZ(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Yv(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function C2(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Fc(){return C2(/^Mac/i)}function _8(){return C2(/^iPhone/i)}function L8(){return C2(/^iPad/i)||Fc()&&navigator.maxTouchPoints>1}function Oh(){return _8()||L8()}function V8(){return Yv(/AppleWebKit/i)&&!RZ()}function RZ(){return Yv(/Chrome/i)}function D2(){return Yv(/Android/i)}function kZ(){return Yv(/Firefox/i)}function Jf(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:a,altKey:l,shiftKey:u}=t;kZ()&&(!((o=window.event)===null||o===void 0||(r=o.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Fc()?i=!0:a=!0);let c=V8()&&Fc()&&!L8()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:a,altKey:l,shiftKey:u}):new MouseEvent("click",{metaKey:i,ctrlKey:a,altKey:l,shiftKey:u,bubbles:!0,cancelable:!0});Jf.isOpening=n,Ha(e),e.dispatchEvent(c),Jf.isOpening=!1}Jf.isOpening=!1;let wu=new Map,Mb=new Set;function $C(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let o=wu.get(r.target);o||(o=new Set,wu.set(r.target,o),r.target.addEventListener("transitioncancel",n,{once:!0})),o.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let o=wu.get(r.target);if(o&&(o.delete(r.propertyName),o.size===0&&(r.target.removeEventListener("transitioncancel",n),wu.delete(r.target)),wu.size===0)){for(let i of Mb)i();Mb.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?$C():document.addEventListener("DOMContentLoaded",$C));function B8(e){requestAnimationFrame(()=>{wu.size===0?e():Mb.add(e)})}function z8(){let e=m.useRef(new Map),t=m.useCallback((o,i,a,l)=>{let u=l!=null&&l.once?(...c)=>{e.current.delete(a),a(...c)}:a;e.current.set(a,{type:i,eventTarget:o,fn:u,options:l}),o.addEventListener(i,a,l)},[]),n=m.useCallback((o,i,a,l)=>{var u;let c=((u=e.current.get(a))===null||u===void 0?void 0:u.fn)||a;o.removeEventListener(i,c,l),e.current.delete(a)},[]),r=m.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return m.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function _h(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=ii(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function SC(e,t){const n=m.useRef(!0),r=m.useRef(null);m.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),m.useEffect(()=>{n.current?n.current=!1:(!r.current||t.some((o,i)=>!Object.is(o,r[i])))&&e(),r.current=t},t)}function TZ(){return typeof window.ResizeObserver<"u"}function IZ(e){const{ref:t,onResize:n}=e;m.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(TZ()){const o=new window.ResizeObserver(i=>{i.length&&n()});return o.observe(r),()=>{r&&o.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function U8(e,t){Rt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Ob(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Xv(e,t){let n=e;for(Ob(n,t)&&(n=n.parentElement);n&&!Ob(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function AZ(e,t){const n=[];for(;e&&e!==document.documentElement;)Ob(e,t)&&n.push(e),e=e.parentElement;return n}let NZ=0;const Ky=new Map;function j2(e){let[t,n]=m.useState();return Rt(()=>{if(!e)return;let r=Ky.get(e);if(r)n(r.element.id);else{let o=`react-aria-description-${NZ++}`;n(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=e,document.body.appendChild(i),r={refCount:0,element:i},Ky.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Ky.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Xu(e,t,n,r){let o=Dn(n),i=n==null;m.useEffect(()=>{if(i||!e.current)return;let a=e.current;return a.addEventListener(t,o,r),()=>{a.removeEventListener(t,o,r)}},[e,t,r,i,o])}function FZ(e,t){let n=EC(e,t,"left"),r=EC(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,a=e.scrollLeft,l=e.scrollTop,{borderTopWidth:u,borderLeftWidth:c}=getComputedStyle(e),d=e.scrollLeft+parseInt(c,10),f=e.scrollTop+parseInt(u,10),h=d+e.clientWidth,p=f+e.clientHeight;n<=a?a=n-parseInt(c,10):n+o>h&&(a+=n+o-h),r<=f?l=r-parseInt(u,10):r+i>p&&(l+=r+i-p),e.scrollLeft=a,e.scrollTop=l}function EC(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function q8(e,t){if(document.contains(e)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let u=AZ(e);for(let c of u)FZ(c,e)}else{var n;let{left:u,top:c}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:d,top:f}=e.getBoundingClientRect();if(Math.abs(u-d)>1||Math.abs(c-f)>1){var r,o,i;t==null||(o=t.containingElement)===null||o===void 0||(r=o.scrollIntoView)===null||r===void 0||r.call(o,{block:"center",inline:"center"}),(i=e.scrollIntoView)===null||i===void 0||i.call(e,{block:"nearest"})}}}}function _b(e){return e.mozInputSource===0&&e.isTrusted?!0:D2()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function MZ(e){return!D2()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function H8(e,t){let n=m.useRef(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function P2(e,t,n){let r=m.useRef(t),o=Dn(()=>{n&&n(r.current)});m.useEffect(()=>{var i;let a=e==null||(i=e.current)===null||i===void 0?void 0:i.form;return a==null||a.addEventListener("reset",o),()=>{a==null||a.removeEventListener("reset",o)}},[e,o])}function Ji(e,t,n){let[r,o]=m.useState(e||t),i=m.useRef(e!==void 0),a=e!==void 0;m.useEffect(()=>{let c=i.current;c!==a&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),i.current=a},[a]);let l=a?e:r,u=m.useCallback((c,...d)=>{let f=(h,...p)=>{n&&(Object.is(l,h)||n(h,...p)),a||(l=h)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((p,...g)=>{let v=c(a?l:p,...g);return f(v,...d),a?p:v})):(a||o(c),f(c,...d))},[a,l,n]);return[l,u]}function Ju(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function Mm(e,t){let n=e,r=t.toString(),o=r.indexOf("."),i=o>=0?r.length-o:0;if(i>0){let a=Math.pow(10,i);n=Math.round(n*a)/a}return n}function Si(e,t,n,r){t=Number(t),n=Number(n);let o=(e-(isNaN(t)?0:t))%r,i=Mm(Math.abs(o)*2>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o,r);return isNaN(t)?!isNaN(n)&&i>n&&(i=Math.floor(Mm(n/r,r))*r):i<t?i=t:!isNaN(n)&&i>n&&(i=t+Math.floor(Mm((n-t)/r,r))*r),i=Mm(i,r),i}let Ou="default",Lb="",Pp=new WeakMap;function CC(e){if(Oh()){if(Ou==="default"){const t=vt(e);Lb=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Ou="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(Pp.set(e,e.style.userSelect),e.style.userSelect="none")}function Om(e){if(Oh()){if(Ou!=="disabled")return;Ou="restoring",setTimeout(()=>{B8(()=>{if(Ou==="restoring"){const t=vt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Lb||""),Lb="",Ou="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Pp.has(e)){let t=Pp.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Pp.delete(e)}}const R2=U.createContext({register:()=>{}});R2.displayName="PressResponderContext";function OZ(e,t){return t.get?t.get.call(e):t.value}function W8(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function _Z(e,t){var n=W8(e,t,"get");return OZ(e,n)}function LZ(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lh(e,t,n){LZ(e,t),t.set(e,n)}function VZ(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function DC(e,t,n){var r=W8(e,t,"set");return VZ(e,r,n),n}function BZ(e){let t=m.useContext(R2);if(t){let{register:n,...r}=t;e=zt(r,e),n()}return U8(t,e.ref),e}var _m=new WeakMap;class Lm{continuePropagation(){DC(this,_m,!1)}get shouldStopPropagation(){return _Z(this,_m)}constructor(t,n,r){Lh(this,_m,{writable:!0,value:void 0}),DC(this,_m,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const jC=Symbol("linkClicked");function k2(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,isDisabled:a,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...h}=BZ(e),[p,g]=m.useState(!1),v=m.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:b,removeAllGlobalListeners:x}=z8(),y=Dn(($,T)=>{let A=v.current;if(a||A.didFirePressStart)return!1;let P=!0;if(A.isTriggeringEvent=!0,r){let k=new Lm("pressstart",T,$);r(k),P=k.shouldStopPropagation}return n&&n(!0),A.isTriggeringEvent=!1,A.didFirePressStart=!0,g(!0),P}),w=Dn(($,T,A=!0)=>{let P=v.current;if(!P.didFirePressStart)return!1;P.ignoreClickAfterPress=!0,P.didFirePressStart=!1,P.isTriggeringEvent=!0;let k=!0;if(o){let N=new Lm("pressend",T,$);o(N),k=N.shouldStopPropagation}if(n&&n(!1),g(!1),t&&A&&!a){let N=new Lm("press",T,$);t(N),k&&(k=N.shouldStopPropagation)}return P.isTriggeringEvent=!1,k}),S=Dn(($,T)=>{let A=v.current;if(a)return!1;if(i){A.isTriggeringEvent=!0;let P=new Lm("pressup",T,$);return i(P),A.isTriggeringEvent=!1,P.shouldStopPropagation}return!0}),C=Dn($=>{let T=v.current;T.isPressed&&T.target&&(T.isOverTarget&&T.pointerType!=null&&w(Ei(T.target,$),T.pointerType,!1),T.isPressed=!1,T.isOverTarget=!1,T.activePointerId=null,T.pointerType=null,x(),d||Om(T.target))}),E=Dn($=>{c&&C($)}),D=m.useMemo(()=>{let $=v.current,T={onKeyDown(P){if(Qy(P.nativeEvent,P.currentTarget)&&P.currentTarget.contains(P.target)){var k;RC(P.target,P.key)&&P.preventDefault();let N=!0;if(!$.isPressed&&!P.repeat){$.target=P.currentTarget,$.isPressed=!0,N=y(P,"keyboard");let j=P.currentTarget,F=I=>{Qy(I,j)&&!I.repeat&&j.contains(I.target)&&$.target&&S(Ei($.target,I),"keyboard")};b(vt(P.currentTarget),"keyup",Nc(F,A),!0)}N&&P.stopPropagation(),P.metaKey&&Fc()&&((k=$.metaKeyEvents)===null||k===void 0||k.set(P.key,P.nativeEvent))}else P.key==="Meta"&&($.metaKeyEvents=new Map)},onClick(P){if(!(P&&!P.currentTarget.contains(P.target))&&P&&P.button===0&&!$.isTriggeringEvent&&!Jf.isOpening){let k=!0;if(a&&P.preventDefault(),!$.ignoreClickAfterPress&&!$.ignoreEmulatedMouseEvents&&!$.isPressed&&($.pointerType==="virtual"||_b(P.nativeEvent))){!a&&!u&&Ha(P.currentTarget);let N=y(P,"virtual"),j=S(P,"virtual"),F=w(P,"virtual");k=N&&j&&F}$.ignoreEmulatedMouseEvents=!1,$.ignoreClickAfterPress=!1,k&&P.stopPropagation()}}},A=P=>{var k;if($.isPressed&&$.target&&Qy(P,$.target)){var N;RC(P.target,P.key)&&P.preventDefault();let F=P.target;w(Ei($.target,P),"keyboard",$.target.contains(F)),x(),P.key!=="Enter"&&T2($.target)&&$.target.contains(F)&&!P[jC]&&(P[jC]=!0,Jf($.target,P,!1)),$.isPressed=!1,(N=$.metaKeyEvents)===null||N===void 0||N.delete(P.key)}else if(P.key==="Meta"&&(!((k=$.metaKeyEvents)===null||k===void 0)&&k.size)){var j;let F=$.metaKeyEvents;$.metaKeyEvents=void 0;for(let I of F.values())(j=$.target)===null||j===void 0||j.dispatchEvent(new KeyboardEvent("keyup",I))}};if(typeof PointerEvent<"u"){T.onPointerDown=j=>{if(j.button!==0||!j.currentTarget.contains(j.target))return;if(MZ(j.nativeEvent)){$.pointerType="virtual";return}Zy(j.currentTarget)&&j.preventDefault(),$.pointerType=j.pointerType;let F=!0;$.isPressed||($.isPressed=!0,$.isOverTarget=!0,$.activePointerId=j.pointerId,$.target=j.currentTarget,!a&&!u&&Ha(j.currentTarget),d||CC($.target),F=y(j,$.pointerType),b(vt(j.currentTarget),"pointermove",P,!1),b(vt(j.currentTarget),"pointerup",k,!1),b(vt(j.currentTarget),"pointercancel",N,!1)),F&&j.stopPropagation()},T.onMouseDown=j=>{j.currentTarget.contains(j.target)&&j.button===0&&(Zy(j.currentTarget)&&j.preventDefault(),j.stopPropagation())},T.onPointerUp=j=>{!j.currentTarget.contains(j.target)||$.pointerType==="virtual"||j.button===0&&mu(j,j.currentTarget)&&S(j,$.pointerType||j.pointerType)};let P=j=>{j.pointerId===$.activePointerId&&($.target&&mu(j,$.target)?!$.isOverTarget&&$.pointerType!=null&&($.isOverTarget=!0,y(Ei($.target,j),$.pointerType)):$.target&&$.isOverTarget&&$.pointerType!=null&&($.isOverTarget=!1,w(Ei($.target,j),$.pointerType,!1),E(j)))},k=j=>{j.pointerId===$.activePointerId&&$.isPressed&&j.button===0&&$.target&&(mu(j,$.target)&&$.pointerType!=null?w(Ei($.target,j),$.pointerType):$.isOverTarget&&$.pointerType!=null&&w(Ei($.target,j),$.pointerType,!1),$.isPressed=!1,$.isOverTarget=!1,$.activePointerId=null,$.pointerType=null,x(),d||Om($.target))},N=j=>{C(j)};T.onDragStart=j=>{j.currentTarget.contains(j.target)&&C(j)}}else{T.onMouseDown=N=>{if(N.button!==0||!N.currentTarget.contains(N.target))return;if(Zy(N.currentTarget)&&N.preventDefault(),$.ignoreEmulatedMouseEvents){N.stopPropagation();return}$.isPressed=!0,$.isOverTarget=!0,$.target=N.currentTarget,$.pointerType=_b(N.nativeEvent)?"virtual":"mouse",!a&&!u&&Ha(N.currentTarget),y(N,$.pointerType)&&N.stopPropagation(),b(vt(N.currentTarget),"mouseup",P,!1)},T.onMouseEnter=N=>{if(!N.currentTarget.contains(N.target))return;let j=!0;$.isPressed&&!$.ignoreEmulatedMouseEvents&&$.pointerType!=null&&($.isOverTarget=!0,j=y(N,$.pointerType)),j&&N.stopPropagation()},T.onMouseLeave=N=>{if(!N.currentTarget.contains(N.target))return;let j=!0;$.isPressed&&!$.ignoreEmulatedMouseEvents&&$.pointerType!=null&&($.isOverTarget=!1,j=w(N,$.pointerType,!1),E(N)),j&&N.stopPropagation()},T.onMouseUp=N=>{N.currentTarget.contains(N.target)&&!$.ignoreEmulatedMouseEvents&&N.button===0&&S(N,$.pointerType||"mouse")};let P=N=>{if(N.button===0){if($.isPressed=!1,x(),$.ignoreEmulatedMouseEvents){$.ignoreEmulatedMouseEvents=!1;return}$.target&&mu(N,$.target)&&$.pointerType!=null?w(Ei($.target,N),$.pointerType):$.target&&$.isOverTarget&&$.pointerType!=null&&w(Ei($.target,N),$.pointerType,!1),$.isOverTarget=!1}};T.onTouchStart=N=>{if(!N.currentTarget.contains(N.target))return;let j=zZ(N.nativeEvent);if(!j)return;$.activePointerId=j.identifier,$.ignoreEmulatedMouseEvents=!0,$.isOverTarget=!0,$.isPressed=!0,$.target=N.currentTarget,$.pointerType="touch",!a&&!u&&Ha(N.currentTarget),d||CC($.target),y(N,$.pointerType)&&N.stopPropagation(),b(fo(N.currentTarget),"scroll",k,!0)},T.onTouchMove=N=>{if(!N.currentTarget.contains(N.target))return;if(!$.isPressed){N.stopPropagation();return}let j=PC(N.nativeEvent,$.activePointerId),F=!0;j&&mu(j,N.currentTarget)?!$.isOverTarget&&$.pointerType!=null&&($.isOverTarget=!0,F=y(N,$.pointerType)):$.isOverTarget&&$.pointerType!=null&&($.isOverTarget=!1,F=w(N,$.pointerType,!1),E(N)),F&&N.stopPropagation()},T.onTouchEnd=N=>{if(!N.currentTarget.contains(N.target))return;if(!$.isPressed){N.stopPropagation();return}let j=PC(N.nativeEvent,$.activePointerId),F=!0;j&&mu(j,N.currentTarget)&&$.pointerType!=null?(S(N,$.pointerType),F=w(N,$.pointerType)):$.isOverTarget&&$.pointerType!=null&&(F=w(N,$.pointerType,!1)),F&&N.stopPropagation(),$.isPressed=!1,$.activePointerId=null,$.isOverTarget=!1,$.ignoreEmulatedMouseEvents=!0,$.target&&!d&&Om($.target),x()},T.onTouchCancel=N=>{N.currentTarget.contains(N.target)&&(N.stopPropagation(),$.isPressed&&C(N))};let k=N=>{$.isPressed&&N.target.contains($.target)&&C({currentTarget:$.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};T.onDragStart=N=>{N.currentTarget.contains(N.target)&&C(N)}}return T},[b,a,u,x,d,C,E,w,y,S]);return m.useEffect(()=>()=>{var $;d||Om(($=v.current.target)!==null&&$!==void 0?$:void 0)},[d]),{isPressed:l||p,pressProps:zt(h,D)}}function T2(e){return e.tagName==="A"&&e.hasAttribute("href")}function Qy(e,t){const{key:n,code:r}=e,o=t,i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof fo(o).HTMLInputElement&&!G8(o,n)||o instanceof fo(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&T2(o))&&n!=="Enter")}function zZ(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function PC(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const o=n[r];if(o.identifier===t)return o}return null}function Ei(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function UZ(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function qZ(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function mu(e,t){let n=t.getBoundingClientRect(),r=UZ(e);return qZ(n,r)}function Zy(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function RC(e,t){return e instanceof HTMLInputElement?!G8(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!T2(e)}const HZ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function G8(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":HZ.has(e.type)}function WZ({children:e}){let t=m.useMemo(()=>({register:()=>{}}),[]);return U.createElement(R2.Provider,{value:t},e)}class GZ{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function K8(e){let t=m.useRef({isFocused:!1,observer:null});Rt(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Dn(r=>{e==null||e(r)});return m.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=a=>{t.current.isFocused=!1,o.disabled&&n(new GZ("blur",a)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let l=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function I2(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=m.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),o&&o(!1),!0},[r,o]),a=K8(i),l=m.useCallback(u=>{const c=vt(u.target);u.target===u.currentTarget&&c.activeElement===u.target&&(n&&n(u),o&&o(!0),a(u))},[o,n,a]);return{focusProps:{onFocus:!t&&(n||o||r)?l:void 0,onBlur:!t&&(r||o)?i:void 0}}}let Yl=null,Vb=new Set,cf=new Map,Il=!1,Bb=!1;const KZ={Tab:!0,Escape:!0};function Jv(e,t){for(let n of Vb)n(e,t)}function QZ(e){return!(e.metaKey||!Fc()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Og(e){Il=!0,QZ(e)&&(Yl="keyboard",Jv("keyboard",e))}function lo(e){Yl="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Il=!0,Jv("pointer",e))}function Q8(e){_b(e)&&(Il=!0,Yl="virtual")}function Z8(e){e.target===window||e.target===document||(!Il&&!Bb&&(Yl="virtual",Jv("virtual",e)),Il=!1,Bb=!1)}function Y8(){Il=!1,Bb=!0}function zb(e){if(typeof window>"u"||cf.get(fo(e)))return;const t=fo(e),n=vt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Il=!0,r.apply(this,arguments)},n.addEventListener("keydown",Og,!0),n.addEventListener("keyup",Og,!0),n.addEventListener("click",Q8,!0),t.addEventListener("focus",Z8,!0),t.addEventListener("blur",Y8,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",lo,!0),n.addEventListener("pointermove",lo,!0),n.addEventListener("pointerup",lo,!0)):(n.addEventListener("mousedown",lo,!0),n.addEventListener("mousemove",lo,!0),n.addEventListener("mouseup",lo,!0)),t.addEventListener("beforeunload",()=>{X8(e)},{once:!0}),cf.set(t,{focus:r})}const X8=(e,t)=>{const n=fo(e),r=vt(e);t&&r.removeEventListener("DOMContentLoaded",t),cf.has(n)&&(n.HTMLElement.prototype.focus=cf.get(n).focus,r.removeEventListener("keydown",Og,!0),r.removeEventListener("keyup",Og,!0),r.removeEventListener("click",Q8,!0),n.removeEventListener("focus",Z8,!0),n.removeEventListener("blur",Y8,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",lo,!0),r.removeEventListener("pointermove",lo,!0),r.removeEventListener("pointerup",lo,!0)):(r.removeEventListener("mousedown",lo,!0),r.removeEventListener("mousemove",lo,!0),r.removeEventListener("mouseup",lo,!0)),cf.delete(n))};function ZZ(e){const t=vt(e);let n;return t.readyState!=="loading"?zb(e):(n=()=>{zb(e)},t.addEventListener("DOMContentLoaded",n)),()=>X8(e,n)}typeof document<"u"&&ZZ();function J8(){return Yl!=="pointer"}function eT(){return Yl}function YZ(e){Yl=e,Jv(e,null)}const XZ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function JZ(e,t,n){var r;const o=typeof window<"u"?fo(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?fo(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?fo(n==null?void 0:n.target).HTMLElement:HTMLElement,l=typeof window<"u"?fo(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof o&&!XZ.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof i||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof l&&!KZ[n.key])}function eY(e,t,n){zb(),m.useEffect(()=>{let r=(o,i)=>{JZ(!!(n!=null&&n.isTextInput),o,i)&&e(J8())};return Vb.add(r),()=>{Vb.delete(r)}},t)}function Qc(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=m.useRef({isFocusWithin:!1}),a=m.useCallback(c=>{i.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(c),o&&o(!1))},[n,o,i]),l=K8(a),u=m.useCallback(c=>{!i.current.isFocusWithin&&document.activeElement===c.target&&(r&&r(c),o&&o(!0),i.current.isFocusWithin=!0,l(c))},[r,o,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}let _g=!1,Yy=0;function Ub(){_g=!0,setTimeout(()=>{_g=!1},50)}function kC(e){e.pointerType==="touch"&&Ub()}function tY(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",kC):document.addEventListener("touchend",Ub),Yy++,()=>{Yy--,!(Yy>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",kC):document.removeEventListener("touchend",Ub))}}function e0(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,a]=m.useState(!1),l=m.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;m.useEffect(tY,[]);let{hoverProps:u,triggerHoverEnd:c}=m.useMemo(()=>{let d=(p,g)=>{if(l.pointerType=g,o||g==="touch"||l.isHovered||!p.currentTarget.contains(p.target))return;l.isHovered=!0;let v=p.currentTarget;l.target=v,t&&t({type:"hoverstart",target:v,pointerType:g}),n&&n(!0),a(!0)},f=(p,g)=>{if(l.pointerType="",l.target=null,g==="touch"||!l.isHovered)return;l.isHovered=!1;let v=p.currentTarget;r&&r({type:"hoverend",target:v,pointerType:g}),n&&n(!1),a(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=p=>{_g&&p.pointerType==="mouse"||d(p,p.pointerType)},h.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,p.pointerType)}):(h.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=p=>{!l.ignoreEmulatedMouseEvents&&!_g&&d(p,"mouse"),l.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[t,n,r,o,l]);return m.useEffect(()=>{o&&c({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:u,isHovered:i}}function nY(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=e,i=m.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Dn(u=>{n&&Vm(u,t)&&(o&&o(u),i.current.isPointerDown=!0)}),l=Dn(u=>{n&&n(u)});m.useEffect(()=>{let u=i.current;if(r)return;const c=t.current,d=vt(c);if(typeof PointerEvent<"u"){let f=h=>{u.isPointerDown&&Vm(h,t)&&l(h),u.isPointerDown=!1};return d.addEventListener("pointerdown",a,!0),d.addEventListener("pointerup",f,!0),()=>{d.removeEventListener("pointerdown",a,!0),d.removeEventListener("pointerup",f,!0)}}else{let f=p=>{u.ignoreEmulatedMouseEvents?u.ignoreEmulatedMouseEvents=!1:u.isPointerDown&&Vm(p,t)&&l(p),u.isPointerDown=!1},h=p=>{u.ignoreEmulatedMouseEvents=!0,u.isPointerDown&&Vm(p,t)&&l(p),u.isPointerDown=!1};return d.addEventListener("mousedown",a,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",a,!0),d.addEventListener("touchend",h,!0),()=>{d.removeEventListener("mousedown",a,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",a,!0),d.removeEventListener("touchend",h,!0)}}},[t,r,a,l])}function Vm(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function TC(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function rY(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:TC(e.onKeyDown),onKeyUp:TC(e.onKeyUp)}}}function oY(e,t){let{onScroll:n,isDisabled:r}=e,o=m.useCallback(i=>{i.ctrlKey||(i.preventDefault(),i.stopPropagation(),n&&n({deltaX:i.deltaX,deltaY:i.deltaY}))},[n]);Xu(t,"wheel",r?void 0:o)}function Lg(e){const t=vt(e);if(eT()==="virtual"){let n=t.activeElement;B8(()=>{t.activeElement===n&&e.isConnected&&Ha(e)})}else Ha(e)}function iY(e){const t=fo(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,o=n!=="none"&&r!=="hidden"&&r!=="collapse";if(o){const{getComputedStyle:i}=e.ownerDocument.defaultView;let{display:a,visibility:l}=i(e);o=a!=="none"&&l!=="hidden"&&l!=="collapse"}return o}function aY(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function tT(e,t){return e.nodeName!=="#comment"&&iY(e)&&aY(e,t)&&(!e.parentElement||tT(e.parentElement,e))}const IC=U.createContext(null);let bt=null;function sY(e){let{children:t,contain:n,restoreFocus:r,autoFocus:o}=e,i=m.useRef(null),a=m.useRef(null),l=m.useRef([]),{parentNode:u}=m.useContext(IC)||{},c=m.useMemo(()=>new qb({scopeRef:l}),[l]);Rt(()=>{let h=u||dn.root;if(dn.getTreeNode(h.scopeRef)&&bt&&!Bg(bt,h.scopeRef)){let p=dn.getTreeNode(bt);p&&(h=p)}h.addChild(c),dn.addNode(c)},[c,u]),Rt(()=>{let h=dn.getTreeNode(l);h&&(h.contain=!!n)},[n]),Rt(()=>{var h;let p=(h=i.current)===null||h===void 0?void 0:h.nextSibling,g=[];for(;p&&p!==a.current;)g.push(p),p=p.nextSibling;l.current=g},[t]),mY(l,r,n),dY(l,n),gY(l,r,n),hY(l,o),m.useEffect(()=>{const h=vt(l.current?l.current[0]:void 0).activeElement;let p=null;if(Vn(h,l.current)){for(let g of dn.traverse())g.scopeRef&&Vn(h,g.scopeRef.current)&&(p=g);p===dn.getTreeNode(l)&&(bt=p.scopeRef)}},[l]),Rt(()=>()=>{var h,p,g;let v=(g=(p=dn.getTreeNode(l))===null||p===void 0||(h=p.parent)===null||h===void 0?void 0:h.scopeRef)!==null&&g!==void 0?g:null;(l===bt||Bg(l,bt))&&(!v||dn.getTreeNode(v))&&(bt=v),dn.removeTreeNode(l)},[l]);let d=m.useMemo(()=>lY(l),[]),f=m.useMemo(()=>({focusManager:d,parentNode:c}),[c,d]);return U.createElement(IC.Provider,{value:f},U.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,U.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function lY(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:a}=t,l=r||vt(n[0]).activeElement,u=n[0].previousElementSibling,c=Gs(n),d=Br(c,{tabbable:o,accept:a},n);d.currentNode=Vn(l,n)?l:u;let f=d.nextNode();return!f&&i&&(d.currentNode=u,f=d.nextNode()),f&&br(f,!0),f},focusPrevious(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:a}=t,l=r||vt(n[0]).activeElement,u=n[n.length-1].nextElementSibling,c=Gs(n),d=Br(c,{tabbable:o,accept:a},n);d.currentNode=Vn(l,n)?l:u;let f=d.previousNode();return!f&&i&&(d.currentNode=u,f=d.previousNode()),f&&br(f,!0),f},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=Gs(n),a=Br(i,{tabbable:r,accept:o},n);a.currentNode=n[0].previousElementSibling;let l=a.nextNode();return l&&br(l,!0),l},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=Gs(n),a=Br(i,{tabbable:r,accept:o},n);a.currentNode=n[n.length-1].nextElementSibling;let l=a.previousNode();return l&&br(l,!0),l}}}const A2=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],uY=A2.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";A2.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const cY=A2.join(':not([hidden]):not([tabindex="-1"]),');function Gs(e){return e[0].parentElement}function Ud(e){let t=dn.getTreeNode(bt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function dY(e,t){let n=m.useRef(),r=m.useRef();Rt(()=>{let o=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const i=vt(o?o[0]:void 0);let a=c=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!Ud(e)||c.isComposing)return;let d=i.activeElement,f=e.current;if(!f||!Vn(d,f))return;let h=Gs(f),p=Br(h,{tabbable:!0},f);if(!d)return;p.currentNode=d;let g=c.shiftKey?p.previousNode():p.nextNode();g||(p.currentNode=c.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,g=c.shiftKey?p.previousNode():p.nextNode()),c.preventDefault(),g&&br(g,!0)},l=c=>{(!bt||Bg(bt,e))&&Vn(c.target,e.current)?(bt=e,n.current=c.target):Ud(e)&&!Vg(c.target,e)?n.current?n.current.focus():bt&&bt.current&&zg(bt.current):Ud(e)&&(n.current=c.target)},u=c=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(i.activeElement&&Ud(e)&&!Vg(i.activeElement,e))if(bt=e,i.body.contains(c.target)){var d;n.current=c.target,(d=n.current)===null||d===void 0||d.focus()}else bt.current&&zg(bt.current)})};return i.addEventListener("keydown",a,!1),i.addEventListener("focusin",l,!1),o==null||o.forEach(c=>c.addEventListener("focusin",l,!1)),o==null||o.forEach(c=>c.addEventListener("focusout",u,!1)),()=>{i.removeEventListener("keydown",a,!1),i.removeEventListener("focusin",l,!1),o==null||o.forEach(c=>c.removeEventListener("focusin",l,!1)),o==null||o.forEach(c=>c.removeEventListener("focusout",u,!1))}},[e,t]),Rt(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function nT(e){return Vg(e)}function Vn(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Vg(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of dn.traverse(dn.getTreeNode(t)))if(n&&Vn(e,n.current))return!0;return!1}function fY(e){return Vg(e,bt)}function Bg(e,t){var n;let r=(n=dn.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function br(e,t=!1){if(e!=null&&!t)try{Lg(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function zg(e,t=!0){let n=e[0].previousElementSibling,r=Gs(e),o=Br(r,{tabbable:t},e);o.currentNode=n;let i=o.nextNode();t&&!i&&(r=Gs(e),o=Br(r,{tabbable:!1},e),o.currentNode=n,i=o.nextNode()),br(i)}function hY(e,t){const n=U.useRef(t);m.useEffect(()=>{if(n.current){bt=e;const r=vt(e.current?e.current[0]:void 0);!Vn(r.activeElement,bt.current)&&e.current&&zg(e.current)}n.current=!1},[e])}function mY(e,t,n){Rt(()=>{if(t||n)return;let r=e.current;const o=vt(r?r[0]:void 0);let i=a=>{let l=a.target;Vn(l,e.current)?bt=e:nT(l)||(bt=null)};return o.addEventListener("focusin",i,!1),r==null||r.forEach(a=>a.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",i,!1))}},[e,t,n])}function pY(e){let t=dn.getTreeNode(bt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function gY(e,t,n){const r=m.useRef(typeof document<"u"?vt(e.current?e.current[0]:void 0).activeElement:null);Rt(()=>{let o=e.current;const i=vt(o?o[0]:void 0);if(!t||n)return;let a=()=>{(!bt||Bg(bt,e))&&Vn(i.activeElement,e.current)&&(bt=e)};return i.addEventListener("focusin",a,!1),o==null||o.forEach(l=>l.addEventListener("focusin",a,!1)),()=>{i.removeEventListener("focusin",a,!1),o==null||o.forEach(l=>l.removeEventListener("focusin",a,!1))}},[e,n]),Rt(()=>{const o=vt(e.current?e.current[0]:void 0);if(!t)return;let i=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Ud(e)||a.isComposing)return;let l=o.activeElement;if(!Vn(l,e.current))return;let u=dn.getTreeNode(e);if(!u)return;let c=u.nodeToRestore,d=Br(o.body,{tabbable:!0});d.currentNode=l;let f=a.shiftKey?d.previousNode():d.nextNode();if((!c||!o.body.contains(c)||c===o.body)&&(c=void 0,u.nodeToRestore=void 0),(!f||!Vn(f,e.current))&&c){d.currentNode=c;do f=a.shiftKey?d.previousNode():d.nextNode();while(Vn(f,e.current));a.preventDefault(),a.stopPropagation(),f?br(f,!0):nT(c)?br(c,!0):l.blur()}};return n||o.addEventListener("keydown",i,!0),()=>{n||o.removeEventListener("keydown",i,!0)}},[e,t,n]),Rt(()=>{const o=vt(e.current?e.current[0]:void 0);if(!t)return;let i=dn.getTreeNode(e);if(i){var a;return i.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let l=dn.getTreeNode(e);if(!l)return;let u=l.nodeToRestore;if(t&&u&&(Vn(o.activeElement,e.current)||o.activeElement===o.body&&pY(e))){let c=dn.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=c.getTreeNode(e);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){br(d.nodeToRestore);return}d=d.parent}for(d=c.getTreeNode(e);d;){if(d.scopeRef&&d.scopeRef.current&&dn.getTreeNode(d.scopeRef)){zg(d.scopeRef.current,!0);return}d=d.parent}}})}}}},[e,t])}function Br(e,t,n){let r=t!=null&&t.tabbable?cY:uY,o=vt(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var a;return!(t==null||(a=t.from)===null||a===void 0)&&a.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&tT(i)&&(!n||Vn(i,n))&&(!(t!=null&&t.accept)||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}function N2(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:l=t.accept}=n,u=o||vt(r).activeElement,c=Br(r,{tabbable:i,accept:l});r.contains(u)&&(c.currentNode=u);let d=c.nextNode();return!d&&a&&(c.currentNode=r,d=c.nextNode()),d&&br(d,!0),d},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:l=t.accept}=n,u=o||vt(r).activeElement,c=Br(r,{tabbable:i,accept:l});if(r.contains(u))c.currentNode=u;else{let f=Xy(c);return f&&br(f,!0),f??null}let d=c.previousNode();if(!d&&a){c.currentNode=r;let f=Xy(c);if(!f)return null;d=f}return d&&br(d,!0),d??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,l=Br(r,{tabbable:o,accept:i}).nextNode();return l&&br(l,!0),l},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=n,a=Br(r,{tabbable:o,accept:i}),l=Xy(a);return l&&br(l,!0),l??null}}}function Xy(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class F2{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let o=this.fastMap.get(n??null);if(!o)return;let i=new qb({scopeRef:t});o.addChild(i),i.parent=o,this.fastMap.set(t,i),r&&(i.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Vn(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let o=n.children;r&&(r.removeChild(n),o.size>0&&o.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new F2;var r;for(let o of this.traverse())n.addTreeNode(o.scopeRef,(r=(t=o.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,o.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new qb({scopeRef:null}),this.fastMap.set(null,this.root)}}class qb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let dn=new F2;function Vh(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=m.useRef({isFocused:!1,isFocusVisible:t||J8()}),[i,a]=m.useState(!1),[l,u]=m.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=m.useCallback(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),d=m.useCallback(p=>{o.current.isFocused=p,a(p),c()},[c]);eY(p=>{o.current.isFocusVisible=p,c()},[],{isTextInput:n});let{focusProps:f}=I2({isDisabled:r,onFocusChange:d}),{focusWithinProps:h}=Qc({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:r?h:f}}let vY=U.createContext(null);function yY(e){let t=m.useContext(vY)||{};U8(t,e);let{ref:n,...r}=t;return r}function rT(e,t){let{focusProps:n}=I2(e),{keyboardProps:r}=rY(e),o=zt(n,r),i=yY(t),a=e.isDisabled?{}:i,l=m.useRef(e.autoFocus);return m.useEffect(()=>{l.current&&t.current&&Lg(t.current),l.current=!1},[t]),{focusableProps:zt({...o,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},a)}}const xY=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),bY=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function wY(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return xY.has(n.script)}let t=e.split("-")[0];return bY.has(t)}const $Y=Symbol.for("react-aria.i18n.locale");function oT(){let e=typeof window<"u"&&window[$Y]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:wY(e)?"rtl":"ltr"}}let Hb=oT(),qd=new Set;function AC(){Hb=oT();for(let e of qd)e(Hb)}function SY(){let e=E2(),[t,n]=m.useState(Hb);return m.useEffect(()=>(qd.size===0&&window.addEventListener("languagechange",AC),qd.add(n),()=>{qd.delete(n),qd.size===0&&window.removeEventListener("languagechange",AC)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const EY=U.createContext(null);function Un(){let e=SY();return m.useContext(EY)||e}const CY=Symbol.for("react-aria.i18n.locale"),DY=Symbol.for("react-aria.i18n.strings");let pu;class Ds{getStringForLocale(t,n){let o=this.getStringsForLocale(n)[t];if(!o)throw new Error(`Could not find intl message ${t} in ${n} locale`);return o}getStringsForLocale(t){let n=this.strings[t];return n||(n=jY(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[CY];if(pu===void 0){let o=window[DY];if(!o)return null;pu={};for(let i in o)pu[i]=new Ds({[n]:o[i]},n)}let r=pu==null?void 0:pu[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function jY(e,t,n="en-US"){if(t[e])return t[e];let r=PY(e);if(t[r])return t[r];for(let o in t)if(o.startsWith(r+"-"))return t[o];return t[n]}function PY(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const NC=new Map,FC=new Map;class iT{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let o=n["="+t];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+r,a=NC.get(i);a||(a=new Intl.PluralRules(this.locale,{type:r}),NC.set(i,a));let l=a.select(t);return o=n[l]||n.other,typeof o=="function"?o():o}number(t){let n=FC.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),FC.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const MC=new WeakMap;function RY(e){let t=MC.get(e);return t||(t=new Ds(e),MC.set(e,t)),t}function aT(e,t){return t&&Ds.getGlobalDictionaryForPackage(t)||RY(e)}function ua(e,t){let{locale:n}=Un(),r=aT(e,t);return m.useMemo(()=>new iT(n,r),[n,r])}function ec(e,t){return e-t*Math.floor(e/t)}const sT=1721426;function Ks(e,t,n,r){t=Bh(e,t);let o=t-1,i=-2;return n<=2?i=0:Wa(t)&&(i=-1),sT-1+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)}function Wa(e){return e%4===0&&(e%100!==0||e%400===0)}function Bh(e,t){return e==="BC"?1-t:t}function t0(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const kY={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class ir{fromJulianDay(t){let n=t,r=n-sT,o=Math.floor(r/146097),i=ec(r,146097),a=Math.floor(i/36524),l=ec(i,36524),u=Math.floor(l/1461),c=ec(l,1461),d=Math.floor(c/365),f=o*400+a*100+u*4+d+(a!==4&&d!==4?1:0),[h,p]=t0(f),g=n-Ks(h,p,1,1),v=2;n<Ks(h,p,3,1)?v=0:Wa(p)&&(v=1);let b=Math.floor(((g+v)*12+373)/367),x=n-Ks(h,p,b,1)+1;return new mn(h,p,b,x)}toJulianDay(t){return Ks(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return kY[Wa(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Wa(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const TY={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function fn(e,t){return t=Lt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Wb(e,t){return e.calendar.identifier===t.calendar.identifier&&e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function lT(e,t){return fn(e,r0(t))}function n0(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1-OY(t))%7;return r<0&&(r+=7),r}function Mc(e){return Fi(Date.now(),e)}function r0(e){return Pr(Mc(e))}function uT(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function cT(e,t){return OC(e)-OC(t)}function OC(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Jy=null;function ho(){return Jy==null&&(Jy=new Intl.DateTimeFormat().resolvedOptions().timeZone),Jy}function zh(e){return e.subtract({days:e.day-1})}function Gb(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function IY(e){return zh(e.subtract({months:e.month-1}))}function AY(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function NY(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function eh(e,t){let n=n0(e,t);return e.subtract({days:n})}function FY(e,t){return eh(e,t).add({days:6})}const _C=new Map;function MY(e){if(Intl.Locale){let n=_C.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&_C.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function OY(e){let t=MY(e);return t&&TY[t]||0}function _Y(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((n0(zh(e),t)+n)/7)}function M2(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function O2(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function Oc(e){e=Lt(e,new ir);let t=Bh(e.era,e.year);return dT(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function dT(e,t,n,r,o,i,a){let l=new Date;return l.setUTCHours(r,o,i,a),l.setUTCFullYear(e,t-1,n),l.getTime()}function Kb(e,t){if(t==="UTC")return 0;if(e>0&&t===ho())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:o,hour:i,minute:a,second:l}=fT(e,t);return dT(n,r,o,i,a,l,0)-Math.floor(e/1e3)*1e3}const LC=new Map;function fT(e,t){let n=LC.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),LC.set(t,n));let r=n.formatToParts(new Date(e)),o={};for(let i of r)i.type!=="literal"&&(o[i.type]=i.value);return{year:o.era==="BC"||o.era==="B"?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:o.hour==="24"?0:+o.hour,minute:+o.minute,second:+o.second}}const VC=864e5;function LY(e,t,n,r){return(n===r?[n]:[n,r]).filter(i=>VY(e,t,i))}function VY(e,t,n){let r=fT(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Ii(e,t,n="compatible"){let r=di(e);if(t==="UTC")return Oc(r);if(t===ho()&&n==="compatible"){r=Lt(r,new ir);let u=new Date,c=Bh(r.era,r.year);return u.setFullYear(c,r.month-1,r.day),u.setHours(r.hour,r.minute,r.second,r.millisecond),u.getTime()}let o=Oc(r),i=Kb(o-VC,t),a=Kb(o+VC,t),l=LY(r,t,o-i,o-a);if(l.length===1)return l[0];if(l.length>1)switch(n){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(o-i,o-a);case"compatible":case"later":return Math.max(o-i,o-a);case"reject":throw new RangeError("No such absolute time found")}}function hT(e,t,n="compatible"){return new Date(Ii(e,t,n))}function Fi(e,t){let n=Kb(e,t),r=new Date(e+n),o=r.getUTCFullYear(),i=r.getUTCMonth()+1,a=r.getUTCDate(),l=r.getUTCHours(),u=r.getUTCMinutes(),c=r.getUTCSeconds(),d=r.getUTCMilliseconds();return new nh(o,i,a,t,n,l,u,c,d)}function Pr(e){return new mn(e.calendar,e.era,e.year,e.month,e.day)}function di(e,t){let n=0,r=0,o=0,i=0;if("timeZone"in e)({hour:n,minute:r,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:o,millisecond:i}=t),new Ug(e.calendar,e.era,e.year,e.month,e.day,n,r,o,i)}function BC(e){return new Uh(e.hour,e.minute,e.second,e.millisecond)}function Lt(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Al(r),r}function mT(e,t,n){if(e instanceof nh)return e.timeZone===t?e:zY(e,t);let r=Ii(e,t,n);return Fi(r,t)}function BY(e){let t=Oc(e)-e.offset;return new Date(t)}function zY(e,t){let n=Oc(e)-e.offset;return Lt(Fi(n,t),e.calendar)}const yd=36e5;function o0(e,t){let n=e.copy(),r="hour"in n?yT(n,t):0;Qb(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Zb(n),pT(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,UY(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let o=n.calendar.getYearsInEra(n);if(n.year>o){var i,a;let u=(i=(a=n.calendar).isInverseEra)===null||i===void 0?void 0:i.call(a,n);n.year=o,n.month=u?1:n.calendar.getMonthsInYear(n),n.day=u?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let l=n.calendar.getMonthsInYear(n);return n.month>l&&(n.month=l,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Qb(e,t){var n,r;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function Zb(e){for(;e.month<1;)Qb(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Qb(e,1)}function UY(e){for(;e.day<1;)e.month--,Zb(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Zb(e)}function pT(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Al(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),pT(e)}function _2(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function gT(e,t){return o0(e,_2(t))}function L2(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Al(n),n}function th(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),vT(n),n}function qY(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Bm(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Bm(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Bm(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Bm(e.hour,24),t}function vT(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Bm(e,t){let n=e%t;return n<0&&(n+=t),n}function yT(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,qY(e)}function xT(e,t){let n=e.copy();return yT(n,t),n}function HY(e,t){return xT(e,_2(t))}function V2(e,t,n,r){let o=e.copy();switch(t){case"era":{let l=e.calendar.getEras(),u=l.indexOf(e.era);if(u<0)throw new Error("Invalid era: "+e.era);u=Mi(u,n,0,l.length-1,r==null?void 0:r.round),o.era=l[u],Al(o);break}case"year":var i,a;!((i=(a=o.calendar).isInverseEra)===null||i===void 0)&&i.call(a,o)&&(n=-n),o.year=Mi(e.year,n,-1/0,9999,r==null?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=Mi(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":o.day=Mi(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),Al(o),o}function B2(e,t,n,r){let o=e.copy();switch(t){case"hour":{let i=e.hour,a=0,l=23;if((r==null?void 0:r.hourCycle)===12){let u=i>=12;a=u?12:0,l=u?23:11}o.hour=Mi(i,n,a,l,r==null?void 0:r.round);break}case"minute":o.minute=Mi(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":o.second=Mi(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":o.millisecond=Mi(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return o}function Mi(e,t,n,r,o=!1){if(o){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);t>0?e=Math.ceil(e/i)*i:e=Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function bT(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let o=o0(di(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Ii(o,e.timeZone)}else n=Oc(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=Fi(n,e.timeZone);return Lt(r,e.calendar)}function WY(e,t){return bT(e,_2(t))}function GY(e,t,n,r){switch(t){case"hour":{let o=0,i=23;if((r==null?void 0:r.hourCycle)===12){let g=e.hour>=12;o=g?12:0,i=g?23:11}let a=di(e),l=Lt(th(a,{hour:o}),new ir),u=[Ii(l,e.timeZone,"earlier"),Ii(l,e.timeZone,"later")].filter(g=>Fi(g,e.timeZone).day===l.day)[0],c=Lt(th(a,{hour:i}),new ir),d=[Ii(c,e.timeZone,"earlier"),Ii(c,e.timeZone,"later")].filter(g=>Fi(g,e.timeZone).day===c.day).pop(),f=Oc(e)-e.offset,h=Math.floor(f/yd),p=f%yd;return f=Mi(h,n,Math.floor(u/yd),Math.floor(d/yd),r==null?void 0:r.round)*yd+p,Lt(Fi(f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return B2(e,t,n,r);case"era":case"year":case"month":case"day":{let o=V2(di(e),t,n,r),i=Ii(o,e.timeZone);return Lt(Fi(i,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function KY(e,t,n){let r=di(e),o=th(L2(r,t),t);if(o.compare(r)===0)return e;let i=Ii(o,e.timeZone,n);return Lt(Fi(i,e.timeZone),e.calendar)}function wT(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function $T(e){let t=Lt(e,new ir);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function ST(e){return`${$T(e)}T${wT(e)}`}function QY(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function ZY(e){return`${ST(e)}${QY(e.offset)}[${e.timeZone}]`}function z2(e){let t=typeof e[0]=="object"?e.shift():new ir,n;if(typeof e[0]=="string")n=e.shift();else{let a=t.getEras();n=a[a.length-1]}let r=e.shift(),o=e.shift(),i=e.shift();return[t,n,r,o,i]}var YY=new WeakMap;class mn{copy(){return this.era?new mn(this.calendar,this.era,this.year,this.month,this.day):new mn(this.calendar,this.year,this.month,this.day)}add(t){return o0(this,t)}subtract(t){return gT(this,t)}set(t){return L2(this,t)}cycle(t,n,r){return V2(this,t,n,r)}toDate(t){return hT(this,t)}toString(){return $T(this)}compare(t){return uT(this,t)}constructor(...t){Lh(this,YY,{writable:!0,value:void 0});let[n,r,o,i,a]=z2(t);this.calendar=n,this.era=r,this.year=o,this.month=i,this.day=a,Al(this)}}var XY=new WeakMap;class Uh{copy(){return new Uh(this.hour,this.minute,this.second,this.millisecond)}add(t){return xT(this,t)}subtract(t){return HY(this,t)}set(t){return th(this,t)}cycle(t,n,r){return B2(this,t,n,r)}toString(){return wT(this)}compare(t){return cT(this,t)}constructor(t=0,n=0,r=0,o=0){Lh(this,XY,{writable:!0,value:void 0}),this.hour=t,this.minute=n,this.second=r,this.millisecond=o,vT(this)}}var JY=new WeakMap;class Ug{copy(){return this.era?new Ug(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Ug(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return o0(this,t)}subtract(t){return gT(this,t)}set(t){return L2(th(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return V2(this,t,n,r);default:return B2(this,t,n,r)}}toDate(t,n){return hT(this,t,n)}toString(){return ST(this)}compare(t){let n=uT(this,t);return n===0?cT(this,di(t)):n}constructor(...t){Lh(this,JY,{writable:!0,value:void 0});let[n,r,o,i,a]=z2(t);this.calendar=n,this.era=r,this.year=o,this.month=i,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Al(this)}}var eX=new WeakMap;class nh{copy(){return this.era?new nh(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new nh(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return bT(this,t)}subtract(t){return WY(this,t)}set(t,n){return KY(this,t,n)}cycle(t,n,r){return GY(this,t,n,r)}toDate(){return BY(this)}toString(){return ZY(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-mT(t,this.timeZone).toDate().getTime()}constructor(...t){Lh(this,eX,{writable:!0,value:void 0});let[n,r,o,i,a]=z2(t),l=t.shift(),u=t.shift();this.calendar=n,this.era=r,this.year=o,this.month=i,this.day=a,this.timeZone=l,this.offset=u,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Al(this)}}const tc=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],tX=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Rp=[1867,1911,1925,1988,2018],Da=["meiji","taisho","showa","heisei","reiwa"];function zC(e){const t=tc.findIndex(([n,r,o])=>e.year<n||e.year===n&&e.month<r||e.year===n&&e.month===r&&e.day<o);return t===-1?tc.length-1:t===0?0:t-1}function e1(e){let t=Rp[Da.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new mn(e.year+t,e.month,e.day)}class nX extends ir{fromJulianDay(t){let n=super.fromJulianDay(t),r=zC(n);return new mn(this,Da[r],n.year-Rp[r],n.month,n.day)}toJulianDay(t){return super.toJulianDay(e1(t))}balanceDate(t){let n=e1(t),r=zC(n);Da[r]!==t.era&&(t.era=Da[r],t.year=n.year-Rp[r]),this.constrainDate(t)}constrainDate(t){let n=Da.indexOf(t.era),r=tX[n];if(r!=null){let[o,i,a]=r,l=o-Rp[n];t.year=Math.max(1,Math.min(l,t.year)),t.year===l&&(t.month=Math.min(i,t.month),t.month===i&&(t.day=Math.min(a,t.day)))}if(t.year===1&&n>=0){let[,o,i]=tc[n];t.month=Math.max(o,t.month),t.month===o&&(t.day=Math.max(i,t.day))}}getEras(){return Da}getYearsInEra(t){let n=Da.indexOf(t.era),r=tc[n],o=tc[n+1];if(o==null)return 9999-r[0]+1;let i=o[0]-r[0];return(t.month<o[1]||t.month===o[1]&&t.day<o[2])&&i++,i}getDaysInMonth(t){return super.getDaysInMonth(e1(t))}getMinimumMonthInYear(t){let n=UC(t);return n?n[1]:1}getMinimumDayInMonth(t){let n=UC(t);return n&&t.month===n[1]?n[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function UC(e){if(e.year===1){let t=Da.indexOf(e.era);return tc[t]}}const ET=-543;class rX extends ir{fromJulianDay(t){let n=super.fromJulianDay(t),r=Bh(n.era,n.year);return new mn(this,r-ET,n.month,n.day)}toJulianDay(t){return super.toJulianDay(qC(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(qC(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function qC(e){let[t,n]=t0(e.year+ET);return new mn(t,n,e.month,e.day)}const qg=1911;function CT(e){return e.era==="minguo"?e.year+qg:1-e.year+qg}function HC(e){let t=e-qg;return t>0?["minguo",t]:["before_minguo",1-t]}class oX extends ir{fromJulianDay(t){let n=super.fromJulianDay(t),r=Bh(n.era,n.year),[o,i]=HC(r);return new mn(this,o,i,n.month,n.day)}toJulianDay(t){return super.toJulianDay(WC(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[n,r]=HC(CT(t));t.era=n,t.year=r}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(WC(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-qg}constructor(...t){super(...t),this.identifier="roc"}}function WC(e){let[t,n]=t0(CT(e));return new mn(t,n,e.month,e.day)}const GC=1948320,KC=[0,31,62,93,124,155,186,216,246,276,306,336];class iX{fromJulianDay(t){let n=t-GC,r=1+Math.floor((33*n+3)/12053),o=365*(r-1)+Math.floor((8*r+21)/33),i=n-o,a=i<216?Math.floor(i/31):Math.floor((i-6)/30),l=i-KC[a]+1;return new mn(this,r,a+1,l)}toJulianDay(t){let n=GC-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return n+=KC[t.month-1],n+=t.day,n}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||ec(25*t.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const t1=78,QC=80;class aX extends ir{fromJulianDay(t){let n=super.fromJulianDay(t),r=n.year-t1,o=t-Ks(n.era,n.year,1,1),i;o<QC?(r--,i=Wa(n.year-1)?31:30,o+=i+155+90+10):(i=Wa(n.year)?31:30,o-=QC);let a,l;if(o<i)a=1,l=o+1;else{let u=o-i;u<155?(a=Math.floor(u/31)+2,l=u%31+1):(u-=155,a=Math.floor(u/30)+7,l=u%30+1)}return new mn(this,r,a,l)}toJulianDay(t){let n=t.year+t1,[r,o]=t0(n),i,a;return Wa(o)?(i=31,a=Ks(r,o,3,21)):(i=30,a=Ks(r,o,3,22)),t.month===1?a+t.day-1:(a+=i+Math.min(t.month-2,5)*31,t.month>=8&&(a+=(t.month-7)*30),a+=t.day-1,a)}getDaysInMonth(t){return t.month===1&&Wa(t.year+t1)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Hg=1948440,ZC=1948439,ro=1300,gu=1600,sX=460322;function Wg(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function DT(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+Wg(t,r,1,1)))/29.5)+1),i=n-Wg(t,r,o,1)+1;return new mn(e,r,o,i)}function YC(e){return(14+11*e)%30<11}class U2{fromJulianDay(t){return DT(this,Hg,t)}toJulianDay(t){return Wg(Hg,t.year,t.month,t.day)}getDaysInMonth(t){let n=29+t.month%2;return t.month===12&&YC(t.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(t){return YC(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class lX extends U2{fromJulianDay(t){return DT(this,ZC,t)}toJulianDay(t){return Wg(ZC,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const uX="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let Yb,nc;function kp(e){return sX+nc[e-ro]}function Hd(e,t){let n=e-ro,r=1<<11-(t-1);return Yb[n]&r?30:29}function XC(e,t){let n=kp(e);for(let r=1;r<t;r++)n+=Hd(e,r);return n}function JC(e){return nc[e+1-ro]-nc[e-ro]}class cX extends U2{fromJulianDay(t){let n=t-Hg,r=kp(ro),o=kp(gu);if(n<r||n>o)return super.fromJulianDay(t);{let i=ro-1,a=1,l=1;for(;l>0;){i++,l=n-kp(i)+1;let u=JC(i);if(l===u){a=12;break}else if(l<u){let c=Hd(i,a);for(a=1;l>c;)l-=c,a++,c=Hd(i,a);break}}return new mn(this,i,a,n-XC(i,a)+1)}}toJulianDay(t){return t.year<ro||t.year>gu?super.toJulianDay(t):Hg+XC(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<ro||t.year>gu?super.getDaysInMonth(t):Hd(t.year,t.month)}getDaysInYear(t){return t.year<ro||t.year>gu?super.getDaysInYear(t):JC(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",Yb||(Yb=new Uint16Array(Uint8Array.from(atob(uX),t=>t.charCodeAt(0)).buffer)),!nc){nc=new Uint32Array(gu-ro+1);let t=0;for(let n=ro;n<=gu;n++){nc[n-ro]=t;for(let r=1;r<=12;r++)t+=Hd(n,r)}}}}const e6=347997,jT=1080,PT=24*jT,dX=29,fX=12*jT+793,hX=dX*PT+fX;function _s(e){return ec(e*7+1,19)<7}function Tp(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return ec(3*(r+1),7)<3&&(r+=1),r}function mX(e){let t=Tp(e-1),n=Tp(e);return Tp(e+1)-n===356?2:n-t===382?1:0}function df(e){return Tp(e)+mX(e)}function RT(e){return df(e+1)-df(e)}function pX(e){let t=RT(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function zm(e,t){if(t>=6&&!_s(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=pX(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?_s(e)?30:0:30}class gX{fromJulianDay(t){let n=t-e6,r=n*PT/hX,o=Math.floor((19*r+234)/235)+1,i=df(o),a=Math.floor(n-i);for(;a<1;)o--,i=df(o),a=Math.floor(n-i);let l=1,u=0;for(;u<a;)u+=zm(o,l),l++;l--,u-=zm(o,l);let c=a-u;return new mn(this,o,l,c)}toJulianDay(t){let n=df(t.year);for(let r=1;r<t.month;r++)n+=zm(t.year,r);return n+t.day+e6}getDaysInMonth(t){return zm(t.year,t.month)}getMonthsInYear(t){return _s(t.year)?13:12}getDaysInYear(t){return RT(t.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,n){n.year!==t.year&&(_s(n.year)&&!_s(t.year)&&n.month>6?t.month--:!_s(n.year)&&_s(t.year)&&n.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const Xb=1723856,t6=1824665,Jb=5500;function Gg(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function q2(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Gg(e,n,1,1))/30),o=t+1-Gg(e,n,r,1);return[n,r,o]}function kT(e){return Math.floor(e%4/3)}function TT(e,t){return t%13!==0?30:kT(e)+5}class H2{fromJulianDay(t){let[n,r,o]=q2(Xb,t),i="AM";return n<=0&&(i="AA",n+=Jb),new mn(this,i,n,r,o)}toJulianDay(t){let n=t.year;return t.era==="AA"&&(n-=Jb),Gg(Xb,n,t.month,t.day)}getDaysInMonth(t){return TT(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+kT(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class vX extends H2{fromJulianDay(t){let[n,r,o]=q2(Xb,t);return n+=Jb,new mn(this,"AA",n,r,o)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class yX extends H2{fromJulianDay(t){let[n,r,o]=q2(t6,t),i="CE";return n<=0&&(i="BCE",n=1-n),new mn(this,i,n,r,o)}toJulianDay(t){let n=t.year;return t.era==="BCE"&&(n=1-n),Gg(t6,n,t.month,t.day)}getDaysInMonth(t){let n=t.year;return t.era==="BCE"&&(n=1-n),TT(n,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function xX(e){switch(e){case"buddhist":return new rX;case"ethiopic":return new H2;case"ethioaa":return new vX;case"coptic":return new yX;case"hebrew":return new gX;case"indian":return new aX;case"islamic-civil":return new U2;case"islamic-tbla":return new lX;case"islamic-umalqura":return new cX;case"japanese":return new nX;case"persian":return new iX;case"roc":return new oX;case"gregory":default:return new ir}}let n1=new Map;class ls{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(t),o=this.formatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return $X()&&(this.resolvedHourCycle||(this.resolvedHourCycle=SX(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=IT(t,n),this.options=n}}const bX={true:{ja:"h11"},false:{}};function IT(e,t={}){if(typeof t.hour12=="boolean"&&wX()){t={...t};let o=bX[String(t.hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=o??i,delete t.hour12}let n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(n1.has(n))return n1.get(n);let r=new Intl.DateTimeFormat(e,t);return n1.set(n,r),r}let r1=null;function wX(){return r1==null&&(r1=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),r1}let o1=null;function $X(){return o1==null&&(o1=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),o1}function SX(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=IT(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),o=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(r===0&&o===23)return"h23";if(r===24&&o===23)return"h24";if(r===0&&o===11)return"h11";if(r===12&&o===11)return"h12";throw new Error("Unexpected hour cycle result")}function Io(e){e=H8(e??{},EX);let{locale:t}=Un();return m.useMemo(()=>new ls(t,e),[t,e])}function EX(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n)if(t[o]!==e[o])return!1;return!0}let i1=new Map,e4=!1;try{e4=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Kg=!1;try{Kg=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const AT={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Qg{format(t){let n="";if(!e4&&this.options.signDisplay!=null?n=DX(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Kg){var r;let{unit:o,unitDisplay:i="short",locale:a}=this.resolvedOptions();if(!o)return n;let l=(r=AT[o])===null||r===void 0?void 0:r[i];n+=l[a]||l.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),o=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!e4&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Kg&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=CX(t,n),this.options=n}}function CX(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Kg){var r;let{unit:a,unitDisplay:l="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=AT[a])===null||r===void 0)&&r[l]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${l}`);t={...t,style:"decimal"}}let o=e+(t?Object.entries(t).sort((a,l)=>a[0]<l[0]?-1:1).join():"");if(i1.has(o))return i1.get(o);let i=new Intl.NumberFormat(e,t);return i1.set(o,i),i}function DX(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let o=e.format(-n),i=e.format(n),a=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(a,"+").replace("!!!",i)}else return e.format(n)}}const jX=new RegExp("^.*\\(.*\\).*$"),PX=["latn","arab","hanidec"];class W2{parse(t){return a1(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return a1(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return a1(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const n6=new Map;function a1(e,t,n){let r=r6(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let o of PX)if(o!==r.options.numberingSystem){let i=r6(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,t);if(i.isValidPartialNumber(n))return i}}return r}function r6(e,t){let n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():""),r=n6.get(n);return r||(r=new RX(e,t),n6.set(n,r)),r}class RX{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=Um(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let o=n.indexOf("-");n=n.replace("-","");let i=n.indexOf(".");i===-1&&(i=n.length),n=n.replace(".",""),i-2===0?n=`0.${n}`:i-2===-1?n=`0.0${n}`:i-2===-2?n="0.00":n=`${n.slice(0,i-2)}.${n.slice(i-2)}`,o>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){let o={...this.options,style:"decimal",minimumFractionDigits:Math.min(this.options.minimumFractionDigits+2,20),maximumFractionDigits:Math.min(this.options.maximumFractionDigits+2,20)};return new W2(this.locale,o).parse(new Qg(this.locale,o).format(r))}return this.options.currencySign==="accounting"&&jX.test(t)&&(r=-1*r),r}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=Um(t,".",this.symbols.group))),this.options.locale==="fr-FR"&&(t=Um(t,"."," ")),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&r>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=Um(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=TX(t,this.formatter,this.options,n);var r,o;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const o6=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),kX=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function TX(e,t,n,r){var o,i,a,l;let u=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),c=u.formatToParts(-10000.111),d=u.formatToParts(10000.111),f=kX.map(A=>u.formatToParts(A));var h;let p=(h=(o=c.find(A=>A.type==="minusSign"))===null||o===void 0?void 0:o.value)!==null&&h!==void 0?h:"-",g=(i=d.find(A=>A.type==="plusSign"))===null||i===void 0?void 0:i.value;!g&&((r==null?void 0:r.signDisplay)==="exceptZero"||(r==null?void 0:r.signDisplay)==="always")&&(g="+");let b=(a=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(A=>A.type==="decimal"))===null||a===void 0?void 0:a.value,x=(l=c.find(A=>A.type==="group"))===null||l===void 0?void 0:l.value,y=c.filter(A=>!o6.has(A.type)).map(A=>i6(A.value)),w=f.flatMap(A=>A.filter(P=>!o6.has(P.type)).map(P=>i6(P.value))),S=[...new Set([...y,...w])].sort((A,P)=>P.length-A.length),C=S.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${S.join("|")}|[\\p{White_Space}]`,"gu"),E=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),D=new Map(E.map((A,P)=>[A,P])),$=new RegExp(`[${E.join("")}]`,"g");return{minusSign:p,plusSign:g,decimal:b,group:x,literals:C,numeral:$,index:A=>String(D.get(A))}}function Um(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function i6(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function a6(e={}){let{locale:t}=Un();return m.useMemo(()=>new Qg(t,e),[t,e])}let s1=new Map;function IX(e){let{locale:t}=Un(),n=t+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(s1.has(n))return s1.get(n);let r=new Intl.Collator(t,e);return s1.set(n,r),r}function AX(e){let t=IX({usage:"search",...e}),n=m.useCallback((i,a)=>a.length===0?!0:(i=i.normalize("NFC"),a=a.normalize("NFC"),t.compare(i.slice(0,a.length),a)===0),[t]),r=m.useCallback((i,a)=>a.length===0?!0:(i=i.normalize("NFC"),a=a.normalize("NFC"),t.compare(i.slice(-a.length),a)===0),[t]),o=m.useCallback((i,a)=>{if(a.length===0)return!0;i=i.normalize("NFC"),a=a.normalize("NFC");let l=0,u=a.length;for(;l+u<=i.length;l++){let c=i.slice(l,l+u);if(t.compare(a,c)===0)return!0}return!1},[t]);return m.useMemo(()=>({startsWith:n,endsWith:r,contains:o}),[n,r,o])}function NT(e,t){let{elementType:n="button",isDisabled:r,onPress:o,onPressStart:i,onPressEnd:a,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:h,target:p,rel:g,type:v="button"}=e,b;n==="button"?b={type:v,disabled:r}:b={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:h,target:n==="a"?p:void 0,type:n==="input"?v:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?g:void 0};let{pressProps:x,isPressed:y}=k2({onPressStart:i,onPressEnd:a,onPressChange:u,onPress:o,onPressUp:l,isDisabled:r,preventFocusOnPress:c,ref:t}),{focusableProps:w}=rT(e,t);d&&(w.tabIndex=r?-1:w.tabIndex);let S=zt(w,x,Zl(e,{labelable:!0}));return{isPressed:y,buttonProps:zt(b,S,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:C=>{f&&(f(C),console.warn("onClick is deprecated, please use onPress"))}})}}var FT={};FT={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var MT={};MT={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var OT={};OT={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var _T={};_T={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var LT={};LT={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var VT={};VT={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var BT={};BT={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var zT={};zT={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var UT={};UT={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var qT={};qT={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var HT={};HT={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var WT={};WT={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var GT={};GT={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var KT={};KT={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var QT={};QT={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var ZT={};ZT={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var YT={};YT={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var XT={};XT={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var JT={};JT={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var eI={};eI={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var tI={};tI={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var nI={};nI={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var rI={};rI={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var oI={};oI={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var iI={};iI={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var aI={};aI={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var sI={};sI={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var lI={};lI={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var uI={};uI={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var cI={};cI={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var dI={};dI={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var fI={};fI={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var hI={};hI={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期：${e.date}`,selectedRangeDescription:e=>`选定的范围：${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天，即 ${e.date}`,todayDateSelected:e=>`已选择今天，即 ${e.date}`};var mI={};mI={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期：${e.date}`,selectedRangeDescription:e=>`選定的範圍：${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天，${e.date}`,todayDateSelected:e=>`已選取今天，${e.date}`};var qh={};qh={"ar-AE":FT,"bg-BG":MT,"cs-CZ":OT,"da-DK":_T,"de-DE":LT,"el-GR":VT,"en-US":BT,"es-ES":zT,"et-EE":UT,"fi-FI":qT,"fr-FR":HT,"he-IL":WT,"hr-HR":GT,"hu-HU":KT,"it-IT":QT,"ja-JP":ZT,"ko-KR":YT,"lt-LT":XT,"lv-LV":JT,"nb-NO":eI,"nl-NL":tI,"pl-PL":nI,"pt-BR":rI,"pt-PT":oI,"ro-RO":iI,"ru-RU":aI,"sk-SK":sI,"sl-SI":lI,"sr-SP":uI,"sv-SE":cI,"tr-TR":dI,"uk-UA":fI,"zh-CN":hI,"zh-TW":mI};function pI(e){return e&&e.__esModule?e.default:e}const G2=new WeakMap;function rh(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function NX(e){let t=ua(pI(qh),"@react-aria/calendar"),n,r;"highlightedRange"in e?{start:n,end:r}=e.highlightedRange||{}:n=r=e.value;let o=Io({weekday:"long",month:"long",year:"numeric",day:"numeric",era:rh(n)||rh(r),timeZone:e.timeZone}),i="anchorDate"in e?e.anchorDate:null;return m.useMemo(()=>{if(!i&&n&&r)if(fn(n,r)){let a=o.format(n.toDate(e.timeZone));return t.format("selectedDateDescription",{date:a})}else{let a=n4(o,t,n,r,e.timeZone);return t.format("selectedRangeDescription",{dateRange:a})}return""},[n,r,i,e.timeZone,t,o])}function t4(e,t,n,r){let o=ua(pI(qh),"@react-aria/calendar"),i=rh(e)||rh(t),a=Io({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n}),l=Io({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:n});return m.useMemo(()=>{if(fn(e,zh(e))){if(fn(t,Gb(e)))return a.format(e.toDate(n));if(fn(t,Gb(t)))return r?n4(a,o,e,t,n):a.formatRange(e.toDate(n),t.toDate(n))}return r?n4(l,o,e,t,n):l.formatRange(e.toDate(n),t.toDate(n))},[e,t,a,l,o,n,r])}function n4(e,t,n,r,o){let i=e.formatRangeToParts(n.toDate(o),r.toDate(o)),a=-1;for(let c=0;c<i.length;c++){let d=i[c];if(d.source==="shared"&&d.type==="literal")a=c;else if(d.source==="endRange")break}let l="",u="";for(let c=0;c<i.length;c++)c<a?l+=i[c].value:c>a&&(u+=i[c].value);return t.format("dateRange",{startDate:l,endDate:u})}function FX(e){return e&&e.__esModule?e.default:e}function MX(e,t){let n=ua(FX(qh),"@react-aria/calendar"),r=Zl(e),o=t4(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),i=t4(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);SC(()=>{t.isFocused||Xf(i)},[i]);let a=NX(t);SC(()=>{a&&Xf(a,"polite",4e3)},[a]);let l=Mg([!!e.errorMessage,e.isInvalid,e.validationState]);G2.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:l,selectedDateDescription:a});let[u,c]=m.useState(!1),d=e.isDisabled||t.isNextVisibleRangeInvalid();d&&u&&(c(!1),t.setFocused(!0));let[f,h]=m.useState(!1),p=e.isDisabled||t.isPreviousVisibleRangeInvalid();p&&f&&(h(!1),t.setFocused(!0));let g=_h({id:e.id,"aria-label":[e["aria-label"],i].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:zt(r,g,{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format("next"),isDisabled:d,onFocusChange:c},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format("previous"),isDisabled:p,onFocusChange:h},errorMessageProps:{id:l},title:o}}function OX(e,t,n){let r=MX(e,t),o=m.useRef(!1),i=m.useRef(typeof window<"u"?window:null);return Xu(i,"pointerdown",l=>{o.current=l.width===0&&l.height===0}),Xu(i,"pointerup",l=>{if(o.current){o.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let u=l.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(u)||!u.closest('button, [role="button"]'))&&t.selectFocusedDate()}),r.calendarProps.onBlur=l=>{n.current&&(!l.relatedTarget||!n.current.contains(l.relatedTarget))&&t.anchorDate&&t.selectFocusedDate()},Xu(n,"touchmove",l=>{t.isDragging&&l.preventDefault()},{passive:!1,capture:!0}),r}function _X(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end}=e,{direction:o}=Un(),i=p=>{switch(p.key){case"Enter":case" ":p.preventDefault(),t.selectFocusedDate();break;case"PageUp":p.preventDefault(),p.stopPropagation(),t.focusPreviousSection(p.shiftKey);break;case"PageDown":p.preventDefault(),p.stopPropagation(),t.focusNextSection(p.shiftKey);break;case"End":p.preventDefault(),p.stopPropagation(),t.focusSectionEnd();break;case"Home":p.preventDefault(),p.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":p.preventDefault(),p.stopPropagation(),o==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":p.preventDefault(),p.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":p.preventDefault(),p.stopPropagation(),o==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":p.preventDefault(),p.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(p.preventDefault(),t.setAnchorDate(null));break}},a=t4(n,r,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=G2.get(t),c=_h({"aria-label":[l,a].filter(Boolean).join(", "),"aria-labelledby":u}),d=Io({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=Un(),h=m.useMemo(()=>{let p=eh(r0(t.timeZone),f);return[...new Array(7).keys()].map(g=>{let b=p.add({days:g}).toDate(t.timeZone);return d.format(b)})},[f,t.timeZone,d]);return{gridProps:zt(c,{role:"grid","aria-readonly":t.isReadOnly||null,"aria-disabled":t.isDisabled||null,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:i,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:h}}function LX(e){return e&&e.__esModule?e.default:e}function VX(e,t,n){let{date:r,isDisabled:o}=e,{errorMessageId:i,selectedDateDescription:a}=G2.get(t),l=ua(LX(qh),"@react-aria/calendar"),u=Io({weekday:"long",day:"numeric",month:"long",year:"numeric",era:rh(r),timeZone:t.timeZone}),c=t.isSelected(r),d=t.isCellFocused(r);o=o||t.isCellDisabled(r);let f=t.isCellUnavailable(r),h=!o&&!f,p=t.isValueInvalid&&("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:t.value&&fn(t.value,r));p&&(c=!0),r=H8(r,Wb);let g=m.useMemo(()=>r.toDate(t.timeZone),[r,t.timeZone]),v=lT(r,t.timeZone),b=m.useMemo(()=>{let P="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(fn(r,t.value.start)||fn(r,t.value.end))&&(P=a+", "),P+=u.format(g),v?P=l.format(c?"todayDateSelected":"todayDate",{date:P}):c&&(P=l.format("dateSelected",{date:P})),t.minValue&&fn(r,t.minValue)?P+=", "+l.format("minimumDate"):t.maxValue&&fn(r,t.maxValue)&&(P+=", "+l.format("maximumDate")),P},[u,g,l,c,v,r,t,a]),x="";"anchorDate"in t&&d&&!t.isReadOnly&&h&&(t.anchorDate?x=l.format("finishRangeSelectionPrompt"):x=l.format("startRangeSelectionPrompt"));let y=j2(x),w=m.useRef(!1),S=m.useRef(!1),C=m.useRef(null),{pressProps:E,isPressed:D}=k2({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(P){if(t.isReadOnly){t.setFocusedDate(r);return}if("highlightedRange"in t&&!t.anchorDate&&(P.pointerType==="mouse"||P.pointerType==="touch")){if(t.highlightedRange&&!p){if(fn(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setDragging(!0),S.current=!0;return}else if(fn(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setDragging(!0),S.current=!0;return}}let k=()=>{t.setDragging(!0),C.current=null,t.selectDate(r),t.setFocusedDate(r),w.current=!0};P.pointerType==="touch"?C.current=setTimeout(k,200):k()}},onPressEnd(){S.current=!1,w.current=!1,clearTimeout(C.current),C.current=null},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r))},onPressUp(P){if(!t.isReadOnly&&("anchorDate"in t&&C.current&&(t.selectDate(r),t.setFocusedDate(r)),"anchorDate"in t))if(S.current)t.setAnchorDate(r);else if(t.anchorDate&&!w.current)t.selectDate(r),t.setFocusedDate(r);else if(P.pointerType==="keyboard"&&!t.anchorDate){t.selectDate(r);let k=r.add({days:1});t.isInvalid(k)&&(k=r.subtract({days:1})),t.isInvalid(k)||t.setFocusedDate(k)}else P.pointerType==="virtual"&&(t.selectDate(r),t.setFocusedDate(r))}}),$=null;o||($=fn(r,t.focusedDate)?0:-1),m.useEffect(()=>{d&&n.current&&(Ha(n.current),eT()!=="pointer"&&document.activeElement===n.current&&q8(n.current,{containingElement:Xv(n.current)}))},[d,n]);let T=Io({day:"numeric",timeZone:t.timeZone,calendar:r.calendar.identifier}),A=m.useMemo(()=>T.formatToParts(g).find(P=>P.type==="day").value,[T,g]);return{cellProps:{role:"gridcell","aria-disabled":!h||null,"aria-selected":c||null,"aria-invalid":p||null},buttonProps:zt(E,{onFocus(){o||t.setFocusedDate(r)},tabIndex:$,role:"button","aria-disabled":!h||null,"aria-label":b,"aria-invalid":p||null,"aria-describedby":[p?i:null,y["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(P){"highlightDate"in t&&(P.pointerType!=="touch"||t.isDragging)&&h&&t.highlightDate(r)},onPointerDown(P){"releasePointerCapture"in P.target&&P.target.releasePointerCapture(P.pointerId)},onContextMenu(P){P.preventDefault()}}),isPressed:D,isFocused:d,isSelected:c,isDisabled:o,isUnavailable:f,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:p,formattedDate:A}}function gI(e,t,n){let{validationBehavior:r,focus:o}=e;Rt(()=>{if(r==="native"&&(n!=null&&n.current)){let u=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(zX(n.current))}});let i=Dn(()=>{t.resetValidation()}),a=Dn(u=>{var c;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&n&&d&&UX(d)===n.current){var f;o?o():(f=n.current)===null||f===void 0||f.focus(),YZ("keyboard")}u.preventDefault()}),l=Dn(()=>{t.commitValidation()});m.useEffect(()=>{let u=n==null?void 0:n.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",a),u.addEventListener("change",l),c==null||c.addEventListener("reset",i),()=>{u.removeEventListener("invalid",a),u.removeEventListener("change",l),c==null||c.removeEventListener("reset",i)}},[n,a,l,i,r])}function BX(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function zX(e){return{isInvalid:!e.validity.valid,validationDetails:BX(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function UX(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const i0={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},vI={...i0,customError:!0,valid:!1},Ls={isInvalid:!1,validationDetails:i0,validationErrors:[]},qX=m.createContext({}),oh="__formValidationState"+Date.now();function a0(e){if(e[oh]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=e[oh];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return HX(e)}function HX(e){let{isInvalid:t,validationState:n,name:r,value:o,builtinValidation:i,validate:a,validationBehavior:l="aria"}=e;n&&(t||(t=n==="invalid"));let u=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:vI}:null,c=m.useMemo(()=>s6(WX(a,o)),[a,o]);i!=null&&i.validationDetails.valid&&(i=null);let d=m.useContext(qX),f=m.useMemo(()=>r?Array.isArray(r)?r.flatMap(A=>r4(d[A])):r4(d[r]):[],[d,r]),[h,p]=m.useState(d),[g,v]=m.useState(!1);d!==h&&(p(d),v(!1));let b=m.useMemo(()=>s6(g?[]:f),[g,f]),x=m.useRef(Ls),[y,w]=m.useState(Ls),S=m.useRef(Ls),C=()=>{if(!E)return;D(!1);let A=c||i||x.current;l1(A,S.current)||(S.current=A,w(A))},[E,D]=m.useState(!1);return m.useEffect(C),{realtimeValidation:u||b||c||i||Ls,displayValidation:l==="native"?u||b||y:u||b||c||i||y,updateValidation(A){l==="aria"&&!l1(y,A)?w(A):x.current=A},resetValidation(){let A=Ls;l1(A,S.current)||(S.current=A,w(A)),l==="native"&&D(!1),v(!0)},commitValidation(){l==="native"&&D(!0),v(!0)}}}function r4(e){return e?Array.isArray(e)?e:[e]:[]}function WX(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return r4(n)}return[]}function s6(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:vI}:null}function l1(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function Zg(...e){let t=new Set,n=!1,r={...i0};for(let a of e){var o,i;for(let l of a.validationErrors)t.add(l);n||(n=a.isInvalid);for(let l in r)(o=r)[i=l]||(o[i]=a.validationDetails[l])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}function GX(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=e;t=ii(t);let a=ii(),l={};n?(r=r?`${a} ${r}`:a,l={id:a,htmlFor:i==="label"?t:void 0}):!r&&!o&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=_h({id:t,"aria-label":o,"aria-labelledby":r});return{labelProps:l,fieldProps:u}}function K2(e){let{description:t,errorMessage:n,isInvalid:r,validationState:o}=e,{labelProps:i,fieldProps:a}=GX(e),l=Mg([!!t,!!n,r,o]),u=Mg([!!t,!!n,r,o]);return a=zt(a,{"aria-describedby":[l,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:a,descriptionProps:{id:l},errorMessageProps:{id:u}}}const _u={top:"top",bottom:"top",left:"left",right:"left"},Yg={top:"bottom",bottom:"top",left:"right",right:"left"},KX={top:"left",left:"top"},o4={top:"height",left:"width"},yI={width:"totalWidth",height:"totalHeight"},qm={};let fr=typeof document<"u"&&window.visualViewport;function l6(e){let t=0,n=0,r=0,o=0,i=0,a=0,l={},u=(fr==null?void 0:fr.scale)>1;if(e.tagName==="BODY"){let f=document.documentElement;r=f.clientWidth,o=f.clientHeight;var c;t=(c=fr==null?void 0:fr.width)!==null&&c!==void 0?c:r;var d;n=(d=fr==null?void 0:fr.height)!==null&&d!==void 0?d:o,l.top=f.scrollTop||e.scrollTop,l.left=f.scrollLeft||e.scrollLeft,fr&&(i=fr.offsetTop,a=fr.offsetLeft)}else({width:t,height:n,top:i,left:a}=rc(e)),l.top=e.scrollTop,l.left=e.scrollLeft,r=t,o=n;return V8()&&(e.tagName==="BODY"||e.tagName==="HTML")&&u&&(l.top=0,l.left=0,i=fr.pageTop,a=fr.pageLeft),{width:t,height:n,totalWidth:r,totalHeight:o,scroll:l,top:i,left:a}}function QX(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function u6(e,t,n,r,o,i,a){let l=o.scroll[e],u=r[o4[e]],c=r.scroll[_u[e]]+i,d=u+r.scroll[_u[e]]-i,f=t-l+a[e]-r[_u[e]],h=t-l+n+a[e]-r[_u[e]];return f<c?c-f:h>d?Math.max(d-h,c-f):0}function ZX(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function c6(e){if(qm[e])return qm[e];let[t,n]=e.split(" "),r=_u[t]||"right",o=KX[r];_u[n]||(n="center");let i=o4[r],a=o4[o];return qm[e]={placement:t,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:a},qm[e]}function u1(e,t,n,r,o,i,a,l,u,c){let{placement:d,crossPlacement:f,axis:h,crossAxis:p,size:g,crossSize:v}=r,b={};b[p]=e[p],f==="center"?b[p]+=(e[v]-n[v])/2:f!==p&&(b[p]+=e[v]-n[v]),b[p]+=i;const x=e[p]-n[v]+u+c,y=e[p]+e[v]-u-c;if(b[p]=Ju(b[p],x,y),d===h){const w=l?a[g]:t[yI[g]];b[Yg[h]]=Math.floor(w-e[h]+o)}else b[h]=Math.floor(e[h]+e[g]+o);return b}function YX(e,t,n,r,o,i,a,l){const u=r?n.height:t[yI.height];let c=e.top!=null?n.top+e.top:n.top+(u-e.bottom-a),d=l!=="top"?Math.max(0,t.height+t.top+t.scroll.top-c-(o.top+o.bottom+i)):Math.max(0,c+a-(t.top+t.scroll.top)-(o.top+o.bottom+i));return Math.min(t.height-i*2,d)}function d6(e,t,n,r,o,i){let{placement:a,axis:l,size:u}=i;return a===l?Math.max(0,n[l]-e[l]-e.scroll[l]+t[l]-r[l]-r[Yg[l]]-o):Math.max(0,e[u]+e[l]+e.scroll[l]-t[l]-n[l]-n[u]-r[l]-r[Yg[l]]-o)}function XX(e,t,n,r,o,i,a,l,u,c,d,f,h,p,g,v){let b=c6(e),{size:x,crossAxis:y,crossSize:w,placement:S,crossPlacement:C}=b,E=u1(t,l,n,b,d,f,c,h,g,v),D=d,$=d6(l,c,t,o,i+d,b);if(a&&r[x]>$){let O=c6(`${Yg[S]} ${C}`),q=u1(t,l,n,O,d,f,c,h,g,v);d6(l,c,t,o,i+d,O)>$&&(b=O,E=q,D=d)}let T="bottom";b.axis==="top"?b.placement==="top"?T="top":b.placement==="bottom"&&(T="bottom"):b.crossAxis==="top"&&(b.crossPlacement==="top"?T="bottom":b.crossPlacement==="bottom"&&(T="top"));let A=u6(y,E[y],n[w],l,u,i,c);E[y]+=A;let P=YX(E,l,c,h,o,i,n.height,T);p&&p<P&&(P=p),n.height=Math.min(n.height,P),E=u1(t,l,n,b,D,f,c,h,g,v),A=u6(y,E[y],n[w],l,u,i,c),E[y]+=A;let k={},N=t[y]+.5*t[w]-n[y];const j=g/2+v,F=n[w]-g/2-v,I=t[y]-n[y]+g/2,R=t[y]+t[w]-n[y]-g/2,M=Ju(N,I,R);return k[y]=Ju(M,j,F),{position:E,maxHeight:P,arrowOffsetLeft:k.left,arrowOffsetTop:k.top,placement:b.placement}}function JX(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:o,padding:i,shouldFlip:a,boundaryElement:l,offset:u,crossOffset:c,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:h=0}=e,p=r instanceof HTMLElement?eJ(r):document.documentElement,g=p===document.documentElement;const v=window.getComputedStyle(p).position;let b=!!v&&v!=="static",x=g?rc(n):f6(n,p);if(!g){let{marginTop:$,marginLeft:T}=window.getComputedStyle(n);x.top+=parseInt($,10)||0,x.left+=parseInt(T,10)||0}let y=rc(r),w=ZX(r);y.width+=w.left+w.right,y.height+=w.top+w.bottom;let S=QX(o),C=l6(l),E=l6(p),D=l.tagName==="BODY"?rc(p):f6(p,l);return p.tagName==="HTML"&&l.tagName==="BODY"&&(E.scroll.top=0,E.scroll.left=0),XX(t,x,y,S,w,i,a,C,E,D,u,c,b,d,f,h)}function rc(e){let{top:t,left:n,width:r,height:o}=e.getBoundingClientRect(),{scrollTop:i,scrollLeft:a,clientTop:l,clientLeft:u}=document.documentElement;return{top:t+i-l,left:n+a-u,width:r,height:o}}function f6(e,t){let n=window.getComputedStyle(e),r;if(n.position==="fixed"){let{top:o,left:i,width:a,height:l}=e.getBoundingClientRect();r={top:o,left:i,width:a,height:l}}else{r=rc(e);let o=rc(t),i=window.getComputedStyle(t);o.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=o.top,r.left-=o.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function eJ(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position==="static"&&!h6(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!h6(t);)t=t.parentElement;return t||document.documentElement}function h6(e){let t=window.getComputedStyle(e);return t.transform!=="none"||/transform|perspective/.test(t.willChange)||t.filter!=="none"||t.contain==="paint"||"backdropFilter"in t&&t.backdropFilter!=="none"||"WebkitBackdropFilter"in t&&t.WebkitBackdropFilter!=="none"}const tJ=new WeakMap;function nJ(e){let{triggerRef:t,isOpen:n,onClose:r}=e;m.useEffect(()=>{if(!n||r===null)return;let o=i=>{let a=i.target;if(!t.current||a instanceof Node&&!a.contains(t.current))return;let l=r||tJ.get(t.current);l&&l()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[n,r,t])}let en=typeof document<"u"&&window.visualViewport;function rJ(e){let{direction:t}=Un(),{arrowSize:n=0,targetRef:r,overlayRef:o,scrollRef:i=o,placement:a="bottom",containerPadding:l=12,shouldFlip:u=!0,boundaryElement:c=typeof document<"u"?document.body:null,offset:d=0,crossOffset:f=0,shouldUpdatePosition:h=!0,isOpen:p=!0,onClose:g,maxHeight:v,arrowBoundaryOffset:b=0}=e,[x,y]=m.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),w=[h,a,o.current,r.current,i.current,l,u,c,d,f,p,t,v,b,n],S=m.useRef(en==null?void 0:en.scale);m.useEffect(()=>{p&&(S.current=en==null?void 0:en.scale)},[p]);let C=m.useCallback(()=>{if(h===!1||!p||!o.current||!r.current||!i.current||!c||(en==null?void 0:en.scale)!==S.current)return;!v&&o.current&&(o.current.style.maxHeight="none");let $=JX({placement:iJ(a,t),overlayNode:o.current,targetNode:r.current,scrollNode:i.current,padding:l,shouldFlip:u,boundaryElement:c,offset:d,crossOffset:f,maxHeight:v,arrowSize:n,arrowBoundaryOffset:b});Object.keys($.position).forEach(T=>o.current.style[T]=$.position[T]+"px"),o.current.style.maxHeight=$.maxHeight!=null?$.maxHeight+"px":void 0,y($)},w);Rt(C,w),oJ(C),IZ({ref:o,onResize:C});let E=m.useRef(!1);Rt(()=>{let $,T=()=>{E.current=!0,clearTimeout($),$=setTimeout(()=>{E.current=!1},500),C()},A=()=>{E.current&&T()};return en==null||en.addEventListener("resize",T),en==null||en.addEventListener("scroll",A),()=>{en==null||en.removeEventListener("resize",T),en==null||en.removeEventListener("scroll",A)}},[C]);let D=m.useCallback(()=>{E.current||g()},[g,E]);return nJ({triggerRef:r,isOpen:p,onClose:g&&D}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...x.position,maxHeight:x.maxHeight}},placement:x.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:x.arrowOffsetLeft,top:x.arrowOffsetTop}},updatePosition:C}}function oJ(e){Rt(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function iJ(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}const Ci=[];function aJ(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:l}=e;m.useEffect(()=>(o&&Ci.push(t),()=>{let g=Ci.indexOf(t);g>=0&&Ci.splice(g,1)}),[o,t]);let u=()=>{Ci[Ci.length-1]===t&&n&&n()},c=g=>{(!l||l(g.target))&&Ci[Ci.length-1]===t&&(g.stopPropagation(),g.preventDefault())},d=g=>{(!l||l(g.target))&&(Ci[Ci.length-1]===t&&(g.stopPropagation(),g.preventDefault()),u())},f=g=>{g.key==="Escape"&&!a&&!g.nativeEvent.isComposing&&(g.stopPropagation(),g.preventDefault(),u())};nY({ref:t,onInteractOutside:i&&o?d:null,onInteractOutsideStart:c});let{focusWithinProps:h}=Qc({isDisabled:!r,onBlurWithin:g=>{!g.relatedTarget||fY(g.relatedTarget)||(!l||l(g.relatedTarget))&&n()}}),p=g=>{g.target===g.currentTarget&&g.preventDefault()};return{overlayProps:{onKeyDown:f,...h},underlayProps:{onPointerDown:p}}}const c1=typeof document<"u"&&window.visualViewport,sJ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Hm=0,d1;function lJ(e={}){let{isDisabled:t}=e;Rt(()=>{if(!t)return Hm++,Hm===1&&(Oh()?d1=cJ():d1=uJ()),()=>{Hm--,Hm===0&&d1()}},[t])}function uJ(){return Nc(Lu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Lu(document.documentElement,"overflow","hidden"))}function cJ(){let e,t,n=c=>{e=Xv(c.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=Lu(e,"overscrollBehavior","contain"))},r=c=>{if(!e||e===document.documentElement||e===document.body){c.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&c.preventDefault()},o=c=>{let d=c.target;p6(d)&&d!==document.activeElement&&(c.preventDefault(),l(),d.style.transform="translateY(-2000px)",d.focus(),requestAnimationFrame(()=>{d.style.transform=""})),t&&t()},i=c=>{let d=c.target;p6(d)&&(l(),d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",c1&&(c1.height<window.innerHeight?requestAnimationFrame(()=>{m6(d)}):c1.addEventListener("resize",()=>m6(d),{once:!0}))}))},a=null,l=()=>{if(a)return;let c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset;a=Nc(xd(window,"scroll",c),Lu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Lu(document.documentElement,"overflow","hidden"),Lu(document.body,"marginTop",`-${f}px`),()=>{window.scrollTo(d,f)}),window.scrollTo(0,0)},u=Nc(xd(document,"touchstart",n,{passive:!1,capture:!0}),xd(document,"touchmove",r,{passive:!1,capture:!0}),xd(document,"touchend",o,{passive:!1,capture:!0}),xd(document,"focus",i,!0));return()=>{t==null||t(),a==null||a(),u()}}function Lu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function xd(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function m6(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Xv(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top;o>r+e.clientHeight&&(n.scrollTop+=o-r)}e=n.parentElement}}function p6(e){return e instanceof HTMLInputElement&&!sJ.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var xI={};xI={dismiss:"تجاهل"};var bI={};bI={dismiss:"Отхвърляне"};var wI={};wI={dismiss:"Odstranit"};var $I={};$I={dismiss:"Luk"};var SI={};SI={dismiss:"Schließen"};var EI={};EI={dismiss:"Απόρριψη"};var CI={};CI={dismiss:"Dismiss"};var DI={};DI={dismiss:"Descartar"};var jI={};jI={dismiss:"Lõpeta"};var PI={};PI={dismiss:"Hylkää"};var RI={};RI={dismiss:"Rejeter"};var kI={};kI={dismiss:"התעלם"};var TI={};TI={dismiss:"Odbaci"};var II={};II={dismiss:"Elutasítás"};var AI={};AI={dismiss:"Ignora"};var NI={};NI={dismiss:"閉じる"};var FI={};FI={dismiss:"무시"};var MI={};MI={dismiss:"Atmesti"};var OI={};OI={dismiss:"Nerādīt"};var _I={};_I={dismiss:"Lukk"};var LI={};LI={dismiss:"Negeren"};var VI={};VI={dismiss:"Zignoruj"};var BI={};BI={dismiss:"Descartar"};var zI={};zI={dismiss:"Dispensar"};var UI={};UI={dismiss:"Revocare"};var qI={};qI={dismiss:"Пропустить"};var HI={};HI={dismiss:"Zrušiť"};var WI={};WI={dismiss:"Opusti"};var GI={};GI={dismiss:"Odbaci"};var KI={};KI={dismiss:"Avvisa"};var QI={};QI={dismiss:"Kapat"};var ZI={};ZI={dismiss:"Скасувати"};var YI={};YI={dismiss:"取消"};var XI={};XI={dismiss:"關閉"};var JI={};JI={"ar-AE":xI,"bg-BG":bI,"cs-CZ":wI,"da-DK":$I,"de-DE":SI,"el-GR":EI,"en-US":CI,"es-ES":DI,"et-EE":jI,"fi-FI":PI,"fr-FR":RI,"he-IL":kI,"hr-HR":TI,"hu-HU":II,"it-IT":AI,"ja-JP":NI,"ko-KR":FI,"lt-LT":MI,"lv-LV":OI,"nb-NO":_I,"nl-NL":LI,"pl-PL":VI,"pt-BR":BI,"pt-PT":zI,"ro-RO":UI,"ru-RU":qI,"sk-SK":HI,"sl-SI":WI,"sr-SP":GI,"sv-SE":KI,"tr-TR":QI,"uk-UA":ZI,"zh-CN":YI,"zh-TW":XI};const g6={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function dJ(e={}){let{style:t,isFocusable:n}=e,[r,o]=m.useState(!1),{focusWithinProps:i}=Qc({isDisabled:!n,onFocusWithinChange:l=>o(l)}),a=m.useMemo(()=>r?t:t?{...g6,...t}:g6,[r]);return{visuallyHiddenProps:{...i,style:a}}}function fJ(e){let{children:t,elementType:n="div",isFocusable:r,style:o,...i}=e,{visuallyHiddenProps:a}=dJ(e);return U.createElement(n,zt(i,a),t)}function hJ(e){return e&&e.__esModule?e.default:e}function v6(e){let{onDismiss:t,...n}=e,r=ua(hJ(JI),"@react-aria/overlays"),o=_h(n,r.format("dismiss")),i=()=>{t&&t()};return U.createElement(fJ,null,U.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}let bd=new WeakMap,eo=[];function mJ(e,t=document.body){let n=new Set(e),r=new Set,o=u=>{for(let h of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(h);let c=h=>{if(n.has(h)||r.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let p of n)if(h.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),f=c(u);if(f===NodeFilter.FILTER_ACCEPT&&i(u),f!==NodeFilter.FILTER_REJECT){let h=d.nextNode();for(;h!=null;)i(h),h=d.nextNode()}},i=u=>{var c;let d=(c=bd.get(u))!==null&&c!==void 0?c:0;u.getAttribute("aria-hidden")==="true"&&d===0||(d===0&&u.setAttribute("aria-hidden","true"),r.add(u),bd.set(u,d+1))};eo.length&&eo[eo.length-1].disconnect(),o(t);let a=new MutationObserver(u=>{for(let c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(d=>d.contains(c.target))){for(let d of c.removedNodes)d instanceof Element&&(n.delete(d),r.delete(d));for(let d of c.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?n.add(d):d instanceof Element&&o(d)}});a.observe(t,{childList:!0,subtree:!0});let l={observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return eo.push(l),()=>{a.disconnect();for(let u of r){let c=bd.get(u);c===1?(u.removeAttribute("aria-hidden"),bd.delete(u)):bd.set(u,c-1)}l===eo[eo.length-1]?(eo.pop(),eo.length&&eo[eo.length-1].observe()):eo.splice(eo.indexOf(l),1)}}function pJ(e,t){let{triggerRef:n,popoverRef:r,isNonModal:o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:a,...l}=e,{overlayProps:u,underlayProps:c}=aJ({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:a},r),{overlayProps:d,arrowProps:f,placement:h}=rJ({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:o?t.close:null});return lJ({isDisabled:o||!t.isOpen}),Rt(()=>{if(t.isOpen&&!o&&r.current)return mJ([r.current])},[o,t.isOpen,r]),{popoverProps:zt(u,d),arrowProps:f,underlayProps:c,placement:h}}const gJ=m.createContext({});function vJ(){var e;return(e=m.useContext(gJ))!==null&&e!==void 0?e:{}}const e9=U.createContext(null);function yJ(e){let t=E2(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[o,i]=m.useState(!1),a=m.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:l}=vJ();if(!e.portalContainer&&l&&(n=l()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=U.createElement(sY,{restoreFocus:!0,contain:o&&!r},u)),u=U.createElement(e9.Provider,{value:a},U.createElement(WZ,null,u)),mw.createPortal(u,n)}function xJ(){let e=m.useContext(e9),t=e==null?void 0:e.setContain;Rt(()=>{t==null||t(!0)},[t])}function bJ(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:l="aria"}=e,[u,c]=Ji(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=rT(e,t),f=a0({...e,value:u}),{isInvalid:h,validationErrors:p,validationDetails:g}=f.displayValidation,{labelProps:v,fieldProps:b,descriptionProps:x,errorMessageProps:y}=K2({...e,isInvalid:h,errorMessage:e.errorMessage||p}),w=Zl(e,{labelable:!0});const S={type:a,pattern:e.pattern};return P2(t,u,c),gI(e,f,t),m.useEffect(()=>{if(t.current instanceof fo(t.current).HTMLTextAreaElement){let C=t.current;Object.defineProperty(C,"defaultValue",{get:()=>C.value,set:()=>{},configurable:!0})}},[t]),{labelProps:v,inputProps:zt(w,n==="input"&&S,{disabled:r,readOnly:i,required:o&&l==="native","aria-required":o&&l==="aria"||void 0,"aria-invalid":h||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:u,onChange:C=>c(C.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...b}),descriptionProps:x,errorMessageProps:y,isInvalid:h,validationErrors:p,validationDetails:g}}function y6(){return typeof window<"u"&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"}function wJ(e,t,n){let r=Dn(f=>{let h=n.current,p;switch(f.inputType){case"historyUndo":case"historyRedo":return;case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":p=h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd);break;case"deleteContentForward":p=h.selectionEnd===h.selectionStart?h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd+1):h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd);break;case"deleteContentBackward":p=h.selectionEnd===h.selectionStart?h.value.slice(0,h.selectionStart-1)+h.value.slice(h.selectionStart):h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":p=h.value.slice(h.selectionStart);break;default:f.data!=null&&(p=h.value.slice(0,h.selectionStart)+f.data+h.value.slice(h.selectionEnd));break}(p==null||!t.validate(p))&&f.preventDefault()});m.useEffect(()=>{if(!y6())return;let f=n.current;return f.addEventListener("beforeinput",r,!1),()=>{f.removeEventListener("beforeinput",r,!1)}},[n,r]);let o=y6()?null:f=>{let h=f.target.value.slice(0,f.target.selectionStart)+f.data+f.target.value.slice(f.target.selectionEnd);t.validate(h)||f.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:l,errorMessageProps:u,...c}=bJ(e,n),d=m.useRef(null);return{inputProps:zt(a,{onBeforeInput:o,onCompositionStart(){let{value:f,selectionStart:h,selectionEnd:p}=n.current;d.current={value:f,selectionStart:h,selectionEnd:p}},onCompositionEnd(){if(!t.validate(n.current.value)){let{value:f,selectionStart:h,selectionEnd:p}=d.current;n.current.value=f,n.current.setSelectionRange(h,p),t.setInputValue(f)}}}),labelProps:i,descriptionProps:l,errorMessageProps:u,...c}}var t9={};t9={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var n9={};n9={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var r9={};r9={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var o9={};o9={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var i9={};i9={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var a9={};a9={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var s9={};s9={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var l9={};l9={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var u9={};u9={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var c9={};c9={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var d9={};d9={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var f9={};f9={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var h9={};h9={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var m9={};m9={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var p9={};p9={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var g9={};g9={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var v9={};v9={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var y9={};y9={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var x9={};x9={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var b9={};b9={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var w9={};w9={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var $9={};$9={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var S9={};S9={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var E9={};E9={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var C9={};C9={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var D9={};D9={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var j9={};j9={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var P9={};P9={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var R9={};R9={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var k9={};k9={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var T9={};T9={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var I9={};I9={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var A9={};A9={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期：${e.date}`,selectedRangeDescription:e=>`选定的范围：${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间：${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var N9={};N9={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期：${e.date}`,selectedRangeDescription:e=>`選定的範圍：${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間：${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var s0={};s0={"ar-AE":t9,"bg-BG":n9,"cs-CZ":r9,"da-DK":o9,"de-DE":i9,"el-GR":a9,"en-US":s9,"es-ES":l9,"et-EE":u9,"fi-FI":c9,"fr-FR":d9,"he-IL":f9,"hr-HR":h9,"hu-HU":m9,"it-IT":p9,"ja-JP":g9,"ko-KR":v9,"lt-LT":y9,"lv-LV":x9,"nb-NO":b9,"nl-NL":w9,"pl-PL":$9,"pt-BR":S9,"pt-PT":E9,"ro-RO":C9,"ru-RU":D9,"sk-SK":j9,"sl-SI":P9,"sr-SP":R9,"sv-SE":k9,"tr-TR":T9,"uk-UA":I9,"zh-CN":A9,"zh-TW":N9};function F9(e,t,n){let{direction:r}=Un(),o=m.useMemo(()=>N2(t),[t]),i=u=>{if(u.currentTarget.contains(u.target)&&(u.altKey&&(u.key==="ArrowDown"||u.key==="ArrowUp")&&"setOpen"in e&&(u.preventDefault(),u.stopPropagation(),e.setOpen(!0)),!n))switch(u.key){case"ArrowLeft":u.preventDefault(),u.stopPropagation(),r==="rtl"?o.focusNext():o.focusPrevious();break;case"ArrowRight":u.preventDefault(),u.stopPropagation(),r==="rtl"?o.focusPrevious():o.focusNext();break}},a=()=>{var u;let c=(u=window.event)===null||u===void 0?void 0:u.target,d=Br(t.current,{tabbable:!0});if(c&&(d.currentNode=c,c=d.previousNode()),!c){let f;do f=d.lastChild(),f&&(c=f);while(f)}for(;c!=null&&c.hasAttribute("data-placeholder");){let f=d.previousNode();if(f&&f.hasAttribute("data-placeholder"))c=f;else break}c&&c.focus()},{pressProps:l}=k2({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(u){u.pointerType==="mouse"&&a()},onPress(u){u.pointerType!=="mouse"&&a()}});return zt(l,{onKeyDown:i})}function $J(e){return e&&e.__esModule?e.default:e}const M9=new WeakMap,Ip="__role_"+Date.now(),O9="__focusManager_"+Date.now();function SJ(e,t,n){var r;let{isInvalid:o,validationErrors:i,validationDetails:a}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=K2({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),f=m.useRef(null),{focusWithinProps:h}=Qc({...e,onFocusWithin(A){var P;f.current=t.value,(P=e.onFocus)===null||P===void 0||P.call(e,A)},onBlurWithin:A=>{var P;t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),(P=e.onBlur)===null||P===void 0||P.call(e,A)},onFocusWithinChange:e.onFocusChange}),p=ua($J(s0),"@react-aria/datepicker"),g=t.maxGranularity==="hour"?"selectedTimeDescription":"selectedDateDescription",v=t.maxGranularity==="hour"?"time":"date",b=t.value?p.format(g,{[v]:t.formatValue({month:"long"})}):"",x=j2(b),y=e[Ip]==="presentation"?u["aria-describedby"]:[x["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[O9],S=m.useMemo(()=>w||N2(n),[w,n]),C=F9(t,n,e[Ip]==="presentation");M9.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:y,focusManager:S});let E=m.useRef(e.autoFocus),D;e[Ip]==="presentation"?D={role:"presentation"}:D=zt(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":y}),m.useEffect(()=>{E.current&&S.focusFirst(),E.current=!1},[S]),P2(e.inputRef,t.value,t.setValue),gI({...e,focus(){S.focusFirst()}},t,e.inputRef);let $={type:"hidden",name:e.name,value:((r=t.value)===null||r===void 0?void 0:r.toString())||""};e.validationBehavior==="native"&&($.type="text",$.hidden=!0,$.required=e.isRequired,$.onChange=()=>{});let T=Zl(e);return{labelProps:{...l,onClick:()=>{S.focusFirst()}},fieldProps:zt(T,D,C,h,{onKeyDown(A){e.onKeyDown&&e.onKeyDown(A)},onKeyUp(A){e.onKeyUp&&e.onKeyUp(A)}}),inputProps:$,descriptionProps:c,errorMessageProps:d,isInvalid:o,validationErrors:i,validationDetails:a}}function EJ(e,t,n){var r;let o=SJ(e,t,n);return o.inputProps.value=((r=t.timeValue)===null||r===void 0?void 0:r.toString())||"",o}function CJ(e){return e&&e.__esModule?e.default:e}function DJ(){let{locale:e}=Un(),t=aT(CJ(s0),"@react-aria/datepicker");return m.useMemo(()=>{try{return new Intl.DisplayNames(e,{type:"dateTimeField"})}catch{return new jJ(e,t)}},[e,t])}class jJ{of(t){return this.dictionary.getStringForLocale(t,this.locale)}constructor(t,n){this.locale=t,this.dictionary=n}}var _9={};_9={Empty:"فارغ"};var L9={};L9={Empty:"Изпразни"};var V9={};V9={Empty:"Prázdné"};var B9={};B9={Empty:"Tom"};var z9={};z9={Empty:"Leer"};var U9={};U9={Empty:"Άδειο"};var q9={};q9={Empty:"Empty"};var H9={};H9={Empty:"Vacío"};var W9={};W9={Empty:"Tühjenda"};var G9={};G9={Empty:"Tyhjä"};var K9={};K9={Empty:"Vide"};var Q9={};Q9={Empty:"ריק"};var Z9={};Z9={Empty:"Prazno"};var Y9={};Y9={Empty:"Üres"};var X9={};X9={Empty:"Vuoto"};var J9={};J9={Empty:"空"};var eA={};eA={Empty:"비어 있음"};var tA={};tA={Empty:"Tuščias"};var nA={};nA={Empty:"Tukšs"};var rA={};rA={Empty:"Tom"};var oA={};oA={Empty:"Leeg"};var iA={};iA={Empty:"Pusty"};var aA={};aA={Empty:"Vazio"};var sA={};sA={Empty:"Vazio"};var lA={};lA={Empty:"Gol"};var uA={};uA={Empty:"Не заполнено"};var cA={};cA={Empty:"Prázdne"};var dA={};dA={Empty:"Prazen"};var fA={};fA={Empty:"Prazno"};var hA={};hA={Empty:"Tomt"};var mA={};mA={Empty:"Boş"};var pA={};pA={Empty:"Пусто"};var gA={};gA={Empty:"空"};var vA={};vA={Empty:"空白"};var yA={};yA={"ar-AE":_9,"bg-BG":L9,"cs-CZ":V9,"da-DK":B9,"de-DE":z9,"el-GR":U9,"en-US":q9,"es-ES":H9,"et-EE":W9,"fi-FI":G9,"fr-FR":K9,"he-IL":Q9,"hr-HR":Z9,"hu-HU":Y9,"it-IT":X9,"ja-JP":J9,"ko-KR":eA,"lt-LT":tA,"lv-LV":nA,"nb-NO":rA,"nl-NL":oA,"pl-PL":iA,"pt-BR":aA,"pt-PT":sA,"ro-RO":lA,"ru-RU":uA,"sk-SK":cA,"sl-SI":dA,"sr-SP":fA,"sv-SE":hA,"tr-TR":mA,"uk-UA":pA,"zh-CN":gA,"zh-TW":vA};function PJ(e){return e&&e.__esModule?e.default:e}function xA(e){const t=m.useRef();let{value:n,textValue:r,minValue:o,maxValue:i,isDisabled:a,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:h,onDecrementToMin:p,onIncrementToMax:g}=e;const v=ua(PJ(yA),"@react-aria/spinbutton"),b=()=>clearTimeout(t.current);m.useEffect(()=>()=>b(),[]);let x=P=>{if(!(P.ctrlKey||P.metaKey||P.shiftKey||P.altKey||l))switch(P.key){case"PageUp":if(d){P.preventDefault(),d==null||d();break}case"ArrowUp":case"Up":c&&(P.preventDefault(),c==null||c());break;case"PageDown":if(h){P.preventDefault(),h==null||h();break}case"ArrowDown":case"Down":f&&(P.preventDefault(),f==null||f());break;case"Home":p&&(P.preventDefault(),p==null||p());break;case"End":g&&(P.preventDefault(),g==null||g());break}},y=m.useRef(!1),w=()=>{y.current=!0},S=()=>{y.current=!1},C=r===""?v.format("Empty"):(r||`${n}`).replace("-","−");m.useEffect(()=>{y.current&&(oZ("assertive"),Xf(C,"assertive"))},[C]);const E=Dn(P=>{b(),c==null||c(),t.current=window.setTimeout(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n<i)&&E(60)},P)}),D=Dn(P=>{b(),f==null||f(),t.current=window.setTimeout(()=>{(o===void 0||isNaN(o)||n===void 0||isNaN(n)||n>o)&&D(60)},P)});let $=P=>{P.preventDefault()},{addGlobalListener:T,removeAllGlobalListeners:A}=z8();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":C,"aria-valuemin":o,"aria-valuemax":i,"aria-disabled":a||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:x,onFocus:w,onBlur:S},incrementButtonProps:{onPressStart:()=>{E(400),T(window,"contextmenu",$)},onPressEnd:()=>{b(),A()},onFocus:w,onBlur:S},decrementButtonProps:{onPressStart:()=>{D(400),T(window,"contextmenu",$)},onPressEnd:()=>{b(),A()},onFocus:w,onBlur:S}}}function RJ(e,t,n){let r=m.useRef(""),{locale:o}=Un(),i=DJ(),{ariaLabel:a,ariaLabelledBy:l,ariaDescribedBy:u,focusManager:c}=M9.get(t),d=e.isPlaceholder?"":e.text,f=m.useMemo(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),h=Io({month:"long",timeZone:f.timeZone}),p=Io({hour:"numeric",hour12:f.hour12,timeZone:f.timeZone});if(e.type==="month"&&!e.isPlaceholder){let R=h.format(t.dateValue);d=R!==d?`${d} – ${R}`:R}else e.type==="hour"&&!e.isPlaceholder&&(d=p.format(t.dateValue));let{spinButtonProps:g}=xA({value:e.value,textValue:d,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{r.current="",t.increment(e.type)},onDecrement:()=>{r.current="",t.decrement(e.type)},onIncrementPage:()=>{r.current="",t.incrementPage(e.type)},onDecrementPage:()=>{r.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{r.current="",t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{r.current="",t.setSegment(e.type,e.minValue)}}),v=m.useMemo(()=>new W2(o,{maximumFractionDigits:0}),[o]),b=()=>{if(e.text===e.placeholder&&c.focusPrevious(),v.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let R=e.text.slice(0,-1),M=v.parse(R);R=M===0?"":R,R.length===0||M===0?t.clearSegment(e.type):t.setSegment(e.type,M),r.current=R}else e.type==="dayPeriod"&&t.clearSegment(e.type)},x=R=>{if(R.key==="a"&&(Fc()?R.metaKey:R.ctrlKey)&&R.preventDefault(),!(R.ctrlKey||R.metaKey||R.shiftKey||R.altKey))switch(R.key){case"Backspace":case"Delete":R.preventDefault(),R.stopPropagation(),b();break}},{startsWith:y}=AX({sensitivity:"base"}),w=Io({hour:"numeric",hour12:!0}),S=m.useMemo(()=>{let R=new Date;return R.setHours(0),w.formatToParts(R).find(M=>M.type==="dayPeriod").value},[w]),C=m.useMemo(()=>{let R=new Date;return R.setHours(12),w.formatToParts(R).find(M=>M.type==="dayPeriod").value},[w]),E=Io({year:"numeric",era:"narrow",timeZone:"UTC"}),D=m.useMemo(()=>{if(e.type!=="era")return[];let R=Lt(new mn(1,1,1),t.calendar),M=t.calendar.getEras().map(q=>{let H=R.set({year:1,month:1,day:1,era:q}).toDate("UTC"),ce=E.formatToParts(H).find(Z=>Z.type==="era").value;return{era:q,formatted:ce}}),O=kJ(M.map(q=>q.formatted));if(O)for(let q of M)q.formatted=q.formatted.slice(O);return M},[E,t.calendar,e.type]),$=R=>{if(t.isDisabled||t.isReadOnly)return;let M=r.current+R;switch(e.type){case"dayPeriod":if(y(S,R))t.setSegment("dayPeriod",0);else if(y(C,R))t.setSegment("dayPeriod",12);else break;c.focusNext();break;case"era":{let O=D.find(q=>y(q.formatted,R));O&&(t.setSegment("era",O.era),c.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!v.isValidPartialNumber(M))return;let O=v.parse(M),q=O,H=e.minValue===0;if(e.type==="hour"&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":O>11&&(q=v.parse(R));break;case"h12":H=!1,O>12&&(q=v.parse(R));break}e.value>=12&&O>1&&(O+=12)}else O>e.maxValue&&(q=v.parse(R));if(isNaN(O))return;let G=q!==0||H;G&&t.setSegment(e.type,q),+(O+"0")>e.maxValue||M.length>=String(e.maxValue).length?(r.current="",G&&c.focusNext()):r.current=M;break}}},T=()=>{r.current="",q8(n.current,{containingElement:Xv(n.current)}),window.getSelection().collapse(n.current)},A=m.useRef("");Xu(n,"beforeinput",R=>{switch(R.preventDefault(),R.inputType){case"deleteContentBackward":case"deleteContentForward":v.isValidPartialNumber(e.text)&&!t.isReadOnly&&b();break;case"insertCompositionText":A.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:R.data!=null&&$(R.data);break}}),Xu(n,"input",R=>{let{inputType:M,data:O}=R;switch(M){case"insertCompositionText":n.current.textContent=A.current,(y(S,O)||y(C,O))&&$(O);break}}),Rt(()=>{let R=n.current;return()=>{document.activeElement===R&&(c.focusPrevious()||c.focusNext())}},[n,c]);let P=Oh()||e.type==="timeZoneName"?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{},k=m.useMemo(()=>t.segments.find(R=>R.isEditable),[t.segments]);e!==k&&!t.isInvalid&&(u=void 0);let N=ii(),j=!t.isDisabled&&!t.isReadOnly&&e.isEditable,F=e.type==="literal"?"":i.of(e.type),I=_h({"aria-label":`${F}${a?`, ${a}`:""}${l?", ":""}`,"aria-labelledby":l});return e.type==="literal"?{segmentProps:{"aria-hidden":!0}}:{segmentProps:zt(g,I,{id:N,...P,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":u,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:j,suppressContentEditableWarning:j,spellCheck:j?"false":void 0,autoCapitalize:j?"off":void 0,autoCorrect:j?"off":void 0,[parseInt(U.version,10)>=17?"enterKeyHint":"enterkeyhint"]:j?"next":void 0,inputMode:t.isDisabled||e.type==="dayPeriod"||e.type==="era"||!j?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:x,onFocus:T,style:{caretColor:"transparent"},onPointerDown(R){R.stopPropagation()},onMouseDown(R){R.stopPropagation()}})}}function kJ(e){e.sort();let t=e[0],n=e[e.length-1];for(let r=0;r<t.length;r++)if(t[r]!==n[r])return r;return 0}function TJ(e){return e&&e.__esModule?e.default:e}function IJ(e,t,n){var r,o;let i=ua(TJ(s0),"@react-aria/datepicker"),{isInvalid:a,validationErrors:l,validationDetails:u}=t.displayValidation,{labelProps:c,fieldProps:d,descriptionProps:f,errorMessageProps:h}=K2({...e,labelElementType:"span",isInvalid:a,errorMessage:e.errorMessage||l}),p=d["aria-labelledby"]||d.id,{locale:g}=Un(),v=t.formatValue(g,{month:"long"}),b=v?i.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):"",x=j2(b),y={"aria-label":i.format("startDate"),"aria-labelledby":p},w={"aria-label":i.format("endDate"),"aria-labelledby":p},S=ii(),C=ii(),E=F9(t,n),D=[x["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=m.useMemo(()=>N2(n,{accept:j=>j.id!==S}),[n,S]),T={[O9]:$,[Ip]:"presentation","aria-describedby":D,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},A=Zl(e),{focusWithinProps:P}=Qc({...e,isDisabled:t.isOpen,onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),k=m.useRef(Ls),N=m.useRef(Ls);return{groupProps:zt(A,E,d,x,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":D,onKeyDown(j){t.isOpen||e.onKeyDown&&e.onKeyDown(j)},onKeyUp(j){t.isOpen||e.onKeyUp&&e.onKeyUp(j)}}),labelProps:{...c,onClick:()=>{$.focusFirst()}},buttonProps:{...x,id:S,"aria-haspopup":"dialog","aria-label":i.format("calendar"),"aria-labelledby":`${S} ${p}`,"aria-describedby":D,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:C,"aria-labelledby":`${S} ${p}`},startFieldProps:{...y,...T,value:(r=t.value)===null||r===void 0?void 0:r.start,onChange:j=>t.setDateTime("start",j),autoFocus:e.autoFocus,name:e.startName,[oh]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(j){k.current=j,t.updateValidation(Zg(j,N.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...w,...T,value:(o=t.value)===null||o===void 0?void 0:o.end,onChange:j=>t.setDateTime("end",j),name:e.endName,[oh]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(j){N.current=j,t.updateValidation(Zg(k.current,j))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:f,errorMessageProps:h,calendarProps:{autoFocus:!0,value:t.dateRange,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:a,validationErrors:l,validationDetails:u}}function AJ(e,t){let{role:n="dialog"}=e,r=Mg();r=e["aria-label"]?void 0:r;let o=m.useRef(!1);return m.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){Lg(t.current);let i=setTimeout(()=>{document.activeElement===t.current&&(o.current=!0,t.current&&(t.current.blur(),Lg(t.current)),o.current=!1)},500);return()=>{clearTimeout(i)}}},[t]),xJ(),{dialogProps:{...Zl(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:i=>{o.current&&i.stopPropagation()}},titleProps:{id:r}}}var bA={};bA={decrease:e=>`خفض ${e.fieldLabel}`,increase:e=>`زيادة ${e.fieldLabel}`,numberField:"حقل رقمي"};var wA={};wA={decrease:e=>`Намаляване ${e.fieldLabel}`,increase:e=>`Усилване ${e.fieldLabel}`,numberField:"Номер на полето"};var $A={};$A={decrease:e=>`Snížit ${e.fieldLabel}`,increase:e=>`Zvýšit ${e.fieldLabel}`,numberField:"Číselné pole"};var SA={};SA={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`Øg ${e.fieldLabel}`,numberField:"Talfelt"};var EA={};EA={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var CA={};CA={decrease:e=>`Μείωση ${e.fieldLabel}`,increase:e=>`Αύξηση ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"};var DA={};DA={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var jA={};jA={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var PA={};PA={decrease:e=>`Vähenda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri väli"};var RA={};RA={decrease:e=>`Vähennä ${e.fieldLabel}`,increase:e=>`Lisää ${e.fieldLabel}`,numberField:"Numerokenttä"};var kA={};kA={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var TA={};TA={decrease:e=>`הקטן ${e.fieldLabel}`,increase:e=>`הגדל ${e.fieldLabel}`,numberField:"שדה מספר"};var IA={};IA={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var AA={};AA={decrease:e=>`${e.fieldLabel} csökkentése`,increase:e=>`${e.fieldLabel} növelése`,numberField:"Számmező"};var NA={};NA={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var FA={};FA={decrease:e=>`${e.fieldLabel}を縮小`,increase:e=>`${e.fieldLabel}を拡大`,numberField:"数値フィールド"};var MA={};MA={decrease:e=>`${e.fieldLabel} 감소`,increase:e=>`${e.fieldLabel} 증가`,numberField:"번호 필드"};var OA={};OA={decrease:e=>`Sumažinti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var _A={};_A={decrease:e=>`Samazināšana ${e.fieldLabel}`,increase:e=>`Palielināšana ${e.fieldLabel}`,numberField:"Skaitļu lauks"};var LA={};LA={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`Øk ${e.fieldLabel}`,numberField:"Tallfelt"};var VA={};VA={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var BA={};BA={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwiększ ${e.fieldLabel}`,numberField:"Pole numeru"};var zA={};zA={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var UA={};UA={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo numérico"};var qA={};qA={decrease:e=>`Scădere ${e.fieldLabel}`,increase:e=>`Creștere ${e.fieldLabel}`,numberField:"Câmp numeric"};var HA={};HA={decrease:e=>`Уменьшение ${e.fieldLabel}`,increase:e=>`Увеличение ${e.fieldLabel}`,numberField:"Числовое поле"};var WA={};WA={decrease:e=>`Znížiť ${e.fieldLabel}`,increase:e=>`Zvýšiť ${e.fieldLabel}`,numberField:"Číselné pole"};var GA={};GA={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Povečajte ${e.fieldLabel}`,numberField:"Številčno polje"};var KA={};KA={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var QA={};QA={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`Öka ${e.fieldLabel}`,numberField:"Nummerfält"};var ZA={};ZA={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} arttır`,numberField:"Sayı alanı"};var YA={};YA={decrease:e=>`Зменшити ${e.fieldLabel}`,increase:e=>`Збільшити ${e.fieldLabel}`,numberField:"Поле номера"};var XA={};XA={decrease:e=>`降低 ${e.fieldLabel}`,increase:e=>`提高 ${e.fieldLabel}`,numberField:"数字字段"};var JA={};JA={decrease:e=>`縮小 ${e.fieldLabel}`,increase:e=>`放大 ${e.fieldLabel}`,numberField:"數字欄位"};var eN={};eN={"ar-AE":bA,"bg-BG":wA,"cs-CZ":$A,"da-DK":SA,"de-DE":EA,"el-GR":CA,"en-US":DA,"es-ES":jA,"et-EE":PA,"fi-FI":RA,"fr-FR":kA,"he-IL":TA,"hr-HR":IA,"hu-HU":AA,"it-IT":NA,"ja-JP":FA,"ko-KR":MA,"lt-LT":OA,"lv-LV":_A,"nb-NO":LA,"nl-NL":VA,"pl-PL":BA,"pt-BR":zA,"pt-PT":UA,"ro-RO":qA,"ru-RU":HA,"sk-SK":WA,"sl-SI":GA,"sr-SP":KA,"sv-SE":QA,"tr-TR":ZA,"uk-UA":YA,"zh-CN":XA,"zh-TW":JA};function NJ(e){return e&&e.__esModule?e.default:e}function FJ(e,t,n){let{id:r,decrementAriaLabel:o,incrementAriaLabel:i,isDisabled:a,isReadOnly:l,isRequired:u,minValue:c,maxValue:d,autoFocus:f,label:h,formatOptions:p,onBlur:g=()=>{},onFocus:v,onFocusChange:b,onKeyDown:x,onKeyUp:y,description:w,errorMessage:S,isWheelDisabled:C,...E}=e,{increment:D,incrementToMax:$,decrement:T,decrementToMin:A,numberValue:P,inputValue:k,commit:N,commitValidation:j}=t;const F=ua(NJ(eN),"@react-aria/numberfield");let I=ii(r),{focusProps:R}=I2({onBlur(){N()}}),M=a6(p),O=m.useMemo(()=>M.resolvedOptions(),[M]),q=a6({...p,currencySign:void 0}),H=m.useMemo(()=>isNaN(P)?"":q.format(P),[q,P]),{spinButtonProps:G,incrementButtonProps:ce,decrementButtonProps:Z}=xA({isDisabled:a,isReadOnly:l,isRequired:u,maxValue:d,minValue:c,onIncrement:D,onIncrementToMax:$,onDecrement:T,onDecrementToMin:A,value:P,textValue:H}),[ee,re]=m.useState(!1),{focusWithinProps:Q}=Qc({isDisabled:a,onFocusWithinChange:re}),ue=m.useCallback(kt=>{Math.abs(kt.deltaY)<=Math.abs(kt.deltaX)||(kt.deltaY>0?D():kt.deltaY<0&&T())},[T,D]);oY({onScroll:ue,isDisabled:C||a||l||!ee},n);let oe=O.maximumFractionDigits>0,ve=t.minValue===void 0||isNaN(t.minValue)||t.minValue<0,Me="numeric";_8()?ve?Me="text":oe&&(Me="decimal"):D2()&&(ve?Me="numeric":oe&&(Me="decimal"));let un=kt=>{t.validate(kt)&&t.setInputValue(kt)},cr=Zl(e),Tr=m.useCallback(kt=>{kt.key==="Enter"?(N(),j()):kt.continuePropagation()},[N,j]),{isInvalid:yn,validationErrors:bi,validationDetails:L}=t.displayValidation,{labelProps:W,inputProps:Y,descriptionProps:he,errorMessageProps:de}=wJ({...E,...cr,name:void 0,label:h,autoFocus:f,isDisabled:a,isReadOnly:l,isRequired:u,validate:void 0,[oh]:t,value:k,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:Me,onChange:un,onBlur:g,onFocus:v,onFocusChange:b,onKeyDown:m.useMemo(()=>Nc(Tr,x),[Tr,x]),onKeyUp:y,description:w,errorMessage:S},t,n);P2(n,t.numberValue,t.setNumberValue);let se=zt(G,R,Y,{role:null,"aria-roledescription":Oh()?null:F.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});e.validationBehavior==="native"&&(se["aria-required"]=void 0);let be=kt=>{var qo;document.activeElement!==n.current&&(kt.pointerType==="mouse"?(qo=n.current)===null||qo===void 0||qo.focus():kt.target.focus())},Le=e["aria-label"]||(typeof e.label=="string"?e.label:""),rt;Le||(rt=e.label!=null?W.id:e["aria-labelledby"]);let Nt=ii(),Xt=ii(),Dt=zt(ce,{"aria-label":i||F.format("increase",{fieldLabel:Le}).trim(),id:rt&&!i?Nt:null,"aria-labelledby":rt&&!i?`${Nt} ${rt}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:be}),Ir=zt(Z,{"aria-label":o||F.format("decrease",{fieldLabel:Le}).trim(),id:rt&&!o?Xt:null,"aria-labelledby":rt&&!o?`${Xt} ${rt}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:be});return{groupProps:{...Q,role:"group","aria-disabled":a,"aria-invalid":yn?"true":void 0},labelProps:W,inputProps:se,incrementButtonProps:Dt,decrementButtonProps:Ir,errorMessageProps:de,descriptionProps:he,isInvalid:yn,validationErrors:bi,validationDetails:L}}function oc(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function i4(e,t,n,r,o){let i={};for(let l in t)i[l]=Math.floor(t[l]/2),i[l]>0&&t[l]%2===0&&i[l]--;let a=Qs(e,t,n).subtract(i);return ih(e,a,t,n,r,o)}function Qs(e,t,n,r,o){let i=e;return t.years?i=IY(e):t.months?i=zh(e):t.weeks&&(i=eh(e,n)),ih(e,i,t,n,r,o)}function a4(e,t,n,r,o){let i={...t};t.days?i.days--:t.weeks?i.weeks--:t.months?i.months--:t.years&&i.years--;let a=Qs(e,t,n).subtract(i);return ih(e,a,t,n,r,o)}function ih(e,t,n,r,o,i){return o&&e.compare(o)>=0&&(t=O2(t,Qs(Pr(o),n,r))),i&&e.compare(i)<=0&&(t=M2(t,a4(Pr(i),n,r))),t}function $a(e,t,n){return t&&(e=O2(e,Pr(t))),n&&(e=M2(e,Pr(n))),e}function tN(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});if(e.compare(t)>=0)return e}function MJ(e){let t=m.useMemo(()=>new ls(e.locale),[e.locale]),n=m.useMemo(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:o,visibleDuration:i={months:1},minValue:a,maxValue:l,selectionAlignment:u,isDateUnavailable:c,pageBehavior:d="visible"}=e,f=m.useMemo(()=>o(n.calendar),[o,n.calendar]),[h,p]=Ji(e.value,e.defaultValue,e.onChange),g=m.useMemo(()=>h?Lt(Pr(h),f):null,[h,f]),v=m.useMemo(()=>h&&"timeZone"in h?h.timeZone:n.timeZone,[h,n.timeZone]),b=m.useMemo(()=>e.focusedValue?$a(Lt(Pr(e.focusedValue),f),a,l):void 0,[e.focusedValue,f,a,l]),x=m.useMemo(()=>$a(e.defaultFocusedValue?Lt(Pr(e.defaultFocusedValue),f):g||Lt(r0(v),f),a,l),[e.defaultFocusedValue,g,v,f,a,l]),[y,w]=Ji(b,x,e.onFocusChange),[S,C]=m.useState(()=>{switch(u){case"start":return Qs(y,i,r,a,l);case"end":return a4(y,i,r,a,l);case"center":default:return i4(y,i,r,a,l)}}),[E,D]=m.useState(e.autoFocus||!1),$=m.useMemo(()=>{let R={...i};return R.days?R.days--:R.days=-1,S.add(R)},[S,i]),[T,A]=m.useState(f.identifier);if(f.identifier!==T){let R=Lt(y,f);C(i4(R,i,r,a,l)),w(R),A(f.identifier)}oc(y,a,l)?w($a(y,a,l)):y.compare(S)<0?C(a4(y,i,r,a,l)):y.compare($)>0&&C(Qs(y,i,r,a,l));function P(R){R=$a(R,a,l),w(R)}function k(R){if(!e.isDisabled&&!e.isReadOnly){if(R===null){p(null);return}if(R=$a(R,a,l),R=tN(R,S,c),!R)return;R=Lt(R,(h==null?void 0:h.calendar)||new ir),h&&"hour"in h?p(h.set(R)):p(R)}}let N=m.useMemo(()=>g?c&&c(g)?!0:oc(g,a,l):!1,[g,c,a,l]),j=e.isInvalid||e.validationState==="invalid"||N,F=j?"invalid":null,I=m.useMemo(()=>d==="visible"?i:f1(i),[d,i]);return{isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,value:g,setValue:k,visibleRange:{start:S,end:$},minValue:a,maxValue:l,focusedDate:y,timeZone:v,validationState:F,isValueInvalid:j,setFocusedDate(R){P(R),D(!0)},focusNextDay(){P(y.add({days:1}))},focusPreviousDay(){P(y.subtract({days:1}))},focusNextRow(){i.days?this.focusNextPage():(i.weeks||i.months||i.years)&&P(y.add({weeks:1}))},focusPreviousRow(){i.days?this.focusPreviousPage():(i.weeks||i.months||i.years)&&P(y.subtract({weeks:1}))},focusNextPage(){let R=S.add(I);w($a(y.add(I),a,l)),C(Qs(ih(y,R,I,r,a,l),I,r))},focusPreviousPage(){let R=S.subtract(I);w($a(y.subtract(I),a,l)),C(Qs(ih(y,R,I,r,a,l),I,r))},focusSectionStart(){i.days?P(S):i.weeks?P(eh(y,r)):(i.months||i.years)&&P(zh(y))},focusSectionEnd(){i.days?P($):i.weeks?P(FY(y,r)):(i.months||i.years)&&P(Gb(y))},focusNextSection(R){if(!R&&!i.days){P(y.add(f1(i)));return}i.days?this.focusNextPage():i.weeks?P(y.add({months:1})):(i.months||i.years)&&P(y.add({years:1}))},focusPreviousSection(R){if(!R&&!i.days){P(y.subtract(f1(i)));return}i.days?this.focusPreviousPage():i.weeks?P(y.subtract({months:1})):(i.months||i.years)&&P(y.subtract({years:1}))},selectFocusedDate(){k(y)},selectDate(R){k(R)},isFocused:E,setFocused:D,isInvalid(R){return oc(R,a,l)},isSelected(R){return g!=null&&fn(R,g)&&!this.isCellDisabled(R)&&!this.isCellUnavailable(R)},isCellFocused(R){return E&&y&&fn(R,y)},isCellDisabled(R){return e.isDisabled||R.compare(S)<0||R.compare($)>0||this.isInvalid(R,a,l)},isCellUnavailable(R){return e.isDateUnavailable&&e.isDateUnavailable(R)},isPreviousVisibleRangeInvalid(){let R=S.subtract({days:1});return fn(R,S)||this.isInvalid(R,a,l)},isNextVisibleRangeInvalid(){let R=$.add({days:1});return fn(R,$)||this.isInvalid(R,a,l)},getDatesInWeek(R,M=S){let O=M.add({weeks:R}),q=[];O=eh(O,r);let H=n0(O,r);for(let G=0;G<H;G++)q.push(null);for(;q.length<7;){q.push(O);let G=O.add({days:1});if(fn(O,G))break;O=G}for(;q.length<7;)q.push(null);return q}}}function f1(e){let t={...e};for(let n in e)t[n]=1;return t}function OJ(e){let{value:t,defaultValue:n,onChange:r,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:l,maxValue:u,...c}=e,[d,f]=Ji(t,n||null,r),[h,p]=m.useState(null),g="center";if(d&&d.start&&d.end){let M=i4(Pr(d.start),a,i,l,u).add(a).subtract({days:1});d.end.compare(M)>0&&(g="start")}let v=m.useRef(null),[b,x]=m.useState(null),y=m.useMemo(()=>O2(l,b==null?void 0:b.start),[l,b]),w=m.useMemo(()=>M2(u,b==null?void 0:b.end),[u,b]),S=MJ({...c,value:d&&d.start,createCalendar:o,locale:i,visibleDuration:a,minValue:y,maxValue:w,selectionAlignment:g}),C=R=>{R&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(v.current={start:b6(R,S,-1),end:b6(R,S,1)},x(v.current)):(v.current=null,x(null))},[E,D]=m.useState(S.visibleRange);(!Wb(S.visibleRange.start,E.start)||!Wb(S.visibleRange.end,E.end))&&(C(h),D(S.visibleRange));let $=R=>{R?(p(R),C(R)):(p(null),C(null))},T=h?h1(h,S.focusedDate):d&&h1(d.start,d.end),A=R=>{if(!e.isReadOnly&&(R=$a(R,y,w),R=tN(R,S.visibleRange.start,e.isDateUnavailable),!!R))if(!h)$(R);else{let M=h1(h,R);f({start:x6(M.start,d==null?void 0:d.start),end:x6(M.end,d==null?void 0:d.end)}),$(null)}},[P,k]=m.useState(!1),{isDateUnavailable:N}=e,j=m.useMemo(()=>!d||h?!1:N&&(N(d.start)||N(d.end))?!0:oc(d.start,l,u)||oc(d.end,l,u),[N,d,h,l,u]),F=e.isInvalid||e.validationState==="invalid"||j;return{...S,value:d,setValue:f,anchorDate:h,setAnchorDate:$,highlightedRange:T,validationState:F?"invalid":null,isValueInvalid:F,selectFocusedDate(){A(S.focusedDate)},selectDate:A,highlightDate(R){h&&S.setFocusedDate(R)},isSelected(R){return T&&R.compare(T.start)>=0&&R.compare(T.end)<=0&&!S.isCellDisabled(R)&&!S.isCellUnavailable(R)},isInvalid(R){var M,O;return S.isInvalid(R)||oc(R,(M=v.current)===null||M===void 0?void 0:M.start,(O=v.current)===null||O===void 0?void 0:O.end)},isDragging:P,setDragging:k}}function h1(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Pr(e),end:Pr(t)})}function x6(e,t){return e=Lt(e,(t==null?void 0:t.calendar)||new ir),t&&"hour"in t?t.set(e):e}function b6(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:r.compare(t.visibleRange.end)<=0)&&!t.isCellUnavailable(r);)r=r.add({days:n});return t.isCellUnavailable(r)?r.add({days:-n}):null}function _J(e){let[t,n]=Ji(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=m.useCallback(()=>{n(!0)},[n]),o=m.useCallback(()=>{n(!1)},[n]),i=m.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:o,toggle:i}}var nN={};nN={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var rN={};rN={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var oN={};oN={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var iN={};iN={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var aN={};aN={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var sN={};sN={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var lN={};lN={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var uN={};uN={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var cN={};cN={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var dN={};dN={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var fN={};fN={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var hN={};hN={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var mN={};mN={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var pN={};pN={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var gN={};gN={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var vN={};vN={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var yN={};yN={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이상이어야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var xN={};xN={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var bN={};bN={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var wN={};wN={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var $N={};$N={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var SN={};SN={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var EN={};EN={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var CN={};CN={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var DN={};DN={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var jN={};jN={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var PN={};PN={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var RN={};RN={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var kN={};kN={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var TN={};TN={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var IN={};IN={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var AN={};AN={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var NN={};NN={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var FN={};FN={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var MN={};MN={"ar-AE":nN,"bg-BG":rN,"cs-CZ":oN,"da-DK":iN,"de-DE":aN,"el-GR":sN,"en-US":lN,"es-ES":uN,"et-EE":cN,"fi-FI":dN,"fr-FR":fN,"he-IL":hN,"hr-HR":mN,"hu-HU":pN,"it-IT":gN,"ja-JP":vN,"ko-KR":yN,"lt-LT":xN,"lv-LV":bN,"nb-NO":wN,"nl-NL":$N,"pl-PL":SN,"pt-BR":EN,"pt-PT":CN,"ro-RO":DN,"ru-RU":jN,"sk-SK":PN,"sl-SI":RN,"sr-SP":kN,"sv-SE":TN,"tr-TR":IN,"uk-UA":AN,"zh-CN":NN,"zh-TW":FN};function LJ(e){return e&&e.__esModule?e.default:e}const ON=new Ds(LJ(MN));function _N(){return typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US"}function s4(e,t,n,r,o){let i=e!=null&&n!=null&&e.compare(n)>0,a=e!=null&&t!=null&&e.compare(t)<0,l=e!=null&&(r==null?void 0:r(e))||!1,u=i||a||l,c=[];if(u){let d=_N(),f=Ds.getGlobalDictionaryForPackage("@react-stately/datepicker")||ON,h=new iT(d,f),p=new ls(d,ah({},o)),g=p.resolvedOptions().timeZone;a&&c.push(h.format("rangeUnderflow",{minValue:p.format(t.toDate(g))})),i&&c.push(h.format("rangeOverflow",{maxValue:p.format(n.toDate(g))})),l&&c.push(h.format("unavailableDate"))}return{isInvalid:u,validationErrors:c,validationDetails:{badInput:l,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!u}}}function VJ(e,t,n,r,o){let i=s4(e==null?void 0:e.start,t,n,r,o),a=s4(e==null?void 0:e.end,t,n,r,o),l=Zg(i,a);if(e.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let u=Ds.getGlobalDictionaryForPackage("@react-stately/datepicker")||ON;l=Zg(l,{isInvalid:!0,validationErrors:[u.getStringForLocale("rangeReversed",_N())],validationDetails:{...i0,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return l}const BJ={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},zJ={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function ah(e,t){e={...t.shouldForceLeadingZeros?zJ:BJ,...e};let r=t.granularity||"minute",o=Object.keys(e);var i;let a=o.indexOf((i=t.maxGranularity)!==null&&i!==void 0?i:"year");a<0&&(a=0);let l=o.indexOf(r);if(l<0&&(l=2),a>l)throw new Error("maxGranularity must be greater than granularity");let u=o.slice(a,l+1).reduce((d,f)=>(d[f]=e[f],d),{});return t.hourCycle!=null&&(u.hour12=t.hourCycle===12),u.timeZone=t.timeZone||"UTC",(r==="hour"||r==="minute"||r==="second")&&t.timeZone&&!t.hideTimeZone&&(u.timeZoneName="short"),t.showEra&&a===0&&(u.era="short"),u}function Wm(e){return e&&"hour"in e?e:new Uh}function LN(e,t){if(e===null)return null;if(e)return Lt(e,t)}function wd(e,t,n,r){if(e)return LN(e,n);let o=Lt(Mc(r).set({hour:0,minute:0,second:0,millisecond:0}),n);return t==="year"||t==="month"||t==="day"?Pr(o):r?o:di(o)}function VN(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=m.useState([r,n]);e&&(o[0]!==r||o[1]!==n)&&i([r,n]),t||(t=e?r:o[0]);let a=e?n:o[1];return[t,a]}const UJ=new Ds({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");function qJ(e,t,n){return e==="era"||e==="dayPeriod"?t:e==="year"||e==="month"||e==="day"?UJ.getStringForLocale(e,n):"––"}const Gm={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},w6={year:5,month:2,day:7,hour:2,minute:15,second:15},HJ={dayperiod:"dayPeriod"};function WJ(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:o,isReadOnly:i,isRequired:a,minValue:l,maxValue:u,isDateUnavailable:c}=e,d=e.value||e.defaultValue||e.placeholderValue,[f,h]=VN(d,e.granularity),p=h||"UTC";if(d&&!(f in d))throw new Error("Invalid granularity "+f+" for value "+d.toString());let g=m.useMemo(()=>new ls(t),[t]),v=m.useMemo(()=>n(g.resolvedOptions().calendar),[n,g]),[b,x]=Ji(e.value,e.defaultValue,e.onChange),y=m.useMemo(()=>LN(b,v),[b,v]),[w,S]=m.useState(()=>wd(e.placeholderValue,f,v,h)),C=y||w,E=v.identifier==="gregory"&&C.era==="BC",D=m.useMemo(()=>{var Q;return{granularity:f,maxGranularity:(Q=e.maxGranularity)!==null&&Q!==void 0?Q:"year",timeZone:h,hideTimeZone:r,hourCycle:e.hourCycle,showEra:E,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,h,r,E]),$=m.useMemo(()=>ah({},D),[D]),T=m.useMemo(()=>new ls(t,$),[t,$]),A=m.useMemo(()=>T.resolvedOptions(),[T]),P=m.useMemo(()=>T.formatToParts(new Date).filter(Q=>Gm[Q.type]).reduce((Q,ue)=>(Q[ue.type]=!0,Q),{}),[T]),[k,N]=m.useState(()=>e.value||e.defaultValue?{...P}:{}),j=m.useRef(),F=m.useRef(v.identifier);m.useEffect(()=>{v.identifier!==F.current&&(F.current=v.identifier,S(Q=>Object.keys(k).length>0?Lt(Q,v):wd(e.placeholderValue,f,v,h)))},[v,f,k,h,e.placeholderValue]),b&&Object.keys(k).length<Object.keys(P).length&&(k={...P},N(k)),b==null&&Object.keys(k).length===Object.keys(P).length&&(k={},N(k),S(wd(e.placeholderValue,f,v,h)));let I=y&&Object.keys(k).length>=Object.keys(P).length?y:w,R=Q=>{if(e.isDisabled||e.isReadOnly)return;let ue=Object.keys(k),J=Object.keys(P);Q==null?(x(null),S(wd(e.placeholderValue,f,v,h)),N({})):ue.length>=J.length||ue.length===J.length-1&&P.dayPeriod&&!k.dayPeriod&&j.current!=="dayPeriod"?(Q=Lt(Q,(d==null?void 0:d.calendar)||new ir),x(Q)):S(Q),j.current=null},M=m.useMemo(()=>I.toDate(p),[I,p]),O=m.useMemo(()=>T.formatToParts(M).map(Q=>{let ue=Gm[Q.type];Q.type==="era"&&v.getEras().length===1&&(ue=!1);let J=Gm[Q.type]&&!k[Q.type],oe=Gm[Q.type]?qJ(Q.type,Q.value,t):null;return{type:HJ[Q.type]||Q.type,text:J?oe:Q.value,...GJ(I,Q.type,A),isPlaceholder:J,placeholder:oe,isEditable:ue}}),[M,k,T,A,I,v,t]);P.era&&k.year&&!k.era?(k.era=!0,N({...k})):!P.era&&k.era&&(delete k.era,N({...k}));let q=Q=>{k[Q]=!0,Q==="year"&&P.era&&(k.era=!0),N({...k})},H=(Q,ue)=>{if(k[Q])R(KJ(I,Q,ue,A));else{q(Q);let J=Object.keys(k),oe=Object.keys(P);(J.length>=oe.length||J.length===oe.length-1&&P.dayPeriod&&!k.dayPeriod)&&R(I)}},G=m.useMemo(()=>s4(b,l,u,c,D),[b,l,u,c,D]),ce=a0({...e,value:b,builtinValidation:G}),Z=ce.displayValidation.isInvalid,ee=e.validationState||(Z?"invalid":null);var re;return{...ce,value:y,dateValue:M,calendar:v,setValue:R,segments:O,dateFormatter:T,validationState:ee,isInvalid:Z,granularity:f,maxGranularity:(re=e.maxGranularity)!==null&&re!==void 0?re:"year",isDisabled:o,isReadOnly:i,isRequired:a,increment(Q){H(Q,1)},decrement(Q){H(Q,-1)},incrementPage(Q){H(Q,w6[Q]||1)},decrementPage(Q){H(Q,-(w6[Q]||1))},setSegment(Q,ue){q(Q),R(QJ(I,Q,ue,A))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let Q=Object.keys(k),ue=Object.keys(P);Q.length===ue.length-1&&P.dayPeriod&&!k.dayPeriod&&(k={...P},N(k),R(I.copy()))},clearSegment(Q){delete k[Q],j.current=Q,N({...k});let ue=wd(e.placeholderValue,f,v,h),J=I;if(Q==="dayPeriod"&&"hour"in I&&"hour"in ue){let oe=I.hour>=12,ve=ue.hour>=12;oe&&!ve?J=I.set({hour:I.hour-12}):!oe&&ve&&(J=I.set({hour:I.hour+12}))}else Q in I&&(J=I.set({[Q]:ue[Q]}));x(null),R(J)},formatValue(Q){if(!y)return"";let ue=ah(Q,D);return new ls(t,ue).format(M)}}}function GJ(e,t,n){switch(t){case"era":{let r=e.calendar.getEras();return{value:r.indexOf(e.era),minValue:0,maxValue:r.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:AY(e),maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:NY(e),maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:e.hour>=12?12:0,minValue:0,maxValue:12};case"hour":if(n.hour12){let r=e.hour>=12;return{value:e.hour,minValue:r?12:0,maxValue:r?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}function KJ(e,t,n,r){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{round:t==="year"})}if("hour"in e)switch(t){case"dayPeriod":{let o=e.hour,i=o>=12;return e.set({hour:i?o-12:o+12})}case"hour":case"minute":case"second":return e.cycle(t,n,{round:t!=="hour",hourCycle:r.hour12?12:24})}}function QJ(e,t,n,r){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e)switch(t){case"dayPeriod":{let o=e.hour,i=o>=12;return n>=12===i?e:e.set({hour:i?o-12:o+12})}case"hour":if(r.hour12){let i=e.hour>=12;!i&&n===12&&(n=0),i&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}}function ZJ(e){var t,n;let r=_J(e),[o,i]=Ji(e.value,e.defaultValue||null,e.onChange),[a,l]=m.useState(()=>o||{start:null,end:null});o==null&&a.start&&a.end&&(a={start:null,end:null},l(a));let u=o||a,c=I=>{l(I||{start:null,end:null}),I!=null&&I.start&&I.end?i(I):i(null)},d=(u==null?void 0:u.start)||(u==null?void 0:u.end)||e.placeholderValue,[f,h]=VN(d,e.granularity),p=f==="hour"||f==="minute"||f==="second";var g;let v=(g=e.shouldCloseOnSelect)!==null&&g!==void 0?g:!0,[b,x]=m.useState(null),[y,w]=m.useState(null);u&&u.start&&u.end&&(b=u,"hour"in u.start&&(y=u));let S=(I,R)=>{c({start:"timeZone"in R.start?R.start.set(Pr(I.start)):di(I.start,R.start),end:"timeZone"in R.end?R.end.set(Pr(I.end)):di(I.end,R.end)}),x(null),w(null),N.commitValidation()},C=I=>{let R=typeof v=="function"?v():v;p?R||I.start&&I.end&&(y!=null&&y.start)&&(y!=null&&y.end)?S(I,{start:(y==null?void 0:y.start)||Wm(e.placeholderValue),end:(y==null?void 0:y.end)||Wm(e.placeholderValue)}):x(I):I.start&&I.end?(c(I),N.commitValidation()):x(I),R&&r.setOpen(!1)},E=I=>{b!=null&&b.start&&(b!=null&&b.end)&&I.start&&I.end?S(b,I):w(I)},D=(u==null||(t=u.start)===null||t===void 0?void 0:t.calendar.identifier)==="gregory"&&u.start.era==="BC"||(u==null||(n=u.end)===null||n===void 0?void 0:n.calendar.identifier)==="gregory"&&u.end.era==="BC",$=m.useMemo(()=>({granularity:f,timeZone:h,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:D}),[f,e.hourCycle,e.shouldForceLeadingZeros,h,e.hideTimeZone,D]),{minValue:T,maxValue:A,isDateUnavailable:P}=e,k=m.useMemo(()=>VJ(u,T,A,P,$),[u,T,A,P,$]),N=a0({...e,value:o,name:m.useMemo(()=>[e.startName,e.endName],[e.startName,e.endName]),builtinValidation:k}),j=N.displayValidation.isInvalid,F=e.validationState||(j?"invalid":null);return{...N,value:u,setValue:c,dateRange:b,timeRange:y,granularity:f,hasTime:p,setDate(I,R){C({...b,[I]:R})},setTime(I,R){E({...y,[I]:R})},setDateTime(I,R){c({...u,[I]:R})},setDateRange:C,setTimeRange:E,...r,setOpen(I){!I&&!(u!=null&&u.start&&(u!=null&&u.end))&&(b!=null&&b.start)&&(b!=null&&b.end)&&p&&S(b,{start:(y==null?void 0:y.start)||Wm(e.placeholderValue),end:(y==null?void 0:y.end)||Wm(e.placeholderValue)}),r.setOpen(I)},validationState:F,isInvalid:j,formatValue(I,R){if(!u||!u.start||!u.end)return null;let M="timeZone"in u.start?u.start.timeZone:void 0,O=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),q="timeZone"in u.end?u.end.timeZone:void 0,H=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),G=ah(R,{granularity:O,timeZone:M,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:u.start.calendar.identifier==="gregory"&&u.start.era==="BC"||u.end.calendar.identifier==="gregory"&&u.end.era==="BC"}),ce=u.start.toDate(M||"UTC"),Z=u.end.toDate(q||"UTC"),ee=new ls(I,G),re;if(M===q&&O===H&&u.start.compare(u.end)!==0){try{let Q=ee.formatRangeToParts(ce,Z),ue=-1;for(let ve=0;ve<Q.length;ve++){let Me=Q[ve];if(Me.source==="shared"&&Me.type==="literal")ue=ve;else if(Me.source==="endRange")break}let J="",oe="";for(let ve=0;ve<Q.length;ve++)ve<ue?J+=Q[ve].value:ve>ue&&(oe+=Q[ve].value);return{start:J,end:oe}}catch{}re=ee}else{let Q=ah(R,{granularity:H,timeZone:q,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});re=new ls(I,Q)}return{start:ee.format(ce),end:re.format(Z)}}}}function YJ(e){let{placeholderValue:t=new Uh,minValue:n,maxValue:r,granularity:o,validate:i}=e,[a,l]=Ji(e.value,e.defaultValue,e.onChange),u=a||t,c=u&&"day"in u?u:void 0,d=e.defaultValue&&"timeZone"in e.defaultValue?e.defaultValue.timeZone:void 0,f=m.useMemo(()=>{let y=u&&"timeZone"in u?u.timeZone:void 0;return(y||d)&&t?mT($d(t),y||d):$d(t)},[t,u,d]),h=m.useMemo(()=>$d(n,c),[n,c]),p=m.useMemo(()=>$d(r,c),[r,c]),g=m.useMemo(()=>a&&"day"in a?BC(a):a,[a]),v=m.useMemo(()=>a==null?null:$d(a),[a]);return{...WJ({...e,value:v,defaultValue:void 0,minValue:h,maxValue:p,onChange:y=>{l(c||d?y:y&&BC(y))},granularity:o||"minute",maxGranularity:"hour",placeholderValue:f,createCalendar:()=>new ir,validate:m.useCallback(()=>i==null?void 0:i(a),[i,a])}),timeValue:g}}function $d(e,t=r0(ho())){return e?"day"in e?e:di(t,e):null}function XJ(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:i,defaultValue:a=NaN,onChange:l,locale:u,isDisabled:c,isReadOnly:d}=e;i===null&&(i=NaN),i!==void 0&&!isNaN(i)&&(r!==void 0&&!isNaN(r)?i=Si(i,t,n,r):i=Ju(i,t,n)),isNaN(a)||(r!==void 0&&!isNaN(r)?a=Si(a,t,n,r):a=Ju(a,t,n));let[f,h]=Ji(i,isNaN(a)?NaN:a,l),[p,g]=m.useState(()=>isNaN(f)?"":new Qg(u,o).format(f)),v=m.useMemo(()=>new W2(u,o),[u,o]),b=m.useMemo(()=>v.getNumberingSystem(p),[v,p]),x=m.useMemo(()=>new Qg(u,{...o,numberingSystem:b}),[u,o,b]),y=m.useMemo(()=>x.resolvedOptions(),[x]),w=m.useCallback(G=>isNaN(G)||G===null?"":x.format(G),[x]),S=a0({...e,value:f}),C=r!==void 0&&!isNaN(r)?r:1;y.style==="percent"&&(r===void 0||isNaN(r))&&(C=.01);let[E,D]=m.useState(f),[$,T]=m.useState(u),[A,P]=m.useState(o);(!Object.is(f,E)||u!==$||o!==A)&&(g(w(f)),D(f),T(u),P(o));let k=m.useMemo(()=>v.parse(p),[v,p]),N=()=>{if(!p.length){h(NaN),g(i===void 0?"":w(f));return}if(isNaN(k)){g(w(f));return}let G;r===void 0||isNaN(r)?G=Ju(k,t,n):G=Si(k,t,n,r),G=v.parse(w(G)),h(G),g(w(i===void 0?G:f))},j=(G,ce=0)=>{let Z=k;if(isNaN(Z)){let ee=isNaN(ce)?0:ce;return Si(ee,t,n,C)}else{let ee=Si(Z,t,n,C);return G==="+"&&ee>Z||G==="-"&&ee<Z?ee:Si(m1(G,Z,C),t,n,C)}},F=()=>{let G=j("+",t);G===f&&g(w(G)),h(G),S.commitValidation()},I=()=>{let G=j("-",n);G===f&&g(w(G)),h(G),S.commitValidation()},R=()=>{n!=null&&(h(Si(n,t,n,C)),S.commitValidation())},M=()=>{t!=null&&(h(t),S.commitValidation())},O=m.useMemo(()=>!c&&!d&&(isNaN(k)||n===void 0||isNaN(n)||Si(k,t,n,C)>k||m1("+",k,C)<=n),[c,d,t,n,C,k]),q=m.useMemo(()=>!c&&!d&&(isNaN(k)||t===void 0||isNaN(t)||Si(k,t,n,C)<k||m1("-",k,C)>=t),[c,d,t,n,C,k]);return{...S,validate:G=>v.isValidPartialNumber(G,t,n),increment:F,incrementToMax:R,decrement:I,decrementToMin:M,canIncrement:O,canDecrement:q,minValue:t,maxValue:n,numberValue:k,setNumberValue:h,setInputValue:g,inputValue:p,commit:N}}function m1(e,t,n){let r=e==="+"?t+n:t-n;if(t%1!==0||n%1!==0){const o=t.toString().split("."),i=n.toString().split("."),a=o[1]&&o[1].length||0,l=i[1]&&i[1].length||0,u=Math.pow(10,Math.max(a,l));t=Math.round(t*u),n=Math.round(n*u),r=e==="+"?t+n:t-n,r/=u}return r}const JJ=U.forwardRef((e,t)=>{const{locale:n}=Un(),r=XJ({...e,locale:n}),o=m.useRef(null),{groupProps:i,inputProps:a,incrementButtonProps:l,decrementButtonProps:u}=FJ(e,r,o);return s.jsxs("div",{className:ne("relative flex rounded border",e.error?"border-error-secondary hover:border-error":"border-default hover:border-hover",e.isDisabled&&"!border-default",e.className),...i,children:[s.jsx("input",{...a,ref:c2([t,o]),className:ne("w-full rounded border-none px-3 py-[0.6875rem] !outline-offset-1 text-sans-md text-default bg-default placeholder:text-quaternary focus:outline-none disabled:cursor-not-allowed disabled:text-tertiary disabled:bg-disabled",e.error&&"focus-error",e.isDisabled&&"text-disabled bg-disabled")}),s.jsxs("div",{className:"absolute bottom-0 right-0 top-0 flex flex-col border-l border-default",children:[s.jsx($6,{...l,children:s.jsx(S6,{})}),s.jsx("div",{className:"h-[1px] w-full border-t border-t-default"}),s.jsx($6,{...u,children:s.jsx(S6,{className:"rotate-180"})})]})]})});function $6(e){const t=m.useRef(null),{buttonProps:n}=NT(e,t);return s.jsx("button",{type:"button",...n,className:ne("flex h-1/2 w-8 items-center justify-center hover:bg-hover",n.disabled?"text-quaternary bg-disabled":"bg-default"),ref:t,children:e.children})}const S6=({className:e})=>s.jsx("svg",{width:"6",height:"6",viewBox:"0 0 6 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:s.jsx("path",{d:"M2.67844 0.535946C2.82409 0.293194 3.17591 0.293194 3.32156 0.535946L5.65924 4.43208C5.80921 4.68202 5.62917 5.00001 5.33768 5.00001L0.662322 5.00001C0.370837 5.00001 0.190795 4.68202 0.340763 4.43208L2.67844 0.535946Z",fill:"currentColor"})});function cl({name:e,label:t=rr(e),units:n,tooltipText:r,description:o,required:i,...a}){const l=m.useId();return s.jsxs("div",{className:"max-w-lg",children:[s.jsxs("div",{className:"mb-2",children:[s.jsxs(bo,{htmlFor:l,id:`${l}-label`,tip:r,optional:!i,children:[t," ",n&&s.jsxs("span",{className:"ml-1 text-secondary",children:["(",n,")"]})]}),o&&s.jsx(yi,{id:`${l}-help-text`,className:"mb-2",children:o})]}),s.jsx(eee,{name:e,...a,id:l})]})}const eee=({name:e,label:t=rr(e),validate:n,control:r,tooltipText:o,required:i,id:a,disabled:l,max:u,min:c=0})=>{const d=m.useId(),f=a||d,{field:h,fieldState:{error:p}}=on({name:e,control:r,rules:{required:i,validate:n}});return s.jsxs(s.Fragment,{children:[s.jsx(JJ,{id:f,error:!!p,"aria-labelledby":ne(`${f}-label`,!!o&&`${f}-help-text`),"aria-describedby":o?`${f}-label-tip`:void 0,isDisabled:l,maxValue:u?Number(u):void 0,minValue:c!==void 0?Number(c):void 0,...h,formatOptions:{useGrouping:!1}}),s.jsx(Kc,{error:p,label:t})]})};function BN({required:e=!0,name:t,minSize:n=1,validate:r,...o}){return s.jsx(cl,{units:"GiB",required:e,name:t,min:n,max:vy,validate:i=>Number.isNaN(i)?"Disk size is required":i<n?`Must be at least ${n} GiB`:i>vy?`Can be at most ${vy} GiB`:r==null?void 0:r(i),...o})}const l0=()=>s.jsx("span",{className:"mx-1 text-quinary selected:text-accent-disabled",children:"/"});var tee=Object.defineProperty,nee=(e,t,n)=>t in e?tee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p1=(e,t,n)=>(nee(e,typeof t!="symbol"?t+"":t,n),n);let ree=class{constructor(){p1(this,"current",this.detect()),p1(this,"handoffState","pending"),p1(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},dl=new ree;function Xl(e){return dl.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function zN(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function zo(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return zN(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=zo();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function fi(){let[e]=m.useState(zo);return m.useEffect(()=>()=>e.dispose(),[e]),e}let dt=(e,t)=>{dl.isServer?m.useEffect(e,t):m.useLayoutEffect(e,t)};function hi(e){let t=m.useRef(e);return dt(()=>{t.current=e},[e]),t}let me=function(e){let t=hi(e);return U.useCallback((...n)=>t.current(...n),[t])};function oee(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function iee(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Q2({disabled:e=!1}={}){let t=m.useRef(null),[n,r]=m.useState(!1),o=fi(),i=me(()=>{t.current=null,r(!1),o.dispose()}),a=me(l=>{if(o.dispose(),t.current===null){t.current=l.currentTarget,r(!0);{let u=Xl(l.currentTarget);o.addEventListener(u,"pointerup",i,!1),o.addEventListener(u,"pointermove",c=>{if(t.current){let d=oee(c);r(iee(d,t.current.getBoundingClientRect()))}},!1),o.addEventListener(u,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:a,onPointerUp:i,onClick:i}}}let aee=m.createContext(void 0);function u0(){return m.useContext(aee)}function E6(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Yt(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Yt),r}var ea=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ea||{}),see=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(see||{});function sn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:l}){l=l??uee;let u=UN(t,e);if(i)return Km(u,n,r,a,l);let c=o??0;if(c&2){let{static:d=!1,...f}=u;if(d)return Km(f,n,r,a,l)}if(c&1){let{unmount:d=!0,...f}=u;return Yt(d?0:1,{0(){return null},1(){return Km({...f,hidden:!0,style:{display:"none"}},n,r,a,l)}})}return Km(u,n,r,a,l)}function Km(e,t={},n,r,o){let{as:i=n,children:a,refName:l="ref",...u}=g1(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},d=typeof a=="function"?a(t):a;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(t)),u["aria-labelledby"]&&u["aria-labelledby"]===u.id&&(u["aria-labelledby"]=void 0);let f={};if(t){let h=!1,p=[];for(let[g,v]of Object.entries(t))typeof v=="boolean"&&(h=!0),v===!0&&p.push(g.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(h){f["data-headlessui-state"]=p.join(" ");for(let g of p)f[`data-${g}`]=""}}if(i===m.Fragment&&(Object.keys(Ns(u)).length>0||Object.keys(Ns(f)).length>0))if(!m.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Ns(u)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ns(u)).concat(Object.keys(Ns(f))).map(h=>`  - ${h}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>`  - ${h}`).join(`
`)].join(`
`))}else{let h=d.props,p=h==null?void 0:h.className,g=typeof p=="function"?(...x)=>E6(p(...x),u.className):E6(p,u.className),v=g?{className:g}:{},b=UN(d.props,Ns(g1(u,["ref"])));for(let x in f)x in b&&delete f[x];return m.cloneElement(d,Object.assign({},b,f,c,{ref:o(d.ref,c.ref)},v))}return m.createElement(i,Object.assign({},g1(u,["ref"]),i!==m.Fragment&&c,i!==m.Fragment&&f),d)}function lee(){let e=m.useRef([]),t=m.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function uee(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function UN(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let a=n[r];for(let l of a){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;l(o,...i)}}});return t}function gs(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let a of i)a==null||a(...o)}});return t}function ln(e){var t;return Object.assign(m.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ns(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function g1(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function qN(e,t,n){let[r,o]=m.useState(n),i=e!==void 0,a=m.useRef(i),l=m.useRef(!1),u=m.useRef(!1);return i&&!a.current&&!l.current?(l.current=!0,a.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&a.current&&!u.current&&(u.current=!0,a.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,me(c=>(i||o(c),t==null?void 0:t(c)))]}function HN(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))GN(n,WN(t,r),o);return n}function WN(e,t){return e?e+"["+t+"]":t}function GN(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())GN(e,WN(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):HN(n,t,e)}function cee(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}let dee="div";var vs=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(vs||{});function fee(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return sn({ourProps:i,theirProps:o,slot:{},defaultTag:dee,name:"Hidden"})}let Nl=ln(fee),hee=m.createContext(null);function mee({children:e}){let t=m.useContext(hee);if(!t)return U.createElement(U.Fragment,null,e);let{target:n}=t;return n?or.createPortal(U.createElement(U.Fragment,null,e),n):null}function KN({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,a]=m.useState(null),l=fi();return m.useEffect(()=>{if(r&&i)return l.addEventListener(i,"reset",r)},[i,t,r]),U.createElement(mee,null,U.createElement(pee,{setForm:a,formId:t}),HN(e).map(([u,c])=>U.createElement(Nl,{features:vs.Hidden,...Ns({key:u,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:u,value:c,...o})})))}function pee({setForm:e,formId:t}){return m.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:U.createElement(Nl,{features:vs.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let gee=m.createContext(void 0);function Z2(){return m.useContext(gee)}function c0(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&vee(n)?!1:r}function vee(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let QN=Symbol();function ZN(e,t=!0){return Object.assign(e,{[QN]:t})}function pn(...e){let t=m.useRef(e);m.useEffect(()=>{t.current=e},[e]);let n=me(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[QN]))?void 0:n}let Y2=m.createContext(null);Y2.displayName="DescriptionContext";function YN(){let e=m.useContext(Y2);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,YN),t}return e}function XN(){var e,t;return(t=(e=m.useContext(Y2))==null?void 0:e.value)!=null?t:void 0}let yee="p";function xee(e,t){let n=m.useId(),r=u0(),{id:o=`headlessui-description-${n}`,...i}=e,a=YN(),l=pn(t);dt(()=>a.register(o),[o,a.register]);let u=r||!1,c=m.useMemo(()=>({...a.slot,disabled:u}),[a.slot,u]),d={ref:l,...a.props,id:o};return sn({ourProps:d,theirProps:i,slot:c,defaultTag:yee,name:a.name||"Description"})}let bee=ln(xee);Object.assign(bee,{});var He=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(He||{});let d0=m.createContext(null);d0.displayName="LabelContext";function JN(){let e=m.useContext(d0);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,JN),t}return e}function Hh(e){var t,n,r;let o=(n=(t=m.useContext(d0))==null?void 0:t.value)!=null?n:void 0;return((r=e==null?void 0:e.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function eF({inherit:e=!1}={}){let t=Hh(),[n,r]=m.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,m.useMemo(()=>function(i){let a=me(u=>(r(c=>[...c,u]),()=>r(c=>{let d=c.slice(),f=d.indexOf(u);return f!==-1&&d.splice(f,1),d}))),l=m.useMemo(()=>({register:a,slot:i.slot,name:i.name,props:i.props,value:i.value}),[a,i.slot,i.name,i.props,i.value]);return U.createElement(d0.Provider,{value:l},i.children)},[r])]}let wee="label";function $ee(e,t){var n;let r=m.useId(),o=JN(),i=Z2(),a=u0(),{id:l=`headlessui-label-${r}`,htmlFor:u=i??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...d}=e,f=pn(t);dt(()=>o.register(l),[l,o.register]);let h=me(b=>{let x=b.currentTarget;if(x instanceof HTMLLabelElement&&b.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(b),x instanceof HTMLLabelElement){let y=document.getElementById(x.htmlFor);if(y){let w=y.getAttribute("disabled");if(w==="true"||w==="")return;let S=y.getAttribute("aria-disabled");if(S==="true"||S==="")return;(y instanceof HTMLInputElement&&(y.type==="radio"||y.type==="checkbox")||y.role==="radio"||y.role==="checkbox"||y.role==="switch")&&y.click(),y.focus({preventScroll:!0})}}}),p=a||!1,g=m.useMemo(()=>({...o.slot,disabled:p}),[o.slot,p]),v={ref:f,...o.props,id:l,htmlFor:u,onClick:h};return c&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in d&&delete d.onClick),sn({ourProps:v,theirProps:d,slot:g,defaultTag:u?wee:"div",name:o.name||"Label"})}let See=ln($ee),f0=Object.assign(See,{}),Eee=m.createContext(()=>{});function Cee({value:e,children:t}){return U.createElement(Eee.Provider,{value:e},t)}function Sd(e,t,n){let r=n.initialDeps??[],o;return()=>{var i,a,l,u;let c;n.key&&((i=n.debug)!=null&&i.call(n))&&(c=Date.now());const d=e();if(!(d.length!==r.length||d.some((p,g)=>r[g]!==p)))return o;r=d;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),o=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const p=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-h)*100)/100,v=g/16,b=(x,y)=>{for(x=String(x);x.length<y;)x=" "+x;return x};console.info(`%c⏱ ${b(g,5)} /${b(p,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,o),o}}function v1(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}const Dee=(e,t)=>Math.abs(e-t)<1,jee=(e,t)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}},Pee=e=>e,Ree=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},kee=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=i=>{const{width:a,height:l}=i;t({width:Math.round(a),height:Math.round(l)})};if(r(n.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const o=new ResizeObserver(i=>{const a=i[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){r({width:l.inlineSize,height:l.blockSize});return}}r(n.getBoundingClientRect())});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},C6={passive:!0},Tee=typeof window>"u"?!0:"onscrollend"in window,Iee=(e,t)=>{const n=e.scrollElement;if(!n)return;let r=0;const o=Tee?()=>{}:jee(()=>{t(r,!1)},e.options.isScrollingResetDelay),i=u=>()=>{r=n[e.options.horizontal?"scrollLeft":"scrollTop"],o(),t(r,u)},a=i(!0),l=i(!1);return l(),n.addEventListener("scroll",a,C6),n.addEventListener("scrollend",l,C6),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},Aee=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Nee=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const a=e+t;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class Fee{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(typeof ResizeObserver<"u"?n=new ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}):null);return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Pee,rangeExtractor:Ree,onChange:()=>{},measureElement:Aee,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,...n}},this.notify=(n,r)=>{var o,i;const{startIndex:a,endIndex:l}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(n||a!==(u==null?void 0:u.startIndex)||l!==(u==null?void 0:u.endIndex))&&((i=(o=this.options).onChange)==null||i.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const n=this.options.getScrollElement();this.scrollElement!==n&&(this.cleanup(),this.scrollElement=n,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(r,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.scrollOffset<r?"forward":"backward":null,this.scrollOffset=r;const i=this.isScrolling;this.isScrolling=o,this.notify(i!==o,o)})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=Sd(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(n,r,o,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:i}),{key:!1}),this.getFurthestMeasurement=(n,r)=>{const o=new Map,i=new Map;for(let a=r-1;a>=0;a--){const l=n[a];if(o.has(l.lane))continue;const u=i.get(l.lane);if(u==null||l.end>u.end?i.set(l.lane,l):l.end<u.end&&o.set(l.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((a,l)=>a.end===l.end?a.index-l.index:a.end-l.end)[0]:void 0},this.getMeasurements=Sd(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:i},a)=>{const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const d=i(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=f?f.end+this.options.gap:r+o,p=a.get(d),g=typeof p=="number"?p:this.options.estimateSize(c),v=h+g,b=f?f.lane:c%this.options.lanes;u[c]={index:c,start:h,size:g,end:v,key:d,lane:b}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Sd(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,r,o)=>this.range=n.length>0&&r>0?Mee({measurements:n,outerSize:r,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Sd(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,o,i)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const o=this.measurementsCache[this.indexFromElement(n)];if(!o||!n.isConnected){this.measureElementCache.forEach((l,u)=>{l===n&&(this.observer.unobserve(n),this.measureElementCache.delete(u))});return}const i=this.measureElementCache.get(o.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.measureElementCache.set(o.key,n));const a=this.options.measureElement(n,r,this);this.resizeItem(o,a)},this.resizeItem=(n,r)=>{const o=this.itemSizeCache.get(n.key)??n.size,i=r-o;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this):n.start<this.scrollOffset+this.scrollAdjustments)&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,r)),this.notify(!0,!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=Sd(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let i=0,a=n.length;i<a;i++){const l=n[i],u=r[l];o.push(u)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();return v1(r[tF(0,r.length-1,o=>v1(r[o]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const o=this.getSize();r==="auto"&&(n<=this.scrollOffset?r="start":n>=this.scrollOffset+o?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-o:r==="center"&&(n=n-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=v1(this.getMeasurements()[n]);if(r==="auto")if(o.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)r="end";else if(o.start<=this.scrollOffset+this.options.scrollPaddingStart)r="start";else return[this.scrollOffset,r];const i=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,r),r]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:r="auto",behavior:o}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[i,a]=this.getOffsetForIndex(n,r);this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(n))){const[u]=this.getOffsetForIndex(n,a);Dee(u,this.scrollOffset)||this.scrollToIndex(n,{align:a,behavior:o})}else this.scrollToIndex(n,{align:a,behavior:o})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:r},this)},this.measure=()=>{var n,r;this.itemSizeCache=new Map,(r=(n=this.options).onChange)==null||r.call(n,this,!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(n=>{this.itemSizeCache.set(n.key,n.size)}),this.notify(!1,!1)}}const tF=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else if(i>r)t=o-1;else return o}return e>0?e-1:0};function Mee({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,i=tF(0,r,l=>e[l].start,n);let a=i;for(;a<r&&e[a].end<n+t;)a++;return{startIndex:i,endIndex:a}}const Oee=typeof document<"u"?m.useLayoutEffect:m.useEffect;function _ee(e){const t=m.useReducer(()=>({}),{})[1],n={...e,onChange:(o,i)=>{var a;i?or.flushSync(t):t(),(a=e.onChange)==null||a.call(e,o,i)}},[r]=m.useState(()=>new Fee(n));return r.setOptions(n),m.useEffect(()=>r._didMount(),[]),Oee(()=>r._willUpdate()),r}function Lee(e){return _ee({observeElementRect:kee,observeElementOffset:Iee,scrollToFn:Nee,...e})}function Vee(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function nF(e=Vee){return m.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return(t==null?void 0:t[r])===(n==null?void 0:n[r])}return e(t,n)},[e])}function Bee(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Xg(e,t=!1){let n=e===null?null:"current"in e?e.current:e,[r,o]=m.useReducer(()=>({}),{}),i=m.useMemo(()=>Bee(n),[n,r]);return dt(()=>{if(!n)return;let a=new ResizeObserver(o);return a.observe(n),()=>{a.disconnect()}},[n]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}function zee(){let e=fi();return me(t=>{e.dispose(),e.nextFrame(t)})}let l4=new Map,ff=new Map;function D6(e){var t;let n=(t=ff.get(e))!=null?t:0;return ff.set(e,n+1),n!==0?()=>j6(e):(l4.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>j6(e))}function j6(e){var t;let n=(t=ff.get(e))!=null?t:1;if(n===1?ff.delete(e):ff.set(e,n-1),n!==1)return;let r=l4.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,l4.delete(e))}function rF({allowed:e,disallowed:t}={},n=!0){dt(()=>{var r,o;if(!n)return;let i=zo();for(let l of(r=t==null?void 0:t())!=null?r:[])l&&i.add(D6(l));let a=(o=e==null?void 0:e())!=null?o:[];for(let l of a){if(!l)continue;let u=Xl(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let d of c.children)a.some(f=>d.contains(f))||i.add(D6(d));c=c.parentElement}}return i.dispose},[n,e,t])}function X2(e,t,n=!0){let r=hi(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&t()});m.useEffect(()=>{if(!n)return;let o=e===null?null:e instanceof HTMLElement?e:e.current;if(!o)return;let i=zo();if(typeof ResizeObserver<"u"){let a=new ResizeObserver(()=>r.current(o));a.observe(o),i.add(()=>a.disconnect())}if(typeof IntersectionObserver<"u"){let a=new IntersectionObserver(()=>r.current(o));a.observe(o),i.add(()=>a.disconnect())}return()=>i.dispose()},[e,r,n])}let u4=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Uee=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Oi=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Oi||{}),Jg=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Jg||{}),qee=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(qee||{});function h0(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(u4)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Hee(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Uee)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var m0=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(m0||{});function J2(e,t=0){var n;return e===((n=Xl(e))==null?void 0:n.body)?!1:Yt(t,{0(){return e.matches(u4)},1(){let r=e;for(;r!==null;){if(r.matches(u4))return!0;r=r.parentElement}return!1}})}var Wee=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Wee||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Gee=["textarea","input"].join(",");function Kee(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Gee))!=null?n:!1}function e$(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let a=o.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Zs(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?e$(e):e:t&64?Hee(e):h0(e);o.length>0&&a.length>1&&(a=a.filter(p=>!o.some(g=>g!=null&&"current"in g?(g==null?void 0:g.current)===p:g===p))),r=r??i.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},d=0,f=a.length,h;do{if(d>=f||d+f<=0)return 0;let p=u+d;if(t&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}h=a[p],h==null||h.focus(c),d+=l}while(h!==i.activeElement);return t&6&&Kee(h)&&h.select(),2}function oF(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Qee(){return/Android/gi.test(window.navigator.userAgent)}function iF(){return oF()||Qee()}function Qm(e,t,n){let r=hi(t);m.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function aF(e,t,n){let r=hi(t);m.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function t$(e,t,n=!0){let r=m.useRef(!1);m.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(a,l){if(!r.current||a.defaultPrevented)return;let u=l(a);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let d of c){if(d===null)continue;let f=d instanceof HTMLElement?d:d.current;if(f!=null&&f.contains(u)||a.composed&&a.composedPath().includes(f))return}return!J2(u,m0.Loose)&&u.tabIndex!==-1&&a.preventDefault(),t(a,u)}let i=m.useRef(null);Qm("pointerdown",a=>{var l,u;r.current&&(i.current=((u=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:u[0])||a.target)},!0),Qm("mousedown",a=>{var l,u;r.current&&(i.current=((u=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:u[0])||a.target)},!0),Qm("click",a=>{iF()||i.current&&(o(a,()=>i.current),i.current=null)},!0),Qm("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),aF("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ca(...e){return m.useMemo(()=>Xl(...e),[...e])}function sF(e,t,n,r){let o=hi(n);m.useEffect(()=>{e=e??window;function i(a){o.current(a)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function lF(e){let t=m.useRef({value:"",selectionStart:null,selectionEnd:null});return sF(e.current,"blur",n=>{let r=n.target;r instanceof HTMLInputElement&&(t.current={value:r.value,selectionStart:r.selectionStart,selectionEnd:r.selectionEnd})}),me(()=>{let n=e.current;if(document.activeElement!==n&&n instanceof HTMLInputElement&&n.isConnected){if(n.focus({preventScroll:!0}),n.value!==t.current.value)n.setSelectionRange(n.value.length,n.value.length);else{let{selectionStart:r,selectionEnd:o}=t.current;r!==null&&o!==null&&n.setSelectionRange(r,o)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}function P6(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function n$(e,t){let[n,r]=m.useState(()=>P6(e));return dt(()=>{r(P6(e))},[e.type,e.as]),dt(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}function Zee(e){return m.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Yee(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let a=t[o].call(n,...i);a&&(n=a,r.forEach(l=>l()))}}}function Xee(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function Jee(){return oF()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=zo();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,a=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let u=l.target.closest("a");if(!u)return;let{hash:c}=new URL(u.href),d=e.querySelector(c);d&&!r(d)&&(a=d)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(r(l.target)){let u=l.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;t.style(u,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement){if(l.target.tagName==="INPUT")return;if(r(l.target)){let u=l.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let u=(l=window.scrollY)!=null?l:window.pageYOffset;i!==u&&window.scrollTo(0,i),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function ete(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function tte(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Ys=Yee(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:zo(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:tte(n)},o=[Jee(),Xee(),ete()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Ys.subscribe(()=>{let e=Ys.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Ys.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Ys.dispatch("TEARDOWN",n)}});function nte(e,t,n=()=>({containers:[]})){let r=Zee(Ys),o=e?r.get(e):void 0,i=o?o.count>0:!1;return dt(()=>{if(!(!e||!t))return Ys.dispatch("PUSH",e,n),()=>Ys.dispatch("POP",e,n)},[t,e]),i}function r$(e,t,n=()=>[document.body]){nte(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function R6(e){return[e.screenX,e.screenY]}function uF(){let e=m.useRef([-1,-1]);return{wasMoved(t){let n=R6(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=R6(t)}}}function rte({container:e,accept:t,walk:n,enabled:r=!0}){let o=m.useRef(t),i=m.useRef(n);m.useEffect(()=>{o.current=t,i.current=n},[t,n]),dt(()=>{if(!e||!r)return;let a=Xl(e);if(!a)return;let l=o.current,u=i.current,c=Object.assign(f=>l(f),{acceptNode:l}),d=a.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)u(d.currentNode)},[e,r,o,i])}function k6(e,t){let n=m.useRef([]),r=me(e);m.useEffect(()=>{let o=[...n.current];for(let[i,a]of t.entries())if(n.current[i]!==a){let l=r(t,o);return n.current=t,l}},[r,...t])}let Zc=m.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Zc.displayName="FloatingContext";let o$=m.createContext(null);o$.displayName="PlacementContext";function i$(e){return m.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function a$(){return m.useContext(Zc).setReference}function ote(){return m.useContext(Zc).getReferenceProps}function s$(){let{getFloatingProps:e,slot:t}=m.useContext(Zc);return m.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function l$(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=m.useContext(o$),n=m.useMemo(()=>e,[JSON.stringify(e,typeof HTMLElement<"u"?(o,i)=>i instanceof HTMLElement?i.outerHTML:i:void 0)]);dt(()=>{t==null||t(n??null)},[t,n]);let r=m.useContext(Zc);return m.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let T6=4;function u$({children:e,enabled:t=!0}){let[n,r]=m.useState(null),[o,i]=m.useState(0),a=m.useRef(null),[l,u]=m.useState(null);ite(l);let c=t&&n!==null&&l!==null,{to:d="bottom",gap:f=0,offset:h=0,padding:p=0,inner:g}=ate(n,l),[v,b="center"]=d.split(" ");dt(()=>{c&&i(0)},[c]);let{refs:x,floatingStyles:y,context:w}=Wk({open:c,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[qv({mainAxis:v==="selection"?0:f,crossAxis:h}),Ik({padding:p}),v!=="selection"&&s2({padding:p}),v==="selection"&&g?nK({...g,padding:p,overflowRef:a,offset:o,minItemsVisible:T6,referenceOverflowThreshold:p,onFallbackChange(P){var k,N;if(!P)return;let j=w.elements.floating;if(!j)return;let F=parseFloat(getComputedStyle(j).scrollPaddingBottom)||0,I=Math.min(T6,j.childElementCount),R=0,M=0;for(let O of(N=(k=w.elements.floating)==null?void 0:k.childNodes)!=null?N:[])if(O instanceof HTMLElement){let q=O.offsetTop,H=q+O.clientHeight+F,G=j.scrollTop,ce=G+j.clientHeight;if(q>=G&&H<=ce)I--;else{M=Math.max(0,Math.min(H,ce)-Math.max(q,G)),R=O.clientHeight;break}}I>=1&&i(O=>{let q=R*I-M+F;return O>=q?O:q})}}):null,Ak({padding:p,apply({availableWidth:P,availableHeight:k,elements:N}){Object.assign(N.floating.style,{overflow:"auto",maxWidth:`${P}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${k}px)`})}})].filter(Boolean),whileElementsMounted:a2}),[S=v,C=b]=w.placement.split("-");v==="selection"&&(S="selection");let E=m.useMemo(()=>({anchor:[S,C].filter(Boolean).join(" ")}),[S,C]),D=rK(w,{overflowRef:a,onChange:i}),{getReferenceProps:$,getFloatingProps:T}=Gk([D]),A=me(P=>{u(P),x.setFloating(P)});return m.createElement(o$.Provider,{value:r},m.createElement(Zc.Provider,{value:{setFloating:A,setReference:x.setReference,styles:y,getReferenceProps:$,getFloatingProps:T,slot:E}},e))}function ite(e){dt(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=e.style.maxHeight;parseFloat(n)!==parseInt(n)&&(e.style.maxHeight=`${Math.ceil(parseFloat(n))}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function ate(e,t){var n,r,o;let i=y1((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),a=y1((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),l=y1((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:a,padding:l}}function y1(e,t,n=void 0){let r=fi(),o=me((u,c)=>{if(u==null)return[n,null];if(typeof u=="number")return[u,null];if(typeof u=="string"){if(!c)return[n,null];let d=I6(u,c);return[d,f=>{let h=cF(u);{let p=h.map(g=>window.getComputedStyle(c).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let v=!1;for(let[x,y]of h.entries()){let w=window.getComputedStyle(c).getPropertyValue(y);if(p[x]!==w){p[x]=w,v=!0;break}}if(!v)return;let b=I6(u,c);d!==b&&(f(b),d=b)})}return r.dispose}]}return[n,null]}),i=m.useMemo(()=>o(e,t)[0],[e,t]),[a=i,l]=m.useState();return dt(()=>{let[u,c]=o(e,t);if(l(u),!!c)return c(l)},[e,t]),a}function cF(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...cF(o)]:[r]}return[]}function I6(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}let c$=m.createContext(null);c$.displayName="OpenClosedContext";var ar=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ar||{});function p0(){return m.useContext(c$)}function d$({value:e,children:t}){return U.createElement(c$.Provider,{value:e},t)}function ste(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Vs=[];ste(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Vs[0]!==t.target&&(Vs.unshift(t.target),Vs=Vs.filter(n=>n!=null&&n.isConnected),Vs.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function lte(e){throw new Error("Unexpected object: "+e)}var We=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(We||{});function hf(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{o===-1&&(o=n.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=o+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:lte(e)}}var f$=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(f$||{});function ute(e){let t=me(e),n=m.useRef(!1);m.useEffect(()=>(n.current=!1,()=>{n.current=!0,zN(()=>{n.current&&t()})}),[t])}function cte(){let e=typeof document>"u";return"useSyncExternalStore"in vf?(t=>t.useSyncExternalStore)(vf)(()=>()=>{},()=>!1,()=>!e):!1}function dte(){let e=cte(),[t,n]=m.useState(dl.isHandoffComplete);return t&&dl.isHandoffComplete===!1&&n(!1),m.useEffect(()=>{t!==!0&&n(!0)},[t]),m.useEffect(()=>dl.handoff(),[]),e?!1:t}let fte=m.createContext(!1);function hte(){return m.useContext(fte)}function mte(e){let t=hte(),n=m.useContext(fF),r=ca(e),[o,i]=m.useState(()=>{var a;if(!t&&n!==null)return(a=n.current)!=null?a:null;if(dl.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let u=r.createElement("div");return u.setAttribute("id","headlessui-portal-root"),r.body.appendChild(u)});return m.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),m.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let dF=m.Fragment,pte=ln(function(e,t){let n=e,r=m.useRef(null),o=pn(ZN(d=>{r.current=d}),t),i=ca(r),a=mte(r),[l]=m.useState(()=>{var d;return dl.isServer?null:(d=i==null?void 0:i.createElement("div"))!=null?d:null}),u=m.useContext(c4),c=dte();return dt(()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))},[a,l]),dt(()=>{if(l&&u)return u.register(l)},[u,l]),ute(()=>{var d;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&((d=a.parentElement)==null||d.removeChild(a)))}),c?!a||!l?null:or.createPortal(sn({ourProps:{ref:o},theirProps:n,slot:{},defaultTag:dF,name:"Portal"}),l):null});function gte(e,t){let n=pn(t),{enabled:r=!0,...o}=e;return r?U.createElement(pte,{...o,ref:n}):sn({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:dF,name:"Portal"})}let vte=m.Fragment,fF=m.createContext(null);function yte(e,t){let{target:n,...r}=e,o={ref:pn(t)};return U.createElement(fF.Provider,{value:n},sn({ourProps:o,theirProps:r,defaultTag:vte,name:"Popover.Group"}))}let c4=m.createContext(null);function xte(){let e=m.useContext(c4),t=m.useRef([]),n=me(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=me(i=>{let a=t.current.indexOf(i);a!==-1&&t.current.splice(a,1),e&&e.unregister(i)}),o=m.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,m.useMemo(()=>function({children:i}){return U.createElement(c4.Provider,{value:o},i)},[o])]}let bte=ln(gte),wte=ln(yte),h$=Object.assign(bte,{Group:wte});var $te={},Ste=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ste||{}),Ete=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ete||{}),Cte=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Cte||{}),Dte=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.SetActivationTrigger=5]="SetActivationTrigger",e[e.UpdateVirtualOptions=6]="UpdateVirtualOptions",e))(Dte||{});function x1(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((a,l)=>a.dataRef.current.order-l.dataRef.current.order):e$(r,a=>a.dataRef.current.domRef.current),i=n?o.indexOf(n):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let jte={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1,activationTrigger:2,__demoMode:!1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},2(e,t){var n,r,o,i,a;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===We.Specific?t.idx:hf(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var h,p;return(p=(h=e.activeOptionIndex)!=null?h:e.virtual.options.findIndex(g=>!e.virtual.disabled(g)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),f=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===d&&e.activationTrigger===f?e:{...e,activeOptionIndex:d,activationTrigger:f,__demoMode:!1}}let l=x1(e);if(l.activeOptionIndex===null){let d=l.options.findIndex(f=>!f.dataRef.current.disabled);d!==-1&&(l.activeOptionIndex=d)}let u=t.focus===We.Specific?t.idx:hf(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),c=(a=t.trigger)!=null?a:2;return e.activeOptionIndex===u&&e.activationTrigger===c?e:{...e,...l,activeOptionIndex:u,activationTrigger:c,__demoMode:!1}},3:(e,t)=>{var n,r,o;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,a=x1(e,u=>(u.push(i),u));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(i));let l={...e,...a,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(l.activeOptionIndex=0),l},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(o=>o.id!==t.id)};let r=x1(e,o=>{let i=o.findIndex(a=>a.id===t.id);return i!==-1&&o.splice(i,1),o});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},6:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},m$=m.createContext(null);m$.displayName="ComboboxActionsContext";function Wh(e){let t=m.useContext(m$);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Wh),n}return t}let hF=m.createContext(null);function Pte(e){var t;let n=Yc("VirtualProvider"),[r,o]=m.useMemo(()=>{let c=n.optionsRef.current;if(!c)return[0,0];let d=window.getComputedStyle(c);return[parseFloat(d.paddingBlockStart||d.paddingTop),parseFloat(d.paddingBlockEnd||d.paddingBottom)]},[n.optionsRef.current]),i=Lee({scrollPaddingStart:r,scrollPaddingEnd:o,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var c;return(c=n.optionsRef.current)!=null?c:null},overscan:12}),[a,l]=m.useState(0);dt(()=>{l(c=>c+1)},[(t=n.virtual)==null?void 0:t.options]);let u=i.getVirtualItems();return u.length===0?null:U.createElement(hF.Provider,{value:i},U.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:c=>{if(c){if(typeof process<"u"&&$te.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&i.scrollToIndex(n.activeOptionIndex)}}},u.map(c=>{var d;return U.createElement(m.Fragment,{key:c.key},U.cloneElement((d=e.children)==null?void 0:d.call(e,{option:n.virtual.options[c.index],open:n.comboboxState===0}),{key:`${a}-${c.key}`,"data-index":c.index,"aria-setsize":n.virtual.options.length,"aria-posinset":c.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${c.start}px)`,overflowAnchor:"none"}}))})))}let g0=m.createContext(null);g0.displayName="ComboboxDataContext";function Yc(e){let t=m.useContext(g0);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Yc),n}return t}function Rte(e,t){return Yt(t.type,jte,e,t)}let kte=m.Fragment;function Tte(e,t){var n,r;let o=u0(),{value:i,defaultValue:a,onChange:l,form:u,name:c,by:d,disabled:f=o||!1,onClose:h,__demoMode:p=!1,multiple:g=!1,immediate:v=!1,virtual:b=null,nullable:x,...y}=e,[w=g?[]:void 0,S]=qN(i,l,a),[C,E]=m.useReducer(Rte,{dataRef:m.createRef(),comboboxState:p?0:1,options:[],virtual:b?{options:b.options,disabled:(n=b.disabled)!=null?n:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,__demoMode:p}),D=m.useRef(!1),$=m.useRef({static:!1,hold:!1}),T=m.useRef(null),A=m.useRef(null),P=m.useRef(null),k=nF(d),N=me(oe=>b?d===null?b.options.indexOf(oe):b.options.findIndex(ve=>k(ve,oe)):C.options.findIndex(ve=>k(ve.dataRef.current.value,oe))),j=m.useCallback(oe=>Yt(I.mode,{1:()=>w.some(ve=>k(ve,oe)),0:()=>k(w,oe)}),[w]),F=me(oe=>C.activeOptionIndex===N(oe)),I=m.useMemo(()=>({...C,immediate:v,optionsPropsRef:$,inputRef:T,buttonRef:A,optionsRef:P,value:w,defaultValue:a,disabled:f,mode:g?1:0,virtual:C.virtual,get activeOptionIndex(){if(D.current&&C.activeOptionIndex===null&&(b?b.options.length>0:C.options.length>0)){if(b){let ve=b.options.findIndex(Me=>{var un,cr;return!((cr=(un=b==null?void 0:b.disabled)==null?void 0:un.call(b,Me))!=null&&cr)});if(ve!==-1)return ve}let oe=C.options.findIndex(ve=>!ve.dataRef.current.disabled);if(oe!==-1)return oe}return C.activeOptionIndex},calculateIndex:N,compare:k,isSelected:j,isActive:F}),[w,a,f,g,p,C,b]);dt(()=>{b&&E({type:6,options:b.options})},[b,b==null?void 0:b.options]),dt(()=>{C.dataRef.current=I},[I]),t$([I.buttonRef,I.inputRef,I.optionsRef],()=>ee.closeCombobox(),I.comboboxState===0);let R=m.useMemo(()=>{var oe,ve,Me;return{open:I.comboboxState===0,disabled:f,activeIndex:I.activeOptionIndex,activeOption:I.activeOptionIndex===null?null:I.virtual?I.virtual.options[(oe=I.activeOptionIndex)!=null?oe:0]:(Me=(ve=I.options[I.activeOptionIndex])==null?void 0:ve.dataRef.current.value)!=null?Me:null,value:w}},[I,f,w]),M=me(()=>{if(I.activeOptionIndex!==null){if(I.virtual)ce(I.virtual.options[I.activeOptionIndex]);else{let{dataRef:oe}=I.options[I.activeOptionIndex];ce(oe.current.value)}ee.goToOption(We.Specific,I.activeOptionIndex)}}),O=me(()=>{E({type:0}),D.current=!0}),q=me(()=>{E({type:1}),D.current=!1,h==null||h()}),H=me((oe,ve,Me)=>(D.current=!1,oe===We.Specific?E({type:2,focus:We.Specific,idx:ve,trigger:Me}):E({type:2,focus:oe,trigger:Me}))),G=me((oe,ve)=>(E({type:3,payload:{id:oe,dataRef:ve}}),()=>{I.isActive(ve.current.value)&&(D.current=!0),E({type:4,id:oe})})),ce=me(oe=>Yt(I.mode,{0(){return S==null?void 0:S(oe)},1(){let ve=I.value.slice(),Me=ve.findIndex(un=>k(un,oe));return Me===-1?ve.push(oe):ve.splice(Me,1),S==null?void 0:S(ve)}})),Z=me(oe=>{E({type:5,trigger:oe})}),ee=m.useMemo(()=>({onChange:ce,registerOption:G,goToOption:H,closeCombobox:q,openCombobox:O,setActivationTrigger:Z,selectActiveOption:M}),[]),[re,Q]=eF(),ue=t===null?{}:{ref:t},J=m.useCallback(()=>S==null?void 0:S(a),[S]);return U.createElement(Q,{value:re,props:{htmlFor:(r=I.inputRef.current)==null?void 0:r.id},slot:{open:I.comboboxState===0,disabled:f}},U.createElement(u$,null,U.createElement(m$.Provider,{value:ee},U.createElement(g0.Provider,{value:I},U.createElement(d$,{value:Yt(I.comboboxState,{0:ar.Open,1:ar.Closed})},c!=null&&U.createElement(KN,{disabled:f,data:w!=null?{[c]:w}:{},form:u,onReset:J}),sn({ourProps:ue,theirProps:y,slot:R,defaultTag:kte,name:"Combobox"}))))))}let Ite="input";function Ate(e,t){var n,r,o,i,a;let l=Yc("Combobox.Input"),u=Wh("Combobox.Input"),c=m.useId(),d=Z2(),{id:f=d||`headlessui-combobox-input-${c}`,onChange:h,displayValue:p,disabled:g=l.disabled||!1,autoFocus:v=!1,type:b="text",...x}=e,y=pn(l.inputRef,t,a$()),w=ca(l.inputRef),S=m.useRef(!1),C=fi(),E=me(()=>{u.onChange(null),l.optionsRef.current&&(l.optionsRef.current.scrollTop=0),u.goToOption(We.Nothing)}),D=m.useMemo(()=>{var Z;return typeof p=="function"&&l.value!==void 0?(Z=p(l.value))!=null?Z:"":typeof l.value=="string"?l.value:""},[l.value,p]);k6(([Z,ee],[re,Q])=>{if(S.current)return;let ue=l.inputRef.current;ue&&((Q===0&&ee===1||Z!==re)&&(ue.value=Z),requestAnimationFrame(()=>{if(S.current||!ue||(w==null?void 0:w.activeElement)!==ue)return;let{selectionStart:J,selectionEnd:oe}=ue;Math.abs((oe??0)-(J??0))===0&&J===0&&ue.setSelectionRange(ue.value.length,ue.value.length)}))},[D,l.comboboxState,w]),k6(([Z],[ee])=>{if(Z===0&&ee===1){if(S.current)return;let re=l.inputRef.current;if(!re)return;let Q=re.value,{selectionStart:ue,selectionEnd:J,selectionDirection:oe}=re;re.value="",re.value=Q,oe!==null?re.setSelectionRange(ue,J,oe):re.setSelectionRange(ue,J)}},[l.comboboxState]);let $=m.useRef(!1),T=me(()=>{$.current=!0}),A=me(()=>{C.nextFrame(()=>{$.current=!1})}),P=zee(),k=me(Z=>{switch(S.current=!0,P(()=>{S.current=!1}),Z.key){case He.Enter:if(S.current=!1,l.comboboxState!==0||$.current)return;if(Z.preventDefault(),Z.stopPropagation(),l.activeOptionIndex===null){u.closeCombobox();return}u.selectActiveOption(),l.mode===0&&u.closeCombobox();break;case He.ArrowDown:return S.current=!1,Z.preventDefault(),Z.stopPropagation(),Yt(l.comboboxState,{0:()=>u.goToOption(We.Next),1:()=>u.openCombobox()});case He.ArrowUp:return S.current=!1,Z.preventDefault(),Z.stopPropagation(),Yt(l.comboboxState,{0:()=>u.goToOption(We.Previous),1:()=>{u.openCombobox(),C.nextFrame(()=>{l.value||u.goToOption(We.Last)})}});case He.Home:if(Z.shiftKey)break;return S.current=!1,Z.preventDefault(),Z.stopPropagation(),u.goToOption(We.First);case He.PageUp:return S.current=!1,Z.preventDefault(),Z.stopPropagation(),u.goToOption(We.First);case He.End:if(Z.shiftKey)break;return S.current=!1,Z.preventDefault(),Z.stopPropagation(),u.goToOption(We.Last);case He.PageDown:return S.current=!1,Z.preventDefault(),Z.stopPropagation(),u.goToOption(We.Last);case He.Escape:return S.current=!1,l.comboboxState!==0?void 0:(Z.preventDefault(),l.optionsRef.current&&!l.optionsPropsRef.current.static&&Z.stopPropagation(),l.mode===0&&l.value===null&&E(),u.closeCombobox());case He.Tab:if(S.current=!1,l.comboboxState!==0)return;l.mode===0&&l.activationTrigger!==1&&u.selectActiveOption(),u.closeCombobox();break}}),N=me(Z=>{h==null||h(Z),l.mode===0&&Z.target.value===""&&E(),u.openCombobox()}),j=me(Z=>{var ee,re,Q;let ue=(ee=Z.relatedTarget)!=null?ee:Vs.find(J=>J!==Z.currentTarget);if(S.current=!1,!((re=l.optionsRef.current)!=null&&re.contains(ue))&&!((Q=l.buttonRef.current)!=null&&Q.contains(ue))&&l.comboboxState===0)return Z.preventDefault(),l.mode===0&&l.value===null&&E(),u.closeCombobox()}),F=me(Z=>{var ee,re,Q;let ue=(ee=Z.relatedTarget)!=null?ee:Vs.find(J=>J!==Z.currentTarget);(re=l.buttonRef.current)!=null&&re.contains(ue)||(Q=l.optionsRef.current)!=null&&Q.contains(ue)||l.disabled||l.immediate&&l.comboboxState!==0&&(u.openCombobox(),C.nextFrame(()=>{u.setActivationTrigger(1)}))}),I=Hh(),R=XN(),{isFocused:M,focusProps:O}=Vh({autoFocus:v}),{isHovered:q,hoverProps:H}=e0({isDisabled:g}),G=m.useMemo(()=>({open:l.comboboxState===0,disabled:g,hover:q,focus:M,autofocus:v}),[l,q,M,v,g]),ce=gs({ref:y,id:f,role:"combobox",type:b,"aria-controls":(n=l.optionsRef.current)==null?void 0:n.id,"aria-expanded":l.comboboxState===0,"aria-activedescendant":l.activeOptionIndex===null?void 0:l.virtual?(r=l.options.find(Z=>!Z.dataRef.current.disabled&&l.compare(Z.dataRef.current.value,l.virtual.options[l.activeOptionIndex])))==null?void 0:r.id:(o=l.options[l.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":I,"aria-describedby":R,"aria-autocomplete":"list",defaultValue:(a=(i=e.defaultValue)!=null?i:l.defaultValue!==void 0?p==null?void 0:p(l.defaultValue):null)!=null?a:l.defaultValue,disabled:g||void 0,autoFocus:v,onCompositionStart:T,onCompositionEnd:A,onKeyDown:k,onChange:N,onFocus:F,onBlur:j},O,H);return sn({ourProps:ce,theirProps:x,slot:G,defaultTag:Ite,name:"Combobox.Input"})}let Nte="button";function Fte(e,t){var n;let r=Yc("Combobox.Button"),o=Wh("Combobox.Button"),i=pn(r.buttonRef,t),a=m.useId(),{id:l=`headlessui-combobox-button-${a}`,disabled:u=r.disabled||!1,autoFocus:c=!1,...d}=e,f=fi(),h=lF(r.inputRef),p=me($=>{switch($.key){case He.Space:case He.Enter:return $.preventDefault(),$.stopPropagation(),r.comboboxState===1&&o.openCombobox(),f.nextFrame(()=>h());case He.ArrowDown:return $.preventDefault(),$.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),f.nextFrame(()=>{r.value||o.goToOption(We.First)})),f.nextFrame(()=>h());case He.ArrowUp:return $.preventDefault(),$.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),f.nextFrame(()=>{r.value||o.goToOption(We.Last)})),f.nextFrame(()=>h());case He.Escape:return r.comboboxState!==0?void 0:($.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&$.stopPropagation(),o.closeCombobox(),f.nextFrame(()=>h()));default:return}}),g=me($=>{$.preventDefault(),!c0($.currentTarget)&&($.button===f$.Left&&(r.comboboxState===0?o.closeCombobox():o.openCombobox()),h())}),v=Hh([l]),{isFocusVisible:b,focusProps:x}=Vh({autoFocus:c}),{isHovered:y,hoverProps:w}=e0({isDisabled:u}),{pressed:S,pressProps:C}=Q2({disabled:u}),E=m.useMemo(()=>({open:r.comboboxState===0,active:S||r.comboboxState===0,disabled:u,value:r.value,hover:y,focus:b}),[r,y,b,S,u]),D=gs({ref:i,id:l,type:n$(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":v,disabled:u||void 0,autoFocus:c,onMouseDown:g,onKeyDown:p},x,w,C);return sn({ourProps:D,theirProps:d,slot:E,defaultTag:Nte,name:"Combobox.Button"})}let Mte="div",Ote=ea.RenderStrategy|ea.Static;function _te(e,t){var n;let r=m.useId(),{id:o=`headlessui-combobox-options-${r}`,hold:i=!1,anchor:a,portal:l=!1,modal:u=!0,...c}=e,d=Yc("Combobox.Options"),f=Wh("Combobox.Options"),h=i$(a);h&&(l=!0);let[p,g]=l$(h),v=s$(),b=pn(d.optionsRef,t,h?p:null),x=ca(d.optionsRef),y=p0(),w=y!==null?(y&ar.Open)===ar.Open:d.comboboxState===0;X2(d.inputRef,f.closeCombobox,w),r$(x,d.__demoMode?!1:u&&d.comboboxState===0),rF({allowed:me(()=>[d.inputRef.current,d.buttonRef.current,d.optionsRef.current])},d.__demoMode?!1:u&&d.comboboxState===0),dt(()=>{var P;d.optionsPropsRef.current.static=(P=e.static)!=null?P:!1},[d.optionsPropsRef,e.static]),dt(()=>{d.optionsPropsRef.current.hold=i},[d.optionsPropsRef,i]),rte({container:d.optionsRef.current,enabled:d.comboboxState===0,accept(P){return P.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:P.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(P){P.setAttribute("role","none")}});let S=Hh([(n=d.buttonRef.current)==null?void 0:n.id]),C=m.useMemo(()=>({open:d.comboboxState===0,option:void 0}),[d]),E=me(()=>{f.setActivationTrigger(0)}),D=gs(h?v():{},{"aria-labelledby":S,role:"listbox","aria-multiselectable":d.mode===1?!0:void 0,id:o,ref:b,style:{...g,"--input-width":Xg(d.inputRef,!0).width,"--button-width":Xg(d.buttonRef,!0).width},onWheel:E});d.virtual&&w&&Object.assign(c,{children:U.createElement(Pte,null,c.children)});let[$,T]=m.useState(d.value);d.value!==$&&d.comboboxState===0&&d.mode!==1&&T(d.value);let A=me(P=>d.compare($,P));return U.createElement(h$,{enabled:l?e.static||w:!1},U.createElement(g0.Provider,{value:d.mode===1?d:{...d,isSelected:A}},sn({ourProps:D,theirProps:c,slot:C,defaultTag:Mte,features:Ote,visible:w,name:"Combobox.Options"})))}let Lte="div";function Vte(e,t){var n,r,o;let i=Yc("Combobox.Option"),a=Wh("Combobox.Option"),l=m.useId(),{id:u=`headlessui-combobox-option-${l}`,value:c,disabled:d=(r=(n=i.virtual)==null?void 0:n.disabled(c))!=null?r:!1,order:f=null,...h}=e,p=lF(i.inputRef),g=i.virtual?i.activeOptionIndex===i.calculateIndex(c):i.activeOptionIndex===null?!1:((o=i.options[i.activeOptionIndex])==null?void 0:o.id)===u,v=i.isSelected(c),b=m.useRef(null),x=hi({disabled:d,value:c,domRef:b,order:f}),y=m.useContext(hF),w=pn(t,b,y?y.measureElement:null),S=me(()=>a.onChange(c));dt(()=>a.registerOption(u,x),[x,u]);let C=m.useRef(!(i.virtual||i.__demoMode));dt(()=>{if(!i.virtual&&!i.__demoMode)return zo().requestAnimationFrame(()=>{C.current=!0})},[i.virtual,i.__demoMode]),dt(()=>{if(C.current&&i.comboboxState===0&&g&&i.activationTrigger!==0)return zo().requestAnimationFrame(()=>{var N,j;(j=(N=b.current)==null?void 0:N.scrollIntoView)==null||j.call(N,{block:"nearest"})})},[b,g,i.comboboxState,i.activationTrigger,i.activeOptionIndex]);let E=me(N=>{N.preventDefault(),N.button===f$.Left&&(d||(S(),iF()||requestAnimationFrame(()=>p()),i.mode===0&&a.closeCombobox()))}),D=me(()=>{if(d)return a.goToOption(We.Nothing);let N=i.calculateIndex(c);a.goToOption(We.Specific,N)}),$=uF(),T=me(N=>$.update(N)),A=me(N=>{if(!$.wasMoved(N)||d||g)return;let j=i.calculateIndex(c);a.goToOption(We.Specific,j,0)}),P=me(N=>{$.wasMoved(N)&&(d||g&&(i.optionsPropsRef.current.hold||a.goToOption(We.Nothing)))}),k=m.useMemo(()=>({active:g,focus:g,selected:v,disabled:d}),[g,v,d]);return sn({ourProps:{id:u,ref:w,role:"option",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,"aria-selected":v,disabled:void 0,onMouseDown:E,onFocus:D,onPointerEnter:T,onMouseEnter:T,onPointerMove:A,onMouseMove:A,onPointerLeave:P,onMouseLeave:P},theirProps:h,slot:k,defaultTag:Lte,name:"Combobox.Option"})}let Bte=ln(Tte),mF=ln(Fte),pF=ln(Ate),zte=f0,gF=ln(_te),d4=ln(Vte),Ute=Object.assign(Bte,{Input:pF,Button:mF,Label:zte,Options:gF,Option:d4});function qte({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=m.useRef((r=n==null?void 0:n.current)!=null?r:null),i=ca(o),a=me(()=>{var l,u,c;let d=[];for(let f of e)f!==null&&(f instanceof HTMLElement?d.push(f):"current"in f&&f.current instanceof HTMLElement&&d.push(f.current));if(t!=null&&t.current)for(let f of t.current)d.push(f);for(let f of(l=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?l:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||f.contains((c=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:c.host)||d.some(h=>f.contains(h))||d.push(f));return d});return{resolveContainers:a,contains:me(l=>a().some(u=>u.contains(l))),mainTreeNodeRef:o,MainTreeNode:m.useMemo(()=>function(){return n!=null?null:U.createElement(Nl,{features:vs.Hidden,ref:o})},[o,n])}}function Hte(){let e=m.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:m.useMemo(()=>function(){return U.createElement(Nl,{features:vs.Hidden,ref:e})},[e])}}var _i=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(_i||{});function vF(){let e=m.useRef(0);return aF("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Wte(e,t){let[n,r]=m.useState(e),o=hi(e);return dt(()=>r(o.current),[o,r,...t]),n}function Gte(e,t=!0){let n=m.useRef({left:0,top:0});if(dt(()=>{let o=e.current;if(!o)return;let i=o.getBoundingClientRect();i&&(n.current=i)},[t]),e.current==null||!t||e.current===document.activeElement)return!1;let r=e.current.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let A6=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function N6(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let l of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),i=!0;let a=i?(n=o.innerText)!=null?n:"":r;return A6.test(a)&&(a=a.replace(A6,"")),a}function Kte(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let i=document.getElementById(o);if(i){let a=i.getAttribute("aria-label");return typeof a=="string"?a.trim():N6(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return N6(e).trim()}function Qte(e){let t=m.useRef(""),n=m.useRef("");return me(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=Kte(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var Zte=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zte||{}),Yte=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Yte||{}),Xte=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Xte||{}),Jte=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e))(Jte||{});function b1(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=e$(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let ene={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(o=>n(o.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,o,i,a;if(e.dataRef.current.disabled||e.listboxState===1)return e;let l={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===We.Nothing)return{...l,activeOptionIndex:null};if(t.focus===We.Specific)return{...l,activeOptionIndex:e.options.findIndex(d=>d.id===t.id)};if(t.focus===We.Previous){let d=e.activeOptionIndex;if(d!==null){let f=e.options[d].dataRef.current.domRef,h=hf(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=e.options[h].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...l,activeOptionIndex:h}}}}else if(t.focus===We.Next){let d=e.activeOptionIndex;if(d!==null){let f=e.options[d].dataRef.current.domRef,h=hf(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===p.current||((a=p.current)==null?void 0:a.nextElementSibling)===null)return{...l,activeOptionIndex:h}}}}let u=b1(e),c=hf(t,{resolveItems:()=>u.options,resolveActiveIndex:()=>u.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...l,...u,activeOptionIndex:c}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(a=>{var l;return!a.dataRef.current.disabled&&((l=a.dataRef.current.textValue)==null?void 0:l.startsWith(r))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=b1(e,o=>[...o,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=b1(e,r=>{let o=r.findIndex(i=>i.id===t.id);return o!==-1&&r.splice(o,1),r});return{...e,...n,activationTrigger:1}}},p$=m.createContext(null);p$.displayName="ListboxActionsContext";function v0(e){let t=m.useContext(p$);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,v0),n}return t}let y0=m.createContext(null);y0.displayName="ListboxDataContext";function Gh(e){let t=m.useContext(y0);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Gh),n}return t}function tne(e,t){return Yt(t.type,ene,e,t)}let nne=m.Fragment;function rne(e,t){var n;let r=u0(),{value:o,defaultValue:i,form:a,name:l,onChange:u,by:c,invalid:d=!1,disabled:f=r||!1,horizontal:h=!1,multiple:p=!1,__demoMode:g=!1,...v}=e;const b=h?"horizontal":"vertical";let x=pn(t),[y=p?[]:void 0,w]=qN(o,u,i),[S,C]=m.useReducer(tne,{dataRef:m.createRef(),listboxState:g?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,__demoMode:g}),E=m.useRef({static:!1,hold:!1}),D=m.useRef(null),$=m.useRef(null),T=m.useRef(new Map),A=nF(c),P=m.useCallback(J=>Yt(k.mode,{1:()=>y.some(oe=>A(oe,J)),0:()=>A(y,J)}),[y]),k=m.useMemo(()=>({...S,value:y,disabled:f,invalid:d,mode:p?1:0,orientation:b,compare:A,isSelected:P,optionsPropsRef:E,buttonRef:D,optionsRef:$,listRef:T}),[y,f,d,p,S,T]);dt(()=>{S.dataRef.current=k},[k]),t$([k.buttonRef,k.optionsRef],(J,oe)=>{var ve;C({type:1}),J2(oe,m0.Loose)||(J.preventDefault(),(ve=k.buttonRef.current)==null||ve.focus())},k.listboxState===0);let N=m.useMemo(()=>({open:k.listboxState===0,disabled:f,invalid:d,value:y}),[k,f,y,d]),j=me(J=>{let oe=k.options.find(ve=>ve.id===J);oe&&H(oe.dataRef.current.value)}),F=me(()=>{if(k.activeOptionIndex!==null){let{dataRef:J,id:oe}=k.options[k.activeOptionIndex];H(J.current.value),C({type:2,focus:We.Specific,id:oe})}}),I=me(()=>C({type:0})),R=me(()=>C({type:1})),M=fi(),O=me((J,oe,ve)=>{M.dispose(),M.microTask(()=>J===We.Specific?C({type:2,focus:We.Specific,id:oe,trigger:ve}):C({type:2,focus:J,trigger:ve}))}),q=me((J,oe)=>(C({type:5,id:J,dataRef:oe}),()=>C({type:6,id:J}))),H=me(J=>Yt(k.mode,{0(){return w==null?void 0:w(J)},1(){let oe=k.value.slice(),ve=oe.findIndex(Me=>A(Me,J));return ve===-1?oe.push(J):oe.splice(ve,1),w==null?void 0:w(oe)}})),G=me(J=>C({type:3,value:J})),ce=me(()=>C({type:4})),Z=m.useMemo(()=>({onChange:H,registerOption:q,goToOption:O,closeListbox:R,openListbox:I,selectActiveOption:F,selectOption:j,search:G,clearSearch:ce}),[]),[ee,re]=eF({inherit:!0}),Q={ref:x},ue=m.useCallback(()=>w==null?void 0:w(i),[w]);return U.createElement(re,{value:ee,props:{htmlFor:(n=k.buttonRef.current)==null?void 0:n.id},slot:{open:k.listboxState===0,disabled:f}},U.createElement(u$,null,U.createElement(p$.Provider,{value:Z},U.createElement(y0.Provider,{value:k},U.createElement(d$,{value:Yt(k.listboxState,{0:ar.Open,1:ar.Closed})},l!=null&&y!=null&&U.createElement(KN,{disabled:f,data:{[l]:y},form:a,onReset:ue}),sn({ourProps:Q,theirProps:v,slot:N,defaultTag:nne,name:"Listbox"}))))))}let one="button";function ine(e,t){var n;let r=Gh("Listbox.Button"),o=v0("Listbox.Button"),i=m.useId(),a=Z2(),{id:l=a||`headlessui-listbox-button-${i}`,disabled:u=r.disabled||!1,autoFocus:c=!1,...d}=e,f=pn(r.buttonRef,t,a$()),h=ote(),p=fi(),g=me(k=>{switch(k.key){case He.Enter:cee(k.currentTarget);break;case He.Space:case He.ArrowDown:k.preventDefault(),o.openListbox(),p.nextFrame(()=>{r.value||o.goToOption(We.First)});break;case He.ArrowUp:k.preventDefault(),o.openListbox(),p.nextFrame(()=>{r.value||o.goToOption(We.Last)});break}}),v=me(k=>{switch(k.key){case He.Space:k.preventDefault();break}}),b=me(k=>{if(c0(k.currentTarget))return k.preventDefault();r.listboxState===0?(o.closeListbox(),p.nextFrame(()=>{var N;return(N=r.buttonRef.current)==null?void 0:N.focus({preventScroll:!0})})):(k.preventDefault(),o.openListbox())}),x=me(k=>k.preventDefault()),y=Hh([l]),w=XN(),{isFocusVisible:S,focusProps:C}=Vh({autoFocus:c}),{isHovered:E,hoverProps:D}=e0({isDisabled:u}),{pressed:$,pressProps:T}=Q2({disabled:u}),A=m.useMemo(()=>({open:r.listboxState===0,active:$||r.listboxState===0,disabled:u,invalid:r.invalid,value:r.value,hover:E,focus:S,autofocus:c}),[r.listboxState,r.value,u,E,S,$,r.invalid,c]),P=gs(h(),{ref:f,id:l,type:n$(e,r.buttonRef),"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.listboxState===0,"aria-labelledby":y,"aria-describedby":w,disabled:u||void 0,autoFocus:c,onKeyDown:g,onKeyUp:v,onKeyPress:x,onClick:b},C,D,T);return sn({ourProps:P,theirProps:d,slot:A,defaultTag:one,name:"Listbox.Button"})}let yF=m.createContext(!1),ane="div",sne=ea.RenderStrategy|ea.Static;function lne(e,t){var n;let r=m.useId(),{id:o=`headlessui-listbox-options-${r}`,anchor:i,portal:a=!1,modal:l=!0,...u}=e,c=i$(i);c&&(a=!0);let d=Gh("Listbox.Options"),f=v0("Listbox.Options"),h=ca(d.optionsRef),p=p0(),g=p!==null?(p&ar.Open)===ar.Open:d.listboxState===0;X2(d.buttonRef,f.closeListbox,g),r$(h,d.__demoMode?!1:l&&d.listboxState===0),rF({allowed:me(()=>[d.buttonRef.current,d.optionsRef.current])},d.__demoMode?!1:l&&d.listboxState===0);let v=m.useRef(null);m.useEffect(()=>{var F;if(!((F=c==null?void 0:c.to)!=null&&F.includes("selection")))return;if(!g){v.current=null;return}let I=Array.from(d.listRef.current.values());v.current=I.findIndex(R=>(R==null?void 0:R.dataset.selected)===""),v.current===-1&&(v.current=I.findIndex(R=>(R==null?void 0:R.dataset.disabled)===void 0),f.goToOption(We.First))},[g,d.listRef]);let b=Gte(d.buttonRef,d.listboxState!==0)?!1:g,x=(()=>{if(c==null)return;if(d.listRef.current.size<=0)return{...c,inner:void 0};let F=Array.from(d.listRef.current.values());return{...c,inner:{listRef:{current:F},index:v.current}}})(),[y,w]=l$(x),S=s$(),C=pn(d.optionsRef,t,c?y:null),E=fi(),D=fi();m.useEffect(()=>{var F;let I=d.optionsRef.current;I&&d.listboxState===0&&I!==((F=Xl(I))==null?void 0:F.activeElement)&&(I==null||I.focus({preventScroll:!0}))},[d.listboxState,d.optionsRef,d.optionsRef.current]);let $=me(F=>{switch(D.dispose(),F.key){case He.Space:if(d.searchQuery!=="")return F.preventDefault(),F.stopPropagation(),f.search(F.key);case He.Enter:if(F.preventDefault(),F.stopPropagation(),d.activeOptionIndex!==null){let{dataRef:I}=d.options[d.activeOptionIndex];f.onChange(I.current.value)}d.mode===0&&(f.closeListbox(),zo().nextFrame(()=>{var I;return(I=d.buttonRef.current)==null?void 0:I.focus({preventScroll:!0})}));break;case Yt(d.orientation,{vertical:He.ArrowDown,horizontal:He.ArrowRight}):return F.preventDefault(),F.stopPropagation(),f.goToOption(We.Next);case Yt(d.orientation,{vertical:He.ArrowUp,horizontal:He.ArrowLeft}):return F.preventDefault(),F.stopPropagation(),f.goToOption(We.Previous);case He.Home:case He.PageUp:return F.preventDefault(),F.stopPropagation(),f.goToOption(We.First);case He.End:case He.PageDown:return F.preventDefault(),F.stopPropagation(),f.goToOption(We.Last);case He.Escape:return F.preventDefault(),F.stopPropagation(),f.closeListbox(),E.nextFrame(()=>{var I;return(I=d.buttonRef.current)==null?void 0:I.focus({preventScroll:!0})});case He.Tab:F.preventDefault(),F.stopPropagation();break;default:F.key.length===1&&(f.search(F.key),D.setTimeout(()=>f.clearSearch(),350));break}}),T=Wte(()=>{var F;return(F=d.buttonRef.current)==null?void 0:F.id},[d.buttonRef.current]),A=m.useMemo(()=>({open:d.listboxState===0}),[d]),P=gs(c?S():{},{id:o,ref:C,"aria-activedescendant":d.activeOptionIndex===null||(n=d.options[d.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":d.mode===1?!0:void 0,"aria-labelledby":T,"aria-orientation":d.orientation,onKeyDown:$,role:"listbox",tabIndex:0,style:{...w,"--button-width":Xg(d.buttonRef,!0).width}}),[k,N]=m.useState(d.value);d.value!==k&&d.listboxState===0&&d.mode!==1&&N(d.value);let j=me(F=>d.compare(k,F));return U.createElement(h$,{enabled:a?e.static||g:!1},U.createElement(y0.Provider,{value:d.mode===1?d:{...d,isSelected:j}},sn({ourProps:P,theirProps:u,slot:A,defaultTag:ane,features:sne,visible:b,name:"Listbox.Options"})))}let une="div";function cne(e,t){let n=m.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...a}=e,l=m.useContext(yF)===!0,u=Gh("Listbox.Option"),c=v0("Listbox.Option"),d=u.activeOptionIndex!==null?u.options[u.activeOptionIndex].id===r:!1,f=u.isSelected(i),h=m.useRef(null),p=Qte(h),g=hi({disabled:o,value:i,domRef:h,get textValue(){return p()}}),v=pn(t,h,$=>{$?u.listRef.current.set(r,$):u.listRef.current.delete(r)});dt(()=>{if(u.__demoMode||u.listboxState!==0||!d||u.activationTrigger===0)return;let $=zo();return $.requestAnimationFrame(()=>{var T,A;(A=(T=h.current)==null?void 0:T.scrollIntoView)==null||A.call(T,{block:"nearest"})}),$.dispose},[h,d,u.__demoMode,u.listboxState,u.activationTrigger,u.activeOptionIndex]),dt(()=>{if(!l)return c.registerOption(r,g)},[g,r,l]);let b=me($=>{if(o)return $.preventDefault();c.onChange(i),u.mode===0&&(c.closeListbox(),zo().nextFrame(()=>{var T;return(T=u.buttonRef.current)==null?void 0:T.focus({preventScroll:!0})}))}),x=me(()=>{if(o)return c.goToOption(We.Nothing);c.goToOption(We.Specific,r)}),y=uF(),w=me($=>{y.update($),!o&&(d||c.goToOption(We.Specific,r,0))}),S=me($=>{y.wasMoved($)&&(o||d||c.goToOption(We.Specific,r,0))}),C=me($=>{y.wasMoved($)&&(o||d&&c.goToOption(We.Nothing))}),E=m.useMemo(()=>({active:d,focus:d,selected:f,disabled:o,selectedOption:f&&l}),[d,f,o,l]);return!f&&l?null:sn({ourProps:l?{}:{id:r,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:b,onFocus:x,onPointerEnter:w,onMouseEnter:w,onPointerMove:S,onMouseMove:S,onPointerLeave:C,onMouseLeave:C},theirProps:a,slot:E,defaultTag:une,name:"Listbox.Option"})}let dne=m.Fragment;function fne(e,t){let{options:n,placeholder:r,...o}=e,i={ref:pn(t)},a=Gh("ListboxSelectedOption"),l=m.useMemo(()=>({}),[]),u=a.value===void 0||a.value===null||a.mode===1&&Array.isArray(a.value)&&a.value.length===0;return U.createElement(yF.Provider,{value:!0},sn({ourProps:i,theirProps:{...o,children:U.createElement(U.Fragment,null,r&&u?r:n)},slot:l,defaultTag:dne,name:"ListboxSelectedOption"}))}let hne=ln(rne),xF=ln(ine),mne=f0,bF=ln(lne),wF=ln(cne),pne=ln(fne),gne=Object.assign(hne,{Button:xF,Label:mne,Options:bF,Option:wF,SelectedOption:pne});var vne=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(vne||{}),yne=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(yne||{});let xne={0:e=>({...e,popoverState:Yt(e.popoverState,{0:1,1:0}),__demoMode:!1}),1(e){return e.popoverState===1?e:{...e,popoverState:1,__demoMode:!1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},g$=m.createContext(null);g$.displayName="PopoverContext";function x0(e){let t=m.useContext(g$);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,x0),n}return t}let b0=m.createContext(null);b0.displayName="PopoverAPIContext";function v$(e){let t=m.useContext(b0);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,v$),n}return t}let y$=m.createContext(null);y$.displayName="PopoverGroupContext";function $F(){return m.useContext(y$)}let w0=m.createContext(null);w0.displayName="PopoverPanelContext";function bne(){return m.useContext(w0)}function wne(e,t){return Yt(t.type,xne,e,t)}let $ne="div";function Sne(e,t){var n;let{__demoMode:r=!1,...o}=e,i=m.useRef(null),a=pn(t,ZN(I=>{i.current=I})),l=m.useRef([]),u=m.useReducer(wne,{__demoMode:r,popoverState:r?0:1,buttons:l,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:m.createRef(),afterPanelSentinel:m.createRef()}),[{popoverState:c,button:d,buttonId:f,panel:h,panelId:p,beforePanelSentinel:g,afterPanelSentinel:v},b]=u,x=ca((n=i.current)!=null?n:d),y=m.useMemo(()=>{if(!d||!h)return!1;for(let G of document.querySelectorAll("body > *"))if(Number(G==null?void 0:G.contains(d))^Number(G==null?void 0:G.contains(h)))return!0;let I=h0(),R=I.indexOf(d),M=(R+I.length-1)%I.length,O=(R+1)%I.length,q=I[M],H=I[O];return!h.contains(q)&&!h.contains(H)},[d,h]),w=hi(f),S=hi(p),C=m.useMemo(()=>({buttonId:w,panelId:S,close:()=>b({type:1})}),[w,S,b]),E=$F(),D=E==null?void 0:E.registerPopover,$=me(()=>{var I;return(I=E==null?void 0:E.isFocusWithinPopoverGroup())!=null?I:(x==null?void 0:x.activeElement)&&((d==null?void 0:d.contains(x.activeElement))||(h==null?void 0:h.contains(x.activeElement)))});m.useEffect(()=>D==null?void 0:D(C),[D,C]);let[T,A]=xte(),P=qte({mainTreeNodeRef:E==null?void 0:E.mainTreeNodeRef,portals:T,defaultContainers:[d,h]});sF(x==null?void 0:x.defaultView,"focus",I=>{var R,M,O,q;I.target!==window&&I.target instanceof HTMLElement&&c===0&&($()||d&&h&&(P.contains(I.target)||(M=(R=g.current)==null?void 0:R.contains)!=null&&M.call(R,I.target)||(q=(O=v.current)==null?void 0:O.contains)!=null&&q.call(O,I.target)||b({type:1})))},!0),t$(P.resolveContainers,(I,R)=>{b({type:1}),J2(R,m0.Loose)||(I.preventDefault(),d==null||d.focus())},c===0);let k=me(I=>{b({type:1});let R=I?I instanceof HTMLElement?I:"current"in I&&I.current instanceof HTMLElement?I.current:d:d;R==null||R.focus()}),N=m.useMemo(()=>({close:k,isPortalled:y}),[k,y]),j=m.useMemo(()=>({open:c===0,close:k}),[c,k]),F={ref:a};return U.createElement(u$,null,U.createElement(w0.Provider,{value:null},U.createElement(g$.Provider,{value:u},U.createElement(b0.Provider,{value:N},U.createElement(Cee,{value:k},U.createElement(d$,{value:Yt(c,{0:ar.Open,1:ar.Closed})},U.createElement(A,null,sn({ourProps:F,theirProps:o,slot:j,defaultTag:$ne,name:"Popover"}),U.createElement(P.MainTreeNode,null))))))))}let Ene="button";function Cne(e,t){let n=m.useId(),{id:r=`headlessui-popover-button-${n}`,disabled:o=!1,autoFocus:i=!1,...a}=e,[l,u]=x0("Popover.Button"),{isPortalled:c}=v$("Popover.Button"),d=m.useRef(null),f=`headlessui-focus-sentinel-${m.useId()}`,h=$F(),p=h==null?void 0:h.closeOthers,g=bne()!==null;m.useEffect(()=>{if(!g)return u({type:3,buttonId:r}),()=>{u({type:3,buttonId:null})}},[g,r,u]);let[v]=m.useState(()=>Symbol()),b=pn(d,t,a$(),g?null:O=>{if(O)l.buttons.current.push(v);else{let q=l.buttons.current.indexOf(v);q!==-1&&l.buttons.current.splice(q,1)}l.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),O&&u({type:2,button:O})}),x=pn(d,t),y=ca(d),w=me(O=>{var q,H,G;if(g){if(l.popoverState===1)return;switch(O.key){case He.Space:case He.Enter:O.preventDefault(),(H=(q=O.target).click)==null||H.call(q),u({type:1}),(G=l.button)==null||G.focus();break}}else switch(O.key){case He.Space:case He.Enter:O.preventDefault(),O.stopPropagation(),l.popoverState===1&&(p==null||p(l.buttonId)),u({type:0});break;case He.Escape:if(l.popoverState!==0)return p==null?void 0:p(l.buttonId);if(!d.current||y!=null&&y.activeElement&&!d.current.contains(y.activeElement))return;O.preventDefault(),O.stopPropagation(),u({type:1});break}}),S=me(O=>{g||O.key===He.Space&&O.preventDefault()}),C=me(O=>{var q,H;c0(O.currentTarget)||o||(g?(u({type:1}),(q=l.button)==null||q.focus()):(O.preventDefault(),O.stopPropagation(),l.popoverState===1&&(p==null||p(l.buttonId)),u({type:0}),(H=l.button)==null||H.focus()))}),E=me(O=>{O.preventDefault(),O.stopPropagation()}),{isFocusVisible:D,focusProps:$}=Vh({autoFocus:i}),{isHovered:T,hoverProps:A}=e0({isDisabled:o}),{pressed:P,pressProps:k}=Q2({disabled:o}),N=l.popoverState===0,j=m.useMemo(()=>({open:N,active:P||N,disabled:o,hover:T,focus:D,autofocus:i}),[N,T,D,P,o,i]),F=n$(e,d),I=gs(g?{ref:x,type:F,onKeyDown:w,onClick:C,disabled:o||void 0,autoFocus:i}:{ref:b,id:l.buttonId,type:F,"aria-expanded":l.popoverState===0,"aria-controls":l.panel?l.panelId:void 0,disabled:o||void 0,autoFocus:i,onKeyDown:w,onKeyUp:S,onClick:C,onMouseDown:E},$,A,k),R=vF(),M=me(()=>{let O=l.panel;if(!O)return;function q(){Yt(R.current,{[_i.Forwards]:()=>Zs(O,Oi.First),[_i.Backwards]:()=>Zs(O,Oi.Last)})===Jg.Error&&Zs(h0().filter(H=>H.dataset.headlessuiFocusGuard!=="true"),Yt(R.current,{[_i.Forwards]:Oi.Next,[_i.Backwards]:Oi.Previous}),{relativeTo:l.button})}q()});return U.createElement(U.Fragment,null,sn({ourProps:I,theirProps:a,slot:j,defaultTag:Ene,name:"Popover.Button"}),N&&!g&&c&&U.createElement(Nl,{id:f,features:vs.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:M}))}let Dne="div",jne=ea.RenderStrategy|ea.Static;function Pne(e,t){let n=m.useId(),{id:r=`headlessui-popover-overlay-${n}`,...o}=e,[{popoverState:i},a]=x0("Popover.Overlay"),l=pn(t),u=p0(),c=u!==null?(u&ar.Open)===ar.Open:i===0,d=me(h=>{if(c0(h.currentTarget))return h.preventDefault();a({type:1})}),f=m.useMemo(()=>({open:i===0}),[i]);return sn({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:d},theirProps:o,slot:f,defaultTag:Dne,features:jne,visible:c,name:"Popover.Overlay"})}let Rne="div",kne=ea.RenderStrategy|ea.Static;function Tne(e,t){let n=m.useId(),{id:r=`headlessui-popover-panel-${n}`,focus:o=!1,anchor:i,portal:a=!1,modal:l=!1,...u}=e,[c,d]=x0("Popover.Panel"),{close:f,isPortalled:h}=v$("Popover.Panel"),p=`headlessui-focus-sentinel-before-${n}`,g=`headlessui-focus-sentinel-after-${n}`,v=m.useRef(null),b=i$(i),[x,y]=l$(b),w=s$();b&&(a=!0);let S=pn(v,t,b?x:null,F=>{d({type:4,panel:F})}),C=ca(v),E=lee();dt(()=>(d({type:5,panelId:r}),()=>{d({type:5,panelId:null})}),[r,d]);let D=p0(),$=D!==null?(D&ar.Open)===ar.Open:c.popoverState===0;X2(c.button,()=>d({type:1}),$),r$(C,c.__demoMode?!1:l&&$);let T=me(F=>{var I;switch(F.key){case He.Escape:if(c.popoverState!==0||!v.current||C!=null&&C.activeElement&&!v.current.contains(C.activeElement))return;F.preventDefault(),F.stopPropagation(),d({type:1}),(I=c.button)==null||I.focus();break}});m.useEffect(()=>{var F;e.static||c.popoverState===1&&((F=e.unmount)==null||F)&&d({type:4,panel:null})},[c.popoverState,e.unmount,e.static,d]),m.useEffect(()=>{if(c.__demoMode||!o||c.popoverState!==0||!v.current)return;let F=C==null?void 0:C.activeElement;v.current.contains(F)||Zs(v.current,Oi.First)},[c.__demoMode,o,v,c.popoverState]);let A=m.useMemo(()=>({open:c.popoverState===0,close:f}),[c,f]),P=gs(b?w():{},{ref:S,id:r,onKeyDown:T,onBlur:o&&c.popoverState===0?F=>{var I,R,M,O,q;let H=F.relatedTarget;H&&v.current&&((I=v.current)!=null&&I.contains(H)||(d({type:1}),((M=(R=c.beforePanelSentinel.current)==null?void 0:R.contains)!=null&&M.call(R,H)||(q=(O=c.afterPanelSentinel.current)==null?void 0:O.contains)!=null&&q.call(O,H))&&H.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...y,"--button-width":Xg(c.button,!0).width}}),k=vF(),N=me(()=>{let F=v.current;if(!F)return;function I(){Yt(k.current,{[_i.Forwards]:()=>{var R;Zs(F,Oi.First)===Jg.Error&&((R=c.afterPanelSentinel.current)==null||R.focus())},[_i.Backwards]:()=>{var R;(R=c.button)==null||R.focus({preventScroll:!0})}})}I()}),j=me(()=>{let F=v.current;if(!F)return;function I(){Yt(k.current,{[_i.Forwards]:()=>{var R;if(!c.button)return;let M=h0(),O=M.indexOf(c.button),q=M.slice(0,O+1),H=[...M.slice(O+1),...q];for(let G of H.slice())if(G.dataset.headlessuiFocusGuard==="true"||(R=c.panel)!=null&&R.contains(G)){let ce=H.indexOf(G);ce!==-1&&H.splice(ce,1)}Zs(H,Oi.First,{sorted:!1})},[_i.Backwards]:()=>{var R;Zs(F,Oi.Previous)===Jg.Error&&((R=c.button)==null||R.focus())}})}I()});return U.createElement(w0.Provider,{value:r},U.createElement(b0.Provider,{value:{close:f,isPortalled:h}},U.createElement(h$,{enabled:a?e.static||$:!1},$&&h&&U.createElement(Nl,{id:p,ref:c.beforePanelSentinel,features:vs.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:N}),sn({mergeRefs:E,ourProps:P,theirProps:u,slot:A,defaultTag:Rne,features:kne,visible:$,name:"Popover.Panel"}),$&&h&&U.createElement(Nl,{id:g,ref:c.afterPanelSentinel,features:vs.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:j}))))}let Ine="div";function Ane(e,t){let n=m.useRef(null),r=pn(n,t),[o,i]=m.useState([]),a=Hte(),l=me(v=>{i(b=>{let x=b.indexOf(v);if(x!==-1){let y=b.slice();return y.splice(x,1),y}return b})}),u=me(v=>(i(b=>[...b,v]),()=>l(v))),c=me(()=>{var v;let b=Xl(n);if(!b)return!1;let x=b.activeElement;return(v=n.current)!=null&&v.contains(x)?!0:o.some(y=>{var w,S;return((w=b.getElementById(y.buttonId.current))==null?void 0:w.contains(x))||((S=b.getElementById(y.panelId.current))==null?void 0:S.contains(x))})}),d=me(v=>{for(let b of o)b.buttonId.current!==v&&b.close()}),f=m.useMemo(()=>({registerPopover:u,unregisterPopover:l,isFocusWithinPopoverGroup:c,closeOthers:d,mainTreeNodeRef:a.mainTreeNodeRef}),[u,l,c,d,a.mainTreeNodeRef]),h=m.useMemo(()=>({}),[]),p=e,g={ref:r};return U.createElement(y$.Provider,{value:f},sn({ourProps:g,theirProps:p,slot:h,defaultTag:Ine,name:"Popover.Group"}),U.createElement(a.MainTreeNode,null))}let Nne=ln(Sne),SF=ln(Cne),Fne=ln(Pne),EF=ln(Tne),Mne=ln(Ane),One=Object.assign(Nne,{Button:SF,Overlay:Fne,Panel:EF,Group:Mne});const ta=({name:e,selected:t,items:n,placeholder:r="Select an option",noItemsPlaceholder:o="No items",className:i,onChange:a,hasError:l=!1,label:u,tooltipText:c,description:d,required:f,disabled:h,isLoading:p=!1,...g})=>{const v=t&&n.find(w=>w.value===t),b=!p&&n.length===0,x=h||b,y=$2();return s.jsx("div",{className:ne("relative",i),children:s.jsx(gne,{value:t,onChange:w=>w!==null&&a(w),disabled:x||p,children:({open:w})=>s.jsxs(s.Fragment,{children:[u&&s.jsxs("div",{className:"mb-2",children:[s.jsx(bo,{id:"",as:"div",tip:c,optional:!f,children:s.jsx(f0,{children:u})}),d&&s.jsx(yi,{id:"",children:d})]}),s.jsxs(xF,{name:e,className:ne("flex h-10 w-full items-center justify-between rounded border text-sans-md",l?"focus-error border-error-secondary hover:border-error":"border-default hover:border-hover",w&&"ring-2 ring-accent-secondary",w&&l&&"ring-error-secondary",x?"cursor-not-allowed text-disabled bg-disabled !border-default":"bg-default",x&&l&&"!border-error-secondary"),...g,children:[s.jsx("div",{className:"w-full overflow-hidden overflow-ellipsis whitespace-pre px-3 text-left",children:v?v.selectedLabel||v.label:s.jsx("span",{className:"text-quaternary",children:b?o:r})}),!x&&s.jsx(Yw,{isLoading:p}),s.jsx("div",{className:"flex h-[calc(100%-12px)] items-center border-l px-3 border-secondary","aria-hidden":!0,children:s.jsx(Zw,{title:"Select",className:"w-2 text-tertiary"})})]}),s.jsx(bF,{anchor:{gap:12},className:`ox-menu pointer-events-auto ${y} w-[var(--button-width)] overflow-y-auto !outline-none`,modal:!1,children:n.map(S=>s.jsx(wF,{value:S.value,className:"relative border-b border-secondary last:border-0",children:({focus:C,selected:E})=>s.jsx("div",{className:ne("ox-menu-item",{"is-selected":E,"is-highlighted":C}),children:S.label})},S.value))})]})})})};function Pn({items:e,name:t,placeholder:n,label:r=rr(t),disabled:o,required:i,tooltipText:a,description:l,className:u,control:c,onChange:d,isLoading:f,noItemsPlaceholder:h}){const{field:p,fieldState:g}=on({name:t,control:c,rules:{required:i}});return s.jsxs("div",{className:ne("max-w-lg",u),children:[s.jsx(ta,{description:l,label:r,tooltipText:a,required:i,placeholder:n,noItemsPlaceholder:h,selected:p.value||null,items:e,onChange:v=>{p.onChange(v),d==null||d(v)},disabled:o,name:t,hasError:g.error!==void 0,isLoading:f}),s.jsx(Kc,{error:g.error,label:r})]})}function F6({images:e,control:t,disabled:n,name:r}){const o=on({control:t,name:"bootDiskSize"}).field;return s.jsx(Pn,{disabled:n,control:t,name:r,label:"Image",placeholder:"Select an image",items:e.map(i=>x$(i)),required:!0,onChange:i=>{const l=e.find(u=>u.id===i).size/jr;o.value<l&&o.onChange(gb(l))}})}function x$(e,t=!1){const{name:n,os:r,projectId:o,size:i,version:a}=e,l=`${Sr(i,1)} GiB`,u=[r,a,l].filter(h=>!!h).join(", "),c=u.length?` (${u})`:"",f=[r,a,l,t?`${o?"Project":"Silo"} image`:null].filter(h=>!!h).map((h,p)=>s.jsxs("span",{children:[p>0?s.jsx(l0,{}):"",h]},`${h}`));return{value:e.id,selectedLabel:`${n}${c}`,label:s.jsxs(s.Fragment,{children:[s.jsx("div",{children:n}),s.jsx("div",{className:"text-tertiary selected:text-accent-secondary",children:f})]})}}function Et({required:e=!0,name:t,label:n=rr(t),...r}){return s.jsx(ot,{validate:o=>CF(o,n,e),required:e,label:n,name:t,...r})}const CF=(e,t,n)=>{if(!(!n&&!e)){if(e.length>63)return"Must be 63 characters or fewer";if(e.length===0)return`${t} is required`;if(/^[a-z0-9-]+$/.test(e))if(/^[a-z]/.test(e)){if(!/[a-z0-9]$/.test(e))return"Must end with a letter or number"}else return"Must start with a lower-case letter";else return"Can only contain lower-case letters, numbers, and dashes"}},_ne=`
  peer appearance-none absolute outline-none
  border border-default h-4 w-4 rounded-full bg-default hover:border-hover checked:hover:border-accent
  checked:bg-accent-secondary checked:border-accent-secondary disabled:bg-disabled hover:disabled:bg-disabled
  disabled:hover:bg-transparent
`,Wi=({children:e,className:t,...n})=>s.jsxs("label",{className:"inline-flex items-center",children:[s.jsxs("span",{className:"relative h-4 w-4",children:[s.jsx("input",{className:ne(_ne,t),type:"radio",...n}),s.jsx("div",{className:"pointer-events-none absolute left-1 top-1 hidden h-2 w-2 rounded-full bg-accent peer-checked:block"})]}),e&&s.jsx("span",{className:"ml-2.5 text-sans-md text-secondary",children:e})]}),Lne=`
  py-2 px-4 text-sans-md border rounded border-default bg-default hover:border-hover
  peer-focus:ring-2 peer-focus:ring-accent-secondary  w-44

  children:py-3 children:px-3 children:-mx-4 children:border-secondary
  first:children:-mt-2 last:children:-mb-2 cursor-pointer

  peer-checked:bg-accent-secondary
  peer-checked:border-accent-secondary peer-checked:hover:border-accent peer-checked:children:border-accent peer-checked:children:border-accent-secondary
  peer-checked:text-accent peer-checked:[&>*_.text-secondary]:text-accent-secondary

  peer-disabled:cursor-not-allowed
  peer-disabled:bg-disabled peer-disabled:peer-checked:bg-accent-secondary
  peer-checked:peer-disabled:hover:border-accent-secondary peer-disabled:hover:border-default
  peer-disabled:[&>*_.text-secondary]:text-disabled peer-disabled:text-disabled peer-disabled:peer-checked:text-accent-disabled peer-disabled:peer-checked:[&>*_.text-secondary]:text-accent-disabled
`;function Ap({children:e,className:t,...n}){const r=t!=null&&t.includes(":focus")?":focus":"";return s.jsxs("label",{className:"inline-flex items-center",children:[s.jsx("input",{className:ne(r,"peer sr-only"),type:"radio",...n}),s.jsx("span",{className:ne("ox-radio-card divide-y",Lne,t),children:e})]})}Ap.Unit=({children:e,className:t,...n})=>s.jsx("span",{className:ne("!m-0 !p-0 text-secondary",t),...n,children:e});St.p`text-base text-secondary text-sans-sm max-w-3xl`;const Kh=({name:e,defaultChecked:t,children:n,required:r,disabled:o,column:i,className:a,onChange:l,...u})=>s.jsx("div",{className:ne("flex",i?"flex-col space-y-2":"flex-wrap gap-5",a),role:"radiogroup",onChange:l,...u,children:U.Children.map(n,c=>U.cloneElement(c,{name:e,required:r,disabled:o,defaultChecked:c.props.value===t?"true":void 0}))});function sh({name:e,label:t=rr(e),description:n,tooltipText:r,units:o,control:i,items:a,parseValue:l,...u}){const c=m.useId(),{field:d}=on({name:e,control:i});return s.jsxs("div",{children:[s.jsxs("div",{className:"mb-2",children:[t&&s.jsxs(bo,{id:`${c}-label`,tip:r,children:[t," ",o&&s.jsxs("span",{className:"ml-1 text-secondary",children:["(",o,")"]})]}),n&&s.jsx(yi,{id:`${c}-help-text`,children:n})]}),s.jsx(Kh,{defaultChecked:d.value,"aria-labelledby":ne(`${c}-label`,{[`${c}-help-text`]:!!r}),"aria-describedby":r?`${c}-label-tip`:void 0,onChange:f=>l?d.onChange(l(f.target.value)):d.onChange(f),name:d.name,...u,children:a.map(({value:f,label:h})=>s.jsx(Wi,{value:f,children:h},f))})]})}function w1({name:e,label:t=rr(e),description:n,tooltipText:r,units:o,control:i,children:a,...l}){const u=m.useId(),{field:c}=on({name:e,control:i});return s.jsxs("div",{children:[s.jsxs("div",{className:"mb-2",children:[t&&s.jsxs(bo,{id:`${u}-label`,tip:r,children:[t," ",o&&s.jsxs("span",{className:"ml-1 text-secondary",children:["(",o,")"]})]}),n&&s.jsx(yi,{id:`${u}-help-text`,children:n})]}),s.jsx(Kh,{defaultChecked:c.value,"aria-labelledby":ne(`${u}-label`,!!r&&`${u}-help-text`),"aria-describedby":r?`${u}-label-tip`:void 0,onChange:c.onChange,name:c.name,...l,children:a})]})}const Vne=({onAction:e,onDismiss:t})=>s.jsxs($e,{isOpen:!0,onDismiss:t,title:"Confirm navigation",children:[s.jsx($e.Section,{children:"Are you sure you want to leave this form? Your progress will be lost."}),s.jsx($e.Footer,{onAction:e,onDismiss:t,cancelText:"Keep editing",actionText:"Leave form",actionType:"danger"})]});function Bne(){return yB()===Kt.Push}function ht({form:e,formType:t,children:n,onDismiss:r,resourceName:o,submitDisabled:i,submitError:a,title:l,onSubmit:u,submitLabel:c,loading:d,subtitle:f}){const h=m.useId(),{isSubmitting:p}=e.formState;m.useEffect(()=>{(a==null?void 0:a.errorCode)==="ObjectAlreadyExists"&&"name"in e.getValues()&&e.setError("name",{message:"Name already exists"})},[a,e]);const g=t==="edit"?`Update ${o}`:c||l||`Create ${o}`,{isDirty:v}=e.formState,[b,x]=m.useState(!1),y=()=>v?x(!0):r();return s.jsxs(ss,{onDismiss:y,isOpen:!0,title:l||`${t==="edit"?"Edit":"Create"} ${o}`,animate:Bne(),subtitle:f,errors:a?[a.message]:[],children:[s.jsx(ss.Body,{children:s.jsx("form",{id:h,className:"ox-form is-side-modal",autoComplete:"off",onSubmit:w=>{u&&(w.stopPropagation(),e.handleSubmit(u)(w))},children:n})}),s.jsxs(ss.Footer,{error:!!a,children:[s.jsx(Je,{variant:"ghost",size:"sm",onClick:y,children:"Cancel"}),u&&s.jsx(Je,{type:"submit",size:"sm",disabled:!!i,disabledReason:i,loading:d||p,form:h,children:g})]}),b&&s.jsx(Vne,{onDismiss:()=>x(!1),onAction:r})]})}const wr=St.hr`ox-divider w-full border-t border-secondary`,Xc=St.hr`!mx-0 !w-full border-t border-secondary`;function Xs(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function zne(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const sfe=6048e5,lfe=864e5,M6=6e4,ufe=36e5,O6=525600,_6=43200,L6=1440;let Une={};function qne(){return Une}function V6(e){const t=Xs(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Hne(e,t){const n=Xs(e),r=Xs(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function Wne(e){return zne(e,Date.now())}function Gne(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}const Kne={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Qne=(e,t,n)=>{let r;const o=Kne[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Zne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yne={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xne={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jne={date:$1({formats:Zne,defaultWidth:"full"}),time:$1({formats:Yne,defaultWidth:"full"}),dateTime:$1({formats:Xne,defaultWidth:"full"})},ere={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tre=(e,t,n,r)=>ere[e];function Ed(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;o=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const nre={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rre={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ore={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ire={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},are={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sre={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},lre=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ure={ordinalNumber:lre,era:Ed({values:nre,defaultWidth:"wide"}),quarter:Ed({values:rre,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ed({values:ore,defaultWidth:"wide"}),day:Ed({values:ire,defaultWidth:"wide"}),dayPeriod:Ed({values:are,defaultWidth:"wide",formattingValues:sre,defaultFormattingWidth:"wide"})};function Cd(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?dre(l,f=>f.test(a)):cre(l,f=>f.test(a));let c;c=e.valueCallback?e.valueCallback(u):u,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(a.length);return{value:c,rest:d}}}function cre(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dre(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fre(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(o.length);return{value:a,rest:l}}}const hre=/^(\d+)(th|st|nd|rd)?/i,mre=/\d+/i,pre={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},gre={any:[/^b/i,/^(a|c)/i]},vre={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yre={any:[/1/i,/2/i,/3/i,/4/i]},xre={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},bre={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},wre={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$re={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Sre={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ere={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Cre={ordinalNumber:fre({matchPattern:hre,parsePattern:mre,valueCallback:e=>parseInt(e,10)}),era:Cd({matchPatterns:pre,defaultMatchWidth:"wide",parsePatterns:gre,defaultParseWidth:"any"}),quarter:Cd({matchPatterns:vre,defaultMatchWidth:"wide",parsePatterns:yre,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cd({matchPatterns:xre,defaultMatchWidth:"wide",parsePatterns:bre,defaultParseWidth:"any"}),day:Cd({matchPatterns:wre,defaultMatchWidth:"wide",parsePatterns:$re,defaultParseWidth:"any"}),dayPeriod:Cd({matchPatterns:Sre,defaultMatchWidth:"any",parsePatterns:Ere,defaultParseWidth:"any"})},Dre={code:"en-US",formatDistance:Qne,formatLong:Jne,formatRelative:tre,localize:ure,match:Cre,options:{weekStartsOn:0,firstWeekContainsDate:1}};function jre(e,t,n){const r=qne(),o=(n==null?void 0:n.locale)??r.locale??Dre,i=Hne(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:i});let l,u;i>0?(l=Xs(t),u=Xs(e)):(l=Xs(e),u=Xs(t));const c=Gne((n==null?void 0:n.roundingMethod)??"round"),d=u.getTime()-l.getTime(),f=d/M6,h=V6(u)-V6(l),p=(d-h)/M6,g=n==null?void 0:n.unit;let v;if(g?v=g:f<1?v="second":f<60?v="minute":f<L6?v="hour":p<_6?v="day":p<O6?v="month":v="year",v==="second"){const b=c(d/1e3);return o.formatDistance("xSeconds",b,a)}else if(v==="minute"){const b=c(f);return o.formatDistance("xMinutes",b,a)}else if(v==="hour"){const b=c(f/60);return o.formatDistance("xHours",b,a)}else if(v==="day"){const b=c(p/L6);return o.formatDistance("xDays",b,a)}else if(v==="month"){const b=c(p/_6);return b===12&&g!=="month"?o.formatDistance("xYears",1,a):o.formatDistance("xMonths",b,a)}else{const b=c(p/O6);return o.formatDistance("xYears",b,a)}}function Pre(e,t){return jre(e,Wne(e),t)}const Rre={lessThanXSeconds:"< {{count}}s",xSeconds:"{{count}}s",halfAMinute:"30s",lessThanXMinutes:"< {{count}}m",xMinutes:"{{count}}m",aboutXHours:"~ {{count}}h",xHours:"{{count}}h",xDays:"{{count}}d",aboutXWeeks:"~ {{count}}w",xWeeks:"{{count}}w",aboutXMonths:"~ {{count}}mo",xMonths:"{{count}}mo",aboutXYears:"~ {{count}}y",xYears:"{{count}}y",overXYears:"> {{count}}y",almostXYears:"~ {{count}}y"},kre=(e,t)=>Pre(e,{...t,locale:{formatDistance:(n,r,o)=>{var a;const i=(a=Rre[n])==null?void 0:a.replace("{{count}}",r.toString());return i&&(o!=null&&o.addSuffix)?i+" ago":i}}}),DF=(e,t)=>new Intl.DateTimeFormat(t,{dateStyle:"medium"}).format(e),jF=(e,t)=>new Intl.DateTimeFormat(t,{timeStyle:"short"}).format(e),Tre=(e,t)=>new Intl.DateTimeFormat(t,{dateStyle:"medium",timeStyle:"short"}).format(e),PF={type:"blank",blockSize:512},Ire={name:"",description:"",size:10,diskSource:PF};function b$({onSubmit:e,onSuccess:t,onDismiss:n}){var b,x,y;const r=ke(),o=Fe(),i=fe("diskCreate",{onSuccess(w){r.invalidateQueries("diskList"),De({content:"Your disk has been created"}),t==null||t(w),n(o)}}),a=Ge({defaultValues:Ire}),{project:l}=ut(),u=Ze("imageList",{query:{project:l}}),c=Ze("imageList",{}),d=m.useMemo(()=>{var w,S;return[...((w=u.data)==null?void 0:w.items)||[],...((S=c.data)==null?void 0:S.items)||[]]},[u.data,c.data]),f=u.isPending||c.isPending,p=((b=Ze("snapshotList",{query:{project:l}}).data)==null?void 0:b.items)||[],g=a.watch("diskSource").type;let v;if(g==="snapshot"){const w=a.watch("diskSource.snapshotId"),S=(x=p.find(C=>C.id===w))==null?void 0:x.size;v=S?Sr(S):void 0}else if(g==="image"){const w=a.watch("diskSource.imageId"),S=(y=d.find(C=>C.id===w))==null?void 0:y.size;v=S?Sr(S):void 0}return s.jsxs(ht,{form:a,formType:"create",resourceName:"disk",onDismiss:()=>n(o),onSubmit:({size:w,...S})=>{const C={size:w*jr,...S};e?e(C):i.mutate({query:{project:l},body:C})},loading:i.isPending,submitError:i.error,children:[s.jsx(Et,{name:"name",control:a.control}),s.jsx(At,{name:"description",control:a.control}),s.jsx(wr,{}),s.jsx(Are,{control:a.control,images:d,areImagesLoading:f}),s.jsx(BN,{name:"size",control:a.control,validate:w=>{if(v&&w<v)return`Must be as large as selected ${g} (min. ${v} GiB)`}})]})}const Are=({control:e,images:t,areImagesLoading:n})=>{const{field:{value:r,onChange:o}}=on({control:e,name:"diskSource"}),i=on({control:e,name:"size"}).field;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"max-w-lg space-y-2",children:[s.jsx(bo,{id:"disk-source-label",children:"Source"}),s.jsxs(Kh,{"aria-labelledby":"disk-source-label",name:"diskSource",column:!0,defaultChecked:r.type,onChange:a=>{const l=a.target.value;o(l==="blank"?PF:{type:l})},children:[s.jsx(Wi,{value:"blank",children:"Blank"}),s.jsx(Wi,{value:"snapshot",children:"Snapshot"}),s.jsx(Wi,{value:"image",children:"Image"})]})]}),s.jsxs("div",{className:"max-w-lg",children:[r.type==="blank"&&s.jsx(sh,{column:!0,name:"diskSource.blockSize",label:"Block size",units:"Bytes",control:e,parseValue:a=>parseInt(a,10),items:[{label:"512",value:512},{label:"2048",value:2048},{label:"4096",value:4096}]}),r.type==="image"&&s.jsx(Pn,{control:e,name:"diskSource.imageId",label:"Source image",placeholder:"Select an image",isLoading:n,items:t.map(a=>x$(a,!0)),required:!0,onChange:a=>{const u=t.find(c=>c.id===a).size/jr;if(i.value<u){const c=Math.ceil(u/10)*10;i.onChange(c)}}}),r.type==="snapshot"&&s.jsx(Fre,{control:e})]})]})},Nre=({disk:e})=>{const{data:t,isPending:n,isError:r}=Ze("diskView",{path:{disk:e}},{throwOnError:!1});return n||r?null:s.jsxs(s.Fragment,{children:[" from ",t.name]})},Fre=({control:e})=>{var i;const{project:t}=ut(),n=Ze("snapshotList",{query:{project:t}}),r=((i=n.data)==null?void 0:i.items)||[],o=on({control:e,name:"size"}).field;return s.jsx(Pn,{control:e,name:"diskSource.snapshotId",label:"Source snapshot",placeholder:"Select a snapshot",items:r.map(a=>{const l=Cs(a.size,{base:2,output:"object"});return{value:a.id,selectedLabel:`${a.name}`,label:s.jsxs(s.Fragment,{children:[s.jsx("div",{children:a.name}),s.jsxs("div",{className:"text-tertiary selected:text-accent-secondary",children:["Created on ",DF(a.timeCreated),s.jsx(Nre,{disk:a.diskId})," ",s.jsx(l0,{})," ",l.value," ",l.unit]})]})}}),isLoading:n.isPending,required:!0,onChange:a=>{const u=r.find(c=>c.id===a).size/jr;if(o.value<u){const c=Math.ceil(u/10)*10;o.onChange(c)}}})},Mre=()=>s.jsx(gW,{className:"pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent"}),Ore=St.div`absolute w-2 h-0.5 left-1 top-[7px] bg-accent pointer-events-none`,_re=`
  appearance-none border border-default bg-default h-4 w-4 rounded-sm absolute left-0 outline-none
  disabled:cursor-not-allowed
  hover:border-hover hover:cursor-pointer
  checked:bg-accent-secondary checked:border-accent-secondary checked:hover:border-accent
  indeterminate:bg-accent-secondary indeterminate:border-accent hover:indeterminate:bg-accent-secondary-hover
`,w$=({indeterminate:e,children:t,className:n,...r})=>s.jsxs("label",{className:"items-top inline-flex",children:[s.jsxs("span",{className:"relative h-4 w-4",children:[s.jsx("input",{className:ne(_re,n),type:"checkbox",ref:o=>o&&(o.indeterminate=!!e),...r}),r.checked&&!e&&s.jsx(Mre,{}),e&&s.jsx(Ore,{})]}),t&&s.jsx("span",{className:"ml-2.5 text-sans-md text-secondary",children:t})]}),Li=({control:e,name:t,...n})=>{const{field:{onChange:r,value:o}}=on({name:t,control:e});return s.jsx(w$,{...n,onChange:i=>{if(Array.isArray(o)&&n.value){const a=o,l=i.target.checked?[...a,n.value]:a.filter(u=>u!==n.value);r(l)}else r(i.target.checked)},checked:Array.isArray(o)?o.includes(n.value):o})},Lre={default:{default:"ring-1 ring-inset bg-accent-secondary text-accent ring-[rgba(var(--base-green-800-rgb),0.15)]",destructive:"ring-1 ring-inset bg-destructive-secondary text-destructive ring-[rgba(var(--base-red-800-rgb),0.15)]",notice:"ring-1 ring-inset bg-notice-secondary text-notice ring-[rgba(var(--base-yellow-800-rgb),0.15)]",neutral:"ring-1 ring-inset bg-secondary text-secondary ring-[rgba(var(--base-neutral-700-rgb),0.15)]",purple:"ring-1 ring-inset bg-[var(--base-purple-200)] text-[var(--base-purple-700)] ring-[rgba(var(--base-purple-800-rgb),0.15)]",blue:"ring-1 ring-inset bg-info-secondary text-info ring-[rgba(var(--base-blue-800-rgb),0.15)]"},solid:{default:"bg-accent text-inverse",destructive:"bg-destructive text-inverse",notice:"bg-notice text-inverse",neutral:"bg-inverse-tertiary text-inverse",purple:"bg-[var(--base-purple-700)] text-inverse",blue:"bg-info text-inverse"}},tt=({className:e,children:t,color:n="default",variant:r="default"})=>s.jsx("span",{className:ne("ox-badge",`variant-${r}`,"inline-flex h-4 items-center whitespace-nowrap rounded-sm px-[3px] py-[1px] uppercase text-mono-sm",Lre[r][n],e),children:s.jsx("span",{children:t})});var Vre=typeof global=="object"&&global&&global.Object===Object&&global,Bre=typeof self=="object"&&self&&self.Object===Object&&self,RF=Vre||Bre||Function("return this")(),ev=RF.Symbol,kF=Object.prototype,zre=kF.hasOwnProperty,Ure=kF.toString,Dd=ev?ev.toStringTag:void 0;function qre(e){var t=zre.call(e,Dd),n=e[Dd];try{e[Dd]=void 0;var r=!0}catch{}var o=Ure.call(e);return r&&(t?e[Dd]=n:delete e[Dd]),o}var Hre=Object.prototype,Wre=Hre.toString;function Gre(e){return Wre.call(e)}var Kre="[object Null]",Qre="[object Undefined]",B6=ev?ev.toStringTag:void 0;function Zre(e){return e==null?e===void 0?Qre:Kre:B6&&B6 in Object(e)?qre(e):Gre(e)}function Yre(e){return e!=null&&typeof e=="object"}var Xre="[object Symbol]";function Jre(e){return typeof e=="symbol"||Yre(e)&&Zre(e)==Xre}var eoe=/\s/;function toe(e){for(var t=e.length;t--&&eoe.test(e.charAt(t)););return t}var noe=/^\s+/;function roe(e){return e&&e.slice(0,toe(e)+1).replace(noe,"")}function tv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var z6=NaN,ooe=/^[-+]0x[0-9a-f]+$/i,ioe=/^0b[01]+$/i,aoe=/^0o[0-7]+$/i,soe=parseInt;function U6(e){if(typeof e=="number")return e;if(Jre(e))return z6;if(tv(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=tv(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=roe(e);var n=ioe.test(e);return n||aoe.test(e)?soe(e.slice(2),n?2:8):ooe.test(e)?z6:+e}var S1=function(){return RF.Date.now()},loe="Expected a function",uoe=Math.max,coe=Math.min;function Np(e,t,n){var r,o,i,a,l,u,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(loe);t=U6(t)||0,tv(n)&&(d=!!n.leading,f="maxWait"in n,i=f?uoe(U6(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(E){var D=r,$=o;return r=o=void 0,c=E,a=e.apply($,D),a}function g(E){return c=E,l=setTimeout(x,t),d?p(E):a}function v(E){var D=E-u,$=E-c,T=t-D;return f?coe(T,i-$):T}function b(E){var D=E-u,$=E-c;return u===void 0||D>=t||D<0||f&&$>=i}function x(){var E=S1();if(b(E))return y(E);l=setTimeout(x,v(E))}function y(E){return l=void 0,h&&r?p(E):(r=o=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,r=u=o=l=void 0}function S(){return l===void 0?a:y(S1())}function C(){var E=S1(),D=b(E);if(r=arguments,o=this,u=E,D){if(l===void 0)return g(u);if(f)return clearTimeout(l),l=setTimeout(x,t),p(u)}return l===void 0&&(l=setTimeout(x,t)),a}return C.cancel=w,C.flush=S,C}var doe="Expected a function";function foe(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(doe);return tv(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Np(e,t,{leading:r,maxWait:t,trailing:o})}var hoe=!!(typeof window<"u"&&window.document&&window.document.createElement),moe=hoe;const TF=pi(moe);var Vu=function(){return Vu=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Vu.apply(this,arguments)},$u=null,q6=null;TF&&window.addEventListener("resize",function(){q6!==window.devicePixelRatio&&(q6=window.devicePixelRatio,$u=null)});function H6(){if($u===null){if(typeof document>"u")return $u=0,$u;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),$u=n}return $u}function IF(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function AF(e){return!e||!e.ownerDocument?document:e.ownerDocument}var NF=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(l,u){return u.toUpperCase()});switch(o.value){case"true":r[a]=!0;break;case"false":r[a]=!1;break;case void 0:r[a]=!0;break;default:r[a]=o.value}}return r},t);return n};function FF(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function MF(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function OF(e){return".".concat(e.split(" ").join("."))}var poe=Object.freeze({__proto__:null,addClasses:FF,classNamesToQuery:OF,getElementDocument:AF,getElementWindow:IF,getOptions:NF,removeClasses:MF}),pa=IF,E1=AF,goe=NF,ga=FF,va=MF,hr=OF,Zm=function(){function e(t,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=pa(r.el);r.scrollXTicking||(o.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(o.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,ga(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){va(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(ga(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){va(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(o){r.mouseX=o.clientX,r.mouseY=o.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var i,a;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(i=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(i||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(i&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(o,"x"):r.onTrackClick(o,"x")),a&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(o,"y"):r.onTrackClick(o,"y"))))}},this.drag=function(o){var i,a,l,u,c,d,f,h,p,g,v;if(!(!r.draggedAxis||!r.contentWrapperEl)){var b,x=r.axis[r.draggedAxis].track,y=(a=(i=x.rect)===null||i===void 0?void 0:i[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,w=r.axis[r.draggedAxis].scrollbar,S=(u=(l=r.contentWrapperEl)===null||l===void 0?void 0:l[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,C=parseInt((d=(c=r.elStyles)===null||c===void 0?void 0:c[r.axis[r.draggedAxis].sizeAttr])!==null&&d!==void 0?d:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?b=o.pageY:b=o.pageX;var E=b-((h=(f=x.rect)===null||f===void 0?void 0:f[r.axis[r.draggedAxis].offsetAttr])!==null&&h!==void 0?h:0)-r.axis[r.draggedAxis].dragOffset;E=r.draggedAxis==="x"&&r.isRtl?((g=(p=x.rect)===null||p===void 0?void 0:p[r.axis[r.draggedAxis].sizeAttr])!==null&&g!==void 0?g:0)-w.size-E:E;var D=E/(y-w.size),$=D*(S-C);r.draggedAxis==="x"&&r.isRtl&&($=!((v=e.getRtlHelpers())===null||v===void 0)&&v.isScrollingToNegative?-$:$),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=$}},this.onEndDrag=function(o){r.isDragging=!1;var i=E1(r.el),a=pa(r.el);o.preventDefault(),o.stopPropagation(),va(r.el,r.classNames.dragging),r.onStopScrolling(),i.removeEventListener("mousemove",r.drag,!0),i.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){i.removeEventListener("click",r.preventClick,!0),i.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=Vu(Vu({},e.defaultOptions),n),this.classNames=Vu(Vu({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=foe(this._onMouseMove,64),this.onWindowResize=Np(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Np(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Np(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var o=e.getOffset(n),i=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==i.left,isScrollingToNegative:i.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:H6()}catch{return H6()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=E1(t),o=pa(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){TF&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(hr(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(hr(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(hr(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(hr(this.classNames.offset)),this.maskEl=this.el.querySelector(hr(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,hr(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(hr(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(hr(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(hr(this.classNames.track)).concat(hr(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(hr(this.classNames.track)).concat(hr(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(hr(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(hr(this.classNames.scrollbar)))||null,this.options.autoHide||(ga(this.axis.x.scrollbar.el,this.classNames.visible),ga(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=pa(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,i=r.ResizeObserver||ResizeObserver;this.resizeObserver=new i(function(){o&&r.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=pa(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||n>0,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,l=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var u=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=o?"".concat(n||c,"px"):"auto",this.placeholderEl.style.height="".concat(u,"px");var d=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&c>n,this.axis.y.isOverflowing=u>d,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=l==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var f=this.axis.x.isOverflowing?this.scrollbarWidth:0,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>i-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>d-f,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,r;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],i=(r=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&r!==void 0?r:0,a=i/o,l;return l=Math.max(~~(a*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(l=Math.min(l,this.options.scrollbarMaxSize)),l},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var i=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!i.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],l=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,u=parseInt(this.elStyles[this.axis[t].sizeAttr],10),c=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];c=t==="x"&&this.isRtl&&(!((r=e.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-c:c,t==="x"&&this.isRtl&&(c=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?c:-c);var d=c/(a-u),f=~~((l-i.size)*d);f=t==="x"&&this.isRtl?-f+(l-i.size):f,i.el.style.transform=t==="x"?"translate3d(".concat(f,"px, 0, 0)"):"translate3d(0, ".concat(f,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,r=this.axis[t].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(ga(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(va(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),ga(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?ga(n.scrollbar.el,this.classNames.hover):va(n.scrollbar.el,this.classNames.hover)):(va(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),va(this.axis[t].track.el,this.classNames.hover),va(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var r;n===void 0&&(n="y"),this.isDragging=!0;var o=E1(this.el),i=pa(this.el),a=this.axis[n].scrollbar,l=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=l-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,ga(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,i,a,l;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var c=pa(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var d=this.axis[n].scrollbar,f=(i=(o=d.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&i!==void 0?i:0,h=parseInt((l=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&l!==void 0?l:"0px",10),p=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],g=n==="y"?this.mouseY-f:this.mouseX-f,v=g<0?-1:1,b=v===-1?p-h:p+h,x=40,y=function(){r.contentWrapperEl&&(v===-1?p>b&&(p-=x,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=p,c.requestAnimationFrame(y)):p<b&&(p+=x,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=p,c.requestAnimationFrame(y)))};y()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=pa(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return r.call(o,n)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=goe,e.helpers=poe,e}(),Nr=function(){return Nr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Nr.apply(this,arguments)};function voe(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var _F=m.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,i=voe(e,["children","scrollableNodeProps"]),a=m.useRef(),l=m.useRef(),u=m.useRef(),c={},d={};Object.keys(i).forEach(function(p){Object.prototype.hasOwnProperty.call(Zm.defaultOptions,p)?c[p]=i[p]:d[p]=i[p]});var f=Nr(Nr({},Zm.defaultOptions.classNames),c.classNames),h=Nr(Nr({},o),{className:"".concat(f.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":c.ariaLabel||Zm.defaultOptions.ariaLabel});return m.useEffect(function(){var p;return l.current=h.ref?h.ref.current:l.current,a.current&&(p=new Zm(a.current,Nr(Nr(Nr({},c),l.current&&{scrollableNode:l.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(p):t&&(t.current=p)),function(){p==null||p.unMount(),p=null,typeof t=="function"&&t(null)}},[]),m.createElement("div",Nr({"data-simplebar":"init",ref:a},d),m.createElement("div",{className:f.wrapper},m.createElement("div",{className:f.heightAutoObserverWrapperEl},m.createElement("div",{className:f.heightAutoObserverEl})),m.createElement("div",{className:f.mask},m.createElement("div",{className:f.offset},typeof n=="function"?n({scrollableNodeRef:l,scrollableNodeProps:Nr(Nr({},h),{ref:l}),contentNodeRef:u,contentNodeProps:{className:f.contentEl,ref:u}}):m.createElement("div",Nr({},h),m.createElement("div",{className:f.contentEl},n)))),m.createElement("div",{className:f.placeholder})),m.createElement("div",{className:"".concat(f.track," simplebar-horizontal")},m.createElement("div",{className:f.scrollbar})),m.createElement("div",{className:"".concat(f.track," simplebar-vertical")},m.createElement("div",{className:f.scrollbar})))});_F.displayName="SimpleBar";function Ue({className:e,...t}){const n=m.useRef(null),{isOverflow:r,scrollStart:o,scrollEnd:i}=u8(n,"horizontal");return s.jsx(_F,{scrollableNodeProps:{ref:n},className:ne("overflow-x-auto rounded pb-4",!o&&"scrolled",r&&!i&&"overflowing"),autoHide:!1,children:s.jsx("table",{className:ne(e,"ox-table w-full border-separate text-sans-md"),...t})})}Ue.HeaderRow=e=>s.jsx(Ue.Row,{...e});Ue.Header=({children:e,className:t})=>s.jsx("thead",{className:ne("text-left text-mono-sm text-tertiary",t),children:e});Ue.HeadCell=({className:e,children:t,...n})=>s.jsx("th",{className:ne(e,"border border-x-0 pl-0 text-left text-mono-sm bg-secondary border-default children:first:border-0"),...n,children:s.jsx("div",{className:"-my-[1px] flex h-9 items-center border-l px-3 border-secondary",children:t})});Ue.Row=({className:e,selected:t,...n})=>s.jsx("tr",{className:ne("bg-default",e,t&&"is-selected"),...n});Ue.Body=({className:e,children:t,...n})=>{const r=U.Children.toArray(t).map((o,i,a)=>{var f,h;const l=o,u=(f=a[i-1])==null?void 0:f.props.selected,c=(h=a[i+1])==null?void 0:h.props.selected,d=l.props.selected&&(u||c)?ne(l.props.className,"multi-selection",!u&&"selection-start",!c&&"selection-end"):l.props.className;return U.cloneElement(l,{...l.props,className:d})});return s.jsx("tbody",{className:e,...n,children:r})};Ue.Cell=({height:e="small",className:t,children:n,...r})=>s.jsx("td",{className:ne(t,"pl-0 text-default border-default children:first:border-l-0 children:last:-mr-[1px]"),...r,children:s.jsx("div",{className:ne("relative -my-[1px] -mr-[2px] flex items-center border-b border-l p-3 border-secondary",{"h-12":e==="small","h-16":e==="large"}),children:n})});const Xr=St.div`-mt-11 mb-3 flex justify-end space-x-2`,ys=St.div`flex h-full max-h-[480px] items-center justify-center rounded-lg border border-secondary p-4`,W6=St.div`mb-4 flex items-end justify-between space-x-8`,f4=St.div`text-sans-lg text-default`,fl=St.table`ox-mini-table w-full border-separate text-sans-md`,hl=({children:e})=>s.jsx(Ue.Header,{children:s.jsx(Ue.HeaderRow,{children:e})}),tn=Ue.HeadCell,ml=St.tbody``,pl=St.tr`is-selected children:border-default first:children:border-l children:last:border-b last:children:border-r`,er=({children:e})=>s.jsx("td",{children:s.jsx("div",{children:e})}),gl=({onClick:e,label:t})=>s.jsx(er,{children:s.jsx("button",{type:"button",onClick:e,"aria-label":t,children:s.jsx(rk,{"aria-hidden":!0,focusable:"false"})})}),Ft={accessDocs:"https://docs.oxide.computer/guides/configuring-access",cloudInitFormat:"https://cloudinit.readthedocs.io/en/latest/explanation/format.html",cloudInitExamples:"https://cloudinit.readthedocs.io/en/latest/reference/examples.html",disksDocs:"https://docs.oxide.computer/guides/managing-disks-and-snapshots",firewallRulesDocs:"https://docs.oxide.computer/guides/configuring-guest-networking#_firewall_rules",floatingIpsDocs:"https://docs.oxide.computer/guides/managing-floating-ips",imagesDocs:"https://docs.oxide.computer/guides/creating-and-sharing-images",preparingImagesDocs:"https://docs.oxide.computer/guides/creating-and-sharing-images#_preparing_images_for_import",instanceActionsDocs:"https://docs.oxide.computer/guides/managing-instances",keyConceptsIamPolicyDocs:"https://docs.oxide.computer/guides/key-entities-and-concepts#iam-policy",keyConceptsProjectsDocs:"https://docs.oxide.computer/guides/key-entities-and-concepts#_projects",projectsDocs:"https://docs.oxide.computer/guides/onboarding-projects",quickStart:"https://docs.oxide.computer/guides/quickstart",sledDocs:"https://docs.oxide.computer/guides/architecture/service-processors#_server_sled",snapshotsDocs:"https://docs.oxide.computer/guides/managing-disks-and-snapshots#_snapshots",storageDocs:"https://docs.oxide.computer/guides/architecture/os-hypervisor-storage#_storage",systemIpPoolsDocs:"https://docs.oxide.computer/guides/operator/ip-pool-management",systemMetricsDocs:"https://docs.oxide.computer/guides/operator/system-metrics",systemSiloDocs:"https://docs.oxide.computer/guides/operator/silo-management",instancesDocs:"https://docs.oxide.computer/guides/deploying-workloads",vpcsDocs:"https://docs.oxide.computer/guides/configuring-guest-networking"},lt={access:{href:Ft.accessDocs,linkText:"Access Control"},disks:{href:Ft.disksDocs,linkText:"Disks and Snapshots"},firewallRules:{href:Ft.firewallRulesDocs,linkText:"Firewall Rules"},floatingIps:{href:Ft.floatingIpsDocs,linkText:"Floating IPs"},keyConceptsIam:{href:Ft.keyConceptsIamPolicyDocs,linkText:"Key Concepts"},images:{href:Ft.imagesDocs,linkText:"Images"},instanceActions:{href:Ft.instanceActionsDocs,linkText:"Instance Actions"},keyConceptsProjects:{href:Ft.keyConceptsProjectsDocs,linkText:"Key Concepts"},projects:{href:Ft.projectsDocs,linkText:"Projects"},quickStart:{href:Ft.quickStart,linkText:"Quick Start"},sleds:{href:Ft.sledDocs,linkText:"Server Sleds"},snapshots:{href:Ft.snapshotsDocs,linkText:"Disks and Snapshots"},storage:{href:Ft.storageDocs,linkText:"Storage"},systemIpPools:{href:Ft.systemIpPoolsDocs,linkText:"IP Pools"},systemMetrics:{href:Ft.systemMetricsDocs,linkText:"Metrics"},systemSilo:{href:Ft.systemSiloDocs,linkText:"Silos"},instances:{href:Ft.instancesDocs,linkText:"Instances"},vpcs:{href:Ft.vpcsDocs,linkText:"Networking"}},LF=e=>({name:e.name,status:e.enabled?"enabled":"disabled",action:e.action,description:e.description,direction:e.direction,filters:{hosts:e.hosts,ports:e.ports,protocols:e.protocols},priority:e.priority,targets:e.targets}),yoe=e=>({...e,enabled:e.status==="enabled",protocols:e.filters.protocols||[],ports:e.filters.ports||[],hosts:e.filters.hosts||[]}),xoe={enabled:!0,name:"",description:"",priority:0,action:"allow",direction:"inbound",protocols:[],ports:[],hosts:[],targets:[]},boe={portRange:""},woe={type:"vpc",value:""},$oe={type:"vpc",value:""};function G6(e){switch(e){case"vpc":return{label:"VPC name"};case"subnet":return{label:"Subnet name"};case"instance":return{label:"Instance name"};case"ip":return{label:"IP address",helpText:"An IPv4 or IPv6 address"};case"ip_net":return{label:"IP network",helpText:"Looks like 192.168.0.0/16 or fd00:1122:3344:0001::1/64"}}}const Soe=()=>s.jsx(Bt,{variant:"info",content:s.jsxs(s.Fragment,{children:["Read the"," ",s.jsx("a",{href:Ft.firewallRulesDocs,className:"underline",target:"_blank",rel:"noreferrer",children:"guest networking guide"})," ","and"," ",s.jsx("a",{href:"https://docs.oxide.computer/api/vpc_firewall_rules_update",className:"underline",target:"_blank",rel:"noreferrer",children:"API docs"})," ","to learn more about firewall rules."]})}),VF=({error:e,control:t})=>{const n=Ge({defaultValues:boe}),r=on({name:"ports",control:t}).field,o=n.handleSubmit(({portRange:f})=>{const h=f.trim();r.onChange([...r.value,h]),n.reset()}),i=Ge({defaultValues:woe}),a=on({name:"hosts",control:t}).field,l=i.handleSubmit(({type:f,value:h})=>{!f||!h||a.value.some(p=>p.value===h&&p.type===f)||(a.onChange([...a.value,{type:f,value:h}]),i.reset())}),u=Ge({defaultValues:$oe}),c=on({name:"targets",control:t}).field,d=u.handleSubmit(({type:f,value:h})=>{!f||!h||c.value.some(p=>p.value===h&&p.type===f)||(c.onChange([...c.value,{type:f,value:h}]),u.reset())});return s.jsxs(s.Fragment,{children:[s.jsx(Soe,{}),s.jsx(Li,{name:"enabled",control:t,children:"Enabled"}),s.jsx(Et,{name:"name",control:t}),s.jsx(At,{name:"description",control:t}),s.jsx(sh,{name:"action",column:!0,control:t,items:[{value:"allow",label:"Allow"},{value:"deny",label:"Deny"}]}),s.jsx(sh,{name:"direction",label:"Direction of traffic",column:!0,control:t,description:s.jsxs(s.Fragment,{children:["An inbound rule applies to traffic ",s.jsx("em",{children:"to"})," the targets, while an outbound rule applies to traffic ",s.jsx("em",{children:"from"})," the targets."]}),items:[{value:"inbound",label:"Inbound"},{value:"outbound",label:"Outbound"}]}),s.jsx(cl,{name:"priority",description:"Must be 0–65535. Lower-numbered rules apply first.",required:!0,control:t}),s.jsx(wr,{}),s.jsx("h3",{className:"mb-4 text-sans-2xl",children:"Targets"}),s.jsx(Bt,{variant:"info",content:s.jsxs(s.Fragment,{children:["Targets determine the instances to which this rule applies. You can target instances directly by name, or specify a VPC, VPC subnet, IP, or IP subnet, which will apply the rule to traffic going to all matching instances. Targets are additive: the rule applies to instances matching"," ",s.jsx("span",{className:"underline",children:"any"})," target."]})}),s.jsx(Pn,{name:"type",label:"Target type",items:[{value:"vpc",label:"VPC"},{value:"subnet",label:"VPC Subnet"},{value:"instance",label:"Instance"},{value:"ip",label:"IP"},{value:"ip_net",label:"IP subnet"}],required:!0,control:u.control}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(ot,{name:"value",...G6(u.watch("type")),required:!0,control:u.control,onKeyDown:f=>{f.key===Hi.enter&&(f.preventDefault(),d(f))}}),s.jsxs("div",{className:"flex justify-end",children:[s.jsx(Je,{variant:"ghost",size:"sm",className:"mr-2.5",disabled:!u.formState.isDirty,onClick:()=>u.reset(),children:"Clear"}),s.jsx(Je,{size:"sm",onClick:d,children:"Add target"})]})]}),!!c.value.length&&s.jsxs(fl,{className:"mb-4","aria-label":"Targets",children:[s.jsxs(hl,{children:[s.jsx(tn,{children:"Type"}),s.jsx(tn,{children:"Value"}),s.jsx(tn,{className:"w-12"})]}),s.jsx(ml,{children:c.value.map((f,h)=>s.jsxs(pl,{tabIndex:0,"aria-rowindex":h+1,"aria-label":`Name: ${f.value}, Type: ${f.type}`,children:[s.jsx(er,{children:s.jsx(tt,{variant:"solid",children:f.type})}),s.jsx(er,{children:f.value}),s.jsx(gl,{onClick:()=>c.onChange(c.value.filter(p=>!(p.value===f.value&&p.type===f.type))),label:`remove target ${f.value}`})]},`${f.type}|${f.value}`))})]}),s.jsx(wr,{}),s.jsx("h3",{className:"mb-4 text-sans-2xl",children:"Filters"}),s.jsx(Bt,{variant:"info",content:s.jsxs(s.Fragment,{children:["Filters reduce the scope of this rule. Without filters, the rule applies to all traffic to the targets (or from the targets, if it’s an outbound rule). With multiple filters, the rule applies to traffic matching"," ",s.jsx("span",{className:"underline",children:"all"})," filters."]})}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsxs("div",{className:"mt-2",children:[s.jsx("label",{id:"portRange-label",htmlFor:"portRange",className:"text-sans-lg",children:"Port filters"}),s.jsx(yi,{id:"portRange-help-text",className:"mb-2",children:"A single destination port (1234) or a range (1234–2345)"}),s.jsx(Ag,{id:"portRange",name:"portRange",required:!0,control:n.control,onKeyDown:f=>{f.key===Hi.enter&&(f.preventDefault(),o(f))},validate:f=>{if(!Yz(f))return"Not a valid port range";if(r.value.includes(f.trim()))return"Port range already added"}})]}),s.jsxs("div",{className:"flex justify-end",children:[s.jsx(Je,{variant:"ghost",size:"sm",className:"mr-2.5",disabled:!n.formState.isDirty,onClick:()=>n.reset(),children:"Clear"}),s.jsx(Je,{size:"sm",onClick:o,children:"Add port filter"})]})]}),!!r.value.length&&s.jsxs(fl,{className:"mb-4","aria-label":"Port filters",children:[s.jsxs(hl,{children:[s.jsx(tn,{children:"Port ranges"}),s.jsx(tn,{className:"w-12"})]}),s.jsx(ml,{children:r.value.map(f=>s.jsxs(pl,{tabIndex:0,"aria-label":f,children:[s.jsx(er,{children:f}),s.jsx(gl,{onClick:()=>r.onChange(r.value.filter(h=>h!==f)),label:`remove port ${f}`})]},f))})]}),s.jsxs("fieldset",{className:"space-y-0.5",children:[s.jsx("legend",{className:"mb-2 mt-4 text-sans-lg",children:"Protocol filters"}),s.jsx("div",{children:s.jsx(Li,{name:"protocols",value:"TCP",control:t,children:"TCP"})}),s.jsx("div",{children:s.jsx(Li,{name:"protocols",value:"UDP",control:t,children:"UDP"})}),s.jsx("div",{children:s.jsx(Li,{name:"protocols",value:"ICMP",control:t,children:"ICMP"})})]}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("h3",{className:"mt-4 text-sans-lg",children:"Host filters"}),s.jsx(Bt,{variant:"info",content:s.jsx(s.Fragment,{children:"Host filters match the “other end” of traffic from the target’s perspective: for an inbound rule, they match the source of traffic. For an outbound rule, they match the destination."})}),s.jsx(Pn,{name:"type",label:"Host type",items:[{value:"vpc",label:"VPC"},{value:"subnet",label:"VPC Subnet"},{value:"instance",label:"Instance"},{value:"ip",label:"IP"},{value:"ip_net",label:"IP Subnet"}],required:!0,control:i.control}),s.jsx(ot,{name:"value",...G6(i.watch("type")),required:!0,control:i.control,onKeyDown:f=>{f.key===Hi.enter&&(f.preventDefault(),l(f))}}),s.jsxs("div",{className:"flex justify-end",children:[s.jsx(Je,{variant:"ghost",size:"sm",className:"mr-2.5",disabled:!i.formState.isDirty,onClick:()=>i.reset(),children:"Clear"}),s.jsx(Je,{size:"sm",onClick:l,children:"Add host filter"})]}),!!a.value.length&&s.jsxs(fl,{className:"mb-4","aria-label":"Host filters",children:[s.jsxs(hl,{children:[s.jsx(tn,{children:"Type"}),s.jsx(tn,{children:"Value"}),s.jsx(tn,{className:"w-12"})]}),s.jsx(ml,{children:a.value.map((f,h)=>s.jsxs(pl,{tabIndex:0,"aria-rowindex":h+1,"aria-label":`Name: ${f.value}, Type: ${f.type}`,children:[s.jsx(er,{children:s.jsx(tt,{variant:"solid",children:f.type})}),s.jsx(er,{children:f.value}),s.jsx(gl,{onClick:()=>a.onChange(a.value.filter(p=>!(p.value===f.value&&p.type===f.type))),label:`remove host ${f.value}`})]},`${f.type}|${f.value}`))})]})]}),e&&s.jsxs(s.Fragment,{children:[s.jsx(wr,{}),s.jsx("div",{className:"text-destructive",children:e.message})]})]})};h4.loader=async({params:e})=>(await ae.prefetchQuery("vpcFirewallRulesView",{query:Gc(e)}),null);function h4(){const e=Wl(),t=ke(),n=Fe(),r=()=>n(B.vpcFirewallRules(e)),o=fe("vpcFirewallRulesUpdate",{onSuccess(){t.invalidateQueries("vpcFirewallRulesView"),De({content:"Your firewall rule has been created"}),n(B.vpcFirewallRules(e))}}),{data:i}=Pe("vpcFirewallRulesView",{query:e}),a=m.useMemo(()=>Cv(i.rules,f=>f.priority),[i]),{rule:l}=Sv(),u=a.find(f=>f.name===l),c=u?yoe({...u,name:u.name+"-copy"}):xoe,d=Ge({defaultValues:c});return s.jsx(ht,{form:d,formType:"create",resourceName:"rule",title:"Add firewall rule",onDismiss:r,onSubmit:f=>{const h=a.filter(p=>p.name!==f.name).map(GP);o.mutate({query:e,body:{rules:[...h,LF(f)]}})},loading:o.isPending,submitError:o.error,submitLabel:"Add rule",children:s.jsx(VF,{error:o.error,control:d.control})})}m4.loader=async({params:e})=>{const{project:t,vpc:n,rule:r}=f8(e);if(!(await ae.fetchQuery("vpcFirewallRulesView",{query:{project:t,vpc:n}})).rules.find(a=>a.name===r))throw S2;return null};function m4(){const{vpc:e,project:t,rule:n}=qK(),r=Wl(),o=ke(),{data:i}=Pe("vpcFirewallRulesView",{query:{project:t,vpc:e}}),a=i.rules.find(h=>h.name===n);vo(a,"Firewall rule must exist");const l=Fe(),u=()=>l(B.vpcFirewallRules(r)),c=fe("vpcFirewallRulesUpdate",{onSuccess(){o.invalidateQueries("vpcFirewallRulesView"),u()}}),d={enabled:a.status==="enabled",name:a.name,description:a.description,priority:a.priority,action:a.action,direction:a.direction,protocols:a.filters.protocols||[],ports:a.filters.ports||[],hosts:a.filters.hosts||[],targets:a.targets},f=Ge({defaultValues:d});return Object.keys(a).length===0?null:s.jsx(ht,{form:f,formType:"edit",resourceName:"rule",onDismiss:u,onSubmit:h=>{const p=i.rules.filter(g=>g.name!==a.name).map(GP);c.mutate({query:r,body:{rules:[...p,LF(h)]}})},loading:c.isPending,submitError:c.error,children:s.jsx(VF,{error:c.error,control:f.control})})}function $$(e){const t=e+"CollectionProvider",[n,r]=ia(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:g,children:v}=p,b=U.useRef(null),x=U.useRef(new Map).current;return U.createElement(o,{scope:g,itemMap:x,collectionRef:b},v)},l=e+"CollectionSlot",u=U.forwardRef((p,g)=>{const{scope:v,children:b}=p,x=i(l,v),y=zn(g,x.collectionRef);return U.createElement(Lf,{ref:y},b)}),c=e+"CollectionItemSlot",d="data-radix-collection-item",f=U.forwardRef((p,g)=>{const{scope:v,children:b,...x}=p,y=U.useRef(null),w=zn(g,y),S=i(c,v);return U.useEffect(()=>(S.itemMap.set(y,{ref:y,...x}),()=>void S.itemMap.delete(y))),U.createElement(Lf,{[d]:"",ref:w},b)});function h(p){const g=i(e+"CollectionConsumer",p);return U.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((S,C)=>x.indexOf(S.ref.current)-x.indexOf(C.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}const BF="Collapsible",[Eoe,zF]=ia(BF),[Coe,S$]=Eoe(BF),Doe=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...l}=e,[u=!1,c]=zl({prop:r,defaultProp:o,onChange:a});return m.createElement(Coe,{scope:n,disabled:i,contentId:Ui(),open:u,onOpenToggle:m.useCallback(()=>c(d=>!d),[c])},m.createElement(gn.div,Re({"data-state":E$(u),"data-disabled":i?"":void 0},l,{ref:t})))}),joe="CollapsibleTrigger",Poe=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=S$(joe,n);return m.createElement(gn.button,Re({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":E$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ye(e.onClick,o.onOpenToggle)}))}),UF="CollapsibleContent",Roe=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=S$(UF,e.__scopeCollapsible);return m.createElement(Ul,{present:n||o.open},({present:i})=>m.createElement(koe,Re({},r,{ref:t,present:i})))}),koe=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=S$(UF,n),[l,u]=m.useState(r),c=m.useRef(null),d=zn(t,c),f=m.useRef(0),h=f.current,p=m.useRef(0),g=p.current,v=a.open||l,b=m.useRef(v),x=m.useRef();return m.useEffect(()=>{const y=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(y)},[]),jl(()=>{const y=c.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const w=y.getBoundingClientRect();f.current=w.height,p.current=w.width,b.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),u(r)}},[a.open,r]),m.createElement(gn.div,Re({"data-state":E$(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v},i,{ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style}}),v&&o)});function E$(e){return e?"open":"closed"}const Toe=Doe,Ioe=Poe,Aoe=Roe,Noe=m.createContext(void 0);function $0(e){const t=m.useContext(Noe);return e||t||"ltr"}const js="Accordion",Foe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[C$,Moe,Ooe]=$$(js),[S0,cfe]=ia(js,[Ooe,zF]),D$=zF(),qF=U.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return U.createElement(C$.Provider,{scope:e.__scopeAccordion},n==="multiple"?U.createElement(Boe,Re({},i,{ref:t})):U.createElement(Voe,Re({},o,{ref:t})))});qF.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[HF,_oe]=S0(js),[WF,Loe]=S0(js,{collapsible:!1}),Voe=U.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[l,u]=zl({prop:n,defaultProp:r,onChange:o});return U.createElement(HF,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:u,onItemClose:U.useCallback(()=>i&&u(""),[i,u])},U.createElement(WF,{scope:e.__scopeAccordion,collapsible:i},U.createElement(GF,Re({},a,{ref:t}))))}),Boe=U.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],l]=zl({prop:n,defaultProp:r,onChange:o}),u=U.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=U.useCallback(d=>l((f=[])=>f.filter(h=>h!==d)),[l]);return U.createElement(HF,{scope:e.__scopeAccordion,value:a,onItemOpen:u,onItemClose:c},U.createElement(WF,{scope:e.__scopeAccordion,collapsible:!0},U.createElement(GF,Re({},i,{ref:t}))))}),[zoe,E0]=S0(js),GF=U.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,l=U.useRef(null),u=zn(l,t),c=Moe(n),f=$0(o)==="ltr",h=Ye(e.onKeyDown,p=>{var g;if(!Foe.includes(p.key))return;const v=p.target,b=c().filter(T=>{var A;return!((A=T.ref.current)!==null&&A!==void 0&&A.disabled)}),x=b.findIndex(T=>T.ref.current===v),y=b.length;if(x===-1)return;p.preventDefault();let w=x;const S=0,C=y-1,E=()=>{w=x+1,w>C&&(w=S)},D=()=>{w=x-1,w<S&&(w=C)};switch(p.key){case"Home":w=S;break;case"End":w=C;break;case"ArrowRight":i==="horizontal"&&(f?E():D());break;case"ArrowDown":i==="vertical"&&E();break;case"ArrowLeft":i==="horizontal"&&(f?D():E());break;case"ArrowUp":i==="vertical"&&D();break}const $=w%y;(g=b[$].ref.current)===null||g===void 0||g.focus()});return U.createElement(zoe,{scope:n,disabled:r,direction:o,orientation:i},U.createElement(C$.Slot,{scope:n},U.createElement(gn.div,Re({},a,{"data-orientation":i,ref:u,onKeyDown:r?void 0:h}))))}),p4="AccordionItem",[Uoe,j$]=S0(p4),qoe=U.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=E0(p4,n),a=_oe(p4,n),l=D$(n),u=Ui(),c=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return U.createElement(Uoe,{scope:n,open:c,disabled:d,triggerId:u},U.createElement(Toe,Re({"data-orientation":i.orientation,"data-state":KF(c)},l,o,{ref:t,disabled:d,open:c,onOpenChange:f=>{f?a.onItemOpen(r):a.onItemClose(r)}})))}),Hoe="AccordionHeader",Woe=U.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=E0(js,n),i=j$(Hoe,n);return U.createElement(gn.h3,Re({"data-orientation":o.orientation,"data-state":KF(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),K6="AccordionTrigger",Goe=U.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=E0(js,n),i=j$(K6,n),a=Loe(K6,n),l=D$(n);return U.createElement(C$.ItemSlot,{scope:n},U.createElement(Ioe,Re({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},l,r,{ref:t})))}),Koe="AccordionContent",Qoe=U.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=E0(js,n),i=j$(Koe,n),a=D$(n);return U.createElement(Aoe,Re({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},a,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function KF(e){return e?"open":"closed"}const QF=qF,Zoe=qoe,Yoe=Woe,Xoe=Goe,Joe=Qoe,g4=({children:e,isOpen:t,label:n,value:r})=>{const o=m.useRef(null);return m.useEffect(()=>{t&&o.current&&o.current.scrollIntoView({behavior:"smooth"})},[t]),s.jsxs(Zoe,{value:r,children:[s.jsx(Yoe,{className:"max-w-lg",children:s.jsxs(Xoe,{className:"group flex w-full items-center justify-between border-t py-2 text-sans-xl border-secondary [&>svg]:data-[state=open]:rotate-90",children:[s.jsx("div",{className:"text-secondary",children:n}),s.jsx(Kw,{className:"transition-all text-secondary"})]})}),s.jsx(Joe,{ref:o,forceMount:!0,className:ne("ox-accordion-content py-8",{hidden:!t}),children:e})]})},eie=e=>e.isDefault?{value:e.name,selectedLabel:e.name,label:s.jsxs(s.Fragment,{children:[e.name," ",s.jsx(tt,{className:"ml-1",color:"neutral",children:"default"})]})}:{value:e.name,label:e.name},tie={name:"",description:"",pool:void 0};function nie(){const{data:e}=Ze("projectIpPoolList",{query:{limit:1e3}}),t=ke(),n=ut(),r=Fe(),o=fe("floatingIpCreate",{onSuccess(){t.invalidateQueries("floatingIpList"),t.invalidateQueries("ipPoolUtilizationView"),De({content:"Your Floating IP has been created"}),r(B.floatingIps(n))}}),i=Ge({defaultValues:tie}),[a,l]=m.useState([]);return s.jsxs(ht,{form:i,formType:"create",resourceName:"floating IP",onDismiss:()=>r(B.floatingIps(n)),onSubmit:u=>o.mutate({query:n,body:u}),loading:o.isPending,submitError:o.error,children:[s.jsx(Et,{name:"name",control:i.control}),s.jsx(At,{name:"description",control:i.control}),s.jsx(QF,{type:"multiple",className:"mt-12 max-w-lg",value:a,onValueChange:l,children:s.jsxs(g4,{isOpen:a.includes("advanced"),label:"Advanced",value:"advanced",children:[s.jsx(Bt,{variant:"info",content:"If you don’t specify a pool, the default will be used"}),s.jsx(Pn,{name:"pool",items:((e==null?void 0:e.items)||[]).map(u=>eie(u)),label:"IP pool",control:i.control,placeholder:"Select a pool"})]})})]})}v4.loader=async({params:e})=>{const{floatingIp:t,project:n}=d8(e);return await ae.prefetchQuery("floatingIpView",{path:{floatingIp:t},query:{project:n}}),null};function v4(){const e=ke(),t=Fe(),n=VK(),r=()=>t(B.floatingIps({project:n.project})),{data:o}=Pe("floatingIpView",{path:{floatingIp:n.floatingIp},query:{project:n.project}}),i=fe("floatingIpUpdate",{onSuccess(l){e.invalidateQueries("floatingIpList"),De({content:"Your floating IP has been updated"}),r()}}),a=Ge({defaultValues:o});return s.jsxs(ht,{form:a,formType:"edit",resourceName:"floating IP",onDismiss:r,onSubmit:({name:l,description:u})=>{i.mutate({path:{floatingIp:n.floatingIp},query:{project:n.project},body:{name:l,description:u}})},loading:i.isPending,submitError:i.error,children:[s.jsx(Et,{name:"name",control:a.control}),s.jsx(At,{name:"description",control:a.control})]})}function P$(e,t){const n=m.useRef();m.useEffect(()=>{n.current=e},[e]),m.useEffect(()=>{if(t===null)return;const r=setTimeout(()=>{var o;return(o=n.current)==null?void 0:o.call(n)},t);return()=>clearTimeout(r)},[t])}const R$=({ariaLabel:e="Click to copy",text:t,className:n})=>{const[r,o]=m.useState(!1);P$(()=>o(!1),r?2e3:null);const i=()=>{window.navigator.clipboard.writeText(t).then(()=>{o(!0)})},a=Dh(r,{from:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)"},leave:{opacity:0,transform:"scale(0.8)"},config:zR.stiff,trail:100,initial:null});return s.jsx("button",{className:ne("relative h-5 w-5 rounded",r?"text-accent bg-accent-secondary":"text-quaternary hover:text-secondary hover:bg-hover",n),onClick:i,type:"button","aria-label":r?"Copied":e,children:a((l,u)=>s.jsx(jh.div,{style:l,className:"absolute inset-0 flex items-center justify-center",children:u?s.jsx(Vo,{}):s.jsx(yW,{})}))})},Ps=({text:e,maxLength:t,position:n="end",hasCopyButton:r,tooltipDelay:o=300})=>e.length<=t?s.jsx("div",{children:e}):s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(vi,{content:e,delay:o,children:s.jsx("div",{"aria-label":e,children:rie(e,t,n)})}),r&&s.jsx(R$,{text:e})]});function rie(e,t,n="end"){if(e.length<=t)return e;const r=t-2;if(n==="end")return e.substring(0,r)+"…";const o=Math.floor(r/2),i=e.substring(0,o),a=e.substring(e.length-o);return`${i}…${a}`}const oie=m.forwardRef(({accept:e,className:t,onChange:n,error:r,...o},i)=>{const a=m.useRef(null),[l,u]=m.useState(null),[c,d]=m.useState(!1),f=p=>{const g=p.target,v=g.files?g.files[0]:null;u(v),d(!1),n==null||n(v)},h=p=>{u(null),n==null||n(null),a&&a.current&&(a.current.value=""),p.preventDefault()};return s.jsxs("label",{className:ne(t,"group relative block"),children:[s.jsx("input",{ref:c2([a,i]),type:"file",name:"file",className:ne("-z-1 absolute inset-0 w-full cursor-pointer rounded",r&&"focus-error"),...o,onChange:f,onDragEnter:()=>d(!0),onDragLeave:()=>d(!1),onDrop:()=>d(!1)}),s.jsxs("div",{className:ne("z-1 pointer-events-none relative flex flex-col items-center justify-center space-y-2 rounded border px-4 py-6 text-default bg-default",c&&"bg-accent-secondary !border-accent-secondary",r?"!border-error-secondary group-hover:border-error":"border-default group-hover:border-hover"),children:[s.jsx("div",{className:ne("flex items-center justify-center rounded p-1 text-accent bg-accent-secondary",c&&"bg-accent-secondary-hover"),children:s.jsx(nk,{className:"h-4 w-4"})}),s.jsx("div",{className:"flex h-8 items-center text-sans-md",children:l&&!c?s.jsxs("div",{className:"flex items-center text-default",children:[s.jsx(Ps,{text:l.name,maxLength:32,position:"middle"}),s.jsxs("span",{className:"ml-1 text-quaternary",children:["(",Cs(l.size,{base:2,pad:!0}),")"]}),s.jsx("button",{type:"button",onClick:h,className:"pointer-events-auto ml-1 inline-flex rounded p-1 hover:children:text-tertiary","aria-label":"Clear file",children:s.jsx(rk,{className:"text-quaternary"})})]}):s.jsxs(s.Fragment,{children:["Drop a file or click to browse"," ",e&&s.jsxs("span",{className:"ml-1 text-quaternary",children:["(",iie(e),")"]})]})})]})]})});function iie(e){return e.split(",").map(t=>t.trim().replace(/^\./,"")).join(", ")}function Fl({id:e,name:t,label:n,tooltipText:r,control:o,required:i=!1,accept:a,description:l,disabled:u}){const{field:{value:c,...d},fieldState:{error:f}}=on({name:t,control:o,rules:{required:i}});return s.jsxs("div",{children:[s.jsxs("div",{className:"mb-2",children:[s.jsx(bo,{id:`${e}-label`,htmlFor:e,tip:r,optional:!i,children:n}),l&&s.jsx(yi,{id:`${e}-help-text`,children:l})]}),s.jsx(oie,{id:e,className:"mt-2",accept:a,disabled:u,...d,error:!!f}),s.jsx(Kc,{error:f,label:n})]})}async function mf(e){return new Promise(t=>{const n=new FileReader;n.onload=function(r){const o=r.target.result.split(",").pop();t(o)},n.readAsDataURL(e)})}function aie({control:e}){const{field:{value:t,onChange:n}}=on({control:e,name:"idpMetadataSource"});return s.jsxs("fieldset",{children:[s.jsx("legend",{id:"metadata-source-legend",className:"mb-2 text-sans-md",children:"Metadata source"}),s.jsxs(Kh,{className:"mb-7",name:"metadata_source_type",defaultChecked:"url",onChange:r=>{const o=r.target.value==="url"?{type:"url",url:""}:{type:"base64_encoded_xml",data:""};n(o)},children:[s.jsx(Wi,{value:"url",children:"URL"}),s.jsx(Wi,{value:"base64_encoded_xml",children:"XML"})]}),t.type==="url"&&s.jsx(ot,{name:"idpMetadataSource.url",label:"Metadata source URL",required:!0,control:e}),t.type==="base64_encoded_xml"&&s.jsx(Fl,{id:"idp-metadata-source-file-input",name:"idpMetadataSourceFile",label:"Metadata source XML",required:!0,control:e})]})}const sie={type:"saml",name:"",description:"",acsUrl:"",idpEntityId:"",idpMetadataSource:{type:"url",url:""},sloUrl:"",spClientId:"",technicalContactEmail:"",groupAttributeName:"",signingKeypair:{publicCert:null,privateKey:null}};function lie(){const e=Fe(),t=ke(),{silo:n}=Gl(),r=()=>e(B.silo({silo:n})),o=fe("samlIdentityProviderCreate",{onSuccess(){t.invalidateQueries("siloIdentityProviderList"),De({content:"Your identity provider has been created"}),r()}}),i=Ge({defaultValues:sie});return s.jsxs(ht,{form:i,formType:"create",resourceName:"identity provider",onDismiss:r,onSubmit:async({signingKeypair:a,groupAttributeName:l,idpMetadataSource:u,idpMetadataSourceFile:c,...d})=>{const f=a.publicCert&&a.privateKey?{publicCert:await mf(a.publicCert),privateKey:await mf(a.privateKey)}:void 0,h=c&&u.type==="base64_encoded_xml"?{type:u.type,data:await mf(c)}:u;o.mutate({query:{silo:n},body:{...d,idpMetadataSource:h,groupAttributeName:(l==null?void 0:l.trim())||void 0,signingKeypair:f}})},loading:o.isPending,submitError:o.error,submitLabel:"Create provider",children:[s.jsx(Et,{name:"name",control:i.control}),s.jsx(At,{name:"description",control:i.control,required:!0}),s.jsx(ot,{name:"acsUrl",label:"ACS URL",description:"Service provider endpoint for the IdP to send the SAML response",required:!0,control:i.control}),s.jsx(ot,{name:"idpEntityId",label:"Entity ID",required:!0,control:i.control}),s.jsx(ot,{name:"sloUrl",label:"Single Logout (SLO) URL",description:"Service provider endpoint for log out requests",required:!0,control:i.control}),s.jsx(ot,{name:"spClientId",label:"Service provider client ID",required:!0,control:i.control}),s.jsx(ot,{name:"groupAttributeName",label:"Group attribute name",description:"Name of SAML attribute where we can find a comma-separated list of names of groups the user belongs to",control:i.control}),s.jsx(ot,{name:"technicalContactEmail",label:"Technical contact email",required:!0,control:i.control}),s.jsx(aie,{control:i.control}),s.jsx(Fl,{id:"public-cert-file-input",name:"signingKeypair.publicCert",description:"DER-encoded X.509 certificate",label:"Public cert",control:i.control}),s.jsx(Fl,{id:"private-key-file-input",name:"signingKeypair.privateKey",description:"DER-encoded private key",label:"Private key",control:i.control})]})}const mi=({date:e,locale:t})=>s.jsxs("time",{dateTime:e.toISOString(),className:"flex flex-wrap gap-x-2",children:[s.jsx("span",{children:DF(e,t)}),s.jsx("span",{className:"text-quaternary",children:jF(e,t)})]}),k$=e=>U.Children.toArray(e).reduce((n,r)=>(r==null?void 0:r.type)===U.Fragment?n.concat(k$(r.props.children)):(n.push(r),n),[]),ZF=(e,t)=>e!=null&&e.type?e.type===t:!1,T$=(e,t)=>{const n=r=>t.some(o=>ZF(r,o));return U.Children.toArray(e).every(n)},uie=(e,t)=>{const n=e.findIndex(t);return n!==-1?e.splice(n,1)[0]:null},YF=(e,t)=>uie(e,n=>ZF(n,t));function je({className:e,children:t}){return vo(T$(t,[je.Row]),"PropertiesTable can only have PropertiesTable.Row as a child"),s.jsx("div",{className:ne(e,"properties-table grid min-w-min basis-6/12 divide-y rounded-lg border border-default children:pl-3 children:pr-6 children:border-secondary"),children:t})}je.Row=({label:e,children:t})=>s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"flex items-center",children:s.jsx(tt,{children:e})}),s.jsx("div",{className:"flex h-11 items-center overflow-hidden whitespace-nowrap pr-4 text-sans-md text-secondary",children:t})]});je.Group=({children:e,className:t})=>(vo(T$(e,[je]),"PropertiesTable can only have PropertiesTable as a child"),s.jsx("div",{className:ne(t,"flex min-w-min md-:flex-col md-:first:children:rounded-b-none md-:first:children:border-b-secondary md-:last:children:rounded-t-none md-:last:children:border-t-0 lg+:gap-x-4"),children:e}));y4.loader=async({params:e})=>{const{silo:t,provider:n}=g8(e);return await ae.prefetchQuery("samlIdentityProviderView",{path:{provider:n},query:{silo:t}}),null};function y4(){const{silo:e,provider:t}=x8(),{data:n}=Pe("samlIdentityProviderView",{path:{provider:t},query:{silo:e}}),r=Fe(),o=()=>r(B.silo({silo:e})),i=Ge({defaultValues:n});return s.jsxs(ht,{form:i,formType:"edit",resourceName:"identity provider",title:"Identity provider",onDismiss:o,subtitle:s.jsxs(R8,{children:[s.jsx(kh,{})," ",n.name]}),submitError:null,children:[s.jsxs(je,{children:[s.jsx(je.Row,{label:"ID",children:s.jsx(Ps,{text:n.id,maxLength:32,hasCopyButton:!0})}),s.jsx(je.Row,{label:"Created",children:s.jsx(mi,{date:n.timeCreated})}),s.jsx(je.Row,{label:"Updated",children:s.jsx(mi,{date:n.timeModified})})]}),s.jsx(Et,{name:"name",control:i.control,disabled:!0}),s.jsx(At,{name:"description",control:i.control,required:!0,disabled:!0}),s.jsx(ot,{name:"acsUrl",label:"ACS URL",description:"Service provider endpoint for the IdP to send the SAML response",required:!0,control:i.control,disabled:!0}),s.jsx(ot,{name:"idpEntityId",label:"Entity ID",required:!0,control:i.control,disabled:!0}),s.jsx(ot,{name:"sloUrl",label:"Single Logout (SLO) URL",description:"Service provider endpoint for log out requests",required:!0,control:i.control,disabled:!0}),s.jsx(ot,{name:"spClientId",label:"Service provider client ID",required:!0,control:i.control,disabled:!0}),s.jsx(ot,{name:"technicalContactEmail",label:"Technical contact email",required:!0,control:i.control,disabled:!0})]})}x4.loader=async({params:e})=>{const{project:t,image:n}=v8(e);return await ae.prefetchQuery("imageView",{path:{image:n},query:{project:t}}),null};function x4(){const{project:e,image:t}=BK(),{data:n}=Pe("imageView",{path:{image:t},query:{project:e}}),r=B.projectImages({project:e});return s.jsx(XF,{image:n,dismissLink:r,type:"Project"})}b4.loader=async({params:e})=>{const{image:t}=p8(e);return await ae.prefetchQuery("imageView",{path:{image:t}}),null};function b4(){const{image:e}=HK(),{data:t}=Pe("imageView",{path:{image:e}});return s.jsx(XF,{image:t,dismissLink:B.siloImages(),type:"Silo"})}function XF({image:e,dismissLink:t,type:n}){const r=Fe(),o=Ge({defaultValues:e}),i=n==="Project"?"project image":"silo image";return s.jsxs(ht,{title:rr(i),form:o,formType:"edit",resourceName:i,onDismiss:()=>r(t),subtitle:s.jsxs(R8,{children:[s.jsx(Rl,{})," ",e.name]}),submitError:null,children:[s.jsxs(je,{children:[s.jsx(je.Row,{label:"Shared with",children:n}),s.jsx(je.Row,{label:"ID",children:s.jsx(Ps,{text:e.id,maxLength:32,hasCopyButton:!0})}),s.jsxs(je.Row,{label:"Size",children:[s.jsx("span",{children:Sr(e.size)}),s.jsx("span",{className:"ml-1 inline-block text-quaternary",children:"GiB"})]}),s.jsx(je.Row,{label:"Created",children:s.jsx(mi,{date:e.timeCreated})}),s.jsx(je.Row,{label:"Updated",children:s.jsx(mi,{date:e.timeModified})})]}),s.jsx(Et,{name:"name",control:o.control,disabled:!0}),s.jsx(At,{name:"description",control:o.control,required:!0,disabled:!0}),s.jsx(ot,{name:"os",label:"OS",control:o.control,required:!0,disabled:!0}),s.jsx(ot,{name:"version",control:o.control,required:!0,disabled:!0})]})}const cie={name:"",description:"",os:"",version:""};w4.loader=async({params:e})=>{const{project:t,snapshot:n}=y8(e);return await ae.prefetchQuery("snapshotView",{path:{snapshot:n},query:{project:t}}),null};function w4(){const{snapshot:e,project:t}=zK(),{data:n}=Pe("snapshotView",{path:{snapshot:e},query:{project:t}}),r=Fe(),o=ke(),i=()=>r(B.snapshots({project:t})),a=fe("imageCreate",{onSuccess(){o.invalidateQueries("imageList"),De({content:"Your image has been created"}),i()}}),l=Ge({defaultValues:{...cie,name:n.name}});return s.jsxs(ht,{form:l,formType:"create",resourceName:"image",title:"Create image from snapshot",submitLabel:"Create image",onDismiss:i,onSubmit:u=>a.mutate({query:{project:t},body:{...u,source:{type:"snapshot",id:n.id}}}),submitError:a.error,children:[s.jsxs(je,{children:[s.jsx(je.Row,{label:"Snapshot",children:n.name}),s.jsx(je.Row,{label:"Project",children:t}),s.jsx(je.Row,{label:"Size",children:Cs(n.size,{base:2})})]}),s.jsx(Et,{name:"name",control:l.control,required:!0}),s.jsx(At,{name:"description",control:l.control,required:!0}),s.jsx(ot,{name:"os",label:"OS",control:l.control,required:!0}),s.jsx(ot,{name:"version",control:l.control,required:!0})]})}async function die(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:o}={}){return new Promise((i,a)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(n)&&n>=1||n===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);const l=[],u=[],c=new Map;let d=!1,f=!1,h=!1,p=0,g=0;const v=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),b=y=>{d=!0,f=!0,a(y)};o&&(o.aborted&&b(o.reason),o.addEventListener("abort",()=>{b(o.reason)}));const x=async()=>{if(f)return;const y=await v.next(),w=g;if(g++,y.done){if(h=!0,p===0&&!f){if(!r&&u.length>0){b(new AggregateError(u));return}if(f=!0,c.size===0){i(l);return}const S=[];for(const[C,E]of l.entries())c.get(C)!==Q6&&S.push(E);i(S)}return}p++,(async()=>{try{const S=await y.value;if(f)return;const C=await t(S,w);C===Q6&&c.set(w,C),l[w]=C,p--,await x()}catch(S){if(r)b(S);else{u.push(S),p--;try{await x()}catch(C){b(C)}}}})()};(async()=>{for(let y=0;y<n;y++){try{await x()}catch(w){b(w);break}if(h||d)break}})()})}const Q6=Symbol("skip");var JF={};function xo(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var fie=xo;xo.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};xo.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};xo.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0};xo.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};xo.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};xo.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};xo.prototype.start=xo.prototype.try;xo.prototype.errors=function(){return this._errors};xo.prototype.attempts=function(){return this._attempts};xo.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],i=o.message,a=(e[i]||0)+1;e[i]=a,a>=n&&(t=o,n=a)}return t};(function(e){var t=fie;e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var o in n)r[o]=n[o];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],a=0;a<r.retries;a++)i.push(this.createTimeout(a,r));return n&&n.forever&&!i.length&&i.push(this.createTimeout(a,r)),i.sort(function(l,u){return l-u}),i},e.createTimeout=function(n,r){var o=r.randomize?Math.random()+1:1,i=Math.round(o*Math.max(r.minTimeout,1)*Math.pow(r.factor,n));return i=Math.min(i,r.maxTimeout),i},e.wrap=function(n,r,o){if(r instanceof Array&&(o=r,r=null),!o){o=[];for(var i in n)typeof n[i]=="function"&&o.push(i)}for(var a=0;a<o.length;a++){var l=o[a],u=n[l];n[l]=(function(d){var f=e.operation(r),h=Array.prototype.slice.call(arguments,1),p=h.pop();h.push(function(g){f.retry(g)||(g&&(arguments[0]=f.mainError()),p.apply(this,arguments))}),f.attempt(function(){d.apply(n,h)})}).bind(n,u),n[l].options=r}}})(JF);var hie=JF;const mie=pi(hie),pie=Object.prototype.toString,gie=e=>pie.call(e)==="[object Error]",vie=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed"]);function yie(e){return e&&gie(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:vie.has(e.message):!1}class xie extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const Z6=(e,t,n)=>{const r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function bie(e,t){return new Promise((n,r)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const o=mie.operation(t),i=()=>{var l;o.stop(),r((l=t.signal)==null?void 0:l.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",i,{once:!0});const a=()=>{var l;(l=t.signal)==null||l.removeEventListener("abort",i),o.stop()};o.attempt(async l=>{try{const u=await e(l);a(),n(u)}catch(u){try{if(!(u instanceof Error))throw new TypeError(`Non-error was thrown: "${u}". You should only throw errors.`);if(u instanceof xie)throw u.originalError;if(u instanceof TypeError&&!yie(u))throw u;if(Z6(u,l,t),await t.shouldRetry(u)||(o.stop(),r(u)),await t.onFailedAttempt(u),!o.retry(u))throw o.mainError()}catch(c){Z6(c,l,t),a(),r(c)}}})})}const wie=e=>"aria-labelledby"in e?{"aria-labelled-by":e["aria-labelledby"]}:{"aria-label":e["aria-label"]},$ie=e=>s.jsx("div",{role:"progressbar",className:ne("h-1 rounded-[1px] bg-accent-secondary",e.className),"aria-valuenow":Math.round(e.value),...wie(e),children:s.jsx("div",{className:"h-1 rounded-[1px] bg-accent",style:{width:`${e.value}%`,transition:e.transitionTime!==void 0?`width ${e.transitionTime}ms`:void 0}})});function Sie(e){const t=new AbortController;for(const n of e)if(n){if(n.aborted)return t.abort(n.reason),t.signal;n.addEventListener("abort",()=>t.abort(n.reason),{once:!0,signal:t.signal})}return t.signal}const Y6=e=>Cs(e,{base:2,pad:!0}),Eie={imageName:"",imageDescription:"",os:"",version:"",blockSize:512,imageFile:null},X6={isPending:!1,isSuccess:!1,isError:!1};function ya({children:e,state:t,label:n,className:r}){const[o,i]=t.isSuccess?["complete",s.jsx(Vo,{className:"text-accent"})]:t.isPending?["running",s.jsx(Hl,{})]:t.isError?["error",s.jsx(hs,{className:"text-error"})]:["ready",s.jsx(bW,{className:"text-disabled"})];return s.jsxs("div",{className:ne("items-top flex gap-2 px-4 py-3",r),"data-status":o,children:[s.jsx("div",{className:"pt-px",children:i}),s.jsxs("div",{className:ne("w-full space-y-2",t.isError?"text-error":"text-default"),children:[s.jsx("div",{children:n}),e]})]})}const Cie=e=>/^A*=*$/.test(e),eM=()=>Math.floor(Math.random()*1e8);function Die(e){return`tmp-for-image-${eM()}`}const C1=new Error("Upload canceled"),D1=512*WP;function jie(){const e=Fe(),t=ke(),{project:n}=ut(),[r,o]=m.useState(null),[i,a]=m.useState(!1),[l,u]=m.useState(null),[c,d]=m.useState(0),f=()=>e(B.projectImages({project:n})),h=m.useRef(null),[p,g]=m.useState(!1),v=fe("diskCreate"),b=fe("diskBulkWriteImportStart"),x=fe("diskBulkWriteImport"),[y,w]=m.useState(X6),S=fe("diskBulkWriteImportStop"),C=fe("diskFinalizeImport"),E=fe("imageCreate"),D=fe("diskDelete"),$=fe("snapshotDelete"),T=[v,b,x,S,C,E,D,$],A=fe("diskBulkWriteImportStop"),P=fe("diskFinalizeImport"),k=fe("diskDelete"),N=fe("snapshotDelete"),j=[A,P,k,N],I=[...T,y,...j].some(J=>J.isPending),R=m.useRef(null),M=m.useRef(null);function O(){if(p){f();return}(l||confirm("Are you sure? Closing the modal will cancel the upload."))&&(q(),ce(),H(),a(!1))}function q(){var J;(J=h.current)==null||J.abort(C1)}function H(){u(null),d(0),T.forEach(J=>J.reset()),w(X6)}const G=m.useRef(!1);async function ce(){if(!G.current){if(G.current=!0,R.current&&(await N.mutateAsync({path:{snapshot:R.current.id}}),R.current=null),M.current){const J={disk:M.current.id},ve=(await t.fetchQuery("diskView",{path:J})).state.state;ve==="importing_from_bulk_writes"&&(await A.mutateAsync({path:J}),await P.mutateAsync({path:J,body:{}})),ve==="import_ready"&&await P.mutateAsync({path:J,body:{}}),await k.mutateAsync({path:{disk:M.current.id}}),M.current=null}G.current=!1}}async function Z({imageName:J,imageDescription:oe,imageFile:ve,blockSize:Me,os:un,version:cr}){var de,se,be,Le,rt,Nt,Xt;vo(ve,"imageFile must exist"),H(),a(!0);const Tr=Die();M.current=await v.mutateAsync({query:{project:n},body:{name:Tr,description:`temporary disk for importing image ${J}`,diskSource:{type:"importing_blocks",blockSize:Me},size:Math.ceil(ve.size/jr)*jr}}),(de=h.current)==null||de.signal.throwIfAborted();const yn={disk:M.current.id};await b.mutateAsync({path:yn}),(se=h.current)==null||se.signal.throwIfAborted(),w({isPending:!0,isSuccess:!1,isError:!1});const bi=Math.ceil(ve.size/D1);let L=0;const W=async Dt=>{var dr;const Ir=Dt*D1,kt=Math.min(Ir+D1,ve.size),qo=await mf(ve.slice(Ir,kt));Cie(qo)||await x.mutateAsync({path:yn,body:{offset:Ir,base64EncodedData:qo},signal:Sie([AbortSignal.timeout(3e4),(dr=h.current)==null?void 0:dr.signal])}).catch(()=>{throw Error(`Chunk ${Dt} (offset ${Ir}) failed`)}),L++,d(Math.round(100*L/bi))};function*Y(){for(let Dt=0;Dt<bi;Dt++)yield Dt}try{await die(Y(),Dt=>bie(()=>W(Dt),{retries:2}),{concurrency:6,signal:(be=h.current)==null?void 0:be.signal})}catch(Dt){throw Dt!==C1&&w({isPending:!1,isSuccess:!1,isError:!0}),Dt}w({isPending:!1,isSuccess:!0,isError:!1}),await S.mutateAsync({path:yn}),(Le=h.current)==null||Le.signal.throwIfAborted();const he=`tmp-snapshot-${eM()}`;await C.mutateAsync({path:yn,body:{snapshotName:he}}),(rt=h.current)==null||rt.signal.throwIfAborted(),R.current=await t.fetchQuery("snapshotView",{path:{snapshot:he},query:{project:n}}),(Nt=h.current)==null||Nt.signal.throwIfAborted(),await E.mutateAsync({query:{project:n},body:{name:J,description:oe,os:un,version:cr,source:{type:"snapshot",id:R.current.id}}}),(Xt=h.current)==null||Xt.signal.throwIfAborted(),t.invalidateQueries("imageList"),await $.mutateAsync({path:{snapshot:R.current.id}}),await D.mutateAsync({path:{disk:M.current.id}}),g(!0)}const ee=Ge({defaultValues:Eie}),re=ee.watch("imageFile"),Q=ee.watch("blockSize"),{data:ue}=ov({queryKey:["validateImage",...re?[re.name,re.size,re.lastModified]:[]],queryFn:re?()=>Iie(re):rv});return s.jsxs(ht,{form:ee,formType:"create",resourceName:"image",title:"Upload image",onDismiss:f,onSubmit:async J=>{if(h.current=new AbortController,o(null),await t.fetchQuery("imageView",{path:{image:J.imageName},query:{project:n}}).catch(ve=>{if(ve.statusCode===404)return console.log("/v1/images 404 is expected. It means the image name is not taken."),null;throw ve})){o({errorCode:"ObjectAlreadyExists",message:"Image name already exists"});return}try{await Z(J)}catch(ve){ve!==C1&&u("Something went wrong. Please try again."),q(),await ce()}},loading:I,submitError:r,submitLabel:p?"Done":"Upload image",children:[s.jsx(Bt,{variant:"info",content:s.jsxs(s.Fragment,{children:["Read the"," ",s.jsx("a",{target:"_blank",rel:"noreferrer",href:Ft.imagesDocs,children:"Images"})," ","guide to learn more about image requirements."]})}),s.jsx(Et,{name:"imageName",label:"Name",control:ee.control}),s.jsx(At,{name:"imageDescription",label:"Description",control:ee.control}),s.jsx(ot,{name:"os",label:"OS",control:ee.control,required:!0}),s.jsx(ot,{name:"version",control:ee.control,required:!0}),s.jsxs("div",{className:"flex w-full flex-col flex-wrap space-y-4",children:[s.jsx(sh,{name:"blockSize",label:"Block size",units:"Bytes",control:ee.control,parseValue:J=>parseInt(J,10),items:[{label:"512",value:512},{label:"2048",value:2048},{label:"4096",value:4096}]}),ue&&s.jsx(Pie,{...ue,blockSize:Q})]}),s.jsxs("div",{className:"flex w-full flex-col flex-wrap space-y-4",children:[s.jsx(Fl,{id:"image-file-input",name:"imageFile",label:"Image file",required:!0,control:ee.control}),ue&&s.jsx(Rie,{...ue})]}),re&&i&&s.jsxs($e,{isOpen:!0,onDismiss:O,title:"Image upload progress",children:[s.jsx($e.Body,{className:"!p-0",children:s.jsx($e.Section,{className:"!p-0",children:s.jsxs("div",{className:"children:border-b children:border-b-secondary last:children:border-b-0",children:[l&&s.jsx(Bt,{variant:"error",title:"Error",content:l,className:"!rounded-none !shadow-none"}),s.jsx(ya,{state:v,label:"Create temporary disk"}),s.jsx(ya,{state:b,label:"Put disk in import mode"}),s.jsx(ya,{state:y,label:"Upload image file",children:s.jsxs("div",{className:"rounded-lg border bg-default border-default",children:[s.jsx("div",{className:"flex justify-between border-b p-3 pb-2 border-b-secondary",children:s.jsx("div",{className:"text-sans-md text-default",children:re.name})}),s.jsxs("div",{className:"p-3 pt-2",children:[s.jsxs("div",{className:"flex justify-between text-mono-sm",children:[s.jsxs("div",{className:"!normal-case text-secondary",children:[Y6(c/100*re.size)," ",s.jsx("span",{className:"text-quinary",children:"/"})," ",Y6(re.size)]}),s.jsxs("div",{className:"text-accent",children:[c,"%"]})]}),s.jsx($ie,{className:"mt-1.5","aria-label":"Upload progress",value:c})]})]})}),s.jsx(ya,{state:S,label:"Get disk out of import mode"}),s.jsx(ya,{state:C,label:"Finalize disk and create snapshot"}),s.jsx(ya,{state:E,label:"Create image",duration:15}),s.jsx(ya,{state:{isPending:D.isPending||$.isPending,isSuccess:D.isSuccess&&$.isSuccess,isError:D.isError||$.isError},label:"Delete disk and snapshot"}),s.jsx(ya,{state:{isPending:!1,isSuccess:p,isError:!1},label:"Image uploaded successfully",className:p?"transition-colors bg-accent-secondary children:text-accent":"transition-colors"})]})})}),s.jsx($e.Footer,{onDismiss:O,onAction:f,actionText:"Done",cancelText:l||p?"Back":"Cancel",disabled:!p})]})]})}function Pie({blockSize:e,efiPartOffset:t,isBootableCd:n}){const r=t!==-1;if(!r&&!n||r&&e===t||!r&&n&&e===2048)return null;const o=r?`Detected “EFI PART” marker at offset ${t}, but block size is set to ${e}.`:"Bootable CDs typically use a block size of 2048.";return s.jsx(Bt,{variant:"info",title:"Block size might be set incorrectly",content:o})}function Rie({efiPartOffset:e,isBootableCd:t,isCompressed:n}){const r=e!==-1||t;if(r&&!n)return null;const o=s.jsxs("div",{className:"flex flex-col space-y-2",children:[s.jsxs("ul",{className:"ml-4 list-disc",children:[!r&&s.jsxs("li",{children:[s.jsx("div",{children:"Bootable markers not found at any block size."}),s.jsx("div",{children:"Expected either “EFI PART” marker at offsets 512 / 2048 / 4096 or “CD001” at offset 0x8001 (for a bootable CD)."})]}),n&&s.jsxs("li",{children:[s.jsx("div",{children:"This might be a compressed image."}),s.jsx("div",{children:"Only raw, uncompressed images are supported. Files such as qcow2, vmdk, img.gz, iso.7z may not work."})]})]}),s.jsxs("div",{children:["Learn more about"," ",s.jsxs("a",{target:"_blank",rel:"noreferrer",href:Ft.preparingImagesDocs,className:"inline-flex items-center underline",children:["preparing images for import",s.jsx(Ih,{className:"ml-1"})]})]})]});return s.jsx(Bt,{variant:"info",title:"This image might not be bootable",className:"[&>*]:space-y-2",content:o})}async function tM(e,t,n){const r=new FileReader,o=new Promise((i,a)=>{r.onloadend=l=>{var u;if(((u=l.target)==null?void 0:u.readyState)===FileReader.DONE&&l.target.result instanceof ArrayBuffer){i(String.fromCharCode(...new Uint8Array(l.target.result)));return}i(void 0)},r.onerror=l=>{console.error(`Error reading file at offset ${t}:`,l),a(l)}});return r.readAsArrayBuffer(e.slice(t,t+n)),o}async function kie(e){const t=[512,2048,4096];for(const n of t)if(await tM(e,n,8)==="EFI PART")return n;return-1}const Tie=[".gz",".7z",".qcow2",".vmdk"],Iie=async e=>{const t=e.name.toLowerCase();return{efiPartOffset:await kie(e),isBootableCd:await tM(e,32769,5)==="CD001",isCompressed:Tie.some(n=>t.endsWith(n))}},Aie=({href:e,linkText:t})=>s.jsx("a",{href:e,className:"group block px-4 children:last:border-0",target:"_blank",rel:"noreferrer",children:s.jsx("div",{className:"mx-2 border-b py-1.5 border-secondary",children:s.jsxs("div",{className:"relative -ml-2 inline-block rounded py-1 pl-2 pr-7 text-sans-md !text-default group-hover:bg-tertiary",children:[s.jsx("span",{className:"inline-block max-w-[300px] truncate align-middle",children:t}),s.jsx(Ih,{className:"absolute top-1.5 ml-2 translate-y-[1px] text-tertiary"})]})})}),En=({heading:e,icon:t,summary:n,links:r})=>s.jsxs(One,{children:[s.jsx(SF,{className:ne(Ql({size:"sm",variant:"ghost"}),"w-9"),children:s.jsx(mk,{"aria-label":"Links to docs",className:"shrink-0"})}),s.jsxs(EF,{className:"DocsPopoverPanel z-10 w-96 rounded-lg border bg-raise border-secondary elevation-1",anchor:{to:"bottom end",gap:12},children:[s.jsxs("div",{className:"px-4",children:[s.jsxs("h2",{className:"mt-4 flex items-center gap-1 text-sans-md",children:[s.jsx("div",{className:"mr-1 flex items-center text-accent-secondary",children:t}),"Learn about ",e]}),s.jsx("p",{className:"mb-3 mt-2 text-sans-md text-secondary",children:n})]}),s.jsxs("div",{className:"border-t pb-1 border-secondary",children:[s.jsx("h3",{className:"mb-1 mt-3 px-4 text-mono-sm text-quaternary",children:"Guides"}),r.map(o=>s.jsx(Aie,{...o},o.href))]})]})]}),Nie=({description:e,items:t,selected:n,label:r,placeholder:o,tooltipText:i,required:a,hasError:l,isDisabled:u,isLoading:c,onChange:d})=>{const[f,h]=m.useState(n||""),p=f.toLowerCase(),g=x2(t,p,{keys:["value"],sorter:b=>b}),v=$2();return s.jsx(s.Fragment,{children:s.jsxs(Ute,{value:n,onChange:b=>d(b||""),onClose:()=>h(""),defaultValue:n,disabled:u||c,children:[r&&s.jsxs("div",{className:"mb-2",children:[s.jsx(bo,{id:"FieldLabel",as:"div",tip:i,optional:!a,children:s.jsx(f0,{children:r})}),e&&s.jsx(yi,{id:"TextInputHint",children:e})]}),s.jsxs(mF,{className:ne("flex h-10 w-full grow items-center justify-between rounded border text-sans-md ring-accent-secondary data-[open]:ring-2",l?"focus-error border-error-secondary hover:border-error":"border-default hover:border-hover",l&&"data-[open]:ring-error-secondary",u?"cursor-not-allowed text-disabled bg-disabled !border-default":"bg-default",u&&l&&"!border-error-secondary"),children:[s.jsx(pF,{"aria-label":"Select a disk",displayValue:()=>n||f,onChange:b=>h(b.target.value),placeholder:o,disabled:u||c,className:ne("w-full rounded !border-none px-3 py-[0.5rem] !outline-none text-sans-md text-default placeholder:text-quaternary",u?"cursor-not-allowed text-disabled bg-disabled !border-default":"bg-default",l&&"focus-error")}),s.jsx("div",{className:"flex items-center border-l px-3 border-secondary","aria-hidden":!0,children:s.jsx(Zw,{title:"Select",className:"w-2 text-tertiary"})})]}),s.jsxs(gF,{anchor:"bottom start",className:`ox-menu pointer-events-auto ${v} relative w-[var(--button-width)] overflow-y-auto border !outline-none border-secondary [--anchor-gap:14px] empty:hidden`,modal:!1,children:[g.length===0&&s.jsx(d4,{disabled:!0,value:"no-matches",className:"relative",children:s.jsx("div",{className:"ox-menu-item !text-disabled",children:"No items match"})}),g.map(b=>s.jsx(d4,{value:b.label,className:"relative border-b border-secondary last:border-0",onSelect:()=>{d(b.label),h(b.label)},children:({focus:x,selected:y})=>s.jsx("div",{className:ne("ox-menu-item",{"is-selected":y,"is-highlighted":x}),children:b.label})},b.label))]})]})})};function Jc({control:e,name:t,label:n=rr(t),required:r,onChange:o,disabled:i,...a}){const{field:l,fieldState:u}=on({name:t,control:e,rules:{required:r}});return s.jsxs("div",{className:"max-w-lg",children:[s.jsx(Nie,{isDisabled:i,label:n,required:r,selected:l.value||null,hasError:u.error!==void 0,onChange:c=>{l.onChange(c),o==null||o(c)},...a}),s.jsx(Kc,{error:u.error,label:n})]})}const Fie={name:""};function nM({onSubmit:e,onDismiss:t,diskNamesToExclude:n=[],loading:r,submitError:o=null}){const{project:i}=ut(),{data:a}=Ze("diskList",{query:{project:i,limit:1e3}}),l=(a==null?void 0:a.items.filter(c=>c.state.state==="detached"&&!n.includes(c.name)))||[],u=Ge({defaultValues:Fie});return s.jsx(ht,{form:u,formType:"create",resourceName:"disk",title:"Attach disk",onSubmit:e,loading:r,submitError:o,onDismiss:t,children:s.jsx(Jc,{label:"Disk name",placeholder:"Select a disk",name:"name",items:l.map(({name:c})=>({value:c,label:c})),required:!0,control:u.control})})}function Mie({control:e,disabled:t}){const[n,r]=m.useState(!1),[o,i]=m.useState(!1),{field:{value:a,onChange:l}}=on({control:e,name:"disks"});return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"max-w-lg",children:[s.jsx(bo,{id:"new-disks-label"}),!!a.length&&s.jsxs(fl,{className:"mb-4",children:[s.jsxs(hl,{children:[s.jsx(tn,{children:"Name"}),s.jsx(tn,{children:"Type"}),s.jsx(tn,{children:"Size"}),s.jsx(tn,{className:"w-12"})]}),s.jsx(ml,{children:a.map((u,c)=>s.jsxs(pl,{tabIndex:0,"aria-rowindex":c+1,"aria-label":`Name: ${u.name}, Type: ${u.type}`,children:[s.jsx(er,{children:u.name}),s.jsx(er,{children:s.jsx(tt,{variant:"solid",children:u.type})}),s.jsx(er,{children:u.type==="attach"?"-":s.jsxs(s.Fragment,{children:[s.jsx("span",{children:Sr(u.size)}),s.jsx("span",{className:"ml-1 inline-block text-accent-secondary",children:"GiB"})]})}),s.jsx(gl,{onClick:()=>l(a.filter(d=>d.name!==u.name)),label:`remove disk ${u.name}`})]},u.name))})]}),s.jsxs("div",{className:"space-x-3",children:[s.jsx(Je,{size:"sm",onClick:()=>r(!0),disabled:t,children:"Create new disk"}),s.jsx(Je,{variant:"ghost",size:"sm",onClick:()=>i(!0),disabled:t,children:"Attach existing disk"})]})]}),n&&s.jsx(b$,{onSubmit:u=>{l([...a,{type:"create",...u}]),r(!1)},onDismiss:()=>r(!1)}),o&&s.jsx(nM,{onDismiss:()=>i(!1),onSubmit:u=>{l([...a,{type:"attach",...u}]),i(!1)},diskNamesToExclude:a.filter(u=>u.type==="attach").map(u=>u.name)})]})}function Oie({vpcNameField:e,control:t,...n}){var l;const r=ut(),[o]=Os({control:t,name:[e]}),i=o.length>0,a=((l=Ze("vpcSubnetList",{query:{...r,vpc:o}},{enabled:i,throwOnError:!1}).data)==null?void 0:l.items)||[];return s.jsx(Pn,{...n,items:a.map(({name:u})=>({value:u,label:u})),disabled:!i,control:t,placeholder:"Select a subnet",noItemsPlaceholder:o?"No subnets found":"Select a VPC to see subnets"})}const _ie={name:"",description:"",ip:void 0,subnetName:"",vpcName:""};function rM({onSubmit:e,onDismiss:t,loading:n,submitError:r=null}){const o=ut(),{data:i}=Ze("vpcList",{query:o}),a=m.useMemo(()=>(i==null?void 0:i.items)||[],[i]),l=Ge({defaultValues:_ie});return s.jsxs(ht,{form:l,formType:"create",resourceName:"network interface",title:"Add network interface",onDismiss:t,onSubmit:e,loading:n,submitError:r,children:[s.jsx(Et,{name:"name",control:l.control}),s.jsx(At,{name:"description",control:l.control}),s.jsx(wr,{}),s.jsx(Pn,{name:"vpcName",label:"VPC",items:a.map(({name:u})=>({label:u,value:u})),required:!0,control:l.control,placeholder:"Select a VPC"}),s.jsx(Oie,{name:"subnetName",label:"Subnet",vpcNameField:"vpcName",required:!0,control:l.control}),s.jsx(ot,{name:"ip",label:"IP Address",control:l.control,transform:u=>u.trim()===""?void 0:u})]})}function Lie({control:e,disabled:t}){const[n,r]=m.useState(!1),[o,i]=m.useState([]),{field:{value:a,onChange:l}}=on({control:e,name:"networkInterfaces"});return s.jsxs("div",{className:"max-w-lg space-y-2",children:[s.jsx(bo,{id:"network-interface-type-label",children:"Network interface"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs(Kh,{"aria-labelledby":"network-interface-type-label",name:"networkInterfaceType",column:!0,className:"pt-1",defaultChecked:a.type,onChange:u=>{const c=u.target.value;a.type==="create"&&i(a.params),l(c==="create"?{type:c,params:o}:{type:c})},disabled:t,children:[s.jsx(Wi,{value:"none",children:"None"}),s.jsx(Wi,{value:"default",children:"Default"}),s.jsx(Wi,{value:"create",children:"Custom"})]}),a.type==="create"&&s.jsxs(s.Fragment,{children:[a.params.length>0&&s.jsxs(fl,{className:"pt-2",children:[s.jsxs(hl,{children:[s.jsx(tn,{children:"Name"}),s.jsx(tn,{children:"VPC"}),s.jsx(tn,{children:"Subnet"}),s.jsx(tn,{className:"w-12"})]}),s.jsx(ml,{children:a.params.map((u,c)=>s.jsxs(pl,{tabIndex:0,"aria-rowindex":c+1,"aria-label":`Name: ${u.name}, Vpc: ${u.vpcName}, Subnet: ${u.subnetName}`,children:[s.jsx(er,{children:u.name}),s.jsx(er,{children:u.vpcName}),s.jsx(er,{children:u.subnetName}),s.jsx(gl,{onClick:()=>l({type:"create",params:a.params.filter(d=>d.name!==u.name)}),label:`remove network interface ${u.name}`})]},u.name))})]}),n&&s.jsx(rM,{onSubmit:u=>{l({type:"create",params:[...a.params,u]}),r(!1)},onDismiss:()=>r(!1)}),s.jsx("div",{className:"space-x-3",children:s.jsx(Je,{size:"sm",onClick:()=>r(!0),children:"Add network interface"})})]})]})]})}const Vie={name:"",description:"",publicKey:""};function oM({onDismiss:e,message:t}){const n=ke(),r=Fe(),o=e||(()=>r(B.sshKeys())),i=fe("currentUserSshKeyCreate",{onSuccess(){n.invalidateQueries("currentUserSshKeyList"),o(),De({content:"Your SSH key has been created"})}}),a=Ge({defaultValues:Vie});return s.jsxs(ht,{form:a,formType:"create",resourceName:"SSH key",title:"Add SSH key",onDismiss:o,onSubmit:l=>i.mutate({body:l}),loading:i.isPending,submitError:i.error,children:[s.jsx(Et,{name:"name",control:a.control}),s.jsx(At,{name:"description",control:a.control}),s.jsx(ot,{as:"textarea",name:"publicKey",label:"Public key",required:!0,rows:8,control:a.control}),t]})}const J6={variant:"ghost",size:"sm",color:"secondary"};function nt(e){let t=null;return e.buttonText&&"buttonTo"in e?t=s.jsx(Rr,{className:ne("mt-6",Ql(J6)),to:e.buttonTo,children:e.buttonText}):e.buttonText&&"onClick"in e&&(t=s.jsx(Je,{...J6,className:"mt-6",onClick:e.onClick,children:e.buttonText})),s.jsxs("div",{className:"m-4 flex max-w-[14rem] flex-col items-center text-center",children:[e.icon&&s.jsx("div",{className:"mb-4 rounded p-1 leading-[0] text-accent bg-accent-secondary",children:e.icon}),s.jsx("h3",{className:"text-sans-semi-lg",children:e.title}),e.body&&s.jsx("p",{className:"mt-1 text-balance text-sans-md text-secondary",children:e.body}),t]})}const e7=100,Bie=()=>s.jsx(Bt,{variant:"notice",className:"mt-4",content:s.jsxs(s.Fragment,{children:["If your image supports the cidata volume and"," ",s.jsx("a",{target:"_blank",href:"https://cloudinit.readthedocs.io/en/latest/",rel:"noreferrer",children:"cloud-init"}),", the keys above will be added to your instance. Keys are added when the instance is created and are not updated after instance launch."]})});function zie({control:e,isSubmitting:t}){var u;const n=((u=Pe("currentUserSshKeyList",{}).data)==null?void 0:u.items)||[],[r,o]=m.useState(!1),{field:{value:i,onChange:a},fieldState:{error:l}}=on({control:e,name:"sshPublicKeys",rules:{validate(c){if(c.length>e7)return`An instance supports a maximum of ${e7} SSH keys`}}});return s.jsxs("div",{className:"max-w-lg",children:[s.jsxs("div",{className:"mb-2",children:[s.jsx(bo,{id:"ssh-keys-label",children:"SSH keys"}),s.jsx(yi,{id:"ssh-keys-help-text",children:"SSH keys can be added and removed in your user settings"})]}),n.length>0?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"flex flex-col space-y-2",children:n.map(c=>s.jsx(Li,{name:"sshPublicKeys",control:e,value:c.id,disabled:t,children:c.name},c.id))}),s.jsx(Kc,{error:l,label:"SSH keys"}),s.jsx(Xc,{}),s.jsx(w$,{checked:i.length===n.length,indeterminate:i.length>0&&i.length<n.length,onChange:()=>a(i.length<n.length?n.map(c=>c.id):[]),disabled:t,children:s.jsx("span",{className:"select-none",children:"Select all"})}),s.jsx("div",{className:"space-x-3",children:s.jsx(Je,{variant:"ghost",size:"sm",onClick:()=>o(!0),disabled:t,children:"Add SSH Key"})})]}),s.jsx(Bie,{})]}):s.jsx("div",{className:"mt-4 flex max-w-lg items-center justify-center rounded-lg border p-6 border-default",children:s.jsx(nt,{icon:s.jsx(Ww,{}),title:"No SSH keys",body:"Add a key to see it here",buttonText:"Add SSH Key",onClick:()=>o(!0)})}),r&&s.jsx(oM,{onDismiss:()=>o(!1),message:s.jsx(Bt,{variant:"info",content:"SSH keys added here are permanently associated with your profile, and will be available for future use"})})]})}const oo={Actions:({children:e,formId:t,submitDisabled:n,error:r,className:o,loading:i})=>{const a=k$(e);vo(T$(a,[oo.Submit,oo.Cancel,Je]),"Form.Actions should only receive Button components as children");const l=YF(a,oo.Submit);return vo(l,"Form.Actions must contain a Form.Submit component"),s.jsxs("div",{className:ne("flex w-full items-center gap-[0.625rem] children:shrink-0",o),children:[m.cloneElement(l,{form:t,disabled:!!n,disabledReason:n,loading:i}),a,r&&s.jsxs("div",{className:"flex !shrink grow items-start justify-end text-mono-sm text-error",children:[s.jsx(hs,{className:"mx-2 mt-0.5 shrink-0"}),s.jsx("span",{children:r.message})]})]})},Submit:e=>s.jsx(Je,{type:"submit",size:"sm",...e}),Cancel:e=>s.jsx(Je,{variant:"ghost",size:"sm",...e,children:"Cancel"}),Heading:St.h2`text-content text-sans-2xl`};function Uie(e){let t;const n=new Set,r=(c,d)=>{const f=typeof c=="function"?c(t):c;if(f!==t){const h=t;t=d?f:Object.assign({},t,f),n.forEach(p=>p(t,h))}},o=()=>t,i=(c,d=o,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let h=d(t);function p(){const g=d(t);if(!f(h,g)){const v=h;c(h=g,v)}}return n.add(p),()=>n.delete(p)},u={setState:r,getState:o,subscribe:(c,d,f)=>d||f?i(c,d,f):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return t=e(r,o,u),u}const qie=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),t7=qie?m.useEffect:m.useLayoutEffect;function Hie(e){const t=typeof e=="function"?Uie(e):e,n=(r=t.getState,o=Object.is)=>{const[,i]=m.useReducer(b=>b+1,0),a=t.getState(),l=m.useRef(a),u=m.useRef(r),c=m.useRef(o),d=m.useRef(!1),f=m.useRef();f.current===void 0&&(f.current=r(a));let h,p=!1;(l.current!==a||u.current!==r||c.current!==o||d.current)&&(h=r(a),p=!o(f.current,h)),t7(()=>{p&&(f.current=h),l.current=a,u.current=r,c.current=o,d.current=!1});const g=m.useRef(a);t7(()=>{const b=()=>{try{const y=t.getState(),w=u.current(y);c.current(f.current,w)||(l.current=y,f.current=w,i())}catch{d.current=!0,i()}},x=t.subscribe(b);return t.getState()!==g.current&&b(),x},[]);const v=p?h:f.current;return m.useDebugValue(v),v};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,t];return{next(){const o=r.length<=0;return{value:r.shift(),done:o}}}},n}const j1=Hie(e=>({tunnels:{},setTunnel:(t,n)=>{e(r=>{const o={current:[],version:0,...r.tunnels[t]};return{tunnels:{...r.tunnels,[t]:{...o,...n(o)}}}})}}));function iM(e){return{In:({children:t})=>{const n=j1(o=>o.setTunnel),r=j1(o=>{var i,a;return(i=(a=o.tunnels[e])==null?void 0:a.version)!=null?i:0});return m.useLayoutEffect(()=>{n(e,o=>({version:o.version+1}))},[]),m.useLayoutEffect(()=>(n(e,({current:o})=>({current:[...o,t]})),()=>n(e,({current:o})=>({current:o.filter(i=>i!==t)}))),[t,r]),null},Out:()=>{const t=j1(n=>{var r,o;return(r=(o=n.tunnels[e])==null?void 0:o.current)!=null?r:[]});return U.createElement(U.Fragment,null,t)}}}const aM=iM("page-actions"),Wie=aM.In,Gie=aM.Out,Kie=St.div`flex h-20 items-center gutter`;function Qie({id:e,children:t,submitDisabled:n,error:r,loading:o,form:i,onSubmit:a,submitError:l}){const{isSubmitting:u,isDirty:c,isSubmitSuccessful:d}=i.formState,f=TB(c&&!d);m.useEffect(()=>{f.state==="blocked"&&d&&f.proceed()},[f,d]);const h=k$(t),p=YF(h,oo.Actions);return s.jsxs(s.Fragment,{children:[s.jsx("form",{className:"ox-form pb-20",id:e,onSubmit:async g=>{g.stopPropagation(),await i.handleSubmit(a)(g)},autoComplete:"off",children:h}),!d&&s.jsx(Zie,{blocker:f}),p&&s.jsx(Wie,{children:s.jsx(Kie,{children:m.cloneElement(p,{formId:e,submitDisabled:n,loading:o||u,error:r||l})})})]})}const Zie=({blocker:e})=>s.jsxs($e,{isOpen:e.state==="blocked",onDismiss:()=>{var t;return(t=e.reset)==null?void 0:t.call(e)},title:"Confirm navigation",children:[s.jsxs($e.Section,{children:["Are you sure you want to leave this page? ",s.jsx("br",{})," You will lose all progress on this form."]}),s.jsx($e.Footer,{onDismiss:()=>{var t;return(t=e.reset)==null?void 0:t.call(e)},onAction:()=>{var t;return(t=e.proceed)==null?void 0:t.call(e)},cancelText:"Continue editing",actionText:"Leave this page",actionType:"danger"})]}),rn=St.span`text-sans-semi-md text-default`,qt=St.header`mb-16 mt-12 flex items-center justify-between`,Ht=({children:e,icon:t})=>s.jsxs("h1",{className:"inline-flex items-center space-x-2 text-sans-3xl text-accent-secondary",children:[t,s.jsx("span",{className:"text-accent",children:e})]}),P1="rovingFocusGroup.onEntryFocus",Yie={bubbles:!1,cancelable:!0},I$="RovingFocusGroup",[$4,sM,Xie]=$$(I$),[Jie,C0]=ia(I$,[Xie]),[eae,tae]=Jie(I$),nae=m.forwardRef((e,t)=>m.createElement($4.Provider,{scope:e.__scopeRovingFocusGroup},m.createElement($4.Slot,{scope:e.__scopeRovingFocusGroup},m.createElement(rae,Re({},e,{ref:t}))))),rae=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,...d}=e,f=m.useRef(null),h=zn(t,f),p=$0(i),[g=null,v]=zl({prop:a,defaultProp:l,onChange:u}),[b,x]=m.useState(!1),y=si(c),w=sM(n),S=m.useRef(!1),[C,E]=m.useState(0);return m.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(P1,y),()=>D.removeEventListener(P1,y)},[y]),m.createElement(eae,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:g,onItemFocus:m.useCallback(D=>v(D),[v]),onItemShiftTab:m.useCallback(()=>x(!0),[]),onFocusableItemAdd:m.useCallback(()=>E(D=>D+1),[]),onFocusableItemRemove:m.useCallback(()=>E(D=>D-1),[])},m.createElement(gn.div,Re({tabIndex:b||C===0?-1:0,"data-orientation":r},d,{ref:h,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{S.current=!0}),onFocus:Ye(e.onFocus,D=>{const $=!S.current;if(D.target===D.currentTarget&&$&&!b){const T=new CustomEvent(P1,Yie);if(D.currentTarget.dispatchEvent(T),!T.defaultPrevented){const A=w().filter(F=>F.focusable),P=A.find(F=>F.active),k=A.find(F=>F.id===g),j=[P,k,...A].filter(Boolean).map(F=>F.ref.current);lM(j)}}S.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})))}),oae="RovingFocusGroupItem",iae=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=Ui(),u=i||l,c=tae(oae,n),d=c.currentTabStopId===u,f=sM(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return m.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),m.createElement($4.ItemSlot,{scope:n,id:u,focusable:r,active:o},m.createElement(gn.span,Re({tabIndex:d?0:-1,"data-orientation":c.orientation},a,{ref:t,onMouseDown:Ye(e.onMouseDown,g=>{r?c.onItemFocus(u):g.preventDefault()}),onFocus:Ye(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Ye(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){c.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=lae(g,c.orientation,c.dir);if(v!==void 0){g.preventDefault();let x=f().filter(y=>y.focusable).map(y=>y.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const y=x.indexOf(g.currentTarget);x=c.loop?uae(x,y+1):x.slice(y+1)}setTimeout(()=>lM(x))}})})))}),aae={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sae(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function lae(e,t,n){const r=sae(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return aae[r]}function lM(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uae(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const uM=nae,cM=iae,dM="Tabs",[cae,dfe]=ia(dM,[C0]),fM=C0(),[dae,A$]=cae(dM),fae=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:l,activationMode:u="automatic",...c}=e,d=$0(l),[f,h]=zl({prop:r,onChange:o,defaultProp:i});return m.createElement(dae,{scope:n,baseId:Ui(),value:f,onValueChange:h,orientation:a,dir:d,activationMode:u},m.createElement(gn.div,Re({dir:d,"data-orientation":a},c,{ref:t})))}),hae="TabsList",mae=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=A$(hae,n),a=fM(n);return m.createElement(uM,Re({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),m.createElement(gn.div,Re({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),pae="TabsTrigger",gae=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=A$(pae,n),l=fM(n),u=hM(a.baseId,r),c=mM(a.baseId,r),d=r===a.value;return m.createElement(cM,Re({asChild:!0},l,{focusable:!o,active:d}),m.createElement(gn.button,Re({type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},i,{ref:t,onMouseDown:Ye(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Ye(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!o&&f&&a.onValueChange(r)})})))}),vae="TabsContent",yae=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,l=A$(vae,n),u=hM(l.baseId,r),c=mM(l.baseId,r),d=r===l.value,f=m.useRef(d);return m.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),m.createElement(Ul,{present:o||d},({present:h})=>m.createElement(gn.div,Re({"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:c,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0}}),h&&i))});function hM(e,t){return`${e}-trigger-${t}`}function mM(e,t){return`${e}-content-${t}`}const xae=fae,bae=mae,wae=gae,$ae=yae,Qe={Root:({className:e,...t})=>s.jsx(xae,{...t,className:ne("ox-tabs",e)}),Trigger:({children:e,className:t,...n})=>s.jsx(wae,{...n,className:ne("ox-tab",t),children:s.jsx("div",{children:e})}),List:({className:e,...t})=>s.jsx(bae,{...t,className:ne("ox-tabs-list",e)}),Content:({className:e,...t})=>s.jsx($ae,{...t,className:ne("ox-tabs-panel",e)})},Sae=e=>{if(e.bootDiskSourceType==="disk")return{type:"attach",name:e.diskSource};const t=e.bootDiskSourceType==="siloImage"?e.siloImageSource:e.projectImageSource;return{type:"create",name:e.bootDiskName||Sw(e.name,t),description:`Created as a boot disk for ${e.name}`,size:e.bootDiskSize*jr,diskSource:{type:"image",imageId:t}}},Eae={name:"",description:"",presetId:"general-xs",memory:8,ncpus:2,hostname:"",bootDiskName:"",bootDiskSize:10,bootDiskSourceType:"siloImage",siloImageSource:"",projectImageSource:"",diskSource:"",disks:[],networkInterfaces:{type:"default"},sshPublicKeys:[],start:!0,userData:null,externalIps:[{type:"ephemeral"}]},pM=1e3;S4.loader=async({params:e})=>{const{project:t}=Uo(e);return await Promise.all([ae.prefetchQuery("imageList",{query:{project:t}}),ae.prefetchQuery("imageList",{}),ae.prefetchQuery("diskList",{query:{project:t,limit:pM}}),ae.prefetchQuery("currentUserSshKeyList",{}),ae.prefetchQuery("projectIpPoolList",{query:{limit:1e3}}),ae.prefetchQuery("floatingIpList",{query:{project:t,limit:1e3}})]),null};function S4(){const[e,t]=m.useState(!1),n=ke(),{project:r}=ut(),o=Fe(),i=fe("instanceCreate",{onSuccess(j){n.invalidateQueries("instanceList"),n.setQueryData("instanceView",{path:{instance:j.name},query:{project:r}},j),De({content:"Your instance has been created"}),o(B.instance({project:r,instance:j.name}))}}),a=Pe("imageList",{}).data.items,l=Pe("imageList",{query:{project:r}}).data.items,u=[...a,...l],c=u[0],d=Pe("diskList",{query:{project:r,limit:pM}}).data.items,f=m.useMemo(()=>d.filter(Va.attach).map(({name:j})=>({value:j,label:j})),[d]),{data:h}=Pe("currentUserSshKeyList",{}),p=m.useMemo(()=>h.items.map(j=>j.id),[h]),{data:g}=Pe("projectIpPoolList",{query:{limit:1e3}}),v=m.useMemo(()=>{var j;return g?(j=g.items.find(F=>F.isDefault))==null?void 0:j.name:void 0},[g]),b=a.length>0?"siloImage":l.length>0?"projectImage":"disk",x={...Eae,bootDiskSourceType:b,sshPublicKeys:p,bootDiskSize:gb((c==null?void 0:c.size)/jr),externalIps:[{type:"ephemeral",pool:v}]},y=Ge({defaultValues:x}),{control:w,setValue:S}=y,C=Os({control:w,name:"bootDiskSourceType"}),E=Os({control:w,name:"siloImageSource"}),D=Os({control:w,name:"projectImageSource"}),$=Os({control:w,name:"diskSource"}),T=C==="siloImage"?E:C==="projectImage"?D:$,A=Os({control:w,name:"bootDiskSize"}),P=u.find(j=>j.id===T),k=P!=null&&P.size?Math.ceil(P.size/jr):void 0;m.useEffect(()=>{i.error&&t(!1)},[i.error]);const N=s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"!my-12 content-['a']"},"divider"),s.jsx(BN,{label:"Disk size",name:"bootDiskSize",control:w,min:k||1,validate:j=>{if(k&&j<k)return`Must be as large as selected image (min. ${k} GiB)`},disabled:e},"diskSizeField"),s.jsx(Et,{name:"bootDiskName",label:"Disk name",tooltipText:"Will be autogenerated if name not provided",required:!1,control:w,disabled:e},"bootDiskName")]});return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Ph,{}),children:"Create instance"}),s.jsx(En,{heading:"instances",icon:s.jsx(Bv,{}),summary:"Instances are virtual machines that run on the Oxide platform.",links:[lt.instances,lt.instanceActions,lt.quickStart]})]}),s.jsxs(Qie,{submitDisabled:u.length?void 0:"Image required",id:"create-instance-form",form:y,onSubmit:async j=>{t(!0);const F=E4.find(O=>O.id===j.presetId),I=j.presetId==="custom"?{memory:j.memory,ncpus:j.ncpus}:{memory:F.memory,ncpus:F.ncpus},R=Sae(j),M=j.userData?await mf(j.userData):void 0;await i.mutateAsync({query:{project:r},body:{name:j.name,hostname:j.hostname||j.name,description:j.description,memory:I.memory*jr,ncpus:I.ncpus,disks:[R,...j.disks],externalIps:j.externalIps,start:j.start,networkInterfaces:j.networkInterfaces,sshPublicKeys:j.sshPublicKeys,userData:M}})},loading:i.isPending,submitError:i.error,children:[s.jsx(Et,{name:"name",control:w,disabled:e}),s.jsx(At,{name:"description",control:w,disabled:e}),s.jsx(Li,{id:"start-instance",name:"start",control:w,disabled:e,children:"Start Instance"}),s.jsx(wr,{}),s.jsx(oo.Heading,{id:"hardware",children:"Hardware"}),s.jsx(yi,{id:"hw-gp-help-text",className:"mb-12 max-w-xl text-sans-md",children:"Pick a pre-configured machine type that offers balanced vCPU and memory for most workloads or create a custom machine."}),s.jsxs(Qe.Root,{id:"choose-cpu-ram",className:"full-width",defaultValue:"general",onValueChange:j=>{const F=E4.find(I=>I.category===j);F&&S("presetId",F.id)},children:[s.jsxs(Qe.List,{"aria-labelledby":"hardware",children:[s.jsx(Qe.Trigger,{value:"general",disabled:e,children:"General Purpose"}),s.jsx(Qe.Trigger,{value:"highCPU",disabled:e,children:"High CPU"}),s.jsx(Qe.Trigger,{value:"highMemory",disabled:e,children:"High Memory"}),s.jsx(Qe.Trigger,{value:"custom",disabled:e,children:"Custom"})]}),s.jsx(Qe.Content,{value:"general",children:s.jsx(w1,{name:"presetId",label:"",control:w,disabled:e,children:R1("general")})}),s.jsx(Qe.Content,{value:"highCPU",children:s.jsx(w1,{name:"presetId",label:"",control:w,disabled:e,children:R1("highCPU")})}),s.jsx(Qe.Content,{value:"highMemory",children:s.jsx(w1,{name:"presetId",label:"",control:w,disabled:e,children:R1("highMemory")})}),s.jsxs(Qe.Content,{value:"custom",children:[s.jsx(cl,{required:!0,label:"CPUs",name:"ncpus",min:1,max:py,control:w,validate:j=>{if(j<1)return"Must be at least 1 vCPU";if(j>py)return`CPUs capped to ${py}`},disabled:e}),s.jsx(cl,{units:"GiB",required:!0,label:"Memory",name:"memory",min:1,max:gy,control:w,validate:j=>{if(j<1)return"Must be at least 1 GiB";if(j>gy)return`Can be at most ${gy} GiB`},disabled:e})]})]}),s.jsx(wr,{}),s.jsx(oo.Heading,{id:"boot-disk",children:"Boot disk"}),s.jsxs(Qe.Root,{id:"boot-disk-tabs",className:"full-width",defaultValue:b,onValueChange:j=>{S("bootDiskSourceType",j),k&&k>A&&S("bootDiskSize",gb(k))},children:[s.jsxs(Qe.List,{"aria-describedby":"boot-disk",children:[s.jsx(Qe.Trigger,{value:"siloImage",disabled:e,children:"Silo images"}),s.jsx(Qe.Trigger,{value:"projectImage",disabled:e,children:"Project images"}),s.jsx(Qe.Trigger,{value:"disk",disabled:e,children:"Existing disks"})]}),u.length===0&&f.length===0&&s.jsx(Bt,{className:"mb-8 ml-10 max-w-lg",variant:"notice",content:"Images or disks are required to create or attach a boot disk."}),s.jsx(Qe.Content,{value:"siloImage",className:"space-y-4",children:a.length===0?s.jsx("div",{className:"flex max-w-lg items-center justify-center rounded-lg border p-6 border-default",children:s.jsx(nt,{icon:s.jsx(Rl,{}),title:"No silo images found",body:"Promote a project image to see it here"})}):s.jsxs(s.Fragment,{children:[s.jsx(F6,{images:a,control:w,disabled:e,name:"siloImageSource"}),N]})}),s.jsx(Qe.Content,{value:"projectImage",className:"space-y-4",children:l.length===0?s.jsx("div",{className:"flex max-w-lg items-center justify-center rounded-lg border p-6 border-default",children:s.jsx(nt,{icon:s.jsx(Rl,{}),title:"No project images found",body:"Upload an image to see it here",buttonText:"Upload image",onClick:()=>o(B.projectImagesNew({project:r}))})}):s.jsxs(s.Fragment,{children:[s.jsx(F6,{images:l,control:w,disabled:e,name:"projectImageSource"}),N]})}),s.jsx(Qe.Content,{value:"disk",className:"space-y-4",children:f.length===0?s.jsx("div",{className:"flex max-w-lg items-center justify-center rounded-lg border p-6 border-default",children:s.jsx(nt,{icon:s.jsx(Gw,{}),title:"No detached disks found",body:"Only detached disks can be used as a boot disk"})}):s.jsx(Pn,{label:"Disk",name:"diskSource",description:"Existing disks that are not attached to an instance",items:f,required:!0,control:w,placeholder:"Select a disk"})})]}),s.jsx(wr,{}),s.jsx(oo.Heading,{id:"additional-disks",children:"Additional disks"}),s.jsx(Mie,{control:w,disabled:e}),s.jsx(wr,{}),s.jsx(oo.Heading,{id:"authentication",children:"Authentication"}),s.jsx(zie,{control:w,isSubmitting:e}),s.jsx(wr,{}),s.jsx(oo.Heading,{id:"advanced",children:"Advanced"}),s.jsx(jae,{control:w,isSubmitting:e,siloPools:g.items}),s.jsxs(oo.Actions,{children:[s.jsx(oo.Submit,{loading:i.isPending,children:"Create instance"}),s.jsx(oo.Cancel,{onClick:()=>o(B.instances({project:r}))})]})]})]})}const Cae=e=>e.type==="floating",Dae=({ip:e})=>s.jsxs("div",{children:[s.jsx("div",{children:e.name}),s.jsxs("div",{className:"flex gap-0.5 text-tertiary selected:text-accent-secondary",children:[s.jsx("div",{children:e.ip}),e.description&&s.jsxs(s.Fragment,{children:[s.jsx(l0,{}),s.jsx("div",{className:"grow overflow-hidden overflow-ellipsis whitespace-pre text-left",children:e.description})]})]})]}),jae=({control:e,isSubmitting:t,siloPools:n})=>{var T,A,P;const[r,o]=m.useState([]),[i,a]=m.useState(!1),[l,u]=m.useState(),c=on({control:e,name:"externalIps"}),d=(T=c.field.value)==null?void 0:T.find(k=>k.type==="ephemeral"),f=!!d,h=d&&"pool"in d?d.pool:void 0,p=(A=n.find(k=>k.isDefault))==null?void 0:A.name,g=(c.field.value||[]).filter(Cae),{project:v}=ut(),{data:b}=Pe("floatingIpList",{query:{project:v,limit:1e3}}),x=m.useMemo(()=>b.items.filter(k=>!k.instanceId),[b]),y=x.filter(k=>!g.find(N=>N.floatingIp===k.name)),w=g.map(k=>x.find(N=>N.name===k.floatingIp)).filter(k=>!!k),S=()=>{a(!1),u(void 0)},C=()=>{l&&c.field.onChange([...c.field.value||[],{type:"floating",floatingIp:l.name}]),S()},E=k=>{var N;c.field.onChange((N=c.field.value)==null?void 0:N.filter(j=>!(j.type==="floating"&&j.floatingIp===k)))},D=g.some(k=>k.floatingIp!==""),$=s.jsxs(s.Fragment,{children:["This instance will be reachable at"," ",l?s.jsx(rn,{children:l.ip}):"the selected IP"]});return s.jsxs(QF,{type:"multiple",className:"mt-12 max-w-lg",value:r,onValueChange:o,children:[s.jsxs(g4,{value:"networking",label:"Networking",isOpen:r.includes("networking"),children:[s.jsx(Lie,{control:e,disabled:t}),s.jsx("div",{className:"py-2",children:s.jsx(ot,{name:"hostname",tooltipText:"Will be generated if not provided",control:e,disabled:t})}),s.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[s.jsxs("h2",{className:"text-sans-md",children:["Ephemeral IP"," ",s.jsx(Ac,{children:"Ephemeral IPs are allocated when the instance is created and deallocated when it is deleted"})]}),s.jsxs("div",{className:"flex items-start gap-2.5",children:[s.jsx(w$,{id:"assignEphemeralIp",checked:f,onChange:()=>{var N;const k=f?(N=c.field.value)==null?void 0:N.filter(j=>j.type!=="ephemeral"):[...c.field.value||[],{type:"ephemeral",pool:h||p}];c.field.onChange(k)}}),s.jsx("label",{htmlFor:"assignEphemeralIp",className:"text-sans-md text-secondary",children:"Allocate and attach an ephemeral IP address"})]}),f&&s.jsx(ta,{name:"pools",label:"IP pool for ephemeral IP",placeholder:p?`${p} (default)`:"Select a pool",selected:`${(P=n.find(k=>k.name===h))==null?void 0:P.name}`,items:n.map(k=>({label:s.jsxs("div",{className:"flex items-center gap-2",children:[k.name,k.isDefault&&s.jsx(tt,{children:"default"})]}),value:k.name}))||[],disabled:!f||t,required:!0,onChange:k=>{var j;const N=(j=c.field.value)==null?void 0:j.map(F=>F.type==="ephemeral"?{...F,pool:k}:F);c.field.onChange(N)}})]}),s.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[s.jsxs("h2",{className:"text-sans-md",children:["Floating IPs"," ",s.jsx(Ac,{children:"Floating IPs exist independently of instances and can be attached to and detached from them as needed."})]}),D&&s.jsxs(fl,{children:[s.jsxs(hl,{children:[s.jsx(tn,{children:"Name"}),s.jsx(tn,{children:"IP"}),s.jsx(tn,{className:"w-12"})]}),s.jsx(ml,{children:w.map((k,N)=>s.jsxs(pl,{tabIndex:0,"aria-rowindex":N+1,"aria-label":`Name: ${k.name}, IP: ${k.ip}`,children:[s.jsx(er,{children:k.name}),s.jsx(er,{children:k.ip}),s.jsx(gl,{onClick:()=>E(k.name),label:`remove floating IP ${k.name}`})]},k.name))})]}),b.items.length===0?s.jsx("div",{className:"flex max-w-lg items-center justify-center rounded-lg border p-6 border-default",children:s.jsx(nt,{icon:s.jsx(fs,{}),title:"No floating IPs found",body:"Create a floating IP to attach it to this instance"})}):s.jsx("div",{children:s.jsx(Je,{size:"sm",className:"shrink-0",disabled:y.length===0,disabledReason:"No floating IPs available",onClick:()=>a(!0),children:"Attach floating IP"})}),s.jsxs($e,{isOpen:i,onDismiss:S,title:"Attach floating IP",children:[s.jsx($e.Body,{children:s.jsxs($e.Section,{children:[s.jsx(Bt,{variant:"info",content:$}),s.jsx("form",{children:s.jsx(ta,{name:"floatingIp",items:y.map(k=>({value:k.name,label:s.jsx(Dae,{ip:k}),selectedLabel:`${k.name} (${k.ip})`})),label:"Floating IP",onChange:k=>{u(y.find(N=>N.name===k))},required:!0,placeholder:"Select a floating IP",selected:(l==null?void 0:l.name)||""})})]})}),s.jsx($e.Footer,{actionText:"Attach",disabled:!l,onAction:C,onDismiss:S})]})]})]}),s.jsx(g4,{value:"configuration",label:"Configuration",isOpen:r.includes("configuration"),children:s.jsx(Fl,{id:"user-data-input",description:s.jsx(Pae,{}),name:"userData",label:"User Data",control:e,disabled:t})})]})},R1=e=>E4.filter(t=>t.category===e).map(t=>s.jsxs(Ap,{value:t.id,children:[s.jsxs("div",{children:[t.ncpus," ",s.jsx(Ap.Unit,{"aria-label":"CPU",children:"vCPUs"})]}),s.jsxs("div",{children:[t.memory," ",s.jsx(Ap.Unit,{"aria-label":"gibibytes RAM",children:"GiB RAM"})]})]},t.id)),E4=[{category:"general",id:"general-xs",memory:8,ncpus:2},{category:"general",id:"general-sm",memory:16,ncpus:4},{category:"general",id:"general-md",memory:32,ncpus:8},{category:"general",id:"general-lg",memory:64,ncpus:16},{category:"general",id:"general-xl",memory:128,ncpus:32},{category:"highCPU",id:"highCPU-xs",memory:4,ncpus:2},{category:"highCPU",id:"highCPU-sm",memory:8,ncpus:4},{category:"highCPU",id:"highCPU-md",memory:16,ncpus:8},{category:"highCPU",id:"highCPU-lg",memory:32,ncpus:16},{category:"highCPU",id:"highCPU-xl",memory:64,ncpus:32},{category:"highMemory",id:"highMemory-xs",memory:16,ncpus:2},{category:"highMemory",id:"highMemory-sm",memory:32,ncpus:4},{category:"highMemory",id:"highMemory-md",memory:64,ncpus:8},{category:"highMemory",id:"highMemory-lg",memory:128,ncpus:16},{category:"custom",id:"custom",memory:0,ncpus:0}],Pae=()=>s.jsxs(s.Fragment,{children:["Data or scripts to be passed to cloud-init as"," ",s.jsx("a",{href:Ft.cloudInitFormat,target:"_blank",rel:"noreferrer",children:"user data"})," ",s.jsx("a",{href:Ft.cloudInitExamples,target:"_blank",rel:"noreferrer",children:"(examples)"})," ","if the selected boot image supports it. Maximum size 32 KiB."]}),Rae={name:"",description:""};function kae(){const e=Fe(),t=ke(),n=()=>e(B.ipPools()),r=fe("ipPoolCreate",{onSuccess(i){t.invalidateQueries("ipPoolList"),De({content:"Your IP pool has been created"}),e(B.ipPools())}}),o=Ge({defaultValues:Rae});return s.jsxs(ht,{form:o,formType:"create",resourceName:"IP pool",onDismiss:n,onSubmit:({name:i,description:a})=>{r.mutate({body:{name:i,description:a}})},loading:r.isPending,submitError:r.error,children:[s.jsx(Et,{name:"name",control:o.control}),s.jsx(At,{name:"description",control:o.control})]})}C4.loader=async({params:e})=>{const{pool:t}=y2(e);return await ae.prefetchQuery("ipPoolView",{path:{pool:t}}),null};function C4(){const e=ke(),t=Fe(),n=Es(),r=()=>t(B.ipPools()),{data:o}=Pe("ipPoolView",{path:n}),i=fe("ipPoolUpdate",{onSuccess(l){e.invalidateQueries("ipPoolList"),De({content:"Your IP pool has been updated"}),r()}}),a=Ge({defaultValues:o});return s.jsxs(ht,{form:a,formType:"edit",resourceName:"IP pool",onDismiss:r,onSubmit:({name:l,description:u})=>{i.mutate({path:n,body:{name:l,description:u}})},loading:i.isPending,submitError:i.error,children:[s.jsx(Et,{name:"name",control:a.control}),s.jsx(At,{name:"description",control:a.control})]})}const Tae={first:"",last:""},n7={type:"pattern",message:"Not a valid IP address"},r7={type:"pattern",message:"IPv6 ranges are not yet supported"};function Iae(e){const t=VS(e.first),n=VS(e.last),r={};return t.valid?t.isv6&&(r.first=r7):r.first=n7,n.valid?n.isv6&&(r.last=r7):r.last=n7,Object.keys(r).length>0?{values:{},errors:r}:{values:e,errors:{}}}function Aae(){const{pool:e}=Es(),t=Fe(),n=ke(),r=()=>t(B.ipPool({pool:e})),o=fe("ipPoolRangeAdd",{onSuccess(a){n.invalidateQueries("ipPoolRangeList"),n.invalidateQueries("ipPoolUtilizationView"),De({content:"IP range added"}),r()}}),i=Ge({defaultValues:Tae,resolver:Iae});return s.jsxs(ht,{form:i,formType:"create",resourceName:"IP range",title:"Add IP range",onDismiss:r,onSubmit:a=>o.mutate({path:{pool:e},body:a}),loading:o.isPending,submitError:o.error,children:[s.jsx(Bt,{variant:"info",content:"Only IPv4 ranges are currently supported. Ranges are inclusive, and first must be less than or equal to last."}),s.jsx(ot,{name:"first",description:"First address in the range",control:i.control,required:!0}),s.jsx(ot,{name:"last",description:"Last address in the range",control:i.control,required:!0})]})}const Nae={name:"",description:""};function Fae(){const e=Fe(),t=ke(),n=()=>e(B.projects()),r=fe("projectCreate",{onSuccess(i){t.invalidateQueries("projectList"),t.setQueryData("projectView",{path:{project:i.name}},i),De({content:"Your project has been created"}),e(B.project({project:i.name}))}}),o=Ge({defaultValues:Nae});return s.jsxs(ht,{form:o,formType:"create",resourceName:"project",onDismiss:n,onSubmit:({name:i,description:a})=>{r.mutate({body:{name:i,description:a}})},loading:r.isPending,submitError:r.error,children:[s.jsx(Et,{name:"name",control:o.control}),s.jsx(At,{name:"description",control:o.control})]})}D4.loader=async({params:e})=>{const{project:t}=Uo(e);return await ae.prefetchQuery("projectView",{path:{project:t}}),null};function D4(){const e=ke(),t=Fe(),n=ut(),r=()=>t(B.projects()),{data:o}=Pe("projectView",{path:n}),i=fe("projectUpdate",{onSuccess(l){e.invalidateQueries("projectList"),e.setQueryData("projectView",{path:{project:l.name}},l),De({content:"Your project has been updated"}),r()}}),a=Ge({defaultValues:o});return s.jsxs(ht,{form:a,formType:"edit",resourceName:"project",onDismiss:r,onSubmit:({name:l,description:u})=>{i.mutate({path:n,body:{name:l,description:u}})},loading:i.isPending,submitError:i.error,children:[s.jsx(Et,{name:"name",control:a.control}),s.jsx(At,{name:"description",control:a.control})]})}function Mae({control:e}){const[t,n]=m.useState(!1),{field:{value:r,onChange:o}}=on({control:e,name:"tlsCertificates"});return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"max-w-lg",children:[s.jsx(bo,{id:"tls-certificates-label",className:"mb-3",children:"TLS Certificates"}),!!r.length&&s.jsxs(fl,{className:"mb-4",children:[s.jsxs(hl,{children:[s.jsx(tn,{children:"Name"}),s.jsx(tn,{className:"w-12"})]}),s.jsx(ml,{children:r.map((i,a)=>s.jsxs(pl,{tabIndex:0,"aria-rowindex":a+1,"aria-label":`Name: ${i.name}, Description: ${i.description}`,children:[s.jsx(er,{children:i.name}),s.jsx(gl,{onClick:()=>o(r.filter(l=>l.name!==i.name)),label:`remove cert ${i.name}`})]},i.name))})]}),s.jsx(Je,{size:"sm",onClick:()=>n(!0),children:"Add TLS certificate"})]}),t&&s.jsx(_ae,{onDismiss:()=>n(!1),onSubmit:async i=>{const a={...i,cert:await i.cert.text(),key:await i.key.text()};o([...r,a]),n(!1)},allNames:r.map(i=>i.name)})]})}const Oae={description:"",name:"",service:"external_api",key:null,cert:null},_ae=({onDismiss:e,onSubmit:t,allNames:n})=>{const{control:r,handleSubmit:o}=Ge({defaultValues:Oae});return s.jsxs($e,{isOpen:!0,onDismiss:e,title:"Add TLS certificate",children:[s.jsx($e.Body,{children:s.jsx("form",{autoComplete:"off",onSubmit:o(t),children:s.jsxs($e.Section,{children:[s.jsx(ot,{name:"name",control:r,required:!0,validate:i=>n.includes(i)?"A certificate with this name already exists":CF(i,"Name",!0)}),s.jsx(At,{name:"description",control:r}),s.jsx(Fl,{id:"cert-input",name:"cert",label:"Cert",required:!0,control:r}),s.jsx(Fl,{id:"key-input",name:"key",label:"Key",required:!0,control:r})]})})}),s.jsx($e.Footer,{onDismiss:e,onAction:o(t),actionText:"Add Certificate"})]})},Lae={name:"",description:"",discoverable:!0,identityMode:"saml_jit",adminGroupName:"",tlsCertificates:[],siloAdminGetsFleetAdmin:!1,siloViewerGetsFleetViewer:!1,quotas:{cpus:0,memory:0,storage:0}};function k1(e){if(e<0)return"Must be at least 0"}function Vae(){const e=Fe(),t=ke(),n=()=>e(B.silos()),r=fe("siloCreate",{onSuccess(i){t.invalidateQueries("siloList"),t.setQueryData("siloView",{path:{silo:i.name}},i),De({content:"Your silo has been created"}),n()}}),o=Ge({defaultValues:Lae});return s.jsxs(ht,{form:o,formType:"create",resourceName:"silo",onDismiss:n,onSubmit:({adminGroupName:i,siloAdminGetsFleetAdmin:a,siloViewerGetsFleetViewer:l,quotas:u,...c})=>{const d={};a&&(d.admin=["admin"]),l&&(d.viewer=["viewer"]),r.mutate({body:{adminGroupName:(i==null?void 0:i.trim())||void 0,mappedFleetRoles:d,quotas:{cpus:u.cpus,memory:u.memory*jr,storage:u.storage*jr},...c}})},loading:r.isPending,submitError:r.error,children:[s.jsx(Bt,{variant:"info",content:s.jsx(Bae,{})}),s.jsx(Et,{name:"name",control:o.control}),s.jsx(At,{name:"description",control:o.control}),s.jsx(Li,{name:"discoverable",control:o.control,children:"Discoverable"}),s.jsx(wr,{}),s.jsx(cl,{control:o.control,label:"CPU quota",name:"quotas.cpus",required:!0,units:"vCPUs",validate:k1}),s.jsx(cl,{control:o.control,label:"Memory quota",name:"quotas.memory",required:!0,units:"GiB",validate:k1}),s.jsx(cl,{control:o.control,label:"Storage quota",name:"quotas.storage",required:!0,units:"GiB",validate:k1}),s.jsx(wr,{}),s.jsx(sh,{name:"identityMode",label:"Identity mode",column:!0,control:o.control,items:[{value:"saml_jit",label:"SAML"},{value:"local_only",label:"Local only"}]}),s.jsx(ot,{name:"adminGroupName",label:"Admin group name",description:"This group will be created and granted the Silo Admin role",control:o.control}),s.jsx("div",{children:s.jsx(Li,{name:"siloAdminGetsFleetAdmin",control:o.control,children:"Grant fleet admin role to silo admins"})}),s.jsx("div",{className:"!mt-2",children:s.jsx(Li,{name:"siloViewerGetsFleetViewer",control:o.control,children:"Grant fleet viewer role to silo viewers"})}),s.jsx(wr,{}),s.jsx(Mae,{control:o.control})]})}function Bae(){return s.jsxs(s.Fragment,{children:["Read the"," ",s.jsx("a",{href:"https://docs.oxide.computer/guides/operator/silo-management",className:"underline",target:"_blank",rel:"noreferrer",children:"Silos"})," ","guide to learn more."]})}const zae=e=>{const{data:t}=Ze("diskList",{query:{...e,limit:1e3}});return(t==null?void 0:t.items.filter(Va.snapshot).map(n=>({value:n.name,label:n.name})))||[]},Uae={description:"",disk:"",name:""};function qae(){const e=ke(),t=ut(),n=Fe(),r=zae(t),o=()=>n(B.snapshots(t)),i=fe("snapshotCreate",{onSuccess(){e.invalidateQueries("snapshotList"),De({content:"Your snapshot has been created"}),o()}}),a=Ge({defaultValues:Uae});return s.jsxs(ht,{form:a,formType:"create",resourceName:"snapshot",onDismiss:o,onSubmit:l=>{i.mutate({query:t,body:l})},submitError:i.error,children:[s.jsx(Et,{name:"name",control:a.control}),s.jsx(At,{name:"description",control:a.control}),s.jsx(Jc,{label:"Disk",name:"disk",placeholder:"Select a disk",items:r,required:!0,control:a.control})]})}const Hae={name:"",description:"",ipv4Block:""};function Wae(){const e=Wl(),t=ke(),n=Fe(),r=()=>n(B.vpcSubnets(e)),o=fe("vpcSubnetCreate",{onSuccess(){t.invalidateQueries("vpcSubnetList"),r()}}),i=Ge({defaultValues:Hae});return s.jsxs(ht,{form:i,formType:"create",resourceName:"subnet",onDismiss:r,onSubmit:a=>o.mutate({query:e,body:a}),loading:o.isPending,submitError:o.error,children:[s.jsx(Et,{name:"name",control:i.control}),s.jsx(At,{name:"description",control:i.control}),s.jsx(wr,{}),s.jsx(ot,{name:"ipv4Block",label:"IPv4 block",required:!0,control:i.control}),s.jsx(ot,{name:"ipv6Block",label:"IPv6 block",control:i.control})]})}j4.loader=async({params:e})=>{const{project:t,vpc:n,subnet:r}=h8(e);return await ae.prefetchQuery("vpcSubnetView",{query:{project:t,vpc:n},path:{subnet:r}}),null};function j4(){const{project:e,vpc:t,subnet:n}=UK(),r=ke(),o=Fe(),i=()=>o(B.vpcSubnets({project:e,vpc:t})),{data:a}=Pe("vpcSubnetView",{query:{project:e,vpc:t},path:{subnet:n}}),l=fe("vpcSubnetUpdate",{onSuccess(){r.invalidateQueries("vpcSubnetList"),i()}}),u=_f(a,["name","description"]),c=Ge({defaultValues:u});return s.jsxs(ht,{form:c,formType:"edit",resourceName:"subnet",onDismiss:i,onSubmit:d=>{l.mutate({path:{subnet:a.name},query:{project:e,vpc:t},body:d})},loading:l.isPending,submitError:l.error,children:[s.jsx(Et,{name:"name",control:c.control}),s.jsx(At,{name:"description",control:c.control})]})}const Gae={name:"",description:"",dnsName:""};function Kae(){const e=ut(),t=ke(),n=Fe(),r=fe("vpcCreate",{onSuccess(i){t.invalidateQueries("vpcList"),t.setQueryData("vpcView",{path:{vpc:i.name},query:e},i),De({content:"Your VPC has been created"}),n(B.vpc({vpc:i.name,...e}))}}),o=Ge({defaultValues:Gae});return s.jsxs(ht,{form:o,formType:"create",resourceName:"VPC",onSubmit:i=>r.mutate({query:e,body:i}),onDismiss:()=>n(B.vpcs(e)),loading:r.isPending,submitError:r.error,children:[s.jsx(Et,{name:"name",control:o.control}),s.jsx(At,{name:"description",control:o.control}),s.jsx(Et,{name:"dnsName",label:"DNS name",control:o.control}),s.jsx(ot,{name:"ipv6Prefix",label:"IPV6 prefix",control:o.control})]})}P4.loader=async({params:e})=>{const{project:t,vpc:n}=Gc(e);return await ae.prefetchQuery("vpcView",{path:{vpc:n},query:{project:t}}),null};function P4(){const{vpc:e,project:t}=Wl(),n=ke(),r=Fe(),{data:o}=Pe("vpcView",{path:{vpc:e},query:{project:t}}),i=()=>r(B.vpcs({project:t})),a=fe("vpcUpdate",{onSuccess(u){n.invalidateQueries("vpcList"),n.setQueryData("vpcView",{path:{vpc:u.name},query:{project:t}},u),De({content:"Your VPC has been created"}),i()}}),l=Ge({defaultValues:o});return s.jsxs(ht,{form:l,formType:"edit",resourceName:"VPC",onDismiss:i,onSubmit:({name:u,description:c,dnsName:d})=>{a.mutate({path:{vpc:e},query:{project:t},body:{name:u,description:c,dnsName:d}})},loading:a.isPending,submitError:a.error,children:[s.jsx(Et,{name:"name",control:l.control}),s.jsx(At,{name:"description",control:l.control}),s.jsx(Et,{name:"dnsName",label:"DNS name",required:!1,control:l.control})]})}const gM=({className:e=""})=>s.jsx("svg",{width:"100",height:"28",viewBox:"0 0 100 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M78.0474 0.228439V27.0537C78.0474 27.1625 77.9386 27.2821 77.8189 27.2821H75.2612C75.1523 27.2821 75.0326 27.1734 75.0326 27.0537V24.0079C73.7157 26.3031 71.7566 27.7281 68.4806 27.7281C63.9312 27.7281 60.5355 23.7794 60.5355 17.8291C60.5355 11.9223 64.1162 8.00624 68.9704 8.00624C71.7131 8.00624 73.7157 9.28986 74.8476 11.1282V0.228439C74.8476 0.119659 74.9564 0 75.0762 0H77.8189C77.9277 0 78.0474 0.10878 78.0474 0.228439ZM69.3513 24.8999C72.7035 24.8999 74.9238 22.2674 74.9238 18.1663V17.4919C74.9238 13.4235 72.7361 10.8345 69.471 10.8345C66.0426 10.8345 63.9421 13.467 63.9421 17.8291C63.9312 22.1912 65.9991 24.8999 69.3513 24.8999ZM44.3622 24.5626C44.2098 24.5626 44.1336 24.6388 44.1336 24.7911V27.0537C44.1336 27.206 44.2098 27.2822 44.3622 27.2822H58.7396C58.892 27.2822 58.9682 27.206 58.9682 27.0537V24.7911C58.9682 24.6388 58.8485 24.5626 58.7396 24.5626H53.1672V8.69156C53.1672 8.53927 53.0474 8.46312 52.9386 8.46312H45.1132C44.9608 8.46312 44.8846 8.53927 44.8846 8.69156V10.9433C44.8846 11.0956 45.0043 11.1718 45.1132 11.1718H49.9673V24.5626H44.3622ZM49.4014 4.32946H53.091C53.2433 4.32946 53.3195 4.25332 53.3195 4.10103V0.413366C53.3195 0.261074 53.2433 0.184927 53.091 0.184927H49.4014C49.249 0.184927 49.1728 0.261074 49.1728 0.413366V4.10103C49.1728 4.25332 49.249 4.32946 49.4014 4.32946ZM0 15.3707V13.0428C0 5.47166 3.19982 0.565659 9.52329 0.565659C15.8794 0.565659 19.0792 5.47166 19.0792 13.0319V15.3598C19.0792 22.9201 15.8794 27.8261 9.53417 27.8261C3.19982 27.8369 0 22.9309 0 15.3707ZM14.8128 7.12512L3.61541 19.1118L3.61341 19.1019C3.40662 17.9923 3.29778 16.7522 3.29778 15.3598V13.0319C3.29778 6.87493 5.47453 3.41571 9.54505 3.41571C12.0265 3.41571 13.8006 4.72107 14.8128 7.12512ZM15.7706 15.3707V13.0428C15.7706 11.8244 15.6726 10.6931 15.5094 9.69234L4.40792 21.6038C5.44188 23.8012 7.17239 24.9869 9.54505 24.9869C13.6047 24.976 15.7706 21.5168 15.7706 15.3707ZM38.485 8.44137L40.3243 10.171C40.4223 10.2471 40.4223 10.3994 40.3461 10.4864L33.424 17.8618L40.3461 25.2371C40.4223 25.335 40.4223 25.4764 40.3243 25.5525L38.485 27.2822C38.387 27.3583 38.2455 27.3583 38.1693 27.2604L31.4323 20.0156L24.6735 27.2713C24.5973 27.3692 24.4449 27.3692 24.3578 27.293L22.5076 25.5634C22.4097 25.4873 22.4097 25.335 22.4858 25.248L29.4079 17.8726L22.4858 10.4973C22.4097 10.3994 22.4097 10.258 22.5076 10.1819L24.347 8.45225C24.4449 8.3761 24.5864 8.3761 24.6626 8.474L31.4214 15.7297L38.1584 8.474C38.2455 8.36522 38.3979 8.36522 38.485 8.44137ZM86.3409 18.6994H100V16.9698C100 12.3466 97.6273 8.01712 91.8698 8.01712C86.6021 8.01712 83.0648 11.7483 83.0648 17.5028C83.0648 23.6706 86.1885 27.739 92.0984 27.739C95.5703 27.739 98.0083 26.1943 99.7823 23.3008C99.8912 23.1485 99.8585 22.9962 99.7061 22.9201L97.4423 21.6364C97.2899 21.5603 97.1811 21.5929 97.1049 21.7452C96.0818 23.4857 94.471 24.9107 91.946 24.9107C88.485 24.9107 86.417 22.2347 86.3409 18.6994ZM91.7283 10.4973C95.1132 10.4973 96.7675 13.0537 96.7675 16.0669H86.3409C86.417 13.3147 88.2999 10.4973 91.7283 10.4973Z",fill:"var(--base-neutral-300)"})}),Qae=()=>s.jsxs("main",{className:"relative h-screen",style:{background:"radial-gradient(200% 100% at 50% 100%, var(--surface-default) 0%, #161B1D 100%)"},children:[s.jsx(gM,{className:"absolute bottom-8 left-1/2 -translate-x-1/2"}),s.jsx("div",{className:"z-10 flex h-full items-center justify-center",children:s.jsx(an,{})})]}),Zae=({number:e,className:t})=>s.jsx("span",{className:ne("h-4 whitespace-nowrap rounded px-[3px] pb-[3px] pt-[1px] ring-1 ring-inset text-mono-sm text-secondary bg-tertiary ring-secondary",t),children:e}),o7=({type:e="inline",pageSize:t,hasNext:n,hasPrev:r,nextPage:o,onNext:i,onPrev:a,className:l})=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:ne(e==="page"&&"py-5","flex items-center justify-between text-mono-sm text-default bg-default",l),children:[s.jsxs("span",{className:"flex-inline grow text-tertiary",children:["rows per page ",s.jsx(Zae,{number:t})]}),s.jsxs("span",{className:"flex space-x-3",children:[s.jsxs("button",{type:"button",className:ne(r?"text-secondary hover:text-default":"text-disabled","flex items-center text-mono-sm"),disabled:!r,onClick:a,children:[s.jsx(ck,{className:ne("mr-1",r?"text-secondary":"text-disabled")}),"prev"]}),s.jsxs("button",{type:"button",className:ne(n?"text-secondary hover:text-default":"text-disabled","flex items-center text-mono-sm"),disabled:!n,onClick:i.bind(null,o),children:["next",s.jsx(Kw,{className:ne("ml-1",n?"text-secondary":"text-disabled")})]})]})]})}),vM=iM("pagination");function N$({inline:e=!1,...t}){return e?s.jsx(o7,{...t}):s.jsx(vM.In,{children:s.jsx(o7,{className:"gutter h-14 py-5",...t})})}N$.Target=vM.Out;function Yae(e){const t=window.sessionStorage.getItem(e);return Number(t)||0}function Xae(e,t){window.sessionStorage.setItem(e,t.toString())}function Jae(e){const t=`scroll-position-${qn().key}`,{state:n}=kP();m.useEffect(()=>{var r,o;n==="loading"?Xae(t,((r=e.current)==null?void 0:r.scrollTop)??0):n==="idle"&&((o=e.current)==null||o.scrollTo(0,Yae(t)))},[t,n,e])}const ese=`
    absolute left-1/2 -translate-x-1/2 -top-10 z-10 px-3 py-2
    uppercase text-mono-lg rounded
    inline-flex items-center justify-center
    focus:ring-2 focus:ring-accent-secondary
    bg-accent-secondary border-transparent text-accent text-mono-sm
    transition-all motion-reduce:transform-none
`,tse=({id:e,target:t="content",children:n="Skip to content",className:r})=>s.jsx("a",{id:e,href:`#${t}`,className:ne(ese,"focus:top-2",r),children:n}),yM=({id:e="content"})=>s.jsx("div",{id:e,className:"h-0"}),D0=St.div`grid h-screen grid-cols-[14.25rem,1fr] grid-rows-[60px,1fr]`;function j0(){const e=m.useRef(null);return Jae(e),s.jsxs("div",{ref:e,className:"flex flex-col overflow-auto","data-testid":"scroll-container",children:[s.jsxs("div",{className:"flex grow flex-col pb-8",children:[s.jsx(yM,{}),s.jsx("main",{className:"[&>*]:gutter",children:s.jsx(an,{})})]}),s.jsxs("div",{className:"sticky bottom-0 shrink-0 justify-between overflow-hidden border-t bg-default border-secondary empty:border-t-0",children:[s.jsx(N$.Target,{}),s.jsx(Gie,{})]})]})}const nse=()=>s.jsx("div",{className:"flex flex-col overflow-auto",children:s.jsxs("div",{className:"flex grow flex-col",children:[s.jsx(yM,{}),s.jsx("main",{className:"[&>*]:gutter h-full",children:s.jsx(an,{})})]})}),rse="/assets/oxide-hero-rack-CEwJkbBB.webp";function ose(){return s.jsxs("main",{className:"layout relative flex h-screen",children:[s.jsx("div",{className:"hero-bg relative flex w-1/2 justify-end text-accent sm-:hidden",children:s.jsx("div",{className:"hero-rack-wrapper",children:s.jsx("img",{src:rse,alt:"A populated Oxide rack",className:"hero-rack"})})}),s.jsx("div",{className:"z-10 flex h-full w-1/2 justify-start sm-:w-full sm-:justify-center",children:s.jsx("div",{className:"flex h-full w-full max-w-[480px] items-center justify-center sm+:pr-10",children:s.jsx("div",{className:"flex w-[320px] flex-col items-center",children:s.jsx(an,{})})})}),s.jsx(gM,{className:"absolute bottom-8 left-1/2 hidden -translate-x-1/2 sm-:block"})]})}function ise(e){const[t,n]=m.useState(void 0);return jl(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,l;if("borderBoxSize"in i){const u=i.borderBoxSize,c=Array.isArray(u)?u[0]:u;a=c.inlineSize,l=c.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const xM="Popper",[bM,wM]=ia(xM),[ase,$M]=bM(xM),sse=e=>{const{__scopePopper:t,children:n}=e,[r,o]=m.useState(null);return m.createElement(ase,{scope:t,anchor:r,onAnchorChange:o},n)},lse="PopperAnchor",use=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=$M(lse,n),a=m.useRef(null),l=zn(t,a);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:m.createElement(gn.div,Re({},o,{ref:l}))}),SM="PopperContent",[cse,ffe]=bM(SM),dse=m.forwardRef((e,t)=>{var n,r,o,i,a,l,u,c;const{__scopePopper:d,side:f="bottom",sideOffset:h=0,align:p="center",alignOffset:g=0,arrowPadding:v=0,avoidCollisions:b=!0,collisionBoundary:x=[],collisionPadding:y=0,sticky:w="partial",hideWhenDetached:S=!1,updatePositionStrategy:C="optimized",onPlaced:E,...D}=e,$=$M(SM,d),[T,A]=m.useState(null),P=zn(t,Tr=>A(Tr)),[k,N]=m.useState(null),j=ise(k),F=(n=j==null?void 0:j.width)!==null&&n!==void 0?n:0,I=(r=j==null?void 0:j.height)!==null&&r!==void 0?r:0,R=f+(p!=="center"?"-"+p:""),M=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},O=Array.isArray(x)?x:[x],q=O.length>0,H={padding:M,boundary:O.filter(fse),altBoundary:q},{refs:G,floatingStyles:ce,placement:Z,isPositioned:ee,middlewareData:re}=Mk({strategy:"fixed",placement:R,whileElementsMounted:(...Tr)=>a2(...Tr,{animationFrame:C==="always"}),elements:{reference:$.anchor},middleware:[qv({mainAxis:h+I,alignmentAxis:g}),b&&Ik({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?hG():void 0,...H}),b&&s2({...H}),Ak({...H,apply:({elements:Tr,rects:yn,availableWidth:bi,availableHeight:L})=>{const{width:W,height:Y}=yn.reference,he=Tr.floating.style;he.setProperty("--radix-popper-available-width",`${bi}px`),he.setProperty("--radix-popper-available-height",`${L}px`),he.setProperty("--radix-popper-anchor-width",`${W}px`),he.setProperty("--radix-popper-anchor-height",`${Y}px`)}}),k&&Nk({element:k,padding:v}),hse({arrowWidth:F,arrowHeight:I}),S&&fG({strategy:"referenceHidden",...H})]}),[Q,ue]=EM(Z),J=si(E);jl(()=>{ee&&(J==null||J())},[ee,J]);const oe=(o=re.arrow)===null||o===void 0?void 0:o.x,ve=(i=re.arrow)===null||i===void 0?void 0:i.y,Me=((a=re.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[un,cr]=m.useState();return jl(()=>{T&&cr(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:ee?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:un,"--radix-popper-transform-origin":[(l=re.transformOrigin)===null||l===void 0?void 0:l.x,(u=re.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},m.createElement(cse,{scope:d,placedSide:Q,onArrowChange:N,arrowX:oe,arrowY:ve,shouldHideArrow:Me},m.createElement(gn.div,Re({"data-side":Q,"data-align":ue},D,{ref:P,style:{...D.style,animation:ee?void 0:"none",opacity:(c=re.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function fse(e){return e!==null}const hse=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:l,rects:u,middlewareData:c}=t,f=((n=c.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=f?0:e.arrowWidth,p=f?0:e.arrowHeight,[g,v]=EM(l),b={start:"0%",center:"50%",end:"100%"}[v],x=((r=(o=c.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+h/2,y=((i=(a=c.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+p/2;let w="",S="";return g==="bottom"?(w=f?b:`${x}px`,S=`${-p}px`):g==="top"?(w=f?b:`${x}px`,S=`${u.floating.height+p}px`):g==="right"?(w=`${-p}px`,S=f?b:`${y}px`):g==="left"&&(w=`${u.floating.width+p}px`,S=f?b:`${y}px`),{data:{x:w,y:S}}}});function EM(e){const[t,n="center"]=e.split("-");return[t,n]}const mse=sse,pse=use,gse=dse,vse=["Enter"," "],yse=["ArrowDown","PageUp","Home"],CM=["ArrowUp","PageDown","End"],xse=[...yse,...CM],P0="Menu",[R4,bse,wse]=$$(P0),[Jl,DM]=ia(P0,[wse,wM,C0]),F$=wM(),jM=C0(),[$se,Qh]=Jl(P0),[Sse,M$]=Jl(P0),Ese=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,l=F$(t),[u,c]=m.useState(null),d=m.useRef(!1),f=si(i),h=$0(o);return m.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),m.createElement(mse,l,m.createElement($se,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:c},m.createElement(Sse,{scope:t,onClose:m.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a},r)))},Cse=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=F$(n);return m.createElement(pse,Re({},o,r,{ref:t}))}),PM="MenuPortal",[Dse,jse]=Jl(PM,{forceMount:void 0}),Pse=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Qh(PM,t);return m.createElement(Dse,{scope:t,forceMount:n},m.createElement(Ul,{present:n||i.open},m.createElement(aR,{asChild:!0,container:o},r)))},us="MenuContent",[Rse,RM]=Jl(us),kse=m.forwardRef((e,t)=>{const n=jse(us,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Qh(us,e.__scopeMenu),a=M$(us,e.__scopeMenu);return m.createElement(R4.Provider,{scope:e.__scopeMenu},m.createElement(Ul,{present:r||i.open},m.createElement(R4.Slot,{scope:e.__scopeMenu},a.modal?m.createElement(Tse,Re({},o,{ref:t})):m.createElement(Ise,Re({},o,{ref:t})))))}),Tse=m.forwardRef((e,t)=>{const n=Qh(us,e.__scopeMenu),r=m.useRef(null),o=zn(t,r);return m.useEffect(()=>{const i=r.current;if(i)return pR(i)},[]),m.createElement(kM,Re({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Ise=m.forwardRef((e,t)=>{const n=Qh(us,e.__scopeMenu);return m.createElement(kM,Re({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),kM=m.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:g,...v}=e,b=Qh(us,n),x=M$(us,n),y=F$(n),w=jM(n),S=bse(n),[C,E]=m.useState(null),D=m.useRef(null),$=zn(t,D,b.onContentChange),T=m.useRef(0),A=m.useRef(""),P=m.useRef(0),k=m.useRef(null),N=m.useRef("right"),j=m.useRef(0),F=g?wq:m.Fragment,I=g?{as:Lf,allowPinchZoom:!0}:void 0,R=O=>{var q,H;const G=A.current+O,ce=S().filter(J=>!J.disabled),Z=document.activeElement,ee=(q=ce.find(J=>J.ref.current===Z))===null||q===void 0?void 0:q.textValue,re=ce.map(J=>J.textValue),Q=Bse(re,G,ee),ue=(H=ce.find(J=>J.textValue===Q))===null||H===void 0?void 0:H.ref.current;(function J(oe){A.current=oe,window.clearTimeout(T.current),oe!==""&&(T.current=window.setTimeout(()=>J(""),1e3))})(G),ue&&setTimeout(()=>ue.focus())};m.useEffect(()=>()=>window.clearTimeout(T.current),[]),sR();const M=m.useCallback(O=>{var q,H;return N.current===((q=k.current)===null||q===void 0?void 0:q.side)&&Use(O,(H=k.current)===null||H===void 0?void 0:H.area)},[]);return m.createElement(Rse,{scope:n,searchRef:A,onItemEnter:m.useCallback(O=>{M(O)&&O.preventDefault()},[M]),onItemLeave:m.useCallback(O=>{var q;M(O)||((q=D.current)===null||q===void 0||q.focus(),E(null))},[M]),onTriggerLeave:m.useCallback(O=>{M(O)&&O.preventDefault()},[M]),pointerGraceTimerRef:P,onPointerGraceIntentChange:m.useCallback(O=>{k.current=O},[])},m.createElement(F,I,m.createElement(oR,{asChild:!0,trapped:o,onMountAutoFocus:Ye(i,O=>{var q;O.preventDefault(),(q=D.current)===null||q===void 0||q.focus()}),onUnmountAutoFocus:a},m.createElement(nR,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p},m.createElement(uM,Re({asChild:!0},w,{dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:E,onEntryFocus:Ye(u,O=>{x.isUsingKeyboardRef.current||O.preventDefault()})}),m.createElement(gse,Re({role:"menu","aria-orientation":"vertical","data-state":_se(b.open),"data-radix-menu-content":"",dir:x.dir},y,v,{ref:$,style:{outline:"none",...v.style},onKeyDown:Ye(v.onKeyDown,O=>{const H=O.target.closest("[data-radix-menu-content]")===O.currentTarget,G=O.ctrlKey||O.altKey||O.metaKey,ce=O.key.length===1;H&&(O.key==="Tab"&&O.preventDefault(),!G&&ce&&R(O.key));const Z=D.current;if(O.target!==Z||!xse.includes(O.key))return;O.preventDefault();const re=S().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);CM.includes(O.key)&&re.reverse(),Lse(re)}),onBlur:Ye(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(T.current),A.current="")}),onPointerMove:Ye(e.onPointerMove,T4(O=>{const q=O.target,H=j.current!==O.clientX;if(O.currentTarget.contains(q)&&H){const G=O.clientX>j.current?"right":"left";N.current=G,j.current=O.clientX}}))})))))))}),k4="MenuItem",i7="menu.itemSelect",Ase=m.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=m.useRef(null),a=M$(k4,e.__scopeMenu),l=RM(k4,e.__scopeMenu),u=zn(t,i),c=m.useRef(!1),d=()=>{const f=i.current;if(!n&&f){const h=new CustomEvent(i7,{bubbles:!0,cancelable:!0});f.addEventListener(i7,p=>r==null?void 0:r(p),{once:!0}),tR(f,h),h.defaultPrevented?c.current=!1:a.onClose()}};return m.createElement(Nse,Re({},o,{ref:u,disabled:n,onClick:Ye(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)===null||h===void 0||h.call(e,f),c.current=!0},onPointerUp:Ye(e.onPointerUp,f=>{var h;c.current||(h=f.currentTarget)===null||h===void 0||h.click()}),onKeyDown:Ye(e.onKeyDown,f=>{const h=l.searchRef.current!=="";n||h&&f.key===" "||vse.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),Nse=m.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=RM(k4,n),l=jM(n),u=m.useRef(null),c=zn(t,u),[d,f]=m.useState(!1),[h,p]=m.useState("");return m.useEffect(()=>{const g=u.current;if(g){var v;p(((v=g.textContent)!==null&&v!==void 0?v:"").trim())}},[i.children]),m.createElement(R4.ItemSlot,{scope:n,disabled:r,textValue:o??h},m.createElement(cM,Re({asChild:!0},l,{focusable:!r}),m.createElement(gn.div,Re({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:c,onPointerMove:Ye(e.onPointerMove,T4(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:Ye(e.onPointerLeave,T4(g=>a.onItemLeave(g))),onFocus:Ye(e.onFocus,()=>f(!0)),onBlur:Ye(e.onBlur,()=>f(!1))}))))}),Fse="MenuRadioGroup";Jl(Fse,{value:void 0,onValueChange:()=>{}});const Mse="MenuItemIndicator";Jl(Mse,{checked:!1});const Ose="MenuSub";Jl(Ose);function _se(e){return e?"open":"closed"}function Lse(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Vse(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bse(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=Vse(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==n));const u=a.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function zse(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const l=t[i].x,u=t[i].y,c=t[a].x,d=t[a].y;u>r!=d>r&&n<(c-l)*(r-u)/(d-u)+l&&(o=!o)}return o}function Use(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return zse(n,t)}function T4(e){return t=>t.pointerType==="mouse"?e(t):void 0}const qse=Ese,Hse=Cse,Wse=Pse,Gse=kse,Kse=Ase,TM="DropdownMenu",[Qse,hfe]=ia(TM,[DM]),Zh=DM(),[Zse,IM]=Qse(TM),Yse=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,u=Zh(t),c=m.useRef(null),[d=!1,f]=zl({prop:o,defaultProp:i,onChange:a});return m.createElement(Zse,{scope:t,triggerId:Ui(),triggerRef:c,contentId:Ui(),open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(h=>!h),[f]),modal:l},m.createElement(qse,Re({},u,{open:d,onOpenChange:f,dir:r,modal:l}),n))},Xse="DropdownMenuTrigger",Jse=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=IM(Xse,n),a=Zh(n);return m.createElement(Hse,Re({asChild:!0},a),m.createElement(gn.button,Re({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:Dw(t,i.triggerRef),onPointerDown:Ye(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:Ye(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})))}),ele=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Zh(t);return m.createElement(Wse,Re({},r,n))},tle="DropdownMenuContent",nle=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=IM(tle,n),i=Zh(n),a=m.useRef(!1);return m.createElement(Gse,Re({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,l=>{var u;a.current||(u=o.triggerRef.current)===null||u===void 0||u.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,l=>{const u=l.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,d=u.button===2||c;(!o.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),rle=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Zh(n);return m.createElement(Kse,Re({},o,r,{ref:t}))}),ole=Yse,ile=Jse,ale=ele,sle=nle,lle=rle,Ot={Root:ole,Trigger:ile,Portal:ale,Content:m.forwardRef(({className:e,...t},n)=>s.jsx(sle,{...t,onCloseAutoFocus:r=>r.preventDefault(),className:ne("DropdownMenuContent",e),ref:n})),Item:m.forwardRef(({className:e,...t},n)=>s.jsx(lle,{...t,className:ne("DropdownMenuItem ox-menu-item",e),ref:n}))};function R0({children:e}){const t=Fe(),n=fe("logout",{onSuccess:()=>fg({includeCurrent:!1})}),{me:r}=Kl(),o=!!r,[i,...a]=U.Children.toArray(e);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center border-b border-r px-3 border-secondary",children:i}),s.jsx("div",{className:"z-topBar border-b bg-default border-secondary",children:s.jsxs("div",{className:"mx-3 flex h-[60px] shrink-0 items-center justify-between",children:[s.jsx("div",{className:"flex items-center",children:a}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs(Ot.Root,{children:[s.jsx(Ot.Trigger,{asChild:!0,children:s.jsxs(Je,{size:"sm",variant:"secondary","aria-label":"User menu",innerClassName:"space-x-2",children:[s.jsx(ik,{className:"text-quaternary"}),s.jsx("span",{className:"normal-case text-sans-md text-secondary",children:r.displayName||"User"}),s.jsx(vW,{className:"!w-2.5"})]})}),s.jsxs(Ot.Content,{align:"end",sideOffset:8,children:[s.jsx(Ot.Item,{onSelect:()=>t(B.profile()),children:"Settings"}),o?s.jsx(Ot.Item,{onSelect:()=>n.mutate({}),children:"Sign out"}):s.jsx(Ot.Item,{onSelect:()=>fg({includeCurrent:!0}),children:"Sign In"})]})]})})]})})]})}/**
   * table-core
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */function Ct(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Ga(e,t){return typeof e=="function"?e(t):e}function Wr(e,t){return n=>{t.setState(r=>({...r,[e]:Ga(n,r[e])}))}}function k0(e){return e instanceof Function}function ule(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function cle(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function Ae(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const l=e(i);if(!(l.length!==r.length||l.some((d,f)=>r[f]!==d)))return o;r=l;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...l),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-c)*100)/100,h=f/16,p=(g,v)=>{for(g=String(g);g.length<v;)g=" "+g;return g};console.info(`%c⏱ ${p(f,5)} /${p(d,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function Ne(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function dle(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:Ae(()=>[e,n,t,i],(a,l,u,c)=>({table:a,column:l,row:u,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Ne(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}function fle(e,t,n,r){var o,i;const l={...e._getDefaultColumnDef(),...t},u=l.accessorKey;let c=(o=(i=l.id)!=null?i:u?u.replace(".","_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,d;if(l.accessorFn?d=l.accessorFn:u&&(u.includes(".")?d=h=>{let p=h;for(const v of u.split(".")){var g;p=(g=p)==null?void 0:g[v]}return p}:d=h=>h[l.accessorKey]),!c)throw new Error;let f={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:Ae(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Ne(e.options,"debugColumns")),getLeafColumns:Ae(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let g=f.columns.flatMap(v=>v.getLeafColumns());return h(g)}return[f]},Ne(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const On="debugHeaders";function a7(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],l=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(l),a.push(u)};return l(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const hle={createTable:e=>{e.getHeaderGroups=Ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const l=(i=r==null?void 0:r.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?i:[],u=(a=o==null?void 0:o.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],c=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(o!=null&&o.includes(f.id)));return Ym(t,[...l,...c,...u],e)},Ne(e.options,On)),e.getCenterHeaderGroups=Ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Ym(t,n,e,"center")),Ne(e.options,On)),e.getLeftHeaderGroups=Ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?o:[];return Ym(t,i,e,"left")},Ne(e.options,On)),e.getRightHeaderGroups=Ae(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?o:[];return Ym(t,i,e,"right")},Ne(e.options,On)),e.getFooterGroups=Ae(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ne(e.options,On)),e.getLeftFooterGroups=Ae(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ne(e.options,On)),e.getCenterFooterGroups=Ae(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ne(e.options,On)),e.getRightFooterGroups=Ae(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ne(e.options,On)),e.getFlatHeaders=Ae(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ne(e.options,On)),e.getLeftFlatHeaders=Ae(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ne(e.options,On)),e.getCenterFlatHeaders=Ae(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ne(e.options,On)),e.getRightFlatHeaders=Ae(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ne(e.options,On)),e.getCenterLeafHeaders=Ae(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ne(e.options,On)),e.getLeftLeafHeaders=Ae(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ne(e.options,On)),e.getRightLeafHeaders=Ae(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ne(e.options,On)),e.getLeafHeaders=Ae(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,l,u,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(l=n[0])==null?void 0:l.headers)!=null?a:[],...(u=(c=r[0])==null?void 0:c.headers)!=null?u:[]].map(d=>d.getLeafHeaders()).flat()},Ne(e.options,On))}};function Ym(e,t,n,r){var o,i;let a=0;const l=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(g=>g.getIsVisible()).forEach(g=>{var v;(v=g.columns)!=null&&v.length&&l(g.columns,p+1)},0)};l(e);let u=[];const c=(h,p)=>{const g={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];h.forEach(b=>{const x=[...v].reverse()[0],y=b.column.depth===g.depth;let w,S=!1;if(y&&b.column.parent?w=b.column.parent:(w=b.column,S=!0),x&&(x==null?void 0:x.column)===w)x.subHeaders.push(b);else{const C=a7(n,w,{id:[r,p,w.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${v.filter(E=>E.column===w).length}`:void 0,depth:p,index:v.length});C.subHeaders.push(b),v.push(C)}g.headers.push(b),b.headerGroup=g}),u.push(g),p>0&&c(v,p-1)},d=t.map((h,p)=>a7(n,h,{depth:a,index:p}));c(d,a-1),u.reverse();const f=h=>h.filter(g=>g.column.getIsVisible()).map(g=>{let v=0,b=0,x=[0];g.subHeaders&&g.subHeaders.length?(x=[],f(g.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:C}=w;v+=S,x.push(C)})):v=1;const y=Math.min(...x);return b=b+y,g.colSpan=v,g.rowSpan=b,{colSpan:v,rowSpan:b}});return f((o=(i=u[0])==null?void 0:i.headers)!=null?o:[]),u}const mle=(e,t,n,r,o,i,a)=>{let l={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(l._valuesCache.hasOwnProperty(u))return l._valuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return l._valuesCache[u]=c.accessorFn(l.original,r),l._valuesCache[u]},getUniqueValues:u=>{if(l._uniqueValuesCache.hasOwnProperty(u))return l._uniqueValuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(l._uniqueValuesCache[u]=c.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[u]):(l._uniqueValuesCache[u]=[l.getValue(u)],l._uniqueValuesCache[u])},renderValue:u=>{var c;return(c=l.getValue(u))!=null?c:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>cle(l.subRows,u=>u.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let u=[],c=l;for(;;){const d=c.getParentRow();if(!d)break;u.push(d),c=d}return u.reverse()},getAllCells:Ae(()=>[e.getAllLeafColumns()],u=>u.map(c=>dle(e,l,c,c.id)),Ne(e.options,"debugRows")),_getAllCellsByColumnId:Ae(()=>[l.getAllCells()],u=>u.reduce((c,d)=>(c[d.column.id]=d,c),{}),Ne(e.options,"debugRows"))};for(let u=0;u<e._features.length;u++){const c=e._features[u];c==null||c.createRow==null||c.createRow(l,e)}return l},ple={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},AM=(e,t,n)=>{var r;const o=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(o))};AM.autoRemove=e=>Oo(e);const NM=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};NM.autoRemove=e=>Oo(e);const FM=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};FM.autoRemove=e=>Oo(e);const MM=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};MM.autoRemove=e=>Oo(e)||!(e!=null&&e.length);const OM=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});OM.autoRemove=e=>Oo(e)||!(e!=null&&e.length);const _M=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});_M.autoRemove=e=>Oo(e)||!(e!=null&&e.length);const LM=(e,t,n)=>e.getValue(t)===n;LM.autoRemove=e=>Oo(e);const VM=(e,t,n)=>e.getValue(t)==n;VM.autoRemove=e=>Oo(e);const O$=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};O$.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const l=i;i=a,a=l}return[i,a]};O$.autoRemove=e=>Oo(e)||Oo(e[0])&&Oo(e[1]);const Ri={includesString:AM,includesStringSensitive:NM,equalsString:FM,arrIncludes:MM,arrIncludesAll:OM,arrIncludesSome:_M,equals:LM,weakEquals:VM,inNumberRange:O$};function Oo(e){return e==null||e===""}const gle={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Wr("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Ri.includesString:typeof r=="number"?Ri.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ri.equals:Array.isArray(r)?Ri.arrIncludes:Ri.weakEquals},e.getFilterFn=()=>{var n,r;return k0(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Ri[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(d=>d.id===e.id),a=Ga(n,i?i.value:void 0);if(s7(o,a,e)){var l;return(l=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?l:[]}const u={id:e.id,value:a};if(i){var c;return(c=r==null?void 0:r.map(d=>d.id===e.id?u:d))!=null?c:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=Ga(t,o))==null?void 0:i.filter(a=>{const l=n.find(u=>u.id===a.id);if(l){const u=l.getFilterFn();if(s7(u,a.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function s7(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const vle=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),yle=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},xle=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},ble=(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},wle=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},$le=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!ule(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},Sle=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Ele=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Cle=(e,t)=>t.length,T1={sum:vle,min:yle,max:xle,extent:ble,mean:wle,median:$le,unique:Sle,uniqueCount:Ele,count:Cle},Dle={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Wr("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return T1.sum;if(Object.prototype.toString.call(r)==="[object Date]")return T1.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return k0(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:T1[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function jle(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const Ple={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Wr("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ae(n=>[pf(t,n)],n=>n.findIndex(r=>r.id===e.id),Ne(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=pf(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=pf(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Ae(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],l=[...o];for(;l.length&&a.length;){const u=a.shift(),c=l.findIndex(d=>d.id===u);c>-1&&i.push(l.splice(c,1)[0])}i=[...i,...l]}return jle(i,n,r)},Ne(e.options,"debugTable"))}},I1=()=>({left:[],right:[]}),Rle={getInitialState:e=>({columnPinning:I1(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Wr("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var l,u;return{left:((l=o==null?void 0:o.left)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((u=o==null?void 0:o.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var c,d;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(l=>r==null?void 0:r.includes(l)),a=n.some(l=>o==null?void 0:o.includes(l));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},Ne(t.options,"debugRows")),e.getLeftVisibleCells=Ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),Ne(t.options,"debugRows")),e.getRightVisibleCells=Ae(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),Ne(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?I1():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:I1())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ne(e.options,"debugColumns")),e.getRightLeafColumns=Ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Ne(e.options,"debugColumns")),e.getCenterLeafColumns=Ae(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},Ne(e.options,"debugColumns"))}},Xm={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},A1=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),kle={getDefaultColumnDef:()=>Xm,getInitialState:e=>({columnSizing:{},columnSizingInfo:A1(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Wr("columnSizing",e),onColumnSizingInfoChange:Wr("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Xm.minSize,(r=i??e.columnDef.size)!=null?r:Xm.size),(o=e.columnDef.maxSize)!=null?o:Xm.maxSize)},e.getStart=Ae(n=>[n,pf(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),Ne(t.options,"debugColumns")),e.getAfter=Ae(n=>[n,pf(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),Ne(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),N1(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),l=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[r.id,r.getSize()]],u=N1(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(x,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(w=>{var S,C;const E=t.options.columnResizeDirection==="rtl"?-1:1,D=(y-((S=w==null?void 0:w.startOffset)!=null?S:0))*E,$=Math.max(D/((C=w==null?void 0:w.startSize)!=null?C:0),-.999999);return w.columnSizingStart.forEach(T=>{let[A,P]=T;c[A]=Math.round(Math.max(P+P*$,0)*100)/100}),{...w,deltaOffset:D,deltaPercentage:$}}),(t.options.columnResizeMode==="onChange"||x==="end")&&t.setColumnSizing(w=>({...w,...c})))},f=x=>d("move",x),h=x=>{d("end",x),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,g={moveHandler:x=>f(x.clientX),upHandler:x=>{p==null||p.removeEventListener("mousemove",g.moveHandler),p==null||p.removeEventListener("mouseup",g.upHandler),h(x.clientX)}},v={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),f(x.touches[0].clientX),!1),upHandler:x=>{var y;p==null||p.removeEventListener("touchmove",v.moveHandler),p==null||p.removeEventListener("touchend",v.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),h((y=x.touches[0])==null?void 0:y.clientX)}},b=Tle()?{passive:!1}:!1;N1(i)?(p==null||p.addEventListener("touchmove",v.moveHandler,b),p==null||p.addEventListener("touchend",v.upHandler,b)):(p==null||p.addEventListener("mousemove",g.moveHandler,b),p==null||p.addEventListener("mouseup",g.upHandler,b)),t.setColumnSizingInfo(x=>({...x,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?A1():(n=e.initialState.columnSizingInfo)!=null?n:A1())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Jm=null;function Tle(){if(typeof Jm=="boolean")return Jm;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Jm=e,Jm}function N1(e){return e.type==="touchstart"}const Ile={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Wr("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Ae(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ne(t.options,"debugRows")),e.getVisibleCells=Ae(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],Ne(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Ae(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),Ne(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function pf(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ale={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Nle={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Wr("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ri.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return k0(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Ri[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Fle={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Wr("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{a[l]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:l,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},I4=0,A4=10,F1=()=>({pageIndex:I4,pageSize:A4}),Mle={getInitialState:e=>({...e,pagination:{...F1(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Wr("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>Ga(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?F1():(o=e.initialState.pagination)!=null?o:F1())},e.setPageIndex=r=>{e.setPagination(o=>{let i=Ga(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?I4:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:I4)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?A4:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:A4)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,Ga(r,o.pageSize)),a=o.pageSize*o.pageIndex,l=Math.floor(a/i);return{...o,pageIndex:l,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=Ga(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=Ae(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},Ne(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},M1=()=>({top:[],bottom:[]}),Ole={getInitialState:e=>({rowPinning:M1(),...e}),getDefaultOptions:e=>({onRowPinningChange:Wr("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(u=>{let{id:c}=u;return c}):[],a=o?e.getParentRows().map(u=>{let{id:c}=u;return c}):[],l=new Set([...a,e.id,...i]);t.setRowPinning(u=>{var c,d;if(n==="bottom"){var f,h;return{top:((f=u==null?void 0:u.top)!=null?f:[]).filter(v=>!(l!=null&&l.has(v))),bottom:[...((h=u==null?void 0:u.bottom)!=null?h:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)]}}if(n==="top"){var p,g;return{top:[...((p=u==null?void 0:u.top)!=null?p:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)],bottom:((g=u==null?void 0:u.bottom)!=null?g:[]).filter(v=>!(l!=null&&l.has(v)))}}return{top:((c=u==null?void 0:u.top)!=null?c:[]).filter(v=>!(l!=null&&l.has(v))),bottom:((d=u==null?void 0:u.bottom)!=null?d:[]).filter(v=>!(l!=null&&l.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(l=>r==null?void 0:r.includes(l)),a=n.some(l=>o==null?void 0:o.includes(l));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=t._getPinnedRows(o))==null?void 0:n.map(a=>{let{id:l}=a;return l});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?M1():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:M1())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=Ae(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const l=e.getRow(a,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(a=>t.find(l=>l.id===a))).filter(Boolean).map(a=>({...a,position:r}))},Ne(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=Ae(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},Ne(e.options,"debugRows"))}},_le={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Wr("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{N4(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ae(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?O1(e,n):{rows:[],flatRows:[],rowsById:{}},Ne(e.options,"debugTable")),e.getFilteredSelectedRowModel=Ae(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?O1(e,n):{rows:[],flatRows:[],rowsById:{}},Ne(e.options,"debugTable")),e.getGroupedSelectedRowModel=Ae(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?O1(e,n):{rows:[],flatRows:[],rowsById:{}},Ne(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const l={...i};return N4(l,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return _$(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return F4(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return F4(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},N4=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(l=>N4(e,l.id,n,r,o))};function O1(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,l){return a.map(u=>{var c;const d=_$(u,n);if(d&&(r.push(u),o[u.id]=u),(c=u.subRows)!=null&&c.length&&(u={...u,subRows:i(u.subRows)}),d)return u}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function _$(e,t){var n;return(n=t[e.id])!=null?n:!1}function F4(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(_$(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const l=F4(a,t);l==="all"?i=!0:(l==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const M4=/([0-9]+)/gm,Lle=(e,t,n)=>BM(xs(e.getValue(n)).toLowerCase(),xs(t.getValue(n)).toLowerCase()),Vle=(e,t,n)=>BM(xs(e.getValue(n)),xs(t.getValue(n))),Ble=(e,t,n)=>L$(xs(e.getValue(n)).toLowerCase(),xs(t.getValue(n)).toLowerCase()),zle=(e,t,n)=>L$(xs(e.getValue(n)),xs(t.getValue(n))),Ule=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},qle=(e,t,n)=>L$(e.getValue(n),t.getValue(n));function L$(e,t){return e===t?0:e>t?1:-1}function xs(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function BM(e,t){const n=e.split(M4).filter(Boolean),r=t.split(M4).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),l=parseInt(i,10),u=[a,l].sort();if(isNaN(u[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}return n.length-r.length}const jd={alphanumeric:Lle,alphanumericCaseSensitive:Vle,text:Ble,textCaseSensitive:zle,datetime:Ule,basic:qle},Hle={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Wr("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return jd.datetime;if(typeof i=="string"&&(r=!0,i.split(M4).length>1))return jd.alphanumeric}return r?jd.text:jd.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return k0(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:jd[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const l=a==null?void 0:a.find(p=>p.id===e.id),u=a==null?void 0:a.findIndex(p=>p.id===e.id);let c=[],d,f=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?l?d="toggle":d="add":a!=null&&a.length&&u!==a.length-1?d="replace":l?d="toggle":d="replace",d==="toggle"&&(i||o||(d="remove")),d==="add"){var h;c=[...a,{id:e.id,desc:f}],c.splice(0,c.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=a.map(p=>p.id===e.id?{...p,desc:f}:p):d==="remove"?c=a.filter(p=>p.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Wle=[hle,Ile,Ple,Rle,ple,gle,Ale,Nle,Hle,Dle,Fle,Mle,Ole,_le,kle];function Gle(e){var t,n;const r=[...Wle,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),a=h=>o.options.mergeOptions?o.options.mergeOptions(i,h):{...i,...h};let u={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(h=>{var p;u=(p=h.getInitialState==null?void 0:h.getInitialState(u))!=null?p:u});const c=[];let d=!1;const f={_features:r,options:{...i,...e},initialState:u,_queue:h=>{c.push(h),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:h=>{const p=Ga(h,o.options);o.options=a(p)},getState:()=>o.options.state,setState:h=>{o.options.onStateChange==null||o.options.onStateChange(h)},_getRowId:(h,p,g)=>{var v;return(v=o.options.getRowId==null?void 0:o.options.getRowId(h,p,g))!=null?v:`${g?[g.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(h,p)=>{let g=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[h];if(!g&&(g=o.getCoreRowModel().rowsById[h],!g))throw new Error;return g},_getDefaultColumnDef:Ae(()=>[o.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:g=>{const v=g.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:g=>{var v,b;return(v=(b=g.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...o._features.reduce((g,v)=>Object.assign(g,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...h}},Ne(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Ae(()=>[o._getColumnDefs()],h=>{const p=function(g,v,b){return b===void 0&&(b=0),g.map(x=>{const y=fle(o,x,b,v),w=x;return y.columns=w.columns?p(w.columns,y,b+1):[],y})};return p(h)},Ne(e,"debugColumns")),getAllFlatColumns:Ae(()=>[o.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Ne(e,"debugColumns")),_getAllFlatColumnsById:Ae(()=>[o.getAllFlatColumns()],h=>h.reduce((p,g)=>(p[g.id]=g,p),{}),Ne(e,"debugColumns")),getAllLeafColumns:Ae(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(h,p)=>{let g=h.flatMap(v=>v.getLeafColumns());return p(g)},Ne(e,"debugColumns")),getColumn:h=>o._getAllFlatColumnsById()[h]};Object.assign(o,f);for(let h=0;h<o._features.length;h++){const p=o._features[h];p==null||p.createTable==null||p.createTable(o)}return o}function Ml(){return e=>Ae(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const l=[];for(let c=0;c<o.length;c++){const d=mle(e,e._getRowId(o[c],c,a),o[c],c,i,void 0,a==null?void 0:a.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,l.push(d),e.options.getSubRows){var u;d.originalSubRows=e.options.getSubRows(o[c],c),(u=d.originalSubRows)!=null&&u.length&&(d.subRows=r(d.originalSubRows,i+1,d))}}return l};return n.rows=r(t),n},Ne(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
   * react-table
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */function l7(e,t){return e?Kle(e)?m.createElement(e,t):e:null}function Kle(e){return Qle(e)||typeof e=="function"||Zle(e)}function Qle(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Zle(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Ol(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=m.useState(()=>({current:Gle(t)})),[r,o]=m.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function Yle(){const[e,t]=m.useState([]),[n,r]=m.useState(),o=m.useCallback(()=>{const a=e.pop();r(a),t(e)},[e]),i=m.useCallback(a=>{t(l=>[...l,n]),r(a)},[n]);return{currentPage:n,goToNextPage:i,goToPrevPage:o,hasPrev:e.length>0}}const _l=({rowClassName:e,rowHeight:t="small",table:n,singleSelect:r,multiSelect:o,...i})=>s.jsxs(Ue,{...i,children:[s.jsx(Ue.Header,{children:n.getHeaderGroups().map(a=>s.jsx(Ue.HeaderRow,{children:a.headers.map(l=>{var u;return s.jsx(Ue.HeadCell,{className:(u=l.column.columnDef.meta)==null?void 0:u.thClassName,children:l7(l.column.columnDef.header,l.getContext())},l.id)})},a.id))}),s.jsx(Ue.Body,{children:n.getRowModel().rows.map(a=>{const l=r&&a.getCanSelect()?{className:ne(e,"cursor-pointer"),selected:a.getIsSelected(),onClick:()=>n.setRowSelection(()=>({[a.id]:!0}))}:{className:e},u=o&&a.getCanMultiSelect()?{className:"cursor-pointer",onClick:()=>a.toggleSelected()}:{};return s.jsx(Ue.Row,{...l,children:a.getAllCells().map((c,d)=>{var f;return s.jsx(Ue.Cell,{...d===0?u:{},className:(f=c.column.columnDef.meta)==null?void 0:f.tdClassName,height:t,children:l7(c.column.columnDef.cell,c.getContext())},c.column.id)})},a.id)})})]}),vn=(e,t,n)=>({Table:m.useMemo(()=>Xle(e,t,n),[e,ai(t),ai(n)])}),ft=25,Xle=(e,t,n)=>function({debug:o,pagination:i="page",pageSize:a=ft,rowHeight:l="small",emptyState:u,columns:c}){const{currentPage:d,goToNextPage:f,goToPrevPage:h,hasPrev:p}=Yle(),{data:g,isLoading:v}=Ze(e,{path:t.path,query:{...t.query,page_token:d,limit:a}},n),b=m.useMemo(()=>(g==null?void 0:g.items)||[],[g]),x=m.useCallback(S=>S.name,[]),y=Ol({columns:c,data:b,getRowId:x,getCoreRowModel:Ml(),manualPagination:!0});return o&&console.table((g==null?void 0:g.items)||g),v?null:b.length===0&&!p?s.jsx(ys,{children:u||s.jsx(nt,{title:"No results"})}):s.jsxs(s.Fragment,{children:[s.jsx(_l,{table:y,rowHeight:l}),s.jsx(N$,{inline:i==="inline",pageSize:a,hasNext:b.length===a,hasPrev:p,nextPage:g==null?void 0:g.nextPage,onNext:f,onPrev:h})]})};var zM={exports:{}},UM={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],o=0,i=0;o<n.length;o++,i+=8)r[i>>>5]|=n[o]<<24-i%32;return r},wordsToBytes:function(n){for(var r=[],o=0;o<n.length*32;o+=8)r.push(n[o>>>5]>>>24-o%32&255);return r},bytesToHex:function(n){for(var r=[],o=0;o<n.length;o++)r.push((n[o]>>>4).toString(16)),r.push((n[o]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],o=0;o<n.length;o+=2)r.push(parseInt(n.substr(o,2),16));return r},bytesToBase64:function(n){for(var r=[],o=0;o<n.length;o+=3)for(var i=n[o]<<16|n[o+1]<<8|n[o+2],a=0;a<4;a++)o*8+a*6<=n.length*8?r.push(e.charAt(i>>>6*(3-a)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],o=0,i=0;o<n.length;i=++o%4)i!=0&&r.push((e.indexOf(n.charAt(o-1))&Math.pow(2,-2*i+8)-1)<<i*2|e.indexOf(n.charAt(o))>>>6-i*2);return r}};UM.exports=t})();var Jle=UM.exports,O4={utf8:{stringToBytes:function(e){return O4.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(O4.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n)&255);return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},u7=O4;/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var eue=function(e){return e!=null&&(qM(e)||tue(e)||!!e._isBuffer)};function qM(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function tue(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&qM(e.slice(0,0))}(function(){var e=Jle,t=u7.utf8,n=eue,r=u7.bin,o=function(i,a){i.constructor==String?a&&a.encoding==="binary"?i=r.stringToBytes(i):i=t.stringToBytes(i):n(i)?i=Array.prototype.slice.call(i,0):!Array.isArray(i)&&i.constructor!==Uint8Array&&(i=i.toString());for(var l=e.bytesToWords(i),u=i.length*8,c=1732584193,d=-271733879,f=-1732584194,h=271733878,p=0;p<l.length;p++)l[p]=(l[p]<<8|l[p]>>>24)&16711935|(l[p]<<24|l[p]>>>8)&4278255360;l[u>>>5]|=128<<u%32,l[(u+64>>>9<<4)+14]=u;for(var g=o._ff,v=o._gg,b=o._hh,x=o._ii,p=0;p<l.length;p+=16){var y=c,w=d,S=f,C=h;c=g(c,d,f,h,l[p+0],7,-680876936),h=g(h,c,d,f,l[p+1],12,-389564586),f=g(f,h,c,d,l[p+2],17,606105819),d=g(d,f,h,c,l[p+3],22,-1044525330),c=g(c,d,f,h,l[p+4],7,-176418897),h=g(h,c,d,f,l[p+5],12,1200080426),f=g(f,h,c,d,l[p+6],17,-1473231341),d=g(d,f,h,c,l[p+7],22,-45705983),c=g(c,d,f,h,l[p+8],7,1770035416),h=g(h,c,d,f,l[p+9],12,-1958414417),f=g(f,h,c,d,l[p+10],17,-42063),d=g(d,f,h,c,l[p+11],22,-1990404162),c=g(c,d,f,h,l[p+12],7,1804603682),h=g(h,c,d,f,l[p+13],12,-40341101),f=g(f,h,c,d,l[p+14],17,-1502002290),d=g(d,f,h,c,l[p+15],22,1236535329),c=v(c,d,f,h,l[p+1],5,-165796510),h=v(h,c,d,f,l[p+6],9,-1069501632),f=v(f,h,c,d,l[p+11],14,643717713),d=v(d,f,h,c,l[p+0],20,-373897302),c=v(c,d,f,h,l[p+5],5,-701558691),h=v(h,c,d,f,l[p+10],9,38016083),f=v(f,h,c,d,l[p+15],14,-660478335),d=v(d,f,h,c,l[p+4],20,-405537848),c=v(c,d,f,h,l[p+9],5,568446438),h=v(h,c,d,f,l[p+14],9,-1019803690),f=v(f,h,c,d,l[p+3],14,-187363961),d=v(d,f,h,c,l[p+8],20,1163531501),c=v(c,d,f,h,l[p+13],5,-1444681467),h=v(h,c,d,f,l[p+2],9,-51403784),f=v(f,h,c,d,l[p+7],14,1735328473),d=v(d,f,h,c,l[p+12],20,-1926607734),c=b(c,d,f,h,l[p+5],4,-378558),h=b(h,c,d,f,l[p+8],11,-2022574463),f=b(f,h,c,d,l[p+11],16,1839030562),d=b(d,f,h,c,l[p+14],23,-35309556),c=b(c,d,f,h,l[p+1],4,-1530992060),h=b(h,c,d,f,l[p+4],11,1272893353),f=b(f,h,c,d,l[p+7],16,-155497632),d=b(d,f,h,c,l[p+10],23,-1094730640),c=b(c,d,f,h,l[p+13],4,681279174),h=b(h,c,d,f,l[p+0],11,-358537222),f=b(f,h,c,d,l[p+3],16,-722521979),d=b(d,f,h,c,l[p+6],23,76029189),c=b(c,d,f,h,l[p+9],4,-640364487),h=b(h,c,d,f,l[p+12],11,-421815835),f=b(f,h,c,d,l[p+15],16,530742520),d=b(d,f,h,c,l[p+2],23,-995338651),c=x(c,d,f,h,l[p+0],6,-198630844),h=x(h,c,d,f,l[p+7],10,1126891415),f=x(f,h,c,d,l[p+14],15,-1416354905),d=x(d,f,h,c,l[p+5],21,-57434055),c=x(c,d,f,h,l[p+12],6,1700485571),h=x(h,c,d,f,l[p+3],10,-1894986606),f=x(f,h,c,d,l[p+10],15,-1051523),d=x(d,f,h,c,l[p+1],21,-2054922799),c=x(c,d,f,h,l[p+8],6,1873313359),h=x(h,c,d,f,l[p+15],10,-30611744),f=x(f,h,c,d,l[p+6],15,-1560198380),d=x(d,f,h,c,l[p+13],21,1309151649),c=x(c,d,f,h,l[p+4],6,-145523070),h=x(h,c,d,f,l[p+11],10,-1120210379),f=x(f,h,c,d,l[p+2],15,718787259),d=x(d,f,h,c,l[p+9],21,-343485551),c=c+y>>>0,d=d+w>>>0,f=f+S>>>0,h=h+C>>>0}return e.endian([c,d,f,h])};o._ff=function(i,a,l,u,c,d,f){var h=i+(a&l|~a&u)+(c>>>0)+f;return(h<<d|h>>>32-d)+a},o._gg=function(i,a,l,u,c,d,f){var h=i+(a&u|l&~u)+(c>>>0)+f;return(h<<d|h>>>32-d)+a},o._hh=function(i,a,l,u,c,d,f){var h=i+(a^l^u)+(c>>>0)+f;return(h<<d|h>>>32-d)+a},o._ii=function(i,a,l,u,c,d,f){var h=i+(l^(a|~u))+(c>>>0)+f;return(h<<d|h>>>32-d)+a},o._blocksize=16,o._digestsize=16,zM.exports=function(i,a){if(i==null)throw new Error("Illegal argument "+i);var l=e.wordsToBytes(o(i,a));return a&&a.asBytes?l:a&&a.asString?r.bytesToString(l):e.bytesToHex(l)}})();var nue=zM.exports;const rue=pi(nue),oue=e=>{const t=rue(e),n=[];for(let r=0;r<18;r++){const o=t.charCodeAt(r)%2===0;r<3?(n.push({x:2,y:r,isOn:o}),n.push({x:3,y:r,isOn:o})):r<6?(n.push({x:1,y:r-3,isOn:o}),n.push({x:4,y:r-3,isOn:o})):r<9&&(n.push({x:0,y:r-6,isOn:o}),n.push({x:5,y:r-6,isOn:o}))}return n};function V$({name:e,className:t}){const n=m.useMemo(()=>oue(e),[e]);return s.jsx("div",{className:t,children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",children:s.jsx("g",{fill:"currentColor",children:n.map(r=>{if(!r.isOn)return null;const o=r.x*3+2*r.x,i=r.y*8+2*r.y;return s.jsx("rect",{x:o,y:i,width:"3",height:"8"},`${o}|${i}`)})})})})}const vl=e=>s.jsxs(Ot.Root,{children:[s.jsxs("div",{className:"after:text-mono-lg flex w-full items-center justify-between after:mx-4 after:content-['/'] after:text-quinary last-of-type:after:content-none",children:[e.current?s.jsx(Zv,{when:e.to,with:s.jsx(Rr,{to:e.to,className:"-m-1 grow rounded-lg p-1 hover:bg-hover"}),children:s.jsxs("div",{className:"flex min-w-[120px] max-w-[185px] items-center pr-2",children:[e.icon?s.jsx("div",{className:"mr-2 flex items-center",children:e.icon}):null,s.jsxs("div",{className:"overflow-hidden",children:[s.jsx("div",{className:"text-mono-xs text-quaternary",children:e.category}),s.jsx("div",{className:"w-full overflow-hidden text-ellipsis whitespace-nowrap text-sans-md text-secondary",children:e.display??e.current})]})]})}):s.jsxs(Ot.Trigger,{className:"group -m-1 flex items-center overflow-hidden rounded-lg p-1 text-left hover:bg-hover","aria-hidden":!0,children:[e.icon?s.jsx("div",{className:"mr-2 flex items-center",children:e.icon}):null,s.jsxs("div",{className:"min-w-[5rem] text-mono-xs text-quaternary",children:["Select",s.jsx("br",{}),e.category]})]}),e.items&&s.jsx("div",{className:"ml-2 shrink-0",children:s.jsx(Ot.Trigger,{className:"group","aria-label":e["aria-label"],asChild:!0,children:s.jsx(Je,{size:"icon",variant:"ghost",className:"h-[2rem] w-[1.125rem]",children:s.jsx(Zw,{className:"text-secondary","aria-hidden":!0})})})})]}),e.items&&s.jsx(Ot.Portal,{children:s.jsx(Ot.Content,{className:"mt-2 max-h-80 min-w-[12.8125rem] overflow-y-auto",align:"start",children:e.items.length>0?e.items.map(({label:t,to:n})=>{const r=e.current===t;return s.jsx(Ot.Item,{asChild:!0,children:s.jsx(Rr,{to:n,className:ne({"is-selected":r}),children:s.jsxs("span",{className:"flex w-full items-center justify-between",children:[s.jsx(Ps,{text:t,maxLength:24}),r&&s.jsx(Vo,{className:"-mr-3 block"})]})})},t)}):s.jsx(Ot.Item,{className:"!pr-3 !text-center !text-secondary hover:cursor-default",onSelect:()=>{},disabled:!0,children:e.noItemsText||"No items found"})})})]}),_4=({name:e})=>s.jsx(V$,{className:"flex h-[34px] w-[34px] items-center justify-center rounded text-accent bg-accent-secondary-hover",name:e});function T0({value:e}){const{me:t,isFleetViewer:n}=Kl();if(!n)return s.jsx(vl,{"aria-label":`${t.siloName} - Oxide Web Console`,icon:s.jsx(_4,{name:t.siloName}),category:"Silo",current:"Silo",display:t.siloName,to:B.projects()});const r={items:[{label:"System",to:B.silos()},{label:"Silo",to:B.projects()}],"aria-label":"Switch between system and silo"};return e==="system"?s.jsx(vl,{...r,category:"System",current:"System",display:"Oxide Computer Co.",to:B.silos()}):s.jsx(vl,{...r,icon:s.jsx(_4,{name:t.siloName}),category:"Silo",current:"Silo",display:t.siloName,to:B.projects()})}function iue(){const{silo:e}=Gl(),{data:t}=Ze("siloList",{query:{limit:ft}}),n=((t==null?void 0:t.items)||[]).map(r=>({label:r.name,to:B.silo({silo:r.name})}));return s.jsx(vl,{"aria-label":"Switch silo",category:"Silo",icon:s.jsx(_4,{name:e}),current:e,items:n,noItemsText:"No silos found"})}function aue(){const{pool:e}=Es(),{data:t}=Ze("ipPoolList",{query:{limit:10}}),n=((t==null?void 0:t.items)||[]).map(r=>({label:r.name,to:B.ipPool({pool:r.name})}));return s.jsx(vl,{"aria-label":"Switch pool",category:"IP Pools",current:e,items:n,noItemsText:"No IP pools found"})}const sue=()=>s.jsx("div",{className:"flex h-[34px] w-[34px] items-center justify-center rounded text-secondary bg-secondary",children:s.jsx(Th,{})});function HM({project:e}){const{data:t}=Ze("projectList",{query:{limit:200}}),n=((t==null?void 0:t.items)||[]).map(({name:r})=>({label:r,to:B.project({project:r})}));return s.jsx(vl,{"aria-label":"Switch project",icon:e?void 0:s.jsx(sue,{}),category:"Project",current:e==null?void 0:e.name,to:e?B.project({project:e.name}):void 0,items:n,noItemsText:"No projects found"})}function lue(){const e=sa(),{instance:t}=e;return s.jsx(vl,{"aria-label":"Switch instance",category:"Instance",current:t,to:B.instanceStorage(e),noItemsText:"No instances found"})}const WM="flex h-7 items-center rounded px-2 text-sans-md hover:bg-hover [&>svg]:mr-2 [&>svg]:text-quinary text-secondary",I0=()=>s.jsx("li",{children:s.jsxs("a",{className:WM,href:"https://docs.oxide.computer",target:"_blank",rel:"noreferrer",children:[s.jsx(nk,{})," Docs"]})}),uue=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"cmd":"ctrl",cue=()=>s.jsxs(Je,{variant:"ghost",size:"sm",onClick:D8,className:"w-full !px-2",innerClassName:"w-full justify-between text-quaternary",children:[s.jsxs("span",{className:"flex items-center",children:[s.jsx(uW,{className:"mr-2 text-quinary"})," Jump to"]}),s.jsxs("div",{className:"text-mono-xs",children:[uue,"+K"]})]});function qr({children:e}){return s.jsxs("div",{className:"flex flex-col border-r text-sans-md text-default border-secondary",children:[s.jsx("div",{className:"mx-3 mt-4",children:s.jsx(cue,{})}),e]})}qr.Nav=({children:e,heading:t})=>s.jsxs("div",{className:"mx-3 my-4 space-y-1",children:[t&&s.jsx("div",{className:"mb-2 text-mono-sm text-quaternary",children:s.jsx(Ps,{text:t,maxLength:24})}),s.jsx("nav",{children:s.jsx("ul",{className:"space-y-0.5",children:e})})]});const wn=e=>{const t=qn().pathname.startsWith(`${e.to}-new`);return s.jsx("li",{children:s.jsx(ez,{to:e.to,className:({isActive:n})=>ne(WM,{"text-accent !bg-accent-secondary hover:!bg-accent-secondary-hover [&>svg]:!text-accent-tertiary":n||t,"pointer-events-none text-disabled":e.disabled}),end:e.end,children:e.children})})};Wd.loader=async({params:e})=>(await ae.prefetchQuery("projectView",{path:Uo(e)}),null);function Wd({overrideContentPane:e}){const t=Fe(),n=ut(),{data:r}=Pe("projectView",{path:n}),{instance:o}=Sv(),{pathname:i}=qn();return la(m.useMemo(()=>[{value:"Instances",path:B.instances(n)},{value:"Disks",path:B.disks(n)},{value:"Snapshots",path:B.snapshots(n)},{value:"Images",path:B.projectImages(n)},{value:"VPCs",path:B.vpcs(n)},{value:"Floating IPs",path:B.floatingIps(n)},{value:"Access",path:B.projectAccess(n)}].filter(a=>a.path!==i).map(a=>({navGroup:`Project '${r.name}'`,value:a.value,onSelect:()=>t(a.path)})),[i,t,r.name,n])),s.jsxs(D0,{children:[s.jsxs(R0,{children:[s.jsx(T0,{value:"silo"}),s.jsx(HM,{project:r}),o&&s.jsx(lue,{})]}),s.jsxs(qr,{children:[s.jsxs(qr.Nav,{children:[s.jsxs(wn,{to:B.projects(),end:!0,children:[s.jsx(Th,{}),"Projects"]}),s.jsx(I0,{})]}),s.jsx(Xc,{}),s.jsxs(qr.Nav,{heading:r.name,children:[s.jsxs(wn,{to:B.instances(n),children:[s.jsx(Bv,{})," Instances"]}),s.jsxs(wn,{to:B.disks(n),children:[s.jsx(Gw,{})," Disks"]}),s.jsxs(wn,{to:B.snapshots(n),children:[s.jsx(lk,{})," Snapshots"]}),s.jsxs(wn,{to:B.projectImages(n),children:[s.jsx(Rl,{title:"images"})," Images"]}),s.jsxs(wn,{to:B.vpcs(n),children:[s.jsx(ok,{})," VPCs"]}),s.jsxs(wn,{to:B.floatingIps(n),children:[s.jsx(fs,{})," Floating IPs"]}),s.jsxs(wn,{to:B.projectAccess(n),children:[s.jsx(kh,{title:"Access"})," Access"]})]})]}),e||s.jsx(j0,{})]})}const due=({heading:e,children:t})=>s.jsxs("div",{children:[s.jsx("h3",{className:"mb-2 text-sans-semi-md text-default",children:e}),s.jsx("ul",{className:"space-y-1 text-sans-md text-tertiary",children:t})]}),_1=({to:e,label:t})=>s.jsx("li",{children:s.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"group flex items-center space-x-2",children:[s.jsx(Ih,{className:"text-accent group-hover:text-accent"}),s.jsx("span",{className:"group-hover:text-default",children:t})]},e)});function L1({href:e,children:t}){return s.jsx("a",{href:e,className:"text-accent-secondary hover:text-accent",target:"_blank",rel:"noreferrer",children:t})}function fue(){const[e,t]=m.useState(!1),n=()=>t(!1);return s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:"absolute z-topBar flex h-10 w-full items-center justify-center text-sans-md text-info-secondary bg-info-secondary [&+*]:pt-10",children:[s.jsx(fW,{className:"mr-2"})," This is a technical preview.",s.jsxs("button",{type:"button",className:"ml-2 flex items-center gap-0.5 text-sans-md hover:text-info",onClick:()=>t(!0),children:["Learn more ",s.jsx(fk,{})]})]}),s.jsxs($e,{isOpen:e,onDismiss:n,title:"Console Technical Preview",children:[s.jsxs($e.Section,{children:[s.jsxs("p",{children:["This is the ",s.jsx(L1,{href:"https://oxide.computer/",children:"Oxide"})," ","web console running against an in-browser mock API powered by"," ",s.jsx(L1,{href:"https://mswjs.io/",children:"Mock Service Worker"}),". You can create mock resources and they will persist across client-side navigations, but nobody else can see them and they will disappear on refresh."]}),s.jsxs("p",{children:["Request and response bodies in the mock API match the"," ",s.jsx(L1,{href:"https://github.com/oxidecomputer/omicron/blob/main/openapi/nexus.json",children:"OpenAPI document"}),". Behavior is only mocked in as much detail as is required for console development and testing and is not fully representative."]})]}),s.jsx($e.Section,{children:s.jsxs(due,{heading:"Relevant repositories",children:[s.jsx(_1,{to:"https://github.com/oxidecomputer/console",label:"Web console"}),s.jsx(_1,{to:"https://github.com/oxidecomputer/oxide.ts",label:"TypeScript API client generator"}),s.jsx(_1,{to:"https://github.com/oxidecomputer/omicron",label:"Control plane and API"})]})}),s.jsx("footer",{className:"flex items-center justify-end border-t px-3 py-3 border-secondary",children:s.jsx(Je,{size:"sm",onClick:n,children:"Close"})})]})]})}const hue=({timeout:e,onTimeoutEnd:t,className:n})=>{const r=Dh(!0,{from:{width:"0%"},enter:{width:"100%"},leave:{width:"100%"},config:{duration:e}});return P$(t,e),kr.skipAnimation?null:r(o=>s.jsx(jh.div,{className:ne("absolute bottom-0 left-0 h-0.5 w-0",n),style:o}))},mue={success:s.jsx(Vo,{}),error:s.jsx(hs,{}),info:s.jsx(Qw,{})},c7={success:"Success",error:"Error",info:"Note"},pue={success:"bg-accent-secondary",error:"bg-error-secondary",info:"bg-notice-secondary"},d7={success:"text-accent children:text-accent",error:"text-error children:text-error",info:"text-notice children:text-notice"},gue={success:"text-accent-secondary",error:"text-error-secondary",info:"text-notice-secondary"},vue={success:"bg-accent-raise",error:"bg-destructive-raise",info:"bg-notice-raise"},yue=({title:e,content:t,onClose:n,variant:r="success",timeout:o,cta:i})=>{const l=o===void 0?r==="error"?15e3:5e3:o;return m.useEffect(()=>Xf((e||c7[r])+" "+t,"polite"),[e,t,r]),s.jsxs("div",{className:ne("relative flex w-96 items-start overflow-hidden rounded-lg p-4",pue[r],d7[r]),children:[s.jsx("div",{className:"mt-[2px] flex [&>svg]:h-3 [&>svg]:w-3",children:mue[r]}),s.jsxs("div",{className:"flex-1 pl-2.5",children:[s.jsx("div",{className:"text-sans-semi-md",children:e||c7[r]}),s.jsx("div",{className:ne("text-sans-md",gue[r]),children:t}),i&&s.jsx(Rr,{className:"mt-3 block text-mono-sm text-accent-secondary hover:text-accent",to:i.link,children:s.jsx(Ps,{text:i.text,maxLength:36})})]}),s.jsx("button",{type:"button","aria-label":"Dismiss notification",className:ne("-m-2 flex h-auto !border-transparent p-2",d7[r]),onClick:n,children:s.jsx(Uv,{})}),l!==null&&s.jsx(hue,{timeout:l,onTimeoutEnd:n,className:vue[r]})]})};function xue(){const e=Cw(n=>n.toasts),t=Dh(e,{keys:n=>n.id,from:{opacity:0,y:10,scale:95},enter:{opacity:1,y:0,scale:100},leave:{opacity:0,y:10,scale:95},config:{duration:100}});return s.jsx("div",{className:"pointer-events-auto fixed bottom-4 left-4 z-toast flex flex-col items-end space-y-2",children:t((n,r)=>s.jsx(jh.div,{style:{opacity:n.opacity,y:n.y,transform:n.scale.to(o=>`scale(${o}%, ${o}%)`)},children:s.jsx(yue,{...r.options,onClose:()=>{var o,i;AU(r.id),(i=(o=r.options).onClose)==null||i.call(o)}},r.id)}))})}function bue(e){return!!(e.handle&&typeof e.handle=="object"&&"crumb"in e.handle)}function wue(e){const t=typeof e.handle.crumb;return vo(t==="string"||t==="function",`Route crumb must be a string or function if present. Check <Route> for ${e.pathname}.`),e}const $ue=()=>RB().filter(bue).map(wue).map(e=>typeof e.handle.crumb=="function"?e.handle.crumb(e):e.handle.crumb).reverse().concat("Oxide Console").join(" / ");function Sue(){const e=$ue();return m.useEffect(()=>{document.title=e},[e]),s.jsxs(s.Fragment,{children:[s.jsx(Cue,{}),s.jsx(fue,{}),s.jsx(an,{}),s.jsx(xue,{})]})}const Eue=20;function Cue(){const e=kP(),t=m.useRef(null),n=m.useRef(!1);return n.current=e.state==="loading",m.useEffect(()=>{const r=e.state==="loading";if(t.current)if(r){const o=setTimeout(()=>{var i,a,l;n.current&&((i=t.current)==null||i.classList.remove("loading","done"),(a=t.current)==null||a.scrollTop,(l=t.current)==null||l.classList.add("loading"))},Eue);return()=>clearTimeout(o)}else t.current.classList.contains("loading")&&t.current.classList.replace("loading","done")},[e]),s.jsx("div",{className:"fixed left-0 right-0 top-0 z-50",children:s.jsx("div",{ref:t,className:"global-loading-bar h-px bg-accent"})})}function Due(){const e=Fe(),{pathname:t}=qn();return la(m.useMemo(()=>[{value:"Profile",path:B.profile()},{value:"SSH Keys",path:B.sshKeys()}].filter(n=>n.path!==t).map(n=>({navGroup:"Settings",value:n.value,onSelect:()=>e(n.path)})),[t,e])),s.jsxs(D0,{children:[s.jsx(R0,{children:s.jsx(T0,{value:"silo"})}),s.jsxs(qr,{children:[s.jsxs(qr.Nav,{children:[s.jsxs(wn,{to:B.projects(),children:[s.jsx(Th,{})," Projects"]}),s.jsx(I0,{})]}),s.jsx(Xc,{}),s.jsxs(qr.Nav,{heading:"User",children:[s.jsxs(wn,{to:B.profile(),children:[s.jsx(ik,{})," Profile"]}),s.jsxs(wn,{to:B.sshKeys(),children:[s.jsx(Ww,{})," SSH Keys"]})]})]}),s.jsx(j0,{})]})}function jue(){const e=Fe(),{pathname:t}=qn(),{me:n}=Kl();return la(m.useMemo(()=>[{value:"Projects",path:B.projects()},{value:"Images",path:B.siloImages()},{value:"Utilization",path:B.siloUtilization()},{value:"Access",path:B.siloAccess()}].filter(r=>r.path!==t).map(r=>({navGroup:`Silo '${n.siloName}'`,value:r.value,onSelect:()=>e(r.path)})),[t,e,n.siloName])),s.jsxs(D0,{children:[s.jsxs(R0,{children:[s.jsx(T0,{value:"silo"}),s.jsx(HM,{})]}),s.jsxs(qr,{children:[s.jsx(qr.Nav,{children:s.jsx(I0,{})}),s.jsx(Xc,{}),s.jsxs(qr.Nav,{heading:n.siloName,children:[s.jsxs(wn,{to:B.projects(),children:[s.jsx(Th,{})," Projects"]}),s.jsxs(wn,{to:B.siloImages(),children:[s.jsx(Rl,{})," Images"]}),s.jsxs(wn,{to:B.siloUtilization(),children:[s.jsx(zv,{})," Utilization"]}),s.jsxs(wn,{to:B.siloAccess(),children:[s.jsx(kh,{})," Access"]})]})]}),s.jsx(j0,{})]})}L4.loader=async()=>{if(!await ae.fetchQuery("systemPolicyView",{}).then(()=>!0).catch(()=>!1))throw S2;return null};function L4(){const{silo:e,pool:t}=Sv(),n=Fe(),{pathname:r}=qn(),{me:o}=Kl(),i=m.useMemo(()=>{const a=[{value:"Silos",path:B.silos()},{value:"Utilization",path:B.systemUtilization()},{value:"Inventory",path:B.inventory()},{value:"IP Pools",path:B.ipPools()}].filter(u=>u.path!==r).map(u=>({navGroup:"System",value:u.value,onSelect:()=>n(u.path)})),l={navGroup:`Back to silo '${o.siloName}'`,value:"Projects",onSelect:()=>n(B.projects())};return[...a,l]},[r,n,o.siloName]);return la(i),s.jsxs(D0,{children:[s.jsxs(R0,{children:[s.jsx(T0,{value:"system"}),e&&s.jsx(iue,{}),t&&s.jsx(aue,{})]}),s.jsxs(qr,{children:[s.jsx(qr.Nav,{children:s.jsx(I0,{})}),s.jsx(Xc,{}),s.jsxs(qr.Nav,{heading:"System",children:[s.jsxs(wn,{to:B.silos(),children:[s.jsx(Hw,{})," Silos"]}),s.jsxs(wn,{to:B.systemUtilization(),children:[s.jsx(zv,{})," Utilization"]}),s.jsxs(wn,{to:B.inventory(),children:[s.jsx(sk,{})," Inventory"]}),s.jsxs(wn,{to:B.ipPools(),children:[s.jsx(fs,{})," IP Pools"]})]})]}),s.jsx(j0,{})]})}function Pue(){return s.jsxs("div",{className:"flex w-full max-w-[470px] flex-col items-center rounded-lg border p-9 text-center !bg-raise border-secondary elevation-3",children:[s.jsxs("div",{className:"my-2 flex h-12 w-12 items-center justify-center",children:[s.jsx("div",{className:"absolute h-12 w-12 rounded-full opacity-20 bg-accent motion-safe:animate-[ping_2s_cubic-bezier(0,0,0.2,1)_infinite]"}),s.jsx(Vo,{className:"relative h-8 w-8 text-accent"})]}),s.jsx("h1",{className:"mt-4 text-sans-2xl text-accent",children:"Device logged in"}),s.jsx("p",{className:"mt-1 text-sans-lg text-tertiary",children:"You can close this window"})]})}const V1="[a-zA-Z]{1}",GM=e=>e.tagName.toLowerCase()==="input";function f7(e){let t=e;for(;t.nextElementSibling;){if(GM(t.nextElementSibling))return t.nextElementSibling;t=t.nextElementSibling}return null}function Rue(e){let t=e;for(;t.previousElementSibling;){if(GM(t.previousElementSibling))return t.previousElementSibling;t=t.previousElementSibling}return null}const kue=()=>s.jsx("span",{className:"flex items-center px-1 text-quinary",children:s.jsx("span",{className:"mb-0.5",children:"–"})}),Tue=m.forwardRef(({ariaLabel:e,autoFocus:t=!0,containerClassName:n,disabled:r,inputClassName:o,length:i=6,placeholder:a,onChange:l,dashAfterIdxs:u=[]},c)=>{vo(!isNaN(i)||i>0,"Length must be a number greater than 0"),vo(u.every(x=>0<=x&&x<i-1),'"Dash after" indices must mark spots between inputs, i.e., 0 <= i < length - 1');const d=m.useRef([]);m.useImperativeHandle(c,()=>({focus:()=>{d.current&&d.current[0].focus()},clear:()=>{if(d.current){for(const x of d.current)x.value="";d.current[0].focus()}f()}})),m.useEffect(()=>{t&&d.current[0].focus()},[t]);const f=()=>{const x=d.current.map(y=>y.value).join("").toUpperCase();l&&l(x)},h=x=>{const{value:y}=x.target,w=f7(x.target);y.length>1?(x.target.value=y.charAt(0),w&&w.focus()):y.match(V1)?w&&w.focus():x.target.value="",f()},p=x=>{const y=x.target;if(x.key===Hi.backspace){if(y.value===""){const w=Rue(y);w!==null&&(w.value="",w.focus(),x.preventDefault())}else y.value="";f()}},g=x=>{x.target.select()},v=x=>{const y=x.clipboardData.getData("Text");let w=0;for(let S=0;S<y.length;S++){const C=y.charAt(S),E=d.current[w].value;if(C.match(V1)&&!E){const D=d.current[w];D.value=C;const $=f7(D);$!==null&&($.focus(),w++)}}f(),x.preventDefault()},b=[];for(let x=0;x<i;x++)b.push(s.jsx("input",{type:"text",inputMode:"text",onChange:h,onKeyDown:p,onFocus:g,onPaste:v,pattern:V1,ref:y=>{d.current[x]=y},maxLength:1,className:o,autoComplete:"off","aria-label":e?`${e}. Character ${x+1}.`:`Character ${x+1}.`,disabled:r,placeholder:a},x)),u.includes(x)&&b.push(s.jsx(kue,{},`${x}-dash`));return s.jsx("div",{className:n,children:b})}),h7=[3];function Iue(e,t){let n="";for(let r=0;r<t.length;r++)n+=t[r],e.includes(r)&&(n+="-");return n}function Aue(){const e=Fe(),t=fe("deviceAuthConfirm",{onSuccess:()=>{e(B.deviceSuccess())}}),[n,r]=m.useState("");return s.jsxs("form",{className:"w-full max-w-[470px] rounded-lg border p-9 text-center !bg-raise border-secondary elevation-3",onSubmit:o=>{o.preventDefault(),n&&t.mutate({body:{userCode:Iue(h7,n)}})},children:[s.jsx("h1",{className:"mb-1 text-sans-2xl text-accent",children:"Device Authentication"}),s.jsx("p",{className:"mb-8 text-sans-lg text-tertiary",children:"Enter the code shown on your device"}),s.jsx(Tue,{onChange:o=>r(o),containerClassName:"flex space-x-2 mb-6",inputClassName:"rounded border border-default bg-default w-full aspect-square flex items-center justify-center text-center text-secondary text-mono-md",length:8,dashAfterIdxs:h7}),s.jsx(Je,{className:"w-full !text-mono-sm",type:"submit",loading:t.isPending,disabled:t.isPending||t.isSuccess||n.length<8,children:"Log in on device"}),t.isError&&s.jsxs("div",{className:"mt-3 flex items-center justify-center text-sans-md text-error",children:[s.jsx(Qw,{})," ",s.jsx("div",{className:"ml-1",children:"Code is invalid"})]})]})}const Nue={username:"",password:""};function Fue(){const[e]=bw(),t=Fe(),{silo:n}=Gl(),r=Ge({defaultValues:Nue}),o=fe("loginLocal");return m.useEffect(()=>{o.isSuccess&&(De({title:"Logged in"}),t(e.get("redirect_uri")||B.projects()))},[o.isSuccess,t,e]),s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3 flex items-end space-x-3",children:[s.jsx(V$,{className:"flex h-[34px] w-[34px] items-center justify-center rounded text-accent bg-accent-secondary-hover",name:n}),s.jsx("div",{className:"text-sans-2xl text-default",children:n})]}),s.jsx("hr",{className:"my-6 w-full border-0 border-b border-b-secondary"}),s.jsxs("form",{className:"w-full space-y-4",onSubmit:r.handleSubmit(i=>{o.mutate({body:i,path:{siloName:n}})}),children:[s.jsx("div",{children:s.jsx(Ag,{name:"username",placeholder:"Username",autoComplete:"username",required:!0,control:r.control})}),s.jsx("div",{children:s.jsx(Ag,{name:"password",type:"password",placeholder:"Password",required:!0,control:r.control})}),s.jsx(Je,{type:"submit",className:"w-full",disabled:o.isPending,children:"Sign in"}),o.isError&&s.jsx("div",{className:"text-center text-error",children:"Could not sign in. Please try again."})]})]})}function Mue(){var i;const[e]=bw(),{silo:t,provider:n}=x8(),r=(i=e.get("redirect_uri"))==null?void 0:i.trim(),o=r?`?redirect_uri=${r}`:"";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3 flex items-end space-x-3",children:[s.jsx(V$,{className:"flex h-[34px] w-[34px] items-center justify-center rounded text-accent bg-accent-secondary-hover",name:t}),s.jsx("div",{className:"text-sans-2xl text-default",children:t})]}),s.jsx("hr",{className:"my-6 w-full border-0 border-b border-b-secondary"}),s.jsxs("a",{className:ne(Ql({}),"w-full"),href:`/login/${t}/saml/${n}/redirect${o}`,children:["Sign in with ",n]})]})}async function m7({params:e}){try{const t=await ae.fetchQuery("instanceView",{path:{instance:e.instance}}),n=await ae.fetchQuery("projectView",{path:{project:t.projectId}});return UV(B.instance({project:n.name,instance:t.name}))}catch{throw S2}}const V4=({tooltipTitle:e,children:t,numInCell:n=1})=>{const r=U.Children.toArray(t),o=r.slice(0,n),i=r.slice(n),a=s.jsxs("div",{children:[s.jsx("div",{className:"mb-2",children:e}),s.jsxs("div",{className:"flex flex-col items-start gap-2",children:[...i]})]});return s.jsxs("div",{className:"flex items-baseline gap-2",children:[o,i.length>0&&s.jsx(vi,{content:a,placement:"bottom",children:s.jsxs("div",{className:"text-mono-sm",children:["+",i.length]})})]})},KM={identityId:"",roleName:""},A0=Uz.map(e=>({value:e,label:rr(e)})),QM=e=>({value:e.id,label:s.jsxs(s.Fragment,{children:[e.displayName,e.identityType==="silo_group"&&s.jsx(tt,{color:"neutral",className:"ml-2",children:"Group"})]}),selectedLabel:e.displayName});function Oue({onDismiss:e,policy:t}){const{project:n}=ut(),r=HP(t),o=ke(),i=fe("projectPolicyUpdate",{onSuccess:()=>{o.invalidateQueries("projectPolicyView"),e()}}),a=Ge({defaultValues:KM});return s.jsxs(ht,{title:"Add user or group",resourceName:"role",form:a,formType:"create",onSubmit:({identityId:l,roleName:u})=>{if(u==="")return;const c=r.find(d=>d.id===l).identityType;i.mutate({path:{project:n},body:Dv({identityId:l,identityType:c,roleName:u},t)})},loading:i.isPending,submitError:i.error,submitLabel:"Assign role",onDismiss:e,children:[s.jsx(Pn,{name:"identityId",items:r.map(QM),label:"User or group",required:!0,control:a.control}),s.jsx(Pn,{name:"roleName",label:"Role",items:A0,required:!0,control:a.control})]})}function _ue({onDismiss:e,name:t,identityId:n,identityType:r,policy:o,defaultValues:i}){const{project:a}=ut(),l=ke(),u=fe("projectPolicyUpdate",{onSuccess:()=>{l.invalidateQueries("projectPolicyView"),e()}}),c=Ge({defaultValues:i});return s.jsx(ht,{form:c,formType:"edit",resourceName:"role",title:`Change project role for ${t}`,onSubmit:({roleName:d})=>{u.mutate({path:{project:a},body:Dv({identityId:n,identityType:r,roleName:d},o)})},loading:u.isPending,submitError:u.error,onDismiss:e,children:s.jsx(Pn,{name:"roleName",label:"Role",items:A0,required:!0,control:c.control})})}const Hn=({doDelete:e,label:t,resourceKind:n,extraContent:r})=>()=>{const o=typeof t=="string"?s.jsx(rn,{children:t}):t,i=n?`Confirm delete ${n}`:"Confirm delete";Pv.setState({actionConfig:{doAction:e,modalContent:s.jsxs("p",{children:["Are you sure you want to delete ",o,"? ",r]}),errorTitle:"Could not delete resource",modalTitle:i,actionType:"danger"}})};function sr(e,t){return m.useMemo(()=>[...e,da(t)],[e,t])}const da=e=>({id:"menu",header:"",meta:{thClassName:"action-col",tdClassName:"action-col children:p-0 w-10"},cell:({row:t})=>{const n=e(t.original),r=typeof t.original.id=="string"?t.original.id:null;return s.jsxs(Ot.Root,{children:[s.jsx(Ot.Trigger,{className:"flex h-full w-10 items-center justify-center","aria-label":"Row actions",onClick:o=>o.stopPropagation(),children:s.jsx(dk,{className:"text-tertiary"})}),s.jsx(Ot.Portal,{children:s.jsxs(Ot.Content,{align:"end",className:"-mt-3 mr-2",children:[r&&s.jsx(Ot.Item,{onSelect:()=>{window.navigator.clipboard.writeText(r)},children:"Copy ID"}),n.map(o=>s.jsx(Zv,{when:!!o.disabled,with:s.jsx(vi,{content:o.disabled}),children:s.jsx(Ot.Item,{className:ne(o.className,{destructive:o.label.toLowerCase()==="delete"&&!o.disabled}),onSelect:o.onActivate,disabled:!!o.disabled,children:o.label})},hz(`action-${o.label}`)))]})})]})}}),yl=({children:e,...t})=>s.jsxs(Je,{size:"sm",className:"shrink-0",...t,children:[s.jsx(uk,{className:ne("mr-2",{"text-accent-secondary":!t.disabled})}),e]}),Jr=({children:e,...t})=>s.jsxs(Rr,{className:Ql({size:"sm"}),...t,children:[s.jsx(uk,{className:"mr-2 text-accent-secondary"}),e]}),ZM={silo_group:"Group",silo_user:"User"},YM={admin:"default",collaborator:"purple",viewer:"blue"},Lue=({onClick:e})=>s.jsx(ys,{children:s.jsx(nt,{icon:s.jsx(Ov,{}),title:"No authorized users",body:"Give permission to view, edit, or administer this project",buttonText:"Add user or group to project",onClick:e})});B4.loader=async({params:e})=>{const{project:t}=Uo(e);return await Promise.all([ae.prefetchQuery("policyView",{}),ae.prefetchQuery("projectPolicyView",{path:{project:t}}),ae.prefetchQuery("userList",{}),ae.prefetchQuery("groupList",{})]),null};const B1=Ct();function B4(){const[e,t]=m.useState(!1),[n,r]=m.useState(null),{project:o}=ut(),{data:i}=Pe("policyView",{}),a=pb(i.roleAssignments,"silo"),{data:l}=Pe("projectPolicyView",{path:{project:o}}),u=pb(l.roleAssignments,"project"),c=m.useMemo(()=>b2(a.concat(u),g=>g.id).map(([g,v])=>{const{name:b,identityType:x}=v[0],y=v.find(C=>C.roleSource==="silo"),w=v.find(C=>C.roleSource==="project"),S=Cv([y,w].filter(C=>!!C),C=>ww[C.roleName]);return{id:g,identityType:x,name:b,projectRole:w==null?void 0:w.roleName,roleBadges:S}}).sort(qP),[a,u]),d=ke(),f=fe("projectPolicyUpdate",{onSuccess:()=>d.invalidateQueries("projectPolicyView")}),h=m.useMemo(()=>[B1.accessor("name",{header:"Name"}),B1.accessor("identityType",{header:"Type",cell:g=>ZM[g.getValue()]}),B1.accessor("roleBadges",{header:()=>s.jsxs("span",{className:"inline-flex items-center",children:["Role",s.jsx(Ac,{className:"ml-2",children:"A user or group's effective role for this project is the strongest role on either the silo or project."})]}),cell:g=>s.jsx(V4,{tooltipTitle:"Other roles",children:g.getValue().map(({roleName:v,roleSource:b})=>s.jsxs(tt,{color:YM[v],children:[b,".",v]},b))})}),da(g=>[{label:"Change role",onActivate:()=>r(g),disabled:!g.projectRole&&"You don't have permission to change this user's role"},{label:"Delete",onActivate:Hn({doDelete:()=>f.mutateAsync({path:{project:o},body:UP(g.id,l)}),label:s.jsxs("span",{children:["the ",s.jsx(rn,{children:g.projectRole})," role for ",s.jsx(rn,{children:g.name})]})}),disabled:!g.projectRole&&"You don't have permission to delete this user"}])],[l,o,f]),p=Ol({columns:h,data:c,getCoreRowModel:Ml()});return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Ov,{}),children:"Access"}),s.jsx(En,{heading:"access",icon:s.jsx(kh,{}),summary:"Roles determine who can view, edit, or administer this project. Silo roles are inherited from the silo. If a user or group has both a silo and project role, the stronger role takes precedence.",links:[lt.keyConceptsIam,lt.access]})]}),s.jsx(Xr,{children:s.jsx(yl,{onClick:()=>t(!0),children:"Add user or group"})}),l&&e&&s.jsx(Oue,{onDismiss:()=>t(!1),policy:l}),l&&(n==null?void 0:n.projectRole)&&s.jsx(_ue,{onDismiss:()=>r(null),policy:l,name:n.name,identityId:n.id,identityType:n.identityType,defaultValues:{roleName:n.projectRole}}),c.length===0?s.jsx(Lue,{onClick:()=>t(!0)}):s.jsx(_l,{table:p})]})}const Vue={creating:{color:"purple",variant:"solid"},starting:{color:"blue",variant:"solid"},running:{color:"default"},rebooting:{color:"notice"},stopping:{color:"notice"},stopped:{color:"neutral",variant:"solid"},repairing:{color:"notice",variant:"solid"},migrating:{color:"notice",variant:"solid"},failed:{color:"destructive",variant:"solid"},destroyed:{color:"neutral",variant:"solid"}},N0=e=>s.jsx(tt,{...Vue[e.status],className:e.className,children:e.status}),Bue={attached:{color:"default"},attaching:{color:"blue",variant:"solid"},creating:{color:"purple",variant:"solid"},detaching:{color:"notice",variant:"solid"},detached:{color:"neutral",variant:"solid"},destroyed:{color:"destructive",variant:"solid"},faulted:{color:"destructive",variant:"solid"},maintenance:{color:"notice",variant:"solid"},import_ready:{color:"blue",variant:"solid"},importing_from_url:{color:"purple",variant:"solid"},importing_from_bulk_writes:{color:"purple",variant:"solid"},finalizing:{color:"blue",variant:"solid"}},XM=e=>s.jsx(tt,{...Bue[e.status],className:e.className,children:e.status}),zue={creating:"notice",destroyed:"neutral",faulted:"destructive",ready:"default"},Uue=e=>s.jsx(tt,{color:zue[e.status],className:e.className,children:e.status}),eu=()=>s.jsx("span",{className:"text-sans-md text-quinary",children:"—"}),Rs=St.div`h-4 w-12 rounded bg-tertiary motion-safe:animate-pulse`,que="link-with-underline group flex h-full w-full items-center text-sans-semi-md",Hue=St.div`absolute inset-0 right-px group-hover:bg-raise`,xi=e=>t=>{const n=t.getValue();return s.jsx(tu,{to:e(n),children:n})};function tu({to:e,children:t}){return s.jsxs(Rr,{className:que,to:e,children:[s.jsx(Hue,{}),s.jsx("div",{className:"relative",children:t})]})}const JM=({instanceId:e})=>{const{project:t}=ut(),{data:n}=Ze("instanceView",{path:{instance:e}},{enabled:!!e});return e?n?s.jsx(tu,{to:B.instance({project:t,instance:n.name}),children:n.name}):s.jsx(Rs,{}):null};function p7(e){return s.jsx(mi,{date:e.getValue()})}function Wue(e){const t=Cs(e.getValue(),{base:2,output:"object"});return s.jsxs("span",{className:"text-secondary",children:[t.value," ",s.jsx("span",{className:"text-quaternary",children:t.unit})]})}const eO=({text:e})=>e?s.jsx(Ps,{text:e,maxLength:48}):s.jsx(eu,{}),Xe={description:{cell:e=>s.jsx(eO,{text:e.getValue()})},size:{cell:Wue},timeCreated:{header:"created",cell:p7},timeModified:{header:"modified",cell:p7}},Gue=e=>s.jsx("span",{className:"text-default",children:e},e),Ka=e=>E8(e.map(Gue),s.jsx(s.Fragment,{children:", "}),s.jsx(s.Fragment,{children:" or "})),Kue=()=>s.jsx(nt,{icon:s.jsx(Vv,{}),title:"No disks",body:"Create a disk to see it here",buttonText:"New disk",buttonTo:B.disksNew(ut())});z4.loader=async({params:e})=>{const{project:t}=Uo(e);return await Promise.all([ae.prefetchQuery("diskList",{query:{project:t,limit:ft}}),ae.fetchQuery("instanceList",{query:{project:t,limit:200}}).then(n=>{for(const r of n.items)ae.setQueryData("instanceView",{path:{instance:r.id}},r)})]),null};const Pd=Ct(),Que=[Pd.accessor("name",{}),Pd.accessor(e=>"instance"in e.state?e.state.instance:void 0,{header:"Attached to",cell:e=>s.jsx(JM,{instanceId:e.getValue()})}),Pd.accessor("size",Xe.size),Pd.accessor("state.state",{header:"Status",cell:e=>s.jsx(XM,{status:e.getValue()})}),Pd.accessor("timeCreated",Xe.timeCreated)];function z4(){const e=ke(),{project:t}=ut(),{Table:n}=vn("diskList",{query:{project:t}}),r=fe("diskDelete",{onSuccess(){e.invalidateQueries("diskList")}}),o=fe("snapshotCreate",{onSuccess(){e.invalidateQueries("snapshotList"),De({content:"Snapshot successfully created"})},onError(l){De({title:"Failed to create snapshot",content:l.message,variant:"error"})}}),i=m.useCallback(l=>[{label:"Snapshot",onActivate(){De({title:`Creating snapshot of disk '${l.name}'`}),o.mutate({query:{project:t},body:{name:Sw(l.name),disk:l.name,description:""}})},disabled:!Va.snapshot(l)&&s.jsxs(s.Fragment,{children:["Only disks in state ",Ka(Va.snapshot.states)," can be snapshotted"]})},{label:"Delete",onActivate:Hn({doDelete:()=>r.mutateAsync({path:{disk:l.name},query:{project:t}}),label:l.name}),disabled:!Va.delete(l)&&(l.state.state==="attached"?"Disk must be detached before it can be deleted":s.jsxs(s.Fragment,{children:["Only disks in state ",Ka(Va.delete.states)," can be deleted"]}))}],[o,r,t]),a=sr(Que,i);return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Vv,{}),children:"Disks"}),s.jsx(En,{heading:"disks",icon:s.jsx(Gw,{}),summary:"Disks are persistent volumes that can be managed independently from VM instances.",links:[lt.disks]})]}),s.jsx(Xr,{children:s.jsx(Jr,{to:B.disksNew({project:t}),children:"New Disk"})}),s.jsx(n,{columns:a,emptyState:s.jsx(Kue,{})}),s.jsx(an,{})]})}const Zue=()=>s.jsx(nt,{icon:s.jsx(Ss,{}),title:"No floating IPs",body:"Create a floating IP to see it here",buttonText:"New Floating IP",buttonTo:B.floatingIpsNew(ut())});U4.loader=async({params:e})=>{const{project:t}=Uo(e);return await Promise.all([ae.prefetchQuery("floatingIpList",{query:{project:t,limit:ft}}),ae.prefetchQuery("instanceList",{query:{project:t}}),ae.fetchQuery("projectIpPoolList",{query:{limit:1e3}}).then(n=>{for(const r of n.items)ae.setQueryData("projectIpPoolView",{path:{pool:r.id}},r)})]),null};const Yue=({ipPoolId:e})=>{const t=Ze("projectIpPoolView",{path:{pool:e}}).data;return t?t.description?s.jsx(vi,{content:t.description,placement:"right",children:s.jsx("span",{children:t.name})}):s.jsx(s.Fragment,{children:t.name}):s.jsx(eu,{})},Rd=Ct(),Xue=[Rd.accessor("name",{}),Rd.accessor("description",Xe.description),Rd.accessor("ip",{header:"IP address"}),Rd.accessor("ipPoolId",{cell:e=>s.jsx(Yue,{ipPoolId:e.getValue()}),header:"IP pool"}),Rd.accessor("instanceId",{cell:e=>s.jsx(JM,{instanceId:e.getValue()}),header:"Attached to instance"})];function U4(){const[e,t]=m.useState(null),n=ke(),{project:r}=ut(),{data:o}=Pe("instanceList",{query:{project:r}}),i=Fe(),a=fe("floatingIpDetach",{onSuccess(){n.invalidateQueries("floatingIpList"),De({content:"Your floating IP has been detached"})},onError:f=>{De({title:"Error",content:f.message,variant:"error"})}}),l=fe("floatingIpDelete",{onSuccess(){n.invalidateQueries("floatingIpList"),n.invalidateQueries("ipPoolUtilizationView"),De({content:"Your floating IP has been deleted"})}}),u=m.useCallback(f=>{var b;const h=f.instanceId?(b=o.items.find(x=>x.id===f.instanceId))==null?void 0:b.name:void 0,p=h?s.jsxs(s.Fragment,{children:[" ","from instance ",s.jsx(rn,{children:h})]}):null,g=!!f.instanceId;return[{label:"Edit",onActivate:()=>{ae.setQueryData("floatingIpView",{path:{floatingIp:f.name},query:{project:r}},f),i(B.floatingIpEdit({project:r,floatingIp:f.name}))}},g?{label:"Detach",onActivate:()=>os({actionType:"danger",doAction:()=>a.mutateAsync({path:{floatingIp:f.name},query:{project:r}}),modalTitle:"Detach Floating IP",modalContent:s.jsxs("p",{children:["Are you sure you want to detach floating IP ",s.jsx(rn,{children:f.name}),p,"? The instance will no longer be reachable at"," ",s.jsx(rn,{children:f.ip}),"."]}),errorTitle:"Error detaching floating IP"})}:{label:"Attach",onActivate(){t(f)}},{label:"Delete",disabled:g?"This floating IP must be detached from the instance before it can be deleted":!1,onActivate:Hn({doDelete:()=>l.mutateAsync({path:{floatingIp:f.name},query:{project:r}}),label:f.name})}]},[l,a,i,r,o]),{Table:c}=vn("floatingIpList",{query:{project:r}}),d=sr(Xue,u);return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Ss,{}),children:"Floating IPs"}),s.jsx(En,{heading:"floating IPs",icon:s.jsx(fs,{}),summary:"Floating IPs exist independently of instances and can be attached to and detached from them as needed.",links:[lt.floatingIps]})]}),s.jsx(Xr,{children:s.jsx(Jr,{to:B.floatingIpsNew({project:r}),children:"New Floating IP"})}),s.jsx(c,{columns:d,emptyState:s.jsx(Zue,{})}),s.jsx(an,{}),e&&s.jsx(Jue,{floatingIp:e.name,address:e.ip,instances:o.items,project:r,onDismiss:()=>t(null)})]})}const Jue=({floatingIp:e,address:t,instances:n,project:r,onDismiss:o})=>{const i=ke(),a=fe("floatingIpAttach",{onSuccess(){i.invalidateQueries("floatingIpList"),De({content:"Your floating IP has been attached"}),o()},onError:u=>{De({title:"Error",content:u.message,variant:"error"})}}),l=Kv({defaultValues:{instanceId:""}});return s.jsxs($e,{isOpen:!0,title:"Attach floating IP",onDismiss:o,children:[s.jsx($e.Body,{children:s.jsxs($e.Section,{children:[s.jsx(Bt,{variant:"info",content:s.jsxs(s.Fragment,{children:["The selected instance will be reachable at ",s.jsx(rn,{children:t})]})}),s.jsx("form",{children:s.jsx(ta,{name:"instanceId",items:n.map(u=>({value:u.id,label:u.name})),label:"Instance",onChange:u=>{l.setValue("instanceId",u)},required:!0,placeholder:"Select an instance",selected:l.watch("instanceId")})})]})}),s.jsx($e.Footer,{actionText:"Attach",disabled:!l.getValues("instanceId"),onAction:()=>a.mutate({path:{floatingIp:e},query:{project:r},body:{kind:"instance",parent:l.getValues("instanceId")}}),onDismiss:o})]})},ece=()=>s.jsx(nt,{icon:s.jsx(_v,{}),title:"No images",body:"Create an image to see it here"}),ep=Ct();q4.loader=async({params:e})=>{const{project:t}=Uo(e);return await ae.prefetchQuery("imageList",{query:{project:t,limit:ft}}),null};function q4(){const{project:e}=ut(),{Table:t}=vn("imageList",{query:{project:e}}),n=ke(),[r,o]=m.useState(null),i=fe("imageDelete",{onSuccess(u,c){De({content:`${c.path.image} has been deleted`}),n.invalidateQueries("imageList")}}),a=m.useCallback(u=>[{label:"Promote",onActivate:()=>o(u.name)},{label:"Delete",onActivate:Hn({doDelete:()=>i.mutateAsync({path:{image:u.name},query:{project:e}}),label:u.name})}],[i,e]),l=m.useMemo(()=>[ep.accessor("name",{cell:xi(u=>B.projectImageEdit({project:e,image:u}))}),ep.accessor("description",Xe.description),ep.accessor("size",Xe.size),ep.accessor("timeCreated",Xe.timeCreated),da(a)],[e,a]);return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(_v,{}),children:"Project Images"}),s.jsx(En,{heading:"Images",icon:s.jsx(Rl,{}),summary:"Images let you create a new disk based on an existing one. Images can be uploaded directly or created from a snapshot.",links:[lt.images]})]}),s.jsx(Xr,{children:s.jsx(Jr,{to:B.projectImagesNew({project:e}),children:"Upload image"})}),s.jsx(t,{columns:l,emptyState:s.jsx(ece,{})}),r&&s.jsx(tce,{onDismiss:()=>o(null),imageName:r}),s.jsx(an,{})]})}const tce=({onDismiss:e,imageName:t})=>{const{project:n}=ut(),r=ke(),o=fe("imagePromote",{onSuccess(a){De({content:`${a.name} has been promoted`,cta:{text:"View silo images",link:"/images"}}),r.invalidateQueries("imageList")},onError:a=>{De({title:"Error",content:a.message,variant:"error"})},onSettled:e}),i=()=>{o.mutate({path:{image:t},query:{project:n}})};return s.jsxs($e,{isOpen:!0,onDismiss:e,title:"Promote image",children:[s.jsx($e.Body,{children:s.jsxs($e.Section,{children:[s.jsxs("p",{children:["Are you sure you want to promote"," ",s.jsx("span",{className:"text-sans-semi-md text-default",children:t}),"?"]}),s.jsx(Bt,{variant:"info",content:"Once an image has been promoted it is visible to all projects in a silo"})]})}),s.jsx($e.Footer,{onDismiss:e,onAction:i,actionText:"Promote"})]})},B$=({ip:e,isLinked:t=!0})=>s.jsxs("span",{className:"flex items-center gap-1",children:[t?s.jsx("a",{className:"link-with-underline text-sans-semi-md",href:`https://${e}`,target:"_blank",rel:"noreferrer",children:e}):e,s.jsx(R$,{text:e})]});function nce({project:e,instance:t}){const{data:n,isPending:r}=Ze("instanceExternalIpList",{path:{instance:t},query:{project:e}});if(r)return s.jsx(Rs,{});const o=n==null?void 0:n.items;return!o||o.length===0?s.jsx(eu,{}):s.jsx("div",{className:"flex items-center gap-1",children:E8(o.map(i=>s.jsx(B$,{ip:i.ip},i.ip)),s.jsx("span",{className:"text-quinary",children:" / "}))})}const rce=({actions:e,label:t})=>s.jsxs(Ot.Root,{children:[s.jsx(Ot.Trigger,{"aria-label":t,className:"flex h-8 w-8 items-center justify-center rounded border border-default hover:bg-tertiary",children:s.jsx(dk,{className:"text-tertiary"})}),s.jsx(Ot.Content,{align:"end",className:"mt-2",children:e.map(n=>s.jsx(Zv,{when:!!n.disabled,with:s.jsx(vi,{content:n.disabled}),children:s.jsx(Ot.Item,{className:n.className,disabled:!!n.disabled,onSelect:n.onActivate,children:n.label})},n.label))})]});function tO({onClick:e}){const[t,n]=m.useState(!1);async function r(){n(!0),await e(),n(!1)}return s.jsx(Je,{size:"icon",variant:"ghost",onClick:r,"aria-label":"Refresh data",children:s.jsx(Yw,{isLoading:t,minTime:300,children:s.jsx(ak,{})})})}const oce=({to:e,end:t})=>{const n=$h(e),r=qn(),o=n.pathname,i=r.pathname;return i===o||!t&&i.startsWith(o)&&i.charAt(o.length)==="/"},ice=e=>{const t=e.target;if(e.key===Hi.left){e.stopPropagation(),e.preventDefault();const n=t.previousSibling??t.parentElement.lastChild;n.focus(),n.click()}else if(e.key===Hi.right){e.stopPropagation(),e.preventDefault();const n=t.nextSibling??t.parentElement.firstChild;n.focus(),n.click()}};function F0({children:e,fullWidth:t}){return s.jsxs("div",{className:ne("ox-tabs",{"full-width":t}),children:[s.jsx("div",{role:"tablist",className:"ox-tabs-list",onKeyDown:ice,children:e}),s.jsx("div",{className:"ox-tabs-panel",role:"tabpanel",tabIndex:0,children:s.jsx(an,{})})]})}const Vi=({to:e,children:t})=>{const n=oce({to:e});return s.jsx(Rr,{role:"tab",to:e,className:ne("ox-tab",{"is-selected":n}),tabIndex:n?0:-1,"aria-selected":n,children:s.jsx("div",{children:t})})},nO=(e,t={})=>{const n=Fe(),r={onSuccess:t.onSuccess},o=fe("instanceStart",r),i=fe("instanceStop",r),a=fe("instanceReboot",r),l=fe("instanceDelete",{onSuccess:t.onDelete});return m.useCallback(u=>{const c={...e,instance:u.name},d={path:{instance:u.name},query:e};return[{label:"Start",onActivate(){o.mutate(d,{onSuccess:()=>De({title:`Starting instance '${u.name}'`}),onError:f=>De({variant:"error",title:`Error starting instance '${u.name}'`,content:f.message})})},disabled:!_n.start(u)&&s.jsxs(s.Fragment,{children:["Only ",Ka(_n.start.states)," instances can be started"]})},{label:"Stop",onActivate(){os({actionType:"danger",doAction:()=>i.mutateAsync(d,{onSuccess:()=>De({title:`Stopping instance '${u.name}'`})}),modalTitle:"Confirm stop instance",modalContent:s.jsxs("p",{children:["Are you sure you want to stop ",s.jsx(rn,{children:u.name}),"? Stopped instances retain attached disks and IP addresses, but allocated CPU and memory are freed."]}),errorTitle:`Error stopping ${u.name}`})},disabled:!_n.stop(u)&&s.jsxs(s.Fragment,{children:["Only ",Ka(_n.stop.states)," instances can be stopped"]})},{label:"Reboot",onActivate(){a.mutate(d,{onSuccess:()=>De({title:`Rebooting instance '${u.name}'`}),onError:f=>De({variant:"error",title:`Error rebooting instance '${u.name}'`,content:f.message})})},disabled:!_n.reboot(u)&&s.jsxs(s.Fragment,{children:["Only ",Ka(_n.reboot.states)," instances can be rebooted"]})},{label:"View serial console",onActivate(){n(B.serialConsole(c))}},{label:"Delete",onActivate:Hn({doDelete:()=>l.mutateAsync(d,{onSuccess:()=>De({title:`Deleting instance '${u.name}'`})}),label:u.name,resourceKind:"instance",extraContent:"Any attached disks will be detached but not deleted."}),disabled:!_n.delete(u)&&s.jsxs(s.Fragment,{children:["Only ",Ka(_n.delete.states)," instances can be deleted"]}),className:_n.delete(u)?"destructive":""}]},[e,l,n,a,o,i])};function rO(e){const t=e.find(n=>n.primary);return t?t.vpcId:void 0}async function g7(){await Promise.all([ae.invalidateQueries("instanceView"),ae.invalidateQueries("instanceExternalIpList"),ae.invalidateQueries("instanceNetworkInterfaceList"),ae.invalidateQueries("instanceDiskList"),ae.invalidateQueries("diskMetricsList")])}H4.loader=async({params:e})=>{const{project:t,instance:n}=Wc(e);return await Promise.all([ae.prefetchQuery("instanceView",{path:{instance:n},query:{project:t}}),ae.prefetchQuery("instanceExternalIpList",{path:{instance:n},query:{project:t}}),ae.fetchQuery("instanceNetworkInterfaceList",{query:{project:t,instance:n}}).then(r=>{const o=rO(r.items);return o?ae.prefetchQuery("vpcView",{path:{vpc:o}}):Promise.resolve()})]),null};function H4(){const e=sa(),t=Fe(),n=nO(e,{onSuccess:g7,onDelete:()=>t(B.instances(e))}),{data:r}=Pe("instanceView",{path:{instance:e.instance},query:{project:e.project}}),{data:o}=Pe("instanceNetworkInterfaceList",{query:{project:e.project,instance:e.instance}}),i=rO(o.items),{data:a}=Ze("vpcView",{path:{vpc:i}},{enabled:!!i}),l=m.useMemo(()=>[{label:"Copy ID",onActivate(){window.navigator.clipboard.writeText(r.id||"")}},...n(r)],[r,n]),u=Cs(r.memory,{output:"object",base:2});return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Ph,{}),children:r.name}),s.jsxs("div",{className:"inline-flex gap-2",children:[s.jsx(En,{heading:"instances",icon:s.jsx(Bv,{}),summary:"Instances are virtual machines that run on the Oxide platform.",links:[lt.instances,lt.instanceActions]}),s.jsx(tO,{onClick:g7}),s.jsx(rce,{label:"Instance actions",actions:l})]})]}),s.jsxs(je.Group,{className:"-mt-8 mb-16",children:[s.jsxs(je,{children:[s.jsxs(je.Row,{label:"cpu",children:[s.jsx("span",{className:"text-secondary",children:r.ncpus}),s.jsx("span",{className:"ml-1 text-quaternary",children:" vCPUs"})]}),s.jsxs(je.Row,{label:"ram",children:[s.jsx("span",{className:"text-secondary",children:u.value}),s.jsxs("span",{className:"ml-1 text-quaternary",children:[" ",u.unit]})]}),s.jsx(je.Row,{label:"status",children:s.jsx(N0,{status:r.runState})}),s.jsx(je.Row,{label:"vpc",children:a?s.jsx(Rr,{className:"link-with-underline group text-sans-semi-md",to:B.vpc({project:e.project,vpc:a.name}),children:a.name}):s.jsx(eu,{})})]}),s.jsxs(je,{children:[s.jsx(je.Row,{label:"description",children:s.jsx("span",{className:"text-secondary",children:s.jsx(Ps,{text:r.description,maxLength:40})})}),s.jsx(je.Row,{label:"created",children:s.jsx(mi,{date:r.timeCreated})}),s.jsx(je.Row,{label:"id",children:s.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap text-secondary",children:r.id})}),s.jsx(je.Row,{label:"external IPs",children:s.jsx(nce,{...e})})]})]}),s.jsxs(F0,{fullWidth:!0,children:[s.jsx(Vi,{to:B.instanceStorage(e),children:"Storage"}),s.jsx(Vi,{to:B.instanceMetrics(e),children:"Metrics"}),s.jsx(Vi,{to:B.instanceNetworking(e),children:"Networking"}),s.jsx(Vi,{to:B.instanceConnect(e),children:"Connect"})]})]})}function oO({command:e}){const[t,n]=m.useState(!1),[r,o]=m.useState(!1);function i(){n(!1)}P$(()=>o(!1),r?2e3:null);const a=()=>{window.navigator.clipboard.writeText(e).then(()=>{o(!0)})};return s.jsxs(s.Fragment,{children:[s.jsx(Je,{variant:"ghost",size:"sm",className:"ml-2",onClick:()=>n(!0),children:"Equivalent CLI Command"}),s.jsxs($e,{isOpen:t,onDismiss:i,title:"CLI command",children:[s.jsx($e.Section,{children:s.jsxs("pre",{className:"flex w-full rounded border px-4 py-3 !normal-case !tracking-normal text-mono-md bg-default border-secondary",children:[s.jsx("div",{className:"mr-2 select-none text-quaternary",children:"$"}),e]})}),s.jsx($e.Footer,{onDismiss:i,onAction:a,actionText:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:r?"invisible":"",children:"Copy command"}),s.jsxs("span",{className:`absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center ${r?"":"invisible"}`,children:[s.jsx(Vo,{className:"mr-2 text-accent"}),"Copied"]})]})})]})]})}const iO={serialConsole:({project:e,instance:t})=>`oxide instance serial console \\
--project ${e} \\
--instance ${t}`},ace=m.lazy(()=>Yu(()=>import("./Terminal-ChgudQZZ.js"),[])),sce={connecting:"notice",open:"default",closed:"notice",error:"destructive"},lce={connecting:"connecting",open:"connected",closed:"disconnected",error:"error"};W4.loader=async({params:e})=>{const{project:t,instance:n}=Wc(e);return await ae.prefetchQuery("instanceView",{path:{instance:n},query:{project:t}}),null};function W4(){const e=sa(),{project:t,instance:n}=e,{data:r}=Pe("instanceView",{query:{project:t},path:{instance:n}}),o=m.useRef(null),i=_n.serialConsole(r),a=i?"connecting":"closed",[l,u]=m.useState(a);return m.useEffect(()=>{if(i){if(!o.current){const{project:c,instance:d}=e;o.current=Fo.ws.instanceSerialConsoleStream({secure:window.location.protocol==="https:",host:window.location.host,path:{instance:d},query:{project:c,mostRecent:262144}}),o.current.binaryType="arraybuffer"}return()=>{var c;((c=o.current)==null?void 0:c.readyState)===WebSocket.OPEN&&o.current.close()}}},[e,i]),m.useEffect(()=>{var h,p,g;if(!i)return;const c=()=>u("open"),d=()=>u("closed"),f=()=>u("error");return(h=o.current)==null||h.addEventListener("open",c),(p=o.current)==null||p.addEventListener("close",d),(g=o.current)==null||g.addEventListener("error",f),()=>{var v,b,x;(v=o.current)==null||v.removeEventListener("open",c),(b=o.current)==null||b.removeEventListener("close",d),(x=o.current)==null||x.removeEventListener("error",f)}},[i]),s.jsxs("div",{className:"!mx-0 flex h-full max-h-[calc(100vh-60px)] !w-full flex-col",children:[s.jsxs(Rr,{to:B.instance(e),className:"mx-3 mb-6 mt-3 flex h-10 shrink-0 items-center rounded px-3 bg-accent-secondary",children:[s.jsx(hk,{className:"text-accent-tertiary"}),s.jsxs("div",{className:"ml-2 text-mono-sm text-accent",children:[s.jsx("span",{className:"text-accent-tertiary",children:"Back to"})," instance"]})]}),s.jsxs("div",{className:"gutter relative w-full shrink grow overflow-hidden",children:[l==="connecting"&&s.jsx(uce,{}),l==="error"&&s.jsx(dce,{}),l==="closed"&&!i&&s.jsx(cce,{instanceState:r.runState}),s.jsx(m.Suspense,{fallback:null,children:o.current&&s.jsx(ace,{ws:o.current})})]}),s.jsx("div",{className:"shrink-0 justify-between overflow-hidden border-t bg-default border-secondary empty:border-t-0",children:s.jsxs("div",{className:"gutter flex h-20 items-center justify-between",children:[s.jsx("div",{children:s.jsx(oO,{command:iO.serialConsole({project:t,instance:n})})}),s.jsx(tt,{color:sce[l],children:lce[l]})]})})]})}function z$({children:e,connecting:t}){return s.jsxs("div",{className:"relative h-full shrink grow overflow-hidden",children:[s.jsx("div",{className:"h-full space-y-2 overflow-hidden",children:[...Array(200)].map((n,r)=>s.jsx("div",{className:ne("h-4 rounded bg-tertiary",{"motion-safe:animate-pulse":t}),style:{width:`${Math.sin(Math.sin(r))*20+40}%`}},r))}),s.jsx("div",{className:"absolute bottom-0 h-full w-full",style:{background:"linear-gradient(180deg, rgba(8, 15, 17, 0) 0%, #080F11 100%)"}}),s.jsx("div",{className:"absolute left-1/2 top-1/2 flex w-96 -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center rounded-lg border p-12 !bg-raise border-secondary elevation-3",children:e})]})}const uce=()=>s.jsxs(z$,{connecting:!0,children:[s.jsx(Hl,{size:"lg"}),s.jsx("div",{className:"mt-4 text-center",children:s.jsx("p",{className:"text-sans-xl",children:"Connecting to serial console"})})]}),cce=({instanceState:e})=>s.jsxs(z$,{children:[s.jsxs("p",{className:"flex items-center justify-center text-sans-xl",children:[s.jsx("span",{children:"The instance is"}),s.jsx(N0,{className:"ml-1",status:e})]}),s.jsx("p",{className:"mt-2 text-center text-secondary",children:"You can only connect to the serial console on a running instance."})]}),dce=()=>s.jsxs(z$,{children:[s.jsx("p",{className:"flex items-center justify-center text-center text-sans-xl",children:"Serial console connection failed"}),s.jsx("p",{className:"mt-2 text-center text-secondary",children:"Please try again."})]}),fce=({href:e,text:t})=>s.jsxs(s.Fragment,{children:["Learn more about"," ",s.jsxs("a",{href:e,className:"text-accent-secondary hover:text-accent",children:[t,s.jsx(Ih,{className:"ml-1 align-middle"})]})]}),tp={Container:St.div`w-full max-w-[660px] rounded-lg border text-sans-md text-secondary border-default`,Body:St.div`p-6`,Title:St.div`mb-1 text-sans-lg text-default`,Footer:({children:e,docsLink:t})=>s.jsxs("div",{className:"flex items-center justify-between border-t px-6 py-3 border-default",children:[s.jsx("div",{className:"text-tertiary",children:t&&s.jsx(fce,{...t})}),s.jsx("div",{className:"flex gap-3",children:e})]})};function hce(){const{project:e,instance:t}=sa();return s.jsxs(tp.Container,{children:[s.jsxs(tp.Body,{children:[s.jsx(tp.Title,{children:"Serial console"}),"Connect to your instance’s serial console"]}),s.jsxs(tp.Footer,{children:[s.jsx(oO,{command:iO.serialConsole({project:e,instance:t})}),s.jsx(Rr,{to:B.serialConsole({project:e,instance:t}),className:Ql({size:"sm"}),children:"Connect"})]})]})}const mce="flex items-center rounded border p-2";function v7(e){const{locale:t}=Un(),n=YJ({...e,locale:t}),r=m.useRef(null),{fieldProps:o}=EJ(e,n,r);return s.jsx("div",{...o,ref:r,className:ne(n.value===null?"border-error":"border-default",mce,e.className),children:n.segments.map((i,a)=>s.jsx(pce,{segment:i,state:n},a))})}function pce({segment:e,state:t}){const n=m.useRef(null),{segmentProps:r}=RJ(e,t,n);let o="";e.placeholder==="mm"?o="12":e.placeholder==="dd"?o="31":e.placeholder==="yyyy"?o="2023":e.placeholder==="––"?o="00":o=e.placeholder;const i=!!r["aria-readonly"];return s.jsxs("div",{...r,ref:n,style:{...r.style,minWidth:e.maxValue!=null&&String(e.maxValue).length+"ch"||void 0},className:ne("group box-content rounded px-[1px] text-right tabular-nums outline-none",!i&&"focus:text-default focus:bg-accent-secondary-hover",e.type==="timeZoneName"?"ml-1 text-sans-sm":"text-sans-md"),disabled:!!i,children:[s.jsx("span",{"aria-hidden":"true",className:ne("block w-full text-center text-quinary",!i&&"focus:text-default"),style:{visibility:e.isPlaceholder?void 0:"hidden",height:e.isPlaceholder?"":0,pointerEvents:"none"},children:o}),s.jsx("span",{className:ne(e.type==="literal"||e.type==="timeZoneName"?"text-quaternary":"text-default",!i&&"group-focus:text-accent"),children:e.isPlaceholder?"":e.text})]})}function gce({children:e,...t}){const n=m.useRef(null),{dialogProps:r}=AJ(t,n);return s.jsx("div",{...r,ref:n,children:e})}function vce(e){const t=m.useRef(null),{state:n,children:r}=e,{popoverProps:o,underlayProps:i}=pJ({...e,popoverRef:t},n);return s.jsxs(yJ,{children:[s.jsx("div",{...i,className:"fixed inset-0"}),s.jsxs("div",{...o,ref:t,className:"rounded-md absolute top-full z-popover mt-2 rounded-lg border bg-raise border-secondary elevation-2",children:[s.jsx(v6,{onDismiss:n.close}),r,s.jsx(v6,{onDismiss:n.close})]})]})}function yce({state:e,date:t}){const n=m.useRef(null),{cellProps:r,buttonProps:o,isSelected:i,isOutsideVisibleRange:a,isDisabled:l,formattedDate:u,isInvalid:c}=VX({date:t},e,n),d=e.highlightedRange?fn(t,e.highlightedRange.start):i,f=e.highlightedRange?fn(t,e.highlightedRange.end):i,{locale:h}=Un(),p=n0(t,h),g=i&&(d||p===0||t.day===1),v=i&&(f||p===6||t.day===t.calendar.getDaysInMonth(t)),{focusProps:b}=Vh(),x=lT(t,ho());return s.jsx("td",{...r,className:"relative",children:s.jsxs("div",{...zt(o,b),ref:n,hidden:a,className:ne("group relative","focus:outline-none","my-0.5 h-8 w-10 text-center text-mono-md",d||f?c?"!text-error":"!text-accent":"",i&&!l?c?"text-error bg-error-secondary":"text-accent-secondary bg-accent-secondary":"text-tertiary hover:bg-tertiary",g&&"rounded-l",v&&"rounded-r",!i&&!l?"rounded":""),children:[s.jsx("div",{className:ne("pointer-events-none absolute bottom-[0] left-px right-px top-[0] rounded",d||f?c?"border border-error-secondary":"border border-accent-secondary":"",i&&!l?c?"group-hover:bg-error-secondary-hover":"group-hover:bg-accent-secondary-hover":"",!i&&!l?"hover:bg-tertiary":"")}),s.jsx("div",{className:ne("relative z-10 flex h-full w-full items-center justify-center",l&&!c?"disabled cursor-not-allowed text-disabled !bg-raise":""),children:u}),x&&s.jsx("div",{className:"absolute bottom-[5px] left-1/2 h-[3px] w-[3px] -translate-x-1/2 rounded-full bg-[var(--content-accent-tertiary)] content-['']"})]})})}function xce({state:e,...t}){const{locale:n}=Un(),{gridProps:r,headerProps:o,weekDays:i}=_X(t,e),a=_Y(e.visibleRange.start,n);return s.jsx("div",{className:"pb-4 pl-4 pr-4",children:s.jsxs("table",{...r,cellPadding:"0",className:"flex-1",children:[s.jsx("thead",{...o,children:s.jsx("tr",{children:i.map((l,u)=>s.jsx("th",{className:"h-8 w-10 text-center text-mono-md text-quaternary",children:l},u))})}),s.jsx("tbody",{children:[...new Array(a).keys()].map(l=>s.jsx("tr",{children:e.getDatesInWeek(l).map((u,c)=>u?s.jsx(yce,{state:e,date:u},c):s.jsx("td",{},c))},l))})]})})}function bce(e){const{locale:t}=Un(),n=OJ({...e,locale:t,createCalendar:xX}),r=m.useRef(null),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,title:l}=OX(e,n,r);return s.jsxs("div",{...o,ref:r,children:[s.jsx(wce,{state:n,title:l,prevButtonProps:i,nextButtonProps:a}),s.jsx(xce,{state:n})]})}const y7=({handleClick:e,children:t,isDisabled:n})=>s.jsx("button",{type:"button",onClick:e,disabled:n,className:ne("flex h-8 w-10 items-center justify-center rounded outline-none text-tertiary",n?"text-disabled":"hover:bg-tertiary"),children:t}),wce=({state:e,title:t,prevButtonProps:n,nextButtonProps:r})=>s.jsxs("div",{className:"flex items-center p-4",children:[s.jsx(y7,{handleClick:e.focusPreviousPage,isDisabled:n.isDisabled||!1,children:s.jsx(ck,{})}),s.jsx("h2",{className:"ml-2 flex-1 text-center text-sans-md",children:t}),s.jsx(y7,{handleClick:e.focusNextPage,isDisabled:r.isDisabled||!1,children:s.jsx(Kw,{})})]});function $ce(e){var h,p;const t=ZJ({...e,shouldCloseOnSelect:!1}),n=m.useRef(null),{groupProps:r,errorMessageProps:o,dialogProps:i,calendarProps:a,buttonProps:l}=IJ(e,t,n),u=m.useRef(null),{buttonProps:c}=NT(l,u),d=Io({dateStyle:"short",timeStyle:"short",hourCycle:"h24"}),f=m.useMemo(()=>t.dateRange?d.formatRange(t.dateRange.start.toDate(ho()),t.dateRange.end.toDate(ho())):"No range selected",[t.dateRange,d]);return s.jsxs("div",{"aria-label":e.label,className:ne("relative flex-col text-left",e.className),children:[s.jsx("div",{...r,ref:n,className:"group flex",children:s.jsxs("button",{...c,type:"button",className:ne(t.isOpen&&"z-10 ring-2","relative flex h-10 items-center rounded-l rounded-r border text-sans-md border-default focus-within:ring-2 hover:border-raise focus:z-10",t.isInvalid?"focus-error border-error ring-error-secondary":"border-default ring-accent-secondary"),children:[s.jsxs("div",{className:ne("relative flex w-[17rem] items-center px-3 text-sans-md"),children:[f,t.isInvalid&&s.jsx("div",{className:"absolute bottom-0 right-2 top-0 flex items-center text-error",children:s.jsx(hs,{className:"h-3 w-3"})})]}),s.jsx("div",{className:"-ml-px flex h-[calc(100%-12px)] w-10 items-center justify-center rounded-r border-l outline-none border-default",children:s.jsx(cW,{className:"h-4 w-4 text-tertiary"})})]})}),t.isInvalid&&s.jsx("p",{...o,className:"py-2 text-sans-md text-error",children:"Date range is invalid"}),t.isOpen&&s.jsx(vce,{triggerRef:n,state:t,placement:"bottom start",children:s.jsxs(gce,{...i,children:[s.jsx(bce,{...a}),s.jsxs("div",{className:"flex items-center space-x-2 border-t p-4 border-t-secondary",children:[s.jsx(v7,{label:"Start time",value:((h=t.timeRange)==null?void 0:h.start)||null,onChange:g=>t.setTime("start",g),hourCycle:24,className:"shrink-0 grow basis-0"}),s.jsx("div",{className:"text-quinary",children:"–"}),s.jsx(v7,{label:"End time",value:((p=t.timeRange)==null?void 0:p.end)||null,onChange:g=>t.setTime("end",g),hourCycle:24,className:"shrink-0 grow basis-0"})]})]})})]})}const Sce=[{label:"Last hour",value:"lastHour"},{label:"Last 3 hours",value:"last3Hours"},{label:"Last day",value:"lastDay"},{label:"Last week",value:"lastWeek"},{label:"Last 30 days",value:"last30Days"},{label:"Custom",value:"custom"}],x7={lastHour:e=>e.subtract({hours:1}),last3Hours:e=>e.subtract({hours:3}),lastDay:e=>e.subtract({days:1}),lastWeek:e=>e.subtract({days:7}),last30Days:e=>e.subtract({days:30})};function U$({initialPreset:e,minValue:t,maxValue:n}){const r=m.useMemo(()=>Mc(ho()),[]),o=x7[e](r),i=r,[a,l]=m.useState(e),[u,c]=m.useState({start:o,end:i}),d=h=>{if(h!=="custom"){const p=Mc(ho()),g=x7[h](p);c({start:g,end:p})}},f={preset:a,setPreset:l,range:u,setRange:c,minValue:t,maxValue:n,onRangeChange:d};return{startTime:u.start.toDate(ho()),endTime:u.end.toDate(ho()),preset:a,onRangeChange:d,dateTimeRangePicker:s.jsx(Ece,{...f})}}function Ece({preset:e,setPreset:t,range:n,setRange:r,minValue:o,maxValue:i,onRangeChange:a}){return s.jsxs("form",{className:"flex",children:[s.jsx(ta,{className:"z-10 w-[10rem] border-r border-r-default [&>button]:!rounded-r-none [&>button]:!border-r-0",name:"preset",selected:e,"aria-label":"Choose a time range preset",items:Sce,onChange:l=>{t(l),a==null||a(l)}}),s.jsx("div",{children:s.jsx($ce,{label:"Choose a date range",value:n,onChange:l=>{r(l),t("custom")},minValue:o,maxValue:i,hideTimeZone:!0,className:"[&_.rounded-l]:!rounded-l-none [&_button]:!border-l-0"})})]})}const Cce=U.lazy(()=>Yu(()=>import("./TimeSeriesChart-D1keektS.js"),[]));function Dce(e,t){let n=0,r=e;for(;r>t;)r=r/t,n++;return n}function kd({title:e,unit:t,startTime:n,endTime:r,metric:o,diskSelector:{project:i,disk:a}}){const{data:l,isLoading:u}=Ze("diskMetricsList",{path:{disk:a,metric:o},query:{project:i,startTime:n,endTime:r,limit:3e3}},{placeholderData:y=>y}),c=t==="Bytes",d=m.useMemo(()=>!l||l.items.length===0?0:Math.max(...l.items.map(y=>y.datum.datum.value)),[l]),f=c?1024:1e3,h=Dce(d,f);let p="",g="(COUNT)";c&&(p=["BYTES","KiB","MiB","GiB","TiB"][h],g=`(${p})`);const v=f**h,b=m.useMemo(()=>((l==null?void 0:l.items)||[]).map(({datum:y,timestamp:w})=>({timestamp:w.getTime(),value:c?y.datum.value/v:y.datum.value})),[l,c,v]),x=y=>{if(c)return y.toLocaleString();const w=(y/v).toFixed(2),C=["","k","M","B","T"][h];return`${w}${C}`};return s.jsxs("div",{className:"flex w-1/2 grow flex-col",children:[s.jsxs("h2",{className:"ml-3 flex items-center text-mono-xs text-secondary",children:[e," ",s.jsx("div",{className:"ml-1 normal-case text-quaternary",children:g}),u&&s.jsx(Hl,{className:"ml-2"})]}),s.jsx(m.Suspense,{fallback:s.jsx("div",{className:"mt-3 h-[300px]"}),children:s.jsx(Cce,{className:"mt-3",data:b,title:e,unit:p,width:480,height:240,startTime:n,endTime:r,yAxisTickFormatter:x})})]})}G4.loader=async({params:e})=>{const{project:t,instance:n}=Wc(e);return await ae.prefetchQuery("instanceDiskList",{path:{instance:n},query:{project:t}}),null};function G4(){var f;const{project:e,instance:t}=sa(),{data:n}=Pe("instanceDiskList",{path:{instance:t},query:{project:e}}),r=m.useMemo(()=>(n==null?void 0:n.items)||[],[n]),{startTime:o,endTime:i,dateTimeRangePicker:a}=U$({initialPreset:"lastDay"}),[l,u]=m.useState(((f=r[0])==null?void 0:f.name)||""),c=r.map(({name:h})=>({label:h,value:h}));if(r.length===0)return s.jsx(ys,{children:s.jsx(nt,{icon:s.jsx(Vv,{}),title:"No metrics available",body:"Metrics are only available if there are disks attached"})});const d={startTime:o,endTime:i,diskSelector:{project:e,disk:l}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-4 flex justify-between",children:[s.jsx(ta,{className:"w-64","aria-label":"Choose disk",name:"disk-name",selected:l,items:c,onChange:h=>{h&&u(h)}}),a]}),s.jsxs("div",{className:"mt-8 space-y-12",children:[s.jsxs("div",{className:"flex w-full space-x-4",children:[s.jsx(kd,{...d,title:"Reads",unit:"Count",metric:"read"}),s.jsx(kd,{...d,title:"Read",unit:"Bytes",metric:"read_bytes"})]}),s.jsxs("div",{className:"flex w-full space-x-4",children:[s.jsx(kd,{...d,title:"Writes",unit:"Count",metric:"write"}),s.jsx(kd,{...d,title:"Write",unit:"Bytes",metric:"write_bytes"})]}),s.jsx("div",{className:"flex w-full space-x-4",children:s.jsx(kd,{...d,title:"Flushes",unit:"Count",metric:"flush"})})]})]})}const jce=({onDismiss:e})=>{const t=ke(),{project:n,instance:r}=sa(),{data:o}=Pe("projectIpPoolList",{query:{limit:1e3}}),i=m.useMemo(()=>o==null?void 0:o.items.find(c=>c.isDefault),[o]),a=fe("instanceEphemeralIpAttach",{onSuccess(){t.invalidateQueries("instanceExternalIpList"),De({content:"Your ephemeral IP has been attached"}),e()},onError:c=>{De({title:"Error",content:c.message,variant:"error"})}}),l=Kv({defaultValues:{pool:i==null?void 0:i.name}}),u=l.watch("pool");return s.jsxs($e,{isOpen:!0,title:"Attach ephemeral IP",onDismiss:e,children:[s.jsx($e.Body,{children:s.jsx($e.Section,{children:s.jsx("form",{children:s.jsx(Pn,{control:l.control,name:"pool",label:"IP pool",placeholder:o!=null&&o.items&&o.items.length>0?"Select a pool":"No pools available",items:(o==null?void 0:o.items.map(c=>({label:s.jsxs("div",{className:"flex items-center gap-2",children:[c.name,c.isDefault&&s.jsx(tt,{children:"default"})]}),value:c.name})))||[],required:!0})})})}),s.jsx($e.Footer,{actionText:"Attach",disabled:!u,onAction:()=>a.mutate({path:{instance:r},query:{project:n},body:{pool:u}}),onDismiss:e})]})};function Pce({fip:e}){return s.jsxs("div",{className:"text-tertiary selected:text-accent-secondary",children:[s.jsx("div",{children:e.name}),s.jsxs("div",{className:"flex gap-0.5",children:[s.jsx("div",{children:e.ip}),e.description&&s.jsxs(s.Fragment,{children:[s.jsx(l0,{}),s.jsx("div",{className:"grow overflow-hidden overflow-ellipsis whitespace-pre text-left",children:e.description})]})]})]})}const Rce=({floatingIps:e,instance:t,onDismiss:n})=>{const r=ke(),o=fe("floatingIpAttach",{onSuccess(){r.invalidateQueries("floatingIpList"),r.invalidateQueries("instanceExternalIpList"),De({content:"Your floating IP has been attached"}),n()},onError:l=>{De({title:"Error",content:l.message,variant:"error"})}}),i=Kv({defaultValues:{floatingIp:""}}),a=i.watch("floatingIp");return s.jsxs($e,{isOpen:!0,title:"Attach floating IP",onDismiss:n,children:[s.jsx($e.Body,{children:s.jsxs($e.Section,{children:[s.jsx(Bt,{variant:"info",content:`Instance ‘${t.name}’ will be reachable at the selected IP address`}),s.jsx("form",{children:s.jsx(Pn,{control:i.control,name:"floatingIp",label:"Floating IP",placeholder:"Select a floating IP",items:e.map(l=>({value:l.id,label:s.jsx(Pce,{fip:l}),selectedLabel:l.name})),required:!0})})]})}),s.jsx($e.Footer,{actionText:"Attach",disabled:!a,onAction:()=>o.mutate({path:{floatingIp:a},body:{kind:"instance",parent:t.id}}),onDismiss:n})]})};function kce({onDismiss:e,editing:t}){const n=ke(),r=sa(),o=fe("instanceNetworkInterfaceUpdate",{onSuccess(){n.invalidateQueries("instanceNetworkInterfaceList"),e()}}),i=_f(t,["name","description"]),a=Ge({defaultValues:i});return s.jsxs(ht,{form:a,formType:"edit",resourceName:"network interface",onDismiss:e,onSubmit:l=>{const u=i.name;o.mutate({path:{interface:u},query:r,body:l})},loading:o.isPending,submitError:o.error,children:[s.jsx(Et,{name:"name",control:a.control}),s.jsx(At,{name:"description",control:a.control})]})}const Tce=({value:e})=>{const{project:t}=ut(),{data:n,isError:r}=Ze("vpcView",{path:{vpc:e}},{throwOnError:!1});return r?s.jsx(tt,{color:"neutral",children:"Deleted"}):n?s.jsx(tu,{to:B.vpc({project:t,vpc:n.name}),children:n.name}):s.jsx(Rs,{})},Ice=({value:e})=>{const{data:t,isError:n}=Ze("vpcSubnetView",{path:{subnet:e}},{throwOnError:!1});return n?s.jsx(tt,{color:"neutral",children:"Deleted"}):t?s.jsx("span",{className:"text-secondary",children:t.name}):s.jsx(Rs,{})};K4.loader=async({params:e})=>{const{project:t,instance:n}=Wc(e);return await Promise.all([ae.prefetchQuery("instanceNetworkInterfaceList",{query:{project:t,instance:n,limit:1e3}}),ae.prefetchQuery("floatingIpList",{query:{project:t,limit:1e3}}),ae.prefetchQuery("instanceExternalIpList",{path:{instance:n},query:{project:t}}),ae.prefetchQuery("instanceView",{path:{instance:n},query:{project:t}}),ae.prefetchQuery("projectIpPoolList",{query:{limit:1e3}})]),null};const Td=Ct(),Ace=[Td.accessor("name",{header:"name",cell:e=>s.jsxs(s.Fragment,{children:[s.jsx("span",{children:e.getValue()}),e.row.original.primary&&s.jsx(tt,{className:"ml-2",children:"primary"})]})}),Td.accessor("description",Xe.description),Td.accessor("ip",{header:"Private IP",cell:e=>s.jsx(B$,{ip:e.getValue(),isLinked:!1})}),Td.accessor("vpcId",{header:"vpc",cell:e=>s.jsx(Tce,{value:e.getValue()})}),Td.accessor("subnetId",{header:"subnet",cell:e=>s.jsx(Ice,{value:e.getValue()})})],np=Ka(_n.updateNic.states);function K4(){const e=sa(),{instance:t,project:n}=e,r=ke(),[o,i]=m.useState(!1),[a,l]=m.useState(null),[u,c]=m.useState(!1),[d,f]=m.useState(!1),{data:h}=Pe("floatingIpList",{query:{project:n,limit:1e3}}),p=m.useMemo(()=>h.items.filter(I=>!I.instanceId),[h]),g=fe("instanceNetworkInterfaceCreate",{onSuccess(){r.invalidateQueries("instanceNetworkInterfaceList"),i(!1)}}),v=fe("instanceNetworkInterfaceDelete",{onSuccess(){r.invalidateQueries("instanceNetworkInterfaceList"),De({content:"Network interface deleted"})}}),b=fe("instanceNetworkInterfaceUpdate",{onSuccess(){r.invalidateQueries("instanceNetworkInterfaceList")}}),{data:x}=Pe("instanceView",{path:{instance:t},query:{project:n}}),y=_n.updateNic(x),w=m.useCallback(I=>[{label:"Make primary",onActivate(){b.mutate({path:{interface:I.name},query:e,body:{...I,primary:!0}})},disabled:I.primary?"This network interface is already set as primary":!y&&s.jsxs(s.Fragment,{children:["The instance must be ",np," to change its primary network interface"]})},{label:"Edit",onActivate(){l(I)},disabled:!y&&s.jsxs(s.Fragment,{children:["The instance must be ",np," before editing a network interface's settings"]})},{label:"Delete",onActivate:Hn({doDelete:()=>v.mutateAsync({path:{interface:I.name},query:e}),label:I.name}),disabled:!y&&s.jsxs(s.Fragment,{children:["The instance must be ",np," to delete a network interface"]})}],[y,v,b,e]),S=sr(Ace,w),C=Pe("instanceNetworkInterfaceList",{query:{...e,limit:1e3}}).data.items,E=Ol({columns:S,data:C||[],getCoreRowModel:Ml()}),{data:D}=Pe("instanceExternalIpList",{path:{instance:t},query:{project:n}}),$=Ct(),T=[$.accessor("ip",{cell:I=>s.jsx(B$,{ip:I.getValue()})}),$.accessor("kind",{header:()=>s.jsxs(s.Fragment,{children:["Kind",s.jsx(Ac,{className:"ml-2",children:"Floating IPs can be detached from this instance and attached to another."})]}),cell:I=>s.jsx(tt,{color:"neutral",children:I.getValue()})}),$.accessor("name",{cell:I=>I.getValue()?I.getValue():s.jsx(eu,{})}),$.accessor(I=>"description"in I?I.description:void 0,{header:"description",cell:I=>s.jsx(eO,{text:I.getValue()})})],A=fe("instanceEphemeralIpDetach",{onSuccess(){r.invalidateQueries("instanceExternalIpList"),De({content:"Your ephemeral IP has been detached"})},onError:I=>{De({title:"Error",content:I.message,variant:"error"})}}),P=fe("floatingIpDetach",{onSuccess(){r.invalidateQueries("floatingIpList"),r.invalidateQueries("instanceExternalIpList"),De({content:"Your floating IP has been detached"})},onError:I=>{De({title:"Error",content:I.message,variant:"error"})}}),k=m.useCallback(I=>{const R={label:"Copy IP address",onActivate:()=>{window.navigator.clipboard.writeText(I.ip)}},M=I.kind==="floating"?()=>P.mutateAsync({path:{floatingIp:I.name},query:{project:n}}):()=>A.mutateAsync({path:{instance:t},query:{project:n}});return[R,{label:"Detach",onActivate:()=>os({actionType:"danger",doAction:M,modalTitle:`Confirm detach ${I.kind} IP`,modalContent:s.jsxs("p",{children:["Are you sure you want to detach"," ",I.kind==="ephemeral"?"this ephemeral IP":s.jsxs(s.Fragment,{children:["floating IP ",s.jsx(rn,{children:I.name})]})," ","from ",s.jsx(rn,{children:t}),"? The instance will no longer be reachable at"," ",s.jsx(rn,{children:I.ip}),"."]}),errorTitle:`Error detaching ${I.kind} IP`})}]},[A,P,t,n]),N=Ol({columns:sr(T,k),data:(D==null?void 0:D.items)||[],getCoreRowModel:Ml()}),j=D.items.filter(I=>I.kind==="ephemeral").length===0&&C.length>0,F=D.items.filter(I=>I.kind==="floating").length>=32?"Floating IP address limit of 32 reached for this instance":p.length===0?"No available floating IPs":null;return s.jsxs(s.Fragment,{children:[s.jsxs(W6,{children:[s.jsx(f4,{id:"attached-ips-label",children:"External IPs"}),s.jsxs("div",{className:"flex gap-3",children:[j&&s.jsx(yl,{onClick:()=>c(!0),children:"Attach ephemeral IP"}),s.jsx(yl,{onClick:()=>f(!0),disabled:!!F,disabledReason:F,children:"Attach floating IP"})]}),u&&s.jsx(jce,{onDismiss:()=>c(!1)}),d&&s.jsx(Rce,{floatingIps:p,instance:x,onDismiss:()=>f(!1)})]}),D.items.length>0?s.jsx(_l,{"aria-labelledby":"attached-ips-label",table:N}):s.jsx(ys,{children:s.jsx(nt,{icon:s.jsx(Ss,{}),title:"No external IPs",body:"Attach an external IP to see it here"})}),s.jsxs(W6,{className:"mt-8",children:[s.jsx(f4,{id:"nics-label",children:"Network interfaces"}),s.jsx(yl,{onClick:()=>i(!0),disabled:!y,disabledReason:s.jsxs(s.Fragment,{children:["A network interface cannot be created or edited unless the instance is"," ",np,"."]}),children:"Add network interface"}),o&&s.jsx(rM,{onDismiss:()=>i(!1),onSubmit:I=>g.mutate({query:e,body:I}),submitError:g.error})]}),C.length>0?s.jsx(_l,{"aria-labelledby":"nics-label",table:E}):s.jsx(ys,{children:s.jsx(nt,{icon:s.jsx(Rh,{}),title:"No network interfaces",body:"Create a network interface to see it here"})}),a&&s.jsx(kce,{editing:a,onDismiss:()=>l(null)})]})}Q4.loader=async({params:e})=>{const{project:t,instance:n}=Wc(e);return await Promise.all([ae.prefetchQuery("instanceDiskList",{path:{instance:n},query:{project:t,limit:ft}}),ae.prefetchQuery("instanceView",{path:{instance:n},query:{project:t}})]),null};const rp=Ct(),Nce=[rp.accessor("name",{header:"Disk"}),rp.accessor("size",Xe.size),rp.accessor(e=>e.state.state,{header:"status",cell:e=>s.jsx(XM,{status:e.getValue()})}),rp.accessor("timeCreated",Xe.timeCreated)];function Q4(){const[e,t]=m.useState(!1),[n,r]=m.useState(!1),o=ke(),{instance:i,project:a}=sa(),l=m.useMemo(()=>({path:{instance:i},query:{project:a}}),[i,a]),u=fe("instanceDiskDetach",{onSuccess(){o.invalidateQueries("instanceDiskList"),De({content:"Disk detached"})},onError(b){De({title:"Failed to detach disk",content:b.message,variant:"error"})}}),c=fe("snapshotCreate",{onSuccess(){o.invalidateQueries("snapshotList"),De({content:"Snapshot created"})},onError(b){De({title:"Failed to create snapshot",content:b.message,variant:"error"})}}),{data:d}=Pe("instanceView",l),f=m.useCallback(b=>[{label:"Snapshot",disabled:!Va.snapshot(b)&&s.jsxs(s.Fragment,{children:["Only disks in state ",Ka(Va.snapshot.states)," can be snapshotted"]}),onActivate(){c.mutate({query:{project:a},body:{name:Sw(b.name),disk:b.name,description:""}})}},{label:"Detach",disabled:!_n.detachDisk(d)&&s.jsxs(s.Fragment,{children:["Instance must be ",s.jsx("span",{className:"text-default",children:"stopped"})," before disk can be detached"]}),onActivate(){u.mutate({body:{disk:b.name},...l})}}],[u,d,l,c,a]),h=fe("instanceDiskAttach",{onSuccess(){o.invalidateQueries("instanceDiskList"),t(!1),r(!1)},onError(b){De({title:"Failed to attach disk",content:b.message,variant:"error"})}}),{Table:p}=vn("instanceDiskList",l),g=s.jsx(nt,{icon:s.jsx(Vv,{}),title:"No disks",body:"Attach a disk to this instance to see it here"}),v=sr(Nce,f);return s.jsxs(s.Fragment,{children:[s.jsx(p,{emptyState:g,columns:v}),s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsxs("div",{className:"flex gap-3",children:[s.jsx(Je,{size:"sm",onClick:()=>t(!0),disabledReason:s.jsxs(s.Fragment,{children:["Instance must be ",s.jsx("span",{className:"text-default",children:"stopped"})," to create and attach a disk"]}),disabled:!_n.attachDisk(d),children:"Create new disk"}),s.jsx(Je,{variant:"secondary",size:"sm",onClick:()=>r(!0),disabledReason:s.jsxs(s.Fragment,{children:["Instance must be ",s.jsx("span",{className:"text-default",children:"stopped"})," to attach a disk"]}),disabled:!_n.attachDisk(d),children:"Attach existing disk"})]}),!_n.attachDisk(d)&&s.jsxs("span",{className:"max-w-xs text-sans-md text-tertiary",children:["The instance must be ",s.jsx("span",{className:"text-default",children:"stopped"})," to add or attach a disk."]})]}),e&&s.jsx(b$,{onDismiss:()=>t(!1),onSuccess:({name:b})=>{h.mutate({...l,body:{disk:b}})}}),n&&s.jsx(nM,{onDismiss:()=>r(!1),onSubmit:({name:b})=>{h.mutate({...l,body:{disk:b}})},loading:h.isPending,submitError:h.error})]})}const aO=({value:e})=>{const t=Cs(e.memory,{output:"object",base:2});return s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{children:[e.ncpus," ",s.jsx("span",{className:"text-quaternary",children:"vCPU"})]}),s.jsxs("div",{children:[t.value," ",s.jsx("span",{className:"text-quaternary",children:t.unit})]})]})},Fce=({datetime:e,tooltipText:t,placement:n="top"})=>{const r=s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-tertiary",children:t}),s.jsx("span",{children:Tre(e)})]});return s.jsx("span",{className:"mt-0.5",children:s.jsx(vi,{content:r,placement:n,children:s.jsx("span",{className:"text-sans-sm text-tertiary",children:kre(e)})})})},Mce=({value:e})=>s.jsxs("div",{className:"flex flex-col",children:[s.jsx(N0,{status:e.runState},"run-state"),s.jsx(Fce,{tooltipText:"Run state updated",datetime:e.timeRunStateUpdated})]}),Oce=()=>s.jsx(nt,{icon:s.jsx(Ph,{}),title:"No instances",body:"Create an instance to see it here",buttonText:"New instance",buttonTo:B.instancesNew(ut())}),Id=Ct();Z4.loader=async({params:e})=>{const{project:t}=Uo(e);return await ae.prefetchQuery("instanceList",{query:{project:t,limit:ft}}),null};function Z4(){const{project:e}=ut(),t=ke(),n=()=>t.invalidateQueries("instanceList"),r=nO({project:e},{onSuccess:n,onDelete:n}),{data:o}=Pe("instanceList",{query:{project:e,limit:ft}}),i=Fe();la(m.useMemo(()=>[{value:"New instance",onSelect:()=>i(B.instancesNew({project:e}))},...((o==null?void 0:o.items)||[]).map(u=>({value:u.name,onSelect:()=>i(B.instance({project:e,instance:u.name})),navGroup:"Go to instance"}))],[e,o,i]));const{Table:a}=vn("instanceList",{query:{project:e}},{placeholderData:u=>u}),l=m.useMemo(()=>[Id.accessor("name",{cell:xi(u=>B.instance({project:e,instance:u}))}),Id.accessor(u=>({ncpus:u.ncpus,memory:u.memory}),{header:"CPU, RAM",cell:u=>s.jsx(aO,{value:u.getValue()})}),Id.accessor(u=>({runState:u.runState,timeRunStateUpdated:u.timeRunStateUpdated}),{header:"status",cell:u=>s.jsx(Mce,{value:u.getValue()})}),Id.accessor("hostname",{}),Id.accessor("timeCreated",Xe.timeCreated),da(r)],[e,r]);return o?s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Ph,{}),children:"Instances"}),s.jsx(En,{heading:"instances",icon:s.jsx(Bv,{}),summary:"Instances are virtual machines that run on the Oxide platform.",links:[lt.instances,lt.instanceActions]})]}),s.jsxs(Xr,{children:[s.jsx(tO,{onClick:n}),s.jsx(Jr,{to:B.instancesNew({project:e}),children:"New Instance"})]}),s.jsx(a,{columns:l,emptyState:s.jsx(Oce,{}),rowHeight:"large"})]}):null}const _ce=({value:e})=>{const{data:t}=_P("diskView",{path:{disk:e}});return t?t.type==="error"?s.jsx(tt,{color:"neutral",children:"Deleted"}):s.jsx("span",{className:"text-secondary",children:t.data.name}):s.jsx(Rs,{})},Lce=()=>s.jsx(nt,{icon:s.jsx(tk,{}),title:"No snapshots",body:"Create a snapshot to see it here",buttonText:"New snapshot",buttonTo:B.snapshotsNew(ut())});Y4.loader=async({params:e})=>{const{project:t}=Uo(e);return await Promise.all([ae.prefetchQuery("snapshotList",{query:{project:t,limit:ft}}),ae.fetchQuery("diskList",{query:{project:t,limit:200}}).then(n=>{for(const r of n.items)ae.setQueryDataErrorsAllowed("diskView",{path:{disk:r.id}},{type:"success",data:r})})]),null};const vu=Ct(),Vce=[vu.accessor("name",{}),vu.accessor("description",Xe.description),vu.accessor("diskId",{header:"disk",cell:e=>s.jsx(_ce,{value:e.getValue()})}),vu.accessor("state",{cell:e=>s.jsx(Uue,{status:e.getValue()})}),vu.accessor("size",Xe.size),vu.accessor("timeCreated",Xe.timeCreated)];function Y4(){const e=ke(),{project:t}=ut(),{Table:n}=vn("snapshotList",{query:{project:t}}),r=Fe(),o=fe("snapshotDelete",{onSuccess(){e.invalidateQueries("snapshotList")}}),i=m.useCallback(l=>[{label:"Create image",onActivate(){r(B.snapshotImagesNew({project:t,snapshot:l.name}))}},{label:"Delete",onActivate:Hn({doDelete:()=>o.mutateAsync({path:{snapshot:l.name},query:{project:t}}),label:l.name})}],[o,r,t]),a=sr(Vce,i);return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(tk,{}),children:"Snapshots"}),s.jsx(En,{heading:"snapshots",icon:s.jsx(lk,{}),summary:"A snapshot is a lightweight point-in-time copy of a disk that can be used to create an image.",links:[lt.snapshots]})]}),s.jsx(Xr,{children:s.jsx(Jr,{to:B.snapshotsNew({project:t}),children:"New snapshot"})}),s.jsx(n,{columns:a,emptyState:s.jsx(Lce,{})}),s.jsx(an,{})]})}const Bce=({value:e})=>e==="enabled"?s.jsxs(s.Fragment,{children:[s.jsx(Vo,{className:"mr-1 text-accent"}),s.jsx(tt,{children:"Enabled"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Vo,{className:"mr-1 text-notice"}),s.jsx(tt,{color:"notice",children:"Disabled"})]}),op=({type:e,value:t})=>s.jsxs("div",{className:"space-x-1",children:[s.jsx(tt,{children:e}),s.jsx(tt,{variant:"solid",className:"!normal-case",children:t})]}),Sa=Ct(),zce=[Sa.accessor("priority",{header:"Priority",cell:e=>s.jsx("div",{className:"text-secondary",children:e.getValue()})}),Sa.accessor("action",{header:"Action",cell:e=>s.jsx("div",{className:"text-secondary",children:LS(e.getValue())})}),Sa.accessor("direction",{header:"Direction",cell:e=>s.jsx("div",{className:"text-secondary",children:LS(e.getValue())})}),Sa.accessor("targets",{header:"Targets",cell:e=>{const r=e.getValue().map(({type:o,value:i})=>s.jsx(op,{type:o,value:i},o+"|"+i)).length<=2?2:1;return s.jsx(V4,{numInCell:r,tooltipTitle:"Other targets",children:e.getValue().map(({type:o,value:i})=>s.jsx(op,{type:o,value:i},o+"|"+i))})}}),Sa.accessor("filters",{header:"Filters",cell:e=>{const{hosts:t,ports:n,protocols:r}=e.getValue(),o=[...(t||[]).map((a,l)=>s.jsx(op,{...a},`host-${a.type}-${a.value}-${l}`)),...(r||[]).map((a,l)=>s.jsx(tt,{children:a},`${a}-${l}`)),...(n||[]).map((a,l)=>s.jsx(op,{type:"Port",value:a},`port-${a}-${l}`))],i=o.length<=2?2:1;return s.jsx(V4,{numInCell:i,tooltipTitle:"Other filters",children:o})}}),Sa.accessor("status",{header:"Status",cell:e=>s.jsx(Bce,{value:e.getValue()})}),Sa.accessor("timeCreated",Xe.timeCreated)];Fp.loader=async({params:e})=>{const{project:t,vpc:n}=Gc(e);return await ae.prefetchQuery("vpcFirewallRulesView",{query:{project:t,vpc:n}}),null};function Fp(){const e=ke(),t=Wl(),{data:n}=Pe("vpcFirewallRulesView",{query:t}),r=m.useMemo(()=>Cv(n.rules,c=>c.priority),[n]),o=Fe(),i=fe("vpcFirewallRulesUpdate",{onSuccess(){e.invalidateQueries("vpcFirewallRulesView")}}),a=m.useMemo(()=>[Sa.accessor("name",{header:"Name",cell:c=>s.jsx(tu,{to:B.vpcFirewallRuleEdit({...t,rule:c.getValue()}),children:c.getValue()})}),...zce,da(c=>[{label:"Edit",onActivate(){o(B.vpcFirewallRuleEdit({...t,rule:c.name}))}},{label:"Clone",onActivate(){o(B.vpcFirewallRuleClone({...t,rule:c.name}))}},{label:"Delete",onActivate:Hn({doDelete:()=>i.mutateAsync({query:t,body:{rules:r.filter(d=>d.id!==c.id)}}),label:c.name})}])],[o,r,i,t]),l=Ol({columns:a,data:r,getCoreRowModel:Ml()}),u=s.jsx(ys,{children:s.jsx(nt,{title:"No firewall rules",body:"Create a rule to see it here",buttonText:"New rule",buttonTo:B.vpcFirewallRulesNew(t)})});return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-3 flex justify-end space-x-2",children:s.jsx(Jr,{to:B.vpcFirewallRulesNew(t),children:"New rule"})}),r.length>0?s.jsx(_l,{table:l}):u,s.jsx(an,{})]})}const Uce=({value:e,detailsClass:t})=>s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("div",{className:"text-secondary",children:e[0]}),s.jsx("div",{className:ne("text-tertiary",t),children:e[1]})]}),z1=Ct();X4.loader=async({params:e})=>{const{project:t,vpc:n}=Gc(e);return await ae.prefetchQuery("vpcSubnetList",{query:{project:t,vpc:n,limit:ft}}),null};function X4(){const e=Wl(),t=ke(),{Table:n}=vn("vpcSubnetList",{query:e}),r=fe("vpcSubnetDelete",{onSuccess(){t.invalidateQueries("vpcSubnetList")}}),o=Fe(),i=m.useCallback(u=>[{label:"Edit",onActivate:()=>o(B.vpcSubnetsEdit({...e,subnet:u.name}))},{label:"Delete",onActivate:Hn({doDelete:()=>r.mutateAsync({path:{subnet:u.id}}),label:u.name})}],[o,r,e]),a=m.useMemo(()=>[z1.accessor("name",{cell:xi(u=>B.vpcSubnetsEdit({...e,subnet:u}))}),z1.accessor(u=>[u.ipv4Block,u.ipv6Block],{header:"IP Block",cell:u=>s.jsx(Uce,{value:[...u.getValue()]})}),z1.accessor("timeCreated",Xe.timeCreated),da(i)],[e,i]),l=s.jsx(nt,{title:"No VPC subnets",body:"Create a subnet to see it here",buttonText:"New subnet",buttonTo:B.vpcSubnetsNew(e)});return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-3 flex justify-end space-x-2",children:s.jsx(Jr,{to:B.vpcSubnetsNew(e),children:"New subnet"})}),s.jsx(n,{columns:a,emptyState:l,rowHeight:"large"}),s.jsx(an,{})]})}const qce=()=>s.jsx(nt,{icon:s.jsx(Rh,{}),title:"No VPCs",body:"Create a VPC to see it here",buttonText:"New VPC",buttonTo:B.vpcsNew(ut())}),sO=()=>s.jsx(En,{heading:"VPCs",icon:s.jsx(ok,{}),summary:"VPCs are private networks that isolate sets of instances from each other. Instances within a VPC can talk to each other using private IP addresses (if firewall rules allow it) but traffic between VPCs must go through external IPs.",links:[lt.vpcs,lt.firewallRules]}),Hce=({project:e,vpc:t})=>{const{data:n}=Ze("vpcFirewallRulesView",{query:{project:e,vpc:t}});return n?s.jsx(tu,{to:B.vpc({project:e,vpc:t}),children:n.rules.length}):s.jsx(Rs,{})},Ad=Ct();J4.loader=async({params:e})=>{const{project:t}=Uo(e);return await ae.prefetchQuery("vpcList",{query:{project:t,limit:ft}}),null};function J4(){const e=ke(),{project:t}=ut(),{data:n}=Pe("vpcList",{query:{project:t,limit:ft}}),r=Fe(),o=fe("vpcDelete",{onSuccess(){e.invalidateQueries("vpcList")}}),i=m.useCallback(u=>[{label:"Edit",onActivate(){ae.setQueryData("vpcView",{path:{vpc:u.name},query:{project:t}},u),r(B.vpcEdit({project:t,vpc:u.name}),{state:u})}},{label:"Delete",onActivate:Hn({doDelete:()=>o.mutateAsync({path:{vpc:u.name},query:{project:t}}),label:u.name})}],[o,r,t]);la(m.useMemo(()=>n.items.map(u=>({value:u.name,onSelect:()=>r(B.vpc({project:t,vpc:u.name})),navGroup:"Go to VPC"})),[t,n,r]));const a=m.useMemo(()=>[Ad.accessor("name",{cell:xi(u=>B.vpc({project:t,vpc:u}))}),Ad.accessor("dnsName",{header:"DNS name"}),Ad.accessor("description",Xe.description),Ad.accessor("name",{header:"Firewall Rules",cell:u=>s.jsx(Hce,{project:t,vpc:u.getValue()})}),Ad.accessor("timeCreated",Xe.timeCreated),da(i)],[t,i]),{Table:l}=vn("vpcList",{query:{project:t}});return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Rh,{}),children:"VPCs"}),s.jsx(sO,{})]}),s.jsx(Xr,{children:s.jsx(Jr,{to:B.vpcsNew({project:t}),children:"New Vpc"})}),s.jsx(l,{columns:a,emptyState:s.jsx(qce,{})}),s.jsx(an,{})]})}e3.loader=async({params:e})=>{const{project:t,vpc:n}=Gc(e);return await ae.prefetchQuery("vpcView",{path:{vpc:n},query:{project:t}}),null};function e3(){const e=Wl(),{data:t}=Pe("vpcView",{path:{vpc:e.vpc},query:{project:e.project}});return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Rh,{}),children:t.name}),s.jsx(sO,{})]}),s.jsxs(je.Group,{className:"mb-16",children:[s.jsxs(je,{children:[s.jsx(je.Row,{label:"Description",children:t.description||s.jsx(eu,{})}),s.jsx(je.Row,{label:"DNS Name",children:t.dnsName})]}),s.jsxs(je,{children:[s.jsx(je.Row,{label:"Created",children:s.jsx(mi,{date:t.timeCreated})}),s.jsx(je.Row,{label:"Last Modified",children:s.jsx(mi,{date:t.timeModified})})]})]}),s.jsxs(F0,{fullWidth:!0,children:[s.jsx(Vi,{to:B.vpcFirewallRules(e),children:"Firewall Rules"}),s.jsx(Vi,{to:B.vpcSubnets(e),children:"Subnets"})]})]})}const Wce=()=>s.jsx(nt,{icon:s.jsx(JR,{}),title:"No projects",body:"Create a project to see it here",buttonText:"New project",buttonTo:B.projectsNew()});t3.loader=async()=>(await ae.prefetchQuery("projectList",{query:{limit:ft}}),null);const U1=Ct(),Gce=[U1.accessor("name",{cell:xi(e=>B.project({project:e}))}),U1.accessor("description",Xe.description),U1.accessor("timeCreated",Xe.timeCreated)];function t3(){const e=Fe(),t=ke(),{Table:n}=vn("projectList",{}),{data:r}=Pe("projectList",{query:{limit:ft}}),o=fe("projectDelete",{onSuccess(){t.invalidateQueries("projectList")}}),i=m.useCallback(l=>[{label:"Edit",onActivate:()=>{ae.setQueryData("projectView",{path:{project:l.name}},l),e(B.projectEdit({project:l.name}))}},{label:"Delete",onActivate:Hn({doDelete:()=>o.mutateAsync({path:{project:l.name}}),label:l.name})}],[o,e]);la(m.useMemo(()=>[{value:"New project",onSelect:()=>e(B.projectsNew())},...((r==null?void 0:r.items)||[]).map(l=>({value:l.name,onSelect:()=>e(B.project({project:l.name})),navGroup:"Go to project"}))],[e,r]));const a=sr(Gce,i);return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(JR,{}),children:"Projects"}),s.jsx(En,{heading:"projects",icon:s.jsx(Th,{}),summary:"Projects are containers for managing resources like instances, disks, and VPCs.",links:[lt.keyConceptsProjects,lt.projects]})]}),s.jsx(Xr,{children:s.jsx(Jr,{to:B.projectsNew(),children:"New Project"})}),s.jsx(n,{columns:a,emptyState:s.jsx(Wce,{})}),s.jsx(an,{})]})}const Kce=Ct(),Qce=[Kce.accessor("displayName",{header:"Name"}),da(e=>[])];function Zce(){const{me:e,myGroups:t}=Kl(),n=Ol({columns:Qce,data:t.items,getCoreRowModel:Ml()});return s.jsxs(s.Fragment,{children:[s.jsx(qt,{children:s.jsx(Ht,{icon:s.jsx(lW,{}),children:"Profile"})}),s.jsxs(je,{className:"-mt-8 mb-16",children:[s.jsx(je.Row,{label:"Display name",children:e.displayName}),s.jsxs(je.Row,{label:"User ID",children:[e.id,s.jsx(R$,{className:"ml-2",text:e.id})]})]}),s.jsx(f4,{id:"groups-label",className:"mb-4",children:"Groups"}),s.jsx(_l,{table:n,"aria-labelledby":"groups-label"}),s.jsxs("p",{className:"inline-block max-w-md text-sans-md text-secondary",children:["Your user information is managed by your organization."," ",s.jsx("span",{className:"md+:block",children:"To update your information, contact your administrator."})]})]})}n3.loader=async()=>(await ae.prefetchQuery("currentUserSshKeyList",{query:{limit:ft}}),null);const q1=Ct(),Yce=[q1.accessor("name",{}),q1.accessor("description",Xe.description),q1.accessor("timeModified",Xe.timeModified)];function n3(){const e=Fe(),{Table:t}=vn("currentUserSshKeyList",{}),n=ke(),r=fe("currentUserSshKeyDelete",{onSuccess:()=>{n.invalidateQueries("currentUserSshKeyList"),De({content:"Your SSH key has been deleted"})}}),o=m.useCallback(l=>[{label:"Delete",onActivate:Hn({doDelete:()=>r.mutateAsync({path:{sshKey:l.name}}),label:l.name})}],[r]),i=s.jsx(nt,{icon:s.jsx(Ww,{}),title:"No SSH keys",body:"Add a SSH key to see it here",buttonText:"Add SSH key",onClick:()=>e(B.sshKeysNew())}),a=sr(Yce,o);return s.jsxs(s.Fragment,{children:[s.jsx(qt,{children:s.jsx(Ht,{icon:s.jsx(sW,{}),children:"SSH Keys"})}),s.jsx(Xr,{children:s.jsx(Rr,{className:Ql({size:"sm"}),to:B.sshKeysNew(),children:"Add SSH key"})}),s.jsx(t,{columns:a,emptyState:i}),s.jsx(an,{})]})}function Xce({onDismiss:e,policy:t}){const n=HP(t),r=ke(),o=fe("policyUpdate",{onSuccess:()=>{r.invalidateQueries("policyView"),e()}}),i=Ge({defaultValues:KM});return s.jsxs(ht,{form:i,formType:"create",resourceName:"role",title:"Add user or group",onDismiss:e,onSubmit:({identityId:a,roleName:l})=>{if(l==="")return;const u=n.find(c=>c.id===a).identityType;o.mutate({body:Dv({identityId:a,identityType:u,roleName:l},t)})},loading:o.isPending,submitError:o.error,submitLabel:"Assign role",children:[s.jsx(Pn,{name:"identityId",items:n.map(QM),label:"User or group",required:!0,control:i.control}),s.jsx(Pn,{name:"roleName",label:"Role",items:A0,required:!0,control:i.control})]})}function Jce({onDismiss:e,name:t,identityId:n,identityType:r,policy:o,defaultValues:i}){const a=ke(),l=fe("policyUpdate",{onSuccess:()=>{a.invalidateQueries("policyView"),e()}}),u=Ge({defaultValues:i});return s.jsx(ht,{form:u,formType:"edit",resourceName:"role",title:`Change silo role for ${t}`,onSubmit:({roleName:c})=>{l.mutate({body:Dv({identityId:n,identityType:r,roleName:c},o)})},loading:l.isPending,submitError:l.error,onDismiss:e,children:s.jsx(Pn,{name:"roleName",label:"Role",items:A0,required:!0,control:u.control})})}const ede=({onClick:e})=>s.jsx(ys,{children:s.jsx(nt,{icon:s.jsx(Ov,{}),title:"No authorized users",body:"Give permission to view, edit, or administer this silo",buttonText:"Add user or group",onClick:e})});r3.loader=async()=>(await Promise.all([ae.prefetchQuery("policyView",{}),ae.prefetchQuery("userList",{}),ae.prefetchQuery("groupList",{})]),null);const H1=Ct();function r3(){const[e,t]=m.useState(!1),[n,r]=m.useState(null),{data:o}=Pe("policyView",{}),i=pb(o.roleAssignments,"silo"),a=m.useMemo(()=>b2(i,f=>f.id).map(([f,h])=>{var y;const p=(y=h.find(w=>w.roleSource==="silo"))==null?void 0:y.roleName,g=p?[p]:[],{name:v,identityType:b}=h[0];return{id:f,identityType:b,name:v,siloRole:p,effectiveRole:qz(g)}}).sort(qP),[i]),l=ke(),u=fe("policyUpdate",{onSuccess:()=>l.invalidateQueries("policyView")}),c=m.useMemo(()=>[H1.accessor("name",{header:"Name"}),H1.accessor("identityType",{header:"Type",cell:f=>ZM[f.getValue()]}),H1.accessor("siloRole",{header:"Role",cell:f=>{const h=f.getValue();return h?s.jsxs(tt,{color:YM[h],children:["silo.",h]}):null}}),da(f=>[{label:"Change role",onActivate:()=>r(f),disabled:!f.siloRole&&"You don't have permission to change this user's role"},{label:"Delete",onActivate:Hn({doDelete:()=>u.mutateAsync({body:UP(f.id,o)}),label:s.jsxs("span",{children:["the ",s.jsx(rn,{children:f.siloRole})," role for ",s.jsx(rn,{children:f.name})]})}),disabled:!f.siloRole&&"You don't have permission to delete this user"}])],[o,u]),d=Ol({columns:c,data:a,getCoreRowModel:Ml()});return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Ov,{}),children:"Access"}),s.jsx(En,{heading:"access",icon:s.jsx(kh,{}),summary:"Roles determine who can view, edit, or administer this silo and the projects within it. If a user or group has both a silo and project role, the stronger role takes precedence.",links:[lt.keyConceptsIam,lt.access]})]}),s.jsx(Xr,{children:s.jsx(yl,{onClick:()=>t(!0),children:"Add user or group"})}),o&&e&&s.jsx(Xce,{onDismiss:()=>t(!1),policy:o}),o&&(n==null?void 0:n.siloRole)&&s.jsx(Jce,{onDismiss:()=>r(null),policy:o,name:n.name,identityId:n.id,identityType:n.identityType,defaultValues:{roleName:n.siloRole}}),a.length===0?s.jsx(ede,{onClick:()=>t(!0)}):s.jsx(_l,{table:d})]})}function o3({num:e,className:t}){const[n,r]=Kz(e),o=s.jsx("span",{className:t,children:n});return r?s.jsx(vi,{content:e.toLocaleString(),children:o}):o}const gf=({icon:e,title:t,unit:n,provisioned:r,capacity:o,capacityLabel:i,provisionedLabel:a="Provisioned",includeUnit:l=!0})=>{const u=Wz(r,o),c=l?s.jsxs(s.Fragment,{children:[" ",n]}):null;return s.jsxs("div",{className:"w-full min-w-min rounded-lg border border-default lg+:max-w-[50%]",children:[s.jsxs("div",{className:"flex justify-between p-3",children:[s.jsx(tde,{icon:e,title:t,unit:n}),s.jsx(nde,{pct:u})]}),s.jsx("div",{className:"p-3 pb-4 pt-1",children:s.jsx(rde,{pct:u})}),s.jsxs("div",{className:"flex justify-between border-t border-secondary",children:[s.jsx(b7,{label:a,value:r,unit:c}),s.jsx(b7,{label:i,value:o,unit:c})]})]})};function tde({icon:e,title:t,unit:n}){return s.jsx("div",{children:s.jsxs("div",{className:"flex grow items-center",children:[s.jsx("span",{className:"mr-2 flex h-4 w-4 items-center text-accent",children:e}),s.jsx("span",{className:"!normal-case text-mono-sm text-secondary",children:t}),s.jsxs("span",{className:"ml-1 !normal-case text-mono-sm text-quaternary",children:["(",n,")"]})]})})}function nde({pct:e}){if(Number.isNaN(e))return s.jsxs("div",{className:"flex -translate-y-0.5 items-baseline text-quaternary",children:[s.jsx("div",{className:"font-light text-sans-2xl",children:"—"}),s.jsx("div",{className:"text-sans-xl",children:"%"})]});const[t,n]=Hz(e);return s.jsxs("div",{className:"flex -translate-y-0.5 items-baseline",children:[s.jsx("div",{className:"font-light text-sans-2xl",children:t}),s.jsxs("div",{className:"text-sans-xl text-quaternary",children:[n,"%"]})]})}function rde({pct:e}){return s.jsxs("div",{className:"flex w-full gap-0.5",children:[s.jsx("div",{className:"h-3 rounded-l border bg-accent-secondary border-accent-secondary",style:{width:`${e.toFixed(2)}%`}}),s.jsx("div",{className:"h-3 grow rounded-r border bg-info-secondary border-info-secondary"})]})}function b7({label:e,value:t,unit:n}){return s.jsxs("div",{className:"p-3 text-mono-sm",children:[s.jsx("div",{className:"mb-px text-quaternary",children:e}),s.jsxs("div",{className:"!normal-case text-secondary",children:[s.jsx(o3,{num:t}),n]})]})}const lO=({allocated:e,provisioned:t,allocatedLabel:n})=>s.jsxs("div",{className:"mb-12 flex min-w-min flex-col gap-3 lg+:flex-row",children:[s.jsx(gf,{icon:s.jsx(dW,{}),title:"CPU",unit:"vCPUs",provisioned:t.cpus,capacity:e.cpus,includeUnit:!1,capacityLabel:n}),s.jsx(gf,{icon:s.jsx(hW,{}),title:"MEMORY",unit:"GiB",provisioned:Sr(t.memory),capacity:Sr(e.memory),capacityLabel:n}),s.jsx(gf,{icon:s.jsx(mW,{}),title:"STORAGE",unit:"TiB",provisioned:La(t.storage),capacity:La(e.storage),capacityLabel:n})]});function ode({fn:e,delay:t,key:n}){const r=m.useRef();m.useEffect(()=>{r.current=e},[e]),m.useEffect(()=>{if(t==null)return;const o=setInterval(()=>{var i;return(i=r.current)==null?void 0:i.call(r)},t);return()=>clearInterval(o)},[t,n])}const w7={Off:void 0,"10s":10*1e3,"1m":60*1e3,"2m":2*60*1e3,"5m":5*60*1e3},ide=[{label:"Off",value:"Off"},{label:"10s",value:"10s"},{label:"1m",value:"1m"},{label:"2m",value:"2m"},{label:"5m",value:"5m"}];function uO({enabled:e,isLoading:t,fn:n}){const[r,o]=m.useState("10s"),[i,a]=m.useState(new Date);m.useEffect(()=>{t&&a(new Date)},[t]);const l=e?w7[r]:null;return ode({fn:n,delay:l}),{intervalMs:e&&w7[r]||void 0,intervalPicker:s.jsxs("div",{className:"mb-12 flex items-center justify-between",children:[s.jsxs("div",{className:"hidden items-center gap-2 text-right text-mono-sm text-quaternary lg+:flex",children:[s.jsx(pW,{className:"text-quinary"})," Refreshed"," ",jF(i)]}),s.jsxs("div",{className:"flex",children:[s.jsx("button",{type:"button",className:ne("flex w-10 items-center justify-center rounded-l border-b border-l border-t border-default disabled:cursor-default",t&&"hover:bg-hover",!e&&"cursor-not-allowed bg-disabled"),onClick:n,disabled:t||!e,children:s.jsx(Yw,{isLoading:t,children:s.jsx(ak,{className:"text-tertiary"})})}),s.jsx(ta,{selected:e?r:"Off",className:"w-24 [&>button]:!rounded-l-none",items:ide,onChange:o,disabled:!e})]})]})}}const cO=U.lazy(()=>Yu(()=>import("./TimeSeriesChart-D1keektS.js"),[])),dO={startTime:new Date(0),limit:1,order:"descending"};function W1({title:e,unit:t,startTime:n,endTime:r,metricName:o,project:i,valueTransform:a=l=>l}){const l=Ze("siloMetric",{path:{metricName:o},query:{project:i,startTime:n,endTime:r,limit:3e3}},{placeholderData:h=>h}),u=Ze("siloMetric",{path:{metricName:o},query:{project:i,endTime:n,...dO}},{placeholderData:h=>h}),c=m.useRef(void 0),d=l.isFetching||u.isFetching,f=m.useMemo(()=>{var h,p;return d||(c.current=KP((h=l.data)==null?void 0:h.items,(p=u.data)==null?void 0:p.items,n,r,a)),c.current},[l.data,u.data,n,r,a,d]);return s.jsxs("div",{children:[s.jsxs("h2",{className:"flex items-center gap-1.5 px-3 text-mono-sm text-secondary",children:[e," ",t&&s.jsxs("span",{className:"text-quaternary",children:["(",t,")"]})," ",(l.isPending||u.isPending)&&s.jsx(Hl,{})]}),s.jsx(m.Suspense,{fallback:s.jsx("div",{}),children:s.jsx("div",{className:"mt-3 h-[300px]",children:s.jsx(cO,{data:f,title:e,width:480,height:240,interpolation:"stepAfter",startTime:n,endTime:r,unit:t!=="count"?t:void 0})})})]})}function G1({title:e,unit:t,startTime:n,endTime:r,metricName:o,silo:i,valueTransform:a=l=>l}){const l=Ze("systemMetric",{path:{metricName:o},query:{silo:i,startTime:n,endTime:r,limit:3e3}},{placeholderData:h=>h}),u=Ze("systemMetric",{path:{metricName:o},query:{silo:i,endTime:n,...dO}},{placeholderData:h=>h}),c=m.useRef(void 0),d=l.isFetching||u.isFetching,f=m.useMemo(()=>{var h,p;return d||(c.current=KP((h=l.data)==null?void 0:h.items,(p=u.data)==null?void 0:p.items,n,r,a)),c.current},[l.data,u.data,n,r,a,d]);return s.jsxs("div",{children:[s.jsxs("h2",{className:"flex items-center gap-1.5 px-3 text-mono-sm text-secondary",children:[e," ",t&&s.jsxs("span",{className:"text-quaternary",children:["(",t,")"]})," ",(l.isPending||u.isPending)&&s.jsx(Hl,{})]}),s.jsx(m.Suspense,{fallback:s.jsx("div",{}),children:s.jsx("div",{className:"mt-3 h-[300px]",children:s.jsx(cO,{data:f,title:e,width:480,height:240,interpolation:"stepAfter",startTime:n,endTime:r,unit:t!=="count"?t:void 0})})})]})}const ade=e=>({label:e.name,value:e.id});i3.loader=async()=>(await Promise.all([ae.prefetchQuery("projectList",{}),ae.prefetchQuery("utilizationView",{})]),null);function i3(){const{me:e}=Kl(),t=e.siloId,{data:n}=Pe("projectList",{}),{data:r}=Pe("utilizationView",{}),o=m.useMemo(()=>{const g=n.items.map(ade)||[];return[{label:"All projects",value:t},...g]},[n,t]),[i,a]=m.useState(t),{preset:l,startTime:u,endTime:c,dateTimeRangePicker:d,onRangeChange:f}=U$({initialPreset:"lastHour",maxValue:Mc(ho())}),{intervalPicker:h}=uO({enabled:l!=="custom",isLoading:fD({queryKey:["siloMetric"]})>0,fn:()=>f(l)}),p={startTime:u,endTime:c,project:i===t?void 0:i};return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(ek,{}),children:"Utilization"}),s.jsx(En,{heading:"utilization",icon:s.jsx(zv,{}),summary:"System metrics let you monitor utilization of CPU, memory, and storage.",links:[lt.systemMetrics]})]}),s.jsx(lO,{provisioned:r.provisioned,allocated:r.capacity,allocatedLabel:"Quota"}),s.jsx(Xc,{className:"my-6"}),s.jsxs("div",{className:"mb-3 mt-8 flex justify-between gap-3",children:[s.jsx(ta,{selected:i,className:"w-64","aria-labelledby":"filter-id-label",name:"filter-id",items:o,onChange:a}),s.jsx("div",{className:"flex items-center gap-2",children:d})]}),h,s.jsxs("div",{className:"mb-12 space-y-12",children:[s.jsx(W1,{...p,metricName:"cpus_provisioned",title:"CPU",unit:"count"}),s.jsx(W1,{...p,metricName:"ram_provisioned",title:"Memory",unit:"GiB",valueTransform:Sr}),s.jsx(W1,{...p,metricName:"virtual_disk_space_provisioned",title:"Storage",unit:"TiB",valueTransform:La})]})]})}const sde=()=>s.jsx(nt,{icon:s.jsx(Lv,{}),title:"Something went wrong",body:"We expected some racks here, but none were found"});a3.loader=async()=>(await ae.prefetchQuery("physicalDiskList",{query:{limit:ft}}),null);const yu=Ct(),lde=[yu.accessor("id",{}),yu.accessor(e=>e.formFactor==="u2"?"U.2":"M.2",{header:"Form factor",cell:e=>s.jsx(tt,{children:e.getValue()})}),yu.accessor("model",{header:"model number"}),yu.accessor("serial",{header:"serial number"}),yu.accessor("policy",{cell:e=>{const t=e.getValue().kind,n=t==="in_service"?"default":"neutral";return s.jsx(tt,{color:n,children:t.replace(/_/g," ")})}}),yu.accessor("state",{cell:e=>{const t=e.getValue(),n=t==="active"?"default":"neutral";return s.jsx(tt,{color:n,children:t})}})];function a3(){const{Table:e}=vn("physicalDiskList",{});return s.jsx(e,{emptyState:s.jsx(sde,{}),columns:lde})}s3.loader=async()=>(await ae.prefetchQuery("rackList",{query:{limit:ft}}),null);function s3(){const{data:e}=Pe("rackList",{query:{limit:ft}});return(e==null?void 0:e.items[0])?s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Lv,{}),children:"Inventory"}),s.jsx(En,{heading:"inventory",icon:s.jsx(sk,{}),summary:"Information about the physical sleds and disks in the Oxide rack.",links:[lt.sleds,lt.storage]})]}),s.jsxs(F0,{fullWidth:!0,children:[s.jsx(Vi,{to:B.sledInventory(),children:"Sleds"}),s.jsx(Vi,{to:B.diskInventory(),children:"Disks"})]})]}):null}const ude=()=>s.jsx(nt,{icon:s.jsx(Ph,{}),title:"No instances found",body:"Instances running on the sled will be shown here"});Mp.loader=async({params:e})=>{const{sledId:t}=v2(e);return await ae.prefetchQuery("sledInstanceList",{path:{sledId:t},query:{limit:ft}}),null};const cde=()=>[],Nd=Ct(),dde=[Nd.accessor(e=>_f(e,["name","siloName","projectName"]),{header:"name",cell:e=>{const t=e.getValue();return s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("div",{className:"text-quaternary",children:`${t.siloName} / ${t.projectName}`}),s.jsx("div",{className:"text-default",children:t.name})]})}}),Nd.accessor("state",{header:"status",cell:e=>s.jsx(N0,{status:e.getValue()},"run-state")}),Nd.accessor(e=>_f(e,["memory","ncpus"]),{header:"specs",cell:e=>s.jsx(aO,{value:e.getValue()})}),Nd.accessor("timeCreated",Xe.timeCreated),Nd.accessor("timeModified",Xe.timeModified)];function Mp(){const{sledId:e}=b8(),{Table:t}=vn("sledInstanceList",{path:{sledId:e},query:{limit:ft}},{placeholderData:r=>r}),n=sr(dde,cde);return s.jsx(t,{columns:n,emptyState:s.jsx(ude,{}),rowHeight:"large"})}l3.loader=async({params:e})=>{const{sledId:t}=v2(e);return await ae.prefetchQuery("sledView",{path:{sledId:t}}),null};function l3(){const{sledId:e}=b8(),{data:t}=Pe("sledView",{path:{sledId:e}}),n=Cs(t.usablePhysicalRam,{output:"object",base:2});return s.jsxs(s.Fragment,{children:[s.jsx(qt,{children:s.jsx(Ht,{icon:s.jsx(Lv,{}),children:"Sled"})}),s.jsxs(je.Group,{className:"-mt-8 mb-16",children:[s.jsxs(je,{children:[s.jsx(je.Row,{label:"sled id",children:s.jsx("span",{className:"text-secondary",children:t.id})}),s.jsx(je.Row,{label:"part",children:s.jsx("span",{className:"text-secondary",children:t.baseboard.part})}),s.jsx(je.Row,{label:"serial",children:s.jsx("span",{className:"text-secondary",children:t.baseboard.serial})}),s.jsx(je.Row,{label:"revision",children:s.jsx("span",{className:"text-secondary",children:t.baseboard.revision})})]}),s.jsxs(je,{children:[s.jsx(je.Row,{label:"rack id",children:s.jsx("span",{className:"text-secondary",children:t.rackId})}),s.jsx(je.Row,{label:"location",children:s.jsx("span",{className:"text-disabled",children:"Coming soon"})}),s.jsx(je.Row,{label:"usable hardware threads",children:s.jsx("span",{className:"text-secondary",children:t.usableHardwareThreads})}),s.jsxs(je.Row,{label:"usable physical ram",children:[s.jsx("span",{className:"pr-0.5 text-secondary",children:n.value}),s.jsx("span",{className:"text-quaternary",children:n.unit})]})]})]}),s.jsx(F0,{fullWidth:!0,children:s.jsx(Vi,{to:B.sledInstances({sledId:e}),children:"Instances"})})]})}const fde=()=>s.jsx(nt,{icon:s.jsx(Lv,{}),title:"Something went wrong",body:"We expected some racks here, but none were found"});Op.loader=async()=>(await ae.prefetchQuery("sledList",{query:{limit:ft}}),null);const ip=Ct(),hde=[ip.accessor("id",{cell:xi(e=>B.sled({sledId:e}))}),ip.accessor("baseboard.part",{header:"part number"}),ip.accessor("baseboard.serial",{header:"serial number"}),ip.accessor("baseboard.revision",{header:"revision"})];function Op(){const{Table:e}=vn("sledList",{},{placeholderData:t=>t});return s.jsx(e,{emptyState:s.jsx(fde,{}),columns:hde})}function q$(e){const[t,n]=bw(),r=t.get("tab")||e.defaultValue;function o(i){i===e.defaultValue?t.delete("tab"):t.set("tab",i),n(t,{replace:!0})}return s.jsx(Qe.Root,{...e,value:r,onValueChange:o})}const fO=({isDefault:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(Vo,{className:"mr-1 text-accent"}),s.jsx(tt,{children:"default"})]}):null;u3.loader=async function({params:e}){const{pool:t}=y2(e),n={limit:ft};return await Promise.all([ae.prefetchQuery("ipPoolView",{path:{pool:t}}),ae.prefetchQuery("ipPoolSiloList",{path:{pool:t},query:n}),ae.prefetchQuery("ipPoolRangeList",{path:{pool:t},query:n}),ae.prefetchQuery("ipPoolUtilizationView",{path:{pool:t}}),ae.fetchQuery("siloList",{query:{limit:200}}).then(r=>{for(const o of r.items)ae.setQueryData("siloView",{path:{silo:o.id}},o)})]),null};function u3(){const e=Es(),{data:t}=Pe("ipPoolView",{path:e});return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Ss,{}),children:t.name}),s.jsx(En,{heading:"IP pools",icon:s.jsx(fs,{}),summary:"IP pools are collections of external IPs you can assign to silos. When a pool is linked to a silo, users in that silo can allocate IPs from the pool for their instances.",links:[lt.systemIpPools]})]}),s.jsx(mde,{}),s.jsxs(q$,{className:"full-width",defaultValue:"ranges",children:[s.jsxs(Qe.List,{children:[s.jsx(Qe.Trigger,{value:"ranges",children:"IP ranges"}),s.jsx(Qe.Trigger,{value:"silos",children:"Linked silos"})]}),s.jsx(Qe.Content,{value:"ranges",children:s.jsx(gde,{})}),s.jsx(Qe.Content,{value:"silos",children:s.jsx(xde,{})})]}),s.jsx(an,{})," "]})}function mde(){const{pool:e}=Es(),{data:t}=Pe("ipPoolUtilizationView",{path:{pool:e}}),{ipv4:n,ipv6:r}=QP(t);return n.capacity===0&&r.capacity===0n?null:s.jsxs("div",{className:"-mt-8 mb-8 flex min-w-min flex-col gap-3 lg+:flex-row",children:[n.capacity>0&&s.jsx(gf,{icon:s.jsx(fs,{}),title:"IPv4",provisioned:n.allocated,capacity:n.capacity,provisionedLabel:"Allocated",capacityLabel:"Capacity",unit:"IPs",includeUnit:!1}),r.capacity>0&&s.jsx(gf,{icon:s.jsx(fs,{}),title:"IPv6",provisioned:r.allocated,capacity:r.capacity,provisionedLabel:"Allocated",capacityLabel:"Capacity",unit:"IPs",includeUnit:!1})]})}const K1=Ct(),pde=[K1.accessor("range.first",{header:"First"}),K1.accessor("range.last",{header:"Last"}),K1.accessor("timeCreated",Xe.timeCreated)];function gde(){const{pool:e}=Es(),{Table:t}=vn("ipPoolRangeList",{path:{pool:e}}),n=ke(),r=fe("ipPoolRangeRemove",{onSuccess(){n.invalidateQueries("ipPoolRangeList"),n.invalidateQueries("ipPoolUtilizationView")}}),o=s.jsx(nt,{icon:s.jsx(Ss,{}),title:"No IP ranges",body:"Add a range to see it here",buttonText:"Add range",buttonTo:B.ipPoolRangeAdd({pool:e})}),i=m.useCallback(({range:l})=>[{label:"Remove",className:"destructive",onActivate:()=>os({doAction:()=>r.mutateAsync({path:{pool:e},body:l}),errorTitle:"Could not remove range",modalTitle:"Confirm remove range",modalContent:s.jsxs("p",{children:["Are you sure you want to remove range"," ",s.jsxs(rn,{children:[l.first,"–",l.last]})," ","from the pool? This will fail if the range has any addresses in use."]}),actionType:"danger"})}],[e,r]),a=sr(pde,i);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-3 flex justify-end",children:s.jsx(Jr,{to:B.ipPoolRangeAdd({pool:e}),children:"Add range"})}),s.jsx(t,{columns:a,emptyState:o})]})}function vde({value:e}){const{data:t}=Ze("siloView",{path:{silo:e}});return t?s.jsx(tu,{to:B.siloIpPools({silo:t.name}),children:t.name}):s.jsx(Rs,{})}const $7=Ct(),yde=[$7.accessor("siloId",{header:"Silo",cell:e=>s.jsx(vde,{value:e.getValue()})}),$7.accessor("isDefault",{header:()=>s.jsxs("span",{className:"inline-flex items-center gap-2",children:["Pool is silo default",s.jsx(Ac,{children:"IPs are allocated from the default pool when users ask for an IP without specifying a pool."})]}),cell:e=>s.jsx(fO,{isDefault:e.getValue()})})];function xde(){const e=Es(),t=ke(),{Table:n}=vn("ipPoolSiloList",{path:e}),r=fe("ipPoolSiloUnlink",{onSuccess(){t.invalidateQueries("ipPoolSiloList")}}),o=m.useCallback(c=>[{label:"Unlink",className:"destructive",onActivate(){os({doAction:()=>r.mutateAsync({path:{silo:c.siloId,pool:c.ipPoolId}}),modalTitle:"Confirm unlink silo",modalContent:s.jsx("p",{children:"Are you sure you want to unlink the silo? Users in this silo will no longer be able to allocate IPs from this pool. Unlink will fail if there are any IPs from the pool in use in this silo."}),errorTitle:"Could not unlink silo",actionType:"danger"})}}],[r]),[i,a]=m.useState(!1),l=s.jsx(nt,{icon:s.jsx(Ss,{}),title:"No linked silos",body:"You can link this pool to a silo to see it here",buttonText:"Link silo",onClick:()=>a(!0)}),u=sr(yde,o);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-3 flex justify-end",children:s.jsx(yl,{onClick:()=>a(!0),children:"Link silo"})}),s.jsx(n,{columns:u,emptyState:l}),i&&s.jsx(wde,{onDismiss:()=>a(!1)})]})}const bde={silo:void 0};function wde({onDismiss:e}){const t=ke(),{pool:n}=Es(),{control:r,handleSubmit:o}=Ge({defaultValues:bde}),i=fe("ipPoolSiloLink",{onSuccess(){t.invalidateQueries("ipPoolSiloList")},onError(f){De({title:"Could not link silo",content:f.message,variant:"error"})},onSettled:e});function a({silo:f}){f&&i.mutate({path:{pool:n},body:{silo:f,isDefault:!1}})}const l=Ze("ipPoolSiloList",{path:{pool:n},query:{limit:1e3}}),u=Ze("siloList",{query:{limit:1e3}}),c=m.useMemo(()=>l.data?new Set(l.data.items.map(f=>f.siloId)):void 0,[l]),d=m.useMemo(()=>u.data&&c?u.data.items.filter(f=>!c.has(f.id)).map(f=>({value:f.name,label:f.name})):[],[u,c]);return s.jsxs($e,{isOpen:!0,onDismiss:e,title:"Link silo",children:[s.jsx($e.Body,{children:s.jsx($e.Section,{children:s.jsxs("form",{autoComplete:"off",onSubmit:f=>{f.stopPropagation(),o(a)(f)},className:"space-y-4",children:[s.jsx(Bt,{variant:"info",content:"Users in the selected silo will be able to allocate IPs from this pool."}),s.jsx(Jc,{placeholder:"Select a silo",name:"silo",label:"Silo",items:d,isLoading:l.isPending||u.isPending,required:!0,control:r})]})})}),s.jsx($e.Footer,{onDismiss:e,onAction:o(a),actionLoading:i.isPending,actionText:"Link"})]})}const Q1=e=>s.jsxs(s.Fragment,{children:[s.jsx(o3,{className:"text-default",num:e.allocated})," /"," ",s.jsx(o3,{className:"text-tertiary",num:e.capacity})]});function $de(e){const{ipv4:t,ipv6:n}=QP(e);return n.capacity===0n?s.jsx("div",{className:"space-y-1",children:s.jsx(Q1,{...t})}):s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{children:[s.jsx(tt,{color:"neutral",className:"mr-2 !normal-case",children:"v4"}),s.jsx(Q1,{...t})]}),s.jsxs("div",{children:[s.jsx(tt,{color:"neutral",className:"mr-2 !normal-case",children:"v6"}),s.jsx(Q1,{...n})]})]})}const Sde=()=>s.jsx(nt,{icon:s.jsx(Ss,{}),title:"No IP pools",body:"Create an IP pool to see it here",buttonText:"New IP pool",buttonTo:B.ipPoolsNew()});function Ede({pool:e}){const{data:t}=Ze("ipPoolUtilizationView",{path:{pool:e}});return t?s.jsx($de,{...t}):s.jsx(Rs,{})}const ap=Ct(),Cde=[ap.accessor("name",{cell:xi(e=>B.ipPool({pool:e}))}),ap.accessor("description",Xe.description),ap.accessor("name",{header:"Utilization",cell:e=>s.jsx(Ede,{pool:e.getValue()})}),ap.accessor("timeCreated",Xe.timeCreated)];c3.loader=async function(){return await ae.prefetchQuery("ipPoolList",{query:{limit:ft}}),null};function c3(){const e=Fe(),{Table:t}=vn("ipPoolList",{}),{data:n}=Pe("ipPoolList",{query:{limit:ft}}),r=fe("ipPoolDelete",{onSuccess(){ae.invalidateQueries("ipPoolList")}}),o=m.useCallback(a=>[{label:"Edit",onActivate:()=>{ae.setQueryData("ipPoolView",{path:{pool:a.name}},a),e(B.ipPoolEdit({pool:a.name}))}},{label:"Delete",onActivate:Hn({doDelete:()=>r.mutateAsync({path:{pool:a.name}}),label:a.name})}],[r,e]),i=sr(Cde,o);return la(m.useMemo(()=>[{value:"New IP pool",onSelect:()=>e(B.projectsNew())},...(n.items||[]).map(a=>({value:a.name,onSelect:()=>e(B.ipPool({pool:a.name})),navGroup:"Go to IP pool"}))],[e,n])),s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Ss,{}),children:"IP Pools"}),s.jsx(En,{heading:"IP pools",icon:s.jsx(fs,{}),summary:"IP pools are collections of external IPs you can assign to silos. When a pool is linked to a silo, users in that silo can allocate IPs from the pool for their instances.",links:[lt.systemIpPools]})]}),s.jsx(Xr,{children:s.jsx(Jr,{to:B.ipPoolsNew(),children:"New IP Pool"})}),s.jsx(t,{columns:i,emptyState:s.jsx(Sde,{})}),s.jsx(an,{})]})}const Dde=()=>s.jsx(nt,{icon:s.jsx(_v,{}),title:"No images",body:"Promote an image to see it here"});d3.loader=async()=>(await ae.prefetchQuery("imageList",{query:{limit:ft}}),null);const sp=Ct(),jde=[sp.accessor("name",{cell:xi(e=>B.siloImageEdit({image:e}))}),sp.accessor("description",Xe.description),sp.accessor("size",Xe.size),sp.accessor("timeCreated",Xe.timeCreated)];function d3(){const{Table:e}=vn("imageList",{}),[t,n]=m.useState(!1),[r,o]=m.useState(null),i=ke(),a=fe("imageDelete",{onSuccess(c,d){De({content:`${d.path.image} has been deleted`}),i.invalidateQueries("imageList")}}),l=m.useCallback(c=>[{label:"Demote",onActivate:()=>o(c)},{label:"Delete",onActivate:Hn({doDelete:()=>a.mutateAsync({path:{image:c.name}}),label:c.name})}],[a]),u=sr(jde,l);return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(_v,{}),children:"Silo Images"}),s.jsx(En,{heading:"Images",icon:s.jsx(Rl,{}),summary:"Images let you create a new disk based on an existing one. Silo images must be created within a project and then promoted.",links:[lt.images]})]}),s.jsx(Xr,{children:s.jsx(Je,{size:"sm",onClick:()=>n(!0),children:"Promote image"})}),s.jsx(e,{columns:u,emptyState:s.jsx(Dde,{})}),t&&s.jsx(Rde,{onDismiss:()=>n(!1)}),r&&s.jsx(kde,{onDismiss:()=>o(null),image:r}),s.jsx(an,{})]})}const Pde={project:null,image:null},Rde=({onDismiss:e})=>{const{control:t,handleSubmit:n,watch:r,resetField:o}=Ge({defaultValues:Pde}),i=ke(),a=fe("imagePromote",{onSuccess(p){De({content:`${p.name} has been promoted`}),i.invalidateQueries("imageList")},onError:p=>{De({title:"Error",content:p.message,variant:"error"})},onSettled:e}),l=Ze("projectList",{}),u=m.useMemo(()=>{var p;return(((p=l.data)==null?void 0:p.items)||[]).map(({name:g})=>({value:g,label:g}))},[l.data]),c=r("project"),d=Ze("imageList",{query:{project:c}},{enabled:!!c}),f=m.useMemo(()=>{var p;return(((p=d.data)==null?void 0:p.items)||[]).map(g=>x$(g))},[d.data]),h=({image:p,project:g})=>{!p||!g||a.mutate({path:{image:p}})};return s.jsxs($e,{isOpen:!0,onDismiss:e,title:"Promote image",children:[s.jsx($e.Body,{children:s.jsxs($e.Section,{children:[s.jsxs("form",{autoComplete:"off",onSubmit:n(h),className:"space-y-4",children:[s.jsx(Jc,{placeholder:"Select a project",name:"project",label:"Project",items:u,onChange:()=>{o("image")},isLoading:l.isPending,required:!0,control:t}),s.jsx(Pn,{control:t,name:"image",placeholder:"Select an image",items:f,isLoading:d.isPending,required:!0,disabled:!c})]}),s.jsx(Bt,{variant:"info",content:"Once an image has been promoted it is visible to all projects in a silo"})]})}),s.jsx($e.Footer,{onDismiss:e,onAction:n(h),actionText:"Promote"})]})},kde=({onDismiss:e,image:t})=>{const{control:n,handleSubmit:r,watch:o}=Ge(),i=o("project"),a=ke(),l=fe("imageDemote",{onSuccess(f){De({content:`${f.name} has been demoted`,cta:i?{text:`View images in ${i}`,link:B.projectImages({project:i})}:void 0}),a.invalidateQueries("imageList")},onError:f=>{De({title:"Error",content:f.message,variant:"error"})},onSettled:e}),u=f=>{l.mutate({path:{image:t.id},query:{project:f.project}})},c=Ze("projectList",{}),d=m.useMemo(()=>{var f;return(((f=c.data)==null?void 0:f.items)||[]).map(({name:h})=>({value:h,label:h}))},[c.data]);return s.jsxs($e,{isOpen:!0,onDismiss:e,title:"Demote image",children:[s.jsx($e.Body,{children:s.jsx($e.Section,{children:s.jsxs("form",{autoComplete:"off",onSubmit:f=>{f.stopPropagation(),r(u)(f)},className:"space-y-4",children:[s.jsxs("p",{children:["Demoting: ",s.jsx("span",{className:"text-sans-semi-md text-default",children:t.name})]}),s.jsx(Bt,{variant:"info",content:"Once an image has been demoted it is only visible to the project that it is demoted into. This will not affect disks already created with the image."}),s.jsx(Jc,{placeholder:"Select project for image",name:"project",label:"Project",items:d,isLoading:c.isPending,required:!0,control:n})]})})}),s.jsx($e.Footer,{onDismiss:e,onAction:r(u),actionText:"Demote"})]})},Tde=()=>s.jsx(nt,{icon:s.jsx(Qf,{}),title:"No identity providers"}),lp=Ct();function Ide(){const{silo:e}=Gl(),{Table:t}=vn("siloIdentityProviderList",{query:{silo:e}}),n=m.useMemo(()=>[lp.accessor("name",{cell:r=>{const o=r.getValue();return r.row.original.providerType!=="saml"?o:s.jsx(tu,{to:B.samlIdp({silo:e,provider:o}),children:o})}}),lp.accessor("description",Xe.description),lp.accessor("providerType",{header:"Type",cell:r=>s.jsx(tt,{color:"neutral",children:r.getValue()})}),lp.accessor("timeCreated",Xe.timeCreated)],[e]);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-3 flex justify-end space-x-2",children:s.jsx(Jr,{to:B.siloIdpsNew({silo:e}),children:"New provider"})}),s.jsx(t,{emptyState:s.jsx(Tde,{}),columns:n}),s.jsx(an,{})]})}const Ade=()=>s.jsx(nt,{icon:s.jsx(Rh,{}),title:"No IP pools",body:"Create an IP pool to see it here",buttonText:"New IP pool",buttonTo:B.ipPoolsNew()}),Z1=Ct(),Nde=[Z1.accessor("name",{cell:xi(e=>B.ipPool({pool:e}))}),Z1.accessor("description",Xe.description),Z1.accessor("isDefault",{header:"Default",cell:e=>s.jsx(fO,{isDefault:e.getValue()})})];function Fde(){const{silo:e}=Gl(),[t,n]=m.useState(!1),{Table:r}=vn("siloIpPoolList",{path:{silo:e}}),o=ke(),{data:i}=Ze("siloIpPoolList",{path:{silo:e},query:{limit:1e3}}),a=m.useMemo(()=>{var f;return i?(f=i.items.find(h=>h.isDefault))==null?void 0:f.name:void 0},[i]),l=fe("ipPoolSiloUpdate",{onSuccess(){o.invalidateQueries("siloIpPoolList")}}),u=fe("ipPoolSiloUnlink",{onSuccess(){o.invalidateQueries("siloIpPoolList")}}),c=m.useCallback(f=>[{label:f.isDefault?"Clear default":"Make default",className:f.isDefault?"destructive":void 0,onActivate(){if(f.isDefault)os({doAction:()=>l.mutateAsync({path:{silo:e,pool:f.id},body:{isDefault:!1}}),modalTitle:"Confirm clear default",modalContent:s.jsxs("p",{children:["Are you sure you want ",s.jsx(rn,{children:f.name})," to stop being the default pool for this silo? If there is no default, users in this silo will have to specify a pool when allocating IPs."]}),errorTitle:"Could not clear default",actionType:"danger"});else{const h=a?s.jsxs("p",{children:["Are you sure you want to change the default pool from ",s.jsx(rn,{children:a})," ","to ",s.jsx(rn,{children:f.name}),"?"]}):s.jsxs("p",{children:["Are you sure you want to make ",s.jsx(rn,{children:f.name})," the default pool for this silo?"]}),p=a?"change":"make";os({doAction:()=>l.mutateAsync({path:{silo:e,pool:f.id},body:{isDefault:!0}}),modalTitle:`Confirm ${p} default`,modalContent:h,errorTitle:`Could not ${p} default`,actionType:"primary"})}}},{label:"Unlink",className:"destructive",onActivate(){os({doAction:()=>u.mutateAsync({path:{silo:e,pool:f.id}}),modalTitle:"Confirm unlink pool",modalContent:s.jsxs("p",{children:["Are you sure you want to unlink ",s.jsx(rn,{children:f.name}),"? Users in this silo will no longer be able to allocate IPs from this pool. Unlink will fail if there are any IPs from ",s.jsx(rn,{children:f.name})," in use in this silo."]}),errorTitle:"Could not unlink pool",actionType:"danger"})}}],[a,e,u,l]),d=sr(Nde,c);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-3 flex justify-end",children:s.jsx(yl,{onClick:()=>n(!0),children:"Link pool"})}),s.jsx(r,{columns:d,emptyState:s.jsx(Ade,{})}),t&&s.jsx(Ode,{onDismiss:()=>n(!1)})]})}const Mde={pool:void 0};function Ode({onDismiss:e}){const t=ke(),{silo:n}=Gl(),{control:r,handleSubmit:o}=Ge({defaultValues:Mde}),i=fe("ipPoolSiloLink",{onSuccess(){t.invalidateQueries("siloIpPoolList")},onError(f){De({title:"Could not link pool",content:f.message,variant:"error"})},onSettled:e});function a({pool:f}){f&&i.mutate({path:{pool:f},body:{silo:n,isDefault:!1}})}const l=Ze("siloIpPoolList",{path:{silo:n},query:{limit:1e3}}),u=Ze("ipPoolList",{query:{limit:1e3}}),c=m.useMemo(()=>l.data?new Set(l.data.items.map(f=>f.id)):void 0,[l]),d=m.useMemo(()=>u.data&&c?u.data.items.filter(f=>!c.has(f.id)).map(f=>({value:f.name,label:f.name})):[],[u,c]);return s.jsxs($e,{isOpen:!0,onDismiss:e,title:"Link pool",children:[s.jsx($e.Body,{children:s.jsx($e.Section,{children:s.jsxs("form",{autoComplete:"off",onSubmit:f=>{f.stopPropagation(),o(a)(f)},className:"space-y-4",children:[s.jsx(Bt,{variant:"info",content:"Users in this silo will be able to allocate IPs from the selected pool."}),s.jsx(Jc,{placeholder:"Select a pool",name:"pool",label:"IP pool",items:d,isLoading:l.isPending||u.isPending,required:!0,control:r})]})})}),s.jsx($e.Footer,{onDismiss:e,onAction:o(a),actionText:"Link",actionLoading:i.isPending})]})}f3.loader=async({params:e})=>{const{silo:t}=m8(e);return await Promise.all([ae.prefetchQuery("siloView",{path:{silo:t}}),ae.prefetchQuery("siloIdentityProviderList",{query:{silo:t,limit:ft}}),ae.prefetchQuery("siloIpPoolList",{query:{limit:ft},path:{silo:t}})]),null};function f3(){const e=Gl(),{data:t}=Pe("siloView",{path:e}),n=Object.entries(t.mappedFleetRoles).flatMap(([r,o])=>o.map(i=>[i,r]));return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Qf,{}),children:t.name}),s.jsx(En,{heading:"silos",icon:s.jsx(Hw,{}),summary:"Silos provide strict tenancy separation between groups of users. Each silo has its own resource limits and access policies as well as its own subdomain for the web console and API.",links:[lt.systemSilo,lt.systemIpPools,lt.access]})]}),s.jsxs(je.Group,{className:"mb-16",children:[s.jsxs(je,{children:[s.jsx(je.Row,{label:"ID",children:t.id}),s.jsx(je.Row,{label:"Description",children:t.description||s.jsx(eu,{})})]}),s.jsxs(je,{children:[s.jsx(je.Row,{label:"Created",children:s.jsx(mi,{date:t.timeCreated})}),s.jsx(je.Row,{label:"Last Modified",children:s.jsx(mi,{date:t.timeModified})})]})]}),s.jsxs(q$,{className:"full-width",defaultValue:"idps",children:[s.jsxs(Qe.List,{children:[s.jsx(Qe.Trigger,{value:"idps",children:"Identity Providers"}),s.jsx(Qe.Trigger,{value:"ip-pools",children:"IP Pools"}),s.jsx(Qe.Trigger,{value:"fleet-roles",children:"Fleet roles"})]}),s.jsx(Qe.Content,{value:"idps",children:s.jsx(Ide,{})}),s.jsx(Qe.Content,{value:"ip-pools",children:s.jsx(Fde,{})}),s.jsx(Qe.Content,{value:"fleet-roles",children:n.length===0?s.jsx(ys,{children:s.jsx(nt,{icon:s.jsx(Qf,{}),title:"Mapped fleet roles",body:"Silo roles can automatically grant a fleet role. This silo has no role mappings configured."})}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mb-4 text-secondary",children:"Silo roles can automatically grant a fleet role."}),s.jsx("ul",{className:"space-y-3",children:n.map(([r,o])=>s.jsxs("li",{className:"flex items-center",children:[s.jsxs(tt,{children:["Silo ",r]}),s.jsx(fk,{className:"mx-3 text-secondary","aria-label":"maps to"}),s.jsxs("span",{className:"text-sans-md text-secondary",children:["Fleet ",o]})]},r+"|"+o))})]})})]})]})}const _de=({isTrue:e})=>e?s.jsx(Vo,{className:"mr-1 text-accent","aria-label":"true"}):s.jsx(xW,{className:"mr-1 text-notice","aria-label":"false"}),Lde=()=>s.jsx(nt,{icon:s.jsx(Qf,{}),title:"No silos",body:"Create a silo to see it here",buttonText:"New silo",buttonTo:B.silosNew()}),Fd=Ct(),Vde=[Fd.accessor("name",{cell:e=>xi(t=>B.silo({silo:t}))(e)}),Fd.accessor("description",Xe.description),Fd.accessor("discoverable",{cell:e=>s.jsx(_de,{isTrue:e.getValue()})}),Fd.accessor(e=>e.identityMode,{header:"Identity mode",cell:e=>s.jsx(tt,{children:e.getValue().replace("_"," ")})}),Fd.accessor("timeCreated",Xe.timeCreated)];h3.loader=async()=>(await ae.prefetchQuery("siloList",{query:{limit:ft}}),null);function h3(){const e=Fe(),{Table:t}=vn("siloList",{}),n=ke(),{data:r}=Pe("siloList",{query:{limit:ft}}),o=fe("siloDelete",{onSuccess(){n.invalidateQueries("siloList")}}),i=m.useCallback(l=>[{label:"Delete",onActivate:Hn({doDelete:()=>o.mutateAsync({path:{silo:l.name}}),label:l.name})}],[o]);la(m.useMemo(()=>[{value:"New silo",onSelect:()=>e(B.silosNew())},...r.items.map(l=>({value:l.name,onSelect:()=>e(B.silo({silo:l.name})),navGroup:"Silo detail"}))],[e,r]));const a=sr(Vde,i);return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(Qf,{}),children:"Silos"}),s.jsx(En,{heading:"silos",icon:s.jsx(Hw,{}),summary:"Silos provide strict tenancy separation between groups of users. Each silo has its own resource limits and access policies as well as its own subdomain for the web console and API.",links:[lt.systemSilo]})]}),s.jsx(Xr,{children:s.jsx(Jr,{to:B.silosNew(),children:"New silo"})}),s.jsx(t,{columns:a,emptyState:s.jsx(Lde,{})}),s.jsx(an,{})]})}const Bde=({value:e,warningThreshold:t=66,errorThreshold:n=75})=>{const r=`${e.toFixed(2)}%`,o=`${r} used`,i=e>n?"bg-destructive":e>t?"bg-notice":"bg-accent",a=e>n?"bg-destructive-secondary":e>t?"bg-notice-secondary":"bg-accent-secondary";return s.jsx(vi,{content:o,placement:"top",children:s.jsx("div",{"aria-label":o,className:ne("flex h-5 w-1.5 flex-col justify-end rounded-[1px]",a),children:s.jsx("div",{className:ne("w-full rounded-[1px]",i),style:{height:r}})})})};m3.loader=async()=>(await Promise.all([ae.prefetchQuery("siloList",{}),ae.prefetchQuery("siloUtilizationList",{})]),null);function m3(){const{data:e}=Pe("siloUtilizationList",{}),{totalAllocated:t,totalProvisioned:n}=tU(e.items);return s.jsxs(s.Fragment,{children:[s.jsxs(qt,{children:[s.jsx(Ht,{icon:s.jsx(ek,{}),children:"Utilization"}),s.jsx(En,{heading:"utilization",icon:s.jsx(zv,{}),summary:"System metrics let you monitor utilization of CPU, memory, and storage against silo-level quotas.",links:[lt.systemMetrics]})]}),s.jsx(lO,{allocated:t,provisioned:n,allocatedLabel:"Quota (Total)"}),s.jsxs(q$,{defaultValue:"summary",className:"full-width",children:[s.jsxs(Qe.List,{children:[s.jsx(Qe.Trigger,{value:"summary",children:"Summary"}),s.jsx(Qe.Trigger,{value:"metrics",children:"Metrics"})]}),s.jsx(Qe.Content,{value:"summary",children:s.jsx(Ude,{})}),s.jsx(Qe.Content,{value:"metrics",children:s.jsx(zde,{})})]})]})}const zde=()=>{const{data:e}=Pe("siloList",{}),t=m.useMemo(()=>{const f=(e==null?void 0:e.items.map(h=>({label:h.name,value:h.id})))||[];return[{label:"All silos",value:yy},...f]},[e]),[n,r]=m.useState(yy),{preset:o,startTime:i,endTime:a,dateTimeRangePicker:l,onRangeChange:u}=U$({initialPreset:"lastHour",maxValue:Mc(ho())}),{intervalPicker:c}=uO({enabled:o!=="custom",isLoading:fD({queryKey:["systemMetric"]})>0,fn:()=>u(o)}),d={startTime:i,endTime:a,silo:n===yy?void 0:n};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3 mt-8 flex justify-between gap-3",children:[s.jsx(ta,{selected:n,className:"w-64","aria-labelledby":"filter-id-label",name:"filter-id",items:t,onChange:r}),s.jsx("div",{className:"flex items-center gap-2",children:l})]}),c,s.jsxs("div",{className:"mb-12 space-y-12",children:[s.jsx(G1,{...d,metricName:"cpus_provisioned",title:"CPU",unit:"count"}),s.jsx(G1,{...d,metricName:"ram_provisioned",title:"Memory",unit:"GiB",valueTransform:Sr}),s.jsx(G1,{...d,metricName:"virtual_disk_space_provisioned",title:"Storage",unit:"TiB",valueTransform:La})]})]})};function Ude(){const{data:e}=Pe("siloUtilizationList",{});return s.jsxs(Ue,{className:"w-full",children:[s.jsxs(Ue.Header,{children:[s.jsxs(Ue.HeaderRow,{children:[s.jsx(Ue.HeadCell,{children:"Silo"}),s.jsx(Ue.HeadCell,{colSpan:3,"data-test-ignore":!0,children:"Provisioned / Quota"}),s.jsx(Ue.HeadCell,{colSpan:3,"data-test-ignore":!0,children:"Available"})]}),s.jsxs(Ue.HeaderRow,{children:[s.jsx(Ue.HeadCell,{"data-test-ignore":!0}),s.jsx(Ue.HeadCell,{children:"CPU"}),s.jsx(Ue.HeadCell,{children:"Memory"}),s.jsx(Ue.HeadCell,{children:"Storage"}),s.jsx(Ue.HeadCell,{children:"CPU"}),s.jsx(Ue.HeadCell,{children:"Memory"}),s.jsx(Ue.HeadCell,{children:"Storage"})]})]}),s.jsx(Ue.Body,{children:e.items.map(t=>s.jsxs(Ue.Row,{children:[s.jsx(Ue.Cell,{width:"16%",height:"large",children:t.siloName}),s.jsx(Ue.Cell,{width:"14%",height:"large",children:s.jsx(Y1,{provisioned:t.provisioned.cpus,allocated:t.allocated.cpus})}),s.jsx(Ue.Cell,{width:"14%",height:"large",children:s.jsx(Y1,{provisioned:Sr(t.provisioned.memory),allocated:Sr(t.allocated.memory),unit:"GiB"})}),s.jsx(Ue.Cell,{width:"14%",height:"large",children:s.jsx(Y1,{provisioned:La(t.provisioned.storage),allocated:La(t.allocated.storage),unit:"TiB"})}),s.jsx(Ue.Cell,{width:"14%",className:"relative",height:"large",children:s.jsx(X1,{provisioned:t.provisioned.cpus,allocated:t.allocated.cpus})}),s.jsx(Ue.Cell,{width:"14%",className:"relative",height:"large",children:s.jsx(X1,{provisioned:Sr(t.provisioned.memory),allocated:Sr(t.allocated.memory),unit:"GiB"})}),s.jsx(Ue.Cell,{width:"14%",className:"relative",height:"large",children:s.jsx(X1,{provisioned:La(t.provisioned.storage),allocated:La(t.allocated.storage),unit:"TiB"})})]},t.siloName))})]})}const Y1=({provisioned:e,allocated:t,unit:n})=>s.jsxs("div",{className:"flex flex-col text-tertiary",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-default",children:e})," /"]}),s.jsxs("div",{className:"text-tertiary",children:[t," ",n&&s.jsx("span",{className:"text-quaternary",children:n})]})]}),X1=({provisioned:e,allocated:t,unit:n})=>{const r=e/t*100;return s.jsxs("div",{className:"flex w-full items-center justify-between",children:[s.jsxs("div",{children:[$w(t-e,2),n&&s.jsxs("span",{className:"text-tertiary",children:[" ",n]})]}),r>66&&s.jsx("div",{className:"absolute right-3",children:s.jsx(Bde,{value:r})})]})},S7=e=>e.params.project,E7=e=>e.params.instance,qde=e=>e.params.vpc,Hde=e=>e.params.silo,Wde=e=>e.params.pool,Gde=cb(s.jsxs(te,{element:s.jsx(Sue,{}),children:[s.jsx(te,{path:"*",element:s.jsx(I8,{})}),s.jsxs(te,{element:s.jsx(ose,{}),children:[s.jsx(te,{path:"login/:silo/local",element:s.jsx(Fue,{})}),s.jsx(te,{path:"login/:silo/saml/:provider",element:s.jsx(Mue,{})})]}),s.jsxs(te,{path:"device",element:s.jsx(Qae,{}),children:[s.jsx(te,{path:"verify",element:s.jsx(Aue,{})}),s.jsx(te,{path:"success",element:s.jsx(Pue,{})})]}),s.jsxs(te,{element:s.jsx(Fb,{}),loader:Fb.loader,errorElement:s.jsx(AQ,{}),shouldRevalidate:()=>!0,children:[s.jsxs(te,{path:"settings",handle:{crumb:"settings"},element:s.jsx(Due,{}),children:[s.jsx(te,{path:"profile",element:s.jsx(Zce,{}),handle:{crumb:"Profile"}}),s.jsxs(te,{element:s.jsx(n3,{}),loader:n3.loader,children:[s.jsx(te,{path:"ssh-keys",handle:{crumb:"SSH Keys"},element:null}),s.jsx(te,{path:"ssh-keys-new",element:s.jsx(oM,{}),handle:{crumb:"New SSH key"}})]})]}),s.jsxs(te,{path:"system",element:s.jsx(L4,{}),loader:L4.loader,children:[s.jsxs(te,{element:s.jsx(h3,{}),loader:h3.loader,handle:{crumb:"Silos"},children:[s.jsx(te,{path:"silos",element:null}),s.jsx(te,{path:"silos-new",element:s.jsx(Vae,{})})]}),s.jsx(te,{path:"silos",handle:{crumb:"Silos"},children:s.jsxs(te,{path:":silo",element:s.jsx(f3,{}),loader:f3.loader,handle:{crumb:Hde},children:[s.jsx(te,{path:"idps-new",element:s.jsx(lie,{})}),s.jsx(te,{path:"idps/saml/:provider",element:s.jsx(y4,{}),loader:y4.loader})]})}),s.jsx(te,{path:"issues",element:null}),s.jsx(te,{path:"utilization",element:s.jsx(m3,{}),loader:m3.loader,handle:{crumb:"Utilization"}}),s.jsxs(te,{path:"inventory",element:s.jsx(s3,{}),loader:s3.loader,handle:{crumb:"Inventory"},children:[s.jsx(te,{index:!0,element:s.jsx(ks,{to:"sleds",replace:!0}),loader:Op.loader}),s.jsx(te,{path:"sleds",element:s.jsx(Op,{}),loader:Op.loader}),s.jsx(te,{path:"disks",element:s.jsx(a3,{}),loader:a3.loader})]}),s.jsxs(te,{path:"inventory/sleds/:sledId",element:s.jsx(l3,{}),loader:l3.loader,handle:{crumb:"Sleds"},children:[s.jsx(te,{index:!0,element:s.jsx(ks,{to:"instances",replace:!0}),loader:Mp.loader}),s.jsx(te,{path:"instances",element:s.jsx(Mp,{}),loader:Mp.loader})]}),s.jsx(te,{path:"health",element:null,handle:{crumb:"Health"}}),s.jsx(te,{path:"update",element:null,handle:{crumb:"Update"}}),s.jsxs(te,{path:"networking",children:[s.jsx(te,{index:!0,element:s.jsx(ks,{to:"ip-pools",replace:!0})}),s.jsxs(te,{element:s.jsx(c3,{}),loader:c3.loader,handle:{crumb:"IP pools"},children:[s.jsx(te,{path:"ip-pools",element:null}),s.jsx(te,{path:"ip-pools-new",element:s.jsx(kae,{})}),s.jsx(te,{path:"ip-pools/:pool/edit",element:s.jsx(C4,{}),loader:C4.loader,handle:{crumb:"Edit IP pool"}})]})]}),s.jsx(te,{path:"networking/ip-pools",handle:{crumb:"IP pools"},children:s.jsx(te,{path:":pool",element:s.jsx(u3,{}),loader:u3.loader,handle:{crumb:Wde},children:s.jsx(te,{path:"ranges-add",element:s.jsx(Aae,{})})})})]}),s.jsx(te,{index:!0,element:s.jsx(ks,{to:B.projects(),replace:!0})}),s.jsx(te,{path:"projects/:project",element:s.jsx(ks,{to:"instances",replace:!0})}),s.jsxs(te,{element:s.jsx(jue,{}),children:[s.jsx(te,{path:"images",element:s.jsx(d3,{}),loader:d3.loader,handle:{crumb:"Images"},children:s.jsx(te,{path:":image/edit",element:s.jsx(b4,{}),loader:b4.loader,handle:{crumb:"Edit Image"}})}),s.jsx(te,{path:"utilization",element:s.jsx(i3,{}),loader:i3.loader,handle:{crumb:"Utilization"}}),s.jsx(te,{path:"lookup/instances/:instance",element:null,loader:m7}),s.jsx(te,{path:"lookup/i/:instance",element:null,loader:m7}),s.jsxs(te,{loader:t3.loader,element:s.jsx(t3,{}),children:[s.jsx(te,{path:"projects",handle:{crumb:"Projects"},element:null}),s.jsx(te,{path:"projects-new",element:s.jsx(Fae,{}),handle:{crumb:"New project"}}),s.jsx(te,{path:"projects/:project/edit",element:s.jsx(D4,{}),loader:D4.loader,handle:{crumb:"Edit project"}})]}),s.jsx(te,{path:"access",element:s.jsx(r3,{}),loader:r3.loader,handle:{crumb:"Access"}})]}),s.jsx(te,{path:"projects/:project",element:s.jsx(Wd,{overrideContentPane:s.jsx(nse,{})}),loader:Wd.loader,handle:{crumb:S7},children:s.jsx(te,{path:"instances",handle:{crumb:"Instances"},children:s.jsx(te,{path:":instance",handle:{crumb:E7},children:s.jsx(te,{path:"serial-console",loader:W4.loader,element:s.jsx(W4,{}),handle:{crumb:"Serial Console"}})})})}),s.jsxs(te,{path:"projects/:project",element:s.jsx(Wd,{}),loader:Wd.loader,handle:{crumb:S7},children:[s.jsx(te,{path:"instances-new",element:s.jsx(S4,{}),loader:S4.loader,handle:{crumb:"New instance"}}),s.jsxs(te,{path:"instances",handle:{crumb:"Instances"},children:[s.jsx(te,{index:!0,element:s.jsx(Z4,{}),loader:Z4.loader}),s.jsxs(te,{path:":instance",handle:{crumb:E7},children:[s.jsx(te,{index:!0,element:s.jsx(ks,{to:"storage",replace:!0})}),s.jsxs(te,{element:s.jsx(H4,{}),loader:H4.loader,children:[s.jsx(te,{path:"storage",element:s.jsx(Q4,{}),loader:Q4.loader,handle:{crumb:"Storage"}}),s.jsx(te,{path:"networking",element:s.jsx(K4,{}),loader:K4.loader,handle:{crumb:"Networking"}}),s.jsx(te,{path:"metrics",element:s.jsx(G4,{}),loader:G4.loader,handle:{crumb:"metrics"}}),s.jsx(te,{path:"connect",element:s.jsx(hce,{}),handle:{crumb:"Connect"}})]})]})]}),s.jsxs(te,{loader:J4.loader,element:s.jsx(J4,{}),children:[s.jsx(te,{path:"vpcs",handle:{crumb:"VPCs"},element:null}),s.jsx(te,{path:"vpcs-new",element:s.jsx(Kae,{}),handle:{crumb:"New VPC"}}),s.jsx(te,{path:"vpcs/:vpc/edit",element:s.jsx(P4,{}),loader:P4.loader,handle:{crumb:"Edit VPC"}})]}),s.jsx(te,{path:"vpcs",handle:{crumb:"VPCs"},children:s.jsx(te,{path:":vpc",handle:{crumb:qde},children:s.jsxs(te,{element:s.jsx(e3,{}),loader:e3.loader,children:[s.jsx(te,{index:!0,element:s.jsx(ks,{to:"firewall-rules",replace:!0}),loader:Fp.loader}),s.jsxs(te,{element:s.jsx(Fp,{}),loader:Fp.loader,children:[s.jsx(te,{path:"firewall-rules",handle:{crumb:"Firewall Rules"},element:null}),s.jsx(te,{path:"firewall-rules-new/:rule?",element:s.jsx(h4,{}),loader:h4.loader,handle:{crumb:"New Firewall Rule"}}),s.jsx(te,{path:"firewall-rules/:rule/edit",element:s.jsx(m4,{}),loader:m4.loader,handle:{crumb:"Edit Firewall Rule"}})]}),s.jsxs(te,{element:s.jsx(X4,{}),loader:X4.loader,children:[s.jsx(te,{path:"subnets",handle:{crumb:"Subnets"}}),s.jsx(te,{path:"subnets-new",element:s.jsx(Wae,{}),handle:{crumb:"New Subnet"}}),s.jsx(te,{path:"subnets/:subnet/edit",element:s.jsx(j4,{}),loader:j4.loader,handle:{crumb:"Edit Subnet"}})]})]})})}),s.jsxs(te,{element:s.jsx(U4,{}),loader:U4.loader,children:[s.jsx(te,{path:"floating-ips",handle:{crumb:"Floating IPs"},element:null}),s.jsx(te,{path:"floating-ips-new",element:s.jsx(nie,{}),handle:{crumb:"New Floating IP"}}),s.jsx(te,{path:"floating-ips/:floatingIp/edit",element:s.jsx(v4,{}),loader:v4.loader,handle:{crumb:"Edit Floating IP"}})]}),s.jsxs(te,{element:s.jsx(z4,{}),loader:z4.loader,children:[s.jsx(te,{path:"disks-new",element:s.jsx(b$,{onDismiss:e=>e("../disks")}),handle:{crumb:"New disk"}}),s.jsx(te,{path:"disks",handle:{crumb:"Disks"},element:null})]}),s.jsxs(te,{element:s.jsx(Y4,{}),loader:Y4.loader,children:[s.jsx(te,{path:"snapshots",handle:{crumb:"Snapshots"},element:null}),s.jsx(te,{path:"snapshots-new",element:s.jsx(qae,{}),handle:{crumb:"New snapshot"}}),s.jsx(te,{path:"snapshots/:snapshot/images-new",element:s.jsx(w4,{}),loader:w4.loader,handle:{crumb:"Create image from snapshot"}})]}),s.jsxs(te,{element:s.jsx(q4,{}),loader:q4.loader,children:[s.jsx(te,{path:"images",handle:{crumb:"Images"},element:null}),s.jsx(te,{path:"images-new",handle:{crumb:"Upload image"},element:s.jsx(jie,{})}),s.jsx(te,{path:"images/:image/edit",element:s.jsx(x4,{}),loader:x4.loader,handle:{crumb:"Edit Image"}})]}),s.jsx(te,{path:"access",element:s.jsx(B4,{}),loader:B4.loader,handle:{crumb:"Access"}})]})]})]})),Kde=mP(document.getElementById("root"));function Qde(){const e=zB(Gde,{future:{v7_fetcherPersist:!0,v7_normalizeFormMethod:!0,v7_partialHydration:!0,v7_relativeSplatPath:!0}});Kde.render(s.jsx(m.StrictMode,{children:s.jsx(l_,{client:LP,children:s.jsxs(IQ,{children:[s.jsx(DQ,{}),s.jsx(tse,{id:"skip-nav"}),s.jsx(gQ,{}),s.jsx(ZB,{router:e})]})})}))}BQ().then(Qde);export{Dre as A,im as B,pi as C,vW as D,wZ as E,yy as F,jr as G,ne as H,gy as I,nfe as M,U as R,Zz as T,Xde as a,_f as b,zne as c,vy as d,rfe as e,VS as f,Gne as g,Jde as h,Va as i,tfe as j,py as k,efe as l,ufe as m,Cv as n,s as o,sz as p,St as q,m as r,az as s,Xs as t,zc as u,IU as v,qne as w,V6 as x,lfe as y,sfe as z};
//# sourceMappingURL=app-BnIhEdaE.js.map
