@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.cjs.js +14 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +310 -295
- package/dist/index.es.js.map +1 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var M = (o, e, i) => (
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
var
|
|
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
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
var o =
|
|
22
|
-
function u(d, g,
|
|
23
|
-
var _, k = {},
|
|
24
|
-
|
|
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:
|
|
30
|
+
return { $$typeof: e, type: d, key: I, ref: H, props: k, _owner: x.current };
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return Q.Fragment = i, Q.jsx = u, Q.jsxs = u, Q;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
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
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
var o =
|
|
48
|
-
function
|
|
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 =
|
|
51
|
+
var t = P && s[P] || s[Y];
|
|
52
52
|
return typeof t == "function" ? t : null;
|
|
53
53
|
}
|
|
54
|
-
var
|
|
55
|
-
function
|
|
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
|
-
|
|
59
|
+
is("error", s, a);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function is(s, t, a) {
|
|
63
63
|
{
|
|
64
|
-
var n =
|
|
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,
|
|
73
|
-
|
|
74
|
-
function
|
|
75
|
-
return !!(typeof s == "string" || typeof s == "function" || s === r || s === m ||
|
|
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 ===
|
|
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
|
|
88
|
+
function j(s) {
|
|
89
89
|
return s.displayName || "Context";
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function A(s) {
|
|
92
92
|
if (s == null)
|
|
93
93
|
return null;
|
|
94
|
-
if (typeof s.tag == "number" &&
|
|
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
|
|
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
|
|
116
|
+
return j(t) + ".Consumer";
|
|
117
117
|
case u:
|
|
118
118
|
var a = s;
|
|
119
|
-
return
|
|
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 :
|
|
125
|
-
case
|
|
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
|
|
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,
|
|
137
|
-
function
|
|
136
|
+
var R = Object.assign, Z = 0, bs, _s, ys, Ts, Ds, ks, Hs;
|
|
137
|
+
function vs() {
|
|
138
138
|
}
|
|
139
|
-
|
|
140
|
-
function
|
|
139
|
+
vs.__reactDisabledLog = !0;
|
|
140
|
+
function Ls() {
|
|
141
141
|
{
|
|
142
|
-
if (
|
|
143
|
-
|
|
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:
|
|
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
|
-
|
|
160
|
+
Z++;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Bs() {
|
|
164
164
|
{
|
|
165
|
-
if (
|
|
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:
|
|
173
|
+
value: bs
|
|
174
174
|
}),
|
|
175
175
|
info: R({}, s, {
|
|
176
|
-
value:
|
|
176
|
+
value: _s
|
|
177
177
|
}),
|
|
178
178
|
warn: R({}, s, {
|
|
179
|
-
value:
|
|
179
|
+
value: ys
|
|
180
180
|
}),
|
|
181
181
|
error: R({}, s, {
|
|
182
|
-
value:
|
|
182
|
+
value: Ts
|
|
183
183
|
}),
|
|
184
184
|
group: R({}, s, {
|
|
185
|
-
value:
|
|
185
|
+
value: Ds
|
|
186
186
|
}),
|
|
187
187
|
groupCollapsed: R({}, s, {
|
|
188
|
-
value:
|
|
188
|
+
value: ks
|
|
189
189
|
}),
|
|
190
190
|
groupEnd: R({}, s, {
|
|
191
|
-
value:
|
|
191
|
+
value: Hs
|
|
192
192
|
})
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
Z < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
var
|
|
199
|
-
function
|
|
198
|
+
var ns = v.ReactCurrentDispatcher, ps;
|
|
199
|
+
function ss(s, t, a) {
|
|
200
200
|
{
|
|
201
|
-
if (
|
|
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
|
-
|
|
206
|
+
ps = n && n[1] || "";
|
|
207
207
|
}
|
|
208
208
|
return `
|
|
209
|
-
` +
|
|
209
|
+
` + ps + s;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
var
|
|
212
|
+
var cs = !1, es;
|
|
213
213
|
{
|
|
214
|
-
var
|
|
215
|
-
|
|
214
|
+
var Qs = typeof WeakMap == "function" ? WeakMap : Map;
|
|
215
|
+
es = new Qs();
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
if (!s ||
|
|
217
|
+
function Es(s, t) {
|
|
218
|
+
if (!s || cs)
|
|
219
219
|
return "";
|
|
220
220
|
{
|
|
221
|
-
var a =
|
|
221
|
+
var a = es.get(s);
|
|
222
222
|
if (a !== void 0)
|
|
223
223
|
return a;
|
|
224
224
|
}
|
|
225
225
|
var n;
|
|
226
|
-
|
|
226
|
+
cs = !0;
|
|
227
227
|
var f = Error.prepareStackTrace;
|
|
228
228
|
Error.prepareStackTrace = void 0;
|
|
229
229
|
var w;
|
|
230
|
-
w =
|
|
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 (
|
|
244
|
-
n =
|
|
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 (
|
|
251
|
-
n =
|
|
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 (
|
|
259
|
-
n =
|
|
258
|
+
} catch (E) {
|
|
259
|
+
n = E;
|
|
260
260
|
}
|
|
261
261
|
s();
|
|
262
262
|
}
|
|
263
|
-
} catch (
|
|
264
|
-
if (
|
|
265
|
-
for (var c =
|
|
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,
|
|
268
|
-
|
|
269
|
-
for (; b >= 1 &&
|
|
270
|
-
if (c[b] !== D[
|
|
271
|
-
if (b !== 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--,
|
|
274
|
-
var
|
|
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 &&
|
|
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 &&
|
|
278
|
+
while (b >= 1 && T >= 0);
|
|
279
279
|
break;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
} finally {
|
|
283
|
-
|
|
283
|
+
cs = !1, ns.current = w, Bs(), Error.prepareStackTrace = f;
|
|
284
284
|
}
|
|
285
|
-
var
|
|
286
|
-
return typeof s == "function" &&
|
|
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
|
|
289
|
-
return
|
|
288
|
+
function Vs(s, t, a) {
|
|
289
|
+
return Es(s, !1);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Gs(s) {
|
|
292
292
|
var t = s.prototype;
|
|
293
293
|
return !!(t && t.isReactComponent);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function ts(s, t, a) {
|
|
296
296
|
if (s == null)
|
|
297
297
|
return "";
|
|
298
298
|
if (typeof s == "function")
|
|
299
|
-
return
|
|
299
|
+
return Es(s, Gs(s));
|
|
300
300
|
if (typeof s == "string")
|
|
301
|
-
return
|
|
301
|
+
return ss(s);
|
|
302
302
|
switch (s) {
|
|
303
|
-
case
|
|
304
|
-
return
|
|
303
|
+
case N:
|
|
304
|
+
return ss("Suspense");
|
|
305
305
|
case _:
|
|
306
|
-
return
|
|
306
|
+
return ss("SuspenseList");
|
|
307
307
|
}
|
|
308
308
|
if (typeof s == "object")
|
|
309
309
|
switch (s.$$typeof) {
|
|
310
310
|
case g:
|
|
311
|
-
return
|
|
311
|
+
return Vs(s.render);
|
|
312
312
|
case k:
|
|
313
|
-
return
|
|
314
|
-
case
|
|
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
|
|
317
|
+
return ts(w(f), t, a);
|
|
318
318
|
} catch {
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
return "";
|
|
323
323
|
}
|
|
324
|
-
var
|
|
325
|
-
function
|
|
324
|
+
var L = Object.prototype.hasOwnProperty, Ns = {}, zs = v.ReactDebugCurrentFrame;
|
|
325
|
+
function os(s) {
|
|
326
326
|
if (s) {
|
|
327
|
-
var t = s._owner, a =
|
|
328
|
-
|
|
327
|
+
var t = s._owner, a = ts(s.type, s._source, t ? t.type : null);
|
|
328
|
+
zs.setExtraStackFrame(a);
|
|
329
329
|
} else
|
|
330
|
-
|
|
330
|
+
zs.setExtraStackFrame(null);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Js(s, t, a, n, f) {
|
|
333
333
|
{
|
|
334
|
-
var w = Function.call.bind(
|
|
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) && (
|
|
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
|
|
352
|
-
function
|
|
353
|
-
return
|
|
351
|
+
var Ks = Array.isArray;
|
|
352
|
+
function hs(s) {
|
|
353
|
+
return Ks(s);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
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
|
|
361
|
+
function se(s) {
|
|
362
362
|
try {
|
|
363
|
-
return
|
|
363
|
+
return Is(s), !1;
|
|
364
364
|
} catch {
|
|
365
365
|
return !0;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Is(s) {
|
|
369
369
|
return "" + s;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
if (
|
|
373
|
-
return
|
|
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
|
|
375
|
+
var B = v.ReactCurrentOwner, ee = {
|
|
376
376
|
key: !0,
|
|
377
377
|
ref: !0,
|
|
378
378
|
__self: !0,
|
|
379
379
|
__source: !0
|
|
380
|
-
},
|
|
381
|
-
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
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
|
|
391
|
-
if (
|
|
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
|
|
399
|
-
if (typeof s.ref == "string" &&
|
|
400
|
-
var a =
|
|
401
|
-
|
|
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
|
|
404
|
+
function ie(s, t) {
|
|
405
405
|
{
|
|
406
406
|
var a = function() {
|
|
407
|
-
|
|
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
|
|
415
|
+
function re(s, t) {
|
|
416
416
|
{
|
|
417
417
|
var a = function() {
|
|
418
|
-
|
|
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
|
|
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
|
|
455
|
+
function ne(s, t, a, n, f) {
|
|
456
456
|
{
|
|
457
457
|
var w, h = {}, c = null, D = null;
|
|
458
|
-
a !== void 0 && (
|
|
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
|
-
|
|
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
|
|
468
|
-
c &&
|
|
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
|
|
470
|
+
return le(s, c, D, f, n, B.current, h);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
var
|
|
474
|
-
function
|
|
473
|
+
var us = v.ReactCurrentOwner, Ws = v.ReactDebugCurrentFrame;
|
|
474
|
+
function O(s) {
|
|
475
475
|
if (s) {
|
|
476
|
-
var t = s._owner, a =
|
|
477
|
-
|
|
476
|
+
var t = s._owner, a = ts(s.type, s._source, t ? t.type : null);
|
|
477
|
+
Ws.setExtraStackFrame(a);
|
|
478
478
|
} else
|
|
479
|
-
|
|
479
|
+
Ws.setExtraStackFrame(null);
|
|
480
480
|
}
|
|
481
|
-
var
|
|
482
|
-
|
|
483
|
-
function
|
|
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
|
|
486
|
+
function Ys() {
|
|
487
487
|
{
|
|
488
|
-
if (
|
|
489
|
-
var s =
|
|
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
|
|
498
|
+
function pe(s) {
|
|
499
499
|
return "";
|
|
500
500
|
}
|
|
501
|
-
var
|
|
502
|
-
function
|
|
501
|
+
var Ss = {};
|
|
502
|
+
function ce(s) {
|
|
503
503
|
{
|
|
504
|
-
var t =
|
|
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
|
|
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 =
|
|
520
|
-
if (
|
|
519
|
+
var a = ce(t);
|
|
520
|
+
if (Ss[a])
|
|
521
521
|
return;
|
|
522
|
-
|
|
522
|
+
Ss[a] = !0;
|
|
523
523
|
var n = "";
|
|
524
|
-
s && s._owner && s._owner !==
|
|
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
|
|
527
|
+
function Us(s, t) {
|
|
528
528
|
{
|
|
529
529
|
if (typeof s != "object")
|
|
530
530
|
return;
|
|
531
|
-
if (
|
|
531
|
+
if (hs(s))
|
|
532
532
|
for (var a = 0; a < s.length; a++) {
|
|
533
533
|
var n = s[a];
|
|
534
|
-
|
|
534
|
+
ws(n) && Rs(n, t);
|
|
535
535
|
}
|
|
536
|
-
else if (
|
|
536
|
+
else if (ws(s))
|
|
537
537
|
s._store && (s._store.validated = !0);
|
|
538
538
|
else if (s) {
|
|
539
|
-
var f =
|
|
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
|
-
|
|
542
|
+
ws(h.value) && Rs(h.value, t);
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
function
|
|
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 =
|
|
562
|
-
|
|
563
|
-
} else if (t.PropTypes !== void 0 && !
|
|
564
|
-
|
|
565
|
-
var f =
|
|
566
|
-
|
|
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 &&
|
|
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
|
|
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
|
-
|
|
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 && (
|
|
580
|
+
s.ref !== null && (O(s), y("Invalid attribute `ref` supplied to `React.Fragment`."), O(null));
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
|
|
583
|
+
var Ps = {};
|
|
584
|
+
function Os(s, t, a, n, f, w) {
|
|
584
585
|
{
|
|
585
|
-
var h =
|
|
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 =
|
|
590
|
-
D ? c += D : c +=
|
|
590
|
+
var D = pe();
|
|
591
|
+
D ? c += D : c += Ys();
|
|
591
592
|
var b;
|
|
592
|
-
s === null ? b = "null" :
|
|
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
|
|
595
|
-
if (
|
|
596
|
-
return
|
|
595
|
+
var T = ne(s, t, a, f, w);
|
|
596
|
+
if (T == null)
|
|
597
|
+
return T;
|
|
597
598
|
if (h) {
|
|
598
|
-
var
|
|
599
|
-
if (
|
|
599
|
+
var z = t.children;
|
|
600
|
+
if (z !== void 0)
|
|
600
601
|
if (n)
|
|
601
|
-
if (
|
|
602
|
-
for (var
|
|
603
|
-
|
|
604
|
-
Object.freeze && Object.freeze(
|
|
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
|
-
|
|
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
|
-
|
|
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 ?
|
|
625
|
+
return s === r ? fe(T) : he(T), T;
|
|
611
626
|
}
|
|
612
627
|
}
|
|
613
|
-
function
|
|
614
|
-
return
|
|
628
|
+
function ue(s, t, a) {
|
|
629
|
+
return Os(s, t, a, !0);
|
|
615
630
|
}
|
|
616
|
-
function
|
|
617
|
-
return
|
|
631
|
+
function me(s, t, a) {
|
|
632
|
+
return Os(s, t, a, !1);
|
|
618
633
|
}
|
|
619
|
-
var
|
|
620
|
-
|
|
621
|
-
}()),
|
|
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" ?
|
|
624
|
-
var l =
|
|
625
|
-
class
|
|
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
|
|
655
|
-
heart:
|
|
656
|
-
download:
|
|
657
|
-
},
|
|
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 =
|
|
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
|
-
},
|
|
672
|
-
const
|
|
673
|
-
H.stopPropagation(), k(
|
|
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 ${
|
|
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:
|
|
696
|
+
onClick: I,
|
|
682
697
|
children: [
|
|
683
698
|
/* @__PURE__ */ l.jsx(
|
|
684
699
|
"img",
|
|
685
700
|
{
|
|
686
701
|
alt: m,
|
|
687
|
-
className: `${
|
|
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
|
-
|
|
713
|
+
xs,
|
|
699
714
|
{
|
|
700
715
|
"data-kg-button": "unsplash-like",
|
|
701
716
|
href: `${i.html}/?utm_source=ghost&utm_medium=referral&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
|
-
|
|
724
|
+
xs,
|
|
710
725
|
{
|
|
711
726
|
"data-kg-button": "unsplash-download",
|
|
712
727
|
href: `${i.download}/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit&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(
|
|
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
|
-
},
|
|
738
|
-
|
|
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
|
-
) }),
|
|
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(
|
|
756
|
-
|
|
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,
|
|
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(
|
|
776
|
-
] }) }),
|
|
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
|
-
|
|
800
|
+
Ms,
|
|
786
801
|
{
|
|
787
802
|
galleryRef: i,
|
|
788
803
|
zoomed: o,
|
|
789
804
|
children: /* @__PURE__ */ l.jsx(
|
|
790
|
-
|
|
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
|
-
|
|
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
|
-
|
|
833
|
+
Ms,
|
|
819
834
|
{
|
|
820
835
|
galleryRef: i,
|
|
821
836
|
isLoading: r,
|
|
822
837
|
zoomed: o,
|
|
823
838
|
children: /* @__PURE__ */ l.jsx(
|
|
824
|
-
|
|
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
|
-
),
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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
|
-
] }),
|
|
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
|
-
],
|
|
3454
|
-
class
|
|
3468
|
+
], Se = Ye;
|
|
3469
|
+
class Re {
|
|
3455
3470
|
constructor() {
|
|
3456
|
-
M(this, "photos",
|
|
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
|
|
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
|
|
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
|
|
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
|
|
3632
|
-
const r =
|
|
3633
|
-
|
|
3634
|
-
d.current &&
|
|
3635
|
-
}, [
|
|
3636
|
-
const p = (
|
|
3637
|
-
|
|
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]),
|
|
3657
|
+
}, [o]), F.useEffect(() => {
|
|
3643
3658
|
const p = d.current;
|
|
3644
|
-
if (!
|
|
3659
|
+
if (!v)
|
|
3645
3660
|
return p && p.addEventListener("scroll", () => {
|
|
3646
|
-
|
|
3661
|
+
N(p.scrollTop);
|
|
3647
3662
|
}), () => {
|
|
3648
3663
|
p && p.removeEventListener("scroll", () => {
|
|
3649
|
-
|
|
3664
|
+
N(p.scrollTop);
|
|
3650
3665
|
});
|
|
3651
3666
|
};
|
|
3652
|
-
}, [d,
|
|
3653
|
-
const
|
|
3654
|
-
if (
|
|
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,
|
|
3660
|
-
const
|
|
3661
|
-
|
|
3662
|
-
},
|
|
3663
|
-
if (
|
|
3664
|
-
H(!0), S([]), u.clearPhotos(), await u.updateSearch(
|
|
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
|
-
}, [
|
|
3669
|
-
|
|
3683
|
+
}, [Y, u]);
|
|
3684
|
+
F.useEffect(() => {
|
|
3670
3685
|
const p = setTimeout(async () => {
|
|
3671
|
-
|
|
3686
|
+
Y.length > 2 ? await J() : await q();
|
|
3672
3687
|
}, 300);
|
|
3673
3688
|
return () => {
|
|
3674
|
-
|
|
3689
|
+
P.current = !0, clearTimeout(p);
|
|
3675
3690
|
};
|
|
3676
|
-
}, [
|
|
3677
|
-
const
|
|
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
|
-
|
|
3697
|
+
F.useEffect(() => {
|
|
3683
3698
|
const p = d.current;
|
|
3684
3699
|
if (p) {
|
|
3685
|
-
const
|
|
3686
|
-
|
|
3700
|
+
const j = async () => {
|
|
3701
|
+
v === null && p.scrollTop + p.clientHeight >= p.scrollHeight - 1e3 && await K();
|
|
3687
3702
|
};
|
|
3688
|
-
return p.addEventListener("scroll",
|
|
3689
|
-
p.removeEventListener("scroll",
|
|
3703
|
+
return p.addEventListener("scroll", j), () => {
|
|
3704
|
+
p.removeEventListener("scroll", j);
|
|
3690
3705
|
};
|
|
3691
3706
|
}
|
|
3692
|
-
}, [d,
|
|
3693
|
-
const
|
|
3694
|
-
p && (
|
|
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
|
|
3711
|
+
async function ls(p) {
|
|
3697
3712
|
p.src && (u.triggerDownload(p), e(p));
|
|
3698
3713
|
}
|
|
3699
3714
|
return /* @__PURE__ */ l.jsx(
|
|
3700
|
-
|
|
3715
|
+
We,
|
|
3701
3716
|
{
|
|
3702
3717
|
closeModal: o,
|
|
3703
|
-
handleSearch:
|
|
3718
|
+
handleSearch: rs,
|
|
3704
3719
|
children: /* @__PURE__ */ l.jsx(
|
|
3705
|
-
|
|
3720
|
+
Ie,
|
|
3706
3721
|
{
|
|
3707
|
-
dataset:
|
|
3722
|
+
dataset: is,
|
|
3708
3723
|
error: null,
|
|
3709
3724
|
galleryRef: d,
|
|
3710
|
-
insertImage:
|
|
3711
|
-
isLoading:
|
|
3712
|
-
selectImg:
|
|
3713
|
-
zoomed:
|
|
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
|
-
|
|
3721
|
-
|
|
3735
|
+
Pe as UnsplashProvider,
|
|
3736
|
+
qe as UnsplashSearchModal
|
|
3722
3737
|
};
|
|
3723
3738
|
//# sourceMappingURL=index.es.js.map
|