@frumu/tandem-panel 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{R as C,y as g,u as L,x as S,T as k,d as w,C as Q,q as p}from"./preact-vendor-jo0muZ28.js";import{s as O,n as b,a as M,Q as P,b as D,i as V,M as W}from"./vendor-B5SLbWPm.js";var I=C(void 0),_=e=>{const s=S(I);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},Y=({client:e,children:s})=>(g(()=>(e.mount(),()=>{e.unmount()}),[e]),L(I.Provider,{value:e,children:s})),q=C(!1),x=()=>S(q);q.Provider;function j(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var z=C(j()),N=()=>S(z),B=(e,s,o)=>{const t=o?.state.error&&typeof e.throwOnError=="function"?O(e.throwOnError,[o.state.error,o]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||t)&&(s.isReset()||(e.retryOnMount=!1))},H=e=>{g(()=>{e.clearReset()},[e])},U=({result:e,errorResetBoundary:s,throwOnError:o,query:t,suspense:n})=>e.isError&&!s.isReset()&&!e.isFetching&&t&&(n&&e.data===void 0||O(o,[e.error,t])),A=e=>{if(e.suspense){const o=n=>n==="static"?n:Math.max(n??1e3,1e3),t=e.staleTime;e.staleTime=typeof t=="function"?(...n)=>o(t(...n)):o(t),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},G=(e,s)=>e.isLoading&&e.isFetching&&!s,E=(e,s)=>e?.suspense&&s.isPending,v=(e,s,o)=>s.fetchOptimistic(e).catch(()=>{o.clearReset()});function Z({queries:e,...s},o){const t=_(),n=x(),u=N(),r=k(()=>e.map(a=>{const l=t.defaultQueryOptions(a);return l._optimisticResults=n?"isRestoring":"optimistic",l}),[e,t,n]);r.forEach(a=>{A(a);const l=t.getQueryCache().get(a.queryHash);B(a,u,l)}),H(u);const[c]=w(()=>new D(t,r,s)),[m,i,h]=c.getOptimisticResult(r,s.combine),y=!n&&s.subscribed!==!1;Q(p(a=>y?c.subscribe(M.batchCalls(a)):b,[c,y]),()=>c.getCurrentResult()),g(()=>{c.setQueries(r,s)},[r,s,c]);const R=m.some((a,l)=>E(r[l],a))?m.flatMap((a,l)=>{const f=r[l];if(f&&E(f,a)){const F=new P(t,f);return v(f,F,u)}return[]}):[];if(R.length>0)throw Promise.all(R);const T=m.find((a,l)=>{const f=r[l];return f&&U({result:a,errorResetBoundary:u,throwOnError:f.throwOnError,query:t.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(T?.error)throw T.error;return i(h())}function J(e,s,o){const t=x(),n=N(),u=_(),r=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(r);const c=u.getQueryCache().get(r.queryHash);r._optimisticResults=t?"isRestoring":"optimistic",A(r),B(r,n,c),H(n);const m=!u.getQueryCache().get(r.queryHash),[i]=w(()=>new s(u,r)),h=i.getOptimisticResult(r),y=!t&&e.subscribed!==!1;if(Q(p(d=>{const R=y?i.subscribe(M.batchCalls(d)):b;return i.updateResult(),R},[i,y]),()=>i.getCurrentResult()),g(()=>{i.setOptions(r)},[r,i]),E(r,h))throw v(r,i,n);if(U({result:h,errorResetBoundary:n,throwOnError:r.throwOnError,query:c,suspense:r.suspense}))throw h.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(r,h),r.experimental_prefetchInRender&&!V&&G(h,t)&&(m?v(r,i,n):c?.promise)?.catch(b).finally(()=>{i.updateResult()}),r.notifyOnChangeProps?h:i.trackResult(h)}function $(e,s){return J(e,P)}function ee(e,s){const o=_(),[t]=w(()=>new W(o,e));g(()=>{t.setOptions(e)},[t,e]);const n=Q(p(r=>t.subscribe(M.batchCalls(r)),[t]),()=>t.getCurrentResult()),u=p((r,c)=>{t.mutate(r,c).catch(b)},[t]);if(n.error&&O(t.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:u,mutateAsync:n.mutate}}export{Y as Q,_ as a,ee as b,Z as c,$ as u};
@@ -0,0 +1,42 @@
1
+ var J=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fn=class{#t=dn;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},Q=new fn;function pn(e){setTimeout(e,0)}var G=typeof window>"u"||"Deno"in globalThis;function A(){}function mn(e,t){return typeof e=="function"?e(t):e}function ke(e){return typeof e=="number"&&e>=0&&e!==1/0}function Mt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function F(e,t){return typeof e=="function"?e(t):e}function R(e,t){return typeof e=="function"?e(t):e}function Je(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Ie(i,t.options))return!1}else if(!te(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function He(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(V(t.options.mutationKey)!==V(o))return!1}else if(!te(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Ie(e,t){return(t?.queryKeyHashFn||V)(e)}function V(e){return JSON.stringify(e,(t,n)=>Oe(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function te(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>te(e[n],t[n])):!1}var vn=Object.prototype.hasOwnProperty;function Te(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=qe(e)&&qe(t);if(!r&&!(Oe(e)&&Oe(t)))return t;const o=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,c=r?new Array(a):{};let u=0;for(let h=0;h<a;h++){const d=r?h:i[h],f=e[d],p=t[d];if(f===p){c[d]=f,(r?h<o:vn.call(e,d))&&u++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){c[d]=p;continue}const g=Te(f,p,n+1);c[d]=g,g===f&&u++}return o===a&&u===o?e:c}function ne(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function qe(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Oe(e){if(!Ke(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ke(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ke(e){return Object.prototype.toString.call(e)==="[object Object]"}function gn(e){return new Promise(t=>{Q.setTimeout(t,e)})}function Se(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Te(e,t):t}function yn(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function _n(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ae=Symbol();function $t(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ae?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pa(e,t){return typeof e=="function"?e(...t):!!e}function bn(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var wn=class extends J{#t;#e;#n;constructor(){super(),this.#n=e=>{if(!G&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Re=new wn;function Me(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var zn=pn;function kn(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=zn;const o=a=>{t?e.push(a):s(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{o(()=>{a(...c)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var P=kn(),On=class extends J{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(!G&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#t}},de=new On;function Sn(e){return Math.min(1e3*2**e,3e4)}function Pt(e){return(e??"online")==="online"?de.isOnline():!0}var $e=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Zt(e){let t=!1,n=0,r;const s=Me(),o=()=>s.status!=="pending",i=v=>{if(!o()){const O=new $e(v);f(O),e.onCancel?.(O)}},a=()=>{t=!0},c=()=>{t=!1},u=()=>Re.isFocused()&&(e.networkMode==="always"||de.isOnline())&&e.canRun(),h=()=>Pt(e.networkMode)&&e.canRun(),d=v=>{o()||(r?.(),s.resolve(v))},f=v=>{o()||(r?.(),s.reject(v))},p=()=>new Promise(v=>{r=O=>{(o()||u())&&v(O)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),g=()=>{if(o())return;let v;const O=n===0?e.initialPromise:void 0;try{v=O??e.fn()}catch(Z){v=Promise.reject(Z)}Promise.resolve(v).then(d).catch(Z=>{if(o())return;const I=e.retry??(G?0:3),S=e.retryDelay??Sn,k=typeof S=="function"?S(n,Z):S,$=I===!0||typeof I=="number"&&n<I||typeof I=="function"&&I(n,Z);if(t||!$){f(Z);return}n++,e.onFail?.(n,Z),gn(k).then(()=>u()?void 0:p()).then(()=>{t?f(Z):g()})})};return{promise:s,status:()=>s.status,cancel:i,continue:()=>(r?.(),s),cancelRetry:a,continueRetry:c,canStart:h,start:()=>(h()?g():p().then(g),s)}}var Et=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ke(this.gcTime)&&(this.#t=Q.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(G?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Q.clearTimeout(this.#t),this.#t=void 0)}},Mn=class extends Et{#t;#e;#n;#s;#r;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ge(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ge(this.options);t.data!==void 0&&(this.setState(Be(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Se(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(A).catch(A):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>R(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ae||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>F(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Mt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(c=>c.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},s=()=>{const a=$t(this.options,t),u=(()=>{const h={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#a=!1,this.options.persister?this.options.persister(a,u,this):a(u)},i=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return r(a),a})();this.options.behavior?.onFetch(i,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#i({type:"fetch",meta:i.fetchOptions?.meta}),this.#r=Zt({initialPromise:t?.initialPromise,fn:i.fetchFn,onCancel:a=>{a instanceof $e&&a.revert&&this.setState({...this.#e,fetchStatus:"idle"}),n.abort()},onFail:(a,c)=>{this.#i({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof $e){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#i({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ct(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Be(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?r:void 0,r;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Ct(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pt(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Be(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ge(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $n=class extends J{constructor(e,t){super(),this.options=t,this.#t=e,this.#i=null,this.#a=Me(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#s=void 0;#r;#o;#a;#i;#p;#l;#d;#u;#h;#c;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),We(this.#e,this.options)?this.#m():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pe(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pe(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof R(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#z(),this.#e.setOptions(this.options),t._defaulted&&!ne(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&Xe(this.#e,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#e!==n||R(this.options.enabled,this.#e)!==R(t.enabled,this.#e)||F(this.options.staleTime,this.#e)!==F(t.staleTime,this.#e))&&this.#v();const s=this.#g();r&&(this.#e!==n||R(this.options.enabled,this.#e)!==R(t.enabled,this.#e)||s!==this.#c)&&this.#y(s)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return Zn(this,n)&&(this.#s=n,this.#o=this.options,this.#r=this.#e.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),n=this.#t.getQueryCache().build(this.#t,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#z();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(A)),t}#v(){this.#b();const e=F(this.options.staleTime,this.#e);if(G||this.#s.isStale||!ke(e))return;const n=Mt(this.#s.dataUpdatedAt,e)+1;this.#u=Q.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#c=e,!(G||R(this.options.enabled,this.#e)===!1||!ke(this.#c)||this.#c===0)&&(this.#h=Q.setInterval(()=>{(this.options.refetchIntervalInBackground||Re.isFocused())&&this.#m()},this.#c))}#_(){this.#v(),this.#y(this.#g())}#b(){this.#u&&(Q.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#h&&(Q.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const n=this.#e,r=this.options,s=this.#s,o=this.#r,i=this.#o,c=e!==n?e.state:this.#n,{state:u}=e;let h={...u},d=!1,f;if(t._optimisticResults){const T=this.hasListeners(),Y=!T&&We(e,t),oe=T&&Xe(e,n,t,r);(Y||oe)&&(h={...h,...Ct(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:v}=h;f=h.data;let O=!1;if(t.placeholderData!==void 0&&f===void 0&&v==="pending"){let T;s?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(T=s.data,O=!0):T=typeof t.placeholderData=="function"?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,T!==void 0&&(v="success",f=Se(s?.data,T,t),d=!0)}if(t.select&&f!==void 0&&!O)if(s&&f===o?.data&&t.select===this.#p)f=this.#l;else try{this.#p=t.select,f=t.select(f),f=Se(s?.data,f,t),this.#l=f,this.#i=null}catch(T){this.#i=T}this.#i&&(p=this.#i,f=this.#l,g=Date.now(),v="error");const Z=h.fetchStatus==="fetching",I=v==="pending",S=v==="error",k=I&&Z,$=f!==void 0,x={status:v,fetchStatus:h.fetchStatus,isPending:I,isSuccess:v==="success",isError:S,isInitialLoading:k,isLoading:k,data:f,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:Z,isRefetching:Z&&!I,isLoadingError:S&&!$,isPaused:h.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:S&&$,isStale:je(e,t),refetch:this.refetch,promise:this.#a,isEnabled:R(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const T=x.data!==void 0,Y=x.status==="error"&&!T,oe=ae=>{Y?ae.reject(x.error):T&&ae.resolve(x.data)},Ve=()=>{const ae=this.#a=x.promise=Me();oe(ae)},ie=this.#a;switch(ie.status){case"pending":e.queryHash===n.queryHash&&oe(ie);break;case"fulfilled":(Y||x.data!==ie.value)&&Ve();break;case"rejected":(!Y||x.error!==ie.reason)&&Ve();break}}return x}updateResult(){const e=this.#s,t=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#o=this.options,this.#r.data!==void 0&&(this.#d=this.#e),ne(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#f.size)return!0;const o=new Set(s??this.#f);return this.options.throwOnError&&o.add("error"),Object.keys(this.#s).some(i=>{const a=i;return this.#s[a]!==e[a]&&o.has(a)})};this.#k({listeners:n()})}#z(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#k(e){P.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Pn(e,t){return R(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function We(e,t){return Pn(e,t)||e.state.data!==void 0&&Pe(e,t,t.refetchOnMount)}function Pe(e,t,n){if(R(t.enabled,e)!==!1&&F(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&je(e,t)}return!1}function Xe(e,t,n,r){return(e!==t||R(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&je(e,n)}function je(e,t){return R(t.enabled,e)!==!1&&e.isStaleByTime(F(t.staleTime,e))}function Zn(e,t){return!ne(e.getCurrentResult(),t)}function Ye(e){return{onFetch:(t,n)=>{const r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const d=g=>{bn(g,()=>t.signal,()=>h=!0)},f=$t(t.options,t.fetchOptions),p=async(g,v,O)=>{if(h)return Promise.reject();if(v==null&&g.pages.length)return Promise.resolve(g);const I=(()=>{const se={client:t.client,queryKey:t.queryKey,pageParam:v,direction:O?"backward":"forward",meta:t.options.meta};return d(se),se})(),S=await f(I),{maxPages:k}=t.options,$=O?_n:yn;return{pages:$(g.pages,S,k),pageParams:$(g.pageParams,v,k)}};if(s&&o.length){const g=s==="backward",v=g?En:et,O={pages:o,pageParams:i},Z=v(r,O);a=await p(O,Z,g)}else{const g=e??o.length;do{const v=c===0?i[0]??r.initialPageParam:et(r,a);if(c>0&&v==null)break;a=await p(a,v),c++}while(c<g)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function et(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function En(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Cn=class extends Et{#t;#e;#n;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||It(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Zt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,i)=>{this.#r({type:"failed",failureCount:o,error:i})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#s.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const i=await this.options.onMutate?.(e,n);i!==this.state.context&&this.#r({type:"pending",context:i,variables:e,isPaused:s})}const o=await this.#s.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,n)}catch(i){Promise.reject(i)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(i){Promise.reject(i)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(i){Promise.reject(i)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(i){Promise.reject(i)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),P.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function It(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var In=class extends J{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const r=new Cn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#t.add(e);const t=ce(e);if(typeof t=="string"){const n=this.#e.get(t);n?n.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=ce(e);if(typeof t=="string"){const n=this.#e.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ce(e);if(typeof t=="string"){const r=this.#e.get(t)?.find(s=>s.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=ce(e);return typeof t=="string"?this.#e.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){P.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>He(t,n))}findAll(e={}){return this.getAll().filter(t=>He(e,t))}notify(e){P.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return P.batch(()=>Promise.all(e.map(t=>t.continue().catch(A))))}};function ce(e){return e.options.scope?.id}var Za=class extends J{#t;#e=void 0;#n;#s;constructor(e,t){super(),this.#t=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#t.defaultMutationOptions(e),ne(this.options,t)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&V(t.mutationKey)!==V(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#o(e)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(e,t){return this.#s=t,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(e)}#r(){const e=this.#n?.state??It();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#o(e){P.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#e.variables,n=this.#e.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,n,r)}catch(s){Promise.reject(s)}try{this.#s.onSettled?.(e.data,null,t,n,r)}catch(s){Promise.reject(s)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,n,r)}catch(s){Promise.reject(s)}try{this.#s.onSettled?.(void 0,e.error,t,n,r)}catch(s){Promise.reject(s)}}}this.listeners.forEach(t=>{t(this.#e)})})}};function tt(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function Tn(e,t,n){const r=e.slice(0);return r[t]=n,r}var Ea=class extends J{#t;#e;#n;#s;#r;#o;#a;#i;#p;#l=[];constructor(e,t,n){super(),this.#t=e,this.#s=n,this.#n=[],this.#r=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#s=t,P.batch(()=>{const n=this.#r,r=this.#h(this.#n);r.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const s=r.map(h=>h.observer),o=s.map(h=>h.getCurrentResult()),i=n.length!==s.length,a=s.some((h,d)=>h!==n[d]),c=i||a,u=c?!0:o.some((h,d)=>{const f=this.#e[d];return!f||!ne(h,f)});!c&&!u||(c&&(this.#l=r,this.#r=s),this.#e=o,this.hasListeners()&&(c&&(tt(n,s).forEach(h=>{h.destroy()}),tt(s,n).forEach(h=>{h.subscribe(d=>{this.#c(h,d)})})),this.#f()))})}getCurrentResult(){return this.#e}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,t){const n=this.#h(e),r=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),s=n.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>this.#u(o??r,t,s),()=>this.#d(r,n)]}#d(e,t){return t.map((n,r)=>{const s=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?s:n.observer.trackResult(s,o=>{t.forEach(i=>{i.observer.trackProp(o)})})})}#u(e,t,n){if(t){const r=this.#p,s=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((o,i)=>o!==r[i]));return(!this.#o||this.#e!==this.#i||s||t!==this.#a)&&(this.#a=t,this.#i=this.#e,n!==void 0&&(this.#p=n),this.#o=Te(this.#o,t(e))),this.#o}return e}#h(e){const t=new Map;this.#r.forEach(r=>{const s=r.options.queryHash;if(!s)return;const o=t.get(s);o?o.push(r):t.set(s,[r])});const n=[];return e.forEach(r=>{const s=this.#t.defaultQueryOptions(r),i=t.get(s.queryHash)?.shift()??new $n(this.#t,s);n.push({defaultedQueryOptions:s,observer:i})}),n}#c(e,t){const n=this.#r.indexOf(e);n!==-1&&(this.#e=Tn(this.#e,n,t),this.#f())}#f(){if(this.hasListeners()){const e=this.#o,t=this.#d(this.#e,this.#l),n=this.#u(t,this.#s?.combine);e!==n&&P.batch(()=>{this.listeners.forEach(r=>{r(this.#e)})})}}},An=class extends J{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const r=t.queryKey,s=t.queryHash??Ie(r,t);let o=this.get(s);return o||(o=new Mn({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){P.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Je(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Je(e,n)):t}notify(e){P.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){P.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){P.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ca=class{#t;#e;#n;#s;#r;#o;#a;#i;constructor(e={}){this.#t=e.queryCache||new An,this.#e=e.mutationCache||new In,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=Re.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#i=de.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#t.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(F(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#t.get(r.queryHash)?.state.data,i=mn(t,o);if(i!==void 0)return this.#t.build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return P.batch(()=>this.#t.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;P.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return P.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=P.batch(()=>this.#t.findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(A).catch(A)}invalidateQueries(e,t={}){return P.batch(()=>(this.#t.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=P.batch(()=>this.#t.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(A)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(A)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(F(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(A).catch(A)}fetchInfiniteQuery(e){return e.behavior=Ye(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(A).catch(A)}ensureInfiniteQueryData(e){return e.behavior=Ye(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return de.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(V(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{te(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(V(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{te(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ie(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ae&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}};function l(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const u=i.prototype,h=Object.keys(u);for(let d=0;d<h.length;d++){const f=h[d];f in a||(a[f]=u[f].bind(a))}}const s=n?.Parent??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function i(a){var c;const u=n?.Parent?new o:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const h of u._zod.deferred)h();return u}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class B extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Tt extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const At={};function N(e){return At}function Rt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function Ze(e,t){return typeof t=="bigint"?t.toString():t}function xe(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Fe(e){return e==null}function Ne(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Rn(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let s=(r.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(s=Number.parseInt(c[1]))}const o=n>s?n:s,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}const nt=Symbol("evaluating");function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==nt)return r===void 0&&(r=nt,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function H(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function U(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function rt(e){return JSON.stringify(e)}function jn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const jt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function fe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const xn=xe(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function W(e){if(fe(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(fe(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function xt(e){return W(e)?{...e}:Array.isArray(e)?[...e]:e}const Fn=new Set(["string","number","symbol"]);function ge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function m(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Nn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Dn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Un(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=U(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=n.shape[a])}return H(this,"shape",i),i},checks:[]});return L(e,o)}function Ln(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=U(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return H(this,"shape",i),i},checks:[]});return L(e,o)}function Qn(e,t){if(!W(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=U(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return H(this,"shape",o),o}});return L(e,s)}function Vn(e,t){if(!W(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=U(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return H(this,"shape",r),r}});return L(e,n)}function Jn(e,t){const n=U(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return H(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return L(e,n)}function Hn(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=U(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return H(this,"shape",c),c},checks:[]});return L(t,i)}function qn(e,t,n){const r=U(t._zod.def,{get shape(){const s=t._zod.def.shape,o={...s};if(n)for(const i in n){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=new e({type:"nonoptional",innerType:s[i]}))}else for(const i in s)o[i]=new e({type:"nonoptional",innerType:s[i]});return H(this,"shape",o),o}});return L(t,r)}function q(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function K(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ue(e){return typeof e=="string"?e:e?.message}function D(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=ue(e.inst?._zod.def?.error?.(e))??ue(t?.error?.(e))??ue(n.customError?.(e))??ue(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function De(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function re(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Ft=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ze,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Nt=l("$ZodError",Ft),Dt=l("$ZodError",Ft,{Parent:Error});function Kn(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function Bn(e,t=n=>n.message){const n={_errors:[]},r=s=>{for(const o of s.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(i=>r({issues:i}));else if(o.code==="invalid_key")r({issues:o.issues});else if(o.code==="invalid_element")r({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let i=n,a=0;for(;a<o.path.length;){const c=o.path[a];a===o.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(o))):i[c]=i[c]||{_errors:[]},i=i[c],a++}}};return r(e),n}const Ue=e=>(t,n,r,s)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new B;if(i.issues.length){const a=new(s?.Err??e)(i.issues.map(c=>D(c,o,N())));throw jt(a,s?.callee),a}return i.value},Le=e=>async(t,n,r,s)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(s?.Err??e)(i.issues.map(c=>D(c,o,N())));throw jt(a,s?.callee),a}return i.value},ye=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new B;return o.issues.length?{success:!1,error:new(e??Nt)(o.issues.map(i=>D(i,s,N())))}:{success:!0,data:o.value}},Gn=ye(Dt),_e=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(i=>D(i,s,N())))}:{success:!0,data:o.value}},Wn=_e(Dt),Xn=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ue(e)(t,n,s)},Yn=e=>(t,n,r)=>Ue(e)(t,n,r),er=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Le(e)(t,n,s)},tr=e=>async(t,n,r)=>Le(e)(t,n,r),nr=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ye(e)(t,n,s)},rr=e=>(t,n,r)=>ye(e)(t,n,r),sr=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return _e(e)(t,n,s)},or=e=>async(t,n,r)=>_e(e)(t,n,r),ir=/^[cC][^\s-]{8,}$/,ar=/^[0-9a-z]+$/,cr=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ur=/^[0-9a-vA-V]{20}$/,hr=/^[A-Za-z0-9]{27}$/,lr=/^[a-zA-Z0-9_-]{21}$/,dr=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,fr=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,st=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,pr=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vr(){return new RegExp(mr,"u")}const gr=/^(?:(?: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])$/,yr=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,_r=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,br=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wr=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ut=/^[A-Za-z0-9_-]*$/,zr=/^\+[1-9]\d{6,14}$/,Lt="(?:(?:\\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])))",kr=new RegExp(`^${Lt}$`);function Qt(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Or(e){return new RegExp(`^${Qt(e)}$`)}function Sr(e){const t=Qt({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Lt}T(?:${r})$`)}const Mr=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},$r=/^-?\d+$/,Vt=/^-?\d+(?:\.\d+)?$/,Pr=/^(?:true|false)$/i,Zr=/^[^A-Z]*$/,Er=/^[^a-z]*$/,C=l("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Jt={number:"number",bigint:"bigint",object:"date"},Ht=l("$ZodCheckLessThan",(e,t)=>{C.init(e,t);const n=Jt[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,o=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qt=l("$ZodCheckGreaterThan",(e,t)=>{C.init(e,t);const n=Jt[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,o=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cr=l("$ZodCheckMultipleOf",(e,t)=>{C.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Rn(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ir=l("$ZodCheckNumberFormat",(e,t)=>{C.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,o]=Dn[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=s,a.maximum=o,n&&(a.pattern=$r)}),e._zod.check=i=>{const a=i.value;if(n){if(!Number.isInteger(a)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}a<s&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),a>o&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Tr=l("$ZodCheckMaxLength",(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Fe(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const i=De(s);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Ar=l("$ZodCheckMinLength",(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Fe(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const i=De(s);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Rr=l("$ZodCheckLengthEquals",(e,t)=>{var n;C.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Fe(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,o=s.length;if(o===t.length)return;const i=De(s),a=o>t.length;r.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),be=l("$ZodCheckStringFormat",(e,t)=>{var n,r;C.init(e,t),e._zod.onattach.push(s=>{const o=s._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),jr=l("$ZodCheckRegex",(e,t)=>{be.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),xr=l("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Zr),be.init(e,t)}),Fr=l("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Er),be.init(e,t)}),Nr=l("$ZodCheckIncludes",(e,t)=>{C.init(e,t);const n=ge(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Dr=l("$ZodCheckStartsWith",(e,t)=>{C.init(e,t);const n=new RegExp(`^${ge(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Ur=l("$ZodCheckEndsWith",(e,t)=>{C.init(e,t);const n=new RegExp(`.*${ge(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Lr=l("$ZodCheckOverwrite",(e,t)=>{C.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Qr{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2
+ `).filter(i=>i),s=Math.min(...r.map(i=>i.length-i.trimStart().length)),o=r.map(i=>i.slice(s)).map(i=>" ".repeat(this.indent*2)+i);for(const i of o)this.content.push(i)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,s.join(`
3
+ `))}}const Vr={major:4,minor:3,patch:6},b=l("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Vr;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const o of s._zod.onattach)o(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(i,a,c)=>{let u=q(i),h;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(i))continue}else if(u)continue;const f=i.issues.length,p=d._zod.check(i);if(p instanceof Promise&&c?.async===!1)throw new B;if(h||p instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await p,i.issues.length!==f&&(u||(u=q(i,f)))});else{if(i.issues.length===f)continue;u||(u=q(i,f))}}return h?h.then(()=>i):i},o=(i,a,c)=>{if(q(i))return i.aborted=!0,i;const u=s(a,r,c);if(u instanceof Promise){if(c.async===!1)throw new B;return u.then(h=>e._zod.parse(h,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(h=>o(h,i,a)):o(u,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new B;return c.then(u=>s(u,r,a))}return s(c,r,a)}}y(e,"~standard",()=>({validate:s=>{try{const o=Gn(e,s);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Wn(e,s).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Qe=l("$ZodString",(e,t)=>{b.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Mr(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),_=l("$ZodStringFormat",(e,t)=>{be.init(e,t),Qe.init(e,t)}),Jr=l("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fr),_.init(e,t)}),Hr=l("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=st(r))}else t.pattern??(t.pattern=st());_.init(e,t)}),qr=l("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=pr),_.init(e,t)}),Kr=l("$ZodURL",(e,t)=>{_.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Br=l("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vr()),_.init(e,t)}),Gr=l("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=lr),_.init(e,t)}),Wr=l("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ir),_.init(e,t)}),Xr=l("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ar),_.init(e,t)}),Yr=l("$ZodULID",(e,t)=>{t.pattern??(t.pattern=cr),_.init(e,t)}),es=l("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ur),_.init(e,t)}),ts=l("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=hr),_.init(e,t)}),ns=l("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Sr(t)),_.init(e,t)}),rs=l("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=kr),_.init(e,t)}),ss=l("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Or(t)),_.init(e,t)}),os=l("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=dr),_.init(e,t)}),is=l("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=gr),_.init(e,t),e._zod.bag.format="ipv4"}),as=l("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=yr),_.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),cs=l("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_r),_.init(e,t)}),us=l("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=br),_.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,o]=r;if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Kt(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const hs=l("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=wr),_.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Kt(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function ls(e){if(!Ut.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Kt(n)}const ds=l("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ut),_.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{ls(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),fs=l("$ZodE164",(e,t)=>{t.pattern??(t.pattern=zr),_.init(e,t)});function ps(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const ms=l("$ZodJWT",(e,t)=>{_.init(e,t),e._zod.check=n=>{ps(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Bt=l("$ZodNumber",(e,t)=>{b.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const o=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...o?{received:o}:{}}),n}}),vs=l("$ZodNumberFormat",(e,t)=>{Ir.init(e,t),Bt.init(e,t)}),gs=l("$ZodBoolean",(e,t)=>{b.init(e,t),e._zod.pattern=Pr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),ys=l("$ZodAny",(e,t)=>{b.init(e,t),e._zod.parse=n=>n}),_s=l("$ZodUnknown",(e,t)=>{b.init(e,t),e._zod.parse=n=>n}),bs=l("$ZodNever",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function ot(e,t,n){e.issues.length&&t.issues.push(...K(n,e.issues)),t.value[n]=e.value}const ws=l("$ZodArray",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const o=[];for(let i=0;i<s.length;i++){const a=s[i],c=t.element._zod.run({value:a,issues:[]},r);c instanceof Promise?o.push(c.then(u=>ot(u,n,i))):ot(c,n,i)}return o.length?Promise.all(o).then(()=>n):n}});function pe(e,t,n,r,s){if(e.issues.length){if(s&&!(n in r))return;t.issues.push(...K(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Gt(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Nn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Wt(e,t,n,r,s,o){const i=[],a=s.keySet,c=s.catchall._zod,u=c.def.type,h=c.optout==="optional";for(const d in t){if(a.has(d))continue;if(u==="never"){i.push(d);continue}const f=c.run({value:t[d],issues:[]},r);f instanceof Promise?e.push(f.then(p=>pe(p,n,d,t,h))):pe(f,n,d,t,h)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const zs=l("$ZodObject",(e,t)=>{if(b.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=xe(()=>Gt(t));y(e._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const h=a[u]._zod;if(h.values){c[u]??(c[u]=new Set);for(const d of h.values)c[u].add(d)}}return c});const s=fe,o=t.catchall;let i;e._zod.parse=(a,c)=>{i??(i=r.value);const u=a.value;if(!s(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const h=[],d=i.shape;for(const f of i.keys){const p=d[f],g=p._zod.optout==="optional",v=p._zod.run({value:u[f],issues:[]},c);v instanceof Promise?h.push(v.then(O=>pe(O,a,f,u,g))):pe(v,a,f,u,g)}return o?Wt(h,u,a,c,r.value,e):h.length?Promise.all(h).then(()=>a):a}}),ks=l("$ZodObjectJIT",(e,t)=>{zs.init(e,t);const n=e._zod.parse,r=xe(()=>Gt(t)),s=f=>{const p=new Qr(["shape","payload","ctx"]),g=r.value,v=S=>{const k=rt(S);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};p.write("const input = payload.value;");const O=Object.create(null);let Z=0;for(const S of g.keys)O[S]=`key_${Z++}`;p.write("const newResult = {};");for(const S of g.keys){const k=O[S],$=rt(S),x=f[S]?._zod?.optout==="optional";p.write(`const ${k} = ${v(S)};`),x?p.write(`
4
+ if (${k}.issues.length) {
5
+ if (${$} in input) {
6
+ payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
7
+ ...iss,
8
+ path: iss.path ? [${$}, ...iss.path] : [${$}]
9
+ })));
10
+ }
11
+ }
12
+
13
+ if (${k}.value === undefined) {
14
+ if (${$} in input) {
15
+ newResult[${$}] = undefined;
16
+ }
17
+ } else {
18
+ newResult[${$}] = ${k}.value;
19
+ }
20
+
21
+ `):p.write(`
22
+ if (${k}.issues.length) {
23
+ payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
24
+ ...iss,
25
+ path: iss.path ? [${$}, ...iss.path] : [${$}]
26
+ })));
27
+ }
28
+
29
+ if (${k}.value === undefined) {
30
+ if (${$} in input) {
31
+ newResult[${$}] = undefined;
32
+ }
33
+ } else {
34
+ newResult[${$}] = ${k}.value;
35
+ }
36
+
37
+ `)}p.write("payload.value = newResult;"),p.write("return payload;");const I=p.compile();return(S,k)=>I(f,S,k)};let o;const i=fe,a=!At.jitless,u=a&&xn.value,h=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=r.value);const g=f.value;return i(g)?a&&u&&p?.async===!1&&p.jitless!==!0?(o||(o=s(t.shape)),f=o(f,p),h?Wt([],g,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function it(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const s=e.filter(o=>!q(o));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(i=>D(i,r,N())))}),t)}const Os=l("$ZodUnion",(e,t)=>{b.init(e,t),y(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),y(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),y(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),y(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${s.map(o=>Ne(o.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return r(s,o);let i=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:s.value,issues:[]},o);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(c=>it(c,s,e,o)):it(a,s,e,o)}}),Ss=l("$ZodIntersection",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,o=t.left._zod.run({value:s,issues:[]},r),i=t.right._zod.run({value:s,issues:[]},r);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([c,u])=>at(n,c,u)):at(n,o,i)}});function Ee(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(W(e)&&W(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),s={...e,...t};for(const o of r){const i=Ee(e[o],t[o]);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};s[o]=i.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=e[r],o=t[r],i=Ee(s,o);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function at(e,t,n){const r=new Map;let s;for(const a of t.issues)if(a.code==="unrecognized_keys"){s??(s=a);for(const c of a.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(a);const o=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&s&&e.issues.push({...s,keys:o}),q(e))return e;const i=Ee(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const Ms=l("$ZodRecord",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!W(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[],i=t.keyType._zod.values;if(i){n.value={};const a=new Set;for(const u of i)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);const h=t.valueType._zod.run({value:s[u],issues:[]},r);h instanceof Promise?o.push(h.then(d=>{d.issues.length&&n.issues.push(...K(u,d.issues)),n.value[u]=d.value})):(h.issues.length&&n.issues.push(...K(u,h.issues)),n.value[u]=h.value)}let c;for(const u in s)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:c})}else{n.value={};for(const a of Reflect.ownKeys(s)){if(a==="__proto__")continue;let c=t.keyType._zod.run({value:a,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Vt.test(a)&&c.issues.length){const d=t.keyType._zod.run({value:Number(a),issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?n.value[a]=s[a]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>D(d,r,N())),input:a,path:[a],inst:e});continue}const h=t.valueType._zod.run({value:s[a],issues:[]},r);h instanceof Promise?o.push(h.then(d=>{d.issues.length&&n.issues.push(...K(a,d.issues)),n.value[c.value]=d.value})):(h.issues.length&&n.issues.push(...K(a,h.issues)),n.value[c.value]=h.value)}}return o.length?Promise.all(o).then(()=>n):n}}),$s=l("$ZodEnum",(e,t)=>{b.init(e,t);const n=Rt(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>Fn.has(typeof s)).map(s=>typeof s=="string"?ge(s):s.toString()).join("|")})$`),e._zod.parse=(s,o)=>{const i=s.value;return r.has(i)||s.issues.push({code:"invalid_value",values:n,input:i,inst:e}),s}}),Ps=l("$ZodTransform",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Tt(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(i=>(n.value=i,n));if(s instanceof Promise)throw new B;return n.value=s,n}});function ct(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Xt=l("$ZodOptional",(e,t)=>{b.init(e,t),e._zod.optin="optional",e._zod.optout="optional",y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),y(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ne(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(o=>ct(o,n.value)):ct(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Zs=l("$ZodExactOptional",(e,t)=>{Xt.init(e,t),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Es=l("$ZodNullable",(e,t)=>{b.init(e,t),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ne(n.source)}|null)$`):void 0}),y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Cs=l("$ZodDefault",(e,t)=>{b.init(e,t),e._zod.optin="optional",y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(o=>ut(o,t)):ut(s,t)}});function ut(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Is=l("$ZodPrefault",(e,t)=>{b.init(e,t),e._zod.optin="optional",y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Ts=l("$ZodNonOptional",(e,t)=>{b.init(e,t),y(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(o=>ht(o,e)):ht(s,e)}});function ht(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const As=l("$ZodCatch",(e,t)=>{b.init(e,t),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>D(i,r,N()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(o=>D(o,r,N()))},input:n.value}),n.issues=[]),n)}}),Rs=l("$ZodPipe",(e,t)=>{b.init(e,t),y(e._zod,"values",()=>t.in._zod.values),y(e._zod,"optin",()=>t.in._zod.optin),y(e._zod,"optout",()=>t.out._zod.optout),y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(i=>he(i,t.in,r)):he(o,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(o=>he(o,t.out,r)):he(s,t.out,r)}});function he(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const js=l("$ZodReadonly",(e,t)=>{b.init(e,t),y(e._zod,"propValues",()=>t.innerType._zod.propValues),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"optin",()=>t.innerType?._zod?.optin),y(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(lt):lt(s)}});function lt(e){return e.value=Object.freeze(e.value),e}const xs=l("$ZodCustom",(e,t)=>{C.init(e,t),b.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(o=>dt(o,n,r,e));dt(s,n,r,e)}});function dt(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(re(s))}}var ft;class Fs{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ns(){return new Fs}(ft=globalThis).__zod_globalRegistry??(ft.__zod_globalRegistry=Ns());const ee=globalThis.__zod_globalRegistry;function Ds(e,t){return new e({type:"string",...m(t)})}function Us(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...m(t)})}function pt(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...m(t)})}function Ls(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...m(t)})}function Qs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...m(t)})}function Vs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...m(t)})}function Js(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...m(t)})}function Hs(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...m(t)})}function qs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...m(t)})}function Ks(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...m(t)})}function Bs(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...m(t)})}function Gs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...m(t)})}function Ws(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...m(t)})}function Xs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...m(t)})}function Ys(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...m(t)})}function eo(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...m(t)})}function to(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...m(t)})}function no(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...m(t)})}function ro(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...m(t)})}function so(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...m(t)})}function oo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...m(t)})}function io(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...m(t)})}function ao(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...m(t)})}function co(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...m(t)})}function uo(e,t){return new e({type:"string",format:"date",check:"string_format",...m(t)})}function ho(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...m(t)})}function lo(e,t){return new e({type:"string",format:"duration",check:"string_format",...m(t)})}function fo(e,t){return new e({type:"number",checks:[],...m(t)})}function po(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...m(t)})}function mo(e,t){return new e({type:"boolean",...m(t)})}function vo(e){return new e({type:"any"})}function go(e){return new e({type:"unknown"})}function yo(e,t){return new e({type:"never",...m(t)})}function mt(e,t){return new Ht({check:"less_than",...m(t),value:e,inclusive:!1})}function we(e,t){return new Ht({check:"less_than",...m(t),value:e,inclusive:!0})}function vt(e,t){return new qt({check:"greater_than",...m(t),value:e,inclusive:!1})}function ze(e,t){return new qt({check:"greater_than",...m(t),value:e,inclusive:!0})}function gt(e,t){return new Cr({check:"multiple_of",...m(t),value:e})}function Yt(e,t){return new Tr({check:"max_length",...m(t),maximum:e})}function me(e,t){return new Ar({check:"min_length",...m(t),minimum:e})}function en(e,t){return new Rr({check:"length_equals",...m(t),length:e})}function _o(e,t){return new jr({check:"string_format",format:"regex",...m(t),pattern:e})}function bo(e){return new xr({check:"string_format",format:"lowercase",...m(e)})}function wo(e){return new Fr({check:"string_format",format:"uppercase",...m(e)})}function zo(e,t){return new Nr({check:"string_format",format:"includes",...m(t),includes:e})}function ko(e,t){return new Dr({check:"string_format",format:"starts_with",...m(t),prefix:e})}function Oo(e,t){return new Ur({check:"string_format",format:"ends_with",...m(t),suffix:e})}function X(e){return new Lr({check:"overwrite",tx:e})}function So(e){return X(t=>t.normalize(e))}function Mo(){return X(e=>e.trim())}function $o(){return X(e=>e.toLowerCase())}function Po(){return X(e=>e.toUpperCase())}function Zo(){return X(e=>jn(e))}function Eo(e,t,n){return new e({type:"array",element:t,...m(n)})}function Co(e,t,n){return new e({type:"custom",check:"custom",fn:t,...m(n)})}function Io(e){const t=To(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(re(r,n.value,t._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(re(s))}},e(n.value,n)));return t}function To(e,t){const n=new C({check:"custom",...m(t)});return n._zod.check=e,n}function tn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ee,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function M(e,t,n={path:[],schemaPath:[]}){var r;const s=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,h);else{const f=i.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,h)}const d=e._zod.parent;d&&(i.ref||(i.ref=d),M(d,t,h),t.seen.get(d).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),t.io==="input"&&E(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function nn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const i of e.seen.entries()){const a=e.metadataRegistry.get(i[0])?.id;if(a){const c=r.get(a);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,i[0])}}const s=i=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(i[0])?.id,f=e.external.uri??(g=>g);if(d)return{ref:f(d)};const p=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(i[1]===n)return{ref:"#"};const u=`#/${a}/`,h=i[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:u+h}},o=i=>{if(i[1].schema.$ref)return;const a=i[1],{ref:c,defId:u}=s(i);a.def={...a.schema},u&&(a.defId=u);const h=a.schema;for(const d in h)delete h[d];h.$ref=c};if(e.cycles==="throw")for(const i of e.seen.entries()){const a=i[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
38
+
39
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const a=i[1];if(t===i[0]){o(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){o(i);continue}}if(e.metadataRegistry.get(i[0])?.id){o(i);continue}if(a.cycle){o(i);continue}if(a.count>1&&e.reused==="ref"){o(i);continue}}}function rn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=i=>{const a=e.seen.get(i);if(a.ref===null)return;const c=a.def??a.schema,u={...c},h=a.ref;if(a.ref=null,h){r(h);const f=e.seen.get(h),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Object.assign(c,p),Object.assign(c,u),i._zod.parent===h)for(const v in c)v==="$ref"||v==="allOf"||v in u||delete c[v];if(p.$ref&&f.def)for(const v in c)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(c[v])===JSON.stringify(f.def[v])&&delete c[v]}const d=i._zod.parent;if(d&&d!==h){r(d);const f=e.seen.get(d);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(const p in c)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(c[p])===JSON.stringify(f.def[p])&&delete c[p]}e.override({zodSchema:i,jsonSchema:c,path:a.path??[]})};for(const i of[...e.seen.entries()].reverse())r(i[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(i)}Object.assign(s,n.def??n.schema);const o=e.external?.defs??{};for(const i of e.seen.entries()){const a=i[1];a.def&&a.defId&&(o[a.defId]=a.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?s.$defs=o:s.definitions=o);try{const i=JSON.parse(JSON.stringify(s));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:ve(t,"input",e.processors),output:ve(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function E(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return E(r.element,n);if(r.type==="set")return E(r.valueType,n);if(r.type==="lazy")return E(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return E(r.innerType,n);if(r.type==="intersection")return E(r.left,n)||E(r.right,n);if(r.type==="record"||r.type==="map")return E(r.keyType,n)||E(r.valueType,n);if(r.type==="pipe")return E(r.in,n)||E(r.out,n);if(r.type==="object"){for(const s in r.shape)if(E(r.shape[s],n))return!0;return!1}if(r.type==="union"){for(const s of r.options)if(E(s,n))return!0;return!1}if(r.type==="tuple"){for(const s of r.items)if(E(s,n))return!0;return!!(r.rest&&E(r.rest,n))}return!1}const Ao=(e,t={})=>n=>{const r=tn({...n,processors:t});return M(e,r),nn(r,e),rn(r,e)},ve=(e,t,n={})=>r=>{const{libraryOptions:s,target:o}=r??{},i=tn({...s??{},target:o,io:t,processors:n});return M(e,i),nn(i,e),rn(i,e)},Ro={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},jo=(e,t,n,r)=>{const s=n;s.type="string";const{minimum:o,maximum:i,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(s.minLength=o),typeof i=="number"&&(s.maxLength=i),a&&(s.format=Ro[a]??a,s.format===""&&delete s.format,a==="time"&&delete s.format),u&&(s.contentEncoding=u),c&&c.size>0){const h=[...c];h.length===1?s.pattern=h[0].source:h.length>1&&(s.allOf=[...h.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},xo=(e,t,n,r)=>{const s=n,{minimum:o,maximum:i,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:h}=e._zod.bag;typeof a=="string"&&a.includes("int")?s.type="integer":s.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=h,s.exclusiveMinimum=!0):s.exclusiveMinimum=h),typeof o=="number"&&(s.minimum=o,typeof h=="number"&&t.target!=="draft-04"&&(h>=o?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof i=="number"&&(s.maximum=i,typeof u=="number"&&t.target!=="draft-04"&&(u<=i?delete s.maximum:delete s.exclusiveMaximum)),typeof c=="number"&&(s.multipleOf=c)},Fo=(e,t,n,r)=>{n.type="boolean"},No=(e,t,n,r)=>{n.not={}},Do=(e,t,n,r)=>{},Uo=(e,t,n,r)=>{},Lo=(e,t,n,r)=>{const s=e._zod.def,o=Rt(s.entries);o.every(i=>typeof i=="number")&&(n.type="number"),o.every(i=>typeof i=="string")&&(n.type="string"),n.enum=o},Qo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Vo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Jo=(e,t,n,r)=>{const s=n,o=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(s.minItems=i),typeof a=="number"&&(s.maxItems=a),s.type="array",s.items=M(o.element,t,{...r,path:[...r.path,"items"]})},Ho=(e,t,n,r)=>{const s=n,o=e._zod.def;s.type="object",s.properties={};const i=o.shape;for(const u in i)s.properties[u]=M(i[u],t,{...r,path:[...r.path,"properties",u]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(u=>{const h=o.shape[u]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));c.size>0&&(s.required=Array.from(c)),o.catchall?._zod.def.type==="never"?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=M(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},qo=(e,t,n,r)=>{const s=e._zod.def,o=s.inclusive===!1,i=s.options.map((a,c)=>M(a,t,{...r,path:[...r.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=i:n.anyOf=i},Ko=(e,t,n,r)=>{const s=e._zod.def,o=M(s.left,t,{...r,path:[...r.path,"allOf",0]}),i=M(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(o)?o.allOf:[o],...a(i)?i.allOf:[i]];n.allOf=c},Bo=(e,t,n,r)=>{const s=n,o=e._zod.def;s.type="object";const i=o.keyType,c=i._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){const h=M(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(const d of c)s.patternProperties[d.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=M(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=M(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=i._zod.values;if(u){const h=[...u].filter(d=>typeof d=="string"||typeof d=="number");h.length>0&&(s.required=h)}},Go=(e,t,n,r)=>{const s=e._zod.def,o=M(s.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=s.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Wo=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const o=t.seen.get(e);o.ref=s.innerType},Xo=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const o=t.seen.get(e);o.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},Yo=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const o=t.seen.get(e);o.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},ei=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const o=t.seen.get(e);o.ref=s.innerType;let i;try{i=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},ti=(e,t,n,r)=>{const s=e._zod.def,o=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;M(o,t,r);const i=t.seen.get(e);i.ref=o},ni=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const o=t.seen.get(e);o.ref=s.innerType,n.readOnly=!0},sn=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const o=t.seen.get(e);o.ref=s.innerType},ri=l("ZodISODateTime",(e,t)=>{ns.init(e,t),z.init(e,t)});function si(e){return co(ri,e)}const oi=l("ZodISODate",(e,t)=>{rs.init(e,t),z.init(e,t)});function ii(e){return uo(oi,e)}const ai=l("ZodISOTime",(e,t)=>{ss.init(e,t),z.init(e,t)});function ci(e){return ho(ai,e)}const ui=l("ZodISODuration",(e,t)=>{os.init(e,t),z.init(e,t)});function hi(e){return lo(ui,e)}const li=(e,t)=>{Nt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Bn(e,n)},flatten:{value:n=>Kn(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ze,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ze,2)}},isEmpty:{get(){return e.issues.length===0}}})},j=l("ZodError",li,{Parent:Error}),di=Ue(j),fi=Le(j),pi=ye(j),mi=_e(j),vi=Xn(j),gi=Yn(j),yi=er(j),_i=tr(j),bi=nr(j),wi=rr(j),zi=sr(j),ki=or(j),w=l("ZodType",(e,t)=>(b.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ve(e,"input"),output:ve(e,"output")}}),e.toJSONSchema=Ao(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(U(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>L(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>di(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>pi(e,n,r),e.parseAsync=async(n,r)=>fi(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>mi(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>vi(e,n,r),e.decode=(n,r)=>gi(e,n,r),e.encodeAsync=async(n,r)=>yi(e,n,r),e.decodeAsync=async(n,r)=>_i(e,n,r),e.safeEncode=(n,r)=>bi(e,n,r),e.safeDecode=(n,r)=>wi(e,n,r),e.safeEncodeAsync=async(n,r)=>zi(e,n,r),e.safeDecodeAsync=async(n,r)=>ki(e,n,r),e.refine=(n,r)=>e.check(_a(n,r)),e.superRefine=n=>e.check(ba(n)),e.overwrite=n=>e.check(X(n)),e.optional=()=>wt(e),e.exactOptional=()=>ia(e),e.nullable=()=>zt(e),e.nullish=()=>wt(zt(e)),e.nonoptional=n=>da(e,n),e.array=()=>Bi(e),e.or=n=>Xi([e,n]),e.and=n=>ea(e,n),e.transform=n=>kt(e,sa(n)),e.default=n=>ua(e,n),e.prefault=n=>la(e,n),e.catch=n=>pa(e,n),e.pipe=n=>kt(e,n),e.readonly=()=>ga(e),e.describe=n=>{const r=e.clone();return ee.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ee.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ee.get(e);const r=e.clone();return ee.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),on=l("_ZodString",(e,t)=>{Qe.init(e,t),w.init(e,t),e._zod.processJSONSchema=(r,s,o)=>jo(e,r,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(_o(...r)),e.includes=(...r)=>e.check(zo(...r)),e.startsWith=(...r)=>e.check(ko(...r)),e.endsWith=(...r)=>e.check(Oo(...r)),e.min=(...r)=>e.check(me(...r)),e.max=(...r)=>e.check(Yt(...r)),e.length=(...r)=>e.check(en(...r)),e.nonempty=(...r)=>e.check(me(1,...r)),e.lowercase=r=>e.check(bo(r)),e.uppercase=r=>e.check(wo(r)),e.trim=()=>e.check(Mo()),e.normalize=(...r)=>e.check(So(...r)),e.toLowerCase=()=>e.check($o()),e.toUpperCase=()=>e.check(Po()),e.slugify=()=>e.check(Zo())}),Oi=l("ZodString",(e,t)=>{Qe.init(e,t),on.init(e,t),e.email=n=>e.check(Us(Si,n)),e.url=n=>e.check(Hs(Mi,n)),e.jwt=n=>e.check(ao(Ui,n)),e.emoji=n=>e.check(qs($i,n)),e.guid=n=>e.check(pt(yt,n)),e.uuid=n=>e.check(Ls(le,n)),e.uuidv4=n=>e.check(Qs(le,n)),e.uuidv6=n=>e.check(Vs(le,n)),e.uuidv7=n=>e.check(Js(le,n)),e.nanoid=n=>e.check(Ks(Pi,n)),e.guid=n=>e.check(pt(yt,n)),e.cuid=n=>e.check(Bs(Zi,n)),e.cuid2=n=>e.check(Gs(Ei,n)),e.ulid=n=>e.check(Ws(Ci,n)),e.base64=n=>e.check(so(Fi,n)),e.base64url=n=>e.check(oo(Ni,n)),e.xid=n=>e.check(Xs(Ii,n)),e.ksuid=n=>e.check(Ys(Ti,n)),e.ipv4=n=>e.check(eo(Ai,n)),e.ipv6=n=>e.check(to(Ri,n)),e.cidrv4=n=>e.check(no(ji,n)),e.cidrv6=n=>e.check(ro(xi,n)),e.e164=n=>e.check(io(Di,n)),e.datetime=n=>e.check(si(n)),e.date=n=>e.check(ii(n)),e.time=n=>e.check(ci(n)),e.duration=n=>e.check(hi(n))});function Ia(e){return Ds(Oi,e)}const z=l("ZodStringFormat",(e,t)=>{_.init(e,t),on.init(e,t)}),Si=l("ZodEmail",(e,t)=>{qr.init(e,t),z.init(e,t)}),yt=l("ZodGUID",(e,t)=>{Jr.init(e,t),z.init(e,t)}),le=l("ZodUUID",(e,t)=>{Hr.init(e,t),z.init(e,t)}),Mi=l("ZodURL",(e,t)=>{Kr.init(e,t),z.init(e,t)}),$i=l("ZodEmoji",(e,t)=>{Br.init(e,t),z.init(e,t)}),Pi=l("ZodNanoID",(e,t)=>{Gr.init(e,t),z.init(e,t)}),Zi=l("ZodCUID",(e,t)=>{Wr.init(e,t),z.init(e,t)}),Ei=l("ZodCUID2",(e,t)=>{Xr.init(e,t),z.init(e,t)}),Ci=l("ZodULID",(e,t)=>{Yr.init(e,t),z.init(e,t)}),Ii=l("ZodXID",(e,t)=>{es.init(e,t),z.init(e,t)}),Ti=l("ZodKSUID",(e,t)=>{ts.init(e,t),z.init(e,t)}),Ai=l("ZodIPv4",(e,t)=>{is.init(e,t),z.init(e,t)}),Ri=l("ZodIPv6",(e,t)=>{as.init(e,t),z.init(e,t)}),ji=l("ZodCIDRv4",(e,t)=>{cs.init(e,t),z.init(e,t)}),xi=l("ZodCIDRv6",(e,t)=>{us.init(e,t),z.init(e,t)}),Fi=l("ZodBase64",(e,t)=>{hs.init(e,t),z.init(e,t)}),Ni=l("ZodBase64URL",(e,t)=>{ds.init(e,t),z.init(e,t)}),Di=l("ZodE164",(e,t)=>{fs.init(e,t),z.init(e,t)}),Ui=l("ZodJWT",(e,t)=>{ms.init(e,t),z.init(e,t)}),an=l("ZodNumber",(e,t)=>{Bt.init(e,t),w.init(e,t),e._zod.processJSONSchema=(r,s,o)=>xo(e,r,s),e.gt=(r,s)=>e.check(vt(r,s)),e.gte=(r,s)=>e.check(ze(r,s)),e.min=(r,s)=>e.check(ze(r,s)),e.lt=(r,s)=>e.check(mt(r,s)),e.lte=(r,s)=>e.check(we(r,s)),e.max=(r,s)=>e.check(we(r,s)),e.int=r=>e.check(_t(r)),e.safe=r=>e.check(_t(r)),e.positive=r=>e.check(vt(0,r)),e.nonnegative=r=>e.check(ze(0,r)),e.negative=r=>e.check(mt(0,r)),e.nonpositive=r=>e.check(we(0,r)),e.multipleOf=(r,s)=>e.check(gt(r,s)),e.step=(r,s)=>e.check(gt(r,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ta(e){return fo(an,e)}const Li=l("ZodNumberFormat",(e,t)=>{vs.init(e,t),an.init(e,t)});function _t(e){return po(Li,e)}const Qi=l("ZodBoolean",(e,t)=>{gs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Fo(e,n,r)});function Aa(e){return mo(Qi,e)}const Vi=l("ZodAny",(e,t)=>{ys.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Do()});function Ra(){return vo(Vi)}const Ji=l("ZodUnknown",(e,t)=>{_s.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Uo()});function bt(){return go(Ji)}const Hi=l("ZodNever",(e,t)=>{bs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>No(e,n,r)});function qi(e){return yo(Hi,e)}const Ki=l("ZodArray",(e,t)=>{ws.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Jo(e,n,r,s),e.element=t.element,e.min=(n,r)=>e.check(me(n,r)),e.nonempty=n=>e.check(me(1,n)),e.max=(n,r)=>e.check(Yt(n,r)),e.length=(n,r)=>e.check(en(n,r)),e.unwrap=()=>e.element});function Bi(e,t){return Eo(Ki,e,t)}const Gi=l("ZodObject",(e,t)=>{ks.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ho(e,n,r,s),y(e,"shape",()=>t.shape),e.keyof=()=>na(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:bt()}),e.loose=()=>e.clone({...e._zod.def,catchall:bt()}),e.strict=()=>e.clone({...e._zod.def,catchall:qi()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Qn(e,n),e.safeExtend=n=>Vn(e,n),e.merge=n=>Jn(e,n),e.pick=n=>Un(e,n),e.omit=n=>Ln(e,n),e.partial=(...n)=>Hn(cn,e,n[0]),e.required=(...n)=>qn(un,e,n[0])});function ja(e,t){const n={type:"object",shape:e??{},...m(t)};return new Gi(n)}const Wi=l("ZodUnion",(e,t)=>{Os.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>qo(e,n,r,s),e.options=t.options});function Xi(e,t){return new Wi({type:"union",options:e,...m(t)})}const Yi=l("ZodIntersection",(e,t)=>{Ss.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ko(e,n,r,s)});function ea(e,t){return new Yi({type:"intersection",left:e,right:t})}const ta=l("ZodRecord",(e,t)=>{Ms.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Bo(e,n,r,s),e.keyType=t.keyType,e.valueType=t.valueType});function xa(e,t,n){return new ta({type:"record",keyType:e,valueType:t,...m(n)})}const Ce=l("ZodEnum",(e,t)=>{$s.init(e,t),w.init(e,t),e._zod.processJSONSchema=(r,s,o)=>Lo(e,r,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const o={};for(const i of r)if(n.has(i))o[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Ce({...t,checks:[],...m(s),entries:o})},e.exclude=(r,s)=>{const o={...t.entries};for(const i of r)if(n.has(i))delete o[i];else throw new Error(`Key ${i} not found in enum`);return new Ce({...t,checks:[],...m(s),entries:o})}});function na(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ce({type:"enum",entries:n,...m(t)})}const ra=l("ZodTransform",(e,t)=>{Ps.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Vo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Tt(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(re(o,n.value,t));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(re(i))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(o=>(n.value=o,n)):(n.value=s,n)}});function sa(e){return new ra({type:"transform",transform:e})}const cn=l("ZodOptional",(e,t)=>{Xt.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>sn(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function wt(e){return new cn({type:"optional",innerType:e})}const oa=l("ZodExactOptional",(e,t)=>{Zs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>sn(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function ia(e){return new oa({type:"optional",innerType:e})}const aa=l("ZodNullable",(e,t)=>{Es.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Go(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function zt(e){return new aa({type:"nullable",innerType:e})}const ca=l("ZodDefault",(e,t)=>{Cs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Xo(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ua(e,t){return new ca({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():xt(t)}})}const ha=l("ZodPrefault",(e,t)=>{Is.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Yo(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function la(e,t){return new ha({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():xt(t)}})}const un=l("ZodNonOptional",(e,t)=>{Ts.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Wo(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function da(e,t){return new un({type:"nonoptional",innerType:e,...m(t)})}const fa=l("ZodCatch",(e,t)=>{As.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ei(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pa(e,t){return new fa({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ma=l("ZodPipe",(e,t)=>{Rs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ti(e,n,r,s),e.in=t.in,e.out=t.out});function kt(e,t){return new ma({type:"pipe",in:e,out:t})}const va=l("ZodReadonly",(e,t)=>{js.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>ni(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function ga(e){return new va({type:"readonly",innerType:e})}const ya=l("ZodCustom",(e,t)=>{xs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Qo(e,n)});function _a(e,t={}){return Co(ya,e,t)}function ba(e){return Io(e)}const hn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const ln=([e,t,n])=>{const r=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.keys(t).forEach(s=>{r.setAttribute(s,String(t[s]))}),n?.length&&n.forEach(s=>{const o=ln(s);r.appendChild(o)}),r},wa=(e,t={})=>{const r={...hn,...t};return ln(["svg",r,e])};const za=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ka=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Oa=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Sa=e=>{const t=Oa(e);return t.charAt(0).toUpperCase()+t.slice(1)};const Ma=e=>Array.from(e.attributes).reduce((t,n)=>(t[n.name]=n.value,t),{}),Ot=e=>typeof e=="string"?e:!e||!e.class?"":e.class&&typeof e.class=="string"?e.class.split(" "):e.class&&Array.isArray(e.class)?e.class:"",St=(e,{nameAttr:t,icons:n,attrs:r})=>{const s=e.getAttribute(t);if(s==null)return;const o=Sa(s),i=n[o];if(!i)return console.warn(`${e.outerHTML} icon name was not found in the provided icons object.`);const a=Ma(e),c=za(a)?{}:{"aria-hidden":"true"},u={...hn,"data-lucide":s,...c,...r,...a},h=Ot(a),d=Ot(r),f=ka("lucide",`lucide-${s}`,...h,...d);f&&Object.assign(u,{class:f});const p=wa(i,u);return e.parentNode?.replaceChild(p,e)};const Fa=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"}]];const Na=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}],["path",{d:"M10 12h4"}]];const Da=[["path",{d:"M3 19V5"}],["path",{d:"m13 6-6 6 6 6"}],["path",{d:"M7 12h14"}]];const Ua=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"}],["path",{d:"m9 12 2 2 4-4"}]];const La=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2"}],["path",{d:"M6 20h4"}],["path",{d:"M14 10h4"}],["path",{d:"M6 14h2v6"}],["path",{d:"M14 4h2v6"}]];const Qa=[["path",{d:"M12 7v14"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}]];const Va=[["path",{d:"M12 8V4H8"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}],["path",{d:"M2 14h2"}],["path",{d:"M20 14h2"}],["path",{d:"M15 13v2"}],["path",{d:"M9 13v2"}]];const Ja=[["path",{d:"M10 19.655A6 6 0 0 1 6 14v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 3.97"}],["path",{d:"M14 15.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];const Ha=[["path",{d:"M12 20v-9"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M22 13h-4"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];const qa=[["path",{d:"M20 6 9 17l-5-5"}]];const Ka=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 12-4-4-4 4"}],["path",{d:"M12 16V8"}]];const Ba=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];const Ga=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}],["path",{d:"M12 11h4"}],["path",{d:"M12 16h4"}],["path",{d:"M8 11h.01"}],["path",{d:"M8 16h.01"}]];const Wa=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6h4"}]];const Xa=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]];const Ya=[["line",{x1:"15",x2:"15",y1:"12",y2:"18"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];const ec=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];const tc=[["path",{d:"M12 20v2"}],["path",{d:"M12 2v2"}],["path",{d:"M17 20v2"}],["path",{d:"M17 2v2"}],["path",{d:"M2 12h2"}],["path",{d:"M2 17h2"}],["path",{d:"M2 7h2"}],["path",{d:"M20 12h2"}],["path",{d:"M20 17h2"}],["path",{d:"M20 7h2"}],["path",{d:"M7 20v2"}],["path",{d:"M7 2v2"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1"}]];const nc=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];const rc=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];const sc=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];const oc=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];const ic=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];const ac=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];const cc=[["path",{d:"M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473"}],["path",{d:"m16.5 3.5 5 5"}],["path",{d:"m21.5 3.5-5 5"}]];const uc=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];const hc=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M12 7v5l4 2"}]];const lc=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]];const dc=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];const fc=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"}]];const pc=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];const mc=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];const vc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];const gc=[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]];const yc=[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]];const _c=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"}]];const bc=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]];const wc=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1"}]];const zc=[["path",{d:"M12 17v4"}],["path",{d:"m14.305 7.53.923-.382"}],["path",{d:"m15.228 4.852-.923-.383"}],["path",{d:"m16.852 3.228-.383-.924"}],["path",{d:"m16.852 8.772-.383.923"}],["path",{d:"m19.148 3.228.383-.924"}],["path",{d:"m19.53 9.696-.382-.924"}],["path",{d:"m20.772 4.852.924-.383"}],["path",{d:"m20.772 7.148.924.383"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7"}],["path",{d:"M8 21h8"}],["circle",{cx:"18",cy:"6",r:"3"}]];const kc=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];const Oc=[["path",{d:"M11 7 6 2"}],["path",{d:"M18.992 12H2.041"}],["path",{d:"M21.145 18.38A3.34 3.34 0 0 1 20 16.5a3.3 3.3 0 0 1-1.145 1.88c-.575.46-.855 1.02-.855 1.595A2 2 0 0 0 20 22a2 2 0 0 0 2-2.025c0-.58-.285-1.13-.855-1.595"}],["path",{d:"m8.5 4.5 2.148-2.148a1.205 1.205 0 0 1 1.704 0l7.296 7.296a1.205 1.205 0 0 1 0 1.704l-7.592 7.592a3.615 3.615 0 0 1-5.112 0l-3.888-3.888a3.615 3.615 0 0 1 0-5.112L5.67 7.33"}]];const Sc=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"}]];const Mc=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]];const $c=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];const Pc=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]];const Zc=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"}],["path",{d:"m2 22 3-3"}],["path",{d:"M7.5 13.5 10 11"}],["path",{d:"M10.5 16.5 13 14"}],["path",{d:"m18 3-4 4h6l-4 4"}]];const Ec=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];const Cc=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478"}],["circle",{cx:"12",cy:"12",r:"2"}]];const Ic=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];const Tc=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];const Ac=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]];const Rc=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];const jc=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];const xc=[["path",{d:"M14 17H5"}],["path",{d:"M19 7h-9"}],["circle",{cx:"17",cy:"17",r:"3"}],["circle",{cx:"7",cy:"7",r:"3"}]];const Fc=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];const Nc=[["circle",{cx:"18",cy:"5",r:"3"}],["circle",{cx:"6",cy:"12",r:"3"}],["circle",{cx:"18",cy:"19",r:"3"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49"}]];const Dc=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M12 8v4"}],["path",{d:"M12 16h.01"}]];const Uc=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"m9 12 2 2 4-4"}]];const Lc=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]];const Qc=[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z"}],["path",{d:"M21 12h1"}],["path",{d:"M18.5 4.5 18 5"}],["path",{d:"M2 12h1"}],["path",{d:"M12 2v1"}],["path",{d:"m4.929 4.929.707.707"}],["path",{d:"M12 12v6"}]];const Vc=[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]];const Jc=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"}],["path",{d:"M20 2v4"}],["path",{d:"M22 4h-4"}],["circle",{cx:"4",cy:"20",r:"2"}]];const Hc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];const qc=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];const Kc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];const Bc=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]];const Gc=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2"}]];const Wc=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];const $a=({icons:e={},nameAttr:t="data-lucide",attrs:n={},root:r=document,inTemplates:s}={})=>{if(!Object.values(e).length)throw new Error(`Please provide an icons object.
40
+ If you want to use all the icons you can import it like:
41
+ \`import { createIcons, icons } from 'lucide';
42
+ lucide.createIcons({icons});\``);if(typeof r>"u")throw new Error("`createIcons()` only works in a browser environment.");if(Array.from(r.querySelectorAll(`[${t}]`)).forEach(i=>St(i,{nameAttr:t,icons:e,attrs:n})),s&&Array.from(r.querySelectorAll("template")).forEach(a=>$a({icons:e,nameAttr:t,attrs:n,root:a.content,inTemplates:s})),t==="data-lucide"){const i=r.querySelectorAll("[icon-name]");i.length>0&&(console.warn("[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide"),Array.from(i).forEach(a=>St(a,{nameAttr:"icon-name",icons:e,attrs:n})))}};export{pc as $,Ic as A,Cc as B,Ba as C,Ec as D,Zc as E,Pc as F,$c as G,Oc as H,kc as I,Sc as J,zc as K,yc as L,Za as M,wc as N,bc as O,Mc as P,$n as Q,Tc as R,Hc as S,Kc as T,Bc as U,_c as V,Gc as W,Wc as X,gc as Y,mc as Z,vc as _,P as a,fc as a0,dc as a1,lc as a2,hc as a3,ac as a4,ic as a5,cc as a6,uc as a7,oc as a8,rc as a9,nc as aa,tc as ab,sc as ac,Ya as ad,ec as ae,Wa as af,Xa as ag,Ga as ah,qa as ai,Qa as aj,Va as ak,Ja as al,Ha as am,La as an,Ua as ao,Ka as ap,Da as aq,Na as ar,Fa as as,Ca as at,Ea as b,Ia as c,Ra as d,Aa as e,Ta as f,Bi as g,$a as h,G as i,qc as j,Lc as k,Nc as l,Qc as m,A as n,ja as o,Jc as p,Vc as q,xa as r,Pa as s,Uc as t,Dc as u,xc as v,Fc as w,jc as x,Rc as y,Ac as z};
package/dist/index.html CHANGED
@@ -11,13 +11,13 @@
11
11
  href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Rubik:wght@500;700;800&family=Manrope:wght@400;500;600;700&display=swap"
12
12
  rel="stylesheet"
13
13
  />
14
- <script type="module" crossorigin src="/assets/index-CpH1IYO9.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-DvotFhS5.js"></script>
15
15
  <link rel="modulepreload" crossorigin href="/assets/preact-vendor-jo0muZ28.js">
16
- <link rel="modulepreload" crossorigin href="/assets/vendor-CdeM8LjL.js">
17
- <link rel="modulepreload" crossorigin href="/assets/react-query-PgFuErlI.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/vendor-B5SLbWPm.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/react-query-DqS47hY2.js">
18
18
  <link rel="modulepreload" crossorigin href="/assets/motion-BCvrfAt1.js">
19
19
  <link rel="modulepreload" crossorigin href="/assets/markdown-DMcD1LHz.js">
20
- <link rel="stylesheet" crossorigin href="/assets/index-4aX9RGDL.css">
20
+ <link rel="stylesheet" crossorigin href="/assets/index-DF-KLBYn.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="app"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frumu/tandem-panel",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Full web control center for Tandem Engine (chat, routines, swarm, memory, channels, and ops)",
5
5
  "type": "module",
6
6
  "bin": {