sanity-plugin-seofields 1.2.2 → 1.2.4

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.js CHANGED
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var o = require("react"), sanity = require("sanity"), jsxRuntime = require("react/jsx-runtime"), router = require("sanity/router"), structure = require("sanity/structure"), ui = require("@sanity/ui");
3
+ var r = require("react"), sanity = require("sanity"), jsxRuntime = require("react/jsx-runtime"), router = require("sanity/router"), structure = require("sanity/structure"), ui = require("@sanity/ui");
4
4
  function _interopDefaultCompat(e) {
5
5
  return e && typeof e == "object" && "default" in e ? e : { default: e };
6
6
  }
7
- var o__default = /* @__PURE__ */ _interopDefaultCompat(o), __assign = function() {
7
+ var r__default = /* @__PURE__ */ _interopDefaultCompat(r), __assign = function() {
8
8
  return __assign = Object.assign || function(t) {
9
9
  for (var s, i = 1, n = arguments.length; i < n; i++) {
10
10
  s = arguments[i];
11
- for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
11
+ for (var p2 in s) Object.prototype.hasOwnProperty.call(s, p2) && (t[p2] = s[p2]);
12
12
  }
13
13
  return t;
14
14
  }, __assign.apply(this, arguments);
15
15
  };
16
16
  function __spreadArray(to, from2, pack) {
17
- if (pack || arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++)
17
+ if (pack || arguments.length === 2) for (var i = 0, l2 = from2.length, ar; i < l2; i++)
18
18
  (ar || !(i in from2)) && (ar || (ar = Array.prototype.slice.call(from2, 0, i)), ar[i] = from2[i]);
19
19
  return to.concat(ar || Array.prototype.slice.call(from2));
20
20
  }
@@ -24,12 +24,12 @@ function memoize(fn) {
24
24
  return cache[arg] === void 0 && (cache[arg] = fn(arg)), cache[arg];
25
25
  };
26
26
  }
27
- 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(
27
+ 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|fetchpriority|fetchPriority|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|popover|popoverTarget|popoverTargetAction|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(
28
28
  function(prop) {
29
29
  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
30
30
  }
31
31
  /* Z+1 */
32
- ), 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;
32
+ ), MS = "-ms-", MOZ = "-moz-", WEBKIT = "-webkit-", COMMENT = "comm", RULESET = "rule", DECLARATION = "decl", IMPORT = "@import", NAMESPACE = "@namespace", KEYFRAMES = "@keyframes", LAYER = "@layer", abs = Math.abs, from = String.fromCharCode, assign = Object.assign;
33
33
  function hash(value, length2) {
34
34
  return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
35
35
  }
@@ -222,7 +222,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
222
222
  switch (peek()) {
223
223
  case 42:
224
224
  case 47:
225
- append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
225
+ append(comment(commenter(next(), caret()), root, parent, declarations), declarations), (token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters2) && substr(characters2, -1, void 0) !== " " && (characters2 += " ");
226
226
  break;
227
227
  default:
228
228
  characters2 += "/";
@@ -242,7 +242,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
242
242
  scanning = 0;
243
243
  // ;
244
244
  case 59 + offset:
245
- 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);
245
+ ampersand == -1 && (characters2 = replace(characters2, /\f/g, "")), property > 0 && (strlen(characters2) - length2 || variable === 0 && previous === 47) && append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
246
246
  break;
247
247
  // @ ;
248
248
  case 59:
@@ -252,18 +252,23 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
252
252
  if (append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets), character2 === 123)
253
253
  if (offset === 0)
254
254
  parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
255
- else
256
- switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
257
- // d l m s
258
- case 100:
255
+ else {
256
+ switch (atrule) {
257
+ // c(ontainer)
258
+ case 99:
259
+ if (charat(characters2, 3) === 110) break;
260
+ // l(ayer)
259
261
  case 108:
262
+ if (charat(characters2, 2) === 97) break;
263
+ default:
264
+ offset = 0;
265
+ // d(ocument) m(edia) s(upports)
266
+ case 100:
260
267
  case 109:
261
268
  case 115:
262
- 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);
263
- break;
264
- default:
265
- parse(characters2, reference, reference, reference, [""], children, 0, points, children);
266
269
  }
270
+ offset ? 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) : parse(characters2, reference, reference, reference, [""], children, 0, points, children);
271
+ }
267
272
  }
268
273
  index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
269
274
  break;
@@ -329,13 +334,6 @@ function prefix(value, length2, children) {
329
334
  case 3191:
330
335
  case 6645:
331
336
  case 3005:
332
- // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
333
- case 6391:
334
- case 5879:
335
- case 5623:
336
- case 6135:
337
- case 4599:
338
- case 4855:
339
337
  // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
340
338
  case 4215:
341
339
  case 6389:
@@ -343,7 +341,16 @@ function prefix(value, length2, children) {
343
341
  case 5365:
344
342
  case 5621:
345
343
  case 3829:
344
+ // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position
345
+ case 6391:
346
+ case 5879:
347
+ case 5623:
348
+ case 6135:
349
+ case 4599:
346
350
  return WEBKIT + value + value;
351
+ // mask-composite
352
+ case 4855:
353
+ return WEBKIT + value.replace("add", "source-over").replace("substract", "source-out").replace("intersect", "source-in").replace("exclude", "xor") + value;
347
354
  // tab-size
348
355
  case 4789:
349
356
  return MOZ + value + value;
@@ -405,7 +412,7 @@ function prefix(value, length2, children) {
405
412
  return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
406
413
  // justify-content
407
414
  case 4968:
408
- return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
415
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /space-between/, "justify") + WEBKIT + value + value;
409
416
  // justify-self
410
417
  case 4200:
411
418
  if (!match(value, /flex-|baseline/)) return MS + "grid-column-align" + substr(value, length2) + value;
@@ -462,8 +469,8 @@ function prefix(value, length2, children) {
462
469
  // grid-(column|row)
463
470
  case 5152:
464
471
  case 5920:
465
- return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f2) {
466
- return MS + a + ":" + b + f2 + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f2 : "") + value;
472
+ return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a2, b2, c2, d2, e, f2) {
473
+ return MS + a2 + ":" + b2 + f2 + (c2 ? MS + a2 + "-span:" + (d2 ? e : +e - +b2) + f2 : "") + value;
467
474
  });
468
475
  // position: sticky
469
476
  case 4949:
