@bluealba/pae-ui-react-core 4.2.2 → 4.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +4 -3
- package/dist/index.systemjs.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -206,7 +206,7 @@ to {
|
|
|
206
206
|
> * {
|
|
207
207
|
pointer-events: auto;
|
|
208
208
|
}
|
|
209
|
-
`,Pr=16,Up=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=mp(n);return d.createElement("div",{style:{position:"fixed",zIndex:9999,top:Pr,left:Pr,right:Pr,bottom:Pr,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(u=>{let f=u.position||t,h=l.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),m=Fp(f,h);return d.createElement($p,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?Bp:"",style:m},u.type==="custom"?Cr(u.message,u):o?o(u):d.createElement(Mp,{toast:u,position:f}))}))},xa=Re;const Qo=()=>({notify:S.useCallback((t,n,r)=>{const o={style:{background:"var(--platform-background-primary-color)",color:"var(--platform-text-primary-color)"}};n==="warning"||n==="info"?xa(t,{...o,icon:n==="warning"?"⚠️":"ℹ️"}):xa[n](t,o),r&&console.error(r)},[])});var fn=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(){}},zt=typeof window>"u"||"Deno"in globalThis;function we(){}function Wp(e,t){return typeof e=="function"?e(t):e}function Yo(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ca(e,t){return Math.max(e+(t||0)-Date.now(),0)}function wt(e,t){return typeof e=="function"?e(t):e}function De(e,t){return typeof e=="function"?e(t):e}function Sa(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Zo(i,t.options))return!1}else if(!Qn(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Ea(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Gt(t.options.mutationKey)!==Gt(s))return!1}else if(!Qn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Zo(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gt)(e)}function Gt(e){return JSON.stringify(e,(t,n)=>Jo(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Qn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Qn(e[n],t[n])):!1}function Xo(e,t){if(e===t)return e;const n=Ta(e)&&Ta(t);if(n||Jo(e)&&Jo(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let l=0;for(let u=0;u<i;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=Xo(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return o===i&&l===o?e:a}return t}function Ar(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 Ta(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jo(e){if(!Pa(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Pa(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Pa(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hp(e){return new Promise(t=>{setTimeout(t,e)})}function es(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){try{return Xo(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Xo(e,t)}return t}function Vp(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function zp(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rr=Symbol();function Aa(e,t){return e.queryFn===Rr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Rr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ra(e,t){return typeof e=="function"?e(...t):!!e}var Gp=(xd=class extends fn{constructor(){super();M(this,nn);M(this,Pt);M(this,Tn);I(this,Tn,t=>{if(!zt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){_(this,Pt)||this.setEventListener(_(this,Tn))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,Pt))==null||t.call(this),I(this,Pt,void 0))}setEventListener(t){var n;I(this,Tn,t),(n=_(this,Pt))==null||n.call(this),I(this,Pt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){_(this,nn)!==t&&(I(this,nn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof _(this,nn)=="boolean"?_(this,nn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},nn=new WeakMap,Pt=new WeakMap,Tn=new WeakMap,xd),ts=new Gp,qp=(Cd=class extends fn{constructor(){super();M(this,Pn,!0);M(this,At);M(this,An);I(this,An,t=>{if(!zt&&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,At)||this.setEventListener(_(this,An))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,At))==null||t.call(this),I(this,At,void 0))}setEventListener(t){var n;I(this,An,t),(n=_(this,At))==null||n.call(this),I(this,At,t(this.setOnline.bind(this)))}setOnline(t){_(this,Pn)!==t&&(I(this,Pn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return _(this,Pn)}},Pn=new WeakMap,At=new WeakMap,An=new WeakMap,Cd),Or=new qp;function ns(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Kp(e){return Math.min(1e3*2**e,3e4)}function Oa(e){return(e??"online")==="online"?Or.isOnline():!0}var Ia=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function rs(e){return e instanceof Ia}function ja(e){let t=!1,n=0,r=!1,o;const s=ns(),i=p=>{var v;r||(m(new Ia(p)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>ts.isFocused()&&(e.networkMode==="always"||Or.isOnline())&&e.canRun(),f=()=>Oa(e.networkMode)&&e.canRun(),h=p=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,p),o==null||o(),s.resolve(p))},m=p=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,p),o==null||o(),s.reject(p))},g=()=>new Promise(p=>{var v;o=y=>{(r||u())&&p(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),x=()=>{if(r)return;let p;const v=n===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(y){p=Promise.reject(y)}Promise.resolve(p).then(h).catch(y=>{var A;if(r)return;const w=e.retry??(zt?0:3),C=e.retryDelay??Kp,E=typeof C=="function"?C(n,y):C,P=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,y);if(t||!P){m(y);return}n++,(A=e.onFail)==null||A.call(e,n,y),Hp(E).then(()=>u()?void 0:g()).then(()=>{t?m(y):x()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?x():g().then(x),s)}}var Qp=e=>setTimeout(e,0);function Yp(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=Qp;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var me=Yp(),ka=(Sd=class{constructor(){M(this,rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yo(this.gcTime)&&I(this,rn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zt?1/0:5*60*1e3))}clearGcTimeout(){_(this,rn)&&(clearTimeout(_(this,rn)),I(this,rn,void 0))}},rn=new WeakMap,Sd),Zp=(Ed=class extends ka{constructor(t){super();M(this,We);M(this,Rn);M(this,On);M(this,je);M(this,on);M(this,be);M(this,lr);M(this,sn);I(this,sn,!1),I(this,lr,t.defaultOptions),this.setOptions(t.options),this.observers=[],I(this,on,t.client),I(this,je,_(this,on).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,I(this,Rn,Xp(this.options)),this.state=t.state??_(this,Rn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=_(this,be))==null?void 0:t.promise}setOptions(t){this.options={..._(this,lr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,je).remove(this)}setData(t,n){const r=es(this.state.data,t,this.options);return V(this,We,mt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){V(this,We,mt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=_(this,be))==null?void 0:r.promise;return(o=_(this,be))==null||o.cancel(t),n?n.then(we).catch(we):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(_(this,Rn))}isActive(){return this.observers.some(t=>De(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>wt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ca(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,be))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,be))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),_(this,je).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,be)&&(_(this,sn)?_(this,be).cancel({revert:!0}):_(this,be).cancelRetry()),this.scheduleGc()),_(this,je).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||V(this,We,mt).call(this,{type:"invalidate"})}fetch(t,n){var u,f,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(_(this,be))return _(this,be).continueRetry(),_(this,be).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const r=new AbortController,o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(I(this,sn,!0),r.signal)})},s=()=>{const m=Aa(this.options,n),x=(()=>{const p={client:_(this,on),queryKey:this.queryKey,meta:this.meta};return o(p),p})();return I(this,sn,!1),this.options.persister?this.options.persister(m,x,this):m(x)},a=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:_(this,on),state:this.state,fetchFn:s};return o(m),m})();(u=this.options.behavior)==null||u.onFetch(a,this),I(this,On,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&V(this,We,mt).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=m=>{var g,x,p,v;rs(m)&&m.silent||V(this,We,mt).call(this,{type:"error",error:m}),rs(m)||((x=(g=_(this,je).config).onError)==null||x.call(g,m,this),(v=(p=_(this,je).config).onSettled)==null||v.call(p,this.state.data,m,this)),this.scheduleGc()};return I(this,be,ja({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var g,x,p,v;if(m===void 0){console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(y){l(y);return}(x=(g=_(this,je).config).onSuccess)==null||x.call(g,m,this),(v=(p=_(this,je).config).onSettled)==null||v.call(p,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,g)=>{V(this,We,mt).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{V(this,We,mt).call(this,{type:"pause"})},onContinue:()=>{V(this,We,mt).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),_(this,be).start()}},Rn=new WeakMap,On=new WeakMap,je=new WeakMap,on=new WeakMap,be=new WeakMap,lr=new WeakMap,sn=new WeakMap,We=new WeakSet,mt=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,...La(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 rs(o)&&o.revert&&_(this,On)?{..._(this,On),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),me.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,je).notify({query:this,type:"updated",action:t})})},Ed);function La(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Oa(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Xp(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 Jp=(Td=class extends fn{constructor(t={}){super();M(this,et);this.config=t,I(this,et,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Zo(o,n);let i=this.get(s);return i||(i=new Zp({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){_(this,et).has(t.queryHash)||(_(this,et).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=_(this,et).get(t.queryHash);n&&(t.destroy(),n===t&&_(this,et).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return _(this,et).get(t)}getAll(){return[..._(this,et).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sa(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Sa(t,r)):n}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},et=new WeakMap,Td),eh=(Pd=class extends ka{constructor(t){super();M(this,nt);M(this,tt);M(this,_e);M(this,an);this.mutationId=t.mutationId,I(this,_e,t.mutationCache),I(this,tt,[]),this.state=t.state||Na(),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,tt).includes(t)||(_(this,tt).push(t),this.clearGcTimeout(),_(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){I(this,tt,_(this,tt).filter(n=>n!==t)),this.scheduleGc(),_(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){_(this,tt).length||(this.state.status==="pending"?this.scheduleGc():_(this,_e).remove(this))}continue(){var t;return((t=_(this,an))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,l,u,f,h,m,g,x,p,v,y,w,C,E,P,A,R,N;const n=()=>{V(this,nt,Ut).call(this,{type:"continue"})};I(this,an,ja({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,D)=>{V(this,nt,Ut).call(this,{type:"failed",failureCount:k,error:D})},onPause:()=>{V(this,nt,Ut).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,_e).canRun(this)}));const r=this.state.status==="pending",o=!_(this,an).canStart();try{if(r)n();else{V(this,nt,Ut).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=_(this,_e).config).onMutate)==null?void 0:i.call(s,t,this));const D=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));D!==this.state.context&&V(this,nt,Ut).call(this,{type:"pending",context:D,variables:t,isPaused:o})}const k=await _(this,an).start();return await((f=(u=_(this,_e).config).onSuccess)==null?void 0:f.call(u,k,t,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,k,t,this.state.context)),await((x=(g=_(this,_e).config).onSettled)==null?void 0:x.call(g,k,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,k,null,t,this.state.context)),V(this,nt,Ut).call(this,{type:"success",data:k}),k}catch(k){try{throw await((w=(y=_(this,_e).config).onError)==null?void 0:w.call(y,k,t,this.state.context,this)),await((E=(C=this.options).onError)==null?void 0:E.call(C,k,t,this.state.context)),await((A=(P=_(this,_e).config).onSettled)==null?void 0:A.call(P,void 0,k,this.state.variables,this.state.context,this)),await((N=(R=this.options).onSettled)==null?void 0:N.call(R,void 0,k,t,this.state.context)),k}finally{V(this,nt,Ut).call(this,{type:"error",error:k})}}finally{_(this,_e).runNext(this)}}},tt=new WeakMap,_e=new WeakMap,an=new WeakMap,nt=new WeakSet,Ut=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),me.batch(()=>{_(this,tt).forEach(r=>{r.onMutationUpdate(t)}),_(this,_e).notify({mutation:this,type:"updated",action:t})})},Pd);function Na(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var th=(Ad=class extends fn{constructor(t={}){super();M(this,dt);M(this,He);M(this,cr);this.config=t,I(this,dt,new Set),I(this,He,new Map),I(this,cr,0)}build(t,n,r){const o=new eh({mutationCache:this,mutationId:++Po(this,cr)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){_(this,dt).add(t);const n=Ir(t);if(typeof n=="string"){const r=_(this,He).get(n);r?r.push(t):_(this,He).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(_(this,dt).delete(t)){const n=Ir(t);if(typeof n=="string"){const r=_(this,He).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&_(this,He).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ir(t);if(typeof n=="string"){const r=_(this,He).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Ir(t);if(typeof n=="string"){const o=(r=_(this,He).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){me.batch(()=>{_(this,dt).forEach(t=>{this.notify({type:"removed",mutation:t})}),_(this,dt).clear(),_(this,He).clear()})}getAll(){return Array.from(_(this,dt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ea(n,r))}findAll(t={}){return this.getAll().filter(n=>Ea(t,n))}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return me.batch(()=>Promise.all(t.map(n=>n.continue().catch(we))))}},dt=new WeakMap,He=new WeakMap,cr=new WeakMap,Ad);function Ir(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Da(e){return{onFetch:(t,n)=>{var f,h,m,g,x;const r=t.options,o=(m=(h=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,s=((g=t.state.data)==null?void 0:g.pages)||[],i=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const v=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},y=Aa(t.options,t.fetchOptions),w=async(C,E,P)=>{if(p)return Promise.reject();if(E==null&&C.pages.length)return Promise.resolve(C);const R=(()=>{const U={client:t.client,queryKey:t.queryKey,pageParam:E,direction:P?"backward":"forward",meta:t.options.meta};return v(U),U})(),N=await y(R),{maxPages:k}=t.options,D=P?zp:Vp;return{pages:D(C.pages,N,k),pageParams:D(C.pageParams,E,k)}};if(o&&s.length){const C=o==="backward",E=C?nh:Ma,P={pages:s,pageParams:i},A=E(r,P);a=await w(P,A,C)}else{const C=e??s.length;do{const E=l===0?i[0]??r.initialPageParam:Ma(r,a);if(l>0&&E==null)break;a=await w(a,E),l++}while(l<C)}return a};t.options.persister?t.fetchFn=()=>{var p,v;return(v=(p=t.options).persister)==null?void 0:v.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ma(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function nh(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var rh=(Rd=class{constructor(e={}){M(this,ue);M(this,Rt);M(this,Ot);M(this,In);M(this,jn);M(this,It);M(this,kn);M(this,Ln);I(this,ue,e.queryCache||new Jp),I(this,Rt,e.mutationCache||new th),I(this,Ot,e.defaultOptions||{}),I(this,In,new Map),I(this,jn,new Map),I(this,It,0)}mount(){Po(this,It)._++,_(this,It)===1&&(I(this,kn,ts.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,ue).onFocus())})),I(this,Ln,Or.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,ue).onOnline())})))}unmount(){var e,t;Po(this,It)._--,_(this,It)===0&&((e=_(this,kn))==null||e.call(this),I(this,kn,void 0),(t=_(this,Ln))==null||t.call(this),I(this,Ln,void 0))}isFetching(e){return _(this,ue).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return _(this,Rt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,ue).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=_(this,ue).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(wt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return _(this,ue).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,ue).get(r.queryHash),s=o==null?void 0:o.state.data,i=Wp(t,s);if(i!==void 0)return _(this,ue).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return me.batch(()=>_(this,ue).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,ue).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=_(this,ue);me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=_(this,ue);return me.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=me.batch(()=>_(this,ue).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(we).catch(we)}invalidateQueries(e,t={}){return me.batch(()=>(_(this,ue).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=me.batch(()=>_(this,ue).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(we)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(we)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=_(this,ue).build(this,t);return n.isStaleByTime(wt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(we).catch(we)}fetchInfiniteQuery(e){return e.behavior=Da(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(we).catch(we)}ensureInfiniteQueryData(e){return e.behavior=Da(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Or.isOnline()?_(this,Rt).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,ue)}getMutationCache(){return _(this,Rt)}getDefaultOptions(){return _(this,Ot)}setDefaultOptions(e){I(this,Ot,e)}setQueryDefaults(e,t){_(this,In).set(Gt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[..._(this,In).values()],n={};return t.forEach(r=>{Qn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){_(this,jn).set(Gt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[..._(this,jn).values()],n={};return t.forEach(r=>{Qn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={..._(this,Ot).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Zo(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.queryFn===Rr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{..._(this,Ot).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){_(this,ue).clear(),_(this,Rt).clear()}},ue=new WeakMap,Rt=new WeakMap,Ot=new WeakMap,In=new WeakMap,jn=new WeakMap,It=new WeakMap,kn=new WeakMap,Ln=new WeakMap,Rd),oh=(Od=class extends fn{constructor(t,n){super();M(this,ee);M(this,Te);M(this,K);M(this,ur);M(this,xe);M(this,ln);M(this,Nn);M(this,jt);M(this,kt);M(this,dr);M(this,Dn);M(this,Mn);M(this,cn);M(this,un);M(this,Lt);M(this,$n,new Set);this.options=n,I(this,Te,t),I(this,kt,null),I(this,jt,ns()),this.options.experimental_prefetchInRender||_(this,jt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,K).addObserver(this),$a(_(this,K),this.options)?V(this,ee,fr).call(this):this.updateResult(),V(this,ee,Ei).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return os(_(this,K),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return os(_(this,K),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,V(this,ee,Ti).call(this),V(this,ee,Pi).call(this),_(this,K).removeObserver(this)}setOptions(t){const n=this.options,r=_(this,K);if(this.options=_(this,Te).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof De(this.options.enabled,_(this,K))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");V(this,ee,Ai).call(this),_(this,K).setOptions(this.options),n._defaulted&&!Ar(this.options,n)&&_(this,Te).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,K),observer:this});const o=this.hasListeners();o&&Fa(_(this,K),r,this.options,n)&&V(this,ee,fr).call(this),this.updateResult(),o&&(_(this,K)!==r||De(this.options.enabled,_(this,K))!==De(n.enabled,_(this,K))||wt(this.options.staleTime,_(this,K))!==wt(n.staleTime,_(this,K)))&&V(this,ee,xi).call(this);const s=V(this,ee,Ci).call(this);o&&(_(this,K)!==r||De(this.options.enabled,_(this,K))!==De(n.enabled,_(this,K))||s!==_(this,Lt))&&V(this,ee,Si).call(this,s)}getOptimisticResult(t){const n=_(this,Te).getQueryCache().build(_(this,Te),t),r=this.createResult(n,t);return ih(this,r)&&(I(this,xe,r),I(this,Nn,this.options),I(this,ln,_(this,K).state)),r}getCurrentResult(){return _(this,xe)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){_(this,$n).add(t)}getCurrentQuery(){return _(this,K)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=_(this,Te).defaultQueryOptions(t),r=_(this,Te).getQueryCache().build(_(this,Te),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return V(this,ee,fr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,xe)))}createResult(t,n){var k;const r=_(this,K),o=this.options,s=_(this,xe),i=_(this,ln),a=_(this,Nn),u=t!==r?t.state:_(this,ur),{state:f}=t;let h={...f},m=!1,g;if(n._optimisticResults){const D=this.hasListeners(),U=!D&&$a(t,n),W=D&&Fa(t,r,n,o);(U||W)&&(h={...h,...La(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:x,errorUpdatedAt:p,status:v}=h;g=h.data;let y=!1;if(n.placeholderData!==void 0&&g===void 0&&v==="pending"){let D;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(D=s.data,y=!0):D=typeof n.placeholderData=="function"?n.placeholderData((k=_(this,Mn))==null?void 0:k.state.data,_(this,Mn)):n.placeholderData,D!==void 0&&(v="success",g=es(s==null?void 0:s.data,D,n),m=!0)}if(n.select&&g!==void 0&&!y)if(s&&g===(i==null?void 0:i.data)&&n.select===_(this,dr))g=_(this,Dn);else try{I(this,dr,n.select),g=n.select(g),g=es(s==null?void 0:s.data,g,n),I(this,Dn,g),I(this,kt,null)}catch(D){I(this,kt,D)}_(this,kt)&&(x=_(this,kt),g=_(this,Dn),p=Date.now(),v="error");const w=h.fetchStatus==="fetching",C=v==="pending",E=v==="error",P=C&&w,A=g!==void 0,N={status:v,fetchStatus:h.fetchStatus,isPending:C,isSuccess:v==="success",isError:E,isInitialLoading:P,isLoading:P,data:g,dataUpdatedAt:h.dataUpdatedAt,error:x,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!C,isLoadingError:E&&!A,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&A,isStale:ss(t,n),refetch:this.refetch,promise:_(this,jt)};if(this.options.experimental_prefetchInRender){const D=H=>{N.status==="error"?H.reject(N.error):N.data!==void 0&&H.resolve(N.data)},U=()=>{const H=I(this,jt,N.promise=ns());D(H)},W=_(this,jt);switch(W.status){case"pending":t.queryHash===r.queryHash&&D(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&U();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&U();break}}return N}updateResult(){const t=_(this,xe),n=this.createResult(_(this,K),this.options);if(I(this,ln,_(this,K).state),I(this,Nn,this.options),_(this,ln).data!==void 0&&I(this,Mn,_(this,K)),Ar(n,t))return;I(this,xe,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!_(this,$n).size)return!0;const i=new Set(s??_(this,$n));return this.options.throwOnError&&i.add("error"),Object.keys(_(this,xe)).some(a=>{const l=a;return _(this,xe)[l]!==t[l]&&i.has(l)})};V(this,ee,zd).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&V(this,ee,Ei).call(this)}},Te=new WeakMap,K=new WeakMap,ur=new WeakMap,xe=new WeakMap,ln=new WeakMap,Nn=new WeakMap,jt=new WeakMap,kt=new WeakMap,dr=new WeakMap,Dn=new WeakMap,Mn=new WeakMap,cn=new WeakMap,un=new WeakMap,Lt=new WeakMap,$n=new WeakMap,ee=new WeakSet,fr=function(t){V(this,ee,Ai).call(this);let n=_(this,K).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(we)),n},xi=function(){V(this,ee,Ti).call(this);const t=wt(this.options.staleTime,_(this,K));if(zt||_(this,xe).isStale||!Yo(t))return;const r=Ca(_(this,xe).dataUpdatedAt,t)+1;I(this,cn,setTimeout(()=>{_(this,xe).isStale||this.updateResult()},r))},Ci=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,K)):this.options.refetchInterval)??!1},Si=function(t){V(this,ee,Pi).call(this),I(this,Lt,t),!(zt||De(this.options.enabled,_(this,K))===!1||!Yo(_(this,Lt))||_(this,Lt)===0)&&I(this,un,setInterval(()=>{(this.options.refetchIntervalInBackground||ts.isFocused())&&V(this,ee,fr).call(this)},_(this,Lt)))},Ei=function(){V(this,ee,xi).call(this),V(this,ee,Si).call(this,V(this,ee,Ci).call(this))},Ti=function(){_(this,cn)&&(clearTimeout(_(this,cn)),I(this,cn,void 0))},Pi=function(){_(this,un)&&(clearInterval(_(this,un)),I(this,un,void 0))},Ai=function(){const t=_(this,Te).getQueryCache().build(_(this,Te),this.options);if(t===_(this,K))return;const n=_(this,K);I(this,K,t),I(this,ur,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},zd=function(t){me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(_(this,xe))}),_(this,Te).getQueryCache().notify({query:_(this,K),type:"observerResultsUpdated"})})},Od);function sh(e,t){return De(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $a(e,t){return sh(e,t)||e.state.data!==void 0&&os(e,t,t.refetchOnMount)}function os(e,t,n){if(De(t.enabled,e)!==!1&&wt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ss(e,t)}return!1}function Fa(e,t,n,r){return(e!==t||De(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ss(e,n)}function ss(e,t){return De(t.enabled,e)!==!1&&e.isStaleByTime(wt(t.staleTime,e))}function ih(e,t){return!Ar(e.getCurrentResult(),t)}var ah=(Id=class extends fn{constructor(n,r){super();M(this,pt);M(this,Nt);M(this,Dt);M(this,Pe);M(this,ft);I(this,Nt,n),this.setOptions(r),this.bindMethods(),V(this,pt,Ao).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,Nt).defaultMutationOptions(n),Ar(this.options,r)||_(this,Nt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,Pe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Gt(r.mutationKey)!==Gt(this.options.mutationKey)?this.reset():((o=_(this,Pe))==null?void 0:o.state.status)==="pending"&&_(this,Pe).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=_(this,Pe))==null||n.removeObserver(this)}onMutationUpdate(n){V(this,pt,Ao).call(this),V(this,pt,Ri).call(this,n)}getCurrentResult(){return _(this,Dt)}reset(){var n;(n=_(this,Pe))==null||n.removeObserver(this),I(this,Pe,void 0),V(this,pt,Ao).call(this),V(this,pt,Ri).call(this)}mutate(n,r){var o;return I(this,ft,r),(o=_(this,Pe))==null||o.removeObserver(this),I(this,Pe,_(this,Nt).getMutationCache().build(_(this,Nt),this.options)),_(this,Pe).addObserver(this),_(this,Pe).execute(n)}},Nt=new WeakMap,Dt=new WeakMap,Pe=new WeakMap,ft=new WeakMap,pt=new WeakSet,Ao=function(){var r;const n=((r=_(this,Pe))==null?void 0:r.state)??Na();I(this,Dt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ri=function(n){me.batch(()=>{var r,o,s,i,a,l,u,f;if(_(this,ft)&&this.hasListeners()){const h=_(this,Dt).variables,m=_(this,Dt).context;(n==null?void 0:n.type)==="success"?((o=(r=_(this,ft)).onSuccess)==null||o.call(r,n.data,h,m),(i=(s=_(this,ft)).onSettled)==null||i.call(s,n.data,null,h,m)):(n==null?void 0:n.type)==="error"&&((l=(a=_(this,ft)).onError)==null||l.call(a,n.error,h,m),(f=(u=_(this,ft)).onSettled)==null||f.call(u,void 0,n.error,h,m))}this.listeners.forEach(h=>{h(_(this,Dt))})})},Id),Ba=d.createContext(void 0),is=e=>{const t=d.useContext(Ba);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},lh=({client:e,children:t})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(Ba.Provider,{value:e,children:t})),Ua=d.createContext(!1),ch=()=>d.useContext(Ua);Ua.Provider;function uh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var dh=d.createContext(uh()),fh=()=>d.useContext(dh),ph=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},hh=e=>{d.useEffect(()=>{e.clearReset()},[e])},mh=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ra(n,[e.error,r])),gh=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},vh=(e,t)=>e.isLoading&&e.isFetching&&!t,yh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Wa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function bh(e,t,n){var h,m,g,x,p;if(typeof e!="object"||Array.isArray(e))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=ch(),o=fh(),s=is(),i=s.defaultQueryOptions(e);(m=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,i),i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`),i._optimisticResults=r?"isRestoring":"optimistic",gh(i),ph(i,o),hh(o);const a=!s.getQueryCache().get(i.queryHash),[l]=d.useState(()=>new t(s,i)),u=l.getOptimisticResult(i),f=!r&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(v=>{const y=f?l.subscribe(me.batchCalls(v)):we;return l.updateResult(),y},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d.useEffect(()=>{l.setOptions(i)},[i,l]),yh(i,u))throw Wa(i,l,o);if(mh({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((x=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||x.call(g,i,u),i.experimental_prefetchInRender&&!zt&&vh(u,r)){const v=a?Wa(i,l,o):(p=s.getQueryCache().get(i.queryHash))==null?void 0:p.promise;v==null||v.catch(we).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function Ha(e,t){return bh(e,oh)}function jr(e,t){const n=is(),[r]=d.useState(()=>new ah(n,e));d.useEffect(()=>{r.setOptions(e)},[r,e]);const o=d.useSyncExternalStore(d.useCallback(i=>r.subscribe(me.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=d.useCallback((i,a)=>{r.mutate(i,a).catch(we)},[r]);if(o.error&&Ra(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const kr={STALE_TIME:1e3*60*5,GC_TIME:1e3*60*10,RETRY_COUNT:1,RETRY_DELAY:1e3},Va={refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:kr.STALE_TIME,gcTime:kr.GC_TIME,retry:kr.RETRY_COUNT,retryDelay:kr.RETRY_DELAY,enable:!0},Lr=e=>e instanceof Error?e.message:String(e),za=(e,t,n)=>{const r=is(),{notify:o}=Qo(),{createFn:s,readFn:i,readByIdFn:a,updateFn:l,deleteFn:u,partialUpdateFn:f}=n,h=()=>{r.invalidateQueries({queryKey:[e]})},m=(E,P,A,R)=>o(R!=null&&R.overrideSuccessMessage?R==null?void 0:R.overrideSuccessMessage(E,P):A,"success"),g=(E,P,A,R)=>o(R!=null&&R.overrideErrorMessage?R==null?void 0:R.overrideErrorMessage(E,P):A,"error");return{useCreate:E=>jr({mutationFn:P=>s(P),onSuccess:P=>{h(),m(t,P,`${t} created successfully`,E)},onError:P=>{g(t,P,`Error creating ${t}: ${Lr(P)}`,E)}}),useReadQuery:E=>Ha({queryKey:[e],queryFn:i,...Va,...E}),useReadByIdQuery:(E,P)=>Ha({queryKey:[e,E],queryFn:()=>a(E),...Va,enabled:!!E,...P}),useUpdate:E=>jr({mutationFn:({id:P,data:A})=>l(P,A),onSuccess:P=>{h(),m(t,P,`${t} updated successfully`,E)},onError:P=>{g(t,P,`Error updating ${t}: ${Lr(P)}`,E)}}),usePartialUpdate:E=>f&&jr({mutationFn:({id:P,data:A})=>f(P,A),onSuccess:P=>{h(),m(t,P,`${t} updated successfully`,E)},onError:P=>{g(t,P,`Error updating ${t}: ${Lr(P)}`,E)}}),useDelete:E=>jr({mutationFn:P=>u(P),onSuccess:()=>{h(),m(t,null,`${t} deleted successfully`,E)},onError:P=>{g(t,P,`Error deleting ${t}: ${Lr(P)}`,E)}}),invalidateQueries:h}},wh=(e,t)=>za(e,t,{createFn:n=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(r=>r.json()),deleteFn:n=>fetch(`${e}/${n}`,{method:"DELETE"}).then(r=>{if(!r.ok)throw new Error(`Error deleting: ${r.status}`)}),readByIdFn:n=>fetch(`${e}/${n}`).then(r=>r.json()),readFn:()=>fetch(e).then(n=>n.json()),updateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json()),partialUpdateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json())}),_h={SINGLE_TENANT:"single-tenant"},xh={COOKIE:"cookie"},as="tenant",Ga="tenant",qa="tenant",Ch=_h.SINGLE_TENANT,Sh=xh.COOKIE,Eh={mode:Ch,clientSideMode:Sh,tenantIDPProvisioningStrategy:"none"};class Th{setTenant(t,n){const r=new URL(window.location.href);r.searchParams.set(Ga,t.name),window.location.href=r.toString()}getCurrentTenantName(){const t=new URL(window.location.href);return new URLSearchParams(t.search).get(Ga)}}class Ph{setTenant(t,n){sessionStorage.setItem(qa,t.name),window.location.reload()}getCurrentTenantName(){return sessionStorage.getItem(qa)}}/*! js-cookie v3.0.5 | MIT */function Nr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Ah={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ls(e,t){function n(o,s,i){if(!(typeof document>"u")){i=Nr({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in i)i[l]&&(a+="; "+l,i[l]!==!0&&(a+="="+i[l].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var l=s[a].split("="),u=l.slice(1).join("=");try{var f=decodeURIComponent(l[0]);if(i[f]=e.read(u,f),o===f)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",Nr({},s,{expires:-1}))},withAttributes:function(o){return ls(this.converter,Nr({},this.attributes,o))},withConverter:function(o){return ls(Nr({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var cs=ls(Ah,{path:"/"});class Rh{setTenant(t,n){t?cs.set(as,t.name):cs.remove(as),window.location.reload()}getCurrentTenantName(){return cs.get(as)}}class Oh{extractSubdomain(t){if(t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t))return"";const n=t.split(".");if(n.length<2||n.length===2||n[0]==="www"&&n.length===3)return"";const o=(n[0]==="www"?n.slice(1):n).slice(0,-2);return o.length>0?o.join("."):""}getBaseDomain(t){const n=t.split(".");return t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t)||n.length<=2?t:n.slice(-2).join(".")}setTenant(t,n){var u;const r=(u=n.urlPatterns)==null?void 0:u.find(f=>f.patternType==="subdomain"&&f.tenantId===t.id&&f.isActive);if(!r)throw new Error(`No active subdomain pattern found for tenant '${t.name}'`);const o=new URL(window.location.href),s=r.patternValue,i=o.hostname,a=this.getBaseDomain(i),l=s?`${s}.${a}`:a;o.hostname=l,window.location.href=o.toString()}getCurrentTenantName(){const t=window.location.hostname;return this.extractSubdomain(t)||null}}const Ka={queryParams:new Th,sessionStorage:new Ph,cookie:new Rh,subdomain:new Oh},Ih=e=>{const t=Ka[e.clientSideMode];if(!t)throw new Error(`Client side tenant mode '${e.clientSideMode}' is not supported ${JSON.stringify({strategies:Ka},null,2)}`);return t},jh=(e,t,n)=>{const r=t.find(s=>s.name===n);if(!r)throw Error("No tenant permission");return Ih(e).setTenant(r,e),r},kh=()=>{const[e,t]=Wn(),{tenants:n=[],currentTenant:r,tenantConfig:o=Eh}=e,s=S.useCallback(i=>{const a=jh(o,n,i);t({...e,currentTenant:a})},[o,e]);return{tenants:n,currentTenant:r,tenantConfig:o,selectTenant:s}};function Lh(e){if(!e.ok)throw console.error(e),new Error(e.statusText)}async function Dr(e,t,n,r){const o=await e(`/user-states/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,r);return Lh(o),o}class Mr{static async get(t,n,r){const s=await Dr(t,n,r,{method:"GET",headers:{"Content-Type":"application/json"}});return s.status===204?null:await s.json()}static async create(t,n,r,o){const s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await Dr(t,n,r,s)).json()}static async update(t,n,r,o){const s={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await Dr(t,n,r,s)).json()}static async delete(t,n,r){return await Dr(t,n,r,{method:"DELETE",headers:{"Content-Type":"application/json"}}),null}}const Nh=e=>{const t=$o("@bluealba/pae-nestjs-gateway-service"),n=Zi();if(!n)throw new Error("You must call the useUserState hook within a PAE application.");const[r,o]=S.useState(null),[s,i]=S.useState(!1),[a,l]=S.useState(!1),[u,f]=S.useState(null),h=(w,C)=>S.useCallback(async({newValue:E,shouldThrowError:P}={})=>{try{l(!0),f(null);const A=await w(t,n,e,E);return o(A),A?A.value:null}catch(A){if(f(A==null?void 0:A.message),console.error(`Failed to ${C} ${e}:`,A),P)throw A;return null}finally{l(!1)}},[t,n,e]),m=h(Mr.get,"fetch"),g=h(Mr.create,"create"),x=h(Mr.update,"update"),p=h(Mr.delete,"delete"),v=S.useCallback(async()=>{try{await m()}finally{i(!0)}},[m]);S.useEffect(()=>{v()},[v]);const y=S.useCallback(async(w,C=!1)=>r==null?await g({newValue:w,shouldThrowError:C}):await x({newValue:w,shouldThrowError:C}),[r,g,x]);return{value:r?r.value:null,hasFetched:s,loading:a,error:u,setValue:y,createValue:g,updateValue:x,deleteValue:p}},Qa="__PAE_EXTENSION_POINT_REACT_CONTENT_EMPTY__",Dh=({module:e,point:t,children:n})=>(ta(e,t,n??Qa),null),Ya=({name:e,children:t,...n})=>{const r=ea(e);if(r===Qa)return null;if(!r)return c.jsx(c.Fragment,{children:t??null});if(Mh(r)){const o=r;return c.jsx(o,{...n})}else return r},Mh=e=>typeof e=="function",$h=(e,t)=>{const n=r=>(t=t||e.displayName||e.name||"?",c.jsx(Ya,{name:t,...r,children:c.jsx(e,{...r})}));return n.displayName=`extensionPoint(${t})`,n},Za="single-spa:app-change";function Fh(){const[e,t]=S.useState(Xa());return S.useEffect(()=>{const n=()=>{t(Xa())};return window.addEventListener(Za,n),()=>{window.removeEventListener(Za,n)}},[]),e}function Xa(){return he.getAppNames().reduce((t,n)=>(he.getAppStatus(n)?t[n]=he.getAppStatus(n):t[n]="NOT_LOADED",t),{})}function Bh(e){const n=Fh()[e]??"LOAD_ERROR";return{statusName:n,isLoading:n==="LOADING_SOURCE_CODE"||n==="BOOTSTRAPPING"||n==="MOUNTING",isMounted:n==="MOUNTED",isBroken:n==="SKIP_BECAUSE_BROKEN"||n==="LOAD_ERROR"}}const Ja=({appName:e})=>c.jsx("div",{children:c.jsxs("p",{children:["Loading ",e,"..."]})});Ja.displayName="BaseLoading";const el=({appName:e})=>c.jsxs("div",{children:[c.jsx("p",{children:"Something went wrong..."}),c.jsxs("p",{children:["Failed to load ",e]})]});el.displayName="BaseError";const Uh={display:"flex",flexDirection:"column",flex:1},tl=S.forwardRef((e,t)=>c.jsx("div",{ref:t,style:Uh,...e}));tl.displayName="BaseContainer";const Wh="pae-app:",nl=S.forwardRef(({appName:e,LoadingComponent:t=Ja,ErrorComponent:n=el,ContainerComponent:r=tl,...o},s)=>{const i=Bh(e);return c.jsxs(r,{ref:s,...o,id:`${Wh}${e}`,children:[i.isLoading&&c.jsx(t,{appName:e}),i.isBroken&&c.jsx(n,{appName:e})]})});nl.displayName="ModulePlaceHolder";const us=({operations:e,children:t,forbiddenContent:n})=>{var o;const{hasAccess:r}=Gn();if(!r(...e)){if(!n)return null;if(typeof n=="function")if((o=n==null?void 0:n.prototype)!=null&&o.isReactComponent){const s=n;return c.jsx(s,{operations:e})}else return n({operations:e});return S.isValidElement(n)?n:null}return t};us.displayName="Authorized";const Hh=({eventName:e,listener:t})=>(na(e,t),null),Vh=()=>c.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:c.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",d:"M8.737 8.737a21.49 21.49 0 0 1 3.308-2.724m0 0c3.063-2.026 5.99-2.641 7.331-1.3 1.827 1.828.026 6.591-4.023 10.64-4.049 4.049-8.812 5.85-10.64 4.023-1.33-1.33-.736-4.218 1.249-7.253m6.083-6.11c-3.063-2.026-5.99-2.641-7.331-1.3-1.827 1.828-.026 6.591 4.023 10.64m3.308-9.34a21.497 21.497 0 0 1 3.308 2.724m2.775 3.386c1.985 3.035 2.579 5.923 1.248 7.253-1.336 1.337-4.245.732-7.295-1.275M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})}),rl=({applicationName:e})=>{const t=Ki(e);if(t)if(typeof t=="function"){const n=t;return c.jsx(n,{})}else return t;return c.jsx(Vh,{})};rl.displayName="ApplicationIcon";const ol=()=>c.jsx("svg",{width:"28",height:"28",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M15.9998 29.3337C8.63584 29.3337 2.6665 23.3643 2.6665 16.0003C2.6665 8.63633 8.63584 2.66699 15.9998 2.66699C23.3638 2.66699 29.3332 8.63633 29.3332 16.0003C29.3332 23.3643 23.3638 29.3337 15.9998 29.3337ZM15.9998 26.667C18.8288 26.667 21.5419 25.5432 23.5423 23.5428C25.5427 21.5424 26.6665 18.8293 26.6665 16.0003C26.6665 13.1713 25.5427 10.4582 23.5423 8.45785C21.5419 6.45747 18.8288 5.33366 15.9998 5.33366C13.1709 5.33366 10.4578 6.45747 8.45736 8.45785C6.45698 10.4582 5.33317 13.1713 5.33317 16.0003C5.33317 18.8293 6.45698 21.5424 8.45736 23.5428C10.4578 25.5432 13.1709 26.667 15.9998 26.667ZM9.33317 20.427C12.2066 20.2205 14.9088 18.9833 16.9425 16.943C18.9828 14.9092 20.2201 12.2071 20.4265 9.33366C21.4117 9.99003 22.2389 10.8569 22.8486 11.8716C23.4582 12.8864 23.835 14.0239 23.9519 15.2019C24.0687 16.3799 23.9226 17.5692 23.5242 18.684C23.1257 19.7987 22.4849 20.8112 21.6478 21.6483C20.8107 22.4853 19.7982 23.1262 18.6835 23.5247C17.5687 23.9231 16.3795 24.0692 15.2014 23.9523C14.0234 23.8355 12.8859 23.4587 11.8712 22.8491C10.8564 22.2394 9.98954 21.4122 9.33317 20.427Z",fill:"currentColor"})});ol.displayName="DarkModeIcon";const sl=()=>c.jsx("svg",{width:"28",height:"28",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:"matrix(-1,1.2246467991473532e-16,-1.2246467991473532e-16,-1,0,0)",children:c.jsx("path",{d:"M15.9998 29.3337C8.63584 29.3337 2.6665 23.3643 2.6665 16.0003C2.6665 8.63633 8.63584 2.66699 15.9998 2.66699C23.3638 2.66699 29.3332 8.63633 29.3332 16.0003C29.3332 23.3643 23.3638 29.3337 15.9998 29.3337ZM15.9998 26.667C18.8288 26.667 21.5419 25.5432 23.5423 23.5428C25.5427 21.5424 26.6665 18.8293 26.6665 16.0003C26.6665 13.1713 25.5427 10.4582 23.5423 8.45785C21.5419 6.45747 18.8288 5.33366 15.9998 5.33366C13.1709 5.33366 10.4578 6.45747 8.45736 8.45785C6.45698 10.4582 5.33317 13.1713 5.33317 16.0003C5.33317 18.8293 6.45698 21.5424 8.45736 23.5428C10.4578 25.5432 13.1709 26.667 15.9998 26.667ZM9.33317 20.427C12.2066 20.2205 14.9088 18.9833 16.9425 16.943C18.9828 14.9092 20.2201 12.2071 20.4265 9.33366C21.4117 9.99003 22.2389 10.8569 22.8486 11.8716C23.4582 12.8864 23.835 14.0239 23.9519 15.2019C24.0687 16.3799 23.9226 17.5692 23.5242 18.684C23.1257 19.7987 22.4849 20.8112 21.6478 21.6483C20.8107 22.4853 19.7982 23.1262 18.6835 23.5247C17.5687 23.9231 16.3795 24.0692 15.2014 23.9523C14.0234 23.8355 12.8859 23.4587 11.8712 22.8491C10.8564 22.2394 9.98954 21.4122 9.33317 20.427Z",fill:"currentColor"})});sl.displayName="LightModeIcon";const ds={container:"container__zBqbk",expanded:"expanded__EbsIr",label:"label__cdMnm"};function il(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=il(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function L(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=il(e))&&(r&&(r+=" "),r+=t);return r}const zh=e=>e.toLowerCase().trim().split(" ").join("-"),Gh=e=>`${zh(e)}-theme`,al=()=>{const{platformName:e="Platform"}=ko(),t=Gh(e),[n,r]=S.useState(()=>{const s=localStorage.getItem(t);return s==="light"||s==="dark"?s:"light"}),o=s=>{localStorage.setItem(t,s),r(s)};return S.useEffect(()=>{document.documentElement.setAttribute("data-theme",n)},[n]),{theme:n,setTheme:o}},$r={spinner:"spinner__fakUN","spinner-rotation":"spinner-rotation__wUmPV",spinnerRotation:"spinner-rotation__wUmPV",button:"button__8FA9H","button--contained-primary":"button--contained-primary__stkTx",buttonContainedPrimary:"button--contained-primary__stkTx","button--outlined-primary":"button--outlined-primary__KZ1ww",buttonOutlinedPrimary:"button--outlined-primary__KZ1ww","button--text-primary":"button--text-primary__GLTfm",buttonTextPrimary:"button--text-primary__GLTfm","button--contained-danger":"button--contained-danger__L9ehT",buttonContainedDanger:"button--contained-danger__L9ehT","button--outlined-danger":"button--outlined-danger__eoYLd",buttonOutlinedDanger:"button--outlined-danger__eoYLd","button--text-danger":"button--text-danger__Sw-ha",buttonTextDanger:"button--text-danger__Sw-ha",icon:"icon__--umH"},Fr=S.forwardRef(({variant:e="contained",colorScheme:t="primary",loading:n=!1,IconComponent:r,className:o,children:s,...i},a)=>{const l=L($r.button,$r[`button--${e}-${t}`],o);return c.jsxs("button",{ref:a,className:l,...i,children:[n?c.jsx("div",{className:$r.spinner}):r&&c.jsx(r,{className:$r.icon}),s]})});Fr.displayName="Button";const Br={Badges:"Badges__5jpum",badges:"Badges__5jpum",Badge:"Badge__95MWM",badge:"Badge__95MWM","Badge--primary":"Badge--primary__Rx-bS",badgePrimary:"Badge--primary__Rx-bS","Badge--secondary":"Badge--secondary__d92bT",badgeSecondary:"Badge--secondary__d92bT","Badge--success":"Badge--success__Kdo98",badgeSuccess:"Badge--success__Kdo98","Badge--warning":"Badge--warning__bf-Nn",badgeWarning:"Badge--warning__bf-Nn","Badge--danger":"Badge--danger__HTj39",badgeDanger:"Badge--danger__HTj39","Badge--small":"Badge--small__y93Pj",badgeSmall:"Badge--small__y93Pj","Badge--regular":"Badge--regular__aT5AL",badgeRegular:"Badge--regular__aT5AL","Badge--large":"Badge--large__wORCH",badgeLarge:"Badge--large__wORCH"},fs={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const e in fs)Object.freeze(fs[e]);const ll=Object.freeze(fs);var cl={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function qh(e){var f,h;var t,n=[],r=1,o;if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),ll[e])n=ll[e].slice(),o="rgb";else if(e==="transparent")r=0,o="rgb",n=[0,0,0];else if(e[0]==="#"){var s=e.slice(1),i=s.length,a=i<=4;r=1,a?(n=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],i===4&&(r=parseInt(s[3]+s[3],16)/255)):(n=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],i===8&&(r=parseInt(s[6]+s[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),o="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var l=t[1];o=l.replace(/a$/,"");var u=o==="cmyk"?4:o==="gray"?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/),o==="color"&&(o=n.shift()),n=n.map(function(m,g){if(m[m.length-1]==="%")return m=parseFloat(m)/100,g===3?m:o==="rgb"?m*255:o[0]==="h"||o[0]==="l"&&!g?m*100:o==="lab"?m*125:o==="lch"?g<2?m*150:m*360:o[0]==="o"&&!g?m:o==="oklab"?m*.4:o==="oklch"?g<2?m*.4:m*360:m;if(o[g]==="h"||g===2&&o[o.length-1]==="h"){if(cl[m]!==void 0)return cl[m];if(m.endsWith("deg"))return parseFloat(m);if(m.endsWith("turn"))return parseFloat(m)*360;if(m.endsWith("grad"))return parseFloat(m)*360/400;if(m.endsWith("rad"))return parseFloat(m)*180/Math.PI}return m==="none"?0:parseFloat(m)}),r=n.length>u?n.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(n=e.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),o=((h=(f=e.match(/([a-z])/ig))==null?void 0:f.join(""))==null?void 0:h.toLowerCase())||"rgb");return{space:o,values:n,alpha:r}}const Kh=(e,t)=>{const{space:n,values:r}=qh(e);return n[0]==="h"?`${n}a(${r[0]}, ${r[1]}%, ${r[2]}%, ${t})`:`${n}a(${r}, ${t})`},ps=S.forwardRef(({children:e,color:t,className:n,customColor:r,size:o="small",style:s,...i},a)=>{const l=r?{color:r,background:Kh(r,.1)}:{},u=L(Br.Badge,Br[`Badge--${o}`],{[Br[`Badge--${t}`]]:!!t},n);return c.jsx("span",{ref:a,className:u,style:{...s,...l},...i,children:e})});ps.displayName="Badge";const hs=S.forwardRef(({children:e,className:t,...n},r)=>{const o=L(Br.Badges,t);return c.jsx("div",{ref:r,className:o,...n,children:e})});hs.displayName="Badges";const ul=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>c.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[c.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),c.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"})]}),dl=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>c.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[c.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),c.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),c.jsx("path",{d:"m9 12 2 2 4-4"})]}),Qh={CopyToClipboardButton:"CopyToClipboardButton__2Nd2m"},Yh=({content:e})=>{const[t,n]=Zh(),{notify:r}=Qo(),o=t?dl:ul,s=S.useCallback(async()=>{await n(e)&&r("Copied to the Clipboard !","success")},[e,r]);return c.jsx(o,{className:Qh.CopyToClipboardButton,size:18,onClick:s})},Zh=()=>{const[e,t]=S.useState(!1);return[e,async r=>{try{return await navigator.clipboard.writeText(r),t(!0),setTimeout(()=>t(!1),2e3),!0}catch(o){return console.error("Failed to copy text: ",o),!1}}]},fl={FieldGroup:"FieldGroup__Q2JCV",fieldGroup:"FieldGroup__Q2JCV","FieldGroup--horizontal":"FieldGroup--horizontal__kpfL1",fieldGroupHorizontal:"FieldGroup--horizontal__kpfL1","FieldGroup--vertical":"FieldGroup--vertical__FLo-Q",fieldGroupVertical:"FieldGroup--vertical__FLo-Q"},pl=S.forwardRef(({children:e,className:t,orientation:n="vertical",...r},o)=>{const s=L(fl.FieldGroup,fl[`FieldGroup--${n}`],t);return c.jsx("div",{ref:o,className:s,...r,children:e})});pl.displayName="FieldGroup";const hl={Input:"Input__uS0sb",Error:"Error__-DQpw"},Ur=S.forwardRef(({className:e,error:t,...n},r)=>{const o=L(hl.Input,t&&hl.Error,e);return c.jsx("input",{ref:r,className:o,...n})});Ur.displayName="Input";const Xh={Error:"Error__N4OP5"},ml=S.forwardRef(({children:e,className:t,...n},r)=>{const o=L(Xh.Error,t);return c.jsx("span",{ref:r,className:o,...n,children:e})});ml.displayName="InputError";const gl={Label:"Label__VYUvW",Error:"Error__Eu6DI"},vl=S.forwardRef(({children:e,className:t,error:n,...r},o)=>{const s=L(gl.Label,n&&gl.Error,t);return c.jsx("label",{ref:o,className:s,...r,children:e})});vl.displayName="Label";const ms={Select:"Select__giqpe",Chevron:"Chevron__YvhBd"},yl=S.forwardRef(({children:e,className:t,...n},r)=>{const o=L(ms.Option,t);return c.jsx("option",{ref:r,className:o,...n,children:e})});yl.displayName="Option";const gs=S.forwardRef(({children:e,className:t,...n},r)=>{const o=L(ms.Select,t);return c.jsxs("div",{className:o,children:[c.jsx("select",{ref:r,...n,children:e}),c.jsx("div",{className:ms.Chevron,children:c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M4 6L8 10L12 6",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});gs.displayName="Select",gs.Option=yl;function bl(e,[t,n]){return Math.min(n,Math.max(t,e))}function Z(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 Jh(e,t){const n=d.createContext(t),r=s=>{const{children:i,...a}=s,l=d.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Yn(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i),l=n.length;n=[...n,i];const u=h=>{var y;const{scope:m,children:g,...x}=h,p=((y=m==null?void 0:m[e])==null?void 0:y[l])||a,v=d.useMemo(()=>x,Object.values(x));return c.jsx(p.Provider,{value:v,children:g})};u.displayName=s+"Provider";function f(h,m){var p;const g=((p=m==null?void 0:m[e])==null?void 0:p[l])||a,x=d.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,em(o,...t)]}function em(...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(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const h=l(s)[`__scope${u}`];return{...a,...h}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function wl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=wl(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():wl(e[o],null)}}}}function ce(...e){return d.useCallback(pn(...e),e)}function _l(e){const t=tm(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(rm);if(l){const u=l.props.children,f=a.map(h=>h===l?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:h);return c.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function tm(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=sm(o),a=om(s,o.props);return o.type!==d.Fragment&&(a.ref=r?pn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nm=Symbol("radix.slottable");function rm(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nm}function om(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function sm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function im(e){const t=e+"CollectionProvider",[n,r]=Yn(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:v,children:y}=p,w=S.useRef(null),C=S.useRef(new Map).current;return c.jsx(o,{scope:v,itemMap:C,collectionRef:w,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=_l(a),u=S.forwardRef((p,v)=>{const{scope:y,children:w}=p,C=s(a,y),E=ce(v,C.collectionRef);return c.jsx(l,{ref:E,children:w})});u.displayName=a;const f=e+"CollectionItemSlot",h="data-radix-collection-item",m=_l(f),g=S.forwardRef((p,v)=>{const{scope:y,children:w,...C}=p,E=S.useRef(null),P=ce(v,E),A=s(f,y);return S.useEffect(()=>(A.itemMap.set(E,{ref:E,...C}),()=>void A.itemMap.delete(E))),c.jsx(m,{[h]:"",ref:P,children:w})});g.displayName=f;function x(p){const v=s(e+"CollectionConsumer",p);return S.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((A,R)=>C.indexOf(A.ref.current)-C.indexOf(R.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:g},x,r]}var am=d.createContext(void 0);function lm(e){const t=d.useContext(am);return e||t||"ltr"}function cm(e){const t=um(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(fm);if(l){const u=l.props.children,f=a.map(h=>h===l?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:h);return c.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function um(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=hm(o),a=pm(s,o.props);return o.type!==d.Fragment&&(a.ref=r?pn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dm=Symbol("radix.slottable");function fm(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dm}function pm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function hm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=mm.reduce((e,t)=>{const n=cm(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gm(e,t){e&&hr.flushSync(()=>e.dispatchEvent(t))}function qt(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function vm(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ym="DismissableLayer",vs="dismissableLayer.update",bm="dismissableLayer.pointerDownOutside",wm="dismissableLayer.focusOutside",xl,Cl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=d.useContext(Cl),[f,h]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),x=ce(t,R=>h(R)),p=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(v),w=f?p.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,P=Cm(R=>{const N=R.target,k=[...u.branches].some(D=>D.contains(N));!E||k||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},m),A=Sm(R=>{const N=R.target;[...u.branches].some(D=>D.contains(N))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},m);return vm(R=>{w===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xl=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Sl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xl)}},[f,m,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Sl())},[f,u]),d.useEffect(()=>{const R=()=>g({});return document.addEventListener(vs,R),()=>document.removeEventListener(vs,R)},[]),c.jsx(ie.div,{...l,ref:x,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,P.onPointerDownCapture)})});Wr.displayName=ym;var _m="DismissableLayerBranch",xm=d.forwardRef((e,t)=>{const n=d.useContext(Cl),r=d.useRef(null),o=ce(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(ie.div,{...e,ref:o})});xm.displayName=_m;function Cm(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){El(bm,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Sm(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e),r=d.useRef(!1);return d.useEffect(()=>{const o=s=>{s.target&&!r.current&&El(wm,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Sl(){const e=new CustomEvent(vs);document.dispatchEvent(e)}function El(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gm(o,s):o.dispatchEvent(s)}var ys=0;function Tl(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Pl()),document.body.insertAdjacentElement("beforeend",e[1]??Pl()),ys++,()=>{ys===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ys--}},[])}function Pl(){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 bs="focusScope.autoFocusOnMount",ws="focusScope.autoFocusOnUnmount",Al={bubbles:!1,cancelable:!0},Em="FocusScope",_s=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=d.useState(null),u=qt(o),f=qt(s),h=d.useRef(null),m=ce(t,p=>l(p)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let p=function(C){if(g.paused||!a)return;const E=C.target;a.contains(E)?h.current=E:_t(h.current,{select:!0})},v=function(C){if(g.paused||!a)return;const E=C.relatedTarget;E!==null&&(a.contains(E)||_t(h.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const P of C)P.removedNodes.length>0&&_t(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,g.paused]),d.useEffect(()=>{if(a){Il.add(g);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent(bs,Al);a.addEventListener(bs,u),a.dispatchEvent(y),y.defaultPrevented||(Tm(Im(Rl(a)),{select:!0}),document.activeElement===p&&_t(a))}return()=>{a.removeEventListener(bs,u),setTimeout(()=>{const y=new CustomEvent(ws,Al);a.addEventListener(ws,f),a.dispatchEvent(y),y.defaultPrevented||_t(p??document.body,{select:!0}),a.removeEventListener(ws,f),Il.remove(g)},0)}}},[a,u,f,g]);const x=d.useCallback(p=>{if(!n&&!r||g.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(v&&y){const w=p.currentTarget,[C,E]=Pm(w);C&&E?!p.shiftKey&&y===E?(p.preventDefault(),n&&_t(C,{select:!0})):p.shiftKey&&y===C&&(p.preventDefault(),n&&_t(E,{select:!0})):y===w&&p.preventDefault()}},[n,r,g.paused]);return c.jsx(ie.div,{tabIndex:-1,...i,ref:m,onKeyDown:x})});_s.displayName=Em;function Tm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_t(r,{select:t}),document.activeElement!==n)return}function Pm(e){const t=Rl(e),n=Ol(t,e),r=Ol(t.reverse(),e);return[n,r]}function Rl(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 Ol(e,t){for(const n of e)if(!Am(n,{upTo:t}))return n}function Am(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 Rm(e){return e instanceof HTMLInputElement&&"select"in e}function _t(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Rm(e)&&t&&e.select()}}var Il=Om();function Om(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jl(e,t),e.unshift(t)},remove(t){var n;e=jl(e,t),(n=e[0])==null||n.resume()}}}function jl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Im(e){return e.filter(t=>t.tagName!=="A")}var ve=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},jm=d[" useId ".trim().toString()]||(()=>{}),km=0;function Kt(e){const[t,n]=d.useState(jm());return ve(()=>{n(r=>r??String(km++))},[e]),e||(t?`radix-${t}`:"")}const Lm=["top","right","bottom","left"],xt=Math.min,Oe=Math.max,Hr=Math.round,Vr=Math.floor,qe=e=>({x:e,y:e}),Nm={left:"right",right:"left",bottom:"top",top:"bottom"},Dm={start:"end",end:"start"};function xs(e,t,n){return Oe(e,xt(t,n))}function lt(e,t){return typeof e=="function"?e(t):e}function ct(e){return e.split("-")[0]}function hn(e){return e.split("-")[1]}function Cs(e){return e==="x"?"y":"x"}function Ss(e){return e==="y"?"height":"width"}const Mm=new Set(["top","bottom"]);function Ke(e){return Mm.has(ct(e))?"y":"x"}function Es(e){return Cs(Ke(e))}function $m(e,t,n){n===void 0&&(n=!1);const r=hn(e),o=Es(e),s=Ss(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=zr(i)),[i,zr(i)]}function Fm(e){const t=zr(e);return[Ts(e),t,Ts(t)]}function Ts(e){return e.replace(/start|end/g,t=>Dm[t])}const kl=["left","right"],Ll=["right","left"],Bm=["top","bottom"],Um=["bottom","top"];function Wm(e,t,n){switch(e){case"top":case"bottom":return n?t?Ll:kl:t?kl:Ll;case"left":case"right":return t?Bm:Um;default:return[]}}function Hm(e,t,n,r){const o=hn(e);let s=Wm(ct(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ts)))),s}function zr(e){return e.replace(/left|right|bottom|top/g,t=>Nm[t])}function Vm(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nl(e){return typeof e!="number"?Vm(e):{top:e,right:e,bottom:e,left:e}}function Gr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Dl(e,t,n){let{reference:r,floating:o}=e;const s=Ke(t),i=Es(t),a=Ss(i),l=ct(t),u=s==="y",f=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let g;switch(l){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-o.width,y:h};break;default:g={x:r.x,y:r.y}}switch(hn(t)){case"start":g[i]-=m*(n&&u?-1:1);break;case"end":g[i]+=m*(n&&u?-1:1);break}return g}async function zm(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=lt(t,e),x=Nl(g),v=a[m?h==="floating"?"reference":"floating":h],y=Gr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=h==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},P=Gr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:C,strategy:l}):w);return{top:(y.top-P.top+x.top)/E.y,bottom:(P.bottom-y.bottom+x.bottom)/E.y,left:(y.left-P.left+x.left)/E.x,right:(P.right-y.right+x.right)/E.x}}const Gm=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=Dl(u,r,l),m=r,g={},x=0;for(let v=0;v<a.length;v++){var p;const{name:y,fn:w}=a[v],{x:C,y:E,data:P,reset:A}=await w({x:f,y:h,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:u,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:zm},elements:{reference:e,floating:t}});f=C??f,h=E??h,g={...g,[y]:{...g[y],...P}},A&&x<=50&&(x++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(u=A.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:f,y:h}=Dl(u,m,l)),v=-1)}return{x:f,y:h,placement:m,strategy:o,middlewareData:g}},qm=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=lt(e,t)||{};if(u==null)return{};const h=Nl(f),m={x:n,y:r},g=Es(o),x=Ss(g),p=await i.getDimensions(u),v=g==="y",y=v?"top":"left",w=v?"bottom":"right",C=v?"clientHeight":"clientWidth",E=s.reference[x]+s.reference[g]-m[g]-s.floating[x],P=m[g]-s.reference[g],A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let R=A?A[C]:0;(!R||!await(i.isElement==null?void 0:i.isElement(A)))&&(R=a.floating[C]||s.floating[x]);const N=E/2-P/2,k=R/2-p[x]/2-1,D=xt(h[y],k),U=xt(h[w],k),W=D,H=R-p[x]-U,z=R/2-p[x]/2+N,oe=xs(W,z,H),G=!l.arrow&&hn(o)!=null&&z!==oe&&s.reference[x]/2-(z<W?D:U)-p[x]/2<0,Y=G?z<W?z-W:z-H:0;return{[g]:m[g]+Y,data:{[g]:oe,centerOffset:z-oe-Y,...G&&{alignmentOffset:Y}},reset:G}}}),Km=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:p=!0,...v}=lt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=ct(o),w=Ke(a),C=ct(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=m||(C||!p?[zr(a)]:Fm(a)),A=x!=="none";!m&&A&&P.push(...Hm(a,p,x,E));const R=[a,...P],N=await l.detectOverflow(t,v),k=[];let D=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&k.push(N[y]),h){const z=$m(o,i,E);k.push(N[z[0]],N[z[1]])}if(D=[...D,{placement:o,overflows:k}],!k.every(z=>z<=0)){var U,W;const z=(((U=s.flip)==null?void 0:U.index)||0)+1,oe=R[z];if(oe&&(!(h==="alignment"?w!==Ke(oe):!1)||D.every(F=>Ke(F.placement)===w?F.overflows[0]>0:!0)))return{data:{index:z,overflows:D},reset:{placement:oe}};let G=(W=D.filter(Y=>Y.overflows[0]<=0).sort((Y,F)=>Y.overflows[1]-F.overflows[1])[0])==null?void 0:W.placement;if(!G)switch(g){case"bestFit":{var H;const Y=(H=D.filter(F=>{if(A){const se=Ke(F.placement);return se===w||se==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(se=>se>0).reduce((se,ge)=>se+ge,0)]).sort((F,se)=>F[1]-se[1])[0])==null?void 0:H[0];Y&&(G=Y);break}case"initialPlacement":G=a;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function Ml(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $l(e){return Lm.some(t=>e[t]>=0)}const Qm=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=lt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Ml(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:$l(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Ml(i,n.floating);return{data:{escapedOffsets:a,escaped:$l(a)}}}default:return{}}}}},Fl=new Set(["left","top"]);async function Ym(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ct(n),a=hn(n),l=Ke(n)==="y",u=Fl.has(i)?-1:1,f=s&&l?-1:1,h=lt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof x=="number"&&(g=a==="end"?x*-1:x),l?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const Zm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Ym(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Xm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:w,y:C}=y;return{x:w,y:C}}},...u}=lt(e,t),f={x:n,y:r},h=await s.detectOverflow(t,u),m=Ke(ct(o)),g=Cs(m);let x=f[g],p=f[m];if(i){const y=g==="y"?"top":"left",w=g==="y"?"bottom":"right",C=x+h[y],E=x-h[w];x=xs(C,x,E)}if(a){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",C=p+h[y],E=p-h[w];p=xs(C,p,E)}const v=l.fn({...t,[g]:x,[m]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[g]:i,[m]:a}}}}}},Jm=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=lt(e,t),f={x:n,y:r},h=Ke(o),m=Cs(h);let g=f[m],x=f[h];const p=lt(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const C=m==="y"?"height":"width",E=s.reference[m]-s.floating[C]+v.mainAxis,P=s.reference[m]+s.reference[C]-v.mainAxis;g<E?g=E:g>P&&(g=P)}if(u){var y,w;const C=m==="y"?"width":"height",E=Fl.has(ct(o)),P=s.reference[h]-s.floating[C]+(E&&((y=i.offset)==null?void 0:y[h])||0)+(E?0:v.crossAxis),A=s.reference[h]+s.reference[C]+(E?0:((w=i.offset)==null?void 0:w[h])||0)-(E?v.crossAxis:0);x<P?x=P:x>A&&(x=A)}return{[m]:g,[h]:x}}}},e1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=lt(e,t),f=await i.detectOverflow(t,u),h=ct(o),m=hn(o),g=Ke(o)==="y",{width:x,height:p}=s.floating;let v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");const w=p-f.top-f.bottom,C=x-f.left-f.right,E=xt(p-f[v],w),P=xt(x-f[y],C),A=!t.middlewareData.shift;let R=E,N=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=w),A&&!m){const D=Oe(f.left,0),U=Oe(f.right,0),W=Oe(f.top,0),H=Oe(f.bottom,0);g?N=x-2*(D!==0||U!==0?D+U:Oe(f.left,f.right)):R=p-2*(W!==0||H!==0?W+H:Oe(f.top,f.bottom))}await l({...t,availableWidth:N,availableHeight:R});const k=await i.getDimensions(a.floating);return x!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}};function qr(){return typeof window<"u"}function mn(e){return Bl(e)?(e.nodeName||"").toLowerCase():"#document"}function Ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qe(e){var t;return(t=(Bl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bl(e){return qr()?e instanceof Node||e instanceof Ie(e).Node:!1}function Me(e){return qr()?e instanceof Element||e instanceof Ie(e).Element:!1}function Ye(e){return qr()?e instanceof HTMLElement||e instanceof Ie(e).HTMLElement:!1}function Ul(e){return!qr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ie(e).ShadowRoot}const t1=new Set(["inline","contents"]);function Zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=$e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!t1.has(o)}const n1=new Set(["table","td","th"]);function r1(e){return n1.has(mn(e))}const o1=[":popover-open",":modal"];function Kr(e){return o1.some(t=>{try{return e.matches(t)}catch{return!1}})}const s1=["transform","translate","scale","rotate","perspective"],i1=["transform","translate","scale","rotate","perspective","filter"],a1=["paint","layout","strict","content"];function Ps(e){const t=As(),n=Me(e)?$e(e):e;return s1.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||i1.some(r=>(n.willChange||"").includes(r))||a1.some(r=>(n.contain||"").includes(r))}function l1(e){let t=Ct(e);for(;Ye(t)&&!gn(t);){if(Ps(t))return t;if(Kr(t))return null;t=Ct(t)}return null}function As(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const c1=new Set(["html","body","#document"]);function gn(e){return c1.has(mn(e))}function $e(e){return Ie(e).getComputedStyle(e)}function Qr(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ct(e){if(mn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ul(e)&&e.host||Qe(e);return Ul(t)?t.host:t}function Wl(e){const t=Ct(e);return gn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&Zn(t)?t:Wl(t)}function Xn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wl(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ie(o);if(s){const a=Rs(i);return t.concat(i,i.visualViewport||[],Zn(o)?o:[],a&&n?Xn(a):[])}return t.concat(o,Xn(o,[],n))}function Rs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Hl(e){const t=$e(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ye(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Hr(n)!==s||Hr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Os(e){return Me(e)?e:e.contextElement}function vn(e){const t=Os(e);if(!Ye(t))return qe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Hl(t);let i=(s?Hr(n.width):n.width)/r,a=(s?Hr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const u1=qe(0);function Vl(e){const t=Ie(e);return!As()||!t.visualViewport?u1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function d1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ie(e)?!1:t}function Qt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Os(e);let i=qe(1);t&&(r?Me(r)&&(i=vn(r)):i=vn(e));const a=d1(s,n,r)?Vl(s):qe(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,f=o.width/i.x,h=o.height/i.y;if(s){const m=Ie(s),g=r&&Me(r)?Ie(r):r;let x=m,p=Rs(x);for(;p&&r&&g!==x;){const v=vn(p),y=p.getBoundingClientRect(),w=$e(p),C=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*v.x,E=y.top+(p.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,h*=v.y,l+=C,u+=E,x=Ie(p),p=Rs(x)}}return Gr({width:f,height:h,x:l,y:u})}function Yr(e,t){const n=Qr(e).scrollLeft;return t?t.left+n:Qt(Qe(e)).left+n}function zl(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Yr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function f1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Qe(r),a=t?Kr(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=qe(1);const f=qe(0),h=Ye(r);if((h||!h&&!s)&&((mn(r)!=="body"||Zn(i))&&(l=Qr(r)),Ye(r))){const g=Qt(r);u=vn(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=i&&!h&&!s?zl(i,l):qe(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-l.scrollTop*u.y+f.y+m.y}}function p1(e){return Array.from(e.getClientRects())}function h1(e){const t=Qe(e),n=Qr(e),r=e.ownerDocument.body,o=Oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Yr(e);const a=-n.scrollTop;return $e(r).direction==="rtl"&&(i+=Oe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Gl=25;function m1(e,t){const n=Ie(e),r=Qe(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const f=As();(!f||f&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Yr(r);if(u<=0){const f=r.ownerDocument,h=f.body,m=getComputedStyle(h),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(r.clientWidth-h.clientWidth-g);x<=Gl&&(s-=x)}else u<=Gl&&(s+=u);return{width:s,height:i,x:a,y:l}}const g1=new Set(["absolute","fixed"]);function v1(e,t){const n=Qt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ye(e)?vn(e):qe(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function ql(e,t,n){let r;if(t==="viewport")r=m1(e,n);else if(t==="document")r=h1(Qe(e));else if(Me(t))r=v1(t,n);else{const o=Vl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gr(r)}function Kl(e,t){const n=Ct(e);return n===t||!Me(n)||gn(n)?!1:$e(n).position==="fixed"||Kl(n,t)}function y1(e,t){const n=t.get(e);if(n)return n;let r=Xn(e,[],!1).filter(a=>Me(a)&&mn(a)!=="body"),o=null;const s=$e(e).position==="fixed";let i=s?Ct(e):e;for(;Me(i)&&!gn(i);){const a=$e(i),l=Ps(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&g1.has(o.position)||Zn(i)&&!l&&Kl(e,i))?r=r.filter(f=>f!==i):o=a,i=Ct(i)}return t.set(e,r),r}function b1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Kr(t)?[]:y1(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,f)=>{const h=ql(t,f,o);return u.top=Oe(h.top,u.top),u.right=xt(h.right,u.right),u.bottom=xt(h.bottom,u.bottom),u.left=Oe(h.left,u.left),u},ql(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function w1(e){const{width:t,height:n}=Hl(e);return{width:t,height:n}}function _1(e,t,n){const r=Ye(t),o=Qe(t),s=n==="fixed",i=Qt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=qe(0);function u(){l.x=Yr(o)}if(r||!r&&!s)if((mn(t)!=="body"||Zn(o))&&(a=Qr(t)),r){const g=Qt(t,!0,s,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?zl(o,a):qe(0),h=i.left+a.scrollLeft-l.x-f.x,m=i.top+a.scrollTop-l.y-f.y;return{x:h,y:m,width:i.width,height:i.height}}function Is(e){return $e(e).position==="static"}function Ql(e,t){if(!Ye(e)||$e(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qe(e)===n&&(n=n.ownerDocument.body),n}function Yl(e,t){const n=Ie(e);if(Kr(e))return n;if(!Ye(e)){let o=Ct(e);for(;o&&!gn(o);){if(Me(o)&&!Is(o))return o;o=Ct(o)}return n}let r=Ql(e,t);for(;r&&r1(r)&&Is(r);)r=Ql(r,t);return r&&gn(r)&&Is(r)&&!Ps(r)?n:r||l1(e)||n}const x1=async function(e){const t=this.getOffsetParent||Yl,n=this.getDimensions,r=await n(e.floating);return{reference:_1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function C1(e){return $e(e).direction==="rtl"}const S1={convertOffsetParentRelativeRectToViewportRelativeRect:f1,getDocumentElement:Qe,getClippingRect:b1,getOffsetParent:Yl,getElementRects:x1,getClientRects:p1,getDimensions:w1,getScale:vn,isElement:Me,isRTL:C1};function Zl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function E1(e,t){let n=null,r;const o=Qe(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:f,top:h,width:m,height:g}=u;if(a||t(),!m||!g)return;const x=Vr(h),p=Vr(o.clientWidth-(f+m)),v=Vr(o.clientHeight-(h+g)),y=Vr(f),C={rootMargin:-x+"px "+-p+"px "+-v+"px "+-y+"px",threshold:Oe(0,xt(1,l))||1};let E=!0;function P(A){const R=A[0].intersectionRatio;if(R!==l){if(!E)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!Zl(u,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(P,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,C)}n.observe(e)}return i(!0),s}function T1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Os(e),f=o||s?[...u?Xn(u):[],...Xn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const h=u&&a?E1(u,n):null;let m=-1,g=null;i&&(g=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),u&&!l&&g.observe(u),g.observe(t));let x,p=l?Qt(e):null;l&&v();function v(){const y=Qt(e);p&&!Zl(p,y)&&n(),p=y,x=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),h==null||h(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(x)}}const P1=Zm,A1=Xm,R1=Km,O1=e1,I1=Qm,Xl=qm,j1=Jm,k1=(e,t,n)=>{const r=new Map,o={platform:S1,...n},s={...o.platform,_c:r};return Gm(e,t,{...o,platform:s})};var L1=typeof document<"u",N1=function(){},Zr=L1?S.useLayoutEffect:N1;function Xr(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(!Xr(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Xr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Jl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ec(e,t){const n=Jl(e);return Math.round(t*n)/n}function js(e){const t=d.useRef(e);return Zr(()=>{t.current=e}),t}function D1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,h]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(r);Xr(m,r)||g(r);const[x,p]=d.useState(null),[v,y]=d.useState(null),w=d.useCallback(F=>{F!==A.current&&(A.current=F,p(F))},[]),C=d.useCallback(F=>{F!==R.current&&(R.current=F,y(F))},[]),E=s||x,P=i||v,A=d.useRef(null),R=d.useRef(null),N=d.useRef(f),k=l!=null,D=js(l),U=js(o),W=js(u),H=d.useCallback(()=>{if(!A.current||!R.current)return;const F={placement:t,strategy:n,middleware:m};U.current&&(F.platform=U.current),k1(A.current,R.current,F).then(se=>{const ge={...se,isPositioned:W.current!==!1};z.current&&!Xr(N.current,ge)&&(N.current=ge,hr.flushSync(()=>{h(ge)}))})},[m,t,n,U,W]);Zr(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(F=>({...F,isPositioned:!1})))},[u]);const z=d.useRef(!1);Zr(()=>(z.current=!0,()=>{z.current=!1}),[]),Zr(()=>{if(E&&(A.current=E),P&&(R.current=P),E&&P){if(D.current)return D.current(E,P,H);H()}},[E,P,H,D,k]);const oe=d.useMemo(()=>({reference:A,floating:R,setReference:w,setFloating:C}),[w,C]),G=d.useMemo(()=>({reference:E,floating:P}),[E,P]),Y=d.useMemo(()=>{const F={position:n,left:0,top:0};if(!G.floating)return F;const se=ec(G.floating,f.x),ge=ec(G.floating,f.y);return a?{...F,transform:"translate("+se+"px, "+ge+"px)",...Jl(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:ge}},[n,a,G.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:H,refs:oe,elements:G,floatingStyles:Y}),[f,H,oe,G,Y])}const M1=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?Xl({element:r.current,padding:o}).fn(n):{}:r?Xl({element:r,padding:o}).fn(n):{}}}},$1=(e,t)=>({...P1(e),options:[e,t]}),F1=(e,t)=>({...A1(e),options:[e,t]}),B1=(e,t)=>({...j1(e),options:[e,t]}),U1=(e,t)=>({...R1(e),options:[e,t]}),W1=(e,t)=>({...O1(e),options:[e,t]}),H1=(e,t)=>({...I1(e),options:[e,t]}),V1=(e,t)=>({...M1(e),options:[e,t]});var z1="Arrow",tc=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});tc.displayName=z1;var G1=tc;function q1(e){const[t,n]=d.useState(void 0);return ve(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ks="Popper",[nc,Jr]=Yn(ks),[K1,rc]=nc(ks),oc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return c.jsx(K1,{scope:t,anchor:r,onAnchorChange:o,children:n})};oc.displayName=ks;var sc="PopperAnchor",ic=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=rc(sc,n),i=d.useRef(null),a=ce(t,i),l=d.useRef(null);return d.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||i.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:c.jsx(ie.div,{...o,ref:a})});ic.displayName=sc;var Ls="PopperContent",[Q1,Y1]=nc(Ls),ac=d.forwardRef((e,t)=>{var $,te,fe,X,ne,J;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:x,...p}=e,v=rc(Ls,n),[y,w]=d.useState(null),C=ce(t,Ce=>w(Ce)),[E,P]=d.useState(null),A=q1(E),R=(A==null?void 0:A.width)??0,N=(A==null?void 0:A.height)??0,k=r+(s!=="center"?"-"+s:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},U=Array.isArray(u)?u:[u],W=U.length>0,H={padding:D,boundary:U.filter(X1),altBoundary:W},{refs:z,floatingStyles:oe,placement:G,isPositioned:Y,middlewareData:F}=D1({strategy:"fixed",placement:k,whileElementsMounted:(...Ce)=>T1(...Ce,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[$1({mainAxis:o+N,alignmentAxis:i}),l&&F1({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?B1():void 0,...H}),l&&U1({...H}),W1({...H,apply:({elements:Ce,rects:Le,availableWidth:ot,availableHeight:ze})=>{const{width:Bt,height:To}=Le.reference,ht=Ce.floating.style;ht.setProperty("--radix-popper-available-width",`${ot}px`),ht.setProperty("--radix-popper-available-height",`${ze}px`),ht.setProperty("--radix-popper-anchor-width",`${Bt}px`),ht.setProperty("--radix-popper-anchor-height",`${To}px`)}}),E&&V1({element:E,padding:a}),J1({arrowWidth:R,arrowHeight:N}),m&&H1({strategy:"referenceHidden",...H})]}),[se,ge]=uc(G),ke=qt(x);ve(()=>{Y&&(ke==null||ke())},[Y,ke]);const Mt=($=F.arrow)==null?void 0:$.x,$t=(te=F.arrow)==null?void 0:te.y,rt=((fe=F.arrow)==null?void 0:fe.centerOffset)!==0,[Ft,Ve]=d.useState();return ve(()=>{y&&Ve(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:Y?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ft,"--radix-popper-transform-origin":[(X=F.transformOrigin)==null?void 0:X.x,(ne=F.transformOrigin)==null?void 0:ne.y].join(" "),...((J=F.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Q1,{scope:n,placedSide:se,onArrowChange:P,arrowX:Mt,arrowY:$t,shouldHideArrow:rt,children:c.jsx(ie.div,{"data-side":se,"data-align":ge,...p,ref:C,style:{...p.style,animation:Y?void 0:"none"}})})})});ac.displayName=Ls;var lc="PopperArrow",Z1={top:"bottom",right:"left",bottom:"top",left:"right"},cc=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Y1(lc,r),i=Z1[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(G1,{...o,ref:n,style:{...o.style,display:"block"}})})});cc.displayName=lc;function X1(e){return e!==null}var J1=e=>({name:"transformOrigin",options:e,fn(t){var v,y,w;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=uc(n),h={start:"0%",center:"50%",end:"100%"}[f],m=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let x="",p="";return u==="bottom"?(x=i?h:`${m}px`,p=`${-l}px`):u==="top"?(x=i?h:`${m}px`,p=`${r.floating.height+l}px`):u==="right"?(x=`${-l}px`,p=i?h:`${g}px`):u==="left"&&(x=`${r.floating.width+l}px`,p=i?h:`${g}px`),{data:{x,y:p}}}});function uc(e){const[t,n="center"]=e.split("-");return[t,n]}var dc=oc,fc=ic,pc=ac,hc=cc,eg="Portal",Ns=d.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=d.useState(!1);ve(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Wt.createPortal(c.jsx(ie.div,{...r,ref:t}),i):null});Ns.displayName=eg;function tg(e){const t=ng(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(og);if(l){const u=l.props.children,f=a.map(h=>h===l?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:h);return c.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ng(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=ig(o),a=sg(s,o.props);return o.type!==d.Fragment&&(a.ref=r?pn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rg=Symbol("radix.slottable");function og(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rg}function sg(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ig(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ag=d[" useInsertionEffect ".trim().toString()]||ve;function eo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=lg({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const h=f.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const u=d.useCallback(f=>{var h;if(a){const m=cg(f)?f(e):f;m!==e&&((h=i.current)==null||h.call(i,m))}else s(f)},[a,e,s,i]);return[l,u]}function lg({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return ag(()=>{s.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function cg(e){return typeof e=="function"}function ug(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var mc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dg="VisuallyHidden",gc=d.forwardRef((e,t)=>c.jsx(ie.span,{...e,ref:t,style:{...mc,...e.style}}));gc.displayName=dg;var fg=gc,pg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yn=new WeakMap,to=new WeakMap,no={},Ds=0,vc=function(e){return e&&(e.host||vc(e.parentNode))},hg=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mg=function(e,t,n,r){var o=hg(t,Array.isArray(e)?e:[e]);no[n]||(no[n]=new WeakMap);var s=no[n],i=[],a=new Set,l=new Set(o),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};o.forEach(u);var f=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(m){if(a.has(m))f(m);else try{var g=m.getAttribute(r),x=g!==null&&g!=="false",p=(yn.get(m)||0)+1,v=(s.get(m)||0)+1;yn.set(m,p),s.set(m,v),i.push(m),p===1&&x&&to.set(m,!0),v===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),a.clear(),Ds++,function(){i.forEach(function(h){var m=yn.get(h)-1,g=s.get(h)-1;yn.set(h,m),s.set(h,g),m||(to.has(h)||h.removeAttribute(r),to.delete(h)),g||h.removeAttribute(n)}),Ds--,Ds||(yn=new WeakMap,yn=new WeakMap,to=new WeakMap,no={})}},yc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=pg(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),mg(r,o,n,"aria-hidden")):function(){return null}},ro="right-scroll-bar-position",oo="width-before-scroll-bar",gg="with-scroll-bars-hidden",vg="--removed-body-scroll-bar-size";function Ms(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yg(e,t){var n=S.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}var bg=typeof window<"u"?d.useLayoutEffect:d.useEffect,bc=new WeakMap;function wg(e,t){var n=yg(null,function(r){return e.forEach(function(o){return Ms(o,r)})});return bg(function(){var r=bc.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Ms(a,null)}),s.forEach(function(a){o.has(a)||Ms(a,i)})}bc.set(n,e)},[e]),n}function _g(e){return e}function xg(e,t){t===void 0&&(t=_g);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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Cg(e){e===void 0&&(e={});var t=xg(null);return t.options=Ge({async:!0,ssr:!1},e),t}var wc=function(e){var t=e.sideCar,n=sa(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 d.createElement(r,Ge({},n))};wc.isSideCarExport=!0;function Sg(e,t){return e.useMedium(t),wc}var _c=Cg(),$s=function(){},so=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:$s,onWheelCapture:$s,onTouchMoveCapture:$s}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,h=e.shards,m=e.sideCar,g=e.noRelative,x=e.noIsolation,p=e.inert,v=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,C=e.gapMode,E=sa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=m,A=wg([n,t]),R=Ge(Ge({},E),o);return d.createElement(d.Fragment,null,f&&d.createElement(P,{sideCar:_c,removeScrollBar:u,shards:h,noRelative:g,noIsolation:x,inert:p,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:C}),i?d.cloneElement(d.Children.only(a),Ge(Ge({},R),{ref:A})):d.createElement(w,Ge({},R,{className:l,ref:A}),a))});so.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},so.classNames={fullWidth:oo,zeroRight:ro};var Eg=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tg(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Eg();return t&&e.setAttribute("nonce",t),e}function Pg(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ag(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rg=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Tg())&&(Pg(t,n),Ag(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Og=function(){var e=Rg();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xc=function(){var e=Og(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ig={left:0,top:0,right:0,gap:0},Fs=function(e){return parseInt(e||"",10)||0},jg=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Fs(n),Fs(r),Fs(o)]},kg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ig;var t=jg(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Lg=xc(),bn="data-scroll-locked",Ng=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
209
|
+
`,Pr=16,Up=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=mp(n);return d.createElement("div",{style:{position:"fixed",zIndex:9999,top:Pr,left:Pr,right:Pr,bottom:Pr,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(u=>{let f=u.position||t,h=l.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),m=Fp(f,h);return d.createElement($p,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?Bp:"",style:m},u.type==="custom"?Cr(u.message,u):o?o(u):d.createElement(Mp,{toast:u,position:f}))}))},xa=Re;const Qo=()=>({notify:S.useCallback((t,n,r)=>{const o={style:{background:"var(--platform-background-primary-color)",color:"var(--platform-text-primary-color)"}};n==="warning"||n==="info"?xa(t,{...o,icon:n==="warning"?"⚠️":"ℹ️"}):xa[n](t,o),r&&console.error(r)},[])});var fn=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(){}},zt=typeof window>"u"||"Deno"in globalThis;function we(){}function Wp(e,t){return typeof e=="function"?e(t):e}function Yo(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ca(e,t){return Math.max(e+(t||0)-Date.now(),0)}function wt(e,t){return typeof e=="function"?e(t):e}function De(e,t){return typeof e=="function"?e(t):e}function Sa(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Zo(i,t.options))return!1}else if(!Qn(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Ea(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Gt(t.options.mutationKey)!==Gt(s))return!1}else if(!Qn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Zo(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gt)(e)}function Gt(e){return JSON.stringify(e,(t,n)=>Jo(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Qn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Qn(e[n],t[n])):!1}function Xo(e,t){if(e===t)return e;const n=Ta(e)&&Ta(t);if(n||Jo(e)&&Jo(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let l=0;for(let u=0;u<i;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=Xo(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return o===i&&l===o?e:a}return t}function Ar(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 Ta(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jo(e){if(!Pa(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Pa(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Pa(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hp(e){return new Promise(t=>{setTimeout(t,e)})}function es(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){try{return Xo(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Xo(e,t)}return t}function Vp(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function zp(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rr=Symbol();function Aa(e,t){return e.queryFn===Rr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Rr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ra(e,t){return typeof e=="function"?e(...t):!!e}var Gp=(xd=class extends fn{constructor(){super();M(this,nn);M(this,Pt);M(this,Tn);I(this,Tn,t=>{if(!zt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){_(this,Pt)||this.setEventListener(_(this,Tn))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,Pt))==null||t.call(this),I(this,Pt,void 0))}setEventListener(t){var n;I(this,Tn,t),(n=_(this,Pt))==null||n.call(this),I(this,Pt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){_(this,nn)!==t&&(I(this,nn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof _(this,nn)=="boolean"?_(this,nn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},nn=new WeakMap,Pt=new WeakMap,Tn=new WeakMap,xd),ts=new Gp,qp=(Cd=class extends fn{constructor(){super();M(this,Pn,!0);M(this,At);M(this,An);I(this,An,t=>{if(!zt&&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,At)||this.setEventListener(_(this,An))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,At))==null||t.call(this),I(this,At,void 0))}setEventListener(t){var n;I(this,An,t),(n=_(this,At))==null||n.call(this),I(this,At,t(this.setOnline.bind(this)))}setOnline(t){_(this,Pn)!==t&&(I(this,Pn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return _(this,Pn)}},Pn=new WeakMap,At=new WeakMap,An=new WeakMap,Cd),Or=new qp;function ns(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Kp(e){return Math.min(1e3*2**e,3e4)}function Oa(e){return(e??"online")==="online"?Or.isOnline():!0}var Ia=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function rs(e){return e instanceof Ia}function ja(e){let t=!1,n=0,r=!1,o;const s=ns(),i=p=>{var v;r||(m(new Ia(p)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>ts.isFocused()&&(e.networkMode==="always"||Or.isOnline())&&e.canRun(),f=()=>Oa(e.networkMode)&&e.canRun(),h=p=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,p),o==null||o(),s.resolve(p))},m=p=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,p),o==null||o(),s.reject(p))},g=()=>new Promise(p=>{var v;o=y=>{(r||u())&&p(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),x=()=>{if(r)return;let p;const v=n===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(y){p=Promise.reject(y)}Promise.resolve(p).then(h).catch(y=>{var A;if(r)return;const w=e.retry??(zt?0:3),C=e.retryDelay??Kp,E=typeof C=="function"?C(n,y):C,P=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,y);if(t||!P){m(y);return}n++,(A=e.onFail)==null||A.call(e,n,y),Hp(E).then(()=>u()?void 0:g()).then(()=>{t?m(y):x()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?x():g().then(x),s)}}var Qp=e=>setTimeout(e,0);function Yp(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=Qp;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var me=Yp(),ka=(Sd=class{constructor(){M(this,rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yo(this.gcTime)&&I(this,rn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zt?1/0:5*60*1e3))}clearGcTimeout(){_(this,rn)&&(clearTimeout(_(this,rn)),I(this,rn,void 0))}},rn=new WeakMap,Sd),Zp=(Ed=class extends ka{constructor(t){super();M(this,We);M(this,Rn);M(this,On);M(this,je);M(this,on);M(this,be);M(this,lr);M(this,sn);I(this,sn,!1),I(this,lr,t.defaultOptions),this.setOptions(t.options),this.observers=[],I(this,on,t.client),I(this,je,_(this,on).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,I(this,Rn,Xp(this.options)),this.state=t.state??_(this,Rn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=_(this,be))==null?void 0:t.promise}setOptions(t){this.options={..._(this,lr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,je).remove(this)}setData(t,n){const r=es(this.state.data,t,this.options);return V(this,We,mt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){V(this,We,mt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=_(this,be))==null?void 0:r.promise;return(o=_(this,be))==null||o.cancel(t),n?n.then(we).catch(we):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(_(this,Rn))}isActive(){return this.observers.some(t=>De(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>wt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ca(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,be))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,be))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),_(this,je).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,be)&&(_(this,sn)?_(this,be).cancel({revert:!0}):_(this,be).cancelRetry()),this.scheduleGc()),_(this,je).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||V(this,We,mt).call(this,{type:"invalidate"})}fetch(t,n){var u,f,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(_(this,be))return _(this,be).continueRetry(),_(this,be).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const r=new AbortController,o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(I(this,sn,!0),r.signal)})},s=()=>{const m=Aa(this.options,n),x=(()=>{const p={client:_(this,on),queryKey:this.queryKey,meta:this.meta};return o(p),p})();return I(this,sn,!1),this.options.persister?this.options.persister(m,x,this):m(x)},a=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:_(this,on),state:this.state,fetchFn:s};return o(m),m})();(u=this.options.behavior)==null||u.onFetch(a,this),I(this,On,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&V(this,We,mt).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=m=>{var g,x,p,v;rs(m)&&m.silent||V(this,We,mt).call(this,{type:"error",error:m}),rs(m)||((x=(g=_(this,je).config).onError)==null||x.call(g,m,this),(v=(p=_(this,je).config).onSettled)==null||v.call(p,this.state.data,m,this)),this.scheduleGc()};return I(this,be,ja({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var g,x,p,v;if(m===void 0){console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(y){l(y);return}(x=(g=_(this,je).config).onSuccess)==null||x.call(g,m,this),(v=(p=_(this,je).config).onSettled)==null||v.call(p,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,g)=>{V(this,We,mt).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{V(this,We,mt).call(this,{type:"pause"})},onContinue:()=>{V(this,We,mt).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),_(this,be).start()}},Rn=new WeakMap,On=new WeakMap,je=new WeakMap,on=new WeakMap,be=new WeakMap,lr=new WeakMap,sn=new WeakMap,We=new WeakSet,mt=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,...La(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 rs(o)&&o.revert&&_(this,On)?{..._(this,On),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),me.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,je).notify({query:this,type:"updated",action:t})})},Ed);function La(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Oa(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Xp(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 Jp=(Td=class extends fn{constructor(t={}){super();M(this,et);this.config=t,I(this,et,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Zo(o,n);let i=this.get(s);return i||(i=new Zp({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){_(this,et).has(t.queryHash)||(_(this,et).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=_(this,et).get(t.queryHash);n&&(t.destroy(),n===t&&_(this,et).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return _(this,et).get(t)}getAll(){return[..._(this,et).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sa(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Sa(t,r)):n}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},et=new WeakMap,Td),eh=(Pd=class extends ka{constructor(t){super();M(this,nt);M(this,tt);M(this,_e);M(this,an);this.mutationId=t.mutationId,I(this,_e,t.mutationCache),I(this,tt,[]),this.state=t.state||Na(),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,tt).includes(t)||(_(this,tt).push(t),this.clearGcTimeout(),_(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){I(this,tt,_(this,tt).filter(n=>n!==t)),this.scheduleGc(),_(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){_(this,tt).length||(this.state.status==="pending"?this.scheduleGc():_(this,_e).remove(this))}continue(){var t;return((t=_(this,an))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,l,u,f,h,m,g,x,p,v,y,w,C,E,P,A,R,N;const n=()=>{V(this,nt,Ut).call(this,{type:"continue"})};I(this,an,ja({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,D)=>{V(this,nt,Ut).call(this,{type:"failed",failureCount:k,error:D})},onPause:()=>{V(this,nt,Ut).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,_e).canRun(this)}));const r=this.state.status==="pending",o=!_(this,an).canStart();try{if(r)n();else{V(this,nt,Ut).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=_(this,_e).config).onMutate)==null?void 0:i.call(s,t,this));const D=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));D!==this.state.context&&V(this,nt,Ut).call(this,{type:"pending",context:D,variables:t,isPaused:o})}const k=await _(this,an).start();return await((f=(u=_(this,_e).config).onSuccess)==null?void 0:f.call(u,k,t,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,k,t,this.state.context)),await((x=(g=_(this,_e).config).onSettled)==null?void 0:x.call(g,k,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,k,null,t,this.state.context)),V(this,nt,Ut).call(this,{type:"success",data:k}),k}catch(k){try{throw await((w=(y=_(this,_e).config).onError)==null?void 0:w.call(y,k,t,this.state.context,this)),await((E=(C=this.options).onError)==null?void 0:E.call(C,k,t,this.state.context)),await((A=(P=_(this,_e).config).onSettled)==null?void 0:A.call(P,void 0,k,this.state.variables,this.state.context,this)),await((N=(R=this.options).onSettled)==null?void 0:N.call(R,void 0,k,t,this.state.context)),k}finally{V(this,nt,Ut).call(this,{type:"error",error:k})}}finally{_(this,_e).runNext(this)}}},tt=new WeakMap,_e=new WeakMap,an=new WeakMap,nt=new WeakSet,Ut=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),me.batch(()=>{_(this,tt).forEach(r=>{r.onMutationUpdate(t)}),_(this,_e).notify({mutation:this,type:"updated",action:t})})},Pd);function Na(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var th=(Ad=class extends fn{constructor(t={}){super();M(this,dt);M(this,He);M(this,cr);this.config=t,I(this,dt,new Set),I(this,He,new Map),I(this,cr,0)}build(t,n,r){const o=new eh({mutationCache:this,mutationId:++Po(this,cr)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){_(this,dt).add(t);const n=Ir(t);if(typeof n=="string"){const r=_(this,He).get(n);r?r.push(t):_(this,He).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(_(this,dt).delete(t)){const n=Ir(t);if(typeof n=="string"){const r=_(this,He).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&_(this,He).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ir(t);if(typeof n=="string"){const r=_(this,He).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Ir(t);if(typeof n=="string"){const o=(r=_(this,He).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){me.batch(()=>{_(this,dt).forEach(t=>{this.notify({type:"removed",mutation:t})}),_(this,dt).clear(),_(this,He).clear()})}getAll(){return Array.from(_(this,dt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ea(n,r))}findAll(t={}){return this.getAll().filter(n=>Ea(t,n))}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return me.batch(()=>Promise.all(t.map(n=>n.continue().catch(we))))}},dt=new WeakMap,He=new WeakMap,cr=new WeakMap,Ad);function Ir(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Da(e){return{onFetch:(t,n)=>{var f,h,m,g,x;const r=t.options,o=(m=(h=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,s=((g=t.state.data)==null?void 0:g.pages)||[],i=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const v=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},y=Aa(t.options,t.fetchOptions),w=async(C,E,P)=>{if(p)return Promise.reject();if(E==null&&C.pages.length)return Promise.resolve(C);const R=(()=>{const U={client:t.client,queryKey:t.queryKey,pageParam:E,direction:P?"backward":"forward",meta:t.options.meta};return v(U),U})(),N=await y(R),{maxPages:k}=t.options,D=P?zp:Vp;return{pages:D(C.pages,N,k),pageParams:D(C.pageParams,E,k)}};if(o&&s.length){const C=o==="backward",E=C?nh:Ma,P={pages:s,pageParams:i},A=E(r,P);a=await w(P,A,C)}else{const C=e??s.length;do{const E=l===0?i[0]??r.initialPageParam:Ma(r,a);if(l>0&&E==null)break;a=await w(a,E),l++}while(l<C)}return a};t.options.persister?t.fetchFn=()=>{var p,v;return(v=(p=t.options).persister)==null?void 0:v.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ma(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function nh(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var rh=(Rd=class{constructor(e={}){M(this,ue);M(this,Rt);M(this,Ot);M(this,In);M(this,jn);M(this,It);M(this,kn);M(this,Ln);I(this,ue,e.queryCache||new Jp),I(this,Rt,e.mutationCache||new th),I(this,Ot,e.defaultOptions||{}),I(this,In,new Map),I(this,jn,new Map),I(this,It,0)}mount(){Po(this,It)._++,_(this,It)===1&&(I(this,kn,ts.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,ue).onFocus())})),I(this,Ln,Or.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,ue).onOnline())})))}unmount(){var e,t;Po(this,It)._--,_(this,It)===0&&((e=_(this,kn))==null||e.call(this),I(this,kn,void 0),(t=_(this,Ln))==null||t.call(this),I(this,Ln,void 0))}isFetching(e){return _(this,ue).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return _(this,Rt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,ue).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=_(this,ue).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(wt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return _(this,ue).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,ue).get(r.queryHash),s=o==null?void 0:o.state.data,i=Wp(t,s);if(i!==void 0)return _(this,ue).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return me.batch(()=>_(this,ue).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,ue).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=_(this,ue);me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=_(this,ue);return me.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=me.batch(()=>_(this,ue).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(we).catch(we)}invalidateQueries(e,t={}){return me.batch(()=>(_(this,ue).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=me.batch(()=>_(this,ue).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(we)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(we)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=_(this,ue).build(this,t);return n.isStaleByTime(wt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(we).catch(we)}fetchInfiniteQuery(e){return e.behavior=Da(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(we).catch(we)}ensureInfiniteQueryData(e){return e.behavior=Da(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Or.isOnline()?_(this,Rt).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,ue)}getMutationCache(){return _(this,Rt)}getDefaultOptions(){return _(this,Ot)}setDefaultOptions(e){I(this,Ot,e)}setQueryDefaults(e,t){_(this,In).set(Gt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[..._(this,In).values()],n={};return t.forEach(r=>{Qn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){_(this,jn).set(Gt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[..._(this,jn).values()],n={};return t.forEach(r=>{Qn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={..._(this,Ot).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Zo(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.queryFn===Rr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{..._(this,Ot).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){_(this,ue).clear(),_(this,Rt).clear()}},ue=new WeakMap,Rt=new WeakMap,Ot=new WeakMap,In=new WeakMap,jn=new WeakMap,It=new WeakMap,kn=new WeakMap,Ln=new WeakMap,Rd),oh=(Od=class extends fn{constructor(t,n){super();M(this,ee);M(this,Te);M(this,K);M(this,ur);M(this,xe);M(this,ln);M(this,Nn);M(this,jt);M(this,kt);M(this,dr);M(this,Dn);M(this,Mn);M(this,cn);M(this,un);M(this,Lt);M(this,$n,new Set);this.options=n,I(this,Te,t),I(this,kt,null),I(this,jt,ns()),this.options.experimental_prefetchInRender||_(this,jt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,K).addObserver(this),$a(_(this,K),this.options)?V(this,ee,fr).call(this):this.updateResult(),V(this,ee,Ei).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return os(_(this,K),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return os(_(this,K),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,V(this,ee,Ti).call(this),V(this,ee,Pi).call(this),_(this,K).removeObserver(this)}setOptions(t){const n=this.options,r=_(this,K);if(this.options=_(this,Te).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof De(this.options.enabled,_(this,K))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");V(this,ee,Ai).call(this),_(this,K).setOptions(this.options),n._defaulted&&!Ar(this.options,n)&&_(this,Te).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,K),observer:this});const o=this.hasListeners();o&&Fa(_(this,K),r,this.options,n)&&V(this,ee,fr).call(this),this.updateResult(),o&&(_(this,K)!==r||De(this.options.enabled,_(this,K))!==De(n.enabled,_(this,K))||wt(this.options.staleTime,_(this,K))!==wt(n.staleTime,_(this,K)))&&V(this,ee,xi).call(this);const s=V(this,ee,Ci).call(this);o&&(_(this,K)!==r||De(this.options.enabled,_(this,K))!==De(n.enabled,_(this,K))||s!==_(this,Lt))&&V(this,ee,Si).call(this,s)}getOptimisticResult(t){const n=_(this,Te).getQueryCache().build(_(this,Te),t),r=this.createResult(n,t);return ih(this,r)&&(I(this,xe,r),I(this,Nn,this.options),I(this,ln,_(this,K).state)),r}getCurrentResult(){return _(this,xe)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){_(this,$n).add(t)}getCurrentQuery(){return _(this,K)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=_(this,Te).defaultQueryOptions(t),r=_(this,Te).getQueryCache().build(_(this,Te),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return V(this,ee,fr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,xe)))}createResult(t,n){var k;const r=_(this,K),o=this.options,s=_(this,xe),i=_(this,ln),a=_(this,Nn),u=t!==r?t.state:_(this,ur),{state:f}=t;let h={...f},m=!1,g;if(n._optimisticResults){const D=this.hasListeners(),U=!D&&$a(t,n),W=D&&Fa(t,r,n,o);(U||W)&&(h={...h,...La(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:x,errorUpdatedAt:p,status:v}=h;g=h.data;let y=!1;if(n.placeholderData!==void 0&&g===void 0&&v==="pending"){let D;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(D=s.data,y=!0):D=typeof n.placeholderData=="function"?n.placeholderData((k=_(this,Mn))==null?void 0:k.state.data,_(this,Mn)):n.placeholderData,D!==void 0&&(v="success",g=es(s==null?void 0:s.data,D,n),m=!0)}if(n.select&&g!==void 0&&!y)if(s&&g===(i==null?void 0:i.data)&&n.select===_(this,dr))g=_(this,Dn);else try{I(this,dr,n.select),g=n.select(g),g=es(s==null?void 0:s.data,g,n),I(this,Dn,g),I(this,kt,null)}catch(D){I(this,kt,D)}_(this,kt)&&(x=_(this,kt),g=_(this,Dn),p=Date.now(),v="error");const w=h.fetchStatus==="fetching",C=v==="pending",E=v==="error",P=C&&w,A=g!==void 0,N={status:v,fetchStatus:h.fetchStatus,isPending:C,isSuccess:v==="success",isError:E,isInitialLoading:P,isLoading:P,data:g,dataUpdatedAt:h.dataUpdatedAt,error:x,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!C,isLoadingError:E&&!A,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&A,isStale:ss(t,n),refetch:this.refetch,promise:_(this,jt)};if(this.options.experimental_prefetchInRender){const D=H=>{N.status==="error"?H.reject(N.error):N.data!==void 0&&H.resolve(N.data)},U=()=>{const H=I(this,jt,N.promise=ns());D(H)},W=_(this,jt);switch(W.status){case"pending":t.queryHash===r.queryHash&&D(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&U();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&U();break}}return N}updateResult(){const t=_(this,xe),n=this.createResult(_(this,K),this.options);if(I(this,ln,_(this,K).state),I(this,Nn,this.options),_(this,ln).data!==void 0&&I(this,Mn,_(this,K)),Ar(n,t))return;I(this,xe,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!_(this,$n).size)return!0;const i=new Set(s??_(this,$n));return this.options.throwOnError&&i.add("error"),Object.keys(_(this,xe)).some(a=>{const l=a;return _(this,xe)[l]!==t[l]&&i.has(l)})};V(this,ee,zd).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&V(this,ee,Ei).call(this)}},Te=new WeakMap,K=new WeakMap,ur=new WeakMap,xe=new WeakMap,ln=new WeakMap,Nn=new WeakMap,jt=new WeakMap,kt=new WeakMap,dr=new WeakMap,Dn=new WeakMap,Mn=new WeakMap,cn=new WeakMap,un=new WeakMap,Lt=new WeakMap,$n=new WeakMap,ee=new WeakSet,fr=function(t){V(this,ee,Ai).call(this);let n=_(this,K).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(we)),n},xi=function(){V(this,ee,Ti).call(this);const t=wt(this.options.staleTime,_(this,K));if(zt||_(this,xe).isStale||!Yo(t))return;const r=Ca(_(this,xe).dataUpdatedAt,t)+1;I(this,cn,setTimeout(()=>{_(this,xe).isStale||this.updateResult()},r))},Ci=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,K)):this.options.refetchInterval)??!1},Si=function(t){V(this,ee,Pi).call(this),I(this,Lt,t),!(zt||De(this.options.enabled,_(this,K))===!1||!Yo(_(this,Lt))||_(this,Lt)===0)&&I(this,un,setInterval(()=>{(this.options.refetchIntervalInBackground||ts.isFocused())&&V(this,ee,fr).call(this)},_(this,Lt)))},Ei=function(){V(this,ee,xi).call(this),V(this,ee,Si).call(this,V(this,ee,Ci).call(this))},Ti=function(){_(this,cn)&&(clearTimeout(_(this,cn)),I(this,cn,void 0))},Pi=function(){_(this,un)&&(clearInterval(_(this,un)),I(this,un,void 0))},Ai=function(){const t=_(this,Te).getQueryCache().build(_(this,Te),this.options);if(t===_(this,K))return;const n=_(this,K);I(this,K,t),I(this,ur,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},zd=function(t){me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(_(this,xe))}),_(this,Te).getQueryCache().notify({query:_(this,K),type:"observerResultsUpdated"})})},Od);function sh(e,t){return De(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $a(e,t){return sh(e,t)||e.state.data!==void 0&&os(e,t,t.refetchOnMount)}function os(e,t,n){if(De(t.enabled,e)!==!1&&wt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ss(e,t)}return!1}function Fa(e,t,n,r){return(e!==t||De(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ss(e,n)}function ss(e,t){return De(t.enabled,e)!==!1&&e.isStaleByTime(wt(t.staleTime,e))}function ih(e,t){return!Ar(e.getCurrentResult(),t)}var ah=(Id=class extends fn{constructor(n,r){super();M(this,pt);M(this,Nt);M(this,Dt);M(this,Pe);M(this,ft);I(this,Nt,n),this.setOptions(r),this.bindMethods(),V(this,pt,Ao).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,Nt).defaultMutationOptions(n),Ar(this.options,r)||_(this,Nt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,Pe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Gt(r.mutationKey)!==Gt(this.options.mutationKey)?this.reset():((o=_(this,Pe))==null?void 0:o.state.status)==="pending"&&_(this,Pe).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=_(this,Pe))==null||n.removeObserver(this)}onMutationUpdate(n){V(this,pt,Ao).call(this),V(this,pt,Ri).call(this,n)}getCurrentResult(){return _(this,Dt)}reset(){var n;(n=_(this,Pe))==null||n.removeObserver(this),I(this,Pe,void 0),V(this,pt,Ao).call(this),V(this,pt,Ri).call(this)}mutate(n,r){var o;return I(this,ft,r),(o=_(this,Pe))==null||o.removeObserver(this),I(this,Pe,_(this,Nt).getMutationCache().build(_(this,Nt),this.options)),_(this,Pe).addObserver(this),_(this,Pe).execute(n)}},Nt=new WeakMap,Dt=new WeakMap,Pe=new WeakMap,ft=new WeakMap,pt=new WeakSet,Ao=function(){var r;const n=((r=_(this,Pe))==null?void 0:r.state)??Na();I(this,Dt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ri=function(n){me.batch(()=>{var r,o,s,i,a,l,u,f;if(_(this,ft)&&this.hasListeners()){const h=_(this,Dt).variables,m=_(this,Dt).context;(n==null?void 0:n.type)==="success"?((o=(r=_(this,ft)).onSuccess)==null||o.call(r,n.data,h,m),(i=(s=_(this,ft)).onSettled)==null||i.call(s,n.data,null,h,m)):(n==null?void 0:n.type)==="error"&&((l=(a=_(this,ft)).onError)==null||l.call(a,n.error,h,m),(f=(u=_(this,ft)).onSettled)==null||f.call(u,void 0,n.error,h,m))}this.listeners.forEach(h=>{h(_(this,Dt))})})},Id),Ba=d.createContext(void 0),is=e=>{const t=d.useContext(Ba);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},lh=({client:e,children:t})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(Ba.Provider,{value:e,children:t})),Ua=d.createContext(!1),ch=()=>d.useContext(Ua);Ua.Provider;function uh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var dh=d.createContext(uh()),fh=()=>d.useContext(dh),ph=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},hh=e=>{d.useEffect(()=>{e.clearReset()},[e])},mh=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ra(n,[e.error,r])),gh=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},vh=(e,t)=>e.isLoading&&e.isFetching&&!t,yh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Wa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function bh(e,t,n){var h,m,g,x,p;if(typeof e!="object"||Array.isArray(e))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=ch(),o=fh(),s=is(),i=s.defaultQueryOptions(e);(m=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,i),i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`),i._optimisticResults=r?"isRestoring":"optimistic",gh(i),ph(i,o),hh(o);const a=!s.getQueryCache().get(i.queryHash),[l]=d.useState(()=>new t(s,i)),u=l.getOptimisticResult(i),f=!r&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(v=>{const y=f?l.subscribe(me.batchCalls(v)):we;return l.updateResult(),y},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d.useEffect(()=>{l.setOptions(i)},[i,l]),yh(i,u))throw Wa(i,l,o);if(mh({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((x=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||x.call(g,i,u),i.experimental_prefetchInRender&&!zt&&vh(u,r)){const v=a?Wa(i,l,o):(p=s.getQueryCache().get(i.queryHash))==null?void 0:p.promise;v==null||v.catch(we).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function Ha(e,t){return bh(e,oh)}function jr(e,t){const n=is(),[r]=d.useState(()=>new ah(n,e));d.useEffect(()=>{r.setOptions(e)},[r,e]);const o=d.useSyncExternalStore(d.useCallback(i=>r.subscribe(me.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=d.useCallback((i,a)=>{r.mutate(i,a).catch(we)},[r]);if(o.error&&Ra(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const kr={STALE_TIME:1e3*60*5,GC_TIME:1e3*60*10,RETRY_COUNT:1,RETRY_DELAY:1e3},Va={refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:kr.STALE_TIME,gcTime:kr.GC_TIME,retry:kr.RETRY_COUNT,retryDelay:kr.RETRY_DELAY,enable:!0},Lr=e=>e instanceof Error?e.message:String(e),za=(e,t,n)=>{const r=is(),{notify:o}=Qo(),{createFn:s,readFn:i,readByIdFn:a,updateFn:l,deleteFn:u,partialUpdateFn:f}=n,h=()=>{r.invalidateQueries({queryKey:[e]})},m=(E,P,A,R)=>o(R!=null&&R.overrideSuccessMessage?R==null?void 0:R.overrideSuccessMessage(E,P):A,"success"),g=(E,P,A,R)=>o(R!=null&&R.overrideErrorMessage?R==null?void 0:R.overrideErrorMessage(E,P):A,"error");return{useCreate:E=>jr({mutationFn:P=>s(P),onSuccess:P=>{h(),m(t,P,`${t} created successfully`,E)},onError:P=>{g(t,P,`Error creating ${t}: ${Lr(P)}`,E)}}),useReadQuery:E=>Ha({queryKey:[e],queryFn:i,...Va,...E}),useReadByIdQuery:(E,P)=>Ha({queryKey:[e,E],queryFn:()=>a(E),...Va,enabled:!!E,...P}),useUpdate:E=>jr({mutationFn:({id:P,data:A})=>l(P,A),onSuccess:P=>{h(),m(t,P,`${t} updated successfully`,E)},onError:P=>{g(t,P,`Error updating ${t}: ${Lr(P)}`,E)}}),usePartialUpdate:E=>f&&jr({mutationFn:({id:P,data:A})=>f(P,A),onSuccess:P=>{h(),m(t,P,`${t} updated successfully`,E)},onError:P=>{g(t,P,`Error updating ${t}: ${Lr(P)}`,E)}}),useDelete:E=>jr({mutationFn:P=>u(P),onSuccess:()=>{h(),m(t,null,`${t} deleted successfully`,E)},onError:P=>{g(t,P,`Error deleting ${t}: ${Lr(P)}`,E)}}),invalidateQueries:h}},wh=(e,t)=>za(e,t,{createFn:n=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(r=>r.json()),deleteFn:n=>fetch(`${e}/${n}`,{method:"DELETE"}).then(r=>{if(!r.ok)throw new Error(`Error deleting: ${r.status}`)}),readByIdFn:n=>fetch(`${e}/${n}`).then(r=>r.json()),readFn:()=>fetch(e).then(n=>n.json()),updateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json()),partialUpdateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json())}),_h={SINGLE_TENANT:"single-tenant"},xh={COOKIE:"cookie"},as="tenant",Ga="tenant",qa="tenant",Ch=_h.SINGLE_TENANT,Sh=xh.COOKIE,Eh={mode:Ch,clientSideMode:Sh,tenantIDPProvisioningStrategy:"none"};class Th{setTenant(t,n){const r=new URL(window.location.href);r.searchParams.set(Ga,t.name),window.location.href=r.toString()}getCurrentTenantName(){const t=new URL(window.location.href);return new URLSearchParams(t.search).get(Ga)}}class Ph{setTenant(t,n){sessionStorage.setItem(qa,t.name),window.location.reload()}getCurrentTenantName(){return sessionStorage.getItem(qa)}}/*! js-cookie v3.0.5 | MIT */function Nr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Ah={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ls(e,t){function n(o,s,i){if(!(typeof document>"u")){i=Nr({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in i)i[l]&&(a+="; "+l,i[l]!==!0&&(a+="="+i[l].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var l=s[a].split("="),u=l.slice(1).join("=");try{var f=decodeURIComponent(l[0]);if(i[f]=e.read(u,f),o===f)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",Nr({},s,{expires:-1}))},withAttributes:function(o){return ls(this.converter,Nr({},this.attributes,o))},withConverter:function(o){return ls(Nr({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var cs=ls(Ah,{path:"/"});class Rh{setTenant(t,n){t?cs.set(as,t.name):cs.remove(as),window.location.reload()}getCurrentTenantName(){return cs.get(as)}}class Oh{extractSubdomain(t){if(t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t))return"";const n=t.split(".");if(n.length<2||n.length===2||n[0]==="www"&&n.length===3)return"";const o=(n[0]==="www"?n.slice(1):n).slice(0,-2);return o.length>0?o.join("."):""}getBaseDomain(t){const n=t.split(".");return t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t)||n.length<=2?t:n.slice(-2).join(".")}setTenant(t,n){var u;const r=(u=n.urlPatterns)==null?void 0:u.find(f=>f.patternType==="subdomain"&&f.tenantId===t.id&&f.isActive);if(!r)throw new Error(`No active subdomain pattern found for tenant '${t.name}'`);const o=new URL(window.location.href),s=r.patternValue,i=o.hostname,a=this.getBaseDomain(i),l=s?`${s}.${a}`:a;o.hostname=l,window.location.href=o.toString()}getCurrentTenantName(){const t=window.location.hostname;return this.extractSubdomain(t)||null}}const Ka={queryParams:new Th,sessionStorage:new Ph,cookie:new Rh,subdomain:new Oh},Ih=e=>{const t=Ka[e.clientSideMode];if(!t)throw new Error(`Client side tenant mode '${e.clientSideMode}' is not supported ${JSON.stringify({strategies:Ka},null,2)}`);return t},jh=(e,t,n)=>{const r=t.find(s=>s.name===n);if(!r)throw Error("No tenant permission");return Ih(e).setTenant(r,e),r},kh=()=>{const[e,t]=Wn(),{tenants:n=[],currentTenant:r,tenantConfig:o=Eh}=e,s=S.useCallback(i=>{const a=jh(o,n,i);t({...e,currentTenant:a})},[o,e]);return{tenants:n,currentTenant:r,tenantConfig:o,selectTenant:s}};function Lh(e){if(!e.ok)throw console.error(e),new Error(e.statusText)}async function Dr(e,t,n,r){const o=await e(`/user-states/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,r);return Lh(o),o}class Mr{static async get(t,n,r){const s=await Dr(t,n,r,{method:"GET",headers:{"Content-Type":"application/json"}});return s.status===204?null:await s.json()}static async create(t,n,r,o){const s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await Dr(t,n,r,s)).json()}static async update(t,n,r,o){const s={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await Dr(t,n,r,s)).json()}static async delete(t,n,r){return await Dr(t,n,r,{method:"DELETE",headers:{"Content-Type":"application/json"}}),null}}const Nh=e=>{const t=$o("@bluealba/pae-nestjs-gateway-service"),n=Zi();if(!n)throw new Error("You must call the useUserState hook within a PAE application.");const[r,o]=S.useState(null),[s,i]=S.useState(!1),[a,l]=S.useState(!1),[u,f]=S.useState(null),h=(w,C)=>S.useCallback(async({newValue:E,shouldThrowError:P}={})=>{try{l(!0),f(null);const A=await w(t,n,e,E);return o(A),A?A.value:null}catch(A){if(f(A==null?void 0:A.message),console.error(`Failed to ${C} ${e}:`,A),P)throw A;return null}finally{l(!1)}},[t,n,e]),m=h(Mr.get,"fetch"),g=h(Mr.create,"create"),x=h(Mr.update,"update"),p=h(Mr.delete,"delete"),v=S.useCallback(async()=>{try{await m()}finally{i(!0)}},[m]);S.useEffect(()=>{v()},[v]);const y=S.useCallback(async(w,C=!1)=>r==null?await g({newValue:w,shouldThrowError:C}):await x({newValue:w,shouldThrowError:C}),[r,g,x]);return{value:r?r.value:null,hasFetched:s,loading:a,error:u,setValue:y,createValue:g,updateValue:x,deleteValue:p}},Qa="__PAE_EXTENSION_POINT_REACT_CONTENT_EMPTY__",Dh=({module:e,point:t,children:n})=>(ta(e,t,n??Qa),null),Ya=({name:e,children:t,...n})=>{const r=ea(e);if(r===Qa)return null;if(!r)return c.jsx(c.Fragment,{children:t??null});if(Mh(r)){const o=r;return c.jsx(o,{...n})}else return r},Mh=e=>typeof e=="function",$h=(e,t)=>{const n=r=>(t=t||e.displayName||e.name||"?",c.jsx(Ya,{name:t,...r,children:c.jsx(e,{...r})}));return n.displayName=`extensionPoint(${t})`,n},Za="single-spa:app-change";function Fh(){const[e,t]=S.useState(Xa());return S.useEffect(()=>{const n=()=>{t(Xa())};return window.addEventListener(Za,n),()=>{window.removeEventListener(Za,n)}},[]),e}function Xa(){return he.getAppNames().reduce((t,n)=>(he.getAppStatus(n)?t[n]=he.getAppStatus(n):t[n]="NOT_LOADED",t),{})}function Bh(e){const n=Fh()[e]??"LOAD_ERROR";return{statusName:n,isLoading:n==="LOADING_SOURCE_CODE"||n==="BOOTSTRAPPING"||n==="MOUNTING",isMounted:n==="MOUNTED",isBroken:n==="SKIP_BECAUSE_BROKEN"||n==="LOAD_ERROR"}}const Ja=({appName:e})=>c.jsx("div",{children:c.jsxs("p",{children:["Loading ",e,"..."]})});Ja.displayName="BaseLoading";const el=({appName:e})=>c.jsxs("div",{children:[c.jsx("p",{children:"Something went wrong..."}),c.jsxs("p",{children:["Failed to load ",e]})]});el.displayName="BaseError";const Uh={display:"flex",flexDirection:"column",flex:1},tl=S.forwardRef((e,t)=>c.jsx("div",{ref:t,style:Uh,...e}));tl.displayName="BaseContainer";const Wh="pae-app:",nl=S.forwardRef(({appName:e,LoadingComponent:t=Ja,ErrorComponent:n=el,ContainerComponent:r=tl,...o},s)=>{const i=Bh(e);return c.jsxs(r,{ref:s,...o,id:`${Wh}${e}`,children:[i.isLoading&&c.jsx(t,{appName:e}),i.isBroken&&c.jsx(n,{appName:e})]})});nl.displayName="ModulePlaceHolder";const us=({operations:e,children:t,forbiddenContent:n})=>{var o;const{hasAccess:r}=Gn();if(!r(...e)){if(!n)return null;if(typeof n=="function")if((o=n==null?void 0:n.prototype)!=null&&o.isReactComponent){const s=n;return c.jsx(s,{operations:e})}else return n({operations:e});return S.isValidElement(n)?n:null}return t};us.displayName="Authorized";const Hh=({eventName:e,listener:t})=>(na(e,t),null),Vh=()=>c.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:c.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",d:"M8.737 8.737a21.49 21.49 0 0 1 3.308-2.724m0 0c3.063-2.026 5.99-2.641 7.331-1.3 1.827 1.828.026 6.591-4.023 10.64-4.049 4.049-8.812 5.85-10.64 4.023-1.33-1.33-.736-4.218 1.249-7.253m6.083-6.11c-3.063-2.026-5.99-2.641-7.331-1.3-1.827 1.828-.026 6.591 4.023 10.64m3.308-9.34a21.497 21.497 0 0 1 3.308 2.724m2.775 3.386c1.985 3.035 2.579 5.923 1.248 7.253-1.336 1.337-4.245.732-7.295-1.275M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})}),rl=({applicationName:e})=>{const t=Ki(e);if(t)if(typeof t=="function"){const n=t;return c.jsx(n,{})}else return t;return c.jsx(Vh,{})};rl.displayName="ApplicationIcon";const ol=()=>c.jsx("svg",{width:"28",height:"28",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M15.9998 29.3337C8.63584 29.3337 2.6665 23.3643 2.6665 16.0003C2.6665 8.63633 8.63584 2.66699 15.9998 2.66699C23.3638 2.66699 29.3332 8.63633 29.3332 16.0003C29.3332 23.3643 23.3638 29.3337 15.9998 29.3337ZM15.9998 26.667C18.8288 26.667 21.5419 25.5432 23.5423 23.5428C25.5427 21.5424 26.6665 18.8293 26.6665 16.0003C26.6665 13.1713 25.5427 10.4582 23.5423 8.45785C21.5419 6.45747 18.8288 5.33366 15.9998 5.33366C13.1709 5.33366 10.4578 6.45747 8.45736 8.45785C6.45698 10.4582 5.33317 13.1713 5.33317 16.0003C5.33317 18.8293 6.45698 21.5424 8.45736 23.5428C10.4578 25.5432 13.1709 26.667 15.9998 26.667ZM9.33317 20.427C12.2066 20.2205 14.9088 18.9833 16.9425 16.943C18.9828 14.9092 20.2201 12.2071 20.4265 9.33366C21.4117 9.99003 22.2389 10.8569 22.8486 11.8716C23.4582 12.8864 23.835 14.0239 23.9519 15.2019C24.0687 16.3799 23.9226 17.5692 23.5242 18.684C23.1257 19.7987 22.4849 20.8112 21.6478 21.6483C20.8107 22.4853 19.7982 23.1262 18.6835 23.5247C17.5687 23.9231 16.3795 24.0692 15.2014 23.9523C14.0234 23.8355 12.8859 23.4587 11.8712 22.8491C10.8564 22.2394 9.98954 21.4122 9.33317 20.427Z",fill:"currentColor"})});ol.displayName="DarkModeIcon";const sl=()=>c.jsx("svg",{width:"28",height:"28",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:"matrix(-1,1.2246467991473532e-16,-1.2246467991473532e-16,-1,0,0)",children:c.jsx("path",{d:"M15.9998 29.3337C8.63584 29.3337 2.6665 23.3643 2.6665 16.0003C2.6665 8.63633 8.63584 2.66699 15.9998 2.66699C23.3638 2.66699 29.3332 8.63633 29.3332 16.0003C29.3332 23.3643 23.3638 29.3337 15.9998 29.3337ZM15.9998 26.667C18.8288 26.667 21.5419 25.5432 23.5423 23.5428C25.5427 21.5424 26.6665 18.8293 26.6665 16.0003C26.6665 13.1713 25.5427 10.4582 23.5423 8.45785C21.5419 6.45747 18.8288 5.33366 15.9998 5.33366C13.1709 5.33366 10.4578 6.45747 8.45736 8.45785C6.45698 10.4582 5.33317 13.1713 5.33317 16.0003C5.33317 18.8293 6.45698 21.5424 8.45736 23.5428C10.4578 25.5432 13.1709 26.667 15.9998 26.667ZM9.33317 20.427C12.2066 20.2205 14.9088 18.9833 16.9425 16.943C18.9828 14.9092 20.2201 12.2071 20.4265 9.33366C21.4117 9.99003 22.2389 10.8569 22.8486 11.8716C23.4582 12.8864 23.835 14.0239 23.9519 15.2019C24.0687 16.3799 23.9226 17.5692 23.5242 18.684C23.1257 19.7987 22.4849 20.8112 21.6478 21.6483C20.8107 22.4853 19.7982 23.1262 18.6835 23.5247C17.5687 23.9231 16.3795 24.0692 15.2014 23.9523C14.0234 23.8355 12.8859 23.4587 11.8712 22.8491C10.8564 22.2394 9.98954 21.4122 9.33317 20.427Z",fill:"currentColor"})});sl.displayName="LightModeIcon";const ds={container:"container__zBqbk",expanded:"expanded__EbsIr",label:"label__cdMnm"};function il(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=il(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function L(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=il(e))&&(r&&(r+=" "),r+=t);return r}const zh=e=>e.toLowerCase().trim().split(" ").join("-"),Gh=e=>`${zh(e)}-theme`,al=()=>{const{platformName:e="Platform"}=ko(),t=Gh(e),[n,r]=S.useState(()=>{const s=localStorage.getItem(t);return s==="light"||s==="dark"?s:"light"}),o=s=>{localStorage.setItem(t,s),r(s)};return S.useEffect(()=>{document.documentElement.setAttribute("data-theme",n)},[n]),{theme:n,setTheme:o}},$r={spinner:"spinner__fakUN","spinner-rotation":"spinner-rotation__wUmPV",spinnerRotation:"spinner-rotation__wUmPV",button:"button__8FA9H","button--contained-primary":"button--contained-primary__stkTx",buttonContainedPrimary:"button--contained-primary__stkTx","button--outlined-primary":"button--outlined-primary__KZ1ww",buttonOutlinedPrimary:"button--outlined-primary__KZ1ww","button--text-primary":"button--text-primary__GLTfm",buttonTextPrimary:"button--text-primary__GLTfm","button--contained-danger":"button--contained-danger__L9ehT",buttonContainedDanger:"button--contained-danger__L9ehT","button--outlined-danger":"button--outlined-danger__eoYLd",buttonOutlinedDanger:"button--outlined-danger__eoYLd","button--text-danger":"button--text-danger__Sw-ha",buttonTextDanger:"button--text-danger__Sw-ha",icon:"icon__--umH"},Fr=S.forwardRef(({variant:e="contained",colorScheme:t="primary",loading:n=!1,IconComponent:r,className:o,children:s,...i},a)=>{const l=L($r.button,$r[`button--${e}-${t}`],o);return c.jsxs("button",{ref:a,className:l,...i,children:[n?c.jsx("div",{className:$r.spinner}):r&&c.jsx(r,{className:$r.icon}),s]})});Fr.displayName="Button";const Br={Badges:"Badges__5jpum",badges:"Badges__5jpum",Badge:"Badge__95MWM",badge:"Badge__95MWM","Badge--primary":"Badge--primary__Rx-bS",badgePrimary:"Badge--primary__Rx-bS","Badge--secondary":"Badge--secondary__d92bT",badgeSecondary:"Badge--secondary__d92bT","Badge--success":"Badge--success__Kdo98",badgeSuccess:"Badge--success__Kdo98","Badge--warning":"Badge--warning__bf-Nn",badgeWarning:"Badge--warning__bf-Nn","Badge--danger":"Badge--danger__HTj39",badgeDanger:"Badge--danger__HTj39","Badge--small":"Badge--small__y93Pj",badgeSmall:"Badge--small__y93Pj","Badge--regular":"Badge--regular__aT5AL",badgeRegular:"Badge--regular__aT5AL","Badge--large":"Badge--large__wORCH",badgeLarge:"Badge--large__wORCH"},fs={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const e in fs)Object.freeze(fs[e]);const ll=Object.freeze(fs);var cl={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function qh(e){var f,h;var t,n=[],r=1,o;if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),ll[e])n=ll[e].slice(),o="rgb";else if(e==="transparent")r=0,o="rgb",n=[0,0,0];else if(e[0]==="#"){var s=e.slice(1),i=s.length,a=i<=4;r=1,a?(n=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],i===4&&(r=parseInt(s[3]+s[3],16)/255)):(n=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],i===8&&(r=parseInt(s[6]+s[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),o="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var l=t[1];o=l.replace(/a$/,"");var u=o==="cmyk"?4:o==="gray"?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/),o==="color"&&(o=n.shift()),n=n.map(function(m,g){if(m[m.length-1]==="%")return m=parseFloat(m)/100,g===3?m:o==="rgb"?m*255:o[0]==="h"||o[0]==="l"&&!g?m*100:o==="lab"?m*125:o==="lch"?g<2?m*150:m*360:o[0]==="o"&&!g?m:o==="oklab"?m*.4:o==="oklch"?g<2?m*.4:m*360:m;if(o[g]==="h"||g===2&&o[o.length-1]==="h"){if(cl[m]!==void 0)return cl[m];if(m.endsWith("deg"))return parseFloat(m);if(m.endsWith("turn"))return parseFloat(m)*360;if(m.endsWith("grad"))return parseFloat(m)*360/400;if(m.endsWith("rad"))return parseFloat(m)*180/Math.PI}return m==="none"?0:parseFloat(m)}),r=n.length>u?n.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(n=e.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),o=((h=(f=e.match(/([a-z])/ig))==null?void 0:f.join(""))==null?void 0:h.toLowerCase())||"rgb");return{space:o,values:n,alpha:r}}const Kh=(e,t)=>{const{space:n,values:r}=qh(e);return n[0]==="h"?`${n}a(${r[0]}, ${r[1]}%, ${r[2]}%, ${t})`:`${n}a(${r}, ${t})`},ps=S.forwardRef(({children:e,color:t,className:n,customColor:r,size:o="small",style:s,...i},a)=>{const l=r?{color:r,background:Kh(r,.1)}:{},u=L(Br.Badge,Br[`Badge--${o}`],{[Br[`Badge--${t}`]]:!!t},n);return c.jsx("span",{ref:a,className:u,style:{...s,...l},...i,children:e})});ps.displayName="Badge";const hs=S.forwardRef(({children:e,className:t,...n},r)=>{const o=L(Br.Badges,t);return c.jsx("div",{ref:r,className:o,...n,children:e})});hs.displayName="Badges";const ul=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>c.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[c.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),c.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"})]}),dl=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>c.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[c.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),c.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),c.jsx("path",{d:"m9 12 2 2 4-4"})]}),Qh={CopyToClipboardButton:"CopyToClipboardButton__2Nd2m"},Yh=({content:e})=>{const[t,n]=Zh(),{notify:r}=Qo(),o=t?dl:ul,s=S.useCallback(async()=>{await n(e)&&r("Copied to the Clipboard !","success")},[e,r]);return c.jsx(o,{className:Qh.CopyToClipboardButton,size:18,onClick:s})},Zh=()=>{const[e,t]=S.useState(!1);return[e,async r=>{var o;try{return await((o=navigator==null?void 0:navigator.clipboard)==null?void 0:o.writeText(r)),t(!0),setTimeout(()=>t(!1),2e3),!0}catch(s){return console.error("Failed to copy text: ",s),!1}}]},fl={FieldGroup:"FieldGroup__Q2JCV",fieldGroup:"FieldGroup__Q2JCV","FieldGroup--horizontal":"FieldGroup--horizontal__kpfL1",fieldGroupHorizontal:"FieldGroup--horizontal__kpfL1","FieldGroup--vertical":"FieldGroup--vertical__FLo-Q",fieldGroupVertical:"FieldGroup--vertical__FLo-Q"},pl=S.forwardRef(({children:e,className:t,orientation:n="vertical",...r},o)=>{const s=L(fl.FieldGroup,fl[`FieldGroup--${n}`],t);return c.jsx("div",{ref:o,className:s,...r,children:e})});pl.displayName="FieldGroup";const hl={Input:"Input__uS0sb",Error:"Error__-DQpw"},Ur=S.forwardRef(({className:e,error:t,...n},r)=>{const o=L(hl.Input,t&&hl.Error,e);return c.jsx("input",{ref:r,className:o,...n})});Ur.displayName="Input";const Xh={Error:"Error__N4OP5"},ml=S.forwardRef(({children:e,className:t,...n},r)=>{const o=L(Xh.Error,t);return c.jsx("span",{ref:r,className:o,...n,children:e})});ml.displayName="InputError";const gl={Label:"Label__VYUvW",Error:"Error__Eu6DI"},vl=S.forwardRef(({children:e,className:t,error:n,...r},o)=>{const s=L(gl.Label,n&&gl.Error,t);return c.jsx("label",{ref:o,className:s,...r,children:e})});vl.displayName="Label";const ms={Select:"Select__giqpe",Chevron:"Chevron__YvhBd"},yl=S.forwardRef(({children:e,className:t,...n},r)=>{const o=L(ms.Option,t);return c.jsx("option",{ref:r,className:o,...n,children:e})});yl.displayName="Option";const gs=S.forwardRef(({children:e,className:t,...n},r)=>{const o=L(ms.Select,t);return c.jsxs("div",{className:o,children:[c.jsx("select",{ref:r,...n,children:e}),c.jsx("div",{className:ms.Chevron,children:c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M4 6L8 10L12 6",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});gs.displayName="Select",gs.Option=yl;function bl(e,[t,n]){return Math.min(n,Math.max(t,e))}function Z(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 Jh(e,t){const n=d.createContext(t),r=s=>{const{children:i,...a}=s,l=d.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Yn(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i),l=n.length;n=[...n,i];const u=h=>{var y;const{scope:m,children:g,...x}=h,p=((y=m==null?void 0:m[e])==null?void 0:y[l])||a,v=d.useMemo(()=>x,Object.values(x));return c.jsx(p.Provider,{value:v,children:g})};u.displayName=s+"Provider";function f(h,m){var p;const g=((p=m==null?void 0:m[e])==null?void 0:p[l])||a,x=d.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,em(o,...t)]}function em(...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(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const h=l(s)[`__scope${u}`];return{...a,...h}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function wl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=wl(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():wl(e[o],null)}}}}function ce(...e){return d.useCallback(pn(...e),e)}function _l(e){const t=tm(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(rm);if(l){const u=l.props.children,f=a.map(h=>h===l?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:h);return c.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function tm(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=sm(o),a=om(s,o.props);return o.type!==d.Fragment&&(a.ref=r?pn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nm=Symbol("radix.slottable");function rm(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nm}function om(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function sm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function im(e){const t=e+"CollectionProvider",[n,r]=Yn(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:v,children:y}=p,w=S.useRef(null),C=S.useRef(new Map).current;return c.jsx(o,{scope:v,itemMap:C,collectionRef:w,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=_l(a),u=S.forwardRef((p,v)=>{const{scope:y,children:w}=p,C=s(a,y),E=ce(v,C.collectionRef);return c.jsx(l,{ref:E,children:w})});u.displayName=a;const f=e+"CollectionItemSlot",h="data-radix-collection-item",m=_l(f),g=S.forwardRef((p,v)=>{const{scope:y,children:w,...C}=p,E=S.useRef(null),P=ce(v,E),A=s(f,y);return S.useEffect(()=>(A.itemMap.set(E,{ref:E,...C}),()=>void A.itemMap.delete(E))),c.jsx(m,{[h]:"",ref:P,children:w})});g.displayName=f;function x(p){const v=s(e+"CollectionConsumer",p);return S.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((A,R)=>C.indexOf(A.ref.current)-C.indexOf(R.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:g},x,r]}var am=d.createContext(void 0);function lm(e){const t=d.useContext(am);return e||t||"ltr"}function cm(e){const t=um(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(fm);if(l){const u=l.props.children,f=a.map(h=>h===l?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:h);return c.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function um(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=hm(o),a=pm(s,o.props);return o.type!==d.Fragment&&(a.ref=r?pn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dm=Symbol("radix.slottable");function fm(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dm}function pm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function hm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=mm.reduce((e,t)=>{const n=cm(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gm(e,t){e&&hr.flushSync(()=>e.dispatchEvent(t))}function qt(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function vm(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ym="DismissableLayer",vs="dismissableLayer.update",bm="dismissableLayer.pointerDownOutside",wm="dismissableLayer.focusOutside",xl,Cl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=d.useContext(Cl),[f,h]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),x=ce(t,R=>h(R)),p=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(v),w=f?p.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,P=Cm(R=>{const N=R.target,k=[...u.branches].some(D=>D.contains(N));!E||k||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},m),A=Sm(R=>{const N=R.target;[...u.branches].some(D=>D.contains(N))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},m);return vm(R=>{w===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xl=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Sl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xl)}},[f,m,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Sl())},[f,u]),d.useEffect(()=>{const R=()=>g({});return document.addEventListener(vs,R),()=>document.removeEventListener(vs,R)},[]),c.jsx(ie.div,{...l,ref:x,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,P.onPointerDownCapture)})});Wr.displayName=ym;var _m="DismissableLayerBranch",xm=d.forwardRef((e,t)=>{const n=d.useContext(Cl),r=d.useRef(null),o=ce(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(ie.div,{...e,ref:o})});xm.displayName=_m;function Cm(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){El(bm,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Sm(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e),r=d.useRef(!1);return d.useEffect(()=>{const o=s=>{s.target&&!r.current&&El(wm,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Sl(){const e=new CustomEvent(vs);document.dispatchEvent(e)}function El(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gm(o,s):o.dispatchEvent(s)}var ys=0;function Tl(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Pl()),document.body.insertAdjacentElement("beforeend",e[1]??Pl()),ys++,()=>{ys===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ys--}},[])}function Pl(){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 bs="focusScope.autoFocusOnMount",ws="focusScope.autoFocusOnUnmount",Al={bubbles:!1,cancelable:!0},Em="FocusScope",_s=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=d.useState(null),u=qt(o),f=qt(s),h=d.useRef(null),m=ce(t,p=>l(p)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let p=function(C){if(g.paused||!a)return;const E=C.target;a.contains(E)?h.current=E:_t(h.current,{select:!0})},v=function(C){if(g.paused||!a)return;const E=C.relatedTarget;E!==null&&(a.contains(E)||_t(h.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const P of C)P.removedNodes.length>0&&_t(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,g.paused]),d.useEffect(()=>{if(a){Il.add(g);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent(bs,Al);a.addEventListener(bs,u),a.dispatchEvent(y),y.defaultPrevented||(Tm(Im(Rl(a)),{select:!0}),document.activeElement===p&&_t(a))}return()=>{a.removeEventListener(bs,u),setTimeout(()=>{const y=new CustomEvent(ws,Al);a.addEventListener(ws,f),a.dispatchEvent(y),y.defaultPrevented||_t(p??document.body,{select:!0}),a.removeEventListener(ws,f),Il.remove(g)},0)}}},[a,u,f,g]);const x=d.useCallback(p=>{if(!n&&!r||g.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(v&&y){const w=p.currentTarget,[C,E]=Pm(w);C&&E?!p.shiftKey&&y===E?(p.preventDefault(),n&&_t(C,{select:!0})):p.shiftKey&&y===C&&(p.preventDefault(),n&&_t(E,{select:!0})):y===w&&p.preventDefault()}},[n,r,g.paused]);return c.jsx(ie.div,{tabIndex:-1,...i,ref:m,onKeyDown:x})});_s.displayName=Em;function Tm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_t(r,{select:t}),document.activeElement!==n)return}function Pm(e){const t=Rl(e),n=Ol(t,e),r=Ol(t.reverse(),e);return[n,r]}function Rl(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 Ol(e,t){for(const n of e)if(!Am(n,{upTo:t}))return n}function Am(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 Rm(e){return e instanceof HTMLInputElement&&"select"in e}function _t(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Rm(e)&&t&&e.select()}}var Il=Om();function Om(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jl(e,t),e.unshift(t)},remove(t){var n;e=jl(e,t),(n=e[0])==null||n.resume()}}}function jl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Im(e){return e.filter(t=>t.tagName!=="A")}var ve=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},jm=d[" useId ".trim().toString()]||(()=>{}),km=0;function Kt(e){const[t,n]=d.useState(jm());return ve(()=>{n(r=>r??String(km++))},[e]),e||(t?`radix-${t}`:"")}const Lm=["top","right","bottom","left"],xt=Math.min,Oe=Math.max,Hr=Math.round,Vr=Math.floor,qe=e=>({x:e,y:e}),Nm={left:"right",right:"left",bottom:"top",top:"bottom"},Dm={start:"end",end:"start"};function xs(e,t,n){return Oe(e,xt(t,n))}function lt(e,t){return typeof e=="function"?e(t):e}function ct(e){return e.split("-")[0]}function hn(e){return e.split("-")[1]}function Cs(e){return e==="x"?"y":"x"}function Ss(e){return e==="y"?"height":"width"}const Mm=new Set(["top","bottom"]);function Ke(e){return Mm.has(ct(e))?"y":"x"}function Es(e){return Cs(Ke(e))}function $m(e,t,n){n===void 0&&(n=!1);const r=hn(e),o=Es(e),s=Ss(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=zr(i)),[i,zr(i)]}function Fm(e){const t=zr(e);return[Ts(e),t,Ts(t)]}function Ts(e){return e.replace(/start|end/g,t=>Dm[t])}const kl=["left","right"],Ll=["right","left"],Bm=["top","bottom"],Um=["bottom","top"];function Wm(e,t,n){switch(e){case"top":case"bottom":return n?t?Ll:kl:t?kl:Ll;case"left":case"right":return t?Bm:Um;default:return[]}}function Hm(e,t,n,r){const o=hn(e);let s=Wm(ct(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ts)))),s}function zr(e){return e.replace(/left|right|bottom|top/g,t=>Nm[t])}function Vm(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nl(e){return typeof e!="number"?Vm(e):{top:e,right:e,bottom:e,left:e}}function Gr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Dl(e,t,n){let{reference:r,floating:o}=e;const s=Ke(t),i=Es(t),a=Ss(i),l=ct(t),u=s==="y",f=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let g;switch(l){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-o.width,y:h};break;default:g={x:r.x,y:r.y}}switch(hn(t)){case"start":g[i]-=m*(n&&u?-1:1);break;case"end":g[i]+=m*(n&&u?-1:1);break}return g}async function zm(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=lt(t,e),x=Nl(g),v=a[m?h==="floating"?"reference":"floating":h],y=Gr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=h==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},P=Gr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:C,strategy:l}):w);return{top:(y.top-P.top+x.top)/E.y,bottom:(P.bottom-y.bottom+x.bottom)/E.y,left:(y.left-P.left+x.left)/E.x,right:(P.right-y.right+x.right)/E.x}}const Gm=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=Dl(u,r,l),m=r,g={},x=0;for(let v=0;v<a.length;v++){var p;const{name:y,fn:w}=a[v],{x:C,y:E,data:P,reset:A}=await w({x:f,y:h,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:u,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:zm},elements:{reference:e,floating:t}});f=C??f,h=E??h,g={...g,[y]:{...g[y],...P}},A&&x<=50&&(x++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(u=A.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:f,y:h}=Dl(u,m,l)),v=-1)}return{x:f,y:h,placement:m,strategy:o,middlewareData:g}},qm=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=lt(e,t)||{};if(u==null)return{};const h=Nl(f),m={x:n,y:r},g=Es(o),x=Ss(g),p=await i.getDimensions(u),v=g==="y",y=v?"top":"left",w=v?"bottom":"right",C=v?"clientHeight":"clientWidth",E=s.reference[x]+s.reference[g]-m[g]-s.floating[x],P=m[g]-s.reference[g],A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let R=A?A[C]:0;(!R||!await(i.isElement==null?void 0:i.isElement(A)))&&(R=a.floating[C]||s.floating[x]);const N=E/2-P/2,k=R/2-p[x]/2-1,D=xt(h[y],k),U=xt(h[w],k),W=D,H=R-p[x]-U,z=R/2-p[x]/2+N,oe=xs(W,z,H),G=!l.arrow&&hn(o)!=null&&z!==oe&&s.reference[x]/2-(z<W?D:U)-p[x]/2<0,Y=G?z<W?z-W:z-H:0;return{[g]:m[g]+Y,data:{[g]:oe,centerOffset:z-oe-Y,...G&&{alignmentOffset:Y}},reset:G}}}),Km=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:p=!0,...v}=lt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=ct(o),w=Ke(a),C=ct(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=m||(C||!p?[zr(a)]:Fm(a)),A=x!=="none";!m&&A&&P.push(...Hm(a,p,x,E));const R=[a,...P],N=await l.detectOverflow(t,v),k=[];let D=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&k.push(N[y]),h){const z=$m(o,i,E);k.push(N[z[0]],N[z[1]])}if(D=[...D,{placement:o,overflows:k}],!k.every(z=>z<=0)){var U,W;const z=(((U=s.flip)==null?void 0:U.index)||0)+1,oe=R[z];if(oe&&(!(h==="alignment"?w!==Ke(oe):!1)||D.every(F=>Ke(F.placement)===w?F.overflows[0]>0:!0)))return{data:{index:z,overflows:D},reset:{placement:oe}};let G=(W=D.filter(Y=>Y.overflows[0]<=0).sort((Y,F)=>Y.overflows[1]-F.overflows[1])[0])==null?void 0:W.placement;if(!G)switch(g){case"bestFit":{var H;const Y=(H=D.filter(F=>{if(A){const se=Ke(F.placement);return se===w||se==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(se=>se>0).reduce((se,ge)=>se+ge,0)]).sort((F,se)=>F[1]-se[1])[0])==null?void 0:H[0];Y&&(G=Y);break}case"initialPlacement":G=a;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function Ml(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $l(e){return Lm.some(t=>e[t]>=0)}const Qm=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=lt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Ml(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:$l(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Ml(i,n.floating);return{data:{escapedOffsets:a,escaped:$l(a)}}}default:return{}}}}},Fl=new Set(["left","top"]);async function Ym(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ct(n),a=hn(n),l=Ke(n)==="y",u=Fl.has(i)?-1:1,f=s&&l?-1:1,h=lt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof x=="number"&&(g=a==="end"?x*-1:x),l?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const Zm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Ym(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Xm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:w,y:C}=y;return{x:w,y:C}}},...u}=lt(e,t),f={x:n,y:r},h=await s.detectOverflow(t,u),m=Ke(ct(o)),g=Cs(m);let x=f[g],p=f[m];if(i){const y=g==="y"?"top":"left",w=g==="y"?"bottom":"right",C=x+h[y],E=x-h[w];x=xs(C,x,E)}if(a){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",C=p+h[y],E=p-h[w];p=xs(C,p,E)}const v=l.fn({...t,[g]:x,[m]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[g]:i,[m]:a}}}}}},Jm=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=lt(e,t),f={x:n,y:r},h=Ke(o),m=Cs(h);let g=f[m],x=f[h];const p=lt(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const C=m==="y"?"height":"width",E=s.reference[m]-s.floating[C]+v.mainAxis,P=s.reference[m]+s.reference[C]-v.mainAxis;g<E?g=E:g>P&&(g=P)}if(u){var y,w;const C=m==="y"?"width":"height",E=Fl.has(ct(o)),P=s.reference[h]-s.floating[C]+(E&&((y=i.offset)==null?void 0:y[h])||0)+(E?0:v.crossAxis),A=s.reference[h]+s.reference[C]+(E?0:((w=i.offset)==null?void 0:w[h])||0)-(E?v.crossAxis:0);x<P?x=P:x>A&&(x=A)}return{[m]:g,[h]:x}}}},e1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=lt(e,t),f=await i.detectOverflow(t,u),h=ct(o),m=hn(o),g=Ke(o)==="y",{width:x,height:p}=s.floating;let v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");const w=p-f.top-f.bottom,C=x-f.left-f.right,E=xt(p-f[v],w),P=xt(x-f[y],C),A=!t.middlewareData.shift;let R=E,N=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=w),A&&!m){const D=Oe(f.left,0),U=Oe(f.right,0),W=Oe(f.top,0),H=Oe(f.bottom,0);g?N=x-2*(D!==0||U!==0?D+U:Oe(f.left,f.right)):R=p-2*(W!==0||H!==0?W+H:Oe(f.top,f.bottom))}await l({...t,availableWidth:N,availableHeight:R});const k=await i.getDimensions(a.floating);return x!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}};function qr(){return typeof window<"u"}function mn(e){return Bl(e)?(e.nodeName||"").toLowerCase():"#document"}function Ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qe(e){var t;return(t=(Bl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bl(e){return qr()?e instanceof Node||e instanceof Ie(e).Node:!1}function Me(e){return qr()?e instanceof Element||e instanceof Ie(e).Element:!1}function Ye(e){return qr()?e instanceof HTMLElement||e instanceof Ie(e).HTMLElement:!1}function Ul(e){return!qr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ie(e).ShadowRoot}const t1=new Set(["inline","contents"]);function Zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=$e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!t1.has(o)}const n1=new Set(["table","td","th"]);function r1(e){return n1.has(mn(e))}const o1=[":popover-open",":modal"];function Kr(e){return o1.some(t=>{try{return e.matches(t)}catch{return!1}})}const s1=["transform","translate","scale","rotate","perspective"],i1=["transform","translate","scale","rotate","perspective","filter"],a1=["paint","layout","strict","content"];function Ps(e){const t=As(),n=Me(e)?$e(e):e;return s1.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||i1.some(r=>(n.willChange||"").includes(r))||a1.some(r=>(n.contain||"").includes(r))}function l1(e){let t=Ct(e);for(;Ye(t)&&!gn(t);){if(Ps(t))return t;if(Kr(t))return null;t=Ct(t)}return null}function As(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const c1=new Set(["html","body","#document"]);function gn(e){return c1.has(mn(e))}function $e(e){return Ie(e).getComputedStyle(e)}function Qr(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ct(e){if(mn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ul(e)&&e.host||Qe(e);return Ul(t)?t.host:t}function Wl(e){const t=Ct(e);return gn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&Zn(t)?t:Wl(t)}function Xn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wl(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ie(o);if(s){const a=Rs(i);return t.concat(i,i.visualViewport||[],Zn(o)?o:[],a&&n?Xn(a):[])}return t.concat(o,Xn(o,[],n))}function Rs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Hl(e){const t=$e(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ye(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Hr(n)!==s||Hr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Os(e){return Me(e)?e:e.contextElement}function vn(e){const t=Os(e);if(!Ye(t))return qe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Hl(t);let i=(s?Hr(n.width):n.width)/r,a=(s?Hr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const u1=qe(0);function Vl(e){const t=Ie(e);return!As()||!t.visualViewport?u1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function d1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ie(e)?!1:t}function Qt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Os(e);let i=qe(1);t&&(r?Me(r)&&(i=vn(r)):i=vn(e));const a=d1(s,n,r)?Vl(s):qe(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,f=o.width/i.x,h=o.height/i.y;if(s){const m=Ie(s),g=r&&Me(r)?Ie(r):r;let x=m,p=Rs(x);for(;p&&r&&g!==x;){const v=vn(p),y=p.getBoundingClientRect(),w=$e(p),C=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*v.x,E=y.top+(p.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,h*=v.y,l+=C,u+=E,x=Ie(p),p=Rs(x)}}return Gr({width:f,height:h,x:l,y:u})}function Yr(e,t){const n=Qr(e).scrollLeft;return t?t.left+n:Qt(Qe(e)).left+n}function zl(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Yr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function f1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Qe(r),a=t?Kr(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=qe(1);const f=qe(0),h=Ye(r);if((h||!h&&!s)&&((mn(r)!=="body"||Zn(i))&&(l=Qr(r)),Ye(r))){const g=Qt(r);u=vn(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=i&&!h&&!s?zl(i,l):qe(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-l.scrollTop*u.y+f.y+m.y}}function p1(e){return Array.from(e.getClientRects())}function h1(e){const t=Qe(e),n=Qr(e),r=e.ownerDocument.body,o=Oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Yr(e);const a=-n.scrollTop;return $e(r).direction==="rtl"&&(i+=Oe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Gl=25;function m1(e,t){const n=Ie(e),r=Qe(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const f=As();(!f||f&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Yr(r);if(u<=0){const f=r.ownerDocument,h=f.body,m=getComputedStyle(h),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(r.clientWidth-h.clientWidth-g);x<=Gl&&(s-=x)}else u<=Gl&&(s+=u);return{width:s,height:i,x:a,y:l}}const g1=new Set(["absolute","fixed"]);function v1(e,t){const n=Qt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ye(e)?vn(e):qe(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function ql(e,t,n){let r;if(t==="viewport")r=m1(e,n);else if(t==="document")r=h1(Qe(e));else if(Me(t))r=v1(t,n);else{const o=Vl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gr(r)}function Kl(e,t){const n=Ct(e);return n===t||!Me(n)||gn(n)?!1:$e(n).position==="fixed"||Kl(n,t)}function y1(e,t){const n=t.get(e);if(n)return n;let r=Xn(e,[],!1).filter(a=>Me(a)&&mn(a)!=="body"),o=null;const s=$e(e).position==="fixed";let i=s?Ct(e):e;for(;Me(i)&&!gn(i);){const a=$e(i),l=Ps(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&g1.has(o.position)||Zn(i)&&!l&&Kl(e,i))?r=r.filter(f=>f!==i):o=a,i=Ct(i)}return t.set(e,r),r}function b1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Kr(t)?[]:y1(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,f)=>{const h=ql(t,f,o);return u.top=Oe(h.top,u.top),u.right=xt(h.right,u.right),u.bottom=xt(h.bottom,u.bottom),u.left=Oe(h.left,u.left),u},ql(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function w1(e){const{width:t,height:n}=Hl(e);return{width:t,height:n}}function _1(e,t,n){const r=Ye(t),o=Qe(t),s=n==="fixed",i=Qt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=qe(0);function u(){l.x=Yr(o)}if(r||!r&&!s)if((mn(t)!=="body"||Zn(o))&&(a=Qr(t)),r){const g=Qt(t,!0,s,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?zl(o,a):qe(0),h=i.left+a.scrollLeft-l.x-f.x,m=i.top+a.scrollTop-l.y-f.y;return{x:h,y:m,width:i.width,height:i.height}}function Is(e){return $e(e).position==="static"}function Ql(e,t){if(!Ye(e)||$e(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qe(e)===n&&(n=n.ownerDocument.body),n}function Yl(e,t){const n=Ie(e);if(Kr(e))return n;if(!Ye(e)){let o=Ct(e);for(;o&&!gn(o);){if(Me(o)&&!Is(o))return o;o=Ct(o)}return n}let r=Ql(e,t);for(;r&&r1(r)&&Is(r);)r=Ql(r,t);return r&&gn(r)&&Is(r)&&!Ps(r)?n:r||l1(e)||n}const x1=async function(e){const t=this.getOffsetParent||Yl,n=this.getDimensions,r=await n(e.floating);return{reference:_1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function C1(e){return $e(e).direction==="rtl"}const S1={convertOffsetParentRelativeRectToViewportRelativeRect:f1,getDocumentElement:Qe,getClippingRect:b1,getOffsetParent:Yl,getElementRects:x1,getClientRects:p1,getDimensions:w1,getScale:vn,isElement:Me,isRTL:C1};function Zl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function E1(e,t){let n=null,r;const o=Qe(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:f,top:h,width:m,height:g}=u;if(a||t(),!m||!g)return;const x=Vr(h),p=Vr(o.clientWidth-(f+m)),v=Vr(o.clientHeight-(h+g)),y=Vr(f),C={rootMargin:-x+"px "+-p+"px "+-v+"px "+-y+"px",threshold:Oe(0,xt(1,l))||1};let E=!0;function P(A){const R=A[0].intersectionRatio;if(R!==l){if(!E)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!Zl(u,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(P,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,C)}n.observe(e)}return i(!0),s}function T1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Os(e),f=o||s?[...u?Xn(u):[],...Xn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const h=u&&a?E1(u,n):null;let m=-1,g=null;i&&(g=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),u&&!l&&g.observe(u),g.observe(t));let x,p=l?Qt(e):null;l&&v();function v(){const y=Qt(e);p&&!Zl(p,y)&&n(),p=y,x=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),h==null||h(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(x)}}const P1=Zm,A1=Xm,R1=Km,O1=e1,I1=Qm,Xl=qm,j1=Jm,k1=(e,t,n)=>{const r=new Map,o={platform:S1,...n},s={...o.platform,_c:r};return Gm(e,t,{...o,platform:s})};var L1=typeof document<"u",N1=function(){},Zr=L1?S.useLayoutEffect:N1;function Xr(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(!Xr(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Xr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Jl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ec(e,t){const n=Jl(e);return Math.round(t*n)/n}function js(e){const t=d.useRef(e);return Zr(()=>{t.current=e}),t}function D1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,h]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(r);Xr(m,r)||g(r);const[x,p]=d.useState(null),[v,y]=d.useState(null),w=d.useCallback(F=>{F!==A.current&&(A.current=F,p(F))},[]),C=d.useCallback(F=>{F!==R.current&&(R.current=F,y(F))},[]),E=s||x,P=i||v,A=d.useRef(null),R=d.useRef(null),N=d.useRef(f),k=l!=null,D=js(l),U=js(o),W=js(u),H=d.useCallback(()=>{if(!A.current||!R.current)return;const F={placement:t,strategy:n,middleware:m};U.current&&(F.platform=U.current),k1(A.current,R.current,F).then(se=>{const ge={...se,isPositioned:W.current!==!1};z.current&&!Xr(N.current,ge)&&(N.current=ge,hr.flushSync(()=>{h(ge)}))})},[m,t,n,U,W]);Zr(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(F=>({...F,isPositioned:!1})))},[u]);const z=d.useRef(!1);Zr(()=>(z.current=!0,()=>{z.current=!1}),[]),Zr(()=>{if(E&&(A.current=E),P&&(R.current=P),E&&P){if(D.current)return D.current(E,P,H);H()}},[E,P,H,D,k]);const oe=d.useMemo(()=>({reference:A,floating:R,setReference:w,setFloating:C}),[w,C]),G=d.useMemo(()=>({reference:E,floating:P}),[E,P]),Y=d.useMemo(()=>{const F={position:n,left:0,top:0};if(!G.floating)return F;const se=ec(G.floating,f.x),ge=ec(G.floating,f.y);return a?{...F,transform:"translate("+se+"px, "+ge+"px)",...Jl(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:ge}},[n,a,G.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:H,refs:oe,elements:G,floatingStyles:Y}),[f,H,oe,G,Y])}const M1=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?Xl({element:r.current,padding:o}).fn(n):{}:r?Xl({element:r,padding:o}).fn(n):{}}}},$1=(e,t)=>({...P1(e),options:[e,t]}),F1=(e,t)=>({...A1(e),options:[e,t]}),B1=(e,t)=>({...j1(e),options:[e,t]}),U1=(e,t)=>({...R1(e),options:[e,t]}),W1=(e,t)=>({...O1(e),options:[e,t]}),H1=(e,t)=>({...I1(e),options:[e,t]}),V1=(e,t)=>({...M1(e),options:[e,t]});var z1="Arrow",tc=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});tc.displayName=z1;var G1=tc;function q1(e){const[t,n]=d.useState(void 0);return ve(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ks="Popper",[nc,Jr]=Yn(ks),[K1,rc]=nc(ks),oc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return c.jsx(K1,{scope:t,anchor:r,onAnchorChange:o,children:n})};oc.displayName=ks;var sc="PopperAnchor",ic=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=rc(sc,n),i=d.useRef(null),a=ce(t,i),l=d.useRef(null);return d.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||i.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:c.jsx(ie.div,{...o,ref:a})});ic.displayName=sc;var Ls="PopperContent",[Q1,Y1]=nc(Ls),ac=d.forwardRef((e,t)=>{var $,te,fe,X,ne,J;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:x,...p}=e,v=rc(Ls,n),[y,w]=d.useState(null),C=ce(t,Ce=>w(Ce)),[E,P]=d.useState(null),A=q1(E),R=(A==null?void 0:A.width)??0,N=(A==null?void 0:A.height)??0,k=r+(s!=="center"?"-"+s:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},U=Array.isArray(u)?u:[u],W=U.length>0,H={padding:D,boundary:U.filter(X1),altBoundary:W},{refs:z,floatingStyles:oe,placement:G,isPositioned:Y,middlewareData:F}=D1({strategy:"fixed",placement:k,whileElementsMounted:(...Ce)=>T1(...Ce,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[$1({mainAxis:o+N,alignmentAxis:i}),l&&F1({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?B1():void 0,...H}),l&&U1({...H}),W1({...H,apply:({elements:Ce,rects:Le,availableWidth:ot,availableHeight:ze})=>{const{width:Bt,height:To}=Le.reference,ht=Ce.floating.style;ht.setProperty("--radix-popper-available-width",`${ot}px`),ht.setProperty("--radix-popper-available-height",`${ze}px`),ht.setProperty("--radix-popper-anchor-width",`${Bt}px`),ht.setProperty("--radix-popper-anchor-height",`${To}px`)}}),E&&V1({element:E,padding:a}),J1({arrowWidth:R,arrowHeight:N}),m&&H1({strategy:"referenceHidden",...H})]}),[se,ge]=uc(G),ke=qt(x);ve(()=>{Y&&(ke==null||ke())},[Y,ke]);const Mt=($=F.arrow)==null?void 0:$.x,$t=(te=F.arrow)==null?void 0:te.y,rt=((fe=F.arrow)==null?void 0:fe.centerOffset)!==0,[Ft,Ve]=d.useState();return ve(()=>{y&&Ve(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:Y?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ft,"--radix-popper-transform-origin":[(X=F.transformOrigin)==null?void 0:X.x,(ne=F.transformOrigin)==null?void 0:ne.y].join(" "),...((J=F.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Q1,{scope:n,placedSide:se,onArrowChange:P,arrowX:Mt,arrowY:$t,shouldHideArrow:rt,children:c.jsx(ie.div,{"data-side":se,"data-align":ge,...p,ref:C,style:{...p.style,animation:Y?void 0:"none"}})})})});ac.displayName=Ls;var lc="PopperArrow",Z1={top:"bottom",right:"left",bottom:"top",left:"right"},cc=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Y1(lc,r),i=Z1[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(G1,{...o,ref:n,style:{...o.style,display:"block"}})})});cc.displayName=lc;function X1(e){return e!==null}var J1=e=>({name:"transformOrigin",options:e,fn(t){var v,y,w;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=uc(n),h={start:"0%",center:"50%",end:"100%"}[f],m=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let x="",p="";return u==="bottom"?(x=i?h:`${m}px`,p=`${-l}px`):u==="top"?(x=i?h:`${m}px`,p=`${r.floating.height+l}px`):u==="right"?(x=`${-l}px`,p=i?h:`${g}px`):u==="left"&&(x=`${r.floating.width+l}px`,p=i?h:`${g}px`),{data:{x,y:p}}}});function uc(e){const[t,n="center"]=e.split("-");return[t,n]}var dc=oc,fc=ic,pc=ac,hc=cc,eg="Portal",Ns=d.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=d.useState(!1);ve(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Wt.createPortal(c.jsx(ie.div,{...r,ref:t}),i):null});Ns.displayName=eg;function tg(e){const t=ng(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(og);if(l){const u=l.props.children,f=a.map(h=>h===l?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:h);return c.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return c.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ng(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=ig(o),a=sg(s,o.props);return o.type!==d.Fragment&&(a.ref=r?pn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rg=Symbol("radix.slottable");function og(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rg}function sg(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ig(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ag=d[" useInsertionEffect ".trim().toString()]||ve;function eo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=lg({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const h=f.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const u=d.useCallback(f=>{var h;if(a){const m=cg(f)?f(e):f;m!==e&&((h=i.current)==null||h.call(i,m))}else s(f)},[a,e,s,i]);return[l,u]}function lg({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return ag(()=>{s.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function cg(e){return typeof e=="function"}function ug(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var mc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dg="VisuallyHidden",gc=d.forwardRef((e,t)=>c.jsx(ie.span,{...e,ref:t,style:{...mc,...e.style}}));gc.displayName=dg;var fg=gc,pg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yn=new WeakMap,to=new WeakMap,no={},Ds=0,vc=function(e){return e&&(e.host||vc(e.parentNode))},hg=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mg=function(e,t,n,r){var o=hg(t,Array.isArray(e)?e:[e]);no[n]||(no[n]=new WeakMap);var s=no[n],i=[],a=new Set,l=new Set(o),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};o.forEach(u);var f=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(m){if(a.has(m))f(m);else try{var g=m.getAttribute(r),x=g!==null&&g!=="false",p=(yn.get(m)||0)+1,v=(s.get(m)||0)+1;yn.set(m,p),s.set(m,v),i.push(m),p===1&&x&&to.set(m,!0),v===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),a.clear(),Ds++,function(){i.forEach(function(h){var m=yn.get(h)-1,g=s.get(h)-1;yn.set(h,m),s.set(h,g),m||(to.has(h)||h.removeAttribute(r),to.delete(h)),g||h.removeAttribute(n)}),Ds--,Ds||(yn=new WeakMap,yn=new WeakMap,to=new WeakMap,no={})}},yc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=pg(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),mg(r,o,n,"aria-hidden")):function(){return null}},ro="right-scroll-bar-position",oo="width-before-scroll-bar",gg="with-scroll-bars-hidden",vg="--removed-body-scroll-bar-size";function Ms(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yg(e,t){var n=S.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}var bg=typeof window<"u"?d.useLayoutEffect:d.useEffect,bc=new WeakMap;function wg(e,t){var n=yg(null,function(r){return e.forEach(function(o){return Ms(o,r)})});return bg(function(){var r=bc.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Ms(a,null)}),s.forEach(function(a){o.has(a)||Ms(a,i)})}bc.set(n,e)},[e]),n}function _g(e){return e}function xg(e,t){t===void 0&&(t=_g);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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Cg(e){e===void 0&&(e={});var t=xg(null);return t.options=Ge({async:!0,ssr:!1},e),t}var wc=function(e){var t=e.sideCar,n=sa(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 d.createElement(r,Ge({},n))};wc.isSideCarExport=!0;function Sg(e,t){return e.useMedium(t),wc}var _c=Cg(),$s=function(){},so=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:$s,onWheelCapture:$s,onTouchMoveCapture:$s}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,h=e.shards,m=e.sideCar,g=e.noRelative,x=e.noIsolation,p=e.inert,v=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,C=e.gapMode,E=sa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=m,A=wg([n,t]),R=Ge(Ge({},E),o);return d.createElement(d.Fragment,null,f&&d.createElement(P,{sideCar:_c,removeScrollBar:u,shards:h,noRelative:g,noIsolation:x,inert:p,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:C}),i?d.cloneElement(d.Children.only(a),Ge(Ge({},R),{ref:A})):d.createElement(w,Ge({},R,{className:l,ref:A}),a))});so.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},so.classNames={fullWidth:oo,zeroRight:ro};var Eg=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tg(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Eg();return t&&e.setAttribute("nonce",t),e}function Pg(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ag(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rg=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Tg())&&(Pg(t,n),Ag(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Og=function(){var e=Rg();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xc=function(){var e=Og(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ig={left:0,top:0,right:0,gap:0},Fs=function(e){return parseInt(e||"",10)||0},jg=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Fs(n),Fs(r),Fs(o)]},kg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ig;var t=jg(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Lg=xc(),bn="data-scroll-locked",Ng=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
210
210
|
.`.concat(gg,` {
|
|
211
211
|
overflow: hidden `).concat(r,`;
|
|
212
212
|
padding-right: `).concat(a,"px ").concat(r,`;
|