import{y as p}from"./vendor-hooks-DQAdyHrE.js";import{d as y}from"./vendor-react-CTtPmzVP.js";var i={},l={},d={},M;function h(){if(M)return d;M=1,Object.defineProperty(d,"__esModule",{value:!0});var e=y();function r(){var t=e.useRef(!1),s=e.useCallback(function(){return t.current},[]);return e.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),s}return d.default=r,d}var q;function F(){if(q)return l;q=1,Object.defineProperty(l,"__esModule",{value:!0});var e=p,r=y(),t=e.__importDefault(h());function s(v,u,a){u===void 0&&(u=[]),a===void 0&&(a={loading:!1});var f=r.useRef(0),c=t.default(),g=r.useState(a),b=g[0],_=g[1],U=r.useCallback(function(){for(var m=[],o=0;o<arguments.length;o++)m[o]=arguments[o];var A=++f.current;return b.loading||_(function(n){return e.__assign(e.__assign({},n),{loading:!0})}),v.apply(void 0,m).then(function(n){return c()&&A===f.current&&_({value:n,loading:!1}),n},function(n){return c()&&A===f.current&&_({error:n,loading:!1}),n})},u);return[b,U]}return l.default=s,l}var R;function S(){if(R)return i;R=1,Object.defineProperty(i,"__esModule",{value:!0});var e=p,r=y(),t=e.__importDefault(F());function s(v,u){u===void 0&&(u=[]);var a=t.default(v,u,{loading:!0}),f=a[0],c=a[1];return r.useEffect(function(){c()},[c]),f}return i.default=s,i}export{S as r};
