@tryghost/kg-unsplash-selector 0.2.8 → 0.3.2
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/api/dataFixtures.json.d.ts +2 -119
- package/dist/index.cjs.js +11 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +227 -353
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +19 -19
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 F, { useMemo as
|
|
6
|
-
var
|
|
1
|
+
var Me = Object.defineProperty;
|
|
2
|
+
var ge = (o, e, i) => e in o ? Me(o, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[e] = i;
|
|
3
|
+
var M = (o, e, i) => ge(o, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
+
import * as A from "react";
|
|
5
|
+
import F, { useMemo as os, useRef as Os, useState as C } from "react";
|
|
6
|
+
var xs = { exports: {} }, B = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
@@ -13,25 +13,21 @@ var gs = { exports: {} }, Q = {};
|
|
|
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
|
-
|
|
20
|
-
Cs = 1;
|
|
16
|
+
var Xs;
|
|
17
|
+
function be() {
|
|
18
|
+
if (Xs) return B;
|
|
19
|
+
Xs = 1;
|
|
21
20
|
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
21
|
function u(d, g, N) {
|
|
23
22
|
var _, k = {}, I = null, H = null;
|
|
24
23
|
N !== void 0 && (I = "" + N), g.key !== void 0 && (I = "" + g.key), g.ref !== void 0 && (H = g.ref);
|
|
25
|
-
for (_ in g)
|
|
26
|
-
|
|
27
|
-
if (d && d.defaultProps)
|
|
28
|
-
for (_ in g = d.defaultProps, g)
|
|
29
|
-
k[_] === void 0 && (k[_] = g[_]);
|
|
24
|
+
for (_ in g) r.call(g, _) && !m.hasOwnProperty(_) && (k[_] = g[_]);
|
|
25
|
+
if (d && d.defaultProps) for (_ in g = d.defaultProps, g) k[_] === void 0 && (k[_] = g[_]);
|
|
30
26
|
return { $$typeof: e, type: d, key: I, ref: H, props: k, _owner: x.current };
|
|
31
27
|
}
|
|
32
|
-
return
|
|
28
|
+
return B.Fragment = i, B.jsx = u, B.jsxs = u, B;
|
|
33
29
|
}
|
|
34
|
-
var
|
|
30
|
+
var Q = {};
|
|
35
31
|
/**
|
|
36
32
|
* @license React
|
|
37
33
|
* react-jsx-runtime.development.js
|
|
@@ -41,9 +37,9 @@ var V = {};
|
|
|
41
37
|
* This source code is licensed under the MIT license found in the
|
|
42
38
|
* LICENSE file in the root directory of this source tree.
|
|
43
39
|
*/
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
return
|
|
40
|
+
var Cs;
|
|
41
|
+
function _e() {
|
|
42
|
+
return Cs || (Cs = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
43
|
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
44
|
function G(s) {
|
|
49
45
|
if (s === null || typeof s != "object")
|
|
@@ -52,14 +48,14 @@ function ye() {
|
|
|
52
48
|
return typeof t == "function" ? t : null;
|
|
53
49
|
}
|
|
54
50
|
var v = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
55
|
-
function
|
|
51
|
+
function T(s) {
|
|
56
52
|
{
|
|
57
53
|
for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
|
|
58
54
|
a[n - 1] = arguments[n];
|
|
59
|
-
|
|
55
|
+
as("error", s, a);
|
|
60
56
|
}
|
|
61
57
|
}
|
|
62
|
-
function
|
|
58
|
+
function as(s, t, a) {
|
|
63
59
|
{
|
|
64
60
|
var n = v.ReactDebugCurrentFrame, f = n.getStackAddendum();
|
|
65
61
|
f !== "" && (t += "%s", a = a.concat([f]));
|
|
@@ -69,14 +65,14 @@ function ye() {
|
|
|
69
65
|
w.unshift("Warning: " + t), Function.prototype.apply.call(console[s], console, w);
|
|
70
66
|
}
|
|
71
67
|
}
|
|
72
|
-
var S = !1, q = !1,
|
|
73
|
-
|
|
74
|
-
function
|
|
75
|
-
return !!(typeof s == "string" || typeof s == "function" || s === r || s === m ||
|
|
68
|
+
var S = !1, q = !1, is = !1, V = !1, J = !1, K;
|
|
69
|
+
K = Symbol.for("react.module.reference");
|
|
70
|
+
function rs(s) {
|
|
71
|
+
return !!(typeof s == "string" || typeof s == "function" || s === r || s === m || J || s === x || s === N || s === _ || V || s === H || S || q || is || 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
72
|
// types supported by any Flight configuration anywhere since
|
|
77
73
|
// we don't know which Flight build this will end up being used
|
|
78
74
|
// with.
|
|
79
|
-
s.$$typeof ===
|
|
75
|
+
s.$$typeof === K || s.getModuleId !== void 0));
|
|
80
76
|
}
|
|
81
77
|
function p(s, t, a) {
|
|
82
78
|
var n = s.displayName;
|
|
@@ -88,10 +84,10 @@ function ye() {
|
|
|
88
84
|
function j(s) {
|
|
89
85
|
return s.displayName || "Context";
|
|
90
86
|
}
|
|
91
|
-
function
|
|
87
|
+
function W(s) {
|
|
92
88
|
if (s == null)
|
|
93
89
|
return null;
|
|
94
|
-
if (typeof s.tag == "number" &&
|
|
90
|
+
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")
|
|
95
91
|
return s.displayName || s.name || null;
|
|
96
92
|
if (typeof s == "string")
|
|
97
93
|
return s;
|
|
@@ -121,11 +117,11 @@ function ye() {
|
|
|
121
117
|
return p(s, s.render, "ForwardRef");
|
|
122
118
|
case k:
|
|
123
119
|
var n = s.displayName || null;
|
|
124
|
-
return n !== null ? n :
|
|
120
|
+
return n !== null ? n : W(s.type) || "Memo";
|
|
125
121
|
case I: {
|
|
126
122
|
var f = s, w = f._payload, h = f._init;
|
|
127
123
|
try {
|
|
128
|
-
return
|
|
124
|
+
return W(h(w));
|
|
129
125
|
} catch {
|
|
130
126
|
return null;
|
|
131
127
|
}
|
|
@@ -133,18 +129,18 @@ function ye() {
|
|
|
133
129
|
}
|
|
134
130
|
return null;
|
|
135
131
|
}
|
|
136
|
-
var R = Object.assign, Z = 0, bs, _s, ys, Ts, Ds
|
|
137
|
-
function
|
|
132
|
+
var R = Object.assign, Z = 0, Ms, gs, bs, _s, ys, Ts, Ds;
|
|
133
|
+
function ks() {
|
|
138
134
|
}
|
|
139
|
-
|
|
140
|
-
function
|
|
135
|
+
ks.__reactDisabledLog = !0;
|
|
136
|
+
function Zs() {
|
|
141
137
|
{
|
|
142
138
|
if (Z === 0) {
|
|
143
|
-
|
|
139
|
+
Ms = console.log, gs = console.info, bs = console.warn, _s = console.error, ys = console.group, Ts = console.groupCollapsed, Ds = console.groupEnd;
|
|
144
140
|
var s = {
|
|
145
141
|
configurable: !0,
|
|
146
142
|
enumerable: !0,
|
|
147
|
-
value:
|
|
143
|
+
value: ks,
|
|
148
144
|
writable: !0
|
|
149
145
|
};
|
|
150
146
|
Object.defineProperties(console, {
|
|
@@ -160,7 +156,7 @@ function ye() {
|
|
|
160
156
|
Z++;
|
|
161
157
|
}
|
|
162
158
|
}
|
|
163
|
-
function
|
|
159
|
+
function Ls() {
|
|
164
160
|
{
|
|
165
161
|
if (Z--, Z === 0) {
|
|
166
162
|
var s = {
|
|
@@ -170,64 +166,64 @@ function ye() {
|
|
|
170
166
|
};
|
|
171
167
|
Object.defineProperties(console, {
|
|
172
168
|
log: R({}, s, {
|
|
173
|
-
value:
|
|
169
|
+
value: Ms
|
|
174
170
|
}),
|
|
175
171
|
info: R({}, s, {
|
|
176
|
-
value:
|
|
172
|
+
value: gs
|
|
177
173
|
}),
|
|
178
174
|
warn: R({}, s, {
|
|
179
|
-
value:
|
|
175
|
+
value: bs
|
|
180
176
|
}),
|
|
181
177
|
error: R({}, s, {
|
|
182
|
-
value:
|
|
178
|
+
value: _s
|
|
183
179
|
}),
|
|
184
180
|
group: R({}, s, {
|
|
185
|
-
value:
|
|
181
|
+
value: ys
|
|
186
182
|
}),
|
|
187
183
|
groupCollapsed: R({}, s, {
|
|
188
|
-
value:
|
|
184
|
+
value: Ts
|
|
189
185
|
}),
|
|
190
186
|
groupEnd: R({}, s, {
|
|
191
|
-
value:
|
|
187
|
+
value: Ds
|
|
192
188
|
})
|
|
193
189
|
});
|
|
194
190
|
}
|
|
195
|
-
Z < 0 &&
|
|
191
|
+
Z < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
196
192
|
}
|
|
197
193
|
}
|
|
198
|
-
var
|
|
199
|
-
function
|
|
194
|
+
var ls = v.ReactCurrentDispatcher, ns;
|
|
195
|
+
function $(s, t, a) {
|
|
200
196
|
{
|
|
201
|
-
if (
|
|
197
|
+
if (ns === void 0)
|
|
202
198
|
try {
|
|
203
199
|
throw Error();
|
|
204
200
|
} catch (f) {
|
|
205
201
|
var n = f.stack.trim().match(/\n( *(at )?)/);
|
|
206
|
-
|
|
202
|
+
ns = n && n[1] || "";
|
|
207
203
|
}
|
|
208
204
|
return `
|
|
209
|
-
` +
|
|
205
|
+
` + ns + s;
|
|
210
206
|
}
|
|
211
207
|
}
|
|
212
|
-
var
|
|
208
|
+
var ps = !1, ss;
|
|
213
209
|
{
|
|
214
|
-
var
|
|
215
|
-
|
|
210
|
+
var Bs = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
ss = new Bs();
|
|
216
212
|
}
|
|
217
|
-
function
|
|
218
|
-
if (!s ||
|
|
213
|
+
function Hs(s, t) {
|
|
214
|
+
if (!s || ps)
|
|
219
215
|
return "";
|
|
220
216
|
{
|
|
221
|
-
var a =
|
|
217
|
+
var a = ss.get(s);
|
|
222
218
|
if (a !== void 0)
|
|
223
219
|
return a;
|
|
224
220
|
}
|
|
225
221
|
var n;
|
|
226
|
-
|
|
222
|
+
ps = !0;
|
|
227
223
|
var f = Error.prepareStackTrace;
|
|
228
224
|
Error.prepareStackTrace = void 0;
|
|
229
225
|
var w;
|
|
230
|
-
w =
|
|
226
|
+
w = ls.current, ls.current = null, Zs();
|
|
231
227
|
try {
|
|
232
228
|
if (t) {
|
|
233
229
|
var h = function() {
|
|
@@ -264,72 +260,72 @@ function ye() {
|
|
|
264
260
|
if (E && n && typeof E.stack == "string") {
|
|
265
261
|
for (var c = E.stack.split(`
|
|
266
262
|
`), D = n.stack.split(`
|
|
267
|
-
`), b = c.length - 1,
|
|
268
|
-
|
|
269
|
-
for (; b >= 1 &&
|
|
270
|
-
if (c[b] !== D[
|
|
271
|
-
if (b !== 1 ||
|
|
263
|
+
`), b = c.length - 1, y = D.length - 1; b >= 1 && y >= 0 && c[b] !== D[y]; )
|
|
264
|
+
y--;
|
|
265
|
+
for (; b >= 1 && y >= 0; b--, y--)
|
|
266
|
+
if (c[b] !== D[y]) {
|
|
267
|
+
if (b !== 1 || y !== 1)
|
|
272
268
|
do
|
|
273
|
-
if (b--,
|
|
269
|
+
if (b--, y--, y < 0 || c[b] !== D[y]) {
|
|
274
270
|
var z = `
|
|
275
271
|
` + c[b].replace(" at new ", " at ");
|
|
276
|
-
return s.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", s.displayName)), typeof s == "function" &&
|
|
272
|
+
return s.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", s.displayName)), typeof s == "function" && ss.set(s, z), z;
|
|
277
273
|
}
|
|
278
|
-
while (b >= 1 &&
|
|
274
|
+
while (b >= 1 && y >= 0);
|
|
279
275
|
break;
|
|
280
276
|
}
|
|
281
277
|
}
|
|
282
278
|
} finally {
|
|
283
|
-
|
|
279
|
+
ps = !1, ls.current = w, Ls(), Error.prepareStackTrace = f;
|
|
284
280
|
}
|
|
285
|
-
var X = s ? s.displayName || s.name : "", U = X ?
|
|
286
|
-
return typeof s == "function" &&
|
|
281
|
+
var X = s ? s.displayName || s.name : "", U = X ? $(X) : "";
|
|
282
|
+
return typeof s == "function" && ss.set(s, U), U;
|
|
287
283
|
}
|
|
288
|
-
function
|
|
289
|
-
return
|
|
284
|
+
function Qs(s, t, a) {
|
|
285
|
+
return Hs(s, !1);
|
|
290
286
|
}
|
|
291
287
|
function Gs(s) {
|
|
292
288
|
var t = s.prototype;
|
|
293
289
|
return !!(t && t.isReactComponent);
|
|
294
290
|
}
|
|
295
|
-
function
|
|
291
|
+
function es(s, t, a) {
|
|
296
292
|
if (s == null)
|
|
297
293
|
return "";
|
|
298
294
|
if (typeof s == "function")
|
|
299
|
-
return
|
|
295
|
+
return Hs(s, Gs(s));
|
|
300
296
|
if (typeof s == "string")
|
|
301
|
-
return
|
|
297
|
+
return $(s);
|
|
302
298
|
switch (s) {
|
|
303
299
|
case N:
|
|
304
|
-
return
|
|
300
|
+
return $("Suspense");
|
|
305
301
|
case _:
|
|
306
|
-
return
|
|
302
|
+
return $("SuspenseList");
|
|
307
303
|
}
|
|
308
304
|
if (typeof s == "object")
|
|
309
305
|
switch (s.$$typeof) {
|
|
310
306
|
case g:
|
|
311
|
-
return
|
|
307
|
+
return Qs(s.render);
|
|
312
308
|
case k:
|
|
313
|
-
return
|
|
309
|
+
return es(s.type, t, a);
|
|
314
310
|
case I: {
|
|
315
311
|
var n = s, f = n._payload, w = n._init;
|
|
316
312
|
try {
|
|
317
|
-
return
|
|
313
|
+
return es(w(f), t, a);
|
|
318
314
|
} catch {
|
|
319
315
|
}
|
|
320
316
|
}
|
|
321
317
|
}
|
|
322
318
|
return "";
|
|
323
319
|
}
|
|
324
|
-
var L = Object.prototype.hasOwnProperty,
|
|
325
|
-
function
|
|
320
|
+
var L = Object.prototype.hasOwnProperty, vs = {}, Es = v.ReactDebugCurrentFrame;
|
|
321
|
+
function ts(s) {
|
|
326
322
|
if (s) {
|
|
327
|
-
var t = s._owner, a =
|
|
328
|
-
|
|
323
|
+
var t = s._owner, a = es(s.type, s._source, t ? t.type : null);
|
|
324
|
+
Es.setExtraStackFrame(a);
|
|
329
325
|
} else
|
|
330
|
-
|
|
326
|
+
Es.setExtraStackFrame(null);
|
|
331
327
|
}
|
|
332
|
-
function
|
|
328
|
+
function Vs(s, t, a, n, f) {
|
|
333
329
|
{
|
|
334
330
|
var w = Function.call.bind(L);
|
|
335
331
|
for (var h in s)
|
|
@@ -344,42 +340,41 @@ function ye() {
|
|
|
344
340
|
} catch (b) {
|
|
345
341
|
c = b;
|
|
346
342
|
}
|
|
347
|
-
c && !(c instanceof Error) && (
|
|
343
|
+
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 vs) && (vs[c.message] = !0, ts(f), T("Failed %s type: %s", a, c.message), ts(null));
|
|
348
344
|
}
|
|
349
345
|
}
|
|
350
346
|
}
|
|
351
|
-
var
|
|
352
|
-
function
|
|
353
|
-
return
|
|
347
|
+
var Js = Array.isArray;
|
|
348
|
+
function cs(s) {
|
|
349
|
+
return Js(s);
|
|
354
350
|
}
|
|
355
|
-
function
|
|
351
|
+
function Ks(s) {
|
|
356
352
|
{
|
|
357
353
|
var t = typeof Symbol == "function" && Symbol.toStringTag, a = t && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
358
354
|
return a;
|
|
359
355
|
}
|
|
360
356
|
}
|
|
361
|
-
function
|
|
357
|
+
function $s(s) {
|
|
362
358
|
try {
|
|
363
|
-
return
|
|
359
|
+
return Ns(s), !1;
|
|
364
360
|
} catch {
|
|
365
361
|
return !0;
|
|
366
362
|
}
|
|
367
363
|
}
|
|
368
|
-
function
|
|
364
|
+
function Ns(s) {
|
|
369
365
|
return "" + s;
|
|
370
366
|
}
|
|
371
|
-
function
|
|
372
|
-
if (
|
|
373
|
-
return
|
|
367
|
+
function zs(s) {
|
|
368
|
+
if ($s(s))
|
|
369
|
+
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ks(s)), Ns(s);
|
|
374
370
|
}
|
|
375
|
-
var
|
|
371
|
+
var Is = v.ReactCurrentOwner, se = {
|
|
376
372
|
key: !0,
|
|
377
373
|
ref: !0,
|
|
378
374
|
__self: !0,
|
|
379
375
|
__source: !0
|
|
380
|
-
},
|
|
381
|
-
|
|
382
|
-
function te(s) {
|
|
376
|
+
}, js, Fs;
|
|
377
|
+
function ee(s) {
|
|
383
378
|
if (L.call(s, "ref")) {
|
|
384
379
|
var t = Object.getOwnPropertyDescriptor(s, "ref").get;
|
|
385
380
|
if (t && t.isReactWarning)
|
|
@@ -387,7 +382,7 @@ function ye() {
|
|
|
387
382
|
}
|
|
388
383
|
return s.ref !== void 0;
|
|
389
384
|
}
|
|
390
|
-
function
|
|
385
|
+
function te(s) {
|
|
391
386
|
if (L.call(s, "key")) {
|
|
392
387
|
var t = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
393
388
|
if (t && t.isReactWarning)
|
|
@@ -395,16 +390,13 @@ function ye() {
|
|
|
395
390
|
}
|
|
396
391
|
return s.key !== void 0;
|
|
397
392
|
}
|
|
398
|
-
function
|
|
399
|
-
|
|
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
|
-
}
|
|
393
|
+
function oe(s, t) {
|
|
394
|
+
typeof s.ref == "string" && Is.current;
|
|
403
395
|
}
|
|
404
|
-
function
|
|
396
|
+
function ae(s, t) {
|
|
405
397
|
{
|
|
406
398
|
var a = function() {
|
|
407
|
-
|
|
399
|
+
js || (js = !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));
|
|
408
400
|
};
|
|
409
401
|
a.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
410
402
|
get: a,
|
|
@@ -412,10 +404,10 @@ function ye() {
|
|
|
412
404
|
});
|
|
413
405
|
}
|
|
414
406
|
}
|
|
415
|
-
function
|
|
407
|
+
function ie(s, t) {
|
|
416
408
|
{
|
|
417
409
|
var a = function() {
|
|
418
|
-
Fs || (Fs = !0,
|
|
410
|
+
Fs || (Fs = !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));
|
|
419
411
|
};
|
|
420
412
|
a.isReactWarning = !0, Object.defineProperty(s, "ref", {
|
|
421
413
|
get: a,
|
|
@@ -423,7 +415,7 @@ function ye() {
|
|
|
423
415
|
});
|
|
424
416
|
}
|
|
425
417
|
}
|
|
426
|
-
var
|
|
418
|
+
var re = function(s, t, a, n, f, w, h) {
|
|
427
419
|
var c = {
|
|
428
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
429
421
|
$$typeof: e,
|
|
@@ -452,41 +444,41 @@ function ye() {
|
|
|
452
444
|
value: f
|
|
453
445
|
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
454
446
|
};
|
|
455
|
-
function
|
|
447
|
+
function le(s, t, a, n, f) {
|
|
456
448
|
{
|
|
457
449
|
var w, h = {}, c = null, D = null;
|
|
458
|
-
a !== void 0 && (
|
|
450
|
+
a !== void 0 && (zs(a), c = "" + a), te(t) && (zs(t.key), c = "" + t.key), ee(t) && (D = t.ref, oe(t, f));
|
|
459
451
|
for (w in t)
|
|
460
|
-
L.call(t, w) && !
|
|
452
|
+
L.call(t, w) && !se.hasOwnProperty(w) && (h[w] = t[w]);
|
|
461
453
|
if (s && s.defaultProps) {
|
|
462
454
|
var b = s.defaultProps;
|
|
463
455
|
for (w in b)
|
|
464
456
|
h[w] === void 0 && (h[w] = b[w]);
|
|
465
457
|
}
|
|
466
458
|
if (c || D) {
|
|
467
|
-
var
|
|
468
|
-
c &&
|
|
459
|
+
var y = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
|
|
460
|
+
c && ae(h, y), D && ie(h, y);
|
|
469
461
|
}
|
|
470
|
-
return
|
|
462
|
+
return re(s, c, D, f, n, Is.current, h);
|
|
471
463
|
}
|
|
472
464
|
}
|
|
473
|
-
var
|
|
465
|
+
var hs = v.ReactCurrentOwner, As = v.ReactDebugCurrentFrame;
|
|
474
466
|
function O(s) {
|
|
475
467
|
if (s) {
|
|
476
|
-
var t = s._owner, a =
|
|
477
|
-
|
|
468
|
+
var t = s._owner, a = es(s.type, s._source, t ? t.type : null);
|
|
469
|
+
As.setExtraStackFrame(a);
|
|
478
470
|
} else
|
|
479
|
-
|
|
471
|
+
As.setExtraStackFrame(null);
|
|
480
472
|
}
|
|
481
|
-
var
|
|
482
|
-
|
|
483
|
-
function
|
|
473
|
+
var fs;
|
|
474
|
+
fs = !1;
|
|
475
|
+
function us(s) {
|
|
484
476
|
return typeof s == "object" && s !== null && s.$$typeof === e;
|
|
485
477
|
}
|
|
486
478
|
function Ys() {
|
|
487
479
|
{
|
|
488
|
-
if (
|
|
489
|
-
var s =
|
|
480
|
+
if (hs.current) {
|
|
481
|
+
var s = W(hs.current.type);
|
|
490
482
|
if (s)
|
|
491
483
|
return `
|
|
492
484
|
|
|
@@ -495,11 +487,11 @@ Check the render method of \`` + s + "`.";
|
|
|
495
487
|
return "";
|
|
496
488
|
}
|
|
497
489
|
}
|
|
498
|
-
function
|
|
490
|
+
function ne(s) {
|
|
499
491
|
return "";
|
|
500
492
|
}
|
|
501
|
-
var
|
|
502
|
-
function
|
|
493
|
+
var Ws = {};
|
|
494
|
+
function pe(s) {
|
|
503
495
|
{
|
|
504
496
|
var t = Ys();
|
|
505
497
|
if (!t) {
|
|
@@ -511,39 +503,39 @@ Check the top-level render call using <` + a + ">.");
|
|
|
511
503
|
return t;
|
|
512
504
|
}
|
|
513
505
|
}
|
|
514
|
-
function
|
|
506
|
+
function Ss(s, t) {
|
|
515
507
|
{
|
|
516
508
|
if (!s._store || s._store.validated || s.key != null)
|
|
517
509
|
return;
|
|
518
510
|
s._store.validated = !0;
|
|
519
|
-
var a =
|
|
520
|
-
if (
|
|
511
|
+
var a = pe(t);
|
|
512
|
+
if (Ws[a])
|
|
521
513
|
return;
|
|
522
|
-
|
|
514
|
+
Ws[a] = !0;
|
|
523
515
|
var n = "";
|
|
524
|
-
s && s._owner && s._owner !==
|
|
516
|
+
s && s._owner && s._owner !== hs.current && (n = " It was passed a child from " + W(s._owner.type) + "."), O(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), O(null);
|
|
525
517
|
}
|
|
526
518
|
}
|
|
527
|
-
function
|
|
519
|
+
function Rs(s, t) {
|
|
528
520
|
{
|
|
529
521
|
if (typeof s != "object")
|
|
530
522
|
return;
|
|
531
|
-
if (
|
|
523
|
+
if (cs(s))
|
|
532
524
|
for (var a = 0; a < s.length; a++) {
|
|
533
525
|
var n = s[a];
|
|
534
|
-
|
|
526
|
+
us(n) && Ss(n, t);
|
|
535
527
|
}
|
|
536
|
-
else if (
|
|
528
|
+
else if (us(s))
|
|
537
529
|
s._store && (s._store.validated = !0);
|
|
538
530
|
else if (s) {
|
|
539
531
|
var f = G(s);
|
|
540
532
|
if (typeof f == "function" && f !== s.entries)
|
|
541
533
|
for (var w = f.call(s), h; !(h = w.next()).done; )
|
|
542
|
-
|
|
534
|
+
us(h.value) && Ss(h.value, t);
|
|
543
535
|
}
|
|
544
536
|
}
|
|
545
537
|
}
|
|
546
|
-
function
|
|
538
|
+
function ce(s) {
|
|
547
539
|
{
|
|
548
540
|
var t = s.type;
|
|
549
541
|
if (t == null || typeof t == "string")
|
|
@@ -558,86 +550,86 @@ Check the top-level render call using <` + a + ">.");
|
|
|
558
550
|
else
|
|
559
551
|
return;
|
|
560
552
|
if (a) {
|
|
561
|
-
var n =
|
|
562
|
-
|
|
563
|
-
} else if (t.PropTypes !== void 0 && !
|
|
564
|
-
|
|
565
|
-
var f =
|
|
566
|
-
|
|
553
|
+
var n = W(t);
|
|
554
|
+
Vs(a, s.props, "prop", n, s);
|
|
555
|
+
} else if (t.PropTypes !== void 0 && !fs) {
|
|
556
|
+
fs = !0;
|
|
557
|
+
var f = W(t);
|
|
558
|
+
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
|
|
567
559
|
}
|
|
568
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved &&
|
|
560
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
569
561
|
}
|
|
570
562
|
}
|
|
571
|
-
function
|
|
563
|
+
function he(s) {
|
|
572
564
|
{
|
|
573
565
|
for (var t = Object.keys(s.props), a = 0; a < t.length; a++) {
|
|
574
566
|
var n = t[a];
|
|
575
567
|
if (n !== "children" && n !== "key") {
|
|
576
|
-
O(s),
|
|
568
|
+
O(s), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), O(null);
|
|
577
569
|
break;
|
|
578
570
|
}
|
|
579
571
|
}
|
|
580
|
-
s.ref !== null && (O(s),
|
|
572
|
+
s.ref !== null && (O(s), T("Invalid attribute `ref` supplied to `React.Fragment`."), O(null));
|
|
581
573
|
}
|
|
582
574
|
}
|
|
583
|
-
var
|
|
584
|
-
function
|
|
575
|
+
var Us = {};
|
|
576
|
+
function Ps(s, t, a, n, f, w) {
|
|
585
577
|
{
|
|
586
|
-
var h =
|
|
578
|
+
var h = rs(s);
|
|
587
579
|
if (!h) {
|
|
588
580
|
var c = "";
|
|
589
581
|
(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.");
|
|
590
|
-
var D =
|
|
582
|
+
var D = ne();
|
|
591
583
|
D ? c += D : c += Ys();
|
|
592
584
|
var b;
|
|
593
|
-
s === null ? b = "null" :
|
|
585
|
+
s === null ? b = "null" : cs(s) ? b = "array" : s !== void 0 && s.$$typeof === e ? (b = "<" + (W(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);
|
|
594
586
|
}
|
|
595
|
-
var
|
|
596
|
-
if (
|
|
597
|
-
return
|
|
587
|
+
var y = le(s, t, a, f, w);
|
|
588
|
+
if (y == null)
|
|
589
|
+
return y;
|
|
598
590
|
if (h) {
|
|
599
591
|
var z = t.children;
|
|
600
592
|
if (z !== void 0)
|
|
601
593
|
if (n)
|
|
602
|
-
if (
|
|
594
|
+
if (cs(z)) {
|
|
603
595
|
for (var X = 0; X < z.length; X++)
|
|
604
|
-
|
|
596
|
+
Rs(z[X], s);
|
|
605
597
|
Object.freeze && Object.freeze(z);
|
|
606
598
|
} else
|
|
607
|
-
|
|
599
|
+
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.");
|
|
608
600
|
else
|
|
609
|
-
|
|
601
|
+
Rs(z, s);
|
|
610
602
|
}
|
|
611
603
|
if (L.call(t, "key")) {
|
|
612
|
-
var U =
|
|
613
|
-
return
|
|
614
|
-
}),
|
|
615
|
-
if (!
|
|
616
|
-
var
|
|
617
|
-
|
|
604
|
+
var U = W(s), E = Object.keys(t).filter(function(xe) {
|
|
605
|
+
return xe !== "key";
|
|
606
|
+
}), ms = E.length > 0 ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
|
+
if (!Us[U + ms]) {
|
|
608
|
+
var de = E.length > 0 ? "{" + E.join(": ..., ") + ": ...}" : "{}";
|
|
609
|
+
T(`A props object containing a "key" prop is being spread into JSX:
|
|
618
610
|
let props = %s;
|
|
619
611
|
<%s {...props} />
|
|
620
612
|
React keys must be passed directly to JSX without using spread:
|
|
621
613
|
let props = %s;
|
|
622
|
-
<%s key={someKey} {...props} />`,
|
|
614
|
+
<%s key={someKey} {...props} />`, ms, U, de, U), Us[U + ms] = !0;
|
|
623
615
|
}
|
|
624
616
|
}
|
|
625
|
-
return s === r ?
|
|
617
|
+
return s === r ? he(y) : ce(y), y;
|
|
626
618
|
}
|
|
627
619
|
}
|
|
628
|
-
function
|
|
629
|
-
return
|
|
620
|
+
function fe(s, t, a) {
|
|
621
|
+
return Ps(s, t, a, !0);
|
|
630
622
|
}
|
|
631
|
-
function
|
|
632
|
-
return
|
|
623
|
+
function ue(s, t, a) {
|
|
624
|
+
return Ps(s, t, a, !1);
|
|
633
625
|
}
|
|
634
|
-
var
|
|
635
|
-
|
|
636
|
-
}()),
|
|
626
|
+
var me = ue, we = fe;
|
|
627
|
+
Q.Fragment = r, Q.jsx = me, Q.jsxs = we;
|
|
628
|
+
}()), Q;
|
|
637
629
|
}
|
|
638
|
-
process.env.NODE_ENV === "production" ?
|
|
639
|
-
var l =
|
|
640
|
-
class
|
|
630
|
+
process.env.NODE_ENV === "production" ? xs.exports = be() : xs.exports = _e();
|
|
631
|
+
var l = xs.exports;
|
|
632
|
+
class ye {
|
|
641
633
|
constructor(e = 3) {
|
|
642
634
|
M(this, "columnCount");
|
|
643
635
|
M(this, "columns", []);
|
|
@@ -666,12 +658,12 @@ class Te {
|
|
|
666
658
|
e !== this.columnCount && (this.columnCount = e, this.reset());
|
|
667
659
|
}
|
|
668
660
|
}
|
|
669
|
-
const
|
|
670
|
-
heart:
|
|
671
|
-
download:
|
|
672
|
-
},
|
|
661
|
+
const Te = (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" })), De = (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" })), ke = {
|
|
662
|
+
heart: De,
|
|
663
|
+
download: Te
|
|
664
|
+
}, ws = ({ icon: o, label: e, ...i }) => {
|
|
673
665
|
let r = null;
|
|
674
|
-
return o && (r =
|
|
666
|
+
return o && (r = ke[o]), /* @__PURE__ */ l.jsxs(
|
|
675
667
|
"a",
|
|
676
668
|
{
|
|
677
669
|
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",
|
|
@@ -683,7 +675,7 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
683
675
|
]
|
|
684
676
|
}
|
|
685
677
|
);
|
|
686
|
-
},
|
|
678
|
+
}, qs = ({ payload: o, srcUrl: e, links: i, likes: r, user: x, alt: m, urls: u, height: d, width: g, zoomed: N, insertImage: _, selectImg: k }) => {
|
|
687
679
|
const I = (H) => {
|
|
688
680
|
H.stopPropagation(), k(N ? null : o);
|
|
689
681
|
};
|
|
@@ -710,7 +702,7 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
710
702
|
/* @__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: [
|
|
711
703
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-end gap-3", children: [
|
|
712
704
|
/* @__PURE__ */ l.jsx(
|
|
713
|
-
|
|
705
|
+
ws,
|
|
714
706
|
{
|
|
715
707
|
"data-kg-button": "unsplash-like",
|
|
716
708
|
href: `${i.html}/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit`,
|
|
@@ -721,7 +713,7 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
721
713
|
}
|
|
722
714
|
),
|
|
723
715
|
/* @__PURE__ */ l.jsx(
|
|
724
|
-
|
|
716
|
+
ws,
|
|
725
717
|
{
|
|
726
718
|
"data-kg-button": "unsplash-download",
|
|
727
719
|
href: `${i.download}/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit&force=true`,
|
|
@@ -734,7 +726,7 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
734
726
|
/* @__PURE__ */ l.jsx("img", { alt: "author", className: "mr-2 size-8 rounded-full", src: x.profile_image.medium }),
|
|
735
727
|
/* @__PURE__ */ l.jsx("div", { className: "mr-2 truncate font-sans text-sm font-medium text-white", children: x.name })
|
|
736
728
|
] }),
|
|
737
|
-
/* @__PURE__ */ l.jsx(
|
|
729
|
+
/* @__PURE__ */ l.jsx(ws, { label: "Insert image", "data-kg-unsplash-insert-button": !0, onClick: (H) => {
|
|
738
730
|
H.stopPropagation(), _({
|
|
739
731
|
src: u.regular.replace(/&w=1080/, "&w=2000"),
|
|
740
732
|
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>`,
|
|
@@ -749,8 +741,8 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
749
741
|
]
|
|
750
742
|
}
|
|
751
743
|
);
|
|
752
|
-
},
|
|
753
|
-
|
|
744
|
+
}, He = ({ 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(
|
|
745
|
+
qs,
|
|
754
746
|
{
|
|
755
747
|
alt: o.alt_description,
|
|
756
748
|
height: o.height,
|
|
@@ -765,10 +757,10 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
765
757
|
width: o.width,
|
|
766
758
|
zoomed: r
|
|
767
759
|
}
|
|
768
|
-
) }),
|
|
760
|
+
) }), ve = () => /* @__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" }) }), Ee = (o) => /* @__PURE__ */ l.jsx("div", { className: "mr-6 flex grow basis-0 flex-col justify-start last-of-type:mr-0", children: o.children }), Ne = (o) => o != null && o.columns ? o == null ? void 0 : o.columns.map((e, i) => (
|
|
769
761
|
// eslint-disable-next-line react/no-array-index-key
|
|
770
|
-
/* @__PURE__ */ l.jsx(
|
|
771
|
-
|
|
762
|
+
/* @__PURE__ */ l.jsx(Ee, { children: e.map((r) => /* @__PURE__ */ l.jsx(
|
|
763
|
+
qs,
|
|
772
764
|
{
|
|
773
765
|
alt: r.alt_description,
|
|
774
766
|
height: r.height,
|
|
@@ -785,10 +777,10 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
785
777
|
},
|
|
786
778
|
r.id
|
|
787
779
|
)) }, i)
|
|
788
|
-
)) : null,
|
|
780
|
+
)) : 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: [
|
|
789
781
|
o.children,
|
|
790
|
-
(o == null ? void 0 : o.isLoading) && /* @__PURE__ */ l.jsx(
|
|
791
|
-
] }) }),
|
|
782
|
+
(o == null ? void 0 : o.isLoading) && /* @__PURE__ */ l.jsx(ve, {})
|
|
783
|
+
] }) }), ze = ({
|
|
792
784
|
zoomed: o,
|
|
793
785
|
error: e,
|
|
794
786
|
galleryRef: i,
|
|
@@ -797,12 +789,12 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
797
789
|
selectImg: m,
|
|
798
790
|
insertImage: u
|
|
799
791
|
}) => o ? /* @__PURE__ */ l.jsx(
|
|
800
|
-
|
|
792
|
+
ds,
|
|
801
793
|
{
|
|
802
794
|
galleryRef: i,
|
|
803
795
|
zoomed: o,
|
|
804
796
|
children: /* @__PURE__ */ l.jsx(
|
|
805
|
-
|
|
797
|
+
He,
|
|
806
798
|
{
|
|
807
799
|
alt: o.alt_description,
|
|
808
800
|
height: o.height,
|
|
@@ -820,7 +812,7 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
820
812
|
)
|
|
821
813
|
}
|
|
822
814
|
) : e ? /* @__PURE__ */ l.jsx(
|
|
823
|
-
|
|
815
|
+
ds,
|
|
824
816
|
{
|
|
825
817
|
galleryRef: i,
|
|
826
818
|
zoomed: o,
|
|
@@ -830,13 +822,13 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
830
822
|
] })
|
|
831
823
|
}
|
|
832
824
|
) : /* @__PURE__ */ l.jsx(
|
|
833
|
-
|
|
825
|
+
ds,
|
|
834
826
|
{
|
|
835
827
|
galleryRef: i,
|
|
836
828
|
isLoading: r,
|
|
837
829
|
zoomed: o,
|
|
838
830
|
children: /* @__PURE__ */ l.jsx(
|
|
839
|
-
|
|
831
|
+
Ne,
|
|
840
832
|
{
|
|
841
833
|
columns: x,
|
|
842
834
|
insertImage: u,
|
|
@@ -845,11 +837,11 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
845
837
|
}
|
|
846
838
|
)
|
|
847
839
|
}
|
|
848
|
-
),
|
|
840
|
+
), Ie = (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" })), je = (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" })), Fe = (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" })), Ae = ({ closeModal: o, handleSearch: e, children: i }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
849
841
|
/* @__PURE__ */ l.jsx("div", { className: "fixed inset-0 z-40 h-[100vh] bg-black opacity-60" }),
|
|
850
842
|
/* @__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: [
|
|
851
843
|
/* @__PURE__ */ l.jsx("button", { className: "absolute right-6 top-6 cursor-pointer", type: "button", children: /* @__PURE__ */ l.jsx(
|
|
852
|
-
|
|
844
|
+
Ie,
|
|
853
845
|
{
|
|
854
846
|
className: "text-grey-400 size-4 stroke-2",
|
|
855
847
|
"data-kg-modal-close-button": !0,
|
|
@@ -863,7 +855,7 @@ const De = (o) => /* @__PURE__ */ W.createElement("svg", { xmlns: "http://www.w3
|
|
|
863
855
|
"Unsplash"
|
|
864
856
|
] }),
|
|
865
857
|
/* @__PURE__ */ l.jsxs("div", { className: "relative w-full max-w-sm", children: [
|
|
866
|
-
/* @__PURE__ */ l.jsx(
|
|
858
|
+
/* @__PURE__ */ l.jsx(je, { className: "text-grey-700 absolute left-4 top-1/2 size-4 -translate-y-2" }),
|
|
867
859
|
/* @__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 })
|
|
868
860
|
] })
|
|
869
861
|
] }),
|
|
@@ -2600,124 +2592,6 @@ Instagram: @clarisse.rae`,
|
|
|
2600
2592
|
}
|
|
2601
2593
|
}
|
|
2602
2594
|
},
|
|
2603
|
-
{
|
|
2604
|
-
id: "xQhP7RVgA3c",
|
|
2605
|
-
slug: "a-person-swimming-in-the-ocean-with-a-mountain-in-the-background-xQhP7RVgA3c",
|
|
2606
|
-
alternative_slugs: {
|
|
2607
|
-
en: "a-person-swimming-in-the-ocean-with-a-mountain-in-the-background-xQhP7RVgA3c"
|
|
2608
|
-
},
|
|
2609
|
-
created_at: "2024-02-07T22:34:15Z",
|
|
2610
|
-
updated_at: "2024-03-10T21:55:55Z",
|
|
2611
|
-
promoted_at: null,
|
|
2612
|
-
width: 7512,
|
|
2613
|
-
height: 5008,
|
|
2614
|
-
color: "#c0d9f3",
|
|
2615
|
-
blur_hash: "L?ENFxX9Rkaz.AR.WBjsx^a~oLa}",
|
|
2616
|
-
description: "NEOM is home to 2,000 different marine species, 600 of which are native to the Red Sea and cannot be found anywhere else in the world. | Islands of NEOM- NEOM, Saudi Arabia",
|
|
2617
|
-
alt_description: "a person swimming in the ocean with a mountain in the background",
|
|
2618
|
-
breadcrumbs: [],
|
|
2619
|
-
urls: {
|
|
2620
|
-
raw: "https://images.unsplash.com/photo-1707343846292-56e4c6abf291?ixid=M3wxMTc3M3wxfDF8YWxsfDIxfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3",
|
|
2621
|
-
full: "https://images.unsplash.com/photo-1707343846292-56e4c6abf291?crop=entropy&cs=srgb&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDIxfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=85",
|
|
2622
|
-
regular: "https://images.unsplash.com/photo-1707343846292-56e4c6abf291?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDIxfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=1080",
|
|
2623
|
-
small: "https://images.unsplash.com/photo-1707343846292-56e4c6abf291?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDIxfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=400",
|
|
2624
|
-
thumb: "https://images.unsplash.com/photo-1707343846292-56e4c6abf291?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTc3M3wxfDF8YWxsfDIxfHx8fHx8Mnx8MTcxMDE1MzIwNXw&ixlib=rb-4.0.3&q=80&w=200",
|
|
2625
|
-
small_s3: "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1707343846292-56e4c6abf291"
|
|
2626
|
-
},
|
|
2627
|
-
links: {
|
|
2628
|
-
self: "https://api.unsplash.com/photos/a-person-swimming-in-the-ocean-with-a-mountain-in-the-background-xQhP7RVgA3c",
|
|
2629
|
-
html: "https://unsplash.com/photos/a-person-swimming-in-the-ocean-with-a-mountain-in-the-background-xQhP7RVgA3c",
|
|
2630
|
-
download: "https://unsplash.com/photos/xQhP7RVgA3c/download?ixid=M3wxMTc3M3wxfDF8YWxsfDIxfHx8fHx8Mnx8MTcxMDE1MzIwNXw",
|
|
2631
|
-
download_location: "https://api.unsplash.com/photos/xQhP7RVgA3c/download?ixid=M3wxMTc3M3wxfDF8YWxsfDIxfHx8fHx8Mnx8MTcxMDE1MzIwNXw"
|
|
2632
|
-
},
|
|
2633
|
-
likes: 98,
|
|
2634
|
-
liked_by_user: !1,
|
|
2635
|
-
current_user_collections: [],
|
|
2636
|
-
sponsorship: {
|
|
2637
|
-
impression_urls: [],
|
|
2638
|
-
tagline: "Made to Change",
|
|
2639
|
-
tagline_url: "https://www.neom.com/en-us?utm_source=unsplash&utm_medium=referral",
|
|
2640
|
-
sponsor: {
|
|
2641
|
-
id: "mYizSrdJkkU",
|
|
2642
|
-
updated_at: "2024-03-11T08:54:08Z",
|
|
2643
|
-
username: "neom",
|
|
2644
|
-
name: "NEOM",
|
|
2645
|
-
first_name: "NEOM",
|
|
2646
|
-
last_name: null,
|
|
2647
|
-
twitter_username: "neom",
|
|
2648
|
-
portfolio_url: "http://www.neom.com",
|
|
2649
|
-
bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
|
|
2650
|
-
location: "NEOM, Saudi Arabia",
|
|
2651
|
-
links: {
|
|
2652
|
-
self: "https://api.unsplash.com/users/neom",
|
|
2653
|
-
html: "https://unsplash.com/@neom",
|
|
2654
|
-
photos: "https://api.unsplash.com/users/neom/photos",
|
|
2655
|
-
likes: "https://api.unsplash.com/users/neom/likes",
|
|
2656
|
-
portfolio: "https://api.unsplash.com/users/neom/portfolio",
|
|
2657
|
-
following: "https://api.unsplash.com/users/neom/following",
|
|
2658
|
-
followers: "https://api.unsplash.com/users/neom/followers"
|
|
2659
|
-
},
|
|
2660
|
-
profile_image: {
|
|
2661
|
-
small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
|
|
2662
|
-
medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
|
|
2663
|
-
large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
|
|
2664
|
-
},
|
|
2665
|
-
instagram_username: "discoverneom",
|
|
2666
|
-
total_collections: 7,
|
|
2667
|
-
total_likes: 1,
|
|
2668
|
-
total_photos: 222,
|
|
2669
|
-
total_promoted_photos: 72,
|
|
2670
|
-
accepted_tos: !0,
|
|
2671
|
-
for_hire: !1,
|
|
2672
|
-
social: {
|
|
2673
|
-
instagram_username: "discoverneom",
|
|
2674
|
-
portfolio_url: "http://www.neom.com",
|
|
2675
|
-
twitter_username: "neom",
|
|
2676
|
-
paypal_email: null
|
|
2677
|
-
}
|
|
2678
|
-
}
|
|
2679
|
-
},
|
|
2680
|
-
topic_submissions: {},
|
|
2681
|
-
user: {
|
|
2682
|
-
id: "mYizSrdJkkU",
|
|
2683
|
-
updated_at: "2024-03-11T08:54:08Z",
|
|
2684
|
-
username: "neom",
|
|
2685
|
-
name: "NEOM",
|
|
2686
|
-
first_name: "NEOM",
|
|
2687
|
-
last_name: null,
|
|
2688
|
-
twitter_username: "neom",
|
|
2689
|
-
portfolio_url: "http://www.neom.com",
|
|
2690
|
-
bio: "Located in the northwest of Saudi Arabia, NEOM’s diverse climate offers both sun-soaked beaches and snow-capped mountains. NEOM’s unique location will provide residents with enhanced livability while protecting 95% of the natural landscape.",
|
|
2691
|
-
location: "NEOM, Saudi Arabia",
|
|
2692
|
-
links: {
|
|
2693
|
-
self: "https://api.unsplash.com/users/neom",
|
|
2694
|
-
html: "https://unsplash.com/@neom",
|
|
2695
|
-
photos: "https://api.unsplash.com/users/neom/photos",
|
|
2696
|
-
likes: "https://api.unsplash.com/users/neom/likes",
|
|
2697
|
-
portfolio: "https://api.unsplash.com/users/neom/portfolio",
|
|
2698
|
-
following: "https://api.unsplash.com/users/neom/following",
|
|
2699
|
-
followers: "https://api.unsplash.com/users/neom/followers"
|
|
2700
|
-
},
|
|
2701
|
-
profile_image: {
|
|
2702
|
-
small: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=32&h=32",
|
|
2703
|
-
medium: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=64&h=64",
|
|
2704
|
-
large: "https://images.unsplash.com/profile-1679489218992-ebe823c797dfimage?ixlib=rb-4.0.3&crop=faces&fit=crop&w=128&h=128"
|
|
2705
|
-
},
|
|
2706
|
-
instagram_username: "discoverneom",
|
|
2707
|
-
total_collections: 7,
|
|
2708
|
-
total_likes: 1,
|
|
2709
|
-
total_photos: 222,
|
|
2710
|
-
total_promoted_photos: 72,
|
|
2711
|
-
accepted_tos: !0,
|
|
2712
|
-
for_hire: !1,
|
|
2713
|
-
social: {
|
|
2714
|
-
instagram_username: "discoverneom",
|
|
2715
|
-
portfolio_url: "http://www.neom.com",
|
|
2716
|
-
twitter_username: "neom",
|
|
2717
|
-
paypal_email: null
|
|
2718
|
-
}
|
|
2719
|
-
}
|
|
2720
|
-
},
|
|
2721
2595
|
{
|
|
2722
2596
|
id: "iswshBYbTBk",
|
|
2723
2597
|
slug: "a-woman-riding-an-escalator-down-an-escalator-iswshBYbTBk",
|
|
@@ -3465,10 +3339,10 @@ Be free to contact me to book a shoot 🙏🏻`,
|
|
|
3465
3339
|
}
|
|
3466
3340
|
}
|
|
3467
3341
|
}
|
|
3468
|
-
],
|
|
3469
|
-
class
|
|
3342
|
+
], We = Ye;
|
|
3343
|
+
class Se {
|
|
3470
3344
|
constructor() {
|
|
3471
|
-
M(this, "photos",
|
|
3345
|
+
M(this, "photos", We);
|
|
3472
3346
|
M(this, "PAGINATION", {});
|
|
3473
3347
|
M(this, "REQUEST_IS_RUNNING", !1);
|
|
3474
3348
|
M(this, "SEARCH_IS_RUNNING", !1);
|
|
@@ -3501,7 +3375,7 @@ class Re {
|
|
|
3501
3375
|
triggerDownload(e) {
|
|
3502
3376
|
}
|
|
3503
3377
|
}
|
|
3504
|
-
class
|
|
3378
|
+
class Re {
|
|
3505
3379
|
constructor(e) {
|
|
3506
3380
|
M(this, "_provider");
|
|
3507
3381
|
this._provider = e;
|
|
@@ -3523,7 +3397,7 @@ class Ue {
|
|
|
3523
3397
|
return this._provider.searchIsRunning();
|
|
3524
3398
|
}
|
|
3525
3399
|
}
|
|
3526
|
-
class
|
|
3400
|
+
class Ue {
|
|
3527
3401
|
constructor(e) {
|
|
3528
3402
|
M(this, "API_URL", "https://api.unsplash.com");
|
|
3529
3403
|
M(this, "HEADERS");
|
|
@@ -3606,7 +3480,7 @@ class Pe {
|
|
|
3606
3480
|
return this.SEARCH_IS_RUNNING;
|
|
3607
3481
|
}
|
|
3608
3482
|
}
|
|
3609
|
-
class
|
|
3483
|
+
class Pe {
|
|
3610
3484
|
constructor(e, i) {
|
|
3611
3485
|
M(this, "photoUseCases");
|
|
3612
3486
|
M(this, "masonryService");
|
|
@@ -3643,8 +3517,8 @@ class Oe {
|
|
|
3643
3517
|
return this.photoUseCases.searchIsRunning();
|
|
3644
3518
|
}
|
|
3645
3519
|
}
|
|
3646
|
-
const
|
|
3647
|
-
const r =
|
|
3520
|
+
const Ce = ({ onClose: o, onImageInsert: e, unsplashProviderConfig: i }) => {
|
|
3521
|
+
const r = os(() => i ? new Ue(i) : new Se(), [i]), x = os(() => new Re(r), [r]), m = os(() => new ye(3), []), u = os(() => new Pe(x, m), [x, m]), d = Os(null), [g, N] = C(0), [_, k] = C(0), [I, H] = C(u.searchIsRunning() || !0), P = Os(!1), [Y, G] = C(""), [v, T] = C(null), [as, S] = C([]);
|
|
3648
3522
|
F.useEffect(() => {
|
|
3649
3523
|
d.current && v === null && _ !== 0 && (d.current.scrollTop = _, k(0));
|
|
3650
3524
|
}, [v, g, _]), F.useEffect(() => {
|
|
@@ -3671,10 +3545,10 @@ const qe = ({ onClose: o, onImageInsert: e, unsplashProviderConfig: i }) => {
|
|
|
3671
3545
|
const p = u.getColumns();
|
|
3672
3546
|
S(p || []), d.current && d.current.scrollTop !== 0 && (d.current.scrollTop = 0), H(!1);
|
|
3673
3547
|
}
|
|
3674
|
-
}, [u, Y]),
|
|
3548
|
+
}, [u, Y]), is = async (p) => {
|
|
3675
3549
|
const j = p.target.value;
|
|
3676
|
-
j.length > 2 && (
|
|
3677
|
-
},
|
|
3550
|
+
j.length > 2 && (T(null), G(j)), j.length === 0 && (G(""), P.current = !1, await q());
|
|
3551
|
+
}, V = F.useCallback(async () => {
|
|
3678
3552
|
if (Y) {
|
|
3679
3553
|
H(!0), S([]), u.clearPhotos(), await u.updateSearch(Y);
|
|
3680
3554
|
const p = u.getColumns();
|
|
@@ -3683,13 +3557,13 @@ const qe = ({ onClose: o, onImageInsert: e, unsplashProviderConfig: i }) => {
|
|
|
3683
3557
|
}, [Y, u]);
|
|
3684
3558
|
F.useEffect(() => {
|
|
3685
3559
|
const p = setTimeout(async () => {
|
|
3686
|
-
Y.length > 2 ? await
|
|
3560
|
+
Y.length > 2 ? await V() : await q();
|
|
3687
3561
|
}, 300);
|
|
3688
3562
|
return () => {
|
|
3689
3563
|
P.current = !0, clearTimeout(p);
|
|
3690
3564
|
};
|
|
3691
|
-
}, [Y,
|
|
3692
|
-
const
|
|
3565
|
+
}, [Y, V, q]);
|
|
3566
|
+
const J = F.useCallback(async () => {
|
|
3693
3567
|
H(!0), await u.loadNextPage();
|
|
3694
3568
|
const p = u.getColumns();
|
|
3695
3569
|
S(p || []), H(!1);
|
|
@@ -3698,33 +3572,33 @@ const qe = ({ onClose: o, onImageInsert: e, unsplashProviderConfig: i }) => {
|
|
|
3698
3572
|
const p = d.current;
|
|
3699
3573
|
if (p) {
|
|
3700
3574
|
const j = async () => {
|
|
3701
|
-
v === null && p.scrollTop + p.clientHeight >= p.scrollHeight - 1e3 && await
|
|
3575
|
+
v === null && p.scrollTop + p.clientHeight >= p.scrollHeight - 1e3 && await J();
|
|
3702
3576
|
};
|
|
3703
3577
|
return p.addEventListener("scroll", j), () => {
|
|
3704
3578
|
p.removeEventListener("scroll", j);
|
|
3705
3579
|
};
|
|
3706
3580
|
}
|
|
3707
|
-
}, [d,
|
|
3708
|
-
const
|
|
3709
|
-
p && (
|
|
3581
|
+
}, [d, J, v]);
|
|
3582
|
+
const K = (p) => {
|
|
3583
|
+
p && (T(p), k(g)), p === null && (T(null), d.current && (d.current.scrollTop = _));
|
|
3710
3584
|
};
|
|
3711
|
-
async function
|
|
3585
|
+
async function rs(p) {
|
|
3712
3586
|
p.src && (u.triggerDownload(p), e(p));
|
|
3713
3587
|
}
|
|
3714
3588
|
return /* @__PURE__ */ l.jsx(
|
|
3715
|
-
|
|
3589
|
+
Ae,
|
|
3716
3590
|
{
|
|
3717
3591
|
closeModal: o,
|
|
3718
|
-
handleSearch:
|
|
3592
|
+
handleSearch: is,
|
|
3719
3593
|
children: /* @__PURE__ */ l.jsx(
|
|
3720
|
-
|
|
3594
|
+
ze,
|
|
3721
3595
|
{
|
|
3722
|
-
dataset:
|
|
3596
|
+
dataset: as,
|
|
3723
3597
|
error: null,
|
|
3724
3598
|
galleryRef: d,
|
|
3725
|
-
insertImage:
|
|
3599
|
+
insertImage: rs,
|
|
3726
3600
|
isLoading: I,
|
|
3727
|
-
selectImg:
|
|
3601
|
+
selectImg: K,
|
|
3728
3602
|
zoomed: v
|
|
3729
3603
|
}
|
|
3730
3604
|
)
|
|
@@ -3732,7 +3606,7 @@ const qe = ({ onClose: o, onImageInsert: e, unsplashProviderConfig: i }) => {
|
|
|
3732
3606
|
);
|
|
3733
3607
|
};
|
|
3734
3608
|
export {
|
|
3735
|
-
|
|
3736
|
-
|
|
3609
|
+
Ue as UnsplashProvider,
|
|
3610
|
+
Ce as UnsplashSearchModal
|
|
3737
3611
|
};
|
|
3738
3612
|
//# sourceMappingURL=index.es.js.map
|