@hudoro/dropdown
Advanced tools
Comparing version 0.0.3-beta.5 to 0.0.3-beta.6
@@ -1,3 +0,3 @@ | ||
import q, { useState as Fr, useRef as ce, useEffect as Ir } from "react"; | ||
var or = { exports: {} }, $ = {}; | ||
import q, { useState as Dr, useRef as ce, useEffect as Ir, useCallback as fe } from "react"; | ||
var ir = { exports: {} }, L = {}; | ||
/** | ||
@@ -12,21 +12,21 @@ * @license React | ||
*/ | ||
var Tr; | ||
function fe() { | ||
if (Tr) | ||
return $; | ||
Tr = 1; | ||
var g = q, m = Symbol.for("react.element"), R = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, _ = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, O = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function P(j, p, d) { | ||
var h, x = {}, C = null, F = null; | ||
d !== void 0 && (C = "" + d), p.key !== void 0 && (C = "" + p.key), p.ref !== void 0 && (F = p.ref); | ||
for (h in p) | ||
y.call(p, h) && !O.hasOwnProperty(h) && (x[h] = p[h]); | ||
if (j && j.defaultProps) | ||
for (h in p = j.defaultProps, p) | ||
x[h] === void 0 && (x[h] = p[h]); | ||
return { $$typeof: m, type: j, key: C, ref: F, props: x, _owner: _.current }; | ||
var Sr; | ||
function pe() { | ||
if (Sr) | ||
return L; | ||
Sr = 1; | ||
var g = q, w = Symbol.for("react.element"), E = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, R = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function O(_, h, l) { | ||
var v, y = {}, j = null, P = null; | ||
l !== void 0 && (j = "" + l), h.key !== void 0 && (j = "" + h.key), h.ref !== void 0 && (P = h.ref); | ||
for (v in h) | ||
b.call(h, v) && !S.hasOwnProperty(v) && (y[v] = h[v]); | ||
if (_ && _.defaultProps) | ||
for (v in h = _.defaultProps, h) | ||
y[v] === void 0 && (y[v] = h[v]); | ||
return { $$typeof: w, type: _, key: j, ref: P, props: y, _owner: R.current }; | ||
} | ||
return $.Fragment = R, $.jsx = P, $.jsxs = P, $; | ||
return L.Fragment = E, L.jsx = O, L.jsxs = O, L; | ||
} | ||
var N = {}; | ||
var $ = {}; | ||
/** | ||
@@ -41,38 +41,38 @@ * @license React | ||
*/ | ||
var Sr; | ||
function pe() { | ||
return Sr || (Sr = 1, process.env.NODE_ENV !== "production" && function() { | ||
var g = q, m = Symbol.for("react.element"), R = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), j = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), V = Symbol.iterator, J = "@@iterator"; | ||
function l(r) { | ||
var Or; | ||
function he() { | ||
return Or || (Or = 1, process.env.NODE_ENV !== "production" && function() { | ||
var g = q, w = Symbol.for("react.element"), E = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), O = Symbol.for("react.provider"), _ = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), N = Symbol.iterator, J = "@@iterator"; | ||
function G(r) { | ||
if (r === null || typeof r != "object") | ||
return null; | ||
var e = V && r[V] || r[J]; | ||
var e = N && r[N] || r[J]; | ||
return typeof e == "function" ? e : null; | ||
} | ||
var w = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function v(r) { | ||
var s = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function u(r) { | ||
{ | ||
for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), o = 1; o < e; o++) | ||
n[o - 1] = arguments[o]; | ||
k("error", r, n); | ||
V("error", r, n); | ||
} | ||
} | ||
function k(r, e, n) { | ||
function V(r, e, n) { | ||
{ | ||
var o = w.ReactDebugCurrentFrame, a = o.getStackAddendum(); | ||
var o = s.ReactDebugCurrentFrame, a = o.getStackAddendum(); | ||
a !== "" && (e += "%s", n = n.concat([a])); | ||
var s = n.map(function(t) { | ||
var d = n.map(function(t) { | ||
return String(t); | ||
}); | ||
s.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, s); | ||
d.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, d); | ||
} | ||
} | ||
var G = !1, Dr = !1, Ar = !1, Wr = !1, Lr = !1, ir; | ||
ir = Symbol.for("react.module.reference"); | ||
var C = !1, K = !1, Ar = !1, Wr = !1, Lr = !1, tr; | ||
tr = Symbol.for("react.module.reference"); | ||
function $r(r) { | ||
return !!(typeof r == "string" || typeof r == "function" || r === y || r === O || Lr || r === _ || r === d || r === h || Wr || r === F || G || Dr || Ar || typeof r == "object" && r !== null && (r.$$typeof === C || r.$$typeof === x || r.$$typeof === P || r.$$typeof === j || r.$$typeof === p || // This needs to include all possible module reference object | ||
return !!(typeof r == "string" || typeof r == "function" || r === b || r === S || Lr || r === R || r === l || r === v || Wr || r === P || C || K || Ar || typeof r == "object" && r !== null && (r.$$typeof === j || r.$$typeof === y || r.$$typeof === O || r.$$typeof === _ || r.$$typeof === h || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
r.$$typeof === ir || r.getModuleId !== void 0)); | ||
r.$$typeof === tr || r.getModuleId !== void 0)); | ||
} | ||
@@ -86,9 +86,9 @@ function Nr(r, e, n) { | ||
} | ||
function tr(r) { | ||
function ar(r) { | ||
return r.displayName || "Context"; | ||
} | ||
function T(r) { | ||
function k(r) { | ||
if (r == null) | ||
return null; | ||
if (typeof r.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function") | ||
if (typeof r.tag == "number" && u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function") | ||
return r.displayName || r.name || null; | ||
@@ -98,13 +98,13 @@ if (typeof r == "string") | ||
switch (r) { | ||
case y: | ||
case b: | ||
return "Fragment"; | ||
case R: | ||
case E: | ||
return "Portal"; | ||
case O: | ||
case S: | ||
return "Profiler"; | ||
case _: | ||
case R: | ||
return "StrictMode"; | ||
case d: | ||
case l: | ||
return "Suspense"; | ||
case h: | ||
case v: | ||
return "SuspenseList"; | ||
@@ -114,17 +114,17 @@ } | ||
switch (r.$$typeof) { | ||
case j: | ||
case _: | ||
var e = r; | ||
return tr(e) + ".Consumer"; | ||
case P: | ||
return ar(e) + ".Consumer"; | ||
case O: | ||
var n = r; | ||
return tr(n._context) + ".Provider"; | ||
case p: | ||
return ar(n._context) + ".Provider"; | ||
case h: | ||
return Nr(r, r.render, "ForwardRef"); | ||
case x: | ||
case y: | ||
var o = r.displayName || null; | ||
return o !== null ? o : T(r.type) || "Memo"; | ||
case C: { | ||
var a = r, s = a._payload, t = a._init; | ||
return o !== null ? o : k(r.type) || "Memo"; | ||
case j: { | ||
var a = r, d = a._payload, t = a._init; | ||
try { | ||
return T(t(s)); | ||
return k(t(d)); | ||
} catch { | ||
@@ -137,14 +137,14 @@ return null; | ||
} | ||
var I = Object.assign, W = 0, ar, sr, dr, ur, lr, cr, fr; | ||
function pr() { | ||
var F = Object.assign, A = 0, sr, dr, ur, lr, cr, fr, pr; | ||
function hr() { | ||
} | ||
pr.__reactDisabledLog = !0; | ||
hr.__reactDisabledLog = !0; | ||
function Vr() { | ||
{ | ||
if (W === 0) { | ||
ar = console.log, sr = console.info, dr = console.warn, ur = console.error, lr = console.group, cr = console.groupCollapsed, fr = console.groupEnd; | ||
if (A === 0) { | ||
sr = console.log, dr = console.info, ur = console.warn, lr = console.error, cr = console.group, fr = console.groupCollapsed, pr = console.groupEnd; | ||
var r = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: pr, | ||
value: hr, | ||
writable: !0 | ||
@@ -162,3 +162,3 @@ }; | ||
} | ||
W++; | ||
A++; | ||
} | ||
@@ -168,3 +168,3 @@ } | ||
{ | ||
if (W--, W === 0) { | ||
if (A--, A === 0) { | ||
var r = { | ||
@@ -176,32 +176,32 @@ configurable: !0, | ||
Object.defineProperties(console, { | ||
log: I({}, r, { | ||
value: ar | ||
}), | ||
info: I({}, r, { | ||
log: F({}, r, { | ||
value: sr | ||
}), | ||
warn: I({}, r, { | ||
info: F({}, r, { | ||
value: dr | ||
}), | ||
error: I({}, r, { | ||
warn: F({}, r, { | ||
value: ur | ||
}), | ||
group: I({}, r, { | ||
error: F({}, r, { | ||
value: lr | ||
}), | ||
groupCollapsed: I({}, r, { | ||
group: F({}, r, { | ||
value: cr | ||
}), | ||
groupEnd: I({}, r, { | ||
groupCollapsed: F({}, r, { | ||
value: fr | ||
}), | ||
groupEnd: F({}, r, { | ||
value: pr | ||
}) | ||
}); | ||
} | ||
W < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
A < 0 && u("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
} | ||
} | ||
var K = w.ReactCurrentDispatcher, H; | ||
var H = s.ReactCurrentDispatcher, X; | ||
function z(r, e, n) { | ||
{ | ||
if (H === void 0) | ||
if (X === void 0) | ||
try { | ||
@@ -211,9 +211,9 @@ throw Error(); | ||
var o = a.stack.trim().match(/\n( *(at )?)/); | ||
H = o && o[1] || ""; | ||
X = o && o[1] || ""; | ||
} | ||
return ` | ||
` + H + r; | ||
` + X + r; | ||
} | ||
} | ||
var X = !1, Y; | ||
var Z = !1, Y; | ||
{ | ||
@@ -223,4 +223,4 @@ var Yr = typeof WeakMap == "function" ? WeakMap : Map; | ||
} | ||
function hr(r, e) { | ||
if (!r || X) | ||
function vr(r, e) { | ||
if (!r || Z) | ||
return ""; | ||
@@ -233,7 +233,7 @@ { | ||
var o; | ||
X = !0; | ||
Z = !0; | ||
var a = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var s; | ||
s = K.current, K.current = null, Vr(); | ||
var d; | ||
d = H.current, H.current = null, Vr(); | ||
try { | ||
@@ -251,4 +251,4 @@ if (e) { | ||
Reflect.construct(t, []); | ||
} catch (S) { | ||
o = S; | ||
} catch (T) { | ||
o = T; | ||
} | ||
@@ -259,4 +259,4 @@ Reflect.construct(r, [], t); | ||
t.call(); | ||
} catch (S) { | ||
o = S; | ||
} catch (T) { | ||
o = T; | ||
} | ||
@@ -268,23 +268,23 @@ r.call(t.prototype); | ||
throw Error(); | ||
} catch (S) { | ||
o = S; | ||
} catch (T) { | ||
o = T; | ||
} | ||
r(); | ||
} | ||
} catch (S) { | ||
if (S && o && typeof S.stack == "string") { | ||
for (var i = S.stack.split(` | ||
`), b = o.stack.split(` | ||
`), c = i.length - 1, f = b.length - 1; c >= 1 && f >= 0 && i[c] !== b[f]; ) | ||
f--; | ||
for (; c >= 1 && f >= 0; c--, f--) | ||
if (i[c] !== b[f]) { | ||
if (c !== 1 || f !== 1) | ||
} catch (T) { | ||
if (T && o && typeof T.stack == "string") { | ||
for (var i = T.stack.split(` | ||
`), m = o.stack.split(` | ||
`), f = i.length - 1, p = m.length - 1; f >= 1 && p >= 0 && i[f] !== m[p]; ) | ||
p--; | ||
for (; f >= 1 && p >= 0; f--, p--) | ||
if (i[f] !== m[p]) { | ||
if (f !== 1 || p !== 1) | ||
do | ||
if (c--, f--, f < 0 || i[c] !== b[f]) { | ||
var E = ` | ||
` + i[c].replace(" at new ", " at "); | ||
return r.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", r.displayName)), typeof r == "function" && Y.set(r, E), E; | ||
if (f--, p--, p < 0 || i[f] !== m[p]) { | ||
var x = ` | ||
` + i[f].replace(" at new ", " at "); | ||
return r.displayName && x.includes("<anonymous>") && (x = x.replace("<anonymous>", r.displayName)), typeof r == "function" && Y.set(r, x), x; | ||
} | ||
while (c >= 1 && f >= 0); | ||
while (f >= 1 && p >= 0); | ||
break; | ||
@@ -294,9 +294,9 @@ } | ||
} finally { | ||
X = !1, K.current = s, zr(), Error.prepareStackTrace = a; | ||
Z = !1, H.current = d, zr(), Error.prepareStackTrace = a; | ||
} | ||
var A = r ? r.displayName || r.name : "", kr = A ? z(A) : ""; | ||
return typeof r == "function" && Y.set(r, kr), kr; | ||
var I = r ? r.displayName || r.name : "", Tr = I ? z(I) : ""; | ||
return typeof r == "function" && Y.set(r, Tr), Tr; | ||
} | ||
function Mr(r, e, n) { | ||
return hr(r, !1); | ||
return vr(r, !1); | ||
} | ||
@@ -311,9 +311,9 @@ function Ur(r) { | ||
if (typeof r == "function") | ||
return hr(r, Ur(r)); | ||
return vr(r, Ur(r)); | ||
if (typeof r == "string") | ||
return z(r); | ||
switch (r) { | ||
case d: | ||
case l: | ||
return z("Suspense"); | ||
case h: | ||
case v: | ||
return z("SuspenseList"); | ||
@@ -323,10 +323,10 @@ } | ||
switch (r.$$typeof) { | ||
case p: | ||
case h: | ||
return Mr(r.render); | ||
case x: | ||
case y: | ||
return M(r.type, e, n); | ||
case C: { | ||
var o = r, a = o._payload, s = o._init; | ||
case j: { | ||
var o = r, a = o._payload, d = o._init; | ||
try { | ||
return M(s(a), e, n); | ||
return M(d(a), e, n); | ||
} catch { | ||
@@ -338,26 +338,26 @@ } | ||
} | ||
var U = Object.prototype.hasOwnProperty, vr = {}, gr = w.ReactDebugCurrentFrame; | ||
var U = Object.prototype.hasOwnProperty, gr = {}, wr = s.ReactDebugCurrentFrame; | ||
function B(r) { | ||
if (r) { | ||
var e = r._owner, n = M(r.type, r._source, e ? e.type : null); | ||
gr.setExtraStackFrame(n); | ||
wr.setExtraStackFrame(n); | ||
} else | ||
gr.setExtraStackFrame(null); | ||
wr.setExtraStackFrame(null); | ||
} | ||
function Br(r, e, n, o, a) { | ||
{ | ||
var s = Function.call.bind(U); | ||
var d = Function.call.bind(U); | ||
for (var t in r) | ||
if (s(r, t)) { | ||
if (d(r, t)) { | ||
var i = void 0; | ||
try { | ||
if (typeof r[t] != "function") { | ||
var b = Error((o || "React class") + ": " + n + " type `" + t + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[t] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw b.name = "Invariant Violation", b; | ||
var m = Error((o || "React class") + ": " + n + " type `" + t + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[t] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw m.name = "Invariant Violation", m; | ||
} | ||
i = r[t](e, t, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (c) { | ||
i = c; | ||
} catch (f) { | ||
i = f; | ||
} | ||
i && !(i instanceof Error) && (B(a), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", n, t, typeof i), B(null)), i instanceof Error && !(i.message in vr) && (vr[i.message] = !0, B(a), v("Failed %s type: %s", n, i.message), B(null)); | ||
i && !(i instanceof Error) && (B(a), u("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", n, t, typeof i), B(null)), i instanceof Error && !(i.message in gr) && (gr[i.message] = !0, B(a), u("Failed %s type: %s", n, i.message), B(null)); | ||
} | ||
@@ -367,3 +367,3 @@ } | ||
var qr = Array.isArray; | ||
function Z(r) { | ||
function Q(r) { | ||
return qr(r); | ||
@@ -379,3 +379,3 @@ } | ||
try { | ||
return wr(r), !1; | ||
return mr(r), !1; | ||
} catch { | ||
@@ -385,10 +385,10 @@ return !0; | ||
} | ||
function wr(r) { | ||
function mr(r) { | ||
return "" + r; | ||
} | ||
function mr(r) { | ||
function br(r) { | ||
if (Gr(r)) | ||
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Jr(r)), wr(r); | ||
return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Jr(r)), mr(r); | ||
} | ||
var L = w.ReactCurrentOwner, Kr = { | ||
var W = s.ReactCurrentOwner, Kr = { | ||
key: !0, | ||
@@ -398,4 +398,4 @@ ref: !0, | ||
__source: !0 | ||
}, br, yr, Q; | ||
Q = {}; | ||
}, yr, xr, rr; | ||
rr = {}; | ||
function Hr(r) { | ||
@@ -418,5 +418,5 @@ if (U.call(r, "ref")) { | ||
function Zr(r, e) { | ||
if (typeof r.ref == "string" && L.current && e && L.current.stateNode !== e) { | ||
var n = T(L.current.type); | ||
Q[n] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', T(L.current.type), r.ref), Q[n] = !0); | ||
if (typeof r.ref == "string" && W.current && e && W.current.stateNode !== e) { | ||
var n = k(W.current.type); | ||
rr[n] || (u('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', k(W.current.type), r.ref), rr[n] = !0); | ||
} | ||
@@ -427,3 +427,3 @@ } | ||
var n = function() { | ||
br || (br = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e)); | ||
yr || (yr = !0, u("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e)); | ||
}; | ||
@@ -439,3 +439,3 @@ n.isReactWarning = !0, Object.defineProperty(r, "key", { | ||
var n = function() { | ||
yr || (yr = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e)); | ||
xr || (xr = !0, u("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e)); | ||
}; | ||
@@ -448,6 +448,6 @@ n.isReactWarning = !0, Object.defineProperty(r, "ref", { | ||
} | ||
var ee = function(r, e, n, o, a, s, t) { | ||
var ee = function(r, e, n, o, a, d, t) { | ||
var i = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
$$typeof: m, | ||
$$typeof: w, | ||
// Built-in properties that belong on the element | ||
@@ -459,3 +459,3 @@ type: r, | ||
// Record the component responsible for creating this element. | ||
_owner: s | ||
_owner: d | ||
}; | ||
@@ -481,35 +481,35 @@ return i._store = {}, Object.defineProperty(i._store, "validated", { | ||
{ | ||
var s, t = {}, i = null, b = null; | ||
n !== void 0 && (mr(n), i = "" + n), Xr(e) && (mr(e.key), i = "" + e.key), Hr(e) && (b = e.ref, Zr(e, a)); | ||
for (s in e) | ||
U.call(e, s) && !Kr.hasOwnProperty(s) && (t[s] = e[s]); | ||
var d, t = {}, i = null, m = null; | ||
n !== void 0 && (br(n), i = "" + n), Xr(e) && (br(e.key), i = "" + e.key), Hr(e) && (m = e.ref, Zr(e, a)); | ||
for (d in e) | ||
U.call(e, d) && !Kr.hasOwnProperty(d) && (t[d] = e[d]); | ||
if (r && r.defaultProps) { | ||
var c = r.defaultProps; | ||
for (s in c) | ||
t[s] === void 0 && (t[s] = c[s]); | ||
var f = r.defaultProps; | ||
for (d in f) | ||
t[d] === void 0 && (t[d] = f[d]); | ||
} | ||
if (i || b) { | ||
var f = typeof r == "function" ? r.displayName || r.name || "Unknown" : r; | ||
i && Qr(t, f), b && re(t, f); | ||
if (i || m) { | ||
var p = typeof r == "function" ? r.displayName || r.name || "Unknown" : r; | ||
i && Qr(t, p), m && re(t, p); | ||
} | ||
return ee(r, i, b, a, o, L.current, t); | ||
return ee(r, i, m, a, o, W.current, t); | ||
} | ||
} | ||
var rr = w.ReactCurrentOwner, xr = w.ReactDebugCurrentFrame; | ||
var er = s.ReactCurrentOwner, Er = s.ReactDebugCurrentFrame; | ||
function D(r) { | ||
if (r) { | ||
var e = r._owner, n = M(r.type, r._source, e ? e.type : null); | ||
xr.setExtraStackFrame(n); | ||
Er.setExtraStackFrame(n); | ||
} else | ||
xr.setExtraStackFrame(null); | ||
Er.setExtraStackFrame(null); | ||
} | ||
var er; | ||
er = !1; | ||
function nr(r) { | ||
return typeof r == "object" && r !== null && r.$$typeof === m; | ||
var nr; | ||
nr = !1; | ||
function or(r) { | ||
return typeof r == "object" && r !== null && r.$$typeof === w; | ||
} | ||
function Er() { | ||
function Rr() { | ||
{ | ||
if (rr.current) { | ||
var r = T(rr.current.type); | ||
if (er.current) { | ||
var r = k(er.current.type); | ||
if (r) | ||
@@ -534,6 +534,6 @@ return ` | ||
} | ||
var Rr = {}; | ||
var _r = {}; | ||
function ie(r) { | ||
{ | ||
var e = Er(); | ||
var e = Rr(); | ||
if (!e) { | ||
@@ -548,3 +548,3 @@ var n = typeof r == "string" ? r : r.displayName || r.name; | ||
} | ||
function _r(r, e) { | ||
function jr(r, e) { | ||
{ | ||
@@ -555,25 +555,25 @@ if (!r._store || r._store.validated || r.key != null) | ||
var n = ie(e); | ||
if (Rr[n]) | ||
if (_r[n]) | ||
return; | ||
Rr[n] = !0; | ||
_r[n] = !0; | ||
var o = ""; | ||
r && r._owner && r._owner !== rr.current && (o = " It was passed a child from " + T(r._owner.type) + "."), D(r), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), D(null); | ||
r && r._owner && r._owner !== er.current && (o = " It was passed a child from " + k(r._owner.type) + "."), D(r), u('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), D(null); | ||
} | ||
} | ||
function jr(r, e) { | ||
function Cr(r, e) { | ||
{ | ||
if (typeof r != "object") | ||
return; | ||
if (Z(r)) | ||
if (Q(r)) | ||
for (var n = 0; n < r.length; n++) { | ||
var o = r[n]; | ||
nr(o) && _r(o, e); | ||
or(o) && jr(o, e); | ||
} | ||
else if (nr(r)) | ||
else if (or(r)) | ||
r._store && (r._store.validated = !0); | ||
else if (r) { | ||
var a = l(r); | ||
var a = G(r); | ||
if (typeof a == "function" && a !== r.entries) | ||
for (var s = a.call(r), t; !(t = s.next()).done; ) | ||
nr(t.value) && _r(t.value, e); | ||
for (var d = a.call(r), t; !(t = d.next()).done; ) | ||
or(t.value) && jr(t.value, e); | ||
} | ||
@@ -590,5 +590,5 @@ } | ||
n = e.propTypes; | ||
else if (typeof e == "object" && (e.$$typeof === p || // Note: Memo only checks outer props here. | ||
else if (typeof e == "object" && (e.$$typeof === h || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
e.$$typeof === x)) | ||
e.$$typeof === y)) | ||
n = e.propTypes; | ||
@@ -598,10 +598,10 @@ else | ||
if (n) { | ||
var o = T(e); | ||
var o = k(e); | ||
Br(n, r.props, "prop", o, r); | ||
} else if (e.PropTypes !== void 0 && !er) { | ||
er = !0; | ||
var a = T(e); | ||
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", a || "Unknown"); | ||
} else if (e.PropTypes !== void 0 && !nr) { | ||
nr = !0; | ||
var a = k(e); | ||
u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", a || "Unknown"); | ||
} | ||
typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
@@ -614,10 +614,10 @@ } | ||
if (o !== "children" && o !== "key") { | ||
D(r), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), D(null); | ||
D(r), u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), D(null); | ||
break; | ||
} | ||
} | ||
r.ref !== null && (D(r), v("Invalid attribute `ref` supplied to `React.Fragment`."), D(null)); | ||
r.ref !== null && (D(r), u("Invalid attribute `ref` supplied to `React.Fragment`."), D(null)); | ||
} | ||
} | ||
function Cr(r, e, n, o, a, s) { | ||
function kr(r, e, n, o, a, d) { | ||
{ | ||
@@ -628,39 +628,39 @@ var t = $r(r); | ||
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); | ||
var b = oe(a); | ||
b ? i += b : i += Er(); | ||
var c; | ||
r === null ? c = "null" : Z(r) ? c = "array" : r !== void 0 && r.$$typeof === m ? (c = "<" + (T(r.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : c = typeof r, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, i); | ||
var m = oe(a); | ||
m ? i += m : i += Rr(); | ||
var f; | ||
r === null ? f = "null" : Q(r) ? f = "array" : r !== void 0 && r.$$typeof === w ? (f = "<" + (k(r.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : f = typeof r, u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, i); | ||
} | ||
var f = ne(r, e, n, a, s); | ||
if (f == null) | ||
return f; | ||
var p = ne(r, e, n, a, d); | ||
if (p == null) | ||
return p; | ||
if (t) { | ||
var E = e.children; | ||
if (E !== void 0) | ||
var x = e.children; | ||
if (x !== void 0) | ||
if (o) | ||
if (Z(E)) { | ||
for (var A = 0; A < E.length; A++) | ||
jr(E[A], r); | ||
Object.freeze && Object.freeze(E); | ||
if (Q(x)) { | ||
for (var I = 0; I < x.length; I++) | ||
Cr(x[I], r); | ||
Object.freeze && Object.freeze(x); | ||
} else | ||
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
u("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
else | ||
jr(E, r); | ||
Cr(x, r); | ||
} | ||
return r === y ? ae(f) : te(f), f; | ||
return r === b ? ae(p) : te(p), p; | ||
} | ||
} | ||
function se(r, e, n) { | ||
return Cr(r, e, n, !0); | ||
return kr(r, e, n, !0); | ||
} | ||
function de(r, e, n) { | ||
return Cr(r, e, n, !1); | ||
return kr(r, e, n, !1); | ||
} | ||
var ue = de, le = se; | ||
N.Fragment = y, N.jsx = ue, N.jsxs = le; | ||
}()), N; | ||
$.Fragment = b, $.jsx = ue, $.jsxs = le; | ||
}()), $; | ||
} | ||
process.env.NODE_ENV === "production" ? or.exports = fe() : or.exports = pe(); | ||
var u = or.exports; | ||
const he = `@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap"); | ||
process.env.NODE_ENV === "production" ? ir.exports = pe() : ir.exports = he(); | ||
var c = ir.exports; | ||
const ve = `@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap"); | ||
* { | ||
@@ -858,58 +858,60 @@ margin: 0; | ||
`; | ||
function ve(g) { | ||
const [m, R] = Fr(g), y = ce(null), _ = (O) => { | ||
y.current && !y.current.contains(O.target) && R(!1); | ||
function ge(g) { | ||
const [w, E] = Dr(g), b = ce(null), R = (S) => { | ||
b.current && !b.current.contains(S.target) && E(!1); | ||
}; | ||
return Ir(() => (document.addEventListener("click", _, !0), () => { | ||
document.removeEventListener("click", _, !0); | ||
}), []), { ref: y, isComponentVisible: m, setIsComponentVisible: R }; | ||
return Ir(() => (document.addEventListener("click", R, !0), () => { | ||
document.removeEventListener("click", R, !0); | ||
}), []), { ref: b, isComponentVisible: w, setIsComponentVisible: E }; | ||
} | ||
const Or = "hudoro-input-dropdown-styles", ge = (g) => { | ||
if (!document.getElementById(Or)) { | ||
const m = document.createElement("style"); | ||
m.id = Or, m.textContent = g, document.head.appendChild(m); | ||
const Pr = "hudoro-input-dropdown-styles", we = (g) => { | ||
if (!document.getElementById(Pr)) { | ||
const w = document.createElement("style"); | ||
w.id = Pr, w.textContent = g, document.head.appendChild(w); | ||
} | ||
}; | ||
ge(he); | ||
const ye = ({ | ||
we(ve); | ||
const xe = ({ | ||
dropdownLists: g, | ||
onChange: m, | ||
defaultValue: R, | ||
size: y = "md", | ||
multiSelect: _, | ||
searchAble: O, | ||
iconLeft: P, | ||
placeholder: j, | ||
onSearch: p | ||
onChange: w, | ||
defaultValue: E, | ||
size: b = "md", | ||
multiSelect: R, | ||
searchAble: S, | ||
iconLeft: O, | ||
placeholder: _, | ||
onSearch: h | ||
}) => { | ||
const [d, h] = Fr([]), { isComponentVisible: x, ref: C, setIsComponentVisible: F } = ve(!1), V = () => { | ||
F((l) => !l); | ||
}, J = (l, w) => { | ||
if (!_) | ||
h([{ label: l, value: w }]), m([{ label: l, value: w }]), F(!1); | ||
else if (d == null ? void 0 : d.find((k) => k.value === w)) { | ||
const k = [ | ||
...d ? d.filter((G) => G.value !== w) : [] | ||
const [l, v] = Dr([]), { isComponentVisible: y, ref: j, setIsComponentVisible: P } = ge(!1), N = () => { | ||
P((s) => !s); | ||
}, J = (s, u) => { | ||
if (!R) | ||
v([{ label: s, value: u }]), w([{ label: s, value: u }]), P(!1); | ||
else if (l == null ? void 0 : l.find((C) => C.value === u)) { | ||
const C = [ | ||
...l ? l.filter((K) => K.value !== u) : [] | ||
]; | ||
h(k), m(k); | ||
v(C), w(C); | ||
} else { | ||
const k = [...d || [], { label: l, value: w }]; | ||
h(k), m(k); | ||
const C = [...l || [], { label: s, value: u }]; | ||
v(C), w(C); | ||
} | ||
}; | ||
}, G = fe(() => { | ||
E && v(E); | ||
}, [E]); | ||
return Ir(() => { | ||
R && h(R); | ||
}, [R]), /* @__PURE__ */ u.jsxs( | ||
G(); | ||
}, [E]), /* @__PURE__ */ c.jsxs( | ||
"div", | ||
{ | ||
className: `hsd-input-dropdown-container hsd-input-dropdown-size-${y} ${x ? "active" : ""}`, | ||
ref: C, | ||
onClick: V, | ||
className: `hsd-input-dropdown-container hsd-input-dropdown-size-${b} ${y ? "active" : ""}`, | ||
ref: j, | ||
onClick: N, | ||
children: [ | ||
/* @__PURE__ */ u.jsxs("div", { className: "hsd-input-dropdown-preview-container", children: [ | ||
P ? /* @__PURE__ */ u.jsx(u.Fragment, { children: q.cloneElement(P, { | ||
width: Pr(y), | ||
/* @__PURE__ */ c.jsxs("div", { className: "hsd-input-dropdown-preview-container", children: [ | ||
O ? /* @__PURE__ */ c.jsx(c.Fragment, { children: q.cloneElement(O, { | ||
width: Fr(b), | ||
color: "#939E99" | ||
}) }) : null, | ||
/* @__PURE__ */ u.jsx("div", { className: "hsd-input-dropdown-container-preview-item", children: d.length ? _ ? d == null ? void 0 : d.map((l, w) => /* @__PURE__ */ u.jsx( | ||
/* @__PURE__ */ c.jsx("div", { className: "hsd-input-dropdown-container-preview-item", children: l.length ? R ? l == null ? void 0 : l.map((s, u) => /* @__PURE__ */ c.jsx( | ||
"p", | ||
@@ -919,21 +921,21 @@ { | ||
className: "hsd-input-dropdown-preview-item", | ||
children: l == null ? void 0 : l.label | ||
children: s == null ? void 0 : s.label | ||
}, | ||
w | ||
)) : /* @__PURE__ */ u.jsx("p", { style: { minWidth: "max-content" }, children: d == null ? void 0 : d[0].label }) : /* @__PURE__ */ u.jsx("p", { className: "hsd-input-dropdown-placeholder", children: j || "Search" }) }), | ||
/* @__PURE__ */ u.jsx(me, { strokeWidth: 2, width: Pr(y) }) | ||
u | ||
)) : /* @__PURE__ */ c.jsx("p", { style: { minWidth: "max-content" }, children: l == null ? void 0 : l[0].label }) : /* @__PURE__ */ c.jsx("p", { className: "hsd-input-dropdown-placeholder", children: _ || "Search" }) }), | ||
/* @__PURE__ */ c.jsx(be, { strokeWidth: 2, width: Fr(b) }) | ||
] }), | ||
x ? /* @__PURE__ */ u.jsxs( | ||
y ? /* @__PURE__ */ c.jsxs( | ||
"div", | ||
{ | ||
className: "hsd-input-dropdown-lists-container", | ||
onClick: (l) => l.stopPropagation(), | ||
onClick: (s) => s.stopPropagation(), | ||
children: [ | ||
O ? /* @__PURE__ */ u.jsxs("div", { className: "hsd-input-dropdown-container-dropdown-search", children: [ | ||
/* @__PURE__ */ u.jsx("div", { style: { display: "flex" }, children: /* @__PURE__ */ u.jsx(we, { strokeWidth: 2, width: 20 }) }), | ||
/* @__PURE__ */ u.jsx( | ||
S ? /* @__PURE__ */ c.jsxs("div", { className: "hsd-input-dropdown-container-dropdown-search", children: [ | ||
/* @__PURE__ */ c.jsx("div", { style: { display: "flex" }, children: /* @__PURE__ */ c.jsx(me, { strokeWidth: 2, width: 20 }) }), | ||
/* @__PURE__ */ c.jsx( | ||
"input", | ||
{ | ||
onChange: (l) => { | ||
p && p(l.target.value); | ||
onChange: (s) => { | ||
h && h(s.target.value); | ||
} | ||
@@ -943,18 +945,18 @@ } | ||
] }) : null, | ||
/* @__PURE__ */ u.jsx("div", { className: "hsd-input-dropdwon-item-container", children: g.map((l, w) => /* @__PURE__ */ u.jsxs( | ||
/* @__PURE__ */ c.jsx("div", { className: "hsd-input-dropdwon-item-container", children: g.map((s, u) => /* @__PURE__ */ c.jsxs( | ||
"div", | ||
{ | ||
className: `hsd-input-dropdwon-item ${d != null && d.find((v) => v.value === l.value) ? "active" : ""}`, | ||
onClick: () => J(l.label, l.value), | ||
className: `hsd-input-dropdwon-item ${l != null && l.find((V) => V.value === s.value) ? "active" : ""}`, | ||
onClick: () => J(s.label, s.value), | ||
children: [ | ||
l.icon ? /* @__PURE__ */ u.jsx("div", { children: q.cloneElement(l.icon, { | ||
s.icon ? /* @__PURE__ */ c.jsx("div", { children: q.cloneElement(s.icon, { | ||
width: 16 | ||
}) }) : null, | ||
/* @__PURE__ */ u.jsxs("div", { children: [ | ||
/* @__PURE__ */ c.jsxs("div", { children: [ | ||
" ", | ||
/* @__PURE__ */ u.jsx("p", { children: l.label }) | ||
/* @__PURE__ */ c.jsx("p", { children: s.label }) | ||
] }) | ||
] | ||
}, | ||
w | ||
u | ||
)) }) | ||
@@ -967,3 +969,3 @@ ] | ||
); | ||
}, we = ({ ...g }) => /* @__PURE__ */ u.jsxs( | ||
}, me = ({ ...g }) => /* @__PURE__ */ c.jsxs( | ||
"svg", | ||
@@ -976,3 +978,3 @@ { | ||
children: [ | ||
/* @__PURE__ */ u.jsx( | ||
/* @__PURE__ */ c.jsx( | ||
"circle", | ||
@@ -989,3 +991,3 @@ { | ||
), | ||
/* @__PURE__ */ u.jsx( | ||
/* @__PURE__ */ c.jsx( | ||
"path", | ||
@@ -1002,3 +1004,3 @@ { | ||
} | ||
), me = ({ ...g }) => /* @__PURE__ */ u.jsx( | ||
), be = ({ ...g }) => /* @__PURE__ */ c.jsx( | ||
"svg", | ||
@@ -1011,3 +1013,3 @@ { | ||
color: "#1976D2", | ||
children: /* @__PURE__ */ u.jsx( | ||
children: /* @__PURE__ */ c.jsx( | ||
"path", | ||
@@ -1022,3 +1024,3 @@ { | ||
} | ||
), Pr = (g) => { | ||
), Fr = (g) => { | ||
if (g === "sm") | ||
@@ -1032,3 +1034,3 @@ return 16; | ||
export { | ||
ye as Dropdown | ||
xe as Dropdown | ||
}; |
@@ -1,2 +0,2 @@ | ||
(function(F,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],x):(F=typeof globalThis<"u"?globalThis:F||self,x(F.Dropdown={},F.React))})(this,function(F,x){"use strict";var K={exports:{}},N={};/** | ||
(function(D,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],b):(D=typeof globalThis<"u"?globalThis:D||self,b(D.Dropdown={},D.React))})(this,function(D,b){"use strict";var K={exports:{}},L={};/** | ||
* @license React | ||
@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var ir;function Fr(){if(ir)return N;ir=1;var g=x,m=Symbol.for("react.element"),_=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,j=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0};function D(C,p,u){var h,E={},T=null,I=null;u!==void 0&&(T=""+u),p.key!==void 0&&(T=""+p.key),p.ref!==void 0&&(I=p.ref);for(h in p)y.call(p,h)&&!P.hasOwnProperty(h)&&(E[h]=p[h]);if(C&&C.defaultProps)for(h in p=C.defaultProps,p)E[h]===void 0&&(E[h]=p[h]);return{$$typeof:m,type:C,key:T,ref:I,props:E,_owner:j.current}}return N.Fragment=_,N.jsx=D,N.jsxs=D,N}var V={};/** | ||
*/var ar;function Ir(){if(ar)return L;ar=1;var g=b,w=Symbol.for("react.element"),R=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,_=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O={key:!0,ref:!0,__self:!0,__source:!0};function P(j,h,c){var v,x={},C=null,F=null;c!==void 0&&(C=""+c),h.key!==void 0&&(C=""+h.key),h.ref!==void 0&&(F=h.ref);for(v in h)y.call(h,v)&&!O.hasOwnProperty(v)&&(x[v]=h[v]);if(j&&j.defaultProps)for(v in h=j.defaultProps,h)x[v]===void 0&&(x[v]=h[v]);return{$$typeof:w,type:j,key:C,ref:F,props:x,_owner:_.current}}return L.Fragment=R,L.jsx=P,L.jsxs=P,L}var N={};/** | ||
* @license React | ||
@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var ar;function Ir(){return ar||(ar=1,process.env.NODE_ENV!=="production"&&function(){var g=x,m=Symbol.for("react.element"),_=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),C=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),M=Symbol.iterator,H="@@iterator";function l(r){if(r===null||typeof r!="object")return null;var e=M&&r[M]||r[H];return typeof e=="function"?e:null}var w=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(r){{for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];k("error",r,n)}}function k(r,e,n){{var o=w.ReactDebugCurrentFrame,a=o.getStackAddendum();a!==""&&(e+="%s",n=n.concat([a]));var s=n.map(function(i){return String(i)});s.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,s)}}var X=!1,zr=!1,Yr=!1,Mr=!1,Ur=!1,ur;ur=Symbol.for("react.module.reference");function Br(r){return!!(typeof r=="string"||typeof r=="function"||r===y||r===P||Ur||r===j||r===u||r===h||Mr||r===I||X||zr||Yr||typeof r=="object"&&r!==null&&(r.$$typeof===T||r.$$typeof===E||r.$$typeof===D||r.$$typeof===C||r.$$typeof===p||r.$$typeof===ur||r.getModuleId!==void 0))}function $r(r,e,n){var o=r.displayName;if(o)return o;var a=e.displayName||e.name||"";return a!==""?n+"("+a+")":n}function lr(r){return r.displayName||"Context"}function S(r){if(r==null)return null;if(typeof r.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case y:return"Fragment";case _:return"Portal";case P:return"Profiler";case j:return"StrictMode";case u:return"Suspense";case h:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case C:var e=r;return lr(e)+".Consumer";case D:var n=r;return lr(n._context)+".Provider";case p:return $r(r,r.render,"ForwardRef");case E:var o=r.displayName||null;return o!==null?o:S(r.type)||"Memo";case T:{var a=r,s=a._payload,i=a._init;try{return S(i(s))}catch{return null}}}return null}var A=Object.assign,z=0,cr,fr,pr,hr,vr,gr,wr;function mr(){}mr.__reactDisabledLog=!0;function Jr(){{if(z===0){cr=console.log,fr=console.info,pr=console.warn,hr=console.error,vr=console.group,gr=console.groupCollapsed,wr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:mr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}z++}}function Gr(){{if(z--,z===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},r,{value:cr}),info:A({},r,{value:fr}),warn:A({},r,{value:pr}),error:A({},r,{value:hr}),group:A({},r,{value:vr}),groupCollapsed:A({},r,{value:gr}),groupEnd:A({},r,{value:wr})})}z<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=w.ReactCurrentDispatcher,q;function U(r,e,n){{if(q===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);q=o&&o[1]||""}return` | ||
`+q+r}}var Q=!1,B;{var Kr=typeof WeakMap=="function"?WeakMap:Map;B=new Kr}function br(r,e){if(!r||Q)return"";{var n=B.get(r);if(n!==void 0)return n}var o;Q=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=Z.current,Z.current=null,Jr();try{if(e){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){o=O}Reflect.construct(r,[],i)}else{try{i.call()}catch(O){o=O}r.call(i.prototype)}}else{try{throw Error()}catch(O){o=O}r()}}catch(O){if(O&&o&&typeof O.stack=="string"){for(var t=O.stack.split(` | ||
`),b=o.stack.split(` | ||
`),c=t.length-1,f=b.length-1;c>=1&&f>=0&&t[c]!==b[f];)f--;for(;c>=1&&f>=0;c--,f--)if(t[c]!==b[f]){if(c!==1||f!==1)do if(c--,f--,f<0||t[c]!==b[f]){var R=` | ||
`+t[c].replace(" at new "," at ");return r.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",r.displayName)),typeof r=="function"&&B.set(r,R),R}while(c>=1&&f>=0);break}}}finally{Q=!1,Z.current=s,Gr(),Error.prepareStackTrace=a}var L=r?r.displayName||r.name:"",Dr=L?U(L):"";return typeof r=="function"&&B.set(r,Dr),Dr}function Hr(r,e,n){return br(r,!1)}function Xr(r){var e=r.prototype;return!!(e&&e.isReactComponent)}function $(r,e,n){if(r==null)return"";if(typeof r=="function")return br(r,Xr(r));if(typeof r=="string")return U(r);switch(r){case u:return U("Suspense");case h:return U("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case p:return Hr(r.render);case E:return $(r.type,e,n);case T:{var o=r,a=o._payload,s=o._init;try{return $(s(a),e,n)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,yr={},xr=w.ReactDebugCurrentFrame;function G(r){if(r){var e=r._owner,n=$(r.type,r._source,e?e.type:null);xr.setExtraStackFrame(n)}else xr.setExtraStackFrame(null)}function Zr(r,e,n,o,a){{var s=Function.call.bind(J);for(var i in r)if(s(r,i)){var t=void 0;try{if(typeof r[i]!="function"){var b=Error((o||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}t=r[i](e,i,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){t=c}t&&!(t instanceof Error)&&(G(a),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,i,typeof t),G(null)),t instanceof Error&&!(t.message in yr)&&(yr[t.message]=!0,G(a),v("Failed %s type: %s",n,t.message),G(null))}}}var qr=Array.isArray;function rr(r){return qr(r)}function Qr(r){{var e=typeof Symbol=="function"&&Symbol.toStringTag,n=e&&r[Symbol.toStringTag]||r.constructor.name||"Object";return n}}function re(r){try{return Er(r),!1}catch{return!0}}function Er(r){return""+r}function Rr(r){if(re(r))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qr(r)),Er(r)}var Y=w.ReactCurrentOwner,ee={key:!0,ref:!0,__self:!0,__source:!0},_r,jr,er;er={};function ne(r){if(J.call(r,"ref")){var e=Object.getOwnPropertyDescriptor(r,"ref").get;if(e&&e.isReactWarning)return!1}return r.ref!==void 0}function oe(r){if(J.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return r.key!==void 0}function te(r,e){if(typeof r.ref=="string"&&Y.current&&e&&Y.current.stateNode!==e){var n=S(Y.current.type);er[n]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(Y.current.type),r.ref),er[n]=!0)}}function ie(r,e){{var n=function(){_r||(_r=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"key",{get:n,configurable:!0})}}function ae(r,e){{var n=function(){jr||(jr=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"ref",{get:n,configurable:!0})}}var se=function(r,e,n,o,a,s,i){var t={$$typeof:m,type:r,key:e,ref:n,props:i,_owner:s};return t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(t,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(t,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t};function de(r,e,n,o,a){{var s,i={},t=null,b=null;n!==void 0&&(Rr(n),t=""+n),oe(e)&&(Rr(e.key),t=""+e.key),ne(e)&&(b=e.ref,te(e,a));for(s in e)J.call(e,s)&&!ee.hasOwnProperty(s)&&(i[s]=e[s]);if(r&&r.defaultProps){var c=r.defaultProps;for(s in c)i[s]===void 0&&(i[s]=c[s])}if(t||b){var f=typeof r=="function"?r.displayName||r.name||"Unknown":r;t&&ie(i,f),b&&ae(i,f)}return se(r,t,b,a,o,Y.current,i)}}var nr=w.ReactCurrentOwner,Cr=w.ReactDebugCurrentFrame;function W(r){if(r){var e=r._owner,n=$(r.type,r._source,e?e.type:null);Cr.setExtraStackFrame(n)}else Cr.setExtraStackFrame(null)}var or;or=!1;function tr(r){return typeof r=="object"&&r!==null&&r.$$typeof===m}function Tr(){{if(nr.current){var r=S(nr.current.type);if(r)return` | ||
*/var sr;function Ar(){return sr||(sr=1,process.env.NODE_ENV!=="production"&&function(){var g=b,w=Symbol.for("react.element"),R=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),j=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),Y=Symbol.iterator,H="@@iterator";function X(r){if(r===null||typeof r!="object")return null;var e=Y&&r[Y]||r[H];return typeof e=="function"?e:null}var s=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(r){{for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];M("error",r,n)}}function M(r,e,n){{var o=s.ReactDebugCurrentFrame,a=o.getStackAddendum();a!==""&&(e+="%s",n=n.concat([a]));var d=n.map(function(i){return String(i)});d.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,d)}}var k=!1,Z=!1,Yr=!1,Mr=!1,Ur=!1,lr;lr=Symbol.for("react.module.reference");function Br(r){return!!(typeof r=="string"||typeof r=="function"||r===y||r===O||Ur||r===_||r===c||r===v||Mr||r===F||k||Z||Yr||typeof r=="object"&&r!==null&&(r.$$typeof===C||r.$$typeof===x||r.$$typeof===P||r.$$typeof===j||r.$$typeof===h||r.$$typeof===lr||r.getModuleId!==void 0))}function $r(r,e,n){var o=r.displayName;if(o)return o;var a=e.displayName||e.name||"";return a!==""?n+"("+a+")":n}function cr(r){return r.displayName||"Context"}function T(r){if(r==null)return null;if(typeof r.tag=="number"&&u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case y:return"Fragment";case R:return"Portal";case O:return"Profiler";case _:return"StrictMode";case c:return"Suspense";case v:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case j:var e=r;return cr(e)+".Consumer";case P:var n=r;return cr(n._context)+".Provider";case h:return $r(r,r.render,"ForwardRef");case x:var o=r.displayName||null;return o!==null?o:T(r.type)||"Memo";case C:{var a=r,d=a._payload,i=a._init;try{return T(i(d))}catch{return null}}}return null}var I=Object.assign,V=0,fr,pr,hr,vr,gr,wr,mr;function br(){}br.__reactDisabledLog=!0;function Jr(){{if(V===0){fr=console.log,pr=console.info,hr=console.warn,vr=console.error,gr=console.group,wr=console.groupCollapsed,mr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:br,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}V++}}function Gr(){{if(V--,V===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},r,{value:fr}),info:I({},r,{value:pr}),warn:I({},r,{value:hr}),error:I({},r,{value:vr}),group:I({},r,{value:gr}),groupCollapsed:I({},r,{value:wr}),groupEnd:I({},r,{value:mr})})}V<0&&u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=s.ReactCurrentDispatcher,q;function U(r,e,n){{if(q===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);q=o&&o[1]||""}return` | ||
`+q+r}}var rr=!1,B;{var Kr=typeof WeakMap=="function"?WeakMap:Map;B=new Kr}function yr(r,e){if(!r||rr)return"";{var n=B.get(r);if(n!==void 0)return n}var o;rr=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=Q.current,Q.current=null,Jr();try{if(e){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(S){o=S}Reflect.construct(r,[],i)}else{try{i.call()}catch(S){o=S}r.call(i.prototype)}}else{try{throw Error()}catch(S){o=S}r()}}catch(S){if(S&&o&&typeof S.stack=="string"){for(var t=S.stack.split(` | ||
`),m=o.stack.split(` | ||
`),f=t.length-1,p=m.length-1;f>=1&&p>=0&&t[f]!==m[p];)p--;for(;f>=1&&p>=0;f--,p--)if(t[f]!==m[p]){if(f!==1||p!==1)do if(f--,p--,p<0||t[f]!==m[p]){var E=` | ||
`+t[f].replace(" at new "," at ");return r.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",r.displayName)),typeof r=="function"&&B.set(r,E),E}while(f>=1&&p>=0);break}}}finally{rr=!1,Q.current=d,Gr(),Error.prepareStackTrace=a}var W=r?r.displayName||r.name:"",Fr=W?U(W):"";return typeof r=="function"&&B.set(r,Fr),Fr}function Hr(r,e,n){return yr(r,!1)}function Xr(r){var e=r.prototype;return!!(e&&e.isReactComponent)}function $(r,e,n){if(r==null)return"";if(typeof r=="function")return yr(r,Xr(r));if(typeof r=="string")return U(r);switch(r){case c:return U("Suspense");case v:return U("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case h:return Hr(r.render);case x:return $(r.type,e,n);case C:{var o=r,a=o._payload,d=o._init;try{return $(d(a),e,n)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,xr={},Er=s.ReactDebugCurrentFrame;function G(r){if(r){var e=r._owner,n=$(r.type,r._source,e?e.type:null);Er.setExtraStackFrame(n)}else Er.setExtraStackFrame(null)}function Zr(r,e,n,o,a){{var d=Function.call.bind(J);for(var i in r)if(d(r,i)){var t=void 0;try{if(typeof r[i]!="function"){var m=Error((o||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}t=r[i](e,i,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){t=f}t&&!(t instanceof Error)&&(G(a),u("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,i,typeof t),G(null)),t instanceof Error&&!(t.message in xr)&&(xr[t.message]=!0,G(a),u("Failed %s type: %s",n,t.message),G(null))}}}var Qr=Array.isArray;function er(r){return Qr(r)}function qr(r){{var e=typeof Symbol=="function"&&Symbol.toStringTag,n=e&&r[Symbol.toStringTag]||r.constructor.name||"Object";return n}}function re(r){try{return Rr(r),!1}catch{return!0}}function Rr(r){return""+r}function _r(r){if(re(r))return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qr(r)),Rr(r)}var z=s.ReactCurrentOwner,ee={key:!0,ref:!0,__self:!0,__source:!0},jr,Cr,nr;nr={};function ne(r){if(J.call(r,"ref")){var e=Object.getOwnPropertyDescriptor(r,"ref").get;if(e&&e.isReactWarning)return!1}return r.ref!==void 0}function oe(r){if(J.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return r.key!==void 0}function te(r,e){if(typeof r.ref=="string"&&z.current&&e&&z.current.stateNode!==e){var n=T(z.current.type);nr[n]||(u('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(z.current.type),r.ref),nr[n]=!0)}}function ie(r,e){{var n=function(){jr||(jr=!0,u("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"key",{get:n,configurable:!0})}}function ae(r,e){{var n=function(){Cr||(Cr=!0,u("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"ref",{get:n,configurable:!0})}}var se=function(r,e,n,o,a,d,i){var t={$$typeof:w,type:r,key:e,ref:n,props:i,_owner:d};return t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(t,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(t,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t};function de(r,e,n,o,a){{var d,i={},t=null,m=null;n!==void 0&&(_r(n),t=""+n),oe(e)&&(_r(e.key),t=""+e.key),ne(e)&&(m=e.ref,te(e,a));for(d in e)J.call(e,d)&&!ee.hasOwnProperty(d)&&(i[d]=e[d]);if(r&&r.defaultProps){var f=r.defaultProps;for(d in f)i[d]===void 0&&(i[d]=f[d])}if(t||m){var p=typeof r=="function"?r.displayName||r.name||"Unknown":r;t&&ie(i,p),m&&ae(i,p)}return se(r,t,m,a,o,z.current,i)}}var or=s.ReactCurrentOwner,kr=s.ReactDebugCurrentFrame;function A(r){if(r){var e=r._owner,n=$(r.type,r._source,e?e.type:null);kr.setExtraStackFrame(n)}else kr.setExtraStackFrame(null)}var tr;tr=!1;function ir(r){return typeof r=="object"&&r!==null&&r.$$typeof===w}function Tr(){{if(or.current){var r=T(or.current.type);if(r)return` | ||
Check the render method of \``+r+"`."}return""}}function ue(r){{if(r!==void 0){var e=r.fileName.replace(/^.*[\\\/]/,""),n=r.lineNumber;return` | ||
Check your code at `+e+":"+n+"."}return""}}var kr={};function le(r){{var e=Tr();if(!e){var n=typeof r=="string"?r:r.displayName||r.name;n&&(e=` | ||
Check your code at `+e+":"+n+"."}return""}}var Sr={};function le(r){{var e=Tr();if(!e){var n=typeof r=="string"?r:r.displayName||r.name;n&&(e=` | ||
Check the top-level render call using <`+n+">.")}return e}}function Sr(r,e){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var n=le(e);if(kr[n])return;kr[n]=!0;var o="";r&&r._owner&&r._owner!==nr.current&&(o=" It was passed a child from "+S(r._owner.type)+"."),W(r),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),W(null)}}function Or(r,e){{if(typeof r!="object")return;if(rr(r))for(var n=0;n<r.length;n++){var o=r[n];tr(o)&&Sr(o,e)}else if(tr(r))r._store&&(r._store.validated=!0);else if(r){var a=l(r);if(typeof a=="function"&&a!==r.entries)for(var s=a.call(r),i;!(i=s.next()).done;)tr(i.value)&&Sr(i.value,e)}}}function ce(r){{var e=r.type;if(e==null||typeof e=="string")return;var n;if(typeof e=="function")n=e.propTypes;else if(typeof e=="object"&&(e.$$typeof===p||e.$$typeof===E))n=e.propTypes;else return;if(n){var o=S(e);Zr(n,r.props,"prop",o,r)}else if(e.PropTypes!==void 0&&!or){or=!0;var a=S(e);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",a||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(r){{for(var e=Object.keys(r.props),n=0;n<e.length;n++){var o=e[n];if(o!=="children"&&o!=="key"){W(r),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),W(null);break}}r.ref!==null&&(W(r),v("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Pr(r,e,n,o,a,s){{var i=Br(r);if(!i){var t="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(t+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var b=ue(a);b?t+=b:t+=Tr();var c;r===null?c="null":rr(r)?c="array":r!==void 0&&r.$$typeof===m?(c="<"+(S(r.type)||"Unknown")+" />",t=" Did you accidentally export a JSX literal instead of a component?"):c=typeof r,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,t)}var f=de(r,e,n,a,s);if(f==null)return f;if(i){var R=e.children;if(R!==void 0)if(o)if(rr(R)){for(var L=0;L<R.length;L++)Or(R[L],r);Object.freeze&&Object.freeze(R)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Or(R,r)}return r===y?fe(f):ce(f),f}}function pe(r,e,n){return Pr(r,e,n,!0)}function he(r,e,n){return Pr(r,e,n,!1)}var ve=he,ge=pe;V.Fragment=y,V.jsx=ve,V.jsxs=ge}()),V}process.env.NODE_ENV==="production"?K.exports=Fr():K.exports=Ir();var d=K.exports;const Ar=`@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap"); | ||
Check the top-level render call using <`+n+">.")}return e}}function Or(r,e){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var n=le(e);if(Sr[n])return;Sr[n]=!0;var o="";r&&r._owner&&r._owner!==or.current&&(o=" It was passed a child from "+T(r._owner.type)+"."),A(r),u('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),A(null)}}function Pr(r,e){{if(typeof r!="object")return;if(er(r))for(var n=0;n<r.length;n++){var o=r[n];ir(o)&&Or(o,e)}else if(ir(r))r._store&&(r._store.validated=!0);else if(r){var a=X(r);if(typeof a=="function"&&a!==r.entries)for(var d=a.call(r),i;!(i=d.next()).done;)ir(i.value)&&Or(i.value,e)}}}function ce(r){{var e=r.type;if(e==null||typeof e=="string")return;var n;if(typeof e=="function")n=e.propTypes;else if(typeof e=="object"&&(e.$$typeof===h||e.$$typeof===x))n=e.propTypes;else return;if(n){var o=T(e);Zr(n,r.props,"prop",o,r)}else if(e.PropTypes!==void 0&&!tr){tr=!0;var a=T(e);u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",a||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(r){{for(var e=Object.keys(r.props),n=0;n<e.length;n++){var o=e[n];if(o!=="children"&&o!=="key"){A(r),u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),A(null);break}}r.ref!==null&&(A(r),u("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Dr(r,e,n,o,a,d){{var i=Br(r);if(!i){var t="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(t+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var m=ue(a);m?t+=m:t+=Tr();var f;r===null?f="null":er(r)?f="array":r!==void 0&&r.$$typeof===w?(f="<"+(T(r.type)||"Unknown")+" />",t=" Did you accidentally export a JSX literal instead of a component?"):f=typeof r,u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,t)}var p=de(r,e,n,a,d);if(p==null)return p;if(i){var E=e.children;if(E!==void 0)if(o)if(er(E)){for(var W=0;W<E.length;W++)Pr(E[W],r);Object.freeze&&Object.freeze(E)}else u("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Pr(E,r)}return r===y?fe(p):ce(p),p}}function pe(r,e,n){return Dr(r,e,n,!0)}function he(r,e,n){return Dr(r,e,n,!1)}var ve=he,ge=pe;N.Fragment=y,N.jsx=ve,N.jsxs=ge}()),N}process.env.NODE_ENV==="production"?K.exports=Ir():K.exports=Ar();var l=K.exports;const Wr=`@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap"); | ||
* { | ||
@@ -221,2 +221,2 @@ margin: 0; | ||
} | ||
`;function Wr(g){const[m,_]=x.useState(g),y=x.useRef(null),j=P=>{y.current&&!y.current.contains(P.target)&&_(!1)};return x.useEffect(()=>(document.addEventListener("click",j,!0),()=>{document.removeEventListener("click",j,!0)}),[]),{ref:y,isComponentVisible:m,setIsComponentVisible:_}}const sr="hudoro-input-dropdown-styles";(g=>{if(!document.getElementById(sr)){const m=document.createElement("style");m.id=sr,m.textContent=g,document.head.appendChild(m)}})(Ar);const Lr=({dropdownLists:g,onChange:m,defaultValue:_,size:y="md",multiSelect:j,searchAble:P,iconLeft:D,placeholder:C,onSearch:p})=>{const[u,h]=x.useState([]),{isComponentVisible:E,ref:T,setIsComponentVisible:I}=Wr(!1),M=()=>{I(l=>!l)},H=(l,w)=>{if(!j)h([{label:l,value:w}]),m([{label:l,value:w}]),I(!1);else if(u==null?void 0:u.find(k=>k.value===w)){const k=[...u?u.filter(X=>X.value!==w):[]];h(k),m(k)}else{const k=[...u||[],{label:l,value:w}];h(k),m(k)}};return x.useEffect(()=>{_&&h(_)},[_]),d.jsxs("div",{className:`hsd-input-dropdown-container hsd-input-dropdown-size-${y} ${E?"active":""}`,ref:T,onClick:M,children:[d.jsxs("div",{className:"hsd-input-dropdown-preview-container",children:[D?d.jsx(d.Fragment,{children:x.cloneElement(D,{width:dr(y),color:"#939E99"})}):null,d.jsx("div",{className:"hsd-input-dropdown-container-preview-item",children:u.length?j?u==null?void 0:u.map((l,w)=>d.jsx("p",{style:{minWidth:"max-content"},className:"hsd-input-dropdown-preview-item",children:l==null?void 0:l.label},w)):d.jsx("p",{style:{minWidth:"max-content"},children:u==null?void 0:u[0].label}):d.jsx("p",{className:"hsd-input-dropdown-placeholder",children:C||"Search"})}),d.jsx(Vr,{strokeWidth:2,width:dr(y)})]}),E?d.jsxs("div",{className:"hsd-input-dropdown-lists-container",onClick:l=>l.stopPropagation(),children:[P?d.jsxs("div",{className:"hsd-input-dropdown-container-dropdown-search",children:[d.jsx("div",{style:{display:"flex"},children:d.jsx(Nr,{strokeWidth:2,width:20})}),d.jsx("input",{onChange:l=>{p&&p(l.target.value)}})]}):null,d.jsx("div",{className:"hsd-input-dropdwon-item-container",children:g.map((l,w)=>d.jsxs("div",{className:`hsd-input-dropdwon-item ${u!=null&&u.find(v=>v.value===l.value)?"active":""}`,onClick:()=>H(l.label,l.value),children:[l.icon?d.jsx("div",{children:x.cloneElement(l.icon,{width:16})}):null,d.jsxs("div",{children:[" ",d.jsx("p",{children:l.label})]})]},w))})]}):null]})},Nr=({...g})=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",...g,viewBox:"0 0 20 20",fill:"none",children:[d.jsx("circle",{cx:"9.80547",cy:"9.8055",r:"7.49047",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M15.0153 15.4043L17.9519 18.3333",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),Vr=({...g})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...g,viewBox:"0 0 24 24",fill:"none",color:"#1976D2",children:d.jsx("path",{d:"M4 9L12 17L20 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),dr=g=>{if(g==="sm")return 16;if(g==="md")return 20;if(g==="lg")return 20};F.Dropdown=Lr,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}); | ||
`;function Lr(g){const[w,R]=b.useState(g),y=b.useRef(null),_=O=>{y.current&&!y.current.contains(O.target)&&R(!1)};return b.useEffect(()=>(document.addEventListener("click",_,!0),()=>{document.removeEventListener("click",_,!0)}),[]),{ref:y,isComponentVisible:w,setIsComponentVisible:R}}const dr="hudoro-input-dropdown-styles";(g=>{if(!document.getElementById(dr)){const w=document.createElement("style");w.id=dr,w.textContent=g,document.head.appendChild(w)}})(Wr);const Nr=({dropdownLists:g,onChange:w,defaultValue:R,size:y="md",multiSelect:_,searchAble:O,iconLeft:P,placeholder:j,onSearch:h})=>{const[c,v]=b.useState([]),{isComponentVisible:x,ref:C,setIsComponentVisible:F}=Lr(!1),Y=()=>{F(s=>!s)},H=(s,u)=>{if(!_)v([{label:s,value:u}]),w([{label:s,value:u}]),F(!1);else if(c==null?void 0:c.find(k=>k.value===u)){const k=[...c?c.filter(Z=>Z.value!==u):[]];v(k),w(k)}else{const k=[...c||[],{label:s,value:u}];v(k),w(k)}},X=b.useCallback(()=>{R&&v(R)},[R]);return b.useEffect(()=>{X()},[R]),l.jsxs("div",{className:`hsd-input-dropdown-container hsd-input-dropdown-size-${y} ${x?"active":""}`,ref:C,onClick:Y,children:[l.jsxs("div",{className:"hsd-input-dropdown-preview-container",children:[P?l.jsx(l.Fragment,{children:b.cloneElement(P,{width:ur(y),color:"#939E99"})}):null,l.jsx("div",{className:"hsd-input-dropdown-container-preview-item",children:c.length?_?c==null?void 0:c.map((s,u)=>l.jsx("p",{style:{minWidth:"max-content"},className:"hsd-input-dropdown-preview-item",children:s==null?void 0:s.label},u)):l.jsx("p",{style:{minWidth:"max-content"},children:c==null?void 0:c[0].label}):l.jsx("p",{className:"hsd-input-dropdown-placeholder",children:j||"Search"})}),l.jsx(zr,{strokeWidth:2,width:ur(y)})]}),x?l.jsxs("div",{className:"hsd-input-dropdown-lists-container",onClick:s=>s.stopPropagation(),children:[O?l.jsxs("div",{className:"hsd-input-dropdown-container-dropdown-search",children:[l.jsx("div",{style:{display:"flex"},children:l.jsx(Vr,{strokeWidth:2,width:20})}),l.jsx("input",{onChange:s=>{h&&h(s.target.value)}})]}):null,l.jsx("div",{className:"hsd-input-dropdwon-item-container",children:g.map((s,u)=>l.jsxs("div",{className:`hsd-input-dropdwon-item ${c!=null&&c.find(M=>M.value===s.value)?"active":""}`,onClick:()=>H(s.label,s.value),children:[s.icon?l.jsx("div",{children:b.cloneElement(s.icon,{width:16})}):null,l.jsxs("div",{children:[" ",l.jsx("p",{children:s.label})]})]},u))})]}):null]})},Vr=({...g})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",...g,viewBox:"0 0 20 20",fill:"none",children:[l.jsx("circle",{cx:"9.80547",cy:"9.8055",r:"7.49047",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M15.0153 15.4043L17.9519 18.3333",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),zr=({...g})=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...g,viewBox:"0 0 24 24",fill:"none",color:"#1976D2",children:l.jsx("path",{d:"M4 9L12 17L20 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),ur=g=>{if(g==="sm")return 16;if(g==="md")return 20;if(g==="lg")return 20};D.Dropdown=Nr,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}); |
{ | ||
"name": "@hudoro/dropdown", | ||
"version": "0.0.3-beta.5", | ||
"version": "0.0.3-beta.6", | ||
"description": "dropdown component for Hudoro UI", | ||
@@ -5,0 +5,0 @@ "author": "Prawito Hudoro", |
61447
1261