1import{a2 as p,a3 as f,a4 as n,a5 as y,a6 as v,k as m,a7 as g,a8 as w,a9 as O}from"./index-B5oZ1XjT.js";import{S as M,P as R,w as h,O as S,X as C,Y as D,R as E,Q as K}from"./vendor-vuetify-CZqx1F5r.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="85ef6e29-cbe0-4ad8-955f-bb7856059d67",t._sentryDebugIdIdentifier="sentry-dbid-85ef6e29-cbe0-4ad8-955f-bb7856059d67")}catch{}var I=class extends p{#e;#i=void 0;#t;#s;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#e.defaultMutationOptions(t),f(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),e?.mutationKey&&this.options.mutationKey&&n(e.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#r(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#o(),this.#r()}mutate(t,e){return this.#s=e,this.#t?.removeObserver(this),this.#t=this.#e.getMutationCache().build(this.#e,this.options),this.#t.addObserver(this),this.#t.execute(t)}#o(){const t=this.#t?.state??y();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#r(t){v.batch(()=>{if(this.#s&&this.hasListeners()){const e=this.#i.variables,r=this.#i.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#s.onSuccess?.(t.data,e,r,i)}catch(s){Promise.reject(s)}try{this.#s.onSettled?.(t.data,null,e,r,i)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#s.onError?.(t.error,e,r,i)}catch(s){Promise.reject(s)}try{this.#s.onSettled?.(void 0,t.error,e,r,i)}catch(s){Promise.reject(s)}}}this.listeners.forEach(e=>{e(this.#i)})})}};function x(t,e){const r=m(),i=E(()=>{const o=typeof t=="function"?t():t;return r.defaultMutationOptions(O(o))}),s=new I(r,i.value),a=i.value.shallow?M(s.getCurrentResult()):R(s.getCurrentResult()),u=s.subscribe(o=>{g(a,o)}),c=(o,b)=>{s.mutate(o,b).catch(()=>{})};h(i,()=>{s.setOptions(i.value)}),S(()=>{u()});const l=i.value.shallow?C(a):D(a),d=K(l);return h(()=>a.error,o=>{if(o&&w(i.value.throwOnError,[o]))throw o}),{...d,mutate:c,mutateAsync:a.mutate,reset:a.reset}}export{x as u}; 2//# sourceMappingURL=useMutation-DYuUD3iS.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.