import{z as S,w as T,R as h,A as o,S as b,T as l,U as v}from"./Dyk1ealw.js";function n(r,f){return r===f||r?.[v]===f}function A(r={},f,i,c){var w=S.r,d=b;return T(()=>{var s,a;return h(()=>{s=a,a=c?.()||[],o(()=>{n(i(...a),r)||(f(r,...a),s&&n(i(...s),r)&&f(null,...s))})}),()=>{let t=d;for(;t!==w&&t.parent!==null&&t.parent.f&l;)t=t.parent;const p=()=>{a&&n(i(...a),r)&&f(null,...a)},u=t.teardown;t.teardown=()=>{p(),u?.()}}}),r}export{A as b};
