UNPKG

react-responsive-gallery

Version:
1,177 lines (1,167 loc) 43 kB
import Fe, { useState as G, useLayoutEffect as He, memo as Je, useCallback as _e, useRef as Qe, useEffect as Me, lazy as Pr, useMemo as Ue, Suspense as Rr } from "react"; import E, { css as Tr } from "styled-components"; var ye = { exports: {} }, K = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ke; function Wr() { if (ke) return K; ke = 1; var r = Fe, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, d = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 }; function l(u, g, h) { var v, D = {}, N = null, S = null; h !== void 0 && (N = "" + h), g.key !== void 0 && (N = "" + g.key), g.ref !== void 0 && (S = g.ref); for (v in g) s.call(g, v) && !o.hasOwnProperty(v) && (D[v] = g[v]); if (u && u.defaultProps) for (v in g = u.defaultProps, g) D[v] === void 0 && (D[v] = g[v]); return { $$typeof: n, type: u, key: N, ref: S, props: D, _owner: d.current }; } return K.Fragment = a, K.jsx = l, K.jsxs = l, K; } var q = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Xe; function Zr() { return Xe || (Xe = 1, process.env.NODE_ENV !== "production" && function() { var r = Fe, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), u = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), N = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), T = Symbol.iterator, z = "@@iterator"; function w(e) { if (e === null || typeof e != "object") return null; var t = T && e[T] || e[z]; return typeof t == "function" ? t : null; } var W = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function y(e) { { for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), c = 1; c < t; c++) i[c - 1] = arguments[c]; O("error", e, i); } } function O(e, t, i) { { var c = W.ReactDebugCurrentFrame, b = c.getStackAddendum(); b !== "" && (t += "%s", i = i.concat([b])); var M = i.map(function(f) { return String(f); }); M.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, M); } } var H = !1, U = !1, ce = !1, k = !1, J = !1, Y; Y = Symbol.for("react.module.reference"); function p(e) { return !!(typeof e == "string" || typeof e == "function" || e === s || e === o || J || e === d || e === h || e === v || k || e === S || H || U || ce || typeof e == "object" && e !== null && (e.$$typeof === N || e.$$typeof === D || e.$$typeof === l || e.$$typeof === u || e.$$typeof === g || // 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. e.$$typeof === Y || e.getModuleId !== void 0)); } function le(e, t, i) { var c = e.displayName; if (c) return c; var b = t.displayName || t.name || ""; return b !== "" ? i + "(" + b + ")" : i; } function _(e) { return e.displayName || "Context"; } function A(e) { if (e == null) return null; if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") return e.displayName || e.name || null; if (typeof e == "string") return e; switch (e) { case s: return "Fragment"; case a: return "Portal"; case o: return "Profiler"; case d: return "StrictMode"; case h: return "Suspense"; case v: return "SuspenseList"; } if (typeof e == "object") switch (e.$$typeof) { case u: var t = e; return _(t) + ".Consumer"; case l: var i = e; return _(i._context) + ".Provider"; case g: return le(e, e.render, "ForwardRef"); case D: var c = e.displayName || null; return c !== null ? c : A(e.type) || "Memo"; case N: { var b = e, M = b._payload, f = b._init; try { return A(f(M)); } catch { return null; } } } return null; } var B = Object.assign, Q = 0, xe, he, je, ve, Ne, Se, De; function Pe() { } Pe.__reactDisabledLog = !0; function tr() { { if (Q === 0) { xe = console.log, he = console.info, je = console.warn, ve = console.error, Ne = console.group, Se = console.groupCollapsed, De = console.groupEnd; var e = { configurable: !0, enumerable: !0, value: Pe, writable: !0 }; Object.defineProperties(console, { info: e, log: e, warn: e, error: e, group: e, groupCollapsed: e, groupEnd: e }); } Q++; } } function nr() { { if (Q--, Q === 0) { var e = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: B({}, e, { value: xe }), info: B({}, e, { value: he }), warn: B({}, e, { value: je }), error: B({}, e, { value: ve }), group: B({}, e, { value: Ne }), groupCollapsed: B({}, e, { value: Se }), groupEnd: B({}, e, { value: De }) }); } Q < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var se = W.ReactCurrentDispatcher, ue; function ee(e, t, i) { { if (ue === void 0) try { throw Error(); } catch (b) { var c = b.stack.trim().match(/\n( *(at )?)/); ue = c && c[1] || ""; } return ` ` + ue + e; } } var de = !1, re; { var ir = typeof WeakMap == "function" ? WeakMap : Map; re = new ir(); } function Re(e, t) { if (!e || de) return ""; { var i = re.get(e); if (i !== void 0) return i; } var c; de = !0; var b = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var M; M = se.current, se.current = null, tr(); try { if (t) { var f = function() { throw Error(); }; if (Object.defineProperty(f.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(f, []); } catch (C) { c = C; } Reflect.construct(e, [], f); } else { try { f.call(); } catch (C) { c = C; } e.call(f.prototype); } } else { try { throw Error(); } catch (C) { c = C; } e(); } } catch (C) { if (C && c && typeof C.stack == "string") { for (var I = C.stack.split(` `), P = c.stack.split(` `), x = I.length - 1, j = P.length - 1; x >= 1 && j >= 0 && I[x] !== P[j]; ) j--; for (; x >= 1 && j >= 0; x--, j--) if (I[x] !== P[j]) { if (x !== 1 || j !== 1) do if (x--, j--, j < 0 || I[x] !== P[j]) { var Z = ` ` + I[x].replace(" at new ", " at "); return e.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, Z), Z; } while (x >= 1 && j >= 0); break; } } } finally { de = !1, se.current = M, nr(), Error.prepareStackTrace = b; } var V = e ? e.displayName || e.name : "", Oe = V ? ee(V) : ""; return typeof e == "function" && re.set(e, Oe), Oe; } function ar(e, t, i) { return Re(e, !1); } function or(e) { var t = e.prototype; return !!(t && t.isReactComponent); } function te(e, t, i) { if (e == null) return ""; if (typeof e == "function") return Re(e, or(e)); if (typeof e == "string") return ee(e); switch (e) { case h: return ee("Suspense"); case v: return ee("SuspenseList"); } if (typeof e == "object") switch (e.$$typeof) { case g: return ar(e.render); case D: return te(e.type, t, i); case N: { var c = e, b = c._payload, M = c._init; try { return te(M(b), t, i); } catch { } } } return ""; } var ne = Object.prototype.hasOwnProperty, Te = {}, We = W.ReactDebugCurrentFrame; function ie(e) { if (e) { var t = e._owner, i = te(e.type, e._source, t ? t.type : null); We.setExtraStackFrame(i); } else We.setExtraStackFrame(null); } function cr(e, t, i, c, b) { { var M = Function.call.bind(ne); for (var f in e) if (M(e, f)) { var I = void 0; try { if (typeof e[f] != "function") { var P = Error((c || "React class") + ": " + i + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw P.name = "Invariant Violation", P; } I = e[f](t, f, c, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (x) { I = x; } I && !(I instanceof Error) && (ie(b), y("%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).", c || "React class", i, f, typeof I), ie(null)), I instanceof Error && !(I.message in Te) && (Te[I.message] = !0, ie(b), y("Failed %s type: %s", i, I.message), ie(null)); } } } var lr = Array.isArray; function Ie(e) { return lr(e); } function sr(e) { { var t = typeof Symbol == "function" && Symbol.toStringTag, i = t && e[Symbol.toStringTag] || e.constructor.name || "Object"; return i; } } function ur(e) { try { return Ze(e), !1; } catch { return !0; } } function Ze(e) { return "" + e; } function we(e) { if (ur(e)) return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", sr(e)), Ze(e); } var $ = W.ReactCurrentOwner, dr = { key: !0, ref: !0, __self: !0, __source: !0 }, Ee, ze, ge; ge = {}; function Ir(e) { if (ne.call(e, "ref")) { var t = Object.getOwnPropertyDescriptor(e, "ref").get; if (t && t.isReactWarning) return !1; } return e.ref !== void 0; } function gr(e) { if (ne.call(e, "key")) { var t = Object.getOwnPropertyDescriptor(e, "key").get; if (t && t.isReactWarning) return !1; } return e.key !== void 0; } function fr(e, t) { if (typeof e.ref == "string" && $.current && t && $.current.stateNode !== t) { var i = A($.current.type); ge[i] || (y('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', A($.current.type), e.ref), ge[i] = !0); } } function mr(e, t) { { var i = function() { Ee || (Ee = !0, y("%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)", t)); }; i.isReactWarning = !0, Object.defineProperty(e, "key", { get: i, configurable: !0 }); } } function br(e, t) { { var i = function() { ze || (ze = !0, y("%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)", t)); }; i.isReactWarning = !0, Object.defineProperty(e, "ref", { get: i, configurable: !0 }); } } var Mr = function(e, t, i, c, b, M, f) { var I = { // This tag allows us to uniquely identify this as a React Element $$typeof: n, // Built-in properties that belong on the element type: e, key: t, ref: i, props: f, // Record the component responsible for creating this element. _owner: M }; return I._store = {}, Object.defineProperty(I._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(I, "_self", { configurable: !1, enumerable: !1, writable: !1, value: c }), Object.defineProperty(I, "_source", { configurable: !1, enumerable: !1, writable: !1, value: b }), Object.freeze && (Object.freeze(I.props), Object.freeze(I)), I; }; function yr(e, t, i, c, b) { { var M, f = {}, I = null, P = null; i !== void 0 && (we(i), I = "" + i), gr(t) && (we(t.key), I = "" + t.key), Ir(t) && (P = t.ref, fr(t, b)); for (M in t) ne.call(t, M) && !dr.hasOwnProperty(M) && (f[M] = t[M]); if (e && e.defaultProps) { var x = e.defaultProps; for (M in x) f[M] === void 0 && (f[M] = x[M]); } if (I || P) { var j = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; I && mr(f, j), P && br(f, j); } return Mr(e, I, P, b, c, $.current, f); } } var fe = W.ReactCurrentOwner, Ae = W.ReactDebugCurrentFrame; function X(e) { if (e) { var t = e._owner, i = te(e.type, e._source, t ? t.type : null); Ae.setExtraStackFrame(i); } else Ae.setExtraStackFrame(null); } var me; me = !1; function be(e) { return typeof e == "object" && e !== null && e.$$typeof === n; } function Ce() { { if (fe.current) { var e = A(fe.current.type); if (e) return ` Check the render method of \`` + e + "`."; } return ""; } } function pr(e) { { if (e !== void 0) { var t = e.fileName.replace(/^.*[\\\/]/, ""), i = e.lineNumber; return ` Check your code at ` + t + ":" + i + "."; } return ""; } } var Le = {}; function xr(e) { { var t = Ce(); if (!t) { var i = typeof e == "string" ? e : e.displayName || e.name; i && (t = ` Check the top-level render call using <` + i + ">."); } return t; } } function Ge(e, t) { { if (!e._store || e._store.validated || e.key != null) return; e._store.validated = !0; var i = xr(t); if (Le[i]) return; Le[i] = !0; var c = ""; e && e._owner && e._owner !== fe.current && (c = " It was passed a child from " + A(e._owner.type) + "."), X(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, c), X(null); } } function Ye(e, t) { { if (typeof e != "object") return; if (Ie(e)) for (var i = 0; i < e.length; i++) { var c = e[i]; be(c) && Ge(c, t); } else if (be(e)) e._store && (e._store.validated = !0); else if (e) { var b = w(e); if (typeof b == "function" && b !== e.entries) for (var M = b.call(e), f; !(f = M.next()).done; ) be(f.value) && Ge(f.value, t); } } } function hr(e) { { var t = e.type; if (t == null || typeof t == "string") return; var i; if (typeof t == "function") i = t.propTypes; else if (typeof t == "object" && (t.$$typeof === g || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. t.$$typeof === D)) i = t.propTypes; else return; if (i) { var c = A(t); cr(i, e.props, "prop", c, e); } else if (t.PropTypes !== void 0 && !me) { me = !0; var b = A(t); y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown"); } typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function jr(e) { { for (var t = Object.keys(e.props), i = 0; i < t.length; i++) { var c = t[i]; if (c !== "children" && c !== "key") { X(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), X(null); break; } } e.ref !== null && (X(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), X(null)); } } function Be(e, t, i, c, b, M) { { var f = p(e); if (!f) { var I = ""; (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).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 P = pr(b); P ? I += P : I += Ce(); var x; e === null ? x = "null" : Ie(e) ? x = "array" : e !== void 0 && e.$$typeof === n ? (x = "<" + (A(e.type) || "Unknown") + " />", I = " Did you accidentally export a JSX literal instead of a component?") : x = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", x, I); } var j = yr(e, t, i, b, M); if (j == null) return j; if (f) { var Z = t.children; if (Z !== void 0) if (c) if (Ie(Z)) { for (var V = 0; V < Z.length; V++) Ye(Z[V], e); Object.freeze && Object.freeze(Z); } else y("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 Ye(Z, e); } return e === s ? jr(j) : hr(j), j; } } function vr(e, t, i) { return Be(e, t, i, !0); } function Nr(e, t, i) { return Be(e, t, i, !1); } var Sr = Nr, Dr = vr; q.Fragment = s, q.jsx = Sr, q.jsxs = Dr; }()), q; } process.env.NODE_ENV === "production" ? ye.exports = Wr() : ye.exports = Zr(); var m = ye.exports; const wr = E.div` display: flex; flex-wrap: wrap; padding: 0 4px; box-sizing: border-box; `, Er = ({ children: r }) => /* @__PURE__ */ m.jsx(wr, { children: r }), zr = E.div` box-sizing: border-box; flex: ${({ $colSize: r }) => r || 1}%; max-width: ${({ $colSize: r }) => r || 100}%; padding: ${({ $colPadding: r }) => r || 0}px; `, Ar = E.div` position: relative; input[type="checkbox"] { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; z-index: -1; } label { position: relative; display: inline-block; background-color: #fff; border: 1px solid #ccc; border-radius: 50%; cursor: pointer; height: 22px; width: 22px; } label:after { content: ""; position: absolute; top: 25%; left: 25%; transform: translate(-50%, -50%); border: 2px solid #fff; border-top: none; border-right: none; height: 5px; width: 10px; opacity: 0; transform: rotate(-45deg); } input[type="checkbox"]:focus + label { outline: 2px solid blue; /* Add focus outline for accessibility */ } input[type="checkbox"]:checked + label { background-color: #66bb6a; border-color: #66bb6a; } input[type="checkbox"]:checked + label:after { opacity: 1; } `, Cr = E.div` position: absolute; z-index: 100; top: 8px; ${(r) => r.$mediaMaxWidth && `left: calc(${r.$mediaMaxWidth}% - 22px - 8px);`} `, $e = ({ value: r = !1, id: n, onSelect: a, mediaMaxWidth: s }) => { const [d, o] = G(r), l = (g, h) => { a && a(g, h), o(h); }, u = `checkbox-${n}`; return /* @__PURE__ */ m.jsx(Cr, { $mediaMaxWidth: s, children: /* @__PURE__ */ m.jsxs(Ar, { children: [ /* @__PURE__ */ m.jsx( "input", { type: "checkbox", className: "select-input", onChange: (g) => l(n, g.target.checked), value: n, id: u, "data-testid": u, checked: d } ), /* @__PURE__ */ m.jsx("label", { htmlFor: u }) ] }) }); }, Lr = (r) => { const [n, a] = G(!1), [s, d] = G(!1), [o, l] = G(); return He(() => { const u = new Image(); return u.onload = () => { l(u), a(!0); }, u.onerror = () => { d(!0); }, u.src = r, () => { u.onload = null, u.onerror = null; }; }, [r]), [n, s, o]; }, Gr = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIzOS4yMDUgMC4xMzUgMTYxLjEzMyAxNjEuMDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAwOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOyBmaWxsOiBub25lOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09Im1hdHJpeCgxLjU3NTI1NCwgMCwgMCwgMS41MDc1NzEsIDQ4Ljk2MjgxOCwgMi41MDEyOTcpIj4KICAgIDxwYXRoIGQ9Ik0gODUuNDI5IDg1LjA3OCBIIDQuNTcxIGMgLTEuODMyIDAgLTMuNDcxIC0wLjk0NyAtNC4zODcgLTIuNTMzIGMgLTAuOTE2IC0xLjU4NiAtMC45MTYgLTMuNDc5IDAgLTUuMDY1IEwgNDAuNjEzIDcuNDU1IEMgNDEuNTI5IDUuODY5IDQzLjE2OSA0LjkyMiA0NSA0LjkyMiBjIDAgMCAwIDAgMCAwIGMgMS44MzIgMCAzLjQ3MSAwLjk0NyA0LjM4NiAyLjUzMyBsIDQwLjQyOSA3MC4wMjUgYyAwLjkxNiAxLjU4NiAwLjkxNiAzLjQ3OSAwLjAwMSA1LjA2NSBDIDg4LjkwMS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0ZU5hbWU9ImZpbGwtb3BhY2l0eSIga2V5VGltZXM9IjA7MSIgZHVyPSIxcyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIHZhbHVlcz0iMTswIiBiZWdpbj0iLTAuMTI1cyI+PC9hbmltYXRlPgo8L2NpcmNsZT4KPC9nPgo8L2c+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNzEuMjEzMjAzNDM1NTk2NDMsMjguNzg2Nzk2NTY0NDAzNTcpIj4KPGcgdHJhbnNmb3JtPSJyb3RhdGUoMzE1KSI+CjxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSI2IiBmaWxsPSIjMzUzNTM1IiBmaWxsLW9wYWNpdHk9IjAuMTI1Ij4KICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBiZWdpbj0iMHMiIHZhbHVlcz0iMS41IDEuNTsxIDEiIGtleVRpbWVzPSIwOzEiIGR1cj0iMXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbC1vcGFjaXR5IiBrZXlUaW1lcz0iMDsxIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgdmFsdWVzPSIxOzAiIGJlZ2luPSIwcyI+PC9hbmltYXRlPgo8L2NpcmNsZT4KPC9nPgo8L2c+CjwhLS0gW2xkaW9dIGdlbmVyYXRlZCBieSBodHRwczovL2xvYWRpbmcuaW8vIC0tPjwvc3ZnPg=="; var L = /* @__PURE__ */ ((r) => (r.error = "error", r.loader = "loader", r))(L || {}); const Br = E.img` height: 100px; max-width: 80%; margin-bottom: ${({ $marginBottom: r }) => r || 0}px; `, Or = E.div` display: flex; justify-content: center; `, oe = ({ marginBottom: r, custom: n, type: a }) => /* @__PURE__ */ m.jsx(Or, { children: n || /* @__PURE__ */ m.jsx( Br, { $marginBottom: r, alt: a === L.error ? L.error : L.loader, src: a === L.error ? Gr : Yr } ) }), Ur = E.button` position: relative; max-width: ${({ $maxWidth: r }) => r}%; border: none; padding: 0; background-color: transparent; margin-bottom: ${({ $marginBottom: r }) => r || 0}px; ${({ $useLightBox: r = !1 }) => r && Tr` cursor: pointer; `} `, kr = E.img` max-width: 100%; height: auto; `, F = { xs: 420, s: 600, m: 768, l: 992, xl: 1200 }, Ke = { xs: 4, s: 4, m: 4, l: 4, xl: 4, xxl: 4 }, qe = { xs: 4, s: 4, m: 4, l: 4, xl: 4, xxl: 4 }, er = { xs: 100, s: 100, m: 100, l: 100, xl: 100, xxl: 100 }, rr = { xs: 1, s: 2, m: 3, l: 3, xl: 4, xxl: 5 }; var pe = /* @__PURE__ */ ((r) => (r.Image = "image", r.Video = "video", r))(pe || {}), R = /* @__PURE__ */ ((r) => (r.xs = "xs", r.s = "s", r.m = "m", r.l = "l", r.xl = "xl", r.xxl = "xxl", r))(R || {}), ae = /* @__PURE__ */ ((r) => (r.s = "orderS", r.m = "orderM", r.l = "orderL", r))(ae || {}); const Xr = (r, n) => { const a = n || F; switch (!0) { case r <= a.s: return ae.s; case (r > a.s && r < a.l): return ae.m; default: return ae.l; } }, Vr = (r, n, a = F) => { const s = Xr( n, a ), d = r.reduce( (o, l) => (l.type === pe.Video && (l = { ...l, sources: [ { src: l.src, type: l.videoType || "video/mp4" } ] }), l != null && l[s] ? [l, ...o] : [...o, l]), [] ); return d ? d.sort((o, l) => o != null && o[s] && (l != null && l[s]) ? (o[s] ?? 0) - (l[s] ?? 0) : 0) : []; }, Ve = (r, n) => { const a = n || F; switch (!0) { case r <= a.xs: return R.xs; case r <= a.s: return R.s; case r <= a.m: return R.m; case r <= a.l: return R.l; case r <= a.xl: return R.xl; default: return R.xxl; } }, Fr = (r, n, a) => Ve(r, a) !== Ve(n, a), Hr = (r, n) => { const a = (n == null ? void 0 : n.screenWidthSizes) || F, s = (n == null ? void 0 : n.numOfMediaPerRow) || rr, d = (n == null ? void 0 : n.mediaMaxWidth) || er, o = (n == null ? void 0 : n.colsPadding) || Ke, l = (n == null ? void 0 : n.mediaMarginBottom) || qe; let u = R.xxl; return r <= a.xs ? u = R.xs : r <= a.s ? u = R.s : r <= a.m ? u = R.m : r <= a.l ? u = R.l : r <= a.xl && (u = R.xl), { screenWidthSizes: u !== R.xxl ? a[u] : a.xl + 1, numOfMediaPerRow: s[u], mediaMaxWidth: d[u], colsPadding: o[u], mediaMarginBottom: l[u] }; }, Jr = (r, n) => r == null ? void 0 : r.reduce( (s, d, o) => s[o % n] ? { ...s, [o % n]: [ ...s[o % n], d ] } : { ...s, [o % n]: [d] }, {} ), _r = () => { const r = document.querySelectorAll(".select-input"), n = []; return r.forEach((a) => { a.checked && n.push(a == null ? void 0 : a.value); }), n; }, Qr = (r, n) => { const a = (r == null ? void 0 : r.id) && (n == null ? void 0 : n.indexOf(r.id)) !== -1, s = (n == null ? void 0 : n.indexOf(r.src)) !== -1; return a || s; }, $r = (r, n) => { const a = r.img.src !== n.img.src, s = r.maxWidth !== n.maxWidth, d = r.marginBottom !== n.marginBottom, o = r.useLightBox !== n.useLightBox; return !(a || s || d || o); }, Kr = (r, n) => { const a = r.video.src !== n.video.src, s = r.maxWidth !== n.maxWidth, d = r.marginBottom !== n.marginBottom, o = r.useLightBox !== n.useLightBox; return !(a || s || d || o); }, qr = ({ img: r, maxWidth: n, marginBottom: a, className: s, useLightBox: d, onClick: o, customLoader: l, customError: u, selectable: g, selected: h = !1, onSelect: v, style: D }) => { const [N, S, T] = Lr(r.src), z = _e( (w) => { const W = w.target; g && N && !S && ["input", "label"].includes(W.tagName.toLowerCase()) || o == null || o(); }, [] ); return /* @__PURE__ */ m.jsxs(m.Fragment, { children: [ /* @__PURE__ */ m.jsxs( Ur, { $maxWidth: n, $marginBottom: a, $useLightBox: d, style: { display: !S && N ? "block" : "none" }, "aria-label": r.alt || "", role: "button", tabIndex: 0, onClick: (w) => { z(w); }, children: [ /* @__PURE__ */ m.jsx( kr, { className: s, style: D, src: (T == null ? void 0 : T.src) || "", alt: r.alt || "" } ), g && N && !S && /* @__PURE__ */ m.jsx( $e, { id: r.id || r.src, value: h, onSelect: v, mediaMaxWidth: n } ) ] } ), !N && !S && /* @__PURE__ */ m.jsx( oe, { marginBottom: a, custom: l, type: L.loader } ), S && /* @__PURE__ */ m.jsx( oe, { marginBottom: a, custom: u, type: L.error } ) ] }); }, et = Je(qr, (r, n) => $r(r, n)), rt = (r = F) => { const [n, a] = G(window.innerWidth); return He(() => { const s = () => { a((d) => Fr( window.innerWidth, d, r ) ? window.innerWidth : d); }; return window.addEventListener("resize", s), () => window.removeEventListener("resize", s); }, [r]), { width: n }; }, tt = E.div` position: relative; `, nt = ({ children: r }) => /* @__PURE__ */ m.jsx(tt, { children: r }), it = (r) => { const [n, a] = G(!1), [s, d] = G(!1), o = Qe(null); return Me(() => { a(!1), d(!1); const l = document.createElement("video"), u = () => { a(!0); }, g = () => { d(!0); }; return l.addEventListener("canplay", u), l.addEventListener("error", g), l.src = r, l.load(), o.current = l, () => { l.removeEventListener("canplay", u), l.removeEventListener("error", g); }; }, [r]), { loaded: n, error: s, videoRef: o }; }, at = E.video.attrs({ role: "video" })` display: block; height: auto; max-width: ${({ $maxWidth: r }) => r}%; margin-bottom: ${({ $marginBottom: r }) => r || 0}px; `, ot = ({ video: r, maxWidth: n = 100, marginBottom: a, className: s, useLightBox: d, onClick: o, customLoader: l, customError: u, selectable: g, selected: h = !1, onSelect: v, style: D }) => { const { loaded: N, error: S, videoRef: T } = it(r.src), z = { controls: !0, ...r == null ? void 0 : r.additionalVideoProps }, w = () => { d ? (setTimeout(() => { var W; (W = T == null ? void 0 : T.current) == null || W.pause(); }, 500), setTimeout(() => { o == null || o(); }, 500)) : o == null || o(); }; return /* @__PURE__ */ m.jsxs(m.Fragment, { children: [ N && !S && /* @__PURE__ */ m.jsx( at, { ref: T, $maxWidth: n, onClick: w, $marginBottom: a, className: s, style: D, ...z, children: /* @__PURE__ */ m.jsx("source", { src: r.src, type: r == null ? void 0 : r.videoType }) } ), g && N && !S && /* @__PURE__ */ m.jsx( $e, { id: r.id || r.src, value: h, onSelect: v, mediaMaxWidth: n } ), !N && !S && /* @__PURE__ */ m.jsx( oe, { marginBottom: a, custom: l, type: L.loader } ), S && /* @__PURE__ */ m.jsx( oe, { marginBottom: a, custom: u, type: L.error } ) ] }); }, ct = Je(ot, (r, n) => Kr(r, n)), lt = Pr( () => import("./MediaLightBox-7246983a.js").then((r) => ({ default: r.MediaLightBox })) ), st = ({ media: r, screenWidthSizes: n, numOfMediaPerRow: a, mediaMaxWidth: s, colsPadding: d, mediaMarginBottom: o, mediaStyle: l, mediaClassName: u, useLightBox: g, lightBoxAdditionalProps: h, selectable: v, selectableMedia: D, onSelect: N, customLoader: S, customError: T, onClick: z }) => { const { width: w } = rt(n), y = Hr(w, { screenWidthSizes: n, numOfMediaPerRow: a, mediaMaxWidth: s, colsPadding: d, mediaMarginBottom: o }), O = Qe(null), H = Ue( () => Vr(r, w, n), [r, n, w] ), U = Ue( () => Jr(H, y.numOfMediaPerRow), [y, H] ), ce = _e( (k, J, Y) => { var p; z && z(Y), g && ((p = O == null ? void 0 : O.current) == null || p.openMediaByIndex(k, J)); }, [z, g] ); return /* @__PURE__ */ m.jsxs(m.Fragment, { children: [ g && /* @__PURE__ */ m.jsx(Rr, { fallback: /* @__PURE__ */ m.jsx(m.Fragment, {}), children: /* @__PURE__ */ m.jsx( lt, { mediaLightbox: H, ref: O, lightBoxAdditionalProps: h, numOfMediaPerRow: y.numOfMediaPerRow } ) }), /* @__PURE__ */ m.jsx(Er, { children: Object.keys(U).map((k, J) => { var Y; return /* @__PURE__ */ m.jsx( zr, { $colSize: 100 / y.numOfMediaPerRow, $colPadding: y.colsPadding, children: (Y = U == null ? void 0 : U[k]) == null ? void 0 : Y.map( (p, le) => { const _ = { maxWidth: y.mediaMaxWidth, marginBottom: y.mediaMarginBottom, useLightBox: g, className: `${(p == null ? void 0 : p.mediaClassName) || ""} ${u || ""}`, onClick: () => ce(le, J, (p == null ? void 0 : p.id) || p.src), selectable: v, selected: D ? Qr(p, D) : !1, style: { ...l || {}, ...p.mediaStyle || {} }, customLoader: S, customError: T, onSelect: N }; return /* @__PURE__ */ m.jsx(nt, { children: (p == null ? void 0 : p.type) === pe.Video ? /* @__PURE__ */ m.jsx(ct, { video: p, ..._ }) : /* @__PURE__ */ m.jsx(et, { img: p, ..._ }) }, p.id || p.src); } ) }, `col-${k}` ); }) }) ] }); }; st.defaultProps = { screenWidthSizes: F, numOfMediaPerRow: rr, mediaMaxWidth: er, colsPadding: Ke, mediaMarginBottom: qe, mediaStyle: null, mediaClassName: "", useLightBox: !1, selectable: !1, customLoader: null, customError: null }; const It = () => { const [r, n] = G([]); return Me(() => { n(_r()); }, []), Me(() => { const a = document.querySelectorAll(".select-input"), s = (d) => { var u; const o = (u = d.target) == null ? void 0 : u.checked, l = d.target.value; n((g) => { const h = [...g]; return o ? h.push(l) : h.splice(h.indexOf(l), 1), h; }); }; return a.forEach((d) => { d.addEventListener("change", (o) => { s(o); }); }), () => a.forEach( (d) => d.removeEventListener("change", s) ); }, []), r; }; export { st as G, _r as g, m as j, It as u };