import{s as W,o as A,i as C}from"./el-input-BaZNy9Kg.js";import{ae as M,e as O,af as j,f as F}from"./base-xgxQQEpV.js";import{t as y}from"./el-empty-B4_NEFfq.js";function z(t,i){return W(A(t,i,C),t+"")}var k=function(){return M.Date.now()},N="Expected a function",_=Math.max,D=Math.min;function B(t,i,u){var f,o,l,s,n,a,d=0,x=!1,c=!1,v=!0;if(typeof t!="function")throw new TypeError(N);i=y(i)||0,O(u)&&(x=!!u.leading,c="maxWait"in u,l=c?_(y(u.maxWait)||0,i):l,v="trailing"in u?!!u.trailing:v);function T(e){var r=f,m=o;return f=o=void 0,d=e,s=t.apply(m,r),s}function I(e){return d=e,n=setTimeout(g,i),x?T(e):s}function p(e){var r=e-a,m=e-d,L=i-r;return c?D(L,l-m):L}function b(e){var r=e-a,m=e-d;return a===void 0||r>=i||r<0||c&&m>=l}function g(){var e=k();if(b(e))return E(e);n=setTimeout(g,p(e))}function E(e){return n=void 0,v&&f?T(e):(f=o=void 0,s)}function R(){n!==void 0&&clearTimeout(n),d=0,f=a=o=n=void 0}function S(){return n===void 0?s:E(k())}function h(){var e=k(),r=b(e);if(f=arguments,o=this,a=e,r){if(n===void 0)return I(a);if(c)return clearTimeout(n),n=setTimeout(g,i),T(a)}return n===void 0&&(n=setTimeout(g,i)),s}return h.cancel=R,h.flush=S,h}function G(t){return j(t)&&F(t)}export{z as b,B as d,G as i};
