auto-post-marketplace-facebook/releases/auto-post-facebook-extensio.../assets/popup-BFoNDe_Q.js

178 lines
493 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{g as jh,u as nE}from"./base64-BbJB1hmJ.js";import{p as wn}from"./product-api.service-DR0CE0o9.js";import{a as rE,r as aE}from"./app-C7VSS-q9.js";function sE(t,r){for(var s=0;s<r.length;s++){const i=r[s];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in t)){const c=Object.getOwnPropertyDescriptor(i,l);c&&Object.defineProperty(t,l,c.get?c:{enumerable:!0,get:()=>i[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var kd={exports:{}},fo={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var gy;function iE(){if(gy)return fo;gy=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(i,l,c){var f=null;if(c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),"key"in l){c={};for(var h in l)h!=="key"&&(c[h]=l[h])}else c=l;return l=c.ref,{$$typeof:t,type:i,key:f,ref:l!==void 0?l:null,props:c}}return fo.Fragment=r,fo.jsx=s,fo.jsxs=s,fo}var yy;function oE(){return yy||(yy=1,kd.exports=iE()),kd.exports}var g=oE(),oi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Za=typeof window>"u"||"Deno"in globalThis;function It(){}function lE(t,r){return typeof t=="function"?t(r):t}function nh(t){return typeof t=="number"&&t>=0&&t!==1/0}function Bb(t,r){return Math.max(t+(r||0)-Date.now(),0)}function ca(t,r){return typeof t=="function"?t(r):t}function En(t,r){return typeof t=="function"?t(r):t}function by(t,r){const{type:s="all",exact:i,fetchStatus:l,predicate:c,queryKey:f,stale:h}=t;if(f){if(i){if(r.queryHash!==kh(f,r.options))return!1}else if(!So(r.queryKey,f))return!1}if(s!=="all"){const m=r.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||l&&l!==r.state.fetchStatus||c&&!c(r))}function xy(t,r){const{exact:s,status:i,predicate:l,mutationKey:c}=t;if(c){if(!r.options.mutationKey)return!1;if(s){if(Ya(r.options.mutationKey)!==Ya(c))return!1}else if(!So(r.options.mutationKey,c))return!1}return!(i&&r.state.status!==i||l&&!l(r))}function kh(t,r){return(r?.queryKeyHashFn||Ya)(t)}function Ya(t){return JSON.stringify(t,(r,s)=>rh(s)?Object.keys(s).sort().reduce((i,l)=>(i[l]=s[l],i),{}):s)}function So(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?Object.keys(r).every(s=>So(t[s],r[s])):!1}function Hb(t,r){if(t===r)return t;const s=Sy(t)&&Sy(r);if(s||rh(t)&&rh(r)){const i=s?t:Object.keys(t),l=i.length,c=s?r:Object.keys(r),f=c.length,h=s?[]:{},m=new Set(i);let p=0;for(let v=0;v<f;v++){const x=s?v:c[v];(!s&&m.has(x)||s)&&t[x]===void 0&&r[x]===void 0?(h[x]=void 0,p++):(h[x]=Hb(t[x],r[x]),h[x]===t[x]&&t[x]!==void 0&&p++)}return l===f&&p===l?t:h}return r}function Tc(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const s in t)if(t[s]!==r[s])return!1;return!0}function Sy(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function rh(t){if(!_y(t))return!1;const r=t.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!_y(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function _y(t){return Object.prototype.toString.call(t)==="[object Object]"}function cE(t){return new Promise(r=>{setTimeout(r,t)})}function ah(t,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,r):s.structuralSharing!==!1?Hb(t,r):r}function uE(t,r,s=0){const i=[...t,r];return s&&i.length>s?i.slice(1):i}function fE(t,r,s=0){const i=[r,...t];return s&&i.length>s?i.slice(0,-1):i}var zh=Symbol();function qb(t,r){return!t.queryFn&&r?.initialPromise?()=>r.initialPromise:!t.queryFn||t.queryFn===zh?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Gb(t,r){return typeof t=="function"?t(...r):!!t}var dE=class extends oi{#t;#e;#n;constructor(){super(),this.#n=t=>{if(!Za&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Uh=new dE,hE=class extends oi{#t=!0;#e;#n;constructor(){super(),this.#n=t=>{if(!Za&&window.addEventListener){const r=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#t}},Ac=new hE;function sh(){let t,r;const s=new Promise((l,c)=>{t=l,r=c});s.status="pending",s.catch(()=>{});function i(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{i({status:"fulfilled",value:l}),t(l)},s.reject=l=>{i({status:"rejected",reason:l}),r(l)},s}function mE(t){return Math.min(1e3*2**t,3e4)}function Fb(t){return(t??"online")==="online"?Ac.isOnline():!0}var Ib=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Zb(t){let r=!1,s=0,i;const l=sh(),c=()=>l.status!=="pending",f=w=>{c()||(_(new Ib(w)),t.abort?.())},h=()=>{r=!0},m=()=>{r=!1},p=()=>Uh.isFocused()&&(t.networkMode==="always"||Ac.isOnline())&&t.canRun(),v=()=>Fb(t.networkMode)&&t.canRun(),x=w=>{c()||(i?.(),l.resolve(w))},_=w=>{c()||(i?.(),l.reject(w))},E=()=>new Promise(w=>{i=C=>{(c()||p())&&w(C)},t.onPause?.()}).then(()=>{i=void 0,c()||t.onContinue?.()}),R=()=>{if(c())return;let w;const C=s===0?t.initialPromise:void 0;try{w=C??t.fn()}catch(z){w=Promise.reject(z)}Promise.resolve(w).then(x).catch(z=>{if(c())return;const O=t.retry??(Za?0:3),U=t.retryDelay??mE,k=typeof U=="function"?U(s,z):U,M=O===!0||typeof O=="number"&&s<O||typeof O=="function"&&O(s,z);if(r||!M){_(z);return}s++,t.onFail?.(s,z),cE(k).then(()=>p()?void 0:E()).then(()=>{r?_(z):R()})})};return{promise:l,status:()=>l.status,cancel:f,continue:()=>(i?.(),l),cancelRetry:h,continueRetry:m,canStart:v,start:()=>(v()?R():E().then(R),l)}}var pE=t=>setTimeout(t,0);function vE(){let t=[],r=0,s=h=>{h()},i=h=>{h()},l=pE;const c=h=>{r?t.push(h):l(()=>{s(h)})},f=()=>{const h=t;t=[],h.length&&l(()=>{i(()=>{h.forEach(m=>{s(m)})})})};return{batch:h=>{let m;r++;try{m=h()}finally{r--,r||f()}return m},batchCalls:h=>(...m)=>{c(()=>{h(...m)})},schedule:c,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{l=h}}}var Tt=vE(),Yb=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nh(this.gcTime)&&(this.#t=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Za?1/0:300*1e3))}clearGcTimeout(){this.#t&&(clearTimeout(this.#t),this.#t=void 0)}},gE=class extends Yb{#t;#e;#n;#r;#a;#i;#o;constructor(t){super(),this.#o=!1,this.#i=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#n=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=yE(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(t){this.options={...this.#i,...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,r){const s=ah(this.state.data,t,this.options);return this.#s({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(t,r){this.#s({type:"setState",state:t,setStateOptions:r})}cancel(t){const r=this.#a?.promise;return this.#a?.cancel(t),r?r.then(It).catch(It):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>En(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ca(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:!Bb(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.#a&&(this.#o?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,r){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},l=()=>{const h=qb(this.options,r),p=(()=>{const v={client:this.#r,queryKey:this.queryKey,meta:this.meta};return i(v),v})();return this.#o=!1,this.options.persister?this.options.persister(h,p,this):h(p)},f=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:l};return i(h),h})();this.options.behavior?.onFetch(f,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.meta)&&this.#s({type:"fetch",meta:f.fetchOptions?.meta}),this.#a=Zb({initialPromise:r?.initialPromise,fn:f.fetchFn,abort:s.abort.bind(s),onFail:(h,m)=>{this.#s({type:"failed",failureCount:h,error:m})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0});try{const h=await this.#a.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Ib){if(h.silent)return this.#a.promise;if(h.revert){if(this.setState({...this.#e,fetchStatus:"idle"}),this.state.data===void 0)throw h;return this.state.data}}throw this.#s({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#s(t){const r=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Qb(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?i:void 0,i;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=r(this.state),Tt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Qb(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fb(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function yE(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,s=r!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var bE=class extends oi{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,r,s){const i=r.queryKey,l=r.queryHash??kh(i,r);let c=this.get(l);return c||(c=new gE({client:t,queryKey:i,queryHash:l,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(c)),c}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=this.#t.get(t.queryHash);r&&(t.destroy(),r===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const r={exact:!0,...t};return this.getAll().find(s=>by(r,s))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(s=>by(t,s)):r}notify(t){Tt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xE=class extends Yb{#t;#e;#n;constructor(t){super(),this.mutationId=t.mutationId,this.#e=t.mutationCache,this.#t=[],this.state=t.state||Xb(),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.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(r=>r!==t),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#e.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){const r=()=>{this.#r({type:"continue"})};this.#n=Zb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});const s=this.state.status==="pending",i=!this.#n.canStart();try{if(s)r();else{this.#r({type:"pending",variables:t,isPaused:i}),await this.#e.config.onMutate?.(t,this);const c=await this.options.onMutate?.(t);c!==this.state.context&&this.#r({type:"pending",context:c,variables:t,isPaused:i})}const l=await this.#n.start();return await this.#e.config.onSuccess?.(l,t,this.state.context,this),await this.options.onSuccess?.(l,t,this.state.context),await this.#e.config.onSettled?.(l,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(l,null,t,this.state.context),this.#r({type:"success",data:l}),l}catch(l){try{throw await this.#e.config.onError?.(l,t,this.state.context,this),await this.options.onError?.(l,t,this.state.context),await this.#e.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,l,t,this.state.context),l}finally{this.#r({type:"error",error:l})}}finally{this.#e.runNext(this)}}#r(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Tt.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#e.notify({mutation:this,type:"updated",action:t})})}};function Xb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var SE=class extends oi{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(t,r,s){const i=new xE({mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(r),state:s});return this.add(i),i}add(t){this.#t.add(t);const r=uc(t);if(typeof r=="string"){const s=this.#e.get(r);s?s.push(t):this.#e.set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const r=uc(t);if(typeof r=="string"){const s=this.#e.get(r);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&this.#e.delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=uc(t);if(typeof r=="string"){const i=this.#e.get(r)?.find(l=>l.state.status==="pending");return!i||i===t}else return!0}runNext(t){const r=uc(t);return typeof r=="string"?this.#e.get(r)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Tt.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const r={exact:!0,...t};return this.getAll().find(s=>xy(r,s))}findAll(t={}){return this.getAll().filter(r=>xy(t,r))}notify(t){Tt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Tt.batch(()=>Promise.all(t.map(r=>r.continue().catch(It))))}};function uc(t){return t.options.scope?.id}function wy(t){return{onFetch:(r,s)=>{const i=r.options,l=r.fetchOptions?.meta?.fetchMore?.direction,c=r.state.data?.pages||[],f=r.state.data?.pageParams||[];let h={pages:[],pageParams:[]},m=0;const p=async()=>{let v=!1;const x=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(r.signal.aborted?v=!0:r.signal.addEventListener("abort",()=>{v=!0}),r.signal)})},_=qb(r.options,r.fetchOptions),E=async(R,w,C)=>{if(v)return Promise.reject();if(w==null&&R.pages.length)return Promise.resolve(R);const O=(()=>{const Z={client:r.client,queryKey:r.queryKey,pageParam:w,direction:C?"backward":"forward",meta:r.options.meta};return x(Z),Z})(),U=await _(O),{maxPages:k}=r.options,M=C?fE:uE;return{pages:M(R.pages,U,k),pageParams:M(R.pageParams,w,k)}};if(l&&c.length){const R=l==="backward",w=R?_E:Ey,C={pages:c,pageParams:f},z=w(i,C);h=await E(C,z,R)}else{const R=t??c.length;do{const w=m===0?f[0]??i.initialPageParam:Ey(i,h);if(m>0&&w==null)break;h=await E(h,w),m++}while(m<R)}return h};r.options.persister?r.fetchFn=()=>r.options.persister?.(p,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=p}}}function Ey(t,{pages:r,pageParams:s}){const i=r.length-1;return r.length>0?t.getNextPageParam(r[i],r,s[i],s):void 0}function _E(t,{pages:r,pageParams:s}){return r.length>0?t.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var wE=class{#t;#e;#n;#r;#a;#i;#o;#s;constructor(t={}){this.#t=t.queryCache||new bE,this.#e=t.mutationCache||new SE,this.#n=t.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=Uh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#s=Ac.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const r=this.defaultQueryOptions({queryKey:t});return this.#t.get(r.queryHash)?.state.data}ensureQueryData(t){const r=this.defaultQueryOptions(t),s=this.#t.build(this,r),i=s.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(ca(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:r,state:s})=>{const i=s.data;return[r,i]})}setQueryData(t,r,s){const i=this.defaultQueryOptions({queryKey:t}),c=this.#t.get(i.queryHash)?.state.data,f=lE(r,c);if(f!==void 0)return this.#t.build(this,i).setData(f,{...s,manual:!0})}setQueriesData(t,r,s){return Tt.batch(()=>this.#t.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,r,s)]))}getQueryState(t){const r=this.defaultQueryOptions({queryKey:t});return this.#t.get(r.queryHash)?.state}removeQueries(t){const r=this.#t;Tt.batch(()=>{r.findAll(t).forEach(s=>{r.remove(s)})})}resetQueries(t,r){const s=this.#t;return Tt.batch(()=>(s.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const s={revert:!0,...r},i=Tt.batch(()=>this.#t.findAll(t).map(l=>l.cancel(s)));return Promise.all(i).then(It).catch(It)}invalidateQueries(t,r={}){return Tt.batch(()=>(this.#t.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},r)))}refetchQueries(t,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},i=Tt.batch(()=>this.#t.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,s);return s.throwOnError||(c=c.catch(It)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(i).then(It)}fetchQuery(t){const r=this.defaultQueryOptions(t);r.retry===void 0&&(r.retry=!1);const s=this.#t.build(this,r);return s.isStaleByTime(ca(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(It).catch(It)}fetchInfiniteQuery(t){return t.behavior=wy(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(It).catch(It)}ensureInfiniteQueryData(t){return t.behavior=wy(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ac.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,r){this.#r.set(Ya(t),{queryKey:t,defaultOptions:r})}getQueryDefaults(t){const r=[...this.#r.values()],s={};return r.forEach(i=>{So(t,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(t,r){this.#a.set(Ya(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...this.#a.values()],s={};return r.forEach(i=>{So(t,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const r={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=kh(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===zh&&(r.enabled=!1),r}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},EE=class extends oi{constructor(t,r){super(),this.options=r,this.#t=t,this.#s=null,this.#o=sh(),this.bindMethods(),this.setOptions(r)}#t;#e=void 0;#n=void 0;#r=void 0;#a;#i;#o;#s;#p;#d;#h;#c;#u;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Cy(this.#e,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ih(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ih(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#e.removeObserver(this)}setOptions(t){const r=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof En(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#e.setOptions(this.options),r._defaulted&&!Tc(this.options,r)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const i=this.hasListeners();i&&Ty(this.#e,s,this.options,r)&&this.#f(),this.updateResult(),i&&(this.#e!==s||En(this.options.enabled,this.#e)!==En(r.enabled,this.#e)||ca(this.options.staleTime,this.#e)!==ca(r.staleTime,this.#e))&&this.#v();const l=this.#g();i&&(this.#e!==s||En(this.options.enabled,this.#e)!==En(r.enabled,this.#e)||l!==this.#l)&&this.#y(l)}getOptimisticResult(t){const r=this.#t.getQueryCache().build(this.#t,t),s=this.createResult(r,t);return TE(this,s)&&(this.#r=s,this.#i=this.options,this.#a=this.#e.state),s}getCurrentResult(){return this.#r}trackResult(t,r){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),r?.(i),i==="promise"&&!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(s,i))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=this.#t.defaultQueryOptions(t),s=this.#t.getQueryCache().build(this.#t,r);return s.fetch().then(()=>this.createResult(s,r))}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(t){this.#_();let r=this.#e.fetch(this.options,t);return t?.throwOnError||(r=r.catch(It)),r}#v(){this.#x();const t=ca(this.options.staleTime,this.#e);if(Za||this.#r.isStale||!nh(t))return;const s=Bb(this.#r.dataUpdatedAt,t)+1;this.#c=setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(t){this.#S(),this.#l=t,!(Za||En(this.options.enabled,this.#e)===!1||!nh(this.#l)||this.#l===0)&&(this.#u=setInterval(()=>{(this.options.refetchIntervalInBackground||Uh.isFocused())&&this.#f()},this.#l))}#b(){this.#v(),this.#y(this.#g())}#x(){this.#c&&(clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}createResult(t,r){const s=this.#e,i=this.options,l=this.#r,c=this.#a,f=this.#i,m=t!==s?t.state:this.#n,{state:p}=t;let v={...p},x=!1,_;if(r._optimisticResults){const I=this.hasListeners(),te=!I&&Cy(t,r),ie=I&&Ty(t,s,r,i);(te||ie)&&(v={...v,...Qb(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:E,errorUpdatedAt:R,status:w}=v;_=v.data;let C=!1;if(r.placeholderData!==void 0&&_===void 0&&w==="pending"){let I;l?.isPlaceholderData&&r.placeholderData===f?.placeholderData?(I=l.data,C=!0):I=typeof r.placeholderData=="function"?r.placeholderData(this.#h?.state.data,this.#h):r.placeholderData,I!==void 0&&(w="success",_=ah(l?.data,I,r),x=!0)}if(r.select&&_!==void 0&&!C)if(l&&_===c?.data&&r.select===this.#p)_=this.#d;else try{this.#p=r.select,_=r.select(_),_=ah(l?.data,_,r),this.#d=_,this.#s=null}catch(I){this.#s=I}this.#s&&(E=this.#s,_=this.#d,R=Date.now(),w="error");const z=v.fetchStatus==="fetching",O=w==="pending",U=w==="error",k=O&&z,M=_!==void 0,F={status:w,fetchStatus:v.fetchStatus,isPending:O,isSuccess:w==="success",isError:U,isInitialLoading:k,isLoading:k,data:_,dataUpdatedAt:v.dataUpdatedAt,error:E,errorUpdatedAt:R,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:z,isRefetching:z&&!O,isLoadingError:U&&!M,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:U&&M,isStale:Ph(t,r),refetch:this.refetch,promise:this.#o,isEnabled:En(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const I=ge=>{F.status==="error"?ge.reject(F.error):F.data!==void 0&&ge.resolve(F.data)},te=()=>{const ge=this.#o=F.promise=sh();I(ge)},ie=this.#o;switch(ie.status){case"pending":t.queryHash===s.queryHash&&I(ie);break;case"fulfilled":(F.status==="error"||F.data!==ie.value)&&te();break;case"rejected":(F.status!=="error"||F.error!==ie.reason)&&te();break}}return F}updateResult(){const t=this.#r,r=this.createResult(this.#e,this.options);if(this.#a=this.#e.state,this.#i=this.options,this.#a.data!==void 0&&(this.#h=this.#e),Tc(r,t))return;this.#r=r;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,l=typeof i=="function"?i():i;if(l==="all"||!l&&!this.#m.size)return!0;const c=new Set(l??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(f=>{const h=f;return this.#r[h]!==t[h]&&c.has(h)})};this.#w({listeners:s()})}#_(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const r=this.#e;this.#e=t,this.#n=t.state,this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(t){Tt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function CE(t,r){return En(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function Cy(t,r){return CE(t,r)||t.state.data!==void 0&&ih(t,r,r.refetchOnMount)}function ih(t,r,s){if(En(r.enabled,t)!==!1&&ca(r.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&Ph(t,r)}return!1}function Ty(t,r,s,i){return(t!==r||En(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Ph(t,s)}function Ph(t,r){return En(r.enabled,t)!==!1&&t.isStaleByTime(ca(r.staleTime,t))}function TE(t,r){return!Tc(t.getCurrentResult(),r)}var AE=class extends oi{#t;#e=void 0;#n;#r;constructor(r,s){super(),this.#t=r,this.setOptions(s),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#t.defaultMutationOptions(r),Tc(this.options,s)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Ya(s.mutationKey)!==Ya(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#a(),this.#i(r)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(r,s){return this.#r=s,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(r)}#a(){const r=this.#n?.state??Xb();this.#e={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#i(r){Tt.batch(()=>{if(this.#r&&this.hasListeners()){const s=this.#e.variables,i=this.#e.context;r?.type==="success"?(this.#r.onSuccess?.(r.data,s,i),this.#r.onSettled?.(r.data,null,s,i)):r?.type==="error"&&(this.#r.onError?.(r.error,s,i),this.#r.onSettled?.(void 0,r.error,s,i))}this.listeners.forEach(s=>{s(this.#e)})})}},zd={exports:{}},Pe={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ay;function RE(){if(Ay)return Pe;Ay=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.iterator;function _(A){return A===null||typeof A!="object"?null:(A=x&&A[x]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,w={};function C(A,Y,oe){this.props=A,this.context=Y,this.refs=w,this.updater=oe||E}C.prototype.isReactComponent={},C.prototype.setState=function(A,Y){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,Y,"setState")},C.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function z(){}z.prototype=C.prototype;function O(A,Y,oe){this.props=A,this.context=Y,this.refs=w,this.updater=oe||E}var U=O.prototype=new z;U.constructor=O,R(U,C.prototype),U.isPureReactComponent=!0;var k=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},Z=Object.prototype.hasOwnProperty;function F(A,Y,oe,ee,ue,Oe){return oe=Oe.ref,{$$typeof:t,type:A,key:Y,ref:oe!==void 0?oe:null,props:Oe}}function I(A,Y){return F(A.type,Y,void 0,void 0,void 0,A.props)}function te(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function ie(A){var Y={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(oe){return Y[oe]})}var ge=/\/+/g;function ae(A,Y){return typeof A=="object"&&A!==null&&A.key!=null?ie(""+A.key):Y.toString(36)}function se(){}function ce(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(se,se):(A.status="pending",A.then(function(Y){A.status==="pending"&&(A.status="fulfilled",A.value=Y)},function(Y){A.status==="pending"&&(A.status="rejected",A.reason=Y)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function pe(A,Y,oe,ee,ue){var Oe=typeof A;(Oe==="undefined"||Oe==="boolean")&&(A=null);var _e=!1;if(A===null)_e=!0;else switch(Oe){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(A.$$typeof){case t:case r:_e=!0;break;case v:return _e=A._init,pe(_e(A._payload),Y,oe,ee,ue)}}if(_e)return ue=ue(A),_e=ee===""?"."+ae(A,0):ee,k(ue)?(oe="",_e!=null&&(oe=_e.replace(ge,"$&/")+"/"),pe(ue,Y,oe,"",function($e){return $e})):ue!=null&&(te(ue)&&(ue=I(ue,oe+(ue.key==null||A&&A.key===ue.key?"":(""+ue.key).replace(ge,"$&/")+"/")+_e)),Y.push(ue)),1;_e=0;var ne=ee===""?".":ee+":";if(k(A))for(var Te=0;Te<A.length;Te++)ee=A[Te],Oe=ne+ae(ee,Te),_e+=pe(ee,Y,oe,Oe,ue);else if(Te=_(A),typeof Te=="function")for(A=Te.call(A),Te=0;!(ee=A.next()).done;)ee=ee.value,Oe=ne+ae(ee,Te++),_e+=pe(ee,Y,oe,Oe,ue);else if(Oe==="object"){if(typeof A.then=="function")return pe(ce(A),Y,oe,ee,ue);throw Y=String(A),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return _e}function j(A,Y,oe){if(A==null)return A;var ee=[],ue=0;return pe(A,ee,"","",function(Oe){return Y.call(oe,Oe,ue++)}),ee}function Q(A){if(A._status===-1){var Y=A._result;Y=Y(),Y.then(function(oe){(A._status===0||A._status===-1)&&(A._status=1,A._result=oe)},function(oe){(A._status===0||A._status===-1)&&(A._status=2,A._result=oe)}),A._status===-1&&(A._status=0,A._result=Y)}if(A._status===1)return A._result.default;throw A._result}var H=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function J(){}return Pe.Children={map:j,forEach:function(A,Y,oe){j(A,function(){Y.apply(this,arguments)},oe)},count:function(A){var Y=0;return j(A,function(){Y++}),Y},toArray:function(A){return j(A,function(Y){return Y})||[]},only:function(A){if(!te(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},Pe.Component=C,Pe.Fragment=s,Pe.Profiler=l,Pe.PureComponent=O,Pe.StrictMode=i,Pe.Suspense=m,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(A){return M.H.useMemoCache(A)}},Pe.cache=function(A){return function(){return A.apply(null,arguments)}},Pe.cloneElement=function(A,Y,oe){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ee=R({},A.props),ue=A.key,Oe=void 0;if(Y!=null)for(_e in Y.ref!==void 0&&(Oe=void 0),Y.key!==void 0&&(ue=""+Y.key),Y)!Z.call(Y,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&Y.ref===void 0||(ee[_e]=Y[_e]);var _e=arguments.length-2;if(_e===1)ee.children=oe;else if(1<_e){for(var ne=Array(_e),Te=0;Te<_e;Te++)ne[Te]=arguments[Te+2];ee.children=ne}return F(A.type,ue,void 0,void 0,Oe,ee)},Pe.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:c,_context:A},A},Pe.createElement=function(A,Y,oe){var ee,ue={},Oe=null;if(Y!=null)for(ee in Y.key!==void 0&&(Oe=""+Y.key),Y)Z.call(Y,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ue[ee]=Y[ee]);var _e=arguments.length-2;if(_e===1)ue.children=oe;else if(1<_e){for(var ne=Array(_e),Te=0;Te<_e;Te++)ne[Te]=arguments[Te+2];ue.children=ne}if(A&&A.defaultProps)for(ee in _e=A.defaultProps,_e)ue[ee]===void 0&&(ue[ee]=_e[ee]);return F(A,Oe,void 0,void 0,null,ue)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(A){return{$$typeof:h,render:A}},Pe.isValidElement=te,Pe.lazy=function(A){return{$$typeof:v,_payload:{_status:-1,_result:A},_init:Q}},Pe.memo=function(A,Y){return{$$typeof:p,type:A,compare:Y===void 0?null:Y}},Pe.startTransition=function(A){var Y=M.T,oe={};M.T=oe;try{var ee=A(),ue=M.S;ue!==null&&ue(oe,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(J,H)}catch(Oe){H(Oe)}finally{M.T=Y}},Pe.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Pe.use=function(A){return M.H.use(A)},Pe.useActionState=function(A,Y,oe){return M.H.useActionState(A,Y,oe)},Pe.useCallback=function(A,Y){return M.H.useCallback(A,Y)},Pe.useContext=function(A){return M.H.useContext(A)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(A,Y){return M.H.useDeferredValue(A,Y)},Pe.useEffect=function(A,Y,oe){var ee=M.H;if(typeof oe=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ee.useEffect(A,Y)},Pe.useId=function(){return M.H.useId()},Pe.useImperativeHandle=function(A,Y,oe){return M.H.useImperativeHandle(A,Y,oe)},Pe.useInsertionEffect=function(A,Y){return M.H.useInsertionEffect(A,Y)},Pe.useLayoutEffect=function(A,Y){return M.H.useLayoutEffect(A,Y)},Pe.useMemo=function(A,Y){return M.H.useMemo(A,Y)},Pe.useOptimistic=function(A,Y){return M.H.useOptimistic(A,Y)},Pe.useReducer=function(A,Y,oe){return M.H.useReducer(A,Y,oe)},Pe.useRef=function(A){return M.H.useRef(A)},Pe.useState=function(A){return M.H.useState(A)},Pe.useSyncExternalStore=function(A,Y,oe){return M.H.useSyncExternalStore(A,Y,oe)},Pe.useTransition=function(){return M.H.useTransition()},Pe.version="19.1.1",Pe}var Ry;function Lh(){return Ry||(Ry=1,zd.exports=RE()),zd.exports}var y=Lh();const Ae=jh(y),Kb=sE({__proto__:null,default:Ae},[y]);var $b=y.createContext(void 0),Wb=t=>{const r=y.useContext($b);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},qj=({client:t,children:r})=>(y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx($b.Provider,{value:t,children:r})),Jb=y.createContext(!1),OE=()=>y.useContext(Jb);Jb.Provider;function ME(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var NE=y.createContext(ME()),DE=()=>y.useContext(NE),jE=(t,r)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(r.isReset()||(t.retryOnMount=!1))},kE=t=>{y.useEffect(()=>{t.clearReset()},[t])},zE=({result:t,errorResetBoundary:r,throwOnError:s,query:i,suspense:l})=>t.isError&&!r.isReset()&&!t.isFetching&&i&&(l&&t.data===void 0||Gb(s,[t.error,i])),UE=t=>{if(t.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...i)=>r(s(...i)):r(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},PE=(t,r)=>t.isLoading&&t.isFetching&&!r,LE=(t,r)=>t?.suspense&&r.isPending,Oy=(t,r,s)=>r.fetchOptimistic(t).catch(()=>{s.clearReset()});function VE(t,r,s){const i=OE(),l=DE(),c=Wb(),f=c.defaultQueryOptions(t);c.getDefaultOptions().queries?._experimental_beforeQuery?.(f),f._optimisticResults=i?"isRestoring":"optimistic",UE(f),jE(f,l),kE(l);const h=!c.getQueryCache().get(f.queryHash),[m]=y.useState(()=>new r(c,f)),p=m.getOptimisticResult(f),v=!i&&t.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(x=>{const _=v?m.subscribe(Tt.batchCalls(x)):It;return m.updateResult(),_},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(f)},[f,m]),LE(f,p))throw Oy(f,m,l);if(zE({result:p,errorResetBoundary:l,throwOnError:f.throwOnError,query:c.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw p.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(f,p),f.experimental_prefetchInRender&&!Za&&PE(p,i)&&(h?Oy(f,m,l):c.getQueryCache().get(f.queryHash)?.promise)?.catch(It).finally(()=>{m.updateResult()}),f.notifyOnChangeProps?p:m.trackResult(p)}function oh(t,r){return VE(t,EE)}function ex(t,r){const s=Wb(),[i]=y.useState(()=>new AE(s,t));y.useEffect(()=>{i.setOptions(t)},[i,t]);const l=y.useSyncExternalStore(y.useCallback(f=>i.subscribe(Tt.batchCalls(f)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),c=y.useCallback((f,h)=>{i.mutate(f,h).catch(It)},[i]);if(l.error&&Gb(i.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}const Gj=new wE({defaultOptions:{queries:{staleTime:1e3*60,refetchOnWindowFocus:!1}}});var Ud={exports:{}},ho={},Pd={exports:{}},Ld={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var My;function BE(){return My||(My=1,(function(t){function r(j,Q){var H=j.length;j.push(Q);e:for(;0<H;){var J=H-1>>>1,A=j[J];if(0<l(A,Q))j[J]=Q,j[H]=A,H=J;else break e}}function s(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var Q=j[0],H=j.pop();if(H!==Q){j[0]=H;e:for(var J=0,A=j.length,Y=A>>>1;J<Y;){var oe=2*(J+1)-1,ee=j[oe],ue=oe+1,Oe=j[ue];if(0>l(ee,H))ue<A&&0>l(Oe,ee)?(j[J]=Oe,j[ue]=H,J=ue):(j[J]=ee,j[oe]=H,J=oe);else if(ue<A&&0>l(Oe,H))j[J]=Oe,j[ue]=H,J=ue;else break e}}return Q}function l(j,Q){var H=j.sortIndex-Q.sortIndex;return H!==0?H:j.id-Q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var m=[],p=[],v=1,x=null,_=3,E=!1,R=!1,w=!1,C=!1,z=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function k(j){for(var Q=s(p);Q!==null;){if(Q.callback===null)i(p);else if(Q.startTime<=j)i(p),Q.sortIndex=Q.expirationTime,r(m,Q);else break;Q=s(p)}}function M(j){if(w=!1,k(j),!R)if(s(m)!==null)R=!0,Z||(Z=!0,ae());else{var Q=s(p);Q!==null&&pe(M,Q.startTime-j)}}var Z=!1,F=-1,I=5,te=-1;function ie(){return C?!0:!(t.unstable_now()-te<I)}function ge(){if(C=!1,Z){var j=t.unstable_now();te=j;var Q=!0;try{e:{R=!1,w&&(w=!1,O(F),F=-1),E=!0;var H=_;try{t:{for(k(j),x=s(m);x!==null&&!(x.expirationTime>j&&ie());){var J=x.callback;if(typeof J=="function"){x.callback=null,_=x.priorityLevel;var A=J(x.expirationTime<=j);if(j=t.unstable_now(),typeof A=="function"){x.callback=A,k(j),Q=!0;break t}x===s(m)&&i(m),k(j)}else i(m);x=s(m)}if(x!==null)Q=!0;else{var Y=s(p);Y!==null&&pe(M,Y.startTime-j),Q=!1}}break e}finally{x=null,_=H,E=!1}Q=void 0}}finally{Q?ae():Z=!1}}}var ae;if(typeof U=="function")ae=function(){U(ge)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=ge,ae=function(){ce.postMessage(null)}}else ae=function(){z(ge,0)};function pe(j,Q){F=z(function(){j(t.unstable_now())},Q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return _},t.unstable_next=function(j){switch(_){case 1:case 2:case 3:var Q=3;break;default:Q=_}var H=_;_=Q;try{return j()}finally{_=H}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function(j,Q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var H=_;_=j;try{return Q()}finally{_=H}},t.unstable_scheduleCallback=function(j,Q,H){var J=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?J+H:J):H=J,j){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=H+A,j={id:v++,callback:Q,priorityLevel:j,startTime:H,expirationTime:A,sortIndex:-1},H>J?(j.sortIndex=H,r(p,j),s(m)===null&&j===s(p)&&(w?(O(F),F=-1):w=!0,pe(M,H-J))):(j.sortIndex=A,r(m,j),R||E||(R=!0,Z||(Z=!0,ae()))),j},t.unstable_shouldYield=ie,t.unstable_wrapCallback=function(j){var Q=_;return function(){var H=_;_=Q;try{return j.apply(this,arguments)}finally{_=H}}}})(Ld)),Ld}var Ny;function HE(){return Ny||(Ny=1,Pd.exports=BE()),Pd.exports}var Vd={exports:{}},Bt={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Dy;function qE(){if(Dy)return Bt;Dy=1;var t=Lh();function r(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function c(m,p,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:x==null?null:""+x,children:m,containerInfo:p,implementation:v}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Bt.createPortal=function(m,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return c(m,p,null,v)},Bt.flushSync=function(m){var p=f.T,v=i.p;try{if(f.T=null,i.p=2,m)return m()}finally{f.T=p,i.p=v,i.d.f()}},Bt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(m,p))},Bt.prefetchDNS=function(m){typeof m=="string"&&i.d.D(m)},Bt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var v=p.as,x=h(v,p.crossOrigin),_=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?i.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:_,fetchPriority:E}):v==="script"&&i.d.X(m,{crossOrigin:x,integrity:_,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Bt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=h(p.as,p.crossOrigin);i.d.M(m,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(m)},Bt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,x=h(v,p.crossOrigin);i.d.L(m,v,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Bt.preloadModule=function(m,p){if(typeof m=="string")if(p){var v=h(p.as,p.crossOrigin);i.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(m)},Bt.requestFormReset=function(m){i.d.r(m)},Bt.unstable_batchedUpdates=function(m,p){return m(p)},Bt.useFormState=function(m,p,v){return f.H.useFormState(m,p,v)},Bt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Bt.version="19.1.1",Bt}var jy;function tx(){if(jy)return Vd.exports;jy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Vd.exports=qE(),Vd.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ky;function GE(){if(ky)return ho;ky=1;var t=HE(),r=Lh(),s=tx();function i(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(c(e)!==e)throw Error(i(188))}function m(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(i(188));return n!==e?null:e}for(var a=e,o=n;;){var u=a.return;if(u===null)break;var d=u.alternate;if(d===null){if(o=u.return,o!==null){a=o;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===a)return h(u),e;if(d===o)return h(u),n;d=d.sibling}throw Error(i(188))}if(a.return!==o.return)a=u,o=d;else{for(var b=!1,S=u.child;S;){if(S===a){b=!0,a=u,o=d;break}if(S===o){b=!0,o=u,a=d;break}S=S.sibling}if(!b){for(S=d.child;S;){if(S===a){b=!0,a=d,o=u;break}if(S===o){b=!0,o=d,a=u;break}S=S.sibling}if(!b)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:n}function p(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=p(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),O=Symbol.for("react.consumer"),U=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),ge=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=ge&&e[ge]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case C:return"Profiler";case w:return"StrictMode";case M:return"Suspense";case Z:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case U:return(e.displayName||"Context")+".Provider";case O:return(e._context.displayName||"Context")+".Consumer";case k:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return n=e.displayName||null,n!==null?n:ce(e.type)||"Memo";case I:n=e._payload,e=e._init;try{return ce(e(n))}catch{}}return null}var pe=Array.isArray,j=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},J=[],A=-1;function Y(e){return{current:e}}function oe(e){0>A||(e.current=J[A],J[A]=null,A--)}function ee(e,n){A++,J[A]=e.current,e.current=n}var ue=Y(null),Oe=Y(null),_e=Y(null),ne=Y(null);function Te(e,n){switch(ee(_e,n),ee(Oe,e),ee(ue,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Ig(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Ig(n),e=Zg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}oe(ue),ee(ue,e)}function $e(){oe(ue),oe(Oe),oe(_e)}function He(e){e.memoizedState!==null&&ee(ne,e);var n=ue.current,a=Zg(n,e.type);n!==a&&(ee(Oe,e),ee(ue,a))}function Ye(e){Oe.current===e&&(oe(ue),oe(Oe)),ne.current===e&&(oe(ne),io._currentValue=H)}var We=Object.prototype.hasOwnProperty,At=t.unstable_scheduleCallback,Xt=t.unstable_cancelCallback,kr=t.unstable_shouldYield,_a=t.unstable_requestPaint,Pt=t.unstable_now,Am=t.unstable_getCurrentPriorityLevel,pi=t.unstable_ImmediatePriority,N=t.unstable_UserBlockingPriority,B=t.unstable_NormalPriority,K=t.unstable_LowPriority,ve=t.unstable_IdlePriority,fe=t.log,le=t.unstable_setDisableYieldValue,we=null,ze=null;function Qe(e){if(typeof fe=="function"&&le(e),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(we,e)}catch{}}var lt=Math.clz32?Math.clz32:Su,rs=Math.log,qn=Math.LN2;function Su(e){return e>>>=0,e===0?32:31-(rs(e)/qn|0)|0}var zr=256,Ur=4194304;function or(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function wa(e,n,a){var o=e.pendingLanes;if(o===0)return 0;var u=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var S=o&134217727;return S!==0?(o=S&~d,o!==0?u=or(o):(b&=S,b!==0?u=or(b):a||(a=S&~e,a!==0&&(u=or(a))))):(S=o&~d,S!==0?u=or(S):b!==0?u=or(b):a||(a=o&~e,a!==0&&(u=or(a)))),u===0?0:n!==0&&n!==u&&(n&d)===0&&(d=u&-u,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:u}function Ea(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Jo(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rm(){var e=zr;return zr<<=1,(zr&4194048)===0&&(zr=256),e}function Om(){var e=Ur;return Ur<<=1,(Ur&62914560)===0&&(Ur=4194304),e}function _u(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function vi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function F_(e,n,a,o,u,d){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,T=e.expirationTimes,V=e.hiddenUpdates;for(a=b&~a;0<a;){var X=31-lt(a),W=1<<X;S[X]=0,T[X]=-1;var q=V[X];if(q!==null)for(V[X]=null,X=0;X<q.length;X++){var G=q[X];G!==null&&(G.lane&=-536870913)}a&=~W}o!==0&&Mm(e,o,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~n))}function Mm(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-lt(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|a&4194090}function Nm(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var o=31-lt(a),u=1<<o;u&n|e[o]&n&&(e[o]|=n),a&=~u}}function wu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Eu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Dm(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:fy(e.type))}function I_(e,n){var a=Q.p;try{return Q.p=e,n()}finally{Q.p=a}}var Pr=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Pr,Kt="__reactProps$"+Pr,as="__reactContainer$"+Pr,Cu="__reactEvents$"+Pr,Z_="__reactListeners$"+Pr,Y_="__reactHandles$"+Pr,jm="__reactResources$"+Pr,gi="__reactMarker$"+Pr;function Tu(e){delete e[Lt],delete e[Kt],delete e[Cu],delete e[Z_],delete e[Y_]}function ss(e){var n=e[Lt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[as]||a[Lt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Kg(e);e!==null;){if(a=e[Lt])return a;e=Kg(e)}return n}e=a,a=e.parentNode}return null}function is(e){if(e=e[Lt]||e[as]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function yi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(i(33))}function os(e){var n=e[jm];return n||(n=e[jm]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Rt(e){e[gi]=!0}var km=new Set,zm={};function Ca(e,n){ls(e,n),ls(e+"Capture",n)}function ls(e,n){for(zm[e]=n,e=0;e<n.length;e++)km.add(n[e])}var Q_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Um={},Pm={};function X_(e){return We.call(Pm,e)?!0:We.call(Um,e)?!1:Q_.test(e)?Pm[e]=!0:(Um[e]=!0,!1)}function el(e,n,a){if(X_(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function tl(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function lr(e,n,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+o)}}var Au,Lm;function cs(e){if(Au===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Au=n&&n[1]||"",Lm=-1<a.stack.indexOf(`
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Au+e+Lm}var Ru=!1;function Ou(e,n){if(!e||Ru)return"";Ru=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(G){var q=G}Reflect.construct(e,[],W)}else{try{W.call()}catch(G){q=G}e.call(W.prototype)}}else{try{throw Error()}catch(G){q=G}(W=e())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(G){if(G&&q&&typeof G.stack=="string")return[G.stack,q.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),b=d[0],S=d[1];if(b&&S){var T=b.split(`
`),V=S.split(`
`);for(u=o=0;o<T.length&&!T[o].includes("DetermineComponentFrameRoot");)o++;for(;u<V.length&&!V[u].includes("DetermineComponentFrameRoot");)u++;if(o===T.length||u===V.length)for(o=T.length-1,u=V.length-1;1<=o&&0<=u&&T[o]!==V[u];)u--;for(;1<=o&&0<=u;o--,u--)if(T[o]!==V[u]){if(o!==1||u!==1)do if(o--,u--,0>u||T[o]!==V[u]){var X=`
`+T[o].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=o&&0<=u);break}}}finally{Ru=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?cs(a):""}function K_(e){switch(e.tag){case 26:case 27:case 5:return cs(e.type);case 16:return cs("Lazy");case 13:return cs("Suspense");case 19:return cs("SuspenseList");case 0:case 15:return Ou(e.type,!1);case 11:return Ou(e.type.render,!1);case 1:return Ou(e.type,!0);case 31:return cs("Activity");default:return""}}function Vm(e){try{var n="";do n+=K_(e),e=e.return;while(e);return n}catch(a){return`
Error generating stack: `+a.message+`
`+a.stack}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bm(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function $_(e){var n=Bm(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,d=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(b){o=""+b,d.call(this,b)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return o},setValue:function(b){o=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function nl(e){e._valueTracker||(e._valueTracker=$_(e))}function Hm(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return e&&(o=Bm(e)?e.checked?"true":"false":e.value),e=o,e!==a?(n.setValue(e),!0):!1}function rl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var W_=/[\n"\\]/g;function pn(e){return e.replace(W_,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Mu(e,n,a,o,u,d,b,S){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+mn(n)):e.value!==""+mn(n)&&(e.value=""+mn(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?Nu(e,b,mn(n)):a!=null?Nu(e,b,mn(a)):o!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+mn(S):e.removeAttribute("name")}function qm(e,n,a,o,u,d,b,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||n!=null))return;a=a!=null?""+mn(a):"",n=n!=null?""+mn(n):a,S||n===e.value||(e.value=n),e.defaultValue=n}o=o??u,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=S?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b)}function Nu(e,n,a){n==="number"&&rl(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function us(e,n,a,o){if(e=e.options,n){n={};for(var u=0;u<a.length;u++)n["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=n.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&o&&(e[a].defaultSelected=!0)}else{for(a=""+mn(a),n=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Gm(e,n,a){if(n!=null&&(n=""+mn(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+mn(a):""}function Fm(e,n,a,o){if(n==null){if(o!=null){if(a!=null)throw Error(i(92));if(pe(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),n=a}a=mn(n),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o)}function fs(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var J_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Im(e,n,a){var o=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,a):typeof a!="number"||a===0||J_.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Zm(e,n,a){if(n!=null&&typeof n!="object")throw Error(i(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var u in n)o=n[u],n.hasOwnProperty(u)&&a[u]!==o&&Im(e,u,o)}else for(var d in n)n.hasOwnProperty(d)&&Im(e,d,n[d])}function Du(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ew=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tw=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function al(e){return tw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ju=null;function ku(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ds=null,hs=null;function Ym(e){var n=is(e);if(n&&(e=n.stateNode)){var a=e[Kt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Mu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+pn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==e&&o.form===e.form){var u=o[Kt]||null;if(!u)throw Error(i(90));Mu(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<a.length;n++)o=a[n],o.form===e.form&&Hm(o)}break e;case"textarea":Gm(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&us(e,!!a.multiple,n,!1)}}}var zu=!1;function Qm(e,n,a){if(zu)return e(n,a);zu=!0;try{var o=e(n);return o}finally{if(zu=!1,(ds!==null||hs!==null)&&(Gl(),ds&&(n=ds,e=hs,hs=ds=null,Ym(n),e)))for(n=0;n<e.length;n++)Ym(e[n])}}function bi(e,n){var a=e.stateNode;if(a===null)return null;var o=a[Kt]||null;if(o===null)return null;a=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,n,typeof a));return a}var cr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Uu=!1;if(cr)try{var xi={};Object.defineProperty(xi,"passive",{get:function(){Uu=!0}}),window.addEventListener("test",xi,xi),window.removeEventListener("test",xi,xi)}catch{Uu=!1}var Lr=null,Pu=null,sl=null;function Xm(){if(sl)return sl;var e,n=Pu,a=n.length,o,u="value"in Lr?Lr.value:Lr.textContent,d=u.length;for(e=0;e<a&&n[e]===u[e];e++);var b=a-e;for(o=1;o<=b&&n[a-o]===u[d-o];o++);return sl=u.slice(e,1<o?1-o:void 0)}function il(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ol(){return!0}function Km(){return!1}function $t(e){function n(a,o,u,d,b){this._reactName=a,this._targetInst=u,this.type=o,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?ol:Km,this.isPropagationStopped=Km,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ol)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ol)},persist:function(){},isPersistent:ol}),n}var Ta={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ll=$t(Ta),Si=v({},Ta,{view:0,detail:0}),nw=$t(Si),Lu,Vu,_i,cl=v({},Si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_i&&(_i&&e.type==="mousemove"?(Lu=e.screenX-_i.screenX,Vu=e.screenY-_i.screenY):Vu=Lu=0,_i=e),Lu)},movementY:function(e){return"movementY"in e?e.movementY:Vu}}),$m=$t(cl),rw=v({},cl,{dataTransfer:0}),aw=$t(rw),sw=v({},Si,{relatedTarget:0}),Bu=$t(sw),iw=v({},Ta,{animationName:0,elapsedTime:0,pseudoElement:0}),ow=$t(iw),lw=v({},Ta,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cw=$t(lw),uw=v({},Ta,{data:0}),Wm=$t(uw),fw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mw(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=hw[e])?!!n[e]:!1}function Hu(){return mw}var pw=v({},Si,{key:function(e){if(e.key){var n=fw[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=il(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hu,charCode:function(e){return e.type==="keypress"?il(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?il(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vw=$t(pw),gw=v({},cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jm=$t(gw),yw=v({},Si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hu}),bw=$t(yw),xw=v({},Ta,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sw=$t(xw),_w=v({},cl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ww=$t(_w),Ew=v({},Ta,{newState:0,oldState:0}),Cw=$t(Ew),Tw=[9,13,27,32],qu=cr&&"CompositionEvent"in window,wi=null;cr&&"documentMode"in document&&(wi=document.documentMode);var Aw=cr&&"TextEvent"in window&&!wi,ep=cr&&(!qu||wi&&8<wi&&11>=wi),tp=" ",np=!1;function rp(e,n){switch(e){case"keyup":return Tw.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ap(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ms=!1;function Rw(e,n){switch(e){case"compositionend":return ap(n);case"keypress":return n.which!==32?null:(np=!0,tp);case"textInput":return e=n.data,e===tp&&np?null:e;default:return null}}function Ow(e,n){if(ms)return e==="compositionend"||!qu&&rp(e,n)?(e=Xm(),sl=Pu=Lr=null,ms=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return ep&&n.locale!=="ko"?null:n.data;default:return null}}var Mw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sp(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Mw[e.type]:n==="textarea"}function ip(e,n,a,o){ds?hs?hs.push(o):hs=[o]:ds=o,n=Xl(n,"onChange"),0<n.length&&(a=new ll("onChange","change",null,a,o),e.push({event:a,listeners:n}))}var Ei=null,Ci=null;function Nw(e){Bg(e,0)}function ul(e){var n=yi(e);if(Hm(n))return e}function op(e,n){if(e==="change")return n}var lp=!1;if(cr){var Gu;if(cr){var Fu="oninput"in document;if(!Fu){var cp=document.createElement("div");cp.setAttribute("oninput","return;"),Fu=typeof cp.oninput=="function"}Gu=Fu}else Gu=!1;lp=Gu&&(!document.documentMode||9<document.documentMode)}function up(){Ei&&(Ei.detachEvent("onpropertychange",fp),Ci=Ei=null)}function fp(e){if(e.propertyName==="value"&&ul(Ci)){var n=[];ip(n,Ci,e,ku(e)),Qm(Nw,n)}}function Dw(e,n,a){e==="focusin"?(up(),Ei=n,Ci=a,Ei.attachEvent("onpropertychange",fp)):e==="focusout"&&up()}function jw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ul(Ci)}function kw(e,n){if(e==="click")return ul(n)}function zw(e,n){if(e==="input"||e==="change")return ul(n)}function Uw(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var nn=typeof Object.is=="function"?Object.is:Uw;function Ti(e,n){if(nn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var u=a[o];if(!We.call(n,u)||!nn(e[u],n[u]))return!1}return!0}function dp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hp(e,n){var a=dp(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=n&&o>=n)return{node:a,offset:n-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=dp(a)}}function mp(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?mp(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function pp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=rl(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=rl(e.document)}return n}function Iu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var Pw=cr&&"documentMode"in document&&11>=document.documentMode,ps=null,Zu=null,Ai=null,Yu=!1;function vp(e,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Yu||ps==null||ps!==rl(o)||(o=ps,"selectionStart"in o&&Iu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ai&&Ti(Ai,o)||(Ai=o,o=Xl(Zu,"onSelect"),0<o.length&&(n=new ll("onSelect","select",null,n,a),e.push({event:n,listeners:o}),n.target=ps)))}function Aa(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var vs={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionrun:Aa("Transition","TransitionRun"),transitionstart:Aa("Transition","TransitionStart"),transitioncancel:Aa("Transition","TransitionCancel"),transitionend:Aa("Transition","TransitionEnd")},Qu={},gp={};cr&&(gp=document.createElement("div").style,"AnimationEvent"in window||(delete vs.animationend.animation,delete vs.animationiteration.animation,delete vs.animationstart.animation),"TransitionEvent"in window||delete vs.transitionend.transition);function Ra(e){if(Qu[e])return Qu[e];if(!vs[e])return e;var n=vs[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in gp)return Qu[e]=n[a];return e}var yp=Ra("animationend"),bp=Ra("animationiteration"),xp=Ra("animationstart"),Lw=Ra("transitionrun"),Vw=Ra("transitionstart"),Bw=Ra("transitioncancel"),Sp=Ra("transitionend"),_p=new Map,Xu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Xu.push("scrollEnd");function Rn(e,n){_p.set(e,n),Ca(n,[e])}var wp=new WeakMap;function vn(e,n){if(typeof e=="object"&&e!==null){var a=wp.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Vm(n)},wp.set(e,n),n)}return{value:e,source:n,stack:Vm(n)}}var gn=[],gs=0,Ku=0;function fl(){for(var e=gs,n=Ku=gs=0;n<e;){var a=gn[n];gn[n++]=null;var o=gn[n];gn[n++]=null;var u=gn[n];gn[n++]=null;var d=gn[n];if(gn[n++]=null,o!==null&&u!==null){var b=o.pending;b===null?u.next=u:(u.next=b.next,b.next=u),o.pending=u}d!==0&&Ep(a,u,d)}}function dl(e,n,a,o){gn[gs++]=e,gn[gs++]=n,gn[gs++]=a,gn[gs++]=o,Ku|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function $u(e,n,a,o){return dl(e,n,a,o),hl(e)}function ys(e,n){return dl(e,null,null,n),hl(e)}function Ep(e,n,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var u=!1,d=e.return;d!==null;)d.childLanes|=a,o=d.alternate,o!==null&&(o.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&n!==null&&(u=31-lt(a),e=d.hiddenUpdates,o=e[u],o===null?e[u]=[n]:o.push(n),n.lane=a|536870912),d):null}function hl(e){if(50<Wi)throw Wi=0,ad=null,Error(i(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var bs={};function Hw(e,n,a,o){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(e,n,a,o){return new Hw(e,n,a,o)}function Wu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ur(e,n){var a=e.alternate;return a===null?(a=rn(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Cp(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function ml(e,n,a,o,u,d){var b=0;if(o=e,typeof e=="function")Wu(e)&&(b=1);else if(typeof e=="string")b=G1(e,a,ue.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=rn(31,a,n,u),e.elementType=te,e.lanes=d,e;case R:return Oa(a.children,u,d,n);case w:b=8,u|=24;break;case C:return e=rn(12,a,n,u|2),e.elementType=C,e.lanes=d,e;case M:return e=rn(13,a,n,u),e.elementType=M,e.lanes=d,e;case Z:return e=rn(19,a,n,u),e.elementType=Z,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:case U:b=10;break e;case O:b=9;break e;case k:b=11;break e;case F:b=14;break e;case I:b=16,o=null;break e}b=29,a=Error(i(130,e===null?"null":typeof e,"")),o=null}return n=rn(b,a,n,u),n.elementType=e,n.type=o,n.lanes=d,n}function Oa(e,n,a,o){return e=rn(7,e,o,n),e.lanes=a,e}function Ju(e,n,a){return e=rn(6,e,null,n),e.lanes=a,e}function ef(e,n,a){return n=rn(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var xs=[],Ss=0,pl=null,vl=0,yn=[],bn=0,Ma=null,fr=1,dr="";function Na(e,n){xs[Ss++]=vl,xs[Ss++]=pl,pl=e,vl=n}function Tp(e,n,a){yn[bn++]=fr,yn[bn++]=dr,yn[bn++]=Ma,Ma=e;var o=fr;e=dr;var u=32-lt(o)-1;o&=~(1<<u),a+=1;var d=32-lt(n)+u;if(30<d){var b=u-u%5;d=(o&(1<<b)-1).toString(32),o>>=b,u-=b,fr=1<<32-lt(n)+u|a<<u|o,dr=d+e}else fr=1<<d|a<<u|o,dr=e}function tf(e){e.return!==null&&(Na(e,1),Tp(e,1,0))}function nf(e){for(;e===pl;)pl=xs[--Ss],xs[Ss]=null,vl=xs[--Ss],xs[Ss]=null;for(;e===Ma;)Ma=yn[--bn],yn[bn]=null,dr=yn[--bn],yn[bn]=null,fr=yn[--bn],yn[bn]=null}var Gt=null,ht=null,et=!1,Da=null,Gn=!1,rf=Error(i(519));function ja(e){var n=Error(i(418,""));throw Mi(vn(n,e)),rf}function Ap(e){var n=e.stateNode,a=e.type,o=e.memoizedProps;switch(n[Lt]=e,n[Kt]=o,a){case"dialog":Fe("cancel",n),Fe("close",n);break;case"iframe":case"object":case"embed":Fe("load",n);break;case"video":case"audio":for(a=0;a<eo.length;a++)Fe(eo[a],n);break;case"source":Fe("error",n);break;case"img":case"image":case"link":Fe("error",n),Fe("load",n);break;case"details":Fe("toggle",n);break;case"input":Fe("invalid",n),qm(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),nl(n);break;case"select":Fe("invalid",n);break;case"textarea":Fe("invalid",n),Fm(n,o.value,o.defaultValue,o.children),nl(n)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||o.suppressHydrationWarning===!0||Fg(n.textContent,a)?(o.popover!=null&&(Fe("beforetoggle",n),Fe("toggle",n)),o.onScroll!=null&&Fe("scroll",n),o.onScrollEnd!=null&&Fe("scrollend",n),o.onClick!=null&&(n.onclick=Kl),n=!0):n=!1,n||ja(e)}function Rp(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:Gt=Gt.return}}function Ri(e){if(e!==Gt)return!1;if(!et)return Rp(e),et=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||xd(e.type,e.memoizedProps)),a=!a),a&&ht&&ja(e),Rp(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(n===0){ht=Mn(e.nextSibling);break e}n--}else a!=="$"&&a!=="$!"&&a!=="$?"||n++;e=e.nextSibling}ht=null}}else n===27?(n=ht,ea(e.type)?(e=Ed,Ed=null,ht=e):ht=n):ht=Gt?Mn(e.stateNode.nextSibling):null;return!0}function Oi(){ht=Gt=null,et=!1}function Op(){var e=Da;return e!==null&&(en===null?en=e:en.push.apply(en,e),Da=null),e}function Mi(e){Da===null?Da=[e]:Da.push(e)}var af=Y(null),ka=null,hr=null;function Vr(e,n,a){ee(af,n._currentValue),n._currentValue=a}function mr(e){e._currentValue=af.current,oe(af)}function sf(e,n,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===a)break;e=e.return}}function of(e,n,a,o){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var b=u.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=u;for(var T=0;T<n.length;T++)if(S.context===n[T]){d.lanes|=a,S=d.alternate,S!==null&&(S.lanes|=a),sf(d.return,a,e),o||(b=null);break e}d=S.next}}else if(u.tag===18){if(b=u.return,b===null)throw Error(i(341));b.lanes|=a,d=b.alternate,d!==null&&(d.lanes|=a),sf(b,a,e),b=null}else b=u.child;if(b!==null)b.return=u;else for(b=u;b!==null;){if(b===e){b=null;break}if(u=b.sibling,u!==null){u.return=b.return,b=u;break}b=b.return}u=b}}function Ni(e,n,a,o){e=null;for(var u=n,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var b=u.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var S=u.type;nn(u.pendingProps.value,b.value)||(e!==null?e.push(S):e=[S])}}else if(u===ne.current){if(b=u.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(io):e=[io])}u=u.return}e!==null&&of(n,e,a,o),n.flags|=262144}function gl(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){ka=e,hr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Vt(e){return Mp(ka,e)}function yl(e,n){return ka===null&&za(e),Mp(e,n)}function Mp(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},hr===null){if(e===null)throw Error(i(308));hr=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else hr=hr.next=n;return a}var qw=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},Gw=t.unstable_scheduleCallback,Fw=t.unstable_NormalPriority,_t={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lf(){return{controller:new qw,data:new Map,refCount:0}}function Di(e){e.refCount--,e.refCount===0&&Gw(Fw,function(){e.controller.abort()})}var ji=null,cf=0,_s=0,ws=null;function Iw(e,n){if(ji===null){var a=ji=[];cf=0,_s=fd(),ws={status:"pending",value:void 0,then:function(o){a.push(o)}}}return cf++,n.then(Np,Np),n}function Np(){if(--cf===0&&ji!==null){ws!==null&&(ws.status="fulfilled");var e=ji;ji=null,_s=0,ws=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Zw(e,n){var a=[],o={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var u=0;u<a.length;u++)(0,a[u])(n)},function(u){for(o.status="rejected",o.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),o}var Dp=j.S;j.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&Iw(e,n),Dp!==null&&Dp(e,n)};var Ua=Y(null);function uf(){var e=Ua.current;return e!==null?e:ct.pooledCache}function bl(e,n){n===null?ee(Ua,Ua.current):ee(Ua,n.pool)}function jp(){var e=uf();return e===null?null:{parent:_t._currentValue,pool:e}}var ki=Error(i(460)),kp=Error(i(474)),xl=Error(i(542)),ff={then:function(){}};function zp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sl(){}function Up(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(Sl,Sl),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Lp(e),e;default:if(typeof n.status=="string")n.then(Sl,Sl);else{if(e=ct,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=o}},function(o){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Lp(e),e}throw zi=n,ki}}var zi=null;function Pp(){if(zi===null)throw Error(i(459));var e=zi;return zi=null,e}function Lp(e){if(e===ki||e===xl)throw Error(i(483))}var Br=!1;function df(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Hr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qr(e,n,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(tt&2)!==0){var u=o.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),o.pending=n,n=hl(e),Ep(e,null,a),n}return dl(e,o,n,a),hl(e)}function Ui(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,Nm(e,a)}}function mf(e,n){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var u=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?u=d=b:d=d.next=b,a=a.next}while(a!==null);d===null?u=d=n:d=d.next=n}else u=d=n;a={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var pf=!1;function Pi(){if(pf){var e=ws;if(e!==null)throw e}}function Li(e,n,a,o){pf=!1;var u=e.updateQueue;Br=!1;var d=u.firstBaseUpdate,b=u.lastBaseUpdate,S=u.shared.pending;if(S!==null){u.shared.pending=null;var T=S,V=T.next;T.next=null,b===null?d=V:b.next=V,b=T;var X=e.alternate;X!==null&&(X=X.updateQueue,S=X.lastBaseUpdate,S!==b&&(S===null?X.firstBaseUpdate=V:S.next=V,X.lastBaseUpdate=T))}if(d!==null){var W=u.baseState;b=0,X=V=T=null,S=d;do{var q=S.lane&-536870913,G=q!==S.lane;if(G?(Xe&q)===q:(o&q)===q){q!==0&&q===_s&&(pf=!0),X!==null&&(X=X.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var je=e,Re=S;q=n;var it=a;switch(Re.tag){case 1:if(je=Re.payload,typeof je=="function"){W=je.call(it,W,q);break e}W=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Re.payload,q=typeof je=="function"?je.call(it,W,q):je,q==null)break e;W=v({},W,q);break e;case 2:Br=!0}}q=S.callback,q!==null&&(e.flags|=64,G&&(e.flags|=8192),G=u.callbacks,G===null?u.callbacks=[q]:G.push(q))}else G={lane:q,tag:S.tag,payload:S.payload,callback:S.callback,next:null},X===null?(V=X=G,T=W):X=X.next=G,b|=q;if(S=S.next,S===null){if(S=u.shared.pending,S===null)break;G=S,S=G.next,G.next=null,u.lastBaseUpdate=G,u.shared.pending=null}}while(!0);X===null&&(T=W),u.baseState=T,u.firstBaseUpdate=V,u.lastBaseUpdate=X,d===null&&(u.shared.lanes=0),Kr|=b,e.lanes=b,e.memoizedState=W}}function Vp(e,n){if(typeof e!="function")throw Error(i(191,e));e.call(n)}function Bp(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Vp(a[e],n)}var Es=Y(null),_l=Y(0);function Hp(e,n){e=Sr,ee(_l,e),ee(Es,n),Sr=e|n.baseLanes}function vf(){ee(_l,Sr),ee(Es,Es.current)}function gf(){Sr=_l.current,oe(Es),oe(_l)}var Gr=0,Ve=null,at=null,bt=null,wl=!1,Cs=!1,Pa=!1,El=0,Vi=0,Ts=null,Yw=0;function pt(){throw Error(i(321))}function yf(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!nn(e[a],n[a]))return!1;return!0}function bf(e,n,a,o,u,d){return Gr=d,Ve=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,j.H=e===null||e.memoizedState===null?Ev:Cv,Pa=!1,d=a(o,u),Pa=!1,Cs&&(d=Gp(n,a,o,u)),qp(e),d}function qp(e){j.H=Ml;var n=at!==null&&at.next!==null;if(Gr=0,bt=at=Ve=null,wl=!1,Vi=0,Ts=null,n)throw Error(i(300));e===null||Ot||(e=e.dependencies,e!==null&&gl(e)&&(Ot=!0))}function Gp(e,n,a,o){Ve=e;var u=0;do{if(Cs&&(Ts=null),Vi=0,Cs=!1,25<=u)throw Error(i(301));if(u+=1,bt=at=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}j.H=e1,d=n(a,o)}while(Cs);return d}function Qw(){var e=j.H,n=e.useState()[0];return n=typeof n.then=="function"?Bi(n):n,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Ve.flags|=1024),n}function xf(){var e=El!==0;return El=0,e}function Sf(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function _f(e){if(wl){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}wl=!1}Gr=0,bt=at=Ve=null,Cs=!1,Vi=El=0,Ts=null}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Ve.memoizedState=bt=e:bt=bt.next=e,bt}function xt(){if(at===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var n=bt===null?Ve.memoizedState:bt.next;if(n!==null)bt=n,at=e;else{if(e===null)throw Ve.alternate===null?Error(i(467)):Error(i(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},bt===null?Ve.memoizedState=bt=e:bt=bt.next=e}return bt}function wf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bi(e){var n=Vi;return Vi+=1,Ts===null&&(Ts=[]),e=Up(Ts,e,n),n=Ve,(bt===null?n.memoizedState:bt.next)===null&&(n=n.alternate,j.H=n===null||n.memoizedState===null?Ev:Cv),e}function Cl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Bi(e);if(e.$$typeof===U)return Vt(e)}throw Error(i(438,String(e)))}function Ef(e){var n=null,a=Ve.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var o=Ve.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=wf(),Ve.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),o=0;o<e;o++)a[o]=ie;return n.index++,a}function pr(e,n){return typeof n=="function"?n(e):n}function Tl(e){var n=xt();return Cf(n,at,e)}function Cf(e,n,a){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var u=e.baseQueue,d=o.pending;if(d!==null){if(u!==null){var b=u.next;u.next=d.next,d.next=b}n.baseQueue=u=d,o.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{n=u.next;var S=b=null,T=null,V=n,X=!1;do{var W=V.lane&-536870913;if(W!==V.lane?(Xe&W)===W:(Gr&W)===W){var q=V.revertLane;if(q===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),W===_s&&(X=!0);else if((Gr&q)===q){V=V.next,q===_s&&(X=!0);continue}else W={lane:0,revertLane:V.revertLane,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},T===null?(S=T=W,b=d):T=T.next=W,Ve.lanes|=q,Kr|=q;W=V.action,Pa&&a(d,W),d=V.hasEagerState?V.eagerState:a(d,W)}else q={lane:W,revertLane:V.revertLane,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},T===null?(S=T=q,b=d):T=T.next=q,Ve.lanes|=W,Kr|=W;V=V.next}while(V!==null&&V!==n);if(T===null?b=d:T.next=S,!nn(d,e.memoizedState)&&(Ot=!0,X&&(a=ws,a!==null)))throw a;e.memoizedState=d,e.baseState=b,e.baseQueue=T,o.lastRenderedState=d}return u===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Tf(e){var n=xt(),a=n.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var o=a.dispatch,u=a.pending,d=n.memoizedState;if(u!==null){a.pending=null;var b=u=u.next;do d=e(d,b.action),b=b.next;while(b!==u);nn(d,n.memoizedState)||(Ot=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,o]}function Fp(e,n,a){var o=Ve,u=xt(),d=et;if(d){if(a===void 0)throw Error(i(407));a=a()}else a=n();var b=!nn((at||u).memoizedState,a);b&&(u.memoizedState=a,Ot=!0),u=u.queue;var S=Yp.bind(null,o,u,e);if(Hi(2048,8,S,[e]),u.getSnapshot!==n||b||bt!==null&&bt.memoizedState.tag&1){if(o.flags|=2048,As(9,Al(),Zp.bind(null,o,u,a,n),null),ct===null)throw Error(i(349));d||(Gr&124)!==0||Ip(o,n,a)}return a}function Ip(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Ve.updateQueue,n===null?(n=wf(),Ve.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Zp(e,n,a,o){n.value=a,n.getSnapshot=o,Qp(n)&&Xp(e)}function Yp(e,n,a){return a(function(){Qp(n)&&Xp(e)})}function Qp(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!nn(e,a)}catch{return!0}}function Xp(e){var n=ys(e,2);n!==null&&cn(n,e,2)}function Af(e){var n=Wt();if(typeof e=="function"){var a=e;if(e=a(),Pa){Qe(!0);try{a()}finally{Qe(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:e},n}function Kp(e,n,a,o){return e.baseState=a,Cf(e,at,typeof o=="function"?o:pr)}function Xw(e,n,a,o,u){if(Ol(e))throw Error(i(485));if(e=n.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};j.T!==null?a(!0):d.isTransition=!1,o(d),a=n.pending,a===null?(d.next=n.pending=d,$p(n,d)):(d.next=a.next,n.pending=a.next=d)}}function $p(e,n){var a=n.action,o=n.payload,u=e.state;if(n.isTransition){var d=j.T,b={};j.T=b;try{var S=a(u,o),T=j.S;T!==null&&T(b,S),Wp(e,n,S)}catch(V){Rf(e,n,V)}finally{j.T=d}}else try{d=a(u,o),Wp(e,n,d)}catch(V){Rf(e,n,V)}}function Wp(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){Jp(e,n,o)},function(o){return Rf(e,n,o)}):Jp(e,n,a)}function Jp(e,n,a){n.status="fulfilled",n.value=a,ev(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,$p(e,a)))}function Rf(e,n,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=a,ev(n),n=n.next;while(n!==o)}e.action=null}function ev(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function tv(e,n){return n}function nv(e,n){if(et){var a=ct.formState;if(a!==null){e:{var o=Ve;if(et){if(ht){t:{for(var u=ht,d=Gn;u.nodeType!==8;){if(!d){u=null;break t}if(u=Mn(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){ht=Mn(u.nextSibling),o=u.data==="F!";break e}}ja(o)}o=!1}o&&(n=a[0])}}return a=Wt(),a.memoizedState=a.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tv,lastRenderedState:n},a.queue=o,a=Sv.bind(null,Ve,o),o.dispatch=a,o=Af(!1),d=jf.bind(null,Ve,!1,o.queue),o=Wt(),u={state:n,dispatch:null,action:e,pending:null},o.queue=u,a=Xw.bind(null,Ve,u,d,a),u.dispatch=a,o.memoizedState=e,[n,a,!1]}function rv(e){var n=xt();return av(n,at,e)}function av(e,n,a){if(n=Cf(e,n,tv)[0],e=Tl(pr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=Bi(n)}catch(b){throw b===ki?xl:b}else o=n;n=xt();var u=n.queue,d=u.dispatch;return a!==n.memoizedState&&(Ve.flags|=2048,As(9,Al(),Kw.bind(null,u,a),null)),[o,d,e]}function Kw(e,n){e.action=n}function sv(e){var n=xt(),a=at;if(a!==null)return av(n,a,e);xt(),n=n.memoizedState,a=xt();var o=a.queue.dispatch;return a.memoizedState=e,[n,o,!1]}function As(e,n,a,o){return e={tag:e,create:a,deps:o,inst:n,next:null},n=Ve.updateQueue,n===null&&(n=wf(),Ve.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,n.lastEffect=e),e}function Al(){return{destroy:void 0,resource:void 0}}function iv(){return xt().memoizedState}function Rl(e,n,a,o){var u=Wt();o=o===void 0?null:o,Ve.flags|=e,u.memoizedState=As(1|n,Al(),a,o)}function Hi(e,n,a,o){var u=xt();o=o===void 0?null:o;var d=u.memoizedState.inst;at!==null&&o!==null&&yf(o,at.memoizedState.deps)?u.memoizedState=As(n,d,a,o):(Ve.flags|=e,u.memoizedState=As(1|n,d,a,o))}function ov(e,n){Rl(8390656,8,e,n)}function lv(e,n){Hi(2048,8,e,n)}function cv(e,n){return Hi(4,2,e,n)}function uv(e,n){return Hi(4,4,e,n)}function fv(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function dv(e,n,a){a=a!=null?a.concat([e]):null,Hi(4,4,fv.bind(null,n,e),a)}function Of(){}function hv(e,n){var a=xt();n=n===void 0?null:n;var o=a.memoizedState;return n!==null&&yf(n,o[1])?o[0]:(a.memoizedState=[e,n],e)}function mv(e,n){var a=xt();n=n===void 0?null:n;var o=a.memoizedState;if(n!==null&&yf(n,o[1]))return o[0];if(o=e(),Pa){Qe(!0);try{e()}finally{Qe(!1)}}return a.memoizedState=[o,n],o}function Mf(e,n,a){return a===void 0||(Gr&1073741824)!==0?e.memoizedState=n:(e.memoizedState=a,e=gg(),Ve.lanes|=e,Kr|=e,a)}function pv(e,n,a,o){return nn(a,n)?a:Es.current!==null?(e=Mf(e,a,o),nn(e,n)||(Ot=!0),e):(Gr&42)===0?(Ot=!0,e.memoizedState=a):(e=gg(),Ve.lanes|=e,Kr|=e,n)}function vv(e,n,a,o,u){var d=Q.p;Q.p=d!==0&&8>d?d:8;var b=j.T,S={};j.T=S,jf(e,!1,n,a);try{var T=u(),V=j.S;if(V!==null&&V(S,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var X=Zw(T,o);qi(e,n,X,ln(e))}else qi(e,n,o,ln(e))}catch(W){qi(e,n,{then:function(){},status:"rejected",reason:W},ln())}finally{Q.p=d,j.T=b}}function $w(){}function Nf(e,n,a,o){if(e.tag!==5)throw Error(i(476));var u=gv(e).queue;vv(e,u,n,H,a===null?$w:function(){return yv(e),a(o)})}function gv(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:H},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function yv(e){var n=gv(e).next.queue;qi(e,n,{},ln())}function Df(){return Vt(io)}function bv(){return xt().memoizedState}function xv(){return xt().memoizedState}function Ww(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=ln();e=Hr(a);var o=qr(n,e,a);o!==null&&(cn(o,n,a),Ui(o,n,a)),n={cache:lf()},e.payload=n;return}n=n.return}}function Jw(e,n,a){var o=ln();a={lane:o,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Ol(e)?_v(n,a):(a=$u(e,n,a,o),a!==null&&(cn(a,e,o),wv(a,n,o)))}function Sv(e,n,a){var o=ln();qi(e,n,a,o)}function qi(e,n,a,o){var u={lane:o,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ol(e))_v(n,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var b=n.lastRenderedState,S=d(b,a);if(u.hasEagerState=!0,u.eagerState=S,nn(S,b))return dl(e,n,u,0),ct===null&&fl(),!1}catch{}finally{}if(a=$u(e,n,u,o),a!==null)return cn(a,e,o),wv(a,n,o),!0}return!1}function jf(e,n,a,o){if(o={lane:2,revertLane:fd(),action:o,hasEagerState:!1,eagerState:null,next:null},Ol(e)){if(n)throw Error(i(479))}else n=$u(e,a,o,2),n!==null&&cn(n,e,2)}function Ol(e){var n=e.alternate;return e===Ve||n!==null&&n===Ve}function _v(e,n){Cs=wl=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function wv(e,n,a){if((a&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,Nm(e,a)}}var Ml={readContext:Vt,use:Cl,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt},Ev={readContext:Vt,use:Cl,useCallback:function(e,n){return Wt().memoizedState=[e,n===void 0?null:n],e},useContext:Vt,useEffect:ov,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,Rl(4194308,4,fv.bind(null,n,e),a)},useLayoutEffect:function(e,n){return Rl(4194308,4,e,n)},useInsertionEffect:function(e,n){Rl(4,2,e,n)},useMemo:function(e,n){var a=Wt();n=n===void 0?null:n;var o=e();if(Pa){Qe(!0);try{e()}finally{Qe(!1)}}return a.memoizedState=[o,n],o},useReducer:function(e,n,a){var o=Wt();if(a!==void 0){var u=a(n);if(Pa){Qe(!0);try{a(n)}finally{Qe(!1)}}}else u=n;return o.memoizedState=o.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},o.queue=e,e=e.dispatch=Jw.bind(null,Ve,e),[o.memoizedState,e]},useRef:function(e){var n=Wt();return e={current:e},n.memoizedState=e},useState:function(e){e=Af(e);var n=e.queue,a=Sv.bind(null,Ve,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Of,useDeferredValue:function(e,n){var a=Wt();return Mf(a,e,n)},useTransition:function(){var e=Af(!1);return e=vv.bind(null,Ve,e.queue,!0,!1),Wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var o=Ve,u=Wt();if(et){if(a===void 0)throw Error(i(407));a=a()}else{if(a=n(),ct===null)throw Error(i(349));(Xe&124)!==0||Ip(o,n,a)}u.memoizedState=a;var d={value:a,getSnapshot:n};return u.queue=d,ov(Yp.bind(null,o,d,e),[e]),o.flags|=2048,As(9,Al(),Zp.bind(null,o,d,a,n),null),a},useId:function(){var e=Wt(),n=ct.identifierPrefix;if(et){var a=dr,o=fr;a=(o&~(1<<32-lt(o)-1)).toString(32)+a,n="«"+n+"R"+a,a=El++,0<a&&(n+="H"+a.toString(32)),n+="»"}else a=Yw++,n="«"+n+"r"+a.toString(32)+"»";return e.memoizedState=n},useHostTransitionStatus:Df,useFormState:nv,useActionState:nv,useOptimistic:function(e){var n=Wt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=jf.bind(null,Ve,!0,a),a.dispatch=n,[e,n]},useMemoCache:Ef,useCacheRefresh:function(){return Wt().memoizedState=Ww.bind(null,Ve)}},Cv={readContext:Vt,use:Cl,useCallback:hv,useContext:Vt,useEffect:lv,useImperativeHandle:dv,useInsertionEffect:cv,useLayoutEffect:uv,useMemo:mv,useReducer:Tl,useRef:iv,useState:function(){return Tl(pr)},useDebugValue:Of,useDeferredValue:function(e,n){var a=xt();return pv(a,at.memoizedState,e,n)},useTransition:function(){var e=Tl(pr)[0],n=xt().memoizedState;return[typeof e=="boolean"?e:Bi(e),n]},useSyncExternalStore:Fp,useId:bv,useHostTransitionStatus:Df,useFormState:rv,useActionState:rv,useOptimistic:function(e,n){var a=xt();return Kp(a,at,e,n)},useMemoCache:Ef,useCacheRefresh:xv},e1={readContext:Vt,use:Cl,useCallback:hv,useContext:Vt,useEffect:lv,useImperativeHandle:dv,useInsertionEffect:cv,useLayoutEffect:uv,useMemo:mv,useReducer:Tf,useRef:iv,useState:function(){return Tf(pr)},useDebugValue:Of,useDeferredValue:function(e,n){var a=xt();return at===null?Mf(a,e,n):pv(a,at.memoizedState,e,n)},useTransition:function(){var e=Tf(pr)[0],n=xt().memoizedState;return[typeof e=="boolean"?e:Bi(e),n]},useSyncExternalStore:Fp,useId:bv,useHostTransitionStatus:Df,useFormState:sv,useActionState:sv,useOptimistic:function(e,n){var a=xt();return at!==null?Kp(a,at,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Ef,useCacheRefresh:xv},Rs=null,Gi=0;function Nl(e){var n=Gi;return Gi+=1,Rs===null&&(Rs=[]),Up(Rs,e,n)}function Fi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Dl(e,n){throw n.$$typeof===x?Error(i(525)):(e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Tv(e){var n=e._init;return n(e._payload)}function Av(e){function n(P,D){if(e){var L=P.deletions;L===null?(P.deletions=[D],P.flags|=16):L.push(D)}}function a(P,D){if(!e)return null;for(;D!==null;)n(P,D),D=D.sibling;return null}function o(P){for(var D=new Map;P!==null;)P.key!==null?D.set(P.key,P):D.set(P.index,P),P=P.sibling;return D}function u(P,D){return P=ur(P,D),P.index=0,P.sibling=null,P}function d(P,D,L){return P.index=L,e?(L=P.alternate,L!==null?(L=L.index,L<D?(P.flags|=67108866,D):L):(P.flags|=67108866,D)):(P.flags|=1048576,D)}function b(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function S(P,D,L,$){return D===null||D.tag!==6?(D=Ju(L,P.mode,$),D.return=P,D):(D=u(D,L),D.return=P,D)}function T(P,D,L,$){var be=L.type;return be===R?X(P,D,L.props.children,$,L.key):D!==null&&(D.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===I&&Tv(be)===D.type)?(D=u(D,L.props),Fi(D,L),D.return=P,D):(D=ml(L.type,L.key,L.props,null,P.mode,$),Fi(D,L),D.return=P,D)}function V(P,D,L,$){return D===null||D.tag!==4||D.stateNode.containerInfo!==L.containerInfo||D.stateNode.implementation!==L.implementation?(D=ef(L,P.mode,$),D.return=P,D):(D=u(D,L.children||[]),D.return=P,D)}function X(P,D,L,$,be){return D===null||D.tag!==7?(D=Oa(L,P.mode,$,be),D.return=P,D):(D=u(D,L),D.return=P,D)}function W(P,D,L){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Ju(""+D,P.mode,L),D.return=P,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case _:return L=ml(D.type,D.key,D.props,null,P.mode,L),Fi(L,D),L.return=P,L;case E:return D=ef(D,P.mode,L),D.return=P,D;case I:var $=D._init;return D=$(D._payload),W(P,D,L)}if(pe(D)||ae(D))return D=Oa(D,P.mode,L,null),D.return=P,D;if(typeof D.then=="function")return W(P,Nl(D),L);if(D.$$typeof===U)return W(P,yl(P,D),L);Dl(P,D)}return null}function q(P,D,L,$){var be=D!==null?D.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return be!==null?null:S(P,D,""+L,$);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case _:return L.key===be?T(P,D,L,$):null;case E:return L.key===be?V(P,D,L,$):null;case I:return be=L._init,L=be(L._payload),q(P,D,L,$)}if(pe(L)||ae(L))return be!==null?null:X(P,D,L,$,null);if(typeof L.then=="function")return q(P,D,Nl(L),$);if(L.$$typeof===U)return q(P,D,yl(P,L),$);Dl(P,L)}return null}function G(P,D,L,$,be){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return P=P.get(L)||null,S(D,P,""+$,be);if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return P=P.get($.key===null?L:$.key)||null,T(D,P,$,be);case E:return P=P.get($.key===null?L:$.key)||null,V(D,P,$,be);case I:var qe=$._init;return $=qe($._payload),G(P,D,L,$,be)}if(pe($)||ae($))return P=P.get(L)||null,X(D,P,$,be,null);if(typeof $.then=="function")return G(P,D,L,Nl($),be);if($.$$typeof===U)return G(P,D,L,yl(D,$),be);Dl(D,$)}return null}function je(P,D,L,$){for(var be=null,qe=null,Ce=D,Me=D=0,Nt=null;Ce!==null&&Me<L.length;Me++){Ce.index>Me?(Nt=Ce,Ce=null):Nt=Ce.sibling;var Je=q(P,Ce,L[Me],$);if(Je===null){Ce===null&&(Ce=Nt);break}e&&Ce&&Je.alternate===null&&n(P,Ce),D=d(Je,D,Me),qe===null?be=Je:qe.sibling=Je,qe=Je,Ce=Nt}if(Me===L.length)return a(P,Ce),et&&Na(P,Me),be;if(Ce===null){for(;Me<L.length;Me++)Ce=W(P,L[Me],$),Ce!==null&&(D=d(Ce,D,Me),qe===null?be=Ce:qe.sibling=Ce,qe=Ce);return et&&Na(P,Me),be}for(Ce=o(Ce);Me<L.length;Me++)Nt=G(Ce,P,Me,L[Me],$),Nt!==null&&(e&&Nt.alternate!==null&&Ce.delete(Nt.key===null?Me:Nt.key),D=d(Nt,D,Me),qe===null?be=Nt:qe.sibling=Nt,qe=Nt);return e&&Ce.forEach(function(sa){return n(P,sa)}),et&&Na(P,Me),be}function Re(P,D,L,$){if(L==null)throw Error(i(151));for(var be=null,qe=null,Ce=D,Me=D=0,Nt=null,Je=L.next();Ce!==null&&!Je.done;Me++,Je=L.next()){Ce.index>Me?(Nt=Ce,Ce=null):Nt=Ce.sibling;var sa=q(P,Ce,Je.value,$);if(sa===null){Ce===null&&(Ce=Nt);break}e&&Ce&&sa.alternate===null&&n(P,Ce),D=d(sa,D,Me),qe===null?be=sa:qe.sibling=sa,qe=sa,Ce=Nt}if(Je.done)return a(P,Ce),et&&Na(P,Me),be;if(Ce===null){for(;!Je.done;Me++,Je=L.next())Je=W(P,Je.value,$),Je!==null&&(D=d(Je,D,Me),qe===null?be=Je:qe.sibling=Je,qe=Je);return et&&Na(P,Me),be}for(Ce=o(Ce);!Je.done;Me++,Je=L.next())Je=G(Ce,P,Me,Je.value,$),Je!==null&&(e&&Je.alternate!==null&&Ce.delete(Je.key===null?Me:Je.key),D=d(Je,D,Me),qe===null?be=Je:qe.sibling=Je,qe=Je);return e&&Ce.forEach(function(tE){return n(P,tE)}),et&&Na(P,Me),be}function it(P,D,L,$){if(typeof L=="object"&&L!==null&&L.type===R&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case _:e:{for(var be=L.key;D!==null;){if(D.key===be){if(be=L.type,be===R){if(D.tag===7){a(P,D.sibling),$=u(D,L.props.children),$.return=P,P=$;break e}}else if(D.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===I&&Tv(be)===D.type){a(P,D.sibling),$=u(D,L.props),Fi($,L),$.return=P,P=$;break e}a(P,D);break}else n(P,D);D=D.sibling}L.type===R?($=Oa(L.props.children,P.mode,$,L.key),$.return=P,P=$):($=ml(L.type,L.key,L.props,null,P.mode,$),Fi($,L),$.return=P,P=$)}return b(P);case E:e:{for(be=L.key;D!==null;){if(D.key===be)if(D.tag===4&&D.stateNode.containerInfo===L.containerInfo&&D.stateNode.implementation===L.implementation){a(P,D.sibling),$=u(D,L.children||[]),$.return=P,P=$;break e}else{a(P,D);break}else n(P,D);D=D.sibling}$=ef(L,P.mode,$),$.return=P,P=$}return b(P);case I:return be=L._init,L=be(L._payload),it(P,D,L,$)}if(pe(L))return je(P,D,L,$);if(ae(L)){if(be=ae(L),typeof be!="function")throw Error(i(150));return L=be.call(L),Re(P,D,L,$)}if(typeof L.then=="function")return it(P,D,Nl(L),$);if(L.$$typeof===U)return it(P,D,yl(P,L),$);Dl(P,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,D!==null&&D.tag===6?(a(P,D.sibling),$=u(D,L),$.return=P,P=$):(a(P,D),$=Ju(L,P.mode,$),$.return=P,P=$),b(P)):a(P,D)}return function(P,D,L,$){try{Gi=0;var be=it(P,D,L,$);return Rs=null,be}catch(Ce){if(Ce===ki||Ce===xl)throw Ce;var qe=rn(29,Ce,null,P.mode);return qe.lanes=$,qe.return=P,qe}finally{}}}var Os=Av(!0),Rv=Av(!1),xn=Y(null),Fn=null;function Fr(e){var n=e.alternate;ee(wt,wt.current&1),ee(xn,e),Fn===null&&(n===null||Es.current!==null||n.memoizedState!==null)&&(Fn=e)}function Ov(e){if(e.tag===22){if(ee(wt,wt.current),ee(xn,e),Fn===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(Fn=e)}}else Ir()}function Ir(){ee(wt,wt.current),ee(xn,xn.current)}function vr(e){oe(xn),Fn===e&&(Fn=null),oe(wt)}var wt=Y(0);function jl(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||wd(a)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function kf(e,n,a,o){n=e.memoizedState,a=a(o,n),a=a==null?n:v({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var zf={enqueueSetState:function(e,n,a){e=e._reactInternals;var o=ln(),u=Hr(o);u.payload=n,a!=null&&(u.callback=a),n=qr(e,u,o),n!==null&&(cn(n,e,o),Ui(n,e,o))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var o=ln(),u=Hr(o);u.tag=1,u.payload=n,a!=null&&(u.callback=a),n=qr(e,u,o),n!==null&&(cn(n,e,o),Ui(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=ln(),o=Hr(a);o.tag=2,n!=null&&(o.callback=n),n=qr(e,o,a),n!==null&&(cn(n,e,a),Ui(n,e,a))}};function Mv(e,n,a,o,u,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,b):n.prototype&&n.prototype.isPureReactComponent?!Ti(a,o)||!Ti(u,d):!0}function Nv(e,n,a,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==e&&zf.enqueueReplaceState(n,n.state,null)}function La(e,n){var a=n;if("ref"in n){a={};for(var o in n)o!=="ref"&&(a[o]=n[o])}if(e=e.defaultProps){a===n&&(a=v({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}var kl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Dv(e){kl(e)}function jv(e){console.error(e)}function kv(e){kl(e)}function zl(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function zv(e,n,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Uf(e,n,a){return a=Hr(a),a.tag=3,a.payload={element:null},a.callback=function(){zl(e,n)},a}function Uv(e){return e=Hr(e),e.tag=3,e}function Pv(e,n,a,o){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var d=o.value;e.payload=function(){return u(d)},e.callback=function(){zv(n,a,o)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){zv(n,a,o),typeof u!="function"&&($r===null?$r=new Set([this]):$r.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function t1(e,n,a,o,u){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=a.alternate,n!==null&&Ni(n,a,u,!0),a=xn.current,a!==null){switch(a.tag){case 13:return Fn===null?id():a.alternate===null&&mt===0&&(mt=3),a.flags&=-257,a.flags|=65536,a.lanes=u,o===ff?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([o]):n.add(o),ld(e,o,u)),!1;case 22:return a.flags|=65536,o===ff?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([o]):a.add(o)),ld(e,o,u)),!1}throw Error(i(435,a.tag))}return ld(e,o,u),id(),!1}if(et)return n=xn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,o!==rf&&(e=Error(i(422),{cause:o}),Mi(vn(e,a)))):(o!==rf&&(n=Error(i(423),{cause:o}),Mi(vn(n,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,o=vn(o,a),u=Uf(e.stateNode,o,u),mf(e,u),mt!==4&&(mt=2)),!1;var d=Error(i(520),{cause:o});if(d=vn(d,a),$i===null?$i=[d]:$i.push(d),mt!==4&&(mt=2),n===null)return!0;o=vn(o,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=Uf(a.stateNode,o,e),mf(a,e),!1;case 1:if(n=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&($r===null||!$r.has(d))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Uv(u),Pv(u,e,a,o),mf(a,u),!1}a=a.return}while(a!==null);return!1}var Lv=Error(i(461)),Ot=!1;function Dt(e,n,a,o){n.child=e===null?Rv(n,null,a,o):Os(n,e.child,a,o)}function Vv(e,n,a,o,u){a=a.render;var d=n.ref;if("ref"in o){var b={};for(var S in o)S!=="ref"&&(b[S]=o[S])}else b=o;return za(n),o=bf(e,n,a,b,d,u),S=xf(),e!==null&&!Ot?(Sf(e,n,u),gr(e,n,u)):(et&&S&&tf(n),n.flags|=1,Dt(e,n,o,u),n.child)}function Bv(e,n,a,o,u){if(e===null){var d=a.type;return typeof d=="function"&&!Wu(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,Hv(e,n,d,o,u)):(e=ml(a.type,null,o,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!Ff(e,u)){var b=d.memoizedProps;if(a=a.compare,a=a!==null?a:Ti,a(b,o)&&e.ref===n.ref)return gr(e,n,u)}return n.flags|=1,e=ur(d,o),e.ref=n.ref,e.return=n,n.child=e}function Hv(e,n,a,o,u){if(e!==null){var d=e.memoizedProps;if(Ti(d,o)&&e.ref===n.ref)if(Ot=!1,n.pendingProps=o=d,Ff(e,u))(e.flags&131072)!==0&&(Ot=!0);else return n.lanes=e.lanes,gr(e,n,u)}return Pf(e,n,a,o,u)}function qv(e,n,a){var o=n.pendingProps,u=o.children,d=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((n.flags&128)!==0){if(o=d!==null?d.baseLanes|a:a,e!==null){for(u=n.child=e.child,d=0;u!==null;)d=d|u.lanes|u.childLanes,u=u.sibling;n.childLanes=d&~o}else n.childLanes=0,n.child=null;return Gv(e,n,o,a)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&bl(n,d!==null?d.cachePool:null),d!==null?Hp(n,d):vf(),Ov(n);else return n.lanes=n.childLanes=536870912,Gv(e,n,d!==null?d.baseLanes|a:a,a)}else d!==null?(bl(n,d.cachePool),Hp(n,d),Ir(),n.memoizedState=null):(e!==null&&bl(n,null),vf(),Ir());return Dt(e,n,u,a),n.child}function Gv(e,n,a,o){var u=uf();return u=u===null?null:{parent:_t._currentValue,pool:u},n.memoizedState={baseLanes:a,cachePool:u},e!==null&&bl(n,null),vf(),Ov(n),e!==null&&Ni(e,n,o,!0),null}function Ul(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function Pf(e,n,a,o,u){return za(n),a=bf(e,n,a,o,void 0,u),o=xf(),e!==null&&!Ot?(Sf(e,n,u),gr(e,n,u)):(et&&o&&tf(n),n.flags|=1,Dt(e,n,a,u),n.child)}function Fv(e,n,a,o,u,d){return za(n),n.updateQueue=null,a=Gp(n,o,a,u),qp(e),o=xf(),e!==null&&!Ot?(Sf(e,n,d),gr(e,n,d)):(et&&o&&tf(n),n.flags|=1,Dt(e,n,a,d),n.child)}function Iv(e,n,a,o,u){if(za(n),n.stateNode===null){var d=bs,b=a.contextType;typeof b=="object"&&b!==null&&(d=Vt(b)),d=new a(o,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=zf,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=o,d.state=n.memoizedState,d.refs={},df(n),b=a.contextType,d.context=typeof b=="object"&&b!==null?Vt(b):bs,d.state=n.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(kf(n,a,b,o),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&zf.enqueueReplaceState(d,d.state,null),Li(n,o,d,u),Pi(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){d=n.stateNode;var S=n.memoizedProps,T=La(a,S);d.props=T;var V=d.context,X=a.contextType;b=bs,typeof X=="object"&&X!==null&&(b=Vt(X));var W=a.getDerivedStateFromProps;X=typeof W=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=n.pendingProps!==S,X||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||V!==b)&&Nv(n,d,o,b),Br=!1;var q=n.memoizedState;d.state=q,Li(n,o,d,u),Pi(),V=n.memoizedState,S||q!==V||Br?(typeof W=="function"&&(kf(n,a,W,o),V=n.memoizedState),(T=Br||Mv(n,a,T,o,q,V,b))?(X||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=V),d.props=o,d.state=V,d.context=b,o=T):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{d=n.stateNode,hf(e,n),b=n.memoizedProps,X=La(a,b),d.props=X,W=n.pendingProps,q=d.context,V=a.contextType,T=bs,typeof V=="object"&&V!==null&&(T=Vt(V)),S=a.getDerivedStateFromProps,(V=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==W||q!==T)&&Nv(n,d,o,T),Br=!1,q=n.memoizedState,d.state=q,Li(n,o,d,u),Pi();var G=n.memoizedState;b!==W||q!==G||Br||e!==null&&e.dependencies!==null&&gl(e.dependencies)?(typeof S=="function"&&(kf(n,a,S,o),G=n.memoizedState),(X=Br||Mv(n,a,X,o,q,G,T)||e!==null&&e.dependencies!==null&&gl(e.dependencies))?(V||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,G,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,G,T)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=G),d.props=o,d.state=G,d.context=T,o=X):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),o=!1)}return d=o,Ul(e,n),o=(n.flags&128)!==0,d||o?(d=n.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&o?(n.child=Os(n,e.child,null,u),n.child=Os(n,null,a,u)):Dt(e,n,a,u),n.memoizedState=d.state,e=n.child):e=gr(e,n,u),e}function Zv(e,n,a,o){return Oi(),n.flags|=256,Dt(e,n,a,o),n.child}var Lf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vf(e){return{baseLanes:e,cachePool:jp()}}function Bf(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=Sn),e}function Yv(e,n,a){var o=n.pendingProps,u=!1,d=(n.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),b&&(u=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(et){if(u?Fr(n):Ir(),et){var S=ht,T;if(T=S){e:{for(T=S,S=Gn;T.nodeType!==8;){if(!S){S=null;break e}if(T=Mn(T.nextSibling),T===null){S=null;break e}}S=T}S!==null?(n.memoizedState={dehydrated:S,treeContext:Ma!==null?{id:fr,overflow:dr}:null,retryLane:536870912,hydrationErrors:null},T=rn(18,null,null,0),T.stateNode=S,T.return=n,n.child=T,Gt=n,ht=null,T=!0):T=!1}T||ja(n)}if(S=n.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return wd(S)?n.lanes=32:n.lanes=536870912,null;vr(n)}return S=o.children,o=o.fallback,u?(Ir(),u=n.mode,S=Pl({mode:"hidden",children:S},u),o=Oa(o,u,a,null),S.return=n,o.return=n,S.sibling=o,n.child=S,u=n.child,u.memoizedState=Vf(a),u.childLanes=Bf(e,b,a),n.memoizedState=Lf,o):(Fr(n),Hf(n,S))}if(T=e.memoizedState,T!==null&&(S=T.dehydrated,S!==null)){if(d)n.flags&256?(Fr(n),n.flags&=-257,n=qf(e,n,a)):n.memoizedState!==null?(Ir(),n.child=e.child,n.flags|=128,n=null):(Ir(),u=o.fallback,S=n.mode,o=Pl({mode:"visible",children:o.children},S),u=Oa(u,S,a,null),u.flags|=2,o.return=n,u.return=n,o.sibling=u,n.child=o,Os(n,e.child,null,a),o=n.child,o.memoizedState=Vf(a),o.childLanes=Bf(e,b,a),n.memoizedState=Lf,n=u);else if(Fr(n),wd(S)){if(b=S.nextSibling&&S.nextSibling.dataset,b)var V=b.dgst;b=V,o=Error(i(419)),o.stack="",o.digest=b,Mi({value:o,source:null,stack:null}),n=qf(e,n,a)}else if(Ot||Ni(e,n,a,!1),b=(a&e.childLanes)!==0,Ot||b){if(b=ct,b!==null&&(o=a&-a,o=(o&42)!==0?1:wu(o),o=(o&(b.suspendedLanes|a))!==0?0:o,o!==0&&o!==T.retryLane))throw T.retryLane=o,ys(e,o),cn(b,e,o),Lv;S.data==="$?"||id(),n=qf(e,n,a)}else S.data==="$?"?(n.flags|=192,n.child=e.child,n=null):(e=T.treeContext,ht=Mn(S.nextSibling),Gt=n,et=!0,Da=null,Gn=!1,e!==null&&(yn[bn++]=fr,yn[bn++]=dr,yn[bn++]=Ma,fr=e.id,dr=e.overflow,Ma=n),n=Hf(n,o.children),n.flags|=4096);return n}return u?(Ir(),u=o.fallback,S=n.mode,T=e.child,V=T.sibling,o=ur(T,{mode:"hidden",children:o.children}),o.subtreeFlags=T.subtreeFlags&65011712,V!==null?u=ur(V,u):(u=Oa(u,S,a,null),u.flags|=2),u.return=n,o.return=n,o.sibling=u,n.child=o,o=u,u=n.child,S=e.child.memoizedState,S===null?S=Vf(a):(T=S.cachePool,T!==null?(V=_t._currentValue,T=T.parent!==V?{parent:V,pool:V}:T):T=jp(),S={baseLanes:S.baseLanes|a,cachePool:T}),u.memoizedState=S,u.childLanes=Bf(e,b,a),n.memoizedState=Lf,o):(Fr(n),a=e.child,e=a.sibling,a=ur(a,{mode:"visible",children:o.children}),a.return=n,a.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=a,n.memoizedState=null,a)}function Hf(e,n){return n=Pl({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Pl(e,n){return e=rn(22,e,null,n),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function qf(e,n,a){return Os(n,e.child,null,a),e=Hf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Qv(e,n,a){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),sf(e.return,n,a)}function Gf(e,n,a,o,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:u}:(d.isBackwards=n,d.rendering=null,d.renderingStartTime=0,d.last=o,d.tail=a,d.tailMode=u)}function Xv(e,n,a){var o=n.pendingProps,u=o.revealOrder,d=o.tail;if(Dt(e,n,o.children,a),o=wt.current,(o&2)!==0)o=o&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qv(e,a,n);else if(e.tag===19)Qv(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}switch(ee(wt,o),u){case"forwards":for(a=n.child,u=null;a!==null;)e=a.alternate,e!==null&&jl(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=n.child,n.child=null):(u=a.sibling,a.sibling=null),Gf(n,!1,u,a,d);break;case"backwards":for(a=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&jl(e)===null){n.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Gf(n,!0,a,null,d);break;case"together":Gf(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function gr(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Kr|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ni(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,a=ur(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=ur(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function Ff(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&gl(e)))}function n1(e,n,a){switch(n.tag){case 3:Te(n,n.stateNode.containerInfo),Vr(n,_t,e.memoizedState.cache),Oi();break;case 27:case 5:He(n);break;case 4:Te(n,n.stateNode.containerInfo);break;case 10:Vr(n,n.type,n.memoizedProps.value);break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Fr(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Yv(e,n,a):(Fr(n),e=gr(e,n,a),e!==null?e.sibling:null);Fr(n);break;case 19:var u=(e.flags&128)!==0;if(o=(a&n.childLanes)!==0,o||(Ni(e,n,a,!1),o=(a&n.childLanes)!==0),u){if(o)return Xv(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ee(wt,wt.current),o)break;return null;case 22:case 23:return n.lanes=0,qv(e,n,a);case 24:Vr(n,_t,e.memoizedState.cache)}return gr(e,n,a)}function Kv(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)Ot=!0;else{if(!Ff(e,a)&&(n.flags&128)===0)return Ot=!1,n1(e,n,a);Ot=(e.flags&131072)!==0}else Ot=!1,et&&(n.flags&1048576)!==0&&Tp(n,vl,n.index);switch(n.lanes=0,n.tag){case 16:e:{e=n.pendingProps;var o=n.elementType,u=o._init;if(o=u(o._payload),n.type=o,typeof o=="function")Wu(o)?(e=La(o,e),n.tag=1,n=Iv(null,n,o,e,a)):(n.tag=0,n=Pf(null,n,o,e,a));else{if(o!=null){if(u=o.$$typeof,u===k){n.tag=11,n=Vv(null,n,o,e,a);break e}else if(u===F){n.tag=14,n=Bv(null,n,o,e,a);break e}}throw n=ce(o)||o,Error(i(306,n,""))}}return n;case 0:return Pf(e,n,n.type,n.pendingProps,a);case 1:return o=n.type,u=La(o,n.pendingProps),Iv(e,n,o,u,a);case 3:e:{if(Te(n,n.stateNode.containerInfo),e===null)throw Error(i(387));o=n.pendingProps;var d=n.memoizedState;u=d.element,hf(e,n),Li(n,o,null,a);var b=n.memoizedState;if(o=b.cache,Vr(n,_t,o),o!==d.cache&&of(n,[_t],a,!0),Pi(),o=b.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=Zv(e,n,o,a);break e}else if(o!==u){u=vn(Error(i(424)),n),Mi(u),n=Zv(e,n,o,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ht=Mn(e.firstChild),Gt=n,et=!0,Da=null,Gn=!0,a=Rv(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Oi(),o===u){n=gr(e,n,a);break e}Dt(e,n,o,a)}n=n.child}return n;case 26:return Ul(e,n),e===null?(a=ey(n.type,null,n.pendingProps,null))?n.memoizedState=a:et||(a=n.type,e=n.pendingProps,o=$l(_e.current).createElement(a),o[Lt]=n,o[Kt]=e,kt(o,a,e),Rt(o),n.stateNode=o):n.memoizedState=ey(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return He(n),e===null&&et&&(o=n.stateNode=$g(n.type,n.pendingProps,_e.current),Gt=n,Gn=!0,u=ht,ea(n.type)?(Ed=u,ht=Mn(o.firstChild)):ht=u),Dt(e,n,n.pendingProps.children,a),Ul(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&et&&((u=o=ht)&&(o=M1(o,n.type,n.pendingProps,Gn),o!==null?(n.stateNode=o,Gt=n,ht=Mn(o.firstChild),Gn=!1,u=!0):u=!1),u||ja(n)),He(n),u=n.type,d=n.pendingProps,b=e!==null?e.memoizedProps:null,o=d.children,xd(u,d)?o=null:b!==null&&xd(u,b)&&(n.flags|=32),n.memoizedState!==null&&(u=bf(e,n,Qw,null,null,a),io._currentValue=u),Ul(e,n),Dt(e,n,o,a),n.child;case 6:return e===null&&et&&((e=a=ht)&&(a=N1(a,n.pendingProps,Gn),a!==null?(n.stateNode=a,Gt=n,ht=null,e=!0):e=!1),e||ja(n)),null;case 13:return Yv(e,n,a);case 4:return Te(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=Os(n,null,o,a):Dt(e,n,o,a),n.child;case 11:return Vv(e,n,n.type,n.pendingProps,a);case 7:return Dt(e,n,n.pendingProps,a),n.child;case 8:return Dt(e,n,n.pendingProps.children,a),n.child;case 12:return Dt(e,n,n.pendingProps.children,a),n.child;case 10:return o=n.pendingProps,Vr(n,n.type,o.value),Dt(e,n,o.children,a),n.child;case 9:return u=n.type._context,o=n.pendingProps.children,za(n),u=Vt(u),o=o(u),n.flags|=1,Dt(e,n,o,a),n.child;case 14:return Bv(e,n,n.type,n.pendingProps,a);case 15:return Hv(e,n,n.type,n.pendingProps,a);case 19:return Xv(e,n,a);case 31:return o=n.pendingProps,a=n.mode,o={mode:o.mode,children:o.children},e===null?(a=Pl(o,a),a.ref=n.ref,n.child=a,a.return=n,n=a):(a=ur(e.child,o),a.ref=n.ref,n.child=a,a.return=n,n=a),n;case 22:return qv(e,n,a);case 24:return za(n),o=Vt(_t),e===null?(u=uf(),u===null&&(u=ct,d=lf(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=a),u=d),n.memoizedState={parent:o,cache:u},df(n),Vr(n,_t,u)):((e.lanes&a)!==0&&(hf(e,n),Li(n,null,null,a),Pi()),u=e.memoizedState,d=n.memoizedState,u.parent!==o?(u={parent:o,cache:o},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),Vr(n,_t,o)):(o=d.cache,Vr(n,_t,o),o!==u.cache&&of(n,[_t],a,!0))),Dt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function yr(e){e.flags|=4}function $v(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sy(n)){if(n=xn.current,n!==null&&((Xe&4194048)===Xe?Fn!==null:(Xe&62914560)!==Xe&&(Xe&536870912)===0||n!==Fn))throw zi=ff,kp;e.flags|=8192}}function Ll(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Om():536870912,e.lanes|=n,js|=n)}function Ii(e,n){if(!et)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ft(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(n)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,o|=u.subtreeFlags&65011712,o|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=a,n}function r1(e,n,a){var o=n.pendingProps;switch(nf(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(n),null;case 1:return ft(n),null;case 3:return a=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),mr(_t),$e(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ri(n)?yr(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Op())),ft(n),null;case 26:return a=n.memoizedState,e===null?(yr(n),a!==null?(ft(n),$v(n,a)):(ft(n),n.flags&=-16777217)):a?a!==e.memoizedState?(yr(n),ft(n),$v(n,a)):(ft(n),n.flags&=-16777217):(e.memoizedProps!==o&&yr(n),ft(n),n.flags&=-16777217),null;case 27:Ye(n),a=_e.current;var u=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==o&&yr(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return ft(n),null}e=ue.current,Ri(n)?Ap(n):(e=$g(u,o,a),n.stateNode=e,yr(n))}return ft(n),null;case 5:if(Ye(n),a=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&yr(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return ft(n),null}if(e=ue.current,Ri(n))Ap(n);else{switch(u=$l(_e.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?u.createElement("select",{is:o.is}):u.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?u.createElement(a,{is:o.is}):u.createElement(a)}}e[Lt]=n,e[Kt]=o;e:for(u=n.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===n)break e;for(;u.sibling===null;){if(u.return===null||u.return===n)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}n.stateNode=e;e:switch(kt(e,a,o),a){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&yr(n)}}return ft(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&yr(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(i(166));if(e=_e.current,Ri(n)){if(e=n.stateNode,a=n.memoizedProps,o=null,u=Gt,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}e[Lt]=n,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||Fg(e.nodeValue,a)),e||ja(n)}else e=$l(e).createTextNode(o),e[Lt]=n,n.stateNode=e}return ft(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Ri(n),o!==null&&o.dehydrated!==null){if(e===null){if(!u)throw Error(i(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(i(317));u[Lt]=n}else Oi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),u=!1}else u=Op(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(vr(n),n):(vr(n),null)}if(vr(n),(n.flags&128)!==0)return n.lanes=a,n;if(a=o!==null,e=e!==null&&e.memoizedState!==null,a){o=n.child,u=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(u=o.alternate.memoizedState.cachePool.pool);var d=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==u&&(o.flags|=2048)}return a!==e&&a&&(n.child.flags|=8192),Ll(n,n.updateQueue),ft(n),null;case 4:return $e(),e===null&&pd(n.stateNode.containerInfo),ft(n),null;case 10:return mr(n.type),ft(n),null;case 19:if(oe(wt),u=n.memoizedState,u===null)return ft(n),null;if(o=(n.flags&128)!==0,d=u.rendering,d===null)if(o)Ii(u,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=jl(e),d!==null){for(n.flags|=128,Ii(u,!1),e=d.updateQueue,n.updateQueue=e,Ll(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Cp(a,e),a=a.sibling;return ee(wt,wt.current&1|2),n.child}e=e.sibling}u.tail!==null&&Pt()>Hl&&(n.flags|=128,o=!0,Ii(u,!1),n.lanes=4194304)}else{if(!o)if(e=jl(d),e!==null){if(n.flags|=128,o=!0,e=e.updateQueue,n.updateQueue=e,Ll(n,e),Ii(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!et)return ft(n),null}else 2*Pt()-u.renderingStartTime>Hl&&a!==536870912&&(n.flags|=128,o=!0,Ii(u,!1),n.lanes=4194304);u.isBackwards?(d.sibling=n.child,n.child=d):(e=u.last,e!==null?e.sibling=d:n.child=d,u.last=d)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Pt(),n.sibling=null,e=wt.current,ee(wt,o?e&1|2:e&1),n):(ft(n),null);case 22:case 23:return vr(n),gf(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(ft(n),n.subtreeFlags&6&&(n.flags|=8192)):ft(n),a=n.updateQueue,a!==null&&Ll(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),e!==null&&oe(Ua),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),mr(_t),ft(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function a1(e,n){switch(nf(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return mr(_t),$e(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ye(n),null;case 13:if(vr(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));Oi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return oe(wt),null;case 4:return $e(),null;case 10:return mr(n.type),null;case 22:case 23:return vr(n),gf(),e!==null&&oe(Ua),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return mr(_t),null;case 25:return null;default:return null}}function Wv(e,n){switch(nf(n),n.tag){case 3:mr(_t),$e();break;case 26:case 27:case 5:Ye(n);break;case 4:$e();break;case 13:vr(n);break;case 19:oe(wt);break;case 10:mr(n.type);break;case 22:case 23:vr(n),gf(),e!==null&&oe(Ua);break;case 24:mr(_t)}}function Zi(e,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var u=o.next;a=u;do{if((a.tag&e)===e){o=void 0;var d=a.create,b=a.inst;o=d(),b.destroy=o}a=a.next}while(a!==u)}}catch(S){ot(n,n.return,S)}}function Zr(e,n,a){try{var o=n.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var d=u.next;o=d;do{if((o.tag&e)===e){var b=o.inst,S=b.destroy;if(S!==void 0){b.destroy=void 0,u=n;var T=a,V=S;try{V()}catch(X){ot(u,T,X)}}}o=o.next}while(o!==d)}}catch(X){ot(n,n.return,X)}}function Jv(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Bp(n,a)}catch(o){ot(e,e.return,o)}}}function eg(e,n,a){a.props=La(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){ot(e,n,o)}}function Yi(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(u){ot(e,n,u)}}function In(e,n){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(u){ot(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){ot(e,n,u)}else a.current=null}function tg(e){var n=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(u){ot(e,e.return,u)}}function If(e,n,a){try{var o=e.stateNode;C1(o,e.type,a,n),o[Kt]=n}catch(u){ot(e,e.return,u)}}function ng(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ea(e.type)||e.tag===4}function Zf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ng(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ea(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yf(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Kl));else if(o!==4&&(o===27&&ea(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Yf(e,n,a),e=e.sibling;e!==null;)Yf(e,n,a),e=e.sibling}function Vl(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(o!==4&&(o===27&&ea(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Vl(e,n,a),e=e.sibling;e!==null;)Vl(e,n,a),e=e.sibling}function rg(e){var n=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);kt(n,o,a),n[Lt]=e,n[Kt]=a}catch(d){ot(e,e.return,d)}}var br=!1,vt=!1,Qf=!1,ag=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function s1(e,n){if(e=e.containerInfo,yd=rc,e=pp(e),Iu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var u=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var b=0,S=-1,T=-1,V=0,X=0,W=e,q=null;t:for(;;){for(var G;W!==a||u!==0&&W.nodeType!==3||(S=b+u),W!==d||o!==0&&W.nodeType!==3||(T=b+o),W.nodeType===3&&(b+=W.nodeValue.length),(G=W.firstChild)!==null;)q=W,W=G;for(;;){if(W===e)break t;if(q===a&&++V===u&&(S=b),q===d&&++X===o&&(T=b),(G=W.nextSibling)!==null)break;W=q,q=W.parentNode}W=G}a=S===-1||T===-1?null:{start:S,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(bd={focusedElem:e,selectionRange:a},rc=!1,Mt=n;Mt!==null;)if(n=Mt,e=n.child,(n.subtreeFlags&1024)!==0&&e!==null)e.return=n,Mt=e;else for(;Mt!==null;){switch(n=Mt,d=n.alternate,e=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,u=d.memoizedProps,d=d.memoizedState,o=a.stateNode;try{var je=La(a.type,u,a.elementType===a.type);e=o.getSnapshotBeforeUpdate(je,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(Re){ot(a,a.return,Re)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)_d(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_d(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=n.sibling,e!==null){e.return=n.return,Mt=e;break}Mt=n.return}}function sg(e,n,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:Yr(e,a),o&4&&Zi(5,a);break;case 1:if(Yr(e,a),o&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(b){ot(a,a.return,b)}else{var u=La(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){ot(a,a.return,b)}}o&64&&Jv(a),o&512&&Yi(a,a.return);break;case 3:if(Yr(e,a),o&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Bp(e,n)}catch(b){ot(a,a.return,b)}}break;case 27:n===null&&o&4&&rg(a);case 26:case 5:Yr(e,a),n===null&&o&4&&tg(a),o&512&&Yi(a,a.return);break;case 12:Yr(e,a);break;case 13:Yr(e,a),o&4&&lg(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=m1.bind(null,a),D1(e,a))));break;case 22:if(o=a.memoizedState!==null||br,!o){n=n!==null&&n.memoizedState!==null||vt,u=br;var d=vt;br=o,(vt=n)&&!d?Qr(e,a,(a.subtreeFlags&8772)!==0):Yr(e,a),br=u,vt=d}break;case 30:break;default:Yr(e,a)}}function ig(e){var n=e.alternate;n!==null&&(e.alternate=null,ig(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Tu(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ut=null,Jt=!1;function xr(e,n,a){for(a=a.child;a!==null;)og(e,n,a),a=a.sibling}function og(e,n,a){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(we,a)}catch{}switch(a.tag){case 26:vt||In(a,n),xr(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:vt||In(a,n);var o=ut,u=Jt;ea(a.type)&&(ut=a.stateNode,Jt=!1),xr(e,n,a),no(a.stateNode),ut=o,Jt=u;break;case 5:vt||In(a,n);case 6:if(o=ut,u=Jt,ut=null,xr(e,n,a),ut=o,Jt=u,ut!==null)if(Jt)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(a.stateNode)}catch(d){ot(a,n,d)}else try{ut.removeChild(a.stateNode)}catch(d){ot(a,n,d)}break;case 18:ut!==null&&(Jt?(e=ut,Xg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),uo(e)):Xg(ut,a.stateNode));break;case 4:o=ut,u=Jt,ut=a.stateNode.containerInfo,Jt=!0,xr(e,n,a),ut=o,Jt=u;break;case 0:case 11:case 14:case 15:vt||Zr(2,a,n),vt||Zr(4,a,n),xr(e,n,a);break;case 1:vt||(In(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"&&eg(a,n,o)),xr(e,n,a);break;case 21:xr(e,n,a);break;case 22:vt=(o=vt)||a.memoizedState!==null,xr(e,n,a),vt=o;break;default:xr(e,n,a)}}function lg(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{uo(e)}catch(a){ot(n,n.return,a)}}function i1(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new ag),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new ag),n;default:throw Error(i(435,e.tag))}}function Xf(e,n){var a=i1(e);n.forEach(function(o){var u=p1.bind(null,e,o);a.has(o)||(a.add(o),o.then(u,u))})}function an(e,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var u=a[o],d=e,b=n,S=b;e:for(;S!==null;){switch(S.tag){case 27:if(ea(S.type)){ut=S.stateNode,Jt=!1;break e}break;case 5:ut=S.stateNode,Jt=!1;break e;case 3:case 4:ut=S.stateNode.containerInfo,Jt=!0;break e}S=S.return}if(ut===null)throw Error(i(160));og(d,b,u),ut=null,Jt=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)cg(n,e),n=n.sibling}var On=null;function cg(e,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:an(n,e),sn(e),o&4&&(Zr(3,e,e.return),Zi(3,e),Zr(5,e,e.return));break;case 1:an(n,e),sn(e),o&512&&(vt||a===null||In(a,a.return)),o&64&&br&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var u=On;if(an(n,e),sn(e),o&512&&(vt||a===null||In(a,a.return)),o&4){var d=a!==null?a.memoizedState:null;if(o=e.memoizedState,a===null)if(o===null)if(e.stateNode===null){e:{o=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(o){case"title":d=u.getElementsByTagName("title")[0],(!d||d[gi]||d[Lt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(o),u.head.insertBefore(d,u.querySelector("head > title"))),kt(d,o,a),d[Lt]=e,Rt(d),o=d;break e;case"link":var b=ry("link","href",u).get(o+(a.href||""));if(b){for(var S=0;S<b.length;S++)if(d=b[S],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(S,1);break t}}d=u.createElement(o),kt(d,o,a),u.head.appendChild(d);break;case"meta":if(b=ry("meta","content",u).get(o+(a.content||""))){for(S=0;S<b.length;S++)if(d=b[S],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(S,1);break t}}d=u.createElement(o),kt(d,o,a),u.head.appendChild(d);break;default:throw Error(i(468,o))}d[Lt]=e,Rt(d),o=d}e.stateNode=o}else ay(u,e.type,e.stateNode);else e.stateNode=ny(u,o,e.memoizedProps);else d!==o?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,o===null?ay(u,e.type,e.stateNode):ny(u,o,e.memoizedProps)):o===null&&e.stateNode!==null&&If(e,e.memoizedProps,a.memoizedProps)}break;case 27:an(n,e),sn(e),o&512&&(vt||a===null||In(a,a.return)),a!==null&&o&4&&If(e,e.memoizedProps,a.memoizedProps);break;case 5:if(an(n,e),sn(e),o&512&&(vt||a===null||In(a,a.return)),e.flags&32){u=e.stateNode;try{fs(u,"")}catch(G){ot(e,e.return,G)}}o&4&&e.stateNode!=null&&(u=e.memoizedProps,If(e,u,a!==null?a.memoizedProps:u)),o&1024&&(Qf=!0);break;case 6:if(an(n,e),sn(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,a=e.stateNode;try{a.nodeValue=o}catch(G){ot(e,e.return,G)}}break;case 3:if(ec=null,u=On,On=Wl(n.containerInfo),an(n,e),On=u,sn(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{uo(n.containerInfo)}catch(G){ot(e,e.return,G)}Qf&&(Qf=!1,ug(e));break;case 4:o=On,On=Wl(e.stateNode.containerInfo),an(n,e),sn(e),On=o;break;case 12:an(n,e),sn(e);break;case 13:an(n,e),sn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(td=Pt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Xf(e,o)));break;case 22:u=e.memoizedState!==null;var T=a!==null&&a.memoizedState!==null,V=br,X=vt;if(br=V||u,vt=X||T,an(n,e),vt=X,br=V,sn(e),o&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(a===null||T||br||vt||Va(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){T=a=n;try{if(d=T.stateNode,u)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{S=T.stateNode;var W=T.memoizedProps.style,q=W!=null&&W.hasOwnProperty("display")?W.display:null;S.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(G){ot(T,T.return,G)}}}else if(n.tag===6){if(a===null){T=n;try{T.stateNode.nodeValue=u?"":T.memoizedProps}catch(G){ot(T,T.return,G)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Xf(e,a))));break;case 19:an(n,e),sn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Xf(e,o)));break;case 30:break;case 21:break;default:an(n,e),sn(e)}}function sn(e){var n=e.flags;if(n&2){try{for(var a,o=e.return;o!==null;){if(ng(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var u=a.stateNode,d=Zf(e);Vl(e,d,u);break;case 5:var b=a.stateNode;a.flags&32&&(fs(b,""),a.flags&=-33);var S=Zf(e);Vl(e,S,b);break;case 3:case 4:var T=a.stateNode.containerInfo,V=Zf(e);Yf(e,V,T);break;default:throw Error(i(161))}}catch(X){ot(e,e.return,X)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function ug(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;ug(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Yr(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)sg(e,n.alternate,n),n=n.sibling}function Va(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Zr(4,n,n.return),Va(n);break;case 1:In(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&eg(n,n.return,a),Va(n);break;case 27:no(n.stateNode);case 26:case 5:In(n,n.return),Va(n);break;case 22:n.memoizedState===null&&Va(n);break;case 30:Va(n);break;default:Va(n)}e=e.sibling}}function Qr(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,u=e,d=n,b=d.flags;switch(d.tag){case 0:case 11:case 15:Qr(u,d,a),Zi(4,d);break;case 1:if(Qr(u,d,a),o=d,u=o.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(V){ot(o,o.return,V)}if(o=d,u=o.updateQueue,u!==null){var S=o.stateNode;try{var T=u.shared.hiddenCallbacks;if(T!==null)for(u.shared.hiddenCallbacks=null,u=0;u<T.length;u++)Vp(T[u],S)}catch(V){ot(o,o.return,V)}}a&&b&64&&Jv(d),Yi(d,d.return);break;case 27:rg(d);case 26:case 5:Qr(u,d,a),a&&o===null&&b&4&&tg(d),Yi(d,d.return);break;case 12:Qr(u,d,a);break;case 13:Qr(u,d,a),a&&b&4&&lg(u,d);break;case 22:d.memoizedState===null&&Qr(u,d,a),Yi(d,d.return);break;case 30:break;default:Qr(u,d,a)}n=n.sibling}}function Kf(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Di(a))}function $f(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Di(e))}function Zn(e,n,a,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)fg(e,n,a,o),n=n.sibling}function fg(e,n,a,o){var u=n.flags;switch(n.tag){case 0:case 11:case 15:Zn(e,n,a,o),u&2048&&Zi(9,n);break;case 1:Zn(e,n,a,o);break;case 3:Zn(e,n,a,o),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Di(e)));break;case 12:if(u&2048){Zn(e,n,a,o),e=n.stateNode;try{var d=n.memoizedProps,b=d.id,S=d.onPostCommit;typeof S=="function"&&S(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){ot(n,n.return,T)}}else Zn(e,n,a,o);break;case 13:Zn(e,n,a,o);break;case 23:break;case 22:d=n.stateNode,b=n.alternate,n.memoizedState!==null?d._visibility&2?Zn(e,n,a,o):Qi(e,n):d._visibility&2?Zn(e,n,a,o):(d._visibility|=2,Ms(e,n,a,o,(n.subtreeFlags&10256)!==0)),u&2048&&Kf(b,n);break;case 24:Zn(e,n,a,o),u&2048&&$f(n.alternate,n);break;default:Zn(e,n,a,o)}}function Ms(e,n,a,o,u){for(u=u&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var d=e,b=n,S=a,T=o,V=b.flags;switch(b.tag){case 0:case 11:case 15:Ms(d,b,S,T,u),Zi(8,b);break;case 23:break;case 22:var X=b.stateNode;b.memoizedState!==null?X._visibility&2?Ms(d,b,S,T,u):Qi(d,b):(X._visibility|=2,Ms(d,b,S,T,u)),u&&V&2048&&Kf(b.alternate,b);break;case 24:Ms(d,b,S,T,u),u&&V&2048&&$f(b.alternate,b);break;default:Ms(d,b,S,T,u)}n=n.sibling}}function Qi(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,o=n,u=o.flags;switch(o.tag){case 22:Qi(a,o),u&2048&&Kf(o.alternate,o);break;case 24:Qi(a,o),u&2048&&$f(o.alternate,o);break;default:Qi(a,o)}n=n.sibling}}var Xi=8192;function Ns(e){if(e.subtreeFlags&Xi)for(e=e.child;e!==null;)dg(e),e=e.sibling}function dg(e){switch(e.tag){case 26:Ns(e),e.flags&Xi&&e.memoizedState!==null&&I1(On,e.memoizedState,e.memoizedProps);break;case 5:Ns(e);break;case 3:case 4:var n=On;On=Wl(e.stateNode.containerInfo),Ns(e),On=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Xi,Xi=16777216,Ns(e),Xi=n):Ns(e));break;default:Ns(e)}}function hg(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Ki(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];Mt=o,pg(o,e)}hg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)mg(e),e=e.sibling}function mg(e){switch(e.tag){case 0:case 11:case 15:Ki(e),e.flags&2048&&Zr(9,e,e.return);break;case 3:Ki(e);break;case 12:Ki(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Bl(e)):Ki(e);break;default:Ki(e)}}function Bl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];Mt=o,pg(o,e)}hg(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Zr(8,n,n.return),Bl(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Bl(n));break;default:Bl(n)}e=e.sibling}}function pg(e,n){for(;Mt!==null;){var a=Mt;switch(a.tag){case 0:case 11:case 15:Zr(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Di(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,Mt=o;else e:for(a=e;Mt!==null;){o=Mt;var u=o.sibling,d=o.return;if(ig(o),o===a){Mt=null;break e}if(u!==null){u.return=d,Mt=u;break e}Mt=d}}}var o1={getCacheForType:function(e){var n=Vt(_t),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a}},l1=typeof WeakMap=="function"?WeakMap:Map,tt=0,ct=null,Ge=null,Xe=0,nt=0,on=null,Xr=!1,Ds=!1,Wf=!1,Sr=0,mt=0,Kr=0,Ba=0,Jf=0,Sn=0,js=0,$i=null,en=null,ed=!1,td=0,Hl=1/0,ql=null,$r=null,jt=0,Wr=null,ks=null,zs=0,nd=0,rd=null,vg=null,Wi=0,ad=null;function ln(){if((tt&2)!==0&&Xe!==0)return Xe&-Xe;if(j.T!==null){var e=_s;return e!==0?e:fd()}return Dm()}function gg(){Sn===0&&(Sn=(Xe&536870912)===0||et?Rm():536870912);var e=xn.current;return e!==null&&(e.flags|=32),Sn}function cn(e,n,a){(e===ct&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Us(e,0),Jr(e,Xe,Sn,!1)),vi(e,a),((tt&2)===0||e!==ct)&&(e===ct&&((tt&2)===0&&(Ba|=a),mt===4&&Jr(e,Xe,Sn,!1)),Yn(e))}function yg(e,n,a){if((tt&6)!==0)throw Error(i(327));var o=!a&&(n&124)===0&&(n&e.expiredLanes)===0||Ea(e,n),u=o?f1(e,n):od(e,n,!0),d=o;do{if(u===0){Ds&&!o&&Jr(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!c1(a)){u=od(e,n,!1),d=!1;continue}if(u===2){if(d=n,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var S=e;u=$i;var T=S.current.memoizedState.isDehydrated;if(T&&(Us(S,b).flags|=256),b=od(S,b,!1),b!==2){if(Wf&&!T){S.errorRecoveryDisabledLanes|=d,Ba|=d,u=4;break e}d=en,en=u,d!==null&&(en===null?en=d:en.push.apply(en,d))}u=b}if(d=!1,u!==2)continue}}if(u===1){Us(e,0),Jr(e,n,0,!0);break}e:{switch(o=e,d=u,d){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Jr(o,n,Sn,!Xr);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(u=td+300-Pt(),10<u)){if(Jr(o,n,Sn,!Xr),wa(o,0,!0)!==0)break e;o.timeoutHandle=Yg(bg.bind(null,o,a,en,ql,ed,n,Sn,Ba,js,Xr,d,2,-0,0),u);break e}bg(o,a,en,ql,ed,n,Sn,Ba,js,Xr,d,0,-0,0)}}break}while(!0);Yn(e)}function bg(e,n,a,o,u,d,b,S,T,V,X,W,q,G){if(e.timeoutHandle=-1,W=n.subtreeFlags,(W&8192||(W&16785408)===16785408)&&(so={stylesheets:null,count:0,unsuspend:F1},dg(n),W=Z1(),W!==null)){e.cancelPendingCommit=W(Tg.bind(null,e,n,d,a,o,u,b,S,T,X,1,q,G)),Jr(e,d,b,!V);return}Tg(e,n,d,a,o,u,b,S,T)}function c1(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var u=a[o],d=u.getSnapshot;u=u.value;try{if(!nn(d(),u))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Jr(e,n,a,o){n&=~Jf,n&=~Ba,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var u=n;0<u;){var d=31-lt(u),b=1<<d;o[d]=-1,u&=~b}a!==0&&Mm(e,a,n)}function Gl(){return(tt&6)===0?(Ji(0),!1):!0}function sd(){if(Ge!==null){if(nt===0)var e=Ge.return;else e=Ge,hr=ka=null,_f(e),Rs=null,Gi=0,e=Ge;for(;e!==null;)Wv(e.alternate,e),e=e.return;Ge=null}}function Us(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,A1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),sd(),ct=e,Ge=a=ur(e.current,null),Xe=n,nt=0,on=null,Xr=!1,Ds=Ea(e,n),Wf=!1,js=Sn=Jf=Ba=Kr=mt=0,en=$i=null,ed=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var u=31-lt(o),d=1<<u;n|=e[u],o&=~d}return Sr=n,fl(),a}function xg(e,n){Ve=null,j.H=Ml,n===ki||n===xl?(n=Pp(),nt=3):n===kp?(n=Pp(),nt=4):nt=n===Lv?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,on=n,Ge===null&&(mt=1,zl(e,vn(n,e.current)))}function Sg(){var e=j.H;return j.H=Ml,e===null?Ml:e}function _g(){var e=j.A;return j.A=o1,e}function id(){mt=4,Xr||(Xe&4194048)!==Xe&&xn.current!==null||(Ds=!0),(Kr&134217727)===0&&(Ba&134217727)===0||ct===null||Jr(ct,Xe,Sn,!1)}function od(e,n,a){var o=tt;tt|=2;var u=Sg(),d=_g();(ct!==e||Xe!==n)&&(ql=null,Us(e,n)),n=!1;var b=mt;e:do try{if(nt!==0&&Ge!==null){var S=Ge,T=on;switch(nt){case 8:sd(),b=6;break e;case 3:case 2:case 9:case 6:xn.current===null&&(n=!0);var V=nt;if(nt=0,on=null,Ps(e,S,T,V),a&&Ds){b=0;break e}break;default:V=nt,nt=0,on=null,Ps(e,S,T,V)}}u1(),b=mt;break}catch(X){xg(e,X)}while(!0);return n&&e.shellSuspendCounter++,hr=ka=null,tt=o,j.H=u,j.A=d,Ge===null&&(ct=null,Xe=0,fl()),b}function u1(){for(;Ge!==null;)wg(Ge)}function f1(e,n){var a=tt;tt|=2;var o=Sg(),u=_g();ct!==e||Xe!==n?(ql=null,Hl=Pt()+500,Us(e,n)):Ds=Ea(e,n);e:do try{if(nt!==0&&Ge!==null){n=Ge;var d=on;t:switch(nt){case 1:nt=0,on=null,Ps(e,n,d,1);break;case 2:case 9:if(zp(d)){nt=0,on=null,Eg(n);break}n=function(){nt!==2&&nt!==9||ct!==e||(nt=7),Yn(e)},d.then(n,n);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:zp(d)?(nt=0,on=null,Eg(n)):(nt=0,on=null,Ps(e,n,d,7));break;case 5:var b=null;switch(Ge.tag){case 26:b=Ge.memoizedState;case 5:case 27:var S=Ge;if(!b||sy(b)){nt=0,on=null;var T=S.sibling;if(T!==null)Ge=T;else{var V=S.return;V!==null?(Ge=V,Fl(V)):Ge=null}break t}}nt=0,on=null,Ps(e,n,d,5);break;case 6:nt=0,on=null,Ps(e,n,d,6);break;case 8:sd(),mt=6;break e;default:throw Error(i(462))}}d1();break}catch(X){xg(e,X)}while(!0);return hr=ka=null,j.H=o,j.A=u,tt=a,Ge!==null?0:(ct=null,Xe=0,fl(),mt)}function d1(){for(;Ge!==null&&!kr();)wg(Ge)}function wg(e){var n=Kv(e.alternate,e,Sr);e.memoizedProps=e.pendingProps,n===null?Fl(e):Ge=n}function Eg(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Fv(a,n,n.pendingProps,n.type,void 0,Xe);break;case 11:n=Fv(a,n,n.pendingProps,n.type.render,n.ref,Xe);break;case 5:_f(n);default:Wv(a,n),n=Ge=Cp(n,Sr),n=Kv(a,n,Sr)}e.memoizedProps=e.pendingProps,n===null?Fl(e):Ge=n}function Ps(e,n,a,o){hr=ka=null,_f(n),Rs=null,Gi=0;var u=n.return;try{if(t1(e,u,n,a,Xe)){mt=1,zl(e,vn(a,e.current)),Ge=null;return}}catch(d){if(u!==null)throw Ge=u,d;mt=1,zl(e,vn(a,e.current)),Ge=null;return}n.flags&32768?(et||o===1?e=!0:Ds||(Xe&536870912)!==0?e=!1:(Xr=e=!0,(o===2||o===9||o===3||o===6)&&(o=xn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Cg(n,e)):Fl(n)}function Fl(e){var n=e;do{if((n.flags&32768)!==0){Cg(n,Xr);return}e=n.return;var a=r1(n.alternate,n,Sr);if(a!==null){Ge=a;return}if(n=n.sibling,n!==null){Ge=n;return}Ge=n=e}while(n!==null);mt===0&&(mt=5)}function Cg(e,n){do{var a=a1(e.alternate,e);if(a!==null){a.flags&=32767,Ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Ge=e;return}Ge=e=a}while(e!==null);mt=6,Ge=null}function Tg(e,n,a,o,u,d,b,S,T){e.cancelPendingCommit=null;do Il();while(jt!==0);if((tt&6)!==0)throw Error(i(327));if(n!==null){if(n===e.current)throw Error(i(177));if(d=n.lanes|n.childLanes,d|=Ku,F_(e,a,d,b,S,T),e===ct&&(Ge=ct=null,Xe=0),ks=n,Wr=e,zs=a,nd=d,rd=u,vg=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,v1(B,function(){return Ng(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=j.T,j.T=null,u=Q.p,Q.p=2,b=tt,tt|=4;try{s1(e,n,a)}finally{tt=b,Q.p=u,j.T=o}}jt=1,Ag(),Rg(),Og()}}function Ag(){if(jt===1){jt=0;var e=Wr,n=ks,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=j.T,j.T=null;var o=Q.p;Q.p=2;var u=tt;tt|=4;try{cg(n,e);var d=bd,b=pp(e.containerInfo),S=d.focusedElem,T=d.selectionRange;if(b!==S&&S&&S.ownerDocument&&mp(S.ownerDocument.documentElement,S)){if(T!==null&&Iu(S)){var V=T.start,X=T.end;if(X===void 0&&(X=V),"selectionStart"in S)S.selectionStart=V,S.selectionEnd=Math.min(X,S.value.length);else{var W=S.ownerDocument||document,q=W&&W.defaultView||window;if(q.getSelection){var G=q.getSelection(),je=S.textContent.length,Re=Math.min(T.start,je),it=T.end===void 0?Re:Math.min(T.end,je);!G.extend&&Re>it&&(b=it,it=Re,Re=b);var P=hp(S,Re),D=hp(S,it);if(P&&D&&(G.rangeCount!==1||G.anchorNode!==P.node||G.anchorOffset!==P.offset||G.focusNode!==D.node||G.focusOffset!==D.offset)){var L=W.createRange();L.setStart(P.node,P.offset),G.removeAllRanges(),Re>it?(G.addRange(L),G.extend(D.node,D.offset)):(L.setEnd(D.node,D.offset),G.addRange(L))}}}}for(W=[],G=S;G=G.parentNode;)G.nodeType===1&&W.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<W.length;S++){var $=W[S];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}rc=!!yd,bd=yd=null}finally{tt=u,Q.p=o,j.T=a}}e.current=n,jt=2}}function Rg(){if(jt===2){jt=0;var e=Wr,n=ks,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=j.T,j.T=null;var o=Q.p;Q.p=2;var u=tt;tt|=4;try{sg(e,n.alternate,n)}finally{tt=u,Q.p=o,j.T=a}}jt=3}}function Og(){if(jt===4||jt===3){jt=0,_a();var e=Wr,n=ks,a=zs,o=vg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?jt=5:(jt=0,ks=Wr=null,Mg(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&($r=null),Eu(a),n=n.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(we,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=j.T,u=Q.p,Q.p=2,j.T=null;try{for(var d=e.onRecoverableError,b=0;b<o.length;b++){var S=o[b];d(S.value,{componentStack:S.stack})}}finally{j.T=n,Q.p=u}}(zs&3)!==0&&Il(),Yn(e),u=e.pendingLanes,(a&4194090)!==0&&(u&42)!==0?e===ad?Wi++:(Wi=0,ad=e):Wi=0,Ji(0)}}function Mg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Di(n)))}function Il(e){return Ag(),Rg(),Og(),Ng()}function Ng(){if(jt!==5)return!1;var e=Wr,n=nd;nd=0;var a=Eu(zs),o=j.T,u=Q.p;try{Q.p=32>a?32:a,j.T=null,a=rd,rd=null;var d=Wr,b=zs;if(jt=0,ks=Wr=null,zs=0,(tt&6)!==0)throw Error(i(331));var S=tt;if(tt|=4,mg(d.current),fg(d,d.current,b,a),tt=S,Ji(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(we,d)}catch{}return!0}finally{Q.p=u,j.T=o,Mg(e,n)}}function Dg(e,n,a){n=vn(a,n),n=Uf(e.stateNode,n,2),e=qr(e,n,2),e!==null&&(vi(e,2),Yn(e))}function ot(e,n,a){if(e.tag===3)Dg(e,e,a);else for(;n!==null;){if(n.tag===3){Dg(n,e,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&($r===null||!$r.has(o))){e=vn(a,e),a=Uv(2),o=qr(n,a,2),o!==null&&(Pv(a,o,n,e),vi(o,2),Yn(o));break}}n=n.return}}function ld(e,n,a){var o=e.pingCache;if(o===null){o=e.pingCache=new l1;var u=new Set;o.set(n,u)}else u=o.get(n),u===void 0&&(u=new Set,o.set(n,u));u.has(a)||(Wf=!0,u.add(a),e=h1.bind(null,e,n,a),n.then(e,e))}function h1(e,n,a){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ct===e&&(Xe&a)===a&&(mt===4||mt===3&&(Xe&62914560)===Xe&&300>Pt()-td?(tt&2)===0&&Us(e,0):Jf|=a,js===Xe&&(js=0)),Yn(e)}function jg(e,n){n===0&&(n=Om()),e=ys(e,n),e!==null&&(vi(e,n),Yn(e))}function m1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),jg(e,a)}function p1(e,n){var a=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(n),jg(e,a)}function v1(e,n){return At(e,n)}var Zl=null,Ls=null,cd=!1,Yl=!1,ud=!1,Ha=0;function Yn(e){e!==Ls&&e.next===null&&(Ls===null?Zl=Ls=e:Ls=Ls.next=e),Yl=!0,cd||(cd=!0,y1())}function Ji(e,n){if(!ud&&Yl){ud=!0;do for(var a=!1,o=Zl;o!==null;){if(e!==0){var u=o.pendingLanes;if(u===0)var d=0;else{var b=o.suspendedLanes,S=o.pingedLanes;d=(1<<31-lt(42|e)+1)-1,d&=u&~(b&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Pg(o,d))}else d=Xe,d=wa(o,o===ct?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Ea(o,d)||(a=!0,Pg(o,d));o=o.next}while(a);ud=!1}}function g1(){kg()}function kg(){Yl=cd=!1;var e=0;Ha!==0&&(T1()&&(e=Ha),Ha=0);for(var n=Pt(),a=null,o=Zl;o!==null;){var u=o.next,d=zg(o,n);d===0?(o.next=null,a===null?Zl=u:a.next=u,u===null&&(Ls=a)):(a=o,(e!==0||(d&3)!==0)&&(Yl=!0)),o=u}Ji(e)}function zg(e,n){for(var a=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-lt(d),S=1<<b,T=u[b];T===-1?((S&a)===0||(S&o)!==0)&&(u[b]=Jo(S,n)):T<=n&&(e.expiredLanes|=S),d&=~S}if(n=ct,a=Xe,a=wa(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===n&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Xt(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ea(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(o!==null&&Xt(o),Eu(a)){case 2:case 8:a=N;break;case 32:a=B;break;case 268435456:a=ve;break;default:a=B}return o=Ug.bind(null,e),a=At(a,o),e.callbackPriority=n,e.callbackNode=a,n}return o!==null&&o!==null&&Xt(o),e.callbackPriority=2,e.callbackNode=null,2}function Ug(e,n){if(jt!==0&&jt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Il()&&e.callbackNode!==a)return null;var o=Xe;return o=wa(e,e===ct?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(yg(e,o,n),zg(e,Pt()),e.callbackNode!=null&&e.callbackNode===a?Ug.bind(null,e):null)}function Pg(e,n){if(Il())return null;yg(e,n,!0)}function y1(){R1(function(){(tt&6)!==0?At(pi,g1):kg()})}function fd(){return Ha===0&&(Ha=Rm()),Ha}function Lg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:al(""+e)}function Vg(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function b1(e,n,a,o,u){if(n==="submit"&&a&&a.stateNode===u){var d=Lg((u[Kt]||null).action),b=o.submitter;b&&(n=(n=b[Kt]||null)?Lg(n.formAction):b.getAttribute("formAction"),n!==null&&(d=n,b=null));var S=new ll("action","action",null,o,u);e.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ha!==0){var T=b?Vg(u,b):new FormData(u);Nf(a,{pending:!0,data:T,method:u.method,action:d},null,T)}}else typeof d=="function"&&(S.preventDefault(),T=b?Vg(u,b):new FormData(u),Nf(a,{pending:!0,data:T,method:u.method,action:d},d,T))},currentTarget:u}]})}}for(var dd=0;dd<Xu.length;dd++){var hd=Xu[dd],x1=hd.toLowerCase(),S1=hd[0].toUpperCase()+hd.slice(1);Rn(x1,"on"+S1)}Rn(yp,"onAnimationEnd"),Rn(bp,"onAnimationIteration"),Rn(xp,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(Lw,"onTransitionRun"),Rn(Vw,"onTransitionStart"),Rn(Bw,"onTransitionCancel"),Rn(Sp,"onTransitionEnd"),ls("onMouseEnter",["mouseout","mouseover"]),ls("onMouseLeave",["mouseout","mouseover"]),ls("onPointerEnter",["pointerout","pointerover"]),ls("onPointerLeave",["pointerout","pointerover"]),Ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ca("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(eo));function Bg(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],u=o.event;o=o.listeners;e:{var d=void 0;if(n)for(var b=o.length-1;0<=b;b--){var S=o[b],T=S.instance,V=S.currentTarget;if(S=S.listener,T!==d&&u.isPropagationStopped())break e;d=S,u.currentTarget=V;try{d(u)}catch(X){kl(X)}u.currentTarget=null,d=T}else for(b=0;b<o.length;b++){if(S=o[b],T=S.instance,V=S.currentTarget,S=S.listener,T!==d&&u.isPropagationStopped())break e;d=S,u.currentTarget=V;try{d(u)}catch(X){kl(X)}u.currentTarget=null,d=T}}}}function Fe(e,n){var a=n[Cu];a===void 0&&(a=n[Cu]=new Set);var o=e+"__bubble";a.has(o)||(Hg(n,e,2,!1),a.add(o))}function md(e,n,a){var o=0;n&&(o|=4),Hg(a,e,o,n)}var Ql="_reactListening"+Math.random().toString(36).slice(2);function pd(e){if(!e[Ql]){e[Ql]=!0,km.forEach(function(a){a!=="selectionchange"&&(_1.has(a)||md(a,!1,e),md(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ql]||(n[Ql]=!0,md("selectionchange",!1,n))}}function Hg(e,n,a,o){switch(fy(n)){case 2:var u=X1;break;case 8:u=K1;break;default:u=Od}a=u.bind(null,n,a,e),u=void 0,!Uu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(n,a,{capture:!0,passive:u}):e.addEventListener(n,a,!0):u!==void 0?e.addEventListener(n,a,{passive:u}):e.addEventListener(n,a,!1)}function vd(e,n,a,o,u){var d=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var S=o.stateNode.containerInfo;if(S===u)break;if(b===4)for(b=o.return;b!==null;){var T=b.tag;if((T===3||T===4)&&b.stateNode.containerInfo===u)return;b=b.return}for(;S!==null;){if(b=ss(S),b===null)return;if(T=b.tag,T===5||T===6||T===26||T===27){o=d=b;continue e}S=S.parentNode}}o=o.return}Qm(function(){var V=d,X=ku(a),W=[];e:{var q=_p.get(e);if(q!==void 0){var G=ll,je=e;switch(e){case"keypress":if(il(a)===0)break e;case"keydown":case"keyup":G=vw;break;case"focusin":je="focus",G=Bu;break;case"focusout":je="blur",G=Bu;break;case"beforeblur":case"afterblur":G=Bu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=$m;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=aw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=bw;break;case yp:case bp:case xp:G=ow;break;case Sp:G=Sw;break;case"scroll":case"scrollend":G=nw;break;case"wheel":G=ww;break;case"copy":case"cut":case"paste":G=cw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=Jm;break;case"toggle":case"beforetoggle":G=Cw}var Re=(n&4)!==0,it=!Re&&(e==="scroll"||e==="scrollend"),P=Re?q!==null?q+"Capture":null:q;Re=[];for(var D=V,L;D!==null;){var $=D;if(L=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||L===null||P===null||($=bi(D,P),$!=null&&Re.push(to(D,$,L))),it)break;D=D.return}0<Re.length&&(q=new G(q,je,null,a,X),W.push({event:q,listeners:Re}))}}if((n&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",q&&a!==ju&&(je=a.relatedTarget||a.fromElement)&&(ss(je)||je[as]))break e;if((G||q)&&(q=X.window===X?X:(q=X.ownerDocument)?q.defaultView||q.parentWindow:window,G?(je=a.relatedTarget||a.toElement,G=V,je=je?ss(je):null,je!==null&&(it=c(je),Re=je.tag,je!==it||Re!==5&&Re!==27&&Re!==6)&&(je=null)):(G=null,je=V),G!==je)){if(Re=$m,$="onMouseLeave",P="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(Re=Jm,$="onPointerLeave",P="onPointerEnter",D="pointer"),it=G==null?q:yi(G),L=je==null?q:yi(je),q=new Re($,D+"leave",G,a,X),q.target=it,q.relatedTarget=L,$=null,ss(X)===V&&(Re=new Re(P,D+"enter",je,a,X),Re.target=L,Re.relatedTarget=it,$=Re),it=$,G&&je)t:{for(Re=G,P=je,D=0,L=Re;L;L=Vs(L))D++;for(L=0,$=P;$;$=Vs($))L++;for(;0<D-L;)Re=Vs(Re),D--;for(;0<L-D;)P=Vs(P),L--;for(;D--;){if(Re===P||P!==null&&Re===P.alternate)break t;Re=Vs(Re),P=Vs(P)}Re=null}else Re=null;G!==null&&qg(W,q,G,Re,!1),je!==null&&it!==null&&qg(W,it,je,Re,!0)}}e:{if(q=V?yi(V):window,G=q.nodeName&&q.nodeName.toLowerCase(),G==="select"||G==="input"&&q.type==="file")var be=op;else if(sp(q))if(lp)be=zw;else{be=jw;var qe=Dw}else G=q.nodeName,!G||G.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?V&&Du(V.elementType)&&(be=op):be=kw;if(be&&(be=be(e,V))){ip(W,be,a,X);break e}qe&&qe(e,q,V),e==="focusout"&&V&&q.type==="number"&&V.memoizedProps.value!=null&&Nu(q,"number",q.value)}switch(qe=V?yi(V):window,e){case"focusin":(sp(qe)||qe.contentEditable==="true")&&(ps=qe,Zu=V,Ai=null);break;case"focusout":Ai=Zu=ps=null;break;case"mousedown":Yu=!0;break;case"contextmenu":case"mouseup":case"dragend":Yu=!1,vp(W,a,X);break;case"selectionchange":if(Pw)break;case"keydown":case"keyup":vp(W,a,X)}var Ce;if(qu)e:{switch(e){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else ms?rp(e,a)&&(Me="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Me="onCompositionStart");Me&&(ep&&a.locale!=="ko"&&(ms||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&ms&&(Ce=Xm()):(Lr=X,Pu="value"in Lr?Lr.value:Lr.textContent,ms=!0)),qe=Xl(V,Me),0<qe.length&&(Me=new Wm(Me,e,null,a,X),W.push({event:Me,listeners:qe}),Ce?Me.data=Ce:(Ce=ap(a),Ce!==null&&(Me.data=Ce)))),(Ce=Aw?Rw(e,a):Ow(e,a))&&(Me=Xl(V,"onBeforeInput"),0<Me.length&&(qe=new Wm("onBeforeInput","beforeinput",null,a,X),W.push({event:qe,listeners:Me}),qe.data=Ce)),b1(W,e,V,a,X)}Bg(W,n)})}function to(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Xl(e,n){for(var a=n+"Capture",o=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=bi(e,a),u!=null&&o.unshift(to(e,u,d)),u=bi(e,n),u!=null&&o.push(to(e,u,d))),e.tag===3)return o;e=e.return}return[]}function Vs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function qg(e,n,a,o,u){for(var d=n._reactName,b=[];a!==null&&a!==o;){var S=a,T=S.alternate,V=S.stateNode;if(S=S.tag,T!==null&&T===o)break;S!==5&&S!==26&&S!==27||V===null||(T=V,u?(V=bi(a,d),V!=null&&b.unshift(to(a,V,T))):u||(V=bi(a,d),V!=null&&b.push(to(a,V,T)))),a=a.return}b.length!==0&&e.push({event:n,listeners:b})}var w1=/\r\n?/g,E1=/\u0000|\uFFFD/g;function Gg(e){return(typeof e=="string"?e:""+e).replace(w1,`
`).replace(E1,"")}function Fg(e,n){return n=Gg(n),Gg(e)===n}function Kl(){}function st(e,n,a,o,u,d){switch(a){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||fs(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&fs(e,""+o);break;case"className":tl(e,"class",o);break;case"tabIndex":tl(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":tl(e,a,o);break;case"style":Zm(e,o,d);break;case"data":if(n!=="object"){tl(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=al(""+o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(n!=="input"&&st(e,n,"name",u.name,u,null),st(e,n,"formEncType",u.formEncType,u,null),st(e,n,"formMethod",u.formMethod,u,null),st(e,n,"formTarget",u.formTarget,u,null)):(st(e,n,"encType",u.encType,u,null),st(e,n,"method",u.method,u,null),st(e,n,"target",u.target,u,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=al(""+o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=Kl);break;case"onScroll":o!=null&&Fe("scroll",e);break;case"onScrollEnd":o!=null&&Fe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(u.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=al(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""+o):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":Fe("beforetoggle",e),Fe("toggle",e),el(e,"popover",o);break;case"xlinkActuate":lr(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":lr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":lr(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":lr(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":lr(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":lr(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":lr(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":lr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":lr(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":el(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ew.get(a)||a,el(e,a,o))}}function gd(e,n,a,o,u,d){switch(a){case"style":Zm(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(u.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof o=="string"?fs(e,o):(typeof o=="number"||typeof o=="bigint")&&fs(e,""+o);break;case"onScroll":o!=null&&Fe("scroll",e);break;case"onScrollEnd":o!=null&&Fe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Kl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zm.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),n=a.slice(2,u?a.length-7:void 0),d=e[Kt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,u),typeof o=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,o,u);break e}a in e?e[a]=o:o===!0?e.setAttribute(a,""):el(e,a,o)}}}function kt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",e),Fe("load",e);var o=!1,u=!1,d;for(d in a)if(a.hasOwnProperty(d)){var b=a[d];if(b!=null)switch(d){case"src":o=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:st(e,n,d,b,a,null)}}u&&st(e,n,"srcSet",a.srcSet,a,null),o&&st(e,n,"src",a.src,a,null);return;case"input":Fe("invalid",e);var S=d=b=u=null,T=null,V=null;for(o in a)if(a.hasOwnProperty(o)){var X=a[o];if(X!=null)switch(o){case"name":u=X;break;case"type":b=X;break;case"checked":T=X;break;case"defaultChecked":V=X;break;case"value":d=X;break;case"defaultValue":S=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,n));break;default:st(e,n,o,X,a,null)}}qm(e,d,S,T,V,b,u,!1),nl(e);return;case"select":Fe("invalid",e),o=b=d=null;for(u in a)if(a.hasOwnProperty(u)&&(S=a[u],S!=null))switch(u){case"value":d=S;break;case"defaultValue":b=S;break;case"multiple":o=S;default:st(e,n,u,S,a,null)}n=d,a=b,e.multiple=!!o,n!=null?us(e,!!o,n,!1):a!=null&&us(e,!!o,a,!0);return;case"textarea":Fe("invalid",e),d=u=o=null;for(b in a)if(a.hasOwnProperty(b)&&(S=a[b],S!=null))switch(b){case"value":o=S;break;case"defaultValue":u=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(i(91));break;default:st(e,n,b,S,a,null)}Fm(e,o,u,d),nl(e);return;case"option":for(T in a)if(a.hasOwnProperty(T)&&(o=a[T],o!=null))switch(T){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:st(e,n,T,o,a,null)}return;case"dialog":Fe("beforetoggle",e),Fe("toggle",e),Fe("cancel",e),Fe("close",e);break;case"iframe":case"object":Fe("load",e);break;case"video":case"audio":for(o=0;o<eo.length;o++)Fe(eo[o],e);break;case"image":Fe("error",e),Fe("load",e);break;case"details":Fe("toggle",e);break;case"embed":case"source":case"link":Fe("error",e),Fe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in a)if(a.hasOwnProperty(V)&&(o=a[V],o!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:st(e,n,V,o,a,null)}return;default:if(Du(n)){for(X in a)a.hasOwnProperty(X)&&(o=a[X],o!==void 0&&gd(e,n,X,o,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(o=a[S],o!=null&&st(e,n,S,o,a,null))}function C1(e,n,a,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,b=null,S=null,T=null,V=null,X=null;for(G in a){var W=a[G];if(a.hasOwnProperty(G)&&W!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":T=W;default:o.hasOwnProperty(G)||st(e,n,G,null,o,W)}}for(var q in o){var G=o[q];if(W=a[q],o.hasOwnProperty(q)&&(G!=null||W!=null))switch(q){case"type":d=G;break;case"name":u=G;break;case"checked":V=G;break;case"defaultChecked":X=G;break;case"value":b=G;break;case"defaultValue":S=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(i(137,n));break;default:G!==W&&st(e,n,q,G,o,W)}}Mu(e,b,S,T,V,X,d,u);return;case"select":G=b=S=q=null;for(d in a)if(T=a[d],a.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":G=T;default:o.hasOwnProperty(d)||st(e,n,d,null,o,T)}for(u in o)if(d=o[u],T=a[u],o.hasOwnProperty(u)&&(d!=null||T!=null))switch(u){case"value":q=d;break;case"defaultValue":S=d;break;case"multiple":b=d;default:d!==T&&st(e,n,u,d,o,T)}n=S,a=b,o=G,q!=null?us(e,!!a,q,!1):!!o!=!!a&&(n!=null?us(e,!!a,n,!0):us(e,!!a,a?[]:"",!1));return;case"textarea":G=q=null;for(S in a)if(u=a[S],a.hasOwnProperty(S)&&u!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:st(e,n,S,null,o,u)}for(b in o)if(u=o[b],d=a[b],o.hasOwnProperty(b)&&(u!=null||d!=null))switch(b){case"value":q=u;break;case"defaultValue":G=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(i(91));break;default:u!==d&&st(e,n,b,u,o,d)}Gm(e,q,G);return;case"option":for(var je in a)if(q=a[je],a.hasOwnProperty(je)&&q!=null&&!o.hasOwnProperty(je))switch(je){case"selected":e.selected=!1;break;default:st(e,n,je,null,o,q)}for(T in o)if(q=o[T],G=a[T],o.hasOwnProperty(T)&&q!==G&&(q!=null||G!=null))switch(T){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:st(e,n,T,q,o,G)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in a)q=a[Re],a.hasOwnProperty(Re)&&q!=null&&!o.hasOwnProperty(Re)&&st(e,n,Re,null,o,q);for(V in o)if(q=o[V],G=a[V],o.hasOwnProperty(V)&&q!==G&&(q!=null||G!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(i(137,n));break;default:st(e,n,V,q,o,G)}return;default:if(Du(n)){for(var it in a)q=a[it],a.hasOwnProperty(it)&&q!==void 0&&!o.hasOwnProperty(it)&&gd(e,n,it,void 0,o,q);for(X in o)q=o[X],G=a[X],!o.hasOwnProperty(X)||q===G||q===void 0&&G===void 0||gd(e,n,X,q,o,G);return}}for(var P in a)q=a[P],a.hasOwnProperty(P)&&q!=null&&!o.hasOwnProperty(P)&&st(e,n,P,null,o,q);for(W in o)q=o[W],G=a[W],!o.hasOwnProperty(W)||q===G||q==null&&G==null||st(e,n,W,q,o,G)}var yd=null,bd=null;function $l(e){return e.nodeType===9?e:e.ownerDocument}function Ig(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function xd(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Sd=null;function T1(){var e=window.event;return e&&e.type==="popstate"?e===Sd?!1:(Sd=e,!0):(Sd=null,!1)}var Yg=typeof setTimeout=="function"?setTimeout:void 0,A1=typeof clearTimeout=="function"?clearTimeout:void 0,Qg=typeof Promise=="function"?Promise:void 0,R1=typeof queueMicrotask=="function"?queueMicrotask:typeof Qg<"u"?function(e){return Qg.resolve(null).then(e).catch(O1)}:Yg;function O1(e){setTimeout(function(){throw e})}function ea(e){return e==="head"}function Xg(e,n){var a=n,o=0,u=0;do{var d=a.nextSibling;if(e.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"){if(0<o&&8>o){a=o;var b=e.ownerDocument;if(a&1&&no(b.documentElement),a&2&&no(b.body),a&4)for(a=b.head,no(a),b=a.firstChild;b;){var S=b.nextSibling,T=b.nodeName;b[gi]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&b.rel.toLowerCase()==="stylesheet"||a.removeChild(b),b=S}}if(u===0){e.removeChild(d),uo(n);return}u--}else a==="$"||a==="$?"||a==="$!"?u++:o=a.charCodeAt(0)-48;else o=0;a=d}while(a);uo(n)}function _d(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":_d(a),Tu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function M1(e,n,a,o){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[gi])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Mn(e.nextSibling),e===null)break}return null}function N1(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Mn(e.nextSibling),e===null))return null;return e}function wd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function D1(e,n){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")n();else{var o=function(){n(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Mn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return e}var Ed=null;function Kg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(n===0)return e;n--}else a==="/$"&&n++}e=e.previousSibling}return null}function $g(e,n,a){switch(n=$l(a),e){case"html":if(e=n.documentElement,!e)throw Error(i(452));return e;case"head":if(e=n.head,!e)throw Error(i(453));return e;case"body":if(e=n.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function no(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Tu(e)}var _n=new Map,Wg=new Set;function Wl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _r=Q.d;Q.d={f:j1,r:k1,D:z1,C:U1,L:P1,m:L1,X:B1,S:V1,M:H1};function j1(){var e=_r.f(),n=Gl();return e||n}function k1(e){var n=is(e);n!==null&&n.tag===5&&n.type==="form"?yv(n):_r.r(e)}var Bs=typeof document>"u"?null:document;function Jg(e,n,a){var o=Bs;if(o&&typeof n=="string"&&n){var u=pn(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),Wg.has(u)||(Wg.add(u),e={rel:e,crossOrigin:a,href:n},o.querySelector(u)===null&&(n=o.createElement("link"),kt(n,"link",e),Rt(n),o.head.appendChild(n)))}}function z1(e){_r.D(e),Jg("dns-prefetch",e,null)}function U1(e,n){_r.C(e,n),Jg("preconnect",e,n)}function P1(e,n,a){_r.L(e,n,a);var o=Bs;if(o&&e&&n){var u='link[rel="preload"][as="'+pn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+pn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+pn(a.imageSizes)+'"]')):u+='[href="'+pn(e)+'"]';var d=u;switch(n){case"style":d=Hs(e);break;case"script":d=qs(e)}_n.has(d)||(e=v({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),_n.set(d,e),o.querySelector(u)!==null||n==="style"&&o.querySelector(ro(d))||n==="script"&&o.querySelector(ao(d))||(n=o.createElement("link"),kt(n,"link",e),Rt(n),o.head.appendChild(n)))}}function L1(e,n){_r.m(e,n);var a=Bs;if(a&&e){var o=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+pn(o)+'"][href="'+pn(e)+'"]',d=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=qs(e)}if(!_n.has(d)&&(e=v({rel:"modulepreload",href:e},n),_n.set(d,e),a.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ao(d)))return}o=a.createElement("link"),kt(o,"link",e),Rt(o),a.head.appendChild(o)}}}function V1(e,n,a){_r.S(e,n,a);var o=Bs;if(o&&e){var u=os(o).hoistableStyles,d=Hs(e);n=n||"default";var b=u.get(d);if(!b){var S={loading:0,preload:null};if(b=o.querySelector(ro(d)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},a),(a=_n.get(d))&&Cd(e,a);var T=b=o.createElement("link");Rt(T),kt(T,"link",e),T._p=new Promise(function(V,X){T.onload=V,T.onerror=X}),T.addEventListener("load",function(){S.loading|=1}),T.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Jl(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:S},u.set(d,b)}}}function B1(e,n){_r.X(e,n);var a=Bs;if(a&&e){var o=os(a).hoistableScripts,u=qs(e),d=o.get(u);d||(d=a.querySelector(ao(u)),d||(e=v({src:e,async:!0},n),(n=_n.get(u))&&Td(e,n),d=a.createElement("script"),Rt(d),kt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(u,d))}}function H1(e,n){_r.M(e,n);var a=Bs;if(a&&e){var o=os(a).hoistableScripts,u=qs(e),d=o.get(u);d||(d=a.querySelector(ao(u)),d||(e=v({src:e,async:!0,type:"module"},n),(n=_n.get(u))&&Td(e,n),d=a.createElement("script"),Rt(d),kt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(u,d))}}function ey(e,n,a,o){var u=(u=_e.current)?Wl(u):null;if(!u)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Hs(a.href),a=os(u).hoistableStyles,o=a.get(n),o||(o={type:"style",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Hs(a.href);var d=os(u).hoistableStyles,b=d.get(e);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=u.querySelector(ro(e)))&&!d._p&&(b.instance=d,b.state.loading=5),_n.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},_n.set(e,a),d||q1(u,e,a,b.state))),n&&o===null)throw Error(i(528,""));return b}if(n&&o!==null)throw Error(i(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=qs(a),a=os(u).hoistableScripts,o=a.get(n),o||(o={type:"script",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Hs(e){return'href="'+pn(e)+'"'}function ro(e){return'link[rel="stylesheet"]['+e+"]"}function ty(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function q1(e,n,a,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),kt(n,"link",a),Rt(n),e.head.appendChild(n))}function qs(e){return'[src="'+pn(e)+'"]'}function ao(e){return"script[async]"+e}function ny(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+pn(a.href)+'"]');if(o)return n.instance=o,Rt(o),o;var u=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Rt(o),kt(o,"style",u),Jl(o,a.precedence,e),n.instance=o;case"stylesheet":u=Hs(a.href);var d=e.querySelector(ro(u));if(d)return n.state.loading|=4,n.instance=d,Rt(d),d;o=ty(a),(u=_n.get(u))&&Cd(o,u),d=(e.ownerDocument||e).createElement("link"),Rt(d);var b=d;return b._p=new Promise(function(S,T){b.onload=S,b.onerror=T}),kt(d,"link",o),n.state.loading|=4,Jl(d,a.precedence,e),n.instance=d;case"script":return d=qs(a.src),(u=e.querySelector(ao(d)))?(n.instance=u,Rt(u),u):(o=a,(u=_n.get(d))&&(o=v({},a),Td(o,u)),e=e.ownerDocument||e,u=e.createElement("script"),Rt(u),kt(u,"link",o),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Jl(o,a.precedence,e));return n.instance}function Jl(e,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,d=u,b=0;b<o.length;b++){var S=o[b];if(S.dataset.precedence===n)d=S;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Cd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Td(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var ec=null;function ry(e,n,a){if(ec===null){var o=new Map,u=ec=new Map;u.set(a,o)}else u=ec,o=u.get(a),o||(o=new Map,u.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var d=a[u];if(!(d[gi]||d[Lt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(n)||"";b=e+b;var S=o.get(b);S?S.push(d):o.set(b,[d])}}return o}function ay(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function G1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function sy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var so=null;function F1(){}function I1(e,n,a){if(so===null)throw Error(i(475));var o=so;if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=Hs(a.href),d=e.querySelector(ro(u));if(d){e=d._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=tc.bind(o),e.then(o,o)),n.state.loading|=4,n.instance=d,Rt(d);return}d=e.ownerDocument||e,a=ty(a),(u=_n.get(u))&&Cd(a,u),d=d.createElement("link"),Rt(d);var b=d;b._p=new Promise(function(S,T){b.onload=S,b.onerror=T}),kt(d,"link",a),n.instance=d}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(o.count++,n=tc.bind(o),e.addEventListener("load",n),e.addEventListener("error",n))}}function Z1(){if(so===null)throw Error(i(475));var e=so;return e.stylesheets&&e.count===0&&Ad(e,e.stylesheets),0<e.count?function(n){var a=setTimeout(function(){if(e.stylesheets&&Ad(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a)}}:null}function tc(){if(this.count--,this.count===0){if(this.stylesheets)Ad(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var nc=null;function Ad(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nc=new Map,n.forEach(Y1,e),nc=null,tc.call(e))}function Y1(e,n){if(!(n.state.loading&4)){var a=nc.get(e);if(a)var o=a.get(null);else{a=new Map,nc.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var b=u[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),o=b)}o&&a.set(null,o)}u=n.instance,b=u.getAttribute("data-precedence"),d=a.get(b)||o,d===o&&a.set(null,u),a.set(b,u),this.count++,o=tc.bind(this),u.addEventListener("load",o),u.addEventListener("error",o),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=4}}var io={$$typeof:U,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function Q1(e,n,a,o,u,d,b,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_u(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_u(0),this.hiddenUpdates=_u(null),this.identifierPrefix=o,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function iy(e,n,a,o,u,d,b,S,T,V,X,W){return e=new Q1(e,n,a,b,S,T,V,W),n=1,d===!0&&(n|=24),d=rn(3,null,null,n),e.current=d,d.stateNode=e,n=lf(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:o,isDehydrated:a,cache:n},df(d),e}function oy(e){return e?(e=bs,e):bs}function ly(e,n,a,o,u,d){u=oy(u),o.context===null?o.context=u:o.pendingContext=u,o=Hr(n),o.payload={element:a},d=d===void 0?null:d,d!==null&&(o.callback=d),a=qr(e,o,n),a!==null&&(cn(a,e,n),Ui(a,e,n))}function cy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Rd(e,n){cy(e,n),(e=e.alternate)&&cy(e,n)}function uy(e){if(e.tag===13){var n=ys(e,67108864);n!==null&&cn(n,e,67108864),Rd(e,67108864)}}var rc=!0;function X1(e,n,a,o){var u=j.T;j.T=null;var d=Q.p;try{Q.p=2,Od(e,n,a,o)}finally{Q.p=d,j.T=u}}function K1(e,n,a,o){var u=j.T;j.T=null;var d=Q.p;try{Q.p=8,Od(e,n,a,o)}finally{Q.p=d,j.T=u}}function Od(e,n,a,o){if(rc){var u=Md(o);if(u===null)vd(e,n,o,ac,a),dy(e,o);else if(W1(u,e,n,a,o))o.stopPropagation();else if(dy(e,o),n&4&&-1<$1.indexOf(e)){for(;u!==null;){var d=is(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=or(d.pendingLanes);if(b!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;b;){var T=1<<31-lt(b);S.entanglements[1]|=T,b&=~T}Yn(d),(tt&6)===0&&(Hl=Pt()+500,Ji(0))}}break;case 13:S=ys(d,2),S!==null&&cn(S,d,2),Gl(),Rd(d,2)}if(d=Md(o),d===null&&vd(e,n,o,ac,a),d===u)break;u=d}u!==null&&o.stopPropagation()}else vd(e,n,o,null,a)}}function Md(e){return e=ku(e),Nd(e)}var ac=null;function Nd(e){if(ac=null,e=ss(e),e!==null){var n=c(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=f(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return ac=e,null}function fy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Am()){case pi:return 2;case N:return 8;case B:case K:return 32;case ve:return 268435456;default:return 32}default:return 32}}var Dd=!1,ta=null,na=null,ra=null,oo=new Map,lo=new Map,aa=[],$1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dy(e,n){switch(e){case"focusin":case"focusout":ta=null;break;case"dragenter":case"dragleave":na=null;break;case"mouseover":case"mouseout":ra=null;break;case"pointerover":case"pointerout":oo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":lo.delete(n.pointerId)}}function co(e,n,a,o,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:d,targetContainers:[u]},n!==null&&(n=is(n),n!==null&&uy(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function W1(e,n,a,o,u){switch(n){case"focusin":return ta=co(ta,e,n,a,o,u),!0;case"dragenter":return na=co(na,e,n,a,o,u),!0;case"mouseover":return ra=co(ra,e,n,a,o,u),!0;case"pointerover":var d=u.pointerId;return oo.set(d,co(oo.get(d)||null,e,n,a,o,u)),!0;case"gotpointercapture":return d=u.pointerId,lo.set(d,co(lo.get(d)||null,e,n,a,o,u)),!0}return!1}function hy(e){var n=ss(e.target);if(n!==null){var a=c(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,I_(e.priority,function(){if(a.tag===13){var o=ln();o=wu(o);var u=ys(a,o);u!==null&&cn(u,a,o),Rd(a,o)}});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sc(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Md(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);ju=o,a.target.dispatchEvent(o),ju=null}else return n=is(a),n!==null&&uy(n),e.blockedOn=a,!1;n.shift()}return!0}function my(e,n,a){sc(e)&&a.delete(n)}function J1(){Dd=!1,ta!==null&&sc(ta)&&(ta=null),na!==null&&sc(na)&&(na=null),ra!==null&&sc(ra)&&(ra=null),oo.forEach(my),lo.forEach(my)}function ic(e,n){e.blockedOn===n&&(e.blockedOn=null,Dd||(Dd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,J1)))}var oc=null;function py(e){oc!==e&&(oc=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){oc===e&&(oc=null);for(var n=0;n<e.length;n+=3){var a=e[n],o=e[n+1],u=e[n+2];if(typeof o!="function"){if(Nd(o||a)===null)continue;break}var d=is(a);d!==null&&(e.splice(n,3),n-=3,Nf(d,{pending:!0,data:u,method:a.method,action:o},o,u))}}))}function uo(e){function n(T){return ic(T,e)}ta!==null&&ic(ta,e),na!==null&&ic(na,e),ra!==null&&ic(ra,e),oo.forEach(n),lo.forEach(n);for(var a=0;a<aa.length;a++){var o=aa[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<aa.length&&(a=aa[0],a.blockedOn===null);)hy(a),a.blockedOn===null&&aa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var u=a[o],d=a[o+1],b=u[Kt]||null;if(typeof d=="function")b||py(a);else if(b){var S=null;if(d&&d.hasAttribute("formAction")){if(u=d,b=d[Kt]||null)S=b.formAction;else if(Nd(u)!==null)continue}else S=b.action;typeof S=="function"?a[o+1]=S:(a.splice(o,3),o-=3),py(a)}}}function jd(e){this._internalRoot=e}lc.prototype.render=jd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));var a=n.current,o=ln();ly(a,o,e,n,null,null)},lc.prototype.unmount=jd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;ly(e.current,2,null,e,null,null),Gl(),n[as]=null}};function lc(e){this._internalRoot=e}lc.prototype.unstable_scheduleHydration=function(e){if(e){var n=Dm();e={blockedOn:null,target:e,priority:n};for(var a=0;a<aa.length&&n!==0&&n<aa[a].priority;a++);aa.splice(a,0,e),a===0&&hy(e)}};var vy=r.version;if(vy!=="19.1.1")throw Error(i(527,vy,"19.1.1"));Q.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=m(n),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var eE={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cc.isDisabled&&cc.supportsFiber)try{we=cc.inject(eE),ze=cc}catch{}}return ho.createRoot=function(e,n){if(!l(e))throw Error(i(299));var a=!1,o="",u=Dv,d=jv,b=kv,S=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(S=n.unstable_transitionCallbacks)),n=iy(e,1,!1,null,null,a,o,u,d,b,S,null),e[as]=n.current,pd(e),new jd(n)},ho.hydrateRoot=function(e,n,a){if(!l(e))throw Error(i(299));var o=!1,u="",d=Dv,b=jv,S=kv,T=null,V=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(T=a.unstable_transitionCallbacks),a.formState!==void 0&&(V=a.formState)),n=iy(e,1,!0,n,a??null,o,u,d,b,S,T,V),n.context=oy(null),a=n.current,o=ln(),o=wu(o),u=Hr(o),u.callback=null,qr(a,u,o),a=o,n.current.lanes=a,vi(n,a),Yn(n),e[as]=n.current,pd(e),new lc(n)},ho.version="19.1.1",ho}var zy;function FE(){if(zy)return Ud.exports;zy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Ud.exports=GE(),Ud.exports}var IE=FE();const Fj=jh(IE);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZE=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YE=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,i)=>i?i.toUpperCase():s.toLowerCase()),Uy=t=>{const r=YE(t);return r.charAt(0).toUpperCase()+r.slice(1)},nx=(...t)=>t.filter((r,s,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===s).join(" ").trim(),QE=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var XE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KE=y.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:l="",children:c,iconNode:f,...h},m)=>y.createElement("svg",{ref:m,...XE,width:r,height:r,stroke:t,strokeWidth:i?Number(s)*24/Number(r):s,className:nx("lucide",l),...!c&&!QE(h)&&{"aria-hidden":"true"},...h},[...f.map(([p,v])=>y.createElement(p,v)),...Array.isArray(c)?c:[c]]));/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tn=(t,r)=>{const s=y.forwardRef(({className:i,...l},c)=>y.createElement(KE,{ref:c,iconNode:r,className:nx(`lucide-${ZE(Uy(t))}`,`lucide-${t}`,i),...l}));return s.displayName=Uy(t),s};/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $E=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],WE=Tn("check",$E);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],rx=Tn("chevron-down",JE);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eC=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],tC=Tn("chevron-left",eC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],rC=Tn("chevron-right",nC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],sC=Tn("chevron-up",aC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iC=[["path",{d:"M11 20H2",key:"nlcfvz"}],["path",{d:"M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z",key:"au4z13"}],["path",{d:"M11 4H8a2 2 0 0 0-2 2v14",key:"74r1mk"}],["path",{d:"M14 12h.01",key:"1jfl7z"}],["path",{d:"M22 20h-3",key:"vhrsz"}]],oC=Tn("door-open",iC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lC=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],cC=Tn("ellipsis",lC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uC=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ax=Tn("eye-off",uC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fC=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],sx=Tn("eye",fC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hC=Tn("search",dC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mC=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],pC=Tn("square-pen",mC);/**
* @license lucide-react v0.540.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vh=Tn("x",vC);function Py(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Xc(...t){return r=>{let s=!1;const i=t.map(l=>{const c=Py(l,r);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let l=0;l<i.length;l++){const c=i[l];typeof c=="function"?c():Py(t[l],null)}}}}function Ie(...t){return y.useCallback(Xc(...t),t)}function ua(t){const r=gC(t),s=y.forwardRef((i,l)=>{const{children:c,...f}=i,h=y.Children.toArray(c),m=h.find(bC);if(m){const p=m.props.children,v=h.map(x=>x===m?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:x);return g.jsx(r,{...f,ref:l,children:y.isValidElement(p)?y.cloneElement(p,void 0,v):null})}return g.jsx(r,{...f,ref:l,children:c})});return s.displayName=`${t}.Slot`,s}var Bh=ua("Slot");function gC(t){const r=y.forwardRef((s,i)=>{const{children:l,...c}=s;if(y.isValidElement(l)){const f=SC(l),h=xC(c,l.props);return l.type!==y.Fragment&&(h.ref=i?Xc(i,f):f),y.cloneElement(l,h)}return y.Children.count(l)>1?y.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var ix=Symbol("radix.slottable");function yC(t){const r=({children:s})=>g.jsx(g.Fragment,{children:s});return r.displayName=`${t}.Slottable`,r.__radixId=ix,r}function bC(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===ix}function xC(t,r){const s={...r};for(const i in r){const l=t[i],c=r[i];/^on[A-Z]/.test(i)?l&&c?s[i]=(...h)=>{const m=c(...h);return l(...h),m}:l&&(s[i]=l):i==="style"?s[i]={...l,...c}:i==="className"&&(s[i]=[l,c].filter(Boolean).join(" "))}return{...t,...s}}function SC(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}function ox(t){var r,s,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(r=0;r<l;r++)t[r]&&(s=ox(t[r]))&&(i&&(i+=" "),i+=s)}else for(s in t)t[s]&&(i&&(i+=" "),i+=s);return i}function lx(){for(var t,r,s=0,i="",l=arguments.length;s<l;s++)(t=arguments[s])&&(r=ox(t))&&(i&&(i+=" "),i+=r);return i}const Ly=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Vy=lx,Hh=(t,r)=>s=>{var i;if(r?.variants==null)return Vy(t,s?.class,s?.className);const{variants:l,defaultVariants:c}=r,f=Object.keys(l).map(p=>{const v=s?.[p],x=c?.[p];if(v===null)return null;const _=Ly(v)||Ly(x);return l[p][_]}),h=s&&Object.entries(s).reduce((p,v)=>{let[x,_]=v;return _===void 0||(p[x]=_),p},{}),m=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((p,v)=>{let{class:x,className:_,...E}=v;return Object.entries(E).every(R=>{let[w,C]=R;return Array.isArray(C)?C.includes({...c,...h}[w]):{...c,...h}[w]===C})?[...p,x,_]:p},[]);return Vy(t,f,m,s?.class,s?.className)},qh="-",_C=t=>{const r=EC(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:f=>{const h=f.split(qh);return h[0]===""&&h.length!==1&&h.shift(),cx(h,r)||wC(f)},getConflictingClassGroupIds:(f,h)=>{const m=s[f]||[];return h&&i[f]?[...m,...i[f]]:m}}},cx=(t,r)=>{if(t.length===0)return r.classGroupId;const s=t[0],i=r.nextPart.get(s),l=i?cx(t.slice(1),i):void 0;if(l)return l;if(r.validators.length===0)return;const c=t.join(qh);return r.validators.find(({validator:f})=>f(c))?.classGroupId},By=/^\[(.+)\]$/,wC=t=>{if(By.test(t)){const r=By.exec(t)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},EC=t=>{const{theme:r,classGroups:s}=t,i={nextPart:new Map,validators:[]};for(const l in s)lh(s[l],i,l,r);return i},lh=(t,r,s,i)=>{t.forEach(l=>{if(typeof l=="string"){const c=l===""?r:Hy(r,l);c.classGroupId=s;return}if(typeof l=="function"){if(CC(l)){lh(l(i),r,s,i);return}r.validators.push({validator:l,classGroupId:s});return}Object.entries(l).forEach(([c,f])=>{lh(f,Hy(r,c),s,i)})})},Hy=(t,r)=>{let s=t;return r.split(qh).forEach(i=>{s.nextPart.has(i)||s.nextPart.set(i,{nextPart:new Map,validators:[]}),s=s.nextPart.get(i)}),s},CC=t=>t.isThemeGetter,TC=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,i=new Map;const l=(c,f)=>{s.set(c,f),r++,r>t&&(r=0,i=s,s=new Map)};return{get(c){let f=s.get(c);if(f!==void 0)return f;if((f=i.get(c))!==void 0)return l(c,f),f},set(c,f){s.has(c)?s.set(c,f):l(c,f)}}},ch="!",uh=":",AC=uh.length,RC=t=>{const{prefix:r,experimentalParseClassName:s}=t;let i=l=>{const c=[];let f=0,h=0,m=0,p;for(let R=0;R<l.length;R++){let w=l[R];if(f===0&&h===0){if(w===uh){c.push(l.slice(m,R)),m=R+AC;continue}if(w==="/"){p=R;continue}}w==="["?f++:w==="]"?f--:w==="("?h++:w===")"&&h--}const v=c.length===0?l:l.substring(m),x=OC(v),_=x!==v,E=p&&p>m?p-m:void 0;return{modifiers:c,hasImportantModifier:_,baseClassName:x,maybePostfixModifierPosition:E}};if(r){const l=r+uh,c=i;i=f=>f.startsWith(l)?c(f.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(s){const l=i;i=c=>s({className:c,parseClassName:l})}return i},OC=t=>t.endsWith(ch)?t.substring(0,t.length-1):t.startsWith(ch)?t.substring(1):t,MC=t=>{const r=Object.fromEntries(t.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const l=[];let c=[];return i.forEach(f=>{f[0]==="["||r[f]?(l.push(...c.sort(),f),c=[]):c.push(f)}),l.push(...c.sort()),l}},NC=t=>({cache:TC(t.cacheSize),parseClassName:RC(t),sortModifiers:MC(t),..._C(t)}),DC=/\s+/,jC=(t,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:l,sortModifiers:c}=r,f=[],h=t.trim().split(DC);let m="";for(let p=h.length-1;p>=0;p-=1){const v=h[p],{isExternal:x,modifiers:_,hasImportantModifier:E,baseClassName:R,maybePostfixModifierPosition:w}=s(v);if(x){m=v+(m.length>0?" "+m:m);continue}let C=!!w,z=i(C?R.substring(0,w):R);if(!z){if(!C){m=v+(m.length>0?" "+m:m);continue}if(z=i(R),!z){m=v+(m.length>0?" "+m:m);continue}C=!1}const O=c(_).join(":"),U=E?O+ch:O,k=U+z;if(f.includes(k))continue;f.push(k);const M=l(z,C);for(let Z=0;Z<M.length;++Z){const F=M[Z];f.push(U+F)}m=v+(m.length>0?" "+m:m)}return m};function kC(){let t=0,r,s,i="";for(;t<arguments.length;)(r=arguments[t++])&&(s=ux(r))&&(i&&(i+=" "),i+=s);return i}const ux=t=>{if(typeof t=="string")return t;let r,s="";for(let i=0;i<t.length;i++)t[i]&&(r=ux(t[i]))&&(s&&(s+=" "),s+=r);return s};function zC(t,...r){let s,i,l,c=f;function f(m){const p=r.reduce((v,x)=>x(v),t());return s=NC(p),i=s.cache.get,l=s.cache.set,c=h,h(m)}function h(m){const p=i(m);if(p)return p;const v=jC(m,s);return l(m,v),v}return function(){return c(kC.apply(null,arguments))}}const Et=t=>{const r=s=>s[t]||[];return r.isThemeGetter=!0,r},fx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UC=/^\d+\/\d+$/,PC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,VC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,BC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gs=t=>UC.test(t),Be=t=>!!t&&!Number.isNaN(Number(t)),ia=t=>!!t&&Number.isInteger(Number(t)),Bd=t=>t.endsWith("%")&&Be(t.slice(0,-1)),wr=t=>PC.test(t),qC=()=>!0,GC=t=>LC.test(t)&&!VC.test(t),hx=()=>!1,FC=t=>BC.test(t),IC=t=>HC.test(t),ZC=t=>!xe(t)&&!Se(t),YC=t=>li(t,vx,hx),xe=t=>fx.test(t),qa=t=>li(t,gx,GC),Hd=t=>li(t,WC,Be),qy=t=>li(t,mx,hx),QC=t=>li(t,px,IC),fc=t=>li(t,yx,FC),Se=t=>dx.test(t),mo=t=>ci(t,gx),XC=t=>ci(t,JC),Gy=t=>ci(t,mx),KC=t=>ci(t,vx),$C=t=>ci(t,px),dc=t=>ci(t,yx,!0),li=(t,r,s)=>{const i=fx.exec(t);return i?i[1]?r(i[1]):s(i[2]):!1},ci=(t,r,s=!1)=>{const i=dx.exec(t);return i?i[1]?r(i[1]):s:!1},mx=t=>t==="position"||t==="percentage",px=t=>t==="image"||t==="url",vx=t=>t==="length"||t==="size"||t==="bg-size",gx=t=>t==="length",WC=t=>t==="number",JC=t=>t==="family-name",yx=t=>t==="shadow",eT=()=>{const t=Et("color"),r=Et("font"),s=Et("text"),i=Et("font-weight"),l=Et("tracking"),c=Et("leading"),f=Et("breakpoint"),h=Et("container"),m=Et("spacing"),p=Et("radius"),v=Et("shadow"),x=Et("inset-shadow"),_=Et("text-shadow"),E=Et("drop-shadow"),R=Et("blur"),w=Et("perspective"),C=Et("aspect"),z=Et("ease"),O=Et("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...k(),Se,xe],Z=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],I=()=>[Se,xe,m],te=()=>[Gs,"full","auto",...I()],ie=()=>[ia,"none","subgrid",Se,xe],ge=()=>["auto",{span:["full",ia,Se,xe]},ia,Se,xe],ae=()=>[ia,"auto",Se,xe],se=()=>["auto","min","max","fr",Se,xe],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...I()],Q=()=>[Gs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],H=()=>[t,Se,xe],J=()=>[...k(),Gy,qy,{position:[Se,xe]}],A=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",KC,YC,{size:[Se,xe]}],oe=()=>[Bd,mo,qa],ee=()=>["","none","full",p,Se,xe],ue=()=>["",Be,mo,qa],Oe=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Be,Bd,Gy,qy],Te=()=>["","none",R,Se,xe],$e=()=>["none",Be,Se,xe],He=()=>["none",Be,Se,xe],Ye=()=>[Be,Se,xe],We=()=>[Gs,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wr],breakpoint:[wr],color:[qC],container:[wr],"drop-shadow":[wr],ease:["in","out","in-out"],font:[ZC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wr],shadow:[wr],spacing:["px",Be],text:[wr],"text-shadow":[wr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gs,xe,Se,C]}],container:["container"],columns:[{columns:[Be,xe,Se,h]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:te()}],"inset-x":[{"inset-x":te()}],"inset-y":[{"inset-y":te()}],start:[{start:te()}],end:[{end:te()}],top:[{top:te()}],right:[{right:te()}],bottom:[{bottom:te()}],left:[{left:te()}],visibility:["visible","invisible","collapse"],z:[{z:[ia,"auto",Se,xe]}],basis:[{basis:[Gs,"full","auto",h,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,Gs,"auto","initial","none",xe]}],grow:[{grow:["",Be,Se,xe]}],shrink:[{shrink:["",Be,Se,xe]}],order:[{order:[ia,"first","last","none",Se,xe]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:ge()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:ge()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[h,"screen",...Q()]}],"min-w":[{"min-w":[h,"screen","none",...Q()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",s,mo,qa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Se,Hd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bd,xe]}],"font-family":[{font:[XC,xe,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,Se,xe]}],"line-clamp":[{"line-clamp":[Be,"none",Se,Hd]}],leading:[{leading:[c,...I()]}],"list-image":[{"list-image":["none",Se,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",Se,qa]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[Be,"auto",Se,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:A()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ia,Se,xe],radial:["",Se,xe],conic:[ia,Se,xe]},$C,QC]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Oe(),"hidden","none"]}],"divide-style":[{divide:[...Oe(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,Se,xe]}],"outline-w":[{outline:["",Be,mo,qa]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",v,dc,fc]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",x,dc,fc]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[Be,qa]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",_,dc,fc]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[Be,Se,xe]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Be]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[Se,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:A()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,xe]}],filter:[{filter:["","none",Se,xe]}],blur:[{blur:Te()}],brightness:[{brightness:[Be,Se,xe]}],contrast:[{contrast:[Be,Se,xe]}],"drop-shadow":[{"drop-shadow":["","none",E,dc,fc]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",Be,Se,xe]}],"hue-rotate":[{"hue-rotate":[Be,Se,xe]}],invert:[{invert:["",Be,Se,xe]}],saturate:[{saturate:[Be,Se,xe]}],sepia:[{sepia:["",Be,Se,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,xe]}],"backdrop-blur":[{"backdrop-blur":Te()}],"backdrop-brightness":[{"backdrop-brightness":[Be,Se,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Be,Se,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,Se,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,Se,xe]}],"backdrop-invert":[{"backdrop-invert":["",Be,Se,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Be,Se,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Be,Se,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,Se,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Be,"initial",Se,xe]}],ease:[{ease:["linear","initial",z,Se,xe]}],delay:[{delay:[Be,Se,xe]}],animate:[{animate:["none",O,Se,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Se,xe]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:$e()}],"rotate-x":[{"rotate-x":$e()}],"rotate-y":[{"rotate-y":$e()}],"rotate-z":[{"rotate-z":$e()}],scale:[{scale:He()}],"scale-x":[{"scale-x":He()}],"scale-y":[{"scale-y":He()}],"scale-z":[{"scale-z":He()}],"scale-3d":["scale-3d"],skew:[{skew:Ye()}],"skew-x":[{"skew-x":Ye()}],"skew-y":[{"skew-y":Ye()}],transform:[{transform:[Se,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,xe]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[Be,mo,qa,Hd]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},tT=zC(eT);function Ze(...t){return tT(lx(t))}function fh(t){let r=[];Array.isArray(t?.listImage)&&(r=t.listImage.map(l=>typeof l=="string"?l:`https://int.ipsupply.com.au${l.url}`).slice(0,10));let s=`Package contain:
`;Array.isArray(t?.package_contain)?s+=t.package_contain.map(l=>`- ${l}`).join(`
`):typeof t?.package_contain=="string"&&t.package_contain.trim()!==""&&(s+=t.package_contain);const i=[t.description||"",t.code||"",t.title||"",(typeof t?.category=="string"?t.category:t?.category?.name)||"",s].filter(Boolean).join(`
`);return{images:r,title:t?.title?.includes(t?.code)?t?.title:`${t?.title} - ${t?.code}`,price:t?.price,category:"electronics & computers",condition:t?.conditionEbay?.toLowerCase()?.includes("new")?"new":"used like new",brand:typeof t?.manufactor=="string"?t?.manufactor:"",description:i,tags:[],sku:t?.code,location:t?.location||"Sydney, Australia",status:!1,id:t?.id,publist_id:t?.listingId,raw_condition:t?.condition}}const nT=Hh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-7 rounded-md gap-1 px-2.5 has-[>svg]:px-2",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Xn({className:t,variant:r,size:s,asChild:i=!1,...l}){const c=i?Bh:"button";return g.jsx(c,{"data-slot":"button",className:Ze(nT({variant:r,size:s,className:t})),...l})}function me(t,r,{checkForDefaultPrevented:s=!0}={}){return function(l){if(t?.(l),s===!1||!l.defaultPrevented)return r?.(l)}}function rT(t,r){const s=y.createContext(r),i=c=>{const{children:f,...h}=c,m=y.useMemo(()=>h,Object.values(h));return g.jsx(s.Provider,{value:m,children:f})};i.displayName=t+"Provider";function l(c){const f=y.useContext(s);if(f)return f;if(r!==void 0)return r;throw new Error(`\`${c}\` must be used within \`${t}\``)}return[i,l]}function Bn(t,r=[]){let s=[];function i(c,f){const h=y.createContext(f),m=s.length;s=[...s,f];const p=x=>{const{scope:_,children:E,...R}=x,w=_?.[t]?.[m]||h,C=y.useMemo(()=>R,Object.values(R));return g.jsx(w.Provider,{value:C,children:E})};p.displayName=c+"Provider";function v(x,_){const E=_?.[t]?.[m]||h,R=y.useContext(E);if(R)return R;if(f!==void 0)return f;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[p,v]}const l=()=>{const c=s.map(f=>y.createContext(f));return function(h){const m=h?.[t]||c;return y.useMemo(()=>({[`__scope${t}`]:{...h,[t]:m}}),[h,m])}};return l.scopeName=t,[i,aT(l,...r)]}function aT(...t){const r=t[0];if(t.length===1)return r;const s=()=>{const i=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const f=i.reduce((h,{useScope:m,scopeName:p})=>{const x=m(c)[`__scope${p}`];return{...h,...x}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:f}),[f])}};return s.scopeName=r.scopeName,s}var Bo=tx();const sT=jh(Bo);var iT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=iT.reduce((t,r)=>{const s=ua(`Primitive.${r}`),i=y.forwardRef((l,c)=>{const{asChild:f,...h}=l,m=f?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(m,{...h,ref:c})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function bx(t,r){t&&Bo.flushSync(()=>t.dispatchEvent(r))}function zt(t){const r=y.useRef(t);return y.useEffect(()=>{r.current=t}),y.useMemo(()=>(...s)=>r.current?.(...s),[])}function oT(t,r=globalThis?.document){const s=zt(t);y.useEffect(()=>{const i=l=>{l.key==="Escape"&&s(l)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[s,r])}var lT="DismissableLayer",dh="dismissableLayer.update",cT="dismissableLayer.pointerDownOutside",uT="dismissableLayer.focusOutside",Fy,xx=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ui=y.forwardRef((t,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,onDismiss:h,...m}=t,p=y.useContext(xx),[v,x]=y.useState(null),_=v?.ownerDocument??globalThis?.document,[,E]=y.useState({}),R=Ie(r,F=>x(F)),w=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),z=w.indexOf(C),O=v?w.indexOf(v):-1,U=p.layersWithOutsidePointerEventsDisabled.size>0,k=O>=z,M=hT(F=>{const I=F.target,te=[...p.branches].some(ie=>ie.contains(I));!k||te||(l?.(F),f?.(F),F.defaultPrevented||h?.())},_),Z=mT(F=>{const I=F.target;[...p.branches].some(ie=>ie.contains(I))||(c?.(F),f?.(F),F.defaultPrevented||h?.())},_);return oT(F=>{O===p.layers.size-1&&(i?.(F),!F.defaultPrevented&&h&&(F.preventDefault(),h()))},_),y.useEffect(()=>{if(v)return s&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Fy=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(v)),p.layers.add(v),Iy(),()=>{s&&p.layersWithOutsidePointerEventsDisabled.size===1&&(_.body.style.pointerEvents=Fy)}},[v,_,s,p]),y.useEffect(()=>()=>{v&&(p.layers.delete(v),p.layersWithOutsidePointerEventsDisabled.delete(v),Iy())},[v,p]),y.useEffect(()=>{const F=()=>E({});return document.addEventListener(dh,F),()=>document.removeEventListener(dh,F)},[]),g.jsx(ke.div,{...m,ref:R,style:{pointerEvents:U?k?"auto":"none":void 0,...t.style},onFocusCapture:me(t.onFocusCapture,Z.onFocusCapture),onBlurCapture:me(t.onBlurCapture,Z.onBlurCapture),onPointerDownCapture:me(t.onPointerDownCapture,M.onPointerDownCapture)})});ui.displayName=lT;var fT="DismissableLayerBranch",dT=y.forwardRef((t,r)=>{const s=y.useContext(xx),i=y.useRef(null),l=Ie(r,i);return y.useEffect(()=>{const c=i.current;if(c)return s.branches.add(c),()=>{s.branches.delete(c)}},[s.branches]),g.jsx(ke.div,{...t,ref:l})});dT.displayName=fT;function hT(t,r=globalThis?.document){const s=zt(t),i=y.useRef(!1),l=y.useRef(()=>{});return y.useEffect(()=>{const c=h=>{if(h.target&&!i.current){let m=function(){Sx(cT,s,p,{discrete:!0})};const p={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",l.current),l.current=m,r.addEventListener("click",l.current,{once:!0})):m()}else r.removeEventListener("click",l.current);i.current=!1},f=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),r.removeEventListener("pointerdown",c),r.removeEventListener("click",l.current)}},[r,s]),{onPointerDownCapture:()=>i.current=!0}}function mT(t,r=globalThis?.document){const s=zt(t),i=y.useRef(!1);return y.useEffect(()=>{const l=c=>{c.target&&!i.current&&Sx(uT,s,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",l),()=>r.removeEventListener("focusin",l)},[r,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Iy(){const t=new CustomEvent(dh);document.dispatchEvent(t)}function Sx(t,r,s,{discrete:i}){const l=s.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:s});r&&l.addEventListener(t,r,{once:!0}),i?bx(l,c):l.dispatchEvent(c)}var Ut=globalThis?.document?y.useLayoutEffect:()=>{},pT=Kb[" useId ".trim().toString()]||(()=>{}),vT=0;function zn(t){const[r,s]=y.useState(pT());return Ut(()=>{s(i=>i??String(vT++))},[t]),t||(r?`radix-${r}`:"")}const gT=["top","right","bottom","left"],fa=Math.min,fn=Math.max,Rc=Math.round,hc=Math.floor,Jn=t=>({x:t,y:t}),yT={left:"right",right:"left",bottom:"top",top:"bottom"},bT={start:"end",end:"start"};function hh(t,r,s){return fn(t,fa(r,s))}function Nr(t,r){return typeof t=="function"?t(r):t}function Dr(t){return t.split("-")[0]}function fi(t){return t.split("-")[1]}function Gh(t){return t==="x"?"y":"x"}function Fh(t){return t==="y"?"height":"width"}const xT=new Set(["top","bottom"]);function $n(t){return xT.has(Dr(t))?"y":"x"}function Ih(t){return Gh($n(t))}function ST(t,r,s){s===void 0&&(s=!1);const i=fi(t),l=Ih(t),c=Fh(l);let f=l==="x"?i===(s?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(f=Oc(f)),[f,Oc(f)]}function _T(t){const r=Oc(t);return[mh(t),r,mh(r)]}function mh(t){return t.replace(/start|end/g,r=>bT[r])}const Zy=["left","right"],Yy=["right","left"],wT=["top","bottom"],ET=["bottom","top"];function CT(t,r,s){switch(t){case"top":case"bottom":return s?r?Yy:Zy:r?Zy:Yy;case"left":case"right":return r?wT:ET;default:return[]}}function TT(t,r,s,i){const l=fi(t);let c=CT(Dr(t),s==="start",i);return l&&(c=c.map(f=>f+"-"+l),r&&(c=c.concat(c.map(mh)))),c}function Oc(t){return t.replace(/left|right|bottom|top/g,r=>yT[r])}function AT(t){return{top:0,right:0,bottom:0,left:0,...t}}function _x(t){return typeof t!="number"?AT(t):{top:t,right:t,bottom:t,left:t}}function Mc(t){const{x:r,y:s,width:i,height:l}=t;return{width:i,height:l,top:s,left:r,right:r+i,bottom:s+l,x:r,y:s}}function Qy(t,r,s){let{reference:i,floating:l}=t;const c=$n(r),f=Ih(r),h=Fh(f),m=Dr(r),p=c==="y",v=i.x+i.width/2-l.width/2,x=i.y+i.height/2-l.height/2,_=i[h]/2-l[h]/2;let E;switch(m){case"top":E={x:v,y:i.y-l.height};break;case"bottom":E={x:v,y:i.y+i.height};break;case"right":E={x:i.x+i.width,y:x};break;case"left":E={x:i.x-l.width,y:x};break;default:E={x:i.x,y:i.y}}switch(fi(r)){case"start":E[f]-=_*(s&&p?-1:1);break;case"end":E[f]+=_*(s&&p?-1:1);break}return E}const RT=async(t,r,s)=>{const{placement:i="bottom",strategy:l="absolute",middleware:c=[],platform:f}=s,h=c.filter(Boolean),m=await(f.isRTL==null?void 0:f.isRTL(r));let p=await f.getElementRects({reference:t,floating:r,strategy:l}),{x:v,y:x}=Qy(p,i,m),_=i,E={},R=0;for(let w=0;w<h.length;w++){const{name:C,fn:z}=h[w],{x:O,y:U,data:k,reset:M}=await z({x:v,y:x,initialPlacement:i,placement:_,strategy:l,middlewareData:E,rects:p,platform:f,elements:{reference:t,floating:r}});v=O??v,x=U??x,E={...E,[C]:{...E[C],...k}},M&&R<=50&&(R++,typeof M=="object"&&(M.placement&&(_=M.placement),M.rects&&(p=M.rects===!0?await f.getElementRects({reference:t,floating:r,strategy:l}):M.rects),{x:v,y:x}=Qy(p,_,m)),w=-1)}return{x:v,y:x,placement:_,strategy:l,middlewareData:E}};async function _o(t,r){var s;r===void 0&&(r={});const{x:i,y:l,platform:c,rects:f,elements:h,strategy:m}=t,{boundary:p="clippingAncestors",rootBoundary:v="viewport",elementContext:x="floating",altBoundary:_=!1,padding:E=0}=Nr(r,t),R=_x(E),C=h[_?x==="floating"?"reference":"floating":x],z=Mc(await c.getClippingRect({element:(s=await(c.isElement==null?void 0:c.isElement(C)))==null||s?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:p,rootBoundary:v,strategy:m})),O=x==="floating"?{x:i,y:l,width:f.floating.width,height:f.floating.height}:f.reference,U=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),k=await(c.isElement==null?void 0:c.isElement(U))?await(c.getScale==null?void 0:c.getScale(U))||{x:1,y:1}:{x:1,y:1},M=Mc(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:O,offsetParent:U,strategy:m}):O);return{top:(z.top-M.top+R.top)/k.y,bottom:(M.bottom-z.bottom+R.bottom)/k.y,left:(z.left-M.left+R.left)/k.x,right:(M.right-z.right+R.right)/k.x}}const OT=t=>({name:"arrow",options:t,async fn(r){const{x:s,y:i,placement:l,rects:c,platform:f,elements:h,middlewareData:m}=r,{element:p,padding:v=0}=Nr(t,r)||{};if(p==null)return{};const x=_x(v),_={x:s,y:i},E=Ih(l),R=Fh(E),w=await f.getDimensions(p),C=E==="y",z=C?"top":"left",O=C?"bottom":"right",U=C?"clientHeight":"clientWidth",k=c.reference[R]+c.reference[E]-_[E]-c.floating[R],M=_[E]-c.reference[E],Z=await(f.getOffsetParent==null?void 0:f.getOffsetParent(p));let F=Z?Z[U]:0;(!F||!await(f.isElement==null?void 0:f.isElement(Z)))&&(F=h.floating[U]||c.floating[R]);const I=k/2-M/2,te=F/2-w[R]/2-1,ie=fa(x[z],te),ge=fa(x[O],te),ae=ie,se=F-w[R]-ge,ce=F/2-w[R]/2+I,pe=hh(ae,ce,se),j=!m.arrow&&fi(l)!=null&&ce!==pe&&c.reference[R]/2-(ce<ae?ie:ge)-w[R]/2<0,Q=j?ce<ae?ce-ae:ce-se:0;return{[E]:_[E]+Q,data:{[E]:pe,centerOffset:ce-pe-Q,...j&&{alignmentOffset:Q}},reset:j}}}),MT=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var s,i;const{placement:l,middlewareData:c,rects:f,initialPlacement:h,platform:m,elements:p}=r,{mainAxis:v=!0,crossAxis:x=!0,fallbackPlacements:_,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:w=!0,...C}=Nr(t,r);if((s=c.arrow)!=null&&s.alignmentOffset)return{};const z=Dr(l),O=$n(h),U=Dr(h)===h,k=await(m.isRTL==null?void 0:m.isRTL(p.floating)),M=_||(U||!w?[Oc(h)]:_T(h)),Z=R!=="none";!_&&Z&&M.push(...TT(h,w,R,k));const F=[h,...M],I=await _o(r,C),te=[];let ie=((i=c.flip)==null?void 0:i.overflows)||[];if(v&&te.push(I[z]),x){const ce=ST(l,f,k);te.push(I[ce[0]],I[ce[1]])}if(ie=[...ie,{placement:l,overflows:te}],!te.every(ce=>ce<=0)){var ge,ae;const ce=(((ge=c.flip)==null?void 0:ge.index)||0)+1,pe=F[ce];if(pe&&(!(x==="alignment"?O!==$n(pe):!1)||ie.every(H=>$n(H.placement)===O?H.overflows[0]>0:!0)))return{data:{index:ce,overflows:ie},reset:{placement:pe}};let j=(ae=ie.filter(Q=>Q.overflows[0]<=0).sort((Q,H)=>Q.overflows[1]-H.overflows[1])[0])==null?void 0:ae.placement;if(!j)switch(E){case"bestFit":{var se;const Q=(se=ie.filter(H=>{if(Z){const J=$n(H.placement);return J===O||J==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(J=>J>0).reduce((J,A)=>J+A,0)]).sort((H,J)=>H[1]-J[1])[0])==null?void 0:se[0];Q&&(j=Q);break}case"initialPlacement":j=h;break}if(l!==j)return{reset:{placement:j}}}return{}}}};function Xy(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function Ky(t){return gT.some(r=>t[r]>=0)}const NT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:s}=r,{strategy:i="referenceHidden",...l}=Nr(t,r);switch(i){case"referenceHidden":{const c=await _o(r,{...l,elementContext:"reference"}),f=Xy(c,s.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Ky(f)}}}case"escaped":{const c=await _o(r,{...l,altBoundary:!0}),f=Xy(c,s.floating);return{data:{escapedOffsets:f,escaped:Ky(f)}}}default:return{}}}}},wx=new Set(["left","top"]);async function DT(t,r){const{placement:s,platform:i,elements:l}=t,c=await(i.isRTL==null?void 0:i.isRTL(l.floating)),f=Dr(s),h=fi(s),m=$n(s)==="y",p=wx.has(f)?-1:1,v=c&&m?-1:1,x=Nr(r,t);let{mainAxis:_,crossAxis:E,alignmentAxis:R}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return h&&typeof R=="number"&&(E=h==="end"?R*-1:R),m?{x:E*v,y:_*p}:{x:_*p,y:E*v}}const jT=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var s,i;const{x:l,y:c,placement:f,middlewareData:h}=r,m=await DT(r,t);return f===((s=h.offset)==null?void 0:s.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:l+m.x,y:c+m.y,data:{...m,placement:f}}}}},kT=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:s,y:i,placement:l}=r,{mainAxis:c=!0,crossAxis:f=!1,limiter:h={fn:C=>{let{x:z,y:O}=C;return{x:z,y:O}}},...m}=Nr(t,r),p={x:s,y:i},v=await _o(r,m),x=$n(Dr(l)),_=Gh(x);let E=p[_],R=p[x];if(c){const C=_==="y"?"top":"left",z=_==="y"?"bottom":"right",O=E+v[C],U=E-v[z];E=hh(O,E,U)}if(f){const C=x==="y"?"top":"left",z=x==="y"?"bottom":"right",O=R+v[C],U=R-v[z];R=hh(O,R,U)}const w=h.fn({...r,[_]:E,[x]:R});return{...w,data:{x:w.x-s,y:w.y-i,enabled:{[_]:c,[x]:f}}}}}},zT=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:s,y:i,placement:l,rects:c,middlewareData:f}=r,{offset:h=0,mainAxis:m=!0,crossAxis:p=!0}=Nr(t,r),v={x:s,y:i},x=$n(l),_=Gh(x);let E=v[_],R=v[x];const w=Nr(h,r),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(m){const U=_==="y"?"height":"width",k=c.reference[_]-c.floating[U]+C.mainAxis,M=c.reference[_]+c.reference[U]-C.mainAxis;E<k?E=k:E>M&&(E=M)}if(p){var z,O;const U=_==="y"?"width":"height",k=wx.has(Dr(l)),M=c.reference[x]-c.floating[U]+(k&&((z=f.offset)==null?void 0:z[x])||0)+(k?0:C.crossAxis),Z=c.reference[x]+c.reference[U]+(k?0:((O=f.offset)==null?void 0:O[x])||0)-(k?C.crossAxis:0);R<M?R=M:R>Z&&(R=Z)}return{[_]:E,[x]:R}}}},UT=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var s,i;const{placement:l,rects:c,platform:f,elements:h}=r,{apply:m=()=>{},...p}=Nr(t,r),v=await _o(r,p),x=Dr(l),_=fi(l),E=$n(l)==="y",{width:R,height:w}=c.floating;let C,z;x==="top"||x==="bottom"?(C=x,z=_===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(z=x,C=_==="end"?"top":"bottom");const O=w-v.top-v.bottom,U=R-v.left-v.right,k=fa(w-v[C],O),M=fa(R-v[z],U),Z=!r.middlewareData.shift;let F=k,I=M;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(I=U),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(F=O),Z&&!_){const ie=fn(v.left,0),ge=fn(v.right,0),ae=fn(v.top,0),se=fn(v.bottom,0);E?I=R-2*(ie!==0||ge!==0?ie+ge:fn(v.left,v.right)):F=w-2*(ae!==0||se!==0?ae+se:fn(v.top,v.bottom))}await m({...r,availableWidth:I,availableHeight:F});const te=await f.getDimensions(h.floating);return R!==te.width||w!==te.height?{reset:{rects:!0}}:{}}}};function Kc(){return typeof window<"u"}function di(t){return Ex(t)?(t.nodeName||"").toLowerCase():"#document"}function dn(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function sr(t){var r;return(r=(Ex(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Ex(t){return Kc()?t instanceof Node||t instanceof dn(t).Node:!1}function Pn(t){return Kc()?t instanceof Element||t instanceof dn(t).Element:!1}function tr(t){return Kc()?t instanceof HTMLElement||t instanceof dn(t).HTMLElement:!1}function $y(t){return!Kc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof dn(t).ShadowRoot}const PT=new Set(["inline","contents"]);function Ho(t){const{overflow:r,overflowX:s,overflowY:i,display:l}=Ln(t);return/auto|scroll|overlay|hidden|clip/.test(r+i+s)&&!PT.has(l)}const LT=new Set(["table","td","th"]);function VT(t){return LT.has(di(t))}const BT=[":popover-open",":modal"];function $c(t){return BT.some(r=>{try{return t.matches(r)}catch{return!1}})}const HT=["transform","translate","scale","rotate","perspective"],qT=["transform","translate","scale","rotate","perspective","filter"],GT=["paint","layout","strict","content"];function Zh(t){const r=Yh(),s=Pn(t)?Ln(t):t;return HT.some(i=>s[i]?s[i]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!r&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!r&&(s.filter?s.filter!=="none":!1)||qT.some(i=>(s.willChange||"").includes(i))||GT.some(i=>(s.contain||"").includes(i))}function FT(t){let r=da(t);for(;tr(r)&&!ei(r);){if(Zh(r))return r;if($c(r))return null;r=da(r)}return null}function Yh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const IT=new Set(["html","body","#document"]);function ei(t){return IT.has(di(t))}function Ln(t){return dn(t).getComputedStyle(t)}function Wc(t){return Pn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function da(t){if(di(t)==="html")return t;const r=t.assignedSlot||t.parentNode||$y(t)&&t.host||sr(t);return $y(r)?r.host:r}function Cx(t){const r=da(t);return ei(r)?t.ownerDocument?t.ownerDocument.body:t.body:tr(r)&&Ho(r)?r:Cx(r)}function wo(t,r,s){var i;r===void 0&&(r=[]),s===void 0&&(s=!0);const l=Cx(t),c=l===((i=t.ownerDocument)==null?void 0:i.body),f=dn(l);if(c){const h=ph(f);return r.concat(f,f.visualViewport||[],Ho(l)?l:[],h&&s?wo(h):[])}return r.concat(l,wo(l,[],s))}function ph(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Tx(t){const r=Ln(t);let s=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const l=tr(t),c=l?t.offsetWidth:s,f=l?t.offsetHeight:i,h=Rc(s)!==c||Rc(i)!==f;return h&&(s=c,i=f),{width:s,height:i,$:h}}function Qh(t){return Pn(t)?t:t.contextElement}function $s(t){const r=Qh(t);if(!tr(r))return Jn(1);const s=r.getBoundingClientRect(),{width:i,height:l,$:c}=Tx(r);let f=(c?Rc(s.width):s.width)/i,h=(c?Rc(s.height):s.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const ZT=Jn(0);function Ax(t){const r=dn(t);return!Yh()||!r.visualViewport?ZT:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function YT(t,r,s){return r===void 0&&(r=!1),!s||r&&s!==dn(t)?!1:r}function Qa(t,r,s,i){r===void 0&&(r=!1),s===void 0&&(s=!1);const l=t.getBoundingClientRect(),c=Qh(t);let f=Jn(1);r&&(i?Pn(i)&&(f=$s(i)):f=$s(t));const h=YT(c,s,i)?Ax(c):Jn(0);let m=(l.left+h.x)/f.x,p=(l.top+h.y)/f.y,v=l.width/f.x,x=l.height/f.y;if(c){const _=dn(c),E=i&&Pn(i)?dn(i):i;let R=_,w=ph(R);for(;w&&i&&E!==R;){const C=$s(w),z=w.getBoundingClientRect(),O=Ln(w),U=z.left+(w.clientLeft+parseFloat(O.paddingLeft))*C.x,k=z.top+(w.clientTop+parseFloat(O.paddingTop))*C.y;m*=C.x,p*=C.y,v*=C.x,x*=C.y,m+=U,p+=k,R=dn(w),w=ph(R)}}return Mc({width:v,height:x,x:m,y:p})}function Xh(t,r){const s=Wc(t).scrollLeft;return r?r.left+s:Qa(sr(t)).left+s}function Rx(t,r,s){s===void 0&&(s=!1);const i=t.getBoundingClientRect(),l=i.left+r.scrollLeft-(s?0:Xh(t,i)),c=i.top+r.scrollTop;return{x:l,y:c}}function QT(t){let{elements:r,rect:s,offsetParent:i,strategy:l}=t;const c=l==="fixed",f=sr(i),h=r?$c(r.floating):!1;if(i===f||h&&c)return s;let m={scrollLeft:0,scrollTop:0},p=Jn(1);const v=Jn(0),x=tr(i);if((x||!x&&!c)&&((di(i)!=="body"||Ho(f))&&(m=Wc(i)),tr(i))){const E=Qa(i);p=$s(i),v.x=E.x+i.clientLeft,v.y=E.y+i.clientTop}const _=f&&!x&&!c?Rx(f,m,!0):Jn(0);return{width:s.width*p.x,height:s.height*p.y,x:s.x*p.x-m.scrollLeft*p.x+v.x+_.x,y:s.y*p.y-m.scrollTop*p.y+v.y+_.y}}function XT(t){return Array.from(t.getClientRects())}function KT(t){const r=sr(t),s=Wc(t),i=t.ownerDocument.body,l=fn(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),c=fn(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let f=-s.scrollLeft+Xh(t);const h=-s.scrollTop;return Ln(i).direction==="rtl"&&(f+=fn(r.clientWidth,i.clientWidth)-l),{width:l,height:c,x:f,y:h}}function $T(t,r){const s=dn(t),i=sr(t),l=s.visualViewport;let c=i.clientWidth,f=i.clientHeight,h=0,m=0;if(l){c=l.width,f=l.height;const p=Yh();(!p||p&&r==="fixed")&&(h=l.offsetLeft,m=l.offsetTop)}return{width:c,height:f,x:h,y:m}}const WT=new Set(["absolute","fixed"]);function JT(t,r){const s=Qa(t,!0,r==="fixed"),i=s.top+t.clientTop,l=s.left+t.clientLeft,c=tr(t)?$s(t):Jn(1),f=t.clientWidth*c.x,h=t.clientHeight*c.y,m=l*c.x,p=i*c.y;return{width:f,height:h,x:m,y:p}}function Wy(t,r,s){let i;if(r==="viewport")i=$T(t,s);else if(r==="document")i=KT(sr(t));else if(Pn(r))i=JT(r,s);else{const l=Ax(t);i={x:r.x-l.x,y:r.y-l.y,width:r.width,height:r.height}}return Mc(i)}function Ox(t,r){const s=da(t);return s===r||!Pn(s)||ei(s)?!1:Ln(s).position==="fixed"||Ox(s,r)}function eA(t,r){const s=r.get(t);if(s)return s;let i=wo(t,[],!1).filter(h=>Pn(h)&&di(h)!=="body"),l=null;const c=Ln(t).position==="fixed";let f=c?da(t):t;for(;Pn(f)&&!ei(f);){const h=Ln(f),m=Zh(f);!m&&h.position==="fixed"&&(l=null),(c?!m&&!l:!m&&h.position==="static"&&!!l&&WT.has(l.position)||Ho(f)&&!m&&Ox(t,f))?i=i.filter(v=>v!==f):l=h,f=da(f)}return r.set(t,i),i}function tA(t){let{element:r,boundary:s,rootBoundary:i,strategy:l}=t;const f=[...s==="clippingAncestors"?$c(r)?[]:eA(r,this._c):[].concat(s),i],h=f[0],m=f.reduce((p,v)=>{const x=Wy(r,v,l);return p.top=fn(x.top,p.top),p.right=fa(x.right,p.right),p.bottom=fa(x.bottom,p.bottom),p.left=fn(x.left,p.left),p},Wy(r,h,l));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function nA(t){const{width:r,height:s}=Tx(t);return{width:r,height:s}}function rA(t,r,s){const i=tr(r),l=sr(r),c=s==="fixed",f=Qa(t,!0,c,r);let h={scrollLeft:0,scrollTop:0};const m=Jn(0);function p(){m.x=Xh(l)}if(i||!i&&!c)if((di(r)!=="body"||Ho(l))&&(h=Wc(r)),i){const E=Qa(r,!0,c,r);m.x=E.x+r.clientLeft,m.y=E.y+r.clientTop}else l&&p();c&&!i&&l&&p();const v=l&&!i&&!c?Rx(l,h):Jn(0),x=f.left+h.scrollLeft-m.x-v.x,_=f.top+h.scrollTop-m.y-v.y;return{x,y:_,width:f.width,height:f.height}}function qd(t){return Ln(t).position==="static"}function Jy(t,r){if(!tr(t)||Ln(t).position==="fixed")return null;if(r)return r(t);let s=t.offsetParent;return sr(t)===s&&(s=s.ownerDocument.body),s}function Mx(t,r){const s=dn(t);if($c(t))return s;if(!tr(t)){let l=da(t);for(;l&&!ei(l);){if(Pn(l)&&!qd(l))return l;l=da(l)}return s}let i=Jy(t,r);for(;i&&VT(i)&&qd(i);)i=Jy(i,r);return i&&ei(i)&&qd(i)&&!Zh(i)?s:i||FT(t)||s}const aA=async function(t){const r=this.getOffsetParent||Mx,s=this.getDimensions,i=await s(t.floating);return{reference:rA(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function sA(t){return Ln(t).direction==="rtl"}const iA={convertOffsetParentRelativeRectToViewportRelativeRect:QT,getDocumentElement:sr,getClippingRect:tA,getOffsetParent:Mx,getElementRects:aA,getClientRects:XT,getDimensions:nA,getScale:$s,isElement:Pn,isRTL:sA};function Nx(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function oA(t,r){let s=null,i;const l=sr(t);function c(){var h;clearTimeout(i),(h=s)==null||h.disconnect(),s=null}function f(h,m){h===void 0&&(h=!1),m===void 0&&(m=1),c();const p=t.getBoundingClientRect(),{left:v,top:x,width:_,height:E}=p;if(h||r(),!_||!E)return;const R=hc(x),w=hc(l.clientWidth-(v+_)),C=hc(l.clientHeight-(x+E)),z=hc(v),U={rootMargin:-R+"px "+-w+"px "+-C+"px "+-z+"px",threshold:fn(0,fa(1,m))||1};let k=!0;function M(Z){const F=Z[0].intersectionRatio;if(F!==m){if(!k)return f();F?f(!1,F):i=setTimeout(()=>{f(!1,1e-7)},1e3)}F===1&&!Nx(p,t.getBoundingClientRect())&&f(),k=!1}try{s=new IntersectionObserver(M,{...U,root:l.ownerDocument})}catch{s=new IntersectionObserver(M,U)}s.observe(t)}return f(!0),c}function lA(t,r,s,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:m=!1}=i,p=Qh(t),v=l||c?[...p?wo(p):[],...wo(r)]:[];v.forEach(z=>{l&&z.addEventListener("scroll",s,{passive:!0}),c&&z.addEventListener("resize",s)});const x=p&&h?oA(p,s):null;let _=-1,E=null;f&&(E=new ResizeObserver(z=>{let[O]=z;O&&O.target===p&&E&&(E.unobserve(r),cancelAnimationFrame(_),_=requestAnimationFrame(()=>{var U;(U=E)==null||U.observe(r)})),s()}),p&&!m&&E.observe(p),E.observe(r));let R,w=m?Qa(t):null;m&&C();function C(){const z=Qa(t);w&&!Nx(w,z)&&s(),w=z,R=requestAnimationFrame(C)}return s(),()=>{var z;v.forEach(O=>{l&&O.removeEventListener("scroll",s),c&&O.removeEventListener("resize",s)}),x?.(),(z=E)==null||z.disconnect(),E=null,m&&cancelAnimationFrame(R)}}const cA=jT,uA=kT,fA=MT,dA=UT,hA=NT,eb=OT,mA=zT,pA=(t,r,s)=>{const i=new Map,l={platform:iA,...s},c={...l.platform,_c:i};return RT(t,r,{...l,platform:c})};var vA=typeof document<"u",gA=function(){},_c=vA?y.useLayoutEffect:gA;function Nc(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let s,i,l;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==r.length)return!1;for(i=s;i--!==0;)if(!Nc(t[i],r[i]))return!1;return!0}if(l=Object.keys(t),s=l.length,s!==Object.keys(r).length)return!1;for(i=s;i--!==0;)if(!{}.hasOwnProperty.call(r,l[i]))return!1;for(i=s;i--!==0;){const c=l[i];if(!(c==="_owner"&&t.$$typeof)&&!Nc(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}function Dx(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function tb(t,r){const s=Dx(t);return Math.round(r*s)/s}function Gd(t){const r=y.useRef(t);return _c(()=>{r.current=t}),r}function yA(t){t===void 0&&(t={});const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:l,elements:{reference:c,floating:f}={},transform:h=!0,whileElementsMounted:m,open:p}=t,[v,x]=y.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[_,E]=y.useState(i);Nc(_,i)||E(i);const[R,w]=y.useState(null),[C,z]=y.useState(null),O=y.useCallback(H=>{H!==Z.current&&(Z.current=H,w(H))},[]),U=y.useCallback(H=>{H!==F.current&&(F.current=H,z(H))},[]),k=c||R,M=f||C,Z=y.useRef(null),F=y.useRef(null),I=y.useRef(v),te=m!=null,ie=Gd(m),ge=Gd(l),ae=Gd(p),se=y.useCallback(()=>{if(!Z.current||!F.current)return;const H={placement:r,strategy:s,middleware:_};ge.current&&(H.platform=ge.current),pA(Z.current,F.current,H).then(J=>{const A={...J,isPositioned:ae.current!==!1};ce.current&&!Nc(I.current,A)&&(I.current=A,Bo.flushSync(()=>{x(A)}))})},[_,r,s,ge,ae]);_c(()=>{p===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,x(H=>({...H,isPositioned:!1})))},[p]);const ce=y.useRef(!1);_c(()=>(ce.current=!0,()=>{ce.current=!1}),[]),_c(()=>{if(k&&(Z.current=k),M&&(F.current=M),k&&M){if(ie.current)return ie.current(k,M,se);se()}},[k,M,se,ie,te]);const pe=y.useMemo(()=>({reference:Z,floating:F,setReference:O,setFloating:U}),[O,U]),j=y.useMemo(()=>({reference:k,floating:M}),[k,M]),Q=y.useMemo(()=>{const H={position:s,left:0,top:0};if(!j.floating)return H;const J=tb(j.floating,v.x),A=tb(j.floating,v.y);return h?{...H,transform:"translate("+J+"px, "+A+"px)",...Dx(j.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:J,top:A}},[s,h,j.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:se,refs:pe,elements:j,floatingStyles:Q}),[v,se,pe,j,Q])}const bA=t=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){const{element:i,padding:l}=typeof t=="function"?t(s):t;return i&&r(i)?i.current!=null?eb({element:i.current,padding:l}).fn(s):{}:i?eb({element:i,padding:l}).fn(s):{}}}},xA=(t,r)=>({...cA(t),options:[t,r]}),SA=(t,r)=>({...uA(t),options:[t,r]}),_A=(t,r)=>({...mA(t),options:[t,r]}),wA=(t,r)=>({...fA(t),options:[t,r]}),EA=(t,r)=>({...dA(t),options:[t,r]}),CA=(t,r)=>({...hA(t),options:[t,r]}),TA=(t,r)=>({...bA(t),options:[t,r]});var AA="Arrow",jx=y.forwardRef((t,r)=>{const{children:s,width:i=10,height:l=5,...c}=t;return g.jsx(ke.svg,{...c,ref:r,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?s:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});jx.displayName=AA;var RA=jx;function OA(t){const[r,s]=y.useState(void 0);return Ut(()=>{if(t){s({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const c=l[0];let f,h;if("borderBoxSize"in c){const m=c.borderBoxSize,p=Array.isArray(m)?m[0]:m;f=p.inlineSize,h=p.blockSize}else f=t.offsetWidth,h=t.offsetHeight;s({width:f,height:h})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else s(void 0)},[t]),r}var Kh="Popper",[kx,ga]=Bn(Kh),[MA,zx]=kx(Kh),Ux=t=>{const{__scopePopper:r,children:s}=t,[i,l]=y.useState(null);return g.jsx(MA,{scope:r,anchor:i,onAnchorChange:l,children:s})};Ux.displayName=Kh;var Px="PopperAnchor",Lx=y.forwardRef((t,r)=>{const{__scopePopper:s,virtualRef:i,...l}=t,c=zx(Px,s),f=y.useRef(null),h=Ie(r,f),m=y.useRef(null);return y.useEffect(()=>{const p=m.current;m.current=i?.current||f.current,p!==m.current&&c.onAnchorChange(m.current)}),i?null:g.jsx(ke.div,{...l,ref:h})});Lx.displayName=Px;var $h="PopperContent",[NA,DA]=kx($h),Vx=y.forwardRef((t,r)=>{const{__scopePopper:s,side:i="bottom",sideOffset:l=0,align:c="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:p=[],collisionPadding:v=0,sticky:x="partial",hideWhenDetached:_=!1,updatePositionStrategy:E="optimized",onPlaced:R,...w}=t,C=zx($h,s),[z,O]=y.useState(null),U=Ie(r,ne=>O(ne)),[k,M]=y.useState(null),Z=OA(k),F=Z?.width??0,I=Z?.height??0,te=i+(c!=="center"?"-"+c:""),ie=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},ge=Array.isArray(p)?p:[p],ae=ge.length>0,se={padding:ie,boundary:ge.filter(kA),altBoundary:ae},{refs:ce,floatingStyles:pe,placement:j,isPositioned:Q,middlewareData:H}=yA({strategy:"fixed",placement:te,whileElementsMounted:(...ne)=>lA(...ne,{animationFrame:E==="always"}),elements:{reference:C.anchor},middleware:[xA({mainAxis:l+I,alignmentAxis:f}),m&&SA({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?_A():void 0,...se}),m&&wA({...se}),EA({...se,apply:({elements:ne,rects:Te,availableWidth:$e,availableHeight:He})=>{const{width:Ye,height:We}=Te.reference,At=ne.floating.style;At.setProperty("--radix-popper-available-width",`${$e}px`),At.setProperty("--radix-popper-available-height",`${He}px`),At.setProperty("--radix-popper-anchor-width",`${Ye}px`),At.setProperty("--radix-popper-anchor-height",`${We}px`)}}),k&&TA({element:k,padding:h}),zA({arrowWidth:F,arrowHeight:I}),_&&CA({strategy:"referenceHidden",...se})]}),[J,A]=qx(j),Y=zt(R);Ut(()=>{Q&&Y?.()},[Q,Y]);const oe=H.arrow?.x,ee=H.arrow?.y,ue=H.arrow?.centerOffset!==0,[Oe,_e]=y.useState();return Ut(()=>{z&&_e(window.getComputedStyle(z).zIndex)},[z]),g.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...pe,transform:Q?pe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Oe,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(NA,{scope:s,placedSide:J,onArrowChange:M,arrowX:oe,arrowY:ee,shouldHideArrow:ue,children:g.jsx(ke.div,{"data-side":J,"data-align":A,...w,ref:U,style:{...w.style,animation:Q?void 0:"none"}})})})});Vx.displayName=$h;var Bx="PopperArrow",jA={top:"bottom",right:"left",bottom:"top",left:"right"},Hx=y.forwardRef(function(r,s){const{__scopePopper:i,...l}=r,c=DA(Bx,i),f=jA[c.placedSide];return g.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:g.jsx(RA,{...l,ref:s,style:{...l.style,display:"block"}})})});Hx.displayName=Bx;function kA(t){return t!==null}var zA=t=>({name:"transformOrigin",options:t,fn(r){const{placement:s,rects:i,middlewareData:l}=r,f=l.arrow?.centerOffset!==0,h=f?0:t.arrowWidth,m=f?0:t.arrowHeight,[p,v]=qx(s),x={start:"0%",center:"50%",end:"100%"}[v],_=(l.arrow?.x??0)+h/2,E=(l.arrow?.y??0)+m/2;let R="",w="";return p==="bottom"?(R=f?x:`${_}px`,w=`${-m}px`):p==="top"?(R=f?x:`${_}px`,w=`${i.floating.height+m}px`):p==="right"?(R=`${-m}px`,w=f?x:`${E}px`):p==="left"&&(R=`${i.floating.width+m}px`,w=f?x:`${E}px`),{data:{x:R,y:w}}}});function qx(t){const[r,s="center"]=t.split("-");return[r,s]}var Jc=Ux,qo=Lx,eu=Vx,tu=Hx,UA="Portal",hi=y.forwardRef((t,r)=>{const{container:s,...i}=t,[l,c]=y.useState(!1);Ut(()=>c(!0),[]);const f=s||l&&globalThis?.document?.body;return f?sT.createPortal(g.jsx(ke.div,{...i,ref:r}),f):null});hi.displayName=UA;function PA(t,r){return y.useReducer((s,i)=>r[s][i]??s,t)}var qt=t=>{const{present:r,children:s}=t,i=LA(r),l=typeof s=="function"?s({present:i.isPresent}):y.Children.only(s),c=Ie(i.ref,VA(l));return typeof s=="function"||i.isPresent?y.cloneElement(l,{ref:c}):null};qt.displayName="Presence";function LA(t){const[r,s]=y.useState(),i=y.useRef(null),l=y.useRef(t),c=y.useRef("none"),f=t?"mounted":"unmounted",[h,m]=PA(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const p=mc(i.current);c.current=h==="mounted"?p:"none"},[h]),Ut(()=>{const p=i.current,v=l.current;if(v!==t){const _=c.current,E=mc(p);t?m("MOUNT"):E==="none"||p?.display==="none"?m("UNMOUNT"):m(v&&_!==E?"ANIMATION_OUT":"UNMOUNT"),l.current=t}},[t,m]),Ut(()=>{if(r){let p;const v=r.ownerDocument.defaultView??window,x=E=>{const w=mc(i.current).includes(CSS.escape(E.animationName));if(E.target===r&&w&&(m("ANIMATION_END"),!l.current)){const C=r.style.animationFillMode;r.style.animationFillMode="forwards",p=v.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=C)})}},_=E=>{E.target===r&&(c.current=mc(i.current))};return r.addEventListener("animationstart",_),r.addEventListener("animationcancel",x),r.addEventListener("animationend",x),()=>{v.clearTimeout(p),r.removeEventListener("animationstart",_),r.removeEventListener("animationcancel",x),r.removeEventListener("animationend",x)}}else m("ANIMATION_END")},[r,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:y.useCallback(p=>{i.current=p?getComputedStyle(p):null,s(p)},[])}}function mc(t){return t?.animationName||"none"}function VA(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var BA=Kb[" useInsertionEffect ".trim().toString()]||Ut;function nr({prop:t,defaultProp:r,onChange:s=()=>{},caller:i}){const[l,c,f]=HA({defaultProp:r,onChange:s}),h=t!==void 0,m=h?t:l;{const v=y.useRef(t!==void 0);y.useEffect(()=>{const x=v.current;x!==h&&console.warn(`${i} is changing from ${x?"controlled":"uncontrolled"} to ${h?"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.`),v.current=h},[h,i])}const p=y.useCallback(v=>{if(h){const x=qA(v)?v(t):v;x!==t&&f.current?.(x)}else c(v)},[h,t,c,f]);return[m,p]}function HA({defaultProp:t,onChange:r}){const[s,i]=y.useState(t),l=y.useRef(s),c=y.useRef(r);return BA(()=>{c.current=r},[r]),y.useEffect(()=>{l.current!==s&&(c.current?.(s),l.current=s)},[s,l]),[s,i,c]}function qA(t){return typeof t=="function"}var Gx=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"}),GA="VisuallyHidden",Fx=y.forwardRef((t,r)=>g.jsx(ke.span,{...t,ref:r,style:{...Gx,...t.style}}));Fx.displayName=GA;var FA=Fx,[nu,Ij]=Bn("Tooltip",[ga]),ru=ga(),Ix="TooltipProvider",IA=700,vh="tooltip.open",[ZA,Wh]=nu(Ix),Zx=t=>{const{__scopeTooltip:r,delayDuration:s=IA,skipDelayDuration:i=300,disableHoverableContent:l=!1,children:c}=t,f=y.useRef(!0),h=y.useRef(!1),m=y.useRef(0);return y.useEffect(()=>{const p=m.current;return()=>window.clearTimeout(p)},[]),g.jsx(ZA,{scope:r,isOpenDelayedRef:f,delayDuration:s,onOpen:y.useCallback(()=>{window.clearTimeout(m.current),f.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>f.current=!0,i)},[i]),isPointerInTransitRef:h,onPointerInTransitChange:y.useCallback(p=>{h.current=p},[]),disableHoverableContent:l,children:c})};Zx.displayName=Ix;var Eo="Tooltip",[YA,Go]=nu(Eo),Yx=t=>{const{__scopeTooltip:r,children:s,open:i,defaultOpen:l,onOpenChange:c,disableHoverableContent:f,delayDuration:h}=t,m=Wh(Eo,t.__scopeTooltip),p=ru(r),[v,x]=y.useState(null),_=zn(),E=y.useRef(0),R=f??m.disableHoverableContent,w=h??m.delayDuration,C=y.useRef(!1),[z,O]=nr({prop:i,defaultProp:l??!1,onChange:F=>{F?(m.onOpen(),document.dispatchEvent(new CustomEvent(vh))):m.onClose(),c?.(F)},caller:Eo}),U=y.useMemo(()=>z?C.current?"delayed-open":"instant-open":"closed",[z]),k=y.useCallback(()=>{window.clearTimeout(E.current),E.current=0,C.current=!1,O(!0)},[O]),M=y.useCallback(()=>{window.clearTimeout(E.current),E.current=0,O(!1)},[O]),Z=y.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>{C.current=!0,O(!0),E.current=0},w)},[w,O]);return y.useEffect(()=>()=>{E.current&&(window.clearTimeout(E.current),E.current=0)},[]),g.jsx(Jc,{...p,children:g.jsx(YA,{scope:r,contentId:_,open:z,stateAttribute:U,trigger:v,onTriggerChange:x,onTriggerEnter:y.useCallback(()=>{m.isOpenDelayedRef.current?Z():k()},[m.isOpenDelayedRef,Z,k]),onTriggerLeave:y.useCallback(()=>{R?M():(window.clearTimeout(E.current),E.current=0)},[M,R]),onOpen:k,onClose:M,disableHoverableContent:R,children:s})})};Yx.displayName=Eo;var gh="TooltipTrigger",Qx=y.forwardRef((t,r)=>{const{__scopeTooltip:s,...i}=t,l=Go(gh,s),c=Wh(gh,s),f=ru(s),h=y.useRef(null),m=Ie(r,h,l.onTriggerChange),p=y.useRef(!1),v=y.useRef(!1),x=y.useCallback(()=>p.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),g.jsx(qo,{asChild:!0,...f,children:g.jsx(ke.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:m,onPointerMove:me(t.onPointerMove,_=>{_.pointerType!=="touch"&&!v.current&&!c.isPointerInTransitRef.current&&(l.onTriggerEnter(),v.current=!0)}),onPointerLeave:me(t.onPointerLeave,()=>{l.onTriggerLeave(),v.current=!1}),onPointerDown:me(t.onPointerDown,()=>{l.open&&l.onClose(),p.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:me(t.onFocus,()=>{p.current||l.onOpen()}),onBlur:me(t.onBlur,l.onClose),onClick:me(t.onClick,l.onClose)})})});Qx.displayName=gh;var Jh="TooltipPortal",[QA,XA]=nu(Jh,{forceMount:void 0}),Xx=t=>{const{__scopeTooltip:r,forceMount:s,children:i,container:l}=t,c=Go(Jh,r);return g.jsx(QA,{scope:r,forceMount:s,children:g.jsx(qt,{present:s||c.open,children:g.jsx(hi,{asChild:!0,container:l,children:i})})})};Xx.displayName=Jh;var ti="TooltipContent",Kx=y.forwardRef((t,r)=>{const s=XA(ti,t.__scopeTooltip),{forceMount:i=s.forceMount,side:l="top",...c}=t,f=Go(ti,t.__scopeTooltip);return g.jsx(qt,{present:i||f.open,children:f.disableHoverableContent?g.jsx($x,{side:l,...c,ref:r}):g.jsx(KA,{side:l,...c,ref:r})})}),KA=y.forwardRef((t,r)=>{const s=Go(ti,t.__scopeTooltip),i=Wh(ti,t.__scopeTooltip),l=y.useRef(null),c=Ie(r,l),[f,h]=y.useState(null),{trigger:m,onClose:p}=s,v=l.current,{onPointerInTransitChange:x}=i,_=y.useCallback(()=>{h(null),x(!1)},[x]),E=y.useCallback((R,w)=>{const C=R.currentTarget,z={x:R.clientX,y:R.clientY},O=eR(z,C.getBoundingClientRect()),U=tR(z,O),k=nR(w.getBoundingClientRect()),M=aR([...U,...k]);h(M),x(!0)},[x]);return y.useEffect(()=>()=>_(),[_]),y.useEffect(()=>{if(m&&v){const R=C=>E(C,v),w=C=>E(C,m);return m.addEventListener("pointerleave",R),v.addEventListener("pointerleave",w),()=>{m.removeEventListener("pointerleave",R),v.removeEventListener("pointerleave",w)}}},[m,v,E,_]),y.useEffect(()=>{if(f){const R=w=>{const C=w.target,z={x:w.clientX,y:w.clientY},O=m?.contains(C)||v?.contains(C),U=!rR(z,f);O?_():U&&(_(),p())};return document.addEventListener("pointermove",R),()=>document.removeEventListener("pointermove",R)}},[m,v,f,p,_]),g.jsx($x,{...t,ref:c})}),[$A,WA]=nu(Eo,{isInside:!1}),JA=yC("TooltipContent"),$x=y.forwardRef((t,r)=>{const{__scopeTooltip:s,children:i,"aria-label":l,onEscapeKeyDown:c,onPointerDownOutside:f,...h}=t,m=Go(ti,s),p=ru(s),{onClose:v}=m;return y.useEffect(()=>(document.addEventListener(vh,v),()=>document.removeEventListener(vh,v)),[v]),y.useEffect(()=>{if(m.trigger){const x=_=>{_.target?.contains(m.trigger)&&v()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[m.trigger,v]),g.jsx(ui,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:x=>x.preventDefault(),onDismiss:v,children:g.jsxs(eu,{"data-state":m.stateAttribute,...p,...h,ref:r,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(JA,{children:i}),g.jsx($A,{scope:s,isInside:!0,children:g.jsx(FA,{id:m.contentId,role:"tooltip",children:l||i})})]})})});Kx.displayName=ti;var Wx="TooltipArrow",Jx=y.forwardRef((t,r)=>{const{__scopeTooltip:s,...i}=t,l=ru(s);return WA(Wx,s).isInside?null:g.jsx(tu,{...l,...i,ref:r})});Jx.displayName=Wx;function eR(t,r){const s=Math.abs(r.top-t.y),i=Math.abs(r.bottom-t.y),l=Math.abs(r.right-t.x),c=Math.abs(r.left-t.x);switch(Math.min(s,i,l,c)){case c:return"left";case l:return"right";case s:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function tR(t,r,s=5){const i=[];switch(r){case"top":i.push({x:t.x-s,y:t.y+s},{x:t.x+s,y:t.y+s});break;case"bottom":i.push({x:t.x-s,y:t.y-s},{x:t.x+s,y:t.y-s});break;case"left":i.push({x:t.x+s,y:t.y-s},{x:t.x+s,y:t.y+s});break;case"right":i.push({x:t.x-s,y:t.y-s},{x:t.x-s,y:t.y+s});break}return i}function nR(t){const{top:r,right:s,bottom:i,left:l}=t;return[{x:l,y:r},{x:s,y:r},{x:s,y:i},{x:l,y:i}]}function rR(t,r){const{x:s,y:i}=t;let l=!1;for(let c=0,f=r.length-1;c<r.length;f=c++){const h=r[c],m=r[f],p=h.x,v=h.y,x=m.x,_=m.y;v>i!=_>i&&s<(x-p)*(i-v)/(_-v)+p&&(l=!l)}return l}function aR(t){const r=t.slice();return r.sort((s,i)=>s.x<i.x?-1:s.x>i.x?1:s.y<i.y?-1:s.y>i.y?1:0),sR(r)}function sR(t){if(t.length<=1)return t.slice();const r=[];for(let i=0;i<t.length;i++){const l=t[i];for(;r.length>=2;){const c=r[r.length-1],f=r[r.length-2];if((c.x-f.x)*(l.y-f.y)>=(c.y-f.y)*(l.x-f.x))r.pop();else break}r.push(l)}r.pop();const s=[];for(let i=t.length-1;i>=0;i--){const l=t[i];for(;s.length>=2;){const c=s[s.length-1],f=s[s.length-2];if((c.x-f.x)*(l.y-f.y)>=(c.y-f.y)*(l.x-f.x))s.pop();else break}s.push(l)}return s.pop(),r.length===1&&s.length===1&&r[0].x===s[0].x&&r[0].y===s[0].y?r:r.concat(s)}var iR=Zx,oR=Yx,lR=Qx,cR=Xx,uR=Kx,fR=Jx;function dR({delayDuration:t=0,...r}){return g.jsx(iR,{"data-slot":"tooltip-provider",delayDuration:t,...r})}function hR({...t}){return g.jsx(dR,{children:g.jsx(oR,{"data-slot":"tooltip",...t})})}function mR({...t}){return g.jsx(lR,{"data-slot":"tooltip-trigger",...t})}function pR({className:t,sideOffset:r=0,children:s,...i}){return g.jsx(cR,{children:g.jsxs(uR,{"data-slot":"tooltip-content",sideOffset:r,className:Ze("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...i,children:[s,g.jsx(fR,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}var Fd=0;function au(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??nb()),document.body.insertAdjacentElement("beforeend",t[1]??nb()),Fd++,()=>{Fd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Fd--}},[])}function nb(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Id="focusScope.autoFocusOnMount",Zd="focusScope.autoFocusOnUnmount",rb={bubbles:!1,cancelable:!0},vR="FocusScope",Fo=y.forwardRef((t,r)=>{const{loop:s=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...f}=t,[h,m]=y.useState(null),p=zt(l),v=zt(c),x=y.useRef(null),_=Ie(r,w=>m(w)),E=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let w=function(U){if(E.paused||!h)return;const k=U.target;h.contains(k)?x.current=k:la(x.current,{select:!0})},C=function(U){if(E.paused||!h)return;const k=U.relatedTarget;k!==null&&(h.contains(k)||la(x.current,{select:!0}))},z=function(U){if(document.activeElement===document.body)for(const M of U)M.removedNodes.length>0&&la(h)};document.addEventListener("focusin",w),document.addEventListener("focusout",C);const O=new MutationObserver(z);return h&&O.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",C),O.disconnect()}}},[i,h,E.paused]),y.useEffect(()=>{if(h){sb.add(E);const w=document.activeElement;if(!h.contains(w)){const z=new CustomEvent(Id,rb);h.addEventListener(Id,p),h.dispatchEvent(z),z.defaultPrevented||(gR(_R(e0(h)),{select:!0}),document.activeElement===w&&la(h))}return()=>{h.removeEventListener(Id,p),setTimeout(()=>{const z=new CustomEvent(Zd,rb);h.addEventListener(Zd,v),h.dispatchEvent(z),z.defaultPrevented||la(w??document.body,{select:!0}),h.removeEventListener(Zd,v),sb.remove(E)},0)}}},[h,p,v,E]);const R=y.useCallback(w=>{if(!s&&!i||E.paused)return;const C=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,z=document.activeElement;if(C&&z){const O=w.currentTarget,[U,k]=yR(O);U&&k?!w.shiftKey&&z===k?(w.preventDefault(),s&&la(U,{select:!0})):w.shiftKey&&z===U&&(w.preventDefault(),s&&la(k,{select:!0})):z===O&&w.preventDefault()}},[s,i,E.paused]);return g.jsx(ke.div,{tabIndex:-1,...f,ref:_,onKeyDown:R})});Fo.displayName=vR;function gR(t,{select:r=!1}={}){const s=document.activeElement;for(const i of t)if(la(i,{select:r}),document.activeElement!==s)return}function yR(t){const r=e0(t),s=ab(r,t),i=ab(r.reverse(),t);return[s,i]}function e0(t){const r=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const l=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||l?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function ab(t,r){for(const s of t)if(!bR(s,{upTo:r}))return s}function bR(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function xR(t){return t instanceof HTMLInputElement&&"select"in t}function la(t,{select:r=!1}={}){if(t&&t.focus){const s=document.activeElement;t.focus({preventScroll:!0}),t!==s&&xR(t)&&r&&t.select()}}var sb=SR();function SR(){let t=[];return{add(r){const s=t[0];r!==s&&s?.pause(),t=ib(t,r),t.unshift(r)},remove(r){t=ib(t,r),t[0]?.resume()}}}function ib(t,r){const s=[...t],i=s.indexOf(r);return i!==-1&&s.splice(i,1),s}function _R(t){return t.filter(r=>r.tagName!=="A")}var wR=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},Fs=new WeakMap,pc=new WeakMap,vc={},Yd=0,t0=function(t){return t&&(t.host||t0(t.parentNode))},ER=function(t,r){return r.map(function(s){if(t.contains(s))return s;var i=t0(s);return i&&t.contains(i)?i:(console.error("aria-hidden",s,"in not contained inside",t,". Doing nothing"),null)}).filter(function(s){return!!s})},CR=function(t,r,s,i){var l=ER(r,Array.isArray(t)?t:[t]);vc[s]||(vc[s]=new WeakMap);var c=vc[s],f=[],h=new Set,m=new Set(l),p=function(x){!x||h.has(x)||(h.add(x),p(x.parentNode))};l.forEach(p);var v=function(x){!x||m.has(x)||Array.prototype.forEach.call(x.children,function(_){if(h.has(_))v(_);else try{var E=_.getAttribute(i),R=E!==null&&E!=="false",w=(Fs.get(_)||0)+1,C=(c.get(_)||0)+1;Fs.set(_,w),c.set(_,C),f.push(_),w===1&&R&&pc.set(_,!0),C===1&&_.setAttribute(s,"true"),R||_.setAttribute(i,"true")}catch(z){console.error("aria-hidden: cannot operate on ",_,z)}})};return v(r),h.clear(),Yd++,function(){f.forEach(function(x){var _=Fs.get(x)-1,E=c.get(x)-1;Fs.set(x,_),c.set(x,E),_||(pc.has(x)||x.removeAttribute(i),pc.delete(x)),E||x.removeAttribute(s)}),Yd--,Yd||(Fs=new WeakMap,Fs=new WeakMap,pc=new WeakMap,vc={})}},su=function(t,r,s){s===void 0&&(s="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),l=wR(t);return l?(i.push.apply(i,Array.from(l.querySelectorAll("[aria-live], script"))),CR(i,l,s,"aria-hidden")):function(){return null}},Kn=function(){return Kn=Object.assign||function(r){for(var s,i=1,l=arguments.length;i<l;i++){s=arguments[i];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(r[c]=s[c])}return r},Kn.apply(this,arguments)};function n0(t,r){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(t);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(t,i[l])&&(s[i[l]]=t[i[l]]);return s}function TR(t,r,s){if(s||arguments.length===2)for(var i=0,l=r.length,c;i<l;i++)(c||!(i in r))&&(c||(c=Array.prototype.slice.call(r,0,i)),c[i]=r[i]);return t.concat(c||Array.prototype.slice.call(r))}var wc="right-scroll-bar-position",Ec="width-before-scroll-bar",AR="with-scroll-bars-hidden",RR="--removed-body-scroll-bar-size";function Qd(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function OR(t,r){var s=y.useState(function(){return{value:t,callback:r,facade:{get current(){return s.value},set current(i){var l=s.value;l!==i&&(s.value=i,s.callback(i,l))}}}})[0];return s.callback=r,s.facade}var MR=typeof window<"u"?y.useLayoutEffect:y.useEffect,ob=new WeakMap;function NR(t,r){var s=OR(null,function(i){return t.forEach(function(l){return Qd(l,i)})});return MR(function(){var i=ob.get(s);if(i){var l=new Set(i),c=new Set(t),f=s.current;l.forEach(function(h){c.has(h)||Qd(h,null)}),c.forEach(function(h){l.has(h)||Qd(h,f)})}ob.set(s,t)},[t]),s}function DR(t){return t}function jR(t,r){r===void 0&&(r=DR);var s=[],i=!1,l={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:t},useMedium:function(c){var f=r(c,i);return s.push(f),function(){s=s.filter(function(h){return h!==f})}},assignSyncMedium:function(c){for(i=!0;s.length;){var f=s;s=[],f.forEach(c)}s={push:function(h){return c(h)},filter:function(){return s}}},assignMedium:function(c){i=!0;var f=[];if(s.length){var h=s;s=[],h.forEach(c),f=s}var m=function(){var v=f;f=[],v.forEach(c)},p=function(){return Promise.resolve().then(m)};p(),s={push:function(v){f.push(v),p()},filter:function(v){return f=f.filter(v),s}}}};return l}function kR(t){t===void 0&&(t={});var r=jR(null);return r.options=Kn({async:!0,ssr:!1},t),r}var r0=function(t){var r=t.sideCar,s=n0(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,Kn({},s))};r0.isSideCarExport=!0;function zR(t,r){return t.useMedium(r),r0}var a0=kR(),Xd=function(){},iu=y.forwardRef(function(t,r){var s=y.useRef(null),i=y.useState({onScrollCapture:Xd,onWheelCapture:Xd,onTouchMoveCapture:Xd}),l=i[0],c=i[1],f=t.forwardProps,h=t.children,m=t.className,p=t.removeScrollBar,v=t.enabled,x=t.shards,_=t.sideCar,E=t.noRelative,R=t.noIsolation,w=t.inert,C=t.allowPinchZoom,z=t.as,O=z===void 0?"div":z,U=t.gapMode,k=n0(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=_,Z=NR([s,r]),F=Kn(Kn({},k),l);return y.createElement(y.Fragment,null,v&&y.createElement(M,{sideCar:a0,removeScrollBar:p,shards:x,noRelative:E,noIsolation:R,inert:w,setCallbacks:c,allowPinchZoom:!!C,lockRef:s,gapMode:U}),f?y.cloneElement(y.Children.only(h),Kn(Kn({},F),{ref:Z})):y.createElement(O,Kn({},F,{className:m,ref:Z}),h))});iu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};iu.classNames={fullWidth:Ec,zeroRight:wc};var UR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function PR(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=UR();return r&&t.setAttribute("nonce",r),t}function LR(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function VR(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var BR=function(){var t=0,r=null;return{add:function(s){t==0&&(r=PR())&&(LR(r,s),VR(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},HR=function(){var t=BR();return function(r,s){y.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&s])}},s0=function(){var t=HR(),r=function(s){var i=s.styles,l=s.dynamic;return t(i,l),null};return r},qR={left:0,top:0,right:0,gap:0},Kd=function(t){return parseInt(t||"",10)||0},GR=function(t){var r=window.getComputedStyle(document.body),s=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],l=r[t==="padding"?"paddingRight":"marginRight"];return[Kd(s),Kd(i),Kd(l)]},FR=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return qR;var r=GR(t),s=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-s+r[2]-r[0])}},IR=s0(),Ws="data-scroll-locked",ZR=function(t,r,s,i){var l=t.left,c=t.top,f=t.right,h=t.gap;return s===void 0&&(s="margin"),`
.`.concat(AR,` {
overflow: hidden `).concat(i,`;
padding-right: `).concat(h,"px ").concat(i,`;
}
body[`).concat(Ws,`] {
overflow: hidden `).concat(i,`;
overscroll-behavior: contain;
`).concat([r&&"position: relative ".concat(i,";"),s==="margin"&&`
padding-left: `.concat(l,`px;
padding-top: `).concat(c,`px;
padding-right: `).concat(f,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(h,"px ").concat(i,`;
`),s==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
}
.`).concat(wc,` {
right: `).concat(h,"px ").concat(i,`;
}
.`).concat(Ec,` {
margin-right: `).concat(h,"px ").concat(i,`;
}
.`).concat(wc," .").concat(wc,` {
right: 0 `).concat(i,`;
}
.`).concat(Ec," .").concat(Ec,` {
margin-right: 0 `).concat(i,`;
}
body[`).concat(Ws,`] {
`).concat(RR,": ").concat(h,`px;
}
`)},lb=function(){var t=parseInt(document.body.getAttribute(Ws)||"0",10);return isFinite(t)?t:0},YR=function(){y.useEffect(function(){return document.body.setAttribute(Ws,(lb()+1).toString()),function(){var t=lb()-1;t<=0?document.body.removeAttribute(Ws):document.body.setAttribute(Ws,t.toString())}},[])},QR=function(t){var r=t.noRelative,s=t.noImportant,i=t.gapMode,l=i===void 0?"margin":i;YR();var c=y.useMemo(function(){return FR(l)},[l]);return y.createElement(IR,{styles:ZR(c,!r,l,s?"":"!important")})},yh=!1;if(typeof window<"u")try{var gc=Object.defineProperty({},"passive",{get:function(){return yh=!0,!0}});window.addEventListener("test",gc,gc),window.removeEventListener("test",gc,gc)}catch{yh=!1}var Is=yh?{passive:!1}:!1,XR=function(t){return t.tagName==="TEXTAREA"},i0=function(t,r){if(!(t instanceof Element))return!1;var s=window.getComputedStyle(t);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!XR(t)&&s[r]==="visible")},KR=function(t){return i0(t,"overflowY")},$R=function(t){return i0(t,"overflowX")},cb=function(t,r){var s=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var l=o0(t,i);if(l){var c=l0(t,i),f=c[1],h=c[2];if(f>h)return!0}i=i.parentNode}while(i&&i!==s.body);return!1},WR=function(t){var r=t.scrollTop,s=t.scrollHeight,i=t.clientHeight;return[r,s,i]},JR=function(t){var r=t.scrollLeft,s=t.scrollWidth,i=t.clientWidth;return[r,s,i]},o0=function(t,r){return t==="v"?KR(r):$R(r)},l0=function(t,r){return t==="v"?WR(r):JR(r)},eO=function(t,r){return t==="h"&&r==="rtl"?-1:1},tO=function(t,r,s,i,l){var c=eO(t,window.getComputedStyle(r).direction),f=c*i,h=s.target,m=r.contains(h),p=!1,v=f>0,x=0,_=0;do{if(!h)break;var E=l0(t,h),R=E[0],w=E[1],C=E[2],z=w-C-c*R;(R||z)&&o0(t,h)&&(x+=z,_+=R);var O=h.parentNode;h=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!m&&h!==document.body||m&&(r.contains(h)||r===h));return(v&&Math.abs(x)<1||!v&&Math.abs(_)<1)&&(p=!0),p},yc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ub=function(t){return[t.deltaX,t.deltaY]},fb=function(t){return t&&"current"in t?t.current:t},nO=function(t,r){return t[0]===r[0]&&t[1]===r[1]},rO=function(t){return`
.block-interactivity-`.concat(t,` {pointer-events: none;}
.allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},aO=0,Zs=[];function sO(t){var r=y.useRef([]),s=y.useRef([0,0]),i=y.useRef(),l=y.useState(aO++)[0],c=y.useState(s0)[0],f=y.useRef(t);y.useEffect(function(){f.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(l));var w=TR([t.lockRef.current],(t.shards||[]).map(fb),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(l))})}}},[t.inert,t.lockRef.current,t.shards]);var h=y.useCallback(function(w,C){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!f.current.allowPinchZoom;var z=yc(w),O=s.current,U="deltaX"in w?w.deltaX:O[0]-z[0],k="deltaY"in w?w.deltaY:O[1]-z[1],M,Z=w.target,F=Math.abs(U)>Math.abs(k)?"h":"v";if("touches"in w&&F==="h"&&Z.type==="range")return!1;var I=cb(F,Z);if(!I)return!0;if(I?M=F:(M=F==="v"?"h":"v",I=cb(F,Z)),!I)return!1;if(!i.current&&"changedTouches"in w&&(U||k)&&(i.current=M),!M)return!0;var te=i.current||M;return tO(te,C,w,te==="h"?U:k)},[]),m=y.useCallback(function(w){var C=w;if(!(!Zs.length||Zs[Zs.length-1]!==c)){var z="deltaY"in C?ub(C):yc(C),O=r.current.filter(function(M){return M.name===C.type&&(M.target===C.target||C.target===M.shadowParent)&&nO(M.delta,z)})[0];if(O&&O.should){C.cancelable&&C.preventDefault();return}if(!O){var U=(f.current.shards||[]).map(fb).filter(Boolean).filter(function(M){return M.contains(C.target)}),k=U.length>0?h(C,U[0]):!f.current.noIsolation;k&&C.cancelable&&C.preventDefault()}}},[]),p=y.useCallback(function(w,C,z,O){var U={name:w,delta:C,target:z,should:O,shadowParent:iO(z)};r.current.push(U),setTimeout(function(){r.current=r.current.filter(function(k){return k!==U})},1)},[]),v=y.useCallback(function(w){s.current=yc(w),i.current=void 0},[]),x=y.useCallback(function(w){p(w.type,ub(w),w.target,h(w,t.lockRef.current))},[]),_=y.useCallback(function(w){p(w.type,yc(w),w.target,h(w,t.lockRef.current))},[]);y.useEffect(function(){return Zs.push(c),t.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:_}),document.addEventListener("wheel",m,Is),document.addEventListener("touchmove",m,Is),document.addEventListener("touchstart",v,Is),function(){Zs=Zs.filter(function(w){return w!==c}),document.removeEventListener("wheel",m,Is),document.removeEventListener("touchmove",m,Is),document.removeEventListener("touchstart",v,Is)}},[]);var E=t.removeScrollBar,R=t.inert;return y.createElement(y.Fragment,null,R?y.createElement(c,{styles:rO(l)}):null,E?y.createElement(QR,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function iO(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const oO=zR(a0,sO);var Io=y.forwardRef(function(t,r){return y.createElement(iu,Kn({},t,{ref:r,sideCar:oO}))});Io.classNames=iu.classNames;var ou="Popover",[c0,Zj]=Bn(ou,[ga]),Zo=ga(),[lO,ya]=c0(ou),u0=t=>{const{__scopePopover:r,children:s,open:i,defaultOpen:l,onOpenChange:c,modal:f=!1}=t,h=Zo(r),m=y.useRef(null),[p,v]=y.useState(!1),[x,_]=nr({prop:i,defaultProp:l??!1,onChange:c,caller:ou});return g.jsx(Jc,{...h,children:g.jsx(lO,{scope:r,contentId:zn(),triggerRef:m,open:x,onOpenChange:_,onOpenToggle:y.useCallback(()=>_(E=>!E),[_]),hasCustomAnchor:p,onCustomAnchorAdd:y.useCallback(()=>v(!0),[]),onCustomAnchorRemove:y.useCallback(()=>v(!1),[]),modal:f,children:s})})};u0.displayName=ou;var f0="PopoverAnchor",cO=y.forwardRef((t,r)=>{const{__scopePopover:s,...i}=t,l=ya(f0,s),c=Zo(s),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=l;return y.useEffect(()=>(f(),()=>h()),[f,h]),g.jsx(qo,{...c,...i,ref:r})});cO.displayName=f0;var d0="PopoverTrigger",h0=y.forwardRef((t,r)=>{const{__scopePopover:s,...i}=t,l=ya(d0,s),c=Zo(s),f=Ie(r,l.triggerRef),h=g.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":y0(l.open),...i,ref:f,onClick:me(t.onClick,l.onOpenToggle)});return l.hasCustomAnchor?h:g.jsx(qo,{asChild:!0,...c,children:h})});h0.displayName=d0;var em="PopoverPortal",[uO,fO]=c0(em,{forceMount:void 0}),m0=t=>{const{__scopePopover:r,forceMount:s,children:i,container:l}=t,c=ya(em,r);return g.jsx(uO,{scope:r,forceMount:s,children:g.jsx(qt,{present:s||c.open,children:g.jsx(hi,{asChild:!0,container:l,children:i})})})};m0.displayName=em;var ni="PopoverContent",p0=y.forwardRef((t,r)=>{const s=fO(ni,t.__scopePopover),{forceMount:i=s.forceMount,...l}=t,c=ya(ni,t.__scopePopover);return g.jsx(qt,{present:i||c.open,children:c.modal?g.jsx(hO,{...l,ref:r}):g.jsx(mO,{...l,ref:r})})});p0.displayName=ni;var dO=ua("PopoverContent.RemoveScroll"),hO=y.forwardRef((t,r)=>{const s=ya(ni,t.__scopePopover),i=y.useRef(null),l=Ie(r,i),c=y.useRef(!1);return y.useEffect(()=>{const f=i.current;if(f)return su(f)},[]),g.jsx(Io,{as:dO,allowPinchZoom:!0,children:g.jsx(v0,{...t,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(t.onCloseAutoFocus,f=>{f.preventDefault(),c.current||s.triggerRef.current?.focus()}),onPointerDownOutside:me(t.onPointerDownOutside,f=>{const h=f.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,p=h.button===2||m;c.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:me(t.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),mO=y.forwardRef((t,r)=>{const s=ya(ni,t.__scopePopover),i=y.useRef(!1),l=y.useRef(!1);return g.jsx(v0,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{t.onCloseAutoFocus?.(c),c.defaultPrevented||(i.current||s.triggerRef.current?.focus(),c.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:c=>{t.onInteractOutside?.(c),c.defaultPrevented||(i.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const f=c.target;s.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})}),v0=y.forwardRef((t,r)=>{const{__scopePopover:s,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:v,...x}=t,_=ya(ni,s),E=Zo(s);return au(),g.jsx(Fo,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:c,children:g.jsx(ui,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:p,onDismiss:()=>_.onOpenChange(!1),children:g.jsx(eu,{"data-state":y0(_.open),role:"dialog",id:_.contentId,...E,...x,ref:r,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),g0="PopoverClose",pO=y.forwardRef((t,r)=>{const{__scopePopover:s,...i}=t,l=ya(g0,s);return g.jsx(ke.button,{type:"button",...i,ref:r,onClick:me(t.onClick,()=>l.onOpenChange(!1))})});pO.displayName=g0;var vO="PopoverArrow",gO=y.forwardRef((t,r)=>{const{__scopePopover:s,...i}=t,l=Zo(s);return g.jsx(tu,{...l,...i,ref:r})});gO.displayName=vO;function y0(t){return t?"open":"closed"}var yO=u0,bO=h0,xO=m0,SO=p0;function _O({...t}){return g.jsx(yO,{"data-slot":"popover",...t})}function wO({...t}){return g.jsx(bO,{"data-slot":"popover-trigger",...t})}function EO({className:t,align:r="center",sideOffset:s=4,...i}){return g.jsx(xO,{children:g.jsx(SO,{"data-slot":"popover-content",align:r,sideOffset:s,className:Ze("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...i})})}function CO(){return g.jsxs(hR,{children:[g.jsx(mR,{asChild:!0,children:g.jsx(wO,{asChild:!0,children:g.jsx(Xn,{size:"icon",children:g.jsx(oC,{})})})}),g.jsx(pR,{children:g.jsx("p",{children:"Add to library"})})]})}function tm(t){const r=t+"CollectionProvider",[s,i]=Bn(r),[l,c]=s(r,{collectionRef:{current:null},itemMap:new Map}),f=w=>{const{scope:C,children:z}=w,O=Ae.useRef(null),U=Ae.useRef(new Map).current;return g.jsx(l,{scope:C,itemMap:U,collectionRef:O,children:z})};f.displayName=r;const h=t+"CollectionSlot",m=ua(h),p=Ae.forwardRef((w,C)=>{const{scope:z,children:O}=w,U=c(h,z),k=Ie(C,U.collectionRef);return g.jsx(m,{ref:k,children:O})});p.displayName=h;const v=t+"CollectionItemSlot",x="data-radix-collection-item",_=ua(v),E=Ae.forwardRef((w,C)=>{const{scope:z,children:O,...U}=w,k=Ae.useRef(null),M=Ie(C,k),Z=c(v,z);return Ae.useEffect(()=>(Z.itemMap.set(k,{ref:k,...U}),()=>void Z.itemMap.delete(k))),g.jsx(_,{[x]:"",ref:M,children:O})});E.displayName=v;function R(w){const C=c(t+"CollectionConsumer",w);return Ae.useCallback(()=>{const O=C.collectionRef.current;if(!O)return[];const U=Array.from(O.querySelectorAll(`[${x}]`));return Array.from(C.itemMap.values()).sort((Z,F)=>U.indexOf(Z.ref.current)-U.indexOf(F.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:f,Slot:p,ItemSlot:E},R,i]}var TO=y.createContext(void 0);function Yo(t){const r=y.useContext(TO);return t||r||"ltr"}var $d="rovingFocusGroup.onEntryFocus",AO={bubbles:!1,cancelable:!0},Qo="RovingFocusGroup",[bh,b0,RO]=tm(Qo),[OO,lu]=Bn(Qo,[RO]),[MO,NO]=OO(Qo),x0=y.forwardRef((t,r)=>g.jsx(bh.Provider,{scope:t.__scopeRovingFocusGroup,children:g.jsx(bh.Slot,{scope:t.__scopeRovingFocusGroup,children:g.jsx(DO,{...t,ref:r})})}));x0.displayName=Qo;var DO=y.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,orientation:i,loop:l=!1,dir:c,currentTabStopId:f,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:p,preventScrollOnEntryFocus:v=!1,...x}=t,_=y.useRef(null),E=Ie(r,_),R=Yo(c),[w,C]=nr({prop:f,defaultProp:h??null,onChange:m,caller:Qo}),[z,O]=y.useState(!1),U=zt(p),k=b0(s),M=y.useRef(!1),[Z,F]=y.useState(0);return y.useEffect(()=>{const I=_.current;if(I)return I.addEventListener($d,U),()=>I.removeEventListener($d,U)},[U]),g.jsx(MO,{scope:s,orientation:i,dir:R,loop:l,currentTabStopId:w,onItemFocus:y.useCallback(I=>C(I),[C]),onItemShiftTab:y.useCallback(()=>O(!0),[]),onFocusableItemAdd:y.useCallback(()=>F(I=>I+1),[]),onFocusableItemRemove:y.useCallback(()=>F(I=>I-1),[]),children:g.jsx(ke.div,{tabIndex:z||Z===0?-1:0,"data-orientation":i,...x,ref:E,style:{outline:"none",...t.style},onMouseDown:me(t.onMouseDown,()=>{M.current=!0}),onFocus:me(t.onFocus,I=>{const te=!M.current;if(I.target===I.currentTarget&&te&&!z){const ie=new CustomEvent($d,AO);if(I.currentTarget.dispatchEvent(ie),!ie.defaultPrevented){const ge=k().filter(j=>j.focusable),ae=ge.find(j=>j.active),se=ge.find(j=>j.id===w),pe=[ae,se,...ge].filter(Boolean).map(j=>j.ref.current);w0(pe,v)}}M.current=!1}),onBlur:me(t.onBlur,()=>O(!1))})})}),S0="RovingFocusGroupItem",_0=y.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:s,focusable:i=!0,active:l=!1,tabStopId:c,children:f,...h}=t,m=zn(),p=c||m,v=NO(S0,s),x=v.currentTabStopId===p,_=b0(s),{onFocusableItemAdd:E,onFocusableItemRemove:R,currentTabStopId:w}=v;return y.useEffect(()=>{if(i)return E(),()=>R()},[i,E,R]),g.jsx(bh.ItemSlot,{scope:s,id:p,focusable:i,active:l,children:g.jsx(ke.span,{tabIndex:x?0:-1,"data-orientation":v.orientation,...h,ref:r,onMouseDown:me(t.onMouseDown,C=>{i?v.onItemFocus(p):C.preventDefault()}),onFocus:me(t.onFocus,()=>v.onItemFocus(p)),onKeyDown:me(t.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){v.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const z=zO(C,v.orientation,v.dir);if(z!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let U=_().filter(k=>k.focusable).map(k=>k.ref.current);if(z==="last")U.reverse();else if(z==="prev"||z==="next"){z==="prev"&&U.reverse();const k=U.indexOf(C.currentTarget);U=v.loop?UO(U,k+1):U.slice(k+1)}setTimeout(()=>w0(U))}}),children:typeof f=="function"?f({isCurrentTabStop:x,hasTabStop:w!=null}):f})})});_0.displayName=S0;var jO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kO(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function zO(t,r,s){const i=kO(t.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return jO[i]}function w0(t,r=!1){const s=document.activeElement;for(const i of t)if(i===s||(i.focus({preventScroll:r}),document.activeElement!==s))return}function UO(t,r){return t.map((s,i)=>t[(r+i)%t.length])}var E0=x0,C0=_0,T0="Toggle",A0=y.forwardRef((t,r)=>{const{pressed:s,defaultPressed:i,onPressedChange:l,...c}=t,[f,h]=nr({prop:s,onChange:l,defaultProp:i??!1,caller:T0});return g.jsx(ke.button,{type:"button","aria-pressed":f,"data-state":f?"on":"off","data-disabled":t.disabled?"":void 0,...c,ref:r,onClick:me(t.onClick,()=>{t.disabled||h(!f)})})});A0.displayName=T0;var ba="ToggleGroup",[R0,Yj]=Bn(ba,[lu]),O0=lu(),nm=Ae.forwardRef((t,r)=>{const{type:s,...i}=t;if(s==="single"){const l=i;return g.jsx(PO,{...l,ref:r})}if(s==="multiple"){const l=i;return g.jsx(LO,{...l,ref:r})}throw new Error(`Missing prop \`type\` expected on \`${ba}\``)});nm.displayName=ba;var[M0,N0]=R0(ba),PO=Ae.forwardRef((t,r)=>{const{value:s,defaultValue:i,onValueChange:l=()=>{},...c}=t,[f,h]=nr({prop:s,defaultProp:i??"",onChange:l,caller:ba});return g.jsx(M0,{scope:t.__scopeToggleGroup,type:"single",value:Ae.useMemo(()=>f?[f]:[],[f]),onItemActivate:h,onItemDeactivate:Ae.useCallback(()=>h(""),[h]),children:g.jsx(D0,{...c,ref:r})})}),LO=Ae.forwardRef((t,r)=>{const{value:s,defaultValue:i,onValueChange:l=()=>{},...c}=t,[f,h]=nr({prop:s,defaultProp:i??[],onChange:l,caller:ba}),m=Ae.useCallback(v=>h((x=[])=>[...x,v]),[h]),p=Ae.useCallback(v=>h((x=[])=>x.filter(_=>_!==v)),[h]);return g.jsx(M0,{scope:t.__scopeToggleGroup,type:"multiple",value:f,onItemActivate:m,onItemDeactivate:p,children:g.jsx(D0,{...c,ref:r})})});nm.displayName=ba;var[VO,BO]=R0(ba),D0=Ae.forwardRef((t,r)=>{const{__scopeToggleGroup:s,disabled:i=!1,rovingFocus:l=!0,orientation:c,dir:f,loop:h=!0,...m}=t,p=O0(s),v=Yo(f),x={role:"group",dir:v,...m};return g.jsx(VO,{scope:s,rovingFocus:l,disabled:i,children:l?g.jsx(E0,{asChild:!0,...p,orientation:c,dir:v,loop:h,children:g.jsx(ke.div,{...x,ref:r})}):g.jsx(ke.div,{...x,ref:r})})}),Dc="ToggleGroupItem",j0=Ae.forwardRef((t,r)=>{const s=N0(Dc,t.__scopeToggleGroup),i=BO(Dc,t.__scopeToggleGroup),l=O0(t.__scopeToggleGroup),c=s.value.includes(t.value),f=i.disabled||t.disabled,h={...t,pressed:c,disabled:f},m=Ae.useRef(null);return i.rovingFocus?g.jsx(C0,{asChild:!0,...l,focusable:!f,active:c,ref:m,children:g.jsx(db,{...h,ref:r})}):g.jsx(db,{...h,ref:r})});j0.displayName=Dc;var db=Ae.forwardRef((t,r)=>{const{__scopeToggleGroup:s,value:i,...l}=t,c=N0(Dc,s),f={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},h=c.type==="single"?f:void 0;return g.jsx(A0,{...h,...l,ref:r,onPressedChange:m=>{m?c.onItemActivate(i):c.onItemDeactivate(i)}})}),HO=nm,qO=j0;const GO=Hh("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),k0=y.createContext({size:"default",variant:"default"});function FO({className:t,variant:r,size:s,children:i,...l}){return g.jsx(HO,{"data-slot":"toggle-group","data-variant":r,"data-size":s,className:Ze("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",t),...l,children:g.jsx(k0.Provider,{value:{variant:r,size:s},children:i})})}function hb({className:t,children:r,variant:s,size:i,...l}){const c=y.useContext(k0);return g.jsx(qO,{"data-slot":"toggle-group-item","data-variant":c.variant||s,"data-size":c.size||i,className:Ze(GO({variant:c.variant||s,size:c.size||i}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",t),...l,children:r})}function IO({filter:t,setFilter:r,activeFiltersCount:s,clearFilters:i}){return g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs(FO,{size:"sm",type:"single",value:t.statusFilter||"",onValueChange:l=>r({statusFilter:l||""}),className:"flex items-center gap-1 p-1 bg-muted rounded-lg",children:[g.jsxs(hb,{size:"sm",value:"listed","aria-label":"Hiển thị công khai",className:"flex items-center gap-2 px-3 py-2 rounded-md data-[state=on]:bg-green-100 data-[state=on]:text-green-700 data-[state=on]:border-green-200 hover:bg-green-50 transition-colors",children:[g.jsx(sx,{className:"h-2 w-2"}),g.jsx("span",{className:"text-sm font-medium",children:"Listed"})]}),g.jsxs(hb,{size:"sm",value:"unlisted","aria-label":"Ẩn khỏi danh sách",className:"flex items-center gap-2 px-3 py-2 rounded-md data-[state=on]:bg-orange-100 data-[state=on]:text-orange-700 data-[state=on]:border-orange-200 hover:bg-orange-50 transition-colors",children:[g.jsx(ax,{className:"h-2 w-2"}),g.jsx("span",{className:"text-sm font-medium",children:"Unlisted"})]})]}),s>0&&g.jsxs(Xn,{variant:"outline",size:"sm",onClick:i,className:"flex items-center gap-2 text-muted-foreground hover:text-foreground bg-transparent","aria-label":"clear",children:[g.jsx(Vh,{className:"h-2 w-2"}),g.jsx("span",{className:"text-sm",children:"Clear"})]})]})}function z0({color:t="black",...r}){return g.jsxs("div",{...r,className:Ze("flex items-center justify-center flex-col gap-4",r.className),children:[g.jsx("div",{className:Ze("!animate-spin rounded-full size-4 border-b-2",r.size,{"border-primary":t==="black","border-white":t==="white"})}),r.showLabel&&g.jsx("span",{children:"Đang tải..."})]})}var Xo=t=>t.type==="checkbox",Fa=t=>t instanceof Date,Zt=t=>t==null;const U0=t=>typeof t=="object";var yt=t=>!Zt(t)&&!Array.isArray(t)&&U0(t)&&!Fa(t),P0=t=>yt(t)&&t.target?Xo(t.target)?t.target.checked:t.target.value:t,ZO=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,L0=(t,r)=>t.has(ZO(r)),YO=t=>{const r=t.constructor&&t.constructor.prototype;return yt(r)&&r.hasOwnProperty("isPrototypeOf")},rm=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ct(t){let r;const s=Array.isArray(t),i=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)r=new Date(t);else if(!(rm&&(t instanceof Blob||i))&&(s||yt(t)))if(r=s?[]:Object.create(Object.getPrototypeOf(t)),!s&&!YO(t))r=t;else for(const l in t)t.hasOwnProperty(l)&&(r[l]=Ct(t[l]));else return t;return r}var cu=t=>/^\w*$/.test(t),gt=t=>t===void 0,am=t=>Array.isArray(t)?t.filter(Boolean):[],sm=t=>am(t.replace(/["|']|\]/g,"").split(/\.|\[/)),de=(t,r,s)=>{if(!r||!yt(t))return s;const i=(cu(r)?[r]:sm(r)).reduce((l,c)=>Zt(l)?l:l[c],t);return gt(i)||i===t?gt(t[r])?s:t[r]:i},un=t=>typeof t=="boolean",rt=(t,r,s)=>{let i=-1;const l=cu(r)?[r]:sm(r),c=l.length,f=c-1;for(;++i<c;){const h=l[i];let m=s;if(i!==f){const p=t[h];m=yt(p)||Array.isArray(p)?p:isNaN(+l[i+1])?{}:[]}if(h==="__proto__"||h==="constructor"||h==="prototype")return;t[h]=m,t=t[h]}};const jc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Dn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Er={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},im=Ae.createContext(null);im.displayName="HookFormContext";const uu=()=>Ae.useContext(im),QO=t=>{const{children:r,...s}=t;return Ae.createElement(im.Provider,{value:s},r)};var V0=(t,r,s,i=!0)=>{const l={defaultValues:r._defaultValues};for(const c in t)Object.defineProperty(l,c,{get:()=>{const f=c;return r._proxyFormState[f]!==Dn.all&&(r._proxyFormState[f]=!i||Dn.all),s&&(s[f]=!0),t[f]}});return l};const om=typeof window<"u"?Ae.useLayoutEffect:Ae.useEffect;function B0(t){const r=uu(),{control:s=r.control,disabled:i,name:l,exact:c}=t||{},[f,h]=Ae.useState(s._formState),m=Ae.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return om(()=>s._subscribe({name:l,formState:m.current,exact:c,callback:p=>{!i&&h({...s._formState,...p})}}),[l,i,c]),Ae.useEffect(()=>{m.current.isValid&&s._setValid(!0)},[s]),Ae.useMemo(()=>V0(f,s,m.current,!1),[f,s])}var Wn=t=>typeof t=="string",H0=(t,r,s,i,l)=>Wn(t)?(i&&r.watch.add(t),de(s,t,l)):Array.isArray(t)?t.map(c=>(i&&r.watch.add(c),de(s,c))):(i&&(r.watchAll=!0),s),xh=t=>Zt(t)||!U0(t);function Mr(t,r,s=new WeakSet){if(xh(t)||xh(r))return t===r;if(Fa(t)&&Fa(r))return t.getTime()===r.getTime();const i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;if(s.has(t)||s.has(r))return!0;s.add(t),s.add(r);for(const c of i){const f=t[c];if(!l.includes(c))return!1;if(c!=="ref"){const h=r[c];if(Fa(f)&&Fa(h)||yt(f)&&yt(h)||Array.isArray(f)&&Array.isArray(h)?!Mr(f,h,s):f!==h)return!1}}return!0}function XO(t){const r=uu(),{control:s=r.control,name:i,defaultValue:l,disabled:c,exact:f,compute:h}=t||{},m=Ae.useRef(l),p=Ae.useRef(h),v=Ae.useRef(void 0);p.current=h;const x=Ae.useMemo(()=>s._getWatch(i,m.current),[s,i]),[_,E]=Ae.useState(p.current?p.current(x):x);return om(()=>s._subscribe({name:i,formState:{values:!0},exact:f,callback:R=>{if(!c){const w=H0(i,s._names,R.values||s._formValues,!1,m.current);if(p.current){const C=p.current(w);Mr(C,v.current)||(E(C),v.current=C)}else E(w)}}}),[s,c,i,f]),Ae.useEffect(()=>s._removeUnmounted()),_}function KO(t){const r=uu(),{name:s,disabled:i,control:l=r.control,shouldUnregister:c,defaultValue:f}=t,h=L0(l._names.array,s),m=Ae.useMemo(()=>de(l._formValues,s,de(l._defaultValues,s,f)),[l,s,f]),p=XO({control:l,name:s,defaultValue:m,exact:!0}),v=B0({control:l,name:s,exact:!0}),x=Ae.useRef(t),_=Ae.useRef(l.register(s,{...t.rules,value:p,...un(t.disabled)?{disabled:t.disabled}:{}}));x.current=t;const E=Ae.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!de(v.errors,s)},isDirty:{enumerable:!0,get:()=>!!de(v.dirtyFields,s)},isTouched:{enumerable:!0,get:()=>!!de(v.touchedFields,s)},isValidating:{enumerable:!0,get:()=>!!de(v.validatingFields,s)},error:{enumerable:!0,get:()=>de(v.errors,s)}}),[v,s]),R=Ae.useCallback(O=>_.current.onChange({target:{value:P0(O),name:s},type:jc.CHANGE}),[s]),w=Ae.useCallback(()=>_.current.onBlur({target:{value:de(l._formValues,s),name:s},type:jc.BLUR}),[s,l._formValues]),C=Ae.useCallback(O=>{const U=de(l._fields,s);U&&O&&(U._f.ref={focus:()=>O.focus&&O.focus(),select:()=>O.select&&O.select(),setCustomValidity:k=>O.setCustomValidity(k),reportValidity:()=>O.reportValidity()})},[l._fields,s]),z=Ae.useMemo(()=>({name:s,value:p,...un(i)||v.disabled?{disabled:v.disabled||i}:{},onChange:R,onBlur:w,ref:C}),[s,i,v.disabled,R,w,C,p]);return Ae.useEffect(()=>{const O=l._options.shouldUnregister||c;l.register(s,{...x.current.rules,...un(x.current.disabled)?{disabled:x.current.disabled}:{}});const U=(k,M)=>{const Z=de(l._fields,k);Z&&Z._f&&(Z._f.mount=M)};if(U(s,!0),O){const k=Ct(de(l._options.defaultValues,s));rt(l._defaultValues,s,k),gt(de(l._formValues,s))&&rt(l._formValues,s,k)}return!h&&l.register(s),()=>{(h?O&&!l._state.action:O)?l.unregister(s):U(s,!1)}},[s,l,h,c]),Ae.useEffect(()=>{l._setDisabledField({disabled:i,name:s})},[i,s,l]),Ae.useMemo(()=>({field:z,formState:v,fieldState:E}),[z,v,E])}const $O=t=>t.render(KO(t));var lm=(t,r,s,i,l)=>r?{...s[t],types:{...s[t]&&s[t].types?s[t].types:{},[i]:l||!0}}:{},bo=t=>Array.isArray(t)?t:[t],mb=()=>{let t=[];return{get observers(){return t},next:l=>{for(const c of t)c.next&&c.next(l)},subscribe:l=>(t.push(l),{unsubscribe:()=>{t=t.filter(c=>c!==l)}}),unsubscribe:()=>{t=[]}}},tn=t=>yt(t)&&!Object.keys(t).length,cm=t=>t.type==="file",jn=t=>typeof t=="function",kc=t=>{if(!rm)return!1;const r=t?t.ownerDocument:0;return t instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},q0=t=>t.type==="select-multiple",um=t=>t.type==="radio",WO=t=>um(t)||Xo(t),Wd=t=>kc(t)&&t.isConnected;function JO(t,r){const s=r.slice(0,-1).length;let i=0;for(;i<s;)t=gt(t)?i++:t[r[i++]];return t}function eM(t){for(const r in t)if(t.hasOwnProperty(r)&&!gt(t[r]))return!1;return!0}function St(t,r){const s=Array.isArray(r)?r:cu(r)?[r]:sm(r),i=s.length===1?t:JO(t,s),l=s.length-1,c=s[l];return i&&delete i[c],l!==0&&(yt(i)&&tn(i)||Array.isArray(i)&&eM(i))&&St(t,s.slice(0,-1)),t}var G0=t=>{for(const r in t)if(jn(t[r]))return!0;return!1};function zc(t,r={}){const s=Array.isArray(t);if(yt(t)||s)for(const i in t)Array.isArray(t[i])||yt(t[i])&&!G0(t[i])?(r[i]=Array.isArray(t[i])?[]:{},zc(t[i],r[i])):Zt(t[i])||(r[i]=!0);return r}function F0(t,r,s){const i=Array.isArray(t);if(yt(t)||i)for(const l in t)Array.isArray(t[l])||yt(t[l])&&!G0(t[l])?gt(r)||xh(s[l])?s[l]=Array.isArray(t[l])?zc(t[l],[]):{...zc(t[l])}:F0(t[l],Zt(r)?{}:r[l],s[l]):s[l]=!Mr(t[l],r[l]);return s}var po=(t,r)=>F0(t,r,zc(r));const pb={value:!1,isValid:!1},vb={value:!0,isValid:!0};var I0=t=>{if(Array.isArray(t)){if(t.length>1){const r=t.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:r,isValid:!!r.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!gt(t[0].attributes.value)?gt(t[0].value)||t[0].value===""?vb:{value:t[0].value,isValid:!0}:vb:pb}return pb},Z0=(t,{valueAsNumber:r,valueAsDate:s,setValueAs:i})=>gt(t)?t:r?t===""?NaN:t&&+t:s&&Wn(t)?new Date(t):i?i(t):t;const gb={isValid:!1,value:null};var Y0=t=>Array.isArray(t)?t.reduce((r,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:r,gb):gb;function yb(t){const r=t.ref;return cm(r)?r.files:um(r)?Y0(t.refs).value:q0(r)?[...r.selectedOptions].map(({value:s})=>s):Xo(r)?I0(t.refs).value:Z0(gt(r.value)?t.ref.value:r.value,t)}var tM=(t,r,s,i)=>{const l={};for(const c of t){const f=de(r,c);f&&rt(l,c,f._f)}return{criteriaMode:s,names:[...t],fields:l,shouldUseNativeValidation:i}},Uc=t=>t instanceof RegExp,vo=t=>gt(t)?t:Uc(t)?t.source:yt(t)?Uc(t.value)?t.value.source:t.value:t,bb=t=>({isOnSubmit:!t||t===Dn.onSubmit,isOnBlur:t===Dn.onBlur,isOnChange:t===Dn.onChange,isOnAll:t===Dn.all,isOnTouch:t===Dn.onTouched});const xb="AsyncFunction";var nM=t=>!!t&&!!t.validate&&!!(jn(t.validate)&&t.validate.constructor.name===xb||yt(t.validate)&&Object.values(t.validate).find(r=>r.constructor.name===xb)),rM=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Sb=(t,r,s)=>!s&&(r.watchAll||r.watch.has(t)||[...r.watch].some(i=>t.startsWith(i)&&/^\.\w+/.test(t.slice(i.length))));const xo=(t,r,s,i)=>{for(const l of s||Object.keys(t)){const c=de(t,l);if(c){const{_f:f,...h}=c;if(f){if(f.refs&&f.refs[0]&&r(f.refs[0],l)&&!i)return!0;if(f.ref&&r(f.ref,f.name)&&!i)return!0;if(xo(h,r))break}else if(yt(h)&&xo(h,r))break}}};function _b(t,r,s){const i=de(t,s);if(i||cu(s))return{error:i,name:s};const l=s.split(".");for(;l.length;){const c=l.join("."),f=de(r,c),h=de(t,c);if(f&&!Array.isArray(f)&&s!==c)return{name:s};if(h&&h.type)return{name:c,error:h};if(h&&h.root&&h.root.type)return{name:`${c}.root`,error:h.root};l.pop()}return{name:s}}var aM=(t,r,s,i)=>{s(t);const{name:l,...c}=t;return tn(c)||Object.keys(c).length>=Object.keys(r).length||Object.keys(c).find(f=>r[f]===(!i||Dn.all))},sM=(t,r,s)=>!t||!r||t===r||bo(t).some(i=>i&&(s?i===r:i.startsWith(r)||r.startsWith(i))),iM=(t,r,s,i,l)=>l.isOnAll?!1:!s&&l.isOnTouch?!(r||t):(s?i.isOnBlur:l.isOnBlur)?!t:(s?i.isOnChange:l.isOnChange)?t:!0,oM=(t,r)=>!am(de(t,r)).length&&St(t,r),lM=(t,r,s)=>{const i=bo(de(t,s));return rt(i,"root",r[s]),rt(t,s,i),t},Cc=t=>Wn(t);function wb(t,r,s="validate"){if(Cc(t)||Array.isArray(t)&&t.every(Cc)||un(t)&&!t)return{type:s,message:Cc(t)?t:"",ref:r}}var Ys=t=>yt(t)&&!Uc(t)?t:{value:t,message:""},Eb=async(t,r,s,i,l,c)=>{const{ref:f,refs:h,required:m,maxLength:p,minLength:v,min:x,max:_,pattern:E,validate:R,name:w,valueAsNumber:C,mount:z}=t._f,O=de(s,w);if(!z||r.has(w))return{};const U=h?h[0]:f,k=ae=>{l&&U.reportValidity&&(U.setCustomValidity(un(ae)?"":ae||""),U.reportValidity())},M={},Z=um(f),F=Xo(f),I=Z||F,te=(C||cm(f))&&gt(f.value)&&gt(O)||kc(f)&&f.value===""||O===""||Array.isArray(O)&&!O.length,ie=lm.bind(null,w,i,M),ge=(ae,se,ce,pe=Er.maxLength,j=Er.minLength)=>{const Q=ae?se:ce;M[w]={type:ae?pe:j,message:Q,ref:f,...ie(ae?pe:j,Q)}};if(c?!Array.isArray(O)||!O.length:m&&(!I&&(te||Zt(O))||un(O)&&!O||F&&!I0(h).isValid||Z&&!Y0(h).isValid)){const{value:ae,message:se}=Cc(m)?{value:!!m,message:m}:Ys(m);if(ae&&(M[w]={type:Er.required,message:se,ref:U,...ie(Er.required,se)},!i))return k(se),M}if(!te&&(!Zt(x)||!Zt(_))){let ae,se;const ce=Ys(_),pe=Ys(x);if(!Zt(O)&&!isNaN(O)){const j=f.valueAsNumber||O&&+O;Zt(ce.value)||(ae=j>ce.value),Zt(pe.value)||(se=j<pe.value)}else{const j=f.valueAsDate||new Date(O),Q=A=>new Date(new Date().toDateString()+" "+A),H=f.type=="time",J=f.type=="week";Wn(ce.value)&&O&&(ae=H?Q(O)>Q(ce.value):J?O>ce.value:j>new Date(ce.value)),Wn(pe.value)&&O&&(se=H?Q(O)<Q(pe.value):J?O<pe.value:j<new Date(pe.value))}if((ae||se)&&(ge(!!ae,ce.message,pe.message,Er.max,Er.min),!i))return k(M[w].message),M}if((p||v)&&!te&&(Wn(O)||c&&Array.isArray(O))){const ae=Ys(p),se=Ys(v),ce=!Zt(ae.value)&&O.length>+ae.value,pe=!Zt(se.value)&&O.length<+se.value;if((ce||pe)&&(ge(ce,ae.message,se.message),!i))return k(M[w].message),M}if(E&&!te&&Wn(O)){const{value:ae,message:se}=Ys(E);if(Uc(ae)&&!O.match(ae)&&(M[w]={type:Er.pattern,message:se,ref:f,...ie(Er.pattern,se)},!i))return k(se),M}if(R){if(jn(R)){const ae=await R(O,s),se=wb(ae,U);if(se&&(M[w]={...se,...ie(Er.validate,se.message)},!i))return k(se.message),M}else if(yt(R)){let ae={};for(const se in R){if(!tn(ae)&&!i)break;const ce=wb(await R[se](O,s),U,se);ce&&(ae={...ce,...ie(se,ce.message)},k(ce.message),i&&(M[w]=ae))}if(!tn(ae)&&(M[w]={ref:U,...ae},!i))return M}}return k(!0),M};const cM={mode:Dn.onSubmit,reValidateMode:Dn.onChange,shouldFocusError:!0};function uM(t={}){let r={...cM,...t},s={submitCount:0,isDirty:!1,isReady:!1,isLoading:jn(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},i={},l=yt(r.defaultValues)||yt(r.values)?Ct(r.defaultValues||r.values)||{}:{},c=r.shouldUnregister?{}:Ct(l),f={action:!1,mount:!1,watch:!1},h={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},m,p=0;const v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let x={...v};const _={array:mb(),state:mb()},E=r.criteriaMode===Dn.all,R=N=>B=>{clearTimeout(p),p=setTimeout(N,B)},w=async N=>{if(!r.disabled&&(v.isValid||x.isValid||N)){const B=r.resolver?tn((await F()).errors):await te(i,!0);B!==s.isValid&&_.state.next({isValid:B})}},C=(N,B)=>{!r.disabled&&(v.isValidating||v.validatingFields||x.isValidating||x.validatingFields)&&((N||Array.from(h.mount)).forEach(K=>{K&&(B?rt(s.validatingFields,K,B):St(s.validatingFields,K))}),_.state.next({validatingFields:s.validatingFields,isValidating:!tn(s.validatingFields)}))},z=(N,B=[],K,ve,fe=!0,le=!0)=>{if(ve&&K&&!r.disabled){if(f.action=!0,le&&Array.isArray(de(i,N))){const we=K(de(i,N),ve.argA,ve.argB);fe&&rt(i,N,we)}if(le&&Array.isArray(de(s.errors,N))){const we=K(de(s.errors,N),ve.argA,ve.argB);fe&&rt(s.errors,N,we),oM(s.errors,N)}if((v.touchedFields||x.touchedFields)&&le&&Array.isArray(de(s.touchedFields,N))){const we=K(de(s.touchedFields,N),ve.argA,ve.argB);fe&&rt(s.touchedFields,N,we)}(v.dirtyFields||x.dirtyFields)&&(s.dirtyFields=po(l,c)),_.state.next({name:N,isDirty:ge(N,B),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else rt(c,N,B)},O=(N,B)=>{rt(s.errors,N,B),_.state.next({errors:s.errors})},U=N=>{s.errors=N,_.state.next({errors:s.errors,isValid:!1})},k=(N,B,K,ve)=>{const fe=de(i,N);if(fe){const le=de(c,N,gt(K)?de(l,N):K);gt(le)||ve&&ve.defaultChecked||B?rt(c,N,B?le:yb(fe._f)):ce(N,le),f.mount&&w()}},M=(N,B,K,ve,fe)=>{let le=!1,we=!1;const ze={name:N};if(!r.disabled){if(!K||ve){(v.isDirty||x.isDirty)&&(we=s.isDirty,s.isDirty=ze.isDirty=ge(),le=we!==ze.isDirty);const Qe=Mr(de(l,N),B);we=!!de(s.dirtyFields,N),Qe?St(s.dirtyFields,N):rt(s.dirtyFields,N,!0),ze.dirtyFields=s.dirtyFields,le=le||(v.dirtyFields||x.dirtyFields)&&we!==!Qe}if(K){const Qe=de(s.touchedFields,N);Qe||(rt(s.touchedFields,N,K),ze.touchedFields=s.touchedFields,le=le||(v.touchedFields||x.touchedFields)&&Qe!==K)}le&&fe&&_.state.next(ze)}return le?ze:{}},Z=(N,B,K,ve)=>{const fe=de(s.errors,N),le=(v.isValid||x.isValid)&&un(B)&&s.isValid!==B;if(r.delayError&&K?(m=R(()=>O(N,K)),m(r.delayError)):(clearTimeout(p),m=null,K?rt(s.errors,N,K):St(s.errors,N)),(K?!Mr(fe,K):fe)||!tn(ve)||le){const we={...ve,...le&&un(B)?{isValid:B}:{},errors:s.errors,name:N};s={...s,...we},_.state.next(we)}},F=async N=>{C(N,!0);const B=await r.resolver(c,r.context,tM(N||h.mount,i,r.criteriaMode,r.shouldUseNativeValidation));return C(N),B},I=async N=>{const{errors:B}=await F(N);if(N)for(const K of N){const ve=de(B,K);ve?rt(s.errors,K,ve):St(s.errors,K)}else s.errors=B;return B},te=async(N,B,K={valid:!0})=>{for(const ve in N){const fe=N[ve];if(fe){const{_f:le,...we}=fe;if(le){const ze=h.array.has(le.name),Qe=fe._f&&nM(fe._f);Qe&&v.validatingFields&&C([ve],!0);const lt=await Eb(fe,h.disabled,c,E,r.shouldUseNativeValidation&&!B,ze);if(Qe&&v.validatingFields&&C([ve]),lt[le.name]&&(K.valid=!1,B))break;!B&&(de(lt,le.name)?ze?lM(s.errors,lt,le.name):rt(s.errors,le.name,lt[le.name]):St(s.errors,le.name))}!tn(we)&&await te(we,B,K)}}return K.valid},ie=()=>{for(const N of h.unMount){const B=de(i,N);B&&(B._f.refs?B._f.refs.every(K=>!Wd(K)):!Wd(B._f.ref))&&ne(N)}h.unMount=new Set},ge=(N,B)=>!r.disabled&&(N&&B&&rt(c,N,B),!Mr(A(),l)),ae=(N,B,K)=>H0(N,h,{...f.mount?c:gt(B)?l:Wn(N)?{[N]:B}:B},K,B),se=N=>am(de(f.mount?c:l,N,r.shouldUnregister?de(l,N,[]):[])),ce=(N,B,K={})=>{const ve=de(i,N);let fe=B;if(ve){const le=ve._f;le&&(!le.disabled&&rt(c,N,Z0(B,le)),fe=kc(le.ref)&&Zt(B)?"":B,q0(le.ref)?[...le.ref.options].forEach(we=>we.selected=fe.includes(we.value)):le.refs?Xo(le.ref)?le.refs.forEach(we=>{(!we.defaultChecked||!we.disabled)&&(Array.isArray(fe)?we.checked=!!fe.find(ze=>ze===we.value):we.checked=fe===we.value||!!fe)}):le.refs.forEach(we=>we.checked=we.value===fe):cm(le.ref)?le.ref.value="":(le.ref.value=fe,le.ref.type||_.state.next({name:N,values:Ct(c)})))}(K.shouldDirty||K.shouldTouch)&&M(N,fe,K.shouldTouch,K.shouldDirty,!0),K.shouldValidate&&J(N)},pe=(N,B,K)=>{for(const ve in B){if(!B.hasOwnProperty(ve))return;const fe=B[ve],le=N+"."+ve,we=de(i,le);(h.array.has(N)||yt(fe)||we&&!we._f)&&!Fa(fe)?pe(le,fe,K):ce(le,fe,K)}},j=(N,B,K={})=>{const ve=de(i,N),fe=h.array.has(N),le=Ct(B);rt(c,N,le),fe?(_.array.next({name:N,values:Ct(c)}),(v.isDirty||v.dirtyFields||x.isDirty||x.dirtyFields)&&K.shouldDirty&&_.state.next({name:N,dirtyFields:po(l,c),isDirty:ge(N,le)})):ve&&!ve._f&&!Zt(le)?pe(N,le,K):ce(N,le,K),Sb(N,h)&&_.state.next({...s,name:N}),_.state.next({name:f.mount?N:void 0,values:Ct(c)})},Q=async N=>{f.mount=!0;const B=N.target;let K=B.name,ve=!0;const fe=de(i,K),le=Qe=>{ve=Number.isNaN(Qe)||Fa(Qe)&&isNaN(Qe.getTime())||Mr(Qe,de(c,K,Qe))},we=bb(r.mode),ze=bb(r.reValidateMode);if(fe){let Qe,lt;const rs=B.type?yb(fe._f):P0(N),qn=N.type===jc.BLUR||N.type===jc.FOCUS_OUT,Su=!rM(fe._f)&&!r.resolver&&!de(s.errors,K)&&!fe._f.deps||iM(qn,de(s.touchedFields,K),s.isSubmitted,ze,we),zr=Sb(K,h,qn);rt(c,K,rs),qn?(!B||!B.readOnly)&&(fe._f.onBlur&&fe._f.onBlur(N),m&&m(0)):fe._f.onChange&&fe._f.onChange(N);const Ur=M(K,rs,qn),or=!tn(Ur)||zr;if(!qn&&_.state.next({name:K,type:N.type,values:Ct(c)}),Su)return(v.isValid||x.isValid)&&(r.mode==="onBlur"?qn&&w():qn||w()),or&&_.state.next({name:K,...zr?{}:Ur});if(!qn&&zr&&_.state.next({...s}),r.resolver){const{errors:wa}=await F([K]);if(le(rs),ve){const Ea=_b(s.errors,i,K),Jo=_b(wa,i,Ea.name||K);Qe=Jo.error,K=Jo.name,lt=tn(wa)}}else C([K],!0),Qe=(await Eb(fe,h.disabled,c,E,r.shouldUseNativeValidation))[K],C([K]),le(rs),ve&&(Qe?lt=!1:(v.isValid||x.isValid)&&(lt=await te(i,!0)));ve&&(fe._f.deps&&J(fe._f.deps),Z(K,lt,Qe,Ur))}},H=(N,B)=>{if(de(s.errors,B)&&N.focus)return N.focus(),1},J=async(N,B={})=>{let K,ve;const fe=bo(N);if(r.resolver){const le=await I(gt(N)?N:fe);K=tn(le),ve=N?!fe.some(we=>de(le,we)):K}else N?(ve=(await Promise.all(fe.map(async le=>{const we=de(i,le);return await te(we&&we._f?{[le]:we}:we)}))).every(Boolean),!(!ve&&!s.isValid)&&w()):ve=K=await te(i);return _.state.next({...!Wn(N)||(v.isValid||x.isValid)&&K!==s.isValid?{}:{name:N},...r.resolver||!N?{isValid:K}:{},errors:s.errors}),B.shouldFocus&&!ve&&xo(i,H,N?fe:h.mount),ve},A=N=>{const B={...f.mount?c:l};return gt(N)?B:Wn(N)?de(B,N):N.map(K=>de(B,K))},Y=(N,B)=>({invalid:!!de((B||s).errors,N),isDirty:!!de((B||s).dirtyFields,N),error:de((B||s).errors,N),isValidating:!!de(s.validatingFields,N),isTouched:!!de((B||s).touchedFields,N)}),oe=N=>{N&&bo(N).forEach(B=>St(s.errors,B)),_.state.next({errors:N?s.errors:{}})},ee=(N,B,K)=>{const ve=(de(i,N,{_f:{}})._f||{}).ref,fe=de(s.errors,N)||{},{ref:le,message:we,type:ze,...Qe}=fe;rt(s.errors,N,{...Qe,...B,ref:ve}),_.state.next({name:N,errors:s.errors,isValid:!1}),K&&K.shouldFocus&&ve&&ve.focus&&ve.focus()},ue=(N,B)=>jn(N)?_.state.subscribe({next:K=>"values"in K&&N(ae(void 0,B),K)}):ae(N,B,!0),Oe=N=>_.state.subscribe({next:B=>{sM(N.name,B.name,N.exact)&&aM(B,N.formState||v,Pt,N.reRenderRoot)&&N.callback({values:{...c},...s,...B,defaultValues:l})}}).unsubscribe,_e=N=>(f.mount=!0,x={...x,...N.formState},Oe({...N,formState:x})),ne=(N,B={})=>{for(const K of N?bo(N):h.mount)h.mount.delete(K),h.array.delete(K),B.keepValue||(St(i,K),St(c,K)),!B.keepError&&St(s.errors,K),!B.keepDirty&&St(s.dirtyFields,K),!B.keepTouched&&St(s.touchedFields,K),!B.keepIsValidating&&St(s.validatingFields,K),!r.shouldUnregister&&!B.keepDefaultValue&&St(l,K);_.state.next({values:Ct(c)}),_.state.next({...s,...B.keepDirty?{isDirty:ge()}:{}}),!B.keepIsValid&&w()},Te=({disabled:N,name:B})=>{(un(N)&&f.mount||N||h.disabled.has(B))&&(N?h.disabled.add(B):h.disabled.delete(B))},$e=(N,B={})=>{let K=de(i,N);const ve=un(B.disabled)||un(r.disabled);return rt(i,N,{...K||{},_f:{...K&&K._f?K._f:{ref:{name:N}},name:N,mount:!0,...B}}),h.mount.add(N),K?Te({disabled:un(B.disabled)?B.disabled:r.disabled,name:N}):k(N,!0,B.value),{...ve?{disabled:B.disabled||r.disabled}:{},...r.progressive?{required:!!B.required,min:vo(B.min),max:vo(B.max),minLength:vo(B.minLength),maxLength:vo(B.maxLength),pattern:vo(B.pattern)}:{},name:N,onChange:Q,onBlur:Q,ref:fe=>{if(fe){$e(N,B),K=de(i,N);const le=gt(fe.value)&&fe.querySelectorAll&&fe.querySelectorAll("input,select,textarea")[0]||fe,we=WO(le),ze=K._f.refs||[];if(we?ze.find(Qe=>Qe===le):le===K._f.ref)return;rt(i,N,{_f:{...K._f,...we?{refs:[...ze.filter(Wd),le,...Array.isArray(de(l,N))?[{}]:[]],ref:{type:le.type,name:N}}:{ref:le}}}),k(N,!1,void 0,le)}else K=de(i,N,{}),K._f&&(K._f.mount=!1),(r.shouldUnregister||B.shouldUnregister)&&!(L0(h.array,N)&&f.action)&&h.unMount.add(N)}}},He=()=>r.shouldFocusError&&xo(i,H,h.mount),Ye=N=>{un(N)&&(_.state.next({disabled:N}),xo(i,(B,K)=>{const ve=de(i,K);ve&&(B.disabled=ve._f.disabled||N,Array.isArray(ve._f.refs)&&ve._f.refs.forEach(fe=>{fe.disabled=ve._f.disabled||N}))},0,!1))},We=(N,B)=>async K=>{let ve;K&&(K.preventDefault&&K.preventDefault(),K.persist&&K.persist());let fe=Ct(c);if(_.state.next({isSubmitting:!0}),r.resolver){const{errors:le,values:we}=await F();s.errors=le,fe=Ct(we)}else await te(i);if(h.disabled.size)for(const le of h.disabled)St(fe,le);if(St(s.errors,"root"),tn(s.errors)){_.state.next({errors:{}});try{await N(fe,K)}catch(le){ve=le}}else B&&await B({...s.errors},K),He(),setTimeout(He);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:tn(s.errors)&&!ve,submitCount:s.submitCount+1,errors:s.errors}),ve)throw ve},At=(N,B={})=>{de(i,N)&&(gt(B.defaultValue)?j(N,Ct(de(l,N))):(j(N,B.defaultValue),rt(l,N,Ct(B.defaultValue))),B.keepTouched||St(s.touchedFields,N),B.keepDirty||(St(s.dirtyFields,N),s.isDirty=B.defaultValue?ge(N,Ct(de(l,N))):ge()),B.keepError||(St(s.errors,N),v.isValid&&w()),_.state.next({...s}))},Xt=(N,B={})=>{const K=N?Ct(N):l,ve=Ct(K),fe=tn(N),le=fe?l:ve;if(B.keepDefaultValues||(l=K),!B.keepValues){if(B.keepDirtyValues){const we=new Set([...h.mount,...Object.keys(po(l,c))]);for(const ze of Array.from(we))de(s.dirtyFields,ze)?rt(le,ze,de(c,ze)):j(ze,de(le,ze))}else{if(rm&&gt(N))for(const we of h.mount){const ze=de(i,we);if(ze&&ze._f){const Qe=Array.isArray(ze._f.refs)?ze._f.refs[0]:ze._f.ref;if(kc(Qe)){const lt=Qe.closest("form");if(lt){lt.reset();break}}}}if(B.keepFieldsRef)for(const we of h.mount)j(we,de(le,we));else i={}}c=r.shouldUnregister?B.keepDefaultValues?Ct(l):{}:Ct(le),_.array.next({values:{...le}}),_.state.next({values:{...le}})}h={mount:B.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},f.mount=!v.isValid||!!B.keepIsValid||!!B.keepDirtyValues,f.watch=!!r.shouldUnregister,_.state.next({submitCount:B.keepSubmitCount?s.submitCount:0,isDirty:fe?!1:B.keepDirty?s.isDirty:!!(B.keepDefaultValues&&!Mr(N,l)),isSubmitted:B.keepIsSubmitted?s.isSubmitted:!1,dirtyFields:fe?{}:B.keepDirtyValues?B.keepDefaultValues&&c?po(l,c):s.dirtyFields:B.keepDefaultValues&&N?po(l,N):B.keepDirty?s.dirtyFields:{},touchedFields:B.keepTouched?s.touchedFields:{},errors:B.keepErrors?s.errors:{},isSubmitSuccessful:B.keepIsSubmitSuccessful?s.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:l})},kr=(N,B)=>Xt(jn(N)?N(c):N,B),_a=(N,B={})=>{const K=de(i,N),ve=K&&K._f;if(ve){const fe=ve.refs?ve.refs[0]:ve.ref;fe.focus&&(fe.focus(),B.shouldSelect&&jn(fe.select)&&fe.select())}},Pt=N=>{s={...s,...N}},pi={control:{register:$e,unregister:ne,getFieldState:Y,handleSubmit:We,setError:ee,_subscribe:Oe,_runSchema:F,_focusError:He,_getWatch:ae,_getDirty:ge,_setValid:w,_setFieldArray:z,_setDisabledField:Te,_setErrors:U,_getFieldArray:se,_reset:Xt,_resetDefaultValues:()=>jn(r.defaultValues)&&r.defaultValues().then(N=>{kr(N,r.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:ie,_disableForm:Ye,_subjects:_,_proxyFormState:v,get _fields(){return i},get _formValues(){return c},get _state(){return f},set _state(N){f=N},get _defaultValues(){return l},get _names(){return h},set _names(N){h=N},get _formState(){return s},get _options(){return r},set _options(N){r={...r,...N}}},subscribe:_e,trigger:J,register:$e,handleSubmit:We,watch:ue,setValue:j,getValues:A,reset:kr,resetField:At,clearErrors:oe,unregister:ne,setError:ee,setFocus:_a,getFieldState:Y};return{...pi,formControl:pi}}function fM(t={}){const r=Ae.useRef(void 0),s=Ae.useRef(void 0),[i,l]=Ae.useState({isDirty:!1,isValidating:!1,isLoading:jn(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:jn(t.defaultValues)?void 0:t.defaultValues});if(!r.current)if(t.formControl)r.current={...t.formControl,formState:i},t.defaultValues&&!jn(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:f,...h}=uM(t);r.current={...h,formState:i}}const c=r.current.control;return c._options=t,om(()=>{const f=c._subscribe({formState:c._proxyFormState,callback:()=>l({...c._formState}),reRenderRoot:!0});return l(h=>({...h,isReady:!0})),c._formState.isReady=!0,f},[c]),Ae.useEffect(()=>c._disableForm(t.disabled),[c,t.disabled]),Ae.useEffect(()=>{t.mode&&(c._options.mode=t.mode),t.reValidateMode&&(c._options.reValidateMode=t.reValidateMode)},[c,t.mode,t.reValidateMode]),Ae.useEffect(()=>{t.errors&&(c._setErrors(t.errors),c._focusError())},[c,t.errors]),Ae.useEffect(()=>{t.shouldUnregister&&c._subjects.state.next({values:c._getWatch()})},[c,t.shouldUnregister]),Ae.useEffect(()=>{if(c._proxyFormState.isDirty){const f=c._getDirty();f!==i.isDirty&&c._subjects.state.next({isDirty:f})}},[c,i.isDirty]),Ae.useEffect(()=>{t.values&&!Mr(t.values,s.current)?(c._reset(t.values,{keepFieldsRef:!0,...c._options.resetOptions}),s.current=t.values,l(f=>({...f}))):c._resetDefaultValues()},[c,t.values]),Ae.useEffect(()=>{c._state.mount||(c._setValid(),c._state.mount=!0),c._state.watch&&(c._state.watch=!1,c._subjects.state.next({...c._formState})),c._removeUnmounted()}),r.current.formState=V0(i,c),r.current}const Cb=(t,r,s)=>{if(t&&"reportValidity"in t){const i=de(s,r);t.setCustomValidity(i&&i.message||""),t.reportValidity()}},Sh=(t,r)=>{for(const s in r.fields){const i=r.fields[s];i&&i.ref&&"reportValidity"in i.ref?Cb(i.ref,s,t):i&&i.refs&&i.refs.forEach(l=>Cb(l,s,t))}},Tb=(t,r)=>{r.shouldUseNativeValidation&&Sh(t,r);const s={};for(const i in t){const l=de(r.fields,i),c=Object.assign(t[i]||{},{ref:l&&l.ref});if(dM(r.names||Object.keys(t),i)){const f=Object.assign({},de(s,i));rt(f,"root",c),rt(s,i,f)}else rt(s,i,c)}return s},dM=(t,r)=>{const s=Ab(r);return t.some(i=>Ab(i).match(`^${s}\\.\\d+`))};function Ab(t){return t.replace(/\]|\[/g,"")}function Q0(t,r,s){function i(h,m){var p;Object.defineProperty(h,"_zod",{value:h._zod??{},enumerable:!1}),(p=h._zod).traits??(p.traits=new Set),h._zod.traits.add(t),r(h,m);for(const v in f.prototype)v in h||Object.defineProperty(h,v,{value:f.prototype[v].bind(h)});h._zod.constr=f,h._zod.def=m}const l=s?.Parent??Object;class c extends l{}Object.defineProperty(c,"name",{value:t});function f(h){var m;const p=s?.Parent?new c:this;i(p,h),(m=p._zod).deferred??(m.deferred=[]);for(const v of p._zod.deferred)v();return p}return Object.defineProperty(f,"init",{value:i}),Object.defineProperty(f,Symbol.hasInstance,{value:h=>s?.Parent&&h instanceof s.Parent?!0:h?._zod?.traits?.has(t)}),Object.defineProperty(f,"name",{value:t}),f}class hM extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const mM={};function X0(t){return mM}function pM(t,r){return typeof r=="bigint"?r.toString():r}const K0="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function bc(t){return typeof t=="string"?t:t?.message}function $0(t,r,s){const i={...t,path:t.path??[]};if(!t.message){const l=bc(t.inst?._zod.def?.error?.(t))??bc(r?.error?.(t))??bc(s.customError?.(t))??bc(s.localeError?.(t))??"Invalid input";i.message=l}return delete i.inst,delete i.continue,r?.reportInput||delete i.input,i}const W0=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),t.message=JSON.stringify(r,pM,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},vM=Q0("$ZodError",W0),J0=Q0("$ZodError",W0,{Parent:Error}),gM=t=>(r,s,i,l)=>{const c=i?Object.assign(i,{async:!1}):{async:!1},f=r._zod.run({value:s,issues:[]},c);if(f instanceof Promise)throw new hM;if(f.issues.length){const h=new(l?.Err??t)(f.issues.map(m=>$0(m,c,X0())));throw K0(h,l?.callee),h}return f.value},yM=gM(J0),bM=t=>async(r,s,i,l)=>{const c=i?Object.assign(i,{async:!0}):{async:!0};let f=r._zod.run({value:s,issues:[]},c);if(f instanceof Promise&&(f=await f),f.issues.length){const h=new(l?.Err??t)(f.issues.map(m=>$0(m,c,X0())));throw K0(h,l?.callee),h}return f.value},xM=bM(J0);function Rb(t,r){try{var s=t()}catch(i){return r(i)}return s&&s.then?s.then(void 0,r):s}function SM(t,r){for(var s={};t.length;){var i=t[0],l=i.code,c=i.message,f=i.path.join(".");if(!s[f])if("unionErrors"in i){var h=i.unionErrors[0].errors[0];s[f]={message:h.message,type:h.code}}else s[f]={message:c,type:l};if("unionErrors"in i&&i.unionErrors.forEach(function(v){return v.errors.forEach(function(x){return t.push(x)})}),r){var m=s[f].types,p=m&&m[i.code];s[f]=lm(f,r,s,l,p?[].concat(p,i.message):i.message)}t.shift()}return s}function _M(t,r){for(var s={};t.length;){var i=t[0],l=i.code,c=i.message,f=i.path.join(".");if(!s[f])if(i.code==="invalid_union"&&i.errors.length>0){var h=i.errors[0][0];s[f]={message:h.message,type:h.code}}else s[f]={message:c,type:l};if(i.code==="invalid_union"&&i.errors.forEach(function(v){return v.forEach(function(x){return t.push(x)})}),r){var m=s[f].types,p=m&&m[i.code];s[f]=lm(f,r,s,l,p?[].concat(p,i.message):i.message)}t.shift()}return s}function wM(t,r,s){if(s===void 0&&(s={}),(function(i){return"_def"in i&&typeof i._def=="object"&&"typeName"in i._def})(t))return function(i,l,c){try{return Promise.resolve(Rb(function(){return Promise.resolve(t[s.mode==="sync"?"parse":"parseAsync"](i,r)).then(function(f){return c.shouldUseNativeValidation&&Sh({},c),{errors:{},values:s.raw?Object.assign({},i):f}})},function(f){if((function(h){return Array.isArray(h?.issues)})(f))return{values:{},errors:Tb(SM(f.errors,!c.shouldUseNativeValidation&&c.criteriaMode==="all"),c)};throw f}))}catch(f){return Promise.reject(f)}};if((function(i){return"_zod"in i&&typeof i._zod=="object"})(t))return function(i,l,c){try{return Promise.resolve(Rb(function(){return Promise.resolve((s.mode==="sync"?yM:xM)(t,i,r)).then(function(f){return c.shouldUseNativeValidation&&Sh({},c),{errors:{},values:s.raw?Object.assign({},i):f}})},function(f){if((function(h){return h instanceof vM})(f))return{values:{},errors:Tb(_M(f.issues,!c.shouldUseNativeValidation&&c.criteriaMode==="all"),c)};throw f}))}catch(f){return Promise.reject(f)}};throw new Error("Invalid input: not a Zod schema")}const EM=Hh("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function eS({className:t,variant:r,asChild:s=!1,...i}){const l=s?Bh:"span";return g.jsx(l,{"data-slot":"badge",className:Ze(EM({variant:r}),t),...i})}function Jd({className:t,...r}){return g.jsx("div",{"data-slot":"card",className:Ze("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...r})}function eh({className:t,...r}){return g.jsx("div",{"data-slot":"card-content",className:Ze("px-6",t),...r})}var fu="Dialog",[tS,Qj]=Bn(fu),[CM,Hn]=tS(fu),nS=t=>{const{__scopeDialog:r,children:s,open:i,defaultOpen:l,onOpenChange:c,modal:f=!0}=t,h=y.useRef(null),m=y.useRef(null),[p,v]=nr({prop:i,defaultProp:l??!1,onChange:c,caller:fu});return g.jsx(CM,{scope:r,triggerRef:h,contentRef:m,contentId:zn(),titleId:zn(),descriptionId:zn(),open:p,onOpenChange:v,onOpenToggle:y.useCallback(()=>v(x=>!x),[v]),modal:f,children:s})};nS.displayName=fu;var rS="DialogTrigger",aS=y.forwardRef((t,r)=>{const{__scopeDialog:s,...i}=t,l=Hn(rS,s),c=Ie(r,l.triggerRef);return g.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":hm(l.open),...i,ref:c,onClick:me(t.onClick,l.onOpenToggle)})});aS.displayName=rS;var fm="DialogPortal",[TM,sS]=tS(fm,{forceMount:void 0}),iS=t=>{const{__scopeDialog:r,forceMount:s,children:i,container:l}=t,c=Hn(fm,r);return g.jsx(TM,{scope:r,forceMount:s,children:y.Children.map(i,f=>g.jsx(qt,{present:s||c.open,children:g.jsx(hi,{asChild:!0,container:l,children:f})}))})};iS.displayName=fm;var Pc="DialogOverlay",oS=y.forwardRef((t,r)=>{const s=sS(Pc,t.__scopeDialog),{forceMount:i=s.forceMount,...l}=t,c=Hn(Pc,t.__scopeDialog);return c.modal?g.jsx(qt,{present:i||c.open,children:g.jsx(RM,{...l,ref:r})}):null});oS.displayName=Pc;var AM=ua("DialogOverlay.RemoveScroll"),RM=y.forwardRef((t,r)=>{const{__scopeDialog:s,...i}=t,l=Hn(Pc,s);return g.jsx(Io,{as:AM,allowPinchZoom:!0,shards:[l.contentRef],children:g.jsx(ke.div,{"data-state":hm(l.open),...i,ref:r,style:{pointerEvents:"auto",...i.style}})})}),Xa="DialogContent",lS=y.forwardRef((t,r)=>{const s=sS(Xa,t.__scopeDialog),{forceMount:i=s.forceMount,...l}=t,c=Hn(Xa,t.__scopeDialog);return g.jsx(qt,{present:i||c.open,children:c.modal?g.jsx(OM,{...l,ref:r}):g.jsx(MM,{...l,ref:r})})});lS.displayName=Xa;var OM=y.forwardRef((t,r)=>{const s=Hn(Xa,t.__scopeDialog),i=y.useRef(null),l=Ie(r,s.contentRef,i);return y.useEffect(()=>{const c=i.current;if(c)return su(c)},[]),g.jsx(cS,{...t,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(t.onCloseAutoFocus,c=>{c.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:me(t.onPointerDownOutside,c=>{const f=c.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&c.preventDefault()}),onFocusOutside:me(t.onFocusOutside,c=>c.preventDefault())})}),MM=y.forwardRef((t,r)=>{const s=Hn(Xa,t.__scopeDialog),i=y.useRef(!1),l=y.useRef(!1);return g.jsx(cS,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{t.onCloseAutoFocus?.(c),c.defaultPrevented||(i.current||s.triggerRef.current?.focus(),c.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:c=>{t.onInteractOutside?.(c),c.defaultPrevented||(i.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const f=c.target;s.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})}),cS=y.forwardRef((t,r)=>{const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:c,...f}=t,h=Hn(Xa,s),m=y.useRef(null),p=Ie(r,m);return au(),g.jsxs(g.Fragment,{children:[g.jsx(Fo,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:c,children:g.jsx(ui,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":hm(h.open),...f,ref:p,onDismiss:()=>h.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(DM,{titleId:h.titleId}),g.jsx(kM,{contentRef:m,descriptionId:h.descriptionId})]})]})}),dm="DialogTitle",uS=y.forwardRef((t,r)=>{const{__scopeDialog:s,...i}=t,l=Hn(dm,s);return g.jsx(ke.h2,{id:l.titleId,...i,ref:r})});uS.displayName=dm;var fS="DialogDescription",NM=y.forwardRef((t,r)=>{const{__scopeDialog:s,...i}=t,l=Hn(fS,s);return g.jsx(ke.p,{id:l.descriptionId,...i,ref:r})});NM.displayName=fS;var dS="DialogClose",hS=y.forwardRef((t,r)=>{const{__scopeDialog:s,...i}=t,l=Hn(dS,s);return g.jsx(ke.button,{type:"button",...i,ref:r,onClick:me(t.onClick,()=>l.onOpenChange(!1))})});hS.displayName=dS;function hm(t){return t?"open":"closed"}var mS="DialogTitleWarning",[Xj,pS]=rT(mS,{contentName:Xa,titleName:dm,docsSlug:"dialog"}),DM=({titleId:t})=>{const r=pS(mS),s=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(s))},[s,t]),null},jM="DialogDescriptionWarning",kM=({contentRef:t,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pS(jM).contentName}}.`;return y.useEffect(()=>{const l=t.current?.getAttribute("aria-describedby");r&&l&&(document.getElementById(r)||console.warn(i))},[i,t,r]),null},zM=nS,UM=aS,PM=iS,LM=oS,VM=lS,BM=uS,HM=hS;function qM({...t}){return g.jsx(zM,{"data-slot":"dialog",...t})}function GM({...t}){return g.jsx(UM,{"data-slot":"dialog-trigger",...t})}function FM({...t}){return g.jsx(PM,{"data-slot":"dialog-portal",...t})}function IM({className:t,...r}){return g.jsx(LM,{"data-slot":"dialog-overlay",className:Ze("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...r})}function ZM({className:t,children:r,showCloseButton:s=!0,...i}){return g.jsxs(FM,{"data-slot":"dialog-portal",children:[g.jsx(IM,{}),g.jsxs(VM,{"data-slot":"dialog-content",className:Ze("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...i,children:[r,s&&g.jsxs(HM,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(Vh,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function YM({className:t,...r}){return g.jsx("div",{"data-slot":"dialog-header",className:Ze("flex flex-col gap-2 text-center sm:text-left",t),...r})}function QM({className:t,...r}){return g.jsx(BM,{"data-slot":"dialog-title",className:Ze("text-lg leading-none font-semibold",t),...r})}function Ga({className:t,type:r,...s}){return g.jsx("input",{type:r,"data-slot":"input",className:Ze("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...s})}function _h(t,[r,s]){return Math.min(s,Math.max(r,t))}function XM(t){const r=y.useRef({value:t,previous:t});return y.useMemo(()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous),[t])}var KM=[" ","Enter","ArrowUp","ArrowDown"],$M=[" ","Enter"],Ka="Select",[du,hu,WM]=tm(Ka),[mi,Kj]=Bn(Ka,[WM,ga]),mu=ga(),[JM,xa]=mi(Ka),[eN,tN]=mi(Ka),vS=t=>{const{__scopeSelect:r,children:s,open:i,defaultOpen:l,onOpenChange:c,value:f,defaultValue:h,onValueChange:m,dir:p,name:v,autoComplete:x,disabled:_,required:E,form:R}=t,w=mu(r),[C,z]=y.useState(null),[O,U]=y.useState(null),[k,M]=y.useState(!1),Z=Yo(p),[F,I]=nr({prop:i,defaultProp:l??!1,onChange:c,caller:Ka}),[te,ie]=nr({prop:f,defaultProp:h,onChange:m,caller:Ka}),ge=y.useRef(null),ae=C?R||!!C.closest("form"):!0,[se,ce]=y.useState(new Set),pe=Array.from(se).map(j=>j.props.value).join(";");return g.jsx(Jc,{...w,children:g.jsxs(JM,{required:E,scope:r,trigger:C,onTriggerChange:z,valueNode:O,onValueNodeChange:U,valueNodeHasChildren:k,onValueNodeHasChildrenChange:M,contentId:zn(),value:te,onValueChange:ie,open:F,onOpenChange:I,dir:Z,triggerPointerDownPosRef:ge,disabled:_,children:[g.jsx(du.Provider,{scope:r,children:g.jsx(eN,{scope:t.__scopeSelect,onNativeOptionAdd:y.useCallback(j=>{ce(Q=>new Set(Q).add(j))},[]),onNativeOptionRemove:y.useCallback(j=>{ce(Q=>{const H=new Set(Q);return H.delete(j),H})},[]),children:s})}),ae?g.jsxs(LS,{"aria-hidden":!0,required:E,tabIndex:-1,name:v,autoComplete:x,value:te,onChange:j=>ie(j.target.value),disabled:_,form:R,children:[te===void 0?g.jsx("option",{value:""}):null,Array.from(se)]},pe):null]})})};vS.displayName=Ka;var gS="SelectTrigger",yS=y.forwardRef((t,r)=>{const{__scopeSelect:s,disabled:i=!1,...l}=t,c=mu(s),f=xa(gS,s),h=f.disabled||i,m=Ie(r,f.onTriggerChange),p=hu(s),v=y.useRef("touch"),[x,_,E]=BS(w=>{const C=p().filter(U=>!U.disabled),z=C.find(U=>U.value===f.value),O=HS(C,w,z);O!==void 0&&f.onValueChange(O.value)}),R=w=>{h||(f.onOpenChange(!0),E()),w&&(f.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return g.jsx(qo,{asChild:!0,...c,children:g.jsx(ke.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":VS(f.value)?"":void 0,...l,ref:m,onClick:me(l.onClick,w=>{w.currentTarget.focus(),v.current!=="mouse"&&R(w)}),onPointerDown:me(l.onPointerDown,w=>{v.current=w.pointerType;const C=w.target;C.hasPointerCapture(w.pointerId)&&C.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(R(w),w.preventDefault())}),onKeyDown:me(l.onKeyDown,w=>{const C=x.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&_(w.key),!(C&&w.key===" ")&&KM.includes(w.key)&&(R(),w.preventDefault())})})})});yS.displayName=gS;var bS="SelectValue",xS=y.forwardRef((t,r)=>{const{__scopeSelect:s,className:i,style:l,children:c,placeholder:f="",...h}=t,m=xa(bS,s),{onValueNodeHasChildrenChange:p}=m,v=c!==void 0,x=Ie(r,m.onValueNodeChange);return Ut(()=>{p(v)},[p,v]),g.jsx(ke.span,{...h,ref:x,style:{pointerEvents:"none"},children:VS(m.value)?g.jsx(g.Fragment,{children:f}):c})});xS.displayName=bS;var nN="SelectIcon",SS=y.forwardRef((t,r)=>{const{__scopeSelect:s,children:i,...l}=t;return g.jsx(ke.span,{"aria-hidden":!0,...l,ref:r,children:i||"▼"})});SS.displayName=nN;var rN="SelectPortal",_S=t=>g.jsx(hi,{asChild:!0,...t});_S.displayName=rN;var $a="SelectContent",wS=y.forwardRef((t,r)=>{const s=xa($a,t.__scopeSelect),[i,l]=y.useState();if(Ut(()=>{l(new DocumentFragment)},[]),!s.open){const c=i;return c?Bo.createPortal(g.jsx(ES,{scope:t.__scopeSelect,children:g.jsx(du.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),c):null}return g.jsx(CS,{...t,ref:r})});wS.displayName=$a;var Nn=10,[ES,Sa]=mi($a),aN="SelectContentImpl",sN=ua("SelectContent.RemoveScroll"),CS=y.forwardRef((t,r)=>{const{__scopeSelect:s,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:f,side:h,sideOffset:m,align:p,alignOffset:v,arrowPadding:x,collisionBoundary:_,collisionPadding:E,sticky:R,hideWhenDetached:w,avoidCollisions:C,...z}=t,O=xa($a,s),[U,k]=y.useState(null),[M,Z]=y.useState(null),F=Ie(r,ne=>k(ne)),[I,te]=y.useState(null),[ie,ge]=y.useState(null),ae=hu(s),[se,ce]=y.useState(!1),pe=y.useRef(!1);y.useEffect(()=>{if(U)return su(U)},[U]),au();const j=y.useCallback(ne=>{const[Te,...$e]=ae().map(We=>We.ref.current),[He]=$e.slice(-1),Ye=document.activeElement;for(const We of ne)if(We===Ye||(We?.scrollIntoView({block:"nearest"}),We===Te&&M&&(M.scrollTop=0),We===He&&M&&(M.scrollTop=M.scrollHeight),We?.focus(),document.activeElement!==Ye))return},[ae,M]),Q=y.useCallback(()=>j([I,U]),[j,I,U]);y.useEffect(()=>{se&&Q()},[se,Q]);const{onOpenChange:H,triggerPointerDownPosRef:J}=O;y.useEffect(()=>{if(U){let ne={x:0,y:0};const Te=He=>{ne={x:Math.abs(Math.round(He.pageX)-(J.current?.x??0)),y:Math.abs(Math.round(He.pageY)-(J.current?.y??0))}},$e=He=>{ne.x<=10&&ne.y<=10?He.preventDefault():U.contains(He.target)||H(!1),document.removeEventListener("pointermove",Te),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",Te),document.addEventListener("pointerup",$e,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Te),document.removeEventListener("pointerup",$e,{capture:!0})}}},[U,H,J]),y.useEffect(()=>{const ne=()=>H(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[H]);const[A,Y]=BS(ne=>{const Te=ae().filter(Ye=>!Ye.disabled),$e=Te.find(Ye=>Ye.ref.current===document.activeElement),He=HS(Te,ne,$e);He&&setTimeout(()=>He.ref.current.focus())}),oe=y.useCallback((ne,Te,$e)=>{const He=!pe.current&&!$e;(O.value!==void 0&&O.value===Te||He)&&(te(ne),He&&(pe.current=!0))},[O.value]),ee=y.useCallback(()=>U?.focus(),[U]),ue=y.useCallback((ne,Te,$e)=>{const He=!pe.current&&!$e;(O.value!==void 0&&O.value===Te||He)&&ge(ne)},[O.value]),Oe=i==="popper"?wh:TS,_e=Oe===wh?{side:h,sideOffset:m,align:p,alignOffset:v,arrowPadding:x,collisionBoundary:_,collisionPadding:E,sticky:R,hideWhenDetached:w,avoidCollisions:C}:{};return g.jsx(ES,{scope:s,content:U,viewport:M,onViewportChange:Z,itemRefCallback:oe,selectedItem:I,onItemLeave:ee,itemTextRefCallback:ue,focusSelectedItem:Q,selectedItemText:ie,position:i,isPositioned:se,searchRef:A,children:g.jsx(Io,{as:sN,allowPinchZoom:!0,children:g.jsx(Fo,{asChild:!0,trapped:O.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:me(l,ne=>{O.trigger?.focus({preventScroll:!0}),ne.preventDefault()}),children:g.jsx(ui,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:g.jsx(Oe,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:ne=>ne.preventDefault(),...z,..._e,onPlaced:()=>ce(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...z.style},onKeyDown:me(z.onKeyDown,ne=>{const Te=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!Te&&ne.key.length===1&&Y(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let He=ae().filter(Ye=>!Ye.disabled).map(Ye=>Ye.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(He=He.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Ye=ne.target,We=He.indexOf(Ye);He=He.slice(We+1)}setTimeout(()=>j(He)),ne.preventDefault()}})})})})})})});CS.displayName=aN;var iN="SelectItemAlignedPosition",TS=y.forwardRef((t,r)=>{const{__scopeSelect:s,onPlaced:i,...l}=t,c=xa($a,s),f=Sa($a,s),[h,m]=y.useState(null),[p,v]=y.useState(null),x=Ie(r,F=>v(F)),_=hu(s),E=y.useRef(!1),R=y.useRef(!0),{viewport:w,selectedItem:C,selectedItemText:z,focusSelectedItem:O}=f,U=y.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&p&&w&&C&&z){const F=c.trigger.getBoundingClientRect(),I=p.getBoundingClientRect(),te=c.valueNode.getBoundingClientRect(),ie=z.getBoundingClientRect();if(c.dir!=="rtl"){const Ye=ie.left-I.left,We=te.left-Ye,At=F.left-We,Xt=F.width+At,kr=Math.max(Xt,I.width),_a=window.innerWidth-Nn,Pt=_h(We,[Nn,Math.max(Nn,_a-kr)]);h.style.minWidth=Xt+"px",h.style.left=Pt+"px"}else{const Ye=I.right-ie.right,We=window.innerWidth-te.right-Ye,At=window.innerWidth-F.right-We,Xt=F.width+At,kr=Math.max(Xt,I.width),_a=window.innerWidth-Nn,Pt=_h(We,[Nn,Math.max(Nn,_a-kr)]);h.style.minWidth=Xt+"px",h.style.right=Pt+"px"}const ge=_(),ae=window.innerHeight-Nn*2,se=w.scrollHeight,ce=window.getComputedStyle(p),pe=parseInt(ce.borderTopWidth,10),j=parseInt(ce.paddingTop,10),Q=parseInt(ce.borderBottomWidth,10),H=parseInt(ce.paddingBottom,10),J=pe+j+se+H+Q,A=Math.min(C.offsetHeight*5,J),Y=window.getComputedStyle(w),oe=parseInt(Y.paddingTop,10),ee=parseInt(Y.paddingBottom,10),ue=F.top+F.height/2-Nn,Oe=ae-ue,_e=C.offsetHeight/2,ne=C.offsetTop+_e,Te=pe+j+ne,$e=J-Te;if(Te<=ue){const Ye=ge.length>0&&C===ge[ge.length-1].ref.current;h.style.bottom="0px";const We=p.clientHeight-w.offsetTop-w.offsetHeight,At=Math.max(Oe,_e+(Ye?ee:0)+We+Q),Xt=Te+At;h.style.height=Xt+"px"}else{const Ye=ge.length>0&&C===ge[0].ref.current;h.style.top="0px";const At=Math.max(ue,pe+w.offsetTop+(Ye?oe:0)+_e)+$e;h.style.height=At+"px",w.scrollTop=Te-ue+w.offsetTop}h.style.margin=`${Nn}px 0`,h.style.minHeight=A+"px",h.style.maxHeight=ae+"px",i?.(),requestAnimationFrame(()=>E.current=!0)}},[_,c.trigger,c.valueNode,h,p,w,C,z,c.dir,i]);Ut(()=>U(),[U]);const[k,M]=y.useState();Ut(()=>{p&&M(window.getComputedStyle(p).zIndex)},[p]);const Z=y.useCallback(F=>{F&&R.current===!0&&(U(),O?.(),R.current=!1)},[U,O]);return g.jsx(lN,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:E,onScrollButtonChange:Z,children:g.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:g.jsx(ke.div,{...l,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});TS.displayName=iN;var oN="SelectPopperPosition",wh=y.forwardRef((t,r)=>{const{__scopeSelect:s,align:i="start",collisionPadding:l=Nn,...c}=t,f=mu(s);return g.jsx(eu,{...f,...c,ref:r,align:i,collisionPadding:l,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});wh.displayName=oN;var[lN,mm]=mi($a,{}),Eh="SelectViewport",AS=y.forwardRef((t,r)=>{const{__scopeSelect:s,nonce:i,...l}=t,c=Sa(Eh,s),f=mm(Eh,s),h=Ie(r,c.onViewportChange),m=y.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),g.jsx(du.Slot,{scope:s,children:g.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:me(l.onScroll,p=>{const v=p.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:_}=f;if(_?.current&&x){const E=Math.abs(m.current-v.scrollTop);if(E>0){const R=window.innerHeight-Nn*2,w=parseFloat(x.style.minHeight),C=parseFloat(x.style.height),z=Math.max(w,C);if(z<R){const O=z+E,U=Math.min(R,O),k=O-U;x.style.height=U+"px",x.style.bottom==="0px"&&(v.scrollTop=k>0?k:0,x.style.justifyContent="flex-end")}}}m.current=v.scrollTop})})})]})});AS.displayName=Eh;var RS="SelectGroup",[cN,uN]=mi(RS),fN=y.forwardRef((t,r)=>{const{__scopeSelect:s,...i}=t,l=zn();return g.jsx(cN,{scope:s,id:l,children:g.jsx(ke.div,{role:"group","aria-labelledby":l,...i,ref:r})})});fN.displayName=RS;var OS="SelectLabel",dN=y.forwardRef((t,r)=>{const{__scopeSelect:s,...i}=t,l=uN(OS,s);return g.jsx(ke.div,{id:l.id,...i,ref:r})});dN.displayName=OS;var Lc="SelectItem",[hN,MS]=mi(Lc),NS=y.forwardRef((t,r)=>{const{__scopeSelect:s,value:i,disabled:l=!1,textValue:c,...f}=t,h=xa(Lc,s),m=Sa(Lc,s),p=h.value===i,[v,x]=y.useState(c??""),[_,E]=y.useState(!1),R=Ie(r,O=>m.itemRefCallback?.(O,i,l)),w=zn(),C=y.useRef("touch"),z=()=>{l||(h.onValueChange(i),h.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(hN,{scope:s,value:i,disabled:l,textId:w,isSelected:p,onItemTextChange:y.useCallback(O=>{x(U=>U||(O?.textContent??"").trim())},[]),children:g.jsx(du.ItemSlot,{scope:s,value:i,disabled:l,textValue:v,children:g.jsx(ke.div,{role:"option","aria-labelledby":w,"data-highlighted":_?"":void 0,"aria-selected":p&&_,"data-state":p?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...f,ref:R,onFocus:me(f.onFocus,()=>E(!0)),onBlur:me(f.onBlur,()=>E(!1)),onClick:me(f.onClick,()=>{C.current!=="mouse"&&z()}),onPointerUp:me(f.onPointerUp,()=>{C.current==="mouse"&&z()}),onPointerDown:me(f.onPointerDown,O=>{C.current=O.pointerType}),onPointerMove:me(f.onPointerMove,O=>{C.current=O.pointerType,l?m.onItemLeave?.():C.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(f.onPointerLeave,O=>{O.currentTarget===document.activeElement&&m.onItemLeave?.()}),onKeyDown:me(f.onKeyDown,O=>{m.searchRef?.current!==""&&O.key===" "||($M.includes(O.key)&&z(),O.key===" "&&O.preventDefault())})})})})});NS.displayName=Lc;var go="SelectItemText",DS=y.forwardRef((t,r)=>{const{__scopeSelect:s,className:i,style:l,...c}=t,f=xa(go,s),h=Sa(go,s),m=MS(go,s),p=tN(go,s),[v,x]=y.useState(null),_=Ie(r,z=>x(z),m.onItemTextChange,z=>h.itemTextRefCallback?.(z,m.value,m.disabled)),E=v?.textContent,R=y.useMemo(()=>g.jsx("option",{value:m.value,disabled:m.disabled,children:E},m.value),[m.disabled,m.value,E]),{onNativeOptionAdd:w,onNativeOptionRemove:C}=p;return Ut(()=>(w(R),()=>C(R)),[w,C,R]),g.jsxs(g.Fragment,{children:[g.jsx(ke.span,{id:m.textId,...c,ref:_}),m.isSelected&&f.valueNode&&!f.valueNodeHasChildren?Bo.createPortal(c.children,f.valueNode):null]})});DS.displayName=go;var jS="SelectItemIndicator",kS=y.forwardRef((t,r)=>{const{__scopeSelect:s,...i}=t;return MS(jS,s).isSelected?g.jsx(ke.span,{"aria-hidden":!0,...i,ref:r}):null});kS.displayName=jS;var Ch="SelectScrollUpButton",zS=y.forwardRef((t,r)=>{const s=Sa(Ch,t.__scopeSelect),i=mm(Ch,t.__scopeSelect),[l,c]=y.useState(!1),f=Ie(r,i.onScrollButtonChange);return Ut(()=>{if(s.viewport&&s.isPositioned){let h=function(){const p=m.scrollTop>0;c(p)};const m=s.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,s.isPositioned]),l?g.jsx(PS,{...t,ref:f,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=s;h&&m&&(h.scrollTop=h.scrollTop-m.offsetHeight)}}):null});zS.displayName=Ch;var Th="SelectScrollDownButton",US=y.forwardRef((t,r)=>{const s=Sa(Th,t.__scopeSelect),i=mm(Th,t.__scopeSelect),[l,c]=y.useState(!1),f=Ie(r,i.onScrollButtonChange);return Ut(()=>{if(s.viewport&&s.isPositioned){let h=function(){const p=m.scrollHeight-m.clientHeight,v=Math.ceil(m.scrollTop)<p;c(v)};const m=s.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,s.isPositioned]),l?g.jsx(PS,{...t,ref:f,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=s;h&&m&&(h.scrollTop=h.scrollTop+m.offsetHeight)}}):null});US.displayName=Th;var PS=y.forwardRef((t,r)=>{const{__scopeSelect:s,onAutoScroll:i,...l}=t,c=Sa("SelectScrollButton",s),f=y.useRef(null),h=hu(s),m=y.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return y.useEffect(()=>()=>m(),[m]),Ut(()=>{h().find(v=>v.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[h]),g.jsx(ke.div,{"aria-hidden":!0,...l,ref:r,style:{flexShrink:0,...l.style},onPointerDown:me(l.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(i,50))}),onPointerMove:me(l.onPointerMove,()=>{c.onItemLeave?.(),f.current===null&&(f.current=window.setInterval(i,50))}),onPointerLeave:me(l.onPointerLeave,()=>{m()})})}),mN="SelectSeparator",pN=y.forwardRef((t,r)=>{const{__scopeSelect:s,...i}=t;return g.jsx(ke.div,{"aria-hidden":!0,...i,ref:r})});pN.displayName=mN;var Ah="SelectArrow",vN=y.forwardRef((t,r)=>{const{__scopeSelect:s,...i}=t,l=mu(s),c=xa(Ah,s),f=Sa(Ah,s);return c.open&&f.position==="popper"?g.jsx(tu,{...l,...i,ref:r}):null});vN.displayName=Ah;var gN="SelectBubbleInput",LS=y.forwardRef(({__scopeSelect:t,value:r,...s},i)=>{const l=y.useRef(null),c=Ie(i,l),f=XM(r);return y.useEffect(()=>{const h=l.current;if(!h)return;const m=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(m,"value").set;if(f!==r&&v){const x=new Event("change",{bubbles:!0});v.call(h,r),h.dispatchEvent(x)}},[f,r]),g.jsx(ke.select,{...s,style:{...Gx,...s.style},ref:c,defaultValue:r})});LS.displayName=gN;function VS(t){return t===""||t===void 0}function BS(t){const r=zt(t),s=y.useRef(""),i=y.useRef(0),l=y.useCallback(f=>{const h=s.current+f;r(h),(function m(p){s.current=p,window.clearTimeout(i.current),p!==""&&(i.current=window.setTimeout(()=>m(""),1e3))})(h)},[r]),c=y.useCallback(()=>{s.current="",window.clearTimeout(i.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),[s,l,c]}function HS(t,r,s){const l=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,c=s?t.indexOf(s):-1;let f=yN(t,Math.max(c,0));l.length===1&&(f=f.filter(p=>p!==s));const m=f.find(p=>p.textValue.toLowerCase().startsWith(l.toLowerCase()));return m!==s?m:void 0}function yN(t,r){return t.map((s,i)=>t[(r+i)%t.length])}var bN=vS,xN=yS,SN=xS,_N=SS,wN=_S,EN=wS,CN=AS,TN=NS,AN=DS,RN=kS,ON=zS,MN=US;function Ob({...t}){return g.jsx(bN,{"data-slot":"select",...t})}function Mb({...t}){return g.jsx(SN,{"data-slot":"select-value",...t})}function Nb({className:t,size:r="default",children:s,...i}){return g.jsxs(xN,{"data-slot":"select-trigger","data-size":r,className:Ze("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...i,children:[s,g.jsx(_N,{asChild:!0,children:g.jsx(rx,{className:"size-4 opacity-50"})})]})}function Db({className:t,children:r,position:s="popper",...i}){return g.jsx(wN,{children:g.jsxs(EN,{"data-slot":"select-content",className:Ze("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:s,...i,children:[g.jsx(NN,{}),g.jsx(CN,{className:Ze("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),g.jsx(DN,{})]})})}function jb({className:t,children:r,...s}){return g.jsxs(TN,{"data-slot":"select-item",className:Ze("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...s,children:[g.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:g.jsx(RN,{children:g.jsx(WE,{className:"size-4"})})}),g.jsx(AN,{children:r})]})}function NN({className:t,...r}){return g.jsx(ON,{"data-slot":"select-scroll-up-button",className:Ze("flex cursor-default items-center justify-center py-1",t),...r,children:g.jsx(sC,{className:"size-4"})})}function DN({className:t,...r}){return g.jsx(MN,{"data-slot":"select-scroll-down-button",className:Ze("flex cursor-default items-center justify-center py-1",t),...r,children:g.jsx(rx,{className:"size-4"})})}function jN({className:t,...r}){return g.jsx("textarea",{"data-slot":"textarea",className:Ze("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...r})}var kN="Label",qS=y.forwardRef((t,r)=>g.jsx(ke.label,{...t,ref:r,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(t.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));qS.displayName=kN;var zN=qS;function UN({className:t,...r}){return g.jsx(zN,{"data-slot":"label",className:Ze("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}const PN=QO,GS=y.createContext({}),Cr=({...t})=>g.jsx(GS.Provider,{value:{name:t.name},children:g.jsx($O,{...t})}),pm=()=>{const t=y.useContext(GS),r=y.useContext(FS),{getFieldState:s}=uu(),i=B0({name:t.name}),l=s(t.name,i);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:c}=r;return{id:c,name:t.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...l}},FS=y.createContext({});function Tr({className:t,...r}){const s=y.useId();return g.jsx(FS.Provider,{value:{id:s},children:g.jsx("div",{"data-slot":"form-item",className:Ze("grid gap-2",t),...r})})}function Qn({className:t,...r}){const{error:s,formItemId:i}=pm();return g.jsx(UN,{"data-slot":"form-label","data-error":!!s,className:Ze("data-[error=true]:text-destructive",t),htmlFor:i,...r})}function oa({...t}){const{error:r,formItemId:s,formDescriptionId:i,formMessageId:l}=pm();return g.jsx(Bh,{"data-slot":"form-control",id:s,"aria-describedby":r?`${i} ${l}`:`${i}`,"aria-invalid":!!r,...t})}function Ar({className:t,...r}){const{error:s,formMessageId:i}=pm(),l=s?String(s?.message??""):r.children;return l?g.jsx("p",{"data-slot":"form-message",id:i,className:Ze("text-destructive text-sm",t),...r,children:l}):null}const LN=t=>{const{isLoading:r,refetch:s,...i}=oh({queryKey:["product",t?.id],queryFn:async()=>t?(await rE(300),await wn.apiRequest("get",t)):null});return{isLoading:r,refetch:s,...i}};var Ke;(function(t){t.assertEqual=l=>{};function r(l){}t.assertIs=r;function s(l){throw new Error}t.assertNever=s,t.arrayToEnum=l=>{const c={};for(const f of l)c[f]=f;return c},t.getValidEnumValues=l=>{const c=t.objectKeys(l).filter(h=>typeof l[l[h]]!="number"),f={};for(const h of c)f[h]=l[h];return t.objectValues(f)},t.objectValues=l=>t.objectKeys(l).map(function(c){return l[c]}),t.objectKeys=typeof Object.keys=="function"?l=>Object.keys(l):l=>{const c=[];for(const f in l)Object.prototype.hasOwnProperty.call(l,f)&&c.push(f);return c},t.find=(l,c)=>{for(const f of l)if(c(f))return f},t.isInteger=typeof Number.isInteger=="function"?l=>Number.isInteger(l):l=>typeof l=="number"&&Number.isFinite(l)&&Math.floor(l)===l;function i(l,c=" | "){return l.map(f=>typeof f=="string"?`'${f}'`:f).join(c)}t.joinValues=i,t.jsonStringifyReplacer=(l,c)=>typeof c=="bigint"?c.toString():c})(Ke||(Ke={}));var Rh;(function(t){t.mergeShapes=(r,s)=>({...r,...s})})(Rh||(Rh={}));const ye=Ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Or=t=>{switch(typeof t){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return Number.isNaN(t)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(t)?ye.array:t===null?ye.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ye.promise:typeof Map<"u"&&t instanceof Map?ye.map:typeof Set<"u"&&t instanceof Set?ye.set:typeof Date<"u"&&t instanceof Date?ye.date:ye.object;default:return ye.unknown}},re=Ke.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),VN=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class hn extends Error{get errors(){return this.issues}constructor(r){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=r}format(r){const s=r||function(c){return c.message},i={_errors:[]},l=c=>{for(const f of c.issues)if(f.code==="invalid_union")f.unionErrors.map(l);else if(f.code==="invalid_return_type")l(f.returnTypeError);else if(f.code==="invalid_arguments")l(f.argumentsError);else if(f.path.length===0)i._errors.push(s(f));else{let h=i,m=0;for(;m<f.path.length;){const p=f.path[m];m===f.path.length-1?(h[p]=h[p]||{_errors:[]},h[p]._errors.push(s(f))):h[p]=h[p]||{_errors:[]},h=h[p],m++}}};return l(this),i}static assert(r){if(!(r instanceof hn))throw new Error(`Not a ZodError: ${r}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ke.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=s=>s.message){const s={},i=[];for(const l of this.issues)if(l.path.length>0){const c=l.path[0];s[c]=s[c]||[],s[c].push(r(l))}else i.push(r(l));return{formErrors:i,fieldErrors:s}}get formErrors(){return this.flatten()}}hn.create=t=>new hn(t);const ri=(t,r)=>{let s;switch(t.code){case re.invalid_type:t.received===ye.undefined?s="Required":s=`Expected ${t.expected}, received ${t.received}`;break;case re.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(t.expected,Ke.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:s=`Unrecognized key(s) in object: ${Ke.joinValues(t.keys,", ")}`;break;case re.invalid_union:s="Invalid input";break;case re.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${Ke.joinValues(t.options)}`;break;case re.invalid_enum_value:s=`Invalid enum value. Expected ${Ke.joinValues(t.options)}, received '${t.received}'`;break;case re.invalid_arguments:s="Invalid function arguments";break;case re.invalid_return_type:s="Invalid function return type";break;case re.invalid_date:s="Invalid date";break;case re.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(s=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?s=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?s=`Invalid input: must end with "${t.validation.endsWith}"`:Ke.assertNever(t.validation):t.validation!=="regex"?s=`Invalid ${t.validation}`:s="Invalid";break;case re.too_small:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:s="Invalid input";break;case re.too_big:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?s=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:s="Invalid input";break;case re.custom:s="Invalid input";break;case re.invalid_intersection_types:s="Intersection results could not be merged";break;case re.not_multiple_of:s=`Number must be a multiple of ${t.multipleOf}`;break;case re.not_finite:s="Number must be finite";break;default:s=r.defaultError,Ke.assertNever(t)}return{message:s}};let IS=ri;function BN(t){IS=t}function Vc(){return IS}const Bc=t=>{const{data:r,path:s,errorMaps:i,issueData:l}=t,c=[...s,...l.path||[]],f={...l,path:c};if(l.message!==void 0)return{...l,path:c,message:l.message};let h="";const m=i.filter(p=>!!p).slice().reverse();for(const p of m)h=p(f,{data:r,defaultError:h}).message;return{...l,path:c,message:h}},HN=[];function he(t,r){const s=Vc(),i=Bc({issueData:r,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,s,s===ri?void 0:ri].filter(l=>!!l)});t.common.issues.push(i)}class Ht{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,s){const i=[];for(const l of s){if(l.status==="aborted")return Ne;l.status==="dirty"&&r.dirty(),i.push(l.value)}return{status:r.value,value:i}}static async mergeObjectAsync(r,s){const i=[];for(const l of s){const c=await l.key,f=await l.value;i.push({key:c,value:f})}return Ht.mergeObjectSync(r,i)}static mergeObjectSync(r,s){const i={};for(const l of s){const{key:c,value:f}=l;if(c.status==="aborted"||f.status==="aborted")return Ne;c.status==="dirty"&&r.dirty(),f.status==="dirty"&&r.dirty(),c.value!=="__proto__"&&(typeof f.value<"u"||l.alwaysSet)&&(i[c.value]=f.value)}return{status:r.value,value:i}}}const Ne=Object.freeze({status:"aborted"}),Ks=t=>({status:"dirty",value:t}),Yt=t=>({status:"valid",value:t}),Oh=t=>t.status==="aborted",Mh=t=>t.status==="dirty",Wa=t=>t.status==="valid",Co=t=>typeof Promise<"u"&&t instanceof Promise;var Ee;(function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message})(Ee||(Ee={}));class rr{constructor(r,s,i,l){this._cachedPath=[],this.parent=r,this.data=s,this._path=i,this._key=l}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const kb=(t,r)=>{if(Wa(r))return{success:!0,data:r.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new hn(t.common.issues);return this._error=s,this._error}}};function Ue(t){if(!t)return{};const{errorMap:r,invalid_type_error:s,required_error:i,description:l}=t;if(r&&(s||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return r?{errorMap:r,description:l}:{errorMap:(f,h)=>{const{message:m}=t;return f.code==="invalid_enum_value"?{message:m??h.defaultError}:typeof h.data>"u"?{message:m??i??h.defaultError}:f.code!=="invalid_type"?{message:h.defaultError}:{message:m??s??h.defaultError}},description:l}}class Le{get description(){return this._def.description}_getType(r){return Or(r.data)}_getOrReturnCtx(r,s){return s||{common:r.parent.common,data:r.data,parsedType:Or(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new Ht,ctx:{common:r.parent.common,data:r.data,parsedType:Or(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const s=this._parse(r);if(Co(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(r){const s=this._parse(r);return Promise.resolve(s)}parse(r,s){const i=this.safeParse(r,s);if(i.success)return i.data;throw i.error}safeParse(r,s){const i={common:{issues:[],async:s?.async??!1,contextualErrorMap:s?.errorMap},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Or(r)},l=this._parseSync({data:r,path:i.path,parent:i});return kb(i,l)}"~validate"(r){const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Or(r)};if(!this["~standard"].async)try{const i=this._parseSync({data:r,path:[],parent:s});return Wa(i)?{value:i.value}:{issues:s.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:r,path:[],parent:s}).then(i=>Wa(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(r,s){const i=await this.safeParseAsync(r,s);if(i.success)return i.data;throw i.error}async safeParseAsync(r,s){const i={common:{issues:[],contextualErrorMap:s?.errorMap,async:!0},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Or(r)},l=this._parse({data:r,path:i.path,parent:i}),c=await(Co(l)?l:Promise.resolve(l));return kb(i,c)}refine(r,s){const i=l=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(l):s;return this._refinement((l,c)=>{const f=r(l),h=()=>c.addIssue({code:re.custom,...i(l)});return typeof Promise<"u"&&f instanceof Promise?f.then(m=>m?!0:(h(),!1)):f?!0:(h(),!1)})}refinement(r,s){return this._refinement((i,l)=>r(i)?!0:(l.addIssue(typeof s=="function"?s(i,l):s),!1))}_refinement(r){return new Vn({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}constructor(r){this.spa=this.safeParseAsync,this._def=r,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return er.create(this,this._def)}nullable(){return va.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Un.create(this)}promise(){return si.create(this,this._def)}or(r){return Oo.create([this,r],this._def)}and(r){return Mo.create(this,r,this._def)}transform(r){return new Vn({...Ue(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:r}})}default(r){const s=typeof r=="function"?r:()=>r;return new zo({...Ue(this._def),innerType:this,defaultValue:s,typeName:De.ZodDefault})}brand(){return new vm({typeName:De.ZodBranded,type:this,...Ue(this._def)})}catch(r){const s=typeof r=="function"?r:()=>r;return new Uo({...Ue(this._def),innerType:this,catchValue:s,typeName:De.ZodCatch})}describe(r){const s=this.constructor;return new s({...this._def,description:r})}pipe(r){return Ko.create(this,r)}readonly(){return Po.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qN=/^c[^\s-]{8,}$/i,GN=/^[0-9a-z]+$/,FN=/^[0-9A-HJKMNP-TV-Z]{26}$/i,IN=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ZN=/^[a-z0-9_-]{21}$/i,YN=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,QN=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,XN=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,KN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let th;const $N=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,WN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,JN=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,eD=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nD=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ZS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rD=new RegExp(`^${ZS}$`);function YS(t){let r="[0-5]\\d";t.precision?r=`${r}\\.\\d{${t.precision}}`:t.precision==null&&(r=`${r}(\\.\\d+)?`);const s=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${r})${s}`}function aD(t){return new RegExp(`^${YS(t)}$`)}function QS(t){let r=`${ZS}T${YS(t)}`;const s=[];return s.push(t.local?"Z?":"Z"),t.offset&&s.push("([+-]\\d{2}:?\\d{2})"),r=`${r}(${s.join("|")})`,new RegExp(`^${r}$`)}function sD(t,r){return!!((r==="v4"||!r)&&$N.test(t)||(r==="v6"||!r)&&JN.test(t))}function iD(t,r){if(!YN.test(t))return!1;try{const[s]=t.split(".");if(!s)return!1;const i=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),l=JSON.parse(atob(i));return!(typeof l!="object"||l===null||"typ"in l&&l?.typ!=="JWT"||!l.alg||r&&l.alg!==r)}catch{return!1}}function oD(t,r){return!!((r==="v4"||!r)&&WN.test(t)||(r==="v6"||!r)&&eD.test(t))}class kn extends Le{_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==ye.string){const c=this._getOrReturnCtx(r);return he(c,{code:re.invalid_type,expected:ye.string,received:c.parsedType}),Ne}const i=new Ht;let l;for(const c of this._def.checks)if(c.kind==="min")r.data.length<c.value&&(l=this._getOrReturnCtx(r,l),he(l,{code:re.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),i.dirty());else if(c.kind==="max")r.data.length>c.value&&(l=this._getOrReturnCtx(r,l),he(l,{code:re.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),i.dirty());else if(c.kind==="length"){const f=r.data.length>c.value,h=r.data.length<c.value;(f||h)&&(l=this._getOrReturnCtx(r,l),f?he(l,{code:re.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):h&&he(l,{code:re.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),i.dirty())}else if(c.kind==="email")XN.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"email",code:re.invalid_string,message:c.message}),i.dirty());else if(c.kind==="emoji")th||(th=new RegExp(KN,"u")),th.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"emoji",code:re.invalid_string,message:c.message}),i.dirty());else if(c.kind==="uuid")IN.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"uuid",code:re.invalid_string,message:c.message}),i.dirty());else if(c.kind==="nanoid")ZN.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"nanoid",code:re.invalid_string,message:c.message}),i.dirty());else if(c.kind==="cuid")qN.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"cuid",code:re.invalid_string,message:c.message}),i.dirty());else if(c.kind==="cuid2")GN.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"cuid2",code:re.invalid_string,message:c.message}),i.dirty());else if(c.kind==="ulid")FN.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"ulid",code:re.invalid_string,message:c.message}),i.dirty());else if(c.kind==="url")try{new URL(r.data)}catch{l=this._getOrReturnCtx(r,l),he(l,{validation:"url",code:re.invalid_string,message:c.message}),i.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"regex",code:re.invalid_string,message:c.message}),i.dirty())):c.kind==="trim"?r.data=r.data.trim():c.kind==="includes"?r.data.includes(c.value,c.position)||(l=this._getOrReturnCtx(r,l),he(l,{code:re.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),i.dirty()):c.kind==="toLowerCase"?r.data=r.data.toLowerCase():c.kind==="toUpperCase"?r.data=r.data.toUpperCase():c.kind==="startsWith"?r.data.startsWith(c.value)||(l=this._getOrReturnCtx(r,l),he(l,{code:re.invalid_string,validation:{startsWith:c.value},message:c.message}),i.dirty()):c.kind==="endsWith"?r.data.endsWith(c.value)||(l=this._getOrReturnCtx(r,l),he(l,{code:re.invalid_string,validation:{endsWith:c.value},message:c.message}),i.dirty()):c.kind==="datetime"?QS(c).test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{code:re.invalid_string,validation:"datetime",message:c.message}),i.dirty()):c.kind==="date"?rD.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{code:re.invalid_string,validation:"date",message:c.message}),i.dirty()):c.kind==="time"?aD(c).test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{code:re.invalid_string,validation:"time",message:c.message}),i.dirty()):c.kind==="duration"?QN.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"duration",code:re.invalid_string,message:c.message}),i.dirty()):c.kind==="ip"?sD(r.data,c.version)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"ip",code:re.invalid_string,message:c.message}),i.dirty()):c.kind==="jwt"?iD(r.data,c.alg)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"jwt",code:re.invalid_string,message:c.message}),i.dirty()):c.kind==="cidr"?oD(r.data,c.version)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"cidr",code:re.invalid_string,message:c.message}),i.dirty()):c.kind==="base64"?tD.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"base64",code:re.invalid_string,message:c.message}),i.dirty()):c.kind==="base64url"?nD.test(r.data)||(l=this._getOrReturnCtx(r,l),he(l,{validation:"base64url",code:re.invalid_string,message:c.message}),i.dirty()):Ke.assertNever(c);return{status:i.value,value:r.data}}_regex(r,s,i){return this.refinement(l=>r.test(l),{validation:s,code:re.invalid_string,...Ee.errToObj(i)})}_addCheck(r){return new kn({...this._def,checks:[...this._def.checks,r]})}email(r){return this._addCheck({kind:"email",...Ee.errToObj(r)})}url(r){return this._addCheck({kind:"url",...Ee.errToObj(r)})}emoji(r){return this._addCheck({kind:"emoji",...Ee.errToObj(r)})}uuid(r){return this._addCheck({kind:"uuid",...Ee.errToObj(r)})}nanoid(r){return this._addCheck({kind:"nanoid",...Ee.errToObj(r)})}cuid(r){return this._addCheck({kind:"cuid",...Ee.errToObj(r)})}cuid2(r){return this._addCheck({kind:"cuid2",...Ee.errToObj(r)})}ulid(r){return this._addCheck({kind:"ulid",...Ee.errToObj(r)})}base64(r){return this._addCheck({kind:"base64",...Ee.errToObj(r)})}base64url(r){return this._addCheck({kind:"base64url",...Ee.errToObj(r)})}jwt(r){return this._addCheck({kind:"jwt",...Ee.errToObj(r)})}ip(r){return this._addCheck({kind:"ip",...Ee.errToObj(r)})}cidr(r){return this._addCheck({kind:"cidr",...Ee.errToObj(r)})}datetime(r){return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:r}):this._addCheck({kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:r?.offset??!1,local:r?.local??!1,...Ee.errToObj(r?.message)})}date(r){return this._addCheck({kind:"date",message:r})}time(r){return typeof r=="string"?this._addCheck({kind:"time",precision:null,message:r}):this._addCheck({kind:"time",precision:typeof r?.precision>"u"?null:r?.precision,...Ee.errToObj(r?.message)})}duration(r){return this._addCheck({kind:"duration",...Ee.errToObj(r)})}regex(r,s){return this._addCheck({kind:"regex",regex:r,...Ee.errToObj(s)})}includes(r,s){return this._addCheck({kind:"includes",value:r,position:s?.position,...Ee.errToObj(s?.message)})}startsWith(r,s){return this._addCheck({kind:"startsWith",value:r,...Ee.errToObj(s)})}endsWith(r,s){return this._addCheck({kind:"endsWith",value:r,...Ee.errToObj(s)})}min(r,s){return this._addCheck({kind:"min",value:r,...Ee.errToObj(s)})}max(r,s){return this._addCheck({kind:"max",value:r,...Ee.errToObj(s)})}length(r,s){return this._addCheck({kind:"length",value:r,...Ee.errToObj(s)})}nonempty(r){return this.min(1,Ee.errToObj(r))}trim(){return new kn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new kn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new kn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(r=>r.kind==="datetime")}get isDate(){return!!this._def.checks.find(r=>r.kind==="date")}get isTime(){return!!this._def.checks.find(r=>r.kind==="time")}get isDuration(){return!!this._def.checks.find(r=>r.kind==="duration")}get isEmail(){return!!this._def.checks.find(r=>r.kind==="email")}get isURL(){return!!this._def.checks.find(r=>r.kind==="url")}get isEmoji(){return!!this._def.checks.find(r=>r.kind==="emoji")}get isUUID(){return!!this._def.checks.find(r=>r.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(r=>r.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(r=>r.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(r=>r.kind==="cuid2")}get isULID(){return!!this._def.checks.find(r=>r.kind==="ulid")}get isIP(){return!!this._def.checks.find(r=>r.kind==="ip")}get isCIDR(){return!!this._def.checks.find(r=>r.kind==="cidr")}get isBase64(){return!!this._def.checks.find(r=>r.kind==="base64")}get isBase64url(){return!!this._def.checks.find(r=>r.kind==="base64url")}get minLength(){let r=null;for(const s of this._def.checks)s.kind==="min"&&(r===null||s.value>r)&&(r=s.value);return r}get maxLength(){let r=null;for(const s of this._def.checks)s.kind==="max"&&(r===null||s.value<r)&&(r=s.value);return r}}kn.create=t=>new kn({checks:[],typeName:De.ZodString,coerce:t?.coerce??!1,...Ue(t)});function lD(t,r){const s=(t.toString().split(".")[1]||"").length,i=(r.toString().split(".")[1]||"").length,l=s>i?s:i,c=Number.parseInt(t.toFixed(l).replace(".","")),f=Number.parseInt(r.toFixed(l).replace(".",""));return c%f/10**l}class ha extends Le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==ye.number){const c=this._getOrReturnCtx(r);return he(c,{code:re.invalid_type,expected:ye.number,received:c.parsedType}),Ne}let i;const l=new Ht;for(const c of this._def.checks)c.kind==="int"?Ke.isInteger(r.data)||(i=this._getOrReturnCtx(r,i),he(i,{code:re.invalid_type,expected:"integer",received:"float",message:c.message}),l.dirty()):c.kind==="min"?(c.inclusive?r.data<c.value:r.data<=c.value)&&(i=this._getOrReturnCtx(r,i),he(i,{code:re.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),l.dirty()):c.kind==="max"?(c.inclusive?r.data>c.value:r.data>=c.value)&&(i=this._getOrReturnCtx(r,i),he(i,{code:re.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),l.dirty()):c.kind==="multipleOf"?lD(r.data,c.value)!==0&&(i=this._getOrReturnCtx(r,i),he(i,{code:re.not_multiple_of,multipleOf:c.value,message:c.message}),l.dirty()):c.kind==="finite"?Number.isFinite(r.data)||(i=this._getOrReturnCtx(r,i),he(i,{code:re.not_finite,message:c.message}),l.dirty()):Ke.assertNever(c);return{status:l.value,value:r.data}}gte(r,s){return this.setLimit("min",r,!0,Ee.toString(s))}gt(r,s){return this.setLimit("min",r,!1,Ee.toString(s))}lte(r,s){return this.setLimit("max",r,!0,Ee.toString(s))}lt(r,s){return this.setLimit("max",r,!1,Ee.toString(s))}setLimit(r,s,i,l){return new ha({...this._def,checks:[...this._def.checks,{kind:r,value:s,inclusive:i,message:Ee.toString(l)}]})}_addCheck(r){return new ha({...this._def,checks:[...this._def.checks,r]})}int(r){return this._addCheck({kind:"int",message:Ee.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ee.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ee.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ee.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ee.toString(r)})}multipleOf(r,s){return this._addCheck({kind:"multipleOf",value:r,message:Ee.toString(s)})}finite(r){return this._addCheck({kind:"finite",message:Ee.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ee.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ee.toString(r)})}get minValue(){let r=null;for(const s of this._def.checks)s.kind==="min"&&(r===null||s.value>r)&&(r=s.value);return r}get maxValue(){let r=null;for(const s of this._def.checks)s.kind==="max"&&(r===null||s.value<r)&&(r=s.value);return r}get isInt(){return!!this._def.checks.find(r=>r.kind==="int"||r.kind==="multipleOf"&&Ke.isInteger(r.value))}get isFinite(){let r=null,s=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(s===null||i.value>s)&&(s=i.value):i.kind==="max"&&(r===null||i.value<r)&&(r=i.value)}return Number.isFinite(s)&&Number.isFinite(r)}}ha.create=t=>new ha({checks:[],typeName:De.ZodNumber,coerce:t?.coerce||!1,...Ue(t)});class ma extends Le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce)try{r.data=BigInt(r.data)}catch{return this._getInvalidInput(r)}if(this._getType(r)!==ye.bigint)return this._getInvalidInput(r);let i;const l=new Ht;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?r.data<c.value:r.data<=c.value)&&(i=this._getOrReturnCtx(r,i),he(i,{code:re.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),l.dirty()):c.kind==="max"?(c.inclusive?r.data>c.value:r.data>=c.value)&&(i=this._getOrReturnCtx(r,i),he(i,{code:re.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),l.dirty()):c.kind==="multipleOf"?r.data%c.value!==BigInt(0)&&(i=this._getOrReturnCtx(r,i),he(i,{code:re.not_multiple_of,multipleOf:c.value,message:c.message}),l.dirty()):Ke.assertNever(c);return{status:l.value,value:r.data}}_getInvalidInput(r){const s=this._getOrReturnCtx(r);return he(s,{code:re.invalid_type,expected:ye.bigint,received:s.parsedType}),Ne}gte(r,s){return this.setLimit("min",r,!0,Ee.toString(s))}gt(r,s){return this.setLimit("min",r,!1,Ee.toString(s))}lte(r,s){return this.setLimit("max",r,!0,Ee.toString(s))}lt(r,s){return this.setLimit("max",r,!1,Ee.toString(s))}setLimit(r,s,i,l){return new ma({...this._def,checks:[...this._def.checks,{kind:r,value:s,inclusive:i,message:Ee.toString(l)}]})}_addCheck(r){return new ma({...this._def,checks:[...this._def.checks,r]})}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ee.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ee.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ee.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ee.toString(r)})}multipleOf(r,s){return this._addCheck({kind:"multipleOf",value:r,message:Ee.toString(s)})}get minValue(){let r=null;for(const s of this._def.checks)s.kind==="min"&&(r===null||s.value>r)&&(r=s.value);return r}get maxValue(){let r=null;for(const s of this._def.checks)s.kind==="max"&&(r===null||s.value<r)&&(r=s.value);return r}}ma.create=t=>new ma({checks:[],typeName:De.ZodBigInt,coerce:t?.coerce??!1,...Ue(t)});class To extends Le{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==ye.boolean){const i=this._getOrReturnCtx(r);return he(i,{code:re.invalid_type,expected:ye.boolean,received:i.parsedType}),Ne}return Yt(r.data)}}To.create=t=>new To({typeName:De.ZodBoolean,coerce:t?.coerce||!1,...Ue(t)});class Ja extends Le{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==ye.date){const c=this._getOrReturnCtx(r);return he(c,{code:re.invalid_type,expected:ye.date,received:c.parsedType}),Ne}if(Number.isNaN(r.data.getTime())){const c=this._getOrReturnCtx(r);return he(c,{code:re.invalid_date}),Ne}const i=new Ht;let l;for(const c of this._def.checks)c.kind==="min"?r.data.getTime()<c.value&&(l=this._getOrReturnCtx(r,l),he(l,{code:re.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),i.dirty()):c.kind==="max"?r.data.getTime()>c.value&&(l=this._getOrReturnCtx(r,l),he(l,{code:re.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),i.dirty()):Ke.assertNever(c);return{status:i.value,value:new Date(r.data.getTime())}}_addCheck(r){return new Ja({...this._def,checks:[...this._def.checks,r]})}min(r,s){return this._addCheck({kind:"min",value:r.getTime(),message:Ee.toString(s)})}max(r,s){return this._addCheck({kind:"max",value:r.getTime(),message:Ee.toString(s)})}get minDate(){let r=null;for(const s of this._def.checks)s.kind==="min"&&(r===null||s.value>r)&&(r=s.value);return r!=null?new Date(r):null}get maxDate(){let r=null;for(const s of this._def.checks)s.kind==="max"&&(r===null||s.value<r)&&(r=s.value);return r!=null?new Date(r):null}}Ja.create=t=>new Ja({checks:[],coerce:t?.coerce||!1,typeName:De.ZodDate,...Ue(t)});class Hc extends Le{_parse(r){if(this._getType(r)!==ye.symbol){const i=this._getOrReturnCtx(r);return he(i,{code:re.invalid_type,expected:ye.symbol,received:i.parsedType}),Ne}return Yt(r.data)}}Hc.create=t=>new Hc({typeName:De.ZodSymbol,...Ue(t)});class Ao extends Le{_parse(r){if(this._getType(r)!==ye.undefined){const i=this._getOrReturnCtx(r);return he(i,{code:re.invalid_type,expected:ye.undefined,received:i.parsedType}),Ne}return Yt(r.data)}}Ao.create=t=>new Ao({typeName:De.ZodUndefined,...Ue(t)});class Ro extends Le{_parse(r){if(this._getType(r)!==ye.null){const i=this._getOrReturnCtx(r);return he(i,{code:re.invalid_type,expected:ye.null,received:i.parsedType}),Ne}return Yt(r.data)}}Ro.create=t=>new Ro({typeName:De.ZodNull,...Ue(t)});class ai extends Le{constructor(){super(...arguments),this._any=!0}_parse(r){return Yt(r.data)}}ai.create=t=>new ai({typeName:De.ZodAny,...Ue(t)});class Ia extends Le{constructor(){super(...arguments),this._unknown=!0}_parse(r){return Yt(r.data)}}Ia.create=t=>new Ia({typeName:De.ZodUnknown,...Ue(t)});class jr extends Le{_parse(r){const s=this._getOrReturnCtx(r);return he(s,{code:re.invalid_type,expected:ye.never,received:s.parsedType}),Ne}}jr.create=t=>new jr({typeName:De.ZodNever,...Ue(t)});class qc extends Le{_parse(r){if(this._getType(r)!==ye.undefined){const i=this._getOrReturnCtx(r);return he(i,{code:re.invalid_type,expected:ye.void,received:i.parsedType}),Ne}return Yt(r.data)}}qc.create=t=>new qc({typeName:De.ZodVoid,...Ue(t)});class Un extends Le{_parse(r){const{ctx:s,status:i}=this._processInputParams(r),l=this._def;if(s.parsedType!==ye.array)return he(s,{code:re.invalid_type,expected:ye.array,received:s.parsedType}),Ne;if(l.exactLength!==null){const f=s.data.length>l.exactLength.value,h=s.data.length<l.exactLength.value;(f||h)&&(he(s,{code:f?re.too_big:re.too_small,minimum:h?l.exactLength.value:void 0,maximum:f?l.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:l.exactLength.message}),i.dirty())}if(l.minLength!==null&&s.data.length<l.minLength.value&&(he(s,{code:re.too_small,minimum:l.minLength.value,type:"array",inclusive:!0,exact:!1,message:l.minLength.message}),i.dirty()),l.maxLength!==null&&s.data.length>l.maxLength.value&&(he(s,{code:re.too_big,maximum:l.maxLength.value,type:"array",inclusive:!0,exact:!1,message:l.maxLength.message}),i.dirty()),s.common.async)return Promise.all([...s.data].map((f,h)=>l.type._parseAsync(new rr(s,f,s.path,h)))).then(f=>Ht.mergeArray(i,f));const c=[...s.data].map((f,h)=>l.type._parseSync(new rr(s,f,s.path,h)));return Ht.mergeArray(i,c)}get element(){return this._def.type}min(r,s){return new Un({...this._def,minLength:{value:r,message:Ee.toString(s)}})}max(r,s){return new Un({...this._def,maxLength:{value:r,message:Ee.toString(s)}})}length(r,s){return new Un({...this._def,exactLength:{value:r,message:Ee.toString(s)}})}nonempty(r){return this.min(1,r)}}Un.create=(t,r)=>new Un({type:t,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...Ue(r)});function Xs(t){if(t instanceof dt){const r={};for(const s in t.shape){const i=t.shape[s];r[s]=er.create(Xs(i))}return new dt({...t._def,shape:()=>r})}else return t instanceof Un?new Un({...t._def,type:Xs(t.element)}):t instanceof er?er.create(Xs(t.unwrap())):t instanceof va?va.create(Xs(t.unwrap())):t instanceof ar?ar.create(t.items.map(r=>Xs(r))):t}class dt extends Le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const r=this._def.shape(),s=Ke.objectKeys(r);return this._cached={shape:r,keys:s},this._cached}_parse(r){if(this._getType(r)!==ye.object){const p=this._getOrReturnCtx(r);return he(p,{code:re.invalid_type,expected:ye.object,received:p.parsedType}),Ne}const{status:i,ctx:l}=this._processInputParams(r),{shape:c,keys:f}=this._getCached(),h=[];if(!(this._def.catchall instanceof jr&&this._def.unknownKeys==="strip"))for(const p in l.data)f.includes(p)||h.push(p);const m=[];for(const p of f){const v=c[p],x=l.data[p];m.push({key:{status:"valid",value:p},value:v._parse(new rr(l,x,l.path,p)),alwaysSet:p in l.data})}if(this._def.catchall instanceof jr){const p=this._def.unknownKeys;if(p==="passthrough")for(const v of h)m.push({key:{status:"valid",value:v},value:{status:"valid",value:l.data[v]}});else if(p==="strict")h.length>0&&(he(l,{code:re.unrecognized_keys,keys:h}),i.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const v of h){const x=l.data[v];m.push({key:{status:"valid",value:v},value:p._parse(new rr(l,x,l.path,v)),alwaysSet:v in l.data})}}return l.common.async?Promise.resolve().then(async()=>{const p=[];for(const v of m){const x=await v.key,_=await v.value;p.push({key:x,value:_,alwaysSet:v.alwaysSet})}return p}).then(p=>Ht.mergeObjectSync(i,p)):Ht.mergeObjectSync(i,m)}get shape(){return this._def.shape()}strict(r){return Ee.errToObj,new dt({...this._def,unknownKeys:"strict",...r!==void 0?{errorMap:(s,i)=>{const l=this._def.errorMap?.(s,i).message??i.defaultError;return s.code==="unrecognized_keys"?{message:Ee.errToObj(r).message??l}:{message:l}}}:{}})}strip(){return new dt({...this._def,unknownKeys:"strip"})}passthrough(){return new dt({...this._def,unknownKeys:"passthrough"})}extend(r){return new dt({...this._def,shape:()=>({...this._def.shape(),...r})})}merge(r){return new dt({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>({...this._def.shape(),...r._def.shape()}),typeName:De.ZodObject})}setKey(r,s){return this.augment({[r]:s})}catchall(r){return new dt({...this._def,catchall:r})}pick(r){const s={};for(const i of Ke.objectKeys(r))r[i]&&this.shape[i]&&(s[i]=this.shape[i]);return new dt({...this._def,shape:()=>s})}omit(r){const s={};for(const i of Ke.objectKeys(this.shape))r[i]||(s[i]=this.shape[i]);return new dt({...this._def,shape:()=>s})}deepPartial(){return Xs(this)}partial(r){const s={};for(const i of Ke.objectKeys(this.shape)){const l=this.shape[i];r&&!r[i]?s[i]=l:s[i]=l.optional()}return new dt({...this._def,shape:()=>s})}required(r){const s={};for(const i of Ke.objectKeys(this.shape))if(r&&!r[i])s[i]=this.shape[i];else{let c=this.shape[i];for(;c instanceof er;)c=c._def.innerType;s[i]=c}return new dt({...this._def,shape:()=>s})}keyof(){return XS(Ke.objectKeys(this.shape))}}dt.create=(t,r)=>new dt({shape:()=>t,unknownKeys:"strip",catchall:jr.create(),typeName:De.ZodObject,...Ue(r)});dt.strictCreate=(t,r)=>new dt({shape:()=>t,unknownKeys:"strict",catchall:jr.create(),typeName:De.ZodObject,...Ue(r)});dt.lazycreate=(t,r)=>new dt({shape:t,unknownKeys:"strip",catchall:jr.create(),typeName:De.ZodObject,...Ue(r)});class Oo extends Le{_parse(r){const{ctx:s}=this._processInputParams(r),i=this._def.options;function l(c){for(const h of c)if(h.result.status==="valid")return h.result;for(const h of c)if(h.result.status==="dirty")return s.common.issues.push(...h.ctx.common.issues),h.result;const f=c.map(h=>new hn(h.ctx.common.issues));return he(s,{code:re.invalid_union,unionErrors:f}),Ne}if(s.common.async)return Promise.all(i.map(async c=>{const f={...s,common:{...s.common,issues:[]},parent:null};return{result:await c._parseAsync({data:s.data,path:s.path,parent:f}),ctx:f}})).then(l);{let c;const f=[];for(const m of i){const p={...s,common:{...s.common,issues:[]},parent:null},v=m._parseSync({data:s.data,path:s.path,parent:p});if(v.status==="valid")return v;v.status==="dirty"&&!c&&(c={result:v,ctx:p}),p.common.issues.length&&f.push(p.common.issues)}if(c)return s.common.issues.push(...c.ctx.common.issues),c.result;const h=f.map(m=>new hn(m));return he(s,{code:re.invalid_union,unionErrors:h}),Ne}}get options(){return this._def.options}}Oo.create=(t,r)=>new Oo({options:t,typeName:De.ZodUnion,...Ue(r)});const Rr=t=>t instanceof Do?Rr(t.schema):t instanceof Vn?Rr(t.innerType()):t instanceof jo?[t.value]:t instanceof pa?t.options:t instanceof ko?Ke.objectValues(t.enum):t instanceof zo?Rr(t._def.innerType):t instanceof Ao?[void 0]:t instanceof Ro?[null]:t instanceof er?[void 0,...Rr(t.unwrap())]:t instanceof va?[null,...Rr(t.unwrap())]:t instanceof vm||t instanceof Po?Rr(t.unwrap()):t instanceof Uo?Rr(t._def.innerType):[];class pu extends Le{_parse(r){const{ctx:s}=this._processInputParams(r);if(s.parsedType!==ye.object)return he(s,{code:re.invalid_type,expected:ye.object,received:s.parsedType}),Ne;const i=this.discriminator,l=s.data[i],c=this.optionsMap.get(l);return c?s.common.async?c._parseAsync({data:s.data,path:s.path,parent:s}):c._parseSync({data:s.data,path:s.path,parent:s}):(he(s,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Ne)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(r,s,i){const l=new Map;for(const c of s){const f=Rr(c.shape[r]);if(!f.length)throw new Error(`A discriminator value for key \`${r}\` could not be extracted from all schema options`);for(const h of f){if(l.has(h))throw new Error(`Discriminator property ${String(r)} has duplicate value ${String(h)}`);l.set(h,c)}}return new pu({typeName:De.ZodDiscriminatedUnion,discriminator:r,options:s,optionsMap:l,...Ue(i)})}}function Nh(t,r){const s=Or(t),i=Or(r);if(t===r)return{valid:!0,data:t};if(s===ye.object&&i===ye.object){const l=Ke.objectKeys(r),c=Ke.objectKeys(t).filter(h=>l.indexOf(h)!==-1),f={...t,...r};for(const h of c){const m=Nh(t[h],r[h]);if(!m.valid)return{valid:!1};f[h]=m.data}return{valid:!0,data:f}}else if(s===ye.array&&i===ye.array){if(t.length!==r.length)return{valid:!1};const l=[];for(let c=0;c<t.length;c++){const f=t[c],h=r[c],m=Nh(f,h);if(!m.valid)return{valid:!1};l.push(m.data)}return{valid:!0,data:l}}else return s===ye.date&&i===ye.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}class Mo extends Le{_parse(r){const{status:s,ctx:i}=this._processInputParams(r),l=(c,f)=>{if(Oh(c)||Oh(f))return Ne;const h=Nh(c.value,f.value);return h.valid?((Mh(c)||Mh(f))&&s.dirty(),{status:s.value,value:h.data}):(he(i,{code:re.invalid_intersection_types}),Ne)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([c,f])=>l(c,f)):l(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Mo.create=(t,r,s)=>new Mo({left:t,right:r,typeName:De.ZodIntersection,...Ue(s)});class ar extends Le{_parse(r){const{status:s,ctx:i}=this._processInputParams(r);if(i.parsedType!==ye.array)return he(i,{code:re.invalid_type,expected:ye.array,received:i.parsedType}),Ne;if(i.data.length<this._def.items.length)return he(i,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ne;!this._def.rest&&i.data.length>this._def.items.length&&(he(i,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const c=[...i.data].map((f,h)=>{const m=this._def.items[h]||this._def.rest;return m?m._parse(new rr(i,f,i.path,h)):null}).filter(f=>!!f);return i.common.async?Promise.all(c).then(f=>Ht.mergeArray(s,f)):Ht.mergeArray(s,c)}get items(){return this._def.items}rest(r){return new ar({...this._def,rest:r})}}ar.create=(t,r)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ar({items:t,typeName:De.ZodTuple,rest:null,...Ue(r)})};class No extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:s,ctx:i}=this._processInputParams(r);if(i.parsedType!==ye.object)return he(i,{code:re.invalid_type,expected:ye.object,received:i.parsedType}),Ne;const l=[],c=this._def.keyType,f=this._def.valueType;for(const h in i.data)l.push({key:c._parse(new rr(i,h,i.path,h)),value:f._parse(new rr(i,i.data[h],i.path,h)),alwaysSet:h in i.data});return i.common.async?Ht.mergeObjectAsync(s,l):Ht.mergeObjectSync(s,l)}get element(){return this._def.valueType}static create(r,s,i){return s instanceof Le?new No({keyType:r,valueType:s,typeName:De.ZodRecord,...Ue(i)}):new No({keyType:kn.create(),valueType:r,typeName:De.ZodRecord,...Ue(s)})}}class Gc extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:s,ctx:i}=this._processInputParams(r);if(i.parsedType!==ye.map)return he(i,{code:re.invalid_type,expected:ye.map,received:i.parsedType}),Ne;const l=this._def.keyType,c=this._def.valueType,f=[...i.data.entries()].map(([h,m],p)=>({key:l._parse(new rr(i,h,i.path,[p,"key"])),value:c._parse(new rr(i,m,i.path,[p,"value"]))}));if(i.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const m of f){const p=await m.key,v=await m.value;if(p.status==="aborted"||v.status==="aborted")return Ne;(p.status==="dirty"||v.status==="dirty")&&s.dirty(),h.set(p.value,v.value)}return{status:s.value,value:h}})}else{const h=new Map;for(const m of f){const p=m.key,v=m.value;if(p.status==="aborted"||v.status==="aborted")return Ne;(p.status==="dirty"||v.status==="dirty")&&s.dirty(),h.set(p.value,v.value)}return{status:s.value,value:h}}}}Gc.create=(t,r,s)=>new Gc({valueType:r,keyType:t,typeName:De.ZodMap,...Ue(s)});class es extends Le{_parse(r){const{status:s,ctx:i}=this._processInputParams(r);if(i.parsedType!==ye.set)return he(i,{code:re.invalid_type,expected:ye.set,received:i.parsedType}),Ne;const l=this._def;l.minSize!==null&&i.data.size<l.minSize.value&&(he(i,{code:re.too_small,minimum:l.minSize.value,type:"set",inclusive:!0,exact:!1,message:l.minSize.message}),s.dirty()),l.maxSize!==null&&i.data.size>l.maxSize.value&&(he(i,{code:re.too_big,maximum:l.maxSize.value,type:"set",inclusive:!0,exact:!1,message:l.maxSize.message}),s.dirty());const c=this._def.valueType;function f(m){const p=new Set;for(const v of m){if(v.status==="aborted")return Ne;v.status==="dirty"&&s.dirty(),p.add(v.value)}return{status:s.value,value:p}}const h=[...i.data.values()].map((m,p)=>c._parse(new rr(i,m,i.path,p)));return i.common.async?Promise.all(h).then(m=>f(m)):f(h)}min(r,s){return new es({...this._def,minSize:{value:r,message:Ee.toString(s)}})}max(r,s){return new es({...this._def,maxSize:{value:r,message:Ee.toString(s)}})}size(r,s){return this.min(r,s).max(r,s)}nonempty(r){return this.min(1,r)}}es.create=(t,r)=>new es({valueType:t,minSize:null,maxSize:null,typeName:De.ZodSet,...Ue(r)});class Js extends Le{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:s}=this._processInputParams(r);if(s.parsedType!==ye.function)return he(s,{code:re.invalid_type,expected:ye.function,received:s.parsedType}),Ne;function i(h,m){return Bc({data:h,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,Vc(),ri].filter(p=>!!p),issueData:{code:re.invalid_arguments,argumentsError:m}})}function l(h,m){return Bc({data:h,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,Vc(),ri].filter(p=>!!p),issueData:{code:re.invalid_return_type,returnTypeError:m}})}const c={errorMap:s.common.contextualErrorMap},f=s.data;if(this._def.returns instanceof si){const h=this;return Yt(async function(...m){const p=new hn([]),v=await h._def.args.parseAsync(m,c).catch(E=>{throw p.addIssue(i(m,E)),p}),x=await Reflect.apply(f,this,v);return await h._def.returns._def.type.parseAsync(x,c).catch(E=>{throw p.addIssue(l(x,E)),p})})}else{const h=this;return Yt(function(...m){const p=h._def.args.safeParse(m,c);if(!p.success)throw new hn([i(m,p.error)]);const v=Reflect.apply(f,this,p.data),x=h._def.returns.safeParse(v,c);if(!x.success)throw new hn([l(v,x.error)]);return x.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...r){return new Js({...this._def,args:ar.create(r).rest(Ia.create())})}returns(r){return new Js({...this._def,returns:r})}implement(r){return this.parse(r)}strictImplement(r){return this.parse(r)}static create(r,s,i){return new Js({args:r||ar.create([]).rest(Ia.create()),returns:s||Ia.create(),typeName:De.ZodFunction,...Ue(i)})}}class Do extends Le{get schema(){return this._def.getter()}_parse(r){const{ctx:s}=this._processInputParams(r);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}Do.create=(t,r)=>new Do({getter:t,typeName:De.ZodLazy,...Ue(r)});class jo extends Le{_parse(r){if(r.data!==this._def.value){const s=this._getOrReturnCtx(r);return he(s,{received:s.data,code:re.invalid_literal,expected:this._def.value}),Ne}return{status:"valid",value:r.data}}get value(){return this._def.value}}jo.create=(t,r)=>new jo({value:t,typeName:De.ZodLiteral,...Ue(r)});function XS(t,r){return new pa({values:t,typeName:De.ZodEnum,...Ue(r)})}class pa extends Le{_parse(r){if(typeof r.data!="string"){const s=this._getOrReturnCtx(r),i=this._def.values;return he(s,{expected:Ke.joinValues(i),received:s.parsedType,code:re.invalid_type}),Ne}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(r.data)){const s=this._getOrReturnCtx(r),i=this._def.values;return he(s,{received:s.data,code:re.invalid_enum_value,options:i}),Ne}return Yt(r.data)}get options(){return this._def.values}get enum(){const r={};for(const s of this._def.values)r[s]=s;return r}get Values(){const r={};for(const s of this._def.values)r[s]=s;return r}get Enum(){const r={};for(const s of this._def.values)r[s]=s;return r}extract(r,s=this._def){return pa.create(r,{...this._def,...s})}exclude(r,s=this._def){return pa.create(this.options.filter(i=>!r.includes(i)),{...this._def,...s})}}pa.create=XS;class ko extends Le{_parse(r){const s=Ke.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(r);if(i.parsedType!==ye.string&&i.parsedType!==ye.number){const l=Ke.objectValues(s);return he(i,{expected:Ke.joinValues(l),received:i.parsedType,code:re.invalid_type}),Ne}if(this._cache||(this._cache=new Set(Ke.getValidEnumValues(this._def.values))),!this._cache.has(r.data)){const l=Ke.objectValues(s);return he(i,{received:i.data,code:re.invalid_enum_value,options:l}),Ne}return Yt(r.data)}get enum(){return this._def.values}}ko.create=(t,r)=>new ko({values:t,typeName:De.ZodNativeEnum,...Ue(r)});class si extends Le{unwrap(){return this._def.type}_parse(r){const{ctx:s}=this._processInputParams(r);if(s.parsedType!==ye.promise&&s.common.async===!1)return he(s,{code:re.invalid_type,expected:ye.promise,received:s.parsedType}),Ne;const i=s.parsedType===ye.promise?s.data:Promise.resolve(s.data);return Yt(i.then(l=>this._def.type.parseAsync(l,{path:s.path,errorMap:s.common.contextualErrorMap})))}}si.create=(t,r)=>new si({type:t,typeName:De.ZodPromise,...Ue(r)});class Vn extends Le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:s,ctx:i}=this._processInputParams(r),l=this._def.effect||null,c={addIssue:f=>{he(i,f),f.fatal?s.abort():s.dirty()},get path(){return i.path}};if(c.addIssue=c.addIssue.bind(c),l.type==="preprocess"){const f=l.transform(i.data,c);if(i.common.async)return Promise.resolve(f).then(async h=>{if(s.value==="aborted")return Ne;const m=await this._def.schema._parseAsync({data:h,path:i.path,parent:i});return m.status==="aborted"?Ne:m.status==="dirty"||s.value==="dirty"?Ks(m.value):m});{if(s.value==="aborted")return Ne;const h=this._def.schema._parseSync({data:f,path:i.path,parent:i});return h.status==="aborted"?Ne:h.status==="dirty"||s.value==="dirty"?Ks(h.value):h}}if(l.type==="refinement"){const f=h=>{const m=l.refinement(h,c);if(i.common.async)return Promise.resolve(m);if(m instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(i.common.async===!1){const h=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return h.status==="aborted"?Ne:(h.status==="dirty"&&s.dirty(),f(h.value),{status:s.value,value:h.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(h=>h.status==="aborted"?Ne:(h.status==="dirty"&&s.dirty(),f(h.value).then(()=>({status:s.value,value:h.value}))))}if(l.type==="transform")if(i.common.async===!1){const f=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Wa(f))return Ne;const h=l.transform(f.value,c);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:h}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(f=>Wa(f)?Promise.resolve(l.transform(f.value,c)).then(h=>({status:s.value,value:h})):Ne);Ke.assertNever(l)}}Vn.create=(t,r,s)=>new Vn({schema:t,typeName:De.ZodEffects,effect:r,...Ue(s)});Vn.createWithPreprocess=(t,r,s)=>new Vn({schema:r,effect:{type:"preprocess",transform:t},typeName:De.ZodEffects,...Ue(s)});class er extends Le{_parse(r){return this._getType(r)===ye.undefined?Yt(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}er.create=(t,r)=>new er({innerType:t,typeName:De.ZodOptional,...Ue(r)});class va extends Le{_parse(r){return this._getType(r)===ye.null?Yt(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}va.create=(t,r)=>new va({innerType:t,typeName:De.ZodNullable,...Ue(r)});class zo extends Le{_parse(r){const{ctx:s}=this._processInputParams(r);let i=s.data;return s.parsedType===ye.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}zo.create=(t,r)=>new zo({innerType:t,typeName:De.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default,...Ue(r)});class Uo extends Le{_parse(r){const{ctx:s}=this._processInputParams(r),i={...s,common:{...s.common,issues:[]}},l=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Co(l)?l.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new hn(i.common.issues)},input:i.data})})):{status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new hn(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}Uo.create=(t,r)=>new Uo({innerType:t,typeName:De.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch,...Ue(r)});class Fc extends Le{_parse(r){if(this._getType(r)!==ye.nan){const i=this._getOrReturnCtx(r);return he(i,{code:re.invalid_type,expected:ye.nan,received:i.parsedType}),Ne}return{status:"valid",value:r.data}}}Fc.create=t=>new Fc({typeName:De.ZodNaN,...Ue(t)});const cD=Symbol("zod_brand");class vm extends Le{_parse(r){const{ctx:s}=this._processInputParams(r),i=s.data;return this._def.type._parse({data:i,path:s.path,parent:s})}unwrap(){return this._def.type}}class Ko extends Le{_parse(r){const{status:s,ctx:i}=this._processInputParams(r);if(i.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return c.status==="aborted"?Ne:c.status==="dirty"?(s.dirty(),Ks(c.value)):this._def.out._parseAsync({data:c.value,path:i.path,parent:i})})();{const l=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?Ne:l.status==="dirty"?(s.dirty(),{status:"dirty",value:l.value}):this._def.out._parseSync({data:l.value,path:i.path,parent:i})}}static create(r,s){return new Ko({in:r,out:s,typeName:De.ZodPipeline})}}class Po extends Le{_parse(r){const s=this._def.innerType._parse(r),i=l=>(Wa(l)&&(l.value=Object.freeze(l.value)),l);return Co(s)?s.then(l=>i(l)):i(s)}unwrap(){return this._def.innerType}}Po.create=(t,r)=>new Po({innerType:t,typeName:De.ZodReadonly,...Ue(r)});function zb(t,r){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t;return typeof s=="string"?{message:s}:s}function KS(t,r={},s){return t?ai.create().superRefine((i,l)=>{const c=t(i);if(c instanceof Promise)return c.then(f=>{if(!f){const h=zb(r,i),m=h.fatal??s??!0;l.addIssue({code:"custom",...h,fatal:m})}});if(!c){const f=zb(r,i),h=f.fatal??s??!0;l.addIssue({code:"custom",...f,fatal:h})}}):ai.create()}const uD={object:dt.lazycreate};var De;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(De||(De={}));const fD=(t,r={message:`Input not instance of ${t.name}`})=>KS(s=>s instanceof t,r),$S=kn.create,WS=ha.create,dD=Fc.create,hD=ma.create,JS=To.create,mD=Ja.create,pD=Hc.create,vD=Ao.create,gD=Ro.create,yD=ai.create,bD=Ia.create,xD=jr.create,SD=qc.create,_D=Un.create,wD=dt.create,ED=dt.strictCreate,CD=Oo.create,TD=pu.create,AD=Mo.create,RD=ar.create,OD=No.create,MD=Gc.create,ND=es.create,DD=Js.create,jD=Do.create,kD=jo.create,zD=pa.create,UD=ko.create,PD=si.create,Ub=Vn.create,LD=er.create,VD=va.create,BD=Vn.createWithPreprocess,HD=Ko.create,qD=()=>$S().optional(),GD=()=>WS().optional(),FD=()=>JS().optional(),ID={string:(t=>kn.create({...t,coerce:!0})),number:(t=>ha.create({...t,coerce:!0})),boolean:(t=>To.create({...t,coerce:!0})),bigint:(t=>ma.create({...t,coerce:!0})),date:(t=>Ja.create({...t,coerce:!0}))},ZD=Ne,Ft=Object.freeze(Object.defineProperty({__proto__:null,BRAND:cD,DIRTY:Ks,EMPTY_PATH:HN,INVALID:Ne,NEVER:ZD,OK:Yt,ParseStatus:Ht,Schema:Le,ZodAny:ai,ZodArray:Un,ZodBigInt:ma,ZodBoolean:To,ZodBranded:vm,ZodCatch:Uo,ZodDate:Ja,ZodDefault:zo,ZodDiscriminatedUnion:pu,ZodEffects:Vn,ZodEnum:pa,ZodError:hn,get ZodFirstPartyTypeKind(){return De},ZodFunction:Js,ZodIntersection:Mo,ZodIssueCode:re,ZodLazy:Do,ZodLiteral:jo,ZodMap:Gc,ZodNaN:Fc,ZodNativeEnum:ko,ZodNever:jr,ZodNull:Ro,ZodNullable:va,ZodNumber:ha,ZodObject:dt,ZodOptional:er,ZodParsedType:ye,ZodPipeline:Ko,ZodPromise:si,ZodReadonly:Po,ZodRecord:No,ZodSchema:Le,ZodSet:es,ZodString:kn,ZodSymbol:Hc,ZodTransformer:Vn,ZodTuple:ar,ZodType:Le,ZodUndefined:Ao,ZodUnion:Oo,ZodUnknown:Ia,ZodVoid:qc,addIssueToContext:he,any:yD,array:_D,bigint:hD,boolean:JS,coerce:ID,custom:KS,date:mD,datetimeRegex:QS,defaultErrorMap:ri,discriminatedUnion:TD,effect:Ub,enum:zD,function:DD,getErrorMap:Vc,getParsedType:Or,instanceof:fD,intersection:AD,isAborted:Oh,isAsync:Co,isDirty:Mh,isValid:Wa,late:uD,lazy:jD,literal:kD,makeIssue:Bc,map:MD,nan:dD,nativeEnum:UD,never:xD,null:gD,nullable:VD,number:WS,object:wD,get objectUtil(){return Rh},oboolean:FD,onumber:GD,optional:LD,ostring:qD,pipeline:HD,preprocess:BD,promise:PD,quotelessJson:VN,record:OD,set:ND,setErrorMap:BN,strictObject:ED,string:$S,symbol:pD,transformer:Ub,tuple:RD,undefined:vD,union:CD,unknown:bD,get util(){return Ke},void:SD},Symbol.toStringTag,{value:"Module"})),YD=Ft.object({images:Ft.array(Ft.string()).min(1,"At least 1 image is required"),title:Ft.string().min(1,"Product title is required").min(5,"Product title must be at least 5 characters"),price:Ft.preprocess(t=>typeof t=="string"?Number(t):t,Ft.number({invalid_type_error:"Price must be a number",required_error:"Price is required"}).min(1,"Price must be greater than 0")),category:Ft.string().min(1,"Category is required"),condition:Ft.string().min(1,"Condition is required"),brand:Ft.string().optional(),description:Ft.string().min(1,"Description is required").min(20,"Description must be at least 20 characters"),tags:Ft.array(Ft.string()).optional(),sku:Ft.string().min(1,"Sku must be required"),location:Ft.string().optional(),publist:Ft.boolean().optional()});function QD({children:t,data:r,...s}){const[i,l]=y.useState(!1),[c,f]=y.useState(""),[h,m]=y.useState(""),p=fM({resolver:wM(YD),defaultValues:{images:[],title:"",price:0,category:"",condition:"",brand:"",description:"",tags:[],sku:"",location:"",publist:!1}}),v=p.watch("images"),x=p.watch("tags"),_=["New","Used - like new","Used - good","Used - fair"],E=["Tools","Electronics & computers"],{refetch:R,...w}=LN(r),C=()=>{if(c.trim()&&!x?.includes(c.trim())){const M=p.getValues("tags")||[];p.setValue("tags",[...M,c.trim()]),f("")}},z=M=>{const Z=p.getValues("tags")||[];p.setValue("tags",Z.filter(F=>F!==M))},O=async({images:M,...Z})=>{try{let F=[];if(r){const ie=r.images||[];F=(M||[]).filter(ae=>!ie.includes(ae))}else F=M||[];const I=await Promise.all(F.map(async ie=>ie.startsWith("blob:")?await nE(ie):ie)),te={...Z,images:I};console.log("Product data to submit:",te),console.log("Hình mới cần xử lý:",I)}catch(F){console.error("Error submitting form:",F)}},U=()=>{l(!1),p.reset(),m(""),f("")},k=ex({mutationKey:["createBlobUrl",r?.sku],mutationFn:M=>wn.apiRequest("createBlobUrl",M)});return y.useEffect(()=>{(async()=>{if(!w.data?.data||!r)return;const M=fh({...w.data?.data}).images,Z=await k.mutateAsync(M),F={...r,images:Z};p.reset(F)})()},[w.data,r]),g.jsxs(qM,{open:i,onOpenChange:l,children:[g.jsx(GM,{asChild:!0,children:t}),g.jsxs(ZM,{"aria-describedby":void 0,className:"md:max-w-4xl h-[95vh] flex flex-col p-0",children:[g.jsx(YM,{className:"p-6 border-b",children:g.jsx(QM,{className:"text-2xl font-bold",children:r?"Edit product":"Create new product"})}),!w.isLoading&&!k.isPending&&g.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:g.jsx(PN,{...p,children:g.jsxs("form",{onSubmit:p.handleSubmit(O),className:"space-y-8",children:[g.jsx(Jd,{children:g.jsx(eh,{className:"p-6",children:g.jsx(Cr,{control:p.control,name:"images",render:()=>g.jsxs(Tr,{children:[g.jsx(Qn,{className:"text-lg font-semibold",children:"Images *"}),g.jsx(Ar,{}),v.length>0&&g.jsx("div",{className:"mt-6 overflow-x-auto",children:g.jsx("div",{className:"flex gap-3",children:v.map((M,Z)=>g.jsx("div",{className:"relative flex-shrink-0 w-32 h-32 group rounded-lg border overflow-hidden",children:g.jsx("img",{src:M||"/placeholder.svg",alt:`Preview ${Z+1}`,className:"w-full h-full object-cover"})},Z))})})]})})})}),g.jsx(Jd,{children:g.jsxs(eh,{className:"p-6 space-y-6",children:[g.jsx("h3",{className:"text-lg font-semibold border-b pb-2",children:"Product information"}),g.jsx(Cr,{control:p.control,name:"title",render:({field:M})=>g.jsxs(Tr,{children:[g.jsx(Qn,{children:"Title *"}),g.jsx(oa,{children:g.jsx(Ga,{placeholder:"VD: MacBook Pro 14-inch 2023",...M})}),g.jsx(Ar,{})]})}),g.jsx(Cr,{control:p.control,name:"price",render:({field:M})=>g.jsxs(Tr,{children:[g.jsx(Qn,{children:"Price ($) *"}),g.jsx(oa,{children:g.jsx(Ga,{type:"number",placeholder:"10",...M})}),g.jsx(Ar,{})]})}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[g.jsx(Cr,{control:p.control,name:"category",render:({field:M})=>g.jsxs(Tr,{children:[g.jsx(Qn,{children:"Category *"}),g.jsx(oa,{children:g.jsxs(Ob,{onValueChange:M.onChange,value:M.value,children:[g.jsx(Nb,{className:"w-full",children:g.jsx(Mb,{placeholder:"Select category"})}),g.jsx(Db,{children:E.map(Z=>g.jsx(jb,{value:Z.toLowerCase(),children:Z},Z))})]})}),g.jsx(Ar,{})]})}),g.jsx(Cr,{control:p.control,name:"condition",render:({field:M})=>g.jsxs(Tr,{children:[g.jsx(Qn,{children:"Condition *"}),g.jsx(oa,{children:g.jsxs(Ob,{onValueChange:M.onChange,value:M.value,children:[g.jsx(Nb,{className:"w-full",children:g.jsx(Mb,{placeholder:"Select condition"})}),g.jsx(Db,{children:_.map(Z=>g.jsx(jb,{value:Z.toLowerCase(),children:Z},Z))})]})}),g.jsx(Ar,{})]})}),g.jsx(Cr,{control:p.control,name:"brand",render:({field:M})=>g.jsxs(Tr,{children:[g.jsx(Qn,{children:"Brand"}),g.jsx(oa,{children:g.jsx(Ga,{readOnly:!!r,placeholder:"VD: Cisco",...M})}),g.jsx(Ar,{})]})})]}),g.jsx(Cr,{control:p.control,name:"description",render:({field:M})=>g.jsxs(Tr,{children:[g.jsx(Qn,{children:"Description *"}),g.jsx(oa,{children:g.jsx(jN,{rows:4,...M})}),g.jsx(Ar,{})]})})]})}),g.jsx(Jd,{children:g.jsxs(eh,{className:"p-6 space-y-6",children:[g.jsx("h3",{className:"text-lg font-semibold border-b pb-2",children:"Additional information"}),g.jsxs("div",{className:"space-y-3",children:[g.jsx(Qn,{children:"Tags"}),g.jsx("div",{className:"flex gap-2",children:g.jsx(Ga,{value:c,onChange:M=>f(M.target.value),placeholder:"Tag and press Enter",onKeyDown:M=>{M.key==="Enter"&&(M.preventDefault(),C())}})}),x&&x?.length>0&&g.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(M=>g.jsxs(eS,{onClick:()=>z(M),variant:"secondary",className:"flex items-center gap-1 px-3 py-1",children:[M,g.jsx(Vh,{className:"w-3 h-3 cursor-pointer hover:text-red-500"})]},M))})]}),g.jsx(Cr,{control:p.control,name:"sku",render:({field:M})=>g.jsxs(Tr,{children:[g.jsx(Qn,{children:"Sku *"}),g.jsx(oa,{children:g.jsx(Ga,{readOnly:!!r,placeholder:"VD: MBP14-2023-512GB",...M})}),g.jsx(Ar,{})]})}),g.jsx(Cr,{control:p.control,name:"location",render:({field:M})=>g.jsxs(Tr,{children:[g.jsx(Qn,{children:"Location"}),g.jsx(oa,{children:g.jsx(Ga,{placeholder:"VD: Hà Nội, Việt Nam",...M})}),g.jsx(Ar,{})]})})]})})]})})}),(w.isLoading||k.isPending)&&g.jsx("div",{className:"flex items-center justify-center w-full h-full",children:g.jsx(z0,{})}),g.jsx("div",{className:"p-6 border-t bg-white flex justify-end gap-3",children:g.jsx(Xn,{type:"button",variant:"outline",onClick:U,children:"Close"})})]})]})}var Dh=["Enter"," "],XD=["ArrowDown","PageUp","Home"],e_=["ArrowUp","PageDown","End"],KD=[...XD,...e_],$D={ltr:[...Dh,"ArrowRight"],rtl:[...Dh,"ArrowLeft"]},WD={ltr:["ArrowLeft"],rtl:["ArrowRight"]},$o="Menu",[Lo,JD,e2]=tm($o),[ts,t_]=Bn($o,[e2,ga,lu]),vu=ga(),n_=lu(),[t2,ns]=ts($o),[n2,Wo]=ts($o),r_=t=>{const{__scopeMenu:r,open:s=!1,children:i,dir:l,onOpenChange:c,modal:f=!0}=t,h=vu(r),[m,p]=y.useState(null),v=y.useRef(!1),x=zt(c),_=Yo(l);return y.useEffect(()=>{const E=()=>{v.current=!0,document.addEventListener("pointerdown",R,{capture:!0,once:!0}),document.addEventListener("pointermove",R,{capture:!0,once:!0})},R=()=>v.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",R,{capture:!0}),document.removeEventListener("pointermove",R,{capture:!0})}},[]),g.jsx(Jc,{...h,children:g.jsx(t2,{scope:r,open:s,onOpenChange:x,content:m,onContentChange:p,children:g.jsx(n2,{scope:r,onClose:y.useCallback(()=>x(!1),[x]),isUsingKeyboardRef:v,dir:_,modal:f,children:i})})})};r_.displayName=$o;var r2="MenuAnchor",gm=y.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t,l=vu(s);return g.jsx(qo,{...l,...i,ref:r})});gm.displayName=r2;var ym="MenuPortal",[a2,a_]=ts(ym,{forceMount:void 0}),s_=t=>{const{__scopeMenu:r,forceMount:s,children:i,container:l}=t,c=ns(ym,r);return g.jsx(a2,{scope:r,forceMount:s,children:g.jsx(qt,{present:s||c.open,children:g.jsx(hi,{asChild:!0,container:l,children:i})})})};s_.displayName=ym;var Cn="MenuContent",[s2,bm]=ts(Cn),i_=y.forwardRef((t,r)=>{const s=a_(Cn,t.__scopeMenu),{forceMount:i=s.forceMount,...l}=t,c=ns(Cn,t.__scopeMenu),f=Wo(Cn,t.__scopeMenu);return g.jsx(Lo.Provider,{scope:t.__scopeMenu,children:g.jsx(qt,{present:i||c.open,children:g.jsx(Lo.Slot,{scope:t.__scopeMenu,children:f.modal?g.jsx(i2,{...l,ref:r}):g.jsx(o2,{...l,ref:r})})})})}),i2=y.forwardRef((t,r)=>{const s=ns(Cn,t.__scopeMenu),i=y.useRef(null),l=Ie(r,i);return y.useEffect(()=>{const c=i.current;if(c)return su(c)},[]),g.jsx(xm,{...t,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:me(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),o2=y.forwardRef((t,r)=>{const s=ns(Cn,t.__scopeMenu);return g.jsx(xm,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),l2=ua("MenuContent.ScrollLock"),xm=y.forwardRef((t,r)=>{const{__scopeMenu:s,loop:i=!1,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:f,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:x,onInteractOutside:_,onDismiss:E,disableOutsideScroll:R,...w}=t,C=ns(Cn,s),z=Wo(Cn,s),O=vu(s),U=n_(s),k=JD(s),[M,Z]=y.useState(null),F=y.useRef(null),I=Ie(r,F,C.onContentChange),te=y.useRef(0),ie=y.useRef(""),ge=y.useRef(0),ae=y.useRef(null),se=y.useRef("right"),ce=y.useRef(0),pe=R?Io:y.Fragment,j=R?{as:l2,allowPinchZoom:!0}:void 0,Q=J=>{const A=ie.current+J,Y=k().filter(ne=>!ne.disabled),oe=document.activeElement,ee=Y.find(ne=>ne.ref.current===oe)?.textValue,ue=Y.map(ne=>ne.textValue),Oe=x2(ue,A,ee),_e=Y.find(ne=>ne.textValue===Oe)?.ref.current;(function ne(Te){ie.current=Te,window.clearTimeout(te.current),Te!==""&&(te.current=window.setTimeout(()=>ne(""),1e3))})(A),_e&&setTimeout(()=>_e.focus())};y.useEffect(()=>()=>window.clearTimeout(te.current),[]),au();const H=y.useCallback(J=>se.current===ae.current?.side&&_2(J,ae.current?.area),[]);return g.jsx(s2,{scope:s,searchRef:ie,onItemEnter:y.useCallback(J=>{H(J)&&J.preventDefault()},[H]),onItemLeave:y.useCallback(J=>{H(J)||(F.current?.focus(),Z(null))},[H]),onTriggerLeave:y.useCallback(J=>{H(J)&&J.preventDefault()},[H]),pointerGraceTimerRef:ge,onPointerGraceIntentChange:y.useCallback(J=>{ae.current=J},[]),children:g.jsx(pe,{...j,children:g.jsx(Fo,{asChild:!0,trapped:l,onMountAutoFocus:me(c,J=>{J.preventDefault(),F.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:g.jsx(ui,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:x,onInteractOutside:_,onDismiss:E,children:g.jsx(E0,{asChild:!0,...U,dir:z.dir,orientation:"vertical",loop:i,currentTabStopId:M,onCurrentTabStopIdChange:Z,onEntryFocus:me(m,J=>{z.isUsingKeyboardRef.current||J.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(eu,{role:"menu","aria-orientation":"vertical","data-state":__(C.open),"data-radix-menu-content":"",dir:z.dir,...O,...w,ref:I,style:{outline:"none",...w.style},onKeyDown:me(w.onKeyDown,J=>{const Y=J.target.closest("[data-radix-menu-content]")===J.currentTarget,oe=J.ctrlKey||J.altKey||J.metaKey,ee=J.key.length===1;Y&&(J.key==="Tab"&&J.preventDefault(),!oe&&ee&&Q(J.key));const ue=F.current;if(J.target!==ue||!KD.includes(J.key))return;J.preventDefault();const _e=k().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);e_.includes(J.key)&&_e.reverse(),y2(_e)}),onBlur:me(t.onBlur,J=>{J.currentTarget.contains(J.target)||(window.clearTimeout(te.current),ie.current="")}),onPointerMove:me(t.onPointerMove,Vo(J=>{const A=J.target,Y=ce.current!==J.clientX;if(J.currentTarget.contains(A)&&Y){const oe=J.clientX>ce.current?"right":"left";se.current=oe,ce.current=J.clientX}}))})})})})})})});i_.displayName=Cn;var c2="MenuGroup",Sm=y.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return g.jsx(ke.div,{role:"group",...i,ref:r})});Sm.displayName=c2;var u2="MenuLabel",o_=y.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return g.jsx(ke.div,{...i,ref:r})});o_.displayName=u2;var Ic="MenuItem",Pb="menu.itemSelect",gu=y.forwardRef((t,r)=>{const{disabled:s=!1,onSelect:i,...l}=t,c=y.useRef(null),f=Wo(Ic,t.__scopeMenu),h=bm(Ic,t.__scopeMenu),m=Ie(r,c),p=y.useRef(!1),v=()=>{const x=c.current;if(!s&&x){const _=new CustomEvent(Pb,{bubbles:!0,cancelable:!0});x.addEventListener(Pb,E=>i?.(E),{once:!0}),bx(x,_),_.defaultPrevented?p.current=!1:f.onClose()}};return g.jsx(l_,{...l,ref:m,disabled:s,onClick:me(t.onClick,v),onPointerDown:x=>{t.onPointerDown?.(x),p.current=!0},onPointerUp:me(t.onPointerUp,x=>{p.current||x.currentTarget?.click()}),onKeyDown:me(t.onKeyDown,x=>{const _=h.searchRef.current!=="";s||_&&x.key===" "||Dh.includes(x.key)&&(x.currentTarget.click(),x.preventDefault())})})});gu.displayName=Ic;var l_=y.forwardRef((t,r)=>{const{__scopeMenu:s,disabled:i=!1,textValue:l,...c}=t,f=bm(Ic,s),h=n_(s),m=y.useRef(null),p=Ie(r,m),[v,x]=y.useState(!1),[_,E]=y.useState("");return y.useEffect(()=>{const R=m.current;R&&E((R.textContent??"").trim())},[c.children]),g.jsx(Lo.ItemSlot,{scope:s,disabled:i,textValue:l??_,children:g.jsx(C0,{asChild:!0,...h,focusable:!i,children:g.jsx(ke.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...c,ref:p,onPointerMove:me(t.onPointerMove,Vo(R=>{i?f.onItemLeave(R):(f.onItemEnter(R),R.defaultPrevented||R.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:me(t.onPointerLeave,Vo(R=>f.onItemLeave(R))),onFocus:me(t.onFocus,()=>x(!0)),onBlur:me(t.onBlur,()=>x(!1))})})})}),f2="MenuCheckboxItem",c_=y.forwardRef((t,r)=>{const{checked:s=!1,onCheckedChange:i,...l}=t;return g.jsx(m_,{scope:t.__scopeMenu,checked:s,children:g.jsx(gu,{role:"menuitemcheckbox","aria-checked":Zc(s)?"mixed":s,...l,ref:r,"data-state":wm(s),onSelect:me(l.onSelect,()=>i?.(Zc(s)?!0:!s),{checkForDefaultPrevented:!1})})})});c_.displayName=f2;var u_="MenuRadioGroup",[d2,h2]=ts(u_,{value:void 0,onValueChange:()=>{}}),f_=y.forwardRef((t,r)=>{const{value:s,onValueChange:i,...l}=t,c=zt(i);return g.jsx(d2,{scope:t.__scopeMenu,value:s,onValueChange:c,children:g.jsx(Sm,{...l,ref:r})})});f_.displayName=u_;var d_="MenuRadioItem",h_=y.forwardRef((t,r)=>{const{value:s,...i}=t,l=h2(d_,t.__scopeMenu),c=s===l.value;return g.jsx(m_,{scope:t.__scopeMenu,checked:c,children:g.jsx(gu,{role:"menuitemradio","aria-checked":c,...i,ref:r,"data-state":wm(c),onSelect:me(i.onSelect,()=>l.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});h_.displayName=d_;var _m="MenuItemIndicator",[m_,m2]=ts(_m,{checked:!1}),p_=y.forwardRef((t,r)=>{const{__scopeMenu:s,forceMount:i,...l}=t,c=m2(_m,s);return g.jsx(qt,{present:i||Zc(c.checked)||c.checked===!0,children:g.jsx(ke.span,{...l,ref:r,"data-state":wm(c.checked)})})});p_.displayName=_m;var p2="MenuSeparator",v_=y.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t;return g.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});v_.displayName=p2;var v2="MenuArrow",g_=y.forwardRef((t,r)=>{const{__scopeMenu:s,...i}=t,l=vu(s);return g.jsx(tu,{...l,...i,ref:r})});g_.displayName=v2;var g2="MenuSub",[$j,y_]=ts(g2),yo="MenuSubTrigger",b_=y.forwardRef((t,r)=>{const s=ns(yo,t.__scopeMenu),i=Wo(yo,t.__scopeMenu),l=y_(yo,t.__scopeMenu),c=bm(yo,t.__scopeMenu),f=y.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=c,p={__scopeMenu:t.__scopeMenu},v=y.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return y.useEffect(()=>v,[v]),y.useEffect(()=>{const x=h.current;return()=>{window.clearTimeout(x),m(null)}},[h,m]),g.jsx(gm,{asChild:!0,...p,children:g.jsx(l_,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":l.contentId,"data-state":__(s.open),...t,ref:Xc(r,l.onTriggerChange),onClick:x=>{t.onClick?.(x),!(t.disabled||x.defaultPrevented)&&(x.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:me(t.onPointerMove,Vo(x=>{c.onItemEnter(x),!x.defaultPrevented&&!t.disabled&&!s.open&&!f.current&&(c.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{s.onOpenChange(!0),v()},100))})),onPointerLeave:me(t.onPointerLeave,Vo(x=>{v();const _=s.content?.getBoundingClientRect();if(_){const E=s.content?.dataset.side,R=E==="right",w=R?-5:5,C=_[R?"left":"right"],z=_[R?"right":"left"];c.onPointerGraceIntentChange({area:[{x:x.clientX+w,y:x.clientY},{x:C,y:_.top},{x:z,y:_.top},{x:z,y:_.bottom},{x:C,y:_.bottom}],side:E}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(x),x.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:me(t.onKeyDown,x=>{const _=c.searchRef.current!=="";t.disabled||_&&x.key===" "||$D[i.dir].includes(x.key)&&(s.onOpenChange(!0),s.content?.focus(),x.preventDefault())})})})});b_.displayName=yo;var x_="MenuSubContent",S_=y.forwardRef((t,r)=>{const s=a_(Cn,t.__scopeMenu),{forceMount:i=s.forceMount,...l}=t,c=ns(Cn,t.__scopeMenu),f=Wo(Cn,t.__scopeMenu),h=y_(x_,t.__scopeMenu),m=y.useRef(null),p=Ie(r,m);return g.jsx(Lo.Provider,{scope:t.__scopeMenu,children:g.jsx(qt,{present:i||c.open,children:g.jsx(Lo.Slot,{scope:t.__scopeMenu,children:g.jsx(xm,{id:h.contentId,"aria-labelledby":h.triggerId,...l,ref:p,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{f.isUsingKeyboardRef.current&&m.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:me(t.onFocusOutside,v=>{v.target!==h.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:me(t.onEscapeKeyDown,v=>{f.onClose(),v.preventDefault()}),onKeyDown:me(t.onKeyDown,v=>{const x=v.currentTarget.contains(v.target),_=WD[f.dir].includes(v.key);x&&_&&(c.onOpenChange(!1),h.trigger?.focus(),v.preventDefault())})})})})})});S_.displayName=x_;function __(t){return t?"open":"closed"}function Zc(t){return t==="indeterminate"}function wm(t){return Zc(t)?"indeterminate":t?"checked":"unchecked"}function y2(t){const r=document.activeElement;for(const s of t)if(s===r||(s.focus(),document.activeElement!==r))return}function b2(t,r){return t.map((s,i)=>t[(r+i)%t.length])}function x2(t,r,s){const l=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,c=s?t.indexOf(s):-1;let f=b2(t,Math.max(c,0));l.length===1&&(f=f.filter(p=>p!==s));const m=f.find(p=>p.toLowerCase().startsWith(l.toLowerCase()));return m!==s?m:void 0}function S2(t,r){const{x:s,y:i}=t;let l=!1;for(let c=0,f=r.length-1;c<r.length;f=c++){const h=r[c],m=r[f],p=h.x,v=h.y,x=m.x,_=m.y;v>i!=_>i&&s<(x-p)*(i-v)/(_-v)+p&&(l=!l)}return l}function _2(t,r){if(!r)return!1;const s={x:t.clientX,y:t.clientY};return S2(s,r)}function Vo(t){return r=>r.pointerType==="mouse"?t(r):void 0}var w2=r_,E2=gm,C2=s_,T2=i_,A2=Sm,R2=o_,O2=gu,M2=c_,N2=f_,D2=h_,j2=p_,k2=v_,z2=g_,U2=b_,P2=S_,yu="DropdownMenu",[L2,Wj]=Bn(yu,[t_]),Qt=t_(),[V2,w_]=L2(yu),E_=t=>{const{__scopeDropdownMenu:r,children:s,dir:i,open:l,defaultOpen:c,onOpenChange:f,modal:h=!0}=t,m=Qt(r),p=y.useRef(null),[v,x]=nr({prop:l,defaultProp:c??!1,onChange:f,caller:yu});return g.jsx(V2,{scope:r,triggerId:zn(),triggerRef:p,contentId:zn(),open:v,onOpenChange:x,onOpenToggle:y.useCallback(()=>x(_=>!_),[x]),modal:h,children:g.jsx(w2,{...m,open:v,onOpenChange:x,dir:i,modal:h,children:s})})};E_.displayName=yu;var C_="DropdownMenuTrigger",T_=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,disabled:i=!1,...l}=t,c=w_(C_,s),f=Qt(s);return g.jsx(E2,{asChild:!0,...f,children:g.jsx(ke.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...l,ref:Xc(r,c.triggerRef),onPointerDown:me(t.onPointerDown,h=>{!i&&h.button===0&&h.ctrlKey===!1&&(c.onOpenToggle(),c.open||h.preventDefault())}),onKeyDown:me(t.onKeyDown,h=>{i||(["Enter"," "].includes(h.key)&&c.onOpenToggle(),h.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});T_.displayName=C_;var B2="DropdownMenuPortal",A_=t=>{const{__scopeDropdownMenu:r,...s}=t,i=Qt(r);return g.jsx(C2,{...i,...s})};A_.displayName=B2;var R_="DropdownMenuContent",O_=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=w_(R_,s),c=Qt(s),f=y.useRef(!1);return g.jsx(T2,{id:l.contentId,"aria-labelledby":l.triggerId,...c,...i,ref:r,onCloseAutoFocus:me(t.onCloseAutoFocus,h=>{f.current||l.triggerRef.current?.focus(),f.current=!1,h.preventDefault()}),onInteractOutside:me(t.onInteractOutside,h=>{const m=h.detail.originalEvent,p=m.button===0&&m.ctrlKey===!0,v=m.button===2||p;(!l.modal||v)&&(f.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});O_.displayName=R_;var H2="DropdownMenuGroup",q2=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(A2,{...l,...i,ref:r})});q2.displayName=H2;var G2="DropdownMenuLabel",F2=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(R2,{...l,...i,ref:r})});F2.displayName=G2;var I2="DropdownMenuItem",M_=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(O2,{...l,...i,ref:r})});M_.displayName=I2;var Z2="DropdownMenuCheckboxItem",Y2=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(M2,{...l,...i,ref:r})});Y2.displayName=Z2;var Q2="DropdownMenuRadioGroup",X2=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(N2,{...l,...i,ref:r})});X2.displayName=Q2;var K2="DropdownMenuRadioItem",$2=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(D2,{...l,...i,ref:r})});$2.displayName=K2;var W2="DropdownMenuItemIndicator",J2=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(j2,{...l,...i,ref:r})});J2.displayName=W2;var ej="DropdownMenuSeparator",tj=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(k2,{...l,...i,ref:r})});tj.displayName=ej;var nj="DropdownMenuArrow",rj=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(z2,{...l,...i,ref:r})});rj.displayName=nj;var aj="DropdownMenuSubTrigger",sj=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(U2,{...l,...i,ref:r})});sj.displayName=aj;var ij="DropdownMenuSubContent",oj=y.forwardRef((t,r)=>{const{__scopeDropdownMenu:s,...i}=t,l=Qt(s);return g.jsx(P2,{...l,...i,ref:r,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oj.displayName=ij;var lj=E_,cj=T_,uj=A_,fj=O_,dj=M_;function hj({...t}){return g.jsx(lj,{"data-slot":"dropdown-menu",...t})}function mj({...t}){return g.jsx(cj,{"data-slot":"dropdown-menu-trigger",...t})}function pj({className:t,sideOffset:r=4,...s}){return g.jsx(uj,{children:g.jsx(fj,{"data-slot":"dropdown-menu-content",sideOffset:r,className:Ze("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...s})})}function Lb({className:t,inset:r,variant:s="default",...i}){return g.jsx(dj,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":s,className:Ze("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...i})}function vj(t,r){return y.useReducer((s,i)=>r[s][i]??s,t)}var Em="ScrollArea",[N_,Jj]=Bn(Em),[gj,An]=N_(Em),D_=y.forwardRef((t,r)=>{const{__scopeScrollArea:s,type:i="hover",dir:l,scrollHideDelay:c=600,...f}=t,[h,m]=y.useState(null),[p,v]=y.useState(null),[x,_]=y.useState(null),[E,R]=y.useState(null),[w,C]=y.useState(null),[z,O]=y.useState(0),[U,k]=y.useState(0),[M,Z]=y.useState(!1),[F,I]=y.useState(!1),te=Ie(r,ge=>m(ge)),ie=Yo(l);return g.jsx(gj,{scope:s,type:i,dir:ie,scrollHideDelay:c,scrollArea:h,viewport:p,onViewportChange:v,content:x,onContentChange:_,scrollbarX:E,onScrollbarXChange:R,scrollbarXEnabled:M,onScrollbarXEnabledChange:Z,scrollbarY:w,onScrollbarYChange:C,scrollbarYEnabled:F,onScrollbarYEnabledChange:I,onCornerWidthChange:O,onCornerHeightChange:k,children:g.jsx(ke.div,{dir:ie,...f,ref:te,style:{position:"relative","--radix-scroll-area-corner-width":z+"px","--radix-scroll-area-corner-height":U+"px",...t.style}})})});D_.displayName=Em;var j_="ScrollAreaViewport",k_=y.forwardRef((t,r)=>{const{__scopeScrollArea:s,children:i,nonce:l,...c}=t,f=An(j_,s),h=y.useRef(null),m=Ie(r,h,f.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),g.jsx(ke.div,{"data-radix-scroll-area-viewport":"",...c,ref:m,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...t.style},children:g.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});k_.displayName=j_;var ir="ScrollAreaScrollbar",z_=y.forwardRef((t,r)=>{const{forceMount:s,...i}=t,l=An(ir,t.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:f}=l,h=t.orientation==="horizontal";return y.useEffect(()=>(h?c(!0):f(!0),()=>{h?c(!1):f(!1)}),[h,c,f]),l.type==="hover"?g.jsx(yj,{...i,ref:r,forceMount:s}):l.type==="scroll"?g.jsx(bj,{...i,ref:r,forceMount:s}):l.type==="auto"?g.jsx(U_,{...i,ref:r,forceMount:s}):l.type==="always"?g.jsx(Cm,{...i,ref:r}):null});z_.displayName=ir;var yj=y.forwardRef((t,r)=>{const{forceMount:s,...i}=t,l=An(ir,t.__scopeScrollArea),[c,f]=y.useState(!1);return y.useEffect(()=>{const h=l.scrollArea;let m=0;if(h){const p=()=>{window.clearTimeout(m),f(!0)},v=()=>{m=window.setTimeout(()=>f(!1),l.scrollHideDelay)};return h.addEventListener("pointerenter",p),h.addEventListener("pointerleave",v),()=>{window.clearTimeout(m),h.removeEventListener("pointerenter",p),h.removeEventListener("pointerleave",v)}}},[l.scrollArea,l.scrollHideDelay]),g.jsx(qt,{present:s||c,children:g.jsx(U_,{"data-state":c?"visible":"hidden",...i,ref:r})})}),bj=y.forwardRef((t,r)=>{const{forceMount:s,...i}=t,l=An(ir,t.__scopeScrollArea),c=t.orientation==="horizontal",f=xu(()=>m("SCROLL_END"),100),[h,m]=vj("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(h==="idle"){const p=window.setTimeout(()=>m("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(p)}},[h,l.scrollHideDelay,m]),y.useEffect(()=>{const p=l.viewport,v=c?"scrollLeft":"scrollTop";if(p){let x=p[v];const _=()=>{const E=p[v];x!==E&&(m("SCROLL"),f()),x=E};return p.addEventListener("scroll",_),()=>p.removeEventListener("scroll",_)}},[l.viewport,c,m,f]),g.jsx(qt,{present:s||h!=="hidden",children:g.jsx(Cm,{"data-state":h==="hidden"?"hidden":"visible",...i,ref:r,onPointerEnter:me(t.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:me(t.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),U_=y.forwardRef((t,r)=>{const s=An(ir,t.__scopeScrollArea),{forceMount:i,...l}=t,[c,f]=y.useState(!1),h=t.orientation==="horizontal",m=xu(()=>{if(s.viewport){const p=s.viewport.offsetWidth<s.viewport.scrollWidth,v=s.viewport.offsetHeight<s.viewport.scrollHeight;f(h?p:v)}},10);return ii(s.viewport,m),ii(s.content,m),g.jsx(qt,{present:i||c,children:g.jsx(Cm,{"data-state":c?"visible":"hidden",...l,ref:r})})}),Cm=y.forwardRef((t,r)=>{const{orientation:s="vertical",...i}=t,l=An(ir,t.__scopeScrollArea),c=y.useRef(null),f=y.useRef(0),[h,m]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=H_(h.viewport,h.content),v={...i,sizes:h,onSizesChange:m,hasThumb:p>0&&p<1,onThumbChange:_=>c.current=_,onThumbPointerUp:()=>f.current=0,onThumbPointerDown:_=>f.current=_};function x(_,E){return Cj(_,f.current,h,E)}return s==="horizontal"?g.jsx(xj,{...v,ref:r,onThumbPositionChange:()=>{if(l.viewport&&c.current){const _=l.viewport.scrollLeft,E=Vb(_,h,l.dir);c.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:_=>{l.viewport&&(l.viewport.scrollLeft=_)},onDragScroll:_=>{l.viewport&&(l.viewport.scrollLeft=x(_,l.dir))}}):s==="vertical"?g.jsx(Sj,{...v,ref:r,onThumbPositionChange:()=>{if(l.viewport&&c.current){const _=l.viewport.scrollTop,E=Vb(_,h);c.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:_=>{l.viewport&&(l.viewport.scrollTop=_)},onDragScroll:_=>{l.viewport&&(l.viewport.scrollTop=x(_))}}):null}),xj=y.forwardRef((t,r)=>{const{sizes:s,onSizesChange:i,...l}=t,c=An(ir,t.__scopeScrollArea),[f,h]=y.useState(),m=y.useRef(null),p=Ie(r,m,c.onScrollbarXChange);return y.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),g.jsx(L_,{"data-orientation":"horizontal",...l,ref:p,sizes:s,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":bu(s)+"px",...t.style},onThumbPointerDown:v=>t.onThumbPointerDown(v.x),onDragScroll:v=>t.onDragScroll(v.x),onWheelScroll:(v,x)=>{if(c.viewport){const _=c.viewport.scrollLeft+v.deltaX;t.onWheelScroll(_),G_(_,x)&&v.preventDefault()}},onResize:()=>{m.current&&c.viewport&&f&&i({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:Qc(f.paddingLeft),paddingEnd:Qc(f.paddingRight)}})}})}),Sj=y.forwardRef((t,r)=>{const{sizes:s,onSizesChange:i,...l}=t,c=An(ir,t.__scopeScrollArea),[f,h]=y.useState(),m=y.useRef(null),p=Ie(r,m,c.onScrollbarYChange);return y.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),g.jsx(L_,{"data-orientation":"vertical",...l,ref:p,sizes:s,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":bu(s)+"px",...t.style},onThumbPointerDown:v=>t.onThumbPointerDown(v.y),onDragScroll:v=>t.onDragScroll(v.y),onWheelScroll:(v,x)=>{if(c.viewport){const _=c.viewport.scrollTop+v.deltaY;t.onWheelScroll(_),G_(_,x)&&v.preventDefault()}},onResize:()=>{m.current&&c.viewport&&f&&i({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:Qc(f.paddingTop),paddingEnd:Qc(f.paddingBottom)}})}})}),[_j,P_]=N_(ir),L_=y.forwardRef((t,r)=>{const{__scopeScrollArea:s,sizes:i,hasThumb:l,onThumbChange:c,onThumbPointerUp:f,onThumbPointerDown:h,onThumbPositionChange:m,onDragScroll:p,onWheelScroll:v,onResize:x,..._}=t,E=An(ir,s),[R,w]=y.useState(null),C=Ie(r,te=>w(te)),z=y.useRef(null),O=y.useRef(""),U=E.viewport,k=i.content-i.viewport,M=zt(v),Z=zt(m),F=xu(x,10);function I(te){if(z.current){const ie=te.clientX-z.current.left,ge=te.clientY-z.current.top;p({x:ie,y:ge})}}return y.useEffect(()=>{const te=ie=>{const ge=ie.target;R?.contains(ge)&&M(ie,k)};return document.addEventListener("wheel",te,{passive:!1}),()=>document.removeEventListener("wheel",te,{passive:!1})},[U,R,k,M]),y.useEffect(Z,[i,Z]),ii(R,F),ii(E.content,F),g.jsx(_j,{scope:s,scrollbar:R,hasThumb:l,onThumbChange:zt(c),onThumbPointerUp:zt(f),onThumbPositionChange:Z,onThumbPointerDown:zt(h),children:g.jsx(ke.div,{..._,ref:C,style:{position:"absolute",..._.style},onPointerDown:me(t.onPointerDown,te=>{te.button===0&&(te.target.setPointerCapture(te.pointerId),z.current=R.getBoundingClientRect(),O.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),I(te))}),onPointerMove:me(t.onPointerMove,I),onPointerUp:me(t.onPointerUp,te=>{const ie=te.target;ie.hasPointerCapture(te.pointerId)&&ie.releasePointerCapture(te.pointerId),document.body.style.webkitUserSelect=O.current,E.viewport&&(E.viewport.style.scrollBehavior=""),z.current=null})})})}),Yc="ScrollAreaThumb",V_=y.forwardRef((t,r)=>{const{forceMount:s,...i}=t,l=P_(Yc,t.__scopeScrollArea);return g.jsx(qt,{present:s||l.hasThumb,children:g.jsx(wj,{ref:r,...i})})}),wj=y.forwardRef((t,r)=>{const{__scopeScrollArea:s,style:i,...l}=t,c=An(Yc,s),f=P_(Yc,s),{onThumbPositionChange:h}=f,m=Ie(r,x=>f.onThumbChange(x)),p=y.useRef(void 0),v=xu(()=>{p.current&&(p.current(),p.current=void 0)},100);return y.useEffect(()=>{const x=c.viewport;if(x){const _=()=>{if(v(),!p.current){const E=Tj(x,h);p.current=E,h()}};return h(),x.addEventListener("scroll",_),()=>x.removeEventListener("scroll",_)}},[c.viewport,v,h]),g.jsx(ke.div,{"data-state":f.hasThumb?"visible":"hidden",...l,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:me(t.onPointerDownCapture,x=>{const E=x.target.getBoundingClientRect(),R=x.clientX-E.left,w=x.clientY-E.top;f.onThumbPointerDown({x:R,y:w})}),onPointerUp:me(t.onPointerUp,f.onThumbPointerUp)})});V_.displayName=Yc;var Tm="ScrollAreaCorner",B_=y.forwardRef((t,r)=>{const s=An(Tm,t.__scopeScrollArea),i=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&i?g.jsx(Ej,{...t,ref:r}):null});B_.displayName=Tm;var Ej=y.forwardRef((t,r)=>{const{__scopeScrollArea:s,...i}=t,l=An(Tm,s),[c,f]=y.useState(0),[h,m]=y.useState(0),p=!!(c&&h);return ii(l.scrollbarX,()=>{const v=l.scrollbarX?.offsetHeight||0;l.onCornerHeightChange(v),m(v)}),ii(l.scrollbarY,()=>{const v=l.scrollbarY?.offsetWidth||0;l.onCornerWidthChange(v),f(v)}),p?g.jsx(ke.div,{...i,ref:r,style:{width:c,height:h,position:"absolute",right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Qc(t){return t?parseInt(t,10):0}function H_(t,r){const s=t/r;return isNaN(s)?0:s}function bu(t){const r=H_(t.viewport,t.content),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-s)*r;return Math.max(i,18)}function Cj(t,r,s,i="ltr"){const l=bu(s),c=l/2,f=r||c,h=l-f,m=s.scrollbar.paddingStart+f,p=s.scrollbar.size-s.scrollbar.paddingEnd-h,v=s.content-s.viewport,x=i==="ltr"?[0,v]:[v*-1,0];return q_([m,p],x)(t)}function Vb(t,r,s="ltr"){const i=bu(r),l=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,c=r.scrollbar.size-l,f=r.content-r.viewport,h=c-i,m=s==="ltr"?[0,f]:[f*-1,0],p=_h(t,m);return q_([0,f],[0,h])(p)}function q_(t,r){return s=>{if(t[0]===t[1]||r[0]===r[1])return r[0];const i=(r[1]-r[0])/(t[1]-t[0]);return r[0]+i*(s-t[0])}}function G_(t,r){return t>0&&t<r}var Tj=(t,r=()=>{})=>{let s={left:t.scrollLeft,top:t.scrollTop},i=0;return(function l(){const c={left:t.scrollLeft,top:t.scrollTop},f=s.left!==c.left,h=s.top!==c.top;(f||h)&&r(),s=c,i=window.requestAnimationFrame(l)})(),()=>window.cancelAnimationFrame(i)};function xu(t,r){const s=zt(t),i=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),y.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(s,r)},[s,r])}function ii(t,r){const s=zt(r);Ut(()=>{let i=0;if(t){const l=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(s)});return l.observe(t),()=>{window.cancelAnimationFrame(i),l.unobserve(t)}}},[t,s])}var Aj=D_,Rj=k_,Oj=B_;function Mj({className:t,children:r,...s}){return g.jsxs(Aj,{"data-slot":"scroll-area",className:Ze("relative",t),...s,children:[g.jsx(Rj,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:r}),g.jsx(Nj,{}),g.jsx(Oj,{})]})}function Nj({className:t,orientation:r="vertical",...s}){return g.jsx(z_,{"data-slot":"scroll-area-scrollbar",orientation:r,className:Ze("flex touch-none p-px transition-colors select-none",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t),...s,children:g.jsx(V_,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function Dj({className:t,...r}){return g.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:g.jsx("table",{"data-slot":"table",className:Ze("w-full caption-bottom text-sm",t),...r})})}function jj({className:t,...r}){return g.jsx("thead",{"data-slot":"table-header",className:Ze("[&_tr]:border-b",t),...r})}function kj({className:t,...r}){return g.jsx("tbody",{"data-slot":"table-body",className:Ze("[&_tr:last-child]:border-0",t),...r})}function xc({className:t,...r}){return g.jsx("tr",{"data-slot":"table-row",className:Ze("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...r})}function Sc({className:t,...r}){return g.jsx("th",{"data-slot":"table-head",className:Ze("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...r})}function Qs({className:t,...r}){return g.jsx("td",{"data-slot":"table-cell",className:Ze("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...r})}function zj(t,r,s,i){var l=this,c=y.useRef(null),f=y.useRef(0),h=y.useRef(0),m=y.useRef(null),p=y.useRef([]),v=y.useRef(),x=y.useRef(),_=y.useRef(t),E=y.useRef(!0);_.current=t;var R=typeof window<"u",w=!r&&r!==0&&R;if(typeof t!="function")throw new TypeError("Expected a function");r=+r||0;var C=!!(s=s||{}).leading,z=!("trailing"in s)||!!s.trailing,O="maxWait"in s,U="debounceOnServer"in s&&!!s.debounceOnServer,k=O?Math.max(+s.maxWait||0,r):null;y.useEffect(function(){return E.current=!0,function(){E.current=!1}},[]);var M=y.useMemo(function(){var Z=function(se){var ce=p.current,pe=v.current;return p.current=v.current=null,f.current=se,h.current=h.current||se,x.current=_.current.apply(pe,ce)},F=function(se,ce){w&&cancelAnimationFrame(m.current),m.current=w?requestAnimationFrame(se):setTimeout(se,ce)},I=function(se){if(!E.current)return!1;var ce=se-c.current;return!c.current||ce>=r||ce<0||O&&se-f.current>=k},te=function(se){return m.current=null,z&&p.current?Z(se):(p.current=v.current=null,x.current)},ie=function se(){var ce=Date.now();if(C&&h.current===f.current&&ge(),I(ce))return te(ce);if(E.current){var pe=r-(ce-c.current),j=O?Math.min(pe,k-(ce-f.current)):pe;F(se,j)}},ge=function(){i&&i({})},ae=function(){if(R||U){var se=Date.now(),ce=I(se);if(p.current=[].slice.call(arguments),v.current=l,c.current=se,ce){if(!m.current&&E.current)return f.current=c.current,F(ie,r),C?Z(c.current):x.current;if(O)return F(ie,r),Z(c.current)}return m.current||F(ie,r),x.current}};return ae.cancel=function(){m.current&&(w?cancelAnimationFrame(m.current):clearTimeout(m.current)),f.current=0,p.current=c.current=v.current=m.current=null},ae.isPending=function(){return!!m.current},ae.flush=function(){return m.current?te(Date.now()):x.current},ae},[C,O,r,k,z,w,R,U,i]);return M}function Uj(t,r){return t===r}function Pj(t,r,s){var i=Uj,l=y.useRef(t),c=y.useState({})[1],f=zj(y.useCallback(function(m){l.current=m,c({})},[c]),r,s,c),h=y.useRef(t);return i(h.current,t)||(f(t),h.current=t),[l.current,f]}function ek(){const[t,r]=y.useState(""),[s,i]=y.useState({}),[l,c]=y.useState(1),[f]=Pj(t,400),h=y.useMemo(()=>["products",{currentPage:l,search:f,filter:s}],[l,f,s]),{data:m,isFetching:p}=oh({queryKey:h,queryFn:async()=>await wn.apiRequest("index",aE({skip:(l-1)*wn.item_per_page,where:{productModelCode:t,status_listing:s?.statusFilter==="all"?void 0:s.statusFilter}}))}),{data:v}=oh({queryKey:["publised-products"],queryFn:async()=>await wn.apiRequest("getPublistedProducts",{})??[],staleTime:0,refetchOnMount:"always"}),x=ex({mutationKey:["action-mutaions"],mutationFn:async k=>{if(k.status)return wn.apiRequest("unlist",k);const M=await wn.apiRequest("get",k);if(!(!M||!M?.data))return wn.apiRequest("publist",{...k,images:fh({...M?.data}).images})}}),_=y.useMemo(()=>!m||!m?.data?[]:m?.data.map(k=>fh(k)),[m]),E=k=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(k),R=()=>{r(""),i({statusFilter:""}),c(1)},w=[s.statusFilter,t!==""].filter(Boolean).length,C=y.useMemo(()=>m?.total?Math.ceil(m.total/wn.item_per_page):0,[m?.total,wn.item_per_page]),z=y.useMemo(()=>(l-1)*wn.item_per_page+1,[l]),O=y.useMemo(()=>Math.min(l*wn.item_per_page,m?.total??0),[l,m]),U=async k=>{console.log({post:k}),x.mutate(k)};return g.jsxs(_O,{children:[g.jsx(CO,{}),g.jsx(EO,{side:"left",align:"end",className:"w-auto",children:g.jsxs("div",{className:"space-y-4 h-[78vh] min-w-[638px]",children:[g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"relative flex-1",children:[g.jsx(hC,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),g.jsx(Ga,{placeholder:"Search...",value:t,onChange:k=>r(k.target.value),className:"pl-10"})]}),g.jsx(IO,{filter:s,setFilter:i,activeFiltersCount:w,clearFilters:R})]}),g.jsxs("div",{className:"flex items-center justify-between w-full gap-8",children:[g.jsxs("span",{children:["Showing ",z,"-",O," of ",m?.total??0," products"]}),C>1&&g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[g.jsxs(Xn,{variant:"outline",size:"xs",onClick:()=>c(k=>Math.max(1,k-1)),disabled:l===1,children:[g.jsx(tC,{}),"Previous"]}),g.jsx("div",{className:"flex items-center gap-1",children:C<=7?Array.from({length:C},(k,M)=>g.jsx(Xn,{variant:l===M+1?"default":"outline",size:"xs",onClick:()=>c(M+1),children:M+1},M+1)):g.jsxs(g.Fragment,{children:[g.jsx(Xn,{variant:l===1?"default":"outline",size:"xs",onClick:()=>c(1),children:"1"}),l>4&&g.jsx("span",{className:"px-2 text-muted-foreground",children:"..."}),Array.from({length:3},(k,M)=>{let Z;return l<=4?Z=M+2:l>=C-3?Z=C-4+M:Z=l-1+M,Z>1&&Z<C?g.jsx(Xn,{variant:l===Z?"default":"outline",size:"xs",onClick:()=>c(Z),children:Z},Z):null}).filter(Boolean),l<C-3&&g.jsx("span",{className:"px-2 text-muted-foreground",children:"..."}),g.jsx(Xn,{variant:l===C?"default":"outline",size:"xs",onClick:()=>c(C),children:C})]})}),g.jsxs(Xn,{variant:"outline",size:"xs",onClick:()=>c(k=>Math.min(C,k+1)),disabled:l===C,children:["Next",g.jsx(rC,{})]})]})]}),g.jsx("div",{className:"rounded-md border overflow-x-auto relative",children:g.jsx(Mj,{className:"h-[66vh] w-full",children:g.jsxs(Dj,{className:"h-fit",children:[g.jsx(jj,{children:g.jsxs(xc,{children:[g.jsx(Sc,{className:"min-w-[200px]",children:"Name"}),g.jsx(Sc,{className:"w-[80px]",children:"Price"}),g.jsx(Sc,{className:"w-[80px]",children:"Status"}),g.jsx(Sc,{className:"w-[80px] text-center sticky right-0 bg-background border-l shadow-[-4px_0_8px_rgba(0,0,0,0.1)]",children:"Actions"})]})}),g.jsxs(kj,{className:"relative",children:[p&&g.jsx(xc,{children:g.jsx(Qs,{colSpan:10,className:"text-center py-8 text-muted-foreground ",children:g.jsx("div",{className:"h-full flex items-center justify-center w-full",children:g.jsx(z0,{})})})}),_.length===0&&!p?g.jsx(xc,{children:g.jsx(Qs,{colSpan:10,className:"text-center py-8 text-muted-foreground",children:g.jsx("div",{className:"h-full flex items-center justify-center w-full",children:g.jsx("span",{children:" No products found"})})})}):_.map(k=>{const M=v?.some(Z=>Z.title.includes(k.sku));return k.status=M,g.jsxs(xc,{children:[g.jsxs(Qs,{className:"font-medium",children:[g.jsx("div",{className:"truncate max-w-[340px] w-fit",title:k.title,children:k.title}),g.jsx("div",{className:"text-sm text-muted-foreground truncate max-w-[340px]",title:k.description,children:k.description})]}),g.jsx(Qs,{className:"font-semibold",children:E(k.price)}),g.jsx(Qs,{children:g.jsx(eS,{variant:"secondary",children:k?.status?"Listed":"Unlisted"})}),g.jsx(Qs,{className:"text-center sticky right-0 bg-background border-l shadow-[-4px_0_8px_rgba(0,0,0,0.1)]",children:g.jsxs(hj,{children:[g.jsx(mj,{asChild:!0,children:g.jsx("div",{className:"w-full flex items-center justify-center",children:g.jsx(Xn,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 mx-auto",children:g.jsx(cC,{className:"h-4 w-4"})})})}),g.jsxs(pj,{align:"end",children:[g.jsx(QD,{data:k,children:g.jsxs(Lb,{onSelect:Z=>{Z.preventDefault(),Z.stopPropagation()},children:[g.jsx(pC,{className:"h-4 w-4 mr-2"})," Review"]})}),g.jsxs(Lb,{onClick:()=>U(k),children:[k.status?g.jsx(ax,{className:"h-4 w-4 mr-2"}):g.jsx(sx,{className:"h-4 w-4 mr-2"}),k.status?"Unlist":"List"]})]})]})})]},k.id)})]})]})})})]})})]})}export{ek as P,qj as Q,Fj as R,g as j,Gj as q};