var S=e=>{throw TypeError(e)};var M=(e,t,s)=>t.has(e)||S("Cannot "+s);var i=(e,t,s)=>(M(e,t,"read from private field"),s?s.call(e):t.get(e)),f=(e,t,s)=>t.has(e)?S("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),p=(e,t,s,r)=>(M(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),y=(e,t,s)=>(M(e,t,"access private method"),s);import{a_ as R,c5 as x,cg as D,ch as K,a$ as _,aE as U,ce as q,b1 as L,cf as j}from"./D5Rz2KmZ.js";import{f as k,r as A,w as C,E as P,ae as Q,o as T}from"./BoWSoj4c.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cbae6609-6c8d-43f5-b700-5ad289acb1fb",e._sentryDebugIdIdentifier="sentry-dbid-cbae6609-6c8d-43f5-b700-5ad289acb1fb")}catch{}})();var c,b,o,a,u,w,E,I,$=(I=class extends R{constructor(t,s){super();f(this,u);f(this,c);f(this,b);f(this,o);f(this,a);p(this,c,t),this.setOptions(s),this.bindMethods(),y(this,u,w).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=i(this,c).defaultMutationOptions(t),x(this.options,s)||i(this,c).getMutationCache().notify({type:"observerOptionsUpdated",mutation:i(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&D(s.mutationKey)!==D(this.options.mutationKey)?this.reset():((r=i(this,o))==null?void 0:r.state.status)==="pending"&&i(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=i(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,u,w).call(this),y(this,u,E).call(this,t)}getCurrentResult(){return i(this,b)}reset(){var t;(t=i(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,u,w).call(this),y(this,u,E).call(this)}mutate(t,s){var r;return p(this,a,s),(r=i(this,o))==null||r.removeObserver(this),p(this,o,i(this,c).getMutationCache().build(i(this,c),this.options)),i(this,o).addObserver(this),i(this,o).execute(t)}},c=new WeakMap,b=new WeakMap,o=new WeakMap,a=new WeakMap,u=new WeakSet,w=function(){var s;const t=((s=i(this,o))==null?void 0:s.state)??K();p(this,b,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},E=function(t){_.batch(()=>{var s,r,l,h,m,v,g,n;if(i(this,a)&&this.hasListeners()){const d=i(this,b).variables,O=i(this,b).context;(t==null?void 0:t.type)==="success"?((r=(s=i(this,a)).onSuccess)==null||r.call(s,t.data,d,O),(h=(l=i(this,a)).onSettled)==null||h.call(l,t.data,null,d,O)):(t==null?void 0:t.type)==="error"&&((v=(m=i(this,a)).onError)==null||v.call(m,t.error,d,O),(n=(g=i(this,a)).onSettled)==null||n.call(g,void 0,t.error,d,O))}this.listeners.forEach(d=>{d(i(this,b))})})},I);function G(e,t){const s=U(),r=k(()=>s.defaultMutationOptions(L(e))),l=new $(s,r.value),h=A(l.getCurrentResult()),m=l.subscribe(n=>{q(h,n)}),v=(n,d)=>{l.mutate(n,d).catch(()=>{})};C(r,()=>{l.setOptions(r.value)}),T(()=>{m()});const g=P(Q(h));return C(()=>h.error,n=>{if(n&&j(r.value.throwOnError,[n]))throw n}),{...g,mutate:v,mutateAsync:h.mutate,reset:h.reset}}export{G as u};
//# sourceMappingURL=C_VZHTei.js.map
