@madebywild/sanity-richtext-field 0.1.19 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var jsxRuntime = require("react/jsx-runtime"), sanity = require("sanity"), o = require("react"), tsDeepmerge = require("ts-deepmerge"), icons = require("@sanity/icons"), sanityMediaField = require("@madebywild/sanity-media-field");
3
+ var jsxRuntime = require("react/jsx-runtime"), sanity = require("sanity"), React = require("react"), tsDeepmerge = require("ts-deepmerge"), styledComponents = require("styled-components"), icons = require("@sanity/icons"), sanityMediaField = require("@madebywild/sanity-media-field");
4
4
  function _interopNamespaceCompat(e) {
5
5
  if (e && typeof e == "object" && "default" in e) return e;
6
6
  var n = /* @__PURE__ */ Object.create(null);
7
- return e && Object.keys(e).forEach(function(k2) {
8
- if (k2 !== "default") {
9
- var d = Object.getOwnPropertyDescriptor(e, k2);
10
- Object.defineProperty(n, k2, d.get ? d : {
7
+ return e && Object.keys(e).forEach(function(k) {
8
+ if (k !== "default") {
9
+ var d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
11
  enumerable: !0,
12
12
  get: function() {
13
- return e[k2];
13
+ return e[k];
14
14
  }
15
15
  });
16
16
  }
17
17
  }), n.default = e, Object.freeze(n);
18
18
  }
19
- var o__namespace = /* @__PURE__ */ _interopNamespaceCompat(o);
19
+ var React__namespace = /* @__PURE__ */ _interopNamespaceCompat(React);
20
20
  const presets = {
21
21
  basic: {
22
22
  size: "sm",
@@ -65,18 +65,18 @@ function RichtextInput({
65
65
  richtextConfig,
66
66
  ...props
67
67
  }) {
68
- const schemaOptions = props.schemaType.options, presetOptions = schemaOptions?.preset ? presets[schemaOptions.preset] : {}, options = o__namespace.useMemo(() => {
68
+ const schemaOptions = props.schemaType.options, presetOptions = schemaOptions?.preset ? presets[schemaOptions.preset] : {}, options = React__namespace.useMemo(() => {
69
69
  const {
70
- preset: _2,
70
+ preset: _,
71
71
  ...mainOptions
72
72
  } = schemaOptions ?? {};
73
73
  return tsDeepmerge.merge(presetOptions, mainOptions);
74
74
  }, [schemaOptions, presetOptions]), initiallyActive = options?.initiallyActive ?? !1, height = options?.size && options.size in sizeToHeightMap ? sizeToHeightMap[options.size] : options?.size, whitelist = options?.whitelist, blacklist = options?.blacklist;
75
75
  whitelist && blacklist && console.warn("Wild Sanity Rich Text Field: Both whitelist and blacklist are set. Whitelist will take precedence.");
76
- const filterPartsBy = o__namespace.useCallback((parts2, findNeedle) => parts2?.filter((b) => {
76
+ const filterPartsBy = React__namespace.useCallback((parts2, findNeedle) => parts2?.filter((b) => {
77
77
  const needle = findNeedle(b);
78
78
  return needle ? whitelist ? whitelist.includes(needle) : blacklist ? !blacklist.includes(needle) : !1 : !0;
79
- }), [whitelist, blacklist]), enabledParts = o__namespace.useMemo(() => {
79
+ }), [whitelist, blacklist]), enabledParts = React__namespace.useMemo(() => {
80
80
  const blocks2 = filterPartsBy(richtextConfig.blocks, (s) => s.name), spans2 = filterPartsBy(richtextConfig.spans, (s_0) => s_0.name), lists2 = filterPartsBy(richtextConfig.lists, (s_1) => s_1.value), annotations2 = filterPartsBy(richtextConfig.annotations, (s_2) => s_2.name), decorators2 = filterPartsBy(richtextConfig.decorators, (s_3) => s_3.value), styles2 = filterPartsBy(richtextConfig.styles, (s_4) => s_4.value), normalizedStyles = [{
81
81
  value: "normal",
82
82
  title: "Normal"
@@ -89,10 +89,10 @@ function RichtextInput({
89
89
  decorators: decorators2,
90
90
  styles: normalizedStyles
91
91
  };
92
- }, [filterPartsBy]), reshapeSchemaTypes = o__namespace.useCallback((schema) => schema.name !== "block" ? schema : {
92
+ }, [filterPartsBy]), reshapeSchemaTypes = React__namespace.useCallback((schema) => schema.name !== "block" ? schema : {
93
93
  ...schema,
94
- fields: schema.fields?.map((f2) => {
95
- const field = f2;
94
+ fields: schema.fields?.map((f) => {
95
+ const field = f;
96
96
  switch (field.name) {
97
97
  // Headings, Normal, Quote, etc.
98
98
  case "style":
@@ -129,7 +129,7 @@ function RichtextInput({
129
129
  return field;
130
130
  }
131
131
  })
132
- }, [enabledParts]), patchedSchemaType = o__namespace.useMemo(() => {
132
+ }, [enabledParts]), patchedSchemaType = React__namespace.useMemo(() => {
133
133
  const of = props.schemaType?.of;
134
134
  if (!Array.isArray(of)) return props.schemaType;
135
135
  try {
@@ -141,7 +141,7 @@ function RichtextInput({
141
141
  } catch (e) {
142
142
  return console.error("Wild Sanity Rich Text Field: Error while reshaping schema types.", e), props.schemaType;
143
143
  }
144
- }, [props.schemaType, enabledParts.blocks, reshapeSchemaTypes]), enabledPartsCount = o__namespace.useMemo(() => Object.values(enabledParts).reduce((acc, curr) => acc + curr.length, 0), [enabledParts]);
144
+ }, [props.schemaType, enabledParts.blocks, reshapeSchemaTypes]), enabledPartsCount = React__namespace.useMemo(() => Object.values(enabledParts).reduce((acc, curr) => acc + curr.length, 0), [enabledParts]);
145
145
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
146
146
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
147
147
  [data-wild-richtext-field] [data-testid="pt-editor"][data-fullscreen="false"] {
@@ -177,1248 +177,7 @@ function RichtextInput({
177
177
  }) })
178
178
  ] });
179
179
  }
180
- var __assign = function() {
181
- return __assign = Object.assign || function(t) {
182
- for (var s, i = 1, n = arguments.length; i < n; i++) {
183
- s = arguments[i];
184
- for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
185
- }
186
- return t;
187
- }, __assign.apply(this, arguments);
188
- };
189
- function __spreadArray(to, from2, pack) {
190
- if (pack || arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++)
191
- (ar || !(i in from2)) && (ar || (ar = Array.prototype.slice.call(from2, 0, i)), ar[i] = from2[i]);
192
- return to.concat(ar || Array.prototype.slice.call(from2));
193
- }
194
- function memoize(fn) {
195
- var cache = /* @__PURE__ */ Object.create(null);
196
- return function(arg) {
197
- return cache[arg] === void 0 && (cache[arg] = fn(arg)), cache[arg];
198
- };
199
- }
200
- 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|disableRemotePlayback|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)-.*))$/, isPropValid = /* @__PURE__ */ memoize(
201
- function(prop) {
202
- return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
203
- }
204
- /* Z+1 */
205
- ), MS = "-ms-", MOZ = "-moz-", WEBKIT = "-webkit-", COMMENT = "comm", RULESET = "rule", DECLARATION = "decl", IMPORT = "@import", KEYFRAMES = "@keyframes", LAYER = "@layer", abs = Math.abs, from = String.fromCharCode, assign = Object.assign;
206
- function hash(value, length2) {
207
- return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
208
- }
209
- function trim(value) {
210
- return value.trim();
211
- }
212
- function match(value, pattern) {
213
- return (value = pattern.exec(value)) ? value[0] : value;
214
- }
215
- function replace(value, pattern, replacement) {
216
- return value.replace(pattern, replacement);
217
- }
218
- function indexof(value, search, position2) {
219
- return value.indexOf(search, position2);
220
- }
221
- function charat(value, index) {
222
- return value.charCodeAt(index) | 0;
223
- }
224
- function substr(value, begin, end) {
225
- return value.slice(begin, end);
226
- }
227
- function strlen(value) {
228
- return value.length;
229
- }
230
- function sizeof(value) {
231
- return value.length;
232
- }
233
- function append(value, array) {
234
- return array.push(value), value;
235
- }
236
- function combine(array, callback) {
237
- return array.map(callback).join("");
238
- }
239
- function filter(array, pattern) {
240
- return array.filter(function(value) {
241
- return !match(value, pattern);
242
- });
243
- }
244
- var line = 1, column = 1, length = 0, position = 0, character = 0, characters = "";
245
- function node(value, root, parent, type, props, children, length2, siblings) {
246
- return {
247
- value,
248
- root,
249
- parent,
250
- type,
251
- props,
252
- children,
253
- line,
254
- column,
255
- length: length2,
256
- return: "",
257
- siblings
258
- };
259
- }
260
- function copy(root, props) {
261
- return assign(node("", null, null, "", null, null, 0, root.siblings), root, {
262
- length: -root.length
263
- }, props);
264
- }
265
- function lift(root) {
266
- for (; root.root; ) root = copy(root.root, {
267
- children: [root]
268
- });
269
- append(root, root.siblings);
270
- }
271
- function char() {
272
- return character;
273
- }
274
- function prev() {
275
- return character = position > 0 ? charat(characters, --position) : 0, column--, character === 10 && (column = 1, line--), character;
276
- }
277
- function next() {
278
- return character = position < length ? charat(characters, position++) : 0, column++, character === 10 && (column = 1, line++), character;
279
- }
280
- function peek() {
281
- return charat(characters, position);
282
- }
283
- function caret() {
284
- return position;
285
- }
286
- function slice(begin, end) {
287
- return substr(characters, begin, end);
288
- }
289
- function token(type) {
290
- switch (type) {
291
- // \0 \t \n \r \s whitespace token
292
- case 0:
293
- case 9:
294
- case 10:
295
- case 13:
296
- case 32:
297
- return 5;
298
- // ! + , / > @ ~ isolate token
299
- case 33:
300
- case 43:
301
- case 44:
302
- case 47:
303
- case 62:
304
- case 64:
305
- case 126:
306
- // ; { } breakpoint token
307
- case 59:
308
- case 123:
309
- case 125:
310
- return 4;
311
- // : accompanied token
312
- case 58:
313
- return 3;
314
- // " ' ( [ opening delimit token
315
- case 34:
316
- case 39:
317
- case 40:
318
- case 91:
319
- return 2;
320
- // ) ] closing delimit token
321
- case 41:
322
- case 93:
323
- return 1;
324
- }
325
- return 0;
326
- }
327
- function alloc(value) {
328
- return line = column = 1, length = strlen(characters = value), position = 0, [];
329
- }
330
- function dealloc(value) {
331
- return characters = "", value;
332
- }
333
- function delimit(type) {
334
- return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
335
- }
336
- function whitespace(type) {
337
- for (; (character = peek()) && character < 33; ) next();
338
- return token(type) > 2 || token(character) > 3 ? "" : " ";
339
- }
340
- function escaping(index, count) {
341
- for (; --count && next() && !(character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97); )
342
- ;
343
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
344
- }
345
- function delimiter(type) {
346
- for (; next(); ) switch (character) {
347
- // ] ) " '
348
- case type:
349
- return position;
350
- // " '
351
- case 34:
352
- case 39:
353
- type !== 34 && type !== 39 && delimiter(character);
354
- break;
355
- // (
356
- case 40:
357
- type === 41 && delimiter(type);
358
- break;
359
- // \
360
- case 92:
361
- next();
362
- break;
363
- }
364
- return position;
365
- }
366
- function commenter(type, index) {
367
- for (; next() && type + character !== 57; )
368
- if (type + character === 84 && peek() === 47) break;
369
- return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
370
- }
371
- function identifier(index) {
372
- for (; !token(peek()); ) next();
373
- return slice(index, position);
374
- }
375
- function compile(value) {
376
- return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
377
- }
378
- function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
379
- for (var index = 0, offset = 0, length2 = pseudo, atrule = 0, property = 0, previous = 0, variable = 1, scanning = 1, ampersand = 1, character2 = 0, type = "", props = rules, children = rulesets, reference = rule, characters2 = type; scanning; ) switch (previous = character2, character2 = next()) {
380
- // (
381
- case 40:
382
- if (previous != 108 && charat(characters2, length2 - 1) == 58) {
383
- indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1 && (ampersand = -1);
384
- break;
385
- }
386
- // " ' [
387
- case 34:
388
- case 39:
389
- case 91:
390
- characters2 += delimit(character2);
391
- break;
392
- // \t \n \r \s
393
- case 9:
394
- case 10:
395
- case 13:
396
- case 32:
397
- characters2 += whitespace(previous);
398
- break;
399
- // \
400
- case 92:
401
- characters2 += escaping(caret() - 1, 7);
402
- continue;
403
- // /
404
- case 47:
405
- switch (peek()) {
406
- case 42:
407
- case 47:
408
- append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
409
- break;
410
- default:
411
- characters2 += "/";
412
- }
413
- break;
414
- // {
415
- case 123 * variable:
416
- points[index++] = strlen(characters2) * ampersand;
417
- // } ; \0
418
- case 125 * variable:
419
- case 59:
420
- case 0:
421
- switch (character2) {
422
- // \0 }
423
- case 0:
424
- case 125:
425
- scanning = 0;
426
- // ;
427
- case 59 + offset:
428
- ampersand == -1 && (characters2 = replace(characters2, /\f/g, "")), property > 0 && strlen(characters2) - length2 && append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
429
- break;
430
- // @ ;
431
- case 59:
432
- characters2 += ";";
433
- // { rule/at-rule
434
- default:
435
- if (append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets), character2 === 123) if (offset === 0) parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
436
- else switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
437
- // d l m s
438
- case 100:
439
- case 108:
440
- case 109:
441
- case 115:
442
- parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children);
443
- break;
444
- default:
445
- parse(characters2, reference, reference, reference, [""], children, 0, points, children);
446
- }
447
- }
448
- index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
449
- break;
450
- // :
451
- case 58:
452
- length2 = 1 + strlen(characters2), property = previous;
453
- default:
454
- if (variable < 1) {
455
- if (character2 == 123) --variable;
456
- else if (character2 == 125 && variable++ == 0 && prev() == 125) continue;
457
- }
458
- switch (characters2 += from(character2), character2 * variable) {
459
- // &
460
- case 38:
461
- ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
462
- break;
463
- // ,
464
- case 44:
465
- points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
466
- break;
467
- // @
468
- case 64:
469
- peek() === 45 && (characters2 += delimit(next())), atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
470
- break;
471
- // -
472
- case 45:
473
- previous === 45 && strlen(characters2) == 2 && (variable = 0);
474
- }
475
- }
476
- return rulesets;
477
- }
478
- function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2, siblings) {
479
- for (var post = offset - 1, rule = offset === 0 ? rules : [""], size = sizeof(rule), i = 0, j2 = 0, k2 = 0; i < index; ++i) for (var x2 = 0, y2 = substr(value, post + 1, post = abs(j2 = points[i])), z2 = value; x2 < size; ++x2) (z2 = trim(j2 > 0 ? rule[x2] + " " + y2 : replace(y2, /&\f/g, rule[x2]))) && (props[k2++] = z2);
480
- return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2, siblings);
481
- }
482
- function comment(value, root, parent, siblings) {
483
- return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
484
- }
485
- function declaration(value, root, parent, length2, siblings) {
486
- return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
487
- }
488
- function prefix(value, length2, children) {
489
- switch (hash(value, length2)) {
490
- // color-adjust
491
- case 5103:
492
- return WEBKIT + "print-" + value + value;
493
- // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
494
- case 5737:
495
- case 4201:
496
- case 3177:
497
- case 3433:
498
- case 1641:
499
- case 4457:
500
- case 2921:
501
- // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
502
- case 5572:
503
- case 6356:
504
- case 5844:
505
- case 3191:
506
- case 6645:
507
- case 3005:
508
- // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
509
- case 6391:
510
- case 5879:
511
- case 5623:
512
- case 6135:
513
- case 4599:
514
- case 4855:
515
- // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
516
- case 4215:
517
- case 6389:
518
- case 5109:
519
- case 5365:
520
- case 5621:
521
- case 3829:
522
- return WEBKIT + value + value;
523
- // tab-size
524
- case 4789:
525
- return MOZ + value + value;
526
- // appearance, user-select, transform, hyphens, text-size-adjust
527
- case 5349:
528
- case 4246:
529
- case 4810:
530
- case 6968:
531
- case 2756:
532
- return WEBKIT + value + MOZ + value + MS + value + value;
533
- // writing-mode
534
- case 5936:
535
- switch (charat(value, length2 + 11)) {
536
- // vertical-l(r)
537
- case 114:
538
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
539
- // vertical-r(l)
540
- case 108:
541
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
542
- // horizontal(-)tb
543
- case 45:
544
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
545
- }
546
- // flex, flex-direction, scroll-snap-type, writing-mode
547
- case 6828:
548
- case 4268:
549
- case 2903:
550
- return WEBKIT + value + MS + value + value;
551
- // order
552
- case 6165:
553
- return WEBKIT + value + MS + "flex-" + value + value;
554
- // align-items
555
- case 5187:
556
- return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
557
- // align-self
558
- case 5443:
559
- return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/g, "") + (match(value, /flex-|baseline/) ? "" : MS + "grid-row-" + replace(value, /flex-|-self/g, "")) + value;
560
- // align-content
561
- case 4675:
562
- return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/g, "") + value;
563
- // flex-shrink
564
- case 5548:
565
- return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
566
- // flex-basis
567
- case 5292:
568
- return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
569
- // flex-grow
570
- case 6060:
571
- return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
572
- // transition
573
- case 4554:
574
- return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
575
- // cursor
576
- case 6187:
577
- return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
578
- // background, background-image
579
- case 5495:
580
- case 3959:
581
- return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
582
- // justify-content
583
- case 4968:
584
- return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
585
- // justify-self
586
- case 4200:
587
- if (!match(value, /flex-|baseline/)) return MS + "grid-column-align" + substr(value, length2) + value;
588
- break;
589
- // grid-template-(columns|rows)
590
- case 2592:
591
- case 3360:
592
- return MS + replace(value, "template-", "") + value;
593
- // grid-(row|column)-start
594
- case 4384:
595
- case 3616:
596
- return children && children.some(function(element, index) {
597
- return length2 = index, match(element.props, /grid-\w+-end/);
598
- }) ? ~indexof(value + (children = children[length2].value), "span", 0) ? value : MS + replace(value, "-start", "") + value + MS + "grid-row-span:" + (~indexof(children, "span", 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ";" : MS + replace(value, "-start", "") + value;
599
- // grid-(row|column)-end
600
- case 4896:
601
- case 4128:
602
- return children && children.some(function(element) {
603
- return match(element.props, /grid-\w+-start/);
604
- }) ? value : MS + replace(replace(value, "-end", "-span"), "span ", "") + value;
605
- // (margin|padding)-inline-(start|end)
606
- case 4095:
607
- case 3583:
608
- case 4068:
609
- case 2532:
610
- return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
611
- // (min|max)?(width|height|inline-size|block-size)
612
- case 8116:
613
- case 7059:
614
- case 5753:
615
- case 5535:
616
- case 5445:
617
- case 5701:
618
- case 4933:
619
- case 4677:
620
- case 5533:
621
- case 5789:
622
- case 5021:
623
- case 4765:
624
- if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
625
- // (m)ax-content, (m)in-content
626
- case 109:
627
- if (charat(value, length2 + 4) !== 45) break;
628
- // (f)ill-available, (f)it-content
629
- case 102:
630
- return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
631
- // (s)tretch
632
- case 115:
633
- return ~indexof(value, "stretch", 0) ? prefix(replace(value, "stretch", "fill-available"), length2, children) + value : value;
634
- }
635
- break;
636
- // grid-(column|row)
637
- case 5152:
638
- case 5920:
639
- return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f2) {
640
- return MS + a + ":" + b + f2 + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f2 : "") + value;
641
- });
642
- // position: sticky
643
- case 4949:
644
- if (charat(value, length2 + 6) === 121) return replace(value, ":", ":" + WEBKIT) + value;
645
- break;
646
- // display: (flex|inline-flex|grid|inline-grid)
647
- case 6444:
648
- switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
649
- // (inline-)?fle(x)
650
- case 120:
651
- return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
652
- // (inline-)?gri(d)
653
- case 100:
654
- return replace(value, ":", ":" + MS) + value;
655
- }
656
- break;
657
- // scroll-margin, scroll-margin-(top|right|bottom|left)
658
- case 5719:
659
- case 2647:
660
- case 2135:
661
- case 3927:
662
- case 2391:
663
- return replace(value, "scroll-", "scroll-snap-") + value;
664
- }
665
- return value;
666
- }
667
- function serialize(children, callback) {
668
- for (var output = "", i = 0; i < children.length; i++) output += callback(children[i], i, children, callback) || "";
669
- return output;
670
- }
671
- function stringify(element, index, children, callback) {
672
- switch (element.type) {
673
- case LAYER:
674
- if (element.children.length) break;
675
- case IMPORT:
676
- case DECLARATION:
677
- return element.return = element.return || element.value;
678
- case COMMENT:
679
- return "";
680
- case KEYFRAMES:
681
- return element.return = element.value + "{" + serialize(element.children, callback) + "}";
682
- case RULESET:
683
- if (!strlen(element.value = element.props.join(","))) return "";
684
- }
685
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
686
- }
687
- function middleware(collection) {
688
- var length2 = sizeof(collection);
689
- return function(element, index, children, callback) {
690
- for (var output = "", i = 0; i < length2; i++) output += collection[i](element, index, children, callback) || "";
691
- return output;
692
- };
693
- }
694
- function rulesheet(callback) {
695
- return function(element) {
696
- element.root || (element = element.return) && callback(element);
697
- };
698
- }
699
- function prefixer(element, index, children, callback) {
700
- if (element.length > -1 && !element.return) switch (element.type) {
701
- case DECLARATION:
702
- element.return = prefix(element.value, element.length, children);
703
- return;
704
- case KEYFRAMES:
705
- return serialize([copy(element, {
706
- value: replace(element.value, "@", "@" + WEBKIT)
707
- })], callback);
708
- case RULESET:
709
- if (element.length) return combine(children = element.props, function(value) {
710
- switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
711
- // :read-(only|write)
712
- case ":read-only":
713
- case ":read-write":
714
- lift(copy(element, {
715
- props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
716
- })), lift(copy(element, {
717
- props: [value]
718
- })), assign(element, {
719
- props: filter(children, callback)
720
- });
721
- break;
722
- // :placeholder
723
- case "::placeholder":
724
- lift(copy(element, {
725
- props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
726
- })), lift(copy(element, {
727
- props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
728
- })), lift(copy(element, {
729
- props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
730
- })), lift(copy(element, {
731
- props: [value]
732
- })), assign(element, {
733
- props: filter(children, callback)
734
- });
735
- break;
736
- }
737
- return "";
738
- });
739
- }
740
- }
741
- var unitlessKeys = {
742
- animationIterationCount: 1,
743
- aspectRatio: 1,
744
- borderImageOutset: 1,
745
- borderImageSlice: 1,
746
- borderImageWidth: 1,
747
- boxFlex: 1,
748
- boxFlexGroup: 1,
749
- boxOrdinalGroup: 1,
750
- columnCount: 1,
751
- columns: 1,
752
- flex: 1,
753
- flexGrow: 1,
754
- flexPositive: 1,
755
- flexShrink: 1,
756
- flexNegative: 1,
757
- flexOrder: 1,
758
- gridRow: 1,
759
- gridRowEnd: 1,
760
- gridRowSpan: 1,
761
- gridRowStart: 1,
762
- gridColumn: 1,
763
- gridColumnEnd: 1,
764
- gridColumnSpan: 1,
765
- gridColumnStart: 1,
766
- msGridRow: 1,
767
- msGridRowSpan: 1,
768
- msGridColumn: 1,
769
- msGridColumnSpan: 1,
770
- fontWeight: 1,
771
- lineHeight: 1,
772
- opacity: 1,
773
- order: 1,
774
- orphans: 1,
775
- tabSize: 1,
776
- widows: 1,
777
- zIndex: 1,
778
- zoom: 1,
779
- WebkitLineClamp: 1,
780
- // SVG-related properties
781
- fillOpacity: 1,
782
- floodOpacity: 1,
783
- stopOpacity: 1,
784
- strokeDasharray: 1,
785
- strokeDashoffset: 1,
786
- strokeMiterlimit: 1,
787
- strokeOpacity: 1,
788
- strokeWidth: 1
789
- }, f = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", m = "active", y = "data-styled-version", v = "6.1.19", g = `/*!sc*/
790
- `, S = typeof window < "u" && typeof document < "u", w = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), E = /invalid hook call/i, N = /* @__PURE__ */ new Set(), P = function(t, n) {
791
- if (process.env.NODE_ENV !== "production") {
792
- var o$1 = n ? ' with the id of "'.concat(n, '"') : "", s = "The component ".concat(t).concat(o$1, ` has been created dynamically.
793
- `) + `You may see this warning because you've called styled inside another component.
794
- To resolve this only create new StyledComponents outside of any render method and function component.
795
- See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
796
- `, i = console.error;
797
- try {
798
- var a = !0;
799
- console.error = function(t2) {
800
- for (var n2 = [], o2 = 1; o2 < arguments.length; o2++) n2[o2 - 1] = arguments[o2];
801
- E.test(t2) ? (a = !1, N.delete(s)) : i.apply(void 0, __spreadArray([t2], n2, !1));
802
- }, o.useRef(), a && !N.has(s) && (console.warn(s), N.add(s));
803
- } catch (e) {
804
- E.test(e.message) && N.delete(s);
805
- } finally {
806
- console.error = i;
807
- }
808
- }
809
- }, _ = Object.freeze([]), C = Object.freeze({});
810
- function I(e, t, n) {
811
- return n === void 0 && (n = C), e.theme !== n.theme && e.theme || t || n.theme;
812
- }
813
- var A = /* @__PURE__ */ new Set(["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", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "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", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), O = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, D = /(^-|-$)/g;
814
- function R(e) {
815
- return e.replace(O, "-").replace(D, "");
816
- }
817
- var T = /(a)(d)/gi, k = 52, j = function(e) {
818
- return String.fromCharCode(e + (e > 25 ? 39 : 97));
819
- };
820
- function x(e) {
821
- var t, n = "";
822
- for (t = Math.abs(e); t > k; t = t / k | 0) n = j(t % k) + n;
823
- return (j(t % k) + n).replace(T, "$1-$2");
824
- }
825
- var V, F = 5381, z = function(e, t) {
826
- for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n);
827
- return e;
828
- }, M = function(e) {
829
- return z(F, e);
830
- };
831
- function $(e) {
832
- return x(M(e) >>> 0);
833
- }
834
- function B(e) {
835
- return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
836
- }
837
- function G(e) {
838
- return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
839
- }
840
- var L = typeof Symbol == "function" && Symbol.for, Y = L ? Symbol.for("react.memo") : 60115, q = L ? Symbol.for("react.forward_ref") : 60112, W = {
841
- childContextTypes: !0,
842
- contextType: !0,
843
- contextTypes: !0,
844
- defaultProps: !0,
845
- displayName: !0,
846
- getDefaultProps: !0,
847
- getDerivedStateFromError: !0,
848
- getDerivedStateFromProps: !0,
849
- mixins: !0,
850
- propTypes: !0,
851
- type: !0
852
- }, H = {
853
- name: !0,
854
- length: !0,
855
- prototype: !0,
856
- caller: !0,
857
- callee: !0,
858
- arguments: !0,
859
- arity: !0
860
- }, U = {
861
- $$typeof: !0,
862
- compare: !0,
863
- defaultProps: !0,
864
- displayName: !0,
865
- propTypes: !0,
866
- type: !0
867
- }, J = ((V = {})[q] = {
868
- $$typeof: !0,
869
- render: !0,
870
- defaultProps: !0,
871
- displayName: !0,
872
- propTypes: !0
873
- }, V[Y] = U, V);
874
- function X(e) {
875
- return ("type" in (t = e) && t.type.$$typeof) === Y ? U : "$$typeof" in e ? J[e.$$typeof] : W;
876
- var t;
877
- }
878
- var Z = Object.defineProperty, K = Object.getOwnPropertyNames, Q = Object.getOwnPropertySymbols, ee = Object.getOwnPropertyDescriptor, te = Object.getPrototypeOf, ne = Object.prototype;
879
- function oe(e, t, n) {
880
- if (typeof t != "string") {
881
- if (ne) {
882
- var o2 = te(t);
883
- o2 && o2 !== ne && oe(e, o2, n);
884
- }
885
- var r = K(t);
886
- Q && (r = r.concat(Q(t)));
887
- for (var s = X(e), i = X(t), a = 0; a < r.length; ++a) {
888
- var c = r[a];
889
- if (!(c in H || n && n[c] || i && c in i || s && c in s)) {
890
- var l = ee(t, c);
891
- try {
892
- Z(e, c, l);
893
- } catch {
894
- }
895
- }
896
- }
897
- }
898
- return e;
899
- }
900
- function re(e) {
901
- return typeof e == "function";
902
- }
903
- function se(e) {
904
- return typeof e == "object" && "styledComponentId" in e;
905
- }
906
- function ie(e, t) {
907
- return e && t ? "".concat(e, " ").concat(t) : e || t || "";
908
- }
909
- function ae(e, t) {
910
- if (e.length === 0) return "";
911
- for (var n = e[0], o2 = 1; o2 < e.length; o2++) n += e[o2];
912
- return n;
913
- }
914
- function ce(e) {
915
- return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
916
- }
917
- function le(e, t, n) {
918
- if (n === void 0 && (n = !1), !n && !ce(e) && !Array.isArray(e)) return t;
919
- if (Array.isArray(t)) for (var o2 = 0; o2 < t.length; o2++) e[o2] = le(e[o2], t[o2]);
920
- else if (ce(t)) for (var o2 in t) e[o2] = le(e[o2], t[o2]);
921
- return e;
922
- }
923
- function ue(e, t) {
924
- Object.defineProperty(e, "toString", {
925
- value: t
926
- });
927
- }
928
- var pe = process.env.NODE_ENV !== "production" ? {
929
- 1: `Cannot create styled-component for component: %s.
930
-
931
- `,
932
- 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.
933
-
934
- - Are you trying to reuse it across renders?
935
- - Are you accidentally calling collectStyles twice?
936
-
937
- `,
938
- 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
939
-
940
- `,
941
- 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
942
-
943
- - Does this error occur on the client and is your target falsy?
944
- - Does this error occur on the server and is the sheet falsy?
945
-
946
- `,
947
- 5: `The clone method cannot be used on the client!
948
-
949
- - Are you running in a client-like environment on the server?
950
- - Are you trying to run SSR on the client?
951
-
952
- `,
953
- 6: `Trying to insert a new style tag, but the given Node is unmounted!
954
-
955
- - Are you using a custom target that isn't mounted?
956
- - Does your document not have a valid head element?
957
- - Have you accidentally removed a style tag manually?
958
-
959
- `,
960
- 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',
961
- 8: `ThemeProvider: Please make your "theme" prop an object.
962
-
963
- `,
964
- 9: "Missing document `<head>`\n\n",
965
- 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
966
-
967
- `,
968
- 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.
969
-
970
- `,
971
- 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",
972
- 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.
973
-
974
- `,
975
- 14: `ThemeProvider: "theme" prop is required.
976
-
977
- `,
978
- 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",
979
- 16: `Reached the limit of how many styled components may be created at group %s.
980
- You may only create up to 1,073,741,824 components. If you're creating components dynamically,
981
- as for instance in your render method then you may be running into this limitation.
982
-
983
- `,
984
- 17: `CSSStyleSheet could not be found on HTMLStyleElement.
985
- Has styled-components' style tag been unmounted or altered by another script?
986
- `,
987
- 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"
988
- } : {};
989
- function de() {
990
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
991
- for (var n = e[0], o2 = [], r = 1, s = e.length; r < s; r += 1) o2.push(e[r]);
992
- return o2.forEach(function(e2) {
993
- n = n.replace(/%[a-z]/, e2);
994
- }), n;
995
- }
996
- function he(t) {
997
- for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
998
- return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(n.length > 0 ? " Args: ".concat(n.join(", ")) : "")) : new Error(de.apply(void 0, __spreadArray([pe[t]], n, !1)).trim());
999
- }
1000
- var fe = (function() {
1001
- function e(e2) {
1002
- this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e2;
1003
- }
1004
- return e.prototype.indexOfGroup = function(e2) {
1005
- for (var t = 0, n = 0; n < e2; n++) t += this.groupSizes[n];
1006
- return t;
1007
- }, e.prototype.insertRules = function(e2, t) {
1008
- if (e2 >= this.groupSizes.length) {
1009
- for (var n = this.groupSizes, o2 = n.length, r = o2; e2 >= r; ) if ((r <<= 1) < 0) throw he(16, "".concat(e2));
1010
- this.groupSizes = new Uint32Array(r), this.groupSizes.set(n), this.length = r;
1011
- for (var s = o2; s < r; s++) this.groupSizes[s] = 0;
1012
- }
1013
- for (var i = this.indexOfGroup(e2 + 1), a = (s = 0, t.length); s < a; s++) this.tag.insertRule(i, t[s]) && (this.groupSizes[e2]++, i++);
1014
- }, e.prototype.clearGroup = function(e2) {
1015
- if (e2 < this.length) {
1016
- var t = this.groupSizes[e2], n = this.indexOfGroup(e2), o2 = n + t;
1017
- this.groupSizes[e2] = 0;
1018
- for (var r = n; r < o2; r++) this.tag.deleteRule(n);
1019
- }
1020
- }, e.prototype.getGroup = function(e2) {
1021
- var t = "";
1022
- if (e2 >= this.length || this.groupSizes[e2] === 0) return t;
1023
- for (var n = this.groupSizes[e2], o2 = this.indexOfGroup(e2), r = o2 + n, s = o2; s < r; s++) t += "".concat(this.tag.getRule(s)).concat(g);
1024
- return t;
1025
- }, e;
1026
- })(), me = 1 << 30, ye = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), ge = 1, Se = function(e) {
1027
- if (ye.has(e)) return ye.get(e);
1028
- for (; ve.has(ge); ) ge++;
1029
- var t = ge++;
1030
- if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > me)) throw he(16, "".concat(t));
1031
- return ye.set(e, t), ve.set(t, e), t;
1032
- }, we = function(e, t) {
1033
- ge = t + 1, ye.set(e, t), ve.set(t, e);
1034
- }, be = "style[".concat(f, "][").concat(y, '="').concat(v, '"]'), Ee = new RegExp("^".concat(f, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Ne = function(e, t, n) {
1035
- for (var o2, r = n.split(","), s = 0, i = r.length; s < i; s++) (o2 = r[s]) && e.registerName(t, o2);
1036
- }, Pe = function(e, t) {
1037
- for (var n, o2 = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(g), r = [], s = 0, i = o2.length; s < i; s++) {
1038
- var a = o2[s].trim();
1039
- if (a) {
1040
- var c = a.match(Ee);
1041
- if (c) {
1042
- var l = 0 | parseInt(c[1], 10), u = c[2];
1043
- l !== 0 && (we(u, l), Ne(e, u, c[3]), e.getTag().insertRules(l, r)), r.length = 0;
1044
- } else r.push(a);
1045
- }
1046
- }
1047
- }, _e = function(e) {
1048
- for (var t = document.querySelectorAll(be), n = 0, o2 = t.length; n < o2; n++) {
1049
- var r = t[n];
1050
- r && r.getAttribute(f) !== m && (Pe(e, r), r.parentNode && r.parentNode.removeChild(r));
1051
- }
1052
- };
1053
- function Ce() {
1054
- return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
1055
- }
1056
- var Ie = function(e) {
1057
- var t = document.head, n = e || t, o2 = document.createElement("style"), r = (function(e2) {
1058
- var t2 = Array.from(e2.querySelectorAll("style[".concat(f, "]")));
1059
- return t2[t2.length - 1];
1060
- })(n), s = r !== void 0 ? r.nextSibling : null;
1061
- o2.setAttribute(f, m), o2.setAttribute(y, v);
1062
- var i = Ce();
1063
- return i && o2.setAttribute("nonce", i), n.insertBefore(o2, s), o2;
1064
- }, Ae = (function() {
1065
- function e(e2) {
1066
- this.element = Ie(e2), this.element.appendChild(document.createTextNode("")), this.sheet = (function(e3) {
1067
- if (e3.sheet) return e3.sheet;
1068
- for (var t = document.styleSheets, n = 0, o2 = t.length; n < o2; n++) {
1069
- var r = t[n];
1070
- if (r.ownerNode === e3) return r;
1071
- }
1072
- throw he(17);
1073
- })(this.element), this.length = 0;
1074
- }
1075
- return e.prototype.insertRule = function(e2, t) {
1076
- try {
1077
- return this.sheet.insertRule(t, e2), this.length++, !0;
1078
- } catch {
1079
- return !1;
1080
- }
1081
- }, e.prototype.deleteRule = function(e2) {
1082
- this.sheet.deleteRule(e2), this.length--;
1083
- }, e.prototype.getRule = function(e2) {
1084
- var t = this.sheet.cssRules[e2];
1085
- return t && t.cssText ? t.cssText : "";
1086
- }, e;
1087
- })(), Oe = (function() {
1088
- function e(e2) {
1089
- this.element = Ie(e2), this.nodes = this.element.childNodes, this.length = 0;
1090
- }
1091
- return e.prototype.insertRule = function(e2, t) {
1092
- if (e2 <= this.length && e2 >= 0) {
1093
- var n = document.createTextNode(t);
1094
- return this.element.insertBefore(n, this.nodes[e2] || null), this.length++, !0;
1095
- }
1096
- return !1;
1097
- }, e.prototype.deleteRule = function(e2) {
1098
- this.element.removeChild(this.nodes[e2]), this.length--;
1099
- }, e.prototype.getRule = function(e2) {
1100
- return e2 < this.length ? this.nodes[e2].textContent : "";
1101
- }, e;
1102
- })(), De = (function() {
1103
- function e(e2) {
1104
- this.rules = [], this.length = 0;
1105
- }
1106
- return e.prototype.insertRule = function(e2, t) {
1107
- return e2 <= this.length && (this.rules.splice(e2, 0, t), this.length++, !0);
1108
- }, e.prototype.deleteRule = function(e2) {
1109
- this.rules.splice(e2, 1), this.length--;
1110
- }, e.prototype.getRule = function(e2) {
1111
- return e2 < this.length ? this.rules[e2] : "";
1112
- }, e;
1113
- })(), Re = S, Te = {
1114
- isServer: !S,
1115
- useCSSOMInjection: !w
1116
- }, ke = (function() {
1117
- function e(e2, n, o2) {
1118
- e2 === void 0 && (e2 = C), n === void 0 && (n = {});
1119
- var r = this;
1120
- this.options = __assign(__assign({}, Te), e2), this.gs = n, this.names = new Map(o2), this.server = !!e2.isServer, !this.server && S && Re && (Re = !1, _e(this)), ue(this, function() {
1121
- return (function(e3) {
1122
- for (var t = e3.getTag(), n2 = t.length, o3 = "", r2 = function(n3) {
1123
- var r3 = (function(e4) {
1124
- return ve.get(e4);
1125
- })(n3);
1126
- if (r3 === void 0) return "continue";
1127
- var s2 = e3.names.get(r3), i = t.getGroup(n3);
1128
- if (s2 === void 0 || !s2.size || i.length === 0) return "continue";
1129
- var a = "".concat(f, ".g").concat(n3, '[id="').concat(r3, '"]'), c = "";
1130
- s2 !== void 0 && s2.forEach(function(e4) {
1131
- e4.length > 0 && (c += "".concat(e4, ","));
1132
- }), o3 += "".concat(i).concat(a, '{content:"').concat(c, '"}').concat(g);
1133
- }, s = 0; s < n2; s++) r2(s);
1134
- return o3;
1135
- })(r);
1136
- });
1137
- }
1138
- return e.registerId = function(e2) {
1139
- return Se(e2);
1140
- }, e.prototype.rehydrate = function() {
1141
- !this.server && S && _e(this);
1142
- }, e.prototype.reconstructWithOptions = function(n, o2) {
1143
- return o2 === void 0 && (o2 = !0), new e(__assign(__assign({}, this.options), n), this.gs, o2 && this.names || void 0);
1144
- }, e.prototype.allocateGSInstance = function(e2) {
1145
- return this.gs[e2] = (this.gs[e2] || 0) + 1;
1146
- }, e.prototype.getTag = function() {
1147
- return this.tag || (this.tag = (e2 = (function(e3) {
1148
- var t = e3.useCSSOMInjection, n = e3.target;
1149
- return e3.isServer ? new De(n) : t ? new Ae(n) : new Oe(n);
1150
- })(this.options), new fe(e2)));
1151
- var e2;
1152
- }, e.prototype.hasNameForId = function(e2, t) {
1153
- return this.names.has(e2) && this.names.get(e2).has(t);
1154
- }, e.prototype.registerName = function(e2, t) {
1155
- if (Se(e2), this.names.has(e2)) this.names.get(e2).add(t);
1156
- else {
1157
- var n = /* @__PURE__ */ new Set();
1158
- n.add(t), this.names.set(e2, n);
1159
- }
1160
- }, e.prototype.insertRules = function(e2, t, n) {
1161
- this.registerName(e2, t), this.getTag().insertRules(Se(e2), n);
1162
- }, e.prototype.clearNames = function(e2) {
1163
- this.names.has(e2) && this.names.get(e2).clear();
1164
- }, e.prototype.clearRules = function(e2) {
1165
- this.getTag().clearGroup(Se(e2)), this.clearNames(e2);
1166
- }, e.prototype.clearTag = function() {
1167
- this.tag = void 0;
1168
- }, e;
1169
- })(), je = /&/g, xe = /^\s*\/\/.*$/gm;
1170
- function Ve(e, t) {
1171
- return e.map(function(e2) {
1172
- return e2.type === "rule" && (e2.value = "".concat(t, " ").concat(e2.value), e2.value = e2.value.replaceAll(",", ",".concat(t, " ")), e2.props = e2.props.map(function(e3) {
1173
- return "".concat(t, " ").concat(e3);
1174
- })), Array.isArray(e2.children) && e2.type !== "@keyframes" && (e2.children = Ve(e2.children, t)), e2;
1175
- });
1176
- }
1177
- function Fe(e) {
1178
- var t, n, o2, r = C, s = r.options, i = s === void 0 ? C : s, a = r.plugins, c = a === void 0 ? _ : a, l = function(e2, o3, r2) {
1179
- return r2.startsWith(n) && r2.endsWith(n) && r2.replaceAll(n, "").length > 0 ? ".".concat(t) : e2;
1180
- }, u = c.slice();
1181
- u.push(function(e2) {
1182
- e2.type === RULESET && e2.value.includes("&") && (e2.props[0] = e2.props[0].replace(je, n).replace(o2, l));
1183
- }), i.prefix && u.push(prefixer), u.push(stringify);
1184
- var p = function(e2, r2, s2, a2) {
1185
- r2 === void 0 && (r2 = ""), s2 === void 0 && (s2 = ""), a2 === void 0 && (a2 = "&"), t = a2, n = r2, o2 = new RegExp("\\".concat(n, "\\b"), "g");
1186
- var c2 = e2.replace(xe, ""), l2 = compile(s2 || r2 ? "".concat(s2, " ").concat(r2, " { ").concat(c2, " }") : c2);
1187
- i.namespace && (l2 = Ve(l2, i.namespace));
1188
- var p2 = [];
1189
- return serialize(l2, middleware(u.concat(rulesheet(function(e3) {
1190
- return p2.push(e3);
1191
- })))), p2;
1192
- };
1193
- return p.hash = c.length ? c.reduce(function(e2, t2) {
1194
- return t2.name || he(15), z(e2, t2.name);
1195
- }, F).toString() : "", p;
1196
- }
1197
- var ze = new ke(), Me = Fe(), $e = o__namespace.default.createContext({
1198
- shouldForwardProp: void 0,
1199
- styleSheet: ze,
1200
- stylis: Me
1201
- });
1202
- o__namespace.default.createContext(void 0);
1203
- function Le() {
1204
- return o.useContext($e);
1205
- }
1206
- var qe = (function() {
1207
- function e(e2, t) {
1208
- var n = this;
1209
- this.inject = function(e3, t2) {
1210
- t2 === void 0 && (t2 = Me);
1211
- var o2 = n.name + t2.hash;
1212
- e3.hasNameForId(n.id, o2) || e3.insertRules(n.id, o2, t2(n.rules, o2, "@keyframes"));
1213
- }, this.name = e2, this.id = "sc-keyframes-".concat(e2), this.rules = t, ue(this, function() {
1214
- throw he(12, String(n.name));
1215
- });
1216
- }
1217
- return e.prototype.getName = function(e2) {
1218
- return e2 === void 0 && (e2 = Me), this.name + e2.hash;
1219
- }, e;
1220
- })(), We = function(e) {
1221
- return e >= "A" && e <= "Z";
1222
- };
1223
- function He(e) {
1224
- for (var t = "", n = 0; n < e.length; n++) {
1225
- var o2 = e[n];
1226
- if (n === 1 && o2 === "-" && e[0] === "-") return e;
1227
- We(o2) ? t += "-" + o2.toLowerCase() : t += o2;
1228
- }
1229
- return t.startsWith("ms-") ? "-" + t : t;
1230
- }
1231
- var Ue = function(e) {
1232
- return e == null || e === !1 || e === "";
1233
- }, Je = function(t) {
1234
- var n, o2, r = [];
1235
- for (var s in t) {
1236
- var i = t[s];
1237
- t.hasOwnProperty(s) && !Ue(i) && (Array.isArray(i) && i.isCss || re(i) ? r.push("".concat(He(s), ":"), i, ";") : ce(i) ? r.push.apply(r, __spreadArray(__spreadArray(["".concat(s, " {")], Je(i), !1), ["}"], !1)) : r.push("".concat(He(s), ": ").concat((n = s, (o2 = i) == null || typeof o2 == "boolean" || o2 === "" ? "" : typeof o2 != "number" || o2 === 0 || n in unitlessKeys || n.startsWith("--") ? String(o2).trim() : "".concat(o2, "px")), ";")));
1238
- }
1239
- return r;
1240
- };
1241
- function Xe(e, t, n, o2) {
1242
- if (Ue(e)) return [];
1243
- if (se(e)) return [".".concat(e.styledComponentId)];
1244
- if (re(e)) {
1245
- if (!re(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e];
1246
- var r = e(t);
1247
- return process.env.NODE_ENV === "production" || typeof r != "object" || Array.isArray(r) || r instanceof qe || ce(r) || r === null || console.error("".concat(B(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.")), Xe(r, t, n, o2);
1248
- }
1249
- var s;
1250
- return e instanceof qe ? n ? (e.inject(n, o2), [e.getName(o2)]) : [e] : ce(e) ? Je(e) : Array.isArray(e) ? Array.prototype.concat.apply(_, e.map(function(e2) {
1251
- return Xe(e2, t, n, o2);
1252
- })) : [e.toString()];
1253
- }
1254
- function Ze(e) {
1255
- for (var t = 0; t < e.length; t += 1) {
1256
- var n = e[t];
1257
- if (re(n) && !se(n)) return !1;
1258
- }
1259
- return !0;
1260
- }
1261
- var Ke = M(v), Qe = (function() {
1262
- function e(e2, t, n) {
1263
- this.rules = e2, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (n === void 0 || n.isStatic) && Ze(e2), this.componentId = t, this.baseHash = z(Ke, t), this.baseStyle = n, ke.registerId(t);
1264
- }
1265
- return e.prototype.generateAndInjectStyles = function(e2, t, n) {
1266
- var o2 = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e2, t, n) : "";
1267
- if (this.isStatic && !n.hash)
1268
- if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) o2 = ie(o2, this.staticRulesId);
1269
- else {
1270
- var r = ae(Xe(this.rules, e2, t, n)), s = x(z(this.baseHash, r) >>> 0);
1271
- if (!t.hasNameForId(this.componentId, s)) {
1272
- var i = n(r, ".".concat(s), void 0, this.componentId);
1273
- t.insertRules(this.componentId, s, i);
1274
- }
1275
- o2 = ie(o2, s), this.staticRulesId = s;
1276
- }
1277
- else {
1278
- for (var a = z(this.baseHash, n.hash), c = "", l = 0; l < this.rules.length; l++) {
1279
- var u = this.rules[l];
1280
- if (typeof u == "string") c += u, process.env.NODE_ENV !== "production" && (a = z(a, u));
1281
- else if (u) {
1282
- var p = ae(Xe(u, e2, t, n));
1283
- a = z(a, p + l), c += p;
1284
- }
1285
- }
1286
- if (c) {
1287
- var d = x(a >>> 0);
1288
- t.hasNameForId(this.componentId, d) || t.insertRules(this.componentId, d, n(c, ".".concat(d), void 0, this.componentId)), o2 = ie(o2, d);
1289
- }
1290
- }
1291
- return o2;
1292
- }, e;
1293
- })(), et = o__namespace.default.createContext(void 0), rt = {}, st = /* @__PURE__ */ new Set();
1294
- function it(e, r, s) {
1295
- var i = se(e), a = e, c = !G(e), p = r.attrs, d = p === void 0 ? _ : p, h = r.componentId, f2 = h === void 0 ? (function(e2, t) {
1296
- var n = typeof e2 != "string" ? "sc" : R(e2);
1297
- rt[n] = (rt[n] || 0) + 1;
1298
- var o2 = "".concat(n, "-").concat($(v + n + rt[n]));
1299
- return t ? "".concat(t, "-").concat(o2) : o2;
1300
- })(r.displayName, r.parentComponentId) : h, m2 = r.displayName, y2 = m2 === void 0 ? (function(e2) {
1301
- return G(e2) ? "styled.".concat(e2) : "Styled(".concat(B(e2), ")");
1302
- })(e) : m2, g2 = r.displayName && r.componentId ? "".concat(R(r.displayName), "-").concat(r.componentId) : r.componentId || f2, S2 = i && a.attrs ? a.attrs.concat(d).filter(Boolean) : d, w2 = r.shouldForwardProp;
1303
- if (i && a.shouldForwardProp) {
1304
- var b = a.shouldForwardProp;
1305
- if (r.shouldForwardProp) {
1306
- var E2 = r.shouldForwardProp;
1307
- w2 = function(e2, t) {
1308
- return b(e2, t) && E2(e2, t);
1309
- };
1310
- } else w2 = b;
1311
- }
1312
- var N2 = new Qe(s, g2, i ? a.componentStyle : void 0);
1313
- function O2(e2, r2) {
1314
- return (function(e3, r3, s2) {
1315
- var i2 = e3.attrs, a2 = e3.componentStyle, c2 = e3.defaultProps, p2 = e3.foldedComponentIds, d2 = e3.styledComponentId, h5 = e3.target, f3 = o__namespace.default.useContext(et), m3 = Le(), y3 = e3.shouldForwardProp || m3.shouldForwardProp;
1316
- process.env.NODE_ENV !== "production" && o.useDebugValue(d2);
1317
- var v2 = I(r3, f3, c2) || C, g3 = (function(e4, n, o2) {
1318
- for (var r4, s3 = __assign(__assign({}, n), {
1319
- className: void 0,
1320
- theme: o2
1321
- }), i3 = 0; i3 < e4.length; i3 += 1) {
1322
- var a3 = re(r4 = e4[i3]) ? r4(s3) : r4;
1323
- for (var c3 in a3) s3[c3] = c3 === "className" ? ie(s3[c3], a3[c3]) : c3 === "style" ? __assign(__assign({}, s3[c3]), a3[c3]) : a3[c3];
1324
- }
1325
- return n.className && (s3.className = ie(s3.className, n.className)), s3;
1326
- })(i2, r3, v2), S3 = g3.as || h5, w3 = {};
1327
- for (var b2 in g3) g3[b2] === void 0 || b2[0] === "$" || b2 === "as" || b2 === "theme" && g3.theme === v2 || (b2 === "forwardedAs" ? w3.as = g3.forwardedAs : y3 && !y3(b2, S3) || (w3[b2] = g3[b2], y3 || process.env.NODE_ENV !== "development" || isPropValid(b2) || st.has(b2) || !A.has(S3) || (st.add(b2), console.warn('styled-components: it looks like an unknown prop "'.concat(b2, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
1328
- var E3 = (function(e4, t) {
1329
- var n = Le(), o$1 = e4.generateAndInjectStyles(t, n.styleSheet, n.stylis);
1330
- return process.env.NODE_ENV !== "production" && o.useDebugValue(o$1), o$1;
1331
- })(a2, g3);
1332
- process.env.NODE_ENV !== "production" && e3.warnTooManyClasses && e3.warnTooManyClasses(E3);
1333
- var N3 = ie(p2, d2);
1334
- return E3 && (N3 += " " + E3), g3.className && (N3 += " " + g3.className), w3[G(S3) && !A.has(S3) ? "class" : "className"] = N3, s2 && (w3.ref = s2), o.createElement(S3, w3);
1335
- })(D2, e2, r2);
1336
- }
1337
- O2.displayName = y2;
1338
- var D2 = o__namespace.default.forwardRef(O2);
1339
- return D2.attrs = S2, D2.componentStyle = N2, D2.displayName = y2, D2.shouldForwardProp = w2, D2.foldedComponentIds = i ? ie(a.foldedComponentIds, a.styledComponentId) : "", D2.styledComponentId = g2, D2.target = i ? a.target : e, Object.defineProperty(D2, "defaultProps", {
1340
- get: function() {
1341
- return this._foldedDefaultProps;
1342
- },
1343
- set: function(e2) {
1344
- this._foldedDefaultProps = i ? (function(e3) {
1345
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
1346
- for (var o2 = 0, r2 = t; o2 < r2.length; o2++) le(e3, r2[o2], !0);
1347
- return e3;
1348
- })({}, a.defaultProps, e2) : e2;
1349
- }
1350
- }), process.env.NODE_ENV !== "production" && (P(y2, g2), D2.warnTooManyClasses = /* @__PURE__ */ (function(e2, t) {
1351
- var n = {}, o2 = !1;
1352
- return function(r2) {
1353
- if (!o2 && (n[r2] = !0, Object.keys(n).length >= 200)) {
1354
- var s2 = t ? ' with the id of "'.concat(t, '"') : "";
1355
- console.warn("Over ".concat(200, " classes were generated for component ").concat(e2).concat(s2, `.
1356
- `) + `Consider using the attrs method, together with a style object for frequently changed styles.
1357
- Example:
1358
- const Component = styled.div.attrs(props => ({
1359
- style: {
1360
- background: props.background,
1361
- },
1362
- }))\`width: 100%;\`
1363
-
1364
- <Component />`), o2 = !0, n = {};
1365
- }
1366
- };
1367
- })(y2, g2)), ue(D2, function() {
1368
- return ".".concat(D2.styledComponentId);
1369
- }), c && oe(D2, e, {
1370
- attrs: !0,
1371
- componentStyle: !0,
1372
- displayName: !0,
1373
- foldedComponentIds: !0,
1374
- shouldForwardProp: !0,
1375
- styledComponentId: !0,
1376
- target: !0
1377
- }), D2;
1378
- }
1379
- function at(e, t) {
1380
- for (var n = [e[0]], o2 = 0, r = t.length; o2 < r; o2 += 1) n.push(t[o2], e[o2 + 1]);
1381
- return n;
1382
- }
1383
- var ct = function(e) {
1384
- return Object.assign(e, {
1385
- isCss: !0
1386
- });
1387
- };
1388
- function lt(t) {
1389
- for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
1390
- if (re(t) || ce(t)) return ct(Xe(at(_, __spreadArray([t], n, !0))));
1391
- var r = t;
1392
- return n.length === 0 && r.length === 1 && typeof r[0] == "string" ? Xe(r) : ct(Xe(at(r, n)));
1393
- }
1394
- function ut(n, o2, r) {
1395
- if (r === void 0 && (r = C), !o2) throw he(1, o2);
1396
- var s = function(t) {
1397
- for (var s2 = [], i = 1; i < arguments.length; i++) s2[i - 1] = arguments[i];
1398
- return n(o2, r, lt.apply(void 0, __spreadArray([t], s2, !1)));
1399
- };
1400
- return s.attrs = function(e) {
1401
- return ut(n, o2, __assign(__assign({}, r), {
1402
- attrs: Array.prototype.concat(r.attrs, e).filter(Boolean)
1403
- }));
1404
- }, s.withConfig = function(e) {
1405
- return ut(n, o2, __assign(__assign({}, r), e));
1406
- }, s;
1407
- }
1408
- var pt = function(e) {
1409
- return ut(it, e);
1410
- }, dt = pt;
1411
- A.forEach(function(e) {
1412
- dt[e] = pt(e);
1413
- });
1414
- process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
1415
- Perhaps you're looking to import 'styled-components/native'?
1416
- Read more about this at https://www.styled-components.com/docs/basics#react-native`);
1417
- var wt = "__sc-".concat(f, "__");
1418
- process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[wt] || (window[wt] = 0), window[wt] === 1 && 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.
1419
-
1420
- See https://s-c.sh/2BAXzed for more info.`), window[wt] += 1);
1421
- const typeName = "wild.richtext", ColorText = dt.span`
180
+ const typeName = "wild.richtext", ColorText = styledComponents.styled.span`
1422
181
  & > span {
1423
182
  background-color: inherit;
1424
183
  border-bottom: unset;
@@ -1441,7 +200,7 @@ const typeName = "wild.richtext", ColorText = dt.span`
1441
200
  return /* @__PURE__ */ jsxRuntime.jsx(ColorText, { color, children: props.renderDefault(props) });
1442
201
  }
1443
202
  }
1444
- }), ColorBg = dt.span`
203
+ }), ColorBg = styledComponents.styled.span`
1445
204
  & > span {
1446
205
  background-color: ${({
1447
206
  color = "inherit"
@@ -1571,7 +330,7 @@ const typeName = "wild.richtext", ColorText = dt.span`
1571
330
  components: {
1572
331
  // This is the inline-preview in the PortableText editor.
1573
332
  // It gets its props from the prepare function below.
1574
- preview: (props) => o__namespace.isValidElement(props.media) ? props.media : props.fallbackTitle
333
+ preview: (props) => React__namespace.isValidElement(props.media) ? props.media : props.fallbackTitle
1575
334
  },
1576
335
  preview: {
1577
336
  select: {