@tryghost/kg-unsplash-selector 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,9 +1,9 @@
1
- var we = Object.defineProperty;
2
- var de = (o, e, i) => e in o ? we(o, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[e] = i;
3
- var M = (o, e, i) => (de(o, typeof e != "symbol" ? e + "" : e, i), i);
4
- import * as A from "react";
5
- import j, { useMemo as os, useRef as Ps, useState as X } from "react";
6
- var xs = { exports: {} }, L = {};
1
+ var ge = Object.defineProperty;
2
+ var be = (o, e, i) => e in o ? ge(o, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[e] = i;
3
+ var M = (o, e, i) => (be(o, typeof e != "symbol" ? e + "" : e, i), i);
4
+ import * as W from "react";
5
+ import F, { useMemo as as, useRef as Xs, useState as C } from "react";
6
+ var gs = { exports: {} }, Q = {};
7
7
  /**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.min.js
@@ -13,25 +13,25 @@ var xs = { exports: {} }, L = {};
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- var Os;
17
- function xe() {
18
- if (Os)
19
- return L;
20
- Os = 1;
21
- var o = j, e = Symbol.for("react.element"), i = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, x = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
22
- function u(d, g, v) {
23
- var _, k = {}, z = null, H = null;
24
- v !== void 0 && (z = "" + v), g.key !== void 0 && (z = "" + g.key), g.ref !== void 0 && (H = g.ref);
16
+ var Cs;
17
+ function _e() {
18
+ if (Cs)
19
+ return Q;
20
+ Cs = 1;
21
+ var o = F, e = Symbol.for("react.element"), i = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, x = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
22
+ function u(d, g, N) {
23
+ var _, k = {}, I = null, H = null;
24
+ N !== void 0 && (I = "" + N), g.key !== void 0 && (I = "" + g.key), g.ref !== void 0 && (H = g.ref);
25
25
  for (_ in g)
26
26
  r.call(g, _) && !m.hasOwnProperty(_) && (k[_] = g[_]);
27
27
  if (d && d.defaultProps)
28
28
  for (_ in g = d.defaultProps, g)
29
29
  k[_] === void 0 && (k[_] = g[_]);
30
- return { $$typeof: e, type: d, key: z, ref: H, props: k, _owner: x.current };
30
+ return { $$typeof: e, type: d, key: I, ref: H, props: k, _owner: x.current };
31
31
  }
32
- return L.Fragment = i, L.jsx = u, L.jsxs = u, L;
32
+ return Q.Fragment = i, Q.jsx = u, Q.jsxs = u, Q;
33
33
  }
34
- var B = {};
34
+ var V = {};
35
35
  /**
36
36
  * @license React
37
37
  * react-jsx-runtime.development.js
@@ -41,27 +41,27 @@ var B = {};
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
- var Xs;
45
- function Me() {
46
- return Xs || (Xs = 1, process.env.NODE_ENV !== "production" && function() {
47
- var o = j, e = Symbol.for("react.element"), i = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), H = Symbol.for("react.offscreen"), U = Symbol.iterator, F = "@@iterator";
48
- function Q(s) {
44
+ var qs;
45
+ function ye() {
46
+ return qs || (qs = 1, process.env.NODE_ENV !== "production" && function() {
47
+ var o = F, e = Symbol.for("react.element"), i = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), H = Symbol.for("react.offscreen"), P = Symbol.iterator, Y = "@@iterator";
48
+ function G(s) {
49
49
  if (s === null || typeof s != "object")
50
50
  return null;
51
- var t = U && s[U] || s[F];
51
+ var t = P && s[P] || s[Y];
52
52
  return typeof t == "function" ? t : null;
53
53
  }
54
- var E = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
55
- function T(s) {
54
+ var v = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
55
+ function y(s) {
56
56
  {
57
57
  for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
58
58
  a[n - 1] = arguments[n];
59
- as("error", s, a);
59
+ is("error", s, a);
60
60
  }
61
61
  }
62
- function as(s, t, a) {
62
+ function is(s, t, a) {
63
63
  {
64
- var n = E.ReactDebugCurrentFrame, f = n.getStackAddendum();
64
+ var n = v.ReactDebugCurrentFrame, f = n.getStackAddendum();
65
65
  f !== "" && (t += "%s", a = a.concat([f]));
66
66
  var w = a.map(function(h) {
67
67
  return String(h);
@@ -69,14 +69,14 @@ function Me() {
69
69
  w.unshift("Warning: " + t), Function.prototype.apply.call(console[s], console, w);
70
70
  }
71
71
  }
72
- var S = !1, C = !1, is = !1, V = !1, G = !1, J;
73
- J = Symbol.for("react.module.reference");
74
- function rs(s) {
75
- return !!(typeof s == "string" || typeof s == "function" || s === r || s === m || G || s === x || s === v || s === _ || V || s === H || S || C || is || typeof s == "object" && s !== null && (s.$$typeof === z || s.$$typeof === k || s.$$typeof === u || s.$$typeof === d || s.$$typeof === g || // This needs to include all possible module reference object
72
+ var S = !1, q = !1, rs = !1, J = !1, K = !1, $;
73
+ $ = Symbol.for("react.module.reference");
74
+ function ls(s) {
75
+ return !!(typeof s == "string" || typeof s == "function" || s === r || s === m || K || s === x || s === N || s === _ || J || s === H || S || q || rs || typeof s == "object" && s !== null && (s.$$typeof === I || s.$$typeof === k || s.$$typeof === u || s.$$typeof === d || s.$$typeof === g || // This needs to include all possible module reference object
76
76
  // types supported by any Flight configuration anywhere since
77
77
  // we don't know which Flight build this will end up being used
78
78
  // with.
79
- s.$$typeof === J || s.getModuleId !== void 0));
79
+ s.$$typeof === $ || s.getModuleId !== void 0));
80
80
  }
81
81
  function p(s, t, a) {
82
82
  var n = s.displayName;
@@ -85,13 +85,13 @@ function Me() {
85
85
  var f = t.displayName || t.name || "";
86
86
  return f !== "" ? a + "(" + f + ")" : a;
87
87
  }
88
- function I(s) {
88
+ function j(s) {
89
89
  return s.displayName || "Context";
90
90
  }
91
- function Y(s) {
91
+ function A(s) {
92
92
  if (s == null)
93
93
  return null;
94
- if (typeof s.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
94
+ if (typeof s.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
95
95
  return s.displayName || s.name || null;
96
96
  if (typeof s == "string")
97
97
  return s;
@@ -104,7 +104,7 @@ function Me() {
104
104
  return "Profiler";
105
105
  case x:
106
106
  return "StrictMode";
107
- case v:
107
+ case N:
108
108
  return "Suspense";
109
109
  case _:
110
110
  return "SuspenseList";
@@ -113,19 +113,19 @@ function Me() {
113
113
  switch (s.$$typeof) {
114
114
  case d:
115
115
  var t = s;
116
- return I(t) + ".Consumer";
116
+ return j(t) + ".Consumer";
117
117
  case u:
118
118
  var a = s;
119
- return I(a._context) + ".Provider";
119
+ return j(a._context) + ".Provider";
120
120
  case g:
121
121
  return p(s, s.render, "ForwardRef");
122
122
  case k:
123
123
  var n = s.displayName || null;
124
- return n !== null ? n : Y(s.type) || "Memo";
125
- case z: {
124
+ return n !== null ? n : A(s.type) || "Memo";
125
+ case I: {
126
126
  var f = s, w = f._payload, h = f._init;
127
127
  try {
128
- return Y(h(w));
128
+ return A(h(w));
129
129
  } catch {
130
130
  return null;
131
131
  }
@@ -133,18 +133,18 @@ function Me() {
133
133
  }
134
134
  return null;
135
135
  }
136
- var R = Object.assign, q = 0, Ms, gs, bs, _s, ys, Ts, Ds;
137
- function ks() {
136
+ var R = Object.assign, Z = 0, bs, _s, ys, Ts, Ds, ks, Hs;
137
+ function vs() {
138
138
  }
139
- ks.__reactDisabledLog = !0;
140
- function qs() {
139
+ vs.__reactDisabledLog = !0;
140
+ function Ls() {
141
141
  {
142
- if (q === 0) {
143
- Ms = console.log, gs = console.info, bs = console.warn, _s = console.error, ys = console.group, Ts = console.groupCollapsed, Ds = console.groupEnd;
142
+ if (Z === 0) {
143
+ bs = console.log, _s = console.info, ys = console.warn, Ts = console.error, Ds = console.group, ks = console.groupCollapsed, Hs = console.groupEnd;
144
144
  var s = {
145
145
  configurable: !0,
146
146
  enumerable: !0,
147
- value: ks,
147
+ value: vs,
148
148
  writable: !0
149
149
  };
150
150
  Object.defineProperties(console, {
@@ -157,12 +157,12 @@ function Me() {
157
157
  groupEnd: s
158
158
  });
159
159
  }
160
- q++;
160
+ Z++;
161
161
  }
162
162
  }
163
- function Zs() {
163
+ function Bs() {
164
164
  {
165
- if (q--, q === 0) {
165
+ if (Z--, Z === 0) {
166
166
  var s = {
167
167
  configurable: !0,
168
168
  enumerable: !0,
@@ -170,64 +170,64 @@ function Me() {
170
170
  };
171
171
  Object.defineProperties(console, {
172
172
  log: R({}, s, {
173
- value: Ms
173
+ value: bs
174
174
  }),
175
175
  info: R({}, s, {
176
- value: gs
176
+ value: _s
177
177
  }),
178
178
  warn: R({}, s, {
179
- value: bs
179
+ value: ys
180
180
  }),
181
181
  error: R({}, s, {
182
- value: _s
182
+ value: Ts
183
183
  }),
184
184
  group: R({}, s, {
185
- value: ys
185
+ value: Ds
186
186
  }),
187
187
  groupCollapsed: R({}, s, {
188
- value: Ts
188
+ value: ks
189
189
  }),
190
190
  groupEnd: R({}, s, {
191
- value: Ds
191
+ value: Hs
192
192
  })
193
193
  });
194
194
  }
195
- q < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
195
+ Z < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
196
196
  }
197
197
  }
198
- var ls = E.ReactCurrentDispatcher, ns;
199
- function K(s, t, a) {
198
+ var ns = v.ReactCurrentDispatcher, ps;
199
+ function ss(s, t, a) {
200
200
  {
201
- if (ns === void 0)
201
+ if (ps === void 0)
202
202
  try {
203
203
  throw Error();
204
204
  } catch (f) {
205
205
  var n = f.stack.trim().match(/\n( *(at )?)/);
206
- ns = n && n[1] || "";
206
+ ps = n && n[1] || "";
207
207
  }
208
208
  return `
209
- ` + ns + s;
209
+ ` + ps + s;
210
210
  }
211
211
  }
212
- var ps = !1, $;
212
+ var cs = !1, es;
213
213
  {
214
- var Ls = typeof WeakMap == "function" ? WeakMap : Map;
215
- $ = new Ls();
214
+ var Qs = typeof WeakMap == "function" ? WeakMap : Map;
215
+ es = new Qs();
216
216
  }
217
- function Hs(s, t) {
218
- if (!s || ps)
217
+ function Es(s, t) {
218
+ if (!s || cs)
219
219
  return "";
220
220
  {
221
- var a = $.get(s);
221
+ var a = es.get(s);
222
222
  if (a !== void 0)
223
223
  return a;
224
224
  }
225
225
  var n;
226
- ps = !0;
226
+ cs = !0;
227
227
  var f = Error.prepareStackTrace;
228
228
  Error.prepareStackTrace = void 0;
229
229
  var w;
230
- w = ls.current, ls.current = null, qs();
230
+ w = ns.current, ns.current = null, Ls();
231
231
  try {
232
232
  if (t) {
233
233
  var h = function() {
@@ -240,98 +240,98 @@ function Me() {
240
240
  }), typeof Reflect == "object" && Reflect.construct) {
241
241
  try {
242
242
  Reflect.construct(h, []);
243
- } catch (W) {
244
- n = W;
243
+ } catch (E) {
244
+ n = E;
245
245
  }
246
246
  Reflect.construct(s, [], h);
247
247
  } else {
248
248
  try {
249
249
  h.call();
250
- } catch (W) {
251
- n = W;
250
+ } catch (E) {
251
+ n = E;
252
252
  }
253
253
  s.call(h.prototype);
254
254
  }
255
255
  } else {
256
256
  try {
257
257
  throw Error();
258
- } catch (W) {
259
- n = W;
258
+ } catch (E) {
259
+ n = E;
260
260
  }
261
261
  s();
262
262
  }
263
- } catch (W) {
264
- if (W && n && typeof W.stack == "string") {
265
- for (var c = W.stack.split(`
263
+ } catch (E) {
264
+ if (E && n && typeof E.stack == "string") {
265
+ for (var c = E.stack.split(`
266
266
  `), D = n.stack.split(`
267
- `), b = c.length - 1, y = D.length - 1; b >= 1 && y >= 0 && c[b] !== D[y]; )
268
- y--;
269
- for (; b >= 1 && y >= 0; b--, y--)
270
- if (c[b] !== D[y]) {
271
- if (b !== 1 || y !== 1)
267
+ `), b = c.length - 1, T = D.length - 1; b >= 1 && T >= 0 && c[b] !== D[T]; )
268
+ T--;
269
+ for (; b >= 1 && T >= 0; b--, T--)
270
+ if (c[b] !== D[T]) {
271
+ if (b !== 1 || T !== 1)
272
272
  do
273
- if (b--, y--, y < 0 || c[b] !== D[y]) {
274
- var N = `
273
+ if (b--, T--, T < 0 || c[b] !== D[T]) {
274
+ var z = `
275
275
  ` + c[b].replace(" at new ", " at ");
276
- return s.displayName && N.includes("<anonymous>") && (N = N.replace("<anonymous>", s.displayName)), typeof s == "function" && $.set(s, N), N;
276
+ return s.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", s.displayName)), typeof s == "function" && es.set(s, z), z;
277
277
  }
278
- while (b >= 1 && y >= 0);
278
+ while (b >= 1 && T >= 0);
279
279
  break;
280
280
  }
281
281
  }
282
282
  } finally {
283
- ps = !1, ls.current = w, Zs(), Error.prepareStackTrace = f;
283
+ cs = !1, ns.current = w, Bs(), Error.prepareStackTrace = f;
284
284
  }
285
- var O = s ? s.displayName || s.name : "", Us = O ? K(O) : "";
286
- return typeof s == "function" && $.set(s, Us), Us;
285
+ var X = s ? s.displayName || s.name : "", U = X ? ss(X) : "";
286
+ return typeof s == "function" && es.set(s, U), U;
287
287
  }
288
- function Bs(s, t, a) {
289
- return Hs(s, !1);
288
+ function Vs(s, t, a) {
289
+ return Es(s, !1);
290
290
  }
291
- function Qs(s) {
291
+ function Gs(s) {
292
292
  var t = s.prototype;
293
293
  return !!(t && t.isReactComponent);
294
294
  }
295
- function ss(s, t, a) {
295
+ function ts(s, t, a) {
296
296
  if (s == null)
297
297
  return "";
298
298
  if (typeof s == "function")
299
- return Hs(s, Qs(s));
299
+ return Es(s, Gs(s));
300
300
  if (typeof s == "string")
301
- return K(s);
301
+ return ss(s);
302
302
  switch (s) {
303
- case v:
304
- return K("Suspense");
303
+ case N:
304
+ return ss("Suspense");
305
305
  case _:
306
- return K("SuspenseList");
306
+ return ss("SuspenseList");
307
307
  }
308
308
  if (typeof s == "object")
309
309
  switch (s.$$typeof) {
310
310
  case g:
311
- return Bs(s.render);
311
+ return Vs(s.render);
312
312
  case k:
313
- return ss(s.type, t, a);
314
- case z: {
313
+ return ts(s.type, t, a);
314
+ case I: {
315
315
  var n = s, f = n._payload, w = n._init;
316
316
  try {
317
- return ss(w(f), t, a);
317
+ return ts(w(f), t, a);
318
318
  } catch {
319
319
  }
320
320
  }
321
321
  }
322
322
  return "";
323
323
  }
324
- var es = Object.prototype.hasOwnProperty, Es = {}, vs = E.ReactDebugCurrentFrame;
325
- function ts(s) {
324
+ var L = Object.prototype.hasOwnProperty, Ns = {}, zs = v.ReactDebugCurrentFrame;
325
+ function os(s) {
326
326
  if (s) {
327
- var t = s._owner, a = ss(s.type, s._source, t ? t.type : null);
328
- vs.setExtraStackFrame(a);
327
+ var t = s._owner, a = ts(s.type, s._source, t ? t.type : null);
328
+ zs.setExtraStackFrame(a);
329
329
  } else
330
- vs.setExtraStackFrame(null);
330
+ zs.setExtraStackFrame(null);
331
331
  }
332
- function Vs(s, t, a, n, f) {
332
+ function Js(s, t, a, n, f) {
333
333
  {
334
- var w = Function.call.bind(es);
334
+ var w = Function.call.bind(L);
335
335
  for (var h in s)
336
336
  if (w(s, h)) {
337
337
  var c = void 0;
@@ -344,67 +344,67 @@ function Me() {
344
344
  } catch (b) {
345
345
  c = b;
346
346
  }
347
- c && !(c instanceof Error) && (ts(f), T("%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).", n || "React class", a, h, typeof c), ts(null)), c instanceof Error && !(c.message in Es) && (Es[c.message] = !0, ts(f), T("Failed %s type: %s", a, c.message), ts(null));
347
+ c && !(c instanceof Error) && (os(f), 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).", n || "React class", a, h, typeof c), os(null)), c instanceof Error && !(c.message in Ns) && (Ns[c.message] = !0, os(f), y("Failed %s type: %s", a, c.message), os(null));
348
348
  }
349
349
  }
350
350
  }
351
- var Gs = Array.isArray;
352
- function cs(s) {
353
- return Gs(s);
351
+ var Ks = Array.isArray;
352
+ function hs(s) {
353
+ return Ks(s);
354
354
  }
355
- function Js(s) {
355
+ function $s(s) {
356
356
  {
357
357
  var t = typeof Symbol == "function" && Symbol.toStringTag, a = t && s[Symbol.toStringTag] || s.constructor.name || "Object";
358
358
  return a;
359
359
  }
360
360
  }
361
- function Ks(s) {
361
+ function se(s) {
362
362
  try {
363
- return Ns(s), !1;
363
+ return Is(s), !1;
364
364
  } catch {
365
365
  return !0;
366
366
  }
367
367
  }
368
- function Ns(s) {
368
+ function Is(s) {
369
369
  return "" + s;
370
370
  }
371
- function zs(s) {
372
- if (Ks(s))
373
- return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Js(s)), Ns(s);
371
+ function js(s) {
372
+ if (se(s))
373
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", $s(s)), Is(s);
374
374
  }
375
- var Z = E.ReactCurrentOwner, $s = {
375
+ var B = v.ReactCurrentOwner, ee = {
376
376
  key: !0,
377
377
  ref: !0,
378
378
  __self: !0,
379
379
  __source: !0
380
- }, Is, js, hs;
381
- hs = {};
382
- function se(s) {
383
- if (es.call(s, "ref")) {
380
+ }, As, Fs, fs;
381
+ fs = {};
382
+ function te(s) {
383
+ if (L.call(s, "ref")) {
384
384
  var t = Object.getOwnPropertyDescriptor(s, "ref").get;
385
385
  if (t && t.isReactWarning)
386
386
  return !1;
387
387
  }
388
388
  return s.ref !== void 0;
389
389
  }
390
- function ee(s) {
391
- if (es.call(s, "key")) {
390
+ function oe(s) {
391
+ if (L.call(s, "key")) {
392
392
  var t = Object.getOwnPropertyDescriptor(s, "key").get;
393
393
  if (t && t.isReactWarning)
394
394
  return !1;
395
395
  }
396
396
  return s.key !== void 0;
397
397
  }
398
- function te(s, t) {
399
- if (typeof s.ref == "string" && Z.current && t && Z.current.stateNode !== t) {
400
- var a = Y(Z.current.type);
401
- hs[a] || (T('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', Y(Z.current.type), s.ref), hs[a] = !0);
398
+ function ae(s, t) {
399
+ if (typeof s.ref == "string" && B.current && t && B.current.stateNode !== t) {
400
+ var a = A(B.current.type);
401
+ fs[a] || (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(B.current.type), s.ref), fs[a] = !0);
402
402
  }
403
403
  }
404
- function oe(s, t) {
404
+ function ie(s, t) {
405
405
  {
406
406
  var a = function() {
407
- Is || (Is = !0, T("%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));
407
+ As || (As = !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));
408
408
  };
409
409
  a.isReactWarning = !0, Object.defineProperty(s, "key", {
410
410
  get: a,
@@ -412,10 +412,10 @@ function Me() {
412
412
  });
413
413
  }
414
414
  }
415
- function ae(s, t) {
415
+ function re(s, t) {
416
416
  {
417
417
  var a = function() {
418
- js || (js = !0, T("%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));
418
+ Fs || (Fs = !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));
419
419
  };
420
420
  a.isReactWarning = !0, Object.defineProperty(s, "ref", {
421
421
  get: a,
@@ -423,7 +423,7 @@ function Me() {
423
423
  });
424
424
  }
425
425
  }
426
- var ie = function(s, t, a, n, f, w, h) {
426
+ var le = function(s, t, a, n, f, w, h) {
427
427
  var c = {
428
428
  // This tag allows us to uniquely identify this as a React Element
429
429
  $$typeof: e,
@@ -452,41 +452,41 @@ function Me() {
452
452
  value: f
453
453
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
454
454
  };
455
- function re(s, t, a, n, f) {
455
+ function ne(s, t, a, n, f) {
456
456
  {
457
457
  var w, h = {}, c = null, D = null;
458
- a !== void 0 && (zs(a), c = "" + a), ee(t) && (zs(t.key), c = "" + t.key), se(t) && (D = t.ref, te(t, f));
458
+ a !== void 0 && (js(a), c = "" + a), oe(t) && (js(t.key), c = "" + t.key), te(t) && (D = t.ref, ae(t, f));
459
459
  for (w in t)
460
- es.call(t, w) && !$s.hasOwnProperty(w) && (h[w] = t[w]);
460
+ L.call(t, w) && !ee.hasOwnProperty(w) && (h[w] = t[w]);
461
461
  if (s && s.defaultProps) {
462
462
  var b = s.defaultProps;
463
463
  for (w in b)
464
464
  h[w] === void 0 && (h[w] = b[w]);
465
465
  }
466
466
  if (c || D) {
467
- var y = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
468
- c && oe(h, y), D && ae(h, y);
467
+ var T = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
468
+ c && ie(h, T), D && re(h, T);
469
469
  }
470
- return ie(s, c, D, f, n, Z.current, h);
470
+ return le(s, c, D, f, n, B.current, h);
471
471
  }
472
472
  }
473
- var fs = E.ReactCurrentOwner, As = E.ReactDebugCurrentFrame;
474
- function P(s) {
473
+ var us = v.ReactCurrentOwner, Ws = v.ReactDebugCurrentFrame;
474
+ function O(s) {
475
475
  if (s) {
476
- var t = s._owner, a = ss(s.type, s._source, t ? t.type : null);
477
- As.setExtraStackFrame(a);
476
+ var t = s._owner, a = ts(s.type, s._source, t ? t.type : null);
477
+ Ws.setExtraStackFrame(a);
478
478
  } else
479
- As.setExtraStackFrame(null);
479
+ Ws.setExtraStackFrame(null);
480
480
  }
481
- var us;
482
- us = !1;
483
- function ms(s) {
481
+ var ms;
482
+ ms = !1;
483
+ function ws(s) {
484
484
  return typeof s == "object" && s !== null && s.$$typeof === e;
485
485
  }
486
- function Fs() {
486
+ function Ys() {
487
487
  {
488
- if (fs.current) {
489
- var s = Y(fs.current.type);
488
+ if (us.current) {
489
+ var s = A(us.current.type);
490
490
  if (s)
491
491
  return `
492
492
 
@@ -495,13 +495,13 @@ Check the render method of \`` + s + "`.";
495
495
  return "";
496
496
  }
497
497
  }
498
- function le(s) {
498
+ function pe(s) {
499
499
  return "";
500
500
  }
501
- var Ys = {};
502
- function ne(s) {
501
+ var Ss = {};
502
+ function ce(s) {
503
503
  {
504
- var t = Fs();
504
+ var t = Ys();
505
505
  if (!t) {
506
506
  var a = typeof s == "string" ? s : s.displayName || s.name;
507
507
  a && (t = `
@@ -511,39 +511,39 @@ Check the top-level render call using <` + a + ">.");
511
511
  return t;
512
512
  }
513
513
  }
514
- function Ws(s, t) {
514
+ function Rs(s, t) {
515
515
  {
516
516
  if (!s._store || s._store.validated || s.key != null)
517
517
  return;
518
518
  s._store.validated = !0;
519
- var a = ne(t);
520
- if (Ys[a])
519
+ var a = ce(t);
520
+ if (Ss[a])
521
521
  return;
522
- Ys[a] = !0;
522
+ Ss[a] = !0;
523
523
  var n = "";
524
- s && s._owner && s._owner !== fs.current && (n = " It was passed a child from " + Y(s._owner.type) + "."), P(s), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, n), P(null);
524
+ s && s._owner && s._owner !== us.current && (n = " It was passed a child from " + A(s._owner.type) + "."), O(s), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, n), O(null);
525
525
  }
526
526
  }
527
- function Ss(s, t) {
527
+ function Us(s, t) {
528
528
  {
529
529
  if (typeof s != "object")
530
530
  return;
531
- if (cs(s))
531
+ if (hs(s))
532
532
  for (var a = 0; a < s.length; a++) {
533
533
  var n = s[a];
534
- ms(n) && Ws(n, t);
534
+ ws(n) && Rs(n, t);
535
535
  }
536
- else if (ms(s))
536
+ else if (ws(s))
537
537
  s._store && (s._store.validated = !0);
538
538
  else if (s) {
539
- var f = Q(s);
539
+ var f = G(s);
540
540
  if (typeof f == "function" && f !== s.entries)
541
541
  for (var w = f.call(s), h; !(h = w.next()).done; )
542
- ms(h.value) && Ws(h.value, t);
542
+ ws(h.value) && Rs(h.value, t);
543
543
  }
544
544
  }
545
545
  }
546
- function pe(s) {
546
+ function he(s) {
547
547
  {
548
548
  var t = s.type;
549
549
  if (t == null || typeof t == "string")
@@ -558,71 +558,86 @@ Check the top-level render call using <` + a + ">.");
558
558
  else
559
559
  return;
560
560
  if (a) {
561
- var n = Y(t);
562
- Vs(a, s.props, "prop", n, s);
563
- } else if (t.PropTypes !== void 0 && !us) {
564
- us = !0;
565
- var f = Y(t);
566
- T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
561
+ var n = A(t);
562
+ Js(a, s.props, "prop", n, s);
563
+ } else if (t.PropTypes !== void 0 && !ms) {
564
+ ms = !0;
565
+ var f = A(t);
566
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
567
567
  }
568
- typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
568
+ typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
569
569
  }
570
570
  }
571
- function ce(s) {
571
+ function fe(s) {
572
572
  {
573
573
  for (var t = Object.keys(s.props), a = 0; a < t.length; a++) {
574
574
  var n = t[a];
575
575
  if (n !== "children" && n !== "key") {
576
- P(s), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), P(null);
576
+ O(s), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), O(null);
577
577
  break;
578
578
  }
579
579
  }
580
- s.ref !== null && (P(s), T("Invalid attribute `ref` supplied to `React.Fragment`."), P(null));
580
+ s.ref !== null && (O(s), y("Invalid attribute `ref` supplied to `React.Fragment`."), O(null));
581
581
  }
582
582
  }
583
- function Rs(s, t, a, n, f, w) {
583
+ var Ps = {};
584
+ function Os(s, t, a, n, f, w) {
584
585
  {
585
- var h = rs(s);
586
+ var h = ls(s);
586
587
  if (!h) {
587
588
  var c = "";
588
589
  (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
589
- var D = le();
590
- D ? c += D : c += Fs();
590
+ var D = pe();
591
+ D ? c += D : c += Ys();
591
592
  var b;
592
- s === null ? b = "null" : cs(s) ? b = "array" : s !== void 0 && s.$$typeof === e ? (b = "<" + (Y(s.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : b = typeof s, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, c);
593
+ s === null ? b = "null" : hs(s) ? b = "array" : s !== void 0 && s.$$typeof === e ? (b = "<" + (A(s.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : b = typeof s, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, c);
593
594
  }
594
- var y = re(s, t, a, f, w);
595
- if (y == null)
596
- return y;
595
+ var T = ne(s, t, a, f, w);
596
+ if (T == null)
597
+ return T;
597
598
  if (h) {
598
- var N = t.children;
599
- if (N !== void 0)
599
+ var z = t.children;
600
+ if (z !== void 0)
600
601
  if (n)
601
- if (cs(N)) {
602
- for (var O = 0; O < N.length; O++)
603
- Ss(N[O], s);
604
- Object.freeze && Object.freeze(N);
602
+ if (hs(z)) {
603
+ for (var X = 0; X < z.length; X++)
604
+ Us(z[X], s);
605
+ Object.freeze && Object.freeze(z);
605
606
  } else
606
- T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
607
+ 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.");
607
608
  else
608
- Ss(N, s);
609
+ Us(z, s);
610
+ }
611
+ if (L.call(t, "key")) {
612
+ var U = A(s), E = Object.keys(t).filter(function(Me) {
613
+ return Me !== "key";
614
+ }), ds = E.length > 0 ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}";
615
+ if (!Ps[U + ds]) {
616
+ var xe = E.length > 0 ? "{" + E.join(": ..., ") + ": ...}" : "{}";
617
+ y(`A props object containing a "key" prop is being spread into JSX:
618
+ let props = %s;
619
+ <%s {...props} />
620
+ React keys must be passed directly to JSX without using spread:
621
+ let props = %s;
622
+ <%s key={someKey} {...props} />`, ds, U, xe, U), Ps[U + ds] = !0;
623
+ }
609
624
  }
610
- return s === r ? ce(y) : pe(y), y;
625
+ return s === r ? fe(T) : he(T), T;
611
626
  }
612
627
  }
613
- function he(s, t, a) {
614
- return Rs(s, t, a, !0);
628
+ function ue(s, t, a) {
629
+ return Os(s, t, a, !0);
615
630
  }
616
- function fe(s, t, a) {
617
- return Rs(s, t, a, !1);
631
+ function me(s, t, a) {
632
+ return Os(s, t, a, !1);
618
633
  }
619
- var ue = fe, me = he;
620
- B.Fragment = r, B.jsx = ue, B.jsxs = me;
621
- }()), B;
634
+ var we = me, de = ue;
635
+ V.Fragment = r, V.jsx = we, V.jsxs = de;
636
+ }()), V;
622
637
  }
623
- process.env.NODE_ENV === "production" ? xs.exports = xe() : xs.exports = Me();
624
- var l = xs.exports;
625
- class ge {
638
+ process.env.NODE_ENV === "production" ? gs.exports = _e() : gs.exports = ye();
639
+ var l = gs.exports;
640
+ class Te {
626
641
  constructor(e = 3) {
627
642
  M(this, "columnCount");
628
643
  M(this, "columns", []);
@@ -651,12 +666,12 @@ class ge {
651
666
  e !== this.columnCount && (this.columnCount = e, this.reset());
652
667
  }
653
668
  }
654
- const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...o }, /* @__PURE__ */ A.createElement("path", { d: "M20 5.5l-8 8-8-8m-3.5 13h23", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: 10, fill: "none" })), _e = (o) => /* @__PURE__ */ A.createElement("svg", { viewBox: "0 0 32 32", ...o }, /* @__PURE__ */ A.createElement("path", { d: "M17.4 29c-.8.8-2 .8-2.8 0L2.3 16.2C-.8 13.1-.8 8 2.3 4.8c3.1-3.1 8.2-3.1 11.3 0L16 7.6l2.3-2.8c3.1-3.1 8.2-3.1 11.3 0 3.1 3.1 3.1 8.2 0 11.4L17.4 29z" })), ye = {
655
- heart: _e,
656
- download: be
657
- }, ws = ({ icon: o, label: e, ...i }) => {
669
+ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...o }, /* @__PURE__ */ W.createElement("path", { d: "M20 5.5l-8 8-8-8m-3.5 13h23", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: 10, fill: "none" })), ke = (o) => /* @__PURE__ */ W.createElement("svg", { viewBox: "0 0 32 32", ...o }, /* @__PURE__ */ W.createElement("path", { d: "M17.4 29c-.8.8-2 .8-2.8 0L2.3 16.2C-.8 13.1-.8 8 2.3 4.8c3.1-3.1 8.2-3.1 11.3 0L16 7.6l2.3-2.8c3.1-3.1 8.2-3.1 11.3 0 3.1 3.1 3.1 8.2 0 11.4L17.4 29z" })), He = {
670
+ heart: ke,
671
+ download: De
672
+ }, xs = ({ icon: o, label: e, ...i }) => {
658
673
  let r = null;
659
- return o && (r = ye[o]), /* @__PURE__ */ l.jsxs(
674
+ return o && (r = He[o]), /* @__PURE__ */ l.jsxs(
660
675
  "a",
661
676
  {
662
677
  className: "text-grey-700 flex h-8 shrink-0 cursor-pointer items-center rounded-md bg-white px-3 py-2 font-sans text-sm font-medium leading-6 opacity-90 transition-all ease-in-out hover:opacity-100",
@@ -668,23 +683,23 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
668
683
  ]
669
684
  }
670
685
  );
671
- }, Cs = ({ payload: o, srcUrl: e, links: i, likes: r, user: x, alt: m, urls: u, height: d, width: g, zoomed: v, insertImage: _, selectImg: k }) => {
672
- const z = (H) => {
673
- H.stopPropagation(), k(v ? null : o);
686
+ }, Zs = ({ payload: o, srcUrl: e, links: i, likes: r, user: x, alt: m, urls: u, height: d, width: g, zoomed: N, insertImage: _, selectImg: k }) => {
687
+ const I = (H) => {
688
+ H.stopPropagation(), k(N ? null : o);
674
689
  };
675
690
  return /* @__PURE__ */ l.jsxs(
676
691
  "div",
677
692
  {
678
- className: `relative mb-6 block ${v ? "h-full w-[max-content] cursor-zoom-out" : "w-full cursor-zoom-in"}`,
693
+ className: `relative mb-6 block ${N ? "h-full w-[max-content] cursor-zoom-out" : "w-full cursor-zoom-in"}`,
679
694
  style: { backgroundColor: o.color || "transparent" },
680
695
  "data-kg-unsplash-gallery-item": !0,
681
- onClick: z,
696
+ onClick: I,
682
697
  children: [
683
698
  /* @__PURE__ */ l.jsx(
684
699
  "img",
685
700
  {
686
701
  alt: m,
687
- className: `${v ? "h-full w-auto object-contain" : "block h-auto"}`,
702
+ className: `${N ? "h-full w-auto object-contain" : "block h-auto"}`,
688
703
  height: d,
689
704
  loading: "lazy",
690
705
  src: e,
@@ -695,7 +710,7 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
695
710
  /* @__PURE__ */ l.jsxs("div", { className: "absolute inset-0 flex flex-col justify-between bg-gradient-to-b from-black/5 via-black/5 to-black/30 p-5 opacity-0 transition-all ease-in-out hover:opacity-100", children: [
696
711
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-end gap-3", children: [
697
712
  /* @__PURE__ */ l.jsx(
698
- ws,
713
+ xs,
699
714
  {
700
715
  "data-kg-button": "unsplash-like",
701
716
  href: `${i.html}/?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit`,
@@ -706,7 +721,7 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
706
721
  }
707
722
  ),
708
723
  /* @__PURE__ */ l.jsx(
709
- ws,
724
+ xs,
710
725
  {
711
726
  "data-kg-button": "unsplash-download",
712
727
  href: `${i.download}/?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit&amp;force=true`,
@@ -719,7 +734,7 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
719
734
  /* @__PURE__ */ l.jsx("img", { alt: "author", className: "mr-2 size-8 rounded-full", src: x.profile_image.medium }),
720
735
  /* @__PURE__ */ l.jsx("div", { className: "mr-2 truncate font-sans text-sm font-medium text-white", children: x.name })
721
736
  ] }),
722
- /* @__PURE__ */ l.jsx(ws, { label: "Insert image", "data-kg-unsplash-insert-button": !0, onClick: (H) => {
737
+ /* @__PURE__ */ l.jsx(xs, { label: "Insert image", "data-kg-unsplash-insert-button": !0, onClick: (H) => {
723
738
  H.stopPropagation(), _({
724
739
  src: u.regular.replace(/&w=1080/, "&w=2000"),
725
740
  caption: `<span>Photo by <a href="${x.links.html}">${x.name}</a> / <a href="https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit">Unsplash</a></span>`,
@@ -734,8 +749,8 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
734
749
  ]
735
750
  }
736
751
  );
737
- }, Te = ({ payload: o, insertImage: e, selectImg: i, zoomed: r }) => /* @__PURE__ */ l.jsx("div", { className: "flex h-full grow basis-0 justify-center", "data-kg-unsplash-zoomed": !0, onClick: () => i(null), children: /* @__PURE__ */ l.jsx(
738
- Cs,
752
+ }, ve = ({ payload: o, insertImage: e, selectImg: i, zoomed: r }) => /* @__PURE__ */ l.jsx("div", { className: "flex h-full grow basis-0 justify-center", "data-kg-unsplash-zoomed": !0, onClick: () => i(null), children: /* @__PURE__ */ l.jsx(
753
+ Zs,
739
754
  {
740
755
  alt: o.alt_description,
741
756
  height: o.height,
@@ -750,10 +765,10 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
750
765
  width: o.width,
751
766
  zoomed: r
752
767
  }
753
- ) }), De = () => /* @__PURE__ */ l.jsx("div", { className: "absolute inset-y-0 left-0 flex w-full items-center justify-center overflow-hidden pb-[8vh]", "data-kg-loader": !0, children: /* @__PURE__ */ l.jsx("div", { className: "animate-spin before:bg-grey-800 relative inline-block size-[50px] rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full" }) }), ke = (o) => /* @__PURE__ */ l.jsx("div", { className: "mr-6 flex grow basis-0 flex-col justify-start last-of-type:mr-0", children: o.children }), He = (o) => o != null && o.columns ? o == null ? void 0 : o.columns.map((e, i) => (
768
+ ) }), Ee = () => /* @__PURE__ */ l.jsx("div", { className: "absolute inset-y-0 left-0 flex w-full items-center justify-center overflow-hidden pb-[8vh]", "data-kg-loader": !0, children: /* @__PURE__ */ l.jsx("div", { className: "animate-spin before:bg-grey-800 relative inline-block size-[50px] rounded-full border border-black/10 before:z-10 before:mt-[7px] before:block before:size-[7px] before:rounded-full" }) }), Ne = (o) => /* @__PURE__ */ l.jsx("div", { className: "mr-6 flex grow basis-0 flex-col justify-start last-of-type:mr-0", children: o.children }), ze = (o) => o != null && o.columns ? o == null ? void 0 : o.columns.map((e, i) => (
754
769
  // eslint-disable-next-line react/no-array-index-key
755
- /* @__PURE__ */ l.jsx(ke, { children: e.map((r) => /* @__PURE__ */ l.jsx(
756
- Cs,
770
+ /* @__PURE__ */ l.jsx(Ne, { children: e.map((r) => /* @__PURE__ */ l.jsx(
771
+ Zs,
757
772
  {
758
773
  alt: r.alt_description,
759
774
  height: r.height,
@@ -770,10 +785,10 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
770
785
  },
771
786
  r.id
772
787
  )) }, i)
773
- )) : null, ds = (o) => /* @__PURE__ */ l.jsx("div", { className: "relative h-full overflow-hidden", "data-kg-unsplash-gallery": !0, children: /* @__PURE__ */ l.jsxs("div", { ref: o.galleryRef, className: `flex size-full justify-center overflow-auto px-20 ${o != null && o.zoomed ? "pb-10" : ""}`, "data-kg-unsplash-gallery-scrollref": !0, children: [
788
+ )) : null, Ms = (o) => /* @__PURE__ */ l.jsx("div", { className: "relative h-full overflow-hidden", "data-kg-unsplash-gallery": !0, children: /* @__PURE__ */ l.jsxs("div", { ref: o.galleryRef, className: `flex size-full justify-center overflow-auto px-20 ${o != null && o.zoomed ? "pb-10" : ""}`, "data-kg-unsplash-gallery-scrollref": !0, children: [
774
789
  o.children,
775
- (o == null ? void 0 : o.isLoading) && /* @__PURE__ */ l.jsx(De, {})
776
- ] }) }), Ee = ({
790
+ (o == null ? void 0 : o.isLoading) && /* @__PURE__ */ l.jsx(Ee, {})
791
+ ] }) }), Ie = ({
777
792
  zoomed: o,
778
793
  error: e,
779
794
  galleryRef: i,
@@ -782,12 +797,12 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
782
797
  selectImg: m,
783
798
  insertImage: u
784
799
  }) => o ? /* @__PURE__ */ l.jsx(
785
- ds,
800
+ Ms,
786
801
  {
787
802
  galleryRef: i,
788
803
  zoomed: o,
789
804
  children: /* @__PURE__ */ l.jsx(
790
- Te,
805
+ ve,
791
806
  {
792
807
  alt: o.alt_description,
793
808
  height: o.height,
@@ -805,7 +820,7 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
805
820
  )
806
821
  }
807
822
  ) : e ? /* @__PURE__ */ l.jsx(
808
- ds,
823
+ Ms,
809
824
  {
810
825
  galleryRef: i,
811
826
  zoomed: o,
@@ -815,13 +830,13 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
815
830
  ] })
816
831
  }
817
832
  ) : /* @__PURE__ */ l.jsx(
818
- ds,
833
+ Ms,
819
834
  {
820
835
  galleryRef: i,
821
836
  isLoading: r,
822
837
  zoomed: o,
823
838
  children: /* @__PURE__ */ l.jsx(
824
- He,
839
+ ze,
825
840
  {
826
841
  columns: x,
827
842
  insertImage: u,
@@ -830,11 +845,11 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
830
845
  }
831
846
  )
832
847
  }
833
- ), ve = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5, viewBox: "0 0 24 24", ...o }, /* @__PURE__ */ A.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M.75 23.249l22.5-22.5M23.25 23.249L.75.749" })), Ne = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5, viewBox: "0 0 24 24", ...o }, /* @__PURE__ */ A.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1.472 13.357a9.063 9.063 0 1 0 16.682-7.09 9.063 9.063 0 1 0-16.682 7.09Zm14.749 2.863 7.029 7.03" })), ze = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 122.43 122.41", ...o }, /* @__PURE__ */ A.createElement("path", { d: "M83.86 54.15v34.13H38.57V54.15H0v68.26h122.43V54.15H83.86zM38.57 0h45.3v34.13h-45.3z" })), Ie = ({ closeModal: o, handleSearch: e, children: i }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
848
+ ), je = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5, viewBox: "0 0 24 24", ...o }, /* @__PURE__ */ W.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M.75 23.249l22.5-22.5M23.25 23.249L.75.749" })), Ae = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", strokeWidth: 1.5, viewBox: "0 0 24 24", ...o }, /* @__PURE__ */ W.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1.472 13.357a9.063 9.063 0 1 0 16.682-7.09 9.063 9.063 0 1 0-16.682 7.09Zm14.749 2.863 7.029 7.03" })), Fe = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 122.43 122.41", ...o }, /* @__PURE__ */ W.createElement("path", { d: "M83.86 54.15v34.13H38.57V54.15H0v68.26h122.43V54.15H83.86zM38.57 0h45.3v34.13h-45.3z" })), We = ({ closeModal: o, handleSearch: e, children: i }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
834
849
  /* @__PURE__ */ l.jsx("div", { className: "fixed inset-0 z-40 h-[100vh] bg-black opacity-60" }),
835
850
  /* @__PURE__ */ l.jsxs("div", { className: "not-kg-prose fixed inset-8 z-50 overflow-hidden rounded bg-white shadow-xl", "data-kg-modal": "unsplash", children: [
836
851
  /* @__PURE__ */ l.jsx("button", { className: "absolute right-6 top-6 cursor-pointer", type: "button", children: /* @__PURE__ */ l.jsx(
837
- ve,
852
+ je,
838
853
  {
839
854
  className: "text-grey-400 size-4 stroke-2",
840
855
  "data-kg-modal-close-button": !0,
@@ -844,18 +859,18 @@ const be = (o) => /* @__PURE__ */ A.createElement("svg", { xmlns: "http://www.w3
844
859
  /* @__PURE__ */ l.jsxs("div", { className: "flex h-full flex-col", children: [
845
860
  /* @__PURE__ */ l.jsxs("header", { className: "flex shrink-0 items-center justify-between px-20 py-10", children: [
846
861
  /* @__PURE__ */ l.jsxs("h1", { className: "flex items-center gap-2 font-sans text-3xl font-bold text-black", children: [
847
- /* @__PURE__ */ l.jsx(ze, { className: "mb-1" }),
862
+ /* @__PURE__ */ l.jsx(Fe, { className: "mb-1" }),
848
863
  "Unsplash"
849
864
  ] }),
850
865
  /* @__PURE__ */ l.jsxs("div", { className: "relative w-full max-w-sm", children: [
851
- /* @__PURE__ */ l.jsx(Ne, { className: "text-grey-700 absolute left-4 top-1/2 size-4 -translate-y-2" }),
866
+ /* @__PURE__ */ l.jsx(Ae, { className: "text-grey-700 absolute left-4 top-1/2 size-4 -translate-y-2" }),
852
867
  /* @__PURE__ */ l.jsx("input", { className: "border-grey-300 focus:border-grey-400 h-10 w-full rounded-full border border-solid pl-10 pr-8 font-sans text-md font-normal text-black focus-visible:outline-none", placeholder: "Search free high-resolution photos", autoFocus: !0, "data-kg-unsplash-search": !0, onChange: e })
853
868
  ] })
854
869
  ] }),
855
870
  i
856
871
  ] })
857
872
  ] })
858
- ] }), je = [
873
+ ] }), Ye = [
859
874
  {
860
875
  id: "TA5hw14Coh4",
861
876
  slug: "a-person-standing-on-a-sand-dune-in-the-desert-TA5hw14Coh4",
@@ -3450,10 +3465,10 @@ Be free to contact me to book a shoot 🙏🏻`,
3450
3465
  }
3451
3466
  }
3452
3467
  }
3453
- ], Ae = je;
3454
- class Fe {
3468
+ ], Se = Ye;
3469
+ class Re {
3455
3470
  constructor() {
3456
- M(this, "photos", Ae);
3471
+ M(this, "photos", Se);
3457
3472
  M(this, "PAGINATION", {});
3458
3473
  M(this, "REQUEST_IS_RUNNING", !1);
3459
3474
  M(this, "SEARCH_IS_RUNNING", !1);
@@ -3486,7 +3501,7 @@ class Fe {
3486
3501
  triggerDownload(e) {
3487
3502
  }
3488
3503
  }
3489
- class Ye {
3504
+ class Ue {
3490
3505
  constructor(e) {
3491
3506
  M(this, "_provider");
3492
3507
  this._provider = e;
@@ -3508,7 +3523,7 @@ class Ye {
3508
3523
  return this._provider.searchIsRunning();
3509
3524
  }
3510
3525
  }
3511
- class We {
3526
+ class Pe {
3512
3527
  constructor(e) {
3513
3528
  M(this, "API_URL", "https://api.unsplash.com");
3514
3529
  M(this, "HEADERS");
@@ -3591,7 +3606,7 @@ class We {
3591
3606
  return this.SEARCH_IS_RUNNING;
3592
3607
  }
3593
3608
  }
3594
- class Se {
3609
+ class Oe {
3595
3610
  constructor(e, i) {
3596
3611
  M(this, "photoUseCases");
3597
3612
  M(this, "masonryService");
@@ -3628,96 +3643,96 @@ class Se {
3628
3643
  return this.photoUseCases.searchIsRunning();
3629
3644
  }
3630
3645
  }
3631
- const Pe = ({ onClose: o, onImageInsert: e, unsplashProviderConfig: i }) => {
3632
- const r = os(() => i ? new We(i) : new Fe(), [i]), x = os(() => new Ye(r), [r]), m = os(() => new ge(3), []), u = os(() => new Se(x, m), [x, m]), d = Ps(null), [g, v] = X(0), [_, k] = X(0), [z, H] = X(u.searchIsRunning() || !0), U = Ps(!1), [F, Q] = X(""), [E, T] = X(null), [as, S] = X([]);
3633
- j.useEffect(() => {
3634
- d.current && E === null && _ !== 0 && (d.current.scrollTop = _, k(0));
3635
- }, [E, g, _]), j.useEffect(() => {
3636
- const p = (I) => {
3637
- I.key === "Escape" && o();
3646
+ const qe = ({ onClose: o, onImageInsert: e, unsplashProviderConfig: i }) => {
3647
+ const r = as(() => i ? new Pe(i) : new Re(), [i]), x = as(() => new Ue(r), [r]), m = as(() => new Te(3), []), u = as(() => new Oe(x, m), [x, m]), d = Xs(null), [g, N] = C(0), [_, k] = C(0), [I, H] = C(u.searchIsRunning() || !0), P = Xs(!1), [Y, G] = C(""), [v, y] = C(null), [is, S] = C([]);
3648
+ F.useEffect(() => {
3649
+ d.current && v === null && _ !== 0 && (d.current.scrollTop = _, k(0));
3650
+ }, [v, g, _]), F.useEffect(() => {
3651
+ const p = (j) => {
3652
+ j.key === "Escape" && o();
3638
3653
  };
3639
3654
  return window.addEventListener("keydown", p), () => {
3640
3655
  window.removeEventListener("keydown", p);
3641
3656
  };
3642
- }, [o]), j.useEffect(() => {
3657
+ }, [o]), F.useEffect(() => {
3643
3658
  const p = d.current;
3644
- if (!E)
3659
+ if (!v)
3645
3660
  return p && p.addEventListener("scroll", () => {
3646
- v(p.scrollTop);
3661
+ N(p.scrollTop);
3647
3662
  }), () => {
3648
3663
  p && p.removeEventListener("scroll", () => {
3649
- v(p.scrollTop);
3664
+ N(p.scrollTop);
3650
3665
  });
3651
3666
  };
3652
- }, [d, E]);
3653
- const C = j.useCallback(async () => {
3654
- if (U.current === !1 || F.length === 0) {
3667
+ }, [d, v]);
3668
+ const q = F.useCallback(async () => {
3669
+ if (P.current === !1 || Y.length === 0) {
3655
3670
  S([]), u.clearPhotos(), await u.loadNew();
3656
3671
  const p = u.getColumns();
3657
3672
  S(p || []), d.current && d.current.scrollTop !== 0 && (d.current.scrollTop = 0), H(!1);
3658
3673
  }
3659
- }, [u, F]), is = async (p) => {
3660
- const I = p.target.value;
3661
- I.length > 2 && (T(null), Q(I)), I.length === 0 && (Q(""), U.current = !1, await C());
3662
- }, V = j.useCallback(async () => {
3663
- if (F) {
3664
- H(!0), S([]), u.clearPhotos(), await u.updateSearch(F);
3674
+ }, [u, Y]), rs = async (p) => {
3675
+ const j = p.target.value;
3676
+ j.length > 2 && (y(null), G(j)), j.length === 0 && (G(""), P.current = !1, await q());
3677
+ }, J = F.useCallback(async () => {
3678
+ if (Y) {
3679
+ H(!0), S([]), u.clearPhotos(), await u.updateSearch(Y);
3665
3680
  const p = u.getColumns();
3666
3681
  p && S(p), d.current && d.current.scrollTop !== 0 && (d.current.scrollTop = 0), H(!1);
3667
3682
  }
3668
- }, [F, u]);
3669
- j.useEffect(() => {
3683
+ }, [Y, u]);
3684
+ F.useEffect(() => {
3670
3685
  const p = setTimeout(async () => {
3671
- F.length > 2 ? await V() : await C();
3686
+ Y.length > 2 ? await J() : await q();
3672
3687
  }, 300);
3673
3688
  return () => {
3674
- U.current = !0, clearTimeout(p);
3689
+ P.current = !0, clearTimeout(p);
3675
3690
  };
3676
- }, [F, V, C]);
3677
- const G = j.useCallback(async () => {
3691
+ }, [Y, J, q]);
3692
+ const K = F.useCallback(async () => {
3678
3693
  H(!0), await u.loadNextPage();
3679
3694
  const p = u.getColumns();
3680
3695
  S(p || []), H(!1);
3681
3696
  }, [u]);
3682
- j.useEffect(() => {
3697
+ F.useEffect(() => {
3683
3698
  const p = d.current;
3684
3699
  if (p) {
3685
- const I = async () => {
3686
- E === null && p.scrollTop + p.clientHeight >= p.scrollHeight - 1e3 && await G();
3700
+ const j = async () => {
3701
+ v === null && p.scrollTop + p.clientHeight >= p.scrollHeight - 1e3 && await K();
3687
3702
  };
3688
- return p.addEventListener("scroll", I), () => {
3689
- p.removeEventListener("scroll", I);
3703
+ return p.addEventListener("scroll", j), () => {
3704
+ p.removeEventListener("scroll", j);
3690
3705
  };
3691
3706
  }
3692
- }, [d, G, E]);
3693
- const J = (p) => {
3694
- p && (T(p), k(g)), p === null && (T(null), d.current && (d.current.scrollTop = _));
3707
+ }, [d, K, v]);
3708
+ const $ = (p) => {
3709
+ p && (y(p), k(g)), p === null && (y(null), d.current && (d.current.scrollTop = _));
3695
3710
  };
3696
- async function rs(p) {
3711
+ async function ls(p) {
3697
3712
  p.src && (u.triggerDownload(p), e(p));
3698
3713
  }
3699
3714
  return /* @__PURE__ */ l.jsx(
3700
- Ie,
3715
+ We,
3701
3716
  {
3702
3717
  closeModal: o,
3703
- handleSearch: is,
3718
+ handleSearch: rs,
3704
3719
  children: /* @__PURE__ */ l.jsx(
3705
- Ee,
3720
+ Ie,
3706
3721
  {
3707
- dataset: as,
3722
+ dataset: is,
3708
3723
  error: null,
3709
3724
  galleryRef: d,
3710
- insertImage: rs,
3711
- isLoading: z,
3712
- selectImg: J,
3713
- zoomed: E
3725
+ insertImage: ls,
3726
+ isLoading: I,
3727
+ selectImg: $,
3728
+ zoomed: v
3714
3729
  }
3715
3730
  )
3716
3731
  }
3717
3732
  );
3718
3733
  };
3719
3734
  export {
3720
- We as UnsplashProvider,
3721
- Pe as UnsplashSearchModal
3735
+ Pe as UnsplashProvider,
3736
+ qe as UnsplashSearchModal
3722
3737
  };
3723
3738
  //# sourceMappingURL=index.es.js.map