@sanity/google-maps-input 3.0.1 → 3.0.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/README.md +16 -13
- package/dist/index.cjs.mjs +7 -0
- package/{lib/src → dist}/index.d.ts +2 -1
- package/dist/index.esm.js +2964 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2991 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -48
- package/src/diff/GeopointArrayDiff.tsx +5 -3
- package/src/diff/GeopointFieldDiff.tsx +6 -4
- package/src/input/GeopointInput.tsx +25 -25
- package/src/loader/GoogleMapsLoadProxy.tsx +1 -1
- package/src/loader/loadGoogleMapsApi.ts +6 -2
- package/src/map/util.ts +1 -1
- package/lib/index.esm.js +0 -2
- package/lib/index.esm.js.map +0 -1
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
|
@@ -0,0 +1,2964 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import * as r from 'react';
|
|
3
|
+
import r__default, { useState, useEffect, useRef, useContext, createElement } from 'react';
|
|
4
|
+
import { uniqueId } from 'lodash';
|
|
5
|
+
import { Card, Box, Text, Code, TextInput, Stack, Grid, Button, Dialog } from '@sanity/ui';
|
|
6
|
+
import { EditIcon, TrashIcon } from '@sanity/icons';
|
|
7
|
+
import { ChangeIndicator, setIfMissing, set, unset, useUserColor, getAnnotationAtPath, DiffTooltip, definePlugin } from 'sanity';
|
|
8
|
+
const callbackName = "___sanity_googleMapsApiCallback";
|
|
9
|
+
const authFailureCallbackName = "gm_authFailure";
|
|
10
|
+
let AuthError$1 = class AuthError extends Error {};
|
|
11
|
+
function _loadGoogleMapsApi(config) {
|
|
12
|
+
return new Promise((resolve, reject) => {
|
|
13
|
+
window[authFailureCallbackName] = () => {
|
|
14
|
+
reject(new AuthError$1("Authentication error when loading Google Maps API."));
|
|
15
|
+
};
|
|
16
|
+
window[callbackName] = () => {
|
|
17
|
+
resolve(window.google.maps);
|
|
18
|
+
};
|
|
19
|
+
const script = document.createElement("script");
|
|
20
|
+
script.onerror = (event, source, lineno, colno, error) => reject(new Error(coeerceError(event, error)));
|
|
21
|
+
script.src = "https://maps.googleapis.com/maps/api/js?key=".concat(config.apiKey, "&libraries=places&callback=").concat(callbackName, "&language=").concat(config.locale);
|
|
22
|
+
document.getElementsByTagName("head")[0].appendChild(script);
|
|
23
|
+
}).finally(() => {
|
|
24
|
+
delete window[callbackName];
|
|
25
|
+
delete window[authFailureCallbackName];
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
let memo = null;
|
|
29
|
+
function loadGoogleMapsApi(config) {
|
|
30
|
+
if (memo) {
|
|
31
|
+
return memo;
|
|
32
|
+
}
|
|
33
|
+
memo = _loadGoogleMapsApi(config);
|
|
34
|
+
memo.catch(() => {
|
|
35
|
+
memo = null;
|
|
36
|
+
});
|
|
37
|
+
return memo;
|
|
38
|
+
}
|
|
39
|
+
function coeerceError(event, error) {
|
|
40
|
+
if (error) {
|
|
41
|
+
return error.message;
|
|
42
|
+
}
|
|
43
|
+
if (typeof event === "string") {
|
|
44
|
+
return event;
|
|
45
|
+
}
|
|
46
|
+
return isErrorEvent(event) ? event.message : "Failed to load Google Maps API";
|
|
47
|
+
}
|
|
48
|
+
function isErrorEvent(event) {
|
|
49
|
+
if (typeof event !== "object" || event === null) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
if (!("message" in event)) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return typeof event.message === "string";
|
|
56
|
+
}
|
|
57
|
+
function LoadError(props) {
|
|
58
|
+
var _a;
|
|
59
|
+
return /* @__PURE__ */jsxs(Card, {
|
|
60
|
+
tone: "critical",
|
|
61
|
+
radius: 1,
|
|
62
|
+
children: [/* @__PURE__ */jsx(Box, {
|
|
63
|
+
as: "header",
|
|
64
|
+
paddingX: 4,
|
|
65
|
+
paddingTop: 4,
|
|
66
|
+
paddingBottom: 1,
|
|
67
|
+
children: /* @__PURE__ */jsx(Text, {
|
|
68
|
+
as: "h2",
|
|
69
|
+
weight: "bold",
|
|
70
|
+
children: "Google Maps failed to load"
|
|
71
|
+
})
|
|
72
|
+
}), /* @__PURE__ */jsx(Box, {
|
|
73
|
+
paddingX: 4,
|
|
74
|
+
paddingTop: 4,
|
|
75
|
+
paddingBottom: 1,
|
|
76
|
+
children: props.isAuthError ? /* @__PURE__ */jsx(AuthError, {}) : /* @__PURE__ */jsxs(Fragment, {
|
|
77
|
+
children: [/* @__PURE__ */jsx(Text, {
|
|
78
|
+
as: "h3",
|
|
79
|
+
children: "Error details:"
|
|
80
|
+
}), /* @__PURE__ */jsx("pre", {
|
|
81
|
+
children: /* @__PURE__ */jsx(Code, {
|
|
82
|
+
size: 1,
|
|
83
|
+
children: "error" in props && ((_a = props.error) == null ? void 0 : _a.message)
|
|
84
|
+
})
|
|
85
|
+
})]
|
|
86
|
+
})
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function AuthError() {
|
|
91
|
+
return /* @__PURE__ */jsxs(Text, {
|
|
92
|
+
children: [/* @__PURE__ */jsx("p", {
|
|
93
|
+
children: "The error appears to be related to authentication"
|
|
94
|
+
}), /* @__PURE__ */jsx("p", {
|
|
95
|
+
children: "Common causes include:"
|
|
96
|
+
}), /* @__PURE__ */jsxs("ul", {
|
|
97
|
+
children: [/* @__PURE__ */jsx("li", {
|
|
98
|
+
children: "Incorrect API key"
|
|
99
|
+
}), /* @__PURE__ */jsx("li", {
|
|
100
|
+
children: "Referer not allowed"
|
|
101
|
+
}), /* @__PURE__ */jsx("li", {
|
|
102
|
+
children: "Missing authentication scope"
|
|
103
|
+
})]
|
|
104
|
+
}), /* @__PURE__ */jsx("p", {
|
|
105
|
+
children: "Check the browser developer tools for more information."
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
const browserLocale = typeof window !== "undefined" && window.navigator.language || "en";
|
|
110
|
+
function useLoadGoogleMapsApi(config) {
|
|
111
|
+
const locale = config.defaultLocale || browserLocale || "en-US";
|
|
112
|
+
const [state, setState] = useState({
|
|
113
|
+
type: "loading"
|
|
114
|
+
});
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
loadGoogleMapsApi({
|
|
117
|
+
locale,
|
|
118
|
+
apiKey: config.apiKey
|
|
119
|
+
}).then(api => setState({
|
|
120
|
+
type: "loaded",
|
|
121
|
+
api
|
|
122
|
+
}), err => setState({
|
|
123
|
+
type: "error",
|
|
124
|
+
error: {
|
|
125
|
+
type: err instanceof AuthError$1 ? "authError" : "loadError",
|
|
126
|
+
message: err.message
|
|
127
|
+
}
|
|
128
|
+
}));
|
|
129
|
+
}, [locale, config.apiKey]);
|
|
130
|
+
return state;
|
|
131
|
+
}
|
|
132
|
+
function GoogleMapsLoadProxy(props) {
|
|
133
|
+
const loadState = useLoadGoogleMapsApi(props.config);
|
|
134
|
+
switch (loadState.type) {
|
|
135
|
+
case "error":
|
|
136
|
+
return /* @__PURE__ */jsx(LoadError, {
|
|
137
|
+
error: loadState.error,
|
|
138
|
+
isAuthError: loadState.error.type === "authError"
|
|
139
|
+
});
|
|
140
|
+
case "loading":
|
|
141
|
+
return /* @__PURE__ */jsx("div", {
|
|
142
|
+
children: "Loading Google Maps API"
|
|
143
|
+
});
|
|
144
|
+
case "loaded":
|
|
145
|
+
return props.children(loadState.api);
|
|
146
|
+
default:
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function getDefaultExportFromCjs(x) {
|
|
151
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
152
|
+
}
|
|
153
|
+
var reactIs$2 = {
|
|
154
|
+
exports: {}
|
|
155
|
+
};
|
|
156
|
+
var reactIs_production_min$1 = {};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @license React
|
|
160
|
+
* react-is.production.min.js
|
|
161
|
+
*
|
|
162
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the MIT license found in the
|
|
165
|
+
* LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
var hasRequiredReactIs_production_min$1;
|
|
169
|
+
function requireReactIs_production_min$1() {
|
|
170
|
+
if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1;
|
|
171
|
+
hasRequiredReactIs_production_min$1 = 1;
|
|
172
|
+
var b = Symbol.for("react.element"),
|
|
173
|
+
c = Symbol.for("react.portal"),
|
|
174
|
+
d = Symbol.for("react.fragment"),
|
|
175
|
+
e = Symbol.for("react.strict_mode"),
|
|
176
|
+
f = Symbol.for("react.profiler"),
|
|
177
|
+
g = Symbol.for("react.provider"),
|
|
178
|
+
h = Symbol.for("react.context"),
|
|
179
|
+
k = Symbol.for("react.server_context"),
|
|
180
|
+
l = Symbol.for("react.forward_ref"),
|
|
181
|
+
m = Symbol.for("react.suspense"),
|
|
182
|
+
n = Symbol.for("react.suspense_list"),
|
|
183
|
+
p = Symbol.for("react.memo"),
|
|
184
|
+
q = Symbol.for("react.lazy"),
|
|
185
|
+
t = Symbol.for("react.offscreen"),
|
|
186
|
+
u;
|
|
187
|
+
u = Symbol.for("react.module.reference");
|
|
188
|
+
function v(a) {
|
|
189
|
+
if ("object" === typeof a && null !== a) {
|
|
190
|
+
var r = a.$$typeof;
|
|
191
|
+
switch (r) {
|
|
192
|
+
case b:
|
|
193
|
+
switch (a = a.type, a) {
|
|
194
|
+
case d:
|
|
195
|
+
case f:
|
|
196
|
+
case e:
|
|
197
|
+
case m:
|
|
198
|
+
case n:
|
|
199
|
+
return a;
|
|
200
|
+
default:
|
|
201
|
+
switch (a = a && a.$$typeof, a) {
|
|
202
|
+
case k:
|
|
203
|
+
case h:
|
|
204
|
+
case l:
|
|
205
|
+
case q:
|
|
206
|
+
case p:
|
|
207
|
+
case g:
|
|
208
|
+
return a;
|
|
209
|
+
default:
|
|
210
|
+
return r;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
case c:
|
|
214
|
+
return r;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
reactIs_production_min$1.ContextConsumer = h;
|
|
219
|
+
reactIs_production_min$1.ContextProvider = g;
|
|
220
|
+
reactIs_production_min$1.Element = b;
|
|
221
|
+
reactIs_production_min$1.ForwardRef = l;
|
|
222
|
+
reactIs_production_min$1.Fragment = d;
|
|
223
|
+
reactIs_production_min$1.Lazy = q;
|
|
224
|
+
reactIs_production_min$1.Memo = p;
|
|
225
|
+
reactIs_production_min$1.Portal = c;
|
|
226
|
+
reactIs_production_min$1.Profiler = f;
|
|
227
|
+
reactIs_production_min$1.StrictMode = e;
|
|
228
|
+
reactIs_production_min$1.Suspense = m;
|
|
229
|
+
reactIs_production_min$1.SuspenseList = n;
|
|
230
|
+
reactIs_production_min$1.isAsyncMode = function () {
|
|
231
|
+
return !1;
|
|
232
|
+
};
|
|
233
|
+
reactIs_production_min$1.isConcurrentMode = function () {
|
|
234
|
+
return !1;
|
|
235
|
+
};
|
|
236
|
+
reactIs_production_min$1.isContextConsumer = function (a) {
|
|
237
|
+
return v(a) === h;
|
|
238
|
+
};
|
|
239
|
+
reactIs_production_min$1.isContextProvider = function (a) {
|
|
240
|
+
return v(a) === g;
|
|
241
|
+
};
|
|
242
|
+
reactIs_production_min$1.isElement = function (a) {
|
|
243
|
+
return "object" === typeof a && null !== a && a.$$typeof === b;
|
|
244
|
+
};
|
|
245
|
+
reactIs_production_min$1.isForwardRef = function (a) {
|
|
246
|
+
return v(a) === l;
|
|
247
|
+
};
|
|
248
|
+
reactIs_production_min$1.isFragment = function (a) {
|
|
249
|
+
return v(a) === d;
|
|
250
|
+
};
|
|
251
|
+
reactIs_production_min$1.isLazy = function (a) {
|
|
252
|
+
return v(a) === q;
|
|
253
|
+
};
|
|
254
|
+
reactIs_production_min$1.isMemo = function (a) {
|
|
255
|
+
return v(a) === p;
|
|
256
|
+
};
|
|
257
|
+
reactIs_production_min$1.isPortal = function (a) {
|
|
258
|
+
return v(a) === c;
|
|
259
|
+
};
|
|
260
|
+
reactIs_production_min$1.isProfiler = function (a) {
|
|
261
|
+
return v(a) === f;
|
|
262
|
+
};
|
|
263
|
+
reactIs_production_min$1.isStrictMode = function (a) {
|
|
264
|
+
return v(a) === e;
|
|
265
|
+
};
|
|
266
|
+
reactIs_production_min$1.isSuspense = function (a) {
|
|
267
|
+
return v(a) === m;
|
|
268
|
+
};
|
|
269
|
+
reactIs_production_min$1.isSuspenseList = function (a) {
|
|
270
|
+
return v(a) === n;
|
|
271
|
+
};
|
|
272
|
+
reactIs_production_min$1.isValidElementType = function (a) {
|
|
273
|
+
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? !0 : !1;
|
|
274
|
+
};
|
|
275
|
+
reactIs_production_min$1.typeOf = v;
|
|
276
|
+
return reactIs_production_min$1;
|
|
277
|
+
}
|
|
278
|
+
var reactIs_development$1 = {};
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @license React
|
|
282
|
+
* react-is.development.js
|
|
283
|
+
*
|
|
284
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
285
|
+
*
|
|
286
|
+
* This source code is licensed under the MIT license found in the
|
|
287
|
+
* LICENSE file in the root directory of this source tree.
|
|
288
|
+
*/
|
|
289
|
+
|
|
290
|
+
var hasRequiredReactIs_development$1;
|
|
291
|
+
function requireReactIs_development$1() {
|
|
292
|
+
if (hasRequiredReactIs_development$1) return reactIs_development$1;
|
|
293
|
+
hasRequiredReactIs_development$1 = 1;
|
|
294
|
+
if (process.env.NODE_ENV !== "production") {
|
|
295
|
+
(function () {
|
|
296
|
+
// ATTENTION
|
|
297
|
+
// When adding new symbols to this file,
|
|
298
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
299
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
300
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
301
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
302
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
303
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
304
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
305
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
306
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
307
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
|
308
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
309
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
310
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
311
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
312
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
313
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
314
|
+
|
|
315
|
+
// -----------------------------------------------------------------------------
|
|
316
|
+
|
|
317
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
318
|
+
var enableCacheElement = false;
|
|
319
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
320
|
+
|
|
321
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
322
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
323
|
+
// issues in DEV builds.
|
|
324
|
+
|
|
325
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
326
|
+
|
|
327
|
+
var REACT_MODULE_REFERENCE;
|
|
328
|
+
{
|
|
329
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
330
|
+
}
|
|
331
|
+
function isValidElementType(type) {
|
|
332
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
333
|
+
return true;
|
|
334
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
335
|
+
|
|
336
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
337
|
+
return true;
|
|
338
|
+
}
|
|
339
|
+
if (typeof type === 'object' && type !== null) {
|
|
340
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
341
|
+
// This needs to include all possible module reference object
|
|
342
|
+
// types supported by any Flight configuration anywhere since
|
|
343
|
+
// we don't know which Flight build this will end up being used
|
|
344
|
+
// with.
|
|
345
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
function typeOf(object) {
|
|
352
|
+
if (typeof object === 'object' && object !== null) {
|
|
353
|
+
var $$typeof = object.$$typeof;
|
|
354
|
+
switch ($$typeof) {
|
|
355
|
+
case REACT_ELEMENT_TYPE:
|
|
356
|
+
var type = object.type;
|
|
357
|
+
switch (type) {
|
|
358
|
+
case REACT_FRAGMENT_TYPE:
|
|
359
|
+
case REACT_PROFILER_TYPE:
|
|
360
|
+
case REACT_STRICT_MODE_TYPE:
|
|
361
|
+
case REACT_SUSPENSE_TYPE:
|
|
362
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
363
|
+
return type;
|
|
364
|
+
default:
|
|
365
|
+
var $$typeofType = type && type.$$typeof;
|
|
366
|
+
switch ($$typeofType) {
|
|
367
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
368
|
+
case REACT_CONTEXT_TYPE:
|
|
369
|
+
case REACT_FORWARD_REF_TYPE:
|
|
370
|
+
case REACT_LAZY_TYPE:
|
|
371
|
+
case REACT_MEMO_TYPE:
|
|
372
|
+
case REACT_PROVIDER_TYPE:
|
|
373
|
+
return $$typeofType;
|
|
374
|
+
default:
|
|
375
|
+
return $$typeof;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
case REACT_PORTAL_TYPE:
|
|
379
|
+
return $$typeof;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return undefined;
|
|
383
|
+
}
|
|
384
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
385
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
386
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
387
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
388
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
389
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
390
|
+
var Memo = REACT_MEMO_TYPE;
|
|
391
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
392
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
393
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
394
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
395
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
396
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
397
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
|
398
|
+
|
|
399
|
+
function isAsyncMode(object) {
|
|
400
|
+
{
|
|
401
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
402
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
403
|
+
|
|
404
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
function isConcurrentMode(object) {
|
|
410
|
+
{
|
|
411
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
412
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
413
|
+
|
|
414
|
+
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
function isContextConsumer(object) {
|
|
420
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
421
|
+
}
|
|
422
|
+
function isContextProvider(object) {
|
|
423
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
424
|
+
}
|
|
425
|
+
function isElement(object) {
|
|
426
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
427
|
+
}
|
|
428
|
+
function isForwardRef(object) {
|
|
429
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
430
|
+
}
|
|
431
|
+
function isFragment(object) {
|
|
432
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
433
|
+
}
|
|
434
|
+
function isLazy(object) {
|
|
435
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
436
|
+
}
|
|
437
|
+
function isMemo(object) {
|
|
438
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
439
|
+
}
|
|
440
|
+
function isPortal(object) {
|
|
441
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
442
|
+
}
|
|
443
|
+
function isProfiler(object) {
|
|
444
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
445
|
+
}
|
|
446
|
+
function isStrictMode(object) {
|
|
447
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
448
|
+
}
|
|
449
|
+
function isSuspense(object) {
|
|
450
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
451
|
+
}
|
|
452
|
+
function isSuspenseList(object) {
|
|
453
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
454
|
+
}
|
|
455
|
+
reactIs_development$1.ContextConsumer = ContextConsumer;
|
|
456
|
+
reactIs_development$1.ContextProvider = ContextProvider;
|
|
457
|
+
reactIs_development$1.Element = Element;
|
|
458
|
+
reactIs_development$1.ForwardRef = ForwardRef;
|
|
459
|
+
reactIs_development$1.Fragment = Fragment;
|
|
460
|
+
reactIs_development$1.Lazy = Lazy;
|
|
461
|
+
reactIs_development$1.Memo = Memo;
|
|
462
|
+
reactIs_development$1.Portal = Portal;
|
|
463
|
+
reactIs_development$1.Profiler = Profiler;
|
|
464
|
+
reactIs_development$1.StrictMode = StrictMode;
|
|
465
|
+
reactIs_development$1.Suspense = Suspense;
|
|
466
|
+
reactIs_development$1.SuspenseList = SuspenseList;
|
|
467
|
+
reactIs_development$1.isAsyncMode = isAsyncMode;
|
|
468
|
+
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
|
469
|
+
reactIs_development$1.isContextConsumer = isContextConsumer;
|
|
470
|
+
reactIs_development$1.isContextProvider = isContextProvider;
|
|
471
|
+
reactIs_development$1.isElement = isElement;
|
|
472
|
+
reactIs_development$1.isForwardRef = isForwardRef;
|
|
473
|
+
reactIs_development$1.isFragment = isFragment;
|
|
474
|
+
reactIs_development$1.isLazy = isLazy;
|
|
475
|
+
reactIs_development$1.isMemo = isMemo;
|
|
476
|
+
reactIs_development$1.isPortal = isPortal;
|
|
477
|
+
reactIs_development$1.isProfiler = isProfiler;
|
|
478
|
+
reactIs_development$1.isStrictMode = isStrictMode;
|
|
479
|
+
reactIs_development$1.isSuspense = isSuspense;
|
|
480
|
+
reactIs_development$1.isSuspenseList = isSuspenseList;
|
|
481
|
+
reactIs_development$1.isValidElementType = isValidElementType;
|
|
482
|
+
reactIs_development$1.typeOf = typeOf;
|
|
483
|
+
})();
|
|
484
|
+
}
|
|
485
|
+
return reactIs_development$1;
|
|
486
|
+
}
|
|
487
|
+
if (process.env.NODE_ENV === 'production') {
|
|
488
|
+
reactIs$2.exports = requireReactIs_production_min$1();
|
|
489
|
+
} else {
|
|
490
|
+
reactIs$2.exports = requireReactIs_development$1();
|
|
491
|
+
}
|
|
492
|
+
var reactIsExports$1 = reactIs$2.exports;
|
|
493
|
+
function stylis_min(W) {
|
|
494
|
+
function M(d, c, e, h, a) {
|
|
495
|
+
for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {
|
|
496
|
+
g = e.charCodeAt(l);
|
|
497
|
+
l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);
|
|
498
|
+
if (0 === b + n + v + m) {
|
|
499
|
+
if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {
|
|
500
|
+
switch (g) {
|
|
501
|
+
case 32:
|
|
502
|
+
case 9:
|
|
503
|
+
case 59:
|
|
504
|
+
case 13:
|
|
505
|
+
case 10:
|
|
506
|
+
break;
|
|
507
|
+
default:
|
|
508
|
+
f += e.charAt(l);
|
|
509
|
+
}
|
|
510
|
+
g = 59;
|
|
511
|
+
}
|
|
512
|
+
switch (g) {
|
|
513
|
+
case 123:
|
|
514
|
+
f = f.trim();
|
|
515
|
+
q = f.charCodeAt(0);
|
|
516
|
+
k = 1;
|
|
517
|
+
for (t = ++l; l < B;) {
|
|
518
|
+
switch (g = e.charCodeAt(l)) {
|
|
519
|
+
case 123:
|
|
520
|
+
k++;
|
|
521
|
+
break;
|
|
522
|
+
case 125:
|
|
523
|
+
k--;
|
|
524
|
+
break;
|
|
525
|
+
case 47:
|
|
526
|
+
switch (g = e.charCodeAt(l + 1)) {
|
|
527
|
+
case 42:
|
|
528
|
+
case 47:
|
|
529
|
+
a: {
|
|
530
|
+
for (u = l + 1; u < J; ++u) {
|
|
531
|
+
switch (e.charCodeAt(u)) {
|
|
532
|
+
case 47:
|
|
533
|
+
if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {
|
|
534
|
+
l = u + 1;
|
|
535
|
+
break a;
|
|
536
|
+
}
|
|
537
|
+
break;
|
|
538
|
+
case 10:
|
|
539
|
+
if (47 === g) {
|
|
540
|
+
l = u + 1;
|
|
541
|
+
break a;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
l = u;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
break;
|
|
549
|
+
case 91:
|
|
550
|
+
g++;
|
|
551
|
+
case 40:
|
|
552
|
+
g++;
|
|
553
|
+
case 34:
|
|
554
|
+
case 39:
|
|
555
|
+
for (; l++ < J && e.charCodeAt(l) !== g;) {}
|
|
556
|
+
}
|
|
557
|
+
if (0 === k) break;
|
|
558
|
+
l++;
|
|
559
|
+
}
|
|
560
|
+
k = e.substring(t, l);
|
|
561
|
+
0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));
|
|
562
|
+
switch (q) {
|
|
563
|
+
case 64:
|
|
564
|
+
0 < r && (f = f.replace(N, ''));
|
|
565
|
+
g = f.charCodeAt(1);
|
|
566
|
+
switch (g) {
|
|
567
|
+
case 100:
|
|
568
|
+
case 109:
|
|
569
|
+
case 115:
|
|
570
|
+
case 45:
|
|
571
|
+
r = c;
|
|
572
|
+
break;
|
|
573
|
+
default:
|
|
574
|
+
r = O;
|
|
575
|
+
}
|
|
576
|
+
k = M(c, r, k, g, a + 1);
|
|
577
|
+
t = k.length;
|
|
578
|
+
0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));
|
|
579
|
+
if (0 < t) switch (g) {
|
|
580
|
+
case 115:
|
|
581
|
+
f = f.replace(da, ea);
|
|
582
|
+
case 100:
|
|
583
|
+
case 109:
|
|
584
|
+
case 45:
|
|
585
|
+
k = f + '{' + k + '}';
|
|
586
|
+
break;
|
|
587
|
+
case 107:
|
|
588
|
+
f = f.replace(fa, '$1 $2');
|
|
589
|
+
k = f + '{' + k + '}';
|
|
590
|
+
k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;
|
|
591
|
+
break;
|
|
592
|
+
default:
|
|
593
|
+
k = f + k, 112 === h && (k = (p += k, ''));
|
|
594
|
+
} else k = '';
|
|
595
|
+
break;
|
|
596
|
+
default:
|
|
597
|
+
k = M(c, X(c, f, I), k, h, a + 1);
|
|
598
|
+
}
|
|
599
|
+
F += k;
|
|
600
|
+
k = I = r = u = q = 0;
|
|
601
|
+
f = '';
|
|
602
|
+
g = e.charCodeAt(++l);
|
|
603
|
+
break;
|
|
604
|
+
case 125:
|
|
605
|
+
case 59:
|
|
606
|
+
f = (0 < r ? f.replace(N, '') : f).trim();
|
|
607
|
+
if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {
|
|
608
|
+
case 0:
|
|
609
|
+
break;
|
|
610
|
+
case 64:
|
|
611
|
+
if (105 === g || 99 === g) {
|
|
612
|
+
G += f + e.charAt(l);
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
default:
|
|
616
|
+
58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));
|
|
617
|
+
}
|
|
618
|
+
I = r = u = q = 0;
|
|
619
|
+
f = '';
|
|
620
|
+
g = e.charCodeAt(++l);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
switch (g) {
|
|
624
|
+
case 13:
|
|
625
|
+
case 10:
|
|
626
|
+
47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00');
|
|
627
|
+
0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);
|
|
628
|
+
z = 1;
|
|
629
|
+
D++;
|
|
630
|
+
break;
|
|
631
|
+
case 59:
|
|
632
|
+
case 125:
|
|
633
|
+
if (0 === b + n + v + m) {
|
|
634
|
+
z++;
|
|
635
|
+
break;
|
|
636
|
+
}
|
|
637
|
+
default:
|
|
638
|
+
z++;
|
|
639
|
+
y = e.charAt(l);
|
|
640
|
+
switch (g) {
|
|
641
|
+
case 9:
|
|
642
|
+
case 32:
|
|
643
|
+
if (0 === n + m + b) switch (x) {
|
|
644
|
+
case 44:
|
|
645
|
+
case 58:
|
|
646
|
+
case 9:
|
|
647
|
+
case 32:
|
|
648
|
+
y = '';
|
|
649
|
+
break;
|
|
650
|
+
default:
|
|
651
|
+
32 !== g && (y = ' ');
|
|
652
|
+
}
|
|
653
|
+
break;
|
|
654
|
+
case 0:
|
|
655
|
+
y = '\\0';
|
|
656
|
+
break;
|
|
657
|
+
case 12:
|
|
658
|
+
y = '\\f';
|
|
659
|
+
break;
|
|
660
|
+
case 11:
|
|
661
|
+
y = '\\v';
|
|
662
|
+
break;
|
|
663
|
+
case 38:
|
|
664
|
+
0 === n + b + m && (r = I = 1, y = '\f' + y);
|
|
665
|
+
break;
|
|
666
|
+
case 108:
|
|
667
|
+
if (0 === n + b + m + E && 0 < u) switch (l - u) {
|
|
668
|
+
case 2:
|
|
669
|
+
112 === x && 58 === e.charCodeAt(l - 3) && (E = x);
|
|
670
|
+
case 8:
|
|
671
|
+
111 === K && (E = K);
|
|
672
|
+
}
|
|
673
|
+
break;
|
|
674
|
+
case 58:
|
|
675
|
+
0 === n + b + m && (u = l);
|
|
676
|
+
break;
|
|
677
|
+
case 44:
|
|
678
|
+
0 === b + v + n + m && (r = 1, y += '\r');
|
|
679
|
+
break;
|
|
680
|
+
case 34:
|
|
681
|
+
case 39:
|
|
682
|
+
0 === b && (n = n === g ? 0 : 0 === n ? g : n);
|
|
683
|
+
break;
|
|
684
|
+
case 91:
|
|
685
|
+
0 === n + b + v && m++;
|
|
686
|
+
break;
|
|
687
|
+
case 93:
|
|
688
|
+
0 === n + b + v && m--;
|
|
689
|
+
break;
|
|
690
|
+
case 41:
|
|
691
|
+
0 === n + b + m && v--;
|
|
692
|
+
break;
|
|
693
|
+
case 40:
|
|
694
|
+
if (0 === n + b + m) {
|
|
695
|
+
if (0 === q) switch (2 * x + 3 * K) {
|
|
696
|
+
case 533:
|
|
697
|
+
break;
|
|
698
|
+
default:
|
|
699
|
+
q = 1;
|
|
700
|
+
}
|
|
701
|
+
v++;
|
|
702
|
+
}
|
|
703
|
+
break;
|
|
704
|
+
case 64:
|
|
705
|
+
0 === b + v + n + m + u + k && (k = 1);
|
|
706
|
+
break;
|
|
707
|
+
case 42:
|
|
708
|
+
case 47:
|
|
709
|
+
if (!(0 < n + m + v)) switch (b) {
|
|
710
|
+
case 0:
|
|
711
|
+
switch (2 * g + 3 * e.charCodeAt(l + 1)) {
|
|
712
|
+
case 235:
|
|
713
|
+
b = 47;
|
|
714
|
+
break;
|
|
715
|
+
case 220:
|
|
716
|
+
t = l, b = 42;
|
|
717
|
+
}
|
|
718
|
+
break;
|
|
719
|
+
case 42:
|
|
720
|
+
47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
0 === b && (f += y);
|
|
724
|
+
}
|
|
725
|
+
K = x;
|
|
726
|
+
x = g;
|
|
727
|
+
l++;
|
|
728
|
+
}
|
|
729
|
+
t = p.length;
|
|
730
|
+
if (0 < t) {
|
|
731
|
+
r = c;
|
|
732
|
+
if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;
|
|
733
|
+
p = r.join(',') + '{' + p + '}';
|
|
734
|
+
if (0 !== w * E) {
|
|
735
|
+
2 !== w || L(p, 2) || (E = 0);
|
|
736
|
+
switch (E) {
|
|
737
|
+
case 111:
|
|
738
|
+
p = p.replace(ha, ':-moz-$1') + p;
|
|
739
|
+
break;
|
|
740
|
+
case 112:
|
|
741
|
+
p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;
|
|
742
|
+
}
|
|
743
|
+
E = 0;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
return G + p + F;
|
|
747
|
+
}
|
|
748
|
+
function X(d, c, e) {
|
|
749
|
+
var h = c.trim().split(ia);
|
|
750
|
+
c = h;
|
|
751
|
+
var a = h.length,
|
|
752
|
+
m = d.length;
|
|
753
|
+
switch (m) {
|
|
754
|
+
case 0:
|
|
755
|
+
case 1:
|
|
756
|
+
var b = 0;
|
|
757
|
+
for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {
|
|
758
|
+
c[b] = Z(d, c[b], e).trim();
|
|
759
|
+
}
|
|
760
|
+
break;
|
|
761
|
+
default:
|
|
762
|
+
var v = b = 0;
|
|
763
|
+
for (c = []; b < a; ++b) {
|
|
764
|
+
for (var n = 0; n < m; ++n) {
|
|
765
|
+
c[v++] = Z(d[n] + ' ', h[b], e).trim();
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
return c;
|
|
770
|
+
}
|
|
771
|
+
function Z(d, c, e) {
|
|
772
|
+
var h = c.charCodeAt(0);
|
|
773
|
+
33 > h && (h = (c = c.trim()).charCodeAt(0));
|
|
774
|
+
switch (h) {
|
|
775
|
+
case 38:
|
|
776
|
+
return c.replace(F, '$1' + d.trim());
|
|
777
|
+
case 58:
|
|
778
|
+
return d.trim() + c.replace(F, '$1' + d.trim());
|
|
779
|
+
default:
|
|
780
|
+
if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());
|
|
781
|
+
}
|
|
782
|
+
return d + c;
|
|
783
|
+
}
|
|
784
|
+
function P(d, c, e, h) {
|
|
785
|
+
var a = d + ';',
|
|
786
|
+
m = 2 * c + 3 * e + 4 * h;
|
|
787
|
+
if (944 === m) {
|
|
788
|
+
d = a.indexOf(':', 9) + 1;
|
|
789
|
+
var b = a.substring(d, a.length - 1).trim();
|
|
790
|
+
b = a.substring(0, d).trim() + b + ';';
|
|
791
|
+
return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;
|
|
792
|
+
}
|
|
793
|
+
if (0 === w || 2 === w && !L(a, 1)) return a;
|
|
794
|
+
switch (m) {
|
|
795
|
+
case 1015:
|
|
796
|
+
return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;
|
|
797
|
+
case 951:
|
|
798
|
+
return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;
|
|
799
|
+
case 963:
|
|
800
|
+
return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;
|
|
801
|
+
case 1009:
|
|
802
|
+
if (100 !== a.charCodeAt(4)) break;
|
|
803
|
+
case 969:
|
|
804
|
+
case 942:
|
|
805
|
+
return '-webkit-' + a + a;
|
|
806
|
+
case 978:
|
|
807
|
+
return '-webkit-' + a + '-moz-' + a + a;
|
|
808
|
+
case 1019:
|
|
809
|
+
case 983:
|
|
810
|
+
return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;
|
|
811
|
+
case 883:
|
|
812
|
+
if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;
|
|
813
|
+
if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;
|
|
814
|
+
break;
|
|
815
|
+
case 932:
|
|
816
|
+
if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {
|
|
817
|
+
case 103:
|
|
818
|
+
return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;
|
|
819
|
+
case 115:
|
|
820
|
+
return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;
|
|
821
|
+
case 98:
|
|
822
|
+
return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;
|
|
823
|
+
}
|
|
824
|
+
return '-webkit-' + a + '-ms-' + a + a;
|
|
825
|
+
case 964:
|
|
826
|
+
return '-webkit-' + a + '-ms-flex-' + a + a;
|
|
827
|
+
case 1023:
|
|
828
|
+
if (99 !== a.charCodeAt(8)) break;
|
|
829
|
+
b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');
|
|
830
|
+
return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;
|
|
831
|
+
case 1005:
|
|
832
|
+
return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;
|
|
833
|
+
case 1e3:
|
|
834
|
+
b = a.substring(13).trim();
|
|
835
|
+
c = b.indexOf('-') + 1;
|
|
836
|
+
switch (b.charCodeAt(0) + b.charCodeAt(c)) {
|
|
837
|
+
case 226:
|
|
838
|
+
b = a.replace(G, 'tb');
|
|
839
|
+
break;
|
|
840
|
+
case 232:
|
|
841
|
+
b = a.replace(G, 'tb-rl');
|
|
842
|
+
break;
|
|
843
|
+
case 220:
|
|
844
|
+
b = a.replace(G, 'lr');
|
|
845
|
+
break;
|
|
846
|
+
default:
|
|
847
|
+
return a;
|
|
848
|
+
}
|
|
849
|
+
return '-webkit-' + a + '-ms-' + b + a;
|
|
850
|
+
case 1017:
|
|
851
|
+
if (-1 === a.indexOf('sticky', 9)) break;
|
|
852
|
+
case 975:
|
|
853
|
+
c = (a = d).length - 10;
|
|
854
|
+
b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();
|
|
855
|
+
switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {
|
|
856
|
+
case 203:
|
|
857
|
+
if (111 > b.charCodeAt(8)) break;
|
|
858
|
+
case 115:
|
|
859
|
+
a = a.replace(b, '-webkit-' + b) + ';' + a;
|
|
860
|
+
break;
|
|
861
|
+
case 207:
|
|
862
|
+
case 102:
|
|
863
|
+
a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;
|
|
864
|
+
}
|
|
865
|
+
return a + ';';
|
|
866
|
+
case 938:
|
|
867
|
+
if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {
|
|
868
|
+
case 105:
|
|
869
|
+
return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;
|
|
870
|
+
case 115:
|
|
871
|
+
return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;
|
|
872
|
+
default:
|
|
873
|
+
return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;
|
|
874
|
+
}
|
|
875
|
+
break;
|
|
876
|
+
case 973:
|
|
877
|
+
case 989:
|
|
878
|
+
if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;
|
|
879
|
+
case 931:
|
|
880
|
+
case 953:
|
|
881
|
+
if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;
|
|
882
|
+
break;
|
|
883
|
+
case 962:
|
|
884
|
+
if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;
|
|
885
|
+
}
|
|
886
|
+
return a;
|
|
887
|
+
}
|
|
888
|
+
function L(d, c) {
|
|
889
|
+
var e = d.indexOf(1 === c ? ':' : '{'),
|
|
890
|
+
h = d.substring(0, 3 !== c ? e : 10);
|
|
891
|
+
e = d.substring(e + 1, d.length - 1);
|
|
892
|
+
return R(2 !== c ? h : h.replace(na, '$1'), e, c);
|
|
893
|
+
}
|
|
894
|
+
function ea(d, c) {
|
|
895
|
+
var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));
|
|
896
|
+
return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';
|
|
897
|
+
}
|
|
898
|
+
function H(d, c, e, h, a, m, b, v, n, q) {
|
|
899
|
+
for (var g = 0, x = c, w; g < A; ++g) {
|
|
900
|
+
switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {
|
|
901
|
+
case void 0:
|
|
902
|
+
case !1:
|
|
903
|
+
case !0:
|
|
904
|
+
case null:
|
|
905
|
+
break;
|
|
906
|
+
default:
|
|
907
|
+
x = w;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
if (x !== c) return x;
|
|
911
|
+
}
|
|
912
|
+
function T(d) {
|
|
913
|
+
switch (d) {
|
|
914
|
+
case void 0:
|
|
915
|
+
case null:
|
|
916
|
+
A = S.length = 0;
|
|
917
|
+
break;
|
|
918
|
+
default:
|
|
919
|
+
if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {
|
|
920
|
+
T(d[c]);
|
|
921
|
+
} else Y = !!d | 0;
|
|
922
|
+
}
|
|
923
|
+
return T;
|
|
924
|
+
}
|
|
925
|
+
function U(d) {
|
|
926
|
+
d = d.prefix;
|
|
927
|
+
void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);
|
|
928
|
+
return U;
|
|
929
|
+
}
|
|
930
|
+
function B(d, c) {
|
|
931
|
+
var e = d;
|
|
932
|
+
33 > e.charCodeAt(0) && (e = e.trim());
|
|
933
|
+
V = e;
|
|
934
|
+
e = [V];
|
|
935
|
+
if (0 < A) {
|
|
936
|
+
var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);
|
|
937
|
+
void 0 !== h && 'string' === typeof h && (c = h);
|
|
938
|
+
}
|
|
939
|
+
var a = M(O, e, c, 0, 0);
|
|
940
|
+
0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));
|
|
941
|
+
V = '';
|
|
942
|
+
E = 0;
|
|
943
|
+
z = D = 1;
|
|
944
|
+
return a;
|
|
945
|
+
}
|
|
946
|
+
var ca = /^\0+/g,
|
|
947
|
+
N = /[\0\r\f]/g,
|
|
948
|
+
aa = /: */g,
|
|
949
|
+
ka = /zoo|gra/,
|
|
950
|
+
ma = /([,: ])(transform)/g,
|
|
951
|
+
ia = /,\r+?/g,
|
|
952
|
+
F = /([\t\r\n ])*\f?&/g,
|
|
953
|
+
fa = /@(k\w+)\s*(\S*)\s*/,
|
|
954
|
+
Q = /::(place)/g,
|
|
955
|
+
ha = /:(read-only)/g,
|
|
956
|
+
G = /[svh]\w+-[tblr]{2}/,
|
|
957
|
+
da = /\(\s*(.*)\s*\)/g,
|
|
958
|
+
oa = /([\s\S]*?);/g,
|
|
959
|
+
ba = /-self|flex-/g,
|
|
960
|
+
na = /[^]*?(:[rp][el]a[\w-]+)[^]*/,
|
|
961
|
+
la = /stretch|:\s*\w+\-(?:conte|avail)/,
|
|
962
|
+
ja = /([^-])(image-set\()/,
|
|
963
|
+
z = 1,
|
|
964
|
+
D = 1,
|
|
965
|
+
E = 0,
|
|
966
|
+
w = 1,
|
|
967
|
+
O = [],
|
|
968
|
+
S = [],
|
|
969
|
+
A = 0,
|
|
970
|
+
R = null,
|
|
971
|
+
Y = 0,
|
|
972
|
+
V = '';
|
|
973
|
+
B.use = T;
|
|
974
|
+
B.set = U;
|
|
975
|
+
void 0 !== W && U(W);
|
|
976
|
+
return B;
|
|
977
|
+
}
|
|
978
|
+
var unitlessKeys = {
|
|
979
|
+
animationIterationCount: 1,
|
|
980
|
+
borderImageOutset: 1,
|
|
981
|
+
borderImageSlice: 1,
|
|
982
|
+
borderImageWidth: 1,
|
|
983
|
+
boxFlex: 1,
|
|
984
|
+
boxFlexGroup: 1,
|
|
985
|
+
boxOrdinalGroup: 1,
|
|
986
|
+
columnCount: 1,
|
|
987
|
+
columns: 1,
|
|
988
|
+
flex: 1,
|
|
989
|
+
flexGrow: 1,
|
|
990
|
+
flexPositive: 1,
|
|
991
|
+
flexShrink: 1,
|
|
992
|
+
flexNegative: 1,
|
|
993
|
+
flexOrder: 1,
|
|
994
|
+
gridRow: 1,
|
|
995
|
+
gridRowEnd: 1,
|
|
996
|
+
gridRowSpan: 1,
|
|
997
|
+
gridRowStart: 1,
|
|
998
|
+
gridColumn: 1,
|
|
999
|
+
gridColumnEnd: 1,
|
|
1000
|
+
gridColumnSpan: 1,
|
|
1001
|
+
gridColumnStart: 1,
|
|
1002
|
+
msGridRow: 1,
|
|
1003
|
+
msGridRowSpan: 1,
|
|
1004
|
+
msGridColumn: 1,
|
|
1005
|
+
msGridColumnSpan: 1,
|
|
1006
|
+
fontWeight: 1,
|
|
1007
|
+
lineHeight: 1,
|
|
1008
|
+
opacity: 1,
|
|
1009
|
+
order: 1,
|
|
1010
|
+
orphans: 1,
|
|
1011
|
+
tabSize: 1,
|
|
1012
|
+
widows: 1,
|
|
1013
|
+
zIndex: 1,
|
|
1014
|
+
zoom: 1,
|
|
1015
|
+
WebkitLineClamp: 1,
|
|
1016
|
+
// SVG-related properties
|
|
1017
|
+
fillOpacity: 1,
|
|
1018
|
+
floodOpacity: 1,
|
|
1019
|
+
stopOpacity: 1,
|
|
1020
|
+
strokeDasharray: 1,
|
|
1021
|
+
strokeDashoffset: 1,
|
|
1022
|
+
strokeMiterlimit: 1,
|
|
1023
|
+
strokeOpacity: 1,
|
|
1024
|
+
strokeWidth: 1
|
|
1025
|
+
};
|
|
1026
|
+
function memoize(fn) {
|
|
1027
|
+
var cache = Object.create(null);
|
|
1028
|
+
return function (arg) {
|
|
1029
|
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
1030
|
+
return cache[arg];
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1033
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
|
1034
|
+
|
|
1035
|
+
var isPropValid = /* #__PURE__ */memoize(function (prop) {
|
|
1036
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
|
1037
|
+
/* o */ && prop.charCodeAt(1) === 110
|
|
1038
|
+
/* n */ && prop.charCodeAt(2) < 91;
|
|
1039
|
+
}
|
|
1040
|
+
/* Z+1 */);
|
|
1041
|
+
|
|
1042
|
+
var reactIs$1 = {
|
|
1043
|
+
exports: {}
|
|
1044
|
+
};
|
|
1045
|
+
var reactIs_production_min = {};
|
|
1046
|
+
|
|
1047
|
+
/** @license React v16.13.1
|
|
1048
|
+
* react-is.production.min.js
|
|
1049
|
+
*
|
|
1050
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1051
|
+
*
|
|
1052
|
+
* This source code is licensed under the MIT license found in the
|
|
1053
|
+
* LICENSE file in the root directory of this source tree.
|
|
1054
|
+
*/
|
|
1055
|
+
|
|
1056
|
+
var hasRequiredReactIs_production_min;
|
|
1057
|
+
function requireReactIs_production_min() {
|
|
1058
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
1059
|
+
hasRequiredReactIs_production_min = 1;
|
|
1060
|
+
var b = "function" === typeof Symbol && Symbol.for,
|
|
1061
|
+
c = b ? Symbol.for("react.element") : 60103,
|
|
1062
|
+
d = b ? Symbol.for("react.portal") : 60106,
|
|
1063
|
+
e = b ? Symbol.for("react.fragment") : 60107,
|
|
1064
|
+
f = b ? Symbol.for("react.strict_mode") : 60108,
|
|
1065
|
+
g = b ? Symbol.for("react.profiler") : 60114,
|
|
1066
|
+
h = b ? Symbol.for("react.provider") : 60109,
|
|
1067
|
+
k = b ? Symbol.for("react.context") : 60110,
|
|
1068
|
+
l = b ? Symbol.for("react.async_mode") : 60111,
|
|
1069
|
+
m = b ? Symbol.for("react.concurrent_mode") : 60111,
|
|
1070
|
+
n = b ? Symbol.for("react.forward_ref") : 60112,
|
|
1071
|
+
p = b ? Symbol.for("react.suspense") : 60113,
|
|
1072
|
+
q = b ? Symbol.for("react.suspense_list") : 60120,
|
|
1073
|
+
r = b ? Symbol.for("react.memo") : 60115,
|
|
1074
|
+
t = b ? Symbol.for("react.lazy") : 60116,
|
|
1075
|
+
v = b ? Symbol.for("react.block") : 60121,
|
|
1076
|
+
w = b ? Symbol.for("react.fundamental") : 60117,
|
|
1077
|
+
x = b ? Symbol.for("react.responder") : 60118,
|
|
1078
|
+
y = b ? Symbol.for("react.scope") : 60119;
|
|
1079
|
+
function z(a) {
|
|
1080
|
+
if ("object" === typeof a && null !== a) {
|
|
1081
|
+
var u = a.$$typeof;
|
|
1082
|
+
switch (u) {
|
|
1083
|
+
case c:
|
|
1084
|
+
switch (a = a.type, a) {
|
|
1085
|
+
case l:
|
|
1086
|
+
case m:
|
|
1087
|
+
case e:
|
|
1088
|
+
case g:
|
|
1089
|
+
case f:
|
|
1090
|
+
case p:
|
|
1091
|
+
return a;
|
|
1092
|
+
default:
|
|
1093
|
+
switch (a = a && a.$$typeof, a) {
|
|
1094
|
+
case k:
|
|
1095
|
+
case n:
|
|
1096
|
+
case t:
|
|
1097
|
+
case r:
|
|
1098
|
+
case h:
|
|
1099
|
+
return a;
|
|
1100
|
+
default:
|
|
1101
|
+
return u;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
case d:
|
|
1105
|
+
return u;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
function A(a) {
|
|
1110
|
+
return z(a) === m;
|
|
1111
|
+
}
|
|
1112
|
+
reactIs_production_min.AsyncMode = l;
|
|
1113
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
1114
|
+
reactIs_production_min.ContextConsumer = k;
|
|
1115
|
+
reactIs_production_min.ContextProvider = h;
|
|
1116
|
+
reactIs_production_min.Element = c;
|
|
1117
|
+
reactIs_production_min.ForwardRef = n;
|
|
1118
|
+
reactIs_production_min.Fragment = e;
|
|
1119
|
+
reactIs_production_min.Lazy = t;
|
|
1120
|
+
reactIs_production_min.Memo = r;
|
|
1121
|
+
reactIs_production_min.Portal = d;
|
|
1122
|
+
reactIs_production_min.Profiler = g;
|
|
1123
|
+
reactIs_production_min.StrictMode = f;
|
|
1124
|
+
reactIs_production_min.Suspense = p;
|
|
1125
|
+
reactIs_production_min.isAsyncMode = function (a) {
|
|
1126
|
+
return A(a) || z(a) === l;
|
|
1127
|
+
};
|
|
1128
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
1129
|
+
reactIs_production_min.isContextConsumer = function (a) {
|
|
1130
|
+
return z(a) === k;
|
|
1131
|
+
};
|
|
1132
|
+
reactIs_production_min.isContextProvider = function (a) {
|
|
1133
|
+
return z(a) === h;
|
|
1134
|
+
};
|
|
1135
|
+
reactIs_production_min.isElement = function (a) {
|
|
1136
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
1137
|
+
};
|
|
1138
|
+
reactIs_production_min.isForwardRef = function (a) {
|
|
1139
|
+
return z(a) === n;
|
|
1140
|
+
};
|
|
1141
|
+
reactIs_production_min.isFragment = function (a) {
|
|
1142
|
+
return z(a) === e;
|
|
1143
|
+
};
|
|
1144
|
+
reactIs_production_min.isLazy = function (a) {
|
|
1145
|
+
return z(a) === t;
|
|
1146
|
+
};
|
|
1147
|
+
reactIs_production_min.isMemo = function (a) {
|
|
1148
|
+
return z(a) === r;
|
|
1149
|
+
};
|
|
1150
|
+
reactIs_production_min.isPortal = function (a) {
|
|
1151
|
+
return z(a) === d;
|
|
1152
|
+
};
|
|
1153
|
+
reactIs_production_min.isProfiler = function (a) {
|
|
1154
|
+
return z(a) === g;
|
|
1155
|
+
};
|
|
1156
|
+
reactIs_production_min.isStrictMode = function (a) {
|
|
1157
|
+
return z(a) === f;
|
|
1158
|
+
};
|
|
1159
|
+
reactIs_production_min.isSuspense = function (a) {
|
|
1160
|
+
return z(a) === p;
|
|
1161
|
+
};
|
|
1162
|
+
reactIs_production_min.isValidElementType = function (a) {
|
|
1163
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
1164
|
+
};
|
|
1165
|
+
reactIs_production_min.typeOf = z;
|
|
1166
|
+
return reactIs_production_min;
|
|
1167
|
+
}
|
|
1168
|
+
var reactIs_development = {};
|
|
1169
|
+
|
|
1170
|
+
/** @license React v16.13.1
|
|
1171
|
+
* react-is.development.js
|
|
1172
|
+
*
|
|
1173
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1174
|
+
*
|
|
1175
|
+
* This source code is licensed under the MIT license found in the
|
|
1176
|
+
* LICENSE file in the root directory of this source tree.
|
|
1177
|
+
*/
|
|
1178
|
+
|
|
1179
|
+
var hasRequiredReactIs_development;
|
|
1180
|
+
function requireReactIs_development() {
|
|
1181
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
|
1182
|
+
hasRequiredReactIs_development = 1;
|
|
1183
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1184
|
+
(function () {
|
|
1185
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
1186
|
+
// nor polyfill, then a plain number is used for performance.
|
|
1187
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
1188
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
1189
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
1190
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
1191
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
1192
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
1193
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
1194
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
1195
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
1196
|
+
|
|
1197
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
1198
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
1199
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
1200
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
1201
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
1202
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
1203
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
1204
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
1205
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
1206
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
1207
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
1208
|
+
function isValidElementType(type) {
|
|
1209
|
+
return typeof type === 'string' || typeof type === 'function' ||
|
|
1210
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1211
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1212
|
+
}
|
|
1213
|
+
function typeOf(object) {
|
|
1214
|
+
if (typeof object === 'object' && object !== null) {
|
|
1215
|
+
var $$typeof = object.$$typeof;
|
|
1216
|
+
switch ($$typeof) {
|
|
1217
|
+
case REACT_ELEMENT_TYPE:
|
|
1218
|
+
var type = object.type;
|
|
1219
|
+
switch (type) {
|
|
1220
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
1221
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
1222
|
+
case REACT_FRAGMENT_TYPE:
|
|
1223
|
+
case REACT_PROFILER_TYPE:
|
|
1224
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1225
|
+
case REACT_SUSPENSE_TYPE:
|
|
1226
|
+
return type;
|
|
1227
|
+
default:
|
|
1228
|
+
var $$typeofType = type && type.$$typeof;
|
|
1229
|
+
switch ($$typeofType) {
|
|
1230
|
+
case REACT_CONTEXT_TYPE:
|
|
1231
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1232
|
+
case REACT_LAZY_TYPE:
|
|
1233
|
+
case REACT_MEMO_TYPE:
|
|
1234
|
+
case REACT_PROVIDER_TYPE:
|
|
1235
|
+
return $$typeofType;
|
|
1236
|
+
default:
|
|
1237
|
+
return $$typeof;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
case REACT_PORTAL_TYPE:
|
|
1241
|
+
return $$typeof;
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
return undefined;
|
|
1245
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
1246
|
+
|
|
1247
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
1248
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
1249
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
1250
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
1251
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
1252
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1253
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
1254
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
1255
|
+
var Memo = REACT_MEMO_TYPE;
|
|
1256
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
1257
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
1258
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1259
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
1260
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
1261
|
+
|
|
1262
|
+
function isAsyncMode(object) {
|
|
1263
|
+
{
|
|
1264
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
1265
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
1266
|
+
|
|
1267
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
1271
|
+
}
|
|
1272
|
+
function isConcurrentMode(object) {
|
|
1273
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
1274
|
+
}
|
|
1275
|
+
function isContextConsumer(object) {
|
|
1276
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1277
|
+
}
|
|
1278
|
+
function isContextProvider(object) {
|
|
1279
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
1280
|
+
}
|
|
1281
|
+
function isElement(object) {
|
|
1282
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1283
|
+
}
|
|
1284
|
+
function isForwardRef(object) {
|
|
1285
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1286
|
+
}
|
|
1287
|
+
function isFragment(object) {
|
|
1288
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1289
|
+
}
|
|
1290
|
+
function isLazy(object) {
|
|
1291
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1292
|
+
}
|
|
1293
|
+
function isMemo(object) {
|
|
1294
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1295
|
+
}
|
|
1296
|
+
function isPortal(object) {
|
|
1297
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1298
|
+
}
|
|
1299
|
+
function isProfiler(object) {
|
|
1300
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1301
|
+
}
|
|
1302
|
+
function isStrictMode(object) {
|
|
1303
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1304
|
+
}
|
|
1305
|
+
function isSuspense(object) {
|
|
1306
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1307
|
+
}
|
|
1308
|
+
reactIs_development.AsyncMode = AsyncMode;
|
|
1309
|
+
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
1310
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
1311
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
1312
|
+
reactIs_development.Element = Element;
|
|
1313
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
1314
|
+
reactIs_development.Fragment = Fragment;
|
|
1315
|
+
reactIs_development.Lazy = Lazy;
|
|
1316
|
+
reactIs_development.Memo = Memo;
|
|
1317
|
+
reactIs_development.Portal = Portal;
|
|
1318
|
+
reactIs_development.Profiler = Profiler;
|
|
1319
|
+
reactIs_development.StrictMode = StrictMode;
|
|
1320
|
+
reactIs_development.Suspense = Suspense;
|
|
1321
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
1322
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
1323
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
1324
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
1325
|
+
reactIs_development.isElement = isElement;
|
|
1326
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
1327
|
+
reactIs_development.isFragment = isFragment;
|
|
1328
|
+
reactIs_development.isLazy = isLazy;
|
|
1329
|
+
reactIs_development.isMemo = isMemo;
|
|
1330
|
+
reactIs_development.isPortal = isPortal;
|
|
1331
|
+
reactIs_development.isProfiler = isProfiler;
|
|
1332
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
1333
|
+
reactIs_development.isSuspense = isSuspense;
|
|
1334
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
1335
|
+
reactIs_development.typeOf = typeOf;
|
|
1336
|
+
})();
|
|
1337
|
+
}
|
|
1338
|
+
return reactIs_development;
|
|
1339
|
+
}
|
|
1340
|
+
if (process.env.NODE_ENV === 'production') {
|
|
1341
|
+
reactIs$1.exports = requireReactIs_production_min();
|
|
1342
|
+
} else {
|
|
1343
|
+
reactIs$1.exports = requireReactIs_development();
|
|
1344
|
+
}
|
|
1345
|
+
var reactIsExports = reactIs$1.exports;
|
|
1346
|
+
var reactIs = reactIsExports;
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Copyright 2015, Yahoo! Inc.
|
|
1350
|
+
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
|
1351
|
+
*/
|
|
1352
|
+
var REACT_STATICS = {
|
|
1353
|
+
childContextTypes: true,
|
|
1354
|
+
contextType: true,
|
|
1355
|
+
contextTypes: true,
|
|
1356
|
+
defaultProps: true,
|
|
1357
|
+
displayName: true,
|
|
1358
|
+
getDefaultProps: true,
|
|
1359
|
+
getDerivedStateFromError: true,
|
|
1360
|
+
getDerivedStateFromProps: true,
|
|
1361
|
+
mixins: true,
|
|
1362
|
+
propTypes: true,
|
|
1363
|
+
type: true
|
|
1364
|
+
};
|
|
1365
|
+
var KNOWN_STATICS = {
|
|
1366
|
+
name: true,
|
|
1367
|
+
length: true,
|
|
1368
|
+
prototype: true,
|
|
1369
|
+
caller: true,
|
|
1370
|
+
callee: true,
|
|
1371
|
+
arguments: true,
|
|
1372
|
+
arity: true
|
|
1373
|
+
};
|
|
1374
|
+
var FORWARD_REF_STATICS = {
|
|
1375
|
+
'$$typeof': true,
|
|
1376
|
+
render: true,
|
|
1377
|
+
defaultProps: true,
|
|
1378
|
+
displayName: true,
|
|
1379
|
+
propTypes: true
|
|
1380
|
+
};
|
|
1381
|
+
var MEMO_STATICS = {
|
|
1382
|
+
'$$typeof': true,
|
|
1383
|
+
compare: true,
|
|
1384
|
+
defaultProps: true,
|
|
1385
|
+
displayName: true,
|
|
1386
|
+
propTypes: true,
|
|
1387
|
+
type: true
|
|
1388
|
+
};
|
|
1389
|
+
var TYPE_STATICS = {};
|
|
1390
|
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
1391
|
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
1392
|
+
function getStatics(component) {
|
|
1393
|
+
// React v16.11 and below
|
|
1394
|
+
if (reactIs.isMemo(component)) {
|
|
1395
|
+
return MEMO_STATICS;
|
|
1396
|
+
} // React v16.12 and above
|
|
1397
|
+
|
|
1398
|
+
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
|
1399
|
+
}
|
|
1400
|
+
var defineProperty = Object.defineProperty;
|
|
1401
|
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
1402
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
1403
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1404
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
1405
|
+
var objectPrototype = Object.prototype;
|
|
1406
|
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
1407
|
+
if (typeof sourceComponent !== 'string') {
|
|
1408
|
+
// don't hoist over string (html) components
|
|
1409
|
+
if (objectPrototype) {
|
|
1410
|
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
1411
|
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
1412
|
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
var keys = getOwnPropertyNames(sourceComponent);
|
|
1416
|
+
if (getOwnPropertySymbols) {
|
|
1417
|
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
1418
|
+
}
|
|
1419
|
+
var targetStatics = getStatics(targetComponent);
|
|
1420
|
+
var sourceStatics = getStatics(sourceComponent);
|
|
1421
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
1422
|
+
var key = keys[i];
|
|
1423
|
+
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
1424
|
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
1425
|
+
try {
|
|
1426
|
+
// Avoid failures from read-only properties
|
|
1427
|
+
defineProperty(targetComponent, key, descriptor);
|
|
1428
|
+
} catch (e) {}
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
return targetComponent;
|
|
1433
|
+
}
|
|
1434
|
+
var hoistNonReactStatics_cjs = hoistNonReactStatics;
|
|
1435
|
+
var f = /*@__PURE__*/getDefaultExportFromCjs(hoistNonReactStatics_cjs);
|
|
1436
|
+
function m() {
|
|
1437
|
+
return (m = Object.assign || function (e) {
|
|
1438
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1439
|
+
var n = arguments[t];
|
|
1440
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1441
|
+
}
|
|
1442
|
+
return e;
|
|
1443
|
+
}).apply(this, arguments);
|
|
1444
|
+
}
|
|
1445
|
+
var y = function (e, t) {
|
|
1446
|
+
for (var n = [e[0]], r = 0, o = t.length; r < o; r += 1) n.push(t[r], e[r + 1]);
|
|
1447
|
+
return n;
|
|
1448
|
+
},
|
|
1449
|
+
v = function (t) {
|
|
1450
|
+
return null !== t && "object" == typeof t && "[object Object]" === (t.toString ? t.toString() : Object.prototype.toString.call(t)) && !reactIsExports$1.typeOf(t);
|
|
1451
|
+
},
|
|
1452
|
+
g = Object.freeze([]),
|
|
1453
|
+
S = Object.freeze({});
|
|
1454
|
+
function w(e) {
|
|
1455
|
+
return "function" == typeof e;
|
|
1456
|
+
}
|
|
1457
|
+
function E(e) {
|
|
1458
|
+
return "production" !== process.env.NODE_ENV && "string" == typeof e && e || e.displayName || e.name || "Component";
|
|
1459
|
+
}
|
|
1460
|
+
function b(e) {
|
|
1461
|
+
return e && "string" == typeof e.styledComponentId;
|
|
1462
|
+
}
|
|
1463
|
+
var _ = "undefined" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled",
|
|
1464
|
+
A = "undefined" != typeof window && "HTMLElement" in window,
|
|
1465
|
+
C = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && (void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && "" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : void 0 !== process.env.SC_DISABLE_SPEEDY && "" !== process.env.SC_DISABLE_SPEEDY ? "false" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : "production" !== process.env.NODE_ENV)),
|
|
1466
|
+
P = "production" !== process.env.NODE_ENV ? {
|
|
1467
|
+
1: "Cannot create styled-component for component: %s.\n\n",
|
|
1468
|
+
2: "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",
|
|
1469
|
+
3: "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
|
|
1470
|
+
4: "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",
|
|
1471
|
+
5: "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",
|
|
1472
|
+
6: "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",
|
|
1473
|
+
7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',
|
|
1474
|
+
8: 'ThemeProvider: Please make your "theme" prop an object.\n\n',
|
|
1475
|
+
9: "Missing document `<head>`\n\n",
|
|
1476
|
+
10: "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",
|
|
1477
|
+
11: "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",
|
|
1478
|
+
12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",
|
|
1479
|
+
13: "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",
|
|
1480
|
+
14: 'ThemeProvider: "theme" prop is required.\n\n',
|
|
1481
|
+
15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",
|
|
1482
|
+
16: "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",
|
|
1483
|
+
17: "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"
|
|
1484
|
+
} : {};
|
|
1485
|
+
function O() {
|
|
1486
|
+
for (var e = arguments.length <= 0 ? void 0 : arguments[0], t = [], n = 1, r = arguments.length; n < r; n += 1) t.push(n < 0 || arguments.length <= n ? void 0 : arguments[n]);
|
|
1487
|
+
return t.forEach(function (t) {
|
|
1488
|
+
e = e.replace(/%[a-z]/, t);
|
|
1489
|
+
}), e;
|
|
1490
|
+
}
|
|
1491
|
+
function R(e) {
|
|
1492
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
|
|
1493
|
+
throw "production" === process.env.NODE_ENV ? new Error("An error occurred. See https://git.io/JUIaE#" + e + " for more information." + (n.length > 0 ? " Args: " + n.join(", ") : "")) : new Error(O.apply(void 0, [P[e]].concat(n)).trim());
|
|
1494
|
+
}
|
|
1495
|
+
var D = function () {
|
|
1496
|
+
function e(e) {
|
|
1497
|
+
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e;
|
|
1498
|
+
}
|
|
1499
|
+
var t = e.prototype;
|
|
1500
|
+
return t.indexOfGroup = function (e) {
|
|
1501
|
+
for (var t = 0, n = 0; n < e; n++) t += this.groupSizes[n];
|
|
1502
|
+
return t;
|
|
1503
|
+
}, t.insertRules = function (e, t) {
|
|
1504
|
+
if (e >= this.groupSizes.length) {
|
|
1505
|
+
for (var n = this.groupSizes, r = n.length, o = r; e >= o;) (o <<= 1) < 0 && R(16, "" + e);
|
|
1506
|
+
this.groupSizes = new Uint32Array(o), this.groupSizes.set(n), this.length = o;
|
|
1507
|
+
for (var s = r; s < o; s++) this.groupSizes[s] = 0;
|
|
1508
|
+
}
|
|
1509
|
+
for (var i = this.indexOfGroup(e + 1), a = 0, c = t.length; a < c; a++) this.tag.insertRule(i, t[a]) && (this.groupSizes[e]++, i++);
|
|
1510
|
+
}, t.clearGroup = function (e) {
|
|
1511
|
+
if (e < this.length) {
|
|
1512
|
+
var t = this.groupSizes[e],
|
|
1513
|
+
n = this.indexOfGroup(e),
|
|
1514
|
+
r = n + t;
|
|
1515
|
+
this.groupSizes[e] = 0;
|
|
1516
|
+
for (var o = n; o < r; o++) this.tag.deleteRule(n);
|
|
1517
|
+
}
|
|
1518
|
+
}, t.getGroup = function (e) {
|
|
1519
|
+
var t = "";
|
|
1520
|
+
if (e >= this.length || 0 === this.groupSizes[e]) return t;
|
|
1521
|
+
for (var n = this.groupSizes[e], r = this.indexOfGroup(e), o = r + n, s = r; s < o; s++) t += this.tag.getRule(s) + "/*!sc*/\n";
|
|
1522
|
+
return t;
|
|
1523
|
+
}, e;
|
|
1524
|
+
}(),
|
|
1525
|
+
j = new Map(),
|
|
1526
|
+
T = new Map(),
|
|
1527
|
+
x = 1,
|
|
1528
|
+
k = function (e) {
|
|
1529
|
+
if (j.has(e)) return j.get(e);
|
|
1530
|
+
for (; T.has(x);) x++;
|
|
1531
|
+
var t = x++;
|
|
1532
|
+
return "production" !== process.env.NODE_ENV && ((0 | t) < 0 || t > 1 << 30) && R(16, "" + t), j.set(e, t), T.set(t, e), t;
|
|
1533
|
+
},
|
|
1534
|
+
V = function (e) {
|
|
1535
|
+
return T.get(e);
|
|
1536
|
+
},
|
|
1537
|
+
z = function (e, t) {
|
|
1538
|
+
t >= x && (x = t + 1), j.set(e, t), T.set(t, e);
|
|
1539
|
+
},
|
|
1540
|
+
B = "style[" + _ + '][data-styled-version="5.3.11"]',
|
|
1541
|
+
M = new RegExp("^" + _ + '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),
|
|
1542
|
+
G = function (e, t, n) {
|
|
1543
|
+
for (var r, o = n.split(","), s = 0, i = o.length; s < i; s++) (r = o[s]) && e.registerName(t, r);
|
|
1544
|
+
},
|
|
1545
|
+
L = function (e, t) {
|
|
1546
|
+
for (var n = (t.textContent || "").split("/*!sc*/\n"), r = [], o = 0, s = n.length; o < s; o++) {
|
|
1547
|
+
var i = n[o].trim();
|
|
1548
|
+
if (i) {
|
|
1549
|
+
var a = i.match(M);
|
|
1550
|
+
if (a) {
|
|
1551
|
+
var c = 0 | parseInt(a[1], 10),
|
|
1552
|
+
u = a[2];
|
|
1553
|
+
0 !== c && (z(u, c), G(e, u, a[3]), e.getTag().insertRules(c, r)), r.length = 0;
|
|
1554
|
+
} else r.push(i);
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1558
|
+
F = function () {
|
|
1559
|
+
return "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : null;
|
|
1560
|
+
},
|
|
1561
|
+
Y = function (e) {
|
|
1562
|
+
var t = document.head,
|
|
1563
|
+
n = e || t,
|
|
1564
|
+
r = document.createElement("style"),
|
|
1565
|
+
o = function (e) {
|
|
1566
|
+
for (var t = e.childNodes, n = t.length; n >= 0; n--) {
|
|
1567
|
+
var r = t[n];
|
|
1568
|
+
if (r && 1 === r.nodeType && r.hasAttribute(_)) return r;
|
|
1569
|
+
}
|
|
1570
|
+
}(n),
|
|
1571
|
+
s = void 0 !== o ? o.nextSibling : null;
|
|
1572
|
+
r.setAttribute(_, "active"), r.setAttribute("data-styled-version", "5.3.11");
|
|
1573
|
+
var i = F();
|
|
1574
|
+
return i && r.setAttribute("nonce", i), n.insertBefore(r, s), r;
|
|
1575
|
+
},
|
|
1576
|
+
q = function () {
|
|
1577
|
+
function e(e) {
|
|
1578
|
+
var t = this.element = Y(e);
|
|
1579
|
+
t.appendChild(document.createTextNode("")), this.sheet = function (e) {
|
|
1580
|
+
if (e.sheet) return e.sheet;
|
|
1581
|
+
for (var t = document.styleSheets, n = 0, r = t.length; n < r; n++) {
|
|
1582
|
+
var o = t[n];
|
|
1583
|
+
if (o.ownerNode === e) return o;
|
|
1584
|
+
}
|
|
1585
|
+
R(17);
|
|
1586
|
+
}(t), this.length = 0;
|
|
1587
|
+
}
|
|
1588
|
+
var t = e.prototype;
|
|
1589
|
+
return t.insertRule = function (e, t) {
|
|
1590
|
+
try {
|
|
1591
|
+
return this.sheet.insertRule(t, e), this.length++, !0;
|
|
1592
|
+
} catch (e) {
|
|
1593
|
+
return !1;
|
|
1594
|
+
}
|
|
1595
|
+
}, t.deleteRule = function (e) {
|
|
1596
|
+
this.sheet.deleteRule(e), this.length--;
|
|
1597
|
+
}, t.getRule = function (e) {
|
|
1598
|
+
var t = this.sheet.cssRules[e];
|
|
1599
|
+
return void 0 !== t && "string" == typeof t.cssText ? t.cssText : "";
|
|
1600
|
+
}, e;
|
|
1601
|
+
}(),
|
|
1602
|
+
H = function () {
|
|
1603
|
+
function e(e) {
|
|
1604
|
+
var t = this.element = Y(e);
|
|
1605
|
+
this.nodes = t.childNodes, this.length = 0;
|
|
1606
|
+
}
|
|
1607
|
+
var t = e.prototype;
|
|
1608
|
+
return t.insertRule = function (e, t) {
|
|
1609
|
+
if (e <= this.length && e >= 0) {
|
|
1610
|
+
var n = document.createTextNode(t),
|
|
1611
|
+
r = this.nodes[e];
|
|
1612
|
+
return this.element.insertBefore(n, r || null), this.length++, !0;
|
|
1613
|
+
}
|
|
1614
|
+
return !1;
|
|
1615
|
+
}, t.deleteRule = function (e) {
|
|
1616
|
+
this.element.removeChild(this.nodes[e]), this.length--;
|
|
1617
|
+
}, t.getRule = function (e) {
|
|
1618
|
+
return e < this.length ? this.nodes[e].textContent : "";
|
|
1619
|
+
}, e;
|
|
1620
|
+
}(),
|
|
1621
|
+
$ = function () {
|
|
1622
|
+
function e(e) {
|
|
1623
|
+
this.rules = [], this.length = 0;
|
|
1624
|
+
}
|
|
1625
|
+
var t = e.prototype;
|
|
1626
|
+
return t.insertRule = function (e, t) {
|
|
1627
|
+
return e <= this.length && (this.rules.splice(e, 0, t), this.length++, !0);
|
|
1628
|
+
}, t.deleteRule = function (e) {
|
|
1629
|
+
this.rules.splice(e, 1), this.length--;
|
|
1630
|
+
}, t.getRule = function (e) {
|
|
1631
|
+
return e < this.length ? this.rules[e] : "";
|
|
1632
|
+
}, e;
|
|
1633
|
+
}(),
|
|
1634
|
+
W = A,
|
|
1635
|
+
U = {
|
|
1636
|
+
isServer: !A,
|
|
1637
|
+
useCSSOMInjection: !C
|
|
1638
|
+
},
|
|
1639
|
+
J = function () {
|
|
1640
|
+
function e(e, t, n) {
|
|
1641
|
+
void 0 === e && (e = S), void 0 === t && (t = {}), this.options = m({}, U, {}, e), this.gs = t, this.names = new Map(n), this.server = !!e.isServer, !this.server && A && W && (W = !1, function (e) {
|
|
1642
|
+
for (var t = document.querySelectorAll(B), n = 0, r = t.length; n < r; n++) {
|
|
1643
|
+
var o = t[n];
|
|
1644
|
+
o && "active" !== o.getAttribute(_) && (L(e, o), o.parentNode && o.parentNode.removeChild(o));
|
|
1645
|
+
}
|
|
1646
|
+
}(this));
|
|
1647
|
+
}
|
|
1648
|
+
e.registerId = function (e) {
|
|
1649
|
+
return k(e);
|
|
1650
|
+
};
|
|
1651
|
+
var t = e.prototype;
|
|
1652
|
+
return t.reconstructWithOptions = function (t, n) {
|
|
1653
|
+
return void 0 === n && (n = !0), new e(m({}, this.options, {}, t), this.gs, n && this.names || void 0);
|
|
1654
|
+
}, t.allocateGSInstance = function (e) {
|
|
1655
|
+
return this.gs[e] = (this.gs[e] || 0) + 1;
|
|
1656
|
+
}, t.getTag = function () {
|
|
1657
|
+
return this.tag || (this.tag = (n = (t = this.options).isServer, r = t.useCSSOMInjection, o = t.target, e = n ? new $(o) : r ? new q(o) : new H(o), new D(e)));
|
|
1658
|
+
var e, t, n, r, o;
|
|
1659
|
+
}, t.hasNameForId = function (e, t) {
|
|
1660
|
+
return this.names.has(e) && this.names.get(e).has(t);
|
|
1661
|
+
}, t.registerName = function (e, t) {
|
|
1662
|
+
if (k(e), this.names.has(e)) this.names.get(e).add(t);else {
|
|
1663
|
+
var n = new Set();
|
|
1664
|
+
n.add(t), this.names.set(e, n);
|
|
1665
|
+
}
|
|
1666
|
+
}, t.insertRules = function (e, t, n) {
|
|
1667
|
+
this.registerName(e, t), this.getTag().insertRules(k(e), n);
|
|
1668
|
+
}, t.clearNames = function (e) {
|
|
1669
|
+
this.names.has(e) && this.names.get(e).clear();
|
|
1670
|
+
}, t.clearRules = function (e) {
|
|
1671
|
+
this.getTag().clearGroup(k(e)), this.clearNames(e);
|
|
1672
|
+
}, t.clearTag = function () {
|
|
1673
|
+
this.tag = void 0;
|
|
1674
|
+
}, t.toString = function () {
|
|
1675
|
+
return function (e) {
|
|
1676
|
+
for (var t = e.getTag(), n = t.length, r = "", o = 0; o < n; o++) {
|
|
1677
|
+
var s = V(o);
|
|
1678
|
+
if (void 0 !== s) {
|
|
1679
|
+
var i = e.names.get(s),
|
|
1680
|
+
a = t.getGroup(o);
|
|
1681
|
+
if (i && a && i.size) {
|
|
1682
|
+
var c = _ + ".g" + o + '[id="' + s + '"]',
|
|
1683
|
+
u = "";
|
|
1684
|
+
void 0 !== i && i.forEach(function (e) {
|
|
1685
|
+
e.length > 0 && (u += e + ",");
|
|
1686
|
+
}), r += "" + a + c + '{content:"' + u + '"}/*!sc*/\n';
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
return r;
|
|
1691
|
+
}(this);
|
|
1692
|
+
}, e;
|
|
1693
|
+
}(),
|
|
1694
|
+
X = /(a)(d)/gi,
|
|
1695
|
+
Z = function (e) {
|
|
1696
|
+
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
1697
|
+
};
|
|
1698
|
+
function K(e) {
|
|
1699
|
+
var t,
|
|
1700
|
+
n = "";
|
|
1701
|
+
for (t = Math.abs(e); t > 52; t = t / 52 | 0) n = Z(t % 52) + n;
|
|
1702
|
+
return (Z(t % 52) + n).replace(X, "$1-$2");
|
|
1703
|
+
}
|
|
1704
|
+
var Q = function (e, t) {
|
|
1705
|
+
for (var n = t.length; n;) e = 33 * e ^ t.charCodeAt(--n);
|
|
1706
|
+
return e;
|
|
1707
|
+
},
|
|
1708
|
+
ee = function (e) {
|
|
1709
|
+
return Q(5381, e);
|
|
1710
|
+
};
|
|
1711
|
+
function te(e) {
|
|
1712
|
+
for (var t = 0; t < e.length; t += 1) {
|
|
1713
|
+
var n = e[t];
|
|
1714
|
+
if (w(n) && !b(n)) return !1;
|
|
1715
|
+
}
|
|
1716
|
+
return !0;
|
|
1717
|
+
}
|
|
1718
|
+
var ne = ee("5.3.11"),
|
|
1719
|
+
re = function () {
|
|
1720
|
+
function e(e, t, n) {
|
|
1721
|
+
this.rules = e, this.staticRulesId = "", this.isStatic = "production" === process.env.NODE_ENV && (void 0 === n || n.isStatic) && te(e), this.componentId = t, this.baseHash = Q(ne, t), this.baseStyle = n, J.registerId(t);
|
|
1722
|
+
}
|
|
1723
|
+
return e.prototype.generateAndInjectStyles = function (e, t, n) {
|
|
1724
|
+
var r = this.componentId,
|
|
1725
|
+
o = [];
|
|
1726
|
+
if (this.baseStyle && o.push(this.baseStyle.generateAndInjectStyles(e, t, n)), this.isStatic && !n.hash) {
|
|
1727
|
+
if (this.staticRulesId && t.hasNameForId(r, this.staticRulesId)) o.push(this.staticRulesId);else {
|
|
1728
|
+
var s = be(this.rules, e, t, n).join(""),
|
|
1729
|
+
i = K(Q(this.baseHash, s) >>> 0);
|
|
1730
|
+
if (!t.hasNameForId(r, i)) {
|
|
1731
|
+
var a = n(s, "." + i, void 0, r);
|
|
1732
|
+
t.insertRules(r, i, a);
|
|
1733
|
+
}
|
|
1734
|
+
o.push(i), this.staticRulesId = i;
|
|
1735
|
+
}
|
|
1736
|
+
} else {
|
|
1737
|
+
for (var c = this.rules.length, u = Q(this.baseHash, n.hash), l = "", d = 0; d < c; d++) {
|
|
1738
|
+
var h = this.rules[d];
|
|
1739
|
+
if ("string" == typeof h) l += h, "production" !== process.env.NODE_ENV && (u = Q(u, h + d));else if (h) {
|
|
1740
|
+
var p = be(h, e, t, n),
|
|
1741
|
+
f = Array.isArray(p) ? p.join("") : p;
|
|
1742
|
+
u = Q(u, f + d), l += f;
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
if (l) {
|
|
1746
|
+
var m = K(u >>> 0);
|
|
1747
|
+
if (!t.hasNameForId(r, m)) {
|
|
1748
|
+
var y = n(l, "." + m, void 0, r);
|
|
1749
|
+
t.insertRules(r, m, y);
|
|
1750
|
+
}
|
|
1751
|
+
o.push(m);
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
return o.join(" ");
|
|
1755
|
+
}, e;
|
|
1756
|
+
}(),
|
|
1757
|
+
oe = /^\s*\/\/.*$/gm,
|
|
1758
|
+
se = [":", "[", ".", "#"];
|
|
1759
|
+
function ie(e) {
|
|
1760
|
+
var t,
|
|
1761
|
+
n,
|
|
1762
|
+
r,
|
|
1763
|
+
o,
|
|
1764
|
+
s = void 0 === e ? S : e,
|
|
1765
|
+
i = s.options,
|
|
1766
|
+
a = void 0 === i ? S : i,
|
|
1767
|
+
c = s.plugins,
|
|
1768
|
+
u = void 0 === c ? g : c,
|
|
1769
|
+
l = new stylis_min(a),
|
|
1770
|
+
h = [],
|
|
1771
|
+
p = function (e) {
|
|
1772
|
+
function t(t) {
|
|
1773
|
+
if (t) try {
|
|
1774
|
+
e(t + "}");
|
|
1775
|
+
} catch (e) {}
|
|
1776
|
+
}
|
|
1777
|
+
return function (n, r, o, s, i, a, c, u, l, d) {
|
|
1778
|
+
switch (n) {
|
|
1779
|
+
case 1:
|
|
1780
|
+
if (0 === l && 64 === r.charCodeAt(0)) return e(r + ";"), "";
|
|
1781
|
+
break;
|
|
1782
|
+
case 2:
|
|
1783
|
+
if (0 === u) return r + "/*|*/";
|
|
1784
|
+
break;
|
|
1785
|
+
case 3:
|
|
1786
|
+
switch (u) {
|
|
1787
|
+
case 102:
|
|
1788
|
+
case 112:
|
|
1789
|
+
return e(o[0] + r), "";
|
|
1790
|
+
default:
|
|
1791
|
+
return r + (0 === d ? "/*|*/" : "");
|
|
1792
|
+
}
|
|
1793
|
+
case -2:
|
|
1794
|
+
r.split("/*|*/}").forEach(t);
|
|
1795
|
+
}
|
|
1796
|
+
};
|
|
1797
|
+
}(function (e) {
|
|
1798
|
+
h.push(e);
|
|
1799
|
+
}),
|
|
1800
|
+
f = function (e, r, s) {
|
|
1801
|
+
return 0 === r && -1 !== se.indexOf(s[n.length]) || s.match(o) ? e : "." + t;
|
|
1802
|
+
};
|
|
1803
|
+
function m(e, s, i, a) {
|
|
1804
|
+
void 0 === a && (a = "&");
|
|
1805
|
+
var c = e.replace(oe, ""),
|
|
1806
|
+
u = s && i ? i + " " + s + " { " + c + " }" : c;
|
|
1807
|
+
return t = a, n = s, r = new RegExp("\\" + n + "\\b", "g"), o = new RegExp("(\\" + n + "\\b){2,}"), l(i || !s ? "" : s, u);
|
|
1808
|
+
}
|
|
1809
|
+
return l.use([].concat(u, [function (e, t, o) {
|
|
1810
|
+
2 === e && o.length && o[0].lastIndexOf(n) > 0 && (o[0] = o[0].replace(r, f));
|
|
1811
|
+
}, p, function (e) {
|
|
1812
|
+
if (-2 === e) {
|
|
1813
|
+
var t = h;
|
|
1814
|
+
return h = [], t;
|
|
1815
|
+
}
|
|
1816
|
+
}])), m.hash = u.length ? u.reduce(function (e, t) {
|
|
1817
|
+
return t.name || R(15), Q(e, t.name);
|
|
1818
|
+
}, 5381).toString() : "", m;
|
|
1819
|
+
}
|
|
1820
|
+
var ae = r__default.createContext(),
|
|
1821
|
+
ue = r__default.createContext(),
|
|
1822
|
+
le = new J(),
|
|
1823
|
+
de = ie();
|
|
1824
|
+
function he() {
|
|
1825
|
+
return useContext(ae) || le;
|
|
1826
|
+
}
|
|
1827
|
+
function pe() {
|
|
1828
|
+
return useContext(ue) || de;
|
|
1829
|
+
}
|
|
1830
|
+
var me = function () {
|
|
1831
|
+
function e(e, t) {
|
|
1832
|
+
var n = this;
|
|
1833
|
+
this.inject = function (e, t) {
|
|
1834
|
+
void 0 === t && (t = de);
|
|
1835
|
+
var r = n.name + t.hash;
|
|
1836
|
+
e.hasNameForId(n.id, r) || e.insertRules(n.id, r, t(n.rules, r, "@keyframes"));
|
|
1837
|
+
}, this.toString = function () {
|
|
1838
|
+
return R(12, String(n.name));
|
|
1839
|
+
}, this.name = e, this.id = "sc-keyframes-" + e, this.rules = t;
|
|
1840
|
+
}
|
|
1841
|
+
return e.prototype.getName = function (e) {
|
|
1842
|
+
return void 0 === e && (e = de), this.name + e.hash;
|
|
1843
|
+
}, e;
|
|
1844
|
+
}(),
|
|
1845
|
+
ye = /([A-Z])/,
|
|
1846
|
+
ve = /([A-Z])/g,
|
|
1847
|
+
ge = /^ms-/,
|
|
1848
|
+
Se = function (e) {
|
|
1849
|
+
return "-" + e.toLowerCase();
|
|
1850
|
+
};
|
|
1851
|
+
function we(e) {
|
|
1852
|
+
return ye.test(e) ? e.replace(ve, Se).replace(ge, "-ms-") : e;
|
|
1853
|
+
}
|
|
1854
|
+
var Ee = function (e) {
|
|
1855
|
+
return null == e || !1 === e || "" === e;
|
|
1856
|
+
};
|
|
1857
|
+
function be(e, n, r, o) {
|
|
1858
|
+
if (Array.isArray(e)) {
|
|
1859
|
+
for (var s, i = [], a = 0, c = e.length; a < c; a += 1) "" !== (s = be(e[a], n, r, o)) && (Array.isArray(s) ? i.push.apply(i, s) : i.push(s));
|
|
1860
|
+
return i;
|
|
1861
|
+
}
|
|
1862
|
+
if (Ee(e)) return "";
|
|
1863
|
+
if (b(e)) return "." + e.styledComponentId;
|
|
1864
|
+
if (w(e)) {
|
|
1865
|
+
if ("function" != typeof (l = e) || l.prototype && l.prototype.isReactComponent || !n) return e;
|
|
1866
|
+
var u = e(n);
|
|
1867
|
+
return "production" !== process.env.NODE_ENV && reactIsExports$1.isElement(u) && console.warn(E(e) + " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."), be(u, n, r, o);
|
|
1868
|
+
}
|
|
1869
|
+
var l;
|
|
1870
|
+
return e instanceof me ? r ? (e.inject(r, o), e.getName(o)) : e : v(e) ? function e(t, n) {
|
|
1871
|
+
var r,
|
|
1872
|
+
o,
|
|
1873
|
+
s = [];
|
|
1874
|
+
for (var i in t) t.hasOwnProperty(i) && !Ee(t[i]) && (Array.isArray(t[i]) && t[i].isCss || w(t[i]) ? s.push(we(i) + ":", t[i], ";") : v(t[i]) ? s.push.apply(s, e(t[i], i)) : s.push(we(i) + ": " + (r = i, null == (o = t[i]) || "boolean" == typeof o || "" === o ? "" : "number" != typeof o || 0 === o || r in unitlessKeys || r.startsWith("--") ? String(o).trim() : o + "px") + ";"));
|
|
1875
|
+
return n ? [n + " {"].concat(s, ["}"]) : s;
|
|
1876
|
+
}(e) : e.toString();
|
|
1877
|
+
}
|
|
1878
|
+
var _e = function (e) {
|
|
1879
|
+
return Array.isArray(e) && (e.isCss = !0), e;
|
|
1880
|
+
};
|
|
1881
|
+
function Ne(e) {
|
|
1882
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
|
|
1883
|
+
return w(e) || v(e) ? _e(be(y(g, [e].concat(n)))) : 0 === n.length && 1 === e.length && "string" == typeof e[0] ? e : _e(be(y(e, n)));
|
|
1884
|
+
}
|
|
1885
|
+
var Ae = /invalid hook call/i,
|
|
1886
|
+
Ce = new Set(),
|
|
1887
|
+
Ie = function (e, t) {
|
|
1888
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
1889
|
+
var n = "The component " + e + (t ? ' with the id of "' + t + '"' : "") + " has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",
|
|
1890
|
+
r = console.error;
|
|
1891
|
+
try {
|
|
1892
|
+
var o = !0;
|
|
1893
|
+
console.error = function (e) {
|
|
1894
|
+
if (Ae.test(e)) o = !1, Ce.delete(n);else {
|
|
1895
|
+
for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) s[i - 1] = arguments[i];
|
|
1896
|
+
r.apply(void 0, [e].concat(s));
|
|
1897
|
+
}
|
|
1898
|
+
}, useRef(), o && !Ce.has(n) && (console.warn(n), Ce.add(n));
|
|
1899
|
+
} catch (e) {
|
|
1900
|
+
Ae.test(e.message) && Ce.delete(n);
|
|
1901
|
+
} finally {
|
|
1902
|
+
console.error = r;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
},
|
|
1906
|
+
Pe = function (e, t, n) {
|
|
1907
|
+
return void 0 === n && (n = S), e.theme !== n.theme && e.theme || t || n.theme;
|
|
1908
|
+
},
|
|
1909
|
+
Oe = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,
|
|
1910
|
+
Re = /(^-|-$)/g;
|
|
1911
|
+
function De(e) {
|
|
1912
|
+
return e.replace(Oe, "-").replace(Re, "");
|
|
1913
|
+
}
|
|
1914
|
+
var je = function (e) {
|
|
1915
|
+
return K(ee(e) >>> 0);
|
|
1916
|
+
};
|
|
1917
|
+
function Te(e) {
|
|
1918
|
+
return "string" == typeof e && ("production" === process.env.NODE_ENV || e.charAt(0) === e.charAt(0).toLowerCase());
|
|
1919
|
+
}
|
|
1920
|
+
var xe = function (e) {
|
|
1921
|
+
return "function" == typeof e || "object" == typeof e && null !== e && !Array.isArray(e);
|
|
1922
|
+
},
|
|
1923
|
+
ke = function (e) {
|
|
1924
|
+
return "__proto__" !== e && "constructor" !== e && "prototype" !== e;
|
|
1925
|
+
};
|
|
1926
|
+
function Ve(e, t, n) {
|
|
1927
|
+
var r = e[n];
|
|
1928
|
+
xe(t) && xe(r) ? ze(r, t) : e[n] = t;
|
|
1929
|
+
}
|
|
1930
|
+
function ze(e) {
|
|
1931
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
|
|
1932
|
+
for (var o = 0, s = n; o < s.length; o++) {
|
|
1933
|
+
var i = s[o];
|
|
1934
|
+
if (xe(i)) for (var a in i) ke(a) && Ve(e, i[a], a);
|
|
1935
|
+
}
|
|
1936
|
+
return e;
|
|
1937
|
+
}
|
|
1938
|
+
var Be = r__default.createContext();
|
|
1939
|
+
var Le = {};
|
|
1940
|
+
function Fe(e, t, n) {
|
|
1941
|
+
var o = b(e),
|
|
1942
|
+
i = !Te(e),
|
|
1943
|
+
a = t.attrs,
|
|
1944
|
+
c = void 0 === a ? g : a,
|
|
1945
|
+
l = t.componentId,
|
|
1946
|
+
d = void 0 === l ? function (e, t) {
|
|
1947
|
+
var n = "string" != typeof e ? "sc" : De(e);
|
|
1948
|
+
Le[n] = (Le[n] || 0) + 1;
|
|
1949
|
+
var r = n + "-" + je("5.3.11" + n + Le[n]);
|
|
1950
|
+
return t ? t + "-" + r : r;
|
|
1951
|
+
}(t.displayName, t.parentComponentId) : l,
|
|
1952
|
+
h = t.displayName,
|
|
1953
|
+
y = void 0 === h ? function (e) {
|
|
1954
|
+
return Te(e) ? "styled." + e : "Styled(" + E(e) + ")";
|
|
1955
|
+
}(e) : h,
|
|
1956
|
+
v = t.displayName && t.componentId ? De(t.displayName) + "-" + t.componentId : t.componentId || d,
|
|
1957
|
+
_ = o && e.attrs ? Array.prototype.concat(e.attrs, c).filter(Boolean) : c,
|
|
1958
|
+
N = t.shouldForwardProp;
|
|
1959
|
+
o && e.shouldForwardProp && (N = t.shouldForwardProp ? function (n, r, o) {
|
|
1960
|
+
return e.shouldForwardProp(n, r, o) && t.shouldForwardProp(n, r, o);
|
|
1961
|
+
} : e.shouldForwardProp);
|
|
1962
|
+
var A,
|
|
1963
|
+
C = new re(n, v, o ? e.componentStyle : void 0),
|
|
1964
|
+
I = C.isStatic && 0 === c.length,
|
|
1965
|
+
P = function (e, t) {
|
|
1966
|
+
return function (e, t, n, r) {
|
|
1967
|
+
var o = e.attrs,
|
|
1968
|
+
i = e.componentStyle,
|
|
1969
|
+
a = e.defaultProps,
|
|
1970
|
+
c = e.foldedComponentIds,
|
|
1971
|
+
l = e.shouldForwardProp,
|
|
1972
|
+
d = e.styledComponentId,
|
|
1973
|
+
h = e.target,
|
|
1974
|
+
f = function (e, t, n) {
|
|
1975
|
+
void 0 === e && (e = S);
|
|
1976
|
+
var r = m({}, t, {
|
|
1977
|
+
theme: e
|
|
1978
|
+
}),
|
|
1979
|
+
o = {};
|
|
1980
|
+
return n.forEach(function (e) {
|
|
1981
|
+
var t,
|
|
1982
|
+
n,
|
|
1983
|
+
s,
|
|
1984
|
+
i = e;
|
|
1985
|
+
for (t in w(i) && (i = i(r)), i) r[t] = o[t] = "className" === t ? (n = o[t], s = i[t], n && s ? n + " " + s : n || s) : i[t];
|
|
1986
|
+
}), [r, o];
|
|
1987
|
+
}(Pe(t, useContext(Be), a) || S, t, o),
|
|
1988
|
+
y = f[0],
|
|
1989
|
+
v = f[1],
|
|
1990
|
+
g = function (e, t, n, r) {
|
|
1991
|
+
var o = he(),
|
|
1992
|
+
s = pe(),
|
|
1993
|
+
i = t ? e.generateAndInjectStyles(S, o, s) : e.generateAndInjectStyles(n, o, s);
|
|
1994
|
+
return "production" !== process.env.NODE_ENV && !t && r && r(i), i;
|
|
1995
|
+
}(i, r, y, "production" !== process.env.NODE_ENV ? e.warnTooManyClasses : void 0),
|
|
1996
|
+
E = n,
|
|
1997
|
+
b = v.$as || t.$as || v.as || t.as || h,
|
|
1998
|
+
_ = Te(b),
|
|
1999
|
+
N = v !== t ? m({}, t, {}, v) : t,
|
|
2000
|
+
A = {};
|
|
2001
|
+
for (var C in N) "$" !== C[0] && "as" !== C && ("forwardedAs" === C ? A.as = N[C] : (l ? l(C, isPropValid, b) : !_ || isPropValid(C)) && (A[C] = N[C]));
|
|
2002
|
+
return t.style && v.style !== t.style && (A.style = m({}, t.style, {}, v.style)), A.className = Array.prototype.concat(c, d, g !== d ? g : null, t.className, v.className).filter(Boolean).join(" "), A.ref = E, createElement(b, A);
|
|
2003
|
+
}(A, e, t, I);
|
|
2004
|
+
};
|
|
2005
|
+
return P.displayName = y, (A = r__default.forwardRef(P)).attrs = _, A.componentStyle = C, A.displayName = y, A.shouldForwardProp = N, A.foldedComponentIds = o ? Array.prototype.concat(e.foldedComponentIds, e.styledComponentId) : g, A.styledComponentId = v, A.target = o ? e.target : e, A.withComponent = function (e) {
|
|
2006
|
+
var r = t.componentId,
|
|
2007
|
+
o = function (e, t) {
|
|
2008
|
+
if (null == e) return {};
|
|
2009
|
+
var n,
|
|
2010
|
+
r,
|
|
2011
|
+
o = {},
|
|
2012
|
+
s = Object.keys(e);
|
|
2013
|
+
for (r = 0; r < s.length; r++) n = s[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
|
|
2014
|
+
return o;
|
|
2015
|
+
}(t, ["componentId"]),
|
|
2016
|
+
s = r && r + "-" + (Te(e) ? e : De(E(e)));
|
|
2017
|
+
return Fe(e, m({}, o, {
|
|
2018
|
+
attrs: _,
|
|
2019
|
+
componentId: s
|
|
2020
|
+
}), n);
|
|
2021
|
+
}, Object.defineProperty(A, "defaultProps", {
|
|
2022
|
+
get: function () {
|
|
2023
|
+
return this._foldedDefaultProps;
|
|
2024
|
+
},
|
|
2025
|
+
set: function (t) {
|
|
2026
|
+
this._foldedDefaultProps = o ? ze({}, e.defaultProps, t) : t;
|
|
2027
|
+
}
|
|
2028
|
+
}), "production" !== process.env.NODE_ENV && (Ie(y, v), A.warnTooManyClasses = function (e, t) {
|
|
2029
|
+
var n = {},
|
|
2030
|
+
r = !1;
|
|
2031
|
+
return function (o) {
|
|
2032
|
+
if (!r && (n[o] = !0, Object.keys(n).length >= 200)) {
|
|
2033
|
+
var s = t ? ' with the id of "' + t + '"' : "";
|
|
2034
|
+
console.warn("Over 200 classes were generated for component " + e + s + ".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"), r = !0, n = {};
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2037
|
+
}(y, v)), Object.defineProperty(A, "toString", {
|
|
2038
|
+
value: function () {
|
|
2039
|
+
return "." + A.styledComponentId;
|
|
2040
|
+
}
|
|
2041
|
+
}), i && f(A, e, {
|
|
2042
|
+
attrs: !0,
|
|
2043
|
+
componentStyle: !0,
|
|
2044
|
+
displayName: !0,
|
|
2045
|
+
foldedComponentIds: !0,
|
|
2046
|
+
shouldForwardProp: !0,
|
|
2047
|
+
styledComponentId: !0,
|
|
2048
|
+
target: !0,
|
|
2049
|
+
withComponent: !0
|
|
2050
|
+
}), A;
|
|
2051
|
+
}
|
|
2052
|
+
var Ye = function (e) {
|
|
2053
|
+
return function e(t, r, o) {
|
|
2054
|
+
if (void 0 === o && (o = S), !reactIsExports$1.isValidElementType(r)) return R(1, String(r));
|
|
2055
|
+
var s = function () {
|
|
2056
|
+
return t(r, o, Ne.apply(void 0, arguments));
|
|
2057
|
+
};
|
|
2058
|
+
return s.withConfig = function (n) {
|
|
2059
|
+
return e(t, r, m({}, o, {}, n));
|
|
2060
|
+
}, s.attrs = function (n) {
|
|
2061
|
+
return e(t, r, m({}, o, {
|
|
2062
|
+
attrs: Array.prototype.concat(o.attrs, n).filter(Boolean)
|
|
2063
|
+
}));
|
|
2064
|
+
}, s;
|
|
2065
|
+
}(Fe, e);
|
|
2066
|
+
};
|
|
2067
|
+
["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "textPath", "tspan"].forEach(function (e) {
|
|
2068
|
+
Ye[e] = Ye(e);
|
|
2069
|
+
});
|
|
2070
|
+
"production" !== process.env.NODE_ENV && "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"), "production" !== process.env.NODE_ENV && "test" !== process.env.NODE_ENV && "undefined" != typeof window && (window["__styled-components-init__"] = window["__styled-components-init__"] || 0, 1 === window["__styled-components-init__"] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."), window["__styled-components-init__"] += 1);
|
|
2071
|
+
var styled = Ye;
|
|
2072
|
+
var __freeze$3 = Object.freeze;
|
|
2073
|
+
var __defProp$9 = Object.defineProperty;
|
|
2074
|
+
var __template$3 = (cooked, raw) => __freeze$3(__defProp$9(cooked, "raw", {
|
|
2075
|
+
value: __freeze$3(raw || cooked.slice())
|
|
2076
|
+
}));
|
|
2077
|
+
var _a$3;
|
|
2078
|
+
const WrapperContainer = styled.div(_a$3 || (_a$3 = __template$3(["\n position: absolute;\n right: 10px;\n top: 10px;\n width: 220px;\n"])));
|
|
2079
|
+
var __defProp$8 = Object.defineProperty;
|
|
2080
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$8(obj, key, {
|
|
2081
|
+
enumerable: true,
|
|
2082
|
+
configurable: true,
|
|
2083
|
+
writable: true,
|
|
2084
|
+
value
|
|
2085
|
+
}) : obj[key] = value;
|
|
2086
|
+
var __publicField$5 = (obj, key, value) => {
|
|
2087
|
+
__defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2088
|
+
return value;
|
|
2089
|
+
};
|
|
2090
|
+
class SearchInput extends r.PureComponent {
|
|
2091
|
+
constructor() {
|
|
2092
|
+
super(...arguments);
|
|
2093
|
+
__publicField$5(this, "searchInputRef", r.createRef());
|
|
2094
|
+
__publicField$5(this, "autoComplete");
|
|
2095
|
+
__publicField$5(this, "handleChange", () => {
|
|
2096
|
+
if (!this.autoComplete) {
|
|
2097
|
+
return;
|
|
2098
|
+
}
|
|
2099
|
+
this.props.onChange(this.autoComplete.getPlace());
|
|
2100
|
+
if (this.searchInputRef.current) {
|
|
2101
|
+
this.searchInputRef.current.value = "";
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
}
|
|
2105
|
+
componentDidMount() {
|
|
2106
|
+
const input = this.searchInputRef.current;
|
|
2107
|
+
if (!input) {
|
|
2108
|
+
return;
|
|
2109
|
+
}
|
|
2110
|
+
const {
|
|
2111
|
+
api,
|
|
2112
|
+
map
|
|
2113
|
+
} = this.props;
|
|
2114
|
+
const {
|
|
2115
|
+
Circle,
|
|
2116
|
+
places,
|
|
2117
|
+
event
|
|
2118
|
+
} = api;
|
|
2119
|
+
const searchBounds = new Circle({
|
|
2120
|
+
center: map.getCenter(),
|
|
2121
|
+
radius: 100
|
|
2122
|
+
}).getBounds();
|
|
2123
|
+
this.autoComplete = new places.Autocomplete(input, {
|
|
2124
|
+
bounds: searchBounds,
|
|
2125
|
+
types: []
|
|
2126
|
+
// return all kinds of places
|
|
2127
|
+
});
|
|
2128
|
+
|
|
2129
|
+
event.addListener(this.autoComplete, "place_changed", this.handleChange);
|
|
2130
|
+
}
|
|
2131
|
+
render() {
|
|
2132
|
+
return /* @__PURE__ */jsx(WrapperContainer, {
|
|
2133
|
+
children: /* @__PURE__ */jsx(TextInput, {
|
|
2134
|
+
name: "place",
|
|
2135
|
+
ref: this.searchInputRef,
|
|
2136
|
+
placeholder: "Search for place or address",
|
|
2137
|
+
padding: 4
|
|
2138
|
+
})
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
function latLngAreEqual(latLng1, latLng2) {
|
|
2143
|
+
const lat1 = typeof latLng1.lat === "function" ? latLng1.lat() : latLng1.lat;
|
|
2144
|
+
const lng1 = typeof latLng1.lng === "function" ? latLng1.lng() : latLng1.lng;
|
|
2145
|
+
const lat2 = typeof latLng2.lat === "function" ? latLng2.lat() : latLng2.lat;
|
|
2146
|
+
const lng2 = typeof latLng2.lng === "function" ? latLng2.lng() : latLng2.lng;
|
|
2147
|
+
return lat1 === lat2 && lng1 === lng2;
|
|
2148
|
+
}
|
|
2149
|
+
var __freeze$2 = Object.freeze;
|
|
2150
|
+
var __defProp$7 = Object.defineProperty;
|
|
2151
|
+
var __template$2 = (cooked, raw) => __freeze$2(__defProp$7(cooked, "raw", {
|
|
2152
|
+
value: __freeze$2(raw || cooked.slice())
|
|
2153
|
+
}));
|
|
2154
|
+
var _a$2;
|
|
2155
|
+
const MapContainer = styled.div(_a$2 || (_a$2 = __template$2(["\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n"])));
|
|
2156
|
+
var __defProp$6 = Object.defineProperty;
|
|
2157
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$6(obj, key, {
|
|
2158
|
+
enumerable: true,
|
|
2159
|
+
configurable: true,
|
|
2160
|
+
writable: true,
|
|
2161
|
+
value
|
|
2162
|
+
}) : obj[key] = value;
|
|
2163
|
+
var __publicField$4 = (obj, key, value) => {
|
|
2164
|
+
__defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2165
|
+
return value;
|
|
2166
|
+
};
|
|
2167
|
+
class GoogleMap extends r__default.PureComponent {
|
|
2168
|
+
constructor() {
|
|
2169
|
+
super(...arguments);
|
|
2170
|
+
__publicField$4(this, "state", {
|
|
2171
|
+
map: void 0
|
|
2172
|
+
});
|
|
2173
|
+
__publicField$4(this, "clickHandler");
|
|
2174
|
+
__publicField$4(this, "mapRef", r__default.createRef());
|
|
2175
|
+
__publicField$4(this, "mapEl", null);
|
|
2176
|
+
__publicField$4(this, "attachClickHandler", () => {
|
|
2177
|
+
const map = this.state.map;
|
|
2178
|
+
if (!map) {
|
|
2179
|
+
return;
|
|
2180
|
+
}
|
|
2181
|
+
const {
|
|
2182
|
+
api,
|
|
2183
|
+
onClick
|
|
2184
|
+
} = this.props;
|
|
2185
|
+
const {
|
|
2186
|
+
event
|
|
2187
|
+
} = api;
|
|
2188
|
+
if (this.clickHandler) {
|
|
2189
|
+
this.clickHandler.remove();
|
|
2190
|
+
}
|
|
2191
|
+
if (onClick) {
|
|
2192
|
+
this.clickHandler = event.addListener(map, "click", onClick);
|
|
2193
|
+
}
|
|
2194
|
+
});
|
|
2195
|
+
__publicField$4(this, "setMapElement", element => {
|
|
2196
|
+
if (element && element !== this.mapEl) {
|
|
2197
|
+
const map = this.constructMap(element);
|
|
2198
|
+
this.setState({
|
|
2199
|
+
map
|
|
2200
|
+
}, this.attachClickHandler);
|
|
2201
|
+
}
|
|
2202
|
+
this.mapEl = element;
|
|
2203
|
+
});
|
|
2204
|
+
}
|
|
2205
|
+
componentDidMount() {
|
|
2206
|
+
this.attachClickHandler();
|
|
2207
|
+
}
|
|
2208
|
+
componentDidUpdate(prevProps) {
|
|
2209
|
+
const map = this.state.map;
|
|
2210
|
+
if (!map) {
|
|
2211
|
+
return;
|
|
2212
|
+
}
|
|
2213
|
+
const {
|
|
2214
|
+
onClick,
|
|
2215
|
+
location,
|
|
2216
|
+
bounds
|
|
2217
|
+
} = this.props;
|
|
2218
|
+
if (prevProps.onClick !== onClick) {
|
|
2219
|
+
this.attachClickHandler();
|
|
2220
|
+
}
|
|
2221
|
+
if (!latLngAreEqual(prevProps.location, location)) {
|
|
2222
|
+
map.panTo(this.getCenter());
|
|
2223
|
+
}
|
|
2224
|
+
if (bounds && (!prevProps.bounds || !bounds.equals(prevProps.bounds))) {
|
|
2225
|
+
map.fitBounds(bounds);
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
componentWillUnmount() {
|
|
2229
|
+
if (this.clickHandler) {
|
|
2230
|
+
this.clickHandler.remove();
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
getCenter() {
|
|
2234
|
+
const {
|
|
2235
|
+
location,
|
|
2236
|
+
api
|
|
2237
|
+
} = this.props;
|
|
2238
|
+
return new api.LatLng(location.lat, location.lng);
|
|
2239
|
+
}
|
|
2240
|
+
constructMap(el) {
|
|
2241
|
+
const {
|
|
2242
|
+
defaultZoom,
|
|
2243
|
+
api,
|
|
2244
|
+
mapTypeControl,
|
|
2245
|
+
controlSize,
|
|
2246
|
+
bounds,
|
|
2247
|
+
scrollWheel
|
|
2248
|
+
} = this.props;
|
|
2249
|
+
const map = new api.Map(el, {
|
|
2250
|
+
zoom: defaultZoom,
|
|
2251
|
+
center: this.getCenter(),
|
|
2252
|
+
scrollwheel: scrollWheel,
|
|
2253
|
+
streetViewControl: false,
|
|
2254
|
+
mapTypeControl,
|
|
2255
|
+
controlSize
|
|
2256
|
+
});
|
|
2257
|
+
if (bounds) {
|
|
2258
|
+
map.fitBounds(bounds);
|
|
2259
|
+
}
|
|
2260
|
+
return map;
|
|
2261
|
+
}
|
|
2262
|
+
render() {
|
|
2263
|
+
const {
|
|
2264
|
+
children
|
|
2265
|
+
} = this.props;
|
|
2266
|
+
const {
|
|
2267
|
+
map
|
|
2268
|
+
} = this.state;
|
|
2269
|
+
return /* @__PURE__ */jsxs(Fragment, {
|
|
2270
|
+
children: [/* @__PURE__ */jsx(MapContainer, {
|
|
2271
|
+
ref: this.setMapElement
|
|
2272
|
+
}), children && map ? children(map) : null]
|
|
2273
|
+
});
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
__publicField$4(GoogleMap, "defaultProps", {
|
|
2277
|
+
defaultZoom: 8,
|
|
2278
|
+
scrollWheel: true
|
|
2279
|
+
});
|
|
2280
|
+
var __defProp$5 = Object.defineProperty;
|
|
2281
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
|
|
2282
|
+
enumerable: true,
|
|
2283
|
+
configurable: true,
|
|
2284
|
+
writable: true,
|
|
2285
|
+
value
|
|
2286
|
+
}) : obj[key] = value;
|
|
2287
|
+
var __publicField$3 = (obj, key, value) => {
|
|
2288
|
+
__defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2289
|
+
return value;
|
|
2290
|
+
};
|
|
2291
|
+
const markerPath = "M 3.052 3.7 C 1.56 5.293 0.626 7.612 0.663 9.793 C 0.738 14.352 2.793 16.077 6.078 22.351 C 7.263 25.111 8.497 28.032 9.672 32.871 C 9.835 33.584 9.994 34.246 10.069 34.305 C 10.143 34.362 10.301 33.697 10.465 32.983 C 11.639 28.145 12.875 25.226 14.059 22.466 C 17.344 16.192 19.398 14.466 19.474 9.908 C 19.511 7.727 18.574 5.405 17.083 3.814 C 15.379 1.994 12.809 0.649 10.069 0.593 C 7.328 0.536 4.756 1.882 3.052 3.7 Z";
|
|
2292
|
+
class Marker extends r.PureComponent {
|
|
2293
|
+
constructor() {
|
|
2294
|
+
super(...arguments);
|
|
2295
|
+
__publicField$3(this, "marker");
|
|
2296
|
+
__publicField$3(this, "eventHandlers", {});
|
|
2297
|
+
}
|
|
2298
|
+
componentDidMount() {
|
|
2299
|
+
const {
|
|
2300
|
+
position,
|
|
2301
|
+
api,
|
|
2302
|
+
map,
|
|
2303
|
+
onMove,
|
|
2304
|
+
zIndex,
|
|
2305
|
+
opacity,
|
|
2306
|
+
label,
|
|
2307
|
+
markerRef,
|
|
2308
|
+
color
|
|
2309
|
+
} = this.props;
|
|
2310
|
+
const {
|
|
2311
|
+
Marker: GMarker
|
|
2312
|
+
} = api;
|
|
2313
|
+
let icon;
|
|
2314
|
+
if (color) {
|
|
2315
|
+
icon = {
|
|
2316
|
+
path: markerPath,
|
|
2317
|
+
fillOpacity: 1,
|
|
2318
|
+
fillColor: color.background,
|
|
2319
|
+
strokeColor: color.border,
|
|
2320
|
+
strokeWeight: 2,
|
|
2321
|
+
anchor: new api.Point(10, 35),
|
|
2322
|
+
labelOrigin: new api.Point(10, 11)
|
|
2323
|
+
};
|
|
2324
|
+
}
|
|
2325
|
+
this.marker = new GMarker({
|
|
2326
|
+
draggable: Boolean(onMove),
|
|
2327
|
+
position,
|
|
2328
|
+
map,
|
|
2329
|
+
zIndex,
|
|
2330
|
+
opacity,
|
|
2331
|
+
label,
|
|
2332
|
+
icon
|
|
2333
|
+
});
|
|
2334
|
+
if (markerRef) {
|
|
2335
|
+
markerRef.current = this.marker;
|
|
2336
|
+
}
|
|
2337
|
+
this.attachMoveHandler();
|
|
2338
|
+
this.attachClickHandler();
|
|
2339
|
+
}
|
|
2340
|
+
componentDidUpdate(prevProps) {
|
|
2341
|
+
if (!this.marker) {
|
|
2342
|
+
return;
|
|
2343
|
+
}
|
|
2344
|
+
const {
|
|
2345
|
+
position,
|
|
2346
|
+
onMove,
|
|
2347
|
+
label,
|
|
2348
|
+
zIndex,
|
|
2349
|
+
opacity,
|
|
2350
|
+
map
|
|
2351
|
+
} = this.props;
|
|
2352
|
+
if (prevProps.onMove !== onMove) {
|
|
2353
|
+
this.attachMoveHandler();
|
|
2354
|
+
}
|
|
2355
|
+
if (!latLngAreEqual(prevProps.position, position)) {
|
|
2356
|
+
this.marker.setPosition(position);
|
|
2357
|
+
}
|
|
2358
|
+
if (prevProps.label !== label) {
|
|
2359
|
+
this.marker.setLabel(label || null);
|
|
2360
|
+
}
|
|
2361
|
+
if (prevProps.zIndex !== zIndex) {
|
|
2362
|
+
this.marker.setZIndex(zIndex || null);
|
|
2363
|
+
}
|
|
2364
|
+
if (prevProps.opacity !== opacity) {
|
|
2365
|
+
this.marker.setOpacity(opacity || null);
|
|
2366
|
+
}
|
|
2367
|
+
if (prevProps.map !== map) {
|
|
2368
|
+
this.marker.setMap(map);
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
componentWillUnmount() {
|
|
2372
|
+
if (this.eventHandlers.move) {
|
|
2373
|
+
this.eventHandlers.move.remove();
|
|
2374
|
+
}
|
|
2375
|
+
if (this.marker) {
|
|
2376
|
+
this.marker.setMap(null);
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
attachMoveHandler() {
|
|
2380
|
+
const {
|
|
2381
|
+
api,
|
|
2382
|
+
onMove
|
|
2383
|
+
} = this.props;
|
|
2384
|
+
if (this.eventHandlers.move) {
|
|
2385
|
+
this.eventHandlers.move.remove();
|
|
2386
|
+
}
|
|
2387
|
+
if (this.marker && onMove) {
|
|
2388
|
+
this.eventHandlers.move = api.event.addListener(this.marker, "dragend", onMove);
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
attachClickHandler() {
|
|
2392
|
+
const {
|
|
2393
|
+
api,
|
|
2394
|
+
onClick
|
|
2395
|
+
} = this.props;
|
|
2396
|
+
if (this.eventHandlers.click) {
|
|
2397
|
+
this.eventHandlers.click.remove();
|
|
2398
|
+
}
|
|
2399
|
+
if (this.marker && onClick) {
|
|
2400
|
+
this.eventHandlers.click = api.event.addListener(this.marker, "click", onClick);
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
// eslint-disable-next-line class-methods-use-this
|
|
2404
|
+
render() {
|
|
2405
|
+
return null;
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
var __defProp$4 = Object.defineProperty;
|
|
2409
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
|
|
2410
|
+
enumerable: true,
|
|
2411
|
+
configurable: true,
|
|
2412
|
+
writable: true,
|
|
2413
|
+
value
|
|
2414
|
+
}) : obj[key] = value;
|
|
2415
|
+
var __publicField$2 = (obj, key, value) => {
|
|
2416
|
+
__defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2417
|
+
return value;
|
|
2418
|
+
};
|
|
2419
|
+
const fallbackLatLng = {
|
|
2420
|
+
lat: 40.7058254,
|
|
2421
|
+
lng: -74.1180863
|
|
2422
|
+
};
|
|
2423
|
+
class GeopointSelect extends r__default.PureComponent {
|
|
2424
|
+
constructor() {
|
|
2425
|
+
super(...arguments);
|
|
2426
|
+
__publicField$2(this, "mapRef", r__default.createRef());
|
|
2427
|
+
__publicField$2(this, "handlePlaceChanged", place => {
|
|
2428
|
+
var _a;
|
|
2429
|
+
if (!((_a = place.geometry) == null ? void 0 : _a.location)) {
|
|
2430
|
+
return;
|
|
2431
|
+
}
|
|
2432
|
+
this.setValue(place.geometry.location);
|
|
2433
|
+
});
|
|
2434
|
+
__publicField$2(this, "handleMarkerDragEnd", event => {
|
|
2435
|
+
if (event.latLng) this.setValue(event.latLng);
|
|
2436
|
+
});
|
|
2437
|
+
__publicField$2(this, "handleMapClick", event => {
|
|
2438
|
+
if (event.latLng) this.setValue(event.latLng);
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
getCenter() {
|
|
2442
|
+
const {
|
|
2443
|
+
value = {},
|
|
2444
|
+
defaultLocation = {}
|
|
2445
|
+
} = this.props;
|
|
2446
|
+
const point = {
|
|
2447
|
+
...fallbackLatLng,
|
|
2448
|
+
...defaultLocation,
|
|
2449
|
+
...value
|
|
2450
|
+
};
|
|
2451
|
+
return point;
|
|
2452
|
+
}
|
|
2453
|
+
setValue(geoPoint) {
|
|
2454
|
+
if (this.props.onChange) {
|
|
2455
|
+
this.props.onChange(geoPoint);
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
render() {
|
|
2459
|
+
const {
|
|
2460
|
+
api,
|
|
2461
|
+
defaultZoom,
|
|
2462
|
+
value,
|
|
2463
|
+
onChange
|
|
2464
|
+
} = this.props;
|
|
2465
|
+
return /* @__PURE__ */jsx(GoogleMap, {
|
|
2466
|
+
api,
|
|
2467
|
+
location: this.getCenter(),
|
|
2468
|
+
onClick: this.handleMapClick,
|
|
2469
|
+
defaultZoom,
|
|
2470
|
+
children: map => /* @__PURE__ */jsxs(Fragment, {
|
|
2471
|
+
children: [/* @__PURE__ */jsx(SearchInput, {
|
|
2472
|
+
api,
|
|
2473
|
+
map,
|
|
2474
|
+
onChange: this.handlePlaceChanged
|
|
2475
|
+
}), value && /* @__PURE__ */jsx(Marker, {
|
|
2476
|
+
api,
|
|
2477
|
+
map,
|
|
2478
|
+
position: value,
|
|
2479
|
+
onMove: onChange ? this.handleMarkerDragEnd : void 0
|
|
2480
|
+
})]
|
|
2481
|
+
})
|
|
2482
|
+
});
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
__publicField$2(GeopointSelect, "defaultProps", {
|
|
2486
|
+
defaultZoom: 8,
|
|
2487
|
+
defaultLocation: {
|
|
2488
|
+
lng: 10.74609,
|
|
2489
|
+
lat: 59.91273
|
|
2490
|
+
}
|
|
2491
|
+
});
|
|
2492
|
+
var __freeze$1 = Object.freeze;
|
|
2493
|
+
var __defProp$3 = Object.defineProperty;
|
|
2494
|
+
var __template$1 = (cooked, raw) => __freeze$1(__defProp$3(cooked, "raw", {
|
|
2495
|
+
value: __freeze$1(raw || cooked.slice())
|
|
2496
|
+
}));
|
|
2497
|
+
var _a$1, _b;
|
|
2498
|
+
const PreviewImage = styled.img(_a$1 || (_a$1 = __template$1(["\n width: 100%;\n height: auto;\n vertical-align: top;\n"])));
|
|
2499
|
+
const DialogInnerContainer = styled.div(_b || (_b = __template$1(["\n height: 40rem;\n width: 50rem;\n"])));
|
|
2500
|
+
let config;
|
|
2501
|
+
function getGeoConfig() {
|
|
2502
|
+
return config;
|
|
2503
|
+
}
|
|
2504
|
+
function setGeoConfig(newConfig) {
|
|
2505
|
+
config = newConfig;
|
|
2506
|
+
}
|
|
2507
|
+
var __defProp$2 = Object.defineProperty;
|
|
2508
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
|
|
2509
|
+
enumerable: true,
|
|
2510
|
+
configurable: true,
|
|
2511
|
+
writable: true,
|
|
2512
|
+
value
|
|
2513
|
+
}) : obj[key] = value;
|
|
2514
|
+
var __publicField$1 = (obj, key, value) => {
|
|
2515
|
+
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2516
|
+
return value;
|
|
2517
|
+
};
|
|
2518
|
+
const getStaticImageUrl = (value, apiKey) => {
|
|
2519
|
+
const loc = "".concat(value.lat, ",").concat(value.lng);
|
|
2520
|
+
const params = {
|
|
2521
|
+
key: apiKey,
|
|
2522
|
+
center: loc,
|
|
2523
|
+
markers: loc,
|
|
2524
|
+
zoom: 13,
|
|
2525
|
+
scale: 2,
|
|
2526
|
+
size: "640x300"
|
|
2527
|
+
};
|
|
2528
|
+
const qs = Object.keys(params).reduce((res, param) => {
|
|
2529
|
+
return res.concat("".concat(param, "=").concat(encodeURIComponent(params[param])));
|
|
2530
|
+
}, []);
|
|
2531
|
+
return "https://maps.googleapis.com/maps/api/staticmap?".concat(qs.join("&"));
|
|
2532
|
+
};
|
|
2533
|
+
class GeopointInput extends r__default.PureComponent {
|
|
2534
|
+
constructor(props) {
|
|
2535
|
+
super(props);
|
|
2536
|
+
__publicField$1(this, "_geopointInputId", uniqueId("GeopointInput"));
|
|
2537
|
+
__publicField$1(this, "editButton");
|
|
2538
|
+
__publicField$1(this, "setEditButton", el => {
|
|
2539
|
+
this.editButton = el;
|
|
2540
|
+
});
|
|
2541
|
+
__publicField$1(this, "handleToggleModal", () => {
|
|
2542
|
+
this.setState(prevState => ({
|
|
2543
|
+
modalOpen: !prevState.modalOpen
|
|
2544
|
+
}));
|
|
2545
|
+
});
|
|
2546
|
+
__publicField$1(this, "handleCloseModal", () => {
|
|
2547
|
+
this.setState({
|
|
2548
|
+
modalOpen: false
|
|
2549
|
+
});
|
|
2550
|
+
});
|
|
2551
|
+
__publicField$1(this, "handleChange", latLng => {
|
|
2552
|
+
const {
|
|
2553
|
+
schemaType,
|
|
2554
|
+
onChange
|
|
2555
|
+
} = this.props;
|
|
2556
|
+
onChange([setIfMissing({
|
|
2557
|
+
_type: schemaType.name
|
|
2558
|
+
}), set(latLng.lat(), ["lat"]), set(latLng.lng(), ["lng"])]);
|
|
2559
|
+
});
|
|
2560
|
+
__publicField$1(this, "handleClear", () => {
|
|
2561
|
+
const {
|
|
2562
|
+
onChange
|
|
2563
|
+
} = this.props;
|
|
2564
|
+
onChange(unset());
|
|
2565
|
+
});
|
|
2566
|
+
this.state = {
|
|
2567
|
+
modalOpen: false
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
focus() {
|
|
2571
|
+
if (this.editButton) {
|
|
2572
|
+
this.editButton.focus();
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
render() {
|
|
2576
|
+
const {
|
|
2577
|
+
value,
|
|
2578
|
+
readOnly,
|
|
2579
|
+
geoConfig: config,
|
|
2580
|
+
path,
|
|
2581
|
+
changed,
|
|
2582
|
+
focused
|
|
2583
|
+
} = this.props;
|
|
2584
|
+
const {
|
|
2585
|
+
modalOpen
|
|
2586
|
+
} = this.state;
|
|
2587
|
+
if (!config || !config.apiKey) {
|
|
2588
|
+
return /* @__PURE__ */jsxs("div", {
|
|
2589
|
+
children: [/* @__PURE__ */jsxs("p", {
|
|
2590
|
+
children: ["The ", /* @__PURE__ */jsx("a", {
|
|
2591
|
+
href: "https://sanity.io/docs/schema-types/geopoint-type",
|
|
2592
|
+
children: "Geopoint type"
|
|
2593
|
+
}), " needs a Google Maps API key with access to:"]
|
|
2594
|
+
}), /* @__PURE__ */jsxs("ul", {
|
|
2595
|
+
children: [/* @__PURE__ */jsx("li", {
|
|
2596
|
+
children: "Google Maps JavaScript API"
|
|
2597
|
+
}), /* @__PURE__ */jsx("li", {
|
|
2598
|
+
children: "Google Places API Web Service"
|
|
2599
|
+
}), /* @__PURE__ */jsx("li", {
|
|
2600
|
+
children: "Google Static Maps API"
|
|
2601
|
+
})]
|
|
2602
|
+
}), /* @__PURE__ */jsx("p", {
|
|
2603
|
+
children: "Please enter the API key with access to these services in your googleMapsInput plugin config."
|
|
2604
|
+
})]
|
|
2605
|
+
});
|
|
2606
|
+
}
|
|
2607
|
+
return /* @__PURE__ */jsxs(Stack, {
|
|
2608
|
+
space: 3,
|
|
2609
|
+
children: [value && /* @__PURE__ */jsx(ChangeIndicator, {
|
|
2610
|
+
path,
|
|
2611
|
+
isChanged: changed,
|
|
2612
|
+
hasFocus: !!focused,
|
|
2613
|
+
children: /* @__PURE__ */jsx(PreviewImage, {
|
|
2614
|
+
src: getStaticImageUrl(value, config.apiKey),
|
|
2615
|
+
alt: "Map location"
|
|
2616
|
+
})
|
|
2617
|
+
}), /* @__PURE__ */jsx(Box, {
|
|
2618
|
+
children: /* @__PURE__ */jsxs(Grid, {
|
|
2619
|
+
columns: value ? 2 : 1,
|
|
2620
|
+
gap: 3,
|
|
2621
|
+
children: [/* @__PURE__ */jsx(Button, {
|
|
2622
|
+
mode: "ghost",
|
|
2623
|
+
icon: value && EditIcon,
|
|
2624
|
+
padding: 3,
|
|
2625
|
+
ref: this.setEditButton,
|
|
2626
|
+
text: value ? "Edit" : "Set location",
|
|
2627
|
+
onClick: this.handleToggleModal,
|
|
2628
|
+
disabled: readOnly
|
|
2629
|
+
}), value && /* @__PURE__ */jsx(Button, {
|
|
2630
|
+
tone: "critical",
|
|
2631
|
+
icon: TrashIcon,
|
|
2632
|
+
padding: 3,
|
|
2633
|
+
mode: "ghost",
|
|
2634
|
+
text: "Remove",
|
|
2635
|
+
onClick: this.handleClear,
|
|
2636
|
+
disabled: readOnly
|
|
2637
|
+
})]
|
|
2638
|
+
})
|
|
2639
|
+
}), modalOpen && /* @__PURE__ */jsx(Dialog, {
|
|
2640
|
+
id: "".concat(this._geopointInputId, "_dialog"),
|
|
2641
|
+
onClose: this.handleCloseModal,
|
|
2642
|
+
header: "Place the marker on the map",
|
|
2643
|
+
width: 1,
|
|
2644
|
+
children: /* @__PURE__ */jsx(DialogInnerContainer, {
|
|
2645
|
+
children: /* @__PURE__ */jsx(GoogleMapsLoadProxy, {
|
|
2646
|
+
config: getGeoConfig(),
|
|
2647
|
+
children: api => /* @__PURE__ */jsx(GeopointSelect, {
|
|
2648
|
+
api,
|
|
2649
|
+
value: value || void 0,
|
|
2650
|
+
onChange: readOnly ? void 0 : this.handleChange,
|
|
2651
|
+
defaultLocation: config.defaultLocation,
|
|
2652
|
+
defaultZoom: config.defaultZoom
|
|
2653
|
+
})
|
|
2654
|
+
})
|
|
2655
|
+
})
|
|
2656
|
+
})]
|
|
2657
|
+
});
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
var __defProp$1 = Object.defineProperty;
|
|
2661
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
|
|
2662
|
+
enumerable: true,
|
|
2663
|
+
configurable: true,
|
|
2664
|
+
writable: true,
|
|
2665
|
+
value
|
|
2666
|
+
}) : obj[key] = value;
|
|
2667
|
+
var __publicField = (obj, key, value) => {
|
|
2668
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2669
|
+
return value;
|
|
2670
|
+
};
|
|
2671
|
+
class Arrow extends r.PureComponent {
|
|
2672
|
+
constructor() {
|
|
2673
|
+
super(...arguments);
|
|
2674
|
+
__publicField(this, "line");
|
|
2675
|
+
__publicField(this, "eventHandlers", {});
|
|
2676
|
+
}
|
|
2677
|
+
componentDidMount() {
|
|
2678
|
+
const {
|
|
2679
|
+
from,
|
|
2680
|
+
to,
|
|
2681
|
+
api,
|
|
2682
|
+
map,
|
|
2683
|
+
zIndex,
|
|
2684
|
+
onClick,
|
|
2685
|
+
color,
|
|
2686
|
+
arrowRef
|
|
2687
|
+
} = this.props;
|
|
2688
|
+
const lineSymbol = {
|
|
2689
|
+
path: api.SymbolPath.FORWARD_OPEN_ARROW
|
|
2690
|
+
};
|
|
2691
|
+
this.line = new api.Polyline({
|
|
2692
|
+
map,
|
|
2693
|
+
zIndex,
|
|
2694
|
+
path: [from, to],
|
|
2695
|
+
icons: [{
|
|
2696
|
+
icon: lineSymbol,
|
|
2697
|
+
offset: "50%"
|
|
2698
|
+
}],
|
|
2699
|
+
strokeOpacity: 0.55,
|
|
2700
|
+
strokeColor: color ? color.text : "black"
|
|
2701
|
+
});
|
|
2702
|
+
if (onClick) {
|
|
2703
|
+
this.eventHandlers.click = api.event.addListener(this.line, "click", onClick);
|
|
2704
|
+
}
|
|
2705
|
+
if (arrowRef) {
|
|
2706
|
+
arrowRef.current = this.line;
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
componentDidUpdate(prevProps) {
|
|
2710
|
+
if (!this.line) {
|
|
2711
|
+
return;
|
|
2712
|
+
}
|
|
2713
|
+
const {
|
|
2714
|
+
from,
|
|
2715
|
+
to,
|
|
2716
|
+
map
|
|
2717
|
+
} = this.props;
|
|
2718
|
+
if (!latLngAreEqual(prevProps.from, from) || !latLngAreEqual(prevProps.to, to)) {
|
|
2719
|
+
this.line.setPath([from, to]);
|
|
2720
|
+
}
|
|
2721
|
+
if (prevProps.map !== map) {
|
|
2722
|
+
this.line.setMap(map);
|
|
2723
|
+
}
|
|
2724
|
+
}
|
|
2725
|
+
componentWillUnmount() {
|
|
2726
|
+
if (this.line) {
|
|
2727
|
+
this.line.setMap(null);
|
|
2728
|
+
}
|
|
2729
|
+
if (this.eventHandlers.click) {
|
|
2730
|
+
this.eventHandlers.click.remove();
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
// eslint-disable-next-line class-methods-use-this
|
|
2734
|
+
render() {
|
|
2735
|
+
return null;
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
function GeopointMove(_ref) {
|
|
2739
|
+
let {
|
|
2740
|
+
diff,
|
|
2741
|
+
api,
|
|
2742
|
+
map,
|
|
2743
|
+
label
|
|
2744
|
+
} = _ref;
|
|
2745
|
+
const {
|
|
2746
|
+
fromValue: from,
|
|
2747
|
+
toValue: to
|
|
2748
|
+
} = diff;
|
|
2749
|
+
const annotation = diff.isChanged ? diff.annotation : void 0;
|
|
2750
|
+
const userColor = useUserColor(annotation ? annotation.author : null) || void 0;
|
|
2751
|
+
const fromRef = r.useRef();
|
|
2752
|
+
const toRef = r.useRef();
|
|
2753
|
+
return /* @__PURE__ */jsxs(Fragment, {
|
|
2754
|
+
children: [from && /* @__PURE__ */jsx(Marker, {
|
|
2755
|
+
api,
|
|
2756
|
+
map,
|
|
2757
|
+
position: from,
|
|
2758
|
+
zIndex: 0,
|
|
2759
|
+
opacity: 0.55,
|
|
2760
|
+
markerRef: fromRef,
|
|
2761
|
+
color: userColor
|
|
2762
|
+
}), from && to && /* @__PURE__ */jsx(Arrow, {
|
|
2763
|
+
api,
|
|
2764
|
+
map,
|
|
2765
|
+
from,
|
|
2766
|
+
to,
|
|
2767
|
+
zIndex: 1,
|
|
2768
|
+
color: userColor
|
|
2769
|
+
}), to && /* @__PURE__ */jsx(Marker, {
|
|
2770
|
+
api,
|
|
2771
|
+
map,
|
|
2772
|
+
position: to,
|
|
2773
|
+
zIndex: 2,
|
|
2774
|
+
markerRef: toRef,
|
|
2775
|
+
label,
|
|
2776
|
+
color: userColor
|
|
2777
|
+
})]
|
|
2778
|
+
});
|
|
2779
|
+
}
|
|
2780
|
+
var __freeze = Object.freeze;
|
|
2781
|
+
var __defProp = Object.defineProperty;
|
|
2782
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", {
|
|
2783
|
+
value: __freeze(raw || cooked.slice())
|
|
2784
|
+
}));
|
|
2785
|
+
var _a;
|
|
2786
|
+
const RootContainer = styled.div(_a || (_a = __template(["\n position: relative;\n min-height: 200px;\n\n &:empty {\n background-color: var(--card-skeleton-color-from);\n display: table;\n width: 100%;\n }\n\n &:empty:after {\n content: 'Missing/invalid data';\n display: table-cell;\n vertical-align: middle;\n text-align: center;\n position: relative;\n }\n"])));
|
|
2787
|
+
const GeopointArrayDiff = _ref2 => {
|
|
2788
|
+
let {
|
|
2789
|
+
diff,
|
|
2790
|
+
schemaType
|
|
2791
|
+
} = _ref2;
|
|
2792
|
+
return /* @__PURE__ */jsx(RootContainer, {
|
|
2793
|
+
children: /* @__PURE__ */jsx(GoogleMapsLoadProxy, {
|
|
2794
|
+
config: getGeoConfig(),
|
|
2795
|
+
children: api => /* @__PURE__ */jsx(GeopointDiff$1, {
|
|
2796
|
+
api,
|
|
2797
|
+
diff,
|
|
2798
|
+
schemaType
|
|
2799
|
+
})
|
|
2800
|
+
})
|
|
2801
|
+
});
|
|
2802
|
+
};
|
|
2803
|
+
function GeopointDiff$1(_ref3) {
|
|
2804
|
+
let {
|
|
2805
|
+
api,
|
|
2806
|
+
diff
|
|
2807
|
+
} = _ref3;
|
|
2808
|
+
const fromValue = (diff.fromValue || []).filter(hasCoordinates);
|
|
2809
|
+
const toValue = (diff.toValue || []).filter(hasCoordinates);
|
|
2810
|
+
if (fromValue.length === 0 && toValue.length === 0) {
|
|
2811
|
+
return null;
|
|
2812
|
+
}
|
|
2813
|
+
const bounds = getBounds$1(fromValue, toValue, api);
|
|
2814
|
+
return /* @__PURE__ */jsx(GoogleMap, {
|
|
2815
|
+
api,
|
|
2816
|
+
location: bounds.getCenter().toJSON(),
|
|
2817
|
+
mapTypeControl: false,
|
|
2818
|
+
controlSize: 20,
|
|
2819
|
+
bounds,
|
|
2820
|
+
children: map => /* @__PURE__ */jsx(Fragment, {
|
|
2821
|
+
children: diff.items.map(_ref4 => {
|
|
2822
|
+
let {
|
|
2823
|
+
toIndex,
|
|
2824
|
+
diff: pointDiff
|
|
2825
|
+
} = _ref4;
|
|
2826
|
+
if (!isChangeDiff(pointDiff)) {
|
|
2827
|
+
return null;
|
|
2828
|
+
}
|
|
2829
|
+
return /* @__PURE__ */jsx(GeopointMove, {
|
|
2830
|
+
api,
|
|
2831
|
+
map,
|
|
2832
|
+
diff: pointDiff,
|
|
2833
|
+
label: "".concat(toIndex)
|
|
2834
|
+
}, toIndex);
|
|
2835
|
+
})
|
|
2836
|
+
})
|
|
2837
|
+
});
|
|
2838
|
+
}
|
|
2839
|
+
function isChangeDiff(diff) {
|
|
2840
|
+
return diff.action !== "unchanged" && diff.type === "object";
|
|
2841
|
+
}
|
|
2842
|
+
function hasCoordinates(point) {
|
|
2843
|
+
return typeof point.lat === "number" && typeof point.lng === "number";
|
|
2844
|
+
}
|
|
2845
|
+
function getBounds$1(fromValue, toValue, api) {
|
|
2846
|
+
const bounds = new api.LatLngBounds();
|
|
2847
|
+
const points = [...(fromValue || []), ...(toValue || [])];
|
|
2848
|
+
points.forEach(point => bounds.extend(point));
|
|
2849
|
+
return bounds;
|
|
2850
|
+
}
|
|
2851
|
+
const GeopointFieldDiff = _ref5 => {
|
|
2852
|
+
let {
|
|
2853
|
+
diff,
|
|
2854
|
+
schemaType
|
|
2855
|
+
} = _ref5;
|
|
2856
|
+
return /* @__PURE__ */jsx(RootContainer, {
|
|
2857
|
+
children: /* @__PURE__ */jsx(GoogleMapsLoadProxy, {
|
|
2858
|
+
config: getGeoConfig(),
|
|
2859
|
+
children: api => /* @__PURE__ */jsx(GeopointDiff, {
|
|
2860
|
+
api,
|
|
2861
|
+
diff,
|
|
2862
|
+
schemaType
|
|
2863
|
+
})
|
|
2864
|
+
})
|
|
2865
|
+
});
|
|
2866
|
+
};
|
|
2867
|
+
function GeopointDiff(_ref6) {
|
|
2868
|
+
let {
|
|
2869
|
+
api,
|
|
2870
|
+
diff
|
|
2871
|
+
} = _ref6;
|
|
2872
|
+
const {
|
|
2873
|
+
fromValue,
|
|
2874
|
+
toValue
|
|
2875
|
+
} = diff;
|
|
2876
|
+
const annotation = getAnnotationAtPath(diff, ["lat"]) || getAnnotationAtPath(diff, ["lng"]) || getAnnotationAtPath(diff, []);
|
|
2877
|
+
const center = getCenter(diff, api);
|
|
2878
|
+
const bounds = fromValue && toValue ? getBounds(fromValue, toValue, api) : void 0;
|
|
2879
|
+
return /* @__PURE__ */jsx(DiffTooltip, {
|
|
2880
|
+
annotations: annotation ? [annotation] : [],
|
|
2881
|
+
description: getAction(diff),
|
|
2882
|
+
children: /* @__PURE__ */jsx("div", {
|
|
2883
|
+
children: /* @__PURE__ */jsx(GoogleMap, {
|
|
2884
|
+
api,
|
|
2885
|
+
location: center,
|
|
2886
|
+
mapTypeControl: false,
|
|
2887
|
+
controlSize: 20,
|
|
2888
|
+
bounds,
|
|
2889
|
+
scrollWheel: false,
|
|
2890
|
+
children: map => /* @__PURE__ */jsx(GeopointMove, {
|
|
2891
|
+
api,
|
|
2892
|
+
map,
|
|
2893
|
+
diff
|
|
2894
|
+
})
|
|
2895
|
+
})
|
|
2896
|
+
})
|
|
2897
|
+
});
|
|
2898
|
+
}
|
|
2899
|
+
function getBounds(fromValue, toValue, api) {
|
|
2900
|
+
return new api.LatLngBounds().extend(fromValue).extend(toValue);
|
|
2901
|
+
}
|
|
2902
|
+
function getCenter(diff, api) {
|
|
2903
|
+
const {
|
|
2904
|
+
fromValue,
|
|
2905
|
+
toValue
|
|
2906
|
+
} = diff;
|
|
2907
|
+
if (fromValue && toValue) {
|
|
2908
|
+
return getBounds(fromValue, toValue, api).getCenter().toJSON();
|
|
2909
|
+
}
|
|
2910
|
+
if (fromValue) {
|
|
2911
|
+
return fromValue;
|
|
2912
|
+
}
|
|
2913
|
+
if (toValue) {
|
|
2914
|
+
return toValue;
|
|
2915
|
+
}
|
|
2916
|
+
throw new Error("Neither a from or a to value present");
|
|
2917
|
+
}
|
|
2918
|
+
function getAction(diff) {
|
|
2919
|
+
const {
|
|
2920
|
+
fromValue,
|
|
2921
|
+
toValue
|
|
2922
|
+
} = diff;
|
|
2923
|
+
if (fromValue && toValue) {
|
|
2924
|
+
return "Moved";
|
|
2925
|
+
} else if (fromValue) {
|
|
2926
|
+
return "Removed";
|
|
2927
|
+
} else if (toValue) {
|
|
2928
|
+
return "Added";
|
|
2929
|
+
}
|
|
2930
|
+
return "Unchanged";
|
|
2931
|
+
}
|
|
2932
|
+
const googleMapsInput = definePlugin(config => {
|
|
2933
|
+
setGeoConfig(config);
|
|
2934
|
+
return {
|
|
2935
|
+
name: "google-maps-input",
|
|
2936
|
+
form: {
|
|
2937
|
+
components: {
|
|
2938
|
+
input(props) {
|
|
2939
|
+
if (isGeopoint(props.schemaType)) {
|
|
2940
|
+
const castedProps = props;
|
|
2941
|
+
return /* @__PURE__ */jsx(GeopointInput, {
|
|
2942
|
+
...castedProps,
|
|
2943
|
+
geoConfig: config
|
|
2944
|
+
});
|
|
2945
|
+
}
|
|
2946
|
+
return props.renderDefault(props);
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
};
|
|
2951
|
+
});
|
|
2952
|
+
function isGeopoint(schemaType) {
|
|
2953
|
+
return isType("geopoint", schemaType);
|
|
2954
|
+
}
|
|
2955
|
+
function isType(name, schema) {
|
|
2956
|
+
if ((schema == null ? void 0 : schema.name) === name) {
|
|
2957
|
+
return true;
|
|
2958
|
+
} else if (!(schema == null ? void 0 : schema.name)) {
|
|
2959
|
+
return false;
|
|
2960
|
+
}
|
|
2961
|
+
return isType(name, schema == null ? void 0 : schema.type);
|
|
2962
|
+
}
|
|
2963
|
+
export { GeopointArrayDiff, GeopointFieldDiff, GeopointInput, googleMapsInput };
|
|
2964
|
+
//# sourceMappingURL=index.esm.js.map
|