@@ -501,6 +508,7 @@ function stringify(element, index, children, callback) {
501
508
  case LAYER:
502
509
  if (element.children.length) break;
503
510
  case IMPORT:
511
+ case NAMESPACE:
504
512
  case DECLARATION:
505
513
  return element.return = element.return || element.value;
506
514
  case COMMENT:
@@ -585,6 +593,7 @@ var unitlessKeys = {
585
593
  opacity: 1,
586
594
  order: 1,
587
595
  orphans: 1,
596
+ scale: 1,
588
597
  tabSize: 1,
589
598
  widows: 1,
590
599
  zIndex: 1,
@@ -599,77 +608,139 @@ var unitlessKeys = {
599
608
  strokeMiterlimit: 1,
600
609
  strokeOpacity: 1,
601
610
  strokeWidth: 1
602
- }, 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*/
603
- `, 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) {
611
+ }, a = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", c = "active", u = "data-styled-version", l = "6.3.11", p = `/*!sc*/
612
+ `, d = typeof window < "u" && typeof document < "u", h = r__default.default.createContext === void 0, f = !!(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"), y = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
613
+
614
+ `, 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.
615
+
616
+ - Are you trying to reuse it across renders?
617
+ - Are you accidentally calling collectStyles twice?
618
+
619
+ `, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
620
+
621
+ `, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
622
+
623
+ - Does this error occur on the client and is your target falsy?
624
+ - Does this error occur on the server and is the sheet falsy?
625
+
626
+ `, 5: `The clone method cannot be used on the client!
627
+
628
+ - Are you running in a client-like environment on the server?
629
+ - Are you trying to run SSR on the client?
630
+
631
+ `, 6: `Trying to insert a new style tag, but the given Node is unmounted!
632
+
633
+ - Are you using a custom target that isn't mounted?
634
+ - Does your document not have a valid head element?
635
+ - Have you accidentally removed a style tag manually?
636
+
637
+ `, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
638
+
639
+ `, 9: "Missing document `<head>`\n\n", 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
640
+
641
+ `, 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.
642
+
643
+ `, 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", 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.
644
+
645
+ `, 14: `ThemeProvider: "theme" prop is required.
646
+
647
+ `, 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", 16: `Reached the limit of how many styled components may be created at group %s.
648
+ You may only create up to 1,073,741,824 components. If you're creating components dynamically,
649
+ as for instance in your render method then you may be running into this limitation.
650
+
651
+ `, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
652
+ Has styled-components' style tag been unmounted or altered by another script?
653
+ `, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
654
+ function v() {
655
+ for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
656
+ for (var n = e[0], r2 = [], o = 1, s = e.length; o < s; o += 1) r2.push(e[o]);
657
+ return r2.forEach(function(e2) {
658
+ n = n.replace(/%[a-z]/, e2);
659
+ }), n;
660
+ }
661
+ function g(t) {
662
+ for (var n = [], r2 = 1; r2 < arguments.length; r2++) n[r2 - 1] = arguments[r2];
663
+ 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(v.apply(void 0, __spreadArray([y[t]], n, !1)).trim());
664
+ }
665
+ var S = 1 << 30, w = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), N = 1, C = function(e) {
666
+ if (w.has(e)) return w.get(e);
667
+ for (; b.has(N); ) N++;
668
+ var t = N++;
669
+ if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > S)) throw g(16, "".concat(t));
670
+ return w.set(e, t), b.set(t, e), t;
671
+ }, E = function(e, t) {
672
+ N = t + 1, w.set(e, t), b.set(t, e);
673
+ }, _ = /invalid hook call/i, A = /* @__PURE__ */ new Set(), I = function(t, n) {
604
674
  if (process.env.NODE_ENV !== "production") {
605
- var o$1 = n ? ' with the id of "'.concat(n, '"') : "", s = "The component ".concat(t).concat(o$1, ` has been created dynamically.
675
+ if (h) return;
676
+ var o = n ? ' with the id of "'.concat(n, '"') : "", s = "The component ".concat(t).concat(o, ` has been created dynamically.
606
677
  `) + `You may see this warning because you've called styled inside another component.
607
678
  To resolve this only create new StyledComponents outside of any render method and function component.
608
679
  See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
609
680
  `, i = console.error;
610
681
  try {
611
- var a = !0;
682
+ var a2 = !0;
612
683
  console.error = function(t2) {
613
- for (var n2 = [], o2 = 1; o2 < arguments.length; o2++) n2[o2 - 1] = arguments[o2];
614
- E.test(t2) ? (a = !1, N.delete(s)) : i.apply(void 0, __spreadArray([t2], n2, !1));
615
- }, o.useRef(), a && !N.has(s) && (console.warn(s), N.add(s));
684
+ for (var n2 = [], r2 = 1; r2 < arguments.length; r2++) n2[r2 - 1] = arguments[r2];
685
+ _.test(t2) ? (a2 = !1, A.delete(s)) : i.apply(void 0, __spreadArray([t2], n2, !1));
686
+ }, typeof r__default.default.useState == "function" && r__default.default.useState(null), a2 && !A.has(s) && (console.warn(s), A.add(s));
616
687
  } catch (e) {
617
- E.test(e.message) && N.delete(s);
688
+ _.test(e.message) && A.delete(s);
618
689
  } finally {
619
690
  console.error = i;
620
691
  }
621
692
  }
622
- }, _ = Object.freeze([]), C = Object.freeze({});
623
- function I(e, t, n) {
624
- return n === void 0 && (n = C), e.theme !== n.theme && e.theme || t || n.theme;
693
+ }, P = Object.freeze([]), O = Object.freeze({});
694
+ function D(e, t, n) {
695
+ return n === void 0 && (n = O), e.theme !== n.theme && e.theme || t || n.theme;
625
696
  }
626
- 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;
627
- function R(e) {
628
- return e.replace(O, "-").replace(D, "");
697
+ var T = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "blockquote", "body", "button", "br", "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", "label", "legend", "li", "main", "map", "mark", "menu", "meter", "nav", "object", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "slot", "small", "span", "strong", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "u", "ul", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "switch", "symbol", "text", "textPath", "tspan", "use"]), R = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, x = /(^-|-$)/g;
698
+ function j(e) {
699
+ return e.replace(R, "-").replace(x, "");
629
700
  }
630
- var T = /(a)(d)/gi, k = 52, j = function(e) {
701
+ var k = /(a)(d)/gi, M = function(e) {
631
702
  return String.fromCharCode(e + (e > 25 ? 39 : 97));
632
703
  };
633
- function x(e) {
704
+ function V(e) {
634
705
  var t, n = "";
635
- for (t = Math.abs(e); t > k; t = t / k | 0) n = j(t % k) + n;
636
- return (j(t % k) + n).replace(T, "$1-$2");
706
+ for (t = Math.abs(e); t > 52; t = t / 52 | 0) n = M(t % 52) + n;
707
+ return (M(t % 52) + n).replace(k, "$1-$2");
637
708
  }
638
- var V, F = 5381, z = function(e, t) {
709
+ var F, G = function(e, t) {
639
710
  for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n);
640
711
  return e;
641
- }, M = function(e) {
642
- return z(F, e);
712
+ }, z = function(e) {
713
+ return G(5381, e);
643
714
  };
644
- function $(e) {
645
- return x(M(e) >>> 0);
646
- }
647
715
  function B(e) {
716
+ return V(z(e) >>> 0);
717
+ }
718
+ function L(e) {
648
719
  return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
649
720
  }
650
- function G(e) {
721
+ function $(e) {
651
722
  return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
652
723
  }
653
- var L = typeof Symbol == "function" && Symbol.for, Y = L ? Symbol.for("react.memo") : 60115, q = L ? Symbol.for("react.forward_ref") : 60112, W = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, H = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, U = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, J = ((V = {})[q] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, V[Y] = U, V);
654
- function X(e) {
655
- return ("type" in (t = e) && t.type.$$typeof) === Y ? U : "$$typeof" in e ? J[e.$$typeof] : W;
724
+ var Y = typeof Symbol == "function" && Symbol.for, W = Y ? Symbol.for("react.memo") : 60115, q = Y ? Symbol.for("react.forward_ref") : 60112, H = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, U = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, J = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, X = ((F = {})[q] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, F[W] = J, F);
725
+ function Z(e) {
726
+ return ("type" in (t = e) && t.type.$$typeof) === W ? J : "$$typeof" in e ? X[e.$$typeof] : H;
656
727
  var t;
657
728
  }
658
- var Z = Object.defineProperty, K = Object.getOwnPropertyNames, Q = Object.getOwnPropertySymbols, ee = Object.getOwnPropertyDescriptor, te = Object.getPrototypeOf, ne = Object.prototype;
729
+ var K = Object.defineProperty, Q = Object.getOwnPropertyNames, ee = Object.getOwnPropertySymbols, te = Object.getOwnPropertyDescriptor, ne = Object.getPrototypeOf, re = Object.prototype;
659
730
  function oe(e, t, n) {
660
731
  if (typeof t != "string") {
661
- if (ne) {
662
- var o2 = te(t);
663
- o2 && o2 !== ne && oe(e, o2, n);
732
+ if (re) {
733
+ var r2 = ne(t);
734
+ r2 && r2 !== re && oe(e, r2, n);
664
735
  }
665
- var r = K(t);
666
- Q && (r = r.concat(Q(t)));
667
- for (var s = X(e), i = X(t), a = 0; a < r.length; ++a) {
668
- var c = r[a];
669
- if (!(c in H || n && n[c] || i && c in i || s && c in s)) {
670
- var l = ee(t, c);
736
+ var o = Q(t);
737
+ ee && (o = o.concat(ee(t)));
738
+ for (var s = Z(e), i = Z(t), a2 = 0; a2 < o.length; ++a2) {
739
+ var c2 = o[a2];
740
+ if (!(c2 in U || n && n[c2] || i && c2 in i || s && c2 in s)) {
741
+ var u2 = te(t, c2);
671
742
  try {
672
- Z(e, c, l);
743
+ K(e, c2, u2);
673
744
  } catch {
674
745
  }
675
746
  }
@@ -677,158 +748,111 @@ function oe(e, t, n) {
677
748
  }
678
749
  return e;
679
750
  }
680
- function re(e) {
751
+ function se(e) {
681
752
  return typeof e == "function";
682
753
  }
683
- function se(e) {
754
+ function ie(e) {
684
755
  return typeof e == "object" && "styledComponentId" in e;
685
756
  }
686
- function ie(e, t) {
757
+ function ae(e, t) {
687
758
  return e && t ? "".concat(e, " ").concat(t) : e || t || "";
688
759
  }
689
- function ae(e, t) {
690
- if (e.length === 0) return "";
691
- for (var n = e[0], o2 = 1; o2 < e.length; o2++) n += e[o2];
692
- return n;
760
+ function ce(e, t) {
761
+ return e.join("");
693
762
  }
694
- function ce(e) {
763
+ function ue(e) {
695
764
  return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
696
765
  }
697
766
  function le(e, t, n) {
698
- if (n === void 0 && (n = !1), !n && !ce(e) && !Array.isArray(e)) return t;
699
- if (Array.isArray(t)) for (var o2 = 0; o2 < t.length; o2++) e[o2] = le(e[o2], t[o2]);
700
- else if (ce(t)) for (var o2 in t) e[o2] = le(e[o2], t[o2]);
767
+ if (n === void 0 && (n = !1), !n && !ue(e) && !Array.isArray(e)) return t;
768
+ if (Array.isArray(t)) for (var r2 = 0; r2 < t.length; r2++) e[r2] = le(e[r2], t[r2]);
769
+ else if (ue(t)) for (var r2 in t) e[r2] = le(e[r2], t[r2]);
701
770
  return e;
702
771
  }
703
- function ue(e, t) {
772
+ function pe(e, t) {
704
773
  Object.defineProperty(e, "toString", { value: t });
705
774
  }
706
- var pe = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
707
-
708
- `, 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.
709
-
710
- - Are you trying to reuse it across renders?
711
- - Are you accidentally calling collectStyles twice?
712
-
713
- `, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
714
-
715
- `, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
716
-
717
- - Does this error occur on the client and is your target falsy?
718
- - Does this error occur on the server and is the sheet falsy?
719
-
720
- `, 5: `The clone method cannot be used on the client!
721
-
722
- - Are you running in a client-like environment on the server?
723
- - Are you trying to run SSR on the client?
724
-
725
- `, 6: `Trying to insert a new style tag, but the given Node is unmounted!
726
-
727
- - Are you using a custom target that isn't mounted?
728
- - Does your document not have a valid head element?
729
- - Have you accidentally removed a style tag manually?
730
-
731
- `, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
732
-
733
- `, 9: "Missing document `<head>`\n\n", 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
734
-
735
- `, 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.
736
-
737
- `, 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", 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.
738
-
739
- `, 14: `ThemeProvider: "theme" prop is required.
740
-
741
- `, 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", 16: `Reached the limit of how many styled components may be created at group %s.
742
- You may only create up to 1,073,741,824 components. If you're creating components dynamically,
743
- as for instance in your render method then you may be running into this limitation.
744
-
745
- `, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
746
- Has styled-components' style tag been unmounted or altered by another script?
747
- `, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
748
- function de() {
749
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
750
- for (var n = e[0], o2 = [], r = 1, s = e.length; r < s; r += 1) o2.push(e[r]);
751
- return o2.forEach(function(e2) {
752
- n = n.replace(/%[a-z]/, e2);
753
- }), n;
754
- }
755
- function he(t) {
756
- for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
757
- 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());
758
- }
759
- var fe = (function() {
775
+ var de = (function() {
760
776
  function e(e2) {
761
- this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e2;
777
+ this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e2, this._cGroup = 0, this._cIndex = 0;
762
778
  }
763
779
  return e.prototype.indexOfGroup = function(e2) {
764
- for (var t = 0, n = 0; n < e2; n++) t += this.groupSizes[n];
765
- return t;
780
+ if (e2 === this._cGroup) return this._cIndex;
781
+ var t = this._cIndex;
782
+ if (e2 > this._cGroup) for (var n = this._cGroup; n < e2; n++) t += this.groupSizes[n];
783
+ else for (n = this._cGroup - 1; n >= e2; n--) t -= this.groupSizes[n];
784
+ return this._cGroup = e2, this._cIndex = t, t;
766
785
  }, e.prototype.insertRules = function(e2, t) {
767
786
  if (e2 >= this.groupSizes.length) {
768
- for (var n = this.groupSizes, o2 = n.length, r = o2; e2 >= r; ) if ((r <<= 1) < 0) throw he(16, "".concat(e2));
769
- this.groupSizes = new Uint32Array(r), this.groupSizes.set(n), this.length = r;
770
- for (var s = o2; s < r; s++) this.groupSizes[s] = 0;
787
+ for (var n = this.groupSizes, r2 = n.length, o = r2; e2 >= o; ) if ((o <<= 1) < 0) throw g(16, "".concat(e2));
788
+ this.groupSizes = new Uint32Array(o), this.groupSizes.set(n), this.length = o;
789
+ for (var s = r2; s < o; s++) this.groupSizes[s] = 0;
771
790
  }
772
- 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++);
791
+ for (var i = this.indexOfGroup(e2 + 1), a2 = 0, c2 = (s = 0, t.length); s < c2; s++) this.tag.insertRule(i, t[s]) && (this.groupSizes[e2]++, i++, a2++);
792
+ a2 > 0 && this._cGroup > e2 && (this._cIndex += a2);
773
793
  }, e.prototype.clearGroup = function(e2) {
774
794
  if (e2 < this.length) {
775
- var t = this.groupSizes[e2], n = this.indexOfGroup(e2), o2 = n + t;
795
+ var t = this.groupSizes[e2], n = this.indexOfGroup(e2), r2 = n + t;
776
796
  this.groupSizes[e2] = 0;
777
- for (var r = n; r < o2; r++) this.tag.deleteRule(n);
797
+ for (var o = n; o < r2; o++) this.tag.deleteRule(n);
798
+ t > 0 && this._cGroup > e2 && (this._cIndex -= t);
778
799
  }
779
800
  }, e.prototype.getGroup = function(e2) {
780
801
  var t = "";
781
802
  if (e2 >= this.length || this.groupSizes[e2] === 0) return t;
782
- 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);
803
+ for (var n = this.groupSizes[e2], r2 = this.indexOfGroup(e2), o = r2 + n, s = r2; s < o; s++) t += this.tag.getRule(s) + p;
783
804
  return t;
784
805
  }, e;
785
- })(), me = 1 << 30, ye = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), ge = 1, Se = function(e) {
786
- if (ye.has(e)) return ye.get(e);
787
- for (; ve.has(ge); ) ge++;
788
- var t = ge++;
789
- if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > me)) throw he(16, "".concat(t));
790
- return ye.set(e, t), ve.set(t, e), t;
791
- }, we = function(e, t) {
792
- ge = t + 1, ye.set(e, t), ve.set(t, e);
793
- }, be = "style[".concat(f, "][").concat(y, '="').concat(v, '"]'), Ee = new RegExp("^".concat(f, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Ne = function(e, t, n) {
794
- for (var o2, r = n.split(","), s = 0, i = r.length; s < i; s++) (o2 = r[s]) && e.registerName(t, o2);
795
- }, Pe = function(e, t) {
796
- for (var n, o2 = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(g), r = [], s = 0, i = o2.length; s < i; s++) {
797
- var a = o2[s].trim();
798
- if (a) {
799
- var c = a.match(Ee);
800
- if (c) {
801
- var l = 0 | parseInt(c[1], 10), u = c[2];
802
- l !== 0 && (we(u, l), Ne(e, u, c[3]), e.getTag().insertRules(l, r)), r.length = 0;
803
- } else r.push(a);
806
+ })(), he = "style[".concat(a, "][").concat(u, '="').concat(l, '"]'), fe = new RegExp("^".concat(a, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), me = function(e) {
807
+ return typeof ShadowRoot < "u" && e instanceof ShadowRoot || "host" in e && e.nodeType === 11;
808
+ }, ye = function(e) {
809
+ if (!e) return document;
810
+ if (me(e)) return e;
811
+ if ("getRootNode" in e) {
812
+ var t = e.getRootNode();
813
+ if (me(t)) return t;
814
+ }
815
+ return document;
816
+ }, ve = function(e, t, n) {
817
+ for (var r2, o = n.split(","), s = 0, i = o.length; s < i; s++) (r2 = o[s]) && e.registerName(t, r2);
818
+ }, ge = function(e, t) {
819
+ for (var n, r2 = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(p), o = [], s = 0, i = r2.length; s < i; s++) {
820
+ var a2 = r2[s].trim();
821
+ if (a2) {
822
+ var c2 = a2.match(fe);
823
+ if (c2) {
824
+ var u2 = 0 | parseInt(c2[1], 10), l2 = c2[2];
825
+ u2 !== 0 && (E(l2, u2), ve(e, l2, c2[3]), e.getTag().insertRules(u2, o)), o.length = 0;
826
+ } else o.push(a2);
804
827
  }
805
828
  }
806
- }, _e = function(e) {
807
- for (var t = document.querySelectorAll(be), n = 0, o2 = t.length; n < o2; n++) {
808
- var r = t[n];
809
- r && r.getAttribute(f) !== m && (Pe(e, r), r.parentNode && r.parentNode.removeChild(r));
829
+ }, Se = function(e) {
830
+ for (var t = ye(e.options.target).querySelectorAll(he), n = 0, r2 = t.length; n < r2; n++) {
831
+ var o = t[n];
832
+ o && o.getAttribute(a) !== c && (ge(e, o), o.parentNode && o.parentNode.removeChild(o));
810
833
  }
811
834
  };
812
- function Ce() {
835
+ function we() {
813
836
  return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
814
837
  }
815
- var Ie = function(e) {
816
- var t = document.head, n = e || t, o2 = document.createElement("style"), r = (function(e2) {
817
- var t2 = Array.from(e2.querySelectorAll("style[".concat(f, "]")));
838
+ var be = function(e) {
839
+ var t = document.head, n = e || t, r2 = document.createElement("style"), o = (function(e2) {
840
+ var t2 = Array.from(e2.querySelectorAll("style[".concat(a, "]")));
818
841
  return t2[t2.length - 1];
819
- })(n), s = r !== void 0 ? r.nextSibling : null;
820
- o2.setAttribute(f, m), o2.setAttribute(y, v);
821
- var i = Ce();
822
- return i && o2.setAttribute("nonce", i), n.insertBefore(o2, s), o2;
823
- }, Ae = (function() {
842
+ })(n), s = o !== void 0 ? o.nextSibling : null;
843
+ r2.setAttribute(a, c), r2.setAttribute(u, l);
844
+ var i = we();
845
+ return i && r2.setAttribute("nonce", i), n.insertBefore(r2, s), r2;
846
+ }, Ne = (function() {
824
847
  function e(e2) {
825
- this.element = Ie(e2), this.element.appendChild(document.createTextNode("")), this.sheet = (function(e3) {
848
+ this.element = be(e2), this.element.appendChild(document.createTextNode("")), this.sheet = (function(e3) {
849
+ var t;
826
850
  if (e3.sheet) return e3.sheet;
827
- for (var t = document.styleSheets, n = 0, o2 = t.length; n < o2; n++) {
828
- var r = t[n];
829
- if (r.ownerNode === e3) return r;
851
+ for (var n = (t = e3.getRootNode().styleSheets) !== null && t !== void 0 ? t : document.styleSheets, r2 = 0, o = n.length; r2 < o; r2++) {
852
+ var s = n[r2];
853
+ if (s.ownerNode === e3) return s;
830
854
  }
831
- throw he(17);
855
+ throw g(17);
832
856
  })(this.element), this.length = 0;
833
857
  }
834
858
  return e.prototype.insertRule = function(e2, t) {
@@ -843,9 +867,9 @@ var Ie = function(e) {
843
867
  var t = this.sheet.cssRules[e2];
844
868
  return t && t.cssText ? t.cssText : "";
845
869
  }, e;
846
- })(), Oe = (function() {
870
+ })(), Ce = (function() {
847
871
  function e(e2) {
848
- this.element = Ie(e2), this.nodes = this.element.childNodes, this.length = 0;
872
+ this.element = be(e2), this.nodes = this.element.childNodes, this.length = 0;
849
873
  }
850
874
  return e.prototype.insertRule = function(e2, t) {
851
875
  if (e2 <= this.length && e2 >= 0) {
@@ -858,246 +882,344 @@ var Ie = function(e) {
858
882
  }, e.prototype.getRule = function(e2) {
859
883
  return e2 < this.length ? this.nodes[e2].textContent : "";
860
884
  }, e;
861
- })(), De = (function() {
885
+ })(), Ee = (function() {
862
886
  function e(e2) {
863
887
  this.rules = [], this.length = 0;
864
888
  }
865
889
  return e.prototype.insertRule = function(e2, t) {
866
- return e2 <= this.length && (this.rules.splice(e2, 0, t), this.length++, !0);
890
+ return e2 <= this.length && (e2 === this.length ? this.rules.push(t) : this.rules.splice(e2, 0, t), this.length++, !0);
867
891
  }, e.prototype.deleteRule = function(e2) {
868
892
  this.rules.splice(e2, 1), this.length--;
869
893
  }, e.prototype.getRule = function(e2) {
870
894
  return e2 < this.length ? this.rules[e2] : "";
871
895
  }, e;
872
- })(), Re = S, Te = { isServer: !S, useCSSOMInjection: !w }, ke = (function() {
873
- function e(e2, n, o2) {
874
- e2 === void 0 && (e2 = C), n === void 0 && (n = {});
875
- var r = this;
876
- 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() {
896
+ })(), _e = d, Ae = { isServer: !d, useCSSOMInjection: !f }, Ie = (function() {
897
+ function e(e2, n, r2) {
898
+ e2 === void 0 && (e2 = O), n === void 0 && (n = {});
899
+ var o = this;
900
+ this.options = __assign(__assign({}, Ae), e2), this.gs = n, this.names = new Map(r2), this.server = !!e2.isServer, !this.server && d && _e && (_e = !1, Se(this)), pe(this, function() {
877
901
  return (function(e3) {
878
- for (var t = e3.getTag(), n2 = t.length, o3 = "", r2 = function(n3) {
879
- var r3 = (function(e4) {
880
- return ve.get(e4);
902
+ for (var t = e3.getTag(), n2 = t.length, r3 = "", o2 = function(n3) {
903
+ var o3 = (function(e4) {
904
+ return b.get(e4);
881
905
  })(n3);
882
- if (r3 === void 0) return "continue";
883
- var s2 = e3.names.get(r3), i = t.getGroup(n3);
884
- if (s2 === void 0 || !s2.size || i.length === 0) return "continue";
885
- var a = "".concat(f, ".g").concat(n3, '[id="').concat(r3, '"]'), c = "";
886
- s2 !== void 0 && s2.forEach(function(e4) {
887
- e4.length > 0 && (c += "".concat(e4, ","));
888
- }), o3 += "".concat(i).concat(a, '{content:"').concat(c, '"}').concat(g);
889
- }, s = 0; s < n2; s++) r2(s);
890
- return o3;
891
- })(r);
906
+ if (o3 === void 0) return "continue";
907
+ var s2 = e3.names.get(o3);
908
+ if (s2 === void 0 || !s2.size) return "continue";
909
+ var i = t.getGroup(n3);
910
+ if (i.length === 0) return "continue";
911
+ var c2 = a + ".g" + n3 + '[id="' + o3 + '"]', u2 = "";
912
+ s2.forEach(function(e4) {
913
+ e4.length > 0 && (u2 += e4 + ",");
914
+ }), r3 += i + c2 + '{content:"' + u2 + '"}' + p;
915
+ }, s = 0; s < n2; s++) o2(s);
916
+ return r3;
917
+ })(o);
892
918
  });
893
919
  }
894
920
  return e.registerId = function(e2) {
895
- return Se(e2);
921
+ return C(e2);
896
922
  }, e.prototype.rehydrate = function() {
897
- !this.server && S && _e(this);
898
- }, e.prototype.reconstructWithOptions = function(n, o2) {
899
- return o2 === void 0 && (o2 = !0), new e(__assign(__assign({}, this.options), n), this.gs, o2 && this.names || void 0);
923
+ !this.server && d && Se(this);
924
+ }, e.prototype.reconstructWithOptions = function(n, r2) {
925
+ r2 === void 0 && (r2 = !0);
926
+ var o = new e(__assign(__assign({}, this.options), n), this.gs, r2 && this.names || void 0);
927
+ return !this.server && d && n.target !== this.options.target && ye(this.options.target) !== ye(n.target) && Se(o), o;
900
928
  }, e.prototype.allocateGSInstance = function(e2) {
901
929
  return this.gs[e2] = (this.gs[e2] || 0) + 1;
902
930
  }, e.prototype.getTag = function() {
903
931
  return this.tag || (this.tag = (e2 = (function(e3) {
904
932
  var t = e3.useCSSOMInjection, n = e3.target;
905
- return e3.isServer ? new De(n) : t ? new Ae(n) : new Oe(n);
906
- })(this.options), new fe(e2)));
933
+ return e3.isServer ? new Ee(n) : t ? new Ne(n) : new Ce(n);
934
+ })(this.options), new de(e2)));
907
935
  var e2;
908
936
  }, e.prototype.hasNameForId = function(e2, t) {
909
- return this.names.has(e2) && this.names.get(e2).has(t);
937
+ var n, r2;
938
+ return (r2 = (n = this.names.get(e2)) === null || n === void 0 ? void 0 : n.has(t)) !== null && r2 !== void 0 && r2;
910
939
  }, e.prototype.registerName = function(e2, t) {
911
- if (Se(e2), this.names.has(e2)) this.names.get(e2).add(t);
912
- else {
913
- var n = /* @__PURE__ */ new Set();
914
- n.add(t), this.names.set(e2, n);
915
- }
940
+ C(e2);
941
+ var n = this.names.get(e2);
942
+ n ? n.add(t) : this.names.set(e2, /* @__PURE__ */ new Set([t]));
916
943
  }, e.prototype.insertRules = function(e2, t, n) {
917
- this.registerName(e2, t), this.getTag().insertRules(Se(e2), n);
944
+ this.registerName(e2, t), this.getTag().insertRules(C(e2), n);
918
945
  }, e.prototype.clearNames = function(e2) {
919
946
  this.names.has(e2) && this.names.get(e2).clear();
920
947
  }, e.prototype.clearRules = function(e2) {
921
- this.getTag().clearGroup(Se(e2)), this.clearNames(e2);
948
+ this.getTag().clearGroup(C(e2)), this.clearNames(e2);
922
949
  }, e.prototype.clearTag = function() {
923
950
  this.tag = void 0;
924
951
  }, e;
925
- })(), je = /&/g, xe = /^\s*\/\/.*$/gm;
926
- function Ve(e, t) {
952
+ })(), Pe = /&/g, Oe = 47, De = 42;
953
+ function Te(e) {
954
+ if (e.indexOf("}") === -1) return !1;
955
+ for (var t = e.length, n = 0, r2 = 0, o = !1, s = 0; s < t; s++) {
956
+ var i = e.charCodeAt(s);
957
+ if (r2 !== 0 || o || i !== Oe || e.charCodeAt(s + 1) !== De) if (o) i === De && e.charCodeAt(s + 1) === Oe && (o = !1, s++);
958
+ else if (i !== 34 && i !== 39 || s !== 0 && e.charCodeAt(s - 1) === 92) {
959
+ if (r2 === 0) {
960
+ if (i === 123) n++;
961
+ else if (i === 125 && --n < 0) return !0;
962
+ }
963
+ } else r2 === 0 ? r2 = i : r2 === i && (r2 = 0);
964
+ else o = !0, s++;
965
+ }
966
+ return n !== 0 || r2 !== 0;
967
+ }
968
+ function Re(e, t) {
927
969
  return e.map(function(e2) {
928
970
  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) {
929
971
  return "".concat(t, " ").concat(e3);
930
- })), Array.isArray(e2.children) && e2.type !== "@keyframes" && (e2.children = Ve(e2.children, t)), e2;
972
+ })), Array.isArray(e2.children) && e2.type !== "@keyframes" && (e2.children = Re(e2.children, t)), e2;
931
973
  });
932
974
  }
933
- function Fe(e) {
934
- 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) {
935
- return r2.startsWith(n) && r2.endsWith(n) && r2.replaceAll(n, "").length > 0 ? ".".concat(t) : e2;
936
- }, u = c.slice();
937
- u.push(function(e2) {
938
- e2.type === RULESET && e2.value.includes("&") && (e2.props[0] = e2.props[0].replace(je, n).replace(o2, l));
939
- }), i.prefix && u.push(prefixer), u.push(stringify);
940
- var p = function(e2, r2, s2, a2) {
941
- r2 === void 0 && (r2 = ""), s2 === void 0 && (s2 = ""), a2 === void 0 && (a2 = "&"), t = a2, n = r2, o2 = new RegExp("\\".concat(n, "\\b"), "g");
942
- var c2 = e2.replace(xe, ""), l2 = compile(s2 || r2 ? "".concat(s2, " ").concat(r2, " { ").concat(c2, " }") : c2);
943
- i.namespace && (l2 = Ve(l2, i.namespace));
944
- var p2 = [];
945
- return serialize(l2, middleware(u.concat(rulesheet(function(e3) {
946
- return p2.push(e3);
947
- })))), p2;
975
+ function xe(e) {
976
+ var t, n, r2, o = O, i = o.options, a2 = i === void 0 ? O : i, c2 = o.plugins, u2 = c2 === void 0 ? P : c2, l2 = function(e2, r3, o2) {
977
+ return o2.startsWith(n) && o2.endsWith(n) && o2.replaceAll(n, "").length > 0 ? ".".concat(t) : e2;
978
+ }, p2 = u2.slice();
979
+ p2.push(function(e2) {
980
+ e2.type === RULESET && e2.value.includes("&") && (r2 || (r2 = new RegExp("\\".concat(n, "\\b"), "g")), e2.props[0] = e2.props[0].replace(Pe, n).replace(r2, l2));
981
+ }), a2.prefix && p2.push(prefixer), p2.push(stringify);
982
+ var d2 = [], h2 = middleware(p2.concat(rulesheet(function(e2) {
983
+ return d2.push(e2);
984
+ }))), f2 = function(e2, o2, i2, c3) {
985
+ o2 === void 0 && (o2 = ""), i2 === void 0 && (i2 = ""), c3 === void 0 && (c3 = "&"), t = c3, n = o2, r2 = void 0;
986
+ var u3 = (function(e3) {
987
+ if (!Te(e3)) return e3;
988
+ for (var t2 = e3.length, n2 = "", r3 = 0, o3 = 0, s = 0, i3 = !1, a3 = 0; a3 < t2; a3++) {
989
+ var c4 = e3.charCodeAt(a3);
990
+ if (s !== 0 || i3 || c4 !== Oe || e3.charCodeAt(a3 + 1) !== De) if (i3) c4 === De && e3.charCodeAt(a3 + 1) === Oe && (i3 = !1, a3++);
991
+ else if (c4 !== 34 && c4 !== 39 || a3 !== 0 && e3.charCodeAt(a3 - 1) === 92) {
992
+ if (s === 0) if (c4 === 123) o3++;
993
+ else if (c4 === 125) {
994
+ if (--o3 < 0) {
995
+ for (var u4 = a3 + 1; u4 < t2; ) {
996
+ var l4 = e3.charCodeAt(u4);
997
+ if (l4 === 59 || l4 === 10) break;
998
+ u4++;
999
+ }
1000
+ u4 < t2 && e3.charCodeAt(u4) === 59 && u4++, o3 = 0, a3 = u4 - 1, r3 = u4;
1001
+ continue;
1002
+ }
1003
+ o3 === 0 && (n2 += e3.substring(r3, a3 + 1), r3 = a3 + 1);
1004
+ } else c4 === 59 && o3 === 0 && (n2 += e3.substring(r3, a3 + 1), r3 = a3 + 1);
1005
+ } else s === 0 ? s = c4 : s === c4 && (s = 0);
1006
+ else i3 = !0, a3++;
1007
+ }
1008
+ if (r3 < t2) {
1009
+ var p3 = e3.substring(r3);
1010
+ Te(p3) || (n2 += p3);
1011
+ }
1012
+ return n2;
1013
+ })((function(e3) {
1014
+ if (e3.indexOf("//") === -1) return e3;
1015
+ for (var t2 = e3.length, n2 = [], r3 = 0, o3 = 0, s = 0, i3 = 0; o3 < t2; ) {
1016
+ var a3 = e3.charCodeAt(o3);
1017
+ if (a3 !== 34 && a3 !== 39 || o3 !== 0 && e3.charCodeAt(o3 - 1) === 92) if (s === 0) if (a3 === Oe && o3 + 1 < t2 && e3.charCodeAt(o3 + 1) === De) {
1018
+ for (o3 += 2; o3 + 1 < t2 && (e3.charCodeAt(o3) !== De || e3.charCodeAt(o3 + 1) !== Oe); ) o3++;
1019
+ o3 += 2;
1020
+ } else if (a3 === 40 && o3 >= 3 && (32 | e3.charCodeAt(o3 - 1)) == 108 && (32 | e3.charCodeAt(o3 - 2)) == 114 && (32 | e3.charCodeAt(o3 - 3)) == 117) i3 = 1, o3++;
1021
+ else if (i3 > 0) a3 === 41 ? i3-- : a3 === 40 && i3++, o3++;
1022
+ else if (a3 === De && o3 + 1 < t2 && e3.charCodeAt(o3 + 1) === Oe) o3 > r3 && n2.push(e3.substring(r3, o3)), r3 = o3 += 2;
1023
+ else if (a3 === Oe && o3 + 1 < t2 && e3.charCodeAt(o3 + 1) === Oe) {
1024
+ for (o3 > r3 && n2.push(e3.substring(r3, o3)); o3 < t2 && e3.charCodeAt(o3) !== 10; ) o3++;
1025
+ r3 = o3;
1026
+ } else o3++;
1027
+ else o3++;
1028
+ else s === 0 ? s = a3 : s === a3 && (s = 0), o3++;
1029
+ }
1030
+ return r3 === 0 ? e3 : (r3 < t2 && n2.push(e3.substring(r3)), n2.join(""));
1031
+ })(e2)), l3 = compile(i2 || o2 ? "".concat(i2, " ").concat(o2, " { ").concat(u3, " }") : u3);
1032
+ return a2.namespace && (l3 = Re(l3, a2.namespace)), d2 = [], serialize(l3, h2), d2;
948
1033
  };
949
- return p.hash = c.length ? c.reduce(function(e2, t2) {
950
- return t2.name || he(15), z(e2, t2.name);
951
- }, F).toString() : "", p;
952
- }
953
- var ze = new ke(), Me = Fe(), $e = o__default.default.createContext({ shouldForwardProp: void 0, styleSheet: ze, stylis: Me });
954
- o__default.default.createContext(void 0);
955
- function Le() {
956
- return o.useContext($e);
957
- }
958
- var qe = (function() {
1034
+ return f2.hash = u2.length ? u2.reduce(function(e2, t2) {
1035
+ return t2.name || g(15), G(e2, t2.name);
1036
+ }, 5381).toString() : "", f2;
1037
+ }
1038
+ var je = new Ie(), ke = xe(), Me = { shouldForwardProp: void 0, styleSheet: je, stylis: ke }, Ve = h ? { Provider: function(e) {
1039
+ return e.children;
1040
+ }, Consumer: function(e) {
1041
+ return (0, e.children)(Me);
1042
+ } } : r__default.default.createContext(Me);
1043
+ h || r__default.default.createContext(void 0);
1044
+ function ze() {
1045
+ return h ? Me : r__default.default.useContext(Ve);
1046
+ }
1047
+ var Le = (function() {
959
1048
  function e(e2, t) {
960
1049
  var n = this;
961
1050
  this.inject = function(e3, t2) {
962
- t2 === void 0 && (t2 = Me);
963
- var o2 = n.name + t2.hash;
964
- e3.hasNameForId(n.id, o2) || e3.insertRules(n.id, o2, t2(n.rules, o2, "@keyframes"));
965
- }, this.name = e2, this.id = "sc-keyframes-".concat(e2), this.rules = t, ue(this, function() {
966
- throw he(12, String(n.name));
1051
+ t2 === void 0 && (t2 = ke);
1052
+ var r2 = n.name + t2.hash;
1053
+ e3.hasNameForId(n.id, r2) || e3.insertRules(n.id, r2, t2(n.rules, r2, "@keyframes"));
1054
+ }, this.name = e2, this.id = "sc-keyframes-".concat(e2), this.rules = t, pe(this, function() {
1055
+ throw g(12, String(n.name));
967
1056
  });
968
1057
  }
969
1058
  return e.prototype.getName = function(e2) {
970
- return e2 === void 0 && (e2 = Me), this.name + e2.hash;
1059
+ return e2 === void 0 && (e2 = ke), this.name + e2.hash;
971
1060
  }, e;
972
- })(), We = function(e) {
1061
+ })();
1062
+ function $e(e, t) {
1063
+ return t == null || typeof t == "boolean" || t === "" ? "" : typeof t != "number" || t === 0 || e in unitlessKeys || e.startsWith("--") ? String(t).trim() : "".concat(t, "px");
1064
+ }
1065
+ var Ye = function(e) {
973
1066
  return e >= "A" && e <= "Z";
974
1067
  };
975
- function He(e) {
1068
+ function We(e) {
976
1069
  for (var t = "", n = 0; n < e.length; n++) {
977
- var o2 = e[n];
978
- if (n === 1 && o2 === "-" && e[0] === "-") return e;
979
- We(o2) ? t += "-" + o2.toLowerCase() : t += o2;
1070
+ var r2 = e[n];
1071
+ if (n === 1 && r2 === "-" && e[0] === "-") return e;
1072
+ Ye(r2) ? t += "-" + r2.toLowerCase() : t += r2;
980
1073
  }
981
1074
  return t.startsWith("ms-") ? "-" + t : t;
982
1075
  }
983
- var Ue = function(e) {
1076
+ var qe = function(e) {
984
1077
  return e == null || e === !1 || e === "";
985
- }, Je = function(t) {
986
- var n, o2, r = [];
987
- for (var s in t) {
988
- var i = t[s];
989
- 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")), ";")));
1078
+ }, He = function(t) {
1079
+ var n = [];
1080
+ for (var r2 in t) {
1081
+ var o = t[r2];
1082
+ t.hasOwnProperty(r2) && !qe(o) && (Array.isArray(o) && o.isCss || se(o) ? n.push("".concat(We(r2), ":"), o, ";") : ue(o) ? n.push.apply(n, __spreadArray(__spreadArray(["".concat(r2, " {")], He(o), !1), ["}"], !1)) : n.push("".concat(We(r2), ": ").concat($e(r2, o), ";")));
990
1083
  }
991
- return r;
1084
+ return n;
992
1085
  };
993
- function Xe(e, t, n, o2) {
994
- if (Ue(e)) return [];
995
- if (se(e)) return [".".concat(e.styledComponentId)];
996
- if (re(e)) {
997
- if (!re(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e];
998
- var r = e(t);
999
- 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);
1086
+ function Ue(e, t, n, r2, o) {
1087
+ if (o === void 0 && (o = []), typeof e == "string") return e && o.push(e), o;
1088
+ if (qe(e)) return o;
1089
+ if (ie(e)) return o.push(".".concat(e.styledComponentId)), o;
1090
+ if (se(e)) {
1091
+ if (!se(i = e) || i.prototype && i.prototype.isReactComponent || !t) return o.push(e), o;
1092
+ var s = e(t);
1093
+ return process.env.NODE_ENV === "production" || typeof s != "object" || Array.isArray(s) || s instanceof Le || ue(s) || s === null || console.error("".concat(L(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.")), Ue(s, t, n, r2, o);
1000
1094
  }
1001
- var s;
1002
- 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) {
1003
- return Xe(e2, t, n, o2);
1004
- })) : [e.toString()];
1095
+ var i;
1096
+ if (e instanceof Le) return n ? (e.inject(n, r2), o.push(e.getName(r2))) : o.push(e), o;
1097
+ if (ue(e)) {
1098
+ for (var a2 = He(e), c2 = 0; c2 < a2.length; c2++) o.push(a2[c2]);
1099
+ return o;
1100
+ }
1101
+ if (!Array.isArray(e)) return o.push(e.toString()), o;
1102
+ for (c2 = 0; c2 < e.length; c2++) Ue(e[c2], t, n, r2, o);
1103
+ return o;
1005
1104
  }
1006
- function Ze(e) {
1105
+ function Je(e) {
1007
1106
  for (var t = 0; t < e.length; t += 1) {
1008
1107
  var n = e[t];
1009
- if (re(n) && !se(n)) return !1;
1108
+ if (se(n) && !ie(n)) return !1;
1010
1109
  }
1011
1110
  return !0;
1012
1111
  }
1013
- var Ke = M(v), Qe = (function() {
1112
+ var Xe = z(l), Ze = (function() {
1014
1113
  function e(e2, t, n) {
1015
- 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);
1114
+ this.rules = e2, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (n === void 0 || n.isStatic) && Je(e2), this.componentId = t, this.baseHash = G(Xe, t), this.baseStyle = n, Ie.registerId(t);
1016
1115
  }
1017
1116
  return e.prototype.generateAndInjectStyles = function(e2, t, n) {
1018
- var o2 = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e2, t, n) : "";
1019
- if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) o2 = ie(o2, this.staticRulesId);
1117
+ var r2 = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e2, t, n).className : "";
1118
+ if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) r2 = ae(r2, this.staticRulesId);
1020
1119
  else {
1021
- var r = ae(Xe(this.rules, e2, t, n)), s = x(z(this.baseHash, r) >>> 0);
1120
+ var o = ce(Ue(this.rules, e2, t, n)), s = V(G(this.baseHash, o) >>> 0);
1022
1121
  if (!t.hasNameForId(this.componentId, s)) {
1023
- var i = n(r, ".".concat(s), void 0, this.componentId);
1122
+ var i = n(o, ".".concat(s), void 0, this.componentId);
1024
1123
  t.insertRules(this.componentId, s, i);
1025
1124
  }
1026
- o2 = ie(o2, s), this.staticRulesId = s;
1125
+ r2 = ae(r2, s), this.staticRulesId = s;
1027
1126
  }
1028
1127
  else {
1029
- for (var a = z(this.baseHash, n.hash), c = "", l = 0; l < this.rules.length; l++) {
1030
- var u = this.rules[l];
1031
- if (typeof u == "string") c += u, process.env.NODE_ENV !== "production" && (a = z(a, u));
1032
- else if (u) {
1033
- var p = ae(Xe(u, e2, t, n));
1034
- a = z(a, p + l), c += p;
1128
+ for (var a2 = G(this.baseHash, n.hash), c2 = "", u2 = 0; u2 < this.rules.length; u2++) {
1129
+ var l2 = this.rules[u2];
1130
+ if (typeof l2 == "string") c2 += l2, process.env.NODE_ENV !== "production" && (a2 = G(a2, l2));
1131
+ else if (l2) {
1132
+ var p2 = ce(Ue(l2, e2, t, n));
1133
+ a2 = G(G(a2, String(u2)), p2), c2 += p2;
1035
1134
  }
1036
1135
  }
1037
- if (c) {
1038
- var d = x(a >>> 0);
1039
- t.hasNameForId(this.componentId, d) || t.insertRules(this.componentId, d, n(c, ".".concat(d), void 0, this.componentId)), o2 = ie(o2, d);
1136
+ if (c2) {
1137
+ var d2 = V(a2 >>> 0);
1138
+ if (!t.hasNameForId(this.componentId, d2)) {
1139
+ var h2 = n(c2, ".".concat(d2), void 0, this.componentId);
1140
+ t.insertRules(this.componentId, d2, h2);
1141
+ }
1142
+ r2 = ae(r2, d2);
1040
1143
  }
1041
1144
  }
1042
- return o2;
1145
+ return { className: r2, css: typeof window > "u" ? t.getTag().getGroup(C(this.componentId)) : "" };
1043
1146
  }, e;
1044
- })(), et = o__default.default.createContext(void 0), rt = {}, st = /* @__PURE__ */ new Set();
1045
- function it(e, r, s) {
1046
- 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) {
1047
- var n = typeof e2 != "string" ? "sc" : R(e2);
1048
- rt[n] = (rt[n] || 0) + 1;
1049
- var o2 = "".concat(n, "-").concat($(v + n + rt[n]));
1050
- return t ? "".concat(t, "-").concat(o2) : o2;
1051
- })(r.displayName, r.parentComponentId) : h, m2 = r.displayName, y2 = m2 === void 0 ? (function(e2) {
1052
- return G(e2) ? "styled.".concat(e2) : "Styled(".concat(B(e2), ")");
1053
- })(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;
1054
- if (i && a.shouldForwardProp) {
1055
- var b = a.shouldForwardProp;
1056
- if (r.shouldForwardProp) {
1057
- var E2 = r.shouldForwardProp;
1058
- w2 = function(e2, t) {
1059
- return b(e2, t) && E2(e2, t);
1147
+ })(), Ke = h ? { Provider: function(e) {
1148
+ return e.children;
1149
+ }, Consumer: function(e) {
1150
+ return (0, e.children)(void 0);
1151
+ } } : r__default.default.createContext(void 0), nt = {}, rt = /* @__PURE__ */ new Set();
1152
+ function ot(s, i, a2) {
1153
+ var c2 = ie(s), u2 = s, p2 = !$(s), d2 = i.attrs, f2 = d2 === void 0 ? P : d2, m = i.componentId, y2 = m === void 0 ? (function(e, t) {
1154
+ var n = typeof e != "string" ? "sc" : j(e);
1155
+ nt[n] = (nt[n] || 0) + 1;
1156
+ var r2 = "".concat(n, "-").concat(B(l + n + nt[n]));
1157
+ return t ? "".concat(t, "-").concat(r2) : r2;
1158
+ })(i.displayName, i.parentComponentId) : m, v2 = i.displayName, g2 = v2 === void 0 ? (function(e) {
1159
+ return $(e) ? "styled.".concat(e) : "Styled(".concat(L(e), ")");
1160
+ })(s) : v2, S2 = i.displayName && i.componentId ? "".concat(j(i.displayName), "-").concat(i.componentId) : i.componentId || y2, w2 = c2 && u2.attrs ? u2.attrs.concat(f2).filter(Boolean) : f2, b2 = i.shouldForwardProp;
1161
+ if (c2 && u2.shouldForwardProp) {
1162
+ var N2 = u2.shouldForwardProp;
1163
+ if (i.shouldForwardProp) {
1164
+ var E2 = i.shouldForwardProp;
1165
+ b2 = function(e, t) {
1166
+ return N2(e, t) && E2(e, t);
1060
1167
  };
1061
- } else w2 = b;
1168
+ } else b2 = N2;
1062
1169
  }
1063
- var N2 = new Qe(s, g2, i ? a.componentStyle : void 0);
1064
- function O2(e2, r2) {
1065
- return (function(e3, r3, s2) {
1066
- var i2 = e3.attrs, a2 = e3.componentStyle, c2 = e3.defaultProps, p2 = e3.foldedComponentIds, d2 = e3.styledComponentId, h2 = e3.target, f3 = o__default.default.useContext(et), m3 = Le(), y3 = e3.shouldForwardProp || m3.shouldForwardProp;
1067
- process.env.NODE_ENV !== "production" && o.useDebugValue(d2);
1068
- var v2 = I(r3, f3, c2) || C, g3 = (function(e4, n, o2) {
1069
- for (var r4, s3 = __assign(__assign({}, n), { className: void 0, theme: o2 }), i3 = 0; i3 < e4.length; i3 += 1) {
1070
- var a3 = re(r4 = e4[i3]) ? r4(s3) : r4;
1071
- for (var c3 in a3) s3[c3] = c3 === "className" ? ie(s3[c3], a3[c3]) : c3 === "style" ? __assign(__assign({}, s3[c3]), a3[c3]) : a3[c3];
1170
+ var _2 = new Ze(a2, S2, c2 ? u2.componentStyle : void 0);
1171
+ function A2(s2, i2) {
1172
+ return (function(s3, i3, a3) {
1173
+ var c3 = s3.attrs, u3 = s3.componentStyle, l2 = s3.defaultProps, p3 = s3.foldedComponentIds, d3 = s3.styledComponentId, f3 = s3.target, m2 = h ? void 0 : r__default.default.useContext(Ke), y3 = ze(), v3 = s3.shouldForwardProp || y3.shouldForwardProp;
1174
+ process.env.NODE_ENV !== "production" && r__default.default.useDebugValue && r__default.default.useDebugValue(d3);
1175
+ var g3 = D(i3, m2, l2) || (h ? void 0 : O), S3 = (function(e, n, r2) {
1176
+ for (var o, s4 = __assign(__assign({}, n), { className: void 0, theme: r2 }), i4 = 0; i4 < e.length; i4 += 1) {
1177
+ var a4 = se(o = e[i4]) ? o(s4) : o;
1178
+ for (var c4 in a4) c4 === "className" ? s4.className = ae(s4.className, a4[c4]) : c4 === "style" ? s4.style = __assign(__assign({}, s4.style), a4[c4]) : s4[c4] = a4[c4];
1072
1179
  }
1073
- return n.className && (s3.className = ie(s3.className, n.className)), s3;
1074
- })(i2, r3, v2), S3 = g3.as || h2, w3 = {};
1075
- 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.)')))));
1076
- var E3 = (function(e4, t) {
1077
- var n = Le(), o$1 = e4.generateAndInjectStyles(t, n.styleSheet, n.stylis);
1078
- return process.env.NODE_ENV !== "production" && o.useDebugValue(o$1), o$1;
1079
- })(a2, g3);
1080
- process.env.NODE_ENV !== "production" && e3.warnTooManyClasses && e3.warnTooManyClasses(E3);
1081
- var N3 = ie(p2, d2);
1082
- 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);
1083
- })(D2, e2, r2);
1180
+ return "className" in n && typeof n.className == "string" && (s4.className = ae(s4.className, n.className)), s4;
1181
+ })(c3, i3, g3), w3 = S3.as || f3, b3 = {};
1182
+ for (var N3 in S3) S3[N3] === void 0 || N3[0] === "$" || N3 === "as" || N3 === "theme" && S3.theme === g3 || (N3 === "forwardedAs" ? b3.as = S3.forwardedAs : v3 && !v3(N3, w3) || (b3[N3] = S3[N3], v3 || process.env.NODE_ENV !== "development" || isPropValid(N3) || rt.has(N3) || !T.has(w3) || (rt.add(N3), console.warn('styled-components: it looks like an unknown prop "'.concat(N3, '" 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.)')))));
1183
+ var E3 = (function(e, t) {
1184
+ var n = ze(), o = e.generateAndInjectStyles(t, n.styleSheet, n.stylis);
1185
+ return process.env.NODE_ENV !== "production" && r__default.default.useDebugValue && r__default.default.useDebugValue(o.className), o;
1186
+ })(u3, S3), _3 = E3.className;
1187
+ process.env.NODE_ENV !== "production" && s3.warnTooManyClasses && s3.warnTooManyClasses(_3);
1188
+ var A3 = ae(p3, d3);
1189
+ _3 && (A3 += " " + _3), S3.className && (A3 += " " + S3.className), b3[$(w3) && !T.has(w3) ? "class" : "className"] = A3, a3 && (b3.ref = a3);
1190
+ var I2 = r.createElement(w3, b3);
1191
+ if (h) {
1192
+ for (var P2 = [], R3 = u3, x2 = function() {
1193
+ var e = y3.styleSheet.getTag().getGroup(C(R3.componentId));
1194
+ if (e) {
1195
+ var t = "", n = y3.styleSheet.names.get(R3.componentId);
1196
+ n && n.forEach(function(e2) {
1197
+ t && (t += "_"), t += e2;
1198
+ }), P2.push(r__default.default.createElement("style", { key: "sc-".concat(R3.componentId), precedence: "styled-components", href: "sc-".concat(R3.componentId, "-").concat(t), children: e }));
1199
+ }
1200
+ R3 = R3.baseStyle;
1201
+ }; R3; ) x2();
1202
+ if (P2.length) return P2.reverse(), r__default.default.createElement.apply(r__default.default, __spreadArray(__spreadArray([r__default.default.Fragment, null], P2, !1), [I2], !1));
1203
+ }
1204
+ return I2;
1205
+ })(R2, s2, i2);
1084
1206
  }
1085
- O2.displayName = y2;
1086
- var D2 = o__default.default.forwardRef(O2);
1087
- 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", { get: function() {
1207
+ A2.displayName = g2;
1208
+ var R2 = r__default.default.forwardRef(A2);
1209
+ return R2.attrs = w2, R2.componentStyle = _2, R2.displayName = g2, R2.shouldForwardProp = b2, R2.foldedComponentIds = c2 ? ae(u2.foldedComponentIds, u2.styledComponentId) : "", R2.styledComponentId = S2, R2.target = c2 ? u2.target : s, Object.defineProperty(R2, "defaultProps", { get: function() {
1088
1210
  return this._foldedDefaultProps;
1089
- }, set: function(e2) {
1090
- this._foldedDefaultProps = i ? (function(e3) {
1211
+ }, set: function(e) {
1212
+ this._foldedDefaultProps = c2 ? (function(e2) {
1091
1213
  for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
1092
- for (var o2 = 0, r2 = t; o2 < r2.length; o2++) le(e3, r2[o2], !0);
1093
- return e3;
1094
- })({}, a.defaultProps, e2) : e2;
1095
- } }), process.env.NODE_ENV !== "production" && (P(y2, g2), D2.warnTooManyClasses = /* @__PURE__ */ (function(e2, t) {
1096
- var n = {}, o2 = !1;
1097
- return function(r2) {
1098
- if (!o2 && (n[r2] = !0, Object.keys(n).length >= 200)) {
1214
+ for (var r2 = 0, o = t; r2 < o.length; r2++) le(e2, o[r2], !0);
1215
+ return e2;
1216
+ })({}, u2.defaultProps, e) : e;
1217
+ } }), process.env.NODE_ENV !== "production" && (I(g2, S2), R2.warnTooManyClasses = /* @__PURE__ */ (function(e, t) {
1218
+ var n = {}, r2 = !1;
1219
+ return function(o) {
1220
+ if (!r2 && (n[o] = !0, Object.keys(n).length >= 200)) {
1099
1221
  var s2 = t ? ' with the id of "'.concat(t, '"') : "";
1100
- console.warn("Over ".concat(200, " classes were generated for component ").concat(e2).concat(s2, `.
1222
+ console.warn("Over ".concat(200, " classes were generated for component ").concat(e).concat(s2, `.
1101
1223
  `) + `Consider using the attrs method, together with a style object for frequently changed styles.
1102
1224
  Example:
1103
1225
  const Component = styled.div.attrs(props => ({
@@ -1106,67 +1228,67 @@ Example:
1106
1228
  },
1107
1229
  }))\`width: 100%;\`
1108
1230
 
1109
- <Component />`), o2 = !0, n = {};
1231
+ <Component />`), r2 = !0, n = {};
1110
1232
  }
1111
1233
  };
1112
- })(y2, g2)), ue(D2, function() {
1113
- return ".".concat(D2.styledComponentId);
1114
- }), c && oe(D2, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), D2;
1234
+ })(g2, S2)), pe(R2, function() {
1235
+ return ".".concat(R2.styledComponentId);
1236
+ }), p2 && oe(R2, s, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), R2;
1115
1237
  }
1116
- function at(e, t) {
1117
- for (var n = [e[0]], o2 = 0, r = t.length; o2 < r; o2 += 1) n.push(t[o2], e[o2 + 1]);
1238
+ function st(e, t) {
1239
+ for (var n = [e[0]], r2 = 0, o = t.length; r2 < o; r2 += 1) n.push(t[r2], e[r2 + 1]);
1118
1240
  return n;
1119
1241
  }
1120
- var ct = function(e) {
1242
+ var it = function(e) {
1121
1243
  return Object.assign(e, { isCss: !0 });
1122
1244
  };
1123
- function lt(t) {
1124
- for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
1125
- if (re(t) || ce(t)) return ct(Xe(at(_, __spreadArray([t], n, !0))));
1126
- var r = t;
1127
- return n.length === 0 && r.length === 1 && typeof r[0] == "string" ? Xe(r) : ct(Xe(at(r, n)));
1128
- }
1129
- function ut(n, o2, r) {
1130
- if (r === void 0 && (r = C), !o2) throw he(1, o2);
1245
+ function at(t) {
1246
+ for (var n = [], r2 = 1; r2 < arguments.length; r2++) n[r2 - 1] = arguments[r2];
1247
+ if (se(t) || ue(t)) return it(Ue(st(P, __spreadArray([t], n, !0))));
1248
+ var o = t;
1249
+ return n.length === 0 && o.length === 1 && typeof o[0] == "string" ? Ue(o) : it(Ue(st(o, n)));
1250
+ }
1251
+ function ct(n, r2, o) {
1252
+ if (o === void 0 && (o = O), !r2) throw g(1, r2);
1131
1253
  var s = function(t) {
1132
1254
  for (var s2 = [], i = 1; i < arguments.length; i++) s2[i - 1] = arguments[i];
1133
- return n(o2, r, lt.apply(void 0, __spreadArray([t], s2, !1)));
1255
+ return n(r2, o, at.apply(void 0, __spreadArray([t], s2, !1)));
1134
1256
  };
1135
1257
  return s.attrs = function(e) {
1136
- return ut(n, o2, __assign(__assign({}, r), { attrs: Array.prototype.concat(r.attrs, e).filter(Boolean) }));
1258
+ return ct(n, r2, __assign(__assign({}, o), { attrs: Array.prototype.concat(o.attrs, e).filter(Boolean) }));
1137
1259
  }, s.withConfig = function(e) {
1138
- return ut(n, o2, __assign(__assign({}, r), e));
1260
+ return ct(n, r2, __assign(__assign({}, o), e));
1139
1261
  }, s;
1140
1262
  }
1141
- var pt = function(e) {
1142
- return ut(it, e);
1143
- }, dt = pt;
1144
- A.forEach(function(e) {
1145
- dt[e] = pt(e);
1263
+ var ut = function(e) {
1264
+ return ct(ot, e);
1265
+ }, lt = ut;
1266
+ T.forEach(function(e) {
1267
+ lt[e] = ut(e);
1146
1268
  });
1147
- function mt(t) {
1148
- for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
1269
+ function ht(t) {
1270
+ for (var n = [], r2 = 1; r2 < arguments.length; r2++) n[r2 - 1] = arguments[r2];
1149
1271
  process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");
1150
- var r = ae(lt.apply(void 0, __spreadArray([t], n, !1))), s = $(r);
1151
- return new qe(s, r);
1272
+ var o = ce(at.apply(void 0, __spreadArray([t], n, !1))), s = B(o);
1273
+ return new Le(s, o);
1152
1274
  }
1153
1275
  process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
1154
1276
  Perhaps you're looking to import 'styled-components/native'?
1155
1277
  Read more about this at https://www.styled-components.com/docs/basics#react-native`);
1156
- var wt = "__sc-".concat(f, "__");
1157
- 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.
1278
+ var gt = "__sc-".concat(a, "__");
1279
+ process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[gt] || (window[gt] = 0), window[gt] === 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.
1158
1280
 
1159
- See https://s-c.sh/2BAXzed for more info.`), window[wt] += 1);
1160
- const DashboardContainer = dt.div`
1281
+ See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`), window[gt] += 1);
1282
+ const DashboardContainer = lt.div`
1161
1283
  width: 100%;
1162
1284
  min-height: 100%;
1163
1285
  background: #f0f2f5;
1164
1286
  padding: 28px 32px;
1165
1287
  box-sizing: border-box;
1166
1288
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1167
- `, PageHeader = dt.div`
1289
+ `, PageHeader = lt.div`
1168
1290
  margin-bottom: 28px;
1169
- `, PageTitle = dt.h1`
1291
+ `, PageTitle = lt.h1`
1170
1292
  margin: 0 0 6px 0;
1171
1293
  font-size: 22px;
1172
1294
  font-weight: 700;
@@ -1175,7 +1297,7 @@ const DashboardContainer = dt.div`
1175
1297
  display: flex;
1176
1298
  align-items: center;
1177
1299
  gap: 10px;
1178
- `, PreviewBadge = dt.span`
1300
+ `, PreviewBadge = lt.span`
1179
1301
  display: inline-block;
1180
1302
  background: #fef3c7;
1181
1303
  color: #92400e;
@@ -1186,41 +1308,41 @@ const DashboardContainer = dt.div`
1186
1308
  text-transform: uppercase;
1187
1309
  letter-spacing: 0.5px;
1188
1310
  margin-left: 8px;
1189
- `, PageSubtitle = dt.p`
1311
+ `, PageSubtitle = lt.p`
1190
1312
  margin: 0;
1191
1313
  font-size: 13px;
1192
1314
  color: #6b7280;
1193
- `, StatsGrid = dt.div`
1315
+ `, StatsGrid = lt.div`
1194
1316
  display: grid;
1195
1317
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
1196
1318
  gap: 14px;
1197
1319
  margin-bottom: 20px;
1198
- `, StatCard = dt.div`
1320
+ `, StatCard = lt.div`
1199
1321
  background: #ffffff;
1200
1322
  border-radius: 10px;
1201
1323
  padding: 16px 18px;
1202
1324
  box-shadow:
1203
1325
  0 1px 3px rgba(0, 0, 0, 0.07),
1204
1326
  0 1px 2px rgba(0, 0, 0, 0.05);
1205
- border-left: ${(p) => p.$accent ? `4px solid ${p.$accent}` : "4px solid transparent"};
1327
+ border-left: ${(p2) => p2.$accent ? `4px solid ${p2.$accent}` : "4px solid transparent"};
1206
1328
  transition: box-shadow 0.15s ease;
1207
1329
 
1208
1330
  &:hover {
1209
1331
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
1210
1332
  }
1211
- `, StatLabel = dt.div`
1333
+ `, StatLabel = lt.div`
1212
1334
  font-size: 11px;
1213
1335
  font-weight: 500;
1214
1336
  color: #9ca3af;
1215
1337
  text-transform: uppercase;
1216
1338
  letter-spacing: 0.5px;
1217
1339
  margin-bottom: 8px;
1218
- `, StatValue = dt.div`
1340
+ `, StatValue = lt.div`
1219
1341
  font-size: 26px;
1220
1342
  font-weight: 700;
1221
1343
  color: #111827;
1222
1344
  line-height: 1;
1223
- `, ControlsBar = dt.div`
1345
+ `, ControlsBar = lt.div`
1224
1346
  background: #ffffff;
1225
1347
  border-radius: 10px;
1226
1348
  padding: 14px 18px;
@@ -1230,11 +1352,11 @@ const DashboardContainer = dt.div`
1230
1352
  flex-wrap: wrap;
1231
1353
  margin-bottom: 20px;
1232
1354
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
1233
- `, SearchWrapper = dt.div`
1355
+ `, SearchWrapper = lt.div`
1234
1356
  position: relative;
1235
1357
  flex: 1;
1236
1358
  min-width: 220px;
1237
- `, SearchIconSvg = dt.span`
1359
+ `, SearchIconSvg = lt.span`
1238
1360
  position: absolute;
1239
1361
  left: 11px;
1240
1362
  top: 50%;
@@ -1243,7 +1365,7 @@ const DashboardContainer = dt.div`
1243
1365
  display: flex;
1244
1366
  align-items: center;
1245
1367
  pointer-events: none;
1246
- `, SearchInput = dt.input`
1368
+ `, SearchInput = lt.input`
1247
1369
  width: 100%;
1248
1370
  height: 36px;
1249
1371
  padding: 0 12px 0 34px;
@@ -1267,7 +1389,7 @@ const DashboardContainer = dt.div`
1267
1389
  background: #fff;
1268
1390
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
1269
1391
  }
1270
- `, StyledSelect = dt.select`
1392
+ `, StyledSelect = lt.select`
1271
1393
  height: 36px;
1272
1394
  padding: 0 32px 0 12px;
1273
1395
  border: 1px solid #e5e7eb;
@@ -1287,12 +1409,12 @@ const DashboardContainer = dt.div`
1287
1409
  background-color: #fff;
1288
1410
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
1289
1411
  }
1290
- `, TableCard = dt.div`
1412
+ `, TableCard = lt.div`
1291
1413
  background: #ffffff;
1292
1414
  border-radius: 10px;
1293
1415
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
1294
1416
  overflow: hidden;
1295
- `, TableHeader = dt.div`
1417
+ `, TableHeader = lt.div`
1296
1418
  display: flex;
1297
1419
  align-items: center;
1298
1420
  padding: 11px 20px;
@@ -1304,7 +1426,7 @@ const DashboardContainer = dt.div`
1304
1426
  text-transform: uppercase;
1305
1427
  letter-spacing: 0.5px;
1306
1428
  gap: 12px;
1307
- `, TableRow = dt.div`
1429
+ `, TableRow = lt.div`
1308
1430
  display: flex;
1309
1431
  align-items: center;
1310
1432
  padding: 13px 20px;
@@ -1319,29 +1441,29 @@ const DashboardContainer = dt.div`
1319
1441
  &:hover {
1320
1442
  background: #fafafa;
1321
1443
  }
1322
- `, ColTitle = dt.div`
1444
+ `, ColTitle = lt.div`
1323
1445
  flex: 2;
1324
1446
  min-width: 0;
1325
- `, TitleWrapper = dt.div`
1447
+ `, TitleWrapper = lt.div`
1326
1448
  display: flex;
1327
1449
  align-items: center;
1328
1450
  gap: 4px;
1329
1451
  flex-wrap: wrap;
1330
1452
  min-width: 0;
1331
- `, TitleCell = dt.div`
1453
+ `, TitleCell = lt.div`
1332
1454
  min-width: 0;
1333
1455
  overflow: hidden;
1334
1456
  flex: 1;
1335
- `, ColType = dt.div`
1457
+ `, ColType = lt.div`
1336
1458
  flex: 0.8;
1337
1459
  min-width: 80px;
1338
- `, ColScore = dt.div`
1460
+ `, ColScore = lt.div`
1339
1461
  flex: 0.6;
1340
1462
  min-width: 70px;
1341
- `, ColIssues = dt.div`
1463
+ `, ColIssues = lt.div`
1342
1464
  flex: 2;
1343
1465
  min-width: 0;
1344
- `, DocTitleLink = dt.a`
1466
+ `, DocTitleLink = lt.a`
1345
1467
  font-size: 13px;
1346
1468
  font-weight: 600;
1347
1469
  color: #4f46e5;
@@ -1356,51 +1478,51 @@ const DashboardContainer = dt.div`
1356
1478
  color: #4338ca;
1357
1479
  text-decoration: underline;
1358
1480
  }
1359
- `, DocId = dt.div`
1481
+ `, DocId = lt.div`
1360
1482
  font-size: 11px;
1361
1483
  color: #9ca3af;
1362
1484
  margin-top: 2px;
1363
1485
  white-space: nowrap;
1364
1486
  overflow: hidden;
1365
1487
  text-overflow: ellipsis;
1366
- `, TypeBadge = dt.span`
1488
+ `, TypeBadge = lt.span`
1367
1489
  display: inline-block;
1368
1490
  padding: 3px 8px;
1369
1491
  border-radius: 5px;
1370
1492
  font-size: 11px;
1371
1493
  font-weight: 500;
1372
- background: ${(p) => p.$bgColor || "#ede9fe"};
1373
- color: ${(p) => p.$textColor || "#5b21b6"};
1374
- `, TypeText = dt.span`
1494
+ background: ${(p2) => p2.$bgColor || "#ede9fe"};
1495
+ color: ${(p2) => p2.$textColor || "#5b21b6"};
1496
+ `, TypeText = lt.span`
1375
1497
  font-size: 12px;
1376
1498
  font-weight: 500;
1377
1499
  color: #374151;
1378
- `, CustomBadge = dt.span`
1500
+ `, CustomBadge = lt.span`
1379
1501
  display: inline-block;
1380
1502
  padding: 2px 6px;
1381
1503
  border-radius: 4px;
1382
- font-size: ${(p) => p.$fontSize || "10px"};
1504
+ font-size: ${(p2) => p2.$fontSize || "10px"};
1383
1505
  font-weight: 600;
1384
1506
  margin-left: 6px;
1385
- background: ${(p) => p.$bgColor || "#e0e7ff"};
1386
- color: ${(p) => p.$textColor || "#3730a3"};
1507
+ background: ${(p2) => p2.$bgColor || "#e0e7ff"};
1508
+ color: ${(p2) => p2.$textColor || "#3730a3"};
1387
1509
  white-space: nowrap;
1388
- `, ScoreBadge = dt.span`
1510
+ `, ScoreBadge = lt.span`
1389
1511
  display: inline-block;
1390
1512
  padding: 4px 10px;
1391
1513
  border-radius: 6px;
1392
1514
  font-size: 12px;
1393
1515
  font-weight: 700;
1394
- background: ${(p) => p.$score >= 80 ? "#d1fae5" : p.$score >= 60 ? "#fef3c7" : p.$score >= 40 ? "#ffedd5" : "#fee2e2"};
1395
- color: ${(p) => p.$score >= 80 ? "#065f46" : p.$score >= 60 ? "#92400e" : p.$score >= 40 ? "#9a3412" : "#991b1b"};
1396
- `, IssueTag = dt.div`
1516
+ background: ${(p2) => p2.$score >= 80 ? "#d1fae5" : p2.$score >= 60 ? "#fef3c7" : p2.$score >= 40 ? "#ffedd5" : "#fee2e2"};
1517
+ color: ${(p2) => p2.$score >= 80 ? "#065f46" : p2.$score >= 60 ? "#92400e" : p2.$score >= 40 ? "#9a3412" : "#991b1b"};
1518
+ `, IssueTag = lt.div`
1397
1519
  font-size: 11px;
1398
1520
  color: #ef4444;
1399
1521
  line-height: 1.5;
1400
1522
  white-space: nowrap;
1401
1523
  overflow: hidden;
1402
1524
  text-overflow: ellipsis;
1403
- `, MoreIssues = dt.div`
1525
+ `, MoreIssues = lt.div`
1404
1526
  font-size: 11px;
1405
1527
  color: #6b7280;
1406
1528
  cursor: pointer;
@@ -1409,10 +1531,10 @@ const DashboardContainer = dt.div`
1409
1531
  &:hover {
1410
1532
  color: #374151;
1411
1533
  }
1412
- `, MoreIssuesWrapper = dt.div`
1534
+ `, MoreIssuesWrapper = lt.div`
1413
1535
  position: relative;
1414
1536
  display: inline-block;
1415
- `, IssuesPopover = dt.div`
1537
+ `, IssuesPopover = lt.div`
1416
1538
  position: absolute;
1417
1539
  bottom: auto;
1418
1540
  left: 0;
@@ -1439,7 +1561,7 @@ const DashboardContainer = dt.div`
1439
1561
  border-right: 6px solid transparent;
1440
1562
  border-top: 6px solid #1f2937;
1441
1563
  }
1442
- `, PopoverIssueItem = dt.div`
1564
+ `, PopoverIssueItem = lt.div`
1443
1565
  display: flex;
1444
1566
  gap: 6px;
1445
1567
  margin-bottom: 6px;
@@ -1447,13 +1569,13 @@ const DashboardContainer = dt.div`
1447
1569
  &:last-child {
1448
1570
  margin-bottom: 0;
1449
1571
  }
1450
- `, UpgradeContainer = dt.div`
1572
+ `, UpgradeContainer = lt.div`
1451
1573
  display: flex;
1452
1574
  align-items: center;
1453
1575
  justify-content: center;
1454
1576
  min-height: 100%;
1455
1577
  padding: 60px 24px;
1456
- `, UpgradeBox = dt.div`
1578
+ `, UpgradeBox = lt.div`
1457
1579
  background: #ffffff;
1458
1580
  border-radius: 16px;
1459
1581
  padding: 48px 40px;
@@ -1464,20 +1586,20 @@ const DashboardContainer = dt.div`
1464
1586
  0 4px 24px rgba(0, 0, 0, 0.08),
1465
1587
  0 1px 4px rgba(0, 0, 0, 0.05);
1466
1588
  border: 1px solid #e5e7eb;
1467
- `, UpgradeLock = dt.div`
1589
+ `, UpgradeLock = lt.div`
1468
1590
  font-size: 40px;
1469
1591
  margin-bottom: 16px;
1470
- `, UpgradeTitle = dt.h2`
1592
+ `, UpgradeTitle = lt.h2`
1471
1593
  margin: 0 0 10px;
1472
1594
  font-size: 20px;
1473
1595
  font-weight: 700;
1474
1596
  color: #111827;
1475
- `, UpgradeText = dt.p`
1597
+ `, UpgradeText = lt.p`
1476
1598
  margin: 0 0 20px;
1477
1599
  font-size: 14px;
1478
1600
  color: #6b7280;
1479
1601
  line-height: 1.6;
1480
- `, UpgradeCode = dt.pre`
1602
+ `, UpgradeCode = lt.pre`
1481
1603
  background: #f3f4f6;
1482
1604
  border-radius: 8px;
1483
1605
  padding: 14px 16px;
@@ -1488,7 +1610,7 @@ const DashboardContainer = dt.div`
1488
1610
  overflow-x: auto;
1489
1611
  line-height: 1.6;
1490
1612
  border: 1px solid #e5e7eb;
1491
- `, UpgradeButton = dt.a`
1613
+ `, UpgradeButton = lt.a`
1492
1614
  display: inline-block;
1493
1615
  background: #4f46e5;
1494
1616
  color: #ffffff;
@@ -1502,7 +1624,7 @@ const DashboardContainer = dt.div`
1502
1624
  &:hover {
1503
1625
  background: #4338ca;
1504
1626
  }
1505
- `, ReloadButton = dt.button`
1627
+ `, ReloadButton = lt.button`
1506
1628
  display: inline-block;
1507
1629
  background: transparent;
1508
1630
  color: #6b7280;
@@ -1523,14 +1645,10 @@ const DashboardContainer = dt.div`
1523
1645
  color: #374151;
1524
1646
  border-color: #9ca3af;
1525
1647
  }
1526
- `, DocTitleAnchor = ({
1527
- id,
1528
- type,
1529
- children
1530
- }) => {
1531
- const { onClick, href } = router.useIntentLink({ intent: "edit", params: { id, type } });
1532
- return /* @__PURE__ */ jsxRuntime.jsx(DocTitleLink, { href, onClick, title: "Open document", children });
1533
- }, PaneLinkWrapper = dt.span`
1648
+ `, DocTitleAnchor = ({ id, type, structureTool, children }) => {
1649
+ const { basePath } = sanity.useWorkspace(), { onClick: intentOnClick, href: intentHref } = router.useIntentLink({ intent: "edit", params: { id, type } }), href = structureTool ? `${basePath}/${structureTool}/intent/edit/id=${id};type=${type}/` : intentHref;
1650
+ return /* @__PURE__ */ jsxRuntime.jsx(DocTitleLink, { href, onClick: structureTool ? void 0 : intentOnClick, title: "Open document", children });
1651
+ }, PaneLinkWrapper = lt.span`
1534
1652
  display: block;
1535
1653
  min-width: 0;
1536
1654
  overflow: hidden;
@@ -1561,9 +1679,9 @@ const DashboardContainer = dt.div`
1561
1679
  }, DocBadgeRenderer = ({ doc, docBadge }) => {
1562
1680
  const badge = docBadge(doc);
1563
1681
  return badge ? /* @__PURE__ */ jsxRuntime.jsx(CustomBadge, { $bgColor: badge.bgColor, $textColor: badge.textColor, $fontSize: badge.fontSize, children: badge.label }) : null;
1564
- }, spin = mt`
1682
+ }, spin = ht`
1565
1683
  to { transform: rotate(360deg); }
1566
- `, Spinner = dt.div`
1684
+ `, Spinner = lt.div`
1567
1685
  width: 28px;
1568
1686
  height: 28px;
1569
1687
  border: 3px solid #e5e7eb;
@@ -1571,12 +1689,12 @@ const DashboardContainer = dt.div`
1571
1689
  border-radius: 50%;
1572
1690
  animation: ${spin} 0.7s linear infinite;
1573
1691
  margin: 0 auto 12px;
1574
- `, LoadingState = dt.div`
1692
+ `, LoadingState = lt.div`
1575
1693
  padding: 48px 24px;
1576
1694
  text-align: center;
1577
1695
  color: #6b7280;
1578
1696
  font-size: 13px;
1579
- `, EmptyState = dt.div`
1697
+ `, EmptyState = lt.div`
1580
1698
  padding: 48px 24px;
1581
1699
  text-align: center;
1582
1700
  color: #9ca3af;
@@ -1800,9 +1918,10 @@ const DashboardContainer = dt.div`
1800
1918
  loadingDocuments,
1801
1919
  noDocuments,
1802
1920
  previewMode = !1,
1803
- openInPane = !1
1921
+ openInPane = !1,
1922
+ structureTool
1804
1923
  }) => {
1805
- const client = sanity.useClient({ apiVersion }), [licenseStatus, setLicenseStatus] = o.useState("loading"), [documents, setDocuments] = o.useState([]), [loading, setLoading] = o.useState(!0), [searchQuery, setSearchQuery] = o.useState(""), [filterStatus, setFilterStatus] = o.useState("all"), [filterType, setFilterType] = o.useState("all"), [sortBy, setSortBy] = o.useState("score"), [activePopover, setActivePopover] = o.useState(null), VALIDATION_ENDPOINT = "https://sanity-plugin-seofields.thehardik.in/api/validate-license", CACHE_TTL_MS = 3600 * 1e3, validateLicense = o.useCallback(
1924
+ const client = sanity.useClient({ apiVersion }), [licenseStatus, setLicenseStatus] = r.useState("loading"), [documents, setDocuments] = r.useState([]), [loading, setLoading] = r.useState(!0), [searchQuery, setSearchQuery] = r.useState(""), [filterStatus, setFilterStatus] = r.useState("all"), [filterType, setFilterType] = r.useState("all"), [sortBy, setSortBy] = r.useState("score"), [activePopover, setActivePopover] = r.useState(null), VALIDATION_ENDPOINT = "https://sanity-plugin-seofields.thehardik.in/api/validate-license", CACHE_TTL_MS = 3600 * 1e3, validateLicense = r.useCallback(
1806
1925
  async (forceRefresh = !1) => {
1807
1926
  if (previewMode) {
1808
1927
  setLicenseStatus("valid");
@@ -1849,7 +1968,7 @@ const DashboardContainer = dt.div`
1849
1968
  // eslint-disable-next-line react-hooks/exhaustive-deps
1850
1969
  [licenseKey, previewMode]
1851
1970
  );
1852
- o.useEffect(() => {
1971
+ r.useEffect(() => {
1853
1972
  validateLicense();
1854
1973
  }, [licenseKey, previewMode]);
1855
1974
  const handleMouseEnterIssues = (el, issues) => {
@@ -1858,7 +1977,7 @@ const DashboardContainer = dt.div`
1858
1977
  let left = rect.left;
1859
1978
  left + popoverWidth > viewportWidth - 10 && (left = viewportWidth - popoverWidth - 10), left < 10 && (left = 10), setActivePopover({ top: rect.top, left, issues });
1860
1979
  };
1861
- o.useEffect(() => {
1980
+ r.useEffect(() => {
1862
1981
  (async () => {
1863
1982
  try {
1864
1983
  if (setLoading(!0), previewMode) {
@@ -1908,18 +2027,18 @@ const DashboardContainer = dt.div`
1908
2027
  JSON.stringify(titleField),
1909
2028
  previewMode
1910
2029
  ]);
1911
- const uniqueDocumentTypes = o.useMemo(() => {
2030
+ const uniqueDocumentTypes = r.useMemo(() => {
1912
2031
  const types2 = new Set(documents.map((doc) => doc._type));
1913
2032
  return Array.from(types2).sort();
1914
- }, [documents]), filteredAndSortedDocs = o.useMemo(() => {
2033
+ }, [documents]), filteredAndSortedDocs = r.useMemo(() => {
1915
2034
  let filtered = documents;
1916
2035
  return searchQuery && (filtered = filtered.filter(
1917
2036
  (doc) => doc.title?.toLowerCase().includes(searchQuery.toLowerCase()) || doc._id?.toLowerCase().includes(searchQuery.toLowerCase())
1918
- )), filterStatus !== "all" && (filtered = filtered.filter((doc) => doc.health.status === filterStatus)), filterType !== "all" && (filtered = filtered.filter((doc) => doc._type === filterType)), [...filtered].sort((a, b) => sortBy === "score" ? b.health.score - a.health.score : (a.title || "").localeCompare(b.title || ""));
1919
- }, [documents, searchQuery, filterStatus, filterType, sortBy]), stats = o.useMemo(() => {
1920
- const total = documents.length, excellent = documents.filter((d) => d.health.score >= 80).length, good = documents.filter((d) => d.health.score >= 60 && d.health.score < 80).length, fair = documents.filter((d) => d.health.score >= 40 && d.health.score < 60).length, poor = documents.filter((d) => d.health.score > 0 && d.health.score < 40).length, missing = documents.filter((d) => d.health.score === 0).length, avgScore = total > 0 ? Math.round(documents.reduce((sum, d) => sum + d.health.score, 0) / total) : 0;
2037
+ )), filterStatus !== "all" && (filtered = filtered.filter((doc) => doc.health.status === filterStatus)), filterType !== "all" && (filtered = filtered.filter((doc) => doc._type === filterType)), [...filtered].sort((a2, b2) => sortBy === "score" ? b2.health.score - a2.health.score : (a2.title || "").localeCompare(b2.title || ""));
2038
+ }, [documents, searchQuery, filterStatus, filterType, sortBy]), stats = r.useMemo(() => {
2039
+ const total = documents.length, excellent = documents.filter((d2) => d2.health.score >= 80).length, good = documents.filter((d2) => d2.health.score >= 60 && d2.health.score < 80).length, fair = documents.filter((d2) => d2.health.score >= 40 && d2.health.score < 60).length, poor = documents.filter((d2) => d2.health.score > 0 && d2.health.score < 40).length, missing = documents.filter((d2) => d2.health.score === 0).length, avgScore = total > 0 ? Math.round(documents.reduce((sum, d2) => sum + d2.health.score, 0) / total) : 0;
1921
2040
  return { total, excellent, good, fair, poor, missing, avgScore };
1922
- }, [documents]), handleMouseLeave = o.useCallback(() => {
2041
+ }, [documents]), handleMouseLeave = r.useCallback(() => {
1923
2042
  setActivePopover(null);
1924
2043
  }, []);
1925
2044
  return /* @__PURE__ */ jsxRuntime.jsxs(DashboardContainer, { children: [
@@ -2086,7 +2205,7 @@ export default defineConfig({
2086
2205
  filteredAndSortedDocs.map((doc) => /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
2087
2206
  /* @__PURE__ */ jsxRuntime.jsx(ColTitle, { children: /* @__PURE__ */ jsxRuntime.jsxs(TitleWrapper, { children: [
2088
2207
  /* @__PURE__ */ jsxRuntime.jsxs(TitleCell, { children: [
2089
- openInPane ? /* @__PURE__ */ jsxRuntime.jsx(DocTitleAnchorPane, { id: doc._id, type: doc._type, children: doc.title || "Untitled" }) : /* @__PURE__ */ jsxRuntime.jsx(DocTitleAnchor, { id: doc._id, type: doc._type, children: doc.title || "Untitled" }),
2208
+ openInPane ? /* @__PURE__ */ jsxRuntime.jsx(DocTitleAnchorPane, { id: doc._id, type: doc._type, children: doc.title || "Untitled" }) : /* @__PURE__ */ jsxRuntime.jsx(DocTitleAnchor, { id: doc._id, type: doc._type, structureTool, children: doc.title || "Untitled" }),
2090
2209
  showDocumentId && /* @__PURE__ */ jsxRuntime.jsx(DocId, { children: doc._id })
2091
2210
  ] }),
2092
2211
  docBadge && /* @__PURE__ */ jsxRuntime.jsx(
@@ -2334,7 +2453,7 @@ export default defineConfig({
2334
2453
  color: "orange"
2335
2454
  }), feedback;
2336
2455
  }, MetaDescription = (props) => {
2337
- const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = o.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = o.useMemo(
2456
+ const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = r.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = r.useMemo(
2338
2457
  () => getMetaDescriptionValidationMessages(value || "", keywords, isParentseoField),
2339
2458
  [value, keywords, isParentseoField]
2340
2459
  );
@@ -2351,7 +2470,7 @@ export default defineConfig({
2351
2470
  ] }, item.text)) })
2352
2471
  ] });
2353
2472
  }, MetaTitle = (props) => {
2354
- const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = o.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = o.useMemo(
2473
+ const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = r.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = r.useMemo(
2355
2474
  () => getMetaTitleValidationMessages(value || "", keywords, isParentseoField),
2356
2475
  [value, keywords, isParentseoField]
2357
2476
  );
@@ -2372,14 +2491,14 @@ export default defineConfig({
2372
2491
  /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { weight: "bold", muted: !0, size: 14, children: item.text })
2373
2492
  ] }, item.text)) })
2374
2493
  ] });
2375
- }, PreviewContainer = dt.div`
2494
+ }, PreviewContainer = lt.div`
2376
2495
  max-width: 600px;
2377
2496
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
2378
2497
  background: #ffffff;
2379
2498
  border: 1px solid #dadce0;
2380
2499
  border-radius: 8px;
2381
2500
  overflow: hidden;
2382
- `, PreviewHeader = dt.div`
2501
+ `, PreviewHeader = lt.div`
2383
2502
  background: #f8f9fa;
2384
2503
  padding: 12px 16px;
2385
2504
  border-bottom: 1px solid #dadce0;
@@ -2387,15 +2506,15 @@ export default defineConfig({
2387
2506
  align-items: center;
2388
2507
  justify-content: space-between;
2389
2508
  gap: 8px;
2390
- `, PreviewBody = dt.div`
2509
+ `, PreviewBody = lt.div`
2391
2510
  padding: 16px;
2392
- `, SerpUrl = dt.p`
2511
+ `, SerpUrl = lt.p`
2393
2512
  margin: 0 0 4px;
2394
2513
  color: #006621;
2395
2514
  font-size: 13px;
2396
2515
  line-height: 1.4;
2397
2516
  word-break: break-word;
2398
- `, SerpTitle = dt.h3`
2517
+ `, SerpTitle = lt.h3`
2399
2518
  margin: 0 0 8px;
2400
2519
  color: #1a0dab;
2401
2520
  font-size: 18px;
@@ -2406,7 +2525,7 @@ export default defineConfig({
2406
2525
  &:hover {
2407
2526
  text-decoration: underline;
2408
2527
  }
2409
- `, SerpDescription = dt.p`
2528
+ `, SerpDescription = lt.p`
2410
2529
  margin: 0;
2411
2530
  color: #545454;
2412
2531
  font-size: 14px;
@@ -2416,7 +2535,7 @@ export default defineConfig({
2416
2535
  -webkit-line-clamp: 2;
2417
2536
  -webkit-box-orient: vertical;
2418
2537
  overflow: hidden;
2419
- `, LiveIndicator = dt.span`
2538
+ `, LiveIndicator = lt.span`
2420
2539
  display: inline-flex;
2421
2540
  align-items: center;
2422
2541
  gap: 4px;
@@ -2586,7 +2705,7 @@ export default defineConfig({
2586
2705
  const documentType = document2?._type;
2587
2706
  return isFieldHidden(fieldName, config, documentType);
2588
2707
  }, isEmpty = (value) => value == null || typeof value == "string" && value.trim() === "" || Array.isArray(value) && value.length === 0 || typeof value == "object" && !Array.isArray(value) && Object.keys(value).length === 0, OgDescription = (props) => {
2589
- const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = o.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = o.useMemo(
2708
+ const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = r.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = r.useMemo(
2590
2709
  () => getOgDescriptionValidation(value || "", keywords, isParentseoField),
2591
2710
  [value, keywords, isParentseoField]
2592
2711
  );
@@ -2608,7 +2727,7 @@ export default defineConfig({
2608
2727
  ] }, item.text)) })
2609
2728
  ] });
2610
2729
  }, OgTitle = (props) => {
2611
- const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = o.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = o.useMemo(
2730
+ const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = r.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = r.useMemo(
2612
2731
  () => getOgTitleValidation(value || "", keywords, isParentseoField),
2613
2732
  [value, keywords, isParentseoField]
2614
2733
  );
@@ -2739,7 +2858,7 @@ function openGraph(config = {}) {
2739
2858
  });
2740
2859
  }
2741
2860
  const TwitterDescription = (props) => {
2742
- const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = o.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = o.useMemo(
2861
+ const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = r.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = r.useMemo(
2743
2862
  () => getTwitterDescriptionValidation(value || "", keywords, isParentseoField),
2744
2863
  [value, keywords, isParentseoField]
2745
2864
  );
@@ -2761,7 +2880,7 @@ const TwitterDescription = (props) => {
2761
2880
  ] }, item.text)) })
2762
2881
  ] });
2763
2882
  }, TwitterTitle = (props) => {
2764
- const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = o.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = o.useMemo(
2883
+ const { value, renderDefault, path } = props, parent = sanity.useFormValue([path[0]]), isParentseoField = parent && parent?._type === "seoFields", keywords = r.useMemo(() => parent?.keywords || [], [parent?.keywords]), feedbackItems = r.useMemo(
2765
2884
  () => getTwitterTitleValidation(value || "", keywords, isParentseoField),
2766
2885
  [value, keywords, isParentseoField]
2767
2886
  );
@@ -3108,10 +3227,11 @@ const resolveDashboardConfig = (healthDashboard) => {
3108
3227
  loadingLicense: cfg?.content?.loadingLicense,
3109
3228
  loadingDocuments: cfg?.content?.loadingDocuments,
3110
3229
  noDocuments: cfg?.content?.noDocuments,
3111
- previewMode: cfg?.previewMode
3230
+ previewMode: cfg?.previewMode,
3231
+ structureTool: cfg?.structureTool
3112
3232
  };
3113
3233
  }, seofields = sanity.definePlugin((config = {}) => {
3114
- const { healthDashboard = !0 } = config, dash = resolveDashboardConfig(healthDashboard), BoundSeoHealthTool = () => o__default.default.createElement(SeoHealthTool, {
3234
+ const { healthDashboard = !0 } = config, dash = resolveDashboardConfig(healthDashboard), BoundSeoHealthTool = () => r__default.default.createElement(SeoHealthTool, {
3115
3235
  icon: dash.icon,
3116
3236
  title: dash.title,
3117
3237
  description: dash.description,
@@ -3129,7 +3249,8 @@ const resolveDashboardConfig = (healthDashboard) => {
3129
3249
  loadingLicense: dash.loadingLicense,
3130
3250
  loadingDocuments: dash.loadingDocuments,
3131
3251
  noDocuments: dash.noDocuments,
3132
- previewMode: dash.previewMode
3252
+ previewMode: dash.previewMode,
3253
+ structureTool: dash.structureTool
3133
3254
  });
3134
3255
  return {
3135
3256
  name: "sanity-plugin-seofields